:root {
  --canvas: #0a0d14;
  --ember: #e2b352;
  --ember-deep: #c47a28;
  --ash: #687182;
  --fog: #c5cdd8;
  --panel: #111722;
  --glass: rgba(16, 20, 30, 0.72);
  --safe: clamp(20px, 4vw, 56px);
  --focus: 0 0 0 3px #0a0d14, 0 0 0 6px var(--ember), 0 0 28px rgba(226, 179, 82, 0.45);
  --card-w: min(292px, 72vw);
  --card-h: 164px;
  --header-h: 80px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: #05070c;
  color: var(--fog);
  font-family: "Outfit", sans-serif;
}

body { overflow-x: hidden; }
body.is-playing { overflow: hidden; }

.app {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% 120%, rgba(196, 90, 28, 0.22), transparent 55%),
    radial-gradient(ellipse 40% 30% at 80% 0%, rgba(80, 120, 160, 0.12), transparent 50%),
    linear-gradient(180deg, #070910 0%, var(--canvas) 40%, #0c1018 100%);
}

.app::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

.rain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    185deg,
    transparent 0 18px,
    rgba(180, 200, 220, 0.035) 19px,
    transparent 21px
  );
  animation: rain 1.8s linear infinite;
  opacity: 0.45;
  z-index: 0;
}

@keyframes rain {
  to { transform: translateY(36px); }
}

.screen { display: none; position: relative; z-index: 1; }
.screen.is-on { display: block; }

.chrome {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: var(--header-h);
  padding: 12px var(--safe);
  background: linear-gradient(180deg, rgba(5, 7, 12, 0.92), rgba(5, 7, 12, 0.55) 70%, transparent);
}

.chrome.is-hidden { display: none; }

.brand {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-shrink: 0;
}

.brand-mark {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: 0.08em;
  color: var(--ember);
  text-transform: uppercase;
}

.brand-sub {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ash);
}

.menu {
  display: flex;
  gap: 8px;
  flex: 1;
  flex-wrap: wrap;
}

.menu-btn,
.upgrade,
.search-go,
.ctrl,
.choice,
.danger,
.tile,
.more,
.hero-play {
  cursor: pointer;
  font-family: inherit;
}

.menu-btn {
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ash);
  font-size: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.menu-btn:hover { color: var(--fog); }
.menu-btn.is-on {
  color: #0a0d14;
  background: var(--ember);
  box-shadow: var(--focus);
}

.upgrade {
  margin-left: auto;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--ember);
  background: rgba(226, 179, 82, 0.08);
  color: var(--ember);
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.upgrade:hover {
  background: var(--ember);
  color: #0a0d14;
}

.upgrade.is-on {
  background: #1c3a2a;
  border-color: #8fbc8f;
  color: #b8e0c4;
}

.hero {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: min(58vh, 620px);
  overflow: hidden;
}

.hero.is-hidden { display: none; }

.hero-art {
  position: absolute;
  inset: 0;
  background: #161b26 center/cover no-repeat;
  transition: background-image 0.35s ease;
}

.hero-art .card-thumb {
  z-index: 0;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 8, 12, 0.88) 0%, rgba(6, 8, 12, 0.35) 55%, rgba(6, 8, 12, 0.15) 100%),
    linear-gradient(180deg, transparent 40%, var(--canvas) 100%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: 72px var(--safe) 48px;
}

.hero-kicker {
  margin: 0 0 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ember);
  font-size: 13px;
}

.hero-copy h1 {
  margin: 0 0 12px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 500;
  line-height: 1.05;
  color: #f3efe4;
}

.hero-meta {
  margin: 0 0 22px;
  color: var(--ash);
  font-size: 18px;
  line-height: 1.45;
}

.hero-play {
  height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 6px;
  background: var(--ember);
  color: #0a0d14;
  font-size: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-play:hover { box-shadow: var(--focus); }

.daily-toast {
  position: relative;
  z-index: 5;
  margin: 0 var(--safe) 16px auto;
  max-width: 420px;
  cursor: pointer;
  padding: 16px 20px;
  border-left: 3px solid var(--ember);
  background: var(--glass);
  backdrop-filter: blur(10px);
  color: var(--fog);
  font-size: 16px;
}

.daily-toast b { color: var(--ember); }

#home-rows {
  padding: 8px 0 64px;
}

.page {
  width: 100%;
  padding: 8px var(--safe) 64px;
}

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

.row-title {
  margin: 0 0 12px;
  padding: 0 var(--safe);
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ash);
}

.rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px var(--safe) 14px;
  scroll-snap-type: x mandatory;
}

.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-thumb { background: #2a3140; }

.more {
  flex: 0 0 120px;
  height: var(--card-h);
  border: 1px solid #2a3140;
  background: #151a24;
  color: var(--ember);
  font-size: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  scroll-snap-align: start;
}

.more:hover { box-shadow: var(--focus); }

.card {
  position: relative;
  width: var(--card-w);
  height: var(--card-h);
  border-radius: 6px;
  overflow: hidden;
  background: #161b26;
  border: 1px solid transparent;
  flex: 0 0 var(--card-w);
  cursor: pointer;
  scroll-snap-align: start;
}

.card:hover,
.card:focus,
.card.is-focus {
  outline: none;
  box-shadow: var(--focus);
  transform: scale(1.04);
  z-index: 2;
}

.card-art {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: #161b26;
}

.card-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(6, 8, 12, 0.88) 100%);
  pointer-events: none;
}

