/* CineMunara web app (polish, 2026-11-12; notes/web-app/polish/DESIGN.md) - the Shield's palette (ui/Design.kt) on a
   2026 streaming-app layout. Phone + iPad, portrait + landscape. Icons: icons.svg (Material Symbols Rounded).
   No inline styles anywhere (CSP style-src 'self'); dynamic widths are set through the CSSOM. */

/* ================================================================ tokens */
:root {
  --bg: #0B0B0F; --surface: #141419; --raise: #1E1E26; --raise2: #2A2A34; --line: rgba(255, 255, 255, .09);
  --text: #F2F2F5; --dim: #A6A6B0; --faint: #6E6E78; --amber: #F2A83B; --on-amber: #140E06;
  --green: #5BC88A; --blue: #6AA8FF; --red: #FF6B6B;
  --gutter: 16px; --r-card: 10px; --r-btn: 12px; --tab-h: 62px;
  --card-w: clamp(108px, 30vw, 156px); --wide-w: clamp(232px, 66vw, 340px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
@media (min-width: 700px) { :root { --gutter: 32px; --card-w: clamp(140px, 15vw, 184px); --wide-w: clamp(300px, 30vw, 380px); } }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
h2 { font-size: 19px; font-weight: 700; margin: 28px 0 12px; }
p { margin: 8px 0; color: var(--dim); }
.msg { color: var(--dim); font-size: 14px; }
.msg:empty { display: none; }
.pad { padding: 16px var(--gutter); }
.warn { color: var(--amber); font-weight: 600; font-size: 14px; }
.cine { font-weight: 300; }
.munara { font-weight: 750; }
.ic { width: 24px; height: 24px; fill: currentColor; flex: none; display: inline-block; }
.ic.big { width: 52px; height: 52px; }

/* ================================================================ buttons (44 px+ targets, pressed states) */
.btn {
  font: 600 15px/1 var(--font); color: var(--text); background: var(--raise); border: 1px solid transparent;
  border-radius: var(--r-btn); padding: 0 18px; min-height: 46px; display: inline-flex; align-items: center;
  justify-content: center; gap: 8px; cursor: pointer; white-space: nowrap; user-select: none;
  transition: transform .12s var(--ease), background .15s, opacity .15s;
}
.btn:active { transform: scale(.97); }
.btn .ic { width: 22px; height: 22px; }
.btn.primary { background: var(--text); color: #0B0B0F; }
.btn.primary:active { background: #d9d9de; }
.btn.ghost { background: rgba(255, 255, 255, .06); border-color: var(--line); }
.btn.glass { background: rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.btn.block { width: 100%; }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn.big { min-height: 54px; font-size: 17px; padding: 0 26px; }
.btn:disabled { opacity: .5; }
.btn.chipbtn { min-height: 38px; border-radius: 999px; background: rgba(255, 255, 255, .06); border-color: var(--line); font-weight: 600; }
.btn.chipbtn.on { background: var(--text); color: #0B0B0F; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* ================================================================ frame: header + tabs */
body.app { padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left); }
header.top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px;
  padding: calc(12px + env(safe-area-inset-top)) var(--gutter) 12px;
  background: linear-gradient(rgba(11, 11, 15, .92), rgba(11, 11, 15, .78)); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
body[data-view="home"] header.top, body[data-view="title"] header.top {
  position: fixed; left: 0; right: 0; background: linear-gradient(rgba(11, 11, 15, .75), transparent); -webkit-backdrop-filter: none; backdrop-filter: none;
  /* fixed = out of body's safe-area padding: clear the notch / Dynamic Island itself (iPhone on its side, v0.29) */
  padding-left: calc(var(--gutter) + env(safe-area-inset-left)); padding-right: calc(var(--gutter) + env(safe-area-inset-right));
}
body.scrolled[data-view="home"] header.top, body.scrolled[data-view="title"] header.top { background: var(--bg); box-shadow: 0 1px 0 var(--line); }   /* fully solid: nothing shows through (user 2026-11-13) */
header.top { transition: background .2s, box-shadow .2s; }
.brand { font-size: 22px; color: var(--text); text-shadow: 0 1px 12px rgba(0, 0, 0, .5); }
.brand::after { content: ""; display: block; height: 2px; width: 58%; margin: 2px auto 0; background: var(--amber); border-radius: 2px; }
.tabs { display: flex; gap: 4px; margin-left: auto; }
.tabs a { display: flex; align-items: center; gap: 8px; color: var(--dim); padding: 9px 14px; border-radius: 999px; font-weight: 600; font-size: 15px; transition: color .15s, background .15s; }
.tabs a .ic { width: 22px; height: 22px; }
.tabs a .ic.on, .tabs a.on .ic.off { display: none; }
.tabs a.on .ic.on { display: inline-block; }
.tabs a.on { color: var(--text); background: rgba(255, 255, 255, .1); }
main { padding: 0 var(--gutter) calc(48px + env(safe-area-inset-bottom)); max-width: 1500px; margin: 0 auto; }
body:not([data-view="home"]):not([data-view="title"]) main { padding-top: 4px; }
.view.enter { animation: viewIn .28s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 699px) {
  /* a backdrop-filter on the header would make it the fixed tab bar's containing block (bar drawn inside the header) */
  header.top { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--bg); }
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; margin: 0; gap: 0; justify-content: space-around;
    height: calc(var(--tab-h) + env(safe-area-inset-bottom));
    padding: 4px calc(4px + env(safe-area-inset-right)) env(safe-area-inset-bottom) calc(4px + env(safe-area-inset-left));
    background: var(--bg); border-top: 1px solid var(--line);   /* fully solid like the header (v0.29.1) */
  }
  .tabs a { flex: 1; flex-direction: column; gap: 3px; justify-content: center; font-size: 11px; font-weight: 600; padding: 4px 2px; border-radius: 0; background: none !important; }
  .tabs a .ic { width: 25px; height: 25px; }
  .tabs a.on { color: var(--text); }
  .tabs a.on .ic { color: var(--amber); }
  main { padding-bottom: calc(var(--tab-h) + 32px + env(safe-area-inset-bottom)); }
  .banner { bottom: calc(var(--tab-h) + 10px + env(safe-area-inset-bottom)) !important; }
}

/* ================================================================ skeletons (instead of "Loading...") */
.sk { background: linear-gradient(100deg, var(--surface) 30%, var(--raise) 50%, var(--surface) 70%); background-size: 300% 100%;
  animation: shimmer 1.3s linear infinite; border-radius: var(--r-card); }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.sk-poster { aspect-ratio: 2 / 3; }
.card.wide .sk-poster { aspect-ratio: 16 / 9; }
.sk-h { height: 20px; width: 180px; margin: 30px 0 14px; }
.sk-line { height: 14px; margin: 10px 0; width: 100%; border-radius: 6px; }
.sk-line.w40 { width: 40%; } .sk-line.w60 { width: 60%; } .sk-line.w80 { width: 80%; }
.card .sk-line { margin: 8px 0 0; height: 12px; }
.sk-hero { height: 52vh; border-radius: 0; }
.sk-btn { height: 48px; margin: 18px 0; border-radius: var(--r-btn); }
.sk-ep { height: 88px; margin: 10px 0; }
.sk-req { height: 92px; margin: 10px 0; }
.hero.sk { min-height: 64vh; background: linear-gradient(100deg, var(--surface) 30%, var(--raise) 50%, var(--surface) 70%); background-size: 300% 100%; animation: shimmer 1.3s linear infinite; }
img { opacity: 0; transition: opacity .3s; }
img.ok { opacity: 1; }

/* ================================================================ Home: hero */
.hero { position: relative; margin: 0 calc(-1 * var(--gutter)); min-height: 64vh; display: flex; align-items: flex-end; overflow: hidden;
  padding-top: calc(64px + env(safe-area-inset-top)); }   /* its text never starts under the header */
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 11, 15, .2) 0%, transparent 35%, rgba(11, 11, 15, .55) 62%, var(--bg) 100%); }
.hero-in { position: relative; z-index: 1; width: 100%; padding: 0 var(--gutter) 6px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-kicker { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin-bottom: 8px; }
.hero-logo { max-width: min(72%, 360px); max-height: 120px; object-fit: contain; filter: drop-shadow(0 4px 18px rgba(0, 0, 0, .6)); }
.hero-title { font-size: 34px; font-weight: 800; line-height: 1.05; text-shadow: 0 2px 18px rgba(0, 0, 0, .6); }
.hero-meta { color: var(--text); opacity: .85; font-size: 14px; margin-top: 10px; }
.hero-sum { display: none; }
.hero-row { display: flex; gap: 10px; margin-top: 16px; width: 100%; max-width: 420px; }
.hero-row .btn { flex: 1; }
@media (min-width: 700px) {
  .hero { min-height: 70vh; }
  .hero-in { align-items: flex-start; text-align: left; padding-bottom: 28px; max-width: 680px; margin-right: auto; }
  .hero-sum { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--text); opacity: .85; font-size: 16px; }
  .hero-row .btn { flex: 0 0 auto; min-width: 150px; }
  .hero-logo { max-height: 150px; max-width: 420px; object-position: left bottom; }
}

