/* Cummings Cinema Plus — palette from the Cummings brand board */
:root {
  --reserve: #3D2A46;
  --midnight: #211B26;
  --ivory: #F5F2EE;
  --stone: #C6BFB7;
  --brass: #A6844F;
  --brass-hi: #C9A86A;

  --bg: #1B161F;
  --surface: #261F2C;
  --surface-2: #30263A;
  --line: rgba(198, 191, 183, .14);
  --text: var(--ivory);
  --muted: rgba(198, 191, 183, .78);
  --faint: rgba(198, 191, 183, .5);

  --display: "Cinzel", "Trajan Pro", "Optima", "Didot", serif;
  --serif: "Cormorant Garamond", "Cormorant", "Hoefler Text", "Garamond", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Avenir Next", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius: 6px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --pad: clamp(18px, 4.2vw, 56px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; min-height: 100vh; overscroll-behavior-y: none; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
svg { width: 22px; height: 22px; display: block; }
.hidden { display: none !important; }
h1, h2, h3 { margin: 0; font-weight: 400; }

/* type helpers */
.display { font-family: var(--display); font-weight: 400; letter-spacing: .08em; text-transform: uppercase; }
.label { font: 600 11px/1.3 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--brass-hi); }
.serif { font-family: var(--serif); }
.rule { width: 44px; height: 1px; background: var(--brass); border: 0; margin: 18px 0; }

/* ---------- top bar ---------- */
#topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 30; display: flex; align-items: center; gap: 36px;
  padding: calc(var(--safe-top) + 14px) var(--pad) 14px;
  background: linear-gradient(to bottom, rgba(27,22,31,.95), rgba(27,22,31,0));
  transition: background .3s;
}
#topbar.solid { background: rgba(27,22,31,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--brass); }
.brand-mark { width: 34px; height: 34px; }
.brand-word { display: flex; flex-direction: column; line-height: 1; }
.bw-1 { font-family: var(--display); font-size: 17px; letter-spacing: .22em; text-transform: uppercase; color: var(--ivory); }
.bw-2 { font: 600 8.5px/1 var(--sans); letter-spacing: .42em; text-transform: uppercase; color: var(--brass-hi); margin-top: 5px; }
.tabs { display: flex; gap: 28px; }
.tabs a { font: 600 11.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); padding: 8px 0; border-bottom: 1px solid transparent; }
.tabs a:hover { color: var(--ivory); }
.tabs a.active { color: var(--ivory); border-bottom-color: var(--brass); }
.actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--ivory); }
.icon-btn:hover { background: rgba(245,242,238,.08); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); font-size: 15px; color: var(--midnight); box-shadow: 0 0 0 1px rgba(245,242,238,.25);
}

#bottombar { display: none; }
@media (max-width: 760px) {
  .tabs, .actions .desk { display: none; }
  .brand-mark { width: 30px; height: 30px; }
  .bw-1 { font-size: 15px; }
  #bottombar {
    display: flex; position: fixed; inset: auto 0 0 0; z-index: 30;
    background: rgba(27,22,31,.95); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid var(--line); padding: 7px 0 calc(var(--safe-bottom) + 4px);
  }
  #bottombar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font: 600 9.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 3px 0; }
  #bottombar a.active { color: var(--brass-hi); }
  #bottombar svg { width: 23px; height: 23px; }
  #view { padding-bottom: calc(var(--safe-bottom) + 76px); }
}

