/* ============================================================
   NEO AI HQ — sdílený design systém (návrhářská fáze)
   Jeden zdroj pravdy: tokeny + reset + chrome (header, nav, card, tlačítka).
   Linkuje se do všech stránek: <link rel="stylesheet" href="assets/neo.css">
   Stránkově-specifické CSS zůstává inline v každém HTML.
   ============================================================ */

@font-face {
  font-family: "Playfair Display";
  src: url("fonts/playfair-display-latin-ext-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  /* paleta (verze v2 — ne rozbité v1) */
  --void:      #040507;
  --void-2:    #090b11;      /* o stupeň světlejší panel */
  --ink:       #f2f4f8;
  --muted:     #8a93a6;
  --muted-dim: #566078;
  --gold:      #d9b36a;
  --gold-dim:  rgba(217, 179, 106, .30);
  --cyan:      #9fe3f0;
  --hairline:  #1f2430;
  --focus:     #ffffff;

  /* CTA systém — primární akce v barvě galaxie, výchozí zlatá.
     Téma přepíná .th-cyan / .th-violet na prvku nebo předkovi. */
  --gold-hi:   #e6c37e;
  --gold-deep: #c89e52;
  --cta-hi:    var(--gold-hi);
  --cta-lo:    var(--gold-deep);
  --cta-ink:   var(--void);
  --cta-glow:  var(--gold-dim);

  /* nádechy (barva = odměna, tma = základ) */
  --tint-cyan: rgba(159, 227, 240, .07);
  --tint-gold: rgba(217, 179, 106, .06);

  /* z-index škála */
  --z-scene:   0;
  --z-chrome:  3;
  --z-stepper: 4;
  --z-card:    5;
  --z-veil:    30;   /* přechody stránek — nad chrome/nav/modal, POD #introOverlay (pokud existuje) */

  /* mobilní spodní navigace (.neo-nav pod 980 px): 10px + 44px odkaz + 11px padding = 65px.
     Stránkový obsah pod 980 px musí mít padding-bottom aspoň --nav-h-mobile + rezerva + safe area,
     ať žádné CTA nekončí pod fixní navigací (viz .u-wrap v ucet.html, .hlavni v domu.html). */
  --nav-h-mobile: 65px;
  --content-bottom-mobile: calc(var(--nav-h-mobile) + 32px + env(safe-area-inset-bottom, 0px));

  /* typografie */
  --serif: "Didot", "Bodoni 72", "Bodoni MT", "Playfair Display", Georgia, serif;
  --mono:  ui-monospace, "SF Mono", "SFMono-Regular", Menlo, monospace;
  --sans:  -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --h1:    clamp(40px, 6vw, 64px);
  --h2:    clamp(28px, 4vw, 40px);
  --h3:    clamp(24px, 2.6vw, 28px);
  --h4:    22px;
  --h5:    18px;

  /* škály (radius / spacing) */
  --r-ctrl:  6px;
  --r-box:   8px;
  --r-card:  12px;
  --r-panel: 14px;
  --r-pill:  999px;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px;

  /* záře (zlatý recept; --glow-l následuje téma přes --cta-glow) */
  --glow-s: 0 0 14px var(--gold-dim);
  --glow-m: 0 0 18px var(--gold-dim);
  --glow-l: 0 0 26px var(--cta-glow);
  --lift:   0 12px 40px rgba(0, 0, 0, .5);
  --glow-card: 0 0 24px rgba(217, 179, 106, .12);

  /* motion jazyk (konzistentní napříč stránkami) */
  --ease-pop:   cubic-bezier(.34, 1.56, .64, 1);
  --ease-glide: cubic-bezier(.22, 1, .36, 1);
  --ease-fly:   cubic-bezier(.66, 0, .34, 1);
  --t-ctrl: .18s;
  --t-reveal: .5s;

  /* výška sdílené hlavičky (neo.js) — stránky podle ní odsazují sticky prvky.
     Hlavička ji sama používá jako svou výšku, takže platí z konstrukce. */
  --hdr-h: 78px;
}
@media (max-width: 720px) { :root { --hdr-h: 70px; } }

/* ── témata galaxií (přepínají barvu CTA + záři) ──
   Základy = výchozí zlatá · Druhý mozek = .th-cyan · Agenti = .th-violet
   (barvy = palety shader clusterů z path3d.js) */
.th-cyan   { --cta-hi: #bfeef7; --cta-lo: #7fc9d8; --cta-glow: rgba(159, 227, 240, .35); }
.th-violet { --cta-hi: #cdb8ee; --cta-lo: #9c82c9; --cta-glow: rgba(179, 157, 219, .35); }

/* ── reset ─────────────────────────────── */
* { margin: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: var(--void);
  color: var(--ink);
  font: 400 17px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
::selection { background: var(--gold-dim); color: var(--ink); }

/* ── typografické utility ───────────────── */
.t-serif { font-family: var(--serif); font-weight: 400; }
.t-mono  { font-family: var(--mono); }
.t-label {
  font: 600 12px/1 var(--mono);
  letter-spacing: .14em; text-transform: uppercase; color: var(--gold);
}
.t-kicker {
  font: 600 11px/1 var(--mono);
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.sub { color: var(--muted); font-size: 16px; }
/* eyebrow ✦ před nadpisem sekce (systémový motiv, ne dekorace) */
.star-h { display: flex; align-items: center; gap: 14px; }
.star-h::before {
  content: "✦"; content: "✦" / ""; /* fallback pro starší Safari bez alt syntaxe */
  font-size: 11px; line-height: 1; color: var(--gold); flex: none;
  animation: twinkle 4.5s ease-in-out infinite; --o: .95;
}

/* ── header (sdílený, injektuje neo.js) ───
   logo vlevo · vpravo [dráha s raketkou] [LEVEL 04 / 1 240 BODŮ] [avatar] */
.neo-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-chrome);
  display: flex; justify-content: space-between; align-items: center;
  height: var(--hdr-h); padding: 0 40px; pointer-events: none;
  background: linear-gradient(to bottom, rgba(4,5,7,.72) 0%, transparent 100%);
}
.neo-header > * { pointer-events: auto; }
/* po posunu stránky dostane lišta pevný podklad, ať přes ni neprosvítá obsah (neo.js → html.neo-posun) */
.neo-header { transition: background-color .25s ease, box-shadow .25s ease; }
html.neo-posun .neo-header { background: rgba(4,5,7,.92); box-shadow: 0 1px 0 var(--hairline);
  /* bez backdrop-filter: nad animovaným plátnem je v Safari drahý */ }
@media (prefers-reduced-motion: reduce) { .neo-header { transition: none; } }
/* odkaz loga: dotyková plocha 44 × 44 px, logo samo zůstává 34 px vysoké a na svém místě */
.neo-header .neo-logo { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; }
.neo-header .mark-logo { height: 34px; width: auto; display: block;
  transition: filter .2s ease, transform var(--t-ctrl) var(--ease-pop); }
.neo-header a:hover .mark-logo,
.neo-header a:focus-visible .mark-logo { filter: drop-shadow(0 0 10px var(--gold-dim)); transform: scale(1.03); }
.neo-header a:active .mark-logo { transform: scale(.97); }

.neo-hdr-r { display: flex; align-items: center; gap: 20px; }

/* postup v levelu (role=progressbar; třída .stats kvůli stránkovým pravidlům) */
.neo-header .stats { font: 500 11px/1 var(--mono); letter-spacing: .12em; color: var(--muted); }
.neo-header .stats em { font-style: normal; color: var(--gold); }
.neo-lvl { --trk: 180px; position: relative; display: flex; align-items: center; gap: 18px;
  height: 34px; padding: 0 4px; border-radius: var(--r-ctrl); cursor: default;
  -webkit-tap-highlight-color: transparent; }
.neo-lvl:focus-visible { outline-offset: 5px; }

.lvl-track { position: relative; flex: none; width: var(--trk); height: 22px; }
.lvl-base, .lvl-fill { position: absolute; left: 0; top: 50%; height: 2px; margin-top: -1px; border-radius: 2px; }
.lvl-base { right: 0; background: var(--hairline); }
/* start: drobný modrý bod — odsud se letí */
.lvl-base::before { content: ""; position: absolute; left: -1px; top: 50%; width: 3px; height: 3px; margin-top: -1.5px;
  border-radius: 50%; background: #3b6fff; opacity: .7; }
.lvl-fill { width: var(--p, 0%);
  background: linear-gradient(90deg, rgba(59,111,255,.55), rgba(59,111,255,.8) 24%, rgba(192,64,224,.78) 72%, rgba(217,179,106,.85)); }
/* cíl: čtyřcípá hvězda = další level */
.lvl-goal { position: absolute; right: -5px; top: 50%; width: 10px; height: 10px; margin-top: -5px;
  color: rgba(217, 179, 106, .55); transition: color .2s ease, transform .3s var(--ease-pop); }
.neo-lvl:hover .lvl-goal, .neo-lvl.tip-on .lvl-goal { color: var(--gold); transform: scale(1.15); }

/* raketka: střed trupu stojí na aktuální poloze (--p), plamen a jiskry míří dozadu */
.lvl-rkt { position: absolute; top: 50%; left: var(--p, 0%); width: 46px; height: 17.8px;
  margin: -8.9px 0 0 -30.8px; pointer-events: none; }
.lvl-rkt svg { display: block; width: 46px; height: 17.8px; overflow: visible; }
/* zlatý dozvuk dráhy těsně za raketou (barevná výplň do něj přechází, plamen ho překryje) */
.lvl-rkt::before { content: ""; position: absolute; top: 50%; left: -18px; width: 24px; height: 2px; margin-top: -1px;
  border-radius: 2px; background: linear-gradient(90deg, rgba(217,179,106,0), rgba(230,195,126,.7)); }
.lvl-rk .rk-fl-o, .lvl-rk .rk-fl-i, .lvl-rk .rk-zar { transform-box: fill-box; transform-origin: 100% 50%; }
.lvl-rk .rk-zar { transform-origin: 60% 50%; }
.lvl-rk .rk-fl-o, .lvl-rk .rk-zar { animation: lvl-plamen .34s ease-in-out infinite alternate; }
.lvl-rk .rk-fl-i { animation: lvl-jadro .26s ease-in-out infinite alternate; }
@keyframes lvl-plamen { from { transform: scaleX(1); opacity: 1; } to { transform: scaleX(.74) scaleY(.9); opacity: .78; } }
@keyframes lvl-jadro  { from { transform: scaleX(.84); opacity: 1; } to { transform: scaleX(1.06); opacity: .82; } }
/* jiskry výfuku: 3 drobné tečky, odplouvají dozadu a hasnou */
.lvl-rkt i { position: absolute; top: 50%; left: 1px; width: 2px; height: 2px; margin: -1px 0 0 -1px;
  border-radius: 50%; background: var(--gold-hi); opacity: 0; pointer-events: none;
  animation: lvl-jiskra 1.5s linear infinite; }
.lvl-rkt i:nth-of-type(2) { --dy: -2px; width: 1.5px; height: 1.5px; background: #fff4dc; animation-delay: -.5s; }
.lvl-rkt i:nth-of-type(3) { --dy: 2px; animation-delay: -1s; }
@keyframes lvl-jiskra {
  0%   { opacity: 0; transform: translate(0, 0); }
  12%  { opacity: .85; }
  100% { opacity: 0; transform: translate(-15px, var(--dy, 0)) scale(.5); }
}
/* bez pohybu: plamen stojí, jiskry zamrznou v krátké stopě */
.lvl-static .lvl-rk .rk-fl-o, .lvl-static .lvl-rk .rk-fl-i, .lvl-static .lvl-rk .rk-zar { animation: none; }
.lvl-static .lvl-rkt i { animation: none; }
.lvl-static .lvl-rkt i:nth-of-type(1) { opacity: .7;  transform: translate(-3px, 0); }
.lvl-static .lvl-rkt i:nth-of-type(2) { opacity: .45; transform: translate(-7px, -1.5px); }
.lvl-static .lvl-rkt i:nth-of-type(3) { opacity: .25; transform: translate(-11px, 1.5px); }
/* první vykreslení za session: doplachtění z nuly (neo.js přidá .lvl-pre → .lvl-glide) */
.lvl-pre .lvl-rkt { opacity: 0; }
.lvl-glide .lvl-rkt { transition: left 1.2s var(--ease-glide) .3s, opacity .45s ease .3s; }
.lvl-glide .lvl-fill { transition: width 1.2s var(--ease-glide) .3s; }

.lvl-txt { display: flex; flex-direction: column; gap: 6px; white-space: nowrap; text-transform: uppercase;
  transition: color .2s ease; }
.lvl-txt b { font-weight: 500; color: var(--ink); }
.neo-header .stats .lvl-pts { font-size: 10px; letter-spacing: .1em; }
.lvl-short { display: none; }
.neo-lvl:hover .lvl-txt, .neo-lvl.tip-on .lvl-txt { color: var(--ink); }
/* Level 1 bez placeného kurzu: štítek bez bodů (lišta = postup kurzu), body jsou v tipu a v menu účtu */
.neo-header .stats.lvl-bez-bodu .lvl-pts { display: none; }

/* tooltip postupu — hover / focus z klávesnice / tap; věty se zalamují (max. šířka i na mobilu) */
.lvl-tip { position: absolute; top: calc(100% + 12px); right: 0; z-index: 2;
  display: flex; flex-direction: column; gap: 5px; min-width: 232px; padding: 12px 14px;
  width: max-content; max-width: min(320px, calc(100vw - 32px));
  background: var(--void-2); border: 1px solid var(--hairline); border-radius: var(--r-box);
  box-shadow: var(--lift);
  font: 500 11px/1.45 var(--mono); letter-spacing: .02em; color: var(--muted);
  text-transform: none; white-space: normal; pointer-events: none;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .18s ease, transform .22s var(--ease-glide), visibility 0s linear .22s; }
.neo-lvl.tip-on .lvl-tip { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.lvl-tip .tip-1 { color: var(--ink); letter-spacing: .12em; text-transform: uppercase; }
.lvl-tip .tip-1 i { font-style: normal; color: var(--gold); padding: 0 2px; }
.neo-header .lvl-tip .tip-2 em { color: var(--gold); }
.lvl-tip .tip-3 { color: var(--ink); text-wrap: pretty; }

/* avatar + menu účtu */
.neo-me { position: relative; flex: none; }
.neo-av { position: relative; display: grid; place-items: center; width: 44px; height: 44px; margin: -5px; padding: 0;
  background: none; border: 0; border-radius: 50%; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.neo-av .av-c { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid transparent;
  background: linear-gradient(160deg, #11141d, #07080c) padding-box,
              linear-gradient(140deg, rgba(59,111,255,.5), rgba(192,64,224,.5)) border-box;
  font: 600 11px/1 var(--mono); letter-spacing: .06em; color: var(--ink);
  transition: transform var(--t-ctrl) var(--ease-pop); }
.neo-av:hover .av-c, .neo-av[aria-expanded="true"] .av-c {
  background: linear-gradient(160deg, #151a27, #08090e) padding-box,
              linear-gradient(140deg, #3b6fff, #c040e0) border-box; }
.neo-av:active .av-c { transform: scale(.94); }
.neo-av:focus-visible { outline: none; }
.neo-av:focus-visible .av-c { outline: 2px solid var(--cyan); outline-offset: 3px; }
/* barva z profilu účtu (NEO_CLEN.barva → --av): plný kruh, tmavé iniciály, jemný světlý lem
   (barva jako gradient: holá barva smí být jen v poslední vrstvě background) */
.neo-av .av-c.av-barva {
  background: linear-gradient(var(--av), var(--av)) padding-box,
              linear-gradient(140deg, rgba(255,255,255,.55), rgba(255,255,255,.12)) border-box;
  color: var(--void); }
.neo-av:hover .av-c.av-barva, .neo-av[aria-expanded="true"] .av-c.av-barva {
  background: linear-gradient(var(--av), var(--av)) padding-box,
              linear-gradient(140deg, #3b6fff, #c040e0) border-box; }
/* připravený call k vyzvednutí: drobná zlatá tečka vpravo nahoře na kruhu avataru
   (tmavý lem ji oddělí i od zlatého avataru) */
.neo-av .av-dot { position: absolute; top: 3px; right: 3px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 2px var(--void), 0 0 8px rgba(217, 179, 106, .55); pointer-events: none; }
.drop-menu a .drop-dot { width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 6px rgba(217, 179, 106, .5); }

/* skryté části hlavičky / paty (host vs. člen) — [hidden] musí přebít display:flex výš */
.neo-header [hidden], .neo-foot [hidden] { display: none !important; }

/* host (nikdo nepřihlášený): tiché „Přihlásit se“ + zlaté „Založit účet“ místo postupu a avataru */
.neo-host { display: flex; align-items: center; gap: 6px; }
.neo-host a { position: relative; display: inline-flex; align-items: center; justify-content: center;
  white-space: nowrap; font: 600 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  -webkit-tap-highlight-color: transparent; }
.neo-host-in { min-height: 44px; padding: 0 10px; color: var(--muted); transition: color .15s ease; }
.neo-host-in:hover { color: var(--ink); }
.neo-host-in:active { color: var(--gold); }
.neo-host-reg { min-height: 36px; padding: 0 16px; border-radius: var(--r-pill);
  background: linear-gradient(180deg, var(--cta-hi), var(--cta-lo)); color: var(--cta-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28);
  transition: box-shadow .2s ease, filter .15s ease, transform var(--t-ctrl) var(--ease-pop); }
.neo-host-reg::after { content: ""; position: absolute; inset: -4px 0; }   /* dotyková plocha 44 px */
.neo-host-reg:hover { filter: brightness(1.05); transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), var(--glow-l); }
.neo-host-reg:active { transform: scale(.97); filter: brightness(.95); }
.neo-host-reg:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--r-pill); }

.neo-drop { position: absolute; top: calc(100% + 14px); right: -4px; z-index: 2; min-width: 220px; padding: 6px;
  background: var(--void-2); border: 1px solid var(--hairline); border-radius: var(--r-box);
  box-shadow: var(--lift);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .18s ease, transform .22s var(--ease-glide), visibility 0s linear .22s; }
.neo-drop.open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
/* s právními odkazy (mapa) je nabídka vyšší: na nízké obrazovce se posune uvnitř, nic neschová */
.neo-drop { max-height: calc(100vh - var(--hdr-h, 78px) - 28px); overflow-y: auto; overscroll-behavior: contain; }
.drop-kdo { padding: 10px 12px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--hairline); }
.drop-jm { display: block; color: var(--ink); font-size: 14px; line-height: 1.3; }
.drop-lv { display: block; margin-top: 7px; font: 500 10px/1.6 var(--mono); letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted-dim); }
.drop-menu a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r-ctrl);
  font: 600 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  transition: color .15s ease, background-color .15s ease; }
.drop-menu a:hover, .drop-menu a:focus-visible { color: var(--ink); background: rgba(255, 255, 255, .04); }
.drop-menu a:focus-visible { outline-offset: -2px; }
.drop-menu a:active { color: var(--gold); }
.drop-sep { display: block; height: 1px; margin: 6px 4px; background: var(--hairline); }

/* ── navigace (sdílená, injektuje neo.js) — mobil dole, desktop nahoře (níž) ──
   odkazy mají ≥44 px dotykovou plochu; podtržení aktivní = ::after pod textem */
.neo-nav {
  --nav-px: clamp(6px, 2.2vw, 12px);
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-chrome);
  display: flex; gap: clamp(0px, 1.6vw, 18px); justify-content: center; padding: 10px 8px 11px;
  font: 600 11px/1 var(--mono);
  letter-spacing: .14em; text-transform: uppercase; pointer-events: none;
  background: linear-gradient(to top, var(--void) 12%, rgba(4,5,7,.82) 46%, transparent 100%);
}
.neo-nav a { position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 var(--nav-px); white-space: nowrap;
  color: var(--muted); pointer-events: auto; transition: color .15s ease; }
.neo-nav a:hover { color: var(--ink); }
.neo-nav a:active { color: var(--gold); }
.neo-nav a.on { color: var(--ink); }
.neo-nav a.on::after { content: ""; position: absolute; left: var(--nav-px); right: calc(var(--nav-px) + .14em);
  bottom: 9px; height: 1px; background: var(--gold); }

/* ── page-veil (přechody mezi stránkami, injektuje neo.js) ── */
.page-veil {
  position: fixed; inset: 0; z-index: var(--z-veil);
  background: var(--void); pointer-events: none; opacity: 0;
}
.page-veil.veil-opaque  { opacity: 1; }                                            /* okamžitý start (příjezd) */
.page-veil.veil-exit    { opacity: 1; transition: opacity .35s var(--ease-glide); } /* odjezd — fade-in */
.page-veil.veil-enter   { opacity: 0; transition: opacity .5s  var(--ease-glide); } /* příjezd — fade-out */
.page-veil.veil-instant { transition: none; }                                      /* bfcache reset bez tranzice */

/* pre-paint skrytí obsahu při příjezdu přechodem — brání probliknutí cílové stránky,
   než neo.js stihne namontovat neprůhledný veil (neo.js běží až na konci <body>, po
   parser-blocking skriptech). Stránkový inline <head> skript nastaví html.neo-arriving
   podle sessionStorage.neoTransition ještě před prvním vykreslením; neo.js třídu sundá,
   jakmile je veil opaque (nebo hned, když se veil neuplatní). Bez toho head skriptu je
   pravidlo zcela inertní. Veil je z pravidla vyňat, aby mohl krýt obsah už během skrytí. */
html.neo-arriving { background: var(--void); overflow: hidden; }
html.neo-arriving body > :not(.page-veil) { visibility: hidden; }

/* recede jen normálního obsahu — fixed / transform-centrované overlay prvky vynechat
   (.card, .stepper, .modal, .toast), jinak by scale() přebilo jejich poziční transform
   a ony by při odchodu ucukly z centrování; veil je stejně za 0,35 s překryje */
body.neo-leaving > *:not(.page-veil):not(.card):not(.stepper):not(.modal):not(.toast) {
  transition: opacity .35s var(--ease-glide), transform .35s var(--ease-glide);
  opacity: .85; transform: scale(.985);
}

/* ── tlačítka ───────────────────────────── */
.cta {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 12px;
  background: linear-gradient(180deg, var(--cta-hi), var(--cta-lo));
  color: var(--cta-ink); border: 0; cursor: pointer;
  font: 600 13px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  padding: 15px 26px; border-radius: var(--r-ctrl);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28);
  transition: box-shadow .2s ease, filter .15s ease, transform var(--t-ctrl) var(--ease-pop);
}
.cta::after { content: ""; position: absolute; top: 0; left: -70%; width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-18deg); transition: left .55s ease; pointer-events: none; }
.cta:hover:not([disabled]) { filter: brightness(1.05); transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), var(--glow-l), 0 8px 26px rgba(0, 0, 0, .4); }
.cta:hover:not([disabled])::after { left: 130%; }
.cta:active:not([disabled]) { transform: translateY(0) scale(.97); filter: brightness(.95); }
.cta:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; } /* bílý — cyan ring by na cyan výplni zanikl */
.cta .mono { font: 500 10px/1 var(--mono); letter-spacing: .08em; opacity: .68; text-transform: none; }
.cta[disabled] { background: #12151d; color: var(--muted-dim); cursor: default; box-shadow: none; }
.cta[disabled]::after { display: none; }

.ghost {
  background: none; border: 1px solid var(--hairline); color: var(--muted);
  font: 600 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  padding: 12px 18px; border-radius: var(--r-ctrl); cursor: pointer;
  transition: color .15s ease, border-color .15s ease, transform var(--t-ctrl) var(--ease-pop);
}
.ghost:hover { color: var(--ink); border-color: var(--gold-dim); }
.ghost:active { transform: scale(.96); }

/* ── karta lekce (sdílená s Cestou) ─────── */
.card {
  position: fixed; right: 40px; top: 50%;
  transform: translateY(-50%) translateX(16px) scale(.98);
  z-index: var(--z-card); width: 340px; padding: 28px;
  background: rgba(9, 11, 16, .94); backdrop-filter: blur(8px);
  border: 1px solid var(--hairline); border-radius: var(--r-card);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .28s var(--ease-glide);
}
.card.open { opacity: 1; pointer-events: auto; transform: translateY(-50%) scale(1); }
.card .label { font: 600 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.card h2 { font: 400 var(--h3)/1.1 var(--serif); margin: 12px 0 8px; }
.card p { color: var(--muted); font-size: 14px; }
.card .meta { display: flex; gap: 18px; margin: 18px 0 4px; font: 500 11px/1 var(--mono); letter-spacing: .1em; color: var(--muted); }
.card .meta em { font-style: normal; color: var(--gold); }
.card .cta { margin-top: 16px; width: 100%; justify-content: center; }
.card .close {
  position: absolute; top: 14px; right: 16px; background: none; border: 0;
  color: var(--muted); font-size: 16px; cursor: pointer; line-height: 1;
  transition: color .15s ease, transform var(--t-ctrl) var(--ease-pop);
}
.card .close:hover { color: var(--ink); transform: rotate(90deg); }
.card .close:active { color: var(--ink); transform: rotate(90deg) scale(.88); }
/* vnitřní stagger karty */
.card .label, .card h2, .card p, .card .meta, .card .cta {
  opacity: 0; transform: translateY(6px);
  transition: opacity .3s ease, transform .3s var(--ease-glide);
}
.card.open .label { transition-delay: .06s; opacity: 1; transform: none; }
.card.open h2    { transition-delay: .10s; opacity: 1; transform: none; }
.card.open p     { transition-delay: .14s; opacity: 1; transform: none; }
.card.open .meta { transition-delay: .18s; opacity: 1; transform: none; }
.card.open .cta  { transition-delay: .22s; opacity: 1; transform: none; }

/* ── motion primitivy (sdílené) ─────────── */
@keyframes fade-in    { from { opacity: 0; } }
@keyframes rise-in    { from { opacity: 0; transform: translateY(12px); } }
@keyframes pop-in     { from { transform: scale(.3); } }
@keyframes trail-draw { from { stroke-dashoffset: 1600; } }
@keyframes twinkle    { 0%, 100% { opacity: var(--o, .3); } 50% { opacity: calc(var(--o, .3) * .28); } }
@keyframes float-y    { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes neb-shimmer{ 0%, 100% { opacity: .92; } 50% { opacity: 1; } }

/* reveal on scroll (sdílené) */
.reveal { opacity: 0; transform: translateY(30px) scale(.985); transition: opacity .6s var(--ease-glide), transform .7s var(--ease-pop); }
.reveal.in { opacity: 1; transform: none; }

/* generativní galaxie na pozadí (canvas, za obsahem) */
.galaxy-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; pointer-events: none; }

/* scroll ukazatel (vpravo, injektuje neo.js na scroll stránkách) */
.scroll-rail { position: fixed; top: 18vh; right: 22px; width: 2px; height: 64vh;
  background: rgba(255,255,255,.06); border-radius: 2px;
  z-index: var(--z-chrome); pointer-events: none; overflow: visible; }
.scroll-rail i { position: absolute; top: 0; left: 0; width: 100%; height: 0;
  background: linear-gradient(180deg, var(--gold), var(--cyan)); border-radius: 2px;
  box-shadow: 0 0 8px rgba(217,179,106,.5); }
.scroll-rail b { position: absolute; left: 50%; top: 0; width: 7px; height: 7px;
  margin: -3px 0 0 -3.5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.scroll-rail .pct { display: none; }
@media (max-width: 720px) { .scroll-rail { display: none; } }

/* glow na sekundárních tlačítkách */
.ghost:hover { box-shadow: var(--glow-m); }

/* modal (pop-up detail) */
.modal { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center;
  padding: 24px; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.modal.open { opacity: 1; pointer-events: auto; }
.modal .backdrop { position: absolute; inset: 0; background: rgba(2,3,5,.72); backdrop-filter: blur(7px); }
.modal .panel { position: relative; width: min(480px, 92vw); background: var(--void-2);
  border: 1px solid var(--hairline); border-radius: var(--r-panel); padding: 30px;
  transform: translateY(18px) scale(.95); transition: transform .32s var(--ease-pop); }
.modal.open .panel { transform: none; }
.modal .panel .close { position: absolute; top: 16px; right: 18px; background: none; border: 0;
  color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer;
  transition: color .15s ease, transform var(--t-ctrl) var(--ease-pop); }
.modal .panel .close:hover { color: var(--ink); transform: rotate(90deg); }
.modal .panel .close:active { color: var(--ink); transform: rotate(90deg) scale(.88); }

/* oznámení postupu o level (neo.js): klidné okno nad panelem lekce (20), pod toastem (26) a veilem (30) */
.neo-lvlup { z-index: 24; }
.neo-lvlup[hidden] { display: none; }
.neo-lvlup .panel { width: min(440px, 100%); padding: 34px 30px 28px; overflow: hidden;
  background: linear-gradient(180deg, rgba(217, 179, 106, .05), rgba(9, 11, 17, 0) 55%), var(--void-2);
  transform: translateY(10px); transition: transform .45s var(--ease-glide); }
.neo-lvlup.open .panel { transform: none; }
.neo-lvlup .panel:focus { outline: none; }
.neo-lvlup .panel::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent); opacity: .7; }
.lvlup-hvezda { display: block; width: 18px; height: 18px; margin-bottom: 18px; color: var(--gold);
  filter: drop-shadow(0 0 8px rgba(217, 179, 106, .45)); }
.neo-lvlup h2 { font: 400 var(--h3)/1.15 var(--serif); margin: 12px 0 10px; text-wrap: balance; }
.lvlup-text { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.55; text-wrap: pretty; }
.lvlup-pozn { margin: 12px 0 0; font: 500 11px/1.5 var(--mono); letter-spacing: .04em; color: var(--muted-dim); }
.lvlup-akce { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 14px; margin-top: 26px; }
.lvlup-akce .cta { justify-content: center; }
@media (max-width: 480px) {
  .neo-lvlup .panel { padding: 28px 22px 22px; }
  .lvlup-akce .cta, .lvlup-akce .ghost { flex: 1 1 100%; justify-content: center; text-align: center; min-height: 48px; }
}

/* ── footer (sdílený, injektuje neo.js na scroll stránkách) ── */
.neo-foot { position: relative; padding: 72px 0 160px; text-align: center; }
.neo-foot::before { content: ""; position: absolute; left: 50%; top: 40px; width: min(340px, 100%); height: 130px;
  transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(ellipse, rgba(217,179,106,.09), transparent 70%); }
.neo-foot::after { content: ""; position: absolute; left: 50%; top: 0; width: min(520px, 80%); height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--hairline) 30%, var(--hairline) 70%, transparent); }
.neo-foot img { position: relative; height: 28px; margin: 0 auto 16px; opacity: .8; }
.neo-foot .links { display: flex; flex-wrap: wrap; gap: 0 var(--s-5); justify-content: center;
  padding: 0 var(--s-4);
  font: 600 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.neo-foot .links a { display: inline-flex; align-items: center; min-height: 44px;
  color: var(--muted); transition: color .15s ease; }
.neo-foot .links a:hover { color: var(--ink); }
.neo-foot .links a:active { color: var(--gold); }

.neo-foot .pravni-odkazy { position: relative; margin-top: 18px; }
.neo-foot-c { position: relative; margin-top: 14px; font: 500 11px/1 var(--mono); letter-spacing: .1em; color: var(--muted); }

/* ── právní odkazy (nav.pravni-odkazy, navrh/STRANKY-VZOR.md oddíl 3) ──
   Používá je každá stránka: patička veřejných stránek (staticky), pata a nabídka účtu
   z neo.js. Styl nezávisí na okolním markupu. Tlumená barva má na tmavém podkladu
   kontrast 6,4 : 1 (#8a93a6 na #040507), každý odkaz je vysoký aspoň 44 px (dotyk i myš). */
.pravni-odkazy { display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 0 18px; padding: 0 16px; max-width: 100%;
  font: 500 12px/1.35 var(--sans, -apple-system, "Segoe UI", Roboto, sans-serif); letter-spacing: 0; text-transform: none; }
.pravni-odkazy a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px;
  color: var(--muted, #8a93a6); text-decoration: none; text-underline-offset: 3px;
  overflow-wrap: anywhere; transition: color .15s ease; }
.pravni-odkazy a:hover { color: var(--ink, #f2f4f8); text-decoration: underline; }
.pravni-odkazy a:focus-visible { color: var(--ink, #f2f4f8); }
/* v nabídce účtu (mapa): sloupec pod oddělovačem, drobné písmo */
.neo-drop .pravni-odkazy { flex-direction: column; align-items: stretch; gap: 0; padding: 6px 0 2px;
  margin-top: 6px; border-top: 1px solid var(--hairline); }
.neo-drop .pravni-odkazy a { min-height: 44px; padding: 0 12px; border-radius: var(--r-ctrl); font-size: 12px; }
.neo-drop .pravni-odkazy a:hover, .neo-drop .pravni-odkazy a:focus-visible { background: rgba(255, 255, 255, .04); text-decoration: none; }
.neo-drop .pravni-odkazy a:focus-visible { outline-offset: -2px; }

/* ── odkaz „Přeskočit na obsah“ (.neo-skip): vidět jen při fokusu z klávesnice ──
   první prvek <body> každé stránky; na členských stránkách ho vkládá neo.js */
.neo-skip { position: absolute; left: 12px; top: 12px; z-index: 1000;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  background: var(--void-2, #090b11); color: var(--ink, #f2f4f8); border: 1px solid var(--hairline, #1f2430);
  border-radius: var(--r-box, 8px); font: 600 14px/1 var(--sans, -apple-system, "Segoe UI", Roboto, sans-serif);
  text-decoration: none; transform: translateY(calc(-100% - 24px)); }
.neo-skip:focus, .neo-skip:focus-visible { transform: none; outline: 2px solid var(--cyan, #9fe3f0); outline-offset: 2px; }
/* cíl skoku dostane tabindex=-1 jen kvůli fokusu, rámeček kolem celé stránky nepotřebuje */
.neo-skip-cil:focus { outline: none; }

/* ── toast (sdílený, vytváří window.neoToast v neo.js) ──
   "\n" v textu = další řádek (pre-line); nad oknem postupu (24) i panelem lekce (20), pod veilem (30) */
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(10px);
  width: max-content; max-width: calc(100vw - 32px); white-space: pre-line;
  background: var(--void-2); border: 1px solid var(--hairline); color: var(--ink);
  font: 500 12px/1.55 var(--mono); letter-spacing: .06em; padding: 9px 18px; border-radius: var(--r-box);
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s var(--ease-glide); z-index: 26; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── přístupnost ────────────────────────── */
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
/* text jen pro čtečky (např. „otevře se v novém okně“) */
.neo-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) {
  /* iteration-count 1: infinite smyčky by při .01ms trvání vzorkovaly náhodnou
     fázi každý frame (strobování) — takhle doběhnou hned a zůstanou statické */
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; }
  /* raketka: bez plamene v pohybu i bez jisker (neo.js navíc dává .lvl-static) */
  .lvl-rk .rk-fl-o, .lvl-rk .rk-fl-i, .lvl-rk .rk-zar { animation: none; }
}
/* html.neo-rm = totéž bez ohledu na OS: ?rm=1 nebo „Omezit pohyb“ v nastavení účtu (neo.js) */
html.neo-rm *, html.neo-rm *::before, html.neo-rm *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; }
html.neo-rm .lvl-rk .rk-fl-o, html.neo-rm .lvl-rk .rk-fl-i, html.neo-rm .lvl-rk .rk-zar { animation: none; }
html.neo-rm .neo-header { transition: none; }

/* ── hlavička pod desktopem (nav je dole): kompaktní dráha + „L4“ + avatar ── */
@media (max-width: 979px) {
  .neo-hdr-r { gap: 16px; }
  .neo-lvl { --trk: 88px; gap: 14px; }
  /* na krátké dráze menší raketka (desktop 46 px) */
  .lvl-rkt, .lvl-rkt svg { width: 35px; height: 13.5px; }
  .lvl-rkt { margin: -6.75px 0 0 -23.4px; }
  .lvl-long, .neo-header .stats .lvl-pts { display: none; }
  .lvl-short { display: inline; }
}

@media (max-width: 720px) {
  /* mono sub-label na CTA se na úzkém displeji láme — skrýt, hlavní text nezalamovat */
  .cta { white-space: nowrap; }
  .cta .mono { display: none; }
  .neo-header { padding: 0 20px; }
  .neo-hdr-r { gap: 14px; }
  .neo-lvl { --trk: 80px; gap: 12px; }
  .card { right: 16px; left: 16px; width: auto; }
}
@media (max-width: 360px) {
  .neo-lvl { --trk: 64px; }
}

/* ── desktop: navigace patří nahoru do hlavičky, dole zůstává jen na mobilu ──
   (design lock 2026-07-19; doplněno 2026-09-10 při stavbě Vesmíru;
   2026-09-23: 5 položek s Domů, odkazy s vnitřním paddingem = širší klikací plocha) */
@media (min-width: 980px) {
  .neo-nav {
    --nav-px: 6px;
    top: calc((var(--hdr-h) - 34px) / 2); bottom: auto; height: 34px; padding: 0; gap: 18px;
    align-items: center; background: none;
  }
  .neo-nav a { min-height: 0; height: 34px; }
  .neo-nav a.on::after { bottom: 4px; }
}
/* dlouhý název levelu (Hluboký vesmír) by pod 1360 px dojel k navigaci → štítek „LEVEL 05“, název je v tipu */
@media (min-width: 980px) and (max-width: 1359px) {
  .neo-lvl.lvl-dlouhy .lvl-nm { display: none; }
}
/* střední desktop: nav uprostřed + pravý blok se musí minout → užší dráha a nav */
@media (min-width: 980px) and (max-width: 1279px) {
  .neo-nav { --nav-px: 5px; gap: 10px; }
  .neo-hdr-r { gap: 16px; }
  /* dráha plynule roste 108 px (980) → 180 px (1279), ať na 1280 nic neskočí */
  .neo-lvl { --trk: clamp(108px, calc(108px + (100vw - 980px) * .24), 180px); gap: 14px; }
}

/* ── tisk (např. certifikát na A4): nic z toho, co vkládá neo.js ── */
@media print {
  .neo-skip, .neo-header, .neo-nav, .neo-foot, .toast, .page-veil, .scroll-rail, .neo-lvlup { display: none !important; }
}