/* ================================================================ rows and cards */
.row { margin-top: 4px; }
.row h2 { margin: 26px 0 10px; }
.track { display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none;
  margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 6px; scroll-padding-left: var(--gutter); }
.track::-webkit-scrollbar { display: none; }
.track .card { flex: 0 0 var(--card-w); scroll-snap-align: start; }
.track.wide .card, .card.wide { flex-basis: var(--wide-w); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--card-w), 1fr)); gap: 18px 12px; }
@media (max-width: 699px) { main .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 10px; } }
.card { min-width: 0; transition: opacity .2s, transform .2s var(--ease); }
.card.leaving { opacity: 0; transform: scale(.92); }
.card .poster { position: relative; display: block; border-radius: var(--r-card); overflow: hidden; background: var(--surface); aspect-ratio: 2 / 3;
  transition: transform .14s var(--ease), filter .14s; }
.card.wide .poster { aspect-ratio: 16 / 9; }
.card .poster:active { transform: scale(.96); filter: brightness(.85); }
.card .poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge { position: absolute; left: 6px; top: 6px; font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 6px;
  background: rgba(11, 11, 15, .82); color: var(--text); }
.badge.warn { color: var(--on-amber); background: var(--amber); }
.bar { height: 4px; background: rgba(255, 255, 255, .22); border-radius: 2px; overflow: hidden; }
.card .bar { position: absolute; left: 8px; right: 8px; bottom: 8px; }
.bar i { display: block; height: 100%; background: var(--amber); border-radius: 2px; }
.playic { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(11, 11, 15, .55); border: 1.5px solid rgba(255, 255, 255, .85); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.playic .ic { width: 26px; height: 26px; }
.card .meta { display: flex; align-items: flex-start; gap: 2px; margin-top: 7px; }
.card .txt { flex: 1; min-width: 0; }
.card .t { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .s { font-size: 12.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card button.more { width: 36px; height: 36px; margin: -6px -8px 0 0; padding: 0; border: 0; background: none; color: var(--dim); border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; }
.card button.more:active { background: rgba(255, 255, 255, .1); }
.card button.more .ic { width: 20px; height: 20px; }

/* ================================================================ search */
form.search { position: sticky; top: calc(68px + env(safe-area-inset-top)); z-index: 5; display: flex; align-items: center; gap: 10px;
  margin: 10px 0 4px; padding: 0 8px 0 14px; height: 50px; border-radius: 14px; background: var(--raise); border: 1px solid var(--line); }
form.search > .ic { color: var(--dim); }
input[type=search] { flex: 1; min-width: 0; font: 17px var(--font); border: 0; background: none; color: var(--text); outline: none; -webkit-appearance: none; appearance: none; }
input[type=search]::-webkit-search-cancel-button { display: none; }
input[type=search]::placeholder { color: var(--faint); }
form.search .clear { width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: var(--text); display: grid; place-items: center; padding: 0; }
form.search .clear .ic { width: 18px; height: 18px; }
.empty { text-align: center; padding: 56px 20px; color: var(--dim); }
.empty .ic { color: var(--faint); }
.empty p:first-of-type { color: var(--text); font-size: 17px; font-weight: 600; margin-top: 14px; }

/* ================================================================ the title page */
#v-title { margin: 0 calc(-1 * var(--gutter)); }
.t-hero { position: relative; min-height: 46vh; display: flex; align-items: flex-end; }
.t-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.t-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 11, 15, .35) 0%, transparent 30%, rgba(11, 11, 15, .6) 70%, var(--bg) 100%); }
.t-head { position: relative; z-index: 1; display: flex; gap: 18px; align-items: flex-end; padding: 90px var(--gutter) 0; width: 100%; }
.t-poster { display: none; width: 150px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 12px; box-shadow: 0 10px 34px rgba(0, 0, 0, .65); flex: none; }
.t-info { min-width: 0; flex: 1; }
.t-info h1 { font-size: 30px; font-weight: 800; line-height: 1.08; text-shadow: 0 2px 16px rgba(0, 0, 0, .55); }
.t-logo { max-width: min(80%, 380px); max-height: 110px; object-fit: contain; object-position: left bottom; filter: drop-shadow(0 4px 16px rgba(0, 0, 0, .6)); }
.t-line { margin: 8px 0 0; font-size: 14px; color: var(--text); opacity: .82; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.chip { font-size: 11.5px; font-weight: 700; border: 1px solid rgba(255, 255, 255, .28); color: var(--text); padding: 2px 7px; border-radius: 5px; letter-spacing: .02em; }
.t-body { padding: 16px var(--gutter) 0; }
.t-buttons { display: flex; flex-direction: column; gap: 10px; }
.t-progress { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; font-size: 13px; color: var(--dim); }
.t-progress .bar { flex: 1; }
.summary { color: var(--text); opacity: .88; font-size: 15px; max-width: 72ch; margin: 16px 0 4px; cursor: pointer; }
.summary.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.acts { display: flex; gap: 6px; margin: 18px 0 4px; flex-wrap: wrap; }
.act { flex: 0 0 auto; width: 78px; display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0;
  color: var(--text); font: 600 12px/1.25 var(--font); text-align: center; padding: 4px 0; cursor: pointer; }
.act .ring { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08);
  border: 1px solid var(--line); transition: transform .12s var(--ease), background .15s; }
