:root {
  color-scheme: dark;
  --bg: #05080a;
  --bg-2: #09120f;
  --paper: rgba(9, 14, 15, 0.84);
  --paper-strong: rgba(10, 18, 19, 0.94);
  --ink: #f8e9be;
  --ink-strong: #fff3cc;
  --muted: #c4b078;
  --line: rgba(240, 199, 115, 0.28);
  --gold: #f0c773;
  --gold-2: #c88c30;
  --green: #76d39a;
  --amber: #f0bb45;
  --red: #e66d3f;
  --blue: #6ebfe4;
  --lime: #a3c957;
  --violet: #c692df;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
  --radius: 8px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Yu Gothic", Meiryo, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(5, 8, 10, 0.18), rgba(5, 8, 10, 0.96) 42rem),
    radial-gradient(circle at 18% 22%, rgba(118, 211, 154, 0.12), transparent 18rem),
    radial-gradient(circle at 86% 10%, rgba(240, 199, 115, 0.16), transparent 20rem),
    var(--bg);
  color: var(--ink);
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  content: "";
  background-image:
    radial-gradient(circle, rgba(240, 199, 115, 0.68) 0 1px, transparent 1.2px),
    radial-gradient(circle, rgba(255, 255, 255, 0.42) 0 1px, transparent 1.3px);
  background-position: 0 0, 42px 18px;
  background-size: 64px 64px, 96px 96px;
  opacity: 0.35;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 1px solid var(--gold);
  border-radius: 6px;
  background: #09120f;
  color: var(--ink-strong);
  padding: 10px 12px;
  text-decoration: none;
  white-space: nowrap;
}

.skip-link:focus-visible {
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  clip-path: none;
}

.starfield {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

.hero {
  position: relative;
  min-height: 610px;
  padding: 22px max(20px, calc((100vw - 1180px) / 2)) 86px;
  overflow: hidden;
  border-bottom: 1px solid rgba(240, 199, 115, 0.3);
  background:
    linear-gradient(180deg, rgba(4, 7, 9, 0.5), rgba(4, 7, 9, 0.94)),
    linear-gradient(120deg, rgba(118, 211, 154, 0.14), transparent 48%),
    linear-gradient(300deg, rgba(198, 146, 223, 0.1), transparent 44%);
}

.hero::before,
.hero::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

.hero::before {
  top: 96px;
  right: 7vw;
  width: 380px;
  height: 128px;
  border-top: 1px solid rgba(240, 199, 115, 0.44);
  border-bottom: 1px solid rgba(240, 199, 115, 0.16);
  transform: rotate(-17deg);
  opacity: 0.8;
}

.hero::after {
  left: 18px;
  bottom: 0;
  width: min(680px, 82vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 199, 115, 0.74), transparent);
}

.hero-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(240, 199, 115, 0.72);
  border-radius: 50%;
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(240, 199, 115, 0.56);
  border-radius: 50%;
  content: "";
}

.brand-mark::after {
  inset: 18px -8px;
  height: 1px;
  border: 0;
  background: rgba(240, 199, 115, 0.72);
  transform: rotate(-32deg);
}

.quick-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.quick-nav a {
  border: 1px solid rgba(240, 199, 115, 0.24);
  border-radius: 999px;
  background: rgba(5, 8, 10, 0.42);
  color: #f6d99a;
  padding: 9px 13px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.quick-nav a:hover,
.quick-nav a:focus-visible {
  border-color: rgba(240, 199, 115, 0.72);
  outline: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 950px;
  padding-top: 94px;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 920px;
  margin: 0;
  color: var(--ink-strong);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(46px, 8vw, 94px);
  font-weight: 800;
  line-height: 1.05;
  text-shadow: 0 0 28px rgba(240, 199, 115, 0.17);
}

.lead {
  max-width: 790px;
  margin: 22px 0 0;
  color: #e3d2a7;
  font-size: 17px;
  line-height: 1.9;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.hero-meta span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-height: 38px;
  border: 1px solid rgba(240, 199, 115, 0.28);
  border-radius: 999px;
  background: rgba(5, 8, 10, 0.46);
  color: #f2d795;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 800;
}

.hero-meta strong {
  color: var(--ink-strong);
  font-size: 19px;
}

.hero-planet {
  position: absolute;
  right: max(28px, calc((100vw - 1180px) / 2));
  bottom: 86px;
  width: 196px;
  height: 196px;
  border: 1px solid rgba(240, 199, 115, 0.58);
  border-radius: 50%;
  background:
    linear-gradient(115deg, rgba(255, 242, 206, 0.5), rgba(119, 97, 63, 0.12) 54%, transparent 55%),
    radial-gradient(circle at 36% 30%, rgba(255, 236, 177, 0.82), rgba(126, 105, 68, 0.18) 44%, transparent 62%);
  opacity: 0.7;
  filter: drop-shadow(0 0 24px rgba(240, 199, 115, 0.16));
}

.hero-planet::before,
.hero-planet::after {
  position: absolute;
  inset: 83px -40px;
  border: 1px solid rgba(240, 199, 115, 0.5);
  border-radius: 50%;
  content: "";
  transform: rotate(-18deg);
}

.hero-planet::after {
  inset: 74px -68px;
  opacity: 0.4;
}

.hero-ship {
  position: absolute;
  width: 86px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(240, 199, 115, 0.9));
  opacity: 0.75;
}