/* ---------- layout ---------- */
#view { min-height: 100vh; padding-bottom: 48px; }
.page { padding: calc(var(--safe-top) + 92px) var(--pad) 24px; }
.page-head { margin-bottom: 22px; }
.page-head h1 { font-family: var(--display); font-size: clamp(26px, 4vw, 40px); letter-spacing: .1em; text-transform: uppercase; }
.page-head .label { margin-bottom: 10px; display: block; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: min(80vh, 720px); display: flex; align-items: flex-end;
  padding: calc(var(--safe-top) + 90px) var(--pad) clamp(28px, 5vw, 64px); background: var(--surface) center 20%/cover no-repeat;
}
.hero.no-art { min-height: min(56vh, 480px); background-image: radial-gradient(ellipse at 70% 20%, #4A3355, var(--bg) 70%); }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 1%, rgba(27,22,31,.6) 36%, rgba(27,22,31,.08) 68%, rgba(27,22,31,.5)),
              linear-gradient(to right, rgba(27,22,31,.85), rgba(27,22,31,0) 62%);
}
.hero-inner { position: relative; max-width: 600px; }
.hero h1 { font-family: var(--display); font-size: clamp(30px, 5.6vw, 64px); line-height: 1.04; letter-spacing: .06em; text-transform: uppercase; margin: 12px 0 0; text-wrap: balance; }
.tagline { font-family: var(--serif); font-style: italic; font-size: clamp(18px, 2vw, 22px); color: var(--stone); margin: 10px 0 0; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 14px 0 0; color: var(--muted); font-size: 13.5px; }
.meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.badge { font: 600 10.5px/1 var(--sans); letter-spacing: .1em; padding: 4px 6px 3px; border: 1px solid rgba(198,191,183,.45); border-radius: 3px; color: var(--stone); }
.badge.gold { border-color: var(--brass); color: var(--brass-hi); }
.overview { font-family: var(--serif); font-size: clamp(17px, 1.7vw, 19.5px); line-height: 1.5; color: #E4DED6; max-width: 62ch; margin: 16px 0 0; }
.hero .overview { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 46px; padding: 0 24px;
  border-radius: 3px; font: 600 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  color: var(--ivory); border: 1px solid rgba(245,242,238,.35); background: rgba(27,22,31,.25); white-space: nowrap;
}
.btn:hover { border-color: var(--ivory); }
.btn.primary { background: var(--brass); border-color: var(--brass); color: var(--midnight); }
.btn.primary:hover { background: var(--brass-hi); border-color: var(--brass-hi); }
.btn svg { width: 16px; height: 16px; }
.btn.small { height: 36px; padding: 0 14px; font-size: 10.5px; }

/* ---------- rows & cards ---------- */
.rows { position: relative; margin-top: -6px; }
.row { margin-top: 34px; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 0 var(--pad); margin-bottom: 14px; }
.row-head h2 { font-family: var(--display); font-size: clamp(15px, 1.6vw, 18px); letter-spacing: .14em; text-transform: uppercase; }
.row-head a { font: 600 10.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--brass-hi); white-space: nowrap; }
.scroller { display: flex; gap: 14px; overflow-x: auto; padding: 4px var(--pad) 12px; scroll-snap-type: x proximity; scroll-padding: 0 var(--pad); scrollbar-width: none; }
.scroller::-webkit-scrollbar { display: none; }
.scroller > * { scroll-snap-align: start; flex: none; }

.poster-card { width: clamp(118px, 14.5vw, 186px); display: block; }
.poster { position: relative; aspect-ratio: 2/3; border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset; transition: transform .25s ease, box-shadow .25s; }
.poster img, .wide img, .face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.face { position: relative; }
a:hover .poster, a:hover .wide { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--brass) inset, 0 14px 30px rgba(0,0,0,.4); }
.card-title { margin-top: 9px; font-size: 13.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: 6px; align-items: center; }
.qtag { position: absolute; left: 7px; top: 7px; font: 700 9.5px/1 var(--sans); letter-spacing: .08em; padding: 3px 5px; border-radius: 2px; background: rgba(27,22,31,.78); color: var(--brass-hi); backdrop-filter: blur(4px); }
.placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 14px; background: linear-gradient(160deg, var(--reserve), var(--midnight)); color: var(--ivory);
}
.placeholder svg { width: 34%; height: auto; aspect-ratio: 1; color: var(--brass); opacity: .9; margin-bottom: 10px; }
.placeholder span { font-family: var(--display); font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; line-height: 1.3; }
.wide-card { width: clamp(236px, 27vw, 340px); display: block; }
.wide { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: var(--surface); transition: transform .25s, box-shadow .25s; box-shadow: 0 0 0 1px var(--line) inset; }
.wide .placeholder svg { width: 18%; }
.play-badge { position: absolute; left: 10px; bottom: 14px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(245,242,238,.7); background: rgba(27,22,31,.5); backdrop-filter: blur(4px); }
.play-badge svg { width: 13px; height: 13px; margin-left: 2px; }
.bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(245,242,238,.18); }
.bar > i { display: block; height: 100%; background: var(--brass); }
.check { position: absolute; top: 7px; right: 7px; width: 22px; height: 22px; border-radius: 50%; background: var(--brass); color: var(--midnight); display: grid; place-items: center; }
.check svg { width: 13px; height: 13px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(104px, 27vw, 172px), 1fr)); gap: 26px 14px; }
.grid .poster-card { width: auto; }

