.site-header {
  background: var(--ui-paper, #faf7ef);
  color: var(--ui-ink, #241c22);
  border-bottom: 1px solid var(--ui-line, #cfc7bc);
}
.site-header .header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 24px;
  flex-wrap: nowrap;
}
.site-header .site-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  color: var(--ui-ink, #241c22);
}
.site-header .site-name span {
  font-family: var(--display);
  font-size: 18px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.025em;
}
.site-header .brand-break { display: none; }
.site-header .site-search { flex: 1; margin: 0; }
.site-header .site-nav { display: flex; align-items: center; gap: 12px; margin: 0; flex-shrink: 0; }
.site-header .site-nav > :is(a, span[aria-current="page"]),
.site-header .books-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 4px;
  gap: 6px;
  color: var(--ui-ink, #241c22);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}
.site-header .books-trigger[hidden],
.site-header [data-occasions-fallback][hidden] { display: none; }
.site-header .nav-ic { display: none; }
.site-header .site-nav > .nav-search { display: none; }
@media (min-width: 1000px) {
  .site-header .site-nav > .nav-plan { inline-size: 104px; }
}

.site-header .nav-short { display: none; }
.site-header .nav-long { display: inline; }
.site-header .site-nav > [aria-current="page"]::after { display: none; }
.site-header .site-nav > [aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }
html.books-open { overflow: hidden; scrollbar-gutter: stable; }
.books-dialog {
  position: fixed;
  inset: 16px;
  width: calc(100% - 32px);
  max-width: 1120px;
  height: calc(100dvh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--ui-paper, #faf7ef);
  color: var(--ui-ink, #241c22);
  box-shadow: 0 12px 48px #241c2233;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.books-dialog::backdrop { background: #241c2299; }
.books-dialog .books-dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: var(--ui-paper, #faf7ef);
  border-bottom: 1px solid var(--ui-line, #cfc7bc);
}
.books-dialog .books-dialog-title { font-family: var(--display); font-size: 26px; font-weight: 700; margin: 0; color: var(--ui-ink, #241c22); }
.books-dialog .books-close {
  min-height: 44px;
  padding: 8px 16px;
  color: var(--ui-ink, #241c22);
  background: transparent;
  border: 1px solid var(--ui-line, #cfc7bc);
  border-radius: 4px;
  box-shadow: none;
  font-family: var(--display);
  font-weight: 600;
}
.books-dialog .books-dialog-body { padding: 24px; }
.books-dialog .books-world-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.books-dialog .books-world-grid > li { min-width: 0; padding: 0; margin: 0; background: transparent; border: 0; box-shadow: none; }
.books-dialog .books-world {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0 0 16px;
  background: #fffdf9;
  color: var(--ui-ink, #241c22);
  border: 0;
  border-radius: 0;
  text-decoration: none;
}
.books-dialog .books-world-art { display: block; height: 64px; margin-bottom: 14px; background-color: var(--field, #efe7d9); background-image: var(--world-art, none); background-position: center; background-size: cover; }
.books-dialog .books-world-name { padding: 0 16px; font-family: var(--display); font-size: 20px; font-weight: 600; line-height: 1.2; }
.books-dialog .books-world-meta { padding: 8px 16px 0; font-family: var(--display); font-size: 14px; font-weight: 400; line-height: 1.3; }
.books-dialog [data-series="acotar"] { --world-art: url('/assets/img/worlds/acotar-details.svg'); --field: #fae5eb; }
.books-dialog [data-series="acotar"] .books-world-name { font-family: "Newsreader", Georgia, serif; font-style: italic; font-weight: 400; font-size: 24px; }
.books-dialog [data-series="hunger-games"] { --world-art: url('/assets/img/worlds/hunger-games-details.svg'); --field: #25201c; }
.books-dialog [data-series="fourth-wing"] { --world-art: url('/assets/img/worlds/fourth-wing-scales.svg'); --field: #17181c; }
.books-dialog [data-series="percy-jackson"] { --world-art: url('/assets/img/worlds/percy-jackson-motif.svg'); }
.books-dialog [data-series="dune"] { --world-art: url('/assets/img/worlds/dune-motif.svg'); }
.books-dialog [data-series="harry-potter"] { --world-art: url('/assets/img/worlds/harry-potter-motif.svg'); }
.books-dialog [data-series="narnia"] { --world-art: url('/assets/img/worlds/narnia-motif.svg'); }
.books-dialog [data-series="marvel"] { --world-art: url('/assets/img/worlds/marvel-motif.svg'); }
.books-dialog [data-series="bridgerton"] { --world-art: url('/assets/img/worlds/bridgerton-motif.svg'); }
.books-dialog [data-series="bridgerton"] .books-world-name { font-family: "Newsreader", Georgia, serif; font-weight: 400; font-size: 24px; }
.books-dialog [data-series="one-piece"] { --world-art: url('/assets/img/worlds/one-piece-motif.svg'); }
.books-dialog [data-series="demon-slayer"] { --world-art: url('/assets/img/worlds/demon-slayer-motif.svg'); }
.books-dialog .books-help { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; border-top: 1px solid var(--ui-line, #cfc7bc); margin-top: 32px; padding-top: 24px; }
.books-dialog .books-help-label { font-family: var(--display); font-weight: 600; font-size: 18px; margin: 0 0 16px; }
.books-dialog .books-help-gifts { margin-block-start: 24px; }
.books-dialog .books-help ul { list-style: none; padding: 0; margin: 0; }
.books-dialog .books-help li { margin: 0; }
.books-dialog .books-help a { display: inline-block; padding: 10px 0; color: var(--ui-ink, #241c22); font-family: var(--display); font-size: 15px; line-height: 1.4; text-underline-offset: 3px; }
.books-occasion-jump, .books-occasion-all {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
  font-weight: 600;
  text-underline-offset: 3px;
}
.books-occasion-jump { margin-bottom: 12px; }
.books-occasions {
  border-top: 1px solid var(--ui-line, #cfc7bc);
  margin-top: 32px;
  padding: 20px 16px 0;
  scroll-margin-top: 80px;
}
.books-occasions:focus { outline: none; }
.books-occasions-label {
  font: 600 18px/1.3 var(--display);
  margin: 0 0 12px;
}
.books-occasions .books-any-night { margin-top: 24px; }
.books-occasion-grid, .books-occasion-chips { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.books-occasion-grid { gap: 12px; }
.books-occasion-grid > li { flex: 1 1 208px; margin: 0; }
.books-occasion-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  min-height: 82px;
  padding: 12px 16px;
  color: inherit;
  background: #fffdf9;
  border: 1px solid var(--ui-line, #cfc7bc);
  text-decoration: none;
}
.books-occasion-tile strong { font-size: 16px; text-decoration: underline; text-underline-offset: 3px; }
.books-occasion-tile :is(time, .books-occasion-date-note) { font-size: 14px; }
.books-occasion-chips { gap: 8px; }
.books-occasion-chips > li { margin: 0; }
.books-occasion-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  color: inherit;
  background: #fffdf9;
  border: 1px solid var(--ui-line, #cfc7bc);
  border-radius: 99px;
  text-underline-offset: 3px;
}
.books-occasions > [data-occasion-url] { margin: 12px 0 0; }
.site-footer { background: var(--ui-paper, #faf7ef); color: var(--ui-ink, #241c22); padding: 40px 24px 24px; border-top: 1px solid var(--ui-line, #cfc7bc); }
.site-footer .footer-inner { max-width: 1180px; margin: 0 auto; }
.site-footer .footer-cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; margin: 28px 0; }
.site-footer .footer-label { font-family: var(--display); font-size: 16px; font-weight: 600; line-height: 1.3; margin: 0 0 12px; }
.site-footer summary.footer-label { cursor: pointer; min-block-size: 44px; align-content: center; margin: 0; }
.site-footer .footer-cols ul { padding: 0; margin: 0; list-style: none; }
.site-footer .footer-cols li { margin: 0; }
.site-footer .footer-cols :is(a, span[aria-current="page"]) { display: inline-block; padding: 6px 0; color: var(--ui-ink, #241c22); font-family: var(--display); font-size: 14px; font-weight: 400; line-height: 1.4; text-decoration: underline; text-underline-offset: 3px; }
.site-footer .footer-note { font-family: var(--display); font-size: 13px; line-height: 1.6; margin: 24px 0 16px; color: var(--ui-ink, #241c22); }
.site-footer .footer-legal { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.site-footer .footer-legal :is(a, span[aria-current="page"]) { font-family: var(--display); font-size: 13px; line-height: 1.5; color: var(--ui-ink, #241c22); }
@media (max-width: 999px) {
  .site-header .header-row { padding: 8px 16px; gap: 12px; }
  .site-header .site-search { display: none; }
  .site-header .site-name span { font-size: 16px; }
  .site-header .brand-break { display: inline; }
  .site-header .site-nav { gap: 10px; }
  .site-header .site-nav > :is(a, span[aria-current="page"]), .site-header .books-trigger { font-size: 14px; padding: 8px 0; min-width: 40px; }
  .site-header .site-nav > .nav-search { display: none; }
  .site-header .nav-long { display: none; }
  .site-header .nav-short { display: inline; }
  .books-dialog .books-world-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
  .site-header .header-row { gap: 8px; }
  .site-header .site-name { gap: 5px; }
  .site-header .site-name svg { width: 27px; height: 32px; }
  .site-header .site-nav { gap: 12px; }
  .books-dialog { inset: 8px; width: calc(100% - 16px); height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); }
  .books-dialog .books-dialog-head { padding: 12px 16px; }
  .books-dialog .books-dialog-title { font-size: 24px; }
  .books-dialog .books-dialog-body { padding: 16px; }
  .books-dialog .books-world-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .books-dialog .books-world-art { height: 48px; margin-bottom: 12px; }
  .books-dialog .books-world-name { font-size: 17px; padding: 0 12px; }
  
  .books-dialog .books-world-grid [data-series] .books-world-name { font-size: 17px; }
  .books-dialog .books-world-meta { padding: 8px 12px 0; }
  .books-dialog .books-help { grid-template-columns: 1fr; gap: 24px; }
  .books-occasions { padding-inline: 12px; }
  .books-occasion-grid > li { flex-basis: 140px; }
  .books-occasion-tile { padding: 10px 12px; }
  .site-footer { padding: 32px 16px 24px; }
  .site-footer .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
}
@media (max-width: 379px) {
  .site-header .site-name span { display: none; }
  .site-header .site-nav { gap: 16px; }
}
@media (max-width: 999px) {
  .site-header .site-nav > .nav-search { display: inline-flex; min-width: 28px; }
  .site-header .nav-search .nav-ic { display: block; width: 20px; height: 20px; }
  .site-header .nav-search > span { display: none; }
}

.books-dialog .books-world-grid { display: flex; flex-wrap: wrap; }
.books-dialog .books-world-grid > li { flex: 1 1 calc(25% - 16px); }
@media (min-width: 600px) and (max-width: 999px) {
  .books-dialog .books-world-grid > li { flex-basis: calc(33.333% - 16px); }
}
@media (max-width: 599px) {
  .books-dialog .books-world-grid > li { flex-basis: calc(50% - 12px); }
}
.site-footer .footer-name,
.site-footer .footer-label { color: var(--ui-ink, #241c22); }
.site-footer .mark .mk-ink { fill: var(--ui-ink, #241c22); }
.site-footer .mark .mk-cut { stroke: var(--ui-paper, #faf7ef); }
.site-footer .mark .mk-star { fill: var(--ui-paper, #faf7ef); }
.site-footer .footer-cols { grid-template-areas: none; }
.site-footer .footer-cols :is(a, span[aria-current="page"]) { min-height: 44px; }
.site-footer .footer-cols a { text-decoration-color: currentColor; }
.site-footer .footer-legal a { text-decoration-color: currentColor; }
html { scrollbar-gutter: stable; }

.world-chip[data-world="hunger-games"] { --chip-bg: #f2d7bd; --chip-ink: #512f23; }
.world-chip[data-world="acotar"] { --chip-bg: #f3d9e4; --chip-ink: #55243e; }
.world-chip[data-world="fourth-wing"] { --chip-bg: #dfdfeb; --chip-ink: #25243a; }
.world-chip[data-world="percy-jackson"] { --chip-bg: #d3e9ed; --chip-ink: #163b4a; }
.world-chip[data-world="dune"] { --chip-bg: #eed9ad; --chip-ink: #51351d; }
.world-chip[data-world="harry-potter"] { --chip-bg: #e4e3c8; --chip-ink: #3a3624; }
.world-chip[data-world="narnia"] { --chip-bg: #dce7ef; --chip-ink: #263c56; }
.world-chip[data-world="marvel"] { --chip-bg: #f3d7d6; --chip-ink: #682930; }
.world-chip[data-world="bridgerton"] { --chip-bg: #dbead9; --chip-ink: #2a4932; }
.world-chip[data-world="one-piece"] { --chip-bg: #f2e3b8; --chip-ink: #452e1c; }
.world-chip[data-world="demon-slayer"] { --chip-bg: #d8e5dc; --chip-ink: #214437; }
.world-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--chip-bg, #efe7d9);
  color: var(--chip-ink, #241c22);
  border-radius: 9px;
  font-family: var(--display);
}
.world-chip-emblem { flex: 0 0 auto; object-fit: contain; }
.books-dialog .books-world-name.world-chip {
  flex-wrap: wrap;
  row-gap: 2px;
  align-self: flex-start;
  max-width: calc(100% - 16px);
  margin-inline: 8px;
  padding: 5px 8px;
}
.header-now:not(:has(.now-chip:not([hidden]))) { display: none; }
.header-now { padding: 0 24px 4px; }
.now-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 6px;
  color: #402a1e;
  font: 600 .875rem/1.25 var(--display);
}
.now-chip strong {
  background: #efdbb8;
  color: #402a1e;
  border-radius: 7px;
  padding: 4px 7px;
}
@media (max-width: 750px) {
  .header-now { padding-inline: 16px; }
}

.site-header .site-nav .nav-pattern { display: inline-block; }
@media (max-width: 599px) {
  .site-header .site-nav > :is(a, button):has(> .nav-pattern) {
    flex-direction: column;
    gap: 2px;
    padding-block: 4px;
  }
}

.site-header .site-nav .nav-pattern { inline-size: 22px; block-size: 22px; flex: 0 0 auto; }
.site-header .nav-plan { white-space: nowrap; }
@media (min-width: 1000px) and (max-width: 1199px) {
  .site-header .nav-plan .nav-long { display: none; }
  .site-header .nav-plan .nav-short { display: inline; }
}
@media (min-width: 1200px) {
  .site-header .site-nav > .nav-plan { inline-size: 128px; }
}
.books-dialog :is(.books-occasion-tile,.books-occasion-chip).world-chip {
  background: var(--chip-bg, #efe7d9);
  color: var(--chip-ink, #241c22);
}
.books-dialog .books-occasion-tile.world-chip { display: flex; align-items: flex-start; }


.site-header .site-nav > [data-occasions-open] { inline-size: 112px; }
@media (max-width: 999px) {
  .site-header .site-nav > [data-occasions-open] { inline-size: 100px; }
}
@media (max-width: 599px) {
  .site-header .site-nav > [data-occasions-open] { inline-size: 72px; }
}

@media (max-width: 430px) {
  .site-header .header-row { gap: 6px; padding-inline: 12px; }
  .site-header .site-nav { gap: 4px; }
  .site-header .header-row .site-name > span { display: inline-block; max-inline-size: none; white-space: nowrap; font-size: 14px; }
}
@media (max-width: 350px) {
  .site-header .header-row .site-name > span { font-size: 12px; }
  .site-header .site-nav > :is(a,span[aria-current="page"]) { min-inline-size: 32px; font-size: 12px; }
  .site-header .site-nav > [data-occasions-open] { inline-size: 62px; }
  .site-header .site-nav > .nav-search { min-inline-size: 24px; }
}


@media (min-width: 900px) {
  .site-footer .footer-cols { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .site-footer .footer-cols > .footer-occasions { grid-column: span 2; }
  .site-footer .footer-occasions ul { columns: 2; column-gap: 24px; }
  .site-footer .footer-occasions li { break-inside: avoid; }
}
