@font-face {
  font-family: 'Source Sans 3';
  src: url('/fonts/source-sans-3-latin-ext.woff2') format('woff2');
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('/fonts/source-sans-3-latin.woff2') format('woff2');
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --sign: #ffcc00;
  --sign-press: #e6b800;
  --ink: #0b0b0b;
  --panel: #161616;
  --panel-hi: #222222;
  --line: #2c2c2c;
  --text: #ffffff;
  --text-2: #bdbdbd;
  --text-3: #8c8c8c;
  --alert: #ff453a;

  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-md: 1rem;
  --fs-lg: 1.1875rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
  --fs-3xl: 3rem;
  --fs-mono: 4.5rem;

  --rail: 120px;
  --row: 72px;
  --tap: 56px;
  --gap: 16px;
  --radius: 4px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --fast: 160ms;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { font-size: 17px; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--text); }
body {
  font-family: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  font-size: var(--fs-md);
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
::selection { background: var(--sign); color: var(--ink); }
input, select, button { font: inherit; color: inherit; }
input { caret-color: var(--sign); }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--sign); outline-offset: 2px; box-shadow: 0 0 0 2px var(--ink); }
* { scrollbar-width: thin; scrollbar-color: #3a3a3a var(--ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 5px; border: 2px solid var(--ink); }
.num { font-variant-numeric: tabular-nums lining-nums; font-feature-settings: 'tnum' 1, 'lnum' 1; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- icons ---------- */
.icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: square; stroke-linejoin: miter; }
.icon.fill { fill: currentColor; stroke: none; }
.picto { width: var(--tap); height: var(--tap); flex: none; display: grid; place-items: center; background: var(--ink); color: #fff; border-radius: var(--radius); }
.picto .icon { width: 30px; height: 30px; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: var(--rail) 1fr; height: 100%; }
.rail { background: var(--sign); color: var(--ink); display: flex; flex-direction: column; align-items: stretch; padding: 16px 10px; gap: 6px; border-right: 1px solid var(--ink); overflow-y: auto; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 0 18px; margin-bottom: 8px; border-bottom: 1.5px solid var(--ink); text-decoration: none; color: var(--ink); }
.brand .picto { width: 52px; height: 52px; }
.brand b { font-size: var(--fs-sm); font-weight: 800; letter-spacing: -0.01em; line-height: 1; }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; border-radius: 6px; text-decoration: none; color: var(--ink); font-size: var(--fs-xs); font-weight: 700; transition: background var(--fast) var(--ease), color var(--fast) var(--ease); }
.nav-item .picto { width: 52px; height: 52px; transition: background var(--fast) var(--ease), color var(--fast) var(--ease); }
.nav-item:hover { background: rgb(0 0 0 / 0.08); }
.nav-item[aria-current='page'] { background: var(--ink); color: var(--sign); }
.nav-item[aria-current='page'] .picto { background: var(--sign); color: var(--ink); }
.rail .spacer { flex: 1; }
.main { position: relative; overflow-y: auto; overflow-x: hidden; }
.view { padding: 24px 28px 48px; display: flex; flex-direction: column; gap: 28px; min-height: 100%; }

/* ---------- sign band ---------- */
.band { display: flex; align-items: center; gap: 18px; background: var(--sign); color: var(--ink); border: 1px solid var(--ink); border-radius: var(--radius); padding: 14px 18px; min-height: 88px; }
.band h1, .band h2 { margin: 0; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.band h1 { font-size: var(--fs-2xl); }
.band .meta { font-size: var(--fs-md); font-weight: 600; opacity: 0.78; }
.band .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.band-link { text-decoration: none; cursor: pointer; transition: background var(--fast) var(--ease); width: 100%; text-align: left; font: inherit; }
.band-link:hover { background: var(--sign-press); }
.band-link:active { transform: translateY(1px); }
.band .chev { width: 40px; height: 40px; }

.hero-band { min-height: 168px; padding: 20px 24px; gap: 24px; }
.hero-band .picto { width: 88px; height: 88px; }
.hero-band .picto .icon { width: 46px; height: 46px; }
.hero-band .label { font-size: var(--fs-lg); font-weight: 700; }
.hero-band .title { font-size: var(--fs-3xl); font-weight: 800; letter-spacing: -0.025em; line-height: 1; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-wrap: balance; }
.monument { font-size: var(--fs-mono); font-weight: 800; letter-spacing: -0.035em; line-height: 0.85; display: inline-flex; }

/* split-flap digits */
.flap { display: inline-block; transform-origin: 50% 55%; }
.flap.go { animation: flap 420ms var(--ease) both; animation-delay: calc(var(--i) * 45ms); }
@keyframes flap {
  0% { transform: perspective(400px) rotateX(-92deg); opacity: 0.2; }
  60% { transform: perspective(400px) rotateX(10deg); opacity: 1; }
  100% { transform: perspective(400px) rotateX(0); }
}

/* ---------- sections ---------- */
.section { display: flex; flex-direction: column; gap: 12px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-head h2 { margin: 0; font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.01em; }
.section-head .count { color: var(--text-3); font-size: var(--fs-sm); }
.link-btn { background: none; border: 0; padding: 8px 0; color: var(--sign); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.link-btn .icon { width: 18px; height: 18px; }

/* tiles: favourites / recents */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 10px; }
.tile { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px; align-items: center; padding: 12px; min-height: 84px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); text-align: left; color: var(--text); transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease); }
.tile:hover { background: var(--panel-hi); }
.tile:active { border-color: var(--sign); }
.tile .logo { grid-row: span 2; width: 72px; height: 54px; }
.tile .name { font-weight: 700; font-size: var(--fs-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .sub { font-size: var(--fs-xs); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .sub b { color: var(--sign); font-weight: 700; }
.tile[aria-disabled='true'] { opacity: 0.45; }

.logo { background: #000; border-radius: 3px; display: grid; place-items: center; align-content: center; overflow: hidden; color: var(--text-2); font-weight: 800; font-size: var(--fs-sm); letter-spacing: 0.02em; }
.logo img { max-width: 90%; max-height: 86%; object-fit: contain; }
.logo.cover img { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: cover; }
.logo.cover { background: linear-gradient(160deg, #1d1d1d, #0e0e0e); font-size: var(--fs-2xl); color: #5c5c5c; letter-spacing: 0.04em; }

/* empty / onboarding */
.empty { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 28px; background: var(--panel); border: 1px dashed #3a3a3a; border-radius: var(--radius); color: var(--text-2); }
.empty h3 { margin: 0; color: var(--text); font-size: var(--fs-lg); }
.empty p { margin: 0; max-width: 60ch; }

/* ---------- forms ---------- */
.field { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 14px; min-height: var(--tap); transition: border-color var(--fast) var(--ease); }
.field:focus-within { border-color: var(--sign); }
.field input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: var(--fs-lg); padding: 12px 0; }
.field input::placeholder { color: var(--text-3); }
.field .icon { color: var(--text-3); }
.band .field { background: #fffdf2; border-color: var(--ink); color: var(--ink); }
.band .field input { caret-color: var(--ink); }
.band .field input::placeholder { color: #6b6450; }
.band .field .icon { color: var(--ink); }
.band .field:focus-within { box-shadow: 0 0 0 2px var(--ink); }
.band > .field { flex: 1 1 280px; }
.field .icon-btn { width: 42px; height: 42px; margin-right: -8px; }
.field .icon-btn .icon { color: #fff; }
.signs { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.signs .band h2 { font-size: var(--fs-xl); white-space: nowrap; }

.btn { display: inline-flex; align-items: center; gap: 12px; min-height: var(--tap); padding: 0 18px 0 6px; border-radius: var(--radius); border: 0; background: var(--ink); color: #fff; font-weight: 700; font-size: var(--fs-md); white-space: nowrap; transition: background var(--fast) var(--ease), transform var(--fast) var(--ease); }
.btn .box { width: 44px; height: 44px; display: grid; place-items: center; border: 1.5px solid #fff; border-radius: 3px; }
.btn:hover { background: #262626; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.5; cursor: progress; }
.btn.on-dark { background: var(--sign); color: var(--ink); }
.btn.on-dark .box { border-color: var(--ink); }
.btn.on-dark:hover { background: var(--sign-press); }
.btn.ghost { background: none; color: var(--text); border: 1.5px solid #4a4a4a; padding: 0 18px; }
.btn.ghost:hover { border-color: var(--text); background: none; }
.btn.small { min-height: 44px; padding: 0 14px; font-size: var(--fs-sm); }

/* ---------- library ---------- */
.lib { display: grid; grid-template-columns: 300px 1fr; gap: 0; min-height: 100%; }
.lib-head { position: sticky; top: 0; z-index: 3; grid-column: 1 / -1; padding: 20px 28px 16px; background: var(--ink); border-bottom: 1px solid var(--line); }
.lib-head .band { min-height: 0; padding: 10px 12px; gap: 14px; flex-wrap: wrap; }
.lib-head .band h1 { font-size: var(--fs-xl); white-space: nowrap; }
.lib-head .band .meta { white-space: nowrap; }
.lib-head .field.search { flex: 1 1 280px; }
.lib-head .field.jump { flex: 0 0 168px; }
.lib-head .field.jump input { width: 4ch; font-weight: 800; }

.groups { border-right: 1px solid var(--line); padding: 12px 10px 40px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: var(--head-h, 116px); align-self: start; max-height: calc(100dvh - var(--head-h, 116px)); overflow-y: auto; }
.group { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 8px 12px; border: 0; border-radius: var(--radius); background: none; color: var(--text-2); text-align: left; font-size: var(--fs-md); font-weight: 600; transition: background var(--fast) var(--ease), color var(--fast) var(--ease); }
.group span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group .n { color: var(--text-3); font-size: var(--fs-xs); font-weight: 700; }
.group:hover { background: var(--panel); color: var(--text); }
.group[aria-pressed='true'] { background: var(--sign); color: var(--ink); }
.group[aria-pressed='true'] .n { color: var(--ink); }

.board { padding: 12px 28px 40px; display: flex; flex-direction: column; }
.board-status { color: var(--text-3); font-size: var(--fs-sm); padding: 6px 2px 12px; }
.row { display: grid; grid-template-columns: 5.5ch 96px 1fr auto 28px; align-items: center; gap: 16px; min-height: var(--row); padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); text-align: left; width: 100%; transition: background var(--fast) var(--ease); }
.row:hover { background: var(--panel); }
.row:active { background: var(--panel-hi); }
.row .no { color: var(--sign); font-weight: 800; font-size: var(--fs-xl); letter-spacing: -0.01em; }
.row .logo { width: 96px; height: 54px; }
.row .name { font-weight: 700; font-size: var(--fs-lg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .grp { color: var(--text-3); font-size: var(--fs-sm); max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .chev { color: var(--text-3); width: 22px; height: 22px; }
.row .star { color: var(--sign); width: 18px; height: 18px; margin-left: 6px; vertical-align: -2px; }
.row.skeleton .bar { height: 14px; border-radius: 3px; background: linear-gradient(90deg, #1b1b1b, #262626, #1b1b1b); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.posters { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 14px; }
.poster { display: flex; flex-direction: column; gap: 8px; padding: 0; border: 0; background: none; color: var(--text); text-align: left; }
.poster .logo { aspect-ratio: 2 / 3; width: 100%; border: 1px solid var(--line); transition: border-color var(--fast) var(--ease), transform var(--fast) var(--ease); }
.poster:hover .logo { border-color: var(--sign); }
.poster:active .logo { transform: scale(0.98); }
.poster .name { font-weight: 700; font-size: var(--fs-sm); line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.poster .sub { font-size: var(--fs-xs); color: var(--text-3); }
.sentinel { height: 1px; }

/* youtube */
.yt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px 16px; }
.yt { display: flex; flex-direction: column; gap: 8px; padding: 0; border: 0; background: none; color: var(--text); text-align: left; }
.yt .thumb { position: relative; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color var(--fast) var(--ease); }
.yt .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt .dur { position: absolute; right: 6px; bottom: 6px; background: var(--ink); color: #fff; font-size: var(--fs-xs); font-weight: 700; padding: 2px 6px; border-radius: 3px; }
.yt:hover .thumb { border-color: var(--sign); }
.yt .name { font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yt .sub { color: var(--text-3); font-size: var(--fs-sm); }

/* settings */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 18px; max-width: 920px; }
.panel h2 { margin: 0; font-size: var(--fs-xl); }
.panel p { margin: 0; color: var(--text-2); max-width: 70ch; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border-top: 1px solid var(--line); }
.fact { padding: 14px 0 4px; display: flex; flex-direction: column; gap: 2px; }
.fact dt { color: var(--text-3); font-size: var(--fs-xs); font-weight: 600; }
.fact dd { margin: 0; font-size: var(--fs-xl); font-weight: 800; }
.fact dd.err { color: var(--alert); font-size: var(--fs-md); font-weight: 600; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.switch input { appearance: none; width: 58px; height: 34px; border-radius: 17px; background: #3a3a3a; position: relative; flex: none; transition: background var(--fast) var(--ease); }
.switch input::after { content: ''; position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform var(--fast) var(--ease); }
.switch input:checked { background: var(--sign); }
.switch input:checked::after { transform: translateX(24px); background: var(--ink); }

/* login / forced password change */
.gate { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.gate-form { width: min(560px, 100%); display: flex; flex-direction: column; gap: 14px; }
.gate-form .band { flex-wrap: wrap; }
.gate-form .link-btn { align-self: center; }
.reveal { background: none; border: 0; color: var(--text-2); font-weight: 700; font-size: var(--fs-sm); padding: 8px 4px; }
.reveal:hover { color: var(--text); }
.form-error { margin: 0; min-height: 1.35em; color: #ff8a80; font-weight: 600; }
.form-error:empty { min-height: 0; }

/* account warning */
.warn-band .picto { background: var(--alert); }
.warn-band h2 { font-size: var(--fs-xl); }

/* admin: users */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.field-select { min-height: var(--tap); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 14px; font-size: var(--fs-lg); }
.field-select:focus { border-color: var(--sign); outline: none; }
.expiry { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.expiry .field { flex: 0 1 240px; }
.expiry input[type='date'] { color-scheme: dark; }
.user-list { display: flex; flex-direction: column; gap: 10px; }
.user { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 18px; align-items: center; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.user-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.user-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.user-name strong { font-size: var(--fs-lg); }
.user-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--text-3); font-size: var(--fs-sm); }
.row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.row-actions .btn .icon { width: 20px; height: 20px; }
.row-editor { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row-editor:empty { display: none; }
.btn.ghost.primary { border-color: var(--sign); color: var(--sign); }
.btn.ghost.danger { border-color: var(--alert); color: #fff; background: var(--alert); }
.chip { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 12px; font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.02em; border: 1.5px solid currentColor; }
.chip.ok { color: var(--text-2); }
.chip.bad { color: #fff; background: var(--alert); border-color: var(--alert); }
.chip.off { color: var(--text-3); }
.chip.warn { color: var(--sign); }
.chip.role { color: var(--ink); background: var(--sign); border-color: var(--sign); }
.cred, .head-band { flex-wrap: wrap; }
.head-band .grow { min-width: 180px; }
.cred .grow { gap: 4px; }
.cred-value { font-size: var(--fs-xl); font-weight: 800; letter-spacing: 0.02em; user-select: all; }
@media (max-width: 899px) {
  .user { grid-template-columns: 1fr; }
  .row-actions { justify-content: flex-start; }
}

/* toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px); opacity: 0; z-index: 50; display: flex; align-items: center; gap: 12px; max-width: min(640px, calc(100% - 32px)); padding: 10px 18px 10px 10px; background: var(--sign); color: var(--ink); border: 1px solid var(--ink); border-radius: var(--radius); font-weight: 700; pointer-events: none; transition: opacity 200ms var(--ease), transform 200ms var(--ease); }
.toast .picto { width: 40px; height: 40px; }
.toast .picto .icon { width: 22px; height: 22px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error .picto { background: var(--alert); }

/* ---------- player ---------- */
.player { position: fixed; inset: 0; z-index: 20; background: #000; }
.player canvas { width: 100%; height: 100%; object-fit: contain; display: block; }
.player .sub { position: absolute; left: 6%; right: 6%; bottom: 13%; text-align: center; white-space: pre-line; font-size: clamp(24px, 3.1vw, 46px); font-weight: 700; line-height: 1.22; text-shadow: 0 0 3px #000, 0 2px 6px #000, 0 0 12px #000; pointer-events: none; transition: bottom 200ms var(--ease); }
.player.ui .sub { bottom: 22%; }
.osd { position: absolute; left: 20px; right: 20px; top: 20px; display: flex; align-items: stretch; gap: 0; transition: opacity 200ms var(--ease), transform 200ms var(--ease); }
.osd .band { flex: 1; min-width: 0; min-height: 104px; padding: 12px 18px 12px 12px; gap: 18px; }
.osd .monument { font-size: 3.6rem; }
.osd .title { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.02em; line-height: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.osd .meta { display: flex; align-items: center; gap: 10px; }
.live-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--ink); color: #fff; font-size: var(--fs-xs); font-weight: 800; padding: 3px 8px; border-radius: 3px; letter-spacing: 0.04em; }
.live-chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--alert); }
.icon-btn { width: var(--tap); height: var(--tap); flex: none; display: grid; place-items: center; border-radius: var(--radius); border: 0; background: var(--ink); color: #fff; transition: background var(--fast) var(--ease), color var(--fast) var(--ease); }
.icon-btn .icon { width: 28px; height: 28px; }
.icon-btn:hover { background: #262626; }
.icon-btn[aria-pressed='true'] { color: var(--sign); }
.controls { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px; display: flex; flex-direction: column; gap: 14px; background: linear-gradient(transparent, rgb(0 0 0 / 0.86) 38%); transition: opacity 200ms var(--ease), transform 200ms var(--ease); }
.controls .bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.controls .bar .grow { flex: 1; }
.controls .ctl { min-height: var(--tap); display: inline-flex; align-items: center; gap: 10px; padding: 0 16px 0 6px; border-radius: var(--radius); border: 0; background: rgb(22 22 22 / 0.92); color: #fff; font-weight: 700; transition: background var(--fast) var(--ease); }
.controls .ctl .box { width: 44px; height: 44px; display: grid; place-items: center; background: #000; border-radius: 3px; }
.controls .ctl:hover { background: #2a2a2a; }
.controls select.ctl { padding: 0 16px; appearance: none; max-width: 240px; }
.time { font-weight: 700; color: var(--text-2); min-width: 9ch; }
.seek { display: flex; align-items: center; gap: 14px; }
.seek input { flex: 1; appearance: none; height: 34px; background: none; margin: 0; }
.seek input::-webkit-slider-runnable-track { height: 6px; background: linear-gradient(var(--sign), var(--sign)) 0 / var(--p, 0%) 100% no-repeat, #3a3a3a; border-radius: 3px; }
.seek input::-webkit-slider-thumb { appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: var(--sign); border: 3px solid var(--ink); }
.seek input::-moz-range-track { height: 6px; background: #3a3a3a; border-radius: 3px; }
.seek input::-moz-range-progress { height: 6px; background: var(--sign); border-radius: 3px; }
.seek input::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--sign); border: 3px solid var(--ink); }
.player.idle .osd { opacity: 0; transform: translateY(-12px); pointer-events: none; }
.player.idle .controls { opacity: 0; transform: translateY(12px); pointer-events: none; }
.player.idle { cursor: none; }
.hud { position: absolute; left: 20px; bottom: 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; pointer-events: none; transition: bottom 200ms var(--ease); z-index: 2; }
.player.ui .hud { bottom: calc(var(--controls-h, 140px) + 8px); }
.pill { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 14px 6px 10px; border-radius: 20px; background: rgb(11 11 11 / 0.72); color: #fff; font-size: var(--fs-sm); font-weight: 700; pointer-events: auto; box-shadow: 0 2px 10px rgb(0 0 0 / 0.35); }
.pill .icon { width: 20px; height: 20px; color: var(--sign); }
.spin { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 3px solid rgb(255 255 255 / 0.22); border-top-color: var(--sign); animation: spin 0.9s linear infinite; }
.pill-btn { min-height: 32px; margin-left: 4px; padding: 0 12px; border: 0; border-radius: 16px; background: var(--sign); color: var(--ink); font-weight: 800; font-size: var(--fs-sm); }
.progress { position: relative; height: 4px; border-radius: 2px; background: #333; overflow: hidden; }
.progress > i { position: absolute; inset: 0 auto 0 0; background: var(--sign); }
.poster .progress { margin-top: -4px; border-radius: 0 0 3px 3px; }
.tile .progress { grid-column: 1 / -1; margin-top: 6px; }
.hero-band .progress { background: rgb(0 0 0 / 0.18); height: 6px; border-radius: 3px; margin-top: 4px; max-width: 520px; }
.hero-band .progress > i { background: var(--ink); }
.player-msg { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.player-msg > div { pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 24px 28px; background: rgb(11 11 11 / 0.92); border: 1px solid var(--line); border-radius: var(--radius); max-width: 520px; text-align: center; }
.player-msg h2 { margin: 0; font-size: var(--fs-xl); }
.player-msg p { margin: 0; color: var(--text-2); }
.loader { width: 54px; height: 54px; border-radius: 50%; border: 5px solid #333; border-top-color: var(--sign); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- phone ---------- */
@media (max-width: 899px) {
  html { font-size: 16px; }
  :root { --row: 64px; --fs-mono: 3.25rem; --fs-3xl: 2.1rem; }
  .app { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .main { grid-row: 1; }
  .rail { grid-row: 2; flex-direction: row; padding: 6px; gap: 2px; background: var(--ink); border-right: 0; border-top: 1px solid var(--line); overflow: visible; }
  .brand, .rail .spacer { display: none; }
  .nav-item { flex: 1; color: var(--text-2); padding: 6px 2px; font-size: 0.6875rem; }
  .nav-item .picto { width: 36px; height: 36px; background: none; color: inherit; }
  .nav-item .picto .icon { width: 24px; height: 24px; }
  .nav-item[aria-current='page'] { background: var(--sign); color: var(--ink); }
  .nav-item[aria-current='page'] .picto { background: none; color: var(--ink); }
  .view { padding: 16px 14px 32px; gap: 22px; }
  .hero-band { min-height: 128px; padding: 14px; gap: 14px; }
  .hero-band .picto { width: 60px; height: 60px; }
  .lib { grid-template-columns: 1fr; }
  .lib-head { padding: 12px 14px; }
  .lib-head .field.search { flex: 1 1 150px; }
  .lib-head .field.jump { flex: 0 0 128px; }
  .lib-head .band .picto { width: 44px; height: 44px; }
  .hero-band .label { font-size: var(--fs-md); }
  .groups { position: static; max-height: none; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 14px; gap: 6px; }
  .group { flex: none; min-height: 44px; background: var(--panel); }
  .board { padding: 8px 14px 32px; }
  .row { grid-template-columns: 4.5ch 64px 1fr 22px; gap: 10px; padding: 6px 4px; }
  .row .grp { display: none; }
  .row .logo { width: 64px; height: 40px; }
  .row .name { font-size: var(--fs-md); }
  .row .no { font-size: var(--fs-lg); }
  .osd { left: 10px; right: 10px; top: 10px; }
  .osd .band { min-height: 80px; gap: 10px; }
  .osd .monument { font-size: 2.4rem; }
  .osd .title { font-size: var(--fs-lg); }
  .controls { padding: 10px; }
  .controls .ctl .label { display: none; }
  .controls .ctl.text { padding: 0 12px; }
  .controls .ctl.text .label { display: inline; }
  .controls .ctl { padding: 0 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}