/* ---------- browse: search + filters ---------- */
.browse-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search-field { flex: 1 1 280px; position: relative; }
.search-field svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 19px; height: 19px; }
.search-field input {
  width: 100%; height: 46px; border-radius: 3px; border: 1px solid var(--line); background: var(--surface);
  padding: 0 14px 0 42px; font-size: 16px; outline: none; color: var(--ivory);
}
.search-field input:focus { border-color: var(--brass); }
.search-field input::placeholder { color: var(--faint); }
.select {
  height: 46px; border-radius: 3px; border: 1px solid var(--line); background: var(--surface); padding: 0 34px 0 14px;
  appearance: none; -webkit-appearance: none; font: 600 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--stone);
  background-image: linear-gradient(45deg, transparent 50%, var(--stone) 50%), linear-gradient(135deg, var(--stone) 50%, transparent 50%);
  background-position: calc(100% - 17px) 20px, calc(100% - 12px) 20px; background-size: 5px 5px; background-repeat: no-repeat;
}
.filter-btn { height: 46px; padding: 0 16px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); display: inline-flex; align-items: center; gap: 8px; font: 600 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--stone); }
.filter-btn svg { width: 18px; height: 18px; }
.filter-btn .count { background: var(--brass); color: var(--midnight); border-radius: 9px; min-width: 18px; height: 18px; display: inline-grid; place-items: center; font-size: 10.5px; letter-spacing: 0; padding: 0 5px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  height: 32px; padding: 0 13px; border-radius: 16px; border: 1px solid var(--line); background: transparent; color: var(--stone);
  font-size: 13px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.chip:hover { border-color: rgba(198,191,183,.45); }
.chip.on { background: var(--ivory); border-color: var(--ivory); color: var(--midnight); }
.chip .n { color: var(--faint); font-size: 11.5px; }
.chip.on .n { color: rgba(33,27,38,.55); }
.chip.active-filter { border-color: var(--brass); color: var(--brass-hi); }
.chip.active-filter svg { width: 13px; height: 13px; }
.quick { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 22px; }
.quick::-webkit-scrollbar { display: none; }
.result-count { color: var(--faint); font: 600 10.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; margin: 4px 0 18px; }

/* sheet (filters, fix match) */
.sheet-wrap { position: fixed; inset: 0; z-index: 70; background: rgba(10,8,12,.6); backdrop-filter: blur(3px); display: flex; justify-content: flex-end; }
.sheet {
  width: min(440px, 100%); height: 100%; background: var(--midnight); border-left: 1px solid var(--line);
  display: flex; flex-direction: column; animation: slideIn .25s ease;
}
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: calc(var(--safe-top) + 18px) 22px 16px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-family: var(--display); font-size: 18px; letter-spacing: .14em; text-transform: uppercase; }
.sheet-body { flex: 1; overflow-y: auto; padding: 8px 22px 30px; }
.sheet-foot { display: flex; gap: 10px; padding: 14px 22px calc(var(--safe-bottom) + 14px); border-top: 1px solid var(--line); }
.sheet-foot .btn { flex: 1; }
.f-section { padding: 18px 0 6px; border-bottom: 1px solid var(--line); }
.f-section:last-child { border-bottom: 0; }
.f-section .label { display: block; margin-bottom: 12px; }
.f-more { margin-top: 10px; font: 600 10.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--brass-hi); }
@media (max-width: 760px) {
  .sheet-wrap { align-items: flex-end; }
  .sheet { height: 88vh; width: 100%; border-left: 0; border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; animation: slideUp .28s ease; }
  .sheet-head { padding-top: 18px; }
  @keyframes slideUp { from { transform: translateY(40px); opacity: 0; } }
}

/* ---------- detail ---------- */
.detail-hero { position: relative; min-height: min(70vh, 640px); background: var(--surface) center 20%/cover no-repeat; display: flex; align-items: flex-end; padding: calc(var(--safe-top) + 90px) var(--pad) 30px; }
.detail-hero.no-art { min-height: min(50vh, 440px); background-image: radial-gradient(ellipse at 75% 15%, #4A3355, var(--bg) 70%); }
.detail-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 3%, rgba(27,22,31,.7) 40%, rgba(27,22,31,.2) 75%, rgba(27,22,31,.5)), linear-gradient(to right, rgba(27,22,31,.75), rgba(27,22,31,0) 65%); }
.detail-inner { position: relative; display: flex; gap: 34px; align-items: flex-end; width: 100%; }
.detail-poster { width: clamp(120px, 17vw, 230px); flex: none; }
.detail-poster .poster { box-shadow: 0 20px 50px rgba(0,0,0,.5), 0 0 0 1px var(--line) inset; }
.detail-text { flex: 1; min-width: 0; }
.detail-text h1 { font-family: var(--display); font-size: clamp(28px, 4.8vw, 56px); line-height: 1.06; letter-spacing: .06em; text-transform: uppercase; margin-top: 10px; text-wrap: balance; }
.detail-body { padding: 0 var(--pad); display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; }
.detail-body .overview { margin-top: 0; }
.facts { display: grid; gap: 18px; align-content: start; }
.fact .label { display: block; margin-bottom: 6px; }
.fact .v { color: var(--stone); font-size: 14px; line-height: 1.6; }
.fact a { color: var(--ivory); border-bottom: 1px solid rgba(166,132,79,.5); }
.fact a:hover { border-color: var(--brass-hi); }
.tech { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--faint); font-size: 12.5px; }
.link-btn { font: 600 10.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--brass-hi); padding: 8px 0; }
.section { margin-top: 38px; }
.section > .label { display: block; padding: 0 var(--pad); margin-bottom: 14px; }
.people-row .person { width: 104px; text-align: center; display: block; }
.face { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; margin: 0 auto 9px; background: linear-gradient(160deg, var(--reserve), var(--midnight)); box-shadow: 0 0 0 1px var(--line); display: grid; place-items: center; font-family: var(--display); font-size: 26px; color: var(--brass); transition: box-shadow .2s; }
a:hover .face { box-shadow: 0 0 0 2px var(--brass); }
.person .nm { font-size: 13px; font-weight: 550; line-height: 1.3; }
.person .ch { font-size: 12px; color: var(--faint); line-height: 1.3; margin-top: 2px; }
@media (max-width: 900px) { .detail-body { grid-template-columns: 1fr; gap: 26px; } }
@media (max-width: 760px) {
  .detail-inner { flex-direction: column; align-items: flex-start; gap: 0; }
  .detail-poster { display: none; }
  .btns .btn { flex: 1 1 auto; }
}

