/* 01-base.css */
/* ---------- Alap: a CalendR színvilága és üvegfelületei ---------- */
:root {
  --text: #101322;
  --muted: #687086;
  --ink: #3a4156;
  --s1: #1e3a8a; --s2: #3b5bdb; --s3: #7c3aed; --s4: #a855f7;
  --s-glow: rgba(105, 101, 220, .45);
  --ok: #10b981; --bad: #e11d48;
  --glass: rgba(255,255,255,.64);
  --glass-border: rgba(255,255,255,.88);
  --shadow: 0 18px 45px rgba(57, 65, 112, .09), 0 2px 8px rgba(57, 65, 112, .04), inset 0 1px 0 rgba(255,255,255,.95);
  --w: min(720px, calc(100vw - 40px));
  --spring: cubic-bezier(.2, 1.2, .35, 1);
}
:root[data-season="winter"] { --s1: #1e3a8a; --s2: #2563eb; --s3: #38bdf8; --s4: #a5b4fc; --s-glow: rgba(56, 140, 248, .5); }
:root[data-season="spring"] { --s1: #be185d; --s2: #ec4899; --s3: #a78bfa; --s4: #f9a8d4; --s-glow: rgba(236, 72, 153, .45); }
:root[data-season="summer"] { --s1: #047857; --s2: #10b981; --s3: #facc15; --s4: #34d399; --s-glow: rgba(16, 185, 129, .45); }
:root[data-season="autumn"] { --s1: #9a3412; --s2: #ea580c; --s3: #f59e0b; --s4: #dc2626; --s-glow: rgba(234, 88, 12, .45); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: #edf1ff;
}

.screen {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 5%, rgba(151, 196, 255, .38), transparent 28%),
    radial-gradient(circle at 96% 8%, rgba(248, 193, 225, .36), transparent 27%),
    radial-gradient(circle at 50% 100%, rgba(184, 205, 255, .30), transparent 34%),
    linear-gradient(145deg, #f8faff 0%, #f4f2fb 48%, #f8f9ff 100%);
}
/* lassan úszó, évszakos fényfoltok a háttérben */
.sky-deco i {
  position: absolute;
  width: 320px; height: 320px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .42;
  pointer-events: none;
  animation: deco-float 22s ease-in-out infinite alternate;
}
.sky-deco i:nth-child(1) { left: -120px; bottom: 60px; background: color-mix(in srgb, var(--s4) 60%, white); }
.sky-deco i:nth-child(2) { right: -110px; top: 240px; background: color-mix(in srgb, var(--s3) 45%, white); animation-delay: -7s; }
.sky-deco i:nth-child(3) { left: 40%; top: -160px; background: color-mix(in srgb, var(--s2) 30%, white); animation-delay: -13s; }
@keyframes deco-float { to { transform: translate(40px, -50px) scale(1.15); } }

.content {
  position: relative;
  z-index: 1;
  height: 100vh;
  overflow-y: auto;
  padding: 34px 20px calc(120px + env(safe-area-inset-bottom, 0px));
  scrollbar-width: none;
}
.content::-webkit-scrollbar { display: none; }

/* progresszív elmosás a felső sáv mögött (mint a CalendR-ben) */
.top-fade { position: fixed; top: 0; left: 0; right: 0; height: 112px; z-index: 5; pointer-events: none; }
.top-fade > div { position: absolute; inset: 0; }
.top-fade > div:nth-child(1) { backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); mask-image: linear-gradient(to top, transparent 0%, #000 30%); -webkit-mask-image: linear-gradient(to top, transparent 0%, #000 30%); }
.top-fade > div:nth-child(2) { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); mask-image: linear-gradient(to top, transparent 25%, #000 50%); -webkit-mask-image: linear-gradient(to top, transparent 25%, #000 50%); }
.top-fade > div:nth-child(3) { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); mask-image: linear-gradient(to top, transparent 45%, #000 70%); -webkit-mask-image: linear-gradient(to top, transparent 45%, #000 70%); }
.top-fade > div:nth-child(4) { backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); mask-image: linear-gradient(to top, transparent 60%, #000 85%); -webkit-mask-image: linear-gradient(to top, transparent 60%, #000 85%); }
.top-fade::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(248,250,255,0), rgba(248,250,255,.6)); }

/* értesítés: az alsó sáv helyén */
.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  width: var(--w);
  min-height: 64px;
  display: grid;
  place-items: center;
  padding: 10px 18px;
  border-radius: 22px;
  color: white;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(135deg, var(--s1), var(--s3));
  box-shadow: 0 16px 40px var(--s-glow);
  transform: translate(-50%, 140%);
  opacity: 0;
  transition: transform .45s var(--spring), opacity .3s ease;
  pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* 02-bars.css */
/* ---------- Felső sáv (a CalendR topbarja szerint) ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  width: var(--w);
  margin: 0 auto 20px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 48px 48px;
  gap: 0 10px;
  align-items: center;
  padding: 7px;
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  box-shadow: var(--shadow);
}

/* évszakos, forgó színátmenetű gomb – itt: Folytatás */
@property --add-angle { syntax: "<angle>"; inherits: true; initial-value: 0deg; }
@keyframes add-spin { to { --add-angle: 360deg; } }
.add {
  position: relative;
  width: 50px; height: 50px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 50%;
  color: white;
  background: conic-gradient(from var(--add-angle), var(--s1), var(--s2), var(--s3), var(--s4), var(--s2), var(--s1));
  animation: add-spin 6s linear infinite;
  box-shadow: 0 10px 22px var(--s-glow), inset 0 1px 1px rgba(255,255,255,.55), inset 0 -6px 12px rgba(0,0,0,.14);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.add::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: radial-gradient(circle at 32% 22%, rgba(255,255,255,.55), transparent 42%); pointer-events: none; }
.add:hover { transform: translateY(-2px) scale(1.06); }
.add:active { transform: scale(.92); }
.add-play { position: relative; z-index: 2; width: 22px; height: 22px; margin-left: 3px; fill: currentColor; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); transition: transform .45s cubic-bezier(.34,1.56,.64,1); }
.add:hover .add-play { transform: scale(1.15); }
.add-glow { position: absolute; inset: -6px; z-index: -1; border-radius: 50%; background: conic-gradient(var(--s1), var(--s3), var(--s4), var(--s2), var(--s1)); filter: blur(10px); opacity: .55; animation: add-breathe 3.2s ease-in-out infinite; pointer-events: none; }
@keyframes add-breathe { 0%,100% { transform: scale(.92) rotate(0); opacity: .45; } 50% { transform: scale(1.08) rotate(180deg); opacity: .75; } }
.add-orbit { position: absolute; inset: -7px; z-index: 3; border-radius: 50%; animation: add-orbit 7s linear infinite; pointer-events: none; }
.add-orbit i { position: absolute; top: 0; left: 50%; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: white; box-shadow: 0 0 8px 2px rgba(255,255,255,.9); }
:root[data-season="spring"] .add-orbit i { height: 9px; border-radius: 60% 60% 60% 0 / 70% 70% 30% 30%; background: #fbcfe8; box-shadow: 0 0 6px rgba(236,72,153,.7); }
:root[data-season="summer"] .add-orbit i { background: #fde68a; box-shadow: 0 0 10px 3px rgba(250,204,21,.85); }
:root[data-season="autumn"] .add-orbit i { width: 8px; height: 8px; border-radius: 0 70% 0 70%; background: linear-gradient(135deg, #fb923c, #b45309); }
@keyframes add-orbit { to { transform: rotate(360deg); } }

/* a sáv közepe: hol tartasz (a CalendR keresője helyén) */
.now {
  position: relative;
  min-width: 0;
  height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px 0 6px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 16px;
  background: rgba(245,246,252,.74);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.94);
  text-align: left;
  overflow: hidden;
  transition: background .2s ease, box-shadow .2s ease;
}
.now:hover { background: rgba(255,255,255,.92); box-shadow: 0 4px 14px rgba(57,65,112,.07), inset 0 1px 0 #fff; }
.now-art { width: 38px; height: 38px; flex: none; border-radius: 12px; overflow: hidden; background: color-mix(in srgb, var(--s3) 10%, white); }
.now-art svg { width: 100%; height: 100%; }
.now-txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.now-txt small { color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-txt b { color: var(--ink); font-size: 14px; font-weight: 760; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-bar { position: absolute; left: 10px; right: 10px; bottom: 5px; height: 3px; border-radius: 9px; background: color-mix(in srgb, var(--s3) 12%, transparent); overflow: hidden; }
.now-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--s2), var(--s3), var(--s4)); transition: width .6s var(--spring); }

.cal-btn {
  position: relative;
  width: 48px; height: 48px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.86);
  border-radius: 50%;
  color: #4b4f9e;
  background: rgba(245,246,252,.74);
  box-shadow: 0 6px 16px rgba(57,65,112,.08), inset 0 1px 0 rgba(255,255,255,.94);
  transition: transform .2s ease, background .2s ease;
  text-decoration: none;
}
.cal-btn:hover { background: #fff; }
.cal-btn:active { transform: scale(.94); }
.cal-btn svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.streak-btn svg { width: 28px; height: 28px; color: color-mix(in srgb, var(--s2) 80%, #f97316); }
.streak-btn.lit svg { animation: flame 1.6s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes flame { 0%,100% { transform: scale(1) rotate(-2deg); } 50% { transform: scale(1.08) rotate(2deg); } }
.streak-n, .dict-n {
  position: absolute;
  right: -3px; top: -3px;
  min-width: 19px; height: 19px;
  padding: 0 5px;
  display: grid; place-items: center;
  border-radius: 99px;
  color: white;
  font-size: 10.5px; font-weight: 800;
  background: linear-gradient(135deg, var(--s1), var(--s3));
  box-shadow: 0 3px 8px var(--s-glow);
}

.avatar {
  width: 48px; height: 48px;
  padding: 0;
  display: grid; place-items: center;
  border: 2px solid rgba(255,255,255,.68);
  border-radius: 50%;
  color: white;
  font-weight: 800; font-size: 16px;
  background: linear-gradient(145deg, var(--s1), var(--s3));
  box-shadow: 0 7px 18px rgba(24,28,58,.18);
  transition: transform .2s ease;
}
.avatar:active { transform: scale(.94); }

/* ---------- Alsó sáv (a CalendR bottombarja szerint) ---------- */
.bottombar {
  position: fixed;
  z-index: 38;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  width: var(--w);
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 50px;
  align-items: center;
  padding: 7px;
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
  transition: opacity .25s ease, transform .3s var(--spring);
}
body.in-lesson .bottombar { opacity: 0; pointer-events: none; transform: translate(-50%, 30px); }
.bb-menu { justify-self: start; }
.bb-dict { justify-self: end; }
.bb-brand { justify-self: center; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 0; border-radius: 14px; background: none; }
.bb-brand:hover { background: rgba(255,255,255,.55); }
.bb-logo { display: block; height: 24px; width: auto; user-select: none; -webkit-user-drag: none; }
.bb-en {
  padding: 4px 9px;
  border-radius: 99px;
  color: white;
  font-size: 11.5px; font-weight: 800; letter-spacing: .4px;
  background: linear-gradient(135deg, var(--s1), var(--s3));
  box-shadow: 0 4px 12px var(--s-glow);
}

@media (max-width: 560px) {
  :root { --w: calc(100vw - 24px); }
  .content { padding: 14px 12px calc(110px + env(safe-area-inset-bottom, 0px)); }
  .topbar { gap: 0 7px; grid-template-columns: 48px minmax(0, 1fr) 44px 44px; padding: 6px; border-radius: 20px; }
  .add { width: 48px; height: 48px; }
  .cal-btn, .avatar { width: 44px; height: 44px; }
  .bottombar { bottom: calc(10px + env(safe-area-inset-bottom, 0px)); padding: 6px; border-radius: 20px; grid-template-columns: 46px minmax(0, 1fr) 46px; }
  .bb-logo { height: 20px; }
}

/* 03-panels.css */
/* ---------- A középső rész: egymásra épülő panelek ----------
   Minden új panel alulról, rugósan, elmosásból élesedve „épül fel”; az illusztrációja vonalról vonalra rajzolódik ki.
   A már elvégzett panelek kissé összehúzódnak és elhalványulnak, így a figyelem mindig a legújabbon van. */
.stream {
  width: var(--w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel {
  position: relative;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 22px;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  box-shadow: 0 14px 34px rgba(64,72,115,.075), 0 2px 7px rgba(64,72,115,.035), inset 0 1px 0 rgba(255,255,255,.92);
  transform-origin: 50% 0;
  transition: opacity .5s ease, transform .5s var(--spring), filter .5s ease;
}
.panel.enter { animation: panel-in .7s var(--spring) both; }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(42px) scale(.94) rotateX(8deg); filter: blur(8px); }
  60%  { filter: blur(0); }
  to   { opacity: 1; transform: none; filter: none; }
}
.panel.past { opacity: .62; transform: scale(.985); }
.panel.past:hover { opacity: .9; }
.panel.leave { opacity: 0; transform: translateY(-20px) scale(.96); filter: blur(6px); }

/* a panel belső elemei is egymás után érkeznek */
.panel .rise { opacity: 0; transform: translateY(12px); animation: rise .55s var(--spring) forwards; animation-delay: calc(var(--i, 0) * 90ms + 180ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

.p-kicker { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 8px; color: color-mix(in srgb, var(--s1) 80%, black); font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.p-kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--s2), var(--s4)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--s3) 18%, transparent); }
.panel h1, .panel h2, .panel h3 { margin: 0 0 6px; letter-spacing: -.4px; line-height: 1.2; }
.panel h1 { font-size: 24px; font-weight: 800; }
.panel h2 { font-size: 19px; font-weight: 780; }
.panel h3 { font-size: 16px; font-weight: 760; }
.panel p { margin: 0 0 10px; color: #4b5368; font-size: 14.5px; line-height: 1.55; }
.muted { color: var(--muted) !important; }

/* illusztráció a panel tetején */
.art { position: relative; margin: -18px -18px 14px; height: 168px; border-radius: 22px 22px 0 0; overflow: hidden; background: linear-gradient(180deg, color-mix(in srgb, var(--s3) 14%, white), color-mix(in srgb, var(--s4) 10%, white)); }
.art svg { display: block; width: 100%; height: 100%; }
.art.small { height: 110px; }

/* gombok */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 15px;
  font-weight: 760; font-size: 15px;
  color: white;
  background: linear-gradient(135deg, var(--s1), var(--s3));
  box-shadow: 0 10px 22px var(--s-glow), inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform .25s var(--spring), box-shadow .2s ease, opacity .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.ghost { color: color-mix(in srgb, var(--s1) 85%, black); background: rgba(255,255,255,.75); border-color: color-mix(in srgb, var(--s3) 25%, transparent); box-shadow: 0 4px 12px rgba(57,65,112,.06); }
.btn.small { min-height: 36px; padding: 0 13px; font-size: 13px; border-radius: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.row.end { justify-content: flex-end; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border: 1px solid color-mix(in srgb, var(--s3) 22%, transparent);
  border-radius: 99px;
  background: color-mix(in srgb, var(--s3) 7%, white);
  color: color-mix(in srgb, var(--s1) 85%, black);
  font-size: 13px; font-weight: 650;
}
button.chip:hover { background: color-mix(in srgb, var(--s3) 14%, white); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }

/* hangszóró ikon */
.say { width: 30px; height: 30px; flex: none; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 50%; color: color-mix(in srgb, var(--s1) 85%, black); background: color-mix(in srgb, var(--s3) 12%, white); transition: transform .2s var(--spring); }
.say:hover { transform: scale(1.1); }
.say svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.say.playing { animation: ping 1s ease-in-out infinite; }
@keyframes ping { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--s3) 18%, transparent); } }

/* ---------- Kezdőlap: a Millbrook-út ---------- */
.hero h1 { font-size: 26px; }
.level-head { display: flex; align-items: baseline; gap: 10px; margin: 14px 4px 0; }
.level-head b { font-size: 13px; font-weight: 850; letter-spacing: .5px; padding: 4px 10px; border-radius: 99px; color: white; background: linear-gradient(135deg, var(--s1), var(--s3)); }
.level-head span { color: var(--muted); font-size: 13.5px; font-weight: 650; }

/* a sok fejezetkártya könnyített: nincs háttérszűrő és elmosásos érkezés (telefonon is gördülékeny maradjon) */
.unit-card { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(255,255,255,.8); }
.unit-card.enter { animation-name: card-in; }
@keyframes card-in { from { opacity: 0; transform: translateY(30px) scale(.96); } to { opacity: 1; transform: none; } }
.unit-card { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; padding: 12px; cursor: pointer; text-align: left; width: 100%; color: inherit; transition: transform .3s var(--spring), background .2s ease, opacity .5s ease, filter .5s ease; }
.unit-card:hover { transform: translateY(-3px); background: rgba(255,255,255,.86); }
.unit-card .art { margin: 0; height: 92px; border-radius: 16px; }
.unit-card h3 { margin-bottom: 3px; }
.unit-card p { margin: 0; font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.unit-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--muted); font-size: 11.5px; font-weight: 700; }
.ring { --p: 0; width: 22px; height: 22px; border-radius: 50%; background: conic-gradient(var(--s3) calc(var(--p) * 1%), color-mix(in srgb, var(--s3) 14%, transparent) 0); -webkit-mask: radial-gradient(circle, transparent 6px, #000 7px); mask: radial-gradient(circle, transparent 6px, #000 7px); }
.unit-card.locked { filter: saturate(.3); opacity: .7; }
.unit-card.current { box-shadow: 0 0 0 2px color-mix(in srgb, var(--s3) 45%, transparent), 0 16px 36px var(--s-glow); }

.lesson-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; text-align: left; color: inherit; border: 1px solid rgba(255,255,255,.82); border-radius: 18px; background: rgba(255,255,255,.66); transition: transform .25s var(--spring), background .2s; }
.lesson-row:hover { transform: translateX(4px); background: #fff; }
.lesson-row .n { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 12px; font-weight: 800; color: color-mix(in srgb, var(--s1) 85%, black); background: color-mix(in srgb, var(--s3) 12%, white); }
.lesson-row.done .n { color: white; background: linear-gradient(135deg, var(--s1), var(--s3)); }
.lesson-row b { display: block; font-size: 15px; }
.lesson-row small { color: var(--muted); font-size: 12.5px; }
.lessons { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Lecke: jelenet ---------- */
.setting { padding: 10px 12px; margin-bottom: 12px; border-radius: 14px; background: color-mix(in srgb, var(--s3) 7%, white); color: #4b5368; font-size: 13.5px; line-height: 1.5; font-style: italic; }
.dialogue { display: flex; flex-direction: column; gap: 9px; }
.bubble { position: relative; max-width: 86%; padding: 10px 13px; border-radius: 18px 18px 18px 6px; background: white; box-shadow: 0 6px 16px rgba(57,65,112,.07); animation: bubble-in .5s var(--spring) both; }
.bubble.me { align-self: flex-end; border-radius: 18px 18px 6px 18px; color: white; background: linear-gradient(135deg, var(--s1), var(--s3)); }
.bubble .who { display: block; margin-bottom: 2px; font-size: 11px; font-weight: 800; letter-spacing: .3px; color: color-mix(in srgb, var(--s1) 75%, black); }
.bubble.me .who { color: rgba(255,255,255,.8); }
.bubble .en { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; line-height: 1.45; font-weight: 550; }
.bubble.me .say { color: white; background: rgba(255,255,255,.2); }
.bubble .hu { display: none; margin-top: 4px; font-size: 13px; opacity: .72; }
.show-hu .bubble .hu, .show-hu .text-card .hu { display: block; }
@keyframes bubble-in { from { opacity: 0; transform: translateY(14px) scale(.9); } }
.typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; border-radius: 18px; background: white; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--s3) 60%, white); animation: dot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { transform: translateY(-5px); opacity: .5; } }
.text-card { margin-top: 10px; padding: 13px 14px; border-radius: 16px; background: rgba(255,255,255,.85); border: 1px solid color-mix(in srgb, var(--s3) 14%, transparent); font-size: 14.5px; line-height: 1.6; white-space: pre-line; }
.text-card .src { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: color-mix(in srgb, var(--s1) 75%, black); }
.text-card .hu { display: none; margin-top: 8px; padding-top: 8px; border-top: 1px dashed color-mix(in srgb, var(--s3) 25%, transparent); color: var(--muted); font-size: 13.5px; }
.text-card.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .5px; }

/* magyarázat */
.explain-main { font-size: 16px !important; color: var(--ink) !important; font-weight: 550; }
.explain-alt { margin-top: 10px; padding: 12px 14px; border-left: 4px solid var(--s3); border-radius: 4px 14px 14px 4px; background: color-mix(in srgb, var(--s3) 7%, white); color: #4b5368; font-size: 14px; line-height: 1.55; animation: rise .45s var(--spring) both; }

/* szókártyák: megfordulnak */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.flip { position: relative; height: 128px; perspective: 800px; border: 0; padding: 0; background: none; text-align: left; }
.flip .face { position: absolute; inset: 0; padding: 12px; border-radius: 16px; display: flex; flex-direction: column; justify-content: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .6s var(--spring); box-shadow: 0 8px 18px rgba(57,65,112,.08); }
.flip .front { background: linear-gradient(135deg, color-mix(in srgb, var(--s2) 12%, white), white); border: 1px solid color-mix(in srgb, var(--s3) 20%, transparent); }
.flip .front b { font-size: 17px; color: color-mix(in srgb, var(--s1) 80%, black); }
.flip .front small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.flip .back { transform: rotateY(180deg); color: white; background: linear-gradient(135deg, var(--s1), var(--s3)); }
.flip .back b { font-size: 14px; }
.flip .back span { margin-top: 5px; font-size: 12px; line-height: 1.4; opacity: .9; }
.flip.on .front { transform: rotateY(-180deg); }
.flip.on .back { transform: rotateY(0); }
.flip .say { position: absolute; right: 8px; top: 8px; }

/* záró panel: ünneplés */
.celebrate { text-align: center; overflow: hidden; }
.celebrate h1 { font-size: 28px; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px; animation: fall 2.4s ease-in forwards; }
@keyframes fall { to { transform: translateY(420px) rotate(540deg); opacity: 0; } }
.score { font-size: 46px; font-weight: 850; letter-spacing: -1px; background: linear-gradient(135deg, var(--s1), var(--s3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mystery { margin-top: 12px; padding: 14px; border-radius: 16px; color: #f8f4e8; background: linear-gradient(145deg, #2b2340, #4a3b2a); box-shadow: 0 12px 30px rgba(43,35,64,.3); text-align: left; font-size: 14px; line-height: 1.55; }
.mystery b { display: block; margin-bottom: 4px; color: #f3d38b; letter-spacing: .5px; font-size: 11.5px; text-transform: uppercase; }

/* profil, szótár */
.field { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; }
.field span { font-size: 12px; font-weight: 750; color: var(--muted); }
.input, textarea.input { width: 100%; min-height: 46px; padding: 11px 14px; border: 1px solid color-mix(in srgb, var(--s3) 22%, transparent); border-radius: 14px; background: rgba(255,255,255,.9); outline: 0; font-size: 15px; transition: border-color .2s, box-shadow .2s; }
.input:focus { border-color: color-mix(in srgb, var(--s3) 60%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--s3) 14%, transparent); }
textarea.input { min-height: 92px; resize: vertical; line-height: 1.5; }
.dict-row { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid color-mix(in srgb, var(--s3) 10%, transparent); }
.dict-row b { min-width: 0; flex: 1; }
.dict-row small { color: var(--muted); }
.stage { display: flex; gap: 3px; }
.stage i { width: 6px; height: 14px; border-radius: 3px; background: color-mix(in srgb, var(--s3) 15%, transparent); }
.stage i.on { background: linear-gradient(var(--s2), var(--s3)); }

/* 04-tasks.css */
/* ---------- Feladatok ---------- */
.task .q { margin: 2px 0 12px; font-size: 17px; font-weight: 720; color: var(--ink); line-height: 1.4; }
.task .prompt { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--s3) 7%, white); font-size: 16px; font-weight: 600; }
.task .prompt .who { font-size: 11px; font-weight: 800; color: color-mix(in srgb, var(--s1) 75%, black); }
.examples { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.ex { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; padding: 9px 12px; border-radius: 14px; background: rgba(255,255,255,.85); border: 1px solid color-mix(in srgb, var(--s3) 12%, transparent); }
.ex b { font-size: 14.5px; font-weight: 650; }
.ex span { grid-column: 2; color: var(--muted); font-size: 13px; }

.opts { display: flex; flex-direction: column; gap: 8px; }
.opt {
  position: relative;
  padding: 13px 15px;
  text-align: left;
  border: 1.5px solid color-mix(in srgb, var(--s3) 18%, transparent);
  border-radius: 15px;
  background: rgba(255,255,255,.88);
  font-size: 15px; font-weight: 600;
  transition: transform .2s var(--spring), border-color .2s, background .2s;
}
.opt:hover { transform: translateX(3px); border-color: color-mix(in srgb, var(--s3) 45%, transparent); }
.opt.right { border-color: var(--ok); background: #ecfdf5; animation: pop .45s var(--spring); }
.opt.wrong { border-color: var(--bad); background: #fff1f2; animation: shake .4s ease; }
.opt.dim { opacity: .5; }
.opts.locked .opt { pointer-events: none; }
@keyframes pop { 40% { transform: scale(1.03); } }
@keyframes shake { 20%,60% { transform: translateX(-6px); } 40%,80% { transform: translateX(6px); } }

/* összerakás: csempék */
.slot { min-height: 56px; display: flex; flex-wrap: wrap; gap: 7px; align-content: flex-start; padding: 9px; margin-bottom: 10px; border: 1.5px dashed color-mix(in srgb, var(--s3) 30%, transparent); border-radius: 16px; background: color-mix(in srgb, var(--s3) 4%, white); }
.tiles { display: flex; flex-wrap: wrap; gap: 7px; }
.tile { padding: 9px 13px; border: 1px solid color-mix(in srgb, var(--s3) 22%, transparent); border-radius: 12px; background: white; font-size: 15px; font-weight: 650; box-shadow: 0 3px 0 color-mix(in srgb, var(--s3) 18%, transparent); transition: transform .2s var(--spring), opacity .2s; animation: tile-in .35s var(--spring) both; }
.tile:hover { transform: translateY(-2px); }
.tile.used { opacity: .25; pointer-events: none; }
@keyframes tile-in { from { opacity: 0; transform: scale(.7); } }

/* párosítás */
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.match .col { display: flex; flex-direction: column; gap: 8px; }
.match .opt { text-align: center; padding: 11px 8px; font-size: 14px; }
.match .opt.sel { border-color: var(--s3); background: color-mix(in srgb, var(--s3) 10%, white); }
.match .opt.paired { opacity: .35; pointer-events: none; border-color: var(--ok); }

/* visszajelzés */
.fb { display: none; margin-top: 12px; padding: 12px 14px; border-radius: 15px; font-size: 14px; line-height: 1.5; animation: rise .4s var(--spring) both; }
.fb.show { display: block; }
.fb.ok { background: #ecfdf5; color: #065f46; }
.fb.no { background: #fff1f2; color: #9f1239; }
.fb b { display: block; margin-bottom: 2px; }
.fb .tag { display: inline-block; margin-top: 6px; padding: 3px 8px; border-radius: 99px; background: rgba(255,255,255,.7); font-size: 11.5px; font-weight: 700; }
.model { margin-top: 10px; padding: 12px 14px; border-radius: 15px; background: color-mix(in srgb, var(--s3) 8%, white); font-size: 14.5px; line-height: 1.55; white-space: pre-line; animation: rise .4s var(--spring) both; }
.model small { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: color-mix(in srgb, var(--s1) 75%, black); }
.criteria { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.criteria label { display: flex; gap: 9px; align-items: flex-start; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.8); font-size: 14px; cursor: pointer; }
.criteria input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--s3); }

.big-say { width: 74px; height: 74px; margin: 6px auto 12px; display: grid; place-items: center; border: 0; border-radius: 50%; color: white; background: linear-gradient(135deg, var(--s1), var(--s3)); box-shadow: 0 12px 26px var(--s-glow); transition: transform .25s var(--spring); }
.big-say:hover { transform: scale(1.06); }
.big-say svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.big-say.playing { animation: ping 1s infinite; }

/* lépésszámláló a lecke panelek fölött */
.step-dots { display: flex; gap: 5px; margin-bottom: 10px; }
.step-dots i { height: 5px; flex: 1; border-radius: 9px; background: color-mix(in srgb, var(--s3) 14%, transparent); }
.step-dots i.on { background: linear-gradient(90deg, var(--s2), var(--s3)); }

/* 05-art.css */
/* ---------- Vektoros illusztrációk: évszakos színek, kirajzolódó vonalak, élő mozgás ---------- */
:is(.art,.now-art) svg .c1 { fill: var(--s1); } :is(.art,.now-art) svg .c2 { fill: var(--s2); } :is(.art,.now-art) svg .c3 { fill: var(--s3); } :is(.art,.now-art) svg .c4 { fill: var(--s4); }
:is(.art,.now-art) svg .w  { fill: #fff; } .art svg .wa { fill: rgba(255,255,255,.75); }
:is(.art,.now-art) svg .hill1 { fill: color-mix(in srgb, var(--s2) 30%, white); }
:is(.art,.now-art) svg .hill2 { fill: color-mix(in srgb, var(--s1) 26%, white); }
:is(.art,.now-art) svg .hill3 { fill: color-mix(in srgb, var(--s3) 22%, white); }
:is(.art,.now-art) svg .sun   { fill: color-mix(in srgb, var(--s3) 70%, #fff3b0); }
:is(.art,.now-art) svg .ln { fill: none; stroke: color-mix(in srgb, var(--s1) 82%, black); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
:is(.art,.now-art) svg .ln.thin { stroke-width: 1.6; }
:is(.art,.now-art) svg .ln.light { stroke: #fff; }
:is(.art,.now-art) svg .fl { stroke: color-mix(in srgb, var(--s1) 82%, black); stroke-width: 2.4; stroke-linejoin: round; }

/* kirajzolódás: a vonalak „megrajzolódnak”, a kitöltések utána úsznak be */
:is(.art,.now-art) svg .ln, .art svg .fl { stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 1.6s ease-out forwards; animation-delay: calc(var(--d, 0) * 1s + .25s); }
:is(.art,.now-art) svg .pop { opacity: 0; transform-box: fill-box; transform-origin: 50% 100%; animation: pop-in .7s var(--spring) forwards; animation-delay: calc(var(--d, 0) * 1s + .9s); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.4) translateY(10px); } to { opacity: 1; transform: none; } }

/* folyamatos mozgások */
:is(.art,.now-art) svg .drift  { animation: drift 26s linear infinite; }
:is(.art,.now-art) svg .drift2 { animation: drift 38s linear infinite; animation-delay: -14s; }
@keyframes drift { from { transform: translateX(-120px); } to { transform: translateX(380px); } }
:is(.art,.now-art) svg .spin { transform-box: fill-box; transform-origin: center; animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
:is(.art,.now-art) svg .bob { transform-box: fill-box; transform-origin: center; animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px); } }
:is(.art,.now-art) svg .sway { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 4s ease-in-out infinite; }
@keyframes sway { 50% { transform: rotate(3deg); } }
:is(.art,.now-art) svg .steam { stroke-dasharray: 6 8; animation: steam 1.6s linear infinite; }
@keyframes steam { to { stroke-dashoffset: -28; } }
:is(.art,.now-art) svg .fly { animation: fly 9s ease-in-out infinite; }
@keyframes fly { 0% { transform: translate(-60px, 20px); } 50% { transform: translate(140px, -10px); } 100% { transform: translate(360px, 18px); } }
:is(.art,.now-art) svg .ride { animation: ride 7s linear infinite; }
@keyframes ride { from { transform: translateX(-180px); } to { transform: translateX(360px); } }
:is(.art,.now-art) svg .twinkle { transform-box: fill-box; transform-origin: center; animation: twinkle 2.4s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .3; transform: scale(.6); } }
:is(.art,.now-art) svg .wave { animation: wave 5s ease-in-out infinite alternate; }
@keyframes wave { to { transform: translateX(-24px); } }
:is(.art,.now-art) svg .tick { transform-box: view-box; transform-origin: 160px 80px; animation: spin 6s steps(60) infinite; }
:is(.art,.now-art) svg .tick2 { transform-box: view-box; transform-origin: 160px 80px; animation: spin 60s linear infinite; }

/* évszakos részecskék a jelenet fölött */
.art .fx i { position: absolute; top: -10px; width: 6px; height: 6px; border-radius: 50%; background: #fff; opacity: .9; animation: fx-fall linear infinite; }
:root[data-season="spring"] .art .fx i { width: 8px; height: 6px; border-radius: 80% 0 80% 0; background: #fbcfe8; }
:root[data-season="summer"] .art .fx i { background: #fde68a; box-shadow: 0 0 6px #facc15; animation-name: fx-rise; top: auto; bottom: -10px; }
:root[data-season="autumn"] .art .fx i { width: 8px; height: 8px; border-radius: 0 70% 0 70%; background: linear-gradient(135deg, #fb923c, #b45309); }
@keyframes fx-fall { to { transform: translateY(190px) translateX(30px) rotate(360deg); } }
@keyframes fx-rise { to { transform: translateY(-190px); opacity: 0; } }

.panel.past .art svg * { animation-play-state: paused; }
