.public-page {
  display: block;
  background: var(--paper);
  color: #213e35;
}
.public-main {
  margin: 0 auto;
  padding: 48px 24px;
  max-width: 1120px;
  width: auto;
}
.public-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 5%;
  border-bottom: 1px solid #d8e0d5;
  gap: 24px;
}
.public-nav .brand {
  margin: 0;
}
.public-nav nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.public-nav a,
.public-footer a {
  color: #285345;
}
.public-main h1 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.1;
  margin: 16px 0 24px;
}
.public-main p {
  line-height: 1.6;
}
.welcome-hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 64px;
  padding: 24px 0 56px;
}
.welcome-stack {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  transform: rotate(-5deg);
}
.welcome-stack span {
  display: block;
  background: #2949d5;
  color: white;
  padding: 24px 20px;
  border-radius: 4px;
  font-family: Georgia, serif;
  font-size: 24px;
  box-shadow: 8px 8px 0 #d7dbcd;
}
.welcome-stack span:nth-child(2) {
  background: #2949d5;
}
.welcome-stack span:nth-child(3) {
  background: #526878;
}
.account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.account-card {
  background: white;
  border: 1px solid #d3ddcf;
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
}
.account-card h2 {
  margin-top: 0;
}
.button-link {
  display: inline-block;
  text-decoration: none;
  padding: 13px 18px;
  border-radius: 7px;
}
.account-actions,
.plan-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}
.plan-options label {
  border: 1px solid #b7c9bc;
  padding: 18px;
  border-radius: 8px;
  flex: 1;
}
.consent {
  display: block;
  line-height: 1.6;
  margin: 20px 0;
}
.consent input,
.plan-options input {
  width: auto;
  margin-right: 8px;
}
.public-footer {
  padding: 32px;
  text-align: center;
  color: #33476a;
  border-top: 1px solid #d3ddcf;
}
.user-card {
  border-bottom: 1px solid #d3ddcf;
  padding: 18px 0;
}
.user-card input,
.user-card select {
  max-width: 230px;
}
.user-card .account-actions {
  margin: 12px 0;
}
code {
  overflow-wrap: anywhere;
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.demo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.demo-book {
  background: white;
  padding: 24px;
  border: 1px solid #d3ddcf;
  border-radius: 10px;
}
.demo-cover {
  height: 220px;
  background: #2949d5;
  color: #fff;
  padding: 24px;
  font-family: Georgia, serif;
  font-size: 28px;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}
.demo-book:nth-child(2) .demo-cover {
  background: #526878;
}
.demo-book:nth-child(3) .demo-cover {
  background: #2949d5;
}
.getting-started {
  max-width: 620px;
}
.getting-step {
  padding: 16px 0;
  border-bottom: 1px solid #d3ddcf;
  display: flex;
  gap: 14px;
  align-items: center;
}
.getting-step input {
  width: auto;
}
.getting-step span {
  flex: 1;
}
@media (max-width: 700px) {
  .account-grid,
  .welcome-hero,
  .demo-grid {
    grid-template-columns: 1fr;
  }
  .welcome-hero {
    gap: 28px;
  }
  .welcome-stack {
    display: none;
  }
  .public-nav {
    align-items: flex-start;
    flex-direction: column;
  }
  .account-card {
    padding: 20px;
  }
  .public-main {
    padding: 28px 18px;
  }
}
.venue-url {
  overflow-wrap: anywhere;
  word-break: normal;
}

.saved-library-section {
  background: var(--paper);
  border: 2px solid #648be0;
  border-radius: 18px;
  padding: 24px;
  margin: 24px 0;
}
.saved-library-section .eyebrow {
  color: #274fa6;
}
.saved-library-section .local-library-card {
  background: #fff;
  border: 1px solid #b4c9ef;
}
.nearby-library-section {
  background: #ffffff !important;
  border: 2px solid #a193d4 !important;
  padding: 24px !important;
}
.nearby-library-section > .eyebrow,
.nearby-library-section .local-library-card > .eyebrow {
  color: #65518e;
}
.nearby-library-section .local-library-card {
  background: #fff;
  border: 1px solid #d1c7ed;
}

.location-group {
  --location-accent: #147e89;
  --location-tint: #f2f4f7;
  border: 2px solid var(--location-accent);
  border-left-width: 6px;
  border-radius: 14px;
  background: var(--location-tint);
  padding: 18px;
  margin: 18px 0;
  grid-column: 1/-1;
}
.location-group-1 {
  --location-accent: #7955ad;
  --location-tint: #ffffff;
}
.location-group > h2,
.location-group > h3 {
  color: var(--location-accent);
  margin-top: 0;
}
.location-group .community-card,
.location-group .place-card {
  background: white;
}
.nearby-library-section {
  background: var(--paper) !important;
  border-color: #9ba8c2 !important;
}

.location-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.location-tab {
  border: 2px solid #b7c7cb;
  border-radius: 10px;
  background: white;
  padding: 12px 18px;
  color: #116671;
  font-weight: 600;
}
.location-tab-1 {
  color: #684493;
  border-color: #cabce0;
}
.location-tab[aria-selected='true'] {
  background: #f2f4f7;
  border-color: #147e89;
}
.location-tab-1[aria-selected='true'] {
  background: #f2f4f7;
  border-color: #7955ad;
}
.location-group[hidden] {
  display: none !important;
}

.location-group-2 {
  background: var(--paper);
  border: 2px solid #6075e8;
  border-radius: 20px;
  padding: 24px;
}
.location-tab-2 {
  background: #edf2ff;
  color: #203ca0;
  border: 2px solid #6075e8;
}
.location-tab-2[aria-selected='true'] {
  background: #203ca0;
  color: #fff;
}

.location-group-3 {
  background: #f2f4f7;
  border: 2px solid #bf6e29;
  border-radius: 20px;
  padding: 24px;
}
.location-tab-3 {
  background: #f2f4f7;
  color: #7f3c09;
  border: 2px solid #bf6e29;
}
.location-tab-3[aria-selected='true'] {
  background: #2949d5;
  color: #fff;
}

.location-group-4 {
  background: #f2f4f7;
  border: 2px solid #409361;
  border-radius: 20px;
  padding: 24px;
}
.location-tab-4 {
  background: #f2f4f7;
  color: #1c5b32;
  border: 2px solid #409361;
}
.location-tab-4[aria-selected='true'] {
  background: #2949d5;
  color: #fff;
}

.location-group-5 {
  background: #f2f4f7;
  border: 2px solid #bc5980;
  border-radius: 20px;
  padding: 24px;
}
.location-tab-5 {
  background: #f2f4f7;
  color: #84284e;
  border: 2px solid #bc5980;
}
.location-tab-5[aria-selected='true'] {
  background: #84284e;
  color: #fff;
}

.writer-photo {
  width: 100%;
  height: 220px;
  object-fit: contain;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
}
#writer-import-dialog {
  width: min(920px, 95vw);
}
#writer-import-rows {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}
#writer-import-rows fieldset {
  min-width: 0;
  border: 2px solid #9aafff;
  border-radius: 14px;
  padding: 16px;
}

