:root {
  color-scheme: dark;
  --ink: #f3f0e5;
  --muted: #c8c1ad;
  --paper: #171a16;
  --surface: rgba(17, 20, 17, 0.78);
  --surface-strong: rgba(9, 11, 9, 0.84);
  --line: rgba(237, 229, 199, 0.2);
  --accent: #d6c36a;
  --accent-strong: #fff0a6;
  --warm: #d99a64;
  --shadow: 0 22px 54px rgba(0, 0, 0, 0.42);
  --floating-glass: linear-gradient(180deg, rgba(17, 20, 17, 0.58), rgba(9, 11, 9, 0.46));
  --floating-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

@font-face {
  font-family: "SF Gothican";
  src: url("../assets/font/SF-Gothican.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  --bg-offset: 0vw;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
}

body::before {
  z-index: -2;
  left: -45vw;
  width: 190vw;
  background: url("../assets/img/background.jpg") center / cover no-repeat;
  transform: translateX(var(--bg-offset));
  transition: transform 760ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

body::after {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(10, 12, 10, 0.64), rgba(10, 12, 10, 0.24)),
    radial-gradient(circle at 20% 25%, rgba(214, 195, 106, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(5, 6, 5, 0.12), rgba(5, 6, 5, 0.58));
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  .page-track {
    transition: none !important;
  }
}

a {
  color: inherit;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  margin: 0;
  padding: 14px clamp(20px, 6vw, 80px);
}

.header-tools {
  position: fixed;
  top: 84px;
  right: max(20px, calc((100vw - 1120px) / 2));
  z-index: 20;
  display: grid;
  justify-items: end;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--floating-glass);
  box-shadow: var(--floating-shadow);
  backdrop-filter: blur(16px);
}

.brand-nav {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}

.brand,
.brand-divider {
  color: var(--ink);
  font-family: "SF Gothican", "Cooper Black", Georgia, serif;
  font-synthesis: weight;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  text-shadow:
    0 3px 4px rgba(0, 0, 0, 0.48),
    0 0 1px rgba(255, 255, 255, 0.35);
}

.brand {
  text-decoration: none;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.brand:hover,
.brand:focus-visible {
  color: var(--accent-strong);
  outline: none;
  text-decoration-line: underline;
}

.brand-divider {
  opacity: 0.72;
}

.author {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.filter-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.filter-control select {
  min-width: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 34px 9px 12px;
  background: rgba(17, 20, 17, 0.84);
  color: var(--ink);
  font: inherit;
  text-transform: none;
}

.filter-control select:focus-visible {
  border-color: rgba(214, 195, 106, 0.72);
  outline: none;
}

.stage {
  --panel-index: 0;
  width: 100vw;
  overflow: hidden;
  transition: height 220ms ease;
}

.page-track {
  display: flex;
  align-items: flex-start;
  width: max-content;
  transform: translateX(calc(var(--panel-index) * -100vw));
  transition: transform 760ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.page-panel {
  flex: 0 0 100vw;
  min-height: calc(100vh - 94px);
  padding: 36px max(20px, calc((100vw - 1120px) / 2)) 80px;
}

.home {
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(320px, 1.02fr);
  gap: 56px;
  align-items: start;
}

.intro {
  position: sticky;
  top: 28px;
  justify-self: end;
  padding-top: 140px;
  text-align: right;
}

.kicker {
  margin: 0 0 16px;
  color: var(--warm);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.intro .kicker {
  color: #fff;
  font-family: "SF Gothican", "Cooper Black", Georgia, serif;
  font-synthesis: none;
  font-size: clamp(1.35rem, 2.8vw, 2.6rem);
  font-weight: 400;
  line-height: 1;
  text-shadow:
    0 3px 4px rgba(0, 0, 0, 0.48),
    0 0 1px rgba(255, 255, 255, 0.35);
  text-transform: none;
}

h1 {
  max-width: 11ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.2rem, 8vw, 6.8rem);
  line-height: 0.93;
  letter-spacing: 0;
}

.intro-subtitle {
  max-width: 560px;
  margin: 28px 0 0;
  color: #e5b17c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.22rem, 2.2vw, 1.72rem);
  font-style: italic;
  line-height: 1.28;
}

.intro p {
  margin-left: auto;
}

.constellation-link {
  position: relative;
  display: inline-grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: min(100%, 360px);
  max-width: 360px;
  margin-top: 30px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 240, 166, 0.36);
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 22px 50%, rgba(255, 240, 166, 0.22), transparent 52px),
    rgba(24, 28, 23, 0.84);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.34),
    0 0 26px rgba(214, 195, 106, 0.12);
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.constellation-link::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 0 34%, rgba(255, 240, 166, 0.14) 44%, transparent 54% 100%);
  content: "";
  transform: translateX(-120%);
  animation: constellation-sweep 3.8s ease-in-out infinite;
  pointer-events: none;
}

.constellation-link:hover,
.constellation-link:focus-visible {
  border-color: rgba(255, 240, 166, 0.72);
  box-shadow:
    0 22px 52px rgba(0, 0, 0, 0.44),
    0 0 34px rgba(214, 195, 106, 0.2);
  outline: none;
  transform: translateY(-3px);
}

.constellation-link strong,
.constellation-link small {
  display: block;
}

.constellation-link strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  line-height: 1.1;
}

