:root {
  --bg: #0f0b07;
  --bg-soft: #17110d;
  --panel: rgba(28, 20, 14, 0.92);
  --panel-2: rgba(40, 29, 20, 0.9);
  --line: rgba(255, 255, 255, 0.09);
  --text: #f8f2ea;
  --muted: #c8b8a3;
  --soft: #8f7d68;
  --accent: #f59e0b;
  --accent-2: #ea580c;
  --good: #22c55e;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.36);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max: 1460px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.15), transparent 25%),
    radial-gradient(circle at top right, rgba(234, 88, 12, 0.14), transparent 28%),
    linear-gradient(180deg, #140f0a 0%, #0b0705 100%);
  min-height: 100vh;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.35), transparent 85%);
  opacity: 0.35;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.wrap {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  backdrop-filter: blur(18px);
  background: rgba(13, 9, 6, 0.82);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-badge {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.32);
  display: grid;
  place-items: center;
  color: #140b05;
  font-weight: 900;
  letter-spacing: 0.03em;
  flex: 0 0 auto;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-weight: 900;
  font-size: 1.08rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 999px;
  transition: 0.22s ease;
  border: 1px solid transparent;
}

.nav a:hover,
.nav a.is-active {
  color: #120b06;
  background: linear-gradient(135deg, #ffd166, #f59e0b);
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.22);
}

.nav-toggle {
  margin-left: auto;
  display: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.hero {
  padding: 28px 0 14px;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.15), transparent 30%),
    linear-gradient(180deg, rgba(40, 29, 20, 0.94), rgba(16, 11, 8, 0.96));
  border: 1px solid rgba(245, 158, 11, 0.18);
  box-shadow: var(--shadow);
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.08), transparent 22%),
    radial-gradient(circle at 85% 12%, rgba(245,158,11,0.16), transparent 22%),
    radial-gradient(circle at 70% 80%, rgba(234,88,12,0.12), transparent 22%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 26px;
  padding: 32px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: #ffe8b6;
  border: 1px solid rgba(245, 158, 11, 0.22);
  font-size: 0.86rem;
}

.kicker-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fde68a, #f59e0b);
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.14);
}

.hero h1,
.page-hero h1 {
  margin: 18px 0 10px;
  font-size: clamp(2.1rem, 4vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero p.lead,
.page-hero p.lead {
  margin: 0;
  color: var(--muted);
  max-width: 66ch;
  font-size: 1.02rem;
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 18px;
  transition: 0.2s ease;
  font-weight: 700;
}

.btn-primary {
  color: #160b04;
  background: linear-gradient(135deg, #ffd166, #f59e0b);
  box-shadow: 0 14px 26px rgba(245, 158, 11, 0.24);
}

.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost {
  color: var(--text);
  background: rgba(255,255,255,0.04);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: rgba(245, 158, 11, 0.45); }

.hero-stats {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stat {
  min-width: 126px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
}

.stat strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.1;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 5px;
}

.feature-stack {
  display: grid;
  gap: 14px;
  align-content: start;
}

.feature-card,
.card,
.panel,
.filter-bar,
.library-row,
.timeline-item,
.detail-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.feature-card {
  overflow: hidden;
  position: relative;
  padding: 18px;
}

.feature-card.primary {
  min-height: 290px;
  background:
    linear-gradient(135deg, rgba(245,158,11,0.12), transparent 36%),
    linear-gradient(180deg, rgba(37,24,16,0.96), rgba(18,12,8,0.96));
}

.feature-card .feature-label,
.ribbon {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: #ffe2a6;
  font-size: 0.8rem;
  border: 1px solid rgba(245,158,11,0.2);
}

.feature-title {
  margin: 14px 0 8px;
  font-size: 1.55rem;
  line-height: 1.12;
}

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

.carousel-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
}
.carousel-strip::-webkit-scrollbar { height: 8px; }
.carousel-strip::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 999px;
}

.spot-card {
  flex: 0 0 190px;
  min-height: 210px;
  scroll-snap-align: start;
  border-radius: 20px;
  border: 1px solid rgba(245,158,11,0.16);
  background:
    linear-gradient(180deg, hsla(var(--hue, 35), 70%, 35%, 0.95), hsla(calc(var(--hue, 35) + 18), 70%, 18%, 0.98));
  padding: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 28px rgba(0,0,0,0.26);
}

.spot-card::after,
.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.26) 60%, rgba(0,0,0,0.55) 100%);
}