.seasons { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 20px; scrollbar-width: none; }
.episodes { display: flex; flex-direction: column; gap: 2px; }
.episode { display: flex; gap: 18px; padding: 12px; margin: 0 -12px; border-radius: 8px; align-items: center; }
.episode:hover { background: var(--surface); }
.episode .wide { width: clamp(136px, 22vw, 240px); flex: none; }
.ep-text { min-width: 0; flex: 1; }
.ep-title { font-weight: 600; margin-bottom: 4px; }
.ep-num { color: var(--brass-hi); font-family: var(--display); margin-right: 8px; }
.ep-overview { color: var(--muted); font-family: var(--serif); font-size: 16px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep-dur { color: var(--faint); font-size: 12px; margin-top: 5px; }

/* person page */
.person-head { display: flex; gap: 26px; align-items: center; margin-bottom: 30px; }
.person-head .face { width: 120px; height: 120px; margin: 0; font-size: 36px; }

/* search results */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 20px 12px; margin-bottom: 30px; }
.people-grid .person { width: auto; text-align: center; }
.section-title { font-family: var(--display); font-size: 16px; letter-spacing: .14em; text-transform: uppercase; margin: 6px 0 16px; }

/* settings / devices */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.info-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 22px; }
.info-card h3 { font-family: var(--display); font-size: 15px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 10px; color: var(--ivory); }
.info-card p, .info-card li { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 0 0 8px; }
.info-card ol { padding-left: 18px; margin: 0; }
.info-card code, .addr { font: 600 14px/1.3 ui-monospace, Menlo, monospace; color: var(--brass-hi); word-break: break-all; }
.stat { display: flex; gap: 22px; margin: 4px 0 12px; }
.stat b { display: block; font-family: var(--display); font-size: 28px; font-weight: 400; color: var(--ivory); }
.stat span { font: 600 10px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--faint); }

/* match results */
.match-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.match { display: flex; gap: 14px; align-items: center; text-align: left; padding: 10px; border-radius: 6px; border: 1px solid var(--line); width: 100%; }
.match:hover { border-color: var(--brass); }
.match .poster { width: 52px; flex: none; }
.match .t { font-weight: 600; }
.match .o { color: var(--faint); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* empty / loading */
.empty { max-width: 560px; margin: 0 auto; padding: calc(var(--safe-top) + 130px) var(--pad) 40px; text-align: center; }
.empty svg.mono { width: 64px; height: 64px; color: var(--brass); margin: 0 auto 18px; }
.empty h1 { font-family: var(--display); font-size: 24px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 12px; }
.empty p { color: var(--muted); font-family: var(--serif); font-size: 18px; }
.empty code { font: 13px ui-monospace, Menlo, monospace; background: var(--surface); padding: 2px 6px; border-radius: 4px; color: var(--brass-hi); }
.loading { display: grid; place-items: center; min-height: 70vh; }
.loading svg { width: 54px; height: 54px; color: var(--brass); animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .35; transform: scale(.94); } }

/* ---------- welcome / profiles ---------- */
.welcome {
  position: fixed; inset: 0; z-index: 60; overflow-y: auto;
  background: radial-gradient(ellipse at 50% 0%, #4A3355 0%, var(--reserve) 30%, var(--midnight) 85%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: calc(var(--safe-top) + 40px) 24px 40px; text-align: center;
}
.welcome::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .06; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
.welcome > * { position: relative; z-index: 1; }
.w-mark { width: 74px; height: 74px; color: var(--brass); }
.w-word { font-family: var(--display); font-size: clamp(30px, 6vw, 46px); letter-spacing: .26em; margin: 22px 0 0 .26em; text-transform: uppercase; color: var(--brass-hi); }
.w-sub { font: 500 12px/1 var(--sans); letter-spacing: .58em; margin: 12px 0 0 .58em; text-transform: uppercase; color: var(--ivory); }
.welcome .rule { margin: 26px auto; }
.w-tag { font-family: var(--serif); font-size: clamp(19px, 2.4vw, 23px); color: var(--ivory); line-height: 1.45; margin: 0; }
.w-q { font: 600 11px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--stone); margin: 44px 0 22px; }
.profile-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 26px; max-width: 680px; }
.profile { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 108px; color: var(--stone); font-size: 14px; }
.profile .pf {
  width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 34px;
  color: var(--midnight); box-shadow: 0 0 0 1px rgba(245,242,238,.2), 0 10px 30px rgba(0,0,0,.35); transition: transform .2s, box-shadow .2s;
}
.profile:hover .pf { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--ivory), 0 14px 34px rgba(0,0,0,.45); }
.profile:hover { color: var(--ivory); }
.profile .pf.add { background: transparent; color: var(--stone); box-shadow: 0 0 0 1px rgba(198,191,183,.45); }
.profile .pf.add svg { width: 30px; height: 30px; }
.profile small { color: #E58A7A; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.profile-form { display: flex; gap: 10px; margin-top: 28px; }
.profile-form input { height: 46px; border-radius: 3px; border: 1px solid rgba(198,191,183,.35); background: rgba(27,22,31,.4); padding: 0 14px; font-size: 16px; outline: none; width: 220px; color: var(--ivory); }
.profile-form input:focus { border-color: var(--brass); }
.w-manage { margin-top: 28px; font: 600 10.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--stone); }
.w-pillars { display: flex; gap: 34px; margin-top: 56px; flex-wrap: wrap; justify-content: center; }
.w-pillars div { font: 600 9.5px/1.6 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--brass-hi); }
.w-pillars span { display: block; font: italic 15px/1.3 var(--serif); letter-spacing: 0; text-transform: none; color: var(--stone); margin-top: 3px; }