.constellation-link small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.timeline-link {
  margin-top: 14px;
}

.timeline-link-mark {
  position: relative;
  width: 34px;
  height: 42px;
}

.timeline-link-mark::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--accent-strong);
  box-shadow: 0 0 16px rgba(255, 240, 166, 0.45);
  content: "";
}

.timeline-link-mark::after {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--warm);
  box-shadow:
    0 15px 0 var(--accent),
    0 30px 0 #9eb9a6;
  content: "";
  transform: translateX(-5px);
}

.constellation-orbit {
  position: relative;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 240, 166, 0.42);
  border-radius: 50%;
}

.constellation-orbit::before,
.constellation-orbit::after {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.constellation-orbit::before {
  inset: 8px;
  background: var(--accent-strong);
  box-shadow:
    0 0 12px rgba(255, 240, 166, 0.72),
    16px -8px 0 -5px var(--warm),
    -12px 12px 0 -5px #9cf6c8;
}

.constellation-orbit::after {
  inset: 1px;
  border: 1px solid rgba(156, 246, 200, 0.48);
  transform: rotate(28deg) scaleX(1.42);
  animation: constellation-orbit 4.8s linear infinite;
}

@keyframes constellation-sweep {
  0%,
  58% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(120%);
  }
}

@keyframes constellation-orbit {
  to {
    transform: rotate(388deg) scaleX(1.42);
  }
}

.story-list {
  display: grid;
  gap: 14px;
}

.story-link {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 128px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  text-decoration: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.story-link:hover,
.story-link:focus-visible {
  border-color: rgba(214, 195, 106, 0.58);
  background: rgba(24, 28, 23, 0.88);
  box-shadow: var(--shadow);
  outline: none;
  transform: translateY(-2px);
}

.story-link[hidden] {
  display: none;
}

.story-thumb {
  grid-row: 1 / span 2;
  width: 62px;
  height: 96px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.34);
}

.story-copy {
  min-width: 0;
}

.story-link strong {
  display: block;
  margin-bottom: 9px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 2vw, 1.36rem);
  line-height: 1.18;
}

