:root {
  --bg: #0f0d14;
  --surface: #1a1622;
  --surface-2: #241e2e;
  --line: #322a3e;
  --text: #f1eadf;
  --muted: #a59c8f;
  --accent: #ffb22e;
  --accent-ink: #1d1406;
  --danger: #ff5d4a;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 10; background: rgba(15, 13, 20, 0.92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 14px; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 22px; letter-spacing: -0.5px; flex: none; }
.brand img { width: 32px; height: 32px; image-rendering: pixelated; }
.brand span b { color: var(--accent); }
.search { flex: 1; min-width: 0; max-width: 420px; margin-left: auto; position: relative; }
.search input {
  width: 100%; height: 38px; padding: 0 14px 0 36px; border-radius: 19px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit; font-size: 15px; outline: none;
}
.search input:focus { border-color: var(--accent); }
.search svg { position: absolute; left: 12px; top: 11px; width: 16px; height: 16px; opacity: 0.6; }
.random {
  flex: none; height: 38px; padding: 0 14px; border-radius: 19px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); cursor: pointer; white-space: nowrap;
}
.random:hover { border-color: var(--accent); }

/* ---------- Home ---------- */
.hero {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 0; margin: 24px 0 8px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
}
.hero .pic { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.hero .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.hero:hover .pic img { transform: scale(1.03); }
.hero .info { padding: 28px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); }
.hero h1 { margin: 0; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.1; }
.hero p { margin: 0; color: var(--muted); }
.btn-play {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin-top: 6px;
  padding: 12px 26px; border-radius: 999px; border: 0; background: var(--accent); color: var(--accent-ink);
  font-weight: 800; font-size: 17px; cursor: pointer; transition: transform 0.15s, filter 0.15s;
}
.btn-play:hover { transform: translateY(-1px); filter: brightness(1.08); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 16px 0 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); cursor: pointer; font-size: 14px;
}
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.section-title { font-size: 20px; margin: 18px 0 12px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; padding-bottom: 32px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.card:hover { transform: translateY(-3px); border-color: #4a3e5a; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45); }
.card .pic { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; }
.card .pic::after {
  content: "▶"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; color: #fff;
  background: rgba(0, 0, 0, 0.35); opacity: 0; transition: opacity 0.18s;
}
.card:hover .pic::after { opacity: 1; }
.card .body { padding: 10px 12px 12px; }
.card h3 { margin: 0 0 2px; font-size: 16px; }
.card p { margin: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.age {
  position: absolute; top: 8px; right: 8px; z-index: 1; padding: 2px 7px; border-radius: 4px; font-size: 12px;
  font-weight: 800; background: var(--danger); color: #fff;
}
.empty { color: var(--muted); padding: 24px 0 48px; display: none; }

/* ---------- Play page ---------- */
.crumbs { font-size: 14px; color: var(--muted); margin: 18px 0 10px; }
.crumbs a:hover { color: var(--text); }
.stage {
  /* As wide as fits, but never taller than the window (the toolbar stays in view). */
  position: relative; width: min(100%, calc((100vh - 150px) * 16 / 9)); margin: 0 auto;
  aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--line);
}
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.stage .cover { position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; }
.stage .cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.45) blur(2px); transform: scale(1.04); }
.stage .cover .inner { position: relative; text-align: center; padding: 16px; max-width: 560px; }
.stage .cover h1 { margin: 0 0 14px; font-size: clamp(24px, 4vw, 44px); text-shadow: 0 2px 12px #000; }
.stage .cover .btn-play { align-self: center; font-size: 20px; padding: 14px 34px; }
.stage .cover .warn { margin: 14px auto 0; font-size: 13px; color: #ffd6cf; text-shadow: 0 1px 4px #000; }
.stage:fullscreen { border: 0; border-radius: 0; }
.toolbar { display: flex; gap: 8px; justify-content: flex-end; margin: 10px 0 0; }
.tool {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); cursor: pointer; font-size: 14px;
}
.tool:hover { border-color: var(--accent); }
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; margin: 18px 0 8px; }
.about h2 { margin: 0 0 6px; font-size: 26px; }
.about p { color: #d6cec2; margin: 10px 0 0; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.box h3 { margin: 0 0 8px; font-size: 14px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); }
.box ul { margin: 0; padding-left: 18px; font-size: 14px; }
.box li { margin: 3px 0; }
.box + .box { margin-top: 12px; }
.warnbox { border-color: #6e2a22; background: #2a1414; color: #ffd6cf; font-size: 14px; }
.warnbox b { color: var(--danger); }

.warnbox .dis { margin: 8px 0 0; font-size: 12.5px; color: #c9a9a2; }
.agegate {
  position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; padding: 20px;
  background: #08060a; text-align: center;
}
.agegate .inner { max-width: 520px; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.agegate .q { margin: 0; font-size: clamp(20px, 2.6vw, 28px); font-weight: 700; }
.agegate .note { margin: 0; font-size: 14px; color: #d8c4bf; }
.agegate .btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.agegate .btn-play { align-self: center; margin: 0; }
.agegate .no {
  padding: 12px 26px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font-weight: 600; font-size: 17px; cursor: pointer;
}

/* ---------- Text pages (privacy) ---------- */
.prose { max-width: 760px; padding-top: 28px; padding-bottom: 40px; }
.prose h1 { margin: 0 0 4px; font-size: 30px; }
.prose h2 { margin: 26px 0 6px; font-size: 18px; }
.prose p, .prose li { color: #d6cec2; }
.prose .muted { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.prose a, .foot a { color: var(--accent); }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 22px 0 28px; margin-top: 16px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero .info { padding: 18px; }
  .about { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .brand span { display: none; }
  .random .label { display: none; }
  .toolbar .fs { display: none; }
}
