/* Béčko – minimalistický vzhled (systémové písmo, jemné plochy, světlý/tmavý režim) */

:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --card: #ffffff;
  --fill: rgba(120, 120, 128, .12);
  --fill-2: rgba(120, 120, 128, .07);
  --line: rgba(0, 0, 0, .08);
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-ink: #ffffff;
  --accent-soft: rgba(0, 113, 227, .10);
  --ok: #248a3d;
  --ok-fill: #34c759;
  --ok-soft: rgba(52, 199, 89, .14);
  --bad: #d70015;
  --bad-soft: rgba(255, 59, 48, .10);
  --warn: #a05a00;
  --warn-soft: rgba(255, 149, 0, .16);
  --glass: rgba(245, 245, 247, .72);
  --glass-card: rgba(255, 255, 255, .72);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 28px rgba(0, 0, 0, .05);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .05), 0 14px 36px rgba(0, 0, 0, .08);
  --radius: 18px;
  --gutter: 20px;
  --gl: max(var(--gutter), env(safe-area-inset-left, 0px));
  --gr: max(var(--gutter), env(safe-area-inset-right, 0px));
  --maxw: 680px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --radius-sm: 12px;
  --ease: cubic-bezier(.25, .1, .25, 1);
  --spring: cubic-bezier(.2, .8, .2, 1);
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #000000; --card: #1c1c1e; --fill: rgba(120, 120, 128, .24); --fill-2: rgba(120, 120, 128, .14); --line: rgba(255, 255, 255, .09);
    --ink: #f5f5f7; --muted: #98989d; --accent: #0a84ff; --accent-hover: #409cff; --accent-soft: rgba(10, 132, 255, .18);
    --ok: #30d158; --ok-fill: #30d158; --ok-soft: rgba(48, 209, 88, .16); --bad: #ff453a; --bad-soft: rgba(255, 69, 58, .16);
    --warn: #ffb340; --warn-soft: rgba(255, 159, 10, .18);
    --glass: rgba(16, 16, 18, .72); --glass-card: rgba(32, 32, 34, .72);
    --shadow: 0 0 0 1px rgba(255, 255, 255, .06); --shadow-hover: 0 0 0 1px rgba(255, 255, 255, .12), 0 12px 32px rgba(0, 0, 0, .5);
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #000000; --card: #1c1c1e; --fill: rgba(120, 120, 128, .24); --fill-2: rgba(120, 120, 128, .14); --line: rgba(255, 255, 255, .09);
  --ink: #f5f5f7; --muted: #98989d; --accent: #0a84ff; --accent-hover: #409cff; --accent-soft: rgba(10, 132, 255, .18);
  --ok: #30d158; --ok-fill: #30d158; --ok-soft: rgba(48, 209, 88, .16); --bad: #ff453a; --bad-soft: rgba(255, 69, 58, .16);
  --warn: #ffb340; --warn-soft: rgba(255, 159, 10, .18);
  --glass: rgba(16, 16, 18, .72); --glass-card: rgba(32, 32, 34, .72);
  --shadow: 0 0 0 1px rgba(255, 255, 255, .06); --shadow-hover: 0 0 0 1px rgba(255, 255, 255, .12), 0 12px 32px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-padding-top: 76px; background: var(--bg); -webkit-text-size-adjust: 100%; transition: background-color .35s var(--ease); }
