/* Layout shared by every theme. Themes (themes/<name>/theme.css) load after this file and change the
   variables below, or override any rule. Colors that depend on a season use --hue (set per element). */
:root {
  --font: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --bg: #0d1030;
  --bg-image: none; /* extra layers behind the page, e.g. radial gradients */
  --card: #1e2357;
  --text: #ffffff;
  --muted: #aab0e0;
  --accent: #ffd23f; /* main buttons, highlights */
  --accent-ink: #1b1b3a; /* text on --accent */
  --accent-shade: #c99a00; /* 3D edge under accent buttons (use transparent for flat) */
  --progress: #ff4d5e; /* progress bars */
  --ok: #3ddc84; /* watched */
  --ok-ink: #063;
  --overlay: #ffffff14; /* subtle surfaces on top of --bg */
  --overlay-2: #ffffff26;
  --radius: 22px; /* cards */
  --radius-lg: 32px; /* hero */
  --chip-radius: 50%; /* season buttons */
  --loader-bg: radial-gradient(circle at 50% 45%, #232a7a, var(--bg) 70%);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: var(--font); min-height: 100vh; background: var(--bg-image), var(--bg); }
button { font-family: inherit; cursor: pointer; border: 0; color: inherit; touch-action: manipulation; }
/* Tablets: no text selection or "save image" menus on long-press, no double-tap zoom */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
img { -webkit-user-drag: none; }
[hidden] { display: none !important; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top)) max(clamp(16px, 4vw, 48px), env(safe-area-inset-right)) 14px max(clamp(16px, 4vw, 48px), env(safe-area-inset-left));
  background: linear-gradient(var(--bg) 60%, transparent);
}
.logo { font-weight: 900; font-size: 28px; letter-spacing: -0.5px; display: flex; align-items: center; gap: 8px; }
.logo-mark { font-size: 28px; color: var(--accent); }
.logo-mark:empty { display: none; }
.icon-btn {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--overlay); font-size: 22px; display: grid; place-items: center;
  transition: background .15s, transform .15s;
}
.icon-btn:hover { background: var(--overlay-2); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.spin { animation: spin 1s linear infinite; }

main { padding: 0 clamp(16px, 4vw, 48px) 80px; }

/* Loading */
.loading-screen { display: grid; place-items: center; gap: 16px; padding: 18vh 0; color: var(--muted); font-size: 20px; }
.spinner, .loader-spinner {
  width: 56px; height: 56px; border-radius: 50%;
  border: 6px solid var(--overlay-2); border-top-color: var(--accent);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(220px, 420px) 1fr; gap: clamp(20px, 4vw, 48px);
  align-items: center; margin: 8px 0 36px;
  background: linear-gradient(135deg, var(--overlay), transparent);
  border: 1px solid var(--overlay); border-radius: var(--radius-lg); padding: clamp(16px, 3vw, 32px);
}
.hero-art {
  aspect-ratio: 16 / 10; border-radius: calc(var(--radius) + 4px); display: grid; place-items: center;
  font-weight: 900; font-size: clamp(64px, 10vw, 130px); color: #ffffffee;
  text-shadow: 0 6px 0 #00000033; position: relative; overflow: hidden;
  box-shadow: 0 20px 50px -20px #000a;
}
/* Colored card shown until (and unless) a preview frame loads */
.hero-art, .ep-art { background: linear-gradient(135deg, hsl(var(--hue, 220) 80% 58%), hsl(calc(var(--hue, 220) + 40) 75% 38%)); }
.eyebrow { margin: 0 0 6px; color: var(--accent); font-weight: 700; font-size: 18px; }
.hero h1 { margin: 0 0 14px; font-size: clamp(30px, 5vw, 54px); line-height: 1.05; font-weight: 900; }
.hero-meta { color: var(--muted); margin: 10px 0 22px; font-size: 18px; }
.hero-progress, .ep-progress { height: 8px; border-radius: 99px; background: var(--overlay-2); overflow: hidden; }
.hero-progress { max-width: 420px; }
.hero-progress > div, .ep-progress > div { height: 100%; background: var(--progress); border-radius: inherit; }

.play-btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--accent); color: var(--accent-ink); font-weight: 900; font-size: 24px;
  padding: 16px 34px; border-radius: 99px;
  box-shadow: 0 6px 0 var(--accent-shade);
  transition: transform .12s, box-shadow .12s;
}
.play-btn:hover { transform: translateY(-2px); }
.play-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--accent-shade); }
.play-icon { display: inline-block; font-size: 0.9em; }
.pill-btn { background: var(--overlay-2); padding: 12px 22px; border-radius: 99px; font-size: 18px; font-weight: 700; }
.pill-btn:hover { background: #ffffff33; }

/* Rows */
.row { margin-bottom: 34px; }
.row h2 { font-size: 24px; margin: 0 0 14px; font-weight: 800; }
.scroller {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 240px); gap: 16px;
  overflow-x: auto; padding: 6px 2px 14px; scroll-snap-type: x proximity; scrollbar-width: thin;
}
.scroller > * { scroll-snap-align: start; }
.seasons { grid-auto-columns: 92px; padding: 12px 12px 18px; margin-inline: -12px; }