.act:active .ring { transform: scale(.92); background: rgba(255, 255, 255, .16); }
.act.on .ring { background: rgba(91, 200, 138, .16); border-color: rgba(91, 200, 138, .5); color: var(--green); }
.act .lbl { color: var(--dim); }
.note { font-size: 12.5px; color: var(--faint); margin: 4px 0 0; }
.note:empty { display: none; }
.navrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.season-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 8px; }
.season-tabs::-webkit-scrollbar { display: none; }
.episodes { display: grid; gap: 14px; margin-top: 10px; }
.episode { display: flex; gap: 12px; align-items: flex-start; }
.ep-art { position: relative; flex: none; width: 42%; max-width: 220px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--surface); }
.ep-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ep-art .playic { width: 38px; height: 38px; margin: -19px 0 0 -19px; }
.ep-art .bar { position: absolute; left: 6px; right: 6px; bottom: 6px; }
.ep-art:active { filter: brightness(.85); }
.ep-txt { min-width: 0; flex: 1; padding-top: 2px; }
.ep-txt .t { font-size: 15px; font-weight: 600; }
.ep-txt .s { font-size: 13px; color: var(--dim); margin-top: 2px; }
.ep-txt .d { font-size: 13px; color: var(--dim); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 700px) {
  .t-hero { min-height: 62vh; }
  .t-poster { display: block; }
  .t-info h1 { font-size: 40px; }
  .t-buttons { flex-direction: row; }
  .t-buttons .btn.block { width: auto; min-width: 190px; }
  .acts { gap: 14px; }
  .episodes { grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); gap: 18px 28px; }
  .ep-art { width: 200px; }
}

