/* Pokec. Svět: česká hospoda a kuchyně. Povidla, tramvaj, hořčice, okurka, nebe. Tvary jako samolepky. */
@font-face { font-family: "Fredoka"; src: url("/fonts/fredoka.woff2") format("woff2"); font-weight: 400 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Fredoka"; src: url("/fonts/fredoka-ext.woff2") format("woff2"); font-weight: 400 700; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2C60-2C7F; }
@font-face { font-family: "Instrument"; src: url("/fonts/instrument.woff2") format("woff2"); font-weight: 400 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Instrument"; src: url("/fonts/instrument-ext.woff2") format("woff2"); font-weight: 400 700; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2C60-2C7F; }

:root {
  --papir: #FBF6FF;       /* pozadí */
  --bila: #FFFFFF;        /* plocha samolepky */
  --linka: #E6D9F0;       /* tiché linky a plochy */
  --povidla: #3B1F4F;     /* text a obrysy, 13:1 na papíru */
  --povidla-2: #6A5279;   /* vedlejší text, 6:1 na papíru */
  --tramvaj: #D62839;     /* hlavní akce a nahrávání, 5:1 s bílou */
  --tramvaj-tma: #AE1B2B;
  --tramvaj-sv: #FFE1E4;
  --horcice: #FFC53D;     /* zvýraznění, body, denní cíl */
  --horcice-sv: #FFF0C2;
  --okurka: #2E9E6A;      /* povedlo se */
  --okurka-tma: #17754C;  /* zelený text, 5.6:1 na bílé */
  --okurka-sv: #D8F3E4;
  --nebe: #2A62D8;        /* cesta, odkazy, 5.4:1 s bílou */
  --nebe-sv: #DCE8FF;
  --tab: var(--tramvaj); --tab-sv: var(--tramvaj-sv);
  --display: "Fredoka", "Instrument", system-ui, sans-serif;
  --text: "Instrument", system-ui, sans-serif;
  --r-s: 10px; --r-m: 16px; --r-l: 24px;
  --obrys: 2.5px solid var(--povidla);
  --stin: 0 4px 0 var(--povidla);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --nav-h: 4.4rem;
}
body[data-tab="pogovori"] { --tab: var(--nebe); --tab-sv: var(--nebe-sv); }
body[data-tab="sestavljanka"] { --tab: var(--okurka-tma); --tab-sv: var(--okurka-sv); }
body[data-tab="mosticki"] { --tab: var(--povidla); --tab-sv: var(--horcice-sv); }
body[data-tab="stavki"] { --tab: var(--nebe); --tab-sv: var(--nebe-sv); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--linka) var(--papir); }
body { margin: 0; background: var(--papir); color: var(--povidla); font: 400 1.0625rem/1.5 var(--text); min-height: 100dvh;
  caret-color: var(--tramvaj); accent-color: var(--tramvaj); }
::selection { background: var(--horcice); color: var(--povidla); }
[hidden] { display: none !important; }
h1, h2, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--nebe); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--nebe); outline-offset: 3px; border-radius: var(--r-s); }
main:focus { outline: none; }
.skip { position: absolute; left: -999px; top: 0; background: var(--povidla); color: #fff; padding: .6rem 1rem; z-index: 20; }
.skip:focus { left: .5rem; top: .5rem; }

#view { max-width: 35rem; margin: 0 auto; padding: 1.4rem 1.15rem calc(var(--nav-h) + 2.5rem + env(safe-area-inset-bottom)); }
h1 { font: 600 2.2rem/1.1 var(--display); text-wrap: balance; margin-bottom: .6rem; }
h2 { font: 600 1.35rem/1.2 var(--display); margin: 2.4rem 0 .7rem; }
.lead { color: var(--povidla-2); max-width: 36ch; margin-bottom: 1.4rem; text-wrap: pretty; }
/* Jazyk poznáš podle písma: čeština ve Fredoce, slovinština v Instrumentu. */
.cz { font-family: var(--display); font-weight: 600; }
.sl { color: var(--povidla-2); }
.note { font-size: .95rem; color: var(--povidla-2); margin-top: .9rem; padding: .7rem .9rem; background: var(--horcice-sv); border-radius: var(--r-s); text-wrap: pretty; }
.empty { color: var(--povidla-2); padding: 1.5rem 0; }
.meta { font-size: .9rem; color: var(--povidla-2); }
.ic { display: inline-flex; flex: none; }
.ic svg { width: 1.25em; height: 1.25em; }

/* tlačítka: samolepka, která se po stisku přilepí */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem; padding: .55rem 1.15rem;
  font: 600 1rem/1.2 var(--text); color: var(--povidla); background: var(--bila); border: var(--obrys); border-radius: 999px;
  box-shadow: var(--stin); text-decoration: none; cursor: pointer; transition: transform .12s var(--ease), box-shadow .12s var(--ease), background .15s;
  -webkit-tap-highlight-color: transparent; }
