/*
 * Mu Movie public website.
 *
 * Tokens, sizes and gradients are the app's own (MUMOVIE_DESIGN_SPEC.md); only
 * layout changes with width. Breakpoints extend the app's: 520 / 700 / 1024 /
 * 1440. The interface is flat by design: structure comes from 1px borders, and
 * hover reuses the teal border and the tinted fill instead of adding shadows.
 */

/*
 * Manrope, one variable file per script range, served from this application
 * (SIL Open Font License, see fonts/OFL.txt). One family for everything: the
 * hierarchy is weight and tracking, 800 with tight tracking for titles down
 * to 500 for running text. `swap` shows the system face until it arrives, so
 * text is never invisible, and the fallbacks are the faces closest to it.
 */
@font-face {
    font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
    src: url("fonts/manrope-latin-wght.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
        U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
    src: url("fonts/manrope-latin-ext-wght.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
        U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --bg: #0A1615;
    --surface: #102422;
    --surface-alt: #173330;
    --border: rgba(231, 246, 244, 0.08);
    --border-strong: rgba(231, 246, 244, 0.16);
    --teal: #14B8A6;
    --teal-soft: rgba(20, 184, 166, 0.14);
    --teal-line: rgba(20, 184, 166, 0.5);
    --orange: #F97316;
    --green: #22C55E;
    --ink: #E7F6F4;
    --ink-muted: #9FC0BA;
    --ink-faint: #6E8B85;
    --art-mid: #0C1B19;
    --art-end: #070F0E;
    --hero-melt: linear-gradient(180deg, rgba(5, 16, 14, 0.62) 0%, rgba(5, 16, 14, 0.08) 26%,
        rgba(10, 22, 21, 0.55) 56%, rgba(10, 22, 21, 0.9) 78%, #0A1615 100%);
    --teal-wash: linear-gradient(200deg, rgba(20, 184, 166, 0.18) 0%, rgba(20, 184, 166, 0.02) 46%,
        rgba(5, 16, 14, 0.34) 100%);

    --gutter: 16px;
    --columns: 3;
    --header-h: 54px;
    --tab-bar-h: 58px;
    --section-gap: 32px;
    --row-poster: 118px;
    --tone: #1A4A44;
}

@media (min-width: 520px) { :root { --columns: 4; } }
@media (min-width: 700px) { :root { --gutter: 24px; --columns: 5; --header-h: 60px; --row-poster: 150px; --section-gap: 44px; } }
@media (min-width: 1024px) { :root { --gutter: 40px; --columns: 6; --row-poster: 176px; } }
@media (min-width: 1440px) { :root { --gutter: 56px; --columns: 8; } }

.tone-0 { --tone: #1A4A44; }
.tone-1 { --tone: #123C46; }
.tone-2 { --tone: #20382F; }
.tone-3 { --tone: #0F3340; }
.tone-4 { --tone: #2C332B; }
.tone-5 { --tone: #332B26; }

/* ---------- Base ---------- */

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    padding-bottom: calc(var(--tab-bar-h) + env(safe-area-inset-bottom, 0px));
    background: var(--bg);
    color: var(--ink-muted);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.55;
    font-optical-sizing: auto;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: var(--teal); text-decoration: none; }
p a, dd a, .small-print a { text-decoration: underline; text-decoration-color: var(--teal-line); text-underline-offset: 3px; }
p a:hover, dd a:hover { text-decoration-color: var(--teal); }
strong { color: var(--ink); font-weight: 700; }
button { font: inherit; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 4px; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 14px;
    border-radius: 9px; background: var(--teal); color: var(--bg); font-weight: 800;
    transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.container { width: 100%; max-width: 1600px; margin-inline: auto; padding-inline: var(--gutter); }

.icon { flex: none; }

/* ---------- Header ---------- */

.site-header {
    position: fixed; inset: 0 0 auto 0; z-index: 40; height: var(--header-h);
    background: rgba(10, 22, 21, 0.94);
    border-bottom: 1px solid var(--border);
    transition: background-color 200ms ease, border-color 200ms ease;
}

/* Over artwork the bar rests as a scrim and turns solid once the page scrolls. */
.has-hero .site-header:not(.is-solid) {
    background: linear-gradient(180deg, rgba(7, 15, 14, 0.78) 0%, rgba(7, 15, 14, 0) 100%);
    border-bottom-color: transparent;
}

.header-inner { display: flex; align-items: center; gap: 20px; height: 100%; }

.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.brand-name { font-size: 17px; font-weight: 800; letter-spacing: -0.2px; }

.top-nav { display: none; gap: 4px; }
.top-nav a {
    padding: 7px 12px; border-radius: 8px; color: var(--ink-muted);
    font-size: 13.5px; font-weight: 600;
}
.top-nav a:hover { color: var(--ink); }
.top-nav a.is-active { background: var(--teal-soft); color: var(--teal); font-weight: 700; }

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

/* The search field is in the bar from 700px up, taking whatever room the
   links leave it. On a phone it drops in under the bar from the search button. */
.header-search { position: relative; display: none; align-items: center; gap: 8px; flex: 1 1 200px; min-width: 150px; max-width: 320px; height: 38px; padding: 0 12px;
    border: 1px solid var(--border-strong); border-radius: 12px; background: rgba(16, 36, 34, 0.86); color: var(--ink-faint); }
.header-search input { font-size: 13.5px; text-overflow: ellipsis; }
.site-header.is-searching .header-search {
    position: absolute; top: calc(100% + 8px); left: var(--gutter); right: var(--gutter); display: flex;
    max-width: none; height: 46px; background: var(--surface); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5);
}

.search-results {
    position: absolute; top: calc(100% + 8px); left: 0; z-index: 50; width: 100%; min-width: min(340px, calc(100vw - var(--gutter) * 2));
    max-height: min(70vh, 460px); padding: 6px; overflow-y: auto; border: 1px solid var(--border-strong); border-radius: 14px;
    background: var(--surface); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5);
}
.search-results[hidden] { display: none; }
@media (min-width: 700px) { .search-results { left: auto; right: 0; } }
.search-result { display: flex; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 10px; color: inherit; }
.search-result:hover, .search-result.is-active { background: var(--surface-alt); }
.search-result.is-active { outline: 1px solid var(--teal-line); }
.search-result-art {
    flex: none; width: 34px; height: 50px; overflow: hidden; border: 1px solid var(--border); border-radius: 6px;
    background: linear-gradient(196deg, var(--tone) 0%, var(--art-mid) 100%);
}
.search-result-art img { width: 100%; height: 100%; object-fit: cover; }
.search-result-text { display: flex; flex-direction: column; min-width: 0; }
.search-result-title { color: var(--ink); font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result-meta { color: var(--ink-faint); font-size: 11.5px; font-weight: 600; }
.search-result-type { margin-left: auto; flex: none; padding: 3px 7px; border-radius: 5px; background: var(--teal-soft); color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; }
.search-note { padding: 12px 10px; color: var(--ink-faint); font-size: 12.5px; font-weight: 600; }
.search-more { display: block; margin-top: 4px; padding: 10px; border-top: 1px solid var(--border); color: var(--teal); font-size: 12.5px; font-weight: 700; }
.search-more:hover, .search-more.is-active { text-decoration: underline; text-underline-offset: 3px; }
.header-search:focus-within { border-color: rgba(20, 184, 166, 0.55); background: var(--surface-alt); }
.header-search input, .search-field input {
    flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink);
    font: inherit; font-weight: 500; caret-color: var(--teal);
}
.header-search input::placeholder, .search-field input::placeholder { color: var(--ink-faint); opacity: 1; }
input[type="search"]::-webkit-search-cancel-button { filter: grayscale(1) brightness(1.6); }

.icon-button {
    display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0;
    border: 1px solid transparent; border-radius: 50%; background: none; color: var(--ink); cursor: pointer;
}
.icon-button:hover { border-color: var(--teal-line); color: var(--teal); }
.icon-button.on-art { border-color: rgba(231, 246, 244, 0.18); background: rgba(7, 15, 14, 0.55); }
.icon-button.on-art:hover { border-color: var(--teal-line); }

/* Seven links do not fit beside the logo below 1100px, so until then the
   menu button opens them all. Phones also keep the tab bar for the main five. */
.site-menu { position: relative; margin-right: -8px; }
.site-menu summary { list-style: none; }
.site-menu summary::-webkit-details-marker { display: none; }
.site-menu[open] summary { border-color: var(--teal-line); color: var(--teal); }
.menu-panel {
    position: absolute; top: calc(100% + 10px); left: 0; z-index: 50; display: flex; flex-direction: column; gap: 2px;
    width: min(264px, calc(100vw - var(--gutter) * 2)); max-height: calc(100vh - var(--header-h) - 24px); padding: 8px;
    overflow-y: auto; border: 1px solid var(--border-strong); border-radius: 16px; background: var(--surface);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5);
}
.menu-panel a {
    display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px;
    color: var(--ink-muted); font-size: 14px; font-weight: 600;
}
.menu-panel a:hover { color: var(--ink); background: var(--surface-alt); }
.menu-panel a.is-active { background: var(--teal-soft); color: var(--teal); font-weight: 700; }

.header-actions .header-app { display: none; }
@media (min-width: 520px) { .header-actions .header-app { display: inline-flex; } }

@media (min-width: 700px) {
    body { padding-bottom: 0; }
    .header-actions { flex: 1; justify-content: flex-end; min-width: 0; }
    .header-search { display: flex; }
    .header-search-link { display: none; }
}
@media (min-width: 1200px) {
    .site-menu { display: none; }
    .top-nav { display: flex; }
    .top-nav a { padding-inline: 10px; white-space: nowrap; }
}

/* ---------- Flash messages ---------- */

.flash {
    position: fixed; top: calc(var(--header-h) + 12px); left: 50%; z-index: 45; width: max-content;
    max-width: calc(100vw - var(--gutter) * 2); padding: 12px 16px; border-radius: 12px; background: var(--surface-alt);
    color: var(--ink); font-size: 13px; font-weight: 600; line-height: 18px; transform: translateX(-50%);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5); transition: opacity 300ms ease;
}
.flash.is-success { border: 1px solid var(--teal-line); }
.flash.is-error { border: 1px solid rgba(249, 115, 22, 0.5); }
.flash.is-leaving { opacity: 0; pointer-events: none; }

/* ---------- Bottom tab bar (mobile) ---------- */

.tab-bar {
    position: fixed; inset: auto 0 0 0; z-index: 40; display: flex;
    height: calc(var(--tab-bar-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(10, 22, 21, 0.97); border-top: 1px solid var(--border);
}
.tab-bar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--ink-faint); font-size: 10px; font-weight: 600; letter-spacing: 0.2px;
}
.tab-icon { display: grid; place-items: center; width: 44px; height: 26px; border-radius: 8px; }
.tab-bar a.is-active { color: var(--teal); font-weight: 700; }
.tab-bar a.is-active .tab-icon { background: var(--teal-soft); }
@media (min-width: 700px) { .tab-bar { display: none; } }

/* ---------- Buttons, chips, links ---------- */

.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 24px; border: 1px solid transparent; border-radius: 10px;
    font-size: 14px; font-weight: 800; letter-spacing: 0.2px; line-height: 1.2; white-space: nowrap; cursor: pointer;
    transition: transform 130ms ease, border-color 130ms ease, background-color 130ms ease;
}
.button:active { transform: scale(0.96); }
/* On solid teal, text and icons are always the page background colour. */
.button-solid { background: var(--teal); color: var(--bg); }
.button-solid:hover { background: #2CC7B6; }
.button-outline { border-color: var(--border-strong); background: rgba(7, 15, 14, 0.4); color: var(--ink); font-weight: 700; }
.button-outline:hover { border-color: var(--teal-line); background: var(--teal-soft); color: var(--teal); }
.button-tint { border-color: var(--teal-line); background: var(--teal-soft); color: var(--teal); font-weight: 700; }
.button-tint:hover { background: rgba(20, 184, 166, 0.22); }
.button-small { padding: 9px 16px; border-radius: 9px; font-size: 13px; }
.button[hidden] { display: none; }

.button-row { display: flex; flex-wrap: wrap; gap: 10px; }

.text-link { display: inline-flex; align-items: center; gap: 4px; color: var(--teal); font-size: 12px; font-weight: 700; white-space: nowrap; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.chip {
    display: inline-block; padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px;
    background: var(--surface); color: var(--ink-muted); font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.chip:hover { border-color: var(--teal-line); color: var(--ink); }
.chip.is-active { border-color: var(--teal-line); background: var(--teal-soft); color: var(--teal); font-weight: 700; }
.chip-quiet { padding: 7px 14px; font-weight: 700; }

.eyebrow { color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; }
.eyebrow-premium { color: var(--orange); }
.overline { margin-bottom: 12px; color: var(--ink-faint); font-size: 12px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; }

.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--ink-muted); font-size: 12px; font-weight: 600; letter-spacing: 0.3px; }
.meta-line > * + *::before {
    content: ""; display: inline-block; width: 3px; height: 3px; margin-right: 8px;
    border-radius: 50%; background: var(--ink-faint); vertical-align: middle;
}
.meta-line a { color: inherit; }
.meta-line a:hover { color: var(--teal); }

.vj-chip {
    display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 5px 9px;
    border-radius: 5px; background: var(--teal-soft); color: var(--teal);
    font-size: 11px; font-weight: 700; letter-spacing: 0.4px;
}
.vj-chip::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--teal); }

/* ---------- Artwork ---------- */

.card-art, .hero-slide, .detail-banner {
    background: linear-gradient(196deg, var(--tone) 0%, var(--art-mid) 58%, var(--art-end) 100%);
}

/* Without the script every image simply shows; with it, each fades in on load. */
.js img[data-fade] { opacity: 0; transition: opacity 280ms ease; }
.js img[data-fade].is-loaded { opacity: 1; }

.hero-wash, .hero-melt { position: absolute; inset: 0; pointer-events: none; }
.hero-wash { background: var(--teal-wash); }
.hero-melt { background: var(--hero-melt); }

/* ---------- Hero ---------- */

.hero { position: relative; }

.hero-track {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    overscroll-behavior-x: contain;
}
.hero-track::-webkit-scrollbar { display: none; }

.hero-slide {
    position: relative; flex: 0 0 100%; height: clamp(430px, 62vh, 560px);
    overflow: hidden; scroll-snap-align: start; scroll-snap-stop: always;
}

.hero-art { position: absolute; inset: 0; }
.hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }

/* The brand mark stands in when a slide has no poster, or its poster failed
   to load and the script removed it. */
.hero-art-mark { display: none; position: absolute; inset: 0; place-items: center; opacity: 0.16; }
.hero-art:not(:has(img)) .hero-art-mark { display: grid; }
.hero-art-mark .logo-mark { width: min(46vw, 220px); height: auto; }

.hero-inner { position: relative; display: flex; align-items: flex-end; height: 100%; padding-bottom: 42px; }

.hero-copy { display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: 560px; }
.hero-title { color: var(--ink); font-size: 34px; font-weight: 800; line-height: 37px; letter-spacing: -0.8px; text-transform: uppercase; overflow-wrap: anywhere; }
.hero-title a { color: inherit; }
.hero-title a:hover { color: var(--teal); }
.hero-synopsis { max-width: 94%; font-size: 13px; line-height: 19px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-copy .button-row { margin-top: 6px; }
.hero-copy .button-row .button { flex: 1 1 auto; }

.hero-controls {
    position: absolute; inset: auto 0 14px 0; display: flex; align-items: center; justify-content: center; gap: 14px;
}
.hero-controls[hidden] { display: none; }
.hero-controls .icon-button { display: none; }
.hero-dots { display: flex; align-items: center; gap: 6px; }
.hero-dots button {
    width: 6px; height: 6px; padding: 0; border: 0; border-radius: 3px; background: var(--teal);
    opacity: 0.3; cursor: pointer; transition: width 240ms ease, opacity 240ms ease;
}
.hero-dots button.is-current { width: 18px; opacity: 1; }

.hero-empty { min-height: 380px; background: linear-gradient(196deg, #1A4A44 0%, var(--art-mid) 58%, var(--art-end) 100%); }
.hero-empty-inner {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    min-height: 380px; padding-top: var(--header-h); text-align: center;
}
.hero-empty-title { margin-top: 8px; color: var(--ink); font-size: 26px; font-weight: 800; letter-spacing: -0.6px; }
.hero-empty-body { max-width: 320px; font-size: 13.5px; }
.hero-empty .button { margin-top: 10px; }

@media (min-width: 700px) {
    .hero-slide { height: clamp(460px, 62vh, 640px); }
    /* The poster covers the whole banner. A wide screen crops a 2:3 poster to
       a band, so the band is taken from the upper part, where the faces are. */
    .hero-art img { object-position: center 22%; }
    .hero-art-mark { place-items: center end; padding-right: 12%; }
    /* The copy sits bottom-left, so the scrim darkens that corner and leaves
       the rest of the poster clear. */
    .hero-slide .hero-melt {
        background:
            linear-gradient(90deg, rgba(7, 15, 14, 0.86) 0%, rgba(7, 15, 14, 0.58) 34%, rgba(7, 15, 14, 0) 66%),
            linear-gradient(180deg, rgba(5, 16, 14, 0.6) 0%, rgba(5, 16, 14, 0) 24%, rgba(10, 22, 21, 0) 58%, rgba(10, 22, 21, 0.82) 86%, #0A1615 100%);
    }
    .hero-inner { padding-bottom: 68px; }
    .hero-title { font-size: 46px; line-height: 49px; letter-spacing: -1.1px; }
    .hero-synopsis { font-size: 14px; line-height: 21px; -webkit-line-clamp: 3; }
    .hero-copy .button-row .button { flex: none; }
    .hero-controls .icon-button { display: inline-grid; }
}
@media (min-width: 1024px) {
    .hero-slide { height: clamp(520px, 74vh, 780px); }
    .hero-inner { padding-bottom: 76px; }
    .hero-title { font-size: 54px; line-height: 57px; letter-spacing: -1.3px; }
}

/* ---------- Sections, rows, grids ---------- */

.home-sections { display: flex; flex-direction: column; gap: var(--section-gap); padding-top: 20px; }

.row-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.row-header h2 { color: var(--ink); font-size: 18px; font-weight: 700; letter-spacing: -0.2px; }
.row-header p { margin-top: 2px; color: var(--ink-faint); font-size: 12px; }

.row { position: relative; }
.row-track {
    display: flex; gap: 12px; padding-inline: var(--gutter); overflow-x: auto;
    scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); scrollbar-width: none;
}
.row-track::-webkit-scrollbar { display: none; }
.row-track .card { flex: 0 0 var(--row-poster); scroll-snap-align: start; }

.row-button { position: absolute; top: calc(50% + 4px); z-index: 2; display: none; transform: translateY(-50%); }
.row-button[data-dir="prev"] { left: calc(var(--gutter) - 18px); }
.row-button[data-dir="next"] { right: calc(var(--gutter) - 18px); }
@media (hover: hover) and (min-width: 700px) {
    .row:hover .row-button:not([disabled]), .row-button:focus-visible { display: inline-grid; }
}

.poster-grid { display: grid; grid-template-columns: repeat(var(--columns), minmax(0, 1fr)); gap: 20px 12px; }
/* A shelf is one row: whatever does not fit the current column count is hidden. */
.poster-grid.is-shelf > :nth-child(n + 4) { display: none; }
@media (min-width: 520px) { .poster-grid.is-shelf > :nth-child(-n + 4) { display: flex; } }
@media (min-width: 700px) { .poster-grid.is-shelf > :nth-child(-n + 5) { display: flex; } }
@media (min-width: 1024px) { .poster-grid { gap: 28px 16px; } .poster-grid.is-shelf > :nth-child(-n + 6) { display: flex; } }
@media (min-width: 1440px) { .poster-grid.is-shelf > :nth-child(-n + 8) { display: flex; } }
/* A Home section holds at most six cards: two rows of three on a phone, one
   row of six from a tablet up, whatever the browse grid's column count is. */
.poster-grid.is-six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 700px) { .poster-grid.is-six { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* A Watchlist card with its Remove action underneath. */
.saved { display: flex; flex-direction: column; min-width: 0; }
.saved form { margin-top: 6px; }
.saved-remove {
    padding: 5px 10px; border: 1px solid var(--border); border-radius: 7px; background: none;
    color: var(--ink-faint); font-size: 11px; font-weight: 700; cursor: pointer;
}
.saved-remove:hover { border-color: rgba(249, 115, 22, 0.5); color: var(--orange); }

/* ---------- Poster card ---------- */

.card { display: flex; flex-direction: column; min-width: 0; color: inherit; transition: transform 130ms ease; }
.card:active { transform: scale(0.96); }

.card-art {
    position: relative; display: block; aspect-ratio: 2 / 3; margin-bottom: 8px; overflow: hidden;
    border: 1px solid var(--border); border-radius: 10px; transition: border-color 130ms ease;
}
.card:hover .card-art, .card:focus-visible .card-art { border-color: var(--teal-line); }
.card-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.art-fallback { position: absolute; inset: auto 0 0 0; display: flex; flex-direction: column; gap: 6px; padding: 10px; }
.art-fallback.clears-tag { padding-bottom: 36px; }
.art-rule { width: 16px; height: 2px; background: var(--teal); }
.art-title {
    color: var(--ink); font-size: 12px; font-weight: 800; line-height: 14px; text-transform: uppercase;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}

.card-badge, .card-tag { position: absolute; left: 8px; border-radius: 4px; font-weight: 800; text-transform: uppercase; line-height: 1.3; }
.card-badge { top: 8px; padding: 3px 6px; background: var(--teal); color: var(--bg); font-size: 9px; letter-spacing: 0.8px; }
.card-tag {
    bottom: 8px; padding: 3px 7px; border: 1px solid rgba(231, 246, 244, 0.18); background: rgba(7, 15, 14, 0.72);
    color: var(--ink); font-size: 9.5px; letter-spacing: 0.5px;
}

.card-title, .card-meta, .card-vj { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-title { color: var(--ink); font-size: 13px; font-weight: 700; }
.card:hover .card-title { color: var(--teal); }
.card-meta { margin-top: 2px; color: var(--ink-faint); font-size: 11px; }
.card-vj { margin-top: 2px; color: var(--teal); font-size: 11px; font-weight: 600; }

/* ---------- Continue Watching ---------- */

/* The one Home section that belongs to the viewer, so it does not look like a
   catalogue row: a marked heading, and wide tiles on a raised surface, each
   with a small poster beside the title, how far in they are, and Resume. */
.resume-header { align-items: center; justify-content: flex-start; gap: 12px; }
.resume-badge {
    flex: none; display: grid; place-items: center; width: 38px; height: 38px; padding-left: 2px;
    border: 1px solid var(--teal-line); border-radius: 50%; background: var(--teal-soft); color: var(--teal);
}

.resume-tile {
    flex: 0 0 min(340px, 86vw); display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; padding: 10px;
    border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface); color: inherit;
    scroll-snap-align: start; transition: border-color 130ms ease, background-color 130ms ease, transform 130ms ease;
}
.resume-tile:hover, .resume-tile:focus-visible { border-color: var(--teal-line); background: var(--surface-alt); }
.resume-tile:active { transform: scale(0.98); }

.resume-tile-art {
    position: relative; display: grid; place-items: center; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 8px;
    background: linear-gradient(196deg, var(--tone) 0%, var(--art-mid) 100%);
}
.resume-tile-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.resume-tile-art .logo-mark { opacity: 0.5; }

.resume-tile-body { display: flex; flex-direction: column; min-width: 0; padding: 4px 4px 2px 0; }
.resume-tile-title {
    color: var(--ink); font-size: 15px; font-weight: 800; letter-spacing: -0.2px; line-height: 20px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.resume-tile-stats { display: flex; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 8px; color: var(--ink-muted); font-size: 11.5px; white-space: nowrap; }
.resume-tile-stats strong { color: var(--ink); font-weight: 700; }
.resume-bar { display: block; height: 4px; margin-top: 6px; overflow: hidden; border-radius: 2px; background: rgba(231, 246, 244, 0.14); }
.resume-bar span { display: block; height: 100%; min-width: 4px; border-radius: 2px; background: var(--teal); }
.resume-tile-action {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; padding: 7px 12px;
    border: 1px solid var(--teal-line); border-radius: 8px; background: var(--teal-soft); color: var(--teal);
    font-size: 12.5px; font-weight: 800; white-space: nowrap; transition: background-color 130ms ease, color 130ms ease;
}
.resume-tile:hover .resume-tile-action, .resume-tile:focus-visible .resume-tile-action { background: var(--teal); color: var(--bg); }

@media (min-width: 700px) {
    .resume-tile { flex-basis: 376px; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 12px; }
    .resume-tile-title { font-size: 16px; line-height: 21px; }
}

/* ---------- Genre tiles ---------- */

.genre-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 520px) { .genre-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 700px) { .genre-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .genre-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.genre-tile {
    display: flex; flex-direction: column; justify-content: space-between; height: 76px; padding: 14px;
    border: 1px solid var(--border); border-radius: 12px;
    background: linear-gradient(140deg, var(--tone) 0%, var(--art-mid) 78%);
    transition: border-color 130ms ease, transform 130ms ease;
}
.genre-tile:hover { border-color: var(--teal-line); }
.genre-tile:active { transform: scale(0.97); }
.genre-tile-name { color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.genre-tile-count { color: var(--ink-muted); font-size: 11px; font-weight: 600; }

/* ---------- VJ tiles ---------- */

.vj-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .vj-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .vj-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1440px) { .vj-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.vj-tile {
    display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border);
    border-radius: 12px; background: var(--surface); transition: border-color 130ms ease;
}
.vj-tile:hover { border-color: var(--teal-line); }
.vj-avatar {
    position: relative; display: grid; place-items: center; flex: none; width: 44px; height: 44px; overflow: hidden;
    border: 1px solid rgba(20, 184, 166, 0.35); border-radius: 50%;
    background: linear-gradient(196deg, var(--tone) 0%, var(--art-mid) 100%); color: var(--teal); font-size: 16px; font-weight: 800;
}
.vj-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vj-tile-text { display: flex; flex-direction: column; min-width: 0; }
.vj-tile-name { color: var(--ink); font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vj-tile-count { color: var(--ink-faint); font-size: 11px; font-weight: 600; }

/* ---------- Inner pages ---------- */

.page { display: flex; flex-direction: column; gap: 22px; padding-top: calc(var(--header-h) + 28px); padding-bottom: 8px; }
.page-narrow { max-width: calc(760px + var(--gutter) * 2); gap: 34px; }
.page-reading { max-width: calc(680px + var(--gutter) * 2); gap: 26px; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.page-head h1, .notice h1 { color: var(--ink); font-size: 28px; font-weight: 800; letter-spacing: -0.5px; }

.page-intro { display: flex; flex-direction: column; gap: 10px; padding-bottom: 4px; }
.page-intro h1 { color: var(--ink); font-size: 30px; font-weight: 800; line-height: 1.12; letter-spacing: -0.8px; }
.lead { max-width: 620px; font-size: 14.5px; line-height: 23px; }
@media (min-width: 700px) { .page-intro h1 { font-size: 40px; letter-spacing: -1.1px; } .lead { font-size: 15.5px; line-height: 25px; } }

.search-field {
    display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 6px 0 14px; max-width: 640px;
    border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--ink-faint);
}
.search-field:focus-within { border-color: rgba(20, 184, 166, 0.55); background: var(--surface-alt); }
.search-field .button { padding: 8px 14px; }

.chip-group .overline { margin-bottom: 8px; font-size: 11px; }
.chip-row { display: flex; gap: 8px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); overflow-x: auto; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) { .chip-row { flex-wrap: wrap; margin-inline: 0; padding-inline: 0; overflow: visible; } }

.result-count { color: var(--ink-faint); font-size: 12.5px; font-weight: 600; }

.pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.page-numbers { display: none; align-items: center; gap: 6px; }
@media (min-width: 520px) { .page-numbers { display: flex; } }
.page-link {
    min-width: 40px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px;
    background: var(--surface); color: var(--teal); font-size: 13px; font-weight: 700; text-align: center;
}
a.page-link:hover { border-color: var(--teal-line); }
.page-link.is-current { border-color: var(--teal-line); background: var(--teal-soft); }
.page-link.is-disabled { color: var(--ink-faint); opacity: 0.55; }
.page-gap { color: var(--ink-faint); }

.notice {
    display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 34px 22px;
    border: 1px solid var(--border); border-radius: 16px; background: var(--surface); text-align: center;
}
.notice h1, .notice h2, .notice h3 { color: var(--ink); }
.notice h2, .notice h3 { font-size: 15px; font-weight: 700; }
.notice p { max-width: 320px; color: var(--ink-faint); font-size: 13px; line-height: 18px; }
.notice .button { margin-top: 8px; }
.notice-badge, .feature-badge { display: grid; place-items: center; flex: none; background: var(--teal-soft); color: var(--teal); }
.notice-badge { width: 46px; height: 46px; margin-bottom: 4px; border-radius: 50%; }
.feature-badge { width: 38px; height: 38px; border: 1px solid rgba(20, 184, 166, 0.32); border-radius: 11px; }

.inline-notice { padding: 18px; border: 1px solid var(--border); border-left: 3px solid var(--teal); border-radius: 12px; background: var(--surface); font-size: 13.5px; line-height: 20px; }

.small-print { margin-top: 12px; color: var(--ink-faint); font-size: 12px; line-height: 18px; }

/* ---------- Movie details ---------- */

.detail { position: relative; }
.detail-banner { position: relative; height: clamp(340px, 50vh, 460px); overflow: hidden; }
.detail-banner img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

.detail-main { position: relative; margin-top: -150px; }
.detail-poster { display: none; }
.detail-info { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.detail-title { color: var(--ink); font-size: 28px; font-weight: 800; line-height: 31px; letter-spacing: -0.6px; text-transform: uppercase; overflow-wrap: anywhere; }
.detail-info .button-row { margin-top: 8px; }
.detail-note { max-width: 460px; color: var(--ink-faint); font-size: 12px; line-height: 18px; }

.featured-badge {
    align-self: flex-start; padding: 5px 10px; border-radius: 6px; background: var(--teal); color: var(--bg);
    font-size: 10px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase;
}

.detail-body { display: grid; gap: 28px; margin-top: 28px; }
.prose { max-width: 680px; font-size: 14px; line-height: 21px; white-space: pre-line; overflow-wrap: anywhere; }

.fact-card { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 2px 16px; }
.fact-card > div { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 13px 0; }
.fact-card > div + div { border-top: 1px solid var(--border); }
.fact-card dt { color: var(--ink-faint); font-size: 12.5px; font-weight: 600; }
.fact-card dd { color: var(--ink); font-size: 13.5px; font-weight: 700; text-align: right; overflow-wrap: anywhere; }

.similar { margin-top: var(--section-gap); }

@media (min-width: 700px) {
    .detail-banner { height: clamp(300px, 46vh, 440px); }
    .detail-banner img { filter: blur(38px) saturate(1.15) brightness(0.6); transform: scale(1.2); object-position: center; }
    .detail-main { display: grid; grid-template-columns: clamp(200px, 22vw, 280px) minmax(0, 1fr); align-items: end; gap: 32px; max-width: 1280px; margin-top: -220px; }
    .detail-poster { display: block; margin-bottom: 0; border-color: var(--border-strong); }
    .detail-title { font-size: 40px; line-height: 43px; letter-spacing: -1px; }
    .detail-body { grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); align-items: start; gap: 40px; max-width: 1280px; margin-top: 36px; }
    .similar { max-width: 1600px; }
}

/* ---------- Seasons and episodes ---------- */

.episodes { display: flex; flex-direction: column; gap: 10px; max-width: 1280px; margin-top: var(--section-gap); }
.episodes > .overline { margin-bottom: 2px; }

.season { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.season summary {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 16px;
    cursor: pointer; list-style: none;
}
.season summary::-webkit-details-marker { display: none; }
.season summary::after {
    content: ""; flex: none; width: 8px; height: 8px; margin-right: 4px; border-right: 2px solid var(--ink-faint);
    border-bottom: 2px solid var(--ink-faint); transform: rotate(45deg); transition: transform 130ms ease;
}
.season[open] summary::after { transform: rotate(-135deg); }
.season-title { flex: 1; min-width: 0; color: var(--ink); font-size: 15px; font-weight: 800; letter-spacing: -0.1px; }
.season-count { flex: none; color: var(--ink-faint); font-size: 12px; font-weight: 600; }
.season-description { padding: 0 16px 12px; font-size: 13px; line-height: 19px; }

.episode-list { border-top: 1px solid var(--border); }
.episode { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; padding-right: 12px; }
.episode + .episode { border-top: 1px solid var(--border); }
.episode-main { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; padding: 12px 6px 12px 12px; color: inherit; }

/* The episode's own still, or the series poster when it has none, over the
   series' tone gradient when neither loads. Always 16:9, never stretched. */
.episode-art {
    position: relative; flex: none; width: 104px; aspect-ratio: 16 / 9; overflow: hidden;
    border: 1px solid var(--border); border-radius: 8px;
    background: linear-gradient(196deg, var(--tone) 0%, var(--art-mid) 58%, var(--art-end) 100%);
    transition: border-color 130ms ease;
}
.episode-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.episode-art.is-series-poster img { object-position: center 25%; }
.episode-main:hover .episode-art { border-color: var(--teal-line); }
.episode-number {
    position: absolute; left: 5px; bottom: 5px; min-width: 22px; height: 20px; padding: 0 5px; border-radius: 6px;
    background: rgba(7, 15, 14, 0.78); color: var(--teal); font-size: 11.5px; font-weight: 800; line-height: 20px;
    text-align: center; font-variant-numeric: tabular-nums;
}
.episode-play {
    position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 28px; height: 28px;
    border-radius: 50%; background: var(--teal); color: var(--bg); transform: translate(-50%, -50%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.episode-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.episode-title { color: var(--ink); font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.episode-main:hover .episode-title { color: var(--teal); }
.episode-meta { color: var(--ink-faint); font-size: 11.5px; font-weight: 600; }
.episode-description { font-size: 12.5px; line-height: 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.episode-download { flex: none; }
.episode-download-button { gap: 6px; padding: 9px 11px; }
.episode-download-label { display: none; }
.episode-download-button.is-busy { cursor: progress; }
.episode-download-button.is-busy .icon { animation: download-pulse 1s ease-in-out infinite; }
.episode-download-button.is-done { border-color: var(--teal-line); color: var(--teal); }
.episode-download-button.is-failed { border-color: rgba(249, 115, 22, 0.5); color: var(--orange); }
@keyframes download-pulse { 50% { transform: translateY(2px); opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .episode-download-button.is-busy .icon { animation: none; } }

.episode-status {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; flex: 0 0 100%;
    margin: -4px 0 12px; padding-left: 130px; color: var(--ink-muted); font-size: 12px; font-weight: 600; line-height: 17px;
}
.episode-status[hidden] { display: none; }
.episode-status.is-failed { color: var(--orange); }
.status-action {
    padding: 0; border: 0; background: none; color: var(--teal); font: inherit; font-weight: 800; cursor: pointer;
    text-decoration: underline; text-underline-offset: 3px;
}

@media (max-width: 519px) {
    .episode-art { width: 88px; }
    .episode-main { gap: 12px; }
    .episode-status { padding-left: 112px; }
}
@media (min-width: 520px) { .episode-download-label { display: inline; } }

/* The whole-series queue. */
.series-download { max-width: 1280px; margin-top: var(--section-gap); }
.series-download[hidden] { display: none; }
.series-download-card {
    display: flex; flex-direction: column; gap: 12px; padding: 18px; border: 1px solid var(--teal-line);
    border-radius: 14px; background: var(--surface);
}
.series-download-title { color: var(--ink); font-size: 16px; font-weight: 800; letter-spacing: -0.2px; outline: 0; }
.series-download-intro { max-width: 720px; font-size: 13px; line-height: 19px; }
.series-download-intro strong { color: var(--ink); }
.progress { height: 6px; overflow: hidden; border-radius: 3px; background: var(--surface-alt); }
.progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--teal); transition: width 300ms ease; }
.series-download-summary { color: var(--ink); font-size: 13px; font-weight: 700; }
.series-download-failures { display: flex; flex-direction: column; gap: 6px; }
.series-download-failures[hidden] { display: none; }
.series-download-failures li {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 9px 12px;
    border: 1px solid rgba(249, 115, 22, 0.35); border-radius: 10px; font-size: 12.5px; line-height: 17px;
}
.series-download-failures strong { color: var(--ink); overflow-wrap: anywhere; }
.series-download-failures span { color: var(--orange); }

/* ---------- Profile ---------- */

.profile-head { display: flex; align-items: center; gap: 16px; }
.profile-head h1 { color: var(--ink); font-size: 26px; font-weight: 800; line-height: 30px; letter-spacing: -0.5px; overflow-wrap: anywhere; }
.profile-head p { margin-top: 3px; color: var(--teal); font-size: 13px; font-weight: 700; }
.profile-avatar {
    display: grid; place-items: center; flex: none; width: 60px; height: 60px; border: 1px solid rgba(20, 184, 166, 0.35);
    border-radius: 50%; background: var(--surface-alt); color: var(--teal); font-size: 23px; font-weight: 800;
}
.section-actions { margin-top: 12px; }
.page-narrow .form { max-width: 440px; }

/* ---------- Plans, features, steps ---------- */

.plan-list, .feature-list, .link-list { display: flex; flex-direction: column; gap: 10px; }

.plan { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.plan-text { flex: 1; min-width: 0; }
.plan-action { flex: 0 0 100%; }
.plan-action .button, a.plan-action { width: 100%; }
@media (min-width: 520px) { .plan-action { flex: none; } }
.plan-standing { margin-bottom: 12px; font-size: 13px; }
.plan h3 { color: var(--ink); font-size: 16px; font-weight: 800; letter-spacing: -0.2px; }
.plan-duration { margin-top: 2px; color: var(--teal); font-size: 12px; font-weight: 700; }
.plan-description { margin-top: 4px; font-size: 12.5px; line-height: 17px; }
.plan-price { flex: none; text-align: right; }
.plan-currency { display: block; color: var(--ink-faint); font-size: 10.5px; font-weight: 800; }
.plan-amount { color: var(--ink); font-size: 19px; font-weight: 800; letter-spacing: -0.4px; font-variant-numeric: tabular-nums; }

.feature { display: flex; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.feature h3 { color: var(--ink); font-size: 15px; font-weight: 700; letter-spacing: -0.1px; }
.feature p { margin-top: 3px; font-size: 13px; line-height: 19px; }

.steps { display: flex; flex-direction: column; gap: 10px; counter-reset: step; }
.steps li { position: relative; padding: 4px 0 4px 42px; font-size: 13.5px; line-height: 20px; counter-increment: step; }
.steps li::before {
    content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px;
    border: 1px solid rgba(20, 184, 166, 0.32); border-radius: 8px; background: var(--teal-soft);
    color: var(--teal); font-size: 13px; font-weight: 800; line-height: 26px; text-align: center;
}

.link-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--ink-faint); transition: border-color 130ms ease; }
.link-row:hover { border-color: var(--teal-line); }
.link-row > span:nth-child(2) { flex: 1; min-width: 0; }
.link-row strong { display: block; font-size: 15px; letter-spacing: -0.1px; }
.link-row small { display: block; color: var(--ink-faint); font-size: 12.5px; }

/* ---------- About ---------- */

.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.stat-row > div { display: flex; flex-direction: column-reverse; gap: 2px; padding: 16px; }
.stat-row > div + div { border-left: 1px solid var(--border); }
.stat-row dt { color: var(--ink-faint); font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; }
.stat-row dd { color: var(--ink); font-size: 24px; font-weight: 800; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }

.copy-block { display: flex; flex-direction: column; gap: 12px; }
.copy-block h2 { color: var(--ink); font-size: 21px; font-weight: 800; letter-spacing: -0.4px; }
.copy-block p { max-width: 680px; font-size: 14.5px; line-height: 23px; }

/* ---------- Policy document ---------- */

.policy section { padding: 22px 0; border-top: 1px solid var(--border); }
.policy h2 { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; color: var(--ink); font-size: 14px; font-weight: 800; line-height: 28px; }
.policy-number {
    flex: none; min-width: 28px; height: 28px; padding: 0 6px; border: 1px solid rgba(20, 184, 166, 0.32);
    border-radius: 8px; background: var(--teal-soft); color: var(--teal); font-size: 13px; line-height: 26px; text-align: center;
}
.policy p { margin-bottom: 12px; font-size: 14.5px; font-weight: 400; line-height: 23px; }
.policy p:last-child { margin-bottom: 0; }
.policy p a { font-weight: 700; }

/* ---------- Account menu ---------- */

.header-signin { padding: 7px 6px; color: var(--ink); font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.header-signin:hover { color: var(--teal); }

.account { position: relative; }
.account summary {
    display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(20, 184, 166, 0.35);
    border-radius: 50%; background: var(--surface-alt); color: var(--teal); font-size: 13px; font-weight: 800;
    cursor: pointer; list-style: none;
}
.account summary::-webkit-details-marker { display: none; }
.account summary:hover, .account[open] summary { border-color: var(--teal); }
.account-panel {
    position: absolute; top: calc(100% + 10px); right: 0; z-index: 50; width: 232px; padding: 16px;
    border: 1px solid var(--border-strong); border-radius: 16px; background: var(--surface);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5);
}
.account-name { color: var(--ink); font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-status { margin: 2px 0 12px; color: var(--ink-faint); font-size: 12.5px; }
.account-links { display: flex; flex-direction: column; margin: 0 -8px 12px; padding: 6px 0; border-block: 1px solid var(--border); }
.account-links a { padding: 8px; border-radius: 8px; color: var(--ink-muted); font-size: 13.5px; font-weight: 600; }
.account-links a:hover { background: var(--surface-alt); color: var(--ink); }

/* ---------- Forms ---------- */

.auth-page { align-items: center; padding-bottom: 40px; }
.auth-card { display: flex; flex-direction: column; gap: 22px; width: 100%; max-width: 440px; padding-top: 12px; }
.auth-head h1 { color: var(--ink); font-size: 29px; font-weight: 800; line-height: 33px; letter-spacing: -0.7px; }
.auth-head p { margin-top: 8px; font-size: 13.5px; line-height: 20px; }
.auth-foot { color: var(--ink-faint); font-size: 12.5px; line-height: 19px; }

.form { display: flex; flex-direction: column; gap: 15px; }
.field label { display: block; margin-bottom: 7px; color: var(--ink-faint); font-size: 11px; font-weight: 800; letter-spacing: 0.7px; text-transform: uppercase; }
.field input {
    width: 100%; height: 50px; padding: 0 15px; border: 1px solid var(--border); border-radius: 12px;
    background: var(--surface); color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 600;
    caret-color: var(--teal); outline: 0;
}
.field input::placeholder { color: var(--ink-faint); opacity: 1; }
.field input:focus { border-color: rgba(20, 184, 166, 0.55); background: var(--surface-alt); }
.field input[aria-invalid="true"] { border-color: rgba(249, 115, 22, 0.6); }
.field-error { margin-top: 6px; color: var(--orange); font-size: 11.5px; font-weight: 600; line-height: 16px; }
.field textarea {
    display: block; width: 100%; min-height: 150px; padding: 13px 15px; border: 1px solid var(--border); border-radius: 12px;
    background: var(--surface); color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 500; line-height: 22px;
    caret-color: var(--teal); outline: 0; resize: vertical;
}
.field textarea:focus { border-color: rgba(20, 184, 166, 0.55); background: var(--surface-alt); }
.field textarea[aria-invalid="true"] { border-color: rgba(249, 115, 22, 0.6); }
.field-pair { display: grid; gap: 15px; }
@media (min-width: 700px) { .field-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Off-screen rather than display:none, which the simplest bots skip. */
.field-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.button[disabled] { opacity: 0.6; cursor: progress; }
.field-hint { margin-top: 6px; color: var(--ink-faint); font-size: 11.5px; line-height: 16px; }

/* ---------- Contact Us ---------- */

.contact-layout { display: grid; gap: 36px; }
.contact-form { max-width: none; }
.contact-aside { display: flex; flex-direction: column; gap: 12px; }
.contact-aside .overline { margin-bottom: 0; }
.placeholder-value { color: var(--ink-faint); font-variant-numeric: tabular-nums; letter-spacing: 0.4px; }
.placeholder-note { display: block; color: var(--orange); font-size: 10.5px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; }
@media (min-width: 1024px) { .contact-layout { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 56px; align-items: start; max-width: 1180px; } }

/* ---------- Requests ---------- */

/* Every status carries an icon and its name; colour only reinforces them. */
.status-badge {
    display: inline-flex; align-items: center; flex: none; gap: 6px; padding: 5px 10px;
    border: 1px solid var(--border-strong); border-radius: 8px; color: var(--ink-muted);
    font-size: 11.5px; font-weight: 800; letter-spacing: 0.3px; line-height: 16px; white-space: nowrap;
}
.status-badge.is-under-review { border-color: var(--teal-line); color: var(--teal); }
.status-badge.is-approved { border-color: var(--teal-line); background: var(--teal-soft); color: var(--teal); }
.status-badge.is-rejected { border-color: rgba(249, 115, 22, 0.5); color: var(--orange); }
.status-badge.is-available { border-color: rgba(34, 197, 94, 0.55); background: rgba(34, 197, 94, 0.12); color: var(--green); }

.field-set { min-width: 0; margin: 0; padding: 0; border: 0; }
.field-set legend { margin-bottom: 7px; padding: 0; color: var(--ink-faint); font-size: 11px; font-weight: 800; letter-spacing: 0.7px; text-transform: uppercase; }
.choice-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.choice span {
    display: flex; align-items: center; justify-content: center; gap: 8px; height: 50px;
    border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
    color: var(--ink-muted); font-size: 14.5px; font-weight: 700;
}
.choice input:checked + span { border-color: var(--teal-line); background: var(--teal-soft); color: var(--teal); }
.choice input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
@media (min-width: 700px) { .field-pair-wide { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }

.status-guide { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 2px 16px; }
.status-guide li { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; padding: 13px 0; }
.status-guide li + li { border-top: 1px solid var(--border); }
.status-guide p { color: var(--ink-muted); font-size: 12.5px; line-height: 18px; }

.request-list { display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.request-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.request-card.is-available { border-color: rgba(34, 197, 94, 0.35); }
.request-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.request-card-head > div { min-width: 0; }
.request-card h2 { color: var(--ink); font-size: 16px; font-weight: 800; line-height: 21px; letter-spacing: -0.2px; overflow-wrap: anywhere; }
.request-card h2 a { color: inherit; }
.request-card h2 a:hover { color: var(--teal); }
.request-meta { margin-top: 4px; color: var(--ink-faint); font-size: 12.5px; font-weight: 600; line-height: 18px; }
.request-message {
    padding: 11px 13px; border-left: 3px solid var(--border-strong); border-radius: 8px; background: var(--surface-alt);
    color: var(--ink-muted); font-size: 13px; line-height: 19px; white-space: pre-line; overflow-wrap: anywhere;
}
.request-details { margin-top: 12px; }

.request-head { display: flex; flex-direction: column; gap: 10px; }
.request-head h1 { color: var(--ink); font-size: 28px; font-weight: 800; line-height: 1.15; letter-spacing: -0.6px; overflow-wrap: anywhere; }
.request-head-status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.request-head-status p { color: var(--ink-muted); font-size: 13.5px; line-height: 20px; }
.inline-notice strong { display: block; color: var(--ink); }
.inline-notice .text-link { margin-top: 8px; }

/* ---------- My List button ---------- */

.my-list .my-list-add, .my-list .my-list-remove { display: inline-flex; align-items: center; gap: 8px; }
.my-list .my-list-remove, .my-list.is-saved .my-list-add { display: none; }
.my-list.is-saved .my-list-remove { display: inline-flex; }
.form > .field-hint { margin-top: -6px; }

.form-notice { display: flex; gap: 10px; padding: 13px; border-radius: 11px; color: var(--ink); font-size: 12.5px; font-weight: 600; line-height: 18px; }
.form-notice::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 6px; border-radius: 50%; }
.form-notice.is-error { border: 1px solid rgba(249, 115, 22, 0.32); background: rgba(249, 115, 22, 0.10); }
.form-notice.is-error::before { background: var(--orange); }

.button-block { width: 100%; }
.form .button-block { height: 51px; margin-top: 4px; border-radius: 12px; font-size: 15px; }

/* ---------- Player ---------- */

.watch-page { max-width: calc(1200px + var(--gutter) * 2); gap: 18px; padding-top: calc(var(--header-h) + 16px); padding-bottom: 32px; }

.player { position: relative; overflow: hidden; border-radius: 12px; background: #000000; }
.player video { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 80vh; background: #000000; }
.player-veil {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    padding: 24px; background: rgba(5, 16, 14, 0.92); text-align: center;
}
.player-veil[hidden] { display: none; }
.player-veil p { max-width: 340px; color: var(--ink-faint); font-size: 12.5px; line-height: 18px; }
.player-veil .player-veil-title { color: var(--ink); font-size: 15.5px; font-weight: 700; }
.player-veil .button { margin-top: 8px; }

.player-locked {
    display: grid; place-items: center; aspect-ratio: 16 / 9; max-height: 80vh; padding: 20px;
    border: 1px solid var(--border); background: linear-gradient(196deg, var(--tone) 0%, var(--art-mid) 58%, var(--art-end) 100%);
}
.player-locked .notice { max-width: 440px; border-color: var(--border-strong); }
.player-locked .notice h1 { font-size: 21px; line-height: 27px; letter-spacing: -0.4px; }
@media (max-width: 519px) { .player-locked { aspect-ratio: auto; } }

.watch-info { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 24px; }
.watch-title { margin-bottom: 6px; color: var(--ink); font-size: 21px; font-weight: 800; letter-spacing: -0.4px; }
.watch-title a { color: inherit; }
.watch-title a:hover { color: var(--teal); }
.watch-resume { color: var(--ink-faint); font-size: 12.5px; }

/* ---------- App band and footer ---------- */

.app-band-wrap { margin-top: calc(var(--section-gap) + 12px); }
.app-band {
    display: grid; gap: 18px; padding: 22px; border: 1px solid rgba(20, 184, 166, 0.4); border-radius: 16px;
    background: linear-gradient(200deg, #14302D 0%, #0C1C1A 75%);
}
.app-band h2 { color: var(--ink); font-size: 21px; font-weight: 800; letter-spacing: -0.4px; }
.app-band-copy p { max-width: 560px; margin-top: 6px; font-size: 13.5px; line-height: 20px; }
.app-band-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.app-band-note { color: var(--ink-faint); font-size: 12.5px; }
@media (min-width: 700px) {
    .app-band { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 28px 32px; }
    .app-band-actions { flex-direction: column; align-items: flex-end; max-width: 240px; text-align: right; }
}

/* The install reminder: a card pinned above the phone's tab bar, or in the
   bottom corner on wider screens. It sits under the header's menus and the
   flash messages, and stays `hidden` until the script decides to show it. */
.install-reminder {
    position: fixed; z-index: 39; left: 12px; right: 12px;
    bottom: calc(var(--tab-bar-h) + env(safe-area-inset-bottom, 0px) + 12px);
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 16px;
    border: 1px solid rgba(20, 184, 166, 0.4); border-radius: 16px;
    background: linear-gradient(200deg, #14302D 0%, #0C1C1A 75%);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
    opacity: 0; transform: translateY(14px); transition: opacity 260ms ease, transform 260ms ease;
}
.install-reminder[hidden] { display: none; }
.install-reminder.is-visible { opacity: 1; transform: none; }
.install-reminder-icon { width: 52px; height: 52px; border: 1px solid var(--border-strong); border-radius: 13px; }
.install-reminder-copy { padding-right: 22px; color: var(--ink-muted); font-size: 13px; line-height: 19px; }
.install-reminder-title { margin-bottom: 4px; color: var(--ink); font-size: 16px; font-weight: 800; letter-spacing: -0.3px; line-height: 21px; }
.install-reminder-note { margin-top: 6px; color: var(--ink-faint); font-size: 12px; }
.install-reminder-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.install-reminder-actions .button { flex: 1 1 auto; }
.install-reminder-close {
    position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 32px; height: 32px;
    padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink-faint); cursor: pointer;
    transition: color 130ms ease, background-color 130ms ease;
}
.install-reminder-close:hover { background: rgba(231, 246, 244, 0.08); color: var(--ink); }
@media (min-width: 700px) {
    .install-reminder { left: auto; right: 24px; bottom: 24px; width: 380px; padding: 18px; }
}

/* The footer sits one step darker than the page, so it reads as the end of
   it. Brand on the left, three link groups, then a bar for the legal line. */
.site-footer { margin-top: 64px; border-top: 1px solid var(--border); background: var(--art-end); }

.footer-main { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; padding-block: 44px 40px; }
.footer-brand { grid-column: 1 / -1; max-width: 400px; }
.footer-brand .brand { gap: 10px; }
.footer-brand .brand-name { font-size: 21px; }
.footer-tagline { margin-top: 14px; color: var(--teal); font-size: 12px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.footer-about { margin-top: 10px; color: var(--ink-muted); font-size: 13.5px; line-height: 22px; }

.footer-group h2 { margin-bottom: 14px; color: var(--ink); font-size: 12px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.footer-group ul { display: flex; flex-direction: column; gap: 4px; }
.footer-group a { display: inline-block; padding: 5px 0; color: var(--ink-muted); font-size: 14px; font-weight: 500; transition: color 130ms ease; }
.footer-group a:hover, .footer-legal a:hover { color: var(--teal); }

.footer-bar { border-top: 1px solid var(--border); }
.footer-bar-inner { display: flex; flex-direction: column; gap: 10px; padding-block: 20px 24px; color: var(--ink-faint); font-size: 12.5px; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer-legal a { color: var(--ink-muted); font-weight: 600; transition: color 130ms ease; }

@media (min-width: 700px) {
    .footer-main { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 32px; padding-block: 56px 48px; }
    .footer-bar-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}
@media (min-width: 1024px) {
    .footer-main { grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr)); gap: 48px; padding-block: 64px 56px; }
    .footer-brand { grid-column: auto; }
}

/* ---------- Get the app: the published APK ---------- */

.apk-card {
    display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px; padding: 18px;
    border: 1px solid rgba(20, 184, 166, 0.4); border-radius: 18px;
    background: linear-gradient(200deg, #14302D 0%, #0C1C1A 75%);
}
.apk-card-icon { width: 64px; height: 64px; border: 1px solid var(--border-strong); border-radius: 16px; }
.apk-card-name { color: var(--ink); font-size: 19px; font-weight: 800; letter-spacing: -0.4px; }
.apk-card-meta { margin-top: 3px; color: var(--ink-muted); font-size: 13px; line-height: 19px; }
.apk-card-button { grid-column: 1 / -1; }
@media (min-width: 700px) {
    .apk-card { grid-template-columns: auto minmax(0, 1fr) auto; padding: 22px; }
    .apk-card-button { grid-column: auto; }
}
.apk-note {
    display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 12px 14px;
    border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface);
}
.apk-note .icon { flex: none; margin-top: 3px; color: var(--teal); }
.apk-release-notes { white-space: pre-line; }
#direct-download h2 { margin-top: 22px; }
.apk-steps { display: grid; gap: 10px; margin-bottom: 12px; padding-left: 22px; list-style: decimal; font-size: 14.5px; line-height: 23px; }
.apk-steps li::marker { color: var(--teal); font-weight: 800; }
.apk-checksum code { overflow-wrap: anywhere; }

/* ---------- Free-trial welcome ---------- */

/* Shown once after registering. Without the script it is an open dialog in
   the flow of the page; the script makes it modal over a dimmed page. */
.welcome-trial {
    position: relative; width: min(460px, calc(100vw - var(--gutter) * 2)); max-height: calc(100dvh - 32px);
    margin: 24px auto; padding: 28px 22px 22px; overflow-y: auto;
    border: 1px solid rgba(20, 184, 166, 0.45); border-radius: 20px;
    background: linear-gradient(200deg, #16352F 0%, #0E201E 55%, #0A1615 100%);
    color: var(--ink-muted); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}
.welcome-trial:modal { margin: auto; animation: welcome-trial-in 280ms ease both; }
.welcome-trial::backdrop { background: rgba(3, 9, 8, 0.72); backdrop-filter: blur(3px); }
@keyframes welcome-trial-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
.welcome-trial-close {
    position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 36px; height: 36px;
    padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink-faint); cursor: pointer;
}
.welcome-trial-close:hover { background: rgba(231, 246, 244, 0.08); color: var(--ink); }
.welcome-trial-mark {
    display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 16px;
    border-radius: 16px; background: var(--teal); color: var(--bg);
}
.welcome-trial-title { margin-top: 6px; color: var(--ink); font-size: 23px; font-weight: 800; letter-spacing: -0.6px; line-height: 29px; }
.welcome-trial-lead { margin-top: 10px; font-size: 14px; line-height: 22px; }
.welcome-trial-ends {
    display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 14px 16px;
    border: 1px solid var(--teal-line); border-radius: 14px; background: var(--teal-soft); color: var(--teal);
}
.welcome-trial-ends span { display: block; color: var(--ink-muted); font-size: 11px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.welcome-trial-ends strong { display: block; margin-top: 2px; color: var(--ink); font-size: 15px; font-weight: 800; }
.welcome-trial-list { display: grid; gap: 10px; margin-top: 18px; font-size: 13.5px; line-height: 20px; }
.welcome-trial-list li { display: flex; align-items: flex-start; gap: 10px; }
.welcome-trial-list .icon { flex: none; margin-top: 2px; }
.welcome-trial-list strong { color: var(--ink); }
.welcome-trial-list .is-included .icon { color: var(--green); }
.welcome-trial-list .is-excluded .icon { color: var(--orange); }
.welcome-trial-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.welcome-trial-actions .button { flex: 1 1 160px; }
@media (min-width: 700px) {
    .welcome-trial { padding: 34px 30px 28px; }
    .welcome-trial-title { font-size: 26px; line-height: 32px; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
    .button:active, .card:active, .genre-tile:active { transform: none; }
}
