:root {
  --night: #080d12;
  --night-soft: #0f171d;
  --surface: #152028;
  --surface-raised: #1a2730;
  --paper: #f4efe4;
  --text: #d8e0dc;
  --muted: #94a49e;
  --cyan: #70d7e2;
  --coral: #ef8f7c;
  --moss: #9bc39c;
  --gold: #d8b66f;
  --line: rgba(244, 239, 228, 0.16);
  --line-strong: rgba(244, 239, 228, 0.28);
  --header-height: 60px;
  --content: 1240px;
  --radius: 6px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  background: var(--night);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--night);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
  overflow-x: hidden;
}

body.nav-open,
body.dialog-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
audio:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

::selection {
  color: var(--night);
  background: var(--cyan);
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 8px 12px;
  color: var(--night);
  background: var(--paper);
  border-radius: 4px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 13, 18, 0.94);
  backdrop-filter: blur(18px);
}

.moortek-home,
.archive-wordmark {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
  font-weight: 720;
}

.moortek-home {
  justify-self: start;
  font-size: 0.92rem;
}

.moortek-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(112, 215, 226, 0.5);
  border-radius: 50%;
  color: var(--cyan);
  font-family: var(--serif);
  font-size: 1rem;
}

.archive-wordmark {
  justify-self: start;
  font-family: var(--serif);
  font-size: 1.16rem;
  font-weight: 600;
}

.archive-count {
  min-width: 28px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  border: 1px solid rgba(112, 215, 226, 0.36);
  border-radius: 999px;
  color: var(--cyan);
  font-family: var(--sans);
  font-size: 0.69rem;
  font-weight: 800;
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 7px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 3px;
}

.desktop-nav a,
.header-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  font-size: 0.86rem;
  font-weight: 660;
  cursor: pointer;
}

.desktop-nav a:hover,
.desktop-nav a[aria-current="page"],
.header-button:hover {
  color: var(--paper);
  background: rgba(244, 239, 228, 0.06);
}

.desktop-nav a[aria-current="page"] {
  border-color: var(--line);
}

.header-button {
  border-color: var(--line);
}

.icon-glyph {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  font-size: 0.9rem;
  line-height: 1;
}

.search-glyph {
  position: relative;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.search-glyph::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 6px;
  height: 2px;
  background: currentColor;
  transform: rotate(45deg);
}