.btn:hover { background: var(--horcice-sv); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--povidla); }
.btn.primary { background: var(--tramvaj); color: #fff; }
.btn.primary:hover { background: var(--tramvaj-tma); }
.btn.quiet { background: none; border-color: transparent; box-shadow: none; color: var(--povidla-2); font-weight: 500; }
.btn.quiet:hover { color: var(--povidla); background: var(--linka); }
.btn.xl { width: 100%; min-height: 3.8rem; font: 600 1.25rem/1.2 var(--display); }
.btn:disabled { opacity: .5; cursor: default; }
.back { display: inline-flex; align-items: center; gap: .15rem; color: var(--povidla-2); text-decoration: none; font-weight: 600; margin: 0 0 1rem -.35rem; min-height: 2.75rem; }
.back:hover { color: var(--povidla); }

/* spodní lišta */
#nav { position: fixed; inset: auto 0 0 0; z-index: 10; display: flex; justify-content: center; background: var(--bila);
  border-top: var(--obrys); padding-bottom: env(safe-area-inset-bottom); }
#nav a { flex: 1 1 0; max-width: 7.5rem; min-height: var(--nav-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem;
  color: var(--povidla-2); text-decoration: none; font-size: .74rem; font-weight: 600; }
#nav a .ic { padding: .15rem .8rem; border-radius: 999px; border: 2px solid transparent; }
#nav a .ic svg { width: 1.5rem; height: 1.5rem; }
#nav a.on { color: var(--povidla); }
#nav a.on .ic { background: var(--horcice); border-color: var(--povidla); }

/* schAtzI, pixelový průvodce */
.schatzi { width: 6.5rem; height: 6.5rem; flex: none; }
.schatzi.tiny { width: 2.6rem; height: 2.6rem; }
.schatzi.big { width: 9rem; height: 9rem; justify-self: center; }
.hello .schatzi, .done .schatzi { animation: hop 2.6s var(--ease) infinite; transform-origin: 50% 100%; }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0) rotate(0); } 70% { transform: translateY(-7px) rotate(-4deg); } 82% { transform: translateY(0) rotate(3deg); } }

/* Danes */
.hello { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .9rem; margin: .4rem 0 1.3rem; }
.hello .say { position: relative; background: var(--bila); border: var(--obrys); border-radius: var(--r-l); box-shadow: var(--stin); padding: 1rem 1.1rem; }
.hello .say::before { content: ""; position: absolute; left: -11px; top: 50%; width: 18px; height: 18px; background: var(--bila);
  border-left: var(--obrys); border-bottom: var(--obrys); transform: translateY(-50%) rotate(45deg); }
.hello h1 { font-size: clamp(1.7rem, 7.6vw, 2.3rem); margin-bottom: .3rem; color: var(--tramvaj); }
.hello .lead { margin: 0; color: var(--povidla); font-size: 1rem; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: 1.5rem; }
.tile { display: grid; justify-items: center; align-content: start; gap: .1rem; padding: .8rem .4rem .7rem; border: var(--obrys); border-radius: var(--r-m);
  box-shadow: var(--stin); text-align: center; background: var(--bila); }
.tile.t-red { background: var(--tramvaj-sv); } .tile.t-yellow { background: var(--horcice-sv); } .tile.t-blue { background: var(--nebe-sv); }
.tile .ic svg { width: 1.6rem; height: 1.6rem; }
.tile.t-red .ic { color: var(--tramvaj); } .tile.t-blue .ic { color: var(--nebe); }
.tile b { font: 700 1.7rem/1.1 var(--display); font-variant-numeric: tabular-nums; }
.tile span { font-size: .8rem; line-height: 1.25; color: var(--povidla); }
.ring { --part: 0; width: 3.5rem; height: 3.5rem; border-radius: 50%; display: grid; place-items: center; border: var(--obrys);
  background: radial-gradient(closest-side, var(--bila) 72%, transparent 73%), conic-gradient(var(--tramvaj) calc(var(--part) * 1turn), var(--bila) 0); }
