/* Simulační studio KROK – stránka cviku (dřep). Vzhled 1:1 podle webu KROK (docs/STUDIO-DESIGN.md):
   světle šedá stránka, bílé karty bez rámečku a stínu, tmavá zaoblená scéna s jemnou oranžovou září,
   Familjen Grotesk + kurzíva Instrument Serif, jediný akcent oranžová s tmavým textem.
   Třídy zn-/trn-/ovw- jsou převzaté z klientské zóny webu, nové prvky studia mají předponu st-. */

/* =========================================================================================
   1. Tokeny (STUDIO-DESIGN.md, kap. 1.1)
   ========================================================================================= */
:root {
  --bg: #f3f3f1;
  --card: #ffffff;
  --soft: #ebebe7;
  --ink: #151515;
  --ink-2: #5d5d59;
  --ink-3: #6b6b66;
  --line: #e0e0db;
  --dark: #111111;
  --dark-2: #1c1c1c;
  --dark-3: #2a2a2a;
  --on-dark-2: rgba(255, 255, 255, .66);
  --dark-line: rgba(255, 255, 255, .1);
  --accent: #ff5a1f;
  --accent-hover: #ff6d36;
  --accent-deep: #c9400c;
  --accent-soft: #ffe8dd;
  --on-accent: #151515;

  --display: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 76px;
  --r-sm: 14px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-xl: clamp(24px, 3vw, 40px);

  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 32px -16px rgba(0, 0, 0, .14);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .04), 0 30px 60px -24px rgba(0, 0, 0, .22);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.7, 0, .2, 1);
  --spring: linear(0, .5 12%, .95 25%, 1.06 35%, 1.01 50%, .995 65%, 1);
  interpolate-size: allow-keywords;

  --shadow-float: 0 18px 40px -16px rgba(0, 0, 0, .5);
  --shadow-sheet: 0 30px 80px -20px rgba(0, 0, 0, .4);
  --shadow-pill: 0 8px 18px -10px rgba(0, 0, 0, .6);
  --shadow-dock: 0 20px 50px -18px rgba(0, 0, 0, .35), 0 0 0 1px rgba(0, 0, 0, .05);
  --ring-accent: 0 0 0 5px rgba(255, 90, 31, .32);

  --on-dark-1: #ffffff;
  --on-dark-78: rgba(255, 255, 255, .78);
  --on-dark-50: rgba(255, 255, 255, .5);

  --st-stage: #111111;
  --st-stage-hi: #1c1c1c;
  --st-act-0: #2a2a2a;
  --st-act-1: #5c2a17;
  --st-act-2: #c9400c;
  --st-act-3: #ff5a1f;
  --st-act-4: #ffb089;
  --st-act-scale: linear-gradient(90deg, var(--st-act-0), var(--st-act-1) 25%, var(--st-act-2) 50%, var(--st-act-3) 75%, var(--st-act-4));

  --glass-dark: rgba(17, 17, 17, .5);
  --dock-space: 0px;
  --peek-h: 88px;   /* náhled spodního listu na telefonu (layout.js ho čte při táhnutí) */
}

/* =========================================================================================
   2. Základ (globals.css webu)
   ========================================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
html.lock { overflow: hidden; }
img, canvas, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; margin: 0; -webkit-tap-highlight-color: transparent; }
input { font: inherit; }
h1, h2, h3, p, figure, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
/* Fokus: na světlém --accent-deep (4,5 : 1 vůči --bg; --accent má jen 2,8 : 1, WCAG 1.4.11), na tmavém --accent */
:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 3px; }
.st-stage :focus-visible, .zn-card--dark :focus-visible { outline-color: var(--accent); }
::selection { background: var(--accent); color: var(--on-accent); }
[hidden] { display: none !important; }
.ic { width: 1em; height: 1em; flex: none; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 200; padding: 10px 16px; border-radius: 8px; background: var(--ink); color: #fff; font-weight: 600; }
.skip:focus { left: 8px; }

/* Logo (Logo.tsx): oranžové schodiště + nápis */
.logo { display: inline-flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 700; font-size: 1.5rem; letter-spacing: -.045em; line-height: 1; color: var(--ink); }
.logo svg { width: 25px; height: auto; }

/* =========================================================================================
   3. Prvky webu KROK (zona.css, globals.css)
   ========================================================================================= */
.zn { min-height: 100svh; display: flex; flex-direction: column; }
.zn-bar { position: sticky; top: 0; z-index: 50; height: var(--header-h); transition: background-color .3s var(--ease), box-shadow .3s var(--ease); }
.zn-bar::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; background: rgba(243, 243, 241, .86); -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); box-shadow: 0 1px 0 var(--line); transition: opacity .3s var(--ease); }
.zn-bar.is-solid::before { opacity: 1; }
.zn-bar__in { height: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; animation: zn-down 1s .05s var(--ease-out) both; }
.st-home { justify-self: start; display: inline-flex; border-radius: 10px; }
.st-back { justify-self: end; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px 0 14px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); font-family: var(--display); font-weight: 600; font-size: .9375rem; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; transition: background-color .25s var(--ease), color .25s var(--ease), box-shadow .3s var(--ease-out); }
.st-back .ic { width: 17px; height: 17px; transition: transform .3s var(--ease-out); }
@media (hover: hover) { .st-back:hover { background: var(--ink); color: #fff; } .st-back:hover .ic { transform: translateX(-3px); } }

.zn-main { flex: 1; padding-block: clamp(12px, 2.5vw, 28px) clamp(32px, 4vw, 48px); }   /* dole jen patička, žádný prázdný pruh */
.zn-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 32px; margin-bottom: clamp(20px, 3vw, 36px); }
.zn-head__ctx { margin-bottom: 10px; font-size: .9375rem; font-weight: 500; color: var(--ink-3); }
.zn-title { font-family: var(--display); font-weight: 500; font-size: clamp(2.25rem, 1.5rem + 2.6vw, 3.75rem); letter-spacing: -.045em; line-height: 1; text-wrap: balance; }
.zn-title em { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.06em; letter-spacing: -.01em; color: var(--accent); padding-right: .04em; }

/* Nadpis po slovech (Title.tsx) */
.words .w { display: inline-block; overflow: hidden; vertical-align: top; padding: .14em .1em .16em 0; margin: -.14em -.1em -.16em 0; }
.words .w > * { display: inline-block; }
.js .words .w > * { transform: translateY(105%) rotate(3deg); transform-origin: 0 100%; transition: transform .9s var(--ease-out); transition-delay: calc(var(--wi, 0) * 55ms); }
.js .words .w:has(> em) > * { transition-duration: 1.1s; transition-timing-function: var(--spring); transition-delay: calc(var(--wi, 0) * 55ms + 140ms); }
.js .words.is-in .w > * { transform: none; }

/* Tlačítka */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 56px; padding: 0 30px; border-radius: 999px; font-family: var(--display); font-weight: 600; font-size: 1.0625rem; letter-spacing: -.01em; white-space: nowrap; transition: background-color .2s var(--ease), color .2s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease), border-color .2s var(--ease); }
.btn .ic { width: 18px; height: 18px; }
.btn-accent, .btn-dark { position: relative; overflow: hidden; isolation: isolate; }
.btn-accent::after, .btn-dark::after { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg); transition: left .7s var(--ease-out); pointer-events: none; }
.btn-accent { background: var(--accent); color: var(--on-accent); box-shadow: 0 4px 0 var(--accent-deep); }
.btn-dark { background: var(--ink); color: #fff; }
@media (hover: hover) {
  .btn-accent:hover::after, .btn-dark:hover::after { left: 130%; }
  .btn-accent:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 6px 0 var(--accent-deep), 0 16px 30px -12px rgba(255, 90, 31, .55); }
}
.btn-accent:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--accent-deep); }