.hero-ship::after {
  position: absolute;
  right: 0;
  bottom: -3px;
  width: 13px;
  height: 8px;
  border: solid rgba(240, 199, 115, 0.84);
  border-width: 1px 1px 0 0;
  content: "";
  transform: skewX(-28deg);
}

.hero-ship-one {
  top: 210px;
  right: 31vw;
  animation: driftOne 9s linear infinite;
}

.hero-ship-two {
  top: 310px;
  right: 24vw;
  width: 56px;
  opacity: 0.55;
  animation: driftTwo 12s linear infinite;
}

main {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: -46px auto 80px;
}

.control-deck,
.map-panel,
.summary-strip,
.audit-panel,
.notes-section,
.beyond-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.control-deck {
  position: sticky;
  top: 10px;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) 1.5fr auto;
  gap: 14px;
  align-items: end;
  padding: 14px;
}

.search-wrap label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.search-wrap input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(240, 199, 115, 0.32);
  border-radius: 6px;
  background: rgba(5, 8, 10, 0.64);
  color: var(--ink-strong);
  outline: none;
  padding: 0 13px;
}

.search-wrap input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(240, 199, 115, 0.14);
}

.filter-group,
.media-filters,
.status-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip,
.toggle-button {
  min-height: 38px;
  border: 1px solid rgba(240, 199, 115, 0.25);
  border-radius: 999px;
  background: rgba(5, 8, 10, 0.52);
  color: #e1cb92;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 900;
}

.filter-chip.is-active,
.toggle-button.is-active {
  border-color: rgba(240, 199, 115, 0.8);
  background: linear-gradient(180deg, rgba(240, 199, 115, 0.24), rgba(240, 199, 115, 0.08));
  color: var(--ink-strong);
}

.map-panel {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  align-items: center;
  margin-top: 18px;
  padding: 20px;
}

.map-panel h2,
.audit-panel h2,
.beyond-copy h2,
.notes-section h2 {
  margin: 0;
  color: var(--ink-strong);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 28px;
}

.era-rail {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.era-button {
  position: relative;
  min-height: 76px;
  border: 1px solid rgba(240, 199, 115, 0.24);
  border-radius: 8px;
  background: rgba(5, 8, 10, 0.54);
  color: #e9d39b;
  padding: 10px;
  text-align: left;
}

.era-button::before {
  display: block;
  width: 28px;
  height: 3px;
  margin-bottom: 9px;
  border-radius: 999px;
  background: var(--era);
  content: "";
}

.era-button span {
  display: block;
  color: var(--ink-strong);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.era-button small {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.era-button.is-active,
.era-button:hover,
.era-button:focus-visible {
  border-color: var(--era);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--era) 25%, transparent);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  overflow: hidden;
  padding: 1px;
}

.summary-strip div {
  min-height: 88px;
  background: rgba(5, 8, 10, 0.48);
  padding: 16px;
}

.summary-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.summary-strip strong {
  display: block;
  margin-top: 7px;
  color: var(--ink-strong);
  font-size: 31px;
  line-height: 1;
}

.audit-panel {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  margin-top: 18px;
  padding: 20px;
  scroll-margin-top: 126px;
}

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

.audit-copy p {
  margin: 0;
  border-left: 2px solid rgba(240, 199, 115, 0.36);
  color: #dec990;
  padding-left: 14px;
  font-size: 13px;
  line-height: 1.85;
}

.timeline {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.era {
  position: relative;
  display: grid;
  grid-template-columns: 236px 1fr;
  gap: 18px;
  border: 1px solid color-mix(in srgb, var(--era) 52%, transparent);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--era) 12%, transparent), transparent 44%),
    rgba(5, 8, 10, 0.78);
  box-shadow: var(--shadow);
  padding: 18px;
  scroll-margin-top: 126px;
}

