/* Arbiflix — brand: aubergine ground, mustard accent (focus, stamp, links), tomato only for Play.
   Sizes in rem; the root size grows with the screen so a TV reads like a laptop up close. */
:root {
  --bg: #1E1424; --plum: #2C1F35; --plum2: #3A2A45; --line: #4A3657; --gold: #F2B33D; --tomato: #E8503A;
  --cream: #F6EDE3; --lilac: #B6A6BF; --shade: rgba(20, 13, 25, .82);
  --display: "Bebas Neue", Impact, "Arial Narrow", sans-serif; --body: "Nunito", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark; font-size: clamp(14px, 1.12vw, 30px);
}
* { box-sizing: border-box }
html, body { margin: 0; background: var(--bg); color: var(--cream); font-family: var(--body); line-height: 1.35 }
body { min-height: 100vh; overflow-x: hidden }
a { color: inherit; text-decoration: none }
button, input, textarea, select { font: inherit; color: inherit }
img { display: block; max-width: 100% }
:focus { outline: none }
:focus-visible, .focusable:focus { outline: .3rem solid var(--gold); outline-offset: .25rem; border-radius: .7rem }
[hidden] { display: none !important }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important } }

/* type */
.display { font-family: var(--display); font-weight: 400; letter-spacing: .06em; line-height: .92 }
.logo { font-family: var(--display); color: var(--gold); letter-spacing: .08em; font-size: 2.6rem; line-height: 1 }
.muted { color: var(--lilac) }
h1, h2, h3 { margin: 0 }
.stamp { display: inline-block; transform: rotate(-6deg); border: .18rem solid var(--gold); color: var(--gold); border-radius: .5rem;
  padding: .1rem .6rem; font-family: var(--display); font-size: 1.25rem; letter-spacing: .1em; background: var(--bg) }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: .6rem; border: none; border-radius: .8rem; padding: .85rem 1.6rem;
  font-weight: 800; font-size: 1.15rem; cursor: pointer; background: var(--plum2); color: var(--cream); min-height: 2.75rem }
.btn.play { background: var(--tomato); color: var(--bg) }
.btn.gold { background: var(--gold); color: var(--bg) }
.btn.ghost { background: transparent; border: .15rem solid var(--gold); color: var(--gold) }
.btn svg { width: 1.1rem; height: 1.1rem; flex: none }
.btn[aria-pressed="true"] { background: var(--gold); color: var(--bg) }

/* top bar */
.bar { display: flex; flex-wrap: nowrap; align-items: center; gap: 1rem 1.6rem; padding: 1.2rem 3rem; position: sticky; top: 0; z-index: 12; background: var(--bg) }
.bar nav { display: flex; flex-wrap: nowrap; gap: .4rem 1.5rem; flex: 1; min-width: 0; font-weight: 700; font-size: 1.1rem; white-space: nowrap }
.logo { white-space: nowrap }
.burger { display: none; width: 2.7rem; height: 2.7rem; border: .15rem solid var(--lilac); border-radius: .75rem; background: none; cursor: pointer; padding: 0; flex-direction: column; justify-content: center; align-items: center; gap: .3rem }
.burger i { display: block; width: 1.3rem; height: .17rem; border-radius: 1rem; background: var(--cream) }
.bar nav a { color: var(--lilac); padding: .3rem .1rem; border-bottom: .18rem solid transparent }
.bar nav a.on { color: var(--cream); border-color: var(--gold) }
.ask { border: .15rem solid var(--gold); color: var(--gold); border-radius: 99rem; height: 2.7rem; padding: 0 1.1rem; font-weight: 700; background: none; cursor: pointer; display: inline-flex; align-items: center; white-space: nowrap }
.ask .short { display: none }
.me { width: 2.7rem; height: 2.7rem; border-radius: .75rem; display: grid; place-items: center; font-family: var(--display); font-size: 1.6rem; color: var(--bg) }
.iconbtn { width: 2.7rem; height: 2.7rem; border-radius: 50%; border: .15rem solid var(--gold); color: var(--gold); background: none; cursor: pointer; display: grid; place-items: center; padding: 0 }
.iconbtn svg { width: 1.3rem; height: 1.3rem }
.search-modal { align-items: start; padding-top: 6vh }
.search-modal .box { gap: 1.2rem }
.results { display: flex; flex-wrap: wrap; gap: 1rem }
.badge { background: var(--tomato); color: var(--bg); border-radius: 99rem; padding: 0 .45rem; font-size: .85rem; font-weight: 800; margin-left: .3rem }