.menu-button {
  display: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.mobile-nav {
  position: fixed;
  top: var(--header-height);
  right: 0;
  z-index: 99;
  width: min(360px, 100%);
  max-height: calc(100svh - var(--header-height));
  padding: 14px;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #0d151b;
  box-shadow: -18px 22px 48px rgba(0, 0, 0, 0.38);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav a,
.mobile-nav button {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.mobile-nav a[aria-current="page"] {
  color: var(--cyan);
}

.app-main {
  min-height: calc(100svh - var(--header-height));
}

.app-skeleton {
  width: min(var(--content), calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0;
}

.skeleton-line,
.skeleton-block {
  background: rgba(244, 239, 228, 0.07);
  animation: breathe 1.8s ease-in-out infinite;
}

.skeleton-line {
  width: min(520px, 78%);
  height: 20px;
  margin: 14px 0;
  border-radius: 3px;
}

.skeleton-line.short {
  width: min(260px, 42%);
}

.skeleton-block {
  width: 100%;
  height: min(560px, 58svh);
  margin-top: 32px;
  border-radius: var(--radius);
}

@keyframes breathe {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-heading {
  margin: 0;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 2.35rem;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
}

.section-intro {
  max-width: 680px;
  margin: 12px 0 0;
  color: var(--muted);
}

.section-shell {
  width: min(var(--content), calc(100% - 40px));
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}

.text-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-weight: 720;
  white-space: nowrap;
}

.home-hero {
  position: relative;
  min-height: min(720px, 78svh);
  display: flex;
  align-items: end;
  isolation: isolate;
  overflow: hidden;
  background: var(--night-soft);
}

.home-hero-media,
.player-visual-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.home-hero-media img,
.player-visual-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.08) contrast(1.04);
  animation: reveal-image 800ms ease-out both;
}

.home-hero::after,
.player-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(3, 7, 10, 0.5);
  pointer-events: none;
}

@keyframes reveal-image {
  from { opacity: 0; transform: scale(1.025); }
  to { opacity: 1; transform: scale(1); }
}

.home-hero-copy {
  width: min(var(--content), calc(100% - 40px));
  margin: 0 auto;
  padding: 70px 0 58px;
}

.home-title {
  max-width: 900px;
  margin: 0;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 5.4rem;
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: 0;
  text-shadow: 0 3px 28px rgba(0, 0, 0, 0.72);
}

.home-lead {
  max-width: 680px;
  margin: 22px 0 0;
  color: #f0f3ee;
  font-size: 1.12rem;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.primary-action,
.secondary-action,
.quiet-action,
.chip,
.filter-control,
.load-more {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  border-radius: 4px;
  font-weight: 720;
  cursor: pointer;
}

.primary-action {
  border: 1px solid var(--paper);
  color: var(--night);
  background: var(--paper);
}

.primary-action:hover {
  color: var(--night);
  background: var(--cyan);
  border-color: var(--cyan);
}

.secondary-action {
  border: 1px solid rgba(244, 239, 228, 0.5);
  color: var(--paper);
  background: rgba(8, 13, 18, 0.44);
  backdrop-filter: blur(10px);
}

.secondary-action:hover,
.quiet-action:hover,
.chip:hover,
.chip.is-active {
  color: var(--paper);
  border-color: var(--cyan);
  background: rgba(112, 215, 226, 0.09);
}

.latest-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 780px;
  margin-top: 30px;
  padding: 12px 14px;
  border-left: 3px solid var(--coral);
  background: rgba(8, 13, 18, 0.58);
  backdrop-filter: blur(12px);
}

.latest-strip-label {
  color: var(--coral);
  font-size: 0.7rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.latest-strip-title {
  min-width: 0;
  overflow: hidden;
  color: var(--paper);
  font-family: var(--serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latest-strip-date {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.home-recent,
.home-themes,
.home-invitation {
  padding: 72px 0;
}

.home-intro {
  padding: 72px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 18% 20%, rgba(112, 215, 226, 0.1), transparent 36%),
    linear-gradient(145deg, #0b1218 0%, #111b22 55%, #0a1015 100%);
}

.intro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  align-items: center;
  gap: clamp(28px, 5vw, 68px);
}

.intro-frame {
  min-width: 0;
  margin: 0;
}

.intro-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  border: 1px solid rgba(244, 239, 228, 0.24);
  border-radius: var(--radius);
  background: #05090d;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.4);
}

.intro-frame figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.intro-copy p:not(.eyebrow) {
  margin: 18px 0 0;
  color: var(--muted);
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 28px;
}

.home-recent {
  background: var(--night-soft);
}

.dream-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.dream-card {
  min-width: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.dream-card:hover {
  transform: translateY(-3px);
  border-color: rgba(112, 215, 226, 0.52);
  background: var(--surface-raised);
}

.dream-card.is-paged {
  display: none;
}

.dream-card-link {
  display: block;
}

.dream-card-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #111a20;
}

.dream-card-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 500ms ease;
}

.dream-card:hover .dream-card-image img {
  transform: scale(1.035);
}

.image-fallback {
  width: 100%;
  height: 100%;
  display: none;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  background: var(--surface);
  font-family: var(--serif);
  text-align: center;
}

.image-failed img {
  display: none;
}

.image-failed .image-fallback {
  display: grid;
}

.dream-card-body {
  min-height: 174px;
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.dream-card-meta,
.player-kicker,
.library-meta,
.transcript-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 720;
  text-transform: uppercase;
}

.dream-card-meta .media-ready {
  color: var(--moss);
}

.dream-card h2,
.dream-card h3 {
  margin: 9px 0 0;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 500;
  line-height: 1.16;
}

.dream-card-excerpt {
  display: -webkit-box;
  margin: 10px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.48;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.dream-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
}

.theme-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  min-height: 42px;
  border: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  font-size: 0.9rem;
}

.chip-count {
  color: var(--cyan);
  font-size: 0.74rem;
}

.home-invitation {
  border-top: 1px solid var(--line);
}

.invitation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 56px;
  align-items: center;
}