/* Mřížka, karty, popisky, čísla, čipy, měřidla, kruh */
.zn-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.zn-card { position: relative; min-width: 0; border-radius: 26px; padding: clamp(18px, 2vw, 24px); background: var(--card); }
.zn-card--dark { isolation: isolate; overflow: hidden; background: radial-gradient(70% 60% at 100% 0%, rgba(255, 90, 31, .22), transparent 70%), var(--dark); color: #fff; }
.zn-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.zn-card__title { font-family: var(--display); font-weight: 600; font-size: 1.1875rem; letter-spacing: -.02em; line-height: 1.2; }
.zn-card__meta { font-size: .8125rem; color: var(--ink-3); white-space: nowrap; }
.zn-card--dark .zn-card__meta { color: var(--on-dark-2); }
.zn-label { display: flex; align-items: center; gap: 7px; font-size: .8125rem; font-weight: 600; color: var(--ink-2); line-height: 1.3; }
.zn-label .ic { width: 16px; height: 16px; color: var(--accent); }
.zn-big { font-family: var(--display); font-weight: 600; font-size: clamp(1.875rem, 1.5rem + 1vw, 2.5rem); letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.zn-big small { font-size: .9375rem; font-weight: 500; letter-spacing: 0; color: var(--ink-3); }
.zn-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; background: var(--bg); font-size: .75rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.zn-chip .ic { width: 14px; height: 14px; }
.zn-chip--accent { background: var(--accent-soft); color: var(--accent-deep); }
.zn-chip--dark { background: var(--ink); color: #fff; }
.zn-meter { display: block; height: 10px; border-radius: 999px; background: #e3e3de; overflow: hidden; }
.zn-meter i { display: block; height: 100%; border-radius: inherit; background: var(--accent); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12); }
.zn-ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.zn-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.zn-ring circle { fill: none; stroke: var(--soft); stroke-width: var(--stroke); }
.zn-ring .zn-ring__on { stroke: var(--accent); stroke-linecap: round; transition: stroke-dasharray .9s var(--ease-out); animation: ring-in 1.2s .2s var(--ease-out) backwards; }
.zn-ring--dark circle { stroke: rgba(255, 255, 255, .16); }
.zn-ring--dark .zn-ring__on { stroke: var(--accent); }
.zn-ring__in { position: relative; display: grid; justify-items: center; text-align: center; line-height: 1.1; }
@keyframes ring-in { from { stroke-dasharray: 0 100; } }

@keyframes zn-up { from { opacity: 0; transform: translateY(24px); filter: blur(6px); } }
@keyframes zn-down { from { opacity: 0; transform: translateY(-14px); } }
@keyframes trn-swap { from { opacity: 0; transform: translateY(.35em); filter: blur(4px); } }
@keyframes trn-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes trn-halo { from { transform: scale(1); opacity: 1; } to { transform: scale(1.55); opacity: 0; } }
@keyframes trn-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 90, 31, .55); } 70%, 100% { box-shadow: 0 0 0 6px rgba(255, 90, 31, 0); } }
.zn-rise { animation: zn-up .9s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 70ms); }
.trn-swap { display: inline-block; animation: trn-swap .55s var(--ease-out) both; }

/* =========================================================================================
   4. Rozvržení stránky studia
   ========================================================================================= */
.st-head { margin-bottom: clamp(18px, 2.4vw, 28px); }
.st-head__txt { min-width: 0; }

/* ≥ 1100 px: levý sloupec (scéna + dlaždice) je přilepený celý a pravý sloupec má zhruba stejnou výšku,
   takže pod scénou nevzniká prázdný pruh (STUDIO-UX.md, kap. 3.3). Výška scény: scéna i lišta jsou celé
   v 1. obrazovce a přilepený sloupec se vejde do okna (scéna + 106 ≤ vh − 108). */
.st-grid { --stage-h: clamp(480px, calc(100svh - 236px), 760px); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: start; }
.st-col { grid-column: span 8; position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 12px; min-width: 0; }
.st-side { grid-column: span 4; display: grid; gap: 16px; min-width: 0; }
.st-below { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.st-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-height: 659px) { .st-col { position: relative; top: auto; } }

/* =========================================================================================
   5. Scéna (.st-stage) – tmavý zaoblený blok, canvas je průhledný a pozadí kreslí CSS
   ========================================================================================= */
.st-stage {
  position: relative; height: var(--stage-h);
  isolation: isolate; overflow: clip; border-radius: var(--r-xl); color: #fff;
  background:
    radial-gradient(42% 16% at 50% 90%, rgba(255, 90, 31, .14), transparent 70%),
    radial-gradient(70% 60% at 100% 0%, rgba(255, 90, 31, .12), transparent 70%),
    radial-gradient(60% 55% at 50% 42%, var(--st-stage-hi), var(--st-stage) 72%);
  -webkit-user-select: none; user-select: none;
  animation: st-open 1.1s var(--ease-io) both;
}
@keyframes st-open { from { clip-path: inset(0 3.5% 0 3.5% round 72px); } to { clip-path: inset(0 0 0 0 round var(--r-xl)); } }
.st-stage:focus { outline: none; }
.st-stage::before { content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 85%), rgba(255, 90, 31, .10), transparent 62%); opacity: 0; transition: opacity .6s var(--ease); }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) { .st-stage:hover::before { opacity: 1; } }
.st-stage::after { content: ""; position: absolute; inset: 0; z-index: 6; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); pointer-events: none; }
.st-stage > canvas { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.st-stage > canvas:focus-visible { outline: none; }
.st-stage > div:not(.st-hud):not(.st-loader) { z-index: 2; }   /* vrstva popisků (CSS2DRenderer) */

/* Načítání: kroužek a věta, při odkrytí se stáhne maskou (tmavé se neprolíná) */
.st-loader { position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; justify-items: center; gap: 14px; pointer-events: none;
  font-size: .8125rem; font-weight: 600; color: var(--on-dark-78); transition: opacity .5s var(--ease), visibility 0s .5s; }
.st-loader__ring { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .14); border-top-color: var(--accent); animation: st-spin .9s linear infinite; }
.st-loader.is-done { opacity: 0; visibility: hidden; }
.st-loader.is-error .st-loader__ring { animation: none; border-color: rgba(255, 255, 255, .14); }
.st-loader .st-retry { margin-top: 6px; }
/* chyba načítání (main.js nastaví .st[data-state=error]): ovládání bez scény nic nedělá → schovat */
.st[data-state="error"] .st-hud, .st[data-state="error"] .st-dock { visibility: hidden; }
@keyframes st-spin { to { transform: rotate(360deg); } }

/* HUD nad canvasem: kontejnery myš propouštějí, ovládací prvky ne */
.st-hud { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; gap: 14px; padding: clamp(14px, 1.6vw, 20px); pointer-events: none; }
.st-hud__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.st-hud__left { display: grid; justify-items: start; gap: 10px; min-width: 0; }
.st-hud__right { display: flex; align-items: flex-start; justify-content: flex-end; gap: 8px; }
.st-hud__bottom { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.st-views, .st-layers-wrap, .st-select--icon, .st-bar, .st-legend { pointer-events: auto; }

/* Segmentový přepínač na tmavém (řádky mapy aktivace): sklo, bílá pilulka, aktivní text tmavý */
.st-seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 5px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }
.st-seg__pill { position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / var(--n, 2)); border-radius: 999px;
  background: #fff; box-shadow: var(--shadow-pill); transform: translateX(calc(var(--k, 0) * 100%)); transition: transform .6s var(--ease-out); pointer-events: none; }
.st-seg button { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: 999px; font-family: var(--display); font-weight: 600; font-size: .9375rem; color: var(--on-dark-2); white-space: nowrap; transition: color .35s var(--ease); }
.st-seg button .ic { width: 17px; height: 17px; }
.st-seg button[aria-pressed="true"] { color: var(--ink); }
.st-seg button[aria-pressed="true"] .ic { color: var(--accent); }
@media (hover: hover) { .st-seg button:not([aria-pressed="true"]):hover { color: #fff; } }
.st-seg button:focus-visible { outline: none; box-shadow: var(--ring-accent); }
.st-seg--sm { padding: 4px; }
.st-seg--sm .st-seg__pill { top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n, 2)); }
.st-seg--sm button { height: 34px; padding: 0 14px; font-size: .8125rem; }

