/* Lanvura School Rush — obrazovky nad canvasem (menu, pauza, konec hry). Brand kit: tokeny --lv-* (rodina games). */
:root { --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px); --sr-ink: #1f1846; --sr-violet: #6d5dfc; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #3fb8ff; overscroll-behavior: none; }
body { font-family: var(--lv-font-rounded, ui-rounded, system-ui, sans-serif); color: var(--sr-ink); -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
#cv { position: fixed; inset: 0; display: block; touch-action: none; }
.sr-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.sr-pause-btn { position: fixed; top: calc(var(--sat) + 10px); right: 12px; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: rgba(31, 24, 70, .55); color: #fff; font-size: 18px; cursor: pointer; z-index: 5; }
.sr-pause-btn::after { content: attr(data-left); position: absolute; right: -4px; bottom: -4px; min-width: 18px; height: 18px; border-radius: 9px;
  background: #ffd23f; color: #1f1846; font: 900 11px/18px var(--lv-font-rounded, system-ui); text-align: center; }
.sr-pause-btn.empty { opacity: .5; }
.sr-pause-btn.empty::after { background: #fecaca; }
.sr-toast { position: fixed; left: 50%; top: calc(var(--sat) + 18px); transform: translateX(-50%); z-index: 30; padding: 10px 18px; border-radius: 999px;
  background: #1f1846; color: #fff; font-weight: 900; box-shadow: 0 10px 30px rgba(0,0,0,.3); animation: sr-pop .3s; }
/* proužek bez internetu během hry (main.js syncNetBar): na výšku v nebi pod HUD a ukazatelem bosse, kam brány nedoletí; na šířku
   vlevo dole na trávě, nahoře je karta s příkladem. Klepnutí propouští do hry. */
.sr-net { position: fixed; z-index: 5; left: 50%; top: calc(var(--sat) + clamp(118px, 30vw, 140px)); width: max-content; max-width: calc(100% - 32px); margin: 0; padding: 4px 12px; border-radius: 16px;
  background: rgba(31, 24, 70, .72); color: #fff; font-size: 12.5px; font-weight: 800; line-height: 1.25; text-align: center; pointer-events: none; transform: translateX(-50%); animation: sr-net-in .3s ease-out; }
.sr-net.sr-net-land { left: calc(env(safe-area-inset-left, 0px) + 12px); top: auto; bottom: calc(var(--sab) + 86px); max-width: 26%; text-align: left; transform: none; animation: none; }
.sr-net.sr-net-back { background: rgba(21, 128, 61, .88); }
.sr-net[hidden] { display: none; }
@keyframes sr-net-in { from { opacity: 0; } to { opacity: 1; } }
.sr-btn2:disabled { opacity: .55; filter: grayscale(1); cursor: default; }
.sr-btn2 small[hidden] { display: none; }
.sr-pause-btn:focus-visible, .sr-screen button:focus-visible, .sr-screen a:focus-visible, .sr-screen select:focus-visible { outline: 3px solid #ffd23f; outline-offset: 2px; }

.sr-screen { position: fixed; inset: 0; z-index: 10; overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: flex; align-items: flex-start; justify-content: center; padding: calc(var(--sat) + 16px) 16px 24px;
  background: linear-gradient(180deg, rgba(20, 16, 60, .15), rgba(20, 16, 60, .35)); }
.sr-screen[hidden] { display: none; }
.sr-card { width: 100%; max-width: 480px; margin: auto 0; background: rgba(255, 255, 255, .94); border-radius: 28px; padding: 20px 18px 18px;
  box-shadow: 0 20px 60px rgba(31, 24, 70, .3); backdrop-filter: blur(8px); animation: sr-pop .35s cubic-bezier(.2, 1.4, .4, 1); text-align: center; }
.sr-small { max-width: 360px; }
@keyframes sr-pop { from { transform: scale(.9) translateY(12px); opacity: 0; } }

/* záhlaví karty: „‹ Lanvura“ (app-home.js) · logo hry · účet (lv-account.js) */
.sr-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; margin-bottom: 6px; }
.sr-head .lv-app-back { margin: 0; }
.sr-head .sr-brand { flex: 0 1 auto; min-width: 0; }
.sr-who { margin: 2px 0 10px; color: #4b4470; }
.sr-who b { color: #1d1b2e; }
.sr-who button { color: #6d28d9; }
.sr-brand { display: inline-block; height: 26px; }
.sr-brand img { height: 26px; }
.lv-logo-dark { display: none; }
.sr-title { margin: 6px 0 2px; font-size: clamp(40px, 12vw, 58px); font-weight: 900; line-height: 1; letter-spacing: -.02em;
  background: linear-gradient(135deg, #ff6b9a, #ffb703 45%, #38bdf8); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 rgba(31, 24, 70, .18)); }
.sr-title span { background: linear-gradient(135deg, #6d5dfc, #a855f7); -webkit-background-clip: text; background-clip: text; }
.sr-tag { margin: 6px 0 12px; font-size: 15px; line-height: 1.35; color: #4b4470; }
.sr-h { margin: 14px 0 8px; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--sr-violet); }
.sr-big { margin: 4px 0 10px; font-size: 30px; font-weight: 900; }

.sr-heroes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } /* 6 hrdinů = 2 řady po 3 */
.sr-hero { border: 3px solid transparent; background: #f3f0ff; border-radius: 20px; padding: 8px 4px 10px; cursor: pointer; font: inherit; color: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 2px; transition: transform .15s, border-color .15s, background .15s; }
.sr-hero canvas { width: 64px; height: 64px; }
.sr-hero b { font-size: 16px; }
.sr-hero small { font-size: 11px; line-height: 1.2; color: #6b6590; }
.sr-hero.on { border-color: var(--sr-violet); background: #fff; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(109, 93, 252, .25); }

.sr-grades { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.sr-grade { border: 2px solid #e4e0fb; background: #fff; border-radius: 14px; padding: 6px 2px; cursor: pointer; font: inherit; color: inherit;
  display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.sr-grade b { font-size: 18px; font-weight: 900; }
.sr-grade small { font-size: 10px; color: #6b6590; }
.sr-grade.on { background: var(--sr-violet); border-color: var(--sr-violet); color: #fff; }
.sr-grade.on small { color: #e6e1ff; }
.sr-grade, .sr-mode { transition: transform .12s, background .12s, border-color .12s; }
/* úrovně 15+: objeví se po klepnutí na dlaždici 15+ */
.sr-levelbox { margin-top: 10px; animation: sr-level-in .22s ease-out; }
.sr-levelbox[hidden] { display: none; }
@keyframes sr-level-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.sr-levels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.sr-level { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px 10px; border: 2px solid #e4e0fb; border-radius: 14px; background: #fff; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: transform .12s, background .12s, border-color .12s; }
.sr-level i { font-style: normal; font-size: 22px; line-height: 1; }
.sr-level span { display: flex; flex-direction: column; min-width: 0; }
.sr-level b { font-size: 15px; font-weight: 900; line-height: 1.15; }
.sr-level small { font-size: 11px; line-height: 1.2; color: #6b6590; }
.sr-level.on { background: var(--sr-violet); border-color: var(--sr-violet); color: #fff; transform: scale(1.02); box-shadow: 0 6px 14px rgba(109, 93, 252, .35); }
.sr-level.on small { color: #e6e1ff; }
.sr-level-16.on { background: linear-gradient(135deg, #f97316, #db2777); border-color: #db2777; box-shadow: 0 6px 14px rgba(219, 39, 119, .35); }
.sr-level-note { margin: 6px 0 0; text-align: center; }
@media (prefers-reduced-motion: reduce) { .sr-levelbox { animation: none; } }
@media (min-width: 720px) { .sr-levels { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sr-grade.on { transform: scale(1.08); box-shadow: 0 6px 14px rgba(109, 93, 252, .35); }
.sr-worlds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sr-world { border: 2px solid #e4e0fb; background: #fff; border-radius: 16px; padding: 6px 2px 7px; cursor: pointer; font: inherit; color: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 1px; line-height: 1.15; transition: transform .12s, background .12s; }
.sr-world b { font-size: 24px; }
.sr-world span { font-size: 12px; font-weight: 800; text-align: center; overflow-wrap: anywhere; } /* 8 světů = 2 řady po 4, dlouhé názvy na 2 řádky */
.sr-world small { font-size: 9.5px; color: #6b6590; }
.sr-world.on { border-color: var(--sr-violet); background: #f3f0ff; transform: scale(1.06); box-shadow: 0 6px 16px rgba(109, 93, 252, .25); }
.sr-world:disabled { cursor: default; opacity: .55; }
.sr-note { margin: 6px 0 0; font-size: 12px; color: #6b6590; }
.sr-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sr-subjects { grid-template-columns: repeat(3, 1fr); }
.sr-subjects .sr-mode b { font-size: 15px; }
.sr-subjects .sr-ic { font-size: 20px; line-height: 1; }
.sr-mode { border: 2px solid #e4e0fb; background: #fff; border-radius: 16px; padding: 8px 8px 9px; cursor: pointer; font: inherit; color: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 2px; line-height: 1.2; }
.sr-mode b { font-size: 16px; font-weight: 900; }
.sr-mode small { font-size: 11px; color: #6b6590; }
.sr-mode.on { border-color: var(--sr-violet); background: #f3f0ff; box-shadow: 0 6px 16px rgba(109, 93, 252, .25); }

.sr-play { display: flex; flex-direction: column; align-items: center; width: 100%; margin: 16px 0 6px; padding: 14px 16px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 22px; font-weight: 900; color: #fff; background: linear-gradient(135deg, #ff6b9a, #ff8a3d);
  box-shadow: 0 6px 0 #c2410c, 0 12px 24px rgba(255, 107, 154, .4); transition: transform .08s, box-shadow .08s; }
.sr-play:active { transform: translateY(4px); box-shadow: 0 2px 0 #c2410c, 0 6px 14px rgba(255, 107, 154, .4); }
.sr-play small { font-size: 12px; font-weight: 700; opacity: .92; }
.sr-btn2 { display: inline-flex; justify-content: center; align-items: center; gap: 6px; width: 100%; margin: 6px 0; padding: 11px 14px; border-radius: 999px;
  border: 2px solid #e4e0fb; background: #fff; font: inherit; font-size: 15px; font-weight: 800; color: var(--sr-ink); cursor: pointer; text-decoration: none; }
.sr-row { display: flex; gap: 8px; }
.sr-link { margin-top: 10px; border: 0; background: none; font: inherit; font-weight: 700; color: #6b6590; cursor: pointer; text-decoration: underline; }

.sr-how { list-style: none; margin: 10px 0 4px; padding: 0; font-size: 13px; color: #4b4470; line-height: 1.45; }
.sr-how li::before { content: "• "; color: var(--sr-violet); }
.sr-how .sr-ctl { margin-top: 4px; font-weight: 800; }
.sr-how .sr-ctl::before { content: ""; }
.sr-toggles { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; }
.sr-tog, .sr-lang { border: 2px solid #e4e0fb; background: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 700; color: var(--sr-ink); cursor: pointer; }
.sr-tog[aria-pressed="false"] { opacity: .6; }
.sr-lang select { border: 0; background: none; font: inherit; color: inherit; }

.sr-score { display: flex; flex-direction: column; align-items: center; }
.sr-score b { font-size: 52px; font-weight: 900; line-height: 1.05; background: linear-gradient(135deg, #6d5dfc, #ec4899); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sr-score small { font-size: 13px; color: #6b6590; font-weight: 700; }
.sr-record { margin-top: 4px; padding: 4px 12px; border-radius: 999px; background: #fff3b0; color: #8a5a00; font-style: normal; font-weight: 900; animation: sr-pulse 1s ease-in-out infinite; }
@keyframes sr-pulse { 50% { transform: scale(1.07); } }
.sr-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 12px 0 4px; }
.sr-stats div { background: #f3f0ff; border-radius: 14px; padding: 8px 2px; display: flex; flex-direction: column; }
.sr-stats b { font-size: 18px; font-weight: 900; }
.sr-stats small { font-size: 10.5px; color: #6b6590; line-height: 1.15; }
.sr-mis { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; text-align: left; }
.sr-mis li { background: #fff7ed; border-radius: 12px; padding: 7px 12px; }
.sr-mis-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sr-why { margin: 4px 0 0; display: flex; gap: 6px; font-size: 14px; line-height: 1.3; font-weight: 600; color: #4c3fb5; overflow-wrap: anywhere; }
.sr-why i { font-style: normal; }
.sr-mis b { font-size: 17px; }
.sr-mis mark { background: #dcfce7; color: #15803d; border-radius: 6px; padding: 0 4px; }
.sr-mis small { font-size: 12px; color: #9a3412; white-space: nowrap; }
.sr-bridge { display: block; margin-top: 12px; padding: 12px; border-radius: 16px; background: linear-gradient(135deg, #ede9fe, #e0f2fe);
  color: var(--sr-ink); text-decoration: none; font-size: 13.5px; line-height: 1.4; }
.sr-bridge b { color: var(--sr-violet); white-space: nowrap; }

/* Upoutávka nad odpočtem (promo.js, Lanvura Partner): klidná kartička nahoře, vždy štítek a „Proč to vidím?“,
   žádné blikání ani zvuk; Přeskočit dole velké (≥ 44 px). Pod tlačítkem pauzy, nad canvasem. */
.sr-promo { position: fixed; z-index: 4; top: calc(var(--sat) + 60px); left: 50%; transform: translateX(-50%);
  width: min(520px, calc(100% - 32px)); background: rgba(255, 255, 255, .95); border-radius: 22px; padding: 8px 12px 12px;
  box-shadow: 0 16px 44px rgba(31, 24, 70, .32); backdrop-filter: blur(8px); text-align: left; animation: sr-promo-in .45s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes sr-promo-in { from { transform: translate(-50%, -24px); opacity: 0; } }
.sr-promo-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; font-size: 11.5px; color: #6b6590; }
.sr-promo-label { font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding-top: 3px; }
.sr-promo-why { text-align: right; max-width: 70%; }
.sr-promo-why summary { cursor: pointer; text-decoration: underline; list-style: none; padding: 2px 0; }
.sr-promo-why summary::-webkit-details-marker { display: none; }
.sr-promo-why p { margin: 4px 0 6px; text-align: left; font-size: 12px; line-height: 1.35; color: #4b4470; }
.sr-promo-body { display: flex; gap: 12px; align-items: center; margin-top: 4px; color: var(--sr-ink); text-decoration: none; }
.sr-promo-img { width: clamp(96px, 30vw, 132px); height: auto; flex: none; filter: drop-shadow(0 6px 10px rgba(31, 24, 70, .18)); transform: rotate(-3deg); }
.sr-promo-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
/* štítek kreativy (ZDARMA, ZADARMO, FREE…): žlutá pilulka s lehkým náklonem — první, co oko uvidí */
.sr-promo-badge { align-self: flex-start; padding: 3px 11px 2px; border-radius: 999px; background: #ffd23f; color: #1a1033; font-weight: 900;
  font-size: 13px; letter-spacing: .08em; text-transform: uppercase; line-height: 1.25; box-shadow: 0 3px 0 #e0a800, 0 6px 14px rgba(255, 186, 0, .35);
  transform: rotate(-2deg); animation: sr-badge-pop .5s .25s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes sr-badge-pop { from { transform: rotate(-2deg) scale(.4); opacity: 0; } }
.sr-promo-headline { font-size: clamp(17px, 4.6vw, 22px); line-height: 1.15; font-weight: 900; }
.sr-promo-claim { font-size: 13.5px; line-height: 1.3; color: #4b4470; }
.sr-promo-cta { align-self: flex-start; margin-top: 4px; padding: 9px 14px; min-height: 40px; border-radius: 999px; background: var(--sr-violet); color: #fff;
  font-weight: 900; font-size: 14px; line-height: 22px; box-shadow: 0 4px 0 #4b3fd1; }
.sr-promo-skip { position: fixed; z-index: 4; left: 50%; bottom: calc(var(--sab) + 22px); transform: translateX(-50%); min-height: 48px; padding: 0 26px;
  border: 0; border-radius: 999px; background: rgba(31, 24, 70, .78); color: #fff; font: 900 17px var(--lv-font-rounded, system-ui); cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.sr-promo-skip:focus-visible, .sr-promo a:focus-visible, .sr-promo summary:focus-visible { outline: 3px solid #ffd23f; outline-offset: 2px; }
@media (orientation: landscape) and (max-height: 500px) {
  .sr-promo { top: calc(var(--sat) + 8px); width: min(560px, calc(100% - 140px)); padding: 6px 10px 8px; }
  .sr-promo-img { width: 76px; } .sr-promo-claim { display: none; } .sr-promo-skip { bottom: 12px; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sr-card { background: rgba(28, 24, 58, .94); color: #f3f0ff; }
  :root:not([data-theme="light"]) .sr-tag, :root:not([data-theme="light"]) .sr-how { color: #cfc8f5; }
  :root:not([data-theme="light"]) .sr-hero, :root:not([data-theme="light"]) .sr-stats div { background: #2b2560; }
  :root:not([data-theme="light"]) .sr-hero.on, :root:not([data-theme="light"]) .sr-grade, :root:not([data-theme="light"]) .sr-btn2,
  :root:not([data-theme="light"]) .sr-tog, :root:not([data-theme="light"]) .sr-lang { background: #221d4f; border-color: #3b3480; color: #f3f0ff; }
  :root:not([data-theme="light"]) .sr-hero small, :root:not([data-theme="light"]) .sr-grade small, :root:not([data-theme="light"]) .sr-stats small,
  :root:not([data-theme="light"]) .sr-score small { color: #b8b0e8; }
  :root:not([data-theme="light"]) .sr-mis li { background: #3a2a2a; }
  :root:not([data-theme="light"]) .sr-world { background: #221d4f; border-color: #3b3480; color: #f3f0ff; }
  :root:not([data-theme="light"]) .sr-world.on { background: #3b2f96; border-color: #a79bff; }
  :root:not([data-theme="light"]) .sr-world small, :root:not([data-theme="light"]) .sr-note { color: #b8b0e8; }
  :root:not([data-theme="light"]) .sr-mode { background: #221d4f; border-color: #3b3480; color: #f3f0ff; }
  :root:not([data-theme="light"]) .sr-mode small { color: #b8b0e8; }
  /* vybraná třída / režim musí být vidět i v tmavém režimu (dřív je přebilo tmavé pozadí tlačítek) */
  :root:not([data-theme="light"]) .sr-grade.on { background: var(--sr-violet); border-color: #a79bff; color: #fff; }
  :root:not([data-theme="light"]) .sr-level { background: #221d4f; border-color: #3b3480; color: #f3f0ff; }
  :root:not([data-theme="light"]) .sr-level small { color: #c9c3ee; }
  :root:not([data-theme="light"]) .sr-level.on { background: var(--sr-violet); border-color: #a79bff; color: #fff; }
  :root:not([data-theme="light"]) .sr-level-16.on { background: linear-gradient(135deg, #f97316, #db2777); border-color: #fb7185; }
  :root:not([data-theme="light"]) .sr-grade.on small { color: #e6e1ff; }
  :root:not([data-theme="light"]) .sr-mode.on { background: #3b2f96; border-color: #a79bff; }
  :root:not([data-theme="light"]) .sr-mis small { color: #fdba74; }
  :root:not([data-theme="light"]) .sr-why { color: #c4b5fd; }
  :root:not([data-theme="light"]) .sr-bridge { background: linear-gradient(135deg, #2e2470, #12355a); color: #f3f0ff; }
  :root:not([data-theme="light"]) .lv-logo-light { display: none; }
  :root:not([data-theme="light"]) .lv-logo-dark { display: inline; }
  :root:not([data-theme="light"]) .sr-promo { background: rgba(27, 23, 64, .95); }
  :root:not([data-theme="light"]) .sr-promo-body, :root:not([data-theme="light"]) .sr-promo-headline { color: #f3f0ff; }
  :root:not([data-theme="light"]) .sr-promo-claim, :root:not([data-theme="light"]) .sr-promo-why p { color: #c9c2f0; }
  :root:not([data-theme="light"]) .sr-promo-head { color: #b8b0e8; }
}
@media (max-height: 640px) and (orientation: portrait) {
  .sr-tag { font-size: 13.5px; margin-bottom: 6px; } .sr-hero canvas { width: 56px; height: 56px; } .sr-how { display: none; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .sr-card { max-width: 640px; padding: 12px 16px; } .sr-title { font-size: 36px; } .sr-how { display: none; }
  .sr-grades { grid-template-columns: repeat(12, 1fr); } .sr-hero canvas { width: 48px; height: 48px; }
}
@media (prefers-reduced-motion: reduce) { .sr-card, .sr-record, .sr-promo { animation: none; } .sr-promo-img { transform: none; } .sr-promo-badge { animation: none; } }

/* dotykové ovládání: ◀ SKOK ▶ v jedné řadě pod hrdinou (polohu nastavuje main.js placeTouch) */
.sr-touch { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
.sr-touch[hidden] { display: none; }
.sr-touch.sr-dim .sr-tbtn, .sr-touch.sr-dim .sr-tjump { opacity: 0; pointer-events: none; transition: opacity .15s; }
.sr-tbtn, .sr-tjump { position: absolute; pointer-events: auto; border: 2.5px solid rgba(255,255,255,.95); color: #1f1846; cursor: pointer;
  background: rgba(255,255,255,.32); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); box-shadow: 0 4px 14px rgba(31,24,70,.22);
  touch-action: none; -webkit-tap-highlight-color: transparent; transition: transform .08s, background .08s; }
.sr-tbtn { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; transform: translateY(-50%); }
.sr-tleft { left: max(10px, env(safe-area-inset-left)); }
.sr-tright { right: max(10px, env(safe-area-inset-right)); }
.sr-tbtn svg, .sr-tjump svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.sr-tjump { left: 50%; transform: translate(-50%, -50%); min-width: 132px; height: 48px; padding: 0 18px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 900; font-size: 1rem; letter-spacing: .04em; text-transform: uppercase; }
.sr-tjump svg { width: 22px; height: 22px; }
.sr-tbtn.on { transform: translateY(-50%) scale(.9); background: rgba(255,210,63,.75); }
.sr-tjump.on { transform: translate(-50%, -50%) scale(.93); background: rgba(255,210,63,.75); }

/* STOP po chybě: stejné místo jako SKOK (ten je v tu chvíli skrytý), po zastavení se z něj stane zelené Pokračujeme */
.sr-stop { position: fixed; z-index: 6; left: 50%; transform: translate(-50%, -50%); min-width: 132px; height: 48px; padding: 0 20px; border-radius: 999px; border: 2.5px solid #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: #e5484d; color: #fff; box-shadow: 0 4px 14px rgba(31,24,70,.3);
  font: inherit; font-weight: 900; font-size: 1rem; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; touch-action: none; -webkit-tap-highlight-color: transparent; animation: sr-net-in .15s ease-out; }
.sr-stop[hidden] { display: none; }
.sr-stop.sr-stop-go { background: #15803d; }
.sr-stop kbd { padding: 1px 7px; border-radius: 7px; background: rgba(255,255,255,.22); font: inherit; font-size: .68rem; font-weight: 800; letter-spacing: 0; text-transform: none; }
.sr-stop kbd:empty { display: none; }

/* výběr jazyka vlajkami úplně nahoře v menu (majitel 4. 11.: Němec musí hned rozumět; jazyk mění i obsah učení) */
.sr-langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; margin: 6px 0 2px; }
.sr-flag { width: 36px; height: 28px; padding: 3px; border-radius: 9px; border: 2px solid transparent; background: transparent; cursor: pointer; opacity: .55; transition: transform .12s, opacity .12s, border-color .12s; }
.sr-flag .flag, .sr-flag svg { display: block; width: 100%; height: 100%; border-radius: 4px; box-shadow: 0 0 0 1px rgba(31,24,70,.15); }
.sr-flag:hover { opacity: .9; transform: translateY(-1px); }
.sr-flag.on { opacity: 1; border-color: #6d5dfc; background: rgba(109,93,252,.12); transform: scale(1.08); }

/* Telefon na šířku (třída sr-side a čísla --sr-col, --sr-cx z main.js resize, render.js sideLayout): úloha ve sloupci vlevo, cesta vpravo.
   Ovládání je nad cestou, v HTML prvky sloupce (upoutávka, proužek bez sítě, karta soupeře) sedí ve sloupci. */
.sr-side .sr-pause-btn { right: calc(var(--sar) + 12px); }
.sr-side .sr-tjump, .sr-side .sr-stop { left: var(--sr-cx); }
.sr-side .sr-tleft { left: calc(var(--sal) + 10px); } /* majitel 5. 11.: levý palec, u kraje obrazovky pod úlohou */
.sr-side .sr-tright { right: calc(var(--sar) + 8px); }
.sr-side .sr-tbtn { width: 52px; height: 52px; }
.sr-side .sr-tjump, .sr-side .sr-stop { min-width: 116px; height: 46px; padding: 0 14px; }
.sr-side .sr-net.sr-net-land { left: calc(var(--sal) + 10px); bottom: calc(var(--sab) + 8px); width: calc(var(--sr-col) - var(--sal) - 20px); max-width: none; box-sizing: border-box; text-align: center; }
.sr-side .sr-promo { left: calc(var(--sal) + 10px); top: calc(var(--sat) + 8px); width: calc(var(--sr-col) - var(--sal) - 20px); box-sizing: border-box; transform: none; animation: none;
  max-height: calc(100% - var(--sat) - var(--sab) - 72px); overflow-y: auto; }
.sr-side .sr-promo-img { width: 64px; }
.sr-side .sr-promo-headline { font-size: 17px; overflow-wrap: anywhere; }
.sr-side .sr-promo-cta { padding: 6px 12px; min-height: 34px; font-size: 13px; line-height: 20px; white-space: nowrap; }
.sr-side .sr-promo-skip { left: calc(var(--sal) + (var(--sr-col) - var(--sal)) / 2); bottom: calc(var(--sab) + 8px); min-height: 44px; }
.sr-side .dl-ghost, .sr-side .dl-rank { left: calc(var(--sal) + 10px); top: auto; bottom: calc(var(--sab) + 8px); width: calc(var(--sr-col) - var(--sal) - 20px); box-sizing: border-box;
  flex-direction: row; justify-content: center; gap: 8px; padding: 4px 10px; }
.sr-side .dl-ghost canvas { width: 30px; height: 30px; flex: none; }
.sr-side .dl-gbar { flex: 1 1 24px; min-width: 16px; }
/* dotyk: šipka ◀ stojí vlevo dole ve sloupci, proužek, Přeskočit a karta soupeře jdou vedle ní */
@media (pointer: coarse) {
  .sr-side .sr-net.sr-net-land, .sr-side .dl-ghost, .sr-side .dl-rank { left: calc(var(--sal) + 70px); width: calc(var(--sr-col) - var(--sal) - 80px); }
  .sr-side .sr-promo-skip { left: calc(var(--sal) + 70px + (var(--sr-col) - var(--sal) - 80px) / 2); }
}
.sr-side .dl-glead, .sr-side .dl-gtime, .sr-side .dl-gcombo { white-space: nowrap; }
.sr-side .dl-gname { min-width: 0; }
@media (max-width: 700px) { .sr-side .dl-gname, .sr-side .dl-gcombo { display: none; } .sr-side .dl-ghost { gap: 5px; padding: 4px 8px; } .sr-side .dl-gbar { min-width: 10px; } }

/* ── vánoční edice (html[data-sr-festive="xmas"], docs/specs/games-vanoce.md): sníh a světýlka v menu, červeno-zelené
   barvy, karta světa „Vánoční městečko“. Během hry sníh a světýlka kreslí canvas (render.js drawSnowfall), DOM vrstvy se schovají. ── */
.sr-fsnow, .sr-flights { position: fixed; left: 0; right: 0; pointer-events: none; z-index: 11; }
.sr-fsnow { inset: 0; overflow: hidden; }
.sr-fsnow i { position: absolute; top: -14px; left: calc(var(--x) * 100%); width: calc(var(--s) * 7px); height: calc(var(--s) * 7px); border-radius: 50%;
  background: #fff; opacity: .8; box-shadow: 0 0 4px rgba(255, 255, 255, .8); animation: sr-snow var(--t) linear var(--d) infinite; will-change: transform; }
@keyframes sr-snow { to { transform: translate3d(calc(var(--s) * 26px - 13px), 108vh, 0); } }
.sr-flights { top: var(--sat); display: flex; justify-content: space-around; height: 22px; }
.sr-flights::before { content: ""; position: absolute; left: 0; right: 0; top: 3px; height: 10px; border-bottom: 2px solid rgba(20, 40, 30, .55); border-radius: 0 0 50% 50% / 0 0 100% 100%; }
.sr-flights b { width: 8px; height: 12px; margin-top: 8px; border-radius: 45% 45% 50% 50%; background: #ef4444; box-shadow: 0 0 10px 2px rgba(239, 68, 68, .7); animation: sr-twinkle 2.6s ease-in-out infinite alternate; }
.sr-flights b:nth-child(4n+2) { background: #facc15; box-shadow: 0 0 10px 2px rgba(250, 204, 21, .7); margin-top: 11px; animation-delay: -.9s; }
.sr-flights b:nth-child(4n+3) { background: #22c55e; box-shadow: 0 0 10px 2px rgba(34, 197, 94, .7); animation-delay: -1.7s; }
.sr-flights b:nth-child(4n) { background: #3b82f6; box-shadow: 0 0 10px 2px rgba(59, 130, 246, .7); margin-top: 11px; animation-delay: -.4s; }
@keyframes sr-twinkle { from { opacity: .55; } to { opacity: 1; } }
@media (max-width: 420px) { .sr-flights b:nth-child(n+11) { display: none; } }
@media (prefers-reduced-motion: reduce) { .sr-fsnow i { animation: none; top: calc(var(--x) * 88%); } .sr-flights b { animation: none; } }
html[data-sr-playing] .sr-fsnow, html[data-sr-playing] .sr-flights { display: none; }
html[data-sr-festive] .sr-screen { padding-top: calc(var(--sat) + 30px); background: linear-gradient(180deg, rgba(8, 40, 30, .28), rgba(60, 12, 28, .38)); }
html[data-sr-festive] .sr-card { border: 2px solid rgba(214, 40, 57, .35); box-shadow: 0 20px 60px rgba(31, 24, 70, .3), 0 0 0 4px rgba(34, 197, 94, .18); }
html[data-sr-festive] .sr-title span { background: linear-gradient(135deg, #d62839, #15803d); -webkit-background-clip: text; background-clip: text; }
html[data-sr-festive] .sr-title::after { content: "🎅"; position: absolute; margin: -14px 0 0 -4px; font-size: .46em; transform: rotate(18deg); -webkit-text-fill-color: initial; }
html[data-sr-festive] .sr-title { position: relative; display: inline-block; }
html[data-sr-festive] .sr-play { background: linear-gradient(135deg, #d62839, #b91c3a); box-shadow: 0 6px 0 #7f1d1d, 0 12px 24px rgba(214, 40, 57, .4); }
html[data-sr-festive] .sr-play:active { box-shadow: 0 2px 0 #7f1d1d, 0 6px 14px rgba(214, 40, 57, .4); }
html[data-sr-festive] .sr-hero.on, html[data-sr-festive] .sr-mode.on { border-color: #d62839; background: #fff1f2; box-shadow: 0 6px 16px rgba(214, 40, 57, .22); }
html[data-sr-festive] .sr-grade.on, html[data-sr-festive] .sr-level.on { background: #d62839; border-color: #d62839; color: #fff; box-shadow: 0 6px 14px rgba(214, 40, 57, .35); }
html[data-sr-festive] .sr-world.on { border-color: #d62839; background: #fff1f2; box-shadow: 0 6px 16px rgba(214, 40, 57, .22); }
.sr-xmas-tag { margin: 0 0 10px; font-size: 13.5px; font-weight: 800; color: #b91c3a; }
.sr-worlds .sr-world-xmas { grid-column: 1 / -1; flex-direction: row; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 9px 12px;
  border-color: #15803d; background: linear-gradient(135deg, #ecfdf5, #fff1f2); position: relative; overflow: hidden; }
.sr-worlds .sr-world-xmas span { font-size: 15px; }
.sr-worlds .sr-world-xmas small { font-size: 11px; font-weight: 800; color: #fff; background: #d62839; border-radius: 999px; padding: 2px 8px; }
.sr-worlds .sr-world-xmas::after { content: "✨"; position: absolute; right: 10px; top: 4px; animation: sr-twinkle 1.6s ease-in-out infinite alternate; }
.sr-xmas-note { color: #15803d; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sr-worlds .sr-world-xmas { background: linear-gradient(135deg, #0f3d2a, #4a1020); border-color: #22c55e; color: #fff; }
  :root:not([data-theme="light"])[data-sr-festive] .sr-world.on, :root:not([data-theme="light"])[data-sr-festive] .sr-hero.on, :root:not([data-theme="light"])[data-sr-festive] .sr-mode.on { background: #4a1020; border-color: #f87171; }
  :root:not([data-theme="light"])[data-sr-festive] .sr-grade.on, :root:not([data-theme="light"])[data-sr-festive] .sr-level.on { background: #d62839; border-color: #fca5a5; color: #fff; }
  :root:not([data-theme="light"]) .sr-xmas-tag { color: #fca5a5; } :root:not([data-theme="light"]) .sr-xmas-note { color: #86efac; }
}