.ring.full { background: radial-gradient(closest-side, var(--bila) 72%, transparent 73%), conic-gradient(var(--okurka) 1turn, var(--okurka) 0); }
.ring b { font-size: 1.15rem; }
.trip .where { margin-bottom: .8rem; }
.trip .where .ic, .gains .ic { vertical-align: -.2em; margin-right: .3rem; }
.trip .where .ic { color: var(--nebe); }
.progress { height: 10px; background: var(--bila); border: 2px solid var(--povidla); border-radius: 999px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--okurka); transform-origin: left; transition: transform .5s var(--ease); }
.progress.wide { height: 14px; margin-bottom: .5rem; }
.progress.wide i { background: var(--nebe); }
.route { display: flex; gap: 0; overflow-x: auto; margin: 1rem -1.15rem 0; padding: .4rem 1.15rem 1rem; scrollbar-width: none; }
.route li { flex: none; min-width: 5.6rem; display: grid; justify-items: center; align-content: end; gap: .3rem; position: relative; font-size: .88rem; color: var(--povidla-2); height: 5rem; }
.route li::before { content: ""; position: absolute; left: -50%; right: 50%; bottom: 1.95rem; border-top: 3px dashed var(--linka); }
.route li:first-child::before { display: none; }
.route li.reached::before, .route li.here::before { border-top: 3px solid var(--nebe); }
.route .dot { width: 1rem; height: 1rem; border-radius: 50%; background: var(--bila); border: var(--obrys); position: relative; z-index: 1; }
.route .reached .dot { background: var(--nebe); }
.route .schatzi { position: relative; z-index: 1; margin-bottom: -.5rem; }
.route .here { color: var(--povidla); }
.route .cz { font-weight: 500; white-space: nowrap; }
.route .here .cz { font-weight: 700; }
.stats b { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; }
.days { display: flex; align-items: flex-end; gap: 5px; height: 64px; margin-top: 1rem; }
.bar { flex: 1; background: var(--okurka); border-radius: 5px 5px 2px 2px; }
.bar.zero { background: var(--linka); }
.badges ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.6rem, 1fr)); gap: .6rem; }
.badges li { display: grid; grid-template-columns: auto 1fr; gap: .1rem .5rem; align-content: start; padding: .7rem .8rem; border: 2px dashed var(--linka); border-radius: var(--r-m);
  color: var(--povidla-2); font-size: .82rem; line-height: 1.3; }
.badges li .ic { grid-row: span 2; color: var(--linka); }
.badges li b { font: 600 1rem/1.2 var(--display); color: var(--povidla-2); }
.badges li span:last-child { grid-column: 2; }
.badges li.got { border: var(--obrys); background: var(--horcice-sv); box-shadow: var(--stin); color: var(--povidla); }
.badges li.got .ic { color: var(--tramvaj); } .badges li.got b { color: var(--povidla); }
.settings .row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.4rem; border-bottom: 2px solid var(--linka); }
.settings .btn.quiet { margin: 1rem 0 0 -1.1rem; }
.stepper { display: inline-flex; align-items: center; gap: .4rem; }
.stepper button { width: 2.75rem; height: 2.75rem; border-radius: 999px; border: var(--obrys); background: var(--bila); font: 600 1.3rem/1 var(--text); color: var(--povidla); cursor: pointer; }
.stepper output { min-width: 2.2ch; text-align: center; font: 700 1.1rem var(--display); font-variant-numeric: tabular-nums; }
input[role="switch"] { appearance: none; width: 3.3rem; height: 1.9rem; border-radius: 999px; background: var(--bila); border: var(--obrys); position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
input[role="switch"]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--povidla); transition: transform .2s var(--ease); }
input[role="switch"]:checked { background: var(--okurka); }
input[role="switch"]:checked::after { transform: translateX(1.4rem); }