/* ---------- player ---------- */
#player { position: fixed; inset: 0; z-index: 80; background: #000; }
#player video { width: 100%; height: 100%; background: #000; display: block; }
.player-top { position: absolute; inset: 0 0 auto 0; display: flex; align-items: center; gap: 8px; padding: calc(var(--safe-top) + 8px) 14px 34px; background: linear-gradient(rgba(0,0,0,.78), transparent); transition: opacity .3s; }
#player.idle .player-top { opacity: 0; pointer-events: none; }
.player-title { flex: 1; min-width: 0; }
#playerTitle { font-family: var(--display); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#playerSub { font-size: 12.5px; color: rgba(245,242,238,.65); }
.menu { position: absolute; right: 14px; top: calc(var(--safe-top) + 60px); z-index: 2; background: rgba(33,27,38,.97); border: 1px solid var(--line); border-radius: 8px; min-width: 230px; padding: 6px; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 5px; font-size: 14.5px; }
.menu button:hover { background: rgba(245,242,238,.07); }
.menu button.on { color: var(--brass-hi); }
.menu .label { padding: 10px 12px 4px; display: block; }
.player-status { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 30px; color: rgba(245,242,238,.85); pointer-events: none; font-family: var(--serif); font-size: 19px; }
.next-btn { position: absolute; right: 20px; bottom: calc(var(--safe-bottom) + 92px); background: var(--brass); color: var(--midnight); font: 600 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; padding: 15px 20px; border-radius: 3px; box-shadow: 0 8px 30px rgba(0,0,0,.5); }

.toast { position: fixed; left: 50%; bottom: calc(var(--safe-bottom) + 92px); transform: translateX(-50%); z-index: 90; background: var(--surface-2); border: 1px solid var(--line); padding: 11px 18px; border-radius: 6px; font-size: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.4); max-width: 90vw; }

/* offline downloads */
.dl-lead { font-size: 18px; color: var(--stone); margin: 6px 0 18px; line-height: 1.45; }
.dl-actions { display: flex; flex-direction: column; gap: 10px; }
.dl-actions .btn { width: 100%; }
.dl-steps { color: var(--muted); font-size: 13.5px; line-height: 1.55; padding-left: 18px; margin: 22px 0 0; }
.dl-steps li { margin-bottom: 8px; }
.dl-steps b { color: var(--ivory); font-weight: 600; }
.dl-bar { height: 4px; background: rgba(245,242,238,.12); border-radius: 2px; overflow: hidden; }
.dl-bar > i { display: block; height: 100%; background: var(--brass); transition: width .6s ease; }
.dl-note { color: var(--faint); font-size: 13px; margin-top: 14px; }
.ep-dl { flex: none; color: var(--stone); }
.ep-dl:hover { color: var(--brass-hi); }

