/* Styly pro ligy, příručku, slovníček, certifikáty, psaní s AI a dětský režim */

/* ---------- Ligy a přátelé ---------- */
.social-tabs { margin-bottom: 1rem; }
.league-head { display: flex; align-items: center; gap: 1rem; border-radius: 24px; padding: 1.2rem 1.4rem; color: #fff; background: linear-gradient(120deg, #b87333, #e3a869); box-shadow: var(--shadow-lg); }
.league-head h1 { margin: 0; color: #fff; }
.league-head p { margin: 0; opacity: 0.9; }
.league-head.tier-silver { background: linear-gradient(120deg, #7b8794, #c3cdd6); }
.league-head.tier-gold { background: linear-gradient(120deg, #d4a017, #ffd966); color: #3d2c00; }
.league-head.tier-gold h1 { color: #3d2c00; }
.league-head.tier-sapphire { background: linear-gradient(120deg, #1e40af, #60a5fa); }
.league-head.tier-ruby { background: linear-gradient(120deg, #9f1239, #fb7185); }
.league-head.tier-diamond { background: linear-gradient(120deg, #0891b2, #a78bfa); }
.lh-emoji { font-size: 3.2rem; }
.tier-ladder { display: flex; justify-content: center; gap: 0.6rem; margin: 0.8rem 0; font-size: 1.5rem; }
.tl-step { opacity: 0.3; filter: grayscale(1); }
.tl-step.done { opacity: 0.6; filter: none; }
.tl-step.now { opacity: 1; filter: none; transform: scale(1.35); }
.league-list { list-style: none; padding: 0; margin: 0.5rem 0 1rem; display: flex; flex-direction: column; gap: 0.35rem; }
.league-row { display: flex; align-items: center; gap: 0.7rem; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0.55rem 0.8rem; }
.league-row.me { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.league-row.up { background: color-mix(in srgb, var(--ok) 8%, var(--card)); }
.league-row.down { background: color-mix(in srgb, var(--bad) 7%, var(--card)); }
.lr-rank { width: 2rem; text-align: center; font-weight: 800; }
.lr-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; flex: none; }
.lr-name { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.lr-name small { font-weight: 500; color: var(--muted); }
.lr-xp { font-weight: 800; white-space: nowrap; }
.league-sep { text-align: center; font-size: 0.8rem; font-weight: 800; padding: 0.2rem; }
.league-sep.up { color: var(--ok); }
.league-sep.down { color: var(--bad); }
.invite-card { display: flex; gap: 1rem; align-items: flex-start; }
.ic-gift { font-size: 2.6rem; }
.invite-card h2 { margin: 0 0 0.3rem; font-size: 1.15rem; }
.invite-row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin: 0.6rem 0; }
.invite-row .answer-input { flex: 1; min-width: 180px; text-transform: uppercase; }
.invite-url { flex: 1; min-width: 0; background: var(--bg-2); border-radius: 10px; padding: 0.6rem 0.8rem; word-break: break-all; font-size: 0.9rem; }
.invite-page .checks.left { text-align: left; max-width: 460px; margin: 1rem auto; }
.league-card .ac-emoji { font-size: 2rem; }

/* ---------- Gramatická příručka ---------- */
.handbook { max-width: 860px; }
.hb-section { margin-top: 1.4rem; }
.hb-examples { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.hb-ex { display: flex; align-items: center; gap: 0.5rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0.35rem 0.6rem; }
.hb-ex .icon-btn { width: 34px; height: 34px; flex: none; }
.table-wrap { overflow-x: auto; }
.hb-table table { width: 100%; border-collapse: collapse; }
.hb-table th, .hb-table td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); }
.hb-table th { color: var(--muted); font-size: 0.85rem; }
.hb-mistake { border-bottom: 1px dashed var(--line); padding: 0.5rem 0; }
.hb-mistake s { color: var(--bad); }
.hb-mistake b { color: var(--ok); }
.hb-nav { display: flex; justify-content: space-between; gap: 0.5rem; margin-top: 2rem; flex-wrap: wrap; }
.hb-link { font-weight: 700; white-space: nowrap; }
.chip-tag { font-size: 0.72rem; font-weight: 700; color: var(--muted); background: var(--bg-2); border-radius: 6px; padding: 0.05rem 0.4rem; }

/* ---------- Slovníček a kartičky ---------- */
.dictionary .chips { margin-bottom: 1rem; }
.dict-search { margin-bottom: 0.4rem; }
.dict-list { display: flex; flex-direction: column; gap: 0.35rem; }
.dict-row { display: flex; align-items: center; gap: 0.6rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0.45rem 0.6rem; }
.dict-row .lv { text-decoration: none; }
.star { font-size: 1.3rem; color: var(--line); }
.star.on { color: var(--amber); }
.box-dots { color: var(--primary); letter-spacing: 1px; font-size: 0.8rem; white-space: nowrap; }
.end-actions.left { justify-content: flex-start; }
.center-row { justify-content: center; }
.fc-top { display: flex; align-items: center; gap: 0.8rem; max-width: 520px; margin: 0 auto 1rem; }
.fc-top .progress { flex: 1; }
.flashcard { display: block; width: 100%; max-width: 520px; height: 260px; margin: 0 auto; border: 0; background: none; perspective: 1000px; cursor: pointer; padding: 0; }
.fc-inner { position: relative; width: 100%; height: 100%; transition: transform 0.5s; transform-style: preserve-3d; }
.flashcard.flipped .fc-inner { transform: rotateY(180deg); }
.fc-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; padding: 1rem; font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 800; box-shadow: var(--shadow-lg); }
.fc-front { background: var(--grad); color: #fff; }
.fc-back { background: var(--card); border: 2px solid var(--primary); transform: rotateY(180deg); color: var(--text); }
.fc-face small { font-size: 0.85rem; font-weight: 600; opacity: 0.8; }
.fc-actions { display: flex; justify-content: center; gap: 0.6rem; margin: 1rem auto; flex-wrap: wrap; }

/* ---------- Certifikáty ---------- */
.cert-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.cert-mini { display: flex; align-items: center; gap: 0.9rem; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 0.7rem 1rem; color: var(--text); box-shadow: var(--shadow); }
.cert-mini:hover { text-decoration: none; border-color: var(--primary); }
.cm-level { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; }
.cm-level.lv-A1 { background: #22c55e; } .cm-level.lv-A2 { background: #0ea5e9; } .cm-level.lv-B1 { background: #8b5cf6; } .cm-level.lv-B2 { background: #f43f5e; } .cm-level.lv-C1 { background: #1c1a33; }
.cert-mini span { display: block; }
.cert-levels { display: flex; flex-direction: column; gap: 0.6rem; }
.cert-level { display: flex; align-items: center; gap: 0.8rem; }
.cert-level .progress { margin: 0.3rem 0; }
.cert-level.have b::after { content: ' ✓'; color: var(--ok); }

/* ---------- Psaní s AI ---------- */
.write-task p { margin: 0.3rem 0 0; font-weight: 600; }
.write-area { min-height: 260px; font-size: 1.05rem; line-height: 1.6; }
.write-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 0.6rem 0 1.4rem; flex-wrap: wrap; }
.write-bar .warn { color: var(--amber); font-weight: 700; }
.write-score { display: flex; gap: 1.2rem; align-items: center; }
.ws-total { width: 110px; height: 110px; border-radius: 50%; background: var(--grad); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.ws-total b { font-size: 2.4rem; line-height: 1; }
.ws-crit { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.4rem 1rem; }
.ws-crit > div { display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 0.5rem; font-size: 0.9rem; }
.ws-crit .progress { grid-column: 1 / -1; }
.write-pane { white-space: pre-wrap; line-height: 1.65; margin-top: 0.5rem; }
.write-history { padding-left: 1.2rem; }

/* ---------- Výukové sekce na stránce Učit se ---------- */
.learn-hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.7rem; margin-bottom: 1.4rem; }
.hub-card { display: flex; flex-direction: column; gap: 0.15rem; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 0.8rem 0.9rem; color: var(--text); box-shadow: var(--shadow); transition: transform 0.15s; }
.hub-card:hover { transform: translateY(-2px); text-decoration: none; border-color: var(--primary); }
.hub-card .hc-emoji { font-size: 1.6rem; }
.hub-card span:last-child { font-size: 0.82rem; color: var(--muted); }

/* ---------- Dětský režim ---------- */
body.kids { background: linear-gradient(180deg, #fff7d6, #ffe4f1 60%, #e0f2ff); padding-bottom: 0; }
body.kids #header, body.kids #footer, body.kids #tabbar { display: none !important; }
.kids-page { max-width: 900px; margin: 0 auto; padding: 16px 16px 40px; color: #2b2340; }
.kids-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.6rem; }
.kids-stars { background: #fff; border-radius: 999px; padding: 0.4rem 1rem; font-size: 1.3rem; box-shadow: 0 4px 0 #f2c94c; }
.kids-title { text-align: center; font-size: clamp(1.6rem, 5vw, 2.4rem); color: #2b2340; }
.kids-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.kids-tile { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; background: #fff; border-radius: 28px; padding: 1.2rem 0.5rem; color: #2b2340; box-shadow: 0 6px 0 #c9b6ff; transition: transform 0.1s; }
.kids-tile:hover { text-decoration: none; transform: translateY(-3px); }
.kids-tile:active { transform: translateY(3px); box-shadow: 0 2px 0 #c9b6ff; }
.kt-emoji { font-size: 4rem; }
.kt-label { font-weight: 800; font-size: 1.2rem; }
.kids-words { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.7rem; margin-bottom: 1.4rem; }
.kids-word { display: flex; flex-direction: column; align-items: center; background: #fff; border: 0; border-radius: 22px; padding: 0.8rem 0.4rem; cursor: pointer; box-shadow: 0 5px 0 #ffd36e; font-family: inherit; color: #2b2340; }
.kw-emoji { font-size: 3rem; }
.kw-en { font-weight: 800; font-size: 1.15rem; }
.kw-nat { font-size: 0.85rem; color: #7a6f8f; }
.kids-games { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; margin-top: 1rem; }
.kids-btn { display: inline-flex; align-items: center; gap: 0.4rem; border: 0; border-radius: 999px; background: #7c5cff; color: #fff; font: inherit; font-weight: 800; padding: 0.8rem 1.4rem; cursor: pointer; box-shadow: 0 5px 0 #4b33c9; text-decoration: none !important; }
.kids-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #4b33c9; }
.kids-btn.big { font-size: 1.25rem; padding: 1rem 1.6rem; }
.kids-btn.round { width: 56px; height: 56px; padding: 0; justify-content: center; font-size: 1.6rem; background: #fff; box-shadow: 0 4px 0 #c9b6ff; }
.kids-btn.round.small { width: 44px; height: 44px; font-size: 1.2rem; }
.kids-stage { text-align: center; }
.kids-dots { display: flex; justify-content: center; gap: 0.4rem; margin-bottom: 1rem; }
.kids-dots span { width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px #c9b6ff; }
.kids-dots span.done { background: #ffcc33; box-shadow: none; }
.kids-dots span.now { background: #7c5cff; box-shadow: none; }
.kids-speaker { width: 120px; height: 120px; border-radius: 50%; border: 0; background: #ff6fa8; font-size: 3.6rem; cursor: pointer; box-shadow: 0 8px 0 #c93d75; animation: bob 2.5s ease-in-out infinite; }
.kids-hint { font-size: 1.15rem; font-weight: 700; color: #5d5175; text-align: center; }
.kids-options { display: grid; gap: 1rem; margin: 1rem auto; max-width: 620px; }
.kids-options.pics { grid-template-columns: repeat(2, 1fr); }
.kids-options.words { grid-template-columns: 1fr; max-width: 420px; }
.kids-opt { border: 0; background: #fff; border-radius: 28px; cursor: pointer; box-shadow: 0 6px 0 #c9b6ff; font-family: inherit; color: #2b2340; transition: transform 0.1s; }
.kids-opt.pic { font-size: clamp(4rem, 14vw, 6rem); padding: 1rem; }
.kids-opt.word { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem; }
.ko-label { flex: 1; border: 0; background: none; font: inherit; font-size: 1.6rem; font-weight: 800; cursor: pointer; color: inherit; padding: 0.6rem; }
.kids-opt.correct { background: #b8f5c8; box-shadow: 0 6px 0 #4cc46e; animation: pop 0.4s; }
.kids-opt.wrong { background: #ffd0d7; animation: shake 0.35s; }
.kids-big-emoji { font-size: clamp(6rem, 22vw, 9rem); line-height: 1.1; animation: pop 0.4s; }
.kids-end { text-align: center; }
.kids-end h2 { font-size: 1.8rem; }
.kids-earned { font-size: 3rem; letter-spacing: 0.3rem; animation: pop 0.6s; }
.kids-memory { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem; max-width: 640px; margin: 0 auto; }
.km-card { position: relative; aspect-ratio: 1; border: 0; border-radius: 20px; background: #7c5cff; cursor: pointer; font-family: inherit; box-shadow: 0 5px 0 #4b33c9; overflow: hidden; }
.km-card span { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity 0.2s; }
.km-back { font-size: 2.2rem; }
.km-front { opacity: 0; background: #fff; font-size: clamp(2.4rem, 9vw, 3.6rem); }
.km-front.word { font-size: clamp(1rem, 3.6vw, 1.4rem); font-weight: 800; color: #2b2340; }
.km-card.open .km-front { opacity: 1; }
.km-card.matched { box-shadow: 0 5px 0 #4cc46e; }
.km-card.matched .km-front { background: #d9fbe3; }
.kids-exit { display: block; margin: 2rem auto 0; border: 0; background: rgba(255, 255, 255, 0.7); border-radius: 999px; padding: 0.6rem 1.2rem; font: inherit; font-weight: 700; color: #5d5175; cursor: pointer; text-align: center; width: fit-content; user-select: none; }
.kids-exit.holding { background: #ffcc33; }
@media (max-width: 520px) {
  .kids-memory { grid-template-columns: repeat(3, 1fr); }
  .write-score { flex-direction: column; text-align: center; }
  .ws-crit { grid-template-columns: 1fr; }
  .invite-card { flex-direction: column; }
}

/* ---------- Administrace ---------- */
.admin-page { max-width: 1240px; }
.adm-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.adm-tabs { margin: 0.4rem 0 1.2rem; }
.adm-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.7rem; margin-bottom: 1rem; }
.adm-stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 0.8rem 1rem; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.adm-stat span { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.adm-stat b { font-size: 1.45rem; font-weight: 800; }
.adm-stat small { color: var(--muted); font-size: 0.78rem; }
.adm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 1rem; }
.adm-grid.three { grid-template-columns: repeat(3, 1fr); }
.adm-card { margin: 0; }
.adm-card h3 { margin-top: 0; }
.adm-chart { color: var(--text); }
.adm-chart svg { width: 100%; height: 140px; display: block; }
.adm-dist { display: flex; flex-direction: column; gap: 0.45rem; }
.adm-dist-row { display: grid; grid-template-columns: 9rem 1fr auto 3rem; gap: 0.5rem; align-items: center; font-size: 0.9rem; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.adm-table th, .adm-table td { text-align: left; padding: 0.45rem 0.55rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.adm-table th { color: var(--muted); font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.adm-table .num { text-align: right; white-space: nowrap; }
.adm-table th.sortable { cursor: pointer; user-select: none; }
.adm-table th.sortable:hover { color: var(--primary); }
.adm-table.users tr.adm-user { cursor: pointer; }
.adm-table.users tr.adm-user:hover td { background: color-mix(in srgb, var(--primary) 6%, transparent); }
.adm-toolbar { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.8rem; }
.adm-toolbar .answer-input { max-width: 320px; }
.adm-todos { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.8rem; }
.adm-todo { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.6rem; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.adm-todo .check-row { flex: 1; margin: 0; align-items: center; }
.adm-todo-text { line-height: 1.35; }
.adm-todo.done .adm-todo-text { text-decoration: line-through; color: var(--muted); }
.adm-todo-del { flex: none; padding: 0.2rem 0.55rem; }
.free-badge.prem { color: #8a6d1d; background: #fff4cc; }
.adm-user-detail h2 { margin-top: 0; }
.adm-user-detail .adm-table th { width: 40%; }
.adm-days { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.adm-days span { background: var(--bg-2); border-radius: 8px; padding: 0.2rem 0.5rem; font-size: 0.85rem; }
@media (max-width: 820px) { .adm-grid, .adm-grid.three { grid-template-columns: 1fr; } .adm-dist-row { grid-template-columns: 6rem 1fr auto 2.5rem; } }
.adm-chart svg { height: 120px; }
.adm-chart-x { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); margin-top: 0.2rem; }

/* ---------- Heslo ---------- */
.auth-form.is-register .login-only { display: none; }
.forgot-link { margin: -0.3rem 0 0.2rem; text-align: right; font-size: 0.88rem; }
.page.narrow { max-width: 460px; }

/* ---------- Změna jména ---------- */
.profile-name { display: flex; align-items: center; gap: 0.5rem; }
.edit-name { font-size: 1.1rem; background: none; border: 0; cursor: pointer; opacity: 0.55; padding: 0.2rem; border-radius: 8px; }
.edit-name:hover { opacity: 1; background: var(--bg-2); }

/* ---------- Test webu ---------- */
.adm-verdict { padding: 0.8rem 1rem; border-radius: 14px; font-weight: 700; margin: 0.6rem 0; }
.adm-verdict.good { background: color-mix(in srgb, var(--ok) 16%, transparent); }
.adm-verdict.warn { background: color-mix(in srgb, var(--amber) 18%, transparent); }
.adm-verdict.bad { background: color-mix(in srgb, #ef4444 18%, transparent); }
.adm-test-sum { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin: 0.4rem 0 0.8rem; font-size: 0.92rem; }
.adm-test-group { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 0.5rem; padding: 0.2rem 0.8rem; }
.adm-test-group.bad { border-color: #ef4444; }
.adm-test-group summary { cursor: pointer; padding: 0.5rem 0; }
.adm-table tr.st-fail td { background: color-mix(in srgb, #ef4444 10%, transparent); }
.adm-table tr.st-warn td { background: color-mix(in srgb, var(--amber) 10%, transparent); }
.adm-table td.st-icon { width: 2rem; }
.adm-running { display: flex; align-items: center; gap: 0.8rem; padding: 0.8rem 0; font-weight: 600; }
.field.inline { display: inline-flex; flex-direction: column; gap: 0.2rem; margin: 0; }
.field.inline select { padding: 0.5rem 0.7rem; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); }
.adm-card + .adm-card { margin-top: 1rem; }

.plan .vat-note { margin: -0.3rem 0 0.4rem; font-size: 0.8rem; color: var(--muted); }

/* QR kód v pruhu „Vyzkoušej v telefonu“ */
.app-banner img.banner-qr { background: #fff; border-radius: 10px; padding: 4px; width: 64px; height: 64px; }

/* ---------- Patička ---------- */
.footer-inner { flex-direction: column; align-items: stretch; gap: 0.9rem; }
.footer-inner .footer-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.footer-links a { color: var(--muted); font-weight: 600; }
.footer-links a:hover, .footer-legal a:hover { color: var(--text); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; font-size: 0.85rem; color: var(--muted); }
.footer-legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 720px) {
  .footer-inner { padding: 18px 16px 14px; text-align: center; gap: 0.9rem; }
  /* místo pro spodní lištu dělá jen body (64 px + výřez displeje), nic navíc */
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  #footer { margin-top: 0.5rem; }
  .page { padding-bottom: 24px; }
  .footer-brand { font-size: 0.95rem; }
  .footer-inner .footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .footer-links a { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0.65rem 0.5rem; font-size: 0.92rem; text-align: center; }
  .footer-links a:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .footer-legal { justify-content: center; font-size: 0.8rem; }
  .footer-legal span { flex-basis: 100%; }
}

/* ---------- Certifikační zkouška ---------- */
.exam-page { max-width: 860px; padding-top: 12px; }
.exam-head { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; padding: 0.7rem 0; background: var(--bg); border-bottom: 1px solid var(--line); }
.exam-head-right { display: flex; align-items: center; gap: 1rem; }
.exam-clock { font-size: 1.15rem; font-variant-numeric: tabular-nums; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0.2rem 0.6rem; }
.exam-timer.low { color: #ef4444; }
.exam-tabs { display: flex; gap: 0.4rem; overflow-x: auto; padding: 0.8rem 0; scrollbar-width: none; }
.exam-tab { flex: 1 0 auto; display: flex; align-items: center; gap: 0.35rem; padding: 0.5rem 0.7rem; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-weight: 600; cursor: pointer; }
.exam-tab small { color: var(--muted); font-weight: 500; }
.exam-tab.active { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 30%, transparent); }
.exam-tab.done small { color: var(--ok); }
.exam-section-head h2 { margin: 0.4rem 0 0.2rem; }
.exam-q { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 0.9rem 1rem; margin: 0.7rem 0; }
.exam-q.answered { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); }
.exam-q-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.3rem; }
.exam-q-n { display: inline-grid; place-items: center; min-width: 1.8rem; height: 1.8rem; border-radius: 8px; background: var(--bg-2); font-weight: 800; font-size: 0.85rem; }
.exam-q-text { font-size: 1.08rem; font-weight: 600; margin: 0.3rem 0 0.7rem; }
.exam-q-text.big { font-size: 1.35rem; }
.exam-gap { display: inline-block; min-width: 3.5rem; border-bottom: 2px solid var(--primary); color: transparent; margin: 0 0.2rem; }
.exam-options { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.exam-opt { display: flex; align-items: center; gap: 0.6rem; text-align: left; padding: 0.65rem 0.8rem; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font-weight: 600; cursor: pointer; }
.exam-opt:hover { border-color: var(--primary); }
.exam-opt.selected { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 18%, var(--bg-2)); }
.exam-opt-key { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 7px; background: var(--card); font-size: 0.8rem; flex: none; }
.exam-opt.selected .exam-opt-key { background: var(--primary); color: #fff; }
.exam-item { margin: 1rem 0; }
.exam-item h3 { margin-top: 0; }
.exam-text { background: var(--bg-2); border-radius: 12px; padding: 0.8rem 1rem; line-height: 1.65; max-height: 55vh; overflow: auto; }
.exam-text p { margin: 0 0 0.6rem; }
.exam-audio { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.exam-play.playing { border-color: var(--primary); }
.exam-nav { display: flex; justify-content: space-between; gap: 0.8rem; margin: 1.2rem 0 2rem; }
.exam-result .exam-sections { display: flex; flex-direction: column; gap: 0.6rem; margin: 1rem 0; }
.exam-sec-row { display: grid; grid-template-columns: 11rem 1fr auto 3rem; gap: 0.6rem; align-items: center; }
.exam-sec-row.low b { color: #ef4444; }
.exam-review ol { padding-left: 1.2rem; }
.exam-review li { margin-bottom: 0.7rem; }
.exam-wrong { color: #ef4444; font-weight: 600; }
.exam-right { color: var(--ok); font-weight: 600; }
.exam-info .checks li { align-items: center; }
.cert-level.recommended { border-color: var(--primary); }
@media (max-width: 720px) {
  .exam-options { grid-template-columns: 1fr; }
  .exam-tab-name { display: none; }
  .exam-head-right .muted { display: none; }
  .exam-sec-row { grid-template-columns: 1fr auto 2.6rem; }
  .exam-sec-row .progress { grid-column: 1 / -1; grid-row: 2; }
}

/* Ukázková karta na úvodní stránce: na telefonu mají plovoucí štítky vlastní místo nad a pod bublinami */
@media (max-width: 720px) {
  .hero-visual { padding: 58px 18px 70px; }
  .floating.f1 { top: 14px; right: 18px; }
  .floating.f2 { bottom: 16px; left: 18px; }
  .floating.f3 { bottom: 16px; right: 18px; }
}

/* Odznak úrovně v pruhu „Doporučená úroveň“: text uprostřed (obecné pravidlo pro span v pruhu ho rozbíjelo) */
.placement-banner .placement-badge { display: inline-grid; place-items: center; text-align: center; }

/* Dotykové displeje: zvýraznění „při najetí myší“ zůstávalo po klepnutí viset a přeneslo se
   na odpověď další otázky na stejném místě – na zařízeních bez myši ho vypínáme. */
@media (hover: none) {
  .option:hover:not(:disabled) { border-color: var(--line); background: var(--card); }
  .option.selected:hover { border-color: var(--primary); background: rgba(109, 94, 252, 0.08); }
  .option.correct:hover { border-color: var(--ok); background: var(--ok-bg); }
  .option.wrong:hover { border-color: var(--bad); background: var(--bad-bg); }
  .tile:hover { border-color: var(--line); }
  .exam-opt:hover { border-color: var(--line); }
  .exam-opt.selected:hover { border-color: var(--primary); }
  .btn-ghost:hover:not(:disabled) { border-color: var(--line); color: var(--text); }
  .chip:hover, .topic-chip:hover { border-color: var(--line); }
  .action-card:hover, .topic-card:hover, .mode-card:hover, .level-card:hover, .scenario:hover, .pair-card:hover { transform: none; }
}

/* Stránka Kontakt */
.contact-table { border-collapse: collapse; width: 100%; }
.contact-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 0.45rem 1rem 0.45rem 0; width: 7rem; vertical-align: top; }
.contact-table td { padding: 0.45rem 0; font-weight: 600; }

/* Zkušební Premium: upozornění na konec */
.notice.trial-end { display: flex; align-items: center; gap: 0.5rem; color: inherit; text-decoration: none; font-weight: 600; }
.notice.trial-end .grow { flex: 1; }
.auth-form .trial-note { margin-bottom: 0.8rem; }

/* Týdenní souhrn na hlavní stránce */
.week-summary { margin: 1rem 0; }
.ws-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.3rem 1rem; }
.ws-head h3 { margin: 0; }
.ws-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.4rem; margin: 0.8rem 0 0.4rem; }
.ws-day { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; font-size: 0.75rem; color: var(--muted); }
.ws-bar { width: 100%; max-width: 2.4rem; height: 4.5rem; display: flex; align-items: flex-end; background: color-mix(in srgb, var(--primary) 8%, var(--card)); border-radius: 0.4rem; overflow: hidden; }
.ws-fill { width: 100%; min-height: 0; background: linear-gradient(var(--primary-2), var(--primary)); border-radius: 0.4rem 0.4rem 0 0; }
.ws-day.today span { color: var(--primary); font-weight: 700; }
.ws-day.future .ws-bar { opacity: 0.45; }
.ws-up { color: var(--ok); }
.ws-down { color: var(--bad); }

/* Push notifikace */
.push-card .push-btns { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.4rem; }
.push-note { display: block; margin: -0.2rem 0 0.4rem 1.9rem; }
.push-note:empty { display: none; }

/* Stránka pokladny – čistá, bez hlavičky a patičky, částka a GoPay uprostřed */
body.checkout-page #header, body.checkout-page #footer, body.checkout-page #tabbar { display: none !important; }
body.checkout-page { padding-bottom: 0; }
.checkout { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.checkout-close { position: absolute; top: 16px; right: 16px; color: var(--muted); display: inline-flex; padding: 0.4rem; border-radius: 50%; }
.checkout-close:hover { background: color-mix(in srgb, var(--primary) 10%, transparent); }
.checkout-box { width: 100%; max-width: 420px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.8rem; }
.checkout-plan { font-weight: 700; font-size: 1.15rem; color: var(--muted); }
.checkout-amount { font-size: 2.8rem; font-weight: 800; line-height: 1; }
.checkout-amount span { font-size: 1rem; font-weight: 600; color: var(--muted); }
.gopay-mark { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.02em; margin: 0.6rem 0 0.2rem; }
.gopay-mark span { color: var(--primary); }
.checkout-box .btn.wide { width: 100%; margin-top: 0.4rem; }
.checkout .tiny { font-size: 0.72rem; max-width: 20rem; }
.checkout-status:empty { display: none; }

/* Pole hesla s přepínačem „zobrazit heslo“ */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 2.8rem; }
.pw-reveal { position: absolute; right: 0.3rem; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 2.2rem; height: 2.2rem; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 0.5rem; }
.pw-reveal:hover { color: var(--text); background: color-mix(in srgb, var(--primary) 12%, transparent); }

/* Profilová fotka (avatar) */
.avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.avatar-edit { position: relative; border: 0; padding: 0; cursor: pointer; font-family: inherit; }
.avatar-edit .avatar-cam { position: absolute; right: -2px; bottom: -2px; width: 26px; height: 26px; display: grid; place-items: center; font-size: 0.8rem; background: var(--card); border: 2px solid var(--bg); border-radius: 50%; line-height: 1; }
.avatar-edit:hover { filter: brightness(1.05); }

/* Proklikávací dlaždice na hlavní stránce */
a.feature.is-link { display: block; color: inherit; text-decoration: none; transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s; }
a.feature.is-link:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); box-shadow: 0 8px 24px color-mix(in srgb, var(--primary) 18%, transparent); }
.feature .f-go { display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.7rem; font-weight: 700; color: var(--primary); }
a.feature.is-link:hover .f-go { gap: 0.5rem; }

/* Rozřazovací test – přehled chyb na konci */
.placement-review { max-width: 560px; margin: 1.6rem auto 0; text-align: left; }
.placement-review h2 { text-align: center; margin-bottom: 0.3rem; }
.review-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.9rem 1rem; margin-top: 0.7rem; }
.rc-q { font-weight: 700; margin-bottom: 0.5rem; }
.rc-q .rc-label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.rc-row { display: flex; align-items: center; gap: 0.4rem; font-size: 0.95rem; margin-top: 0.2rem; }
.rc-row svg { width: 16px; height: 16px; flex: none; }
.rc-row.rc-bad { color: var(--bad); }
.rc-row.rc-ok { color: var(--ok); }
.rc-row span { color: var(--muted); }
.rc-row b { color: var(--text); }
.review-card .btn { margin-top: 0.6rem; }
.rc-explain:not(:empty) { margin-top: 0.6rem; }

/* Uvítací průvodce po registraci */
.welcome-page { max-width: 640px; }
.welcome-page .end-emoji { animation: pop 0.5s ease; }
.wl-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; width: 100%; max-width: 440px; margin: 1.4rem auto; }
.wl-feat { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; padding: 0.8rem 0.4rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 0.82rem; font-weight: 600; text-align: center; }
.wl-emoji { font-size: 1.5rem; line-height: 1; }
.wl-step { display: flex; align-items: flex-start; gap: 0.8rem; text-align: left; width: 100%; max-width: 440px; margin: 0.6rem auto 0.4rem; padding: 1rem; background: color-mix(in srgb, var(--primary) 8%, var(--card)); border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--line)); border-radius: var(--radius-sm); }
.wl-step h2 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.wl-step p { margin: 0; }
.wl-num { flex: none; width: 2rem; height: 2rem; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--primary); border-radius: 50%; }
@media (max-width: 420px) { .wl-feats { grid-template-columns: repeat(2, 1fr); } }

/* Admin – karta chyb z provozu a nebezpečné akce */
.adm-errhead { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.adm-errhead h3 { margin: 0; }
.adm-stack { max-height: 180px; overflow: auto; margin: 0.4rem 0 0; padding: 0.5rem 0.6rem; background: var(--bg); border: 1px solid var(--line); border-radius: 0.5rem; font-size: 0.74rem; line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
.adm-user-detail .danger-head { margin-top: 1.4rem; color: var(--bad); border-top: 1px solid var(--line); padding-top: 1rem; }

/* Ochrana série (záchrana zmeškaného dne) */
.streak-freeze { margin: 0.2rem 0 0; font-size: 0.8rem; font-weight: 600; color: #3b82f6; }
.streak-freeze.saved { color: var(--ok, #16a34a); }
:root:not([data-theme="light"]) .streak-freeze { color: #7cc0ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .streak-freeze { color: #7cc0ff; } }
:root[data-theme="dark"] .streak-freeze { color: #7cc0ff; }

/* Poslechové otázky – připomínka zapnout zvuk */
.audio-area { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.audio-hint { margin: 0; text-align: center; max-width: 22rem; }

/* Souboje 1v1 */
.duel-card { margin-bottom: 0.75rem; }
.duel-head { display: flex; align-items: center; gap: 0.75rem; }
.duel-emoji { font-size: 1.8rem; flex: none; }
.duel-badge { flex: none; font-weight: 800; font-size: 0.82rem; padding: 0.2rem 0.6rem; border-radius: 999px; background: var(--line); color: var(--text); }
.duel-badge.play { background: var(--primary); color: #fff; }
.duel-badge.win { background: var(--ok, #16a34a); color: #fff; }
.duel-badge.lose { background: color-mix(in srgb, var(--bad) 20%, transparent); color: var(--bad); }
.duel-scores { display: flex; align-items: center; justify-content: center; gap: 1.2rem; margin-top: 0.8rem; }
.duel-scores.big { gap: 2rem; font-size: 1.15rem; }
.ds-side { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; }
.ds-side span { font-weight: 800; font-size: 1.3rem; }
.ds-vs { color: var(--muted); font-weight: 700; }
.duel-result .duel-scores { margin: 1rem 0 1.5rem; }
.duel-card .row-btns { margin-top: 0.6rem; }

/* Vlastní slovíčka */
.myword-list { display: grid; gap: 0.75rem; margin-bottom: 1.25rem; }
.myword-card .mw-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.myword-card .mw-head h3 { margin: 0; }
.myword-card .row-btns { margin-top: 0.75rem; flex-wrap: wrap; }