/* ================================================================ My Requests, Account */
h1.page { font-size: 30px; font-weight: 800; margin: 18px 0 6px; }
.req { display: flex; gap: 14px; align-items: center; background: var(--surface); border-radius: 14px; padding: 10px; margin: 10px 0;
  transition: transform .12s var(--ease), background .15s; }
.req:active { transform: scale(.985); background: var(--raise); }
.req img { width: 58px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; background: var(--raise); flex: none; }
.req-txt { flex: 1; min-width: 0; }
.req-txt .t { font-size: 15px; font-weight: 600; }
.req-txt .s { font-size: 13px; color: var(--dim); margin-top: 2px; }
.req-txt .bar { margin-top: 8px; }
.req .chev { color: var(--faint); }
.pills { display: flex; gap: 6px; margin-top: 6px; }
.pill { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--raise2); color: var(--text); }
.pill.attention { background: rgba(255, 107, 107, .16); color: var(--red); }
.pill.downloading { background: rgba(106, 168, 255, .16); color: var(--blue); }
.pill.waiting { background: rgba(242, 168, 59, .14); color: var(--amber); }
.pill.ready, .pill.new { background: rgba(91, 200, 138, .16); color: var(--green); }
.panel { background: var(--surface); border-radius: 16px; padding: 16px 18px; margin: 14px 0; max-width: 680px; }
.panel h3 { font-size: 16px; margin-bottom: 6px; }
.panel .btn { margin: 8px 0 2px; }
.who { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.who .ic { color: var(--amber); }
.who b { font-size: 17px; }

/* ================================================================ Libraries (v0.29) */
.libs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; }
@media (max-width: 699px) { .libs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.lib-tile { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: var(--surface);
  transition: transform .14s var(--ease), filter .14s; }
.lib-tile:active { transform: scale(.97); filter: brightness(.85); }
.lib-tile .lib-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lib-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(11, 11, 15, .92) 100%); }
.lib-txt { position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: 1; }
.lib-txt .t { font-size: 17px; font-weight: 750; line-height: 1.15; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.lib-txt .s { font-size: 12.5px; color: var(--dim); margin-top: 2px; }
.lib-head { display: flex; align-items: center; gap: 4px; margin-left: -8px; }
.lib-head .backlink { color: var(--text); flex: none; }
.lib-head h1.page { margin: 14px 0 0; }
.lib-head .msg { margin-bottom: 4px; }
/* v0.29.1: the chips wrap (all four on a 412 px phone, a long genre name too) - no row scrolling sideways */
.lib-bar { position: sticky; top: calc(68px + env(safe-area-inset-top)); z-index: 5; display: flex; flex-wrap: wrap; gap: 8px;
  margin: 6px calc(-1 * var(--gutter)) 12px; padding: 8px var(--gutter); background: var(--bg); }
.lib-bar .btn { flex: none; gap: 6px; padding: 0 14px; max-width: 100%; }
.lib-bar .btn span { overflow: hidden; text-overflow: ellipsis; }
.card .poster picture, .lib-tile picture { display: contents; }   /* the <img> inside sizes as before */
.lib-bar .btn .ic { width: 20px; height: 20px; }
.lib-more { height: 1px; }

/* Account: My Requests link, signed-in devices (v0.29) */
.panel.linkpanel { display: flex; align-items: center; gap: 14px; color: var(--text); }
.linkpanel > .ic:first-child { color: var(--amber); }
.linkpanel > span { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.linkpanel .chev { color: var(--faint); }
.linkpanel:active { background: var(--raise); }
.device { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.device:first-child { border-top: 0; }
.device > .ic { color: var(--dim); }
.device-txt { flex: 1; min-width: 0; }
.device-txt .t { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.device-txt .s { font-size: 13px; color: var(--dim); margin-top: 2px; }
.device .btn { margin: 0; }
#signoutothers { margin-top: 10px; }

/* ================================================================ sign in */
.hero-signin { max-width: 440px; margin: 16vh auto 0; text-align: center; }
.hero-signin h1 { font-size: 44px; }
.hero-signin h1::after { content: ""; display: block; height: 3px; width: 34%; margin: 8px auto 0; background: var(--amber); border-radius: 2px; }
.hero-signin p { margin: 20px 0; }
.hero-signin .btn { background: var(--amber); color: var(--on-amber); }

/* ================================================================ app overlays: toast, sheet, banner */
.toast { position: fixed; left: 50%; top: calc(16px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 90;
  background: rgba(36, 36, 44, .97); color: var(--text); padding: 11px 18px; border-radius: 14px; font-size: 15px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5); max-width: 90vw; }
.toast.in { animation: toastIn .3s var(--ease); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.sheet-bg { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0); display: flex; align-items: flex-end; justify-content: center; transition: background .2s; }
.sheet-bg.in { background: rgba(0, 0, 0, .58); }
.sheet { width: 100%; max-width: 520px; background: var(--raise); border-radius: 22px 22px 0 0; padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
  max-height: 84vh; overflow-y: auto; transform: translateY(100%); transition: transform .26s var(--ease); }
.sheet-bg.in .sheet { transform: none; }
.sheet .grab { width: 38px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .25); margin: 4px auto 12px; }
.sheet h3 { font-size: 18px; }
.sheet p { margin: 4px 0 0; }
.sheet-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.sheet-actions .btn { width: 100%; justify-content: flex-start; padding-left: 16px; }
.sheet-actions .btn.primary { justify-content: center; }
.sheet-actions .btn.ghost:last-child { justify-content: center; margin-top: 4px; }
@media (min-width: 700px) {
  .sheet-bg { align-items: center; }
  .sheet { border-radius: 22px; transform: scale(.96); opacity: 0; transition: transform .2s var(--ease), opacity .2s; }
  .sheet-bg.in .sheet { transform: none; opacity: 1; }
  .sheet .grab { display: none; }
}
.banner { position: fixed; left: calc(12px + env(safe-area-inset-left)); right: calc(12px + env(safe-area-inset-right)); bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30; display: flex; gap: 10px;
  align-items: center; background: var(--raise); border: 1px solid var(--line); border-radius: 16px; padding: 8px 8px 8px 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.banner span { flex: 1; font-size: 14px; }
.banner > .ic { color: var(--amber); }

/* ================================================================ the player */
body.player-open { overflow: hidden; }
.player { position: fixed; inset: 0; z-index: 100; background: #000; color: #fff; overflow: hidden; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.p-tap { position: absolute; inset: 0; z-index: 1; touch-action: none; }
.player.fill video { object-fit: cover; }   /* zoom to fill (pinch / Settings) */
.player .ic { width: 28px; height: 28px; }
.p-ui .ic, .p-ripple .ic { filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .55)); }
.player.scrubbing .p-center { opacity: 0; transition: opacity .15s; }
.p-btn { width: 48px; height: 48px; border: 0; border-radius: 50%; background: none; color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0;
  transition: background .15s, transform .12s var(--ease); }
.p-btn:active { background: rgba(255, 255, 255, .16); transform: scale(.92); }
.p-btn .ic.on, .player.fs #pfs .ic.off { display: none; }
.player.fs #pfs .ic.on { display: inline-block; }

/* controls layer: fades; only its buttons take taps (taps elsewhere reach the picture) */
.p-ui { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .25s var(--ease); }
.player.ui .p-ui { opacity: 1; }
.player.ui .p-ui button, .player.ui .p-ui a, .player.ui .p-scrub { pointer-events: auto; }
.p-shade { position: absolute; left: 0; right: 0; pointer-events: none; }
.p-shade.top { top: 0; height: 150px; background: linear-gradient(rgba(0, 0, 0, .75), transparent); }
.p-shade.bottom { bottom: 0; height: 210px; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); }
.p-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 6px;
  padding: calc(8px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 0 calc(8px + env(safe-area-inset-left)); }
.p-titles { flex: 1; min-width: 0; text-align: center; padding: 0 8px; }
.p-title { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-sub { font-size: 13px; color: rgba(255, 255, 255, .75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: clamp(28px, 9vw, 84px); }
.p-btn.mid { width: 60px; height: 60px; }
.p-btn.mid .ic { width: 38px; height: 38px; }
.p-pp { position: relative; width: 84px; height: 84px; border-radius: 50%; border: 0; color: #fff; background: rgba(20, 20, 24, .45);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); display: grid; place-items: center; cursor: pointer; padding: 0;
  transition: transform .12s var(--ease), background .2s; }
.p-pp:active { transform: scale(.9); }
.p-pp .ic { position: absolute; width: 50px; height: 50px; transition: transform .28s var(--ease), opacity .2s; }
.p-pp .ic.pause { opacity: 0; transform: scale(.4) rotate(-90deg); }
.player.is-playing .p-pp .ic.play { opacity: 0; transform: scale(.4) rotate(90deg); }
.player.is-playing .p-pp .ic.pause { opacity: 1; transform: none; }
.p-pp::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .9); opacity: 0; pointer-events: none; }
.p-pp.pulse::after { animation: ppRing .5s var(--ease); }
@keyframes ppRing { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.45); } }