/* Lekcija */
.lesson-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .2rem .8rem; margin-bottom: 1.2rem; }
.lesson-head .back { margin: 0 0 0 -.35rem; }
.count { font-size: .9rem; color: var(--povidla-2); font-variant-numeric: tabular-nums; font-weight: 600; }
.group { grid-column: 1 / -1; font-size: .9rem; color: var(--povidla-2); }
.card { background: var(--bila); border: var(--obrys); border-radius: var(--r-l); padding: 1.4rem 1.2rem 1.4rem; box-shadow: 0 6px 0 var(--povidla); }
.card > .count { margin-bottom: .6rem; }
.cz.huge { font-size: clamp(2rem, 9.5vw, 2.9rem); font-weight: 600; line-height: 1.1; text-wrap: balance; overflow-wrap: anywhere; }
.cz.big { font-size: clamp(1.6rem, 7.5vw, 2.2rem); font-weight: 600; line-height: 1.15; text-wrap: balance; overflow-wrap: anywhere; }
.sl.cue { font: 600 clamp(1.4rem, 6.5vw, 1.9rem)/1.2 var(--text); color: var(--povidla); text-wrap: balance; margin-bottom: 1.2rem; }
.pic { display: block; width: min(100%, 15rem); height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-m); border: var(--obrys); margin: 0 auto 1rem; background: var(--linka); }
.ab { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.reveal { margin-top: 1.4rem; }
.reveal .hint { color: var(--povidla-2); margin-bottom: .9rem; }
.reveal .sl { font-size: 1.3rem; color: var(--povidla); font-weight: 500; }
.far { background: linear-gradient(transparent 56%, var(--horcice) 56%); padding: 0 .05em; }
.legend { font-size: .9rem; color: var(--povidla-2); margin-top: .5rem; }
.choice, .rate { display: grid; gap: .55rem; margin-top: 1.4rem; }
.choice { grid-template-columns: 1fr 1fr; }
.rate { grid-auto-flow: column; grid-auto-columns: 1fr; gap: .4rem; }
.rate .btn, .choice .btn { padding-inline: .3rem; min-height: 3.4rem; }
.rate .btn { font-size: .95rem; }
.rate .r1 { background: var(--tramvaj-sv); } .rate .r2 { background: var(--horcice-sv); } .rate .r3 { background: var(--okurka-sv); } .rate .r4 { background: var(--nebe-sv); }
.rate .suggested { outline: 3px solid var(--povidla); outline-offset: 2px; }
.card > .btn.primary:last-child { margin-top: 1.2rem; width: 100%; }
.done { display: grid; gap: .8rem; text-align: center; justify-items: stretch; }
.done .schatzi { justify-self: center; }
.done h1 { font-size: 2.7rem; color: var(--tramvaj); margin: 0; }
.done h2 { margin: 0; font-size: 2rem; color: var(--tramvaj); }
.done .lead { margin: 0 auto; }
.gains { display: grid; gap: .5rem; text-align: left; }
.gains p, p.xp { padding: .6rem .8rem; border: var(--obrys); border-radius: var(--r-m); background: var(--horcice-sv); }
.gains .xp, p.xp { font: 700 1.3rem/1.2 var(--display); text-align: center; background: var(--horcice); }
p.xp .ic { vertical-align: -.2em; margin-right: .3rem; color: var(--tramvaj); }
.gains .stop { background: var(--nebe-sv); } .gains .badge-new { background: var(--okurka-sv); }
.gains .ic { color: var(--tramvaj); }

/* konfety z diakritiky */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.confetti span { position: absolute; top: -3rem; left: var(--x); font: 700 var(--size)/1 var(--display); animation: fall var(--dur) var(--delay) cubic-bezier(.3, .5, .6, 1) forwards; }
.confetti .c-red { color: var(--tramvaj); } .confetti .c-yellow { color: var(--horcice); } .confetti .c-green { color: var(--okurka); } .confetti .c-blue { color: var(--nebe); }
@keyframes fall { to { transform: translate(var(--drift), 108vh) rotate(var(--spin)); } }

/* Mluvení */
.speak-stage { display: grid; justify-items: center; gap: .7rem; padding: .6rem 0 .2rem; text-align: center; }
.mic { width: 5.8rem; height: 5.8rem; border-radius: 50%; border: var(--obrys); background: var(--tramvaj); color: #fff; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 6px 0 var(--povidla); transition: transform .12s var(--ease), box-shadow .12s var(--ease), background .2s; -webkit-tap-highlight-color: transparent; }
.mic .ic svg { width: 2.3rem; height: 2.3rem; }
.mic:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--povidla); }
.mic.live { background: var(--povidla); animation: pulse 1.3s ease-out infinite; }
.mic.busy { background: var(--povidla-2); animation: breathe 1s ease-in-out infinite alternate; }
.mic:disabled { cursor: default; }
@keyframes pulse { from { box-shadow: 0 6px 0 var(--povidla), 0 0 0 0 rgb(214 40 57 / .5); } to { box-shadow: 0 6px 0 var(--povidla), 0 0 0 1.4rem rgb(214 40 57 / 0); } }
@keyframes breathe { to { opacity: .55; } }
.mic-label { font-weight: 600; }
.speak-status { color: var(--tramvaj-tma); font-size: .95rem; min-height: 1.3em; }
.w.ok { color: var(--okurka-tma); }
.w.miss { color: var(--tramvaj-tma); text-decoration: underline wavy 2px; text-underline-offset: .16em; }
.verdict { margin-top: .7rem; color: var(--povidla-2); }
.verdict.good { color: var(--okurka-tma); font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.verdict.good .cz { font-size: 1.2rem; }
.verdict q { color: var(--povidla); font-style: italic; }

/* seznamy */
.list { display: grid; gap: .7rem; counter-reset: n; }
.list a { display: grid; gap: .15rem; padding: .9rem 1.1rem; background: var(--bila); border: var(--obrys); border-radius: var(--r-m); box-shadow: var(--stin);
  text-decoration: none; color: var(--povidla); transition: transform .12s var(--ease), box-shadow .12s var(--ease), background .15s; }
.list a:hover { background: var(--tab-sv); }
.list a:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--povidla); }
.list .cz { font-size: 1.25rem; line-height: 1.2; }
ol.list a { grid-template-columns: 2.4rem 1fr; }
ol.list a::before { counter-increment: n; content: counter(n); grid-row: span 2; align-self: center; width: 2rem; height: 2rem; display: grid; place-items: center;
  border-radius: 50%; background: var(--tab-sv); border: 2px solid var(--povidla); font: 700 1rem/1 var(--display); font-variant-numeric: tabular-nums; }