.invitation-layout > * {
  min-width: 0;
}

.invitation-copy p {
  max-width: 680px;
  color: var(--muted);
}

.archive-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.archive-fact {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  background: var(--night-soft);
}

.archive-fact strong {
  color: var(--paper);
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
}

.archive-fact span {
  color: var(--muted);
  font-size: 0.78rem;
}

.page-intro {
  padding: 58px 0 30px;
  border-bottom: 1px solid var(--line);
  background: var(--night-soft);
}

.page-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
  gap: 48px;
  align-items: end;
}

.page-title {
  margin: 0;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 4.2rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
}

.page-lead {
  max-width: 700px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.page-stat {
  border-left: 3px solid var(--coral);
  padding: 5px 0 5px 16px;
}

.page-stat strong {
  display: block;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 500;
  line-height: 1;
}

.page-stat span {
  color: var(--muted);
  font-size: 0.8rem;
}

.gallery-tools,
.library-tools {
  position: sticky;
  top: var(--header-height);
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 13, 18, 0.95);
  backdrop-filter: blur(16px);
}

.tools-inner {
  width: min(var(--content), calc(100% - 40px));
  min-height: 70px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  margin: 0 auto;
}

.search-field {
  position: relative;
}

.search-field input,
.filter-control {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--paper);
  background: #0b1217;
}

.search-field input {
  padding: 0 14px 0 42px;
}

.search-field::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 16px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--muted);
  border-radius: 50%;
  transform: translateY(-58%);
  pointer-events: none;
}

.search-field::after {
  content: "";
  position: absolute;
  top: calc(50% + 5px);
  left: 27px;
  width: 7px;
  height: 2px;
  background: var(--muted);
  transform: rotate(45deg);
  pointer-events: none;
}

.filter-control {
  width: auto;
  min-width: 150px;
  padding: 0 34px 0 12px;
}

