/* ==========================================================================
   Mia's WildWorld · Grade 6 English Unit 2
   Cheerful "daylight expedition" design system · vanilla CSS · iPhone / iPad / desktop
   ========================================================================== */

:root {
  --bg: hsl(40, 70%, 97%);
  --bg-warm: hsl(40, 60%, 93%);
  --surface: #ffffff;
  --tint: hsl(174, 50%, 95%);
  --ink: hsl(205, 45%, 16%);
  --ink-soft: hsl(205, 22%, 35%);
  --ink-muted: hsl(205, 14%, 48%);

  --teal: hsl(174, 80%, 30%);
  --teal-dark: hsl(174, 84%, 23%);
  --teal-soft: hsl(172, 60%, 91%);
  --coral: hsl(8, 82%, 60%);
  --coral-dark: hsl(8, 70%, 46%);
  --coral-soft: hsl(10, 90%, 95%);
  --sun: hsl(42, 96%, 56%);
  --sun-soft: hsl(45, 100%, 92%);
  --sun-ink: hsl(32, 85%, 30%);
  --meadow: hsl(150, 62%, 32%);
  --meadow-soft: hsl(146, 55%, 92%);
  --sky: hsl(206, 78%, 42%);
  --sky-soft: hsl(206, 85%, 94%);
  --berry: hsl(330, 70%, 52%);

  --border: hsl(205, 30%, 88%);
  --border-strong: hsl(205, 24%, 78%);

  --shadow-sm: 0 1px 2px rgba(18, 44, 60, 0.06), 0 2px 8px rgba(18, 44, 60, 0.05);
  --shadow-md: 0 4px 10px rgba(18, 44, 60, 0.06), 0 12px 28px rgba(18, 44, 60, 0.08);
  --shadow-lg: 0 20px 48px rgba(12, 52, 64, 0.18);
  --shadow-btn: 0 3px 0 rgba(0, 0, 0, 0.14);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  --font-display: 'Baloo 2', 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 40% at 0% 0%, hsla(172, 70%, 80%, 0.35), transparent 70%),
    radial-gradient(ellipse 60% 35% at 100% 0%, hsla(30, 95%, 82%, 0.38), transparent 70%),
    radial-gradient(ellipse 80% 40% at 50% 100%, hsla(145, 60%, 85%, 0.25), transparent 70%);
  background-attachment: fixed;
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom, 0px));
}
body.modal-open { overflow: hidden; }
@media (min-width: 900px) { body { padding-bottom: 32px; } }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: clamp(1.6rem, 4.6vw, 2.2rem); font-weight: 800; }
h2 { font-size: clamp(1.25rem, 3.4vw, 1.5rem); font-weight: 800; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--teal); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; padding: 0; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid hsla(174, 80%, 35%, 0.55); outline-offset: 2px; border-radius: 8px; }
img { max-width: 100%; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

.muted { color: var(--ink-muted); }
.small { font-size: 0.86rem; }
.center { text-align: center; }
.kicker { font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--teal); }
.hu-line { color: var(--meadow); font-weight: 700; background: var(--meadow-soft); border-radius: var(--r-sm); padding: 6px 10px; font-size: 0.9rem; }
.hu-txt { color: var(--meadow); }
body.hide-hu .hu-only { display: none !important; }

/* ==================== MOTION ==================== */
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 hsla(42, 96%, 56%, 0.65); } 100% { box-shadow: 0 0 0 16px hsla(42, 96%, 56%, 0); } }
@keyframes stickerPop { 0% { transform: scale(0.3) rotate(-18deg); opacity: 0; } 60% { transform: scale(1.12) rotate(5deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@keyframes fall { 0% { transform: translate(0, -10vh) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), 105vh) rotate(var(--rot)); opacity: 0.9; } }
@keyframes flipIn { from { transform: rotateY(90deg); } to { transform: rotateY(0); } }
@keyframes swimFloat { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(3px, -4px); } }
@keyframes softPulse { 0%, 100% { opacity: 0.92; } 50% { opacity: 0.65; } }

.view { animation: popIn 0.25s ease-out; }
.svg-swim, .svg-glide { animation: swimFloat 4.6s ease-in-out infinite; }
.svg-pulse { animation: softPulse 3s ease-in-out infinite; }
.bump { animation: bump 0.45s ease; display: inline-block; }