.spot-card .year,
.poster .year {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.22);
  color: #fff2d0;
  font-size: 0.78rem;
  position: relative;
  z-index: 1;
}

.spot-card h3 {
  position: relative;
  z-index: 1;
  margin: 34px 0 8px;
  font-size: 1.1rem;
  line-height: 1.18;
}

.spot-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255,255,255,0.85);
  font-size: 0.86rem;
}

.section {
  padding: 20px 0 8px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.1;
}

.section-head p,
.section-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 100%;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(245,158,11,0.34);
  box-shadow: 0 18px 40px rgba(0,0,0,0.4);
}

.poster {
  position: relative;
  aspect-ratio: 16 / 11;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background:
    linear-gradient(180deg, hsla(var(--hue, 35), 70%, 35%, 0.96), hsla(calc(var(--hue, 35) + 18), 65%, 14%, 0.98));
}

.poster--tall { aspect-ratio: 16 / 20; }
.poster .poster-id,
.poster .poster-meta {
  position: relative;
  z-index: 1;
}
.poster .poster-id {
  display: inline-flex;
  align-self: start;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.24);
  color: #fff0c8;
  font-size: 0.78rem;
}
.poster .poster-title {
  position: relative;
  z-index: 1;
  margin: auto 0 0;
  font-size: 1.18rem;
  line-height: 1.15;
}
.poster .poster-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.badge,
.tag,
.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  line-height: 1;
}
.badge {
  background: rgba(255,255,255,0.12);
  color: #fff3d2;
  border: 1px solid rgba(255,255,255,0.08);
}
.tag {
  background: rgba(245, 158, 11, 0.12);
  color: #ffdba1;
  border: 1px solid rgba(245, 158, 11, 0.18);
}

.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.card-title {
  margin: 0;
  font-size: 1.03rem;
  line-height: 1.25;
}
.card-meta,
.meta-row {
  color: var(--muted);
  font-size: 0.82rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.card-desc {
  margin: 0;
  color: #dbcdbb;
  font-size: 0.92rem;
  line-height: 1.65;
}
.card-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #160b04;
  background: linear-gradient(135deg, #ffd166, #f59e0b);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
}

.card-link.secondary {
  color: var(--text);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
}

.filter-bar {
  padding: 16px;
  margin-bottom: 18px;
}

.filter-form {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 0.7fr)) auto;
  gap: 12px;
  align-items: center;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 0.8rem;
  color: var(--muted);
}

.field input,
.field select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
}

.field input::placeholder { color: #7f6c57; }

.filter-summary {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.86rem;
}

.section-sep {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,158,11,0.24), transparent);
  margin: 20px 0;
}

.page-hero {
  padding: 28px 0 6px;
}

.page-panel {
  padding: 26px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(245,158,11,0.11), transparent 30%),
    linear-gradient(180deg, rgba(30, 22, 15, 0.95), rgba(15, 10, 7, 0.96));
  border: 1px solid rgba(245, 158, 11, 0.15);
  box-shadow: var(--shadow);
}

.page-hero p.lead { max-width: 72ch; }

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

.breadcrumbs a { color: #ffd9a0; }

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.detail-box {
  padding: 18px;
}

.detail-header {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.poster.poster--lg {
  aspect-ratio: 4 / 5;
  border-radius: 22px;
}

.poster.poster--lg .poster-title { font-size: 1.55rem; }
.poster.poster--lg .poster-id { font-size: 0.82rem; }
.poster.poster--lg .poster-summary {
  position: relative;
  z-index: 1;
  color: rgba(255,255,255,0.9);
  font-size: 0.88rem;
  line-height: 1.55;
  margin-top: 10px;
  max-width: 40ch;
}

.detail-title {
  margin: 0;
  font-size: clamp(1.8rem, 2.6vw, 3rem);
  line-height: 1.08;
}

.detail-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.detail-desc {
  margin: 16px 0 0;
  color: #dbcdbb;
  line-height: 1.85;
}

.detail-grid {
  display: grid;
  gap: 14px;
}

.info-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.08);
}

