/* Silvinian — jadranský vizuál */
:root {
  --sea-deep: #0a5c8a;
  --sea: #1187c4;
  --sea-light: #7fc8e8;
  --sand: #faf5ec;
  --sand-dark: #f0e6d4;
  --terracotta: #e2725b;
  --terracotta-dark: #c85a44;
  --green: #3a9d5d;
  --gold: #f2b134;
  --ink: #1e3a4c;
  --ink-soft: #5b7386;
  --white: #ffffff;
  --danger: #d64545;
  --radius: 16px;
  --shadow: 0 2px 10px rgba(20, 60, 90, 0.10);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--sand);
  color: var(--ink);
  min-height: 100vh;
  min-height: 100dvh;
}
button { font-family: inherit; cursor: pointer; border: none; }
input { font-family: inherit; }

#app { max-width: 520px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; position: relative; }

/* ---------- Loading ---------- */
.loading-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; gap: 8px; }
.loading-logo { font-size: 64px; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Auth ---------- */
.auth-wrap { display: flex; flex-direction: column; justify-content: center; min-height: 100vh; min-height: 100dvh; padding: 24px; }
.auth-hero { text-align: center; margin-bottom: 28px; }
.auth-hero .logo { font-size: 72px; display: block; }
.auth-hero h1 { font-size: 40px; color: var(--sea-deep); letter-spacing: -1px; }
.auth-hero p { color: var(--ink-soft); margin-top: 4px; }
.auth-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.auth-tabs button { flex: 1; padding: 10px; border-radius: 10px; background: var(--sand-dark); font-weight: 700; font-size: 15px; color: var(--ink-soft); }
.auth-tabs button.active { background: var(--sea); color: var(--white); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-soft); margin-bottom: 5px; }
.field input {
  width: 100%; padding: 12px 14px; border: 2px solid var(--sand-dark);
  border-radius: 10px; font-size: 16px; background: var(--white); color: var(--ink);
}
.field input:focus { outline: none; border-color: var(--sea-light); }
.roster { display: flex; flex-wrap: wrap; gap: 7px; }
.roster-chip {
  display: flex; align-items: center; gap: 6px; background: var(--sand);
  border: 2px solid var(--sand-dark); border-radius: 999px; padding: 8px 13px;
  font-size: 14px; font-weight: 700; color: var(--ink);
}
.roster-chip span { font-size: 19px; }
.roster-chip.sel { background: #d9f0fb; border-color: var(--sea); }
.avatar-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-picker button { font-size: 24px; width: 44px; height: 44px; border-radius: 10px; background: var(--sand-dark); }
.avatar-picker button.sel { background: var(--sea-light); outline: 3px solid var(--sea); }
.btn-primary {
  width: 100%; padding: 14px; border-radius: 12px; background: var(--terracotta);
  color: var(--white); font-size: 17px; font-weight: 800; box-shadow: 0 4px 0 var(--terracotta-dark);
  transition: transform .06s;
}
.btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--terracotta-dark); }
.btn-primary:disabled { opacity: .6; }
.form-error { color: var(--danger); font-size: 14px; font-weight: 600; margin-bottom: 10px; min-height: 18px; }