/* digital copies */
.dform { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.f-label { font: 600 10.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--brass-hi); margin-top: 14px; }
.text-in { height: 46px; border-radius: 3px; border: 1px solid var(--line); background: var(--surface); padding: 0 14px; font-size: 16px; color: var(--ivory); outline: none; width: 100%; }
.text-in:focus { border-color: var(--brass); }
.code-in { font-family: ui-monospace, Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; }
.check-row { display: flex; align-items: center; gap: 10px; color: var(--stone); font-size: 14.5px; margin-top: 14px; }
.check-row input { width: 18px; height: 18px; accent-color: #A6844F; }
.code-box { font: 600 22px/1.3 ui-monospace, Menlo, monospace; letter-spacing: .14em; text-align: center; padding: 20px 14px; border: 1px dashed var(--brass); border-radius: 6px; color: var(--ivory); background: var(--surface); user-select: all; -webkit-user-select: all; word-break: break-all; }
@media (max-width: 760px) {
  .browse-bar .filter-btn, .browse-bar .select { flex: 1 1 0; justify-content: center; }
  #addDigitalBtn { flex-basis: 100%; }
}

/* title logos */
.logo-title { margin: 14px 0 4px; line-height: 0; }
.logo-title img { display: block; max-width: min(460px, 82%); max-height: clamp(70px, 14vw, 160px); width: auto; height: auto; object-fit: contain; object-position: left bottom; filter: drop-shadow(0 4px 18px rgba(0,0,0,.55)); }
.detail-text .logo-title img { max-height: clamp(64px, 12vw, 140px); }

/* trailer player */
.trailer { position: fixed; inset: 0; z-index: 85; background: rgba(10,8,12,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: calc(var(--safe-top) + 56px) 16px calc(var(--safe-bottom) + 24px); animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.trailer-frame { width: min(1100px, 100%); aspect-ratio: 16/9; background: #000; border-radius: 8px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px var(--line); }
.trailer-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.trailer-close { position: absolute; top: calc(var(--safe-top) + 12px); right: 14px; }
.trailer-note { color: var(--faint); font-size: 12.5px; margin-top: 14px; text-align: center; }
.trailer-note a { color: var(--brass-hi); }

/* artwork picker */
.sheet-wide { width: min(640px, 100%); }
.art-grid { display: grid; gap: 12px; }
.art-grid.posters { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.art-grid.backdrops { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.art-opt { position: relative; border-radius: 6px; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.art-grid.posters .art-opt { aspect-ratio: 2/3; }
.art-grid.backdrops .art-opt { aspect-ratio: 16/9; }
.art-opt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-opt:hover { box-shadow: 0 0 0 2px var(--brass-hi); }
.art-opt.current { box-shadow: 0 0 0 2px var(--brass); }

/* family access */
.gate-note { display: flex; gap: 10px; align-items: flex-start; max-width: 430px; color: var(--stone); font-size: 14.5px; line-height: 1.55; margin: 26px auto 0; text-align: left; }
.gate-note svg { flex: none; width: 20px; height: 20px; color: var(--brass-hi); margin-top: 2px; }
.gate-form { margin-top: 26px; }
.gate-err { color: #E89A8A; font-size: 14px; min-height: 20px; margin: 12px 0 0; }
.code-form { display: flex; gap: 10px; margin-top: 26px; }
.code-entry { width: 200px; height: 54px; text-align: center; font: 600 26px/1 ui-monospace, Menlo, monospace; letter-spacing: .3em; border-radius: 3px; border: 1px solid rgba(198,191,183,.4); background: rgba(27,22,31,.45); color: var(--ivory); outline: none; }
.code-entry:focus { border-color: var(--brass); }
.code-form .btn { height: 54px; }
.code-box.big { font-size: 40px; letter-spacing: .22em; padding: 26px 10px; }
.wide-card-info { grid-column: 1 / -1; }
.acc-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.acc-row b { display: block; color: var(--ivory); font-weight: 600; }
.acc-row span { color: var(--faint); font-size: 12.5px; }
.acc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.has-badge { position: relative; }
.has-badge::after { content: ""; position: absolute; top: 2px; right: calc(50% - 16px); width: 9px; height: 9px; border-radius: 50%; background: #E0644F; box-shadow: 0 0 0 2px var(--bg); }
#avatarBtn.has-badge::after { top: -1px; right: -1px; }

/* favorites */
.fav-btn.on { border-color: var(--brass); color: var(--brass-hi); }
.fav-btn svg { width: 17px; height: 17px; }
.chip svg { width: 14px; height: 14px; }

/* footer, how-to, updates */
.app-footer { margin: 56px var(--pad) 10px; padding-top: 26px; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--faint); font-size: 12.5px; text-align: center; }
.page .app-footer { margin-left: 0; margin-right: 0; }
.f-mark { width: 30px; height: 30px; color: var(--brass); opacity: .8; }
.f-links { display: flex; gap: 18px; }
.f-links a, .link-inline { color: var(--brass-hi); font: inherit; }
.link-inline { padding: 0; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(166,132,79,.5); }
.notes { margin: 0; padding-left: 18px; color: var(--stone); font-size: 14.5px; line-height: 1.6; }
.update-bar { position: fixed; left: 50%; transform: translateX(-50%); top: calc(var(--safe-top) + 12px); z-index: 95; display: flex; align-items: center; gap: 14px; background: var(--surface-2); border: 1px solid var(--brass); border-radius: 8px; padding: 10px 12px 10px 18px; box-shadow: 0 10px 40px rgba(0,0,0,.5); font-size: 14px; white-space: nowrap; }
.btn-col { display: flex; flex-wrap: wrap; gap: 8px; }
.file-btn { position: relative; overflow: hidden; cursor: pointer; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.code-box.topic { font-size: 15px; letter-spacing: .04em; padding: 12px; margin: 8px 0 4px; text-align: left; }
.h3-ic { display: inline-block; width: 17px; height: 17px; vertical-align: -3px; margin-right: 8px; color: var(--brass-hi); }
.howto { display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.howto-item { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.howto-item[open] { border-color: rgba(166,132,79,.55); }
.howto-item summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 14px; padding: 18px 20px; flex-wrap: wrap; }
.howto-item summary::-webkit-details-marker { display: none; }
.h-num { font-family: var(--display); color: var(--brass-hi); font-size: 15px; }
.h-title { font-weight: 600; font-size: 16px; flex: 1; min-width: 200px; }
.h-time { color: var(--faint); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.h-steps { margin: 0; padding: 0 22px 8px 50px; color: var(--stone); line-height: 1.65; font-size: 15px; }
.h-steps li { margin-bottom: 10px; padding-left: 4px; }
.h-steps b { color: var(--ivory); }
.h-tip { margin: 4px 20px 18px 50px; padding: 12px 14px; border-left: 2px solid var(--brass); background: rgba(166,132,79,.08); color: var(--stone); font-size: 14px; line-height: 1.55; border-radius: 0 6px 6px 0; }
@media (max-width: 760px) { .h-steps { padding-left: 40px; } .h-tip { margin-left: 20px; } .tabs a[data-tab="howto"] { display: none; } }
.howto-item { scroll-margin-top: calc(var(--safe-top) + 90px); }

/* ---------- v1.3: downloads, offline, device picker ---------- */
.kind-pick{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin-bottom:14px}
@media (min-width:640px){.kind-pick{grid-template-columns:repeat(4,1fr)}}
.kind-pick label{cursor:pointer}.kind-pick input{position:absolute;opacity:0;pointer-events:none}
.kind-pick span{display:block;text-align:center;padding:11px 6px;border:1px solid rgba(198,191,183,.25);border-radius:6px;color:var(--stone,#C6BFB7);font-size:14px}
.kind-pick input:checked+span{background:#A6844F;border-color:#A6844F;color:#211B26;font-weight:700}
.dl-list{display:grid;gap:14px;max-width:760px}
.dl-item{display:flex;gap:16px;align-items:center;background:rgba(33,27,38,.6);border:1px solid rgba(198,191,183,.12);border-radius:10px;padding:12px}
.dl-art{flex:0 0 96px}.dl-art .poster{aspect-ratio:2/3;position:relative;border-radius:6px;overflow:hidden}
.dl-meta{flex:1;min-width:0}
.menu-list{display:grid;gap:4px;padding:6px 0 10px}
.menu-list a,.menu-list button{display:flex;align-items:center;gap:14px;padding:14px 6px;color:#F5F2EE;text-decoration:none;background:none;border:0;border-bottom:1px solid rgba(198,191,183,.1);font:inherit;font-size:16px;text-align:left;cursor:pointer}
.menu-list svg{width:20px;height:20px;color:#C9A86A}
#tvBtn svg{width:16px;height:16px;margin-right:6px;vertical-align:-3px}
body.is-offline nav.tabs a:not([data-tab=downloads]),body.is-offline #bottombar a:not([data-tab=downloads]){opacity:.35;pointer-events:none}
.gate-form { flex-wrap: wrap; justify-content: center; max-width: 440px; margin-left: auto; margin-right: auto; }
.gate-form > .label, .gate-form > .kind-pick { flex: 0 0 100%; }
.gate-form .kind-pick { grid-template-columns: repeat(2, 1fr); margin-bottom: 6px; }
.gate-form input[name=name] { flex: 1 1 180px; width: auto; }
#gate > * { flex-shrink: 0; } #gate { overflow-y: auto; }

.tmdb-steps{margin:10px 0 14px;padding-left:20px;color:var(--stone,#C6BFB7);line-height:1.6}.tmdb-steps li{margin-bottom:6px}
.tmdb-steps a{color:#C9A86A}.tmdb-form{display:flex;gap:8px;flex-wrap:wrap}.tmdb-form input{flex:1 1 220px;min-width:0}

/* ---------- startup animation (timed to the 6.5-second score) ---------- */
#splash{position:fixed;inset:0;z-index:200;display:grid;place-items:center;background:radial-gradient(ellipse at 50% 40%,#4A3355 0%,#3D2A46 32%,#211B26 78%);transition:opacity .9s ease,transform 1s cubic-bezier(.3,.6,.2,1);cursor:pointer}
#splash.sp-done{opacity:0;transform:scale(1.04);pointer-events:none}
#splash:not(.sp-go) *{animation-play-state:paused!important}
.sp-inner{display:flex;flex-direction:column;align-items:center;text-align:center}
.sp-mark{width:96px;height:96px;overflow:visible}
.sp-go .sp-mark{animation:spGlow 3.2s 1.75s ease forwards}
@keyframes spGlow{0%{filter:drop-shadow(0 0 0 rgba(201,168,106,0))}15%{filter:drop-shadow(0 0 14px rgba(232,211,162,.35))}48%{filter:drop-shadow(0 0 28px rgba(232,211,162,.65))}100%{filter:drop-shadow(0 0 10px rgba(201,168,106,.15))}}
.sp-mark path{fill:url(#spShine);fill-opacity:0;stroke:#C9A86A;stroke-width:.8;stroke-dasharray:1;stroke-dashoffset:1;stroke-linejoin:round}
.sp-c1{animation:spDraw 1.65s .15s cubic-bezier(.45,.05,.35,1) forwards,spFill .7s 1.8s ease forwards}
.sp-c2{animation:spDraw 1.35s .45s cubic-bezier(.45,.05,.35,1) forwards,spFill .7s 1.88s ease forwards}
@keyframes spDraw{to{stroke-dashoffset:0}}
@keyframes spFill{to{fill-opacity:1;stroke-opacity:0}}
.sp-word{font-family:var(--display,"Cinzel","Trajan Pro",Optima,serif);color:#C9A86A;font-size:clamp(30px,7vw,48px);letter-spacing:.9em;margin:26px 0 0 .9em;opacity:0;animation:spWord 1.2s 2.3s cubic-bezier(.2,.7,.2,1) forwards}
@keyframes spWord{to{letter-spacing:.26em;margin-left:.26em;opacity:1}}
.sp-rule{width:0;height:1px;background:#A6844F;margin:22px 0;animation:spRule .55s 2.85s cubic-bezier(.2,.7,.2,1) forwards}
@keyframes spRule{to{width:56px}}
.sp-sub{font:500 13px/1 var(--sans,-apple-system,sans-serif);letter-spacing:.58em;margin-left:.58em;color:#F5F2EE;opacity:0;transform:translateY(6px);animation:spSub .6s 3.2s ease forwards}
.sp-sub b{font-weight:600;color:#E8D3A2;display:inline-block;animation:spPlus 1.5s 3.2s ease}
@keyframes spSub{to{opacity:1;transform:none}}
@keyframes spPlus{20%{text-shadow:0 0 16px rgba(232,211,162,.9);transform:scale(1.06)}}

/* ---------- v1.5: smooth page changes ---------- */
#view{transition:opacity .18s ease}
#view.view-out{opacity:.2}
#view.view-in{animation:viewIn .42s cubic-bezier(.2,.7,.2,1) both}
@keyframes viewIn{from{opacity:0;transform:translateY(12px)}}
#view.view-in .row,#view.view-in .section,#view.view-in .info-card,#view.view-in .dl-item{animation:viewIn .5s cubic-bezier(.2,.7,.2,1) both}
#view.view-in .row:nth-child(2),#view.view-in .section:nth-child(2),#view.view-in .info-card:nth-child(2){animation-delay:.05s}
#view.view-in .row:nth-child(3),#view.view-in .section:nth-child(3),#view.view-in .info-card:nth-child(3){animation-delay:.1s}
#view.view-in .row:nth-child(4),#view.view-in .section:nth-child(4),#view.view-in .info-card:nth-child(4){animation-delay:.15s}
#view.view-in .row:nth-child(n+5),#view.view-in .section:nth-child(n+5),#view.view-in .info-card:nth-child(n+5){animation-delay:.2s}
[data-tab]{transition:color .25s ease,opacity .25s ease,border-color .25s ease}
#bottombar a svg{transition:transform .25s cubic-bezier(.2,.7,.2,1)}
#bottombar a.active svg{transform:translateY(-2px) scale(1.08)}
.sheet-wrap.closing{animation:fadeOut .22s ease forwards}
.sheet-wrap.closing .sheet{animation:sheetOut .22s ease forwards}
@keyframes fadeOut{to{opacity:0}}
@keyframes sheetOut{to{transform:translateX(30px);opacity:0}}
@media (max-width:700px){@keyframes sheetOut{to{transform:translateY(40px);opacity:0}}}
#player:not(.hidden){animation:fadeIn .3s ease}
#profiles:not(.hidden){animation:fadeIn .35s ease}
@media (prefers-reduced-motion:reduce){
  #view.view-in,#view.view-in *{animation:none!important}
  .sp-mark path{stroke-dashoffset:0;fill-opacity:1;stroke-opacity:0;animation:none!important}
  .sp-word,.sp-rule,.sp-sub{animation:none!important;opacity:1;letter-spacing:.26em;width:auto;transform:none}
  .sp-rule{width:56px}
}

.sp-sound{position:absolute;left:50%;bottom:calc(env(safe-area-inset-bottom,0px) + 44px);transform:translateX(-50%);background:rgba(33,27,38,.55);color:#E8D3A2;border:1px solid rgba(201,168,106,.45);border-radius:999px;padding:10px 18px;font:600 12px/1 var(--sans,-apple-system,sans-serif);letter-spacing:.16em;text-transform:uppercase;cursor:pointer;animation:fadeIn .6s .4s both}
.sp-sound[hidden]{display:none}