/* ==================== TOP BAR ==================== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 251, 244, 0.9);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top, 0px);
}
.topbar-inner {
  max-width: 1080px; margin: 0 auto;
  padding: 8px max(14px, env(safe-area-inset-right, 0px)) 8px max(14px, env(safe-area-inset-left, 0px));
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.brand { display: flex; align-items: center; gap: 9px; min-height: 44px; text-align: left; }
.brand-icon { width: 40px; height: 40px; border-radius: 12px; overflow: hidden; flex-shrink: 0; box-shadow: var(--shadow-sm); }
.brand-icon img, .brand-svg { width: 100%; height: 100%; display: block; }
.brand-text { display: flex; flex-direction: column; }
.brand-title { font-family: var(--font-display); font-weight: 800; font-size: 1.12rem; line-height: 1.05; }
.brand-sub { font-size: 0.72rem; font-weight: 700; color: var(--ink-muted); }
.top-controls { display: flex; align-items: center; gap: 6px; }
.stat-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 40px;
  padding: 0 12px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  font-weight: 800; font-size: 0.9rem; white-space: nowrap;
}
.stat-pill .sep { width: 1px; height: 18px; background: var(--border); }
#hdr-xp { color: var(--sun-ink); }
.icon-toggle {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  font-size: 1.1rem; display: inline-flex; align-items: center; justify-content: center;
}
.icon-toggle[aria-pressed="false"] { opacity: 0.7; }
.hu-toggle {
  display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 12px;
  border-radius: var(--r-pill); font-weight: 800; font-size: 0.86rem;
  background: var(--surface); border: 1.5px solid var(--border-strong); color: var(--ink-soft);
  box-shadow: var(--shadow-sm); transition: background 0.2s, border-color 0.2s, color 0.2s; white-space: nowrap;
}
.hu-toggle[aria-pressed="true"] { background: var(--meadow-soft); border-color: var(--meadow); color: hsl(150, 70%, 22%); }
.hu-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.hu-toggle[aria-pressed="true"] .hu-dot { background: var(--meadow); }
@media (max-width: 420px) {
  .brand-sub { display: none; }
  .brand-title { font-size: 1rem; }
  .stat-pill { padding: 0 9px; gap: 6px; font-size: 0.84rem; }
  .hu-toggle { padding: 0 10px; }
}
@media (max-width: 359px) {
  .brand-text { display: none; }
}

.desktop-nav { display: none; max-width: 1080px; margin: 0 auto; padding: 0 14px 10px; gap: 6px; }
@media (min-width: 900px) { .desktop-nav { display: flex; } }
.desktop-nav .nav-btn {
  min-height: 42px; padding: 0 16px; border-radius: var(--r-pill);
  font-weight: 800; font-size: 0.95rem; color: var(--ink-soft); transition: background 0.18s, color 0.18s;
}
.desktop-nav .nav-btn:hover { background: hsla(174, 80%, 30%, 0.08); color: var(--ink); }
.desktop-nav .nav-btn.active { background: var(--teal); color: #fff; box-shadow: 0 4px 14px hsla(174, 80%, 30%, 0.3); }

.mobile-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: repeat(6, 1fr);
  background: rgba(255, 252, 246, 0.96);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  padding: 4px max(4px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(4px, env(safe-area-inset-left, 0px));
}
@media (min-width: 900px) { .mobile-nav { display: none; } }
.mobile-nav .nav-btn {
  min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border-radius: 14px; font-size: 0.68rem; font-weight: 800; color: var(--ink-muted);
}
.mob-ico { font-size: 1.32rem; line-height: 1; filter: grayscale(0.5); transition: transform 0.2s, filter 0.2s; }
.mobile-nav .nav-btn.active { color: var(--teal-dark); background: var(--teal-soft); }
.mobile-nav .nav-btn.active .mob-ico { filter: none; transform: translateY(-1px) scale(1.1); }

/* ==================== LAYOUT ==================== */
.container { max-width: 1080px; margin: 0 auto; padding: 16px max(14px, env(safe-area-inset-left, 0px)) 24px; outline: none; }
.view > * + * { margin-top: 16px; }
.card, .panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-md); padding: 18px;
}
.card-title { margin-bottom: 10px; }
.panel-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.section-hd h2 { margin-bottom: 4px; }
.section-hd p { color: var(--ink-soft); }
.section-hd .hu-line { margin-top: 8px; display: inline-block; }
.empty { padding: 26px; text-align: center; color: var(--ink-muted); background: var(--surface); border: 2px dashed var(--border); border-radius: var(--r-md); }

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px; border-radius: var(--r-pill);
  font-weight: 800; font-size: 0.98rem; text-decoration: none; line-height: 1.1; text-align: center;
  transition: transform 0.12s ease, background 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.btn:active:not(:disabled) { transform: translateY(2px); }
.btn:disabled { opacity: 0.45; }
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 3px 0 var(--teal-dark), 0 6px 16px hsla(174, 80%, 30%, 0.22); }
.btn-primary:hover:not(:disabled) { background: hsl(174, 80%, 27%); }
.btn-soft { background: var(--surface); color: var(--ink); border: 1.5px solid var(--border-strong); }
.btn-soft:hover:not(:disabled) { border-color: var(--teal); color: var(--teal-dark); }
.btn-again { background: var(--coral-soft); color: var(--coral-dark); border: 1.5px solid hsl(8, 80%, 82%); }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 1.06rem; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 0.88rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-row.center { justify-content: center; }
.btn-row.spread { justify-content: space-between; }
.link-btn { color: var(--teal-dark); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-muted); font-size: 1.05rem; }
.icon-btn:hover { background: var(--bg-warm); }
.tts {
  display: inline-flex; align-items: center; gap: 4px; min-height: 32px; min-width: 36px; padding: 0 9px;
  border-radius: var(--r-pill); background: var(--bg-warm); border: 1px solid var(--border);
  font-size: 0.8rem; font-weight: 800; color: var(--ink-soft); vertical-align: middle; justify-content: center;
}
.tts:hover, .tts:active { background: var(--teal-soft); border-color: var(--teal); color: var(--teal-dark); }