.p-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 calc(16px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left)); }
.p-scrubrow { display: flex; align-items: center; gap: 12px; }
.p-time { font: 600 13px/1 var(--font); font-variant-numeric: tabular-nums; min-width: 44px; text-align: center; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.p-scrub { position: relative; flex: 1; height: 36px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.p-track { position: relative; width: 100%; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .25); transition: height .15s; }
.player.scrubbing .p-track { height: 6px; }
.p-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; }
.p-track .buf { background: rgba(255, 255, 255, .45); }
.p-track .played { background: var(--amber); }
.p-track .knob { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--amber);
  box-shadow: 0 0 0 4px rgba(242, 168, 59, .25); transition: transform .15s; }
.player.scrubbing .p-track .knob { transform: scale(1.35); }
.p-preview { position: absolute; bottom: 30px; width: 160px; margin-left: -80px; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.p-preview img { width: 160px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; border: 2px solid #fff; background: #111; opacity: 1; box-shadow: 0 6px 20px rgba(0, 0, 0, .6); }
.p-preview span { font: 700 14px/1 var(--font); font-variant-numeric: tabular-nums; background: rgba(0, 0, 0, .7); padding: 5px 9px; border-radius: 6px; }
.p-actions { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; }
.p-act { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 0; background: none; color: #fff;
  font: 600 14px/1 var(--font); cursor: pointer; transition: background .15s; }
.p-act:active { background: rgba(255, 255, 255, .14); }
.p-act .ic { width: 24px; height: 24px; }
@media (max-width: 520px) { .p-act span { display: none; } .p-act { padding: 0 12px; } }

/* double-tap ripples, the play/pause flash, the spinner */
.p-ripple { position: absolute; top: 0; bottom: 0; width: 40%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  opacity: 0; pointer-events: none; font: 700 15px/1 var(--font); }
.p-ripple.left { left: 0; border-radius: 0 50% 50% 0 / 0 50% 50% 0; background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, .22), rgba(255, 255, 255, .07) 60%, transparent 75%); }
.p-ripple.right { right: 0; border-radius: 50% 0 0 50% / 50% 0 0 50%; background: radial-gradient(circle at 70% 50%, rgba(255, 255, 255, .22), rgba(255, 255, 255, .07) 60%, transparent 75%); }
.p-ripple .ic { width: 40px; height: 40px; }
.p-ripple.go { animation: ripple .7s var(--ease); }
@keyframes ripple { 0% { opacity: 0; } 15% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }
.p-flash { position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; margin: -46px 0 0 -46px; z-index: 2; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; }
.p-flash .ic { width: 52px; height: 52px; }
.p-flash.go { animation: flash .6s var(--ease); }
@keyframes flash { 0% { opacity: 0; transform: scale(.6); } 25% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.25); } }
.p-spin { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; z-index: 2; pointer-events: none; }
.p-spin i { display: block; width: 100%; height: 100%; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .18); border-top-color: var(--amber); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.player.ui .p-spin { visibility: hidden; }