.result-count {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.gallery-content,
.library-content,
.transcript-content,
.showcase-content {
  padding: 38px 0 80px;
}

.gallery-theme-row {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.gallery-theme-row .chip {
  flex: 0 0 auto;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.load-more,
.quiet-action {
  border: 1px solid var(--line);
  color: var(--text);
  background: transparent;
}

.empty-results,
.error-state {
  padding: 52px 0;
  border-top: 1px solid var(--line);
}

.empty-results[hidden] {
  display: none;
}

.empty-results h2,
.error-state h1 {
  margin: 0;
  color: var(--paper);
  font-family: var(--serif);
  font-weight: 500;
}

.empty-results p,
.error-state p {
  color: var(--muted);
}

.library-list,
.transcript-list {
  border-top: 1px solid var(--line);
}

.library-entry,
.transcript-entry {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.library-entry[hidden],
.transcript-entry[hidden] {
  display: none;
}

.library-thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 4px;
  background: var(--surface);
}

.library-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.library-entry h2,
.transcript-entry h2 {
  margin: 5px 0 0;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1.42rem;
  font-weight: 500;
  line-height: 1.18;
}

.library-excerpt,
.transcript-excerpt {
  display: -webkit-box;
  max-width: 760px;
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.92rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.entry-action {
  min-width: 94px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--cyan);
  font-size: 0.84rem;
  font-weight: 720;
}

.entry-action:hover {
  border-color: var(--cyan);
}

.player-page {
  background: var(--night);
}

.player-visual {
  position: relative;
  min-height: min(760px, calc(100svh - var(--header-height)));
  display: flex;
  align-items: end;
  isolation: isolate;
  overflow: hidden;
  background: var(--night-soft);
}

.player-image-button {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.player-copy {
  position: relative;
  z-index: 2;
  width: min(var(--content), calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0 48px;
  pointer-events: none;
}

.player-copy > * {
  /* This layer is display copy only. Let clicks reach the full-frame artwork
     button below it; player controls live in the separate controls region. */
  pointer-events: none;
}

.player-kicker {
  color: var(--cyan);
  text-shadow: 0 2px 12px #000;
}

.player-title {
  max-width: 960px;
  margin: 12px 0 0;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 4.6rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.88);
}

.player-teaser {
  max-width: 760px;
  margin: 18px 0 0;
  color: #eef2ee;
  font-size: 1.06rem;
  text-shadow: 0 3px 20px #000;
}

.player-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  background: var(--night-soft);
}

.player-toolbar-inner {
  width: min(var(--content), calc(100% - 40px));
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: 0 auto;
}

.audio-zone {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(220px, 520px) auto;
  align-items: center;
  gap: 14px;
}

.audio-zone audio {
  display: none;
}

.narration-toggle {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--paper);
  border-radius: 50%;
  color: var(--night);
  background: var(--paper);
  cursor: pointer;
}

.narration-toggle:hover {
  border-color: var(--cyan);
  background: var(--cyan);
}

.narration-toggle-glyph {
  display: inline-block;
  line-height: 1;
  transform: translateX(1px);
}

.narration-toggle.is-playing .narration-toggle-glyph {
  transform: none;
}

.narration-seek {
  width: 100%;
  height: 28px;
  accent-color: var(--cyan);
  cursor: pointer;
}

.audio-time {
  min-width: 92px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
}

.audio-status {
  grid-column: 2 / -1;
  color: var(--coral);
  font-size: 0.8rem;
}

.audio-status[hidden] {
  display: none;
}

.player-actions {
  display: flex;
  gap: 8px;
}

.player-actions button,
.player-actions a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text);
  background: transparent;
  font-size: 0.82rem;
  font-weight: 720;
  cursor: pointer;
}

.player-actions button:hover,
.player-actions a:hover {
  border-color: var(--cyan);
  color: var(--paper);
}

.player-reading {
  padding: 72px 0;
}

.reading-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(0, 1.38fr);
  gap: 76px;
  align-items: start;
}

.reading-aside {
  position: sticky;
  top: calc(var(--header-height) + 28px);
}

.reading-aside h2 {
  margin: 0;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 2.3rem;
  font-weight: 500;
  line-height: 1.08;
}

.reading-aside p {
  color: var(--muted);
}

.reading-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
}

.transcript-prose {
  margin: 0;
  color: #e8ebe6;
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.72;
}

.transcript-sentence {
  border-radius: 3px;
  transition: color 180ms ease, background 180ms ease;
}

.transcript-sentence.is-current {
  color: var(--paper);
  background: rgba(112, 215, 226, 0.13);
  box-shadow: 0 0 0 3px rgba(112, 215, 226, 0.13);
}

.player-continuity {
  padding: 54px 0 76px;
  border-top: 1px solid var(--line);
  background: var(--night-soft);
}

.continuity-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1px;
  margin-top: 26px;
  background: var(--line);
  border: 1px solid var(--line);
}

.continuity-link {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px;
  background: var(--night);
}

.continuity-link:hover {
  background: var(--surface);
}

.continuity-direction {
  color: var(--coral);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.continuity-title {
  margin-top: 6px;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1.18;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 44px;
}

.related-link {
  min-width: 0;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--night);
}

.related-link:hover {
  border-color: var(--cyan);
}

.related-link img {
  width: 92px;
  height: 76px;
  display: block;
  border-radius: 3px;
  object-fit: cover;
}

.related-link span {
  min-width: 0;
  color: var(--paper);
  font-family: var(--serif);
  line-height: 1.2;
}

.autoplay-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.84rem;
  cursor: pointer;
}

.autoplay-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--cyan);
}

.transcript-focus {
  display: grid;
  grid-template-columns: minmax(260px, 0.55fr) minmax(0, 1.45fr);
  gap: 56px;
  align-items: start;
}