.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.scroll-row { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.scroll-row::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill);
  background: var(--surface); border: 1.5px solid var(--border); font-weight: 800; font-size: 0.88rem; color: var(--ink-soft);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chip:hover:not(:disabled) { border-color: var(--teal); color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip:disabled { opacity: 0.45; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 4px; background: var(--bg-warm); border-radius: var(--r-pill); }
.seg-btn { min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); font-weight: 800; font-size: 0.9rem; color: var(--ink-soft); }
.seg-btn.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg-wide { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; border-radius: 18px; }
.seg-wide::-webkit-scrollbar { display: none; }
.seg-wide .seg-btn { flex: 1 0 auto; }
.pill { display: inline-block; padding: 3px 10px; border-radius: var(--r-pill); background: var(--sun-soft); color: var(--sun-ink); font-weight: 800; font-size: 0.82rem; }

.stars { display: inline-flex; gap: 1px; vertical-align: middle; }
.star { color: var(--border-strong); font-size: 1rem; line-height: 1; }
.star.on { color: var(--sun); text-shadow: 0 1px 0 hsl(36, 90%, 40%); }

/* ==================== STICKERS ==================== */
.stk { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(18, 44, 60, 0.18)); }
.prize-img { position: relative; width: 120px; height: 120px; }
.prize-img.mystery .stk { filter: grayscale(1) brightness(0.55) contrast(0.8); opacity: 0.35; }
.prize-q {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 3rem; font-weight: 800; color: var(--teal-dark); text-shadow: 0 2px 0 #fff;
}