/* Skip Intro / Skip Credits, Up Next */
.p-pill { position: absolute; z-index: 4; right: calc(20px + env(safe-area-inset-right)); bottom: calc(28px + env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px 0 22px; border-radius: 12px; border: 1.5px solid rgba(255, 255, 255, .9);
  background: rgba(20, 20, 24, .7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff; font: 700 16px/1 var(--font); cursor: pointer;
  transition: bottom .25s var(--ease), transform .12s var(--ease), background .15s; animation: pillIn .35s var(--ease); }
.p-pill:active { transform: scale(.95); background: #fff; color: #000; }
.player.ui .p-pill { bottom: calc(118px + env(safe-area-inset-bottom)); }
@keyframes pillIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.p-card { position: absolute; z-index: 4; right: calc(20px + env(safe-area-inset-right)); bottom: calc(24px + env(safe-area-inset-bottom));
  display: flex; gap: 14px; align-items: stretch; width: min(460px, calc(100vw - 40px)); padding: 12px; border-radius: 16px;
  background: rgba(20, 20, 24, .88); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 12px 40px rgba(0, 0, 0, .6);
  animation: pillIn .35s var(--ease); transition: bottom .25s var(--ease); }
.player.ui .p-card { bottom: calc(118px + env(safe-area-inset-bottom)); }
.p-card .art { position: relative; flex: none; width: 168px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #111; align-self: center; }
.p-card .art img { width: 100%; height: 100%; object-fit: cover; opacity: 1; }
.p-card .fill { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--amber); transform-origin: left; transform: scaleX(0); transition: transform .25s linear; }
.p-card .txt { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.p-card .kicker { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--amber); }
.p-card .name { font-size: 15px; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-card .left { font-size: 13px; color: rgba(255, 255, 255, .7); }
.p-card .row { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; }
.p-card .btn .ic { width: 20px; height: 20px; }
@media (max-width: 520px) { .p-card .art { width: 120px; } }

/* sheets inside the player (Audio & Subtitles, Settings) */
.p-sheet { position: absolute; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .62); animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.p-sheet-in { width: min(760px, calc(100vw - 32px)); max-height: calc(100% - 32px); display: flex; flex-direction: column; background: rgba(24, 24, 30, .97);
  border-radius: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .7); overflow: hidden; animation: sheetUp .26s var(--ease); }
@keyframes sheetUp { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
.p-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 4px 22px; }
.p-sheet-head h3 { font-size: 19px; }
.p-sheet-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 28px; padding: 4px 16px 18px; overflow-y: auto; }
.p-col h4 { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .55); margin: 12px 8px 6px; }
.p-choice { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 0 10px; border: 0; border-radius: 10px; background: none;
  color: rgba(255, 255, 255, .78); font: 500 16px/1.2 var(--font); text-align: left; cursor: pointer; }
.p-choice:active { background: rgba(255, 255, 255, .1); }
.p-choice .tick { width: 22px; height: 22px; visibility: hidden; color: var(--amber); }
.p-choice .lbl { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; }
.p-choice small { font-size: 13px; font-weight: 400; color: rgba(255, 255, 255, .55); }
.p-choice.on { color: #fff; font-weight: 700; }
.p-choice.on .tick { visibility: visible; }

/* the resume prompt, errors, still watching */
.p-over { position: absolute; inset: 0; z-index: 7; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .78); animation: fadeIn .2s; }
.p-over.start { background: #000; }
.p-over.start > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.p-over.start::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .85), rgba(0, 0, 0, .25)); }
.p-over-in { position: relative; z-index: 1; width: min(560px, calc(100vw - 48px)); }
.p-over-in.center { text-align: center; }
.p-over-in.center .p-over-row { justify-content: center; }
.p-over-title { font-size: 28px; font-weight: 800; line-height: 1.15; }
.p-over-sub { font-size: 15px; color: rgba(255, 255, 255, .75); margin-top: 6px; }
.p-over-sub:empty { display: none; }
.p-progress { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .25); margin: 18px 0 4px; max-width: 320px; overflow: hidden; }
.p-progress i { display: block; height: 100%; background: var(--amber); }
.p-over-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.p-over-row .btn.ghost { background: rgba(255, 255, 255, .12); }
.p-btn.corner { position: absolute; z-index: 2; top: calc(10px + env(safe-area-inset-top)); left: calc(10px + env(safe-area-inset-left)); }
.p-err-ic { color: var(--amber); }
.p-err-ic .ic { width: 56px; height: 56px; }
.player .toast { position: absolute; }

/* phones on their side (short landscape): a compact hero, nothing under the header (user 2026-11-13) */
@media (orientation: landscape) and (max-height: 520px) {
  .hero { min-height: 92vh; }
  .hero-logo { max-height: 72px; }
  .hero-title { font-size: 28px; }
  .hero-sum { -webkit-line-clamp: 2; font-size: 14px; }
  .hero-row { margin-top: 10px; }
  .t-hero { min-height: 80vh; }
  .t-logo { max-height: 72px; }
  /* v0.29: the four top tabs fit between the logo and the notch / Dynamic Island (iPhone on its side) */
  .tabs { gap: 0; }
  .tabs a { padding: 8px 10px; gap: 6px; font-size: 14px; }
}

/* full screen ended on its own (Android's Back): black at once, then closed - the in-between player never shows */
.player.leaving::after { content: ""; position: absolute; inset: 0; z-index: 50; background: #000; }
