:root {
  color-scheme: dark;
  --background: #131210;
  --panel: #1d1b18;
  --border: #37312b;
  --text: #f5f0e9;
  --muted: #b6aaa0;
  --accent: #ff874f;
  --accent-hover: #ffa173;
  --page-width: 76rem;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--background); color: var(--text); }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, select, input, textarea { font: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.shell { width: min(calc(100% - 5rem), var(--page-width)); margin-inline: auto; }
.muted { color: var(--muted); font-size: .875rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.brand { display: inline-flex; gap: .7rem; align-items: center; width: fit-content; color: var(--text); font-size: 1.15rem; font-weight: 850; line-height: .96; letter-spacing: -.06em; }
.brand-dot { color: var(--accent); }
.moon { width: 1.75rem; aspect-ratio: 1; background: var(--accent); border-radius: 50%; display: inline-block; flex: none; mask-image: radial-gradient(circle at 75% 30%, transparent 0 47%, #000 49%); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .65rem 1rem; border: 1px solid transparent; border-radius: .55rem; background: transparent; color: var(--text); font-weight: 700; font-size: .9rem; gap: .65rem; }
.button-primary { background: var(--accent); color: #201008; }
.button-primary:hover { background: var(--accent-hover); }
.button-primary:disabled { opacity: .48; cursor: default; }
.button-outline { border-color: var(--border); }
.button-outline:hover { background: #2a2520; }
.play-icon { width: .68rem; height: .85rem; display: inline-block; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }

.entrance { min-height: 100svh; background: radial-gradient(ellipse at 86% 22%, #452119 0%, transparent 45%), radial-gradient(ellipse at 16% 87%, #26160f, transparent 43%), var(--background); }
.entrance-inner { margin: auto; min-height: 100svh; width: min(calc(100% - 3rem), var(--page-width)); display: grid; grid-template-rows: auto 1fr; justify-items: start; padding-block: 2.3rem; gap: 1.8rem; }
.age-box { width: min(100%, 28rem); align-self: center; justify-self: center; padding: clamp(1.7rem, 5vw, 3rem); background: #201b17; border: 1px solid #554033; border-radius: 1.25rem; box-shadow: 0 25px 90px #07040373; }
.age-mark { font-size: 3.75rem; line-height: 1; font-weight: 900; letter-spacing: -.085em; margin-bottom: 1.45rem; color: var(--accent); }
.age-mark span { font-size: .75em; vertical-align: 10%; }
.age-box h1, .closed h1 { font-size: clamp(1.75rem, 5vw, 2.25rem); letter-spacing: -.06em; line-height: 1.06; }
.age-box p { color: var(--muted); line-height: 1.55; margin: .8rem 0 1.65rem; }
.age-box form { display: grid; gap: .55rem; }
.age-check { display: flex; align-items: center; gap: .7rem; margin-bottom: .65rem; cursor: pointer; }
.age-check input { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--accent); }
.closed { min-height: 100svh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 1.5rem; }

.topbar { border-bottom: 1px solid #302a24; }
.topbar-inner { height: 4.65rem; display: flex; align-items: center; gap: clamp(1.5rem, 5.2vw, 5rem); }
.top-links, .top-actions { display: flex; align-items: center; gap: 1.2rem; }
.top-links a { color: var(--muted); font-size: .9rem; font-weight: 600; }
.top-links a:hover, .top-links a[aria-current] { color: var(--text); }
.top-actions { margin-left: auto; gap: .7rem; }
.search-toggle { color: var(--muted); padding-inline: .5rem; }
.search-toggle:hover { color: var(--text); }
.search-toggle svg { width: 1.3rem; height: 1.3rem; }
.vip-button { border: 1px solid #7d5034; background: #302016; color: #ffb585; min-height: 2.4rem; letter-spacing: .06em; }
.vip-button:hover, .vip-button[aria-pressed="true"] { border-color: var(--accent); color: var(--text); }

.hero { position: relative; min-height: clamp(24rem, 39vw, 33rem); isolation: isolate; display: flex; align-items: center; overflow: hidden; border-radius: 1.1rem; margin-top: 1.5rem; background: #341f19; }
.hero-media { position: absolute; z-index: -2; inset: 0; background-position: center 53%; background-size: cover; }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #130d0ef7 0%, #17100fe0 20%, #1207065c 59%, #14070610 100%), linear-gradient(0deg, #100a0ac4, transparent 42%); }
.hero-content { padding: clamp(1.5rem, 5.2vw, 4.4rem); max-width: min(57rem, 100%); }
.hero-kicker { color: #ffad83; font-size: .83rem; font-weight: 800; letter-spacing: .12em; margin-bottom: 1rem; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 6.4rem); line-height: .95; letter-spacing: -.06em; font-weight: 800; text-wrap: balance; overflow-wrap: anywhere; }
.hero-summary { margin: 1.45rem 0 1.6rem; color: #e4d7cf; font-size: 1rem; line-height: 1.5; max-width: 24rem; }
.hero .button { padding-inline: 1.25rem; }
.hero-data { position: absolute; bottom: 1.5rem; right: 1.7rem; display: flex; align-items: center; gap: .6rem; color: #f2e5df; font-size: .875rem; }

.catalog { margin-block: 3rem 4rem; scroll-margin-top: 1rem; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.section-title h2, .watch h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: -.065em; font-weight: 815; line-height: 1; }
.section-title p { margin-top: .55rem; }
.catalog-controls { display: flex; gap: .7rem; }
.sort-field { position: relative; }
.sort-field::after { position: absolute; content: ""; width: .45rem; height: .45rem; top: 44%; right: 1rem; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); pointer-events: none; }
.sort-field select, .search-field input { border: 1px solid var(--border); border-radius: .55rem; background: var(--panel); color: var(--text); padding: .65rem .85rem; min-height: 2.75rem; font-size: .9rem; }
.sort-field select { appearance: none; padding-right: 2rem; }
.search-field input { width: min(22vw, 15rem); }
.chips { display: flex; flex-wrap: wrap; gap: .55rem; margin-block: 1.5rem; }
.chip { display: inline-flex; align-items: center; min-height: 2.45rem; padding: .48rem .9rem; border-radius: 3rem; border: 1px solid var(--border); color: var(--muted); font-weight: 650; font-size: .9rem; }
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip[aria-current] { background: var(--accent); border-color: var(--accent); color: #201008; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.65rem 1.05rem; }
.card { min-width: 0; }
.card-image { display: block; position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: #372822; border-radius: .7rem; }
.card-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .24s ease; }
.card:hover img { transform: scale(1.045); }
.duration { position: absolute; right: .6rem; bottom: .55rem; background: #13110eea; color: #fff4ea; padding: .2rem .4rem; font-size: .8rem; font-weight: 700; border-radius: .25rem; font-variant-numeric: tabular-nums; }
.card h3 { margin-top: .65rem; font-size: 1.12rem; letter-spacing: -.02em; overflow-wrap: anywhere; }
.card:hover h3 { color: var(--accent-hover); }
.card p { font-size: .875rem; color: var(--muted); margin-top: .23rem; }
.empty { text-align: center; padding: 4rem 1.25rem; border: 1px solid var(--border); border-radius: .75rem; }
.empty .button { margin-top: 1rem; }
#missing { margin-block: 2rem; }
#catalog-status { margin-block: 2rem; }

.watch { max-width: 63rem; margin: 2.35rem auto 4rem; }
.back-link { display: inline-block; color: var(--accent); padding-block: .4rem; margin-bottom: .55rem; font-size: .9rem; font-weight: 650; }
.back-link:hover, .text-button:hover { text-decoration: underline; }
.watch h1 { font-size: clamp(2rem, 5.5vw, 4rem); letter-spacing: -.065em; line-height: 1.02; overflow-wrap: anywhere; }
.watch-meta { margin-block: .6rem 1.25rem; }
.player { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #080705; border-radius: .8rem; }
.player-curtain, .ad { position: absolute; inset: 0; display: grid; place-content: center; background-size: cover; background-position: center; }
.player-curtain::before { content: ""; position: absolute; inset: 0; background: #120e0b54; }
.player-curtain .button { position: relative; }
.player video { width: 100%; height: 100%; display: block; }
.ad { background: radial-gradient(ellipse at 66% 40%, #4f2618, #18120e 70%); }
.ad-label, .ad-time { position: absolute; top: .8rem; padding: .35rem .55rem; border-radius: .3rem; background: #150f0cc9; font-size: .875rem; }
.ad-label { left: .8rem; }
.ad-time { right: .8rem; font-variant-numeric: tabular-nums; }
.ad-message { display: grid; text-align: center; justify-items: center; gap: .35rem; padding: 3rem 1rem; color: #ffb183; }
.ad-message strong { font-size: clamp(2.5rem, 8vw, 5rem); line-height: 1; }
.ad-progress { position: absolute; height: .25rem; inset: auto auto 0 0; width: 100%; transform: scaleX(0); transform-origin: left center; background: var(--accent); }
.watch-description { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-block: 1.15rem 2.4rem; }
.watch-description p { color: var(--muted); line-height: 1.5; }
.watch h2 { margin-bottom: 1rem; }
.player-error { margin-top: .75rem; color: var(--accent-hover); }
.text-button { padding: .2rem 0; color: var(--muted); border: 0; background: transparent; font-size: .9rem; white-space: nowrap; }
.footer { border-top: 1px solid var(--border); }
.footer-inner, .footer-inner > div { display: flex; align-items: center; gap: .75rem; }
.footer-inner { min-height: 5rem; justify-content: space-between; flex-wrap: wrap; padding-block: 1rem; font-size: .9rem; }
.footer-age { color: var(--accent); border: 1px solid var(--border); border-radius: .33rem; padding: .18rem .3rem; font-weight: 760; }

.dialog { width: min(calc(100% - 2rem), 28rem); padding: 1.6rem; border: 1px solid var(--border); border-radius: .9rem; color: var(--text); background: var(--panel); box-shadow: 0 20px 70px #0008; }
.dialog::backdrop { background: #0c0a08ba; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.dialog h2 { font-size: 1.65rem; letter-spacing: -.045em; }
.dialog p { color: var(--muted); margin-block: .6rem 1.2rem; line-height: 1.5; }
.dialog-icon { display: inline-flex; align-items: center; border-radius: .4rem; padding: .35rem .55rem; font-weight: 750; }
.icon-close { width: 2.35rem; height: 2.35rem; border: 1px solid var(--border); background: transparent; color: var(--text); border-radius: .45rem; font-size: 1.45rem; line-height: 1; }
.dialog textarea { width: 100%; resize: vertical; margin-block: .45rem .8rem; border: 1px solid var(--border); border-radius: .4rem; background: var(--background); color: var(--text); padding: .65rem; }

@media (max-width: 48rem) {
  .shell { width: calc(100% - 2rem); }
  .topbar-inner { height: 4rem; gap: 1rem; }
  .top-links { display: none; }
  .hero { min-height: 25rem; margin-top: 1rem; }
  .hero-summary { max-width: 16rem; }
  .hero-data { right: 1rem; bottom: 1rem; }
  .catalog { margin-top: 2rem; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem .7rem; }
  .catalog-controls { flex-wrap: wrap; justify-content: end; }
  .search-field input { width: 100%; }
}
@media (max-width: 29rem) {
  .hero { min-height: 23rem; }
  .hero-content { padding-bottom: 3.4rem; }
  .hero h1 { font-size: clamp(2.6rem, 13vw, 3.6rem); }
  .hero-data { font-size: .8rem; }
  .search-toggle span { display: none; }
  .search-toggle { width: 2.55rem; }
  .section-title { align-items: start; }
  .catalog-controls { flex-direction: column-reverse; align-items: end; }
  .sort-field select { font-size: .84rem; }
  .chip { font-size: .82rem; padding-inline: .67rem; }
  .card h3 { font-size: 1rem; }
  .watch-description { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