.info-list li span:first-child { color: var(--muted); }
.info-list li strong { text-align: right; }

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(245,158,11,0.14), transparent 26%),
    linear-gradient(180deg, rgba(15,10,7,0.98), rgba(32,22,16,0.98));
  border: 1px solid rgba(245,158,11,0.15);
  box-shadow: var(--shadow);
}

.player-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px 0;
}

.player-toolbar .hint {
  color: var(--muted);
  font-size: 0.86rem;
}

.player-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #050403;
}

.player-stage video {
  width: 100%;
  height: 100%;
  display: block;
  background: #050403;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(0,0,0,0.24), rgba(0,0,0,0.42));
  border: 0;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.play-overlay span {
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(0,0,0,0.44);
  border: 1px solid rgba(255,255,255,0.12);
}

.source-switch {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.source-switch button {
  border-radius: 999px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

.source-switch button.is-active {
  background: linear-gradient(135deg, #ffd166, #f59e0b);
  color: #160b04;
  border-color: transparent;
  font-weight: 700;
}

.section-box {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
}

.section-box h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.section-box p {
  margin: 0;
  color: #dbcdbb;
}

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

.related-card {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
}

.related-card .poster {
  aspect-ratio: 16 / 10;
}

.related-card .card-body {
  padding: 14px;
}

.library-grid {
  display: grid;
  gap: 12px;
}

.library-row {
  display: grid;
  grid-template-columns: minmax(0, 150px) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
}

.library-row .tiny-poster {
  width: 150px;
  aspect-ratio: 1 / 1.15;
  border-radius: 16px;
  overflow: hidden;
}

.library-row .summary {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 8px 0 0;
}

.library-row .title {
  margin: 0;
  font-size: 1rem;
}

.library-row .meta-row {
  margin-top: 8px;
}

.year-group {
  margin-top: 18px;
}

.year-group h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.footer {
  margin-top: 34px;
  padding: 26px 0 40px;
  color: var(--muted);
}

.footer-inner {
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a { color: #ffd9a0; }

.notice {
  color: var(--muted);
  font-size: 0.86rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 12px;
}

.topbar .count {
  color: var(--muted);
  font-size: 0.86rem;
}

.hidden { display: none !important; }

[data-reveal] { opacity: 0; transform: translateY(14px); transition: 0.45s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }

.back-top { position: fixed; right: 18px; bottom: 18px; z-index: 80; }

@media (max-width: 1180px) {
  .hero-grid,
  .detail-layout,
  .detail-header {
    grid-template-columns: 1fr;
  }

  .grid.cols-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-2 { grid-template-columns: 1fr; }

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

  .library-row {
    grid-template-columns: 120px minmax(0, 1fr);
  }
  .library-row .actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .wrap { width: min(var(--max), calc(100% - 20px)); }
  .site-header { position: sticky; }
  .nav-toggle { display: inline-grid; place-items: center; }
  .nav {
    display: none;
    width: 100%;
    padding: 0 0 16px;
    margin-left: 0;
  }
  .nav.is-open { display: flex; flex-direction: column; align-items: stretch; }
  .header-inner { flex-wrap: wrap; min-height: 68px; padding: 10px 0; }
  .hero-grid, .page-panel { padding: 18px; }
  .hero h1, .page-hero h1 { font-size: 2rem; }
  .spot-card { flex-basis: 165px; min-height: 196px; }
  .filter-form { grid-template-columns: 1fr; }
  .library-row { grid-template-columns: 1fr; }
  .library-row .tiny-poster { width: 100%; }
  .related-grid { grid-template-columns: 1fr; }
  .section-head { align-items: start; flex-direction: column; }
}


.tiny-poster.poster {
  width: 150px;
  aspect-ratio: 1 / 1.15;
  padding: 12px;
  border-radius: 16px;
  flex: 0 0 auto;
}
.tiny-poster.poster .poster-title {
  font-size: 0.98rem;
}
