/* Pogovor. Barvy ze slovinských reálií: ledovcová voda, borovice, Soča, nagelj, lipa. */
@font-face { font-family: "Bricolage"; src: url("/fonts/bricolage.woff2") format("woff2"); font-weight: 400 800; 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: "Bricolage"; src: url("/fonts/bricolage-ext.woff2") format("woff2"); font-weight: 400 800; 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 {
  --voda: #EEF3F0;      /* pozadí */
  --led: #FFFFFF;       /* plocha karty */
  --mlha: #DCE6E1;      /* linky, tiché plochy */
  --bor: #12302B;       /* text */
  --bor-2: #48635D;     /* vedlejší text, 5.6:1 na vodě */
  --soca: #0B7466;      /* hlavní akce, 5.6:1 s bílou */
  --soca-tma: #085A4F;
  --soca-sv: #D3ECE6;
  --nagelj: #B81B40;    /* rozdíl, chyba, nahrávání */
  --nagelj-sv: #FBE3E8;
  --lipa: #F2DA72;      /* zvýraznění slov */
  --display: "Bricolage", "Instrument", system-ui, sans-serif;
  --text: "Instrument", system-ui, sans-serif;
  --r-s: 8px; --r-m: 14px; --r-l: 22px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --nav-h: 4.25rem;
}

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

#view { max-width: 35rem; margin: 0 auto; padding: 1.5rem 1.15rem calc(var(--nav-h) + 2.5rem + env(safe-area-inset-bottom)); }
h1 { font: 700 2.25rem/1.08 var(--display); letter-spacing: -.025em; text-wrap: balance; margin-bottom: .6rem; }
h2 { font: 650 1.3rem/1.2 var(--display); letter-spacing: -.01em; margin: 2.4rem 0 .6rem; }
.lead { color: var(--bor-2); max-width: 34ch; margin-bottom: 1.4rem; text-wrap: pretty; }
.sl { font-family: var(--display); font-weight: 600; }
.cz { color: var(--bor-2); }
.note { font-size: .95rem; color: var(--bor-2); margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--mlha); text-wrap: pretty; }
.pron { font-size: .95rem; color: var(--bor-2); font-style: italic; margin-top: .25rem; }
.pron::before { content: "["; } .pron::after { content: "]"; }
.empty { color: var(--bor-2); padding: 1.5rem 0; }
.ic { display: inline-flex; flex: none; }
.ic svg { width: 1.25em; height: 1.25em; }

/* tlačítka */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.9rem; padding: .55rem 1.1rem;
  font: 600 1rem/1.2 var(--text); color: var(--bor); background: var(--led); border: 1.5px solid var(--mlha); border-radius: 999px;
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .15s var(--ease); -webkit-tap-highlight-color: transparent; }
.btn:hover { border-color: var(--soca); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--soca); border-color: var(--soca); color: #fff; }
.btn.primary:hover { background: var(--soca-tma); border-color: var(--soca-tma); }
.btn.quiet { background: none; border-color: transparent; color: var(--bor-2); font-weight: 500; }
.btn.quiet:hover { color: var(--bor); border-color: var(--mlha); }
.btn.xl { width: 100%; min-height: 3.6rem; font-size: 1.15rem; }
.btn:disabled { opacity: .5; cursor: default; }
.back { display: inline-flex; align-items: center; gap: .15rem; color: var(--bor-2); text-decoration: none; font-weight: 500; margin: 0 0 1rem -.35rem; min-height: 2.75rem; }
.back:hover { color: var(--bor); }

/* spodní lišta */
#nav { position: fixed; inset: auto 0 0 0; z-index: 10; display: flex; justify-content: center; background: color-mix(in srgb, var(--voda) 92%, transparent);
  backdrop-filter: blur(10px); border-top: 1px solid var(--mlha); 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(--bor-2); text-decoration: none; font-size: .74rem; font-weight: 600; }