.era::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  border-radius: var(--radius) 0 0 var(--radius);
  background: var(--era);
  content: "";
}

.era-intro {
  position: sticky;
  top: 132px;
  align-self: start;
  min-height: 280px;
  padding: 6px 0 0 10px;
}

.era-number {
  display: block;
  color: var(--era);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 76px;
  font-weight: 700;
  line-height: 0.9;
}

.era-intro h2 {
  margin: 4px 0 0;
  color: var(--ink-strong);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 24px;
  line-height: 1.25;
}

.era-intro .era-subtitle {
  margin: 4px 0 15px;
  color: color-mix(in srgb, var(--era) 70%, #ffffff);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.era-intro p {
  margin: 0;
  color: #dac691;
  font-size: 14px;
  line-height: 1.8;
}

.era-symbol {
  position: relative;
  width: 98px;
  height: 98px;
  margin-top: 26px;
  border: 1px solid color-mix(in srgb, var(--era) 74%, transparent);
  border-radius: 50%;
  opacity: 0.72;
}

.era-symbol::before,
.era-symbol::after {
  position: absolute;
  content: "";
}

.era-symbol::before {
  inset: 14px;
  border: 1px solid color-mix(in srgb, var(--era) 66%, transparent);
  border-radius: 50%;
}

.era-symbol::after {
  inset: 48px -16px;
  height: 1px;
  background: color-mix(in srgb, var(--era) 76%, transparent);
  transform: rotate(-28deg);
}

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

.work-card {
  position: relative;
  isolation: isolate;
  aspect-ratio: 2 / 3;
  min-height: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--era) 58%, rgba(240, 199, 115, 0.18));
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
    rgba(5, 8, 10, 0.66);
  display: flex;
  flex-direction: column;
  padding: 0;
  outline: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.work-card::before {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 0 48%, rgba(255, 255, 255, 0.08) 50%, transparent 52% 100%);
  content: "";
  opacity: 0;
  transform: translateX(-45%);
  transition: opacity 180ms ease, transform 300ms ease;
}

.work-card:hover,
.work-card:focus-visible {
  border-color: var(--era);
  box-shadow: 0 16px 36px color-mix(in srgb, var(--era) 14%, transparent);
  transform: translateY(-3px);
}

.work-card:hover::before,
.work-card:focus-visible::before {
  opacity: 1;
  transform: translateX(45%);
}

.poster-frame {
  position: absolute;
  inset: 0;
  min-height: 0;
  aspect-ratio: auto;
  overflow: hidden;
  background: rgba(5, 8, 10, 0.82);
}

.poster-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition:
    filter 360ms ease,
    opacity 360ms ease;
}

.poster-frame::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 8, 10, 0) 0 44%, rgba(5, 8, 10, 0.22) 64%, rgba(5, 8, 10, 0.42)),
    radial-gradient(circle at 52% 28%, transparent 0 34%, rgba(5, 8, 10, 0.08));
  content: "";
}

.work-card:hover .poster-frame img,
.work-card:focus-visible .poster-frame img {
  filter: saturate(1.12) brightness(1.07);
}

.card-top,
.card-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-top {
  position: absolute;
  right: 12px;
  top: 12px;
  bottom: auto;
  left: 12px;
  z-index: 3;
}

.card-body {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  border-top: 1px solid color-mix(in srgb, var(--era) 50%, rgba(240, 199, 115, 0.18));
  background:
    linear-gradient(180deg, rgba(48, 50, 52, 0.38), rgba(5, 8, 10, 0.62)),
    rgba(44, 44, 44, 0.18);
  padding: 15px;
  backdrop-filter: blur(3px) saturate(1.08);
}

.kind {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e8d4a2;
  font-size: 11px;
  font-weight: 900;
}

.kind::before {
  width: 16px;
  height: 16px;
  border: 1px solid currentColor;
  border-radius: 4px;
  content: "";
}

.work-card[data-type="movie"] .kind::before {
  box-shadow: inset 0 4px 0 currentColor, inset 0 -4px 0 currentColor;
}