.transcript-focus-visual {
  position: sticky;
  top: calc(var(--header-height) + 26px);
}

.transcript-focus-visual img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  object-fit: cover;
}

.transcript-focus h1 {
  margin: 8px 0 0;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 3.2rem;
  font-weight: 500;
  line-height: 1.04;
}

.transcript-focus audio {
  width: 100%;
  margin-top: 24px;
}

.transcript-focus .transcript-prose {
  margin-top: 34px;
}

.showcase-hero {
  position: relative;
  min-height: min(680px, 75svh);
  display: flex;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.showcase-hero img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.showcase-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(5, 8, 11, 0.56);
}

.showcase-copy {
  width: min(var(--content), calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0 54px;
}

.showcase-copy h1 {
  max-width: 880px;
  margin: 0;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 4.8rem;
  font-weight: 500;
  line-height: 0.98;
}

.showcase-copy p {
  max-width: 660px;
  margin: 18px 0 0;
  color: #eef2ee;
  font-size: 1.08rem;
}

.showcase-chapter {
  padding: 70px 0;
  border-bottom: 1px solid var(--line);
}

.showcase-chapter:nth-child(even) {
  background: var(--night-soft);
}

.chapter-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.4fr) minmax(0, 1.6fr);
  gap: 52px;
}

.chapter-copy {
  position: sticky;
  top: calc(var(--header-height) + 28px);
  align-self: start;
}

.chapter-copy h2 {
  margin: 0;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 2.35rem;
  font-weight: 500;
  line-height: 1.06;
}

.chapter-copy p {
  color: var(--muted);
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #060a0d;
}

.footer-inner {
  width: min(var(--content), calc(100% - 40px));
  min-height: 156px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: center;
  gap: 34px;
  margin: 0 auto;
  padding: 28px 0;
}

.footer-brand {
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1.35rem;
}

.footer-copy {
  max-width: 520px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 16px;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-links a:hover {
  color: var(--cyan);
}

.search-dialog,
.image-dialog {
  width: min(760px, calc(100% - 28px));
  max-height: min(760px, calc(100svh - 40px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--night-soft);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.72);
}

.image-dialog {
  width: min(1120px, calc(100% - 28px));
  max-height: calc(100svh - 28px);
  background: #030506;
}

.search-dialog::backdrop,
.image-dialog::backdrop {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(7px);
}

.dialog-header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.dialog-header strong {
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 500;
}

.dialog-close {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--paper);
  background: transparent;
  cursor: pointer;
}

.dialog-search {
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.dialog-search input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--paper);
  background: var(--night);
}

.search-results {
  max-height: min(560px, 62svh);
  overflow-y: auto;
  padding: 6px 16px 16px;
}

.search-result {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.search-result img {
  width: 70px;
  height: 58px;
  display: block;
  border-radius: 3px;
  object-fit: cover;
}

.search-result-title {
  color: var(--paper);
  font-family: var(--serif);
  line-height: 1.16;
}

.search-result-meta {
  color: var(--muted);
  font-size: 0.74rem;
}

.search-result-arrow {
  color: var(--cyan);
}

.search-hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.image-dialog figure {
  position: relative;
  margin: 0;
}

.image-dialog img {
  width: 100%;
  max-height: calc(100svh - 88px);
  display: block;
  object-fit: contain;
}

.image-dialog .dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: rgba(3, 5, 6, 0.82);
}

.noscript-note {
  width: min(720px, calc(100% - 40px));
  margin: 80px auto;
  padding: 22px;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--surface);
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 260ms;
}