/* ==================== JOURNEY HOME ==================== */
.today-card {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center;
  padding: 22px; border-radius: var(--r-lg);
  background:
    radial-gradient(circle at 92% 18%, hsla(45, 100%, 75%, 0.65), transparent 38%),
    linear-gradient(135deg, hsl(172, 62%, 93%), hsl(40, 90%, 94%));
  border: 1px solid hsl(172, 40%, 82%);
  box-shadow: var(--shadow-md);
}
.today-copy { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.today-sub { color: var(--ink-soft); font-weight: 600; }
.today-copy .hu-line { align-self: flex-start; }
.today-copy .btn-row { margin-top: 6px; }
.step-dots { display: flex; gap: 6px; }
.step-dots i { width: 26px; height: 8px; border-radius: 4px; background: hsla(205, 30%, 70%, 0.45); }
.step-dots i.on { background: var(--teal); }
.today-prize { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.prize-lbl { font-size: 0.78rem; font-weight: 800; color: var(--ink-soft); }
.today-prize .prize-img { animation: wiggle 3.2s ease-in-out infinite; }
@media (max-width: 560px) {
  .today-card { grid-template-columns: 1fr; padding: 18px; }
  .today-prize { position: absolute; top: 10px; right: 10px; }
  .today-prize .prize-img { width: 76px; height: 76px; }
  .today-prize .prize-q { font-size: 2rem; }
  .prize-lbl { display: none; }
  .today-copy h1 { padding-right: 76px; }
  .today-copy .btn-row .btn { width: 100%; }
}

.journey { position: relative; margin: 4px auto 6px; max-width: 520px; }
.journey-path { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.journey-path path { fill: none; stroke: hsl(36, 70%, 70%); stroke-width: 6; stroke-dasharray: 2 12; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.station {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px; width: 132px; text-align: center;
}
.st-badge {
  position: relative; width: 66px; height: 66px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--border-strong); box-shadow: var(--shadow-md);
  padding: 6px; transition: transform 0.18s;
}
.station:hover .st-badge { transform: scale(1.06); }
.st-badge .stk { filter: none; }
.st-lbl { font-size: 0.8rem; font-weight: 700; line-height: 1.15; color: var(--ink-soft); background: hsla(40, 70%, 97%, 0.85); border-radius: 8px; padding: 1px 4px; }
.st-lbl b { display: block; font-family: var(--font-display); font-size: 0.86rem; color: var(--ink); }
.station.done .st-badge { border-color: var(--sun); background: var(--sun-soft); }
.station.current .st-badge { border-color: var(--teal); animation: pulseRing 1.8s ease-out infinite; }
.station.current .st-badge .stk, .station.open .st-badge .stk { filter: grayscale(1) opacity(0.4); }
.station.locked .st-badge { background: var(--bg-warm); }
.station.locked .st-badge .stk { filter: grayscale(1) opacity(0.22); }
.station.locked .st-lbl { opacity: 0.7; }
.st-lock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }

.known-pill { background: var(--meadow-soft); color: hsl(150, 70%, 22%); border-radius: var(--r-pill); padding: 4px 12px; font-weight: 800; }
.known-pill b { font-size: 1.1rem; }
.boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; align-items: end; margin-bottom: 10px; }
.box { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.box-col { width: 100%; max-width: 54px; height: 84px; background: var(--bg-warm); border-radius: 10px; display: flex; align-items: flex-end; overflow: hidden; }
.box-col i { display: block; width: 100%; min-height: 4px; border-radius: 10px 10px 0 0; transition: height 0.5s ease; }
.b0 .box-col i { background: var(--border-strong); }
.b1 .box-col i { background: var(--coral); }
.b2 .box-col i { background: var(--sun); }
.b3 .box-col i { background: hsl(160, 55%, 50%); }
.b4 .box-col i { background: var(--teal); }
.b5 .box-col i { background: var(--sky); }
.box-n { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; line-height: 1; }
.box-l { font-size: 0.72rem; font-weight: 700; color: var(--ink-muted); white-space: nowrap; }
.panel .hu-line { margin-top: 8px; }

.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.slot {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px 10px;
  border-radius: var(--r-md); background: var(--bg-warm); border: 2px dashed var(--border-strong); min-height: 128px;
  transition: transform 0.15s;
}
.slot:hover { transform: translateY(-2px); }
.slot-img { width: 70px; height: 70px; }
.slot:not(.got) .stk { filter: grayscale(1) brightness(0.4); opacity: 0.18; }
.slot.got { background: linear-gradient(160deg, #fff, var(--sun-soft)); border: 2px solid hsl(42, 90%, 75%); }
.slot-name { font-size: 0.74rem; font-weight: 800; line-height: 1.15; text-align: center; color: var(--ink-soft); }
.slot:not(.got) .slot-name { font-weight: 700; color: var(--ink-muted); }
.parents-note { font-size: 0.86rem; color: var(--ink-muted); text-align: center; }

/* Mission detail */
.back-link { min-height: 44px; font-weight: 800; color: var(--teal-dark); padding-right: 10px; }
.mission-hero {
  display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, hsl(172, 62%, 93%), hsl(40, 90%, 94%)); border: 1px solid hsl(172, 40%, 82%);
}
.mission-hero .prize-img { width: 104px; height: 104px; flex-shrink: 0; }
.mh-de { font-weight: 700; color: var(--ink-soft); margin: 2px 0; }
.mh-stars { margin-top: 6px; display: flex; gap: 8px; align-items: center; }
.mh-stars .star { font-size: 1.3rem; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.step {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-sm);
}
.step.next { border: 2px solid var(--teal); }
.step-num {
  width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; background: var(--bg-warm); color: var(--ink-soft);
}
.step.done .step-num { background: var(--meadow); color: #fff; }
.step.next .step-num { background: var(--teal); color: #fff; }
.step-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.step-hu { font-size: 0.85rem; color: var(--meadow); }
.step-meta { font-size: 0.8rem; color: var(--ink-muted); font-weight: 700; }

/* ==================== WORDS ==================== */
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 0.84rem; color: var(--ink-soft); }
.legend-ss { margin-left: auto; }
@media (max-width: 600px) { .legend-ss { margin-left: 0; } }
.art { display: inline-block; padding: 0 6px; border-radius: 6px; font-weight: 800; font-size: 0.86em; line-height: 1.45; }
.art-der { background: var(--sky-soft); color: var(--sky); }
.art-die { background: var(--coral-soft); color: var(--coral-dark); }
.art-das { background: var(--meadow-soft); color: var(--meadow); }
.toolbar { display: flex; flex-direction: column; gap: 10px; }
.search {
  display: flex; align-items: center; gap: 8px; max-width: 420px; min-height: 46px; padding: 0 14px;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-pill);
}
.search:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px hsla(174, 80%, 30%, 0.14); }
.search input { border: none; outline: none; flex: 1; min-width: 0; background: transparent; font-size: 1rem; }
.word-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.word-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 12px 14px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 6px;
}
.word-card.known { background: linear-gradient(180deg, #fff, hsl(150, 50%, 97%)); border-color: hsl(150, 40%, 80%); }
.wc-top { display: flex; align-items: center; gap: 8px; }
.code { font-size: 0.76rem; font-weight: 800; padding: 2px 8px; border-radius: 6px; background: var(--teal-soft); color: var(--teal-dark); }
.code.b { background: var(--coral-soft); color: var(--coral-dark); }
.past-pill { font-size: 0.74rem; font-weight: 800; padding: 2px 8px; border-radius: 6px; background: var(--sun-soft); color: var(--sun-ink); }
.dots { display: inline-flex; gap: 3px; margin-left: auto; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.dots i.on { background: var(--teal); }
.star-btn {
  width: 40px; height: 40px; border-radius: 12px; font-size: 1.15rem; color: var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border);
}
.star-btn.on { color: var(--sun); background: var(--sun-soft); border-color: hsl(42, 90%, 72%); }
.wc-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wc-en { font-family: var(--font-display); font-size: 1.22rem; font-weight: 800; }
.wc-de { font-weight: 700; font-size: 1.02rem; }
.wc-de small { font-weight: 600; color: var(--ink-muted); font-size: 0.82rem; }
.wc-hu { font-weight: 700; color: var(--meadow); font-size: 0.95rem; }
.wc-more { border-top: 1px dashed var(--border); padding-top: 6px; font-size: 0.9rem; }
.wc-more summary { cursor: pointer; font-weight: 800; color: var(--teal-dark); min-height: 32px; display: flex; align-items: center; list-style: none; }
.wc-more summary::-webkit-details-marker { display: none; }
.wc-more summary::before { content: "▸"; margin-right: 6px; transition: transform 0.15s; }
.wc-more[open] summary::before { transform: rotate(90deg); }
.wc-more p { margin-top: 4px; }
.wc-more .ex b { color: var(--ink-muted); font-size: 0.78rem; margin-right: 4px; }

/* ==================== PRACTICE ==================== */
.pick { display: flex; flex-direction: column; gap: 8px; }
.pick-lbl { font-weight: 800; font-size: 0.9rem; color: var(--ink-soft); margin-top: 6px; }
.activity-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.activity {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  padding: 18px; border-radius: var(--r-lg); border: 1px solid var(--border); box-shadow: var(--shadow-md);
  background: var(--surface); transition: transform 0.15s, box-shadow 0.15s; min-height: 132px;
}
.activity:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.activity b { font-family: var(--font-display); font-size: 1.25rem; }
.activity span:last-child { color: var(--ink-soft); font-size: 0.92rem; }
.act-ico { font-size: 2rem; line-height: 1; margin-bottom: 4px; }
.a-flash { background: linear-gradient(160deg, #fff 40%, var(--sky-soft)); }
.a-write { background: linear-gradient(160deg, #fff 40%, var(--sun-soft)); }
.a-mem { background: linear-gradient(160deg, #fff 40%, var(--meadow-soft)); }

.mission-banner {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px;
  background: var(--ink); color: #fff; border-radius: var(--r-md); box-shadow: var(--shadow-md);
}
.mb-day { background: var(--sun); color: var(--ink); font-family: var(--font-display); font-weight: 800; border-radius: 10px; padding: 2px 10px; white-space: nowrap; }
.mb-txt { flex: 1; font-size: 0.92rem; min-width: 0; }
.mb-hu { opacity: 0.8; }
.mb-x { width: 40px; height: 40px; border-radius: 50%; color: #fff; font-size: 1rem; flex-shrink: 0; }
.mb-x:hover { background: rgba(255, 255, 255, 0.12); }

.arena {
  max-width: 640px; margin-left: auto; margin-right: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-md); padding: 16px 18px 20px;
}
.arena.wide { max-width: 760px; }
.arena > * + * { margin-top: 14px; }
.sess-top { display: flex; align-items: center; gap: 10px; }
.sess-label { font-weight: 800; font-size: 0.92rem; white-space: nowrap; }
.sess-count { font-weight: 800; font-size: 0.86rem; color: var(--ink-muted); }
.progress { flex: 1; height: 10px; border-radius: 99px; background: var(--bg-warm); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--teal), hsl(160, 60%, 48%)); transition: width 0.35s ease; }

.flip { display: block; width: 100%; perspective: 1100px; min-height: 250px; text-align: center; }
.flip-inner { position: relative; display: block; min-height: 250px; transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1); transform-style: preserve-3d; }
.flip.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 20px; border-radius: var(--r-md); border: 2px solid var(--border);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.flip-face.front { background: linear-gradient(160deg, #fff, var(--tint)); }
.flip-face.back { background: linear-gradient(160deg, #fff, var(--sun-soft)); transform: rotateY(180deg); }
.dir-tag { display: inline-block; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.06em; color: var(--teal-dark); background: var(--teal-soft); padding: 2px 10px; border-radius: var(--r-pill); }
.fc-word { font-family: var(--font-display); font-size: clamp(1.7rem, 6vw, 2.3rem); font-weight: 800; line-height: 1.15; }
.fc-word.sm { font-size: clamp(1.3rem, 5vw, 1.7rem); }
.fc-de { font-size: 1.25rem; font-weight: 800; }
.fc-extra { font-size: 0.86rem; color: var(--ink-muted); }
.fc-ex { font-size: 0.9rem; color: var(--ink-soft); max-width: 46ch; }
.fc-hint { font-size: 0.86rem; color: var(--ink-muted); }
.fc-hu { color: var(--meadow); font-weight: 700; }
.grade-row .btn { flex: 1 1 140px; min-height: 52px; }

.prompt { text-align: center; padding: 18px 14px; background: var(--tint); border-radius: var(--r-md); }
.prompt.paper { background: #fff repeating-linear-gradient(180deg, transparent 0 31px, hsl(205, 40%, 92%) 31px 32px); border: 1px solid var(--border); }
.prompt-word { font-family: var(--font-display); font-size: clamp(1.6rem, 6vw, 2.1rem); font-weight: 800; margin: 6px 0 2px; line-height: 1.15; }
.prompt-ask { font-weight: 700; color: var(--ink-soft); font-size: 0.92rem; }
.prompt-hu { color: var(--meadow); font-weight: 700; margin-top: 4px; font-size: 0.9rem; }
.answer-form > * + * { margin-top: 10px; }
.answer {
  width: 100%; min-height: 54px; padding: 10px 16px; font-size: 1.2rem; font-weight: 700; text-align: center;
  border: 2px solid var(--border-strong); border-radius: var(--r-md); background: #fff; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.answer:focus { border-color: var(--teal); box-shadow: 0 0 0 4px hsla(174, 80%, 30%, 0.14); }
.answer:disabled { background: var(--bg); color: var(--ink-soft); }
.key-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.key {
  min-width: 44px; min-height: 44px; padding: 0 10px; border-radius: 12px; background: var(--bg-warm);
  border: 1px solid var(--border-strong); box-shadow: 0 2px 0 var(--border-strong); font-weight: 800; font-size: 1rem;
}
.key:active { transform: translateY(2px); box-shadow: none; }

.feedback { padding: 12px 14px; border-radius: var(--r-md); border: 1.5px solid; animation: popIn 0.2s ease; }
.feedback > * + * { margin-top: 5px; }
.feedback.correct { background: var(--meadow-soft); border-color: hsl(150, 45%, 70%); color: hsl(150, 70%, 18%); }
.feedback.almost { background: var(--sun-soft); border-color: hsl(42, 90%, 70%); color: hsl(32, 80%, 24%); }
.feedback.wrong { background: var(--coral-soft); border-color: hsl(8, 75%, 80%); color: hsl(8, 65%, 30%); animation: shake 0.35s ease; }
.feedback.small { font-size: 0.9rem; }
.fb-head { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; }
.fb-you span { text-decoration: line-through; text-decoration-thickness: 2px; }
.fb-notes { margin: 4px 0 0; padding-left: 20px; }
.fb-tip { font-size: 0.88rem; opacity: 0.9; }
.model { margin-top: 6px; }

.mem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
@media (min-width: 600px) { .mem-grid { grid-template-columns: repeat(4, 1fr); } }
.mem {
  min-height: 92px; padding: 8px; border-radius: var(--r-md); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: linear-gradient(145deg, var(--teal), hsl(186, 70%, 36%)); color: #fff; box-shadow: var(--shadow-btn);
  font-weight: 800; font-size: 0.92rem; line-height: 1.2; text-align: center; word-break: break-word;
}
.mem-back { font-size: 1.7rem; opacity: 0.85; }
.mem.open { background: #fff; color: var(--ink); border: 2px solid var(--teal); animation: flipIn 0.22s ease-out; }
.mem.found { background: var(--meadow-soft); border: 2px solid var(--meadow); color: hsl(150, 70%, 20%); }
.mem-lang { font-size: 0.66rem; letter-spacing: 0.08em; color: var(--ink-muted); }

.step-done { text-align: center; padding: 8px 4px; display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.sd-stars .star { font-size: 2.2rem; }
.sd-stars .star.on { animation: stickerPop 0.5s ease both; }
.sd-stars .star.on:nth-child(2) { animation-delay: 0.12s; }
.sd-stars .star.on:nth-child(3) { animation-delay: 0.24s; }
.xp-mini { font-size: 0.9rem; color: var(--sun-ink); background: var(--sun-soft); padding: 2px 8px; border-radius: 99px; vertical-align: middle; }
.review-list { text-align: left; background: var(--bg); border-radius: var(--r-md); padding: 12px 14px; }
.review-list h3 { font-size: 1rem; margin-bottom: 4px; }
.review-list ul { margin: 0; padding-left: 18px; }

/* ==================== TEST ==================== */
.test-intro > * + * { margin-top: 14px; }
.opt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.opt-lbl { font-weight: 800; min-width: 130px; }
.rules { margin: 0; padding-left: 20px; color: var(--ink-soft); font-size: 0.94rem; }
.rules li + li { margin-top: 4px; }
.hist { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.hist th { text-align: left; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-muted); padding: 6px 8px; border-bottom: 1px solid #dadce0; }
.hist td { padding: 8px; border-bottom: 1px solid #dadce0; font-weight: 700; }
.hist tr.best td:first-child::after { content: " 🏆"; }
.grade-chip { display: inline-block; min-width: 44px; text-align: center; padding: 2px 8px; border-radius: 8px; font-weight: 800; }
.g6 .rh-grade b, .grade-chip.g6 { background: var(--meadow); color: #fff; }
.grade-chip.g5 { background: hsl(160, 55%, 45%); color: #fff; }
.grade-chip.g4 { background: var(--sun); color: var(--ink); }
.grade-chip.g3, .grade-chip.g2, .grade-chip.g1 { background: var(--coral); color: #fff; }
.result-hero {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  background: linear-gradient(135deg, #fff, var(--tint));
}
.rh-score { display: flex; align-items: baseline; gap: 8px; }
.rh-pts { font-family: var(--font-display); font-size: 3.2rem; font-weight: 800; line-height: 1; }
.rh-max { font-weight: 700; color: var(--ink-muted); }
.rh-grade { grid-row: span 2; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 96px; height: 96px; border-radius: 24px; background: var(--ink); color: #fff; box-shadow: var(--shadow-md); }
.rh-grade span { font-size: 0.76rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8; }
.rh-grade b { font-family: var(--font-display); font-size: 2.2rem; line-height: 1; }
.g6 .rh-grade, .g5 .rh-grade { background: var(--meadow); }
.g4 .rh-grade { background: var(--sun); color: var(--ink); }
.g3 .rh-grade, .g2 .rh-grade, .g1 .rh-grade { background: var(--coral); }
.rh-msg { font-weight: 700; }
.result-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rl { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg); }
.rl-mark { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; }
.rl.correct .rl-mark { background: var(--meadow); }
.rl.almost .rl-mark { background: var(--sun); color: var(--ink); }
.rl.wrong .rl-mark { background: var(--coral); }
.rl.wrong { background: var(--coral-soft); }
.rl.almost { background: var(--sun-soft); }
.rl-body { min-width: 0; }
.rl-you span { text-decoration: line-through; color: var(--coral-dark); font-weight: 700; }
.rl.almost .rl-you span { color: var(--sun-ink); }
.rl-note { font-size: 0.86rem; color: var(--ink-soft); margin-top: 2px; }

/* ==================== GRAMMAR ==================== */
.rule-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 760px) { .rule-grid { grid-template-columns: 1fr 1fr; } .hu-card { grid-column: 1 / -1; } }
.rule { box-shadow: var(--shadow-sm); }
.rule p { font-size: 0.98rem; }
.rule-lbl { font-size: 0.76rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; color: var(--teal-dark); margin-bottom: 6px; }
.hu-card { background: var(--meadow-soft); border-color: hsl(150, 40%, 80%); }
.hu-card .rule-lbl { color: var(--meadow); }
.example { padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg); }
.example + .example { margin-top: 8px; }
.example > div + div { margin-top: 3px; }
.q-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.q-list { display: grid; gap: 12px; }
.q { box-shadow: var(--shadow-sm); padding: 14px 16px; }
.q > * + * { margin-top: 8px; }
.q-text { font-weight: 800; font-size: 1.02rem; }
.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opt-grid.one { grid-template-columns: 1fr; }
@media (min-width: 640px) { .opt-grid.three { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 639px) { .opt-grid.three { grid-template-columns: 1fr; } }
.opt-btn {
  min-height: 48px; padding: 10px 14px; border-radius: var(--r-sm); text-align: left;
  border: 1.5px solid var(--border-strong); background: #fff; font-weight: 700; box-shadow: 0 2px 0 var(--border);
  transition: border-color 0.15s, background 0.15s;
}
.opt-btn small { font-weight: 600; color: var(--ink-muted); }
.opt-btn:hover:not(:disabled) { border-color: var(--teal); background: var(--tint); }
.opt-btn.correct { background: var(--meadow-soft); border-color: var(--meadow); color: hsl(150, 70%, 20%); }
.opt-btn.incorrect { background: var(--coral-soft); border-color: var(--coral); color: hsl(8, 65%, 32%); }
.opt-btn:disabled:not(.correct):not(.incorrect) { opacity: 0.6; }

.sentence > * + * { margin-top: 12px; }
.sent-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sent-help { padding: 10px 12px; border-radius: var(--r-sm); background: var(--tint); font-weight: 600; }
.drop { min-height: 64px; padding: 10px; border: 2px dashed var(--border-strong); border-radius: var(--r-md); background: var(--bg); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pool { display: flex; flex-wrap: wrap; gap: 8px; }
.tile { min-height: 44px; padding: 0 14px; border-radius: 12px; background: #fff; border: 1.5px solid var(--border-strong); box-shadow: 0 3px 0 var(--border-strong); font-weight: 800; animation: popIn 0.18s ease; }
.tile:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--border-strong); }
.tile.placed { background: var(--teal-soft); border-color: var(--teal); box-shadow: 0 3px 0 hsla(174, 80%, 30%, 0.4); }

/* ==================== ANIMALS ==================== */
.hint-bar { padding: 10px 14px; border-radius: var(--r-md); background: var(--sun-soft); color: var(--sun-ink); font-weight: 700; }
.animal-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.animal-strip::-webkit-scrollbar { display: none; }
.animal-chip {
  flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 88px; padding: 6px 4px 8px;
  border-radius: var(--r-md); background: var(--surface); border: 2px solid var(--border); font-size: 0.74rem; font-weight: 800; line-height: 1.1; text-align: center;
}
.chip-img { width: 52px; height: 52px; object-fit: contain; }
.animal-chip.active { border-color: var(--teal); background: var(--tint); }
.animal-chip.quizzed::after { content: "✓"; font-size: 0.7rem; color: var(--meadow); }
.animal-card { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 820px) { .animal-card { grid-template-columns: 300px 1fr; align-items: start; } }
.ac-img {
  aspect-ratio: 1 / 1; max-width: 300px; margin: 0 auto; padding: 18px; border-radius: var(--r-lg);
  background: radial-gradient(circle at 50% 40%, #fff 0%, var(--tint) 70%);
}
.ac-img .stk { animation: swimFloat 5s ease-in-out infinite; }
.wow { margin-top: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--sun-soft); border: 1px solid hsl(42, 85%, 78%); }
.wow > div { margin-top: 4px; }
.ac-info > * + * { margin-top: 8px; }
.badge { display: inline-block; font-size: 0.76rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 10px; border-radius: var(--r-pill); background: var(--coral-soft); color: var(--coral-dark); }
.ac-names { font-weight: 700; }
.facts { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 560px) { .facts { grid-template-columns: 1fr 1fr; } }
.fact { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg); border: 1px solid var(--border); font-size: 0.94rem; }
.fact-lbl { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--teal-dark); }
.quiz { border-top: 1px dashed var(--border); padding-top: 12px; }
.quiz > * + * { margin-top: 8px; }

.trumps-intro { text-align: center; }
.trumps-intro > * + * { margin-top: 10px; }
.big-score { font-family: var(--font-display); font-size: 3rem; font-weight: 800; }
.trumps > * + * { margin-top: 14px; }
.tr-score { display: flex; justify-content: space-between; font-weight: 800; color: var(--ink-soft); }
.tr-table { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.tr-who { text-align: center; font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-muted); margin-bottom: 4px; }
.tr-vs { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--coral); }
.tcard {
  background: linear-gradient(170deg, #fff 55%, var(--sun-soft)); border: 3px solid var(--sun); border-radius: var(--r-md);
  padding: 10px; box-shadow: var(--shadow-md); animation: flipIn 0.3s ease-out; min-height: 250px;
}
.tcard.hidden { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: linear-gradient(145deg, var(--teal), hsl(186, 70%, 36%)); border-color: var(--teal-dark); color: #fff; font-family: var(--font-display); font-size: 2rem; font-weight: 800; }
.tc-back { font-size: 2.4rem; }
.tc-img { height: 92px; }
.tc-name { text-align: center; font-family: var(--font-display); font-weight: 800; font-size: 1rem; line-height: 1.1; margin: 4px 0 6px; }
.tc-stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.tc-stats li { display: flex; justify-content: space-between; gap: 6px; font-size: 0.8rem; padding: 4px 6px; border-radius: 8px; background: rgba(255, 255, 255, 0.75); }
.tc-stats li b { white-space: nowrap; }
.tc-stats li.hl { background: var(--ink); color: #fff; }
@media (max-width: 420px) { .tc-stats li span { font-size: 0.72rem; } .tcard { padding: 8px 6px; } }
.tr-result { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; text-align: center; margin-bottom: 8px; }
.tr-result.win { color: var(--meadow); }
.tr-result.lose { color: var(--coral-dark); }
.tr-result.draw { color: var(--sun-ink); }
.gram-sent { font-size: 1.1rem; font-weight: 700; margin: 8px 0; }
.blank { display: inline-block; min-width: 96px; border-bottom: 3px solid var(--teal); text-align: center; color: var(--teal-dark); }

.chat-card > * + * { margin-top: 12px; }
.chat-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.chat { display: flex; flex-direction: column; gap: 12px; }
.bubble-row { display: flex; flex-direction: column; max-width: 88%; animation: popIn 0.22s ease; }
.bubble-row.mia { align-self: flex-end; align-items: flex-end; }
.who { font-size: 0.76rem; font-weight: 800; color: var(--ink-muted); margin: 0 8px 3px; }
.bubble { padding: 11px 14px; border-radius: 18px; background: var(--bg); border: 1px solid var(--border); }
.bubble-row.partner .bubble { border-bottom-left-radius: 6px; }
.bubble-row.mia .bubble { background: var(--teal-soft); border-color: hsl(172, 45%, 78%); border-bottom-right-radius: 6px; }
.bubble-sub { font-size: 0.86rem; color: var(--ink-soft); margin-top: 6px; padding-top: 6px; border-top: 1px dashed rgba(18, 44, 60, 0.14); }
.bubble-sub.hu-only { color: var(--meadow); }
.your-turn { padding: 14px; border-radius: var(--r-md); background: var(--tint); border: 2px solid var(--teal); }
.your-turn > * + * { margin-top: 8px; }
.yt-lbl { font-weight: 800; color: var(--teal-dark); }
.talk-lines { margin: 10px 0; padding-left: 22px; line-height: 1.7; }

.print-card > * + * { margin-top: 10px; }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.dl {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 64px; border-radius: var(--r-md);
  background: var(--bg); border: 1.5px solid var(--border); text-decoration: none; color: var(--ink); transition: border-color 0.15s, transform 0.15s;
}
.dl:hover { border-color: var(--teal); transform: translateY(-2px); }
.dl-ico { font-size: 1.6rem; }
.dl-txt { flex: 1; display: flex; flex-direction: column; }
.dl-txt .hu-only { color: var(--meadow); }
.dl-arrow { font-weight: 800; color: var(--teal-dark); font-size: 1.2rem; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.media-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.yt-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; background: #0f172a; overflow: hidden; }
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.yt-thumb:hover img { transform: scale(1.04); }
.play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 50%; background: rgba(239, 90, 70, 0.95); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); }
.mc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.mc-body h3 { font-size: 1.02rem; }
.mc-src { font-size: 0.74rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--coral-dark); }
.mc-body .btn-row { margin-top: auto; padding-top: 4px; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; }
.tag { font-size: 0.74rem; font-weight: 800; color: var(--teal-dark); background: var(--tint); padding: 2px 8px; border-radius: 99px; }
.tip-card { background: var(--tint); box-shadow: none; }

/* ==================== MODALS / TOAST / CONFETTI ==================== */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px));
  background: rgba(14, 30, 44, 0.62); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  animation: popIn 0.2s ease;
}
.modal-box {
  position: relative; width: 100%; max-width: 460px; max-height: 100%; overflow-y: auto;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 22px 20px 20px;
}
.modal-box > * + * { margin-top: 12px; }
.modal-box h2 { text-align: center; }
.modal-box.video { max-width: 860px; padding: 0; overflow: hidden; }
.modal-x { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 50%; font-size: 1.05rem; color: var(--ink-muted); z-index: 2; }
.modal-x:hover { background: var(--bg-warm); }
.ob-stickers { display: flex; justify-content: center; gap: 4px; }
.ob-stickers .stk { width: 84px; height: 84px; }
.ob-stickers .stk:nth-child(2) { transform: translateY(-8px) scale(1.1); }
.ob-steps { margin: 0; padding-left: 22px; }
.ob-steps li + li { margin-top: 6px; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 16px; margin-top: 0 !important; }
.sticker-big { position: relative; width: 190px; height: 190px; margin: 4px auto 0; }
.sticker-big.pop .stk { animation: stickerPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.sticker-big.locked .stk { filter: grayscale(1) brightness(0.45); opacity: 0.2; }
.big-stars .star { font-size: 2rem; }
.wow.small { font-size: 0.9rem; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 22px + env(safe-area-inset-bottom, 0px)); z-index: 120;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; font-weight: 700; padding: 10px 16px; border-radius: var(--r-pill);
  box-shadow: var(--shadow-lg); transition: opacity 0.2s, transform 0.2s; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { .toast { bottom: 28px; } }

.confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 150; overflow: hidden; }
.confetti-layer i { position: absolute; top: 0; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }

.app-footer { max-width: 1080px; margin: 8px auto 0; padding: 16px; text-align: center; font-size: 0.8rem; color: var(--ink-muted); }

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .flip-inner { transition: none; }
}

@media (max-width: 400px) {
  .station { width: 108px; }
  .st-badge { width: 58px; height: 58px; }
  .st-lbl { font-size: 0.74rem; }
}