.work-card[data-type="live"] .kind::before {
  border-radius: 4px;
  box-shadow: inset 0 -4px 0 currentColor;
}

.work-card[data-type="anime"] .kind::before,
.work-card[data-type="anthology"] .kind::before {
  border-radius: 50%;
}

.year {
  flex: 0 0 auto;
  min-width: 46px;
  border: 1px solid color-mix(in srgb, var(--era) 70%, rgba(240, 199, 115, 0.34));
  border-radius: 999px;
  color: #f6d996;
  padding: 5px 7px;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.work-card h3 {
  position: relative;
  z-index: 1;
  min-height: 58px;
  margin: 0 0 11px;
  color: var(--ink-strong);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 20px;
  line-height: 1.3;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.78);
}

.work-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #dcc991;
  font-size: 12px;
  line-height: 1.68;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.78);
}

.placement-tag {
  align-self: flex-start;
  margin: -2px 0 10px;
  border: 1px solid color-mix(in srgb, var(--era) 62%, rgba(240, 199, 115, 0.24));
  border-radius: 999px;
  color: color-mix(in srgb, var(--era) 78%, #ffffff);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
}

.card-bottom {
  margin-top: 14px;
  padding-top: 0;
}

.source-tag {
  color: #f6d996;
  font-size: 11px;
  font-weight: 900;
}

.era-pill {
  color: color-mix(in srgb, var(--era) 72%, #ffffff);
  font-size: 11px;
  font-weight: 900;
}

.open-indicator {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid color-mix(in srgb, var(--era) 68%, transparent);
  border-radius: 50%;
  color: var(--ink-strong);
  font-size: 18px;
  line-height: 1;
}

.card-art {
  position: absolute;
  right: -18px;
  bottom: -18px;
  width: 128px;
  height: 128px;
  border: 1px solid color-mix(in srgb, var(--era) 44%, transparent);
  border-radius: 50%;
  opacity: 0.09;
  transform: rotate(-16deg);
}

.card-art::before,
.card-art::after {
  position: absolute;
  content: "";
}

.card-art::before {
  inset: 34px -18px;
  border-top: 1px solid currentColor;
  color: var(--era);
  transform: rotate(-20deg);
}

.card-art::after {
  inset: 54px 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--era);
}

.era-note {
  grid-column: 2;
  margin: 3px 0 0;
  border-left: 3px solid var(--era);
  color: #d9c693;
  padding: 10px 0 10px 13px;
  font-size: 13px;
  line-height: 1.7;
}

.empty-state {
  border: 1px dashed rgba(240, 199, 115, 0.3);
  border-radius: var(--radius);
  padding: 26px;
  color: #e0cc94;
  text-align: center;
}

.beyond-section {
  display: grid;
  grid-template-columns: 0.9fr 1.3fr;
  gap: 22px;
  margin-top: 22px;
  padding: 22px;
  scroll-margin-top: 126px;
}

.beyond-copy p,
.notes-section p {
  color: #dec990;
  line-height: 1.85;
}

.source-links a {
  color: var(--ink-strong);
  font-weight: 900;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.source-links a + a::before {
  margin: 0 8px;
  color: var(--muted);
  content: "/";
  text-decoration: none;
}

.beyond-grid {
  display: grid;
  grid-template-columns: minmax(240px, 360px);
  align-content: start;
  justify-content: start;
  gap: 12px;
}

.beyond-grid .work-card {
  --era: var(--gold);
  width: 100%;
  max-width: 360px;
}

.notes-section {
  margin-top: 22px;
  padding: 22px;
  scroll-margin-top: 126px;
}

.detail-dialog {
  width: min(560px, calc(100% - 28px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-strong);
  color: var(--ink);
  padding: 0;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.68);
}

.detail-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.dialog-shell {
  position: relative;
  overflow: hidden;
  padding: 28px;
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(240, 199, 115, 0.34);
  border-radius: 50%;
  background: rgba(5, 8, 10, 0.72);
  color: var(--ink-strong);
  font-size: 24px;
  line-height: 1;
}

.dialog-image {
  display: block;
  width: min(190px, 48vw);
  aspect-ratio: 2 / 3;
  margin-bottom: 18px;
  border: 1px solid var(--dialog-era, var(--gold));
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 0 42px color-mix(in srgb, var(--dialog-era, var(--gold)) 16%, transparent);
}

.dialog-meta {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-dialog h2 {
  margin: 0;
  color: var(--ink-strong);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 32px;
  line-height: 1.25;
}

.detail-dialog p:not(.dialog-meta) {
  color: #dfca93;
  line-height: 1.85;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 20px 0 0;
  border: 1px solid rgba(240, 199, 115, 0.22);
  border-radius: 8px;
  background: rgba(240, 199, 115, 0.22);
}

.detail-list div {
  background: rgba(5, 8, 10, 0.76);
  padding: 13px;
}

.detail-list dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.detail-list dd {
  margin: 7px 0 0;
  color: var(--ink-strong);
  font-size: 14px;
  font-weight: 900;
}

.detail-list a {
  color: var(--ink-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 420ms ease,
    transform 420ms ease;
}

@keyframes driftOne {
  0% {
    transform: translate3d(90px, 22px, 0) rotate(-12deg);
    opacity: 0;
  }
  12%,
  74% {
    opacity: 0.72;
  }
  100% {
    transform: translate3d(-420px, -58px, 0) rotate(-12deg);
    opacity: 0;
  }
}

@keyframes driftTwo {
  0% {
    transform: translate3d(120px, 34px, 0) rotate(-18deg);
    opacity: 0;
  }
  20%,
  70% {
    opacity: 0.52;
  }
  100% {
    transform: translate3d(-360px, -20px, 0) rotate(-18deg);
    opacity: 0;
  }
}

@media (max-width: 1080px) {
  .control-deck {
    grid-template-columns: 1fr;
  }

  .map-panel {
    grid-template-columns: 1fr;
  }

  .era-rail {
    grid-template-columns: repeat(7, minmax(148px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
  }

  .era-button {
    scroll-snap-align: start;
  }

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

  .era-intro {
    position: relative;
    top: auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    min-height: 0;
    align-items: center;
  }

  .era-intro h2,
  .era-intro p,
  .era-intro .era-subtitle {
    grid-column: 2;
  }

  .era-symbol {
    grid-column: 3;
    grid-row: 1 / span 3;
    margin-top: 0;
  }

  .era-note {
    grid-column: 1;
  }

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

  .work-card {
    min-height: 0;
  }
}

@media (max-width: 740px) {
  body {
    background:
      linear-gradient(180deg, rgba(5, 8, 10, 0.2), rgba(5, 8, 10, 0.98) 34rem),
      var(--bg);
  }

  .hero {
    min-height: 0;
    padding: 18px 16px 76px;
  }

  .hero-top {
    align-items: flex-start;
  }

  .quick-nav {
    max-width: 210px;
  }

  .quick-nav a {
    padding: 8px 10px;
    font-size: 12px;
  }

  .hero-inner {
    padding-top: 72px;
  }

  h1 {
    font-size: 40px;
    line-height: 1.12;
  }

  .lead {
    font-size: 15px;
    line-height: 1.8;
  }

  .hero-planet {
    right: -62px;
    bottom: 66px;
    width: 150px;
    height: 150px;
  }

  main {
    width: min(100% - 20px, 1180px);
    margin-top: -42px;
  }

  .control-deck {
    position: relative;
    top: auto;
  }

  .filter-group,
  .media-filters,
  .status-toggle {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 3px;
  }

  .filter-chip,
  .toggle-button {
    flex: 0 0 auto;
  }

  .map-panel,
  .audit-panel,
  .notes-section,
  .beyond-section {
    padding: 16px;
  }

  .audit-panel,
  .audit-copy {
    grid-template-columns: 1fr;
  }

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

  .era {
    padding: 14px;
    scroll-margin-top: 18px;
  }

  .era-intro {
    grid-template-columns: auto 1fr;
    gap: 12px;
    padding-left: 8px;
  }

  .era-intro h2,
  .era-intro p,
  .era-intro .era-subtitle {
    grid-column: 2;
  }

  .era-number {
    grid-row: 1 / span 3;
    font-size: 62px;
  }

  .era-symbol {
    display: none;
  }

  .work-grid,
  .beyond-section {
    grid-template-columns: 1fr;
  }

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

  .beyond-grid .work-card {
    max-width: none;
  }

  .work-card {
    min-height: 0;
  }

  .work-card h3 {
    min-height: auto;
    font-size: 19px;
  }

  .detail-list {
    grid-template-columns: 1fr;
  }

  .dialog-image {
    width: min(172px, 56vw);
  }
}

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

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