@media (max-width: 1060px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
  }

  .desktop-nav {
    display: none;
  }

  .archive-wordmark {
    justify-self: start;
  }

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

  .dream-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-intro-grid,
  .reading-layout,
  .transcript-focus,
  .chapter-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .reading-aside,
  .transcript-focus-visual,
  .chapter-copy {
    position: static;
  }

  .transcript-focus-visual img {
    max-height: 520px;
    aspect-ratio: 16 / 9;
  }

  .player-toolbar-inner {
    grid-template-columns: 1fr;
  }

  .player-actions {
    justify-content: flex-start;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 56px;
  }

  body {
    font-size: 16px;
  }

  .site-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    padding: 0 12px;
  }

  .moortek-label,
  .header-button-label {
    display: none;
  }

  .archive-wordmark {
    justify-self: center;
    font-size: 1rem;
  }

  .header-button,
  .menu-button {
    width: 38px;
    padding: 0;
  }

  .section-shell,
  .home-hero-copy,
  .showcase-copy,
  .player-copy,
  .footer-inner,
  .tools-inner {
    width: min(100% - 28px, var(--content));
  }

  .home-hero {
    min-height: 72svh;
  }

  .home-hero-copy {
    padding: 54px 0 34px;
  }

  .home-title {
    font-size: 3.15rem;
    line-height: 1;
  }

  .home-lead {
    font-size: 1rem;
  }

  .latest-strip {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .latest-strip-title {
    width: 100%;
    white-space: normal;
  }

  .latest-strip-date {
    margin-left: 0;
  }

  .home-recent,
  .home-intro,
  .home-themes,
  .home-invitation,
  .player-reading,
  .showcase-chapter {
    padding: 48px 0;
  }

  .intro-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .intro-copy {
    max-width: 680px;
  }

  .intro-actions {
    align-items: stretch;
  }

  .section-header,
  .invitation-layout,
  .footer-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .text-link {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .section-heading {
    font-size: 2rem;
  }

  .dream-grid,
  .chapter-grid {
    grid-template-columns: 1fr;
  }

  .dream-card-body {
    min-height: auto;
  }

  .page-intro {
    padding: 42px 0 26px;
  }

  .page-title {
    font-size: 3rem;
  }

  .page-stat {
    display: none;
  }

  .gallery-tools,
  .library-tools {
    position: static;
  }

  .tools-inner {
    grid-template-columns: 1fr 1fr;
    padding: 12px 0;
  }

  .search-field {
    grid-column: 1 / -1;
  }

  .filter-control {
    min-width: 0;
  }

  .result-count {
    text-align: right;
  }

  .library-entry,
  .transcript-entry {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
  }

  .library-entry .entry-action,
  .transcript-entry .entry-action {
    grid-column: 2;
    justify-self: start;
  }

  .library-entry h2,
  .transcript-entry h2 {
    font-size: 1.18rem;
  }

  .library-excerpt,
  .transcript-excerpt {
    display: none;
  }

  .player-visual {
    min-height: 68svh;
  }

  .player-copy {
    padding: 46px 0 28px;
  }

  .player-title {
    font-size: 3rem;
  }

  .player-teaser {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .audio-zone {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .audio-time {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .audio-status {
    grid-column: 1 / -1;
  }

  .player-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .player-actions a {
    grid-column: 1 / -1;
  }

  .reading-aside h2 {
    font-size: 2rem;
  }

  .transcript-prose {
    font-size: 1.18rem;
    line-height: 1.7;
  }

  .continuity-nav {
    grid-template-columns: 1fr;
  }

  .transcript-focus h1 {
    font-size: 2.5rem;
  }

  .showcase-hero {
    min-height: 68svh;
  }

  .showcase-copy h1 {
    font-size: 3.25rem;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .search-result {
    grid-template-columns: 58px minmax(0, 1fr) auto;
  }

  .search-result img {
    width: 58px;
    height: 50px;
  }
}

@media (max-width: 420px) {
  .archive-wordmark .archive-count {
    display: none;
  }

  .home-title,
  .page-title,
  .player-title,
  .showcase-copy h1 {
    overflow-wrap: anywhere;
  }

  .hero-actions > *,
  .primary-action,
  .secondary-action {
    width: 100%;
  }

  .tools-inner {
    grid-template-columns: 1fr;
  }

  .search-field {
    grid-column: auto;
  }

  .result-count {
    text-align: left;
  }

  .library-entry,
  .transcript-entry {
    grid-template-columns: 72px minmax(0, 1fr);
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