/* ---------- Header ---------- */
.top-bar {
  background: linear-gradient(160deg, var(--sea-deep), var(--sea));
  color: var(--white); padding: 16px 18px 18px; border-radius: 0 0 24px 24px;
  position: relative; overflow: hidden;
}
.top-bar::after {
  content: "🌊"; position: absolute; right: -8px; bottom: -18px; font-size: 90px; opacity: .12;
}
.top-row { display: flex; align-items: center; gap: 12px; }
.top-avatar { font-size: 34px; background: rgba(255,255,255,.18); border-radius: 14px; width: 54px; height: 54px; display: grid; place-items: center; }
.top-info { flex: 1; min-width: 0; }
.top-info .name { font-weight: 800; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-info .level { font-size: 13px; opacity: .9; }
.top-stats { display: flex; gap: 10px; font-weight: 800; font-size: 15px; }
.top-stats span { background: rgba(255,255,255,.18); padding: 6px 10px; border-radius: 10px; white-space: nowrap; }
.xp-bar { margin-top: 12px; background: rgba(255,255,255,.25); height: 10px; border-radius: 6px; overflow: hidden; }
.xp-bar > div { height: 100%; background: var(--gold); border-radius: 6px; transition: width .6s ease; }
.xp-bar-label { font-size: 12px; margin-top: 5px; opacity: .9; }

/* ---------- Content ---------- */
.content { padding: 18px 16px 90px; }
.section-title { font-size: 20px; font-weight: 800; margin: 20px 0 12px; color: var(--sea-deep); }
.section-title:first-child { margin-top: 0; }

.review-card {
  display: flex; align-items: center; gap: 14px; background: linear-gradient(120deg, #fff4e0, #ffe8cc);
  border: 2px solid var(--gold); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); width: 100%;
  text-align: left; font-size: 15px;
}
.review-card .big { font-size: 36px; }
.review-card h3 { font-size: 17px; color: var(--ink); }
.review-card p { color: var(--ink-soft); font-size: 14px; margin-top: 2px; }
.review-card .count { margin-left: auto; background: var(--terracotta); color: var(--white); font-weight: 800; border-radius: 999px; padding: 6px 12px; font-size: 16px; }
.review-card.empty { background: var(--white); border-color: var(--sand-dark); }

.lesson-grid { display: flex; flex-direction: column; gap: 10px; }
.lesson-card {
  display: flex; align-items: center; gap: 14px; background: var(--white); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow); width: 100%; text-align: left; border: 2px solid transparent;
}
.lesson-card:not(.locked):active { border-color: var(--sea-light); }
.lesson-card .lesson-emoji { font-size: 34px; width: 48px; text-align: center; }
.lesson-who { display: block; font-size: 11.5px; font-weight: 700; color: var(--terracotta-dark); margin-top: 5px; }
.lesson-who:empty { display: none; }
.lesson-card .lesson-body { flex: 1; min-width: 0; }
.lesson-card h3 { font-size: 16px; }
.lesson-card .sub { font-size: 13px; color: var(--ink-soft); font-style: italic; }
.lesson-card .prog { margin-top: 7px; height: 7px; border-radius: 4px; background: var(--sand-dark); overflow: hidden; }
.lesson-card .prog > div { height: 100%; background: var(--green); border-radius: 4px; }
.lesson-card .stars { font-size: 14px; letter-spacing: 1px; }
.lesson-card.locked { opacity: .55; filter: grayscale(.4); }
.lesson-card .lock { font-size: 20px; }