.list.pics a { grid-template-columns: 4.2rem 1fr; column-gap: .9rem; align-items: center; padding: .6rem .9rem .6rem .6rem; }
.thumb { grid-row: span 2; width: 4.2rem; height: 4.2rem; border-radius: var(--r-s); border: 2px solid var(--povidla); object-fit: cover; background: var(--linka); }
.list.pics .cz { align-self: end; } .list.pics .meta { align-self: start; }

/* Pogovor */
.tools { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.4rem; }
.chat { display: grid; gap: .7rem; }
.bubble { max-width: 88%; padding: .7rem 1rem .8rem; border: var(--obrys); border-radius: 20px 20px 20px 5px; background: var(--bila); justify-self: start; text-align: left; transition: box-shadow .2s; }
.bubble.me { justify-self: end; background: var(--tab-sv); border-radius: 20px 20px 5px 20px; }
.bubble[role="button"] { cursor: pointer; }
.bubble.now { box-shadow: 0 0 0 4px var(--horcice); }
.bubble .who { display: block; font-size: .8rem; font-weight: 600; color: var(--povidla-2); margin-bottom: .1rem; }
.bubble .cz { font-size: 1.2rem; line-height: 1.25; }
.bubble .sl { font-size: .95rem; margin-top: .15rem; }
.bubble .note { margin-top: .5rem; font-size: .88rem; }
.turn { background: var(--bila); border: var(--obrys); border-radius: var(--r-l); padding: 1.1rem; display: grid; gap: .8rem; }
.turn .btn.primary { width: 100%; }

/* Učiteljica */
h2.first { margin-top: 1rem; }
.scenarios { display: flex; flex-wrap: wrap; gap: .6rem; }
.tutor .chat { min-height: 8rem; }
.tutor .bubble, .hintbox { scroll-margin-bottom: 12rem; }
.tutor .bubble .ab { margin-top: .6rem; gap: .35rem; flex-wrap: nowrap; }
.tutor .bubble .ab .btn { min-height: 2.75rem; min-width: 2.75rem; padding: .3rem .7rem; font-size: .9rem; box-shadow: none; border-width: 2px; }
.fix { margin-top: .45rem; padding-top: .4rem; border-top: 2px dashed var(--povidla-2); }
.fix-label { font-size: .88rem; font-weight: 700; color: var(--okurka-tma); }
.hintbox { background: var(--horcice); border: var(--obrys); border-radius: var(--r-m); padding: .8rem 1rem; margin-top: .8rem; }
.hintbox .cz { font-size: 1.2rem; }
.hintbox .sl { color: var(--povidla); font-size: .95rem; }
.composer { position: sticky; bottom: calc(var(--nav-h) + .6rem + env(safe-area-inset-bottom)); z-index: 5; display: grid; grid-template-columns: auto 1fr auto; gap: .5rem; align-items: center;
  margin-top: .6rem; padding: .45rem; background: var(--bila); border: var(--obrys); border-radius: 999px; box-shadow: var(--stin); }