/* Pohledy kamery: sklo s pilulkou měřenou podle šířky tlačítka (jako .zn-tabs) */
.st-views { position: relative; display: flex; gap: 2px; padding: 4px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }
.st-views__pill { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px; background: #fff; box-shadow: var(--shadow-pill);
  opacity: 0; transition: transform .6s var(--ease-out), width .6s var(--ease-out), opacity .3s; pointer-events: none; }
.st-views.is-measured .st-views__pill { opacity: 1; }
.st-views button { position: relative; z-index: 1; display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 13px; border-radius: 999px;
  font-family: var(--display); font-weight: 600; font-size: .8125rem; letter-spacing: -.005em; color: var(--on-dark-2); white-space: nowrap; transition: color .35s var(--ease); }
.st-views button[data-view="three-quarter"] { font-size: .9375rem; padding: 0 12px; }
.st-views button[aria-pressed="true"] { color: var(--ink); }
.st-views:not(.is-measured) button[aria-pressed="true"] { background: #fff; }
@media (hover: hover) { .st-views button:not([aria-pressed="true"]):hover { color: #fff; } }
.st-views button:focus-visible { outline: none; box-shadow: var(--ring-accent); }

/* Vrstvy: skleněná pilulka „Vrstvy“ (oranžová tečka = zapnutá vrstva navíc) a panel s vypínači pod ní
   (APG Disclosure; STUDIO-UX.md, kap. 3.9). Řádky 44 px, vypínač podle .shop-switch na tmavém. */
.st-layers-wrap { position: relative; }
.st-layers-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  font-family: var(--display); font-weight: 600; font-size: .875rem; color: var(--on-dark-78); white-space: nowrap;
  transition: background-color .25s var(--ease), color .25s var(--ease); }
.st-layers-btn .ic { width: 17px; height: 17px; }
.st-layers-btn[aria-expanded="true"] { background: #fff; color: var(--ink); box-shadow: var(--shadow-pill); }
@media (hover: hover) { .st-layers-btn[aria-expanded="false"]:hover { background: rgba(255, 255, 255, .16); color: #fff; } }
.st-layers-btn:focus-visible { outline: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), var(--ring-accent); }
.st-layers-btn__dot { position: absolute; top: 9px; left: 26px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px rgba(17, 17, 17, .8); }
.st-layers { position: absolute; top: calc(100% + 8px); right: 0; z-index: 3; display: grid; gap: 2px; width: 240px; padding: 8px; border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .14); background: rgba(17, 17, 17, .78); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .6); transform-origin: 100% 0; }
.st-layers:not(.is-open) { display: none; }
.st-layers.is-open { animation: menu-in .3s var(--ease-out) both; }
.st-tog { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; padding: 0 10px 0 12px; border-radius: 14px;
  font-size: .875rem; font-weight: 600; color: var(--on-dark-78); text-align: left; transition: background-color .25s var(--ease), color .25s var(--ease); }
.st-tog[aria-pressed="true"] { color: #fff; }
.st-tog__sw { position: relative; flex: none; width: 36px; height: 22px; border-radius: 999px; background: rgba(255, 255, 255, .18); transition: background-color .25s var(--ease); }
.st-tog__sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: translate .35s var(--ease-out); }
.st-tog[aria-pressed="true"] .st-tog__sw { background: var(--accent); }
.st-tog[aria-pressed="true"] .st-tog__sw::after { translate: 14px 0; }
@media (hover: hover) { .st-tog:hover { background: rgba(255, 255, 255, .08); color: #fff; } }
.st-tog:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }

/* Kulaté skleněné tlačítko (.pg__more) */
.st-glass-btn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .26); color: #fff; transition: background-color .25s var(--ease), color .25s var(--ease); }
.st-glass-btn .ic { width: 19px; height: 19px; }
.st-glass-btn[aria-pressed="true"], .st-glass-btn[aria-expanded="true"] { background: #fff; color: var(--ink); }
@media (hover: hover) { .st-glass-btn:hover { background: #fff; color: var(--ink); } }
.st-glass-btn:focus-visible { outline: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .26), var(--ring-accent); }

/* Legenda aktivace: vlevo nahoře, svisle na střed s ovládáním vpravo (44 px) */
.st-legend { display: inline-grid; grid-template-columns: auto auto 96px auto; align-items: center; gap: 9px; height: 30px; margin-top: 7px; padding: 0 12px; border-radius: 999px;
  background: rgba(0, 0, 0, .46); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-size: .6875rem; font-weight: 600; color: var(--on-dark-78); line-height: 1; white-space: nowrap; }
.st-legend b { font-weight: 600; color: #fff; margin-right: 3px; }
.st-legend i { height: 6px; border-radius: 999px; background: var(--st-act-scale); }

/* Tmavé sklo s tečkou (.trn-video__tag) – „Ukázka chyby“ */
.st-tag { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px 0 10px; border-radius: 999px;
  background: rgba(0, 0, 0, .46); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-size: .75rem; font-weight: 600; color: #fff; white-space: nowrap; }
.st-tag::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.st-fault-tag span { color: var(--on-dark-78); }
.st-fault-tag b { font-weight: 600; }
.st-fault-tag span::after { content: " ·"; }
.st-fault-tag:not([hidden]) { animation: trn-in .5s var(--ease-out) both; }

/* Fáze na scéně: titulek jako .trn-video__title, výměna slova trn-swap */
.st-now { display: grid; gap: 5px; min-width: 0; max-width: min(46ch, 60%); text-shadow: 0 1px 14px rgba(0, 0, 0, .45); }
.st-now__title { font-family: var(--display); font-weight: 500; font-size: clamp(1.75rem, 1.15rem + 1.5vw, 2.625rem); letter-spacing: -.04em; line-height: 1.02; }
.st-now__title > span { display: inline-block; }
.st-now__cue { font-size: .9375rem; line-height: 1.45; color: var(--on-dark-78); text-wrap: pretty; min-height: 1.45em; }
.st-now__cue > span, .st-swap-static { display: inline-block; }

/* =========================================================================================
   6. Lišta přehrávání (tmavé sklo ve scéně, bílé sklo ve spodní liště)
   ========================================================================================= */
.st-barslot { display: contents; }
.st-bar { display: flex; align-items: center; gap: 16px; padding: 10px 14px 10px 10px; border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, .14); background: var(--glass-dark);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .6); }

.st-play { position: relative; display: grid; place-items: center; width: 56px; height: 56px; flex: none; border-radius: 50%; background: var(--accent); color: var(--on-accent);
  box-shadow: 0 4px 0 var(--accent-deep), 0 22px 44px -14px rgba(255, 90, 31, .7); margin-bottom: 4px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s; }
.st-play .ic { width: 22px; height: 22px; }
.st-play__go { margin-left: 3px; }
.st-play__stop, .st[data-playing="true"] .st-play__go { display: none; }
.st[data-playing="true"] .st-play__stop { display: block; }
@media (hover: hover) { .st-play:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 6px 0 var(--accent-deep), 0 26px 50px -14px rgba(255, 90, 31, .75); } }
.st-play:active { transform: translateY(4px); box-shadow: 0 0 0 var(--accent-deep); }
.st-play:not(.is-started)::before { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid rgba(255, 90, 31, .7); animation: trn-halo 2.4s var(--ease-out) infinite; pointer-events: none; }
.st-play:focus-visible { outline-color: #fff; }

.st-scrub { position: relative; display: grid; gap: 4px; min-width: 0; flex: 1; padding-top: 6px; }
.st-range { --track: rgba(255, 255, 255, .16); appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 26px; margin: 0; background: transparent; cursor: pointer; touch-action: pan-y; }
.st-range:focus-visible { outline: none; }
.st-range::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--accent) var(--v, 0%), var(--track) var(--v, 0%)); }
.st-range::-moz-range-track { height: 6px; border-radius: 999px; background: var(--track); }
.st-range::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--accent); }
.st-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border: 0; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2), 0 3px 8px -3px rgba(0, 0, 0, .18); transition: box-shadow .25s var(--ease), scale .2s var(--ease); }
.st-range::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2), 0 3px 8px -3px rgba(0, 0, 0, .18); }
@media (hover: hover) { .st-range:hover::-webkit-slider-thumb { scale: 1.1; } }
.st-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 1px 3px rgba(0, 0, 0, .2), var(--ring-accent); }
.st-range:focus-visible::-moz-range-thumb { box-shadow: 0 1px 3px rgba(0, 0, 0, .2), var(--ring-accent); }