/* hero */
.hero { position: relative; margin: 0 3rem; min-height: 24rem; border-radius: 1.4rem; overflow: hidden; background: var(--plum) }
.hero .art { position: absolute; inset: 0; background-size: cover; background-position: center top; transition: opacity .6s }
.hero .art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 0%, rgba(30,20,36,.85) 38%, rgba(30,20,36,.15) 75%) }
.hero .text { position: relative; min-height: 24rem; max-width: 38rem; padding: 2.2rem 2.6rem 3.6rem; display: flex; flex-direction: column; justify-content: center; gap: .8rem }
.hero h1 { font-size: clamp(2.6rem, 5vw, 5.4rem); line-height: .95; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.hero .overview { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-width: 34rem }
.dots { position: absolute; left: 2.6rem; bottom: 1.1rem; display: flex; gap: .5rem }
.dots { z-index: 3 }
.dot { position: relative; width: .55rem; height: .55rem; border: none; padding: 0; border-radius: 1rem; background: var(--line); cursor: pointer }
.dot.on { width: 1.7rem; background: var(--gold) }
.dot::after { content: ""; position: absolute; inset: -.55rem -.2rem }  /* a bigger place to click or tap */
.hero-arrow { position: absolute; top: 0; bottom: 0; width: 3.4rem; z-index: 3; border: none; color: var(--cream); font-size: 3rem; cursor: pointer; opacity: 0; transition: opacity .15s; background: transparent }
.hero-arrow.prev { left: 0; background: linear-gradient(90deg, rgba(30, 20, 36, .7), transparent) }
.hero-arrow.next { right: 0; background: linear-gradient(270deg, rgba(30, 20, 36, .7), transparent) }
.hero:hover .hero-arrow, .hero-arrow:focus-visible { opacity: 1 }

/* rows */
.row { padding: 1.6rem 0 0 3rem }
.row h2 { font-family: var(--display); font-weight: 400; font-size: 2.1rem; letter-spacing: .05em; margin-bottom: .7rem }
.track { display: flex; gap: 1rem; overflow-x: auto; padding: .5rem 3rem .9rem .5rem; margin-left: -.5rem; scroll-snap-type: x proximity; scrollbar-width: none }
.track::-webkit-scrollbar { display: none }
.poster { flex: 0 0 9.5rem; aspect-ratio: 2 / 3; border-radius: .7rem; position: relative; overflow: hidden; background: var(--plum2); scroll-snap-align: start; transition: transform .15s }
.poster img, .wide img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover }
.poster .new, .poster .stamp, .wide .caption, .wide .bar-progress { z-index: 2 }  /* the picture covers the fallback title */
.poster .fallback, .wide .fallback { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: .7rem; font-family: var(--display); font-size: 1.4rem; line-height: 1 }
.poster:focus { transform: scale(1.06) }
.poster .new { position: absolute; top: .55rem; left: .4rem }
.poster .stamp { position: absolute; top: 2.8rem; left: .4rem; font-size: .9rem }
.new { background: var(--gold); color: var(--bg); border-radius: .35rem; padding: .1rem .4rem; font-size: .7rem; font-weight: 800 }
.wide { flex: 0 0 17rem; aspect-ratio: 16 / 9; border-radius: .8rem; position: relative; overflow: hidden; background: var(--plum2); scroll-snap-align: start }
.wide .caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.6rem .8rem .7rem; background: linear-gradient(transparent, var(--shade)) }
.wide .caption b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.5rem; letter-spacing: .05em }
.bar-progress { position: absolute; left: 0; bottom: 0; height: .3rem; background: var(--gold) }
.rail { position: relative; margin-left: -3rem }
.rail .track { margin-left: 0; padding-left: 3rem; scroll-padding-left: 3rem }
.arrow { position: absolute; top: 0; bottom: .9rem; width: 3rem; z-index: 5; border: none; color: var(--cream); font-size: 2.6rem; line-height: 1;
  cursor: pointer; opacity: 0; transition: opacity .15s; display: grid; place-items: center }