.mic.small { width: 3.3rem; height: 3.3rem; box-shadow: none; }
.mic.small:active { transform: scale(.94); box-shadow: none; }
.mic.small .ic svg { width: 1.5rem; height: 1.5rem; }
.composer .btn { box-shadow: none; }
input.say { min-width: 0; min-height: 2.9rem; padding: .4rem .5rem; font: inherit; color: var(--povidla); background: none; border: none; border-radius: var(--r-s); }
input.say::placeholder { color: var(--povidla-2); }
.tutor .speak-status { color: var(--povidla-2); margin-top: .7rem; text-align: center; }
.tutor .speak-status.err { color: var(--tramvaj-tma); }
.tutor > .btn.quiet { display: flex; margin: .2rem auto 0; }

/* Sestavljanka, Stavki */
.pairs, .phrases { display: grid; gap: .45rem; margin-top: 1.3rem; }
.pair { width: 100%; text-align: left; display: grid; gap: .1rem; padding: .75rem 1rem; background: var(--bila); border: 2px solid var(--linka); border-radius: var(--r-m); cursor: pointer; font: inherit; color: inherit; }
.pair:hover { background: var(--tab-sv); border-color: var(--povidla); }
.pair .cz { font-size: 1.15rem; line-height: 1.25; }
.pair .sl { font-size: .95rem; }
.phrases .note { margin: .3rem 0 .2rem; }
input[type="search"] { width: 100%; min-height: 3.1rem; padding: .6rem 1.1rem; font: inherit; color: var(--povidla); background: var(--bila); border: var(--obrys); border-radius: 999px; }
input[type="search"]::placeholder { color: var(--povidla-2); }
.chips { display: flex; gap: .45rem; overflow-x: auto; padding: 1rem 1.15rem .5rem; margin: 0 -1.15rem; scrollbar-width: none; }
.chip { flex: none; min-height: 2.75rem; padding: .3rem 1rem; border-radius: 999px; border: var(--obrys); background: var(--bila); font: 600 .95rem/1 var(--text); color: var(--povidla); cursor: pointer; }
.chip.on { box-shadow: var(--stin); transform: translateY(-2px); }
.chip.on.k-red, .banner.k-red { background: var(--tramvaj-sv); } .chip.on.k-yellow, .banner.k-yellow { background: var(--horcice-sv); }
.chip.on.k-green, .banner.k-green { background: var(--okurka-sv); } .chip.on.k-blue, .banner.k-blue { background: var(--nebe-sv); }
.banner { display: grid; grid-template-columns: 5.5rem 1fr; column-gap: 1rem; align-items: center; margin-top: .8rem; padding: .7rem; border: var(--obrys); border-radius: var(--r-l); box-shadow: var(--stin); }
.banner img { grid-row: span 2; width: 5.5rem; height: 5.5rem; border-radius: var(--r-m); border: 2px solid var(--povidla); object-fit: cover; }
.banner h2 { margin: 0; align-self: end; } .banner .meta { align-self: start; color: var(--povidla); }