/* Fáze pod stopou (.trn-segs): šířka = délka fáze; popisek zmizí, když se nevejde (container query) */
.st-phases { display: flex; gap: 4px; }
.st-phases li { flex: var(--w, 1) 1 0; min-width: 0; container-type: inline-size; padding-top: 7px; border-top: 3px solid rgba(255, 255, 255, .16); border-radius: 2px;
  font-size: .6875rem; font-weight: 600; line-height: 1.2; color: var(--on-dark-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: border-color .3s var(--ease), color .3s var(--ease); }
.st-phases li span { display: block; overflow: hidden; text-overflow: ellipsis; }
@container (max-width: 30px) { .st-phases li span { visibility: hidden; } }
/* Poslední pás (Nahoře) je u pravého okraje: popisek smí přetéct doleva do volného konce předchozího pásu, ať není „Na…“ */
.st-phases li:last-child, .st-phases li:last-child span { overflow: visible; text-overflow: clip; direction: rtl; }
.st-phases li.is-done { border-top-color: rgba(255, 255, 255, .5); }
.st-phases li.is-now { border-top-color: var(--accent); color: #fff; }
/* Pás fáze je i tlačítko „skočit na začátek fáze“ (přes celý pás s popiskem) */
.st-phases li { position: relative; }
.st-phases__hit { position: absolute; inset: 0; padding: 0; border: 0; border-radius: 2px; background: none; color: inherit; cursor: pointer; }
.st-phases__hit:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (hover: hover) { .st-phases li:not(.is-now):hover { border-top-color: rgba(255, 255, 255, .42); color: #fff; } }

.st-time { flex: none; min-width: 4.6ch; font-family: var(--display); font-weight: 600; font-size: .9375rem; letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: #fff; text-align: right; padding-bottom: 18px; }

.st-speed { flex: none; margin-bottom: 18px; }
.st-speed select { min-width: 74px; font-variant-numeric: tabular-nums; }

/* Výběr (dropdown) v KROK stylu: stylovaný nativní <select>, v Chrome/Edge 135+ i rozbalený seznam
   (appearance: base-select). Jinde systémový seznam (STUDIO-UX.md, kap. 3.8). */
.st-select { position: relative; display: inline-grid; min-width: 0; }
.st-select select {
  appearance: none; -webkit-appearance: none; width: 100%; height: 40px; margin: 0; padding: 0 38px 0 16px;
  border: 0; border-radius: 999px; background: var(--bg); color: var(--ink);
  font: 600 .875rem/1 var(--display); letter-spacing: -.01em; text-overflow: ellipsis; white-space: nowrap; cursor: pointer;
  transition: background-color .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease);
}
.st-select__chev { position: absolute; right: 14px; top: 50%; width: 16px; height: 16px; translate: 0 -50%;
  color: var(--ink-3); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; transition: rotate .3s var(--ease-out); }
@media (hover: hover) { .st-select select:hover { background: var(--soft); } }
.st-select select:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ink), 0 0 0 6px var(--accent-soft); }
.st-select.is-set select { background: var(--accent-soft); color: #b8380a; }
.st-select.is-set .st-select__chev { color: #b8380a; }
.st-select select:disabled { opacity: .5; cursor: not-allowed; }
.st-select--sm select { height: 32px; padding: 0 30px 0 12px; font-size: .8125rem; }
.st-select--sm .st-select__chev { right: 10px; width: 14px; height: 14px; }
@media (pointer: coarse) { .st-select select { height: 44px; } .st-select--sm select { height: 40px; } }

/* tmavá varianta: scéna a lišta přehrávání (sklo jako .st-seg) */
.st-select--dark select { background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); color: #fff; color-scheme: dark; }
.st-select--dark .st-select__chev { color: var(--on-dark-2); }
@media (hover: hover) { .st-select--dark select:hover { background: rgba(255, 255, 255, .16); } }
.st-select--dark select:focus-visible { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), var(--ring-accent); }

@supports (appearance: base-select) {
  .st-select:not(.st-select--icon) select, .st-select:not(.st-select--icon) select::picker(select) { appearance: base-select; }
  .st-select:not(.st-select--icon) select { display: flex; align-items: center; }
  .st-select select::picker-icon { display: none; }
  .st-select select:open + .st-select__chev { rotate: 180deg; }
  .st-select select::picker(select) { margin-block: 6px; padding: 6px; border: 0; border-radius: 18px; background: #fff; box-shadow: var(--shadow-float); }
  .st-select option { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 12px; font: 500 .875rem/1.2 var(--body); color: var(--ink); cursor: pointer; }
  .st-select option:hover, .st-select option:focus-visible { background: var(--bg); outline: none; }
  .st-select option:checked { background: var(--ink); color: #fff; }
  .st-select option::checkmark { color: var(--accent); }
  .st-select option:disabled { color: var(--ink-3); cursor: not-allowed; }
  .st-select--dark select::picker(select) { background: rgba(17, 17, 17, .92); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 18px 40px -16px rgba(0, 0, 0, .6); }
  .st-select--dark option { color: #fff; }
  .st-select--dark option:hover, .st-select--dark option:focus-visible { background: rgba(255, 255, 255, .1); }
  .st-select--dark option:checked { background: #fff; color: var(--ink); }
  @media (prefers-reduced-motion: no-preference) {
    .st-select select::picker(select) { transition: opacity .25s var(--ease), translate .35s var(--ease-out), display .25s allow-discrete, overlay .25s allow-discrete; }
    @starting-style { .st-select select:open::picker(select) { opacity: 0; translate: 0 -6px; } }
  }
}

/* ikonový výběr pohledu na telefonu: nativní select přes kulaté sklo (systémový seznam) */
.st-select--icon { display: none; width: 44px; height: 44px; }
.st-select--icon select { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border-radius: 50%; opacity: 0; color: var(--ink); background: #fff; }
.st-select--icon:has(select:focus-visible) { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .26), var(--ring-accent); }

/* =========================================================================================
   7. Karty vpravo: fáze, svaly, technika
   ========================================================================================= */
.st-card { scroll-margin-top: calc(var(--header-h) + 16px); }

/* Sbalitelná karta (APG Disclosure): tlačítko je jediný obsah nadpisu, klik na celý řádek, grid 0fr → 1fr */
.st-disc-h { margin: calc(-1 * clamp(18px, 2vw, 24px)); border-radius: inherit; }   /* fokus tlačítka kopíruje zaoblení karty */
.st-disc { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; gap: 12px; width: 100%; min-height: 44px;
  padding: clamp(18px, 2vw, 24px); border-radius: inherit; font: inherit; letter-spacing: inherit; text-align: left; }
.st-disc__meta { justify-self: end; font-family: var(--body); font-size: .8125rem; font-weight: 400; letter-spacing: 0; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-disc__chev { align-self: center; width: 18px; height: 18px; color: var(--ink-3); fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: rotate .45s var(--ease-out), color .25s var(--ease); }
.st-disc[aria-expanded="true"] .st-disc__chev { rotate: 180deg; color: var(--ink); }
@media (hover: hover) { .st-disc:hover .st-disc__chev { color: var(--ink); } }
.st-disc:focus-visible { outline-offset: -4px; }
.st-disc__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s var(--ease-out); }
.st-disc__in { min-height: 0; overflow: hidden; }
.is-open > .st-disc__body { grid-template-rows: 1fr; }
.st-card:not(.is-open) > .st-disc__body .st-disc__in { visibility: hidden; transition: visibility 0s .55s; }
.st-card.no-anim > .st-disc__body, .st-card.no-anim .st-disc__in { transition: none; }
.st-phase-card .st-ph { padding-top: clamp(18px, 2vw, 24px); }
.st-phase-card { padding-block: clamp(18px, 2vw, 24px); }

/* Fáze opakování: název a pokyn (smí na 2 řádky), vpravo délka; aktuální = podbarvení a linka */
.st-ph { display: grid; gap: 4px; }
.st-ph__row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 44px;
  padding: 8px 14px; border-radius: 14px; background: var(--bg); text-align: left; overflow: hidden; transition: background-color .35s var(--ease); }
.st-ph__row::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); transform: scaleY(0); transition: transform .4s var(--ease-out); }
.st-ph__name { min-width: 0; line-height: 1.3; }
.st-ph__name b { display: block; font-size: .875rem; font-weight: 600; }
.st-ph__name small { display: block; font-size: .75rem; font-weight: 500; color: var(--ink-3); text-wrap: pretty; }
.st-ph__val { font-family: var(--display); font-weight: 600; font-size: .875rem; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink-2); }
.st-ph__row.is-now { background: var(--accent-soft); }
.st-ph__row.is-now::before { transform: none; }
.st-ph__row.is-now .st-ph__val { color: var(--ink); }
@media (hover: hover) { .st-ph__row:not(.is-now):hover { background: var(--soft); } }

/* Svaly: skupina = řádek s měřidlem, rozbalí se detail (grid 0fr → 1fr jako .food-ingr) */
/* Řádek 44 px: název · % · druh práce · šipka, pod tím tenké měřidlo. Pořadí pevné (sim.groups). */
.st-mus { display: grid; gap: 4px; }
.st-mg { position: relative; container-type: inline-size; border-radius: 14px; background: var(--bg); transition: background-color .35s var(--ease); animation: trn-in .55s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 35ms + 160ms); }
.st-mg::before { content: ""; position: absolute; left: 0; top: 10px; height: 24px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); transform: scaleY(0); transition: transform .4s var(--ease-out); }
.st-mg.is-sel { background: var(--accent-soft); }
.st-mg.is-sel::before { transform: none; }
.st-mg__row { display: grid; grid-template-columns: minmax(0, 1fr) auto 2.8rem 16px; grid-template-areas: "name pct mode ic" "act act act ic"; align-items: center; column-gap: 10px; row-gap: 5px;
  width: 100%; min-height: 44px; padding: 7px 12px 8px; border-radius: 14px; text-align: left; }
.st-mg__name, .st-mg__pct, .st-mode { align-self: baseline; }
/* úzký řádek (sloupec 1100–1279 px): druh práce pod % vedle měřidla, ať se název nezkracuje (min-height 52) */
@container (max-width: 320px) {
  .st-mg__row { grid-template-columns: minmax(0, 1fr) auto 16px; grid-template-areas: "name pct ic" "act mode ic"; min-height: 52px; row-gap: 4px; }
  .st-mg__row .st-mode { align-self: center; justify-self: end; }
}
.st-mg__name { grid-area: name; min-width: 0; font-size: .875rem; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-mg__row .st-act { grid-area: act; height: 3px; }
.st-act { display: block; height: 5px; border-radius: 999px; background: #e3e3de; overflow: hidden; }
.st-act i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.st-mg.is-sel .st-act { background: rgba(201, 64, 12, .14); }
.st-mg__pct { grid-area: pct; font-family: var(--display); font-weight: 600; font-size: .9375rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; min-width: 4.2ch; text-align: right; }
.st-mode { grid-area: mode; font-size: .6875rem; font-weight: 600; color: var(--ink-3); white-space: nowrap; transition: color .3s var(--ease); }
.st-mode.is-on { color: #b8380a; }   /* drobné písmo: #b8380a má 5,2 : 1 na --bg i 4,9 : 1 na --accent-soft (--accent-deep jen 4,5 / 4,2) */
.st-mg__ic { grid-area: ic; display: grid; place-items: center; width: 16px; height: 16px; color: var(--ink-3); transition: color .3s var(--ease), rotate .45s var(--ease-out); }
.st-mg__ic .ic { width: 16px; height: 16px; }
.st-mg.is-open .st-mg__ic { color: var(--ink); rotate: 180deg; }
@media (hover: hover) { .st-mg:not(.is-sel):hover { background: var(--soft); } .st-mg__row:hover .st-mg__ic { color: var(--ink); } }
.st-mg__row:focus-visible { outline-offset: -2px; }

.st-mg__more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s var(--ease-out); }
.st-mg.is-open .st-mg__more { grid-template-rows: 1fr; }
.st-mg__in { min-height: 0; overflow: hidden; }
.st-mg__body { display: grid; gap: 12px; padding: 4px 12px 14px; }
.st-mg:not(.is-open) .st-mg__body { visibility: hidden; transition: visibility 0s .55s; }

/* Svaly ve skupině: malý seznam s měřidlem, vybraný = tmavá pilulka (jako aktivní záložka) */
.st-pick { display: grid; gap: 4px; }
.st-pick button { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 42px; padding: 0 14px 4px; border-radius: 12px;
  background: rgba(255, 255, 255, .55); font-size: .8125rem; font-weight: 600; color: var(--ink-2); text-align: left; transition: background-color .25s var(--ease), color .25s var(--ease); }
.st-pick__name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-pick .st-act { position: absolute; left: 14px; right: 14px; bottom: 7px; height: 3px; background: rgba(0, 0, 0, .07); }
.st-pick button b { font-family: var(--display); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; color: var(--ink-3); transition: color .25s var(--ease); }
.st-pick button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.st-pick button[aria-pressed="true"] b { color: #fff; }
.st-pick button[aria-pressed="true"] .st-act { background: rgba(255, 255, 255, .16); }
@media (hover: hover) { .st-pick button:not([aria-pressed="true"]):hover { background: #fff; color: var(--ink); } }

.st-md__head { display: grid; gap: 1px; }
.st-md__head b { font-family: var(--display); font-weight: 600; font-size: 1.0625rem; letter-spacing: -.015em; line-height: 1.25; }
.st-md__head small { font-size: .75rem; font-weight: 500; font-style: italic; color: var(--ink-3); }
.st-md__nums { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .8125rem; color: var(--ink-2); }
.st-md__nums b { font-family: var(--display); font-weight: 600; font-size: .9375rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.st-md__nums [title] { cursor: help; }
.st-md__dot { color: var(--ink-3); }
.st-md__nums .st-src { margin-left: auto; }
.st-src { justify-self: start; display: inline-flex; align-items: center; gap: 4px; height: 18px; padding: 0 7px; border-radius: 999px; background: var(--bg); font-size: .625rem; font-weight: 700; letter-spacing: .02em; color: var(--ink-3); }
.st-src--emg { background: var(--ink); color: #fff; }
.st-md__txt { display: grid; gap: 10px; }
.st-md__txt div { display: grid; gap: 1px; }
.st-md__txt dt { font-size: .75rem; font-weight: 600; color: var(--ink); }
.st-md__txt dd { font-size: .875rem; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.st-md__src { font-size: .75rem; line-height: 1.45; color: var(--ink-3); }

/* Technika: řádky 44 px „popisek | ovládání“ – segmenty na světlém (.trn-level) a výběr chyby */
.st-fields { display: grid; gap: 8px; }
.st-field { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); align-items: center; gap: 12px; min-height: 44px; }
.st-field__lbl { font-size: .8125rem; font-weight: 600; color: var(--ink-2); }
.st-field .st-select { width: 100%; }
.st-level { position: relative; display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); padding: 4px; border-radius: 999px; background: var(--bg); }
.st-level__pill { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n, 2)); border-radius: 999px; background: var(--ink);
  box-shadow: 0 8px 16px -10px rgba(0, 0, 0, .6); transform: translateX(calc(var(--k, 0) * 100%)); transition: transform .55s var(--ease-out); pointer-events: none; }
.st-level button { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; height: 32px; padding: 0 12px; border-radius: 999px;
  font-family: var(--display); font-weight: 600; font-size: .875rem; color: var(--ink-2); white-space: nowrap; transition: color .35s var(--ease); }
.st-level button[aria-pressed="true"] { color: #fff; }
@media (hover: hover) { .st-level button:not([aria-pressed="true"]):hover { color: var(--ink); } }
.st-level button:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ink), 0 0 0 6px var(--accent-soft); }
.st-level button:disabled { opacity: .4; cursor: not-allowed; }
@media (pointer: coarse) { .st-level button { height: 36px; } }

.st-fault { margin-top: 12px; display: grid; gap: 8px; padding: 16px; border-radius: 18px; background: var(--bg); animation: trn-in .45s var(--ease-out) both; }
.st-fault.is-bad { background: var(--accent-soft); }
.st-fault__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.st-fault__lbl { font-size: .75rem; font-weight: 600; color: #b8380a; }   /* název chyby je ve výběru nad boxem, tady jen „Oprava“ */
.st-fault__cue { font-family: var(--display); font-weight: 500; font-size: 1.125rem; letter-spacing: -.02em; line-height: 1.3; color: var(--ink); text-wrap: balance; }
.st-fault__why { font-size: .875rem; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.st-fault__why b { font-weight: 600; color: var(--ink); }
.st-live { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: #fff; font-size: .6875rem; font-weight: 600; color: var(--ink-3); white-space: nowrap; transition: background-color .3s var(--ease), color .3s var(--ease); }
.st-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: background-color .3s var(--ease); }
.st-live.is-on { background: var(--ink); color: #fff; }
.st-live.is-on i { background: var(--accent); animation: trn-pulse 2.2s var(--ease) infinite; }

/* =========================================================================================
   8. Dlaždice s čísly (živé hodnoty, křivka jednoho opakování s bodem „teď“)
   ========================================================================================= */
/* Kompaktní dlaždice pod scénou (asi 94 px): popisek, pod ním hodnota a křivka v jednom řádku.
   Na úzké dlaždici (container query) jde křivka pod hodnotu. */
.st-stat { container-type: inline-size; display: grid; align-content: start; gap: 8px; min-width: 0; padding: 16px; border-radius: 22px; overflow: hidden; }   /* posunutá vrstva bodu nesmí rozšířit stránku */
.st-stat .zn-label { min-width: 0; font-size: .75rem; }
.st-stat .zn-label > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-stat .zn-label .ic { width: 15px; height: 15px; }
.st-stat__row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.st-stat .zn-big { flex: none; display: flex; align-items: baseline; font-size: 1.75rem; white-space: nowrap; }
.st-stat .zn-big small { margin-left: 1px; font-size: .8125rem; }
.st-stat .zn-big small.st-stat__slash { margin-left: 4px; font-family: var(--display); font-weight: 600; font-size: 1.125rem; letter-spacing: -.02em; color: var(--ink-3); }
.st-spark { position: relative; flex: 1 1 0; min-width: 40px; height: 36px; }
@container (max-width: 150px) {
  .st-stat .zn-label { font-size: .6875rem; }
  .st-stat .zn-label .ic { display: none; }
  .st-stat__row { flex-direction: column; align-items: stretch; gap: 8px; }
  .st-spark { flex: none; height: 24px; }
}
.st-spark svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.st-spark .a { fill: var(--bg); }
.st-spark .l { fill: none; stroke: var(--ink); stroke-width: 1.75; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.st-spark .l2 { fill: none; stroke: #b9b9b3; stroke-width: 1.5; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.st-spark .z { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.st-spark__cur, .st-spark__y { position: absolute; inset: 0; pointer-events: none; }
.st-spark__cur::before { content: ""; position: absolute; left: -.5px; top: -4px; bottom: -4px; width: 1px; background: var(--line); }
.st-spark__dot { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px #fff, 0 2px 6px rgba(0, 0, 0, .2); }
.st-spark__dot--2 { background: var(--ink); }

/* =========================================================================================
   9. Teplotní mapa aktivace (tmavá karta)
   ========================================================================================= */
.st-heat { grid-column: 1 / -1; padding: clamp(18px, 2.2vw, 28px); }
.st-heat__head { align-items: flex-start; flex-wrap: wrap; margin-bottom: 18px; }
.st-heat__sub { margin-top: 4px; font-size: .8125rem; color: var(--on-dark-2); }
.st-heat__plot { --lab: 176px; --rh: 24px; --rg: 4px; display: grid; grid-template-columns: var(--lab) minmax(0, 1fr); column-gap: 16px; }
.st-heat__bands { grid-column: 2; margin-bottom: 10px; }
.st-heat__labels { grid-column: 1; grid-row: 2; display: grid; grid-auto-rows: var(--rh); row-gap: var(--rg); }
.st-heat__labels button { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; padding-left: 14px; border-radius: 8px; font-size: .8125rem; font-weight: 600; color: var(--on-dark-78); text-align: left; white-space: nowrap; transition: color .25s var(--ease); }
.st-heat__labels button span { overflow: hidden; text-overflow: ellipsis; }
.st-heat__labels .st-heat__short { display: none; }
.st-heat__labels button::before { content: ""; position: absolute; left: 2px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--dark-3); transition: background-color .25s var(--ease); }
.st-heat__labels button.is-sel { color: #fff; }
.st-heat__labels button.is-sel::before { background: var(--accent); }
.st-heat__labels button.is-dim { color: var(--on-dark-2); font-weight: 500; }
@media (hover: hover) { .st-heat__labels button:hover { color: #fff; } }
.st-heat--muscles .st-heat__plot { --rh: 17px; --rg: 3px; }
.st-heat--muscles .st-heat__labels button { font-size: .75rem; }
.st-heat__cv { grid-column: 2; grid-row: 2; position: relative; cursor: crosshair; touch-action: pan-y; }
.st-heat__cv canvas { display: block; width: 100%; height: var(--h, 280px); }
.st-heat__head-line { position: absolute; top: -8px; bottom: -8px; left: 0; right: 0; pointer-events: none; }
.st-heat__head-line i { position: absolute; left: -1px; top: 0; bottom: 0; width: 2px; border-radius: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 0 16px rgba(255, 255, 255, .35); }
.st-heat__head-line i::before { content: ""; position: absolute; left: 50%; top: -3px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.st-heat__sel { position: absolute; left: -3px; right: -3px; z-index: 1; display: none; border-radius: 8px; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .85); pointer-events: none; transform: scaleY(1.12); }
.st-heat__tip { position: absolute; z-index: 3; left: 0; top: 0; padding: 6px 12px; border-radius: 999px; background: #fff; color: var(--ink); box-shadow: var(--shadow-float);
  font-size: .75rem; font-weight: 600; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .2s var(--ease); }
.st-heat__tip b { font-family: var(--display); font-variant-numeric: tabular-nums; }
.st-heat__tip.is-on { opacity: 1; }
.st-heat__axis { grid-column: 2; grid-row: 3; position: relative; height: 18px; margin-top: 10px; font-size: .6875rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--on-dark-50); }
.st-heat__axis span { position: absolute; top: 0; translate: -50% 0; white-space: nowrap; }
.st-heat__axis span:first-child { translate: 0 0; }
.st-heat__axis span:last-child { translate: -100% 0; }
.st-heat__tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 20px; }
.st-heat__legend { display: inline-grid; grid-template-columns: auto 120px auto; align-items: center; gap: 9px; font-size: .6875rem; font-weight: 600; color: var(--on-dark-78); }
.st-heat__legend i { height: 6px; border-radius: 999px; background: var(--st-act-scale); }

/* Drobný text pod stránkou (.fine): jedna věta a rozbalovací „Jak to počítáme“ (nativní <details>) */
.st-fine { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; margin-top: 18px; font-size: .75rem; line-height: 1.6; color: var(--ink-3); text-wrap: pretty; }
.st-fine b { font-weight: 600; color: var(--ink-2); }
.st-how { min-width: 0; }
.st-how[open] { flex-basis: 100%; }
.st-how summary { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 4px; border-radius: 8px; font-weight: 600; color: var(--ink-2); cursor: pointer; list-style: none; }
.st-how summary::-webkit-details-marker { display: none; }
.st-how summary .ic { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: rotate .35s var(--ease-out); }
.st-how[open] summary .ic { rotate: 180deg; }
@media (hover: hover) { .st-how summary:hover { color: var(--ink); } }
.st-how__body { display: grid; gap: 4px; max-width: 88ch; padding: 4px 4px 0; }

/* =========================================================================================
   10. Popisky svalů ve 3D (CSS2DRenderer, .pg__chip) a tooltip
   ========================================================================================= */
.st-label { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .92); box-shadow: var(--shadow-float); color: var(--ink);
  font: 500 .8125rem/1 var(--body); white-space: nowrap; pointer-events: auto; cursor: pointer;
  transition: translate .45s var(--ease-out), background-color .2s var(--ease), opacity .3s var(--ease); }
.st-label i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.st-label b { font-family: var(--display); font-weight: 600; font-variant-numeric: tabular-nums; }
@media (hover: hover) { .st-label:hover { translate: 0 -2px; } }
.st-label.is-sel { background: var(--accent); color: var(--on-accent); box-shadow: 0 3px 0 var(--accent-deep), var(--shadow-float); }
.st-label.is-sel i { background: var(--on-accent); }
.st-label.is-sel:focus-visible { outline-color: #fff; }
.st-label--value { height: 30px; padding: 0 11px; font-family: var(--display); font-weight: 600; font-variant-numeric: tabular-nums; }   /* úhly, síla podložky */


/* =========================================================================================
   11. Spodní lišta (dock) a spodní list (sheet) – mobil
   ========================================================================================= */
.st-dock { display: none; }
.st-sheet, .st-backdrop { display: none; }

@media (max-width: 899px) {
  :root { --dock-space: calc(86px + env(safe-area-inset-bottom)); }
  /* WCAG 2.4.11: fokus nesmí zůstat celý pod fixními lištami */
  html { scroll-padding-bottom: calc(var(--dock-space) + 16px); }
  .st-dock { position: fixed; z-index: 101; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    display: block; padding: 6px 10px 6px 6px; border-radius: 24px;
    background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
    box-shadow: var(--shadow-dock); animation: nav-up .8s .1s var(--ease-out) both; }
  .st-dock .st-bar { gap: 12px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .st-dock .st-play { width: 54px; height: 54px; margin-bottom: 3px; box-shadow: 0 3px 0 var(--accent-deep), 0 16px 30px -14px rgba(255, 90, 31, .6); }
  .st-dock .st-play .ic { width: 20px; height: 20px; }
  .st-dock .st-play:focus-visible { outline-color: var(--accent); }
  .st-dock .st-scrub { padding-top: 2px; gap: 2px; }
  .st-dock .st-range { --track: #e3e3de; }
  .st-dock .st-range::-webkit-slider-thumb { box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 1px 3px rgba(0, 0, 0, .2), 0 3px 8px -3px rgba(0, 0, 0, .18); }
  /* Dok: pásy fází bez popisků (vešly by se jen 1–2 a useknuté; název fáze je ve scéně), čas a rychlost na ose stopy */
  .st-dock .st-phases li { border-top-color: var(--soft); padding-top: 0; }
  .st-dock .st-phases li span { display: none; }
  .st-dock .st-phases li.is-done { border-top-color: #c6c6c0; }
  .st-dock .st-phases li.is-now { border-top-color: var(--accent); color: var(--ink); }
  .st-dock .st-time { color: var(--ink); padding-bottom: 0; min-width: 4.2ch; }
  .st-dock .st-speed { margin-bottom: 0; }
  .st-dock .st-speed select { min-width: 66px; }
  /* výběr rychlosti v bílém doku: světlá varianta */
  .st-dock .st-select--dark select { background: var(--bg); color: var(--ink); box-shadow: none; color-scheme: light; }
  .st-dock .st-select--dark .st-select__chev { color: var(--ink-3); }
  .st-dock .st-select--dark select:focus-visible { box-shadow: 0 0 0 2px var(--ink), 0 0 0 6px var(--accent-soft); }
}
@media (max-width: 899px) and (hover: hover) { .st-dock .st-select--dark select:hover { background: var(--soft); } }
@supports (appearance: base-select) {
  @media (max-width: 899px) {
    .st-dock .st-select--dark select::picker(select) { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: var(--shadow-float); }
    .st-dock .st-select--dark option { color: var(--ink); }
    .st-dock .st-select--dark option:hover, .st-dock .st-select--dark option:focus-visible { background: var(--bg); }
    .st-dock .st-select--dark option:checked { background: var(--ink); color: #fff; }
  }
}
@keyframes nav-up { from { transform: translateY(140%); } }
@media (min-width: 600px) and (max-width: 899px) { .st-dock { left: 50%; right: auto; width: 540px; translate: -50% 0; } }

@media (max-width: 599px) {
  :root { --peek-h: 88px; }
  html { scroll-padding-bottom: calc(var(--dock-space) + var(--peek-h) + 16px); }
  .st-backdrop { position: fixed; inset: 0; z-index: 90; display: block; background: rgba(17, 17, 17, .45); opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility 0s .3s; }
  .st-backdrop.is-open { opacity: 1; visibility: visible; transition: opacity .3s var(--ease); }
  .st-sheet { position: fixed; z-index: 100; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; max-height: calc(100svh - 16px);
    border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--card); box-shadow: var(--shadow-sheet);
    overflow: hidden auto; overscroll-behavior: contain; padding: 0 18px calc(var(--dock-space) + 16px);
    translate: 0 calc(100% + 16px); visibility: hidden; transition: translate .35s var(--ease-io), visibility 0s .35s; will-change: translate; }
  .st-sheet.is-peek { translate: 0 calc(100% - var(--peek-h) - var(--dock-space)); visibility: visible; transition: translate .6s var(--ease-out); }
  .st-sheet.is-open { translate: none; visibility: visible; transition: translate .6s var(--ease-out); }
  .st-sheet.is-drag { transition: none; }
  .st-sheet.is-peek { overflow: hidden; }
  /* úchyt a v otevřeném listu skoky „Technika · Svaly · Fáze“ (přilepené nahoře) */
  .st-sheet__top { position: sticky; top: 0; z-index: 2; flex: none; margin: 0 -18px; padding: 0 18px; background: var(--card); }
  .st-sheet.is-open .st-sheet__top { box-shadow: 0 1px 0 var(--line); }
  .st-sheet__grab { display: grid; place-items: center; width: calc(100% + 36px); height: 26px; margin: 0 -18px; cursor: grab; touch-action: none; }
  .st-sheet__grab i { width: 40px; height: 5px; border-radius: 999px; background: var(--line); }
  .st-jump { display: none; gap: 6px; padding: 2px 0 10px; }
  .st-sheet.is-open .st-jump { display: flex; }
  .st-jump button { flex: 1 1 0; height: 36px; border-radius: 999px; background: var(--bg); font-family: var(--display); font-weight: 600; font-size: .875rem; color: var(--ink-2); transition: background-color .2s var(--ease), color .2s var(--ease); }
  .st-jump button:active { background: var(--ink); color: #fff; }
  .st-jump button:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ink), 0 0 0 6px var(--accent-soft); }
  .st-peek { flex: none; padding: 2px 0 10px; touch-action: none; cursor: pointer; }
  .st-sheet.is-open .st-peek { display: none; }   /* v otevřeném listu by tři svaly jen opakovaly seznam Svaly */
  .st-peek__mus { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .st-peek__mus button { display: grid; gap: 5px; width: 100%; min-width: 0; padding: 7px 10px 8px; border-radius: 14px; background: var(--bg); text-align: left; }
  .st-peek__mus small { display: block; font-size: .75rem; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .st-peek__row { display: flex; align-items: center; gap: 8px; min-width: 0; }
  .st-peek__row .st-act { flex: 1 1 0; min-width: 0; height: 4px; }
  .st-peek__mus b { flex: none; font-family: var(--display); font-weight: 600; font-size: .875rem; letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: 1; }
  .st-sheet__body { display: grid; gap: 0; transition: opacity .3s var(--ease); }
  .st-sheet.is-peek .st-sheet__body { opacity: 0; visibility: hidden; transition: opacity .2s var(--ease), visibility 0s .2s; }   /* v náhledu nesmí prosvítat pod spodní lištou */
  .st-sheet__body .zn-card { grid-area: auto; padding: 18px 0 0; border-radius: 0; background: none; animation: none; scroll-margin-top: 80px; }
  .st-sheet__body .zn-card + .zn-card { margin-top: 18px; border-top: 1px solid var(--line); }
  .st-sheet__body .st-disc-h { margin: -18px 0 0; }
  .st-sheet__body .st-disc { padding: 18px 0; }
  .st-sheet__body .st-phase-card .st-ph { padding-top: 0; }
}

/* =========================================================================================
   12. Responzivita (STUDIO-UX.md, kap. 3.2)
   ========================================================================================= */
@media (min-width: 1100px) {
  .st-heat__plot { --lab: 190px; }
}
/* 900–1099 a 600–899: bloky pod sebou přes celou šířku (scéna, dlaždice, Technika jako lišta, Svaly ve 2 sloupcích, Fáze) */
@media (max-width: 1099px) {
  .st-grid { --stage-h: clamp(480px, calc(100svh - 240px), 640px); }
  .st-col { grid-column: 1 / -1; position: relative; top: auto; }
  .st-side { grid-column: 1 / -1; }
  .st-tech-card { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; }
  .st-tech-card .zn-card__head { margin: 0; }
  .st-tech-card .st-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; }
  .st-tech-card .st-field { grid-template-columns: auto auto; }
  .st-tech-card .st-level { min-width: 196px; }
  .st-tech-card .st-select { min-width: 196px; }
  .st-tech-card .st-fault { flex-basis: 100%; margin-top: 0; }
  .st-mus { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 8px; align-items: start; }
}
@media (max-width: 899px) {
  .zn-main { padding-bottom: calc(var(--dock-space) + 40px); }
  .st-grid { --stage-h: clamp(460px, calc(100svh - 260px), 640px); }
  .st-hud__bottom { padding-bottom: 2px; }
}
/* Pod 720 px: pohled jako výběr v kulatém skle (segment by se nevešel), Vrstvy jen ikona, dlaždice 2 × 2, svaly v 1 sloupci */
@media (max-width: 719px) {
  .st-views { display: none; }
  .st-select--icon { display: grid; }
  .st-layers-btn { width: 44px; padding: 0; justify-content: center; border-radius: 50%; background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .26); color: #fff; }
  .st-layers-btn .ic { width: 19px; height: 19px; }
  .st-layers-btn__txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .st-layers-btn__dot { top: 8px; left: auto; right: 8px; }
  .st-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-mus { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 599px) {
  .zn-bar__in { gap: 12px; }
  .st-back { height: 40px; padding: 0 14px 0 11px; font-size: .875rem; }
  .zn-head { margin-bottom: 16px; }
  .zn-main { padding-bottom: calc(var(--dock-space) + var(--peek-h) + 24px); }
  .st-grid, .st-below, .st-stats { gap: 12px; }
  .st-col { gap: 12px; }
  .st-below { margin-top: 12px; }
  .zn-card { border-radius: 22px; }
  /* Scéna se vejde mezi horní lištu a náhled listu (po posunu o hlavičku – při prvním přehrání se k ní stránka posune) */
  .st-grid { --stage-h: clamp(340px, calc(100svh - var(--header-h) - var(--peek-h) - var(--dock-space) - 22px), 600px); }
  .st-stage { border-radius: 22px; --r-xl: 22px; scroll-margin-top: calc(var(--header-h) + 8px); }
  .st-hud { padding: 12px; gap: 10px; }
  .st-seg button { height: 38px; padding: 0 13px; font-size: .875rem; gap: 6px; }
  .st-seg button .ic { width: 16px; height: 16px; }
  /* legenda se musí vejít vedle dvou kulatých tlačítek (výběr pohledu, Vrstvy) */
  .st-legend { grid-template-columns: auto auto 64px auto; }
  .st-layers { width: min(240px, calc(100vw - 72px)); }
  .st-now { max-width: 78%; gap: 3px; }
  .st-now__title { font-size: 1.75rem; }
  .st-now__cue { font-size: .8125rem; }
  .st-side { display: none; }
  /* Technika v listu: zase řádky „popisek | ovládání“ (ne lišta) */
  .st-tech-card { display: block; }
  .st-tech-card .zn-card__head { margin-bottom: 12px; }
  .st-tech-card .st-fields { display: grid; }
  .st-tech-card .st-field { grid-template-columns: 6.75rem minmax(0, 1fr); }
  .st-tech-card .st-level, .st-tech-card .st-select { min-width: 0; }
  .st-tech-card .st-fault { margin-top: 12px; }
  .st-stat { padding: 12px 14px; border-radius: 20px; }
  .st-heat { padding: 18px 16px; }
  .st-heat__plot { --lab: 104px; --rh: 22px; column-gap: 10px; }
  .st-heat--muscles .st-heat__plot { --rh: 16px; }
  .st-heat__labels button { font-size: .75rem; padding-left: 0; }
  .st-heat__labels button::before { display: none; }
  .st-heat__tools { width: 100%; flex-direction: column-reverse; align-items: stretch; }
  .st-heat__tools .st-heat__legend { align-self: flex-end; }
  .st-heat__head .st-seg { width: 100%; }
  /* úzký sloupec popisků: krátké názvy skupin (Čtyřhlavý, Hýždě…), celý název zůstává v aria-label a title */
  .st-heat__labels .st-heat__full { display: none; }
  .st-heat__labels .st-heat__short { display: inline; }
  .st-fine { margin-top: 14px; }
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
@media (max-width: 380px) {
  .st-seg button { padding: 0 11px; }
  .st-legend { grid-template-columns: auto auto 40px auto; gap: 7px; padding: 0 10px; }
}
@media (pointer: coarse) {
  .st-views button, .st-pick button { position: relative; }
  .st-views button::after, .st-pick button::after { content: ""; position: absolute; inset: -6px -2px; }
  /* dotyk: cíl aspoň 44 px i tam, kde je viditelná pilulka menší (segmenty, skoky v listu, odkazy v hlavičce) */
  .st-seg button::after, .st-level button::after, .st-jump button::after, .st-back::after { content: ""; position: absolute; inset: -4px 0; }
  .st-jump button, .st-back { position: relative; }
  .st-home { padding-block: 10px; margin-block: -10px; }
  .st-how summary { min-height: 44px; }
  .st-select option { min-height: 44px; }
}

/* =========================================================================================
   13. Omezení pohybu (kap. 3.8): bez animací, simulace se sama nespouští (řídí main.js)
   ========================================================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
    transition-duration: 1ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .js .words .w > * { transform: none; }
  .st-play:not(.is-started)::before, .st-live.is-on i, .st-loader__ring { animation: none !important; }
}