.arrow.prev { left: 0; background: linear-gradient(90deg, var(--bg) 20%, transparent) }
.arrow.next { right: 0; background: linear-gradient(270deg, var(--bg) 20%, transparent) }
.rail:hover .arrow, .arrow:focus-visible { opacity: 1 }
.section-title { font-family: var(--display); font-weight: 400; font-size: 3rem; letter-spacing: .06em; color: var(--gold); margin: 2.4rem 3rem 0 }
.rating { color: var(--gold); font-weight: 800 }
.foot { padding: 2.4rem 3rem 3rem; color: var(--lilac) }

/* hover card */
.hovercard { position: fixed; z-index: 15; background: var(--plum); border-radius: 1rem; overflow: hidden; box-shadow: 0 1.2rem 3rem rgba(0, 0, 0, .65);
  opacity: 0; transform: scale(.9); transition: opacity .18s, transform .18s }
.hovercard.on { opacity: 1; transform: none }
.hc-art { display: block; aspect-ratio: 16 / 9; background: var(--plum2) }
.hc-art img { width: 100%; height: 100%; object-fit: cover }
.hc-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .5rem }
.hc-body .display { font-size: 2rem }
.hc-tags { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap } .hc-tags:empty { display: none }
.hc-tags .stamp { font-size: .9rem }
.hc-story { margin: 0; font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden }
.hc-buttons { display: flex; gap: .7rem; margin-top: .3rem } .hc-buttons .btn { padding: .55rem 1.1rem; font-size: 1rem }

.hovercard.book { display: flex }
.hovercard.book .hc-cover { flex: 0 0 38%; background: var(--plum2) } .hovercard.book .hc-cover img { width: 100%; height: 100%; object-fit: cover; display: block }
.hovercard.book .hc-body { flex: 1; min-width: 0 }
.version { display: flex; flex-direction: column; gap: .5rem; padding-top: .3rem } .version > b { font-size: 1.15rem }
.version .actions { display: flex; flex-wrap: wrap; gap: .8rem }

/* player page */
.stage { position: relative; background: #000; margin: 0 auto; aspect-ratio: 16 / 9; width: min(100%, 1500px, calc(80vh * 16 / 9)); border-radius: .8rem; overflow: hidden }
.stage:fullscreen { width: 100%; height: 100%; max-height: none; aspect-ratio: auto; border-radius: 0 }
.stage video { width: 100%; height: 100%; object-fit: contain; background: #000 }
.stage .ui { position: absolute; inset: auto 0 0 0; padding: 3rem 1.4rem 1rem; display: flex; flex-direction: column; gap: .7rem; opacity: 0; transition: opacity .3s;
  background: linear-gradient(transparent, rgba(0, 0, 0, .85)); pointer-events: none }
.stage.show .ui { opacity: 1; pointer-events: auto }
.stage:not(.show) { cursor: none }
.stage .ui .btn { padding: .35rem .8rem; font-size: .95rem; min-height: 2.3rem; white-space: nowrap }
.stage .ui .btn.icon { padding: .35rem .6rem }
.stage .ui .btn.icon svg { width: 1.1rem; height: 1.1rem }
.ctrl { display: flex; align-items: center; gap: .5rem; flex-wrap: nowrap }
.ctrl .spacer { flex: 1; min-width: 0 }
.ctrl .time { white-space: nowrap; font-variant-numeric: tabular-nums; margin: 0 .4rem; font-size: .95rem }
.menu { max-height: 60vh; overflow: auto }
.menu hr { border: none; border-top: .1rem solid var(--line); margin: .3rem .2rem; width: calc(100% - .4rem) }
.subs { position: absolute; left: 6%; right: 6%; bottom: 1.2rem; text-align: center; pointer-events: none; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: .15rem; transition: bottom .25s; font-size: clamp(.95rem, 2.1vw, 1.9rem); line-height: 1.3 }
.stage.show .subs { bottom: 6.8rem }
.stage:fullscreen .subs { font-size: clamp(1.2rem, 2.4vw, 2.4rem) }
.subs span { background: rgba(0, 0, 0, .72); color: #fff; padding: .05rem .55rem; border-radius: .3rem; display: inline-block; unicode-bidi: plaintext; text-shadow: 0 .05rem .15rem #000 }
.p-bar { height: .5rem; border-radius: 1rem; background: rgba(255, 255, 255, .25); cursor: pointer; position: relative }
.p-bar > #p-fill { position: absolute; inset: 0 auto 0 0; background: var(--gold); border-radius: 1rem }
.p-bar::before { content: ""; position: absolute; inset: -.8rem 0 }  /* a taller place to grab */
.p-bar { touch-action: none }
.p-bar .knob { position: absolute; top: 50%; width: 1.1rem; height: 1.1rem; margin: -.55rem 0 0 -.55rem; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 .2rem rgba(0, 0, 0, .35); opacity: 0; transition: opacity .15s }
.p-bar:hover .knob { opacity: 1 }
.p-bar .tip { position: absolute; bottom: 1.4rem; transform: translateX(-50%); background: rgba(20, 12, 30, .92); color: var(--cream); font-weight: 700; padding: .25rem .6rem; border-radius: .5rem; font-size: .95rem; white-space: nowrap; pointer-events: none }
.parts { display: flex; flex-direction: column; gap: .8rem }
.part-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 8.5rem)); gap: 1.1rem 1rem }
.part { display: flex; flex-direction: column; gap: .45rem; min-width: 0 }
.part .pic { position: relative; aspect-ratio: 2 / 3; border-radius: .7rem; overflow: hidden; background: var(--plum2); border: .2rem solid transparent; display: block }
.part .pic .fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: .6rem; text-align: center; font-family: var(--display); letter-spacing: .05em; color: var(--lilac) }
.part .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover }
.part.on .pic { border-color: var(--gold) }
a.part:hover .pic, a.part:focus-visible .pic { border-color: var(--cream) }
.part.off .pic { opacity: .45 }
.part-name { display: flex; flex-direction: column; gap: .1rem; line-height: 1.2 }
.part-name b { font-size: .95rem } .part-name small { color: var(--lilac); font-size: .85rem }
.part.on .part-name b { color: var(--gold) }
.menuwrap { position: relative }
.menu { position: absolute; right: 0; bottom: 120%; min-width: 11rem; background: var(--plum); border-radius: .8rem; padding: .4rem; box-shadow: 0 .8rem 2rem rgba(0, 0, 0, .6); display: flex; flex-direction: column }
.menu button { background: none; border: none; text-align: start; padding: .6rem .9rem; border-radius: .5rem; font-weight: 700; cursor: pointer; display: flex; gap: .6rem }
.menu button:hover, .menu button:focus-visible { background: var(--plum2) }
.menu button[aria-checked="true"]::before { content: "✓"; color: var(--gold) } .menu button[aria-checked="false"]::before { content: ""; width: 1em }
.volume { display: inline-flex; align-items: center; gap: .4rem }
.volume input { width: 5.5rem; accent-color: var(--gold) }
.below { padding: 1.4rem 3rem 3rem; display: flex; flex-direction: column; gap: 1.2rem }