/* Season buttons: the ring fills up as episodes are watched (--done is set per season) */
.season-chip {
  width: 92px; height: 92px; border-radius: var(--chip-radius); position: relative;
  font-weight: 900; font-size: 34px; display: grid; place-items: center;
  background: linear-gradient(135deg, hsl(var(--hue) 80% 60%), hsl(calc(var(--hue) + 40) 75% 40%));
  box-shadow: inset 0 -6px 0 #00000033; transition: transform .15s;
}
.season-chip small { position: absolute; bottom: 12px; font-size: 12px; font-weight: 500; opacity: .85; }
.season-chip:hover { transform: scale(1.06); }
.season-chip.active { outline: 4px solid var(--accent); outline-offset: 4px; }
.season-chip .ring {
  position: absolute; inset: -4px; border-radius: var(--chip-radius); pointer-events: none;
  background: conic-gradient(var(--ok) var(--done, 0deg), transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 0);
}

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; }

.ep-card {
  position: relative; cursor: pointer;
  background: var(--card); border-radius: var(--radius); overflow: hidden; text-align: start;
  display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s;
  box-shadow: 0 10px 24px -16px #000;
}
.ep-card:hover, .ep-card:focus-visible { transform: translateY(-4px) scale(1.02); box-shadow: 0 18px 30px -14px #000; outline: none; }
.ep-card:focus-visible { outline: 3px solid var(--accent); }
.ep-art {
  aspect-ratio: 16 / 10; display: grid; place-items: center; position: relative; overflow: hidden;
  font-size: 54px; font-weight: 900; text-shadow: 0 4px 0 #00000033;
}
.ep-art .badge {
  position: absolute; top: 10px; inset-inline-start: 10px; z-index: 1;
  background: var(--ok); color: var(--ok-ink); font-size: 14px; font-weight: 900;
  border-radius: 99px; padding: 3px 10px; text-shadow: none;
}
.ep-art .play-hover {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 1;
  background: #0006; opacity: 0; transition: opacity .15s; font-size: 44px;
}
.ep-card:hover .play-hover { opacity: 1; }
.ep-body { padding: 10px 14px 14px; display: grid; gap: 8px; }
.ep-title { font-weight: 700; font-size: 18px; }
.ep-sub { color: var(--muted); font-size: 14px; }
.ep-card.watched .ep-art { filter: saturate(.55) brightness(.85); }

/* Remove-from-progress button on cards */
.ep-remove {
  position: absolute; top: 8px; inset-inline-end: 8px; z-index: 3;
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: #000b; color: #fff; font-size: 16px; font-weight: 700;
  opacity: 0; transform: scale(.8); transition: opacity .15s, transform .15s, background .15s;
}
.ep-card:hover .ep-remove, .ep-card:focus-within .ep-remove { opacity: 1; transform: scale(1); }
.ep-remove:hover { background: var(--progress); }
@media (hover: none) { .ep-remove { opacity: .85; transform: scale(1); width: 32px; height: 32px; } }

/* Episode previews */
.thumb {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .4s ease;
}
.has-thumb .thumb { opacity: 1; }
.hero-art .num, .ep-art .num { position: relative; z-index: 1; transition: all .3s ease; }
.has-thumb .num {
  position: absolute; bottom: 10px; inset-inline-end: 10px;
  min-width: 46px; height: 46px; padding: 0 10px; border-radius: 99px;
  display: grid; place-items: center; font-size: 26px;
  background: var(--accent); color: var(--accent-ink); text-shadow: none;
  box-shadow: 0 4px 0 var(--accent-shade);
}
.hero-art.has-thumb .num { min-width: 70px; height: 70px; font-size: 40px; bottom: 16px; inset-inline-end: 16px; }
.hero-art.has-thumb::after, .ep-art.has-thumb::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(transparent 55%, #0009);
}
.ep-card.watched .ep-art.has-thumb { filter: saturate(.4) brightness(.7); }

/* Player */
.player { position: fixed; inset: 0; z-index: 50; background: #000; display: grid; place-items: center; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player-top {
  position: absolute; top: 0; inset-inline: 0; z-index: 5; display: flex; align-items: center; gap: 16px;
  padding: max(16px, env(safe-area-inset-top)) 20px 30px;
  background: linear-gradient(#000c, transparent); transition: opacity .3s;
}
.player-top.idle { opacity: 0; pointer-events: none; }
.player-title { flex: 1; font-size: 22px; font-weight: 800; }
.icon-btn.big { width: 56px; height: 56px; font-size: 26px; background: var(--overlay-2); }
.player-loading, .player-end, .player-error {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px;
  text-align: center; background: #000000b0; font-size: 22px;
}
.player-end h3 { margin: 0; font-size: 32px; }
.player-end p { margin: 0; color: var(--muted); }
.player-end b { color: var(--accent); }
.end-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* Loader while a video starts. The theme's loader.html goes above the title; app.js adds .done when the
   video starts playing (a finishing animation has ~0.7 s) and .compact for short hiccups mid-video. */
.player-loading { pointer-events: none; overflow: hidden; background: var(--loader-bg); transition: opacity .3s ease .35s; }
.player-loading.done { opacity: 0; }
.player-loading.compact { background: none; }
.player-loading.compact .loader-backdrop, .player-loading.compact .loader-bg,
.player-loading.compact .loader-title, .player-loading.compact .loader-msg { display: none; }
/* The video's own preview, blurred, behind the loader */
.loader-backdrop {
  position: absolute; inset: -40px; background-size: cover; background-position: center;
  filter: blur(28px) saturate(1.3) brightness(.45); transform: scale(1.1); opacity: .9;
}
.loader-bg { position: absolute; inset: 0; } /* the theme's loader-bg.html */
.loader-content { position: relative; display: grid; justify-items: center; gap: 14px; padding: 0 20px; }
.loader-title { margin: 0; font-size: clamp(26px, 4vw, 38px); font-weight: 900; text-shadow: 0 3px 0 #0005; }
.loader-msg { margin: 0; color: #fff; opacity: .9; font-size: 22px; font-weight: 500; min-height: 1.4em; animation: msg-in .4s ease; }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } }

/* Undo toast */
.toast {
  position: fixed; bottom: max(24px, env(safe-area-inset-bottom)); left: 50%; z-index: 60;
  transform: translateX(-50%); display: flex; align-items: center; gap: 18px;
  background: #fff; color: #1b1b3a; font-weight: 700; font-size: 18px;
  padding: 12px 14px 12px 22px; border-radius: 99px; box-shadow: 0 14px 40px -10px #000c;
  animation: toast-in .25s ease;
}
[dir="rtl"] .toast { padding: 12px 22px 12px 14px; }
.toast button { background: var(--accent); color: var(--accent-ink); font-weight: 900; padding: 8px 18px; border-radius: 99px; font-size: 17px; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 16px); } }

/* Titles can come from file names in any language: let each one pick its own direction, so a Hebrew
   name stays readable in an English page and the other way around. */
.ep-title, .hero h1, .player-title, .loader-title, #upNextTitle, #toastText { unicode-bidi: plaintext; }

/* Settings sheet */
.topbar-actions { display: flex; gap: 10px; }
.sheet {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px;
  background: #000a; animation: fade-in .2s ease;
}
.sheet-panel {
  width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--card); border-radius: var(--radius-lg); padding: 22px clamp(18px, 4vw, 30px) 26px;
  box-shadow: 0 30px 80px -20px #000; animation: sheet-in .25s ease;
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sheet-head h2 { margin: 0; font-size: 26px; font-weight: 800; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }

.hold-gate { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 18px 0 6px; }
.hold-btn {
  position: relative; width: 116px; height: 116px; border-radius: 50%; background: var(--overlay);
  display: grid; place-items: center; font-size: 44px; touch-action: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.hold-btn svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.hold-btn circle { fill: none; stroke-width: 7; }
.hold-track { stroke: var(--overlay-2); }
.hold-fill { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.hold-btn.holding .hold-fill { stroke-dashoffset: 0; transition: stroke-dashoffset 1.5s linear; }
.hold-btn.holding { transform: scale(.96); }
.hold-label { margin: 10px 0 0; font-size: 20px; font-weight: 700; }
.hold-hint { margin: 0; color: var(--muted); font-size: 15px; }

.settings-form fieldset { border: 0; padding: 0; margin: 18px 0 0; }
.settings-form legend { font-weight: 700; font-size: 16px; color: var(--muted); margin-bottom: 10px; padding: 0; }
.theme-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.chip-options { display: flex; flex-wrap: wrap; gap: 10px; }
.theme-option, .chip-option { position: relative; cursor: pointer; }
.theme-option input, .chip-option input { position: absolute; opacity: 0; pointer-events: none; }
.theme-card {
  display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: calc(var(--radius) - 6px);
  background: var(--overlay); box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .15s, background .15s;
}
.theme-swatch {
  flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  font-size: 20px; box-shadow: inset 0 0 0 1px #ffffff22; color: #fff;
}
.theme-name { font-weight: 700; font-size: 16px; line-height: 1.2; }
.theme-name em, .chip-option em { display: block; font-style: normal; font-weight: 500; font-size: 12px; color: var(--muted); }
.chip-option span { display: block; padding: 10px 18px; border-radius: 99px; background: var(--overlay); font-weight: 700; font-size: 16px; }
.theme-option:hover .theme-card, .chip-option:hover span { background: var(--overlay-2); }
.theme-option input:checked + .theme-card, .chip-option input:checked + span { box-shadow: inset 0 0 0 2px var(--accent); background: var(--overlay-2); }
.theme-option input:focus-visible + .theme-card, .chip-option input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.switch-row b { display: block; font-size: 16px; }
.switch-row small { display: block; color: var(--muted); font-size: 14px; margin-top: 3px; }
.switch-row input {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 52px; height: 30px; margin: 0;
  border-radius: 99px; background: var(--overlay-2); cursor: pointer; transition: background .15s;
}
.switch-row input::after {
  content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; transition: transform .15s;
}
.switch-row input:checked { background: var(--accent); }
.switch-row input:checked::after { transform: translateX(22px); }
[dir="rtl"] .switch-row input:checked::after { transform: translateX(-22px); }
.switch-row input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.settings-note { color: var(--muted); font-size: 14px; margin: 22px 0 0; }
.sheet-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.sheet-actions .play-btn { font-size: 20px; padding: 12px 30px; }
.link-btn { background: none; color: var(--muted); font-size: 15px; font-weight: 600; text-decoration: underline; padding: 8px 0; }
.link-btn:hover { color: var(--text); }

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .ep-art { font-size: 42px; }
  .play-btn { font-size: 20px; padding: 14px 26px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation-duration: 2s !important; }
}

/* Wide screens (iPad, computers): show every season at once instead of a sideways scroller */
@media (min-width: 721px) {
  .seasons { display: flex; flex-wrap: wrap; gap: 16px; overflow: visible; margin-inline: 0; padding: 8px 4px; }
}
/* Touch screens: hover effects would stick after a tap */
@media (hover: none) {
  .ep-card:hover { transform: none; box-shadow: 0 10px 24px -16px #000; }
  .ep-card:active { transform: scale(.97); }
  .ep-card:hover .play-hover { opacity: 0; }
  .season-chip:hover { transform: none; }
  .season-chip:active { transform: scale(.94); }
}

/* ---------- Who's watching, channels, admin, PIN pad ---------- */
.hub { position: fixed; inset: 0; z-index: 40; overflow-y: auto; background: var(--bg-image), var(--bg); }
.hub-page {
  max-width: 1100px; margin: 0 auto; min-height: 100%;
  padding: max(24px, env(safe-area-inset-top)) clamp(16px, 4vw, 48px) 60px;
  display: flex; flex-direction: column; align-items: center; gap: 28px;
}
.hub-page h1 { font-size: clamp(30px, 6vw, 48px); font-weight: 900; margin: 8px 0 0; text-align: center; }
.hub-page h2 { font-size: 24px; margin: 0 0 6px; font-weight: 800; }
.hub-top { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hub-top .who { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 18px; font-weight: 700; }
.hub-actions { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.hub-empty, .hub-hint { color: var(--muted); font-size: 18px; text-align: center; margin: 0; }
.hub-hint { text-align: start; font-size: 16px; margin-bottom: 12px; }
.hub-status { color: var(--ok); font-weight: 700; font-size: 18px; }

.profile-grid, .channel-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(16px, 3vw, 32px); width: 100%; }
.profile-tile, .channel-tile {
  background: none; display: flex; flex-direction: column; align-items: center; gap: 12px;
  transition: transform .15s; position: relative;
}
.profile-tile:hover, .channel-tile:hover { transform: scale(1.06); }
.profile-tile:active, .channel-tile:active { transform: scale(.96); }
.avatar {
  width: clamp(110px, 22vw, 160px); aspect-ratio: 1; border-radius: var(--radius);
  background: var(--card); display: grid; place-items: center; font-size: clamp(56px, 11vw, 84px);
}
.avatar.sm { width: 40px; font-size: 24px; border-radius: 50%; }
.tile-name { font-size: 22px; font-weight: 800; max-width: 200px; overflow-wrap: anywhere; }
.profile-tile .lock { position: absolute; top: 6px; inset-inline-end: 6px; font-size: 22px; }
.channel-tile { width: clamp(180px, 40vw, 280px); }
.tile-art {
  width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); background: var(--card);
  display: grid; place-items: center; overflow: hidden; position: relative;
}
.tile-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile-initial { font-size: 64px; font-weight: 900; color: var(--accent); }
.channel-tile small { color: var(--muted); font-size: 16px; }

.check-list { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.check-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--overlay); font-size: 18px; cursor: pointer; }
.check-row.small { padding: 8px 12px; font-size: 16px; }
.check-row small { margin-inline-start: auto; color: var(--muted); }
.check-row input { width: 22px; height: 22px; accent-color: var(--accent); }
.hub-page.admin section { width: 100%; max-width: 720px; }
.profile-editor { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.profile-row { background: var(--overlay); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.profile-row-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.profile-row-head input[type=text] {
  flex: 1; min-width: 0; font: inherit; font-size: 20px; padding: 10px 14px; border-radius: 12px;
  border: 2px solid var(--overlay-2); background: var(--bg); color: var(--text); user-select: text;
}
.avatar-pick { width: 56px; height: 56px; border-radius: 14px; background: var(--card); font-size: 30px; }

/* PIN pad (sign-in page and the dialogs) */
.login-body { display: grid; place-items: center; min-height: 100vh; }
.login { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px; }
.login h1 { font-size: 30px; margin: 0; text-align: center; }
.login-logo { font-size: 56px; color: var(--accent); }
.login-logo:empty { display: none; }
.pin-dots { display: flex; gap: 14px; height: 24px; }
.pin-dots i { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--muted); }
.pin-dots i.on { background: var(--accent); border-color: var(--accent); }
.pin-dots.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.pin-error { color: var(--progress); min-height: 24px; margin: 0; font-weight: 700; text-align: center; }
.keypad { display: grid; grid-template-columns: repeat(3, 84px); gap: 14px; direction: ltr; }
.keypad button { height: 84px; border-radius: 50%; background: var(--overlay-2); font-size: 32px; font-weight: 800; transition: transform .1s; }
.keypad button:active { transform: scale(.92); background: var(--overlay); }
.keypad button.ok { background: var(--accent); color: var(--accent-ink); }
.pin-dialog { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: #000a; padding: 16px; }
.pin-panel { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.pin-panel h2 { margin: 0; }