/* ---------- Session ---------- */
.session { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.session-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.session-head .close { font-size: 22px; background: none; color: var(--ink-soft); font-weight: 800; }
.session-prog { flex: 1; height: 14px; background: var(--sand-dark); border-radius: 8px; overflow: hidden; }
.session-prog > div { height: 100%; background: var(--green); border-radius: 8px; transition: width .4s ease; }
.session-hearts { font-weight: 800; color: var(--terracotta); font-size: 15px; white-space: nowrap; }
.session-body { flex: 1; display: flex; flex-direction: column; padding: 8px 20px 20px; }

.task-prompt { font-size: 15px; font-weight: 700; color: var(--ink-soft); margin-bottom: 14px; }
.word-hero { text-align: center; margin: 14px 0 22px; }
.word-hero .emoji { font-size: 84px; display: block; line-height: 1.1; }
.word-hero .word { font-size: 32px; font-weight: 800; color: var(--sea-deep); margin-top: 8px; }
.word-hero .word.small { font-size: 26px; }
.word-hero .meaning { font-size: 20px; color: var(--ink); margin-top: 4px; }
.word-hero .note { font-size: 14px; color: var(--terracotta-dark); margin-top: 8px; font-weight: 600; }
.word-hero .example { margin-top: 14px; font-size: 15px; color: var(--ink-soft); background: var(--white); border-radius: 12px; padding: 10px 14px; display: inline-block; box-shadow: var(--shadow); }
.word-hero .example .it { font-style: italic; color: var(--sea-deep); font-weight: 600; }
.speak-btn { background: var(--sea-light); border-radius: 50%; width: 46px; height: 46px; font-size: 22px; vertical-align: middle; margin-left: 8px; }
.speak-btn.slow { font-size: 19px; }
.speak-btn.mini { width: 34px; height: 34px; font-size: 16px; margin-left: 6px; }
.speak-btn.mini.slow { font-size: 14px; margin-left: 4px; }
.speak-btn.alt { font-size: 19px; }
.speak-btn.mini.alt { font-size: 14px; margin-left: 4px; }
.listen-row { display: flex; gap: 16px; align-items: center; justify-content: center; }
.listen-big.slow { width: 64px; height: 64px; font-size: 28px; }

.choices { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.choice {
  background: var(--white); border: 2px solid var(--sand-dark); border-radius: 14px;
  padding: 14px 16px; font-size: 17px; font-weight: 700; color: var(--ink); text-align: left;
  display: flex; align-items: center; gap: 10px; transition: transform .06s;
}
.choice:active { transform: scale(.98); }
.choice.correct { background: #e3f6e9; border-color: var(--green); }
.choice.wrong { background: #fde7e7; border-color: var(--danger); animation: shake .35s; }
@keyframes shake { 0%,100% { transform: translateX(0);} 25% { transform: translateX(-6px);} 75% { transform: translateX(6px);} }

.type-area { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
/* Psací úkol — kompaktní layout, aby slovo i input zůstaly viditelné nad mobilní klávesnicí */
.session.typing .session-body { justify-content: flex-start; overflow-y: auto; }
.session.typing .word-hero { margin: 4px 0 14px; }
.session.typing .word-hero .emoji { display: inline-block; font-size: 40px; vertical-align: middle; margin-right: 10px; }
.session.typing .word-hero .word { display: inline-block; font-size: 24px; vertical-align: middle; margin-top: 0; }
.session.typing .word-hero .note { margin-top: 6px; }
.session.typing .type-area { margin-top: 0; }
.type-area input {
  width: 100%; padding: 15px; font-size: 19px; border: 2px solid var(--sand-dark); border-radius: 14px;
  text-align: center; background: var(--white); color: var(--ink); font-weight: 700;
}
.type-area input:focus { outline: none; border-color: var(--sea); }
.type-area input.ok { border-color: var(--green); background: #e3f6e9; }
.type-area input.bad { border-color: var(--danger); background: #fde7e7; }
.accents { display: flex; gap: 6px; justify-content: center; }
.accents button { background: var(--sand-dark); border-radius: 8px; padding: 8px 11px; font-size: 17px; font-weight: 700; color: var(--ink); }
.btn-idk { background: none; color: var(--ink-soft); font-weight: 700; font-size: 14px; text-decoration: underline; padding: 8px; }

.feedback { border-radius: 14px; padding: 14px 16px; margin-top: 14px; font-weight: 700; display: none; }
.feedback.show { display: block; animation: pop .25s; }
.feedback.good { background: #e3f6e9; color: #1d6b38; }
.feedback.bad { background: #fde7e7; color: #a22c2c; }
.feedback .fb-answer { font-size: 19px; margin-top: 2px; }
@keyframes pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.btn-continue { margin-top: 12px; }

/* ---------- Výsledek lekce ---------- */
.result-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; min-height: 100dvh; padding: 24px; text-align: center; position: relative; overflow: hidden; }
.result-emoji { font-size: 90px; animation: bounceIn .7s; }
@keyframes bounceIn { 0% { transform: scale(0);} 60% { transform: scale(1.25);} 100% { transform: scale(1);} }
.result-praise-it { font-size: 34px; font-weight: 800; color: var(--sea-deep); margin-top: 10px; }
.result-praise-cz { font-size: 17px; color: var(--ink-soft); }
.result-stats { display: flex; gap: 12px; margin: 26px 0; }
.result-stat { background: var(--white); border-radius: 14px; padding: 14px 18px; box-shadow: var(--shadow); min-width: 90px; }
.result-stat .val { font-size: 24px; font-weight: 800; color: var(--terracotta); }
.result-stat .lbl { font-size: 12px; color: var(--ink-soft); font-weight: 700; }
.confetti { position: absolute; top: -12px; font-size: 22px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------- Žebříček ---------- */
.lb-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.lb-tabs button { flex: 1; padding: 10px; border-radius: 10px; background: var(--white); font-weight: 700; color: var(--ink-soft); box-shadow: var(--shadow); }
.lb-tabs button.active { background: var(--sea); color: var(--white); }
.lb-row { display: flex; align-items: center; gap: 12px; background: var(--white); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); margin-bottom: 8px; }
.lb-row.me { border: 2px solid var(--gold); }
.lb-rank { font-size: 18px; font-weight: 800; width: 34px; text-align: center; color: var(--ink-soft); }
.lb-avatar { font-size: 28px; }
.lb-name { flex: 1; font-weight: 700; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-name .lb-sub { display: block; font-size: 12px; color: var(--ink-soft); font-weight: 600; }
.lb-xp { font-weight: 800; color: var(--sea-deep); white-space: nowrap; }

/* ---------- Chat ---------- */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 76px); height: calc(100dvh - 76px); }
.chat-head { padding: 14px 16px 6px; }
.chat-head h2 { color: var(--sea-deep); font-size: 20px; }
.chat-head p { font-size: 13px; color: var(--ink-soft); }
.chat-msgs { flex: 1; overflow-y: auto; padding: 10px 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { display: flex; gap: 9px; max-width: 86%; }
.msg .m-avatar { font-size: 24px; }
.msg .m-bubble { background: var(--white); border-radius: 14px 14px 14px 4px; padding: 9px 13px; box-shadow: var(--shadow); }
.msg .m-name { font-size: 11px; font-weight: 800; color: var(--sea); }
.msg .m-text { font-size: 15px; overflow-wrap: anywhere; }
.msg .m-time { font-size: 10px; color: var(--ink-soft); margin-top: 2px; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg.mine .m-bubble { background: #d9f0fb; border-radius: 14px 14px 4px 14px; }
.chat-suggest { display: flex; gap: 6px; overflow-x: auto; padding: 6px 16px; scrollbar-width: none; }
.chat-suggest button { white-space: nowrap; background: var(--white); border: 1px solid var(--sand-dark); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; color: var(--sea-deep); }
.chat-input { display: flex; gap: 8px; padding: 8px 16px 12px; }
.chat-input input { flex: 1; padding: 12px 14px; border: 2px solid var(--sand-dark); border-radius: 999px; font-size: 15px; background: var(--white); color: var(--ink); }
.chat-input input:focus { outline: none; border-color: var(--sea-light); }
.chat-input button { background: var(--sea); color: var(--white); border-radius: 50%; width: 46px; height: 46px; font-size: 19px; flex-shrink: 0; }

/* ---------- Profil ---------- */
.profile-hero { text-align: center; padding: 10px 0 4px; }
.profile-hero .p-avatar { font-size: 68px; }
.profile-hero h2 { font-size: 24px; }
.profile-hero .p-level { color: var(--terracotta-dark); font-weight: 800; margin-top: 2px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.stat-box { background: var(--white); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); text-align: center; }
.stat-box .val { font-size: 26px; font-weight: 800; color: var(--sea-deep); }
.stat-box .lbl { font-size: 12px; color: var(--ink-soft); font-weight: 700; margin-top: 2px; }
.badges { display: flex; flex-direction: column; gap: 8px; }
.badge { display: flex; align-items: center; gap: 12px; background: var(--white); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); }
.badge.off { opacity: .45; filter: grayscale(1); }
.badge .b-emoji { font-size: 28px; }
.badge .b-name { font-weight: 800; font-size: 15px; }
.badge .b-desc { font-size: 12px; color: var(--ink-soft); }
.btn-logout { width: 100%; margin-top: 20px; padding: 13px; border-radius: 12px; background: var(--white); color: var(--danger); font-weight: 800; font-size: 15px; box-shadow: var(--shadow); }

/* ---------- Bottom nav ---------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; background: var(--white);
  display: flex; border-top: 1px solid var(--sand-dark);
  padding: 6px 0 max(6px, env(safe-area-inset-bottom)); z-index: 50;
}
.bottom-nav button { flex: 1; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 0; color: var(--ink-soft); font-size: 10px; font-weight: 700; white-space: nowrap; overflow: hidden; }
.bottom-nav button .nav-ico { font-size: 22px; filter: grayscale(1); opacity: .6; }
.bottom-nav button.active { color: var(--sea-deep); }
.bottom-nav button.active .nav-ico { filter: none; opacity: 1; }
.nav-badge { position: relative; }
.nav-badge[data-n]:not([data-n="0"])::after {
  content: attr(data-n); position: absolute; top: -4px; right: -10px;
  background: var(--terracotta); color: var(--white); border-radius: 999px;
  font-size: 10px; font-weight: 800; padding: 1px 5px;
}

/* ---------- Poslech + skládání vět + příběhy ---------- */
.listen-big {
  background: var(--sea); color: var(--white); border-radius: 50%;
  width: 96px; height: 96px; font-size: 44px; box-shadow: 0 5px 0 var(--sea-deep);
  transition: transform .06s;
}
.listen-big:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--sea-deep); }
.assemble-built {
  min-height: 56px; background: var(--white); border: 2px dashed var(--sand-dark);
  border-radius: 14px; padding: 9px; display: flex; flex-wrap: wrap; gap: 7px; align-items: center;
  margin-bottom: 10px;
}
.assemble-hint { color: var(--ink-soft); font-size: 13px; padding: 4px 6px; }
.assemble-chips { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; }
.chip {
  background: var(--white); border: 2px solid var(--sand-dark); border-radius: 10px;
  padding: 9px 13px; font-size: 16px; font-weight: 700; color: var(--ink); box-shadow: var(--shadow);
}
.chip.in-built { background: #d9f0fb; border-color: var(--sea-light); }
.chip.used { opacity: 0; pointer-events: none; }
.story-lines { display: flex; flex-direction: column; gap: 8px; }
.story-line { background: var(--white); border-radius: 12px; padding: 11px 14px; box-shadow: var(--shadow); border-left: 4px solid transparent; cursor: pointer; }
.story-line .sl-it { font-weight: 700; color: var(--sea-deep); font-size: 16px; font-style: italic; }
.story-line .sl-cz { display: none; color: var(--ink-soft); font-size: 14px; margin-top: 3px; }
.story-line.show-cz .sl-cz { display: block; }
.story-line.playing { border-left-color: var(--terracotta); background: #fff4e0; }

/* ---------- Silvio + rodina ---------- */
.silvio-row { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.silvio-svg { flex-shrink: 0; filter: drop-shadow(0 2px 4px rgba(20,60,90,.18)); }
.bubble {
  background: var(--white); border-radius: 16px 16px 16px 4px; padding: 11px 14px;
  box-shadow: var(--shadow); font-size: 14px; line-height: 1.45; color: var(--ink);
}
.bubble b { color: var(--terracotta-dark); }
.silvio-click { cursor: pointer; }
.silvio-click:active .bubble { border-color: var(--sea); }
.bubble-hint { font-size: 11.5px; color: var(--sea-deep); font-weight: 700; margin-top: 6px; }
.family-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.fam-chip {
  background: var(--white); border-radius: 12px; padding: 9px 10px; box-shadow: var(--shadow);
  text-align: center; min-width: 78px; flex-shrink: 0; border: 2px solid transparent;
}
.fam-chip.me { border-color: var(--gold); }
.fam-chip .fc-avatar { font-size: 26px; }
.fam-chip .fc-name { font-size: 12px; font-weight: 800; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fam-chip .fc-xp { font-size: 12px; font-weight: 700; color: var(--sea-deep); }
.fam-chip .fc-streak { font-size: 11px; color: var(--ink-soft); }

/* ---------- Fráze, countdown, bank, profily, passaporto ---------- */
.frasi-intro { font-size: 14px; color: var(--ink-soft); margin: -4px 0 14px; line-height: 1.5; }
.countdown-card { background: linear-gradient(120deg, #e3f2fb, #d2ecfa); border-color: var(--sea-light); cursor: default; }
.countdown-card .count { background: var(--sea-deep); }
.bank-card { background: linear-gradient(120deg, #e9f8ee, #d9f2e2); border-color: var(--green); }
.birthday-card { background: linear-gradient(120deg, #ffe9f2, #fff3d6); border-color: #f0a; cursor: default; animation: pop .4s; }
.bank-card .count { background: var(--green); }
.review-card .prog { margin-top: 7px; height: 7px; border-radius: 4px; background: rgba(0,0,0,.08); overflow: hidden; }
.review-card .prog > div { height: 100%; background: var(--green); border-radius: 4px; }
.bank-rules { font-size: 13px; color: var(--ink-soft); background: var(--white); border-radius: 12px; padding: 11px 14px; box-shadow: var(--shadow); margin-bottom: 12px; line-height: 1.55; }
.bank-rules b { color: var(--ink); }
.bank-note { font-size: 13px; color: var(--terracotta-dark); font-weight: 600; margin-top: 8px; }
.bank-kick { background: none; color: var(--danger); font-weight: 800; font-size: 15px; padding: 4px 6px; flex-shrink: 0; }
.fam-chip[data-m], .lb-row[data-m] { cursor: pointer; }
.strengths { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; }
.strength-chip { background: #fff4e0; border: 1px solid var(--gold); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; color: #7a5a12; }
.passport { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.pp-head { font-weight: 800; color: var(--sea-deep); margin-bottom: 10px; font-size: 14px; }
.pp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pp-stamp { border: 2px dashed var(--sand-dark); border-radius: 10px; padding: 8px 5px 6px; text-align: center; opacity: .45; display: flex; flex-direction: column; gap: 2px; align-items: center; min-height: 72px; }
.pp-stamp.ok { border-color: var(--terracotta); border-style: solid; opacity: 1; background: #fff7f3; transform: rotate(-2deg); }
.pp-stamp.ok:nth-child(even) { transform: rotate(2deg); }
.pp-emoji { font-size: 22px; }
.pp-title { font-size: 10px; font-weight: 700; color: var(--ink-soft); line-height: 1.2; }
.pp-mark { font-size: 10px; letter-spacing: 1px; }

/* ---------- Plán do milníku ---------- */
.plan-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 12px; }
.plan-head { font-weight: 800; font-size: 17px; color: var(--sea-deep); }
.plan-sub { font-weight: 600; font-size: 13px; color: var(--ink-soft); }
.plan-nums { font-weight: 700; font-size: 14px; color: var(--terracotta-dark); margin: 4px 0 8px; }
.plan-skills { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.plan-skills li { font-size: 14px; color: var(--ink); }
.plan-skills .plan-more { color: var(--ink-soft); font-style: italic; }
.plan-skills-empty { font-size: 13px; color: var(--ink-soft); }

/* ---------- Junior psaní ---------- */
.junior-slots { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin-bottom: 14px; min-height: 44px; align-items: center; }
.js-slot { width: 34px; height: 42px; border-bottom: 3px solid var(--sand-dark); background: var(--white); border-radius: 8px 8px 0 0; display: grid; place-items: center; font-size: 22px; font-weight: 800; color: var(--sea-deep); }
.js-slot.filled { border-bottom-color: var(--green); background: #e3f6e9; }
.js-gap { width: 14px; }
.chip.wrong-tap { background: #fde7e7; border-color: var(--danger); animation: shake .35s; }

/* ---------- Nastavení v profilu ---------- */
.prefs-box { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px 14px; }
.pref-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--sand-dark); }
.pref-row:last-child { border-bottom: none; }
.pref-label { font-weight: 700; font-size: 14px; }
.pref-label small { display: block; font-weight: 600; font-size: 11px; color: var(--ink-soft); }
.pref-toggle { background: var(--sand-dark); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.pref-toggle.on { background: #e3f6e9; color: #1d6b38; }
.pref-goals { display: flex; gap: 4px; }
.pref-goals button { background: var(--sand-dark); border-radius: 8px; padding: 8px 8px; font-weight: 700; font-size: 12px; color: var(--ink-soft); }
.pref-goals button.sel { background: var(--sea); color: var(--white); }
.hdr-bank { cursor: pointer; }

/* ---------- Úrovně A1/A2/B1 ---------- */
.level-milestone { display: flex; align-items: center; gap: 10px; background: var(--white); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow); margin-bottom: 10px; }
.level-milestone .lm-desc { font-size: 12px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.level-milestone .prog { flex: 1; height: 8px; border-radius: 4px; background: var(--sand-dark); overflow: hidden; }
.level-milestone .prog > div { height: 100%; background: var(--gold); border-radius: 4px; }
.level-milestone .lm-count { font-size: 12px; font-weight: 800; color: var(--sea-deep); white-space: nowrap; }
.level-milestone.done { border: 2px solid var(--green); }
.level-more { font-size: 13px; color: var(--ink-soft); margin: 8px 0 4px; text-align: center; }

/* ---------- Silviovy hlášky u chyb a výsledků ---------- */
.fb-quip { display: flex; align-items: flex-start; gap: 7px; font-size: 13px; font-weight: 600; margin-top: 8px; opacity: .92; }
.fb-quip svg { flex-shrink: 0; margin-top: 1px; }
.result-quip { font-size: 13px; color: var(--ink-soft); font-style: italic; max-width: 320px; margin-bottom: 14px; line-height: 1.5; }
.ai-resume { max-width: 340px; width: 100%; margin-bottom: 16px; font-size: 13px; color: var(--ink-soft); min-height: 20px; }
.ai-resume .bubble { font-size: 13.5px; }

/* ---------- Přehled lekce před drilem ---------- */
.preview-list { display: flex; flex-direction: column; gap: 6px; }
.preview-row {
  display: flex; align-items: center; gap: 12px; background: var(--white); border-radius: 12px;
  padding: 9px 13px; box-shadow: var(--shadow); text-align: left; border: 2px solid transparent;
}
.preview-row:active { border-color: var(--sea-light); }
.preview-row .pv-emoji { font-size: 24px; width: 30px; text-align: center; }
.preview-row .pv-body { flex: 1; min-width: 0; }
.preview-row .pv-it { display: block; font-weight: 800; color: var(--sea-deep); font-size: 16px; }
.preview-row .pv-cz { display: block; font-size: 13px; color: var(--ink-soft); }
.preview-row .pv-speak { opacity: .55; }
.preview-row .pv-speak.slow { margin-left: 4px; font-size: 15px; }

.fb-cz { font-size: 14px; font-weight: 600; color: var(--ink-soft); margin-top: 2px; }

/* ---------- Silviovy berličky ---------- */
.mn-count { font-size: 13px; font-weight: 800; color: var(--terracotta-dark); white-space: nowrap; }
.mn-bulb { font-size: 30px; flex-shrink: 0; width: 44px; text-align: center; }
.mn-regen { display: block; margin-top: 6px; padding: 6px 0; }
.mn-add { margin-top: 18px; }
.mn-add textarea {
  width: 100%; border: 2px solid var(--sea-light); border-radius: 12px; padding: 10px 12px;
  font: inherit; font-size: 14px; resize: vertical; background: var(--white); color: var(--ink);
}
.mn-add textarea:focus { outline: none; border-color: var(--sea); }
.mn-add .btn-primary { margin-top: 8px; }

/* ---------- Quiz della famiglia ---------- */
.g-timer { font-size: 72px; font-weight: 800; color: var(--sea-deep); text-align: center; margin: 6px 0; font-variant-numeric: tabular-nums; }
.g-timer.hurry { color: var(--danger); animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.g-scores { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 16px; }
.g-score { background: var(--white); border-radius: 999px; padding: 6px 11px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow); }
.g-score b { color: var(--sea-deep); }

/* ---------- Chat: překlady, opravy, srdíčka ---------- */
.msg .m-cz { font-size: 12px; color: var(--ink-soft); margin-top: 3px; font-style: italic; }
.msg .m-fix { font-size: 12px; color: var(--terracotta-dark); margin-top: 3px; }
.msg .m-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 3px; }
.msg .m-heart { background: none; font-size: 12px; padding: 2px 4px; color: var(--ink-soft); font-weight: 600; }
.sil-bar { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.sil-bar .sil-title { flex: 1; font-size: 13px; font-weight: 700; color: var(--sea-deep); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sil-bar button { background: var(--sand-dark); border-radius: 8px; padding: 6px 10px; font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.sil-thread-row { display: flex; align-items: center; gap: 8px; width: 100%; background: var(--white); border-radius: 12px; padding: 11px 13px; box-shadow: var(--shadow); margin-bottom: 7px; text-align: left; cursor: pointer; border: 2px solid transparent; }
.sil-thread-row.cur { border-color: var(--sea-light); }
.sil-thread-row .st-title { flex: 1; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sil-thread-row .st-date { font-size: 11px; color: var(--ink-soft); white-space: nowrap; }
.sil-thread-row .st-del { background: none; font-size: 14px; opacity: .6; flex-shrink: 0; }
.sil-new-row { color: var(--sea-deep); font-weight: 800; border: 2px dashed var(--sea-light); box-shadow: none; background: transparent; justify-content: center; }

/* ---------- XP toast ---------- */
.xp-toast {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: #5c4200; font-weight: 800; padding: 10px 20px;
  border-radius: 999px; box-shadow: var(--shadow); z-index: 100; animation: toastIn 2.2s forwards;
  white-space: nowrap;
}
@keyframes toastIn { 0% { opacity: 0; transform: translate(-50%, -16px);} 12% { opacity: 1; transform: translate(-50%, 0);} 82% { opacity: 1;} 100% { opacity: 0; transform: translate(-50%, -12px);} }

@media (min-width: 521px) { .top-bar { border-radius: 0 0 24px 24px; } }

/* ---------- Cinema di Silvio (videoklipy) ---------- */
.bottom-nav button { font-size: 9px; letter-spacing: -0.2px; }
.video-wrap {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border-radius: 14px; overflow: hidden; background: #000;
  box-shadow: var(--shadow); flex-shrink: 0;
}
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.clip-replay {
  align-self: center; background: none; color: var(--sea-deep);
  font-size: 13px; font-weight: 700; padding: 8px 12px; margin: 4px 0 6px;
}
.fb-note { font-size: 13px; font-weight: 600; margin-top: 8px; opacity: .9; }

/* ---------- Čistší menu: odkaz na žebříček u rodinného pásu ---------- */
.fam-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lb-link {
  background: none; color: var(--sea-deep); font-size: 13px; font-weight: 800;
  padding: 4px 6px; white-space: nowrap; flex-shrink: 0;
}

/* ---------- Mise v Silvi ---------- */
.mis-goal {
  background: var(--white); border-radius: 14px; padding: 13px 15px;
  box-shadow: var(--shadow); font-size: 15px; line-height: 1.45;
  border-left: 4px solid var(--terracotta);
}
.mis-goal b { color: var(--sea-deep); }
.mis-h { font-size: 14px; font-weight: 800; color: var(--ink-soft); margin: 14px 0 8px; }
.mis-lvl { font-size: 12px; }
.mis-action { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.mis-note { font-size: 13.5px; color: var(--ink-soft); font-weight: 600; text-align: center; }
.mis-celebrate {
  background: #e3f6e9; color: #1d6b38; border-radius: 14px; padding: 13px 15px;
  font-weight: 800; text-align: center; animation: pop .3s;
}

/* ---------- Silviovo týdenní vysvědčení ---------- */
.report-text { white-space: pre-wrap; font-size: 15px; }

/* ---------- Silvio chat: přepracovaná lišta vláken (07/2026) ---------- */
.sil-bar { gap: 8px; }
.sil-bar .sil-title {
  flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0;
  background: var(--white); border: 2px solid var(--sand-dark); border-radius: 10px;
  padding: 8px 11px; font-size: 13px; font-weight: 700; color: var(--sea-deep);
  text-align: left; cursor: pointer;
}
#sil-title-txt { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sil-caret { color: var(--ink-soft); font-size: 12px; flex-shrink: 0; }
.sil-bar .sil-newbtn {
  background: var(--sea); color: var(--white); border-radius: 10px; padding: 9px 13px;
  font-size: 13px; font-weight: 800; white-space: nowrap; flex-shrink: 0;
  box-shadow: 0 3px 0 var(--sea-deep); transition: transform .06s;
}
.sil-bar .sil-newbtn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--sea-deep); }
.sil-list-head { font-size: 13px; font-weight: 700; color: var(--ink-soft); padding: 6px 2px 10px; }
.sil-thread-row { align-items: center; }
.sil-thread-row .st-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sil-thread-row .st-prev { font-size: 12px; color: var(--ink-soft); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sil-thread-row .st-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.sil-thread-row.cur { border-color: var(--sea); background: #f0f8fc; }