body {
  margin: 0; background: var(--bg); color: var(--ink); min-height: 100dvh;
  font: 400 17px/1.47 var(--font); overflow-wrap: break-word; letter-spacing: -.012em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; border: 0; background: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
a { color: var(--accent); }

.ic { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.row-ic { display: flex; align-items: center; gap: 10px; }
.row-ic > .ic { color: var(--muted); }

.screen { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gr) calc(48px + var(--sab)) var(--gl); animation: fade .45s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* --- základní prvky --- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; transition: background-color .35s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  background: var(--fill); color: var(--ink); border-radius: 980px; padding: 12px 22px;
  font-weight: 500; font-size: 17px; text-decoration: none;
  transition: background-color .2s var(--ease), transform .15s var(--ease), opacity .2s var(--ease);
}
.btn:hover { background: var(--fill); filter: brightness(.97); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); filter: none; }
.btn.ok { background: var(--ok-fill); color: #fff; }
:root[data-theme='dark'] .btn.ok { color: #00210a; }
.btn.bad { background: var(--bad); color: #fff; }
.btn.block { display: flex; width: 100%; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn.danger { color: var(--bad); }
.btn .sub { color: var(--muted); font-size: 15px; font-weight: 400; }
.btn.primary .sub { color: inherit; opacity: .75; }
.icon-btn { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%; font-size: 15px; font-weight: 600; }
.icon-btn .ic { width: 20px; height: 20px; }
.icon-btn.primary { background: var(--accent); color: var(--accent-ink); }
.muted { color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 980px; font-size: 13px; font-weight: 500; background: var(--fill); color: var(--ink); width: fit-content; }
.chip .ic { width: 14px; height: 14px; color: var(--muted); }
.chip.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.chip.status.ok::before { background: var(--ok-fill); }
.chip.status.error::before { background: var(--bad); }
.chip.status.syncing::before { background: var(--accent); animation: pulse 1.2s infinite; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 980px; font-size: 12px; font-weight: 600; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 10px; }

/* --- horní lišta (sklo) --- */
.top {
  position: sticky; top: 0; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 calc(var(--gr) * -1) 16px calc(var(--gl) * -1); padding: calc(12px + var(--sat)) var(--gr) 12px var(--gl);
  background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 600; font-size: 21px; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand .logo { background: var(--ink); color: var(--bg); border-radius: 9px; width: 30px; height: 30px; display: grid; place-items: center; font-size: 17px; font-weight: 600; transition: background-color .35s var(--ease), color .35s var(--ease); }

/* --- vyhledávání --- */
.search { position: relative; margin-bottom: 24px; }
.search .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; padding: 13px 16px 13px 42px; border: 0; border-radius: var(--radius-sm); background: var(--fill); outline: none;
  font-size: 17px; transition: background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.search input::placeholder { color: var(--muted); }
.search input:focus { background: var(--card); box-shadow: 0 0 0 4px var(--accent-soft), 0 0 0 1px var(--accent); }
.search input::-webkit-search-cancel-button { filter: grayscale(1); }

/* --- přehled (bento) --- */
.bento { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 40px; }
.tile {
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; background: var(--card); text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; justify-content: space-between; gap: 12px; min-height: 132px; text-align: left;
  transition: transform .3s var(--spring), box-shadow .3s var(--ease), background-color .35s var(--ease);
}
a.tile:active { transform: scale(.98); }
@media (hover: hover) { a.tile:hover, a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); } }
.tile.wide { grid-column: 1 / -1; flex-direction: row; align-items: center; min-height: 0; }
.tile.feature { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.tile.feature .lbl { color: inherit; opacity: .8; }
.tile.alert .big { color: var(--bad); }
.tile.progress .bar > i { background: var(--accent); }
.tile-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .2); flex: none; transition: transform .3s var(--spring); }
a.tile:hover .tile-ic { transform: translateX(3px); }
.tile .big { white-space: nowrap; font-size: clamp(32px, 9vw, 40px); font-weight: 600; line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.tile .lbl { font-size: 14px; color: var(--muted); margin-top: 4px; }
.tile h3 { font-size: 22px; font-weight: 600; line-height: 1.15; letter-spacing: -.02em; }
.ring { width: clamp(48px, 14vw, 64px); height: clamp(48px, 14vw, 64px); flex: none; }
.ring circle { fill: none; stroke-width: 9; }
.ring .bg { stroke: var(--fill); }
.ring .fg { stroke: currentColor; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset 1s var(--spring); }

h2.sec { font-size: 22px; font-weight: 600; letter-spacing: -.02em; margin: 8px 0 14px; }
.cats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.cat { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: center; text-decoration: none; color: var(--ink); }
.cat:active { transform: scale(.98); }
.cat .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.cat .ico .ic { width: 22px; height: 22px; }
.cat b { font-size: 17px; font-weight: 600; display: block; }
.cat small { color: var(--muted); font-size: 14px; }
.bar { height: 6px; border-radius: 99px; background: var(--fill); overflow: hidden; margin-top: 10px; }
.bar > i { display: block; height: 100%; background: var(--ok-fill); border-radius: 99px; transition: width .8s var(--spring); }
.stack { display: grid; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.sp { justify-content: space-between; }
.foot { margin-top: 32px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.foot a { color: inherit; }
.foot + .foot { margin-top: 10px; }

.hero-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.hero-ic .ic { width: 28px; height: 28px; }

/* --- otázka --- */
.practice { padding-bottom: 220px; }
.pbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 14px; margin: 0 calc(var(--gr) * -1) 20px calc(var(--gl) * -1); padding: calc(12px + var(--sat)) var(--gr) 12px var(--gl); background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); }
.pbar .bar { flex: 1; margin: 0; height: 6px; }
.pbar .bar > i { background: var(--accent); }
.pbar .muted { font-size: 15px; font-variant-numeric: tabular-nums; }
.combo { font-weight: 500; font-size: 13px; background: var(--warn-soft); color: var(--warn); padding: 3px 10px; border-radius: 99px; animation: pop .4s var(--spring); white-space: nowrap; }
.qmeta { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.qtext { font-size: clamp(21px, 1.1vw + 17px, 30px); font-weight: 600; line-height: 1.25; letter-spacing: -.02em; margin-bottom: 20px; overflow-wrap: anywhere; }
.media { margin-bottom: 20px; border-radius: var(--radius); overflow: hidden; background: #000; cursor: zoom-in; box-shadow: var(--shadow); transition: transform .3s var(--spring); }
@media (hover: hover) { .media:hover { transform: scale(1.01); } }
.media img { width: 100%; height: auto; }
.media.sign { background: #fff; padding: 16px; width: fit-content; max-width: 100%; }
.media.sign img { max-height: 220px; width: auto; margin: 0 auto; }
.opts { display: grid; gap: 10px; }
.opt {
  min-width: 0; display: grid; grid-template-columns: 32px 1fr; gap: 14px; align-items: center; text-align: left;
  background: var(--card); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow), inset 0 0 0 1px transparent; font-weight: 400; line-height: 1.4;
  transition: background-color .25s var(--ease), box-shadow .25s var(--ease), transform .15s var(--ease), opacity .25s var(--ease);
}
@media (hover: hover) { .opt:hover:not([disabled]) { box-shadow: var(--shadow), inset 0 0 0 1px var(--line); } }
.opt:active:not([disabled]) { transform: scale(.985); }
.opt > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.opt .k { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; font-weight: 600; text-transform: uppercase; background: var(--fill); transition: background-color .25s var(--ease), color .25s var(--ease); }
.opt.imgopt img { max-height: 130px; width: auto; background: #fff; border-radius: 10px; padding: 6px; }
.opt.sel { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.opt.sel .k { background: var(--accent); color: #fff; }
.opt.ok { background: var(--ok-soft); box-shadow: inset 0 0 0 1.5px var(--ok-fill); animation: pop .45s var(--spring); }
.opt.ok .k { background: var(--ok-fill); color: #fff; }
.opt.bad { background: var(--bad-soft); box-shadow: inset 0 0 0 1.5px var(--bad); animation: shake .4s var(--ease); }
.opt.bad .k { background: var(--bad); color: #fff; }
.opt[disabled] { cursor: default; }
.opt.dim { opacity: .45; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.02); } 100% { transform: scale(1); } }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-2px); } }
@keyframes up { from { transform: translateY(100%); opacity: .6; } to { transform: translateY(0); opacity: 1; } }

/* --- panel s výsledkem odpovědi (sklo) --- */
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 22px var(--gr) calc(18px + var(--sab)) var(--gl);
  border-radius: 24px 24px 0 0; animation: up .4s var(--spring);
  background: var(--glass-card); -webkit-backdrop-filter: saturate(180%) blur(28px); backdrop-filter: saturate(180%) blur(28px);
  border-top: 1px solid var(--line); box-shadow: 0 -10px 40px rgba(0, 0, 0, .08);
}
.sheet::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.sheet.ok::before { background: var(--ok-soft); }
.sheet.bad::before { background: var(--bad-soft); }
.sheet .in { position: relative; max-width: 680px; margin: 0 auto; display: grid; gap: 12px; }
.sheet h3 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.sheet p { color: var(--ink); }
.sheet.ok h3 { color: var(--ok); }
.sheet.bad h3 { color: var(--bad); }

/* --- konfety --- */
.confetti { position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 60; pointer-events: none; }
.confetti i { position: absolute; width: 7px; height: 11px; border-radius: 2px; opacity: 0; animation: fly 1.2s cubic-bezier(.15, .7, .3, 1) forwards; }
@keyframes fly {
  0% { opacity: .9; transform: translate(0, 0) rotate(0); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); }
}

/* --- test --- */
.timer { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 19px; letter-spacing: -.01em; }
.timer.low { color: var(--bad); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.dots { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; margin: 16px 0; }
.dot { height: 40px; border-radius: 50%; aspect-ratio: 1; justify-self: center; width: 40px; background: var(--fill-2); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; transition: background-color .2s var(--ease), color .2s var(--ease), transform .15s var(--ease); }
.dot:active { transform: scale(.92); }
.dot.done { background: var(--accent); color: #fff; }
.dot.cur { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink); }
.dot.ok { background: var(--ok-soft); color: var(--ok); }
.dot.bad { background: var(--bad-soft); color: var(--bad); }
.testnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; padding: 12px var(--gr) calc(12px + var(--sab)) var(--gl);
  background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--line);
}
.testnav .in { max-width: 680px; margin: 0 auto; display: flex; gap: 10px; }
.testnav .btn { flex: 1; }
.testnav .btn:first-child { flex: 0 0 56px; padding: 0; }

/* --- výsledek --- */
.result { text-align: center; padding-top: 24px; }
.result > .bar { max-width: 320px; margin: 4px auto 0; width: 100%; }
.result .score { font-size: 72px; font-weight: 600; line-height: 1; letter-spacing: -.045em; margin: 12px 0 4px; font-variant-numeric: tabular-nums; }
.result .chip { margin: 0 auto; }
.result .dots { justify-items: center; }
.banner { padding: 22px; border-radius: var(--radius); text-align: center; margin: 12px 0; }
.banner.pass { background: var(--ok-soft); color: var(--ok); }
.banner.fail { background: var(--bad-soft); color: var(--bad); }
.banner p { color: var(--ink); margin-top: 4px; }
.banner h2 { font-size: 26px; font-weight: 600; letter-spacing: -.025em; }

/* --- výsledky vyhledávání --- */
.hit { display: grid; gap: 6px; text-align: left; width: 100%; background: var(--card); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); line-height: 1.4; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
@media (hover: hover) { .hit:hover { box-shadow: var(--shadow-hover); } }
.hit:active { transform: scale(.99); }
.hit .st { width: 8px; height: 8px; border-radius: 50%; background: var(--fill); display: inline-block; vertical-align: middle; margin-right: 8px; }
.hit .st.ok { background: var(--ok-fill); } .hit .st.bad { background: var(--bad); }
mark { background: var(--accent-soft); color: var(--accent); border-radius: 4px; padding: 0 2px; }
.empty { text-align: center; padding: 64px 16px; color: var(--muted); display: grid; justify-items: center; gap: 10px; }
.empty h2 { color: var(--ink); font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.empty-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--fill-2); color: var(--muted); margin-bottom: 6px; }
.empty-ic .ic { width: 28px; height: 28px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 2.5px solid var(--fill); border-top-color: var(--muted); animation: spin .8s linear infinite; margin-bottom: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

.zoom { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); display: grid; place-items: center; padding: 20px; cursor: zoom-out; animation: fadein .25s var(--ease); }
.zoom img { max-height: 92dvh; max-width: 100%; border-radius: 14px; background: #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, .4); animation: zoomin .35s var(--spring); }
@keyframes fadein { from { opacity: 0; } }
@keyframes zoomin { from { transform: scale(.94); opacity: 0; } }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .top, .pbar, .testnav { background: var(--bg); }
  .sheet { background: var(--card); }
}

/* --- účet --- */
.ttl { font-size: 34px; font-weight: 700; line-height: 1.1; letter-spacing: -.03em; }
.ttl-sm { font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.field { display: grid; gap: 8px; font-weight: 500; font-size: 14px; color: var(--muted); }
.field input { width: 100%; padding: 13px 16px; border: 0; border-radius: var(--radius-sm); background: var(--fill); color: var(--ink); outline: none; font-size: 17px; transition: background-color .2s var(--ease), box-shadow .2s var(--ease); }
.field input:focus { background: var(--card); box-shadow: 0 0 0 4px var(--accent-soft), 0 0 0 1px var(--accent); }
.form-msg { min-height: 1.2em; font-size: 14px; color: var(--bad); }
.form-msg.good { color: var(--ok); }
.linkbtn { padding: 6px 0; font-size: 15px; color: var(--accent); }
.linkbtn:hover { text-decoration: underline; }
.linkbtn[hidden] { display: none; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 24px; flex: none; }

/* --- souhlas, zásady --- */
.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 14px; line-height: 1.4; color: var(--muted); }
.check[hidden] { display: none; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.check a, .doc a { color: var(--accent); text-decoration: none; }
.check a:hover, .doc a:hover { text-decoration: underline; }
.doc { display: grid; gap: 12px; line-height: 1.55; }
.doc h2 { font-size: 21px; font-weight: 600; letter-spacing: -.02em; margin-top: 16px; }
.doc ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.doc .todo { background: var(--warn-soft); color: var(--warn); padding: 1px 6px; border-radius: 6px; font-weight: 600; }

/* --- videootázky --- */
.video-note { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; background: var(--fill-2); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 16px; font-size: 14px; color: var(--muted); }
.video-note a { color: var(--accent); font-weight: 500; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.video-note a .ic { width: 14px; height: 14px; }

/* --- test nanečisto: výběr je neutrální, ne „správně“ --- */
.test-hint { font-size: 13px; color: var(--muted); margin: -4px 0 0; }
.test-hint .ic { width: 15px; height: 15px; }
.testmode .opt.sel { background: var(--fill); box-shadow: inset 0 0 0 1.5px var(--ink); }
.testmode .opt.sel .k { background: var(--ink); color: var(--bg); }
.testmode .dot.done { background: var(--ink); color: var(--bg); }
.testmode .dot.cur { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--muted); }
.testmode :focus-visible { outline-color: var(--muted); }
.ttl + .muted { margin-top: 8px; font-size: 17px; }

/* =========================================================
   RESPONZIVITA
   telefon <480 · velký telefon / malý tablet 480–759 · tablet 760–1023 · notebook 1024–1399 · velký monitor 1400+
   + výška (mobil na šířku), dotyk, bezpečné okraje (výřez displeje)
   ========================================================= */

/* qcard: obrázek vedle možností (jen když je kde) */
.qmedia { display: grid; gap: 12px; align-content: start; min-width: 0; }
.qmedia .media { margin-bottom: 0; }
.qcard.has-media > .qmeta, .qcard.has-media > .qtext, .qcard.has-media > .video-note { grid-column: 1 / -1; }

/* ---- velmi malé telefony (≤ 380 px) ---- */
@media (max-width: 380px) {
  :root { --gutter: 16px; --radius: 16px; }
  body { font-size: 16px; }
  .btn { padding: 11px 18px; font-size: 16px; }
  .card, .tile { padding: 16px; }
  .tile { min-height: 116px; }
  .ttl { font-size: 28px; }
  .result .score { font-size: 60px; }
  .brand { font-size: 19px; }
  .opt { padding: 12px 14px; gap: 12px; }
  .banner h2 { font-size: 22px; }
}

/* ---- tablet na výšku a větší (≥ 760 px) ---- */
@media (min-width: 760px) {
  :root { --gutter: 32px; --maxw: 800px; }
  .screen { padding-top: 8px; }
  .bento { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .tile.wide { grid-column: span 4; }
  .tile.span2 { grid-column: span 2; }
  .cats { gap: 16px; }
  .sheet .in, .testnav .in { max-width: 800px; }
  .banner { padding: 28px; }
}

/* ---- notebook / desktop (≥ 1024 px) ---- */
@media (min-width: 1024px) {
  :root { --gutter: 40px; }
  .screen.wide { --maxw: 1120px; }
  .screen.wide .bento { gap: 20px; }
  .screen.wide .tile.feature.wide { grid-column: span 2; flex-direction: column; align-items: flex-start; justify-content: space-between; min-height: 168px; }
  .screen.wide .tile.feature .tile-ic { align-self: flex-end; }
  .screen.wide .tile.span2 { grid-column: span 1; }
  .screen.wide .tile.alert.wide { grid-column: span 4; min-height: 0; }
  .screen.wide .tile .big { font-size: 44px; }
  .screen.wide .cats { gap: 20px; }
  .screen.wide .search { max-width: 520px; }
  /* otázka s obrázkem: obrázek vlevo, možnosti vpravo */
  .screen.practice, .screen.testmode { --maxw: 1080px; }
  .qcard.has-media { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); column-gap: 36px; align-items: start; grid-template-areas: 'meta meta' 'text text' 'note note' 'media opts'; }
  .qcard.has-media > .qmeta { grid-area: meta; } .qcard.has-media > .qtext { grid-area: text; }
  .qcard.has-media > .video-note { grid-area: note; } .qcard.has-media > .qmedia { grid-area: media; position: sticky; top: 84px; } .qcard.has-media > .opts { grid-area: opts; }
  .qcard:not(.has-media) { max-width: 740px; margin: 0 auto; }
  .practice, .testmode { padding-bottom: 180px; }
  .dots { grid-template-columns: repeat(auto-fill, minmax(44px, 44px)); justify-content: start; }
  .testmode .dots { max-width: 740px; margin-left: auto; margin-right: auto; }
  .testmode .test-hint { max-width: 740px; margin-left: auto; margin-right: auto; }
  .result.stack { max-width: 640px; margin: 0 auto; }
}

/* ---- velký monitor (≥ 1400 px) ---- */
@media (min-width: 1400px) {
  body { font-size: 18px; }
  .screen.wide { --maxw: 1200px; }
}

/* ---- mobil na šířku a nízká okna (výška ≤ 540 px) ---- */
@media (max-height: 540px) {
  .top, .pbar { padding-top: calc(6px + var(--sat)); padding-bottom: 6px; margin-bottom: 10px; }
  .screen { padding-bottom: calc(28px + var(--sab)); }
  .practice, .testmode { padding-bottom: 120px; }
  .qtext { font-size: 20px; margin-bottom: 12px; }
  .qmeta { margin-bottom: 8px; }
  .btn { min-height: 44px; padding-top: 8px; padding-bottom: 8px; }
  .icon-btn { width: 40px; height: 40px; min-height: 40px; }
  .sheet { padding-top: 12px; padding-bottom: calc(10px + var(--sab)); border-radius: 18px 18px 0 0; }
  .sheet .in { grid-template-columns: 1fr auto; align-items: center; gap: 6px 16px; }
  .sheet .in > p { grid-column: 1 / -1; order: 3; }
  .sheet .in > .btn.block { width: auto; min-width: 180px; }
  .sheet h3 { font-size: 18px; }
  .testnav { padding-top: 8px; padding-bottom: calc(8px + var(--sab)); }
  .result { padding-top: 8px; }
  .result .score { font-size: 52px; margin: 4px 0; }
  .empty { padding: 28px 16px; }
  .media.sign img { max-height: 150px; }
  .opt.imgopt img { max-height: 90px; }
}
/* mobil na šířku: obrázek vedle možností */
@media (max-height: 540px) and (min-width: 640px) and (orientation: landscape) {
  .screen.practice, .screen.testmode { --maxw: 980px; }
  .qcard.has-media { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 20px; align-items: start; grid-template-areas: 'meta meta' 'text text' 'note note' 'media opts'; }
  .qcard.has-media > .qmeta { grid-area: meta; } .qcard.has-media > .qtext { grid-area: text; }
  .qcard.has-media > .video-note { grid-area: note; } .qcard.has-media > .qmedia { grid-area: media; position: sticky; top: 64px; } .qcard.has-media > .opts { grid-area: opts; }
  .sheet .in, .testnav .in { max-width: 980px; }
}

/* ---- dotyková zařízení: větší cíle ---- */
@media (pointer: coarse) {
  .icon-btn { width: 44px; height: 44px; min-height: 44px; }
  .dot { width: 44px; height: 44px; }
  .linkbtn { min-height: 44px; display: inline-flex; align-items: center; }
  .check input { width: 24px; height: 24px; }
}

/* ---- vysoké rozlišení: tenčí linky ---- */
@media (min-resolution: 2dppx) { .top, .pbar, .testnav, .sheet { border-width: .5px; } }

/* přepnutí světlý/tmavý: všechno naráz, bez cross-fade (jinak lišta se sklem a obsah blikají každé jinak) */
.theme-switching, .theme-switching *, .theme-switching *::before, .theme-switching *::after { transition: none !important; }

/* =========================================================
   Motivace: streak, XP, odznaky, oznámení, opakování
   ========================================================= */
.streak-chip { display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 13px 0 11px; border-radius: 980px; background: var(--fill); color: var(--muted); font-weight: 600; font-size: 15px; text-decoration: none; font-variant-numeric: tabular-nums; transition: background-color .2s var(--ease), color .2s var(--ease); }
.streak-chip .ic { width: 18px; height: 18px; }
.streak-chip.on { background: var(--warn-soft); color: var(--warn); }
.tile .tile-sub { display: flex; align-items: center; gap: 6px; margin-top: 0; }
.tile .tile-sub .ic { width: 15px; height: 15px; flex: none; }
.tile-ic.soft, .tile-ic.accent { background: var(--accent-soft); color: var(--accent); }
.tile-ic.accent { width: 44px; height: 44px; }
.big-num { font-size: 30px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.small { font-size: 14px; }
.xp-chip { background: var(--accent-soft); color: var(--accent); font-weight: 600; margin: 0 auto; }
.xp-chip .ic { color: inherit; }
.sheet-meta { font-size: 14px; color: var(--muted) !important; }
.cat-btn { text-align: left; width: 100%; font: inherit; }
.cat-btn:hover { box-shadow: var(--shadow-hover); }

/* oznámení */
.toasts { position: fixed; top: calc(12px + var(--sat)); left: 0; right: 0; z-index: 70; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { display: flex; align-items: center; gap: 12px; max-width: 420px; width: fit-content; padding: 10px 18px 10px 10px; border-radius: 980px; background: var(--glass-card); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); box-shadow: var(--shadow-hover), 0 0 0 1px var(--line); animation: toastin .45s var(--spring); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.toast.out { opacity: 0; transform: translateY(-10px) scale(.97); }
.toast b { display: block; font-size: 15px; font-weight: 600; line-height: 1.2; }
.toast span:not(.toast-ic) { display: block; font-size: 13px; color: var(--muted); line-height: 1.2; }
.toast-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; flex: none; }
.toast-ic .ic { width: 20px; height: 20px; }
@keyframes toastin { from { opacity: 0; transform: translateY(-16px) scale(.96); } }

/* denní cíl */
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; background: var(--fill); border-radius: 12px; }
.seg button { min-height: 40px; border-radius: 9px; font-weight: 500; transition: background-color .2s var(--ease), box-shadow .2s var(--ease); }
.seg button.on { background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); font-weight: 600; }

/* odznaky */
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.badge-card { display: grid; justify-items: center; align-content: start; gap: 6px; text-align: center; padding: 18px 12px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); opacity: .6; }
.badge-card.got { opacity: 1; }
.badge-card b { font-size: 15px; font-weight: 600; line-height: 1.2; }
.badge-card small { font-size: 12px; color: var(--muted); line-height: 1.3; }
.badge-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); color: var(--muted); margin-bottom: 2px; }
.badge-card.got .badge-ic { background: var(--accent); color: #fff; }
.badge-ic .ic { width: 26px; height: 26px; }
@media (min-width: 760px) { .badges { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } }

.bar.accent > i, .tile.progress .bar > i { background: var(--accent); }