#nav a .ic svg { width: 1.5rem; height: 1.5rem; }
#nav a.on { color: var(--soca-tma); }
#nav a.on .ic { background: var(--soca-sv); border-radius: 999px; padding: .15rem .9rem; margin: -.15rem 0; }

/* Dnes */
.greet { font-size: clamp(3rem, 15vw, 4.6rem); font-weight: 750; letter-spacing: -.04em; line-height: .95; margin: 1.2rem 0 1rem; color: var(--soca-tma); }
.home .lead { font-size: 1.2rem; color: var(--bor); max-width: 26ch; }
.stats { margin-top: 2.2rem; display: grid; gap: .3rem; }
.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(--soca); border-radius: 4px 4px 1px 1px; }
.bar.zero { background: var(--mlha); }
.settings .row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.2rem; border-bottom: 1px solid var(--mlha); }
.settings .btn.quiet { margin: 1rem 0 0 -1.1rem; }
.stepper { display: inline-flex; align-items: center; gap: .3rem; }
.stepper button { width: 2.75rem; height: 2.75rem; border-radius: 999px; border: 1.5px solid var(--mlha); background: var(--led); font: 600 1.3rem/1 var(--text); color: var(--bor); cursor: pointer; }
.stepper output { min-width: 2.2ch; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
input[role="switch"] { appearance: none; width: 3.1rem; height: 1.8rem; border-radius: 999px; background: var(--mlha); position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
input[role="switch"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: calc(1.8rem - 6px); height: calc(1.8rem - 6px); border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(18 48 43 / .3); transition: transform .2s var(--ease); }
input[role="switch"]:checked { background: var(--soca); }
input[role="switch"]:checked::after { transform: translateX(1.3rem); }

/* Lekce */
.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; }
.progress { height: 6px; background: var(--mlha); border-radius: 3px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--soca); border-radius: 3px; transform-origin: left; transition: transform .4s var(--ease); }
.count { font-size: .9rem; color: var(--bor-2); font-variant-numeric: tabular-nums; }
.group { grid-column: 1 / -1; font-size: .9rem; color: var(--bor-2); }
.card { background: var(--led); border-radius: var(--r-l); padding: 1.5rem 1.3rem 1.4rem; box-shadow: 0 1px 2px rgb(18 48 43 / .06), 0 10px 28px -14px rgb(18 48 43 / .22); }
.card > .count { margin-bottom: .6rem; }
.sl.huge { font-size: clamp(2rem, 9.5vw, 2.9rem); font-weight: 700; line-height: 1.08; letter-spacing: -.03em; text-wrap: balance; overflow-wrap: anywhere; }
.sl.big { font-size: clamp(1.6rem, 7.5vw, 2.2rem); font-weight: 700; line-height: 1.12; letter-spacing: -.025em; text-wrap: balance; overflow-wrap: anywhere; }
.cz.cue { font: 600 clamp(1.5rem, 7vw, 2rem)/1.15 var(--display); color: var(--bor); letter-spacing: -.02em; text-wrap: balance; margin-bottom: 1.2rem; }
.pic { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-m); margin-bottom: 1rem; background: var(--mlha); }
.ab { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.reveal { margin-top: 1.4rem; }
.reveal .hint { color: var(--bor-2); margin-bottom: .9rem; }
.reveal .cz { font-size: 1.3rem; color: var(--bor); font-weight: 500; }
.far { background: linear-gradient(transparent 58%, var(--lipa) 58%); padding: 0 .05em; }
.legend { font-size: .9rem; color: var(--bor-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.3rem; }
.rate .btn { font-size: .95rem; }
.rate .r1 { color: var(--nagelj); }
.rate .suggested { border-color: var(--bor); box-shadow: inset 0 0 0 1px var(--bor); }
.card > .btn.primary:last-child { margin-top: 1.2rem; width: 100%; }
.done { text-align: left; display: grid; gap: .7rem; }
.done h1 { font-size: 3.4rem; color: var(--soca-tma); }
.done h2 { margin-top: 0; }

/* Mluvení */
.speak-stage { display: grid; justify-items: center; gap: .7rem; padding: .6rem 0 .2rem; text-align: center; }
.mic { width: 5.6rem; height: 5.6rem; border-radius: 50%; border: none; background: var(--soca); color: #fff; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 8px 22px -8px rgb(11 116 102 / .7); transition: transform .2s var(--ease), background .2s; -webkit-tap-highlight-color: transparent; }
.mic .ic svg { width: 2.3rem; height: 2.3rem; }
.mic:active { transform: scale(.94); }
.mic.live { background: var(--nagelj); box-shadow: 0 0 0 0 rgb(184 27 64 / .45); animation: pulse 1.3s ease-out infinite; }
.mic.busy { background: var(--bor-2); animation: breathe 1s ease-in-out infinite alternate; }
.mic:disabled { cursor: default; }
@keyframes pulse { to { box-shadow: 0 0 0 1.4rem rgb(184 27 64 / 0); } }
@keyframes breathe { to { opacity: .55; } }
.mic-label { font-weight: 600; }
.speak-status { color: var(--nagelj); font-size: .95rem; min-height: 1.3em; }
.w.ok { color: var(--soca-tma); }
.w.miss { color: var(--nagelj); text-decoration: underline wavy 2px; text-underline-offset: .16em; }
.verdict { margin-top: .7rem; color: var(--bor-2); }
.verdict.good { color: var(--soca-tma); font-weight: 600; display: flex; align-items: center; gap: .4rem; }
.verdict q { color: var(--bor); font-style: italic; }

/* seznamy */
.list { display: grid; gap: .55rem; counter-reset: n; }
.list a { display: grid; gap: .15rem; padding: .95rem 1.1rem; background: var(--led); border-radius: var(--r-m); text-decoration: none; color: var(--bor);
  border: 1.5px solid transparent; transition: border-color .15s; }
.list a:hover { border-color: var(--soca); }
.list .sl { font-size: 1.2rem; line-height: 1.2; }
.meta { font-size: .9rem; color: var(--bor-2); }
ol.list a { grid-template-columns: 2rem 1fr; }
ol.list a::before { counter-increment: n; content: counter(n); grid-row: span 2; font: 700 1.2rem/1.3 var(--display); color: var(--soca); font-variant-numeric: tabular-nums; }

/* Rozhovor */
.tools { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.3rem; }
.chat { display: grid; gap: .65rem; }
.bubble { max-width: 88%; padding: .75rem 1rem .8rem; border-radius: 20px 20px 20px 6px; background: var(--led); justify-self: start; text-align: left; transition: box-shadow .2s; }
.bubble.me { justify-self: end; background: var(--soca-sv); border-radius: 20px 20px 6px 20px; }
.bubble[role="button"] { cursor: pointer; }
.bubble.now { box-shadow: 0 0 0 2.5px var(--soca); }
.bubble .who { display: block; font-size: .8rem; font-weight: 600; color: var(--bor-2); margin-bottom: .1rem; }
.bubble .sl { font-size: 1.15rem; line-height: 1.25; }
.bubble .cz { font-size: .95rem; margin-top: .15rem; }
.bubble .note { margin-top: .5rem; padding-top: .45rem; font-size: .88rem; border-top-color: rgb(18 48 43 / .14); }
.turn { background: var(--led); border-radius: var(--r-l); padding: 1.1rem; display: grid; gap: .8rem; }
.turn .btn.primary { width: 100%; }

/* Stavebnice, Fráze */
.pairs, .phrases { display: grid; gap: 2px; margin-top: 1.3rem; }
.pair { width: 100%; text-align: left; display: grid; gap: .1rem; padding: .8rem 1rem; background: var(--led); border: none; border-radius: var(--r-s); cursor: pointer; font: inherit; color: inherit; }
.pair:hover { background: var(--soca-sv); }
.pair .sl { font-size: 1.12rem; line-height: 1.25; }
.pair .cz { font-size: .95rem; }
.more { background: var(--led); padding: 0 1rem .8rem; border-radius: 0 0 var(--r-s) var(--r-s); margin-top: -2px; }
.more .note { margin-top: .4rem; }
.grp { font: 650 1rem/1.3 var(--display); padding: 1.3rem 0 .4rem; }
input[type="search"] { width: 100%; min-height: 3rem; padding: .6rem 1rem; font: inherit; color: var(--bor); background: var(--led); border: 1.5px solid var(--mlha); border-radius: 999px; }
input[type="search"]::placeholder { color: var(--bor-2); }
.chips { display: flex; gap: .4rem; overflow-x: auto; padding: .9rem 1.15rem .3rem; margin: 0 -1.15rem; scrollbar-width: none; }
.chip { flex: none; min-height: 2.75rem; padding: .3rem .95rem; border-radius: 999px; border: 1.5px solid var(--mlha); background: none; font: 600 .95rem/1 var(--text); color: var(--bor-2); cursor: pointer; }
.chip.on { background: var(--bor); border-color: var(--bor); color: #fff; }

/* Můstky */
.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(--bor-2); font-size: .88rem; padding: .4rem .8rem .4rem 0; border-bottom: 1.5px solid var(--bor); }
td { padding: .55rem .8rem .55rem 0; border-bottom: 1px solid var(--mlha); vertical-align: top; }
td.sl { color: var(--soca-tma); }
.points { display: grid; gap: .5rem; margin-top: .7rem; padding-left: 1.1rem; list-style: disc; }
.points li::marker { color: var(--soca); }
.bridges details { border-bottom: 1px solid var(--mlha); 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: 2px solid var(--soca); border-bottom: 2px solid var(--soca); 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: .6rem; 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(--led); border: none; border-radius: var(--r-m); overflow: hidden; cursor: pointer; font: inherit; color: inherit; }
.ff img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--mlha); margin-bottom: .5rem; }
.ff span { padding: 0 .8rem; }
.ff .sl { font-size: 1.2rem; }
.ff .note { font-size: .82rem; border: none; margin: .2rem 0 0; padding-top: 0; }

/* přihlášení */
.login main { max-width: 22rem; margin: 0 auto; padding: 14vh 1.4rem 2rem; }
.login h1 { font-size: clamp(3.4rem, 18vw, 4.6rem); font-weight: 750; letter-spacing: -.04em; color: var(--soca-tma); margin-bottom: .4rem; }
.login form { display: grid; gap: .4rem; margin-top: 2rem; }
.login label { font-weight: 600; font-size: .95rem; margin-top: .6rem; }
.login input { min-height: 3.2rem; padding: .6rem .9rem; font: inherit; color: var(--bor); background: var(--led); border: 1.5px solid var(--mlha); border-radius: var(--r-m); }
.login input:focus-visible { outline-offset: 0; border-color: var(--soca); }
.login .btn { margin-top: 1.3rem; }
.error { color: var(--nagelj); font-weight: 500; }

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

@media (min-width: 60rem) {
  #view { padding-top: 5.5rem; padding-bottom: 4rem; }
  #nav { inset: 0 0 auto 0; border-top: none; border-bottom: 1px solid var(--mlha); }
  #nav a { flex-direction: row; gap: .5rem; font-size: .95rem; min-height: 3.6rem; max-width: 9.5rem; }
  .toast { bottom: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  /* stav nahrávání dál nese barva a ikona, jen bez pulzu; posuny bez animace */
  .mic.live, .mic.busy { animation: none; }
  .mic.live { box-shadow: 0 0 0 .45rem rgb(184 27 64 / .25); }
  .mic.busy { opacity: .7; }
  .progress i, .btn, .mic, input[role="switch"]::after, .bridges summary::after { transition: none; }
}