.card-meta {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  font-size: 15px;
  line-height: 1.3;
  color: #f3efe4;
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.badge-free { background: #1c3a2a; color: #b8e0c4; }
.badge-day { background: #3a2a10; color: var(--ember); }
.badge-lock { background: #2a1a22; color: #d4a0b0; }

.lock-veil {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 12, 0.35);
}

.search-form {
  display: flex;
  gap: 12px;
}

#search-input {
  flex: 1;
  min-width: 0;
  height: 56px;
  padding: 0 20px;
  border: 1px solid #2a3140;
  background: rgba(10, 13, 20, 0.7);
  font-size: 20px;
  color: var(--fog);
  font-family: inherit;
}

#search-input:focus {
  outline: none;
  box-shadow: var(--focus);
}

.search-go {
  height: 56px;
  padding: 0 24px;
  border: 0;
  background: var(--ember);
  color: #0a0d14;
  font-size: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin: 22px 0 24px;
}

.tile {
  min-height: 88px;
  padding: 16px;
  border: 1px solid #2a3140;
  background: var(--panel);
  border-radius: 6px;
  text-align: left;
}

.tile small { display: block; color: var(--ash); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; }
.tile strong { font-size: 18px; color: var(--fog); }
.tile:hover,
.tile.is-on { box-shadow: var(--focus); }

.results,
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  align-content: start;
}

.results .card,
.grid .card {
  width: 100%;
  flex: unset;
  height: 180px;
}

.source-tag {
  margin: 0 0 16px;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ash);
}

.empty {
  max-width: 720px;
  margin: 80px auto 0;
  text-align: center;
}

.empty h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(36px, 5vw, 54px);
  color: var(--ember);
  font-weight: 500;
}

.empty p { font-size: 20px; color: var(--ash); line-height: 1.5; }

.danger {
  margin-top: 28px;
  height: 56px;
  padding: 0 24px;
  border: 1px solid #5a3038;
  background: #1a1014;
  color: #e8b4bc;
  font-size: 18px;
}

.danger:hover { box-shadow: var(--focus); }

.player {
  position: fixed;
  inset: 0;
  z-index: 7;
  background: #000;
  display: none;
}

.player.is-on { display: block; }

.player video,
.player .poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dimmer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.hud {
  position: absolute;
  left: var(--safe);
  right: var(--safe);
  bottom: 36px;
  z-index: 3;
  padding: 24px 8px 8px;
  background: linear-gradient(180deg, transparent, rgba(6, 8, 12, 0.82));
  opacity: 1;
  transition: opacity 0.4s ease;
}

.hud.is-hidden { opacity: 0; pointer-events: none; }

.hud h1 {
  margin: 0 0 8px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.ctrl {
  min-width: 180px;
  height: 52px;
  border: 1px solid #2a3140;
  background: rgba(12, 16, 24, 0.8);
  color: var(--fog);
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 160px;
}

.icon-btn .icon {
  width: 22px;
  height: 22px;
  display: inline-block;
  background: currentColor;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
  -webkit-mask-image: var(--icon);
  mask-image: var(--icon);
}

.icon-btn[data-muted="false"] .icon {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1-3.29-2.5-4.03v8.05c1.5-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z'/%3E%3C/svg%3E");
}

.icon-btn[data-muted="true"] .icon {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M16.5 12c0-1.77-1-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3 3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06a8.99 8.99 0 0 0 3.69-1.81L19.73 21 21 19.73 4.27 3zM12 4 9.91 6.09 12 8.18V4z'/%3E%3C/svg%3E");
}

.ctrl:hover,
.ctrl.is-on { box-shadow: var(--focus); color: var(--ember); }

.hud-hint {
  margin: 14px 0 0;
  color: var(--ash);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 10, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 8;
  padding: 24px;
}

.overlay.is-on { display: flex; }

.sheet {
  width: min(760px, 100%);
  padding: 36px;
  background: #121820;
  border: 1px solid #2a3140;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.sheet h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(32px, 4vw, 42px);
  margin: 0 0 12px;
  color: var(--ember);
}

.sheet p { color: var(--ash); font-size: 18px; line-height: 1.5; }

.choices { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }

.choice {
  min-height: 58px;
  text-align: left;
  padding: 12px 20px;
  border: 1px solid #2a3140;
  background: #0e131c;
  color: var(--fog);
  font-size: 18px;
}

.choice small {
  display: block;
  margin-top: 4px;
  color: var(--ash);
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
}

.choice:hover,
.choice.is-on { box-shadow: var(--focus); }

.boot {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 9;
  background: var(--canvas);
}

.boot.is-off { display: none; }

.boot .brand-mark { font-size: clamp(42px, 8vw, 72px); }
.boot p { color: var(--ash); letter-spacing: 0.2em; text-transform: uppercase; }

@media (max-width: 800px) {
  .chrome { flex-wrap: wrap; }
  .upgrade { margin-left: 0; }
  .brand-sub { display: none; }
  .hero-copy { padding-top: 28px; }
}