.saved-place-intro {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 24px;
}
.saved-place-intro img {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 22px;
  border: 3px solid #fff;
}
.saved-place-intro h2 {
  font-size: 36px;
  margin: 12px 0;
}
.saved-place-intro p {
  font-size: 17px;
  color: #102039;
}
.saved-place-intro .local-actions {
  justify-content: flex-start;
}
.saved-places-section,
.saved-library-section {
  background: var(--paper);
  border: 2px solid #6075ed;
  border-radius: 26px;
  padding: 28px;
}
.location-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}
.location-tabs .location-tab {
  min-height: 48px;
  padding: 12px 18px;
  border: 2px solid transparent;
  border-radius: 15px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 3px 0 rgba(16, 32, 57, 0.15);
}
.location-tabs .location-tab-0 {
  background: #2443bf;
  color: #fff;
}
.location-tabs .location-tab-1 {
  background: #e4edff;
  color: #102039;
}
.location-tabs .location-tab-2 {
  background: #6235b8;
  color: #fff;
}
.location-tabs .location-tab-3 {
  background: #e4edff;
  color: #102039;
}
.location-tabs .location-tab-4 {
  background: #2949d5;
  color: #102039;
}
.location-tabs .location-tab-5 {
  background: #086e73;
  color: #fff;
}
.location-tabs .location-tab-6 {
  background: #f2f4f7;
  color: #102039;
}
.location-tabs .location-tab[aria-selected='true'] {
  border-color: #102039;
  outline: 3px solid #fff;
  outline-offset: -5px;
  box-shadow: 0 4px 0 #102039;
}
.location-tabs .location-tab[aria-selected='true']::before {
  content: '✓ ';
  font-weight: 800;
}
@media (max-width: 750px) {
  .saved-place-intro {
    grid-template-columns: 1fr;
  }
  .saved-place-intro img {
    height: 220px;
  }
  .saved-places-section,
  .saved-library-section {
    padding: 18px;
  }
  .saved-place-intro h2 {
    font-size: 30px;
  }
}

.saved-place-intro .local-actions {
  justify-content: flex-start;
}
.saved-place-intro .local-actions button {
  flex: 0 0 auto;
  width: auto;
  padding: 9px 16px;
  min-height: 44px;
  font-size: 1rem;
}

#writer-results .button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 44px;
  padding: 8px 12px;
  font-size: 0.9rem;
  line-height: 1.25;
  margin: 4px 6px 4px 0;
  border-radius: 9px;
}

.primary-venue-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #172f55;
  margin-bottom: 12px;
  min-height: 44px;
}
.primary-venue-toggle input {
  width: 22px;
  height: 22px;
  accent-color: #3455cf;
}

/* Neutral white content panels beneath the solid location tabs. */
.saved-places-section,
.saved-library-section,
.nearby-library-section,
.location-group {
  --location-accent: #172f55;
  --location-tint: #fff;
  background: #fff !important;
  border: 1px solid #c3ccdc !important;
}
.location-group > h2,
.location-group > h3 {
  color: #172f55 !important;
}
.saved-library-section .local-library-card,
.nearby-library-section .local-library-card {
  border-color: #c3ccdc;
}

#library-location-actions {
  flex-wrap: wrap;
}
#library-location-actions .library-access-help {
  flex-basis: 100%;
  margin: 0 0 4px;
  color: #172f55;
}
/* Getting Started inline style still paints the retired pastel panel. */
.getting-planned {
  background: var(--paper) !important;
  border: 1px solid var(--line);
}