.story-link small {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.story-link small span + span::before {
  content: "/";
  margin-right: 10px;
  color: rgba(200, 193, 173, 0.54);
}

.back-link {
  flex: 0 0 auto;
  border-bottom: 2px solid var(--accent);
  color: var(--accent-strong);
  font-family: "SF Gothican", "Cooper Black", Georgia, serif;
  font-synthesis: none;
  font-size: 1.28rem;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  text-shadow:
    0 3px 4px rgba(0, 0, 0, 0.48),
    0 0 1px rgba(255, 255, 255, 0.35);
}

.download-action {
  grid-column: 3;
  grid-row: 1 / span 2;
  justify-self: end;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-top: -4px;
  border: 1px solid rgba(255, 240, 166, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.download-action img {
  display: block;
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.story-download {
  grid-column: 3;
  grid-row: 1 / span 2;
  justify-self: end;
  align-self: center;
  display: block;
  width: 40px;
  height: 40px;
  padding: 7px;
  border: 1px solid rgba(255, 240, 166, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  object-fit: contain;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.detail-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 10px 12px;
  margin: 24px 0 0;
}



.return-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 118px;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--floating-glass);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: var(--floating-shadow);
  backdrop-filter: blur(16px);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.return-index i {
  display: block;
  width: 10px;
  height: 10px;
  border-color: currentColor;
  border-style: solid;
  border-width: 2px 2px 0 0;
}

.return-index--left i {
  transform: rotate(-135deg);
}

.return-index--right i {
  transform: rotate(45deg);
}

.return-index:hover,
.return-index:focus-visible {
  border-color: rgba(255, 240, 166, 0.72);
  background: linear-gradient(180deg, rgba(25, 29, 24, 0.68), rgba(12, 14, 12, 0.56));
  color: var(--ink);
  box-shadow: var(--shadow);
  outline: none;
  transform: translateY(-2px);
}

.detail-nav--return-left .return-index {
  grid-column: 1;
  justify-self: start;
}

.detail-nav--return-right .return-index {
  grid-column: 2;
  justify-self: end;
}

.detail-nav .nav-prev {
  grid-column: 1;
  grid-row: 2;
  justify-self: start;
}

.detail-nav .nav-next {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
}

.nav-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.nav-arrow:hover,
.nav-arrow:focus-visible {
  border-color: rgba(214, 195, 106, 0.58);
  background: rgba(24, 28, 23, 0.88);
  outline: none;
  transform: translateY(-2px);
}

.nav-arrow.is-disabled {
  color: rgba(243, 240, 229, 0.38);
  cursor: default;
  opacity: 0.72;
}

.nav-arrow.is-disabled:hover {
  border-color: var(--line);
  background: var(--surface);
  transform: none;
}

.story-page {
  width: auto;
  max-width: none;
  margin: 0;
  padding-inline: max(20px, calc((100vw - 900px) / 2));
}

.book-detail {
  display: grid;
  justify-items: center;
  gap: 26px;
  padding: 38px 0 0;
}

.book-cover {
  display: block;
  width: auto;
  max-width: min(100%, 360px);
  max-height: 500px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.5);
}

.book-info {
  width: min(760px, 100%);
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.book-info h1 {
  max-width: 100%;
  font-size: clamp(1.8rem, 4.4vw, 3.65rem);
  line-height: 1.02;
}

.book-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0 0;
}

.back-to-top {
  position: fixed;
  right: max(20px, calc((100vw - 1120px) / 2));
  bottom: 24px;
  z-index: 20;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--floating-glass);
  color: var(--accent-strong);
  box-shadow: var(--floating-shadow);
  cursor: pointer;
  backdrop-filter: blur(16px);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.back-to-top-icon {
  display: block;
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.9;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  border-color: rgba(255, 240, 166, 0.72);
  background: linear-gradient(180deg, rgba(25, 29, 24, 0.68), rgba(12, 14, 12, 0.56));
  box-shadow: var(--shadow);
  outline: none;
  transform: translateY(-2px);
}

.fact-item {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(237, 229, 199, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.download-fact {
  grid-column: 1 / -1;
  border-color: rgba(217, 154, 100, 0.32);
  background: rgba(217, 154, 100, 0.12);
}

.fact-item dt {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.fact-item dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.35;
}

.links-fact dd {
  display: flex;
  align-items: center;
  min-height: 34px;
}

.goodreads-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.goodreads-link:hover,
.goodreads-link:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
  transform: translateY(-2px);
}

.goodreads-link img {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.book-description {
  margin: 24px 0 0;
  color: var(--ink);
  font-size: 1.04rem;
  line-height: 1.7;
}

.book-description a {
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.book-description a:hover,
.book-description a:focus-visible {
  color: #fff;
  outline: none;
}

.download-formats {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  justify-content: flex-end;
}

.download-format {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  padding: 6px;
  border: 1px solid rgba(255, 240, 166, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.download-format:hover,
.download-format:focus-visible {
  border-color: rgba(214, 195, 106, 0.72);
  background: rgba(24, 28, 23, 0.88);
  outline: none;
  transform: translateY(-2px);
}

.download-format img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .header-tools {
    position: sticky;
    top: 12px;
    right: auto;
    left: auto;
    z-index: 20;
    justify-items: start;
    width: 100%;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--floating-glass);
    box-shadow: var(--floating-shadow);
    backdrop-filter: blur(16px);
  }

  .filter-control {
    width: 100%;
    justify-content: space-between;
  }

  .filter-control select {
    min-width: 0;
    width: min(220px, 62vw);
  }

  .page-panel {
    padding-bottom: 56px;
  }

  .home {
    grid-template-columns: 1fr;
    gap: 34px;
    margin-top: 12px;
  }

  .intro {
    position: static;
    grid-row: 1;
    justify-self: start;
    padding-top: 22px;
    text-align: left;
  }

  .intro p {
    margin-left: 0;
  }

  .constellation-link {
    max-width: 100%;
  }

  .story-list {
    grid-row: 2;
  }

  h1 {
    max-width: 9ch;
  }

  .story-link {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 14px;
    min-height: 112px;
  }

  .story-thumb {
    width: 52px;
    height: 82px;
  }

  .story-download {
    width: 36px;
    height: 36px;
    padding: 6px;
  }

  .story-link small {
    flex-direction: column;
    gap: 3px;
  }

  .story-link small span + span::before {
    content: none;
  }

  .detail-nav {
    margin-top: 18px;
  }

  .nav-arrow {
    min-width: 0;
    flex: 1;
  }

  .book-info {
    padding: 20px;
  }

  .book-facts {
    grid-template-columns: 1fr;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 48px;
    height: 48px;
  }
}

/* Anchored site menu replacing the old breadcrumb. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  overflow: visible;
  border-bottom: 1px solid rgba(237, 229, 199, 0.08);
  background: linear-gradient(180deg, rgba(12, 14, 12, 0.5), rgba(12, 14, 12, 0.18));
  backdrop-filter: blur(8px);
}

.site-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px clamp(14px, 2vw, 24px);
  overflow: visible;
}

.brand-menu-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.brand-submenu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 90;
  display: grid;
  gap: 4px;
  min-width: 178px;
  padding: 10px;
  border: 1px solid rgba(237, 229, 199, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(17, 20, 17, 0.9), rgba(8, 10, 8, 0.82));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
  backdrop-filter: blur(14px);
}

.brand-menu-item::after {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 12px;
  content: "";
}

.brand-menu-item:hover .brand-submenu,
.brand-menu-item:focus-within .brand-submenu {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateY(0);
}

.brand-submenu a {
  color: var(--ink);
  font-family: "SF Gothican", "Cooper Black", Georgia, serif;
  font-synthesis: weight;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  text-shadow:
    0 3px 4px rgba(0, 0, 0, 0.48),
    0 0 1px rgba(255, 255, 255, 0.35);
  white-space: nowrap;
}

.brand-submenu a:hover,
.brand-submenu a:focus-visible {
  color: var(--accent-strong, var(--accent, #fff0a6));
  outline: none;
  text-decoration-line: underline;
}

@media (max-width: 760px) {
  .site-header {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .site-menu {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 8px;
    scrollbar-width: thin;
  }

  .brand,
  .brand-submenu a {
    font-size: 1.32rem;
    white-space: nowrap;
  }
}


.header-tools {
  transition: opacity 160ms ease, visibility 160ms ease, transform 160ms ease;
}

body.is-detail-panel .header-tools {
  display: none;
}

/* Collapsible menu for mobile. */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 38px;
  border: 1px solid rgba(237, 229, 199, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(17, 20, 17, 0.62), rgba(8, 10, 8, 0.42));
  color: var(--ink);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.menu-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 6px 0 currentColor, 0 -6px 0 currentColor;
}

.menu-toggle span + span {
  display: none;
}

@media (max-width: 760px) {
  .site-menu {
    position: relative;
    display: grid;
    justify-items: start;
    gap: 0;
    max-width: min(360px, calc(100vw - 28px));
    overflow: visible;
    padding-bottom: 0;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-menu > :not(.menu-toggle) {
    display: none;
  }

  .site-menu.is-open {
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(237, 229, 199, 0.16);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(17, 20, 17, 0.88), rgba(8, 10, 8, 0.76));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(14px);
  }

  .site-menu.is-open > .brand {
    display: block;
  }

  .site-menu.is-open > .brand-menu-item {
    display: grid;
    gap: 4px;
  }

  .site-menu.is-open .brand-menu-item::after {
    content: none;
  }

  .site-menu.is-open .brand-submenu {
    position: static;
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 0 0 2px 18px;
    border: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: none;
    backdrop-filter: none;
  }

  .site-menu.is-open .brand-submenu a {
    font-size: 1.12rem;
    opacity: 0.86;
  }
}

/* Mobile menu floats over the page instead of pushing content. */
@media (max-width: 760px) {
  .site-header {
    left: 0;
    right: 0;
    width: 100vw;
    max-width: none;
    min-height: 58px;
    margin: 0;
    padding: 10px clamp(14px, 4vw, 22px);
    background: linear-gradient(180deg, rgba(12, 14, 12, 0.54), rgba(12, 14, 12, 0.2));
  }

  .site-menu {
    position: absolute;
    top: 10px;
    left: clamp(14px, 4vw, 22px);
    z-index: 95;
    width: max-content;
    max-width: min(360px, calc(100vw - 28px));
  }

  .site-menu.is-open {
    width: min(360px, calc(100vw - 28px));
  }

  .header-tools {
    margin-top: 52px;
  }
}