/* episode rows */
.episode { display: flex; flex-direction: column; background: var(--plum); border-radius: .8rem; cursor: pointer }
.episode .head { display: flex; gap: 1.2rem; align-items: center; padding: .8rem 1.1rem }
.episode .more { padding: 0 1.1rem 1rem 4.9rem; display: flex; flex-direction: column; gap: .6rem }
.episode .more p { margin: 0; max-width: 46rem }

/* avatar picker */
.avatars { border: none; padding: 0; margin: 0; min-width: 0 } .avatars legend { font-weight: 700; padding: 0; margin-bottom: .5rem }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(3.6rem, 1fr)); gap: .5rem }
.avatar-choice { position: relative; display: block; cursor: pointer }
.avatar-choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer }
.avatar-choice img { width: 100%; aspect-ratio: 1; border-radius: .8rem; border: .2rem solid transparent }
.avatar-choice input:checked + img { border-color: var(--gold); transform: scale(1.06) }
.avatar-choice input:focus-visible + img { outline: .25rem solid var(--gold); outline-offset: .15rem }

/* profiles, forms, dialogs */
.center { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.4rem; padding: 2rem; text-align: center }
.profiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 2.2rem }
.profile { display: flex; flex-direction: column; align-items: center; gap: .8rem; font-weight: 700; font-size: 1.3rem; padding: .4rem }
.tile img, .me img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover }
.profile .tile { overflow: hidden; width: 8.5rem; height: 8.5rem; border-radius: 1.3rem; display: grid; place-items: center; font-family: var(--display); font-size: 4.2rem; color: var(--bg) }
.profile.add .tile { border: .2rem dashed var(--line); color: var(--lilac); font-family: var(--body); font-size: 3rem }
.form { display: flex; flex-direction: column; gap: .8rem; width: min(26rem, 100%); text-align: left }
.form label { font-weight: 700 }
.field { background: var(--bg); border: .15rem solid var(--line); border-radius: .7rem; padding: .8rem 1rem; font-size: 1.15rem; width: 100% }
.field:focus { border-color: var(--gold) }
.error { color: #FF9A8A; min-height: 1.4rem }
.modal { position: fixed; inset: 0; background: rgba(15, 10, 18, .75); display: grid; place-items: center; z-index: 20; padding: 1rem }
.modal .box { background: var(--plum); border-radius: 1.4rem; padding: 2rem; width: min(34rem, 100%); display: flex; flex-direction: column; gap: 1rem }
#toast { position: fixed; left: 50%; bottom: 2rem; transform: translateX(-50%); background: var(--cream); color: var(--bg); padding: .8rem 1.4rem; border-radius: .8rem; font-weight: 800; z-index: 30 }

@media (max-width: 1120px) {
  .bar { padding-inline: 1.5rem; gap: .8rem 1rem } .bar nav { gap: .4rem 1rem; font-size: 1rem }
  .ask .long { display: none } .ask .short { display: inline }
}
@media (max-width: 960px) {
  .burger { display: flex }
  .bar nav { display: none; position: absolute; top: 100%; left: 1rem; right: 1rem; flex-direction: column; gap: 0; background: var(--plum); border-radius: 1rem; padding: .6rem; box-shadow: 0 1rem 2.4rem rgba(0, 0, 0, .6); font-size: 1.2rem }
  .bar nav.open { display: flex }
  .bar nav a { padding: .8rem 1rem; border-bottom: none; border-radius: .6rem } .bar nav a.on { background: var(--plum2) }
  .bar .logo { margin-right: auto } .bar nav { flex: none }
  .volume input { display: none }
  .row, .hero, .below, .foot, .section-title { padding-left: 1.5rem } .hero { margin-inline: 1.5rem; padding-left: 0 }
}
@media (max-width: 700px) {
  :root { font-size: 15px }
  .bar { padding-inline: 1rem } .foot, .below, .section-title { padding-inline: 1rem } .section-title { margin-inline: 0 } .row { padding-left: 1rem }
  .hero { margin: 0 1rem; min-height: 20rem } .hero .text { min-height: 20rem; padding: 1.6rem 1.4rem 3.4rem } .dots { left: 1.4rem }
  .track { padding-right: 1rem } .rail { margin-left: -1rem } .rail .track { padding-left: 1rem; scroll-padding-left: 1rem }
  .stage { border-radius: .5rem } .stage .ui { padding: 2rem .6rem .6rem } .stage .ui .btn { padding: .3rem .55rem; font-size: .85rem }
  .menu { right: auto; left: 0; max-width: 80vw }
  .modal .box { padding: 1.3rem } .hovercard { display: none }
}
@media (hover: none) { .arrow, .hero-arrow { display: none } }
.stage .brief { display: none } .time .total { display: inline }
.hero { touch-action: pan-y }
@media (max-width: 700px) {
  .bar { gap: .5rem; padding-block: .7rem } .bar .logo { font-size: 1.7rem; letter-spacing: .05em }
  .burger { transform: scale(.8); margin-left: -.3rem } .iconbtn, .me { width: 2.2rem; height: 2.2rem } .iconbtn svg { width: 1.1rem; height: 1.1rem }
  .ask { height: 2.2rem; padding: 0 .8rem; font-size: .9rem }
  .ctrl { flex-wrap: nowrap; gap: .25rem } .ctrl .spacer { display: none } .volume { display: none }
  .stage .ui .btn { padding: .3rem .45rem; font-size: .8rem; min-height: 2rem; gap: .3rem } .stage .ui .btn.play { padding-inline: .6rem }
  .stage .ui .btn.icon { padding: .3rem .4rem } .ctrl .time { margin: 0 .2rem; font-size: .8rem } .time .total { display: none }
  .stage .full { display: none } .stage .brief { display: inline }
  .ctrl .time { flex: 1; min-width: 0; text-align: center }
}
@media (max-width: 700px) { .stage.show .subs { bottom: 4.4rem } }
@media (max-width: 700px) {
  .ctrl .time { overflow: hidden }
  #p-resume .box { padding: .7rem; gap: .4rem } #p-resume .logo { display: none } #p-resume h2 { font-size: 1.2rem !important } #p-resume .btn { font-size: .85rem; min-height: 2rem; padding: .3rem .7rem }
}