/* Mostički */
.tablewrap { overflow-x: auto; margin: .8rem -1.15rem 0; padding: 0 1.15rem; }
table { border-collapse: collapse; width: 100%; font-size: .97rem; }
th { text-align: left; font-weight: 600; color: var(--povidla-2); font-size: .88rem; padding: .4rem .8rem .4rem 0; border-bottom: 2.5px solid var(--povidla); }
td { padding: .55rem .8rem .55rem 0; border-bottom: 2px solid var(--linka); vertical-align: top; }
td.cz { color: var(--tramvaj-tma); font-size: 1.05rem; }
.points { display: grid; gap: .5rem; margin-top: .7rem; padding-left: 1.1rem; list-style: disc; }
.points li::marker { color: var(--tramvaj); }
.bridges details { border-bottom: 2px solid var(--linka); padding-bottom: .2rem; }
.bridges details[open] { padding-bottom: 1.6rem; }
.bridges summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.4rem; cursor: pointer; list-style: none; }
.bridges summary::-webkit-details-marker { display: none; }
.bridges summary h2 { margin: 0; }
.bridges summary::after { content: ""; width: .6rem; height: .6rem; flex: none; margin-right: .3rem; border-right: 3px solid var(--tramvaj); border-bottom: 3px solid var(--tramvaj); transform: rotate(45deg); transition: transform .2s var(--ease); }
.bridges details[open] > summary::after { transform: rotate(-135deg); }
.bridges details > p { max-width: 62ch; text-wrap: pretty; }
.ff { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .7rem; margin-top: 1rem; }
.ff button { width: 100%; height: 100%; text-align: left; display: grid; align-content: start; gap: .1rem; padding: 0 0 .8rem; background: var(--bila); border: var(--obrys); border-radius: var(--r-m);
  box-shadow: var(--stin); overflow: hidden; cursor: pointer; font: inherit; color: inherit; }
.ff img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; background: var(--linka); margin-bottom: .5rem; border-bottom: var(--obrys); }
.ff span { padding: 0 .8rem; }
.ff .cz { font-size: 1.25rem; }
.ff .note { font-size: .82rem; background: none; margin: .2rem 0 0; padding-top: 0; padding-bottom: 0; }

/* prijava */
.login main { max-width: 22rem; margin: 0 auto; padding: 8vh 1.4rem 2rem; }
.login .schatzi { display: block; width: 9rem; height: 9rem; margin: 0 auto .4rem; animation: hop 2.6s var(--ease) infinite; transform-origin: 50% 100%; }
.login h1 { font-size: clamp(3.2rem, 17vw, 4.2rem); font-weight: 700; color: var(--tramvaj); margin-bottom: .2rem; text-align: center; }
.login .lead { text-align: center; margin-inline: auto; }
.login form { display: grid; gap: .4rem; margin-top: 1.4rem; }
.login label { font-weight: 600; font-size: .95rem; margin-top: .6rem; }
.login input { min-height: 3.2rem; padding: .6rem .9rem; font: inherit; color: var(--povidla); background: var(--bila); border: var(--obrys); border-radius: var(--r-m); }
.login input:focus-visible { outline-offset: 0; }
.login .btn { margin-top: 1.3rem; }
.error { color: var(--tramvaj-tma); font-weight: 600; }

.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 1.2rem); transform: translateX(-50%); z-index: 30; background: var(--povidla); color: #fff; padding: .75rem 1.1rem;
  border-radius: var(--r-m); max-width: min(90vw, 28rem); text-align: center; }

@media (min-width: 60rem) {
  #view { padding-top: 5.8rem; padding-bottom: 4rem; }
  .composer { bottom: 1rem; }
  .tutor .bubble, .hintbox { scroll-margin-bottom: 7rem; }
  #nav { inset: 0 0 auto 0; border-top: none; border-bottom: var(--obrys); }
  #nav a { flex-direction: row; gap: .5rem; font-size: .95rem; min-height: 3.6rem; max-width: 10.5rem; }
  .toast { bottom: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  /* stav nahrávání dál nese barva a ikona, jen bez pulzu; maskot stojí, konfety se nespouští (fx.js) */
  .mic.live, .mic.busy, .schatzi { animation: none !important; }
  .mic.live { box-shadow: 0 6px 0 var(--povidla), 0 0 0 .45rem rgb(214 40 57 / .3); }
  .mic.busy { opacity: .7; }
  .progress i, .btn, .mic, .list a, input[role="switch"]::after, .bridges summary::after { transition: none; }
}

/* schAtzI mluví */
.schatzi { image-rendering: pixelated; }
.hello .sweet { font-size: 1.12rem; line-height: 1.25; font-weight: 500; }
.hello .say .sl { font-size: .9rem; margin-top: .15rem; }
.lead.plan { color: var(--povidla); font-weight: 600; max-width: none; margin-bottom: 1rem; }
.cheer { display: grid; gap: .1rem; padding: .7rem .9rem; border: var(--obrys); border-radius: var(--r-m) var(--r-m) var(--r-m) 5px; background: var(--tramvaj-sv); text-align: left; }
.cheer .cz { font-size: 1.2rem; line-height: 1.25; }
.cheer .sl { font-size: .9rem; }
