/* ===========================================================
   Deutsch in 30 Tagen – styles
   =========================================================== */
:root {
  --bg: #fff8ec;
  --bg2: #fdf0d8;
  --card: #ffffff;
  --ink: #1f2a48;
  --ink2: #5a6480;
  --line: #ece3d2;
  --brand: #1f2a48;
  --gold: #ffc23c;
  --red: #e63946;
  --green: #22b573;
  --teal: #2ec4b6;
  --blue: #3a86ff;
  --purple: #9b5de5;
  --der: #2f6fed;
  --die: #e5386d;
  --das: #12a189;
  --pl: #8a5cf6;
  --ok-bg: #e5f8ee;
  --bad-bg: #fde8ea;
  --shadow: 0 6px 0 rgba(31, 42, 72, .08), 0 12px 30px rgba(31, 42, 72, .08);
  --shadow-sm: 0 3px 0 rgba(31, 42, 72, .08);
  --r: 20px;
  --font: 'Nunito', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --display: 'Fredoka', 'Nunito', system-ui, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #141a2e; --bg2: #1a2240; --card: #1f2847; --ink: #eef1fa; --ink2: #a9b2cf; --line: #2f3a62;
  --brand: #ffc23c; --ok-bg: #133d2e; --bad-bg: #4a1d27;
  --der: #6a9bff; --die: #ff6b98; --das: #3dd6bb; --pl: #b49aff;
  --shadow: 0 6px 0 rgba(0, 0, 0, .25), 0 12px 30px rgba(0, 0, 0, .25);
  --shadow-sm: 0 3px 0 rgba(0, 0, 0, .25);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141a2e; --bg2: #1a2240; --card: #1f2847; --ink: #eef1fa; --ink2: #a9b2cf; --line: #2f3a62;
    --brand: #ffc23c; --ok-bg: #133d2e; --bad-bg: #4a1d27;
    --der: #6a9bff; --die: #ff6b98; --das: #3dd6bb; --pl: #b49aff;
    --shadow: 0 6px 0 rgba(0, 0, 0, .25), 0 12px 30px rgba(0, 0, 0, .25);
    --shadow-sm: 0 3px 0 rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  line-height: 1.55; font-size: 16.5px; min-height: 100vh; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.2; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); }
h3 { font-size: 1.2rem; }
a { color: var(--blue); }
p { margin: 0 0 .8em; }
button { font: inherit; color: inherit; }
.noscript { padding: 2rem; text-align: center; }
.muted { color: var(--ink2); }
.center { text-align: center; }
.hidden { display: none !important; }

/* ---------- floating background ---------- */
.bg-shapes { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-shapes span { position: absolute; border-radius: 50%; opacity: .25; filter: blur(2px); animation: floaty 18s ease-in-out infinite; }
.bg-shapes span:nth-child(1) { width: 220px; height: 220px; background: var(--gold); top: 8%; left: -60px; }
.bg-shapes span:nth-child(2) { width: 140px; height: 140px; background: var(--red); top: 60%; left: 8%; animation-delay: -4s; opacity: .12; }
.bg-shapes span:nth-child(3) { width: 260px; height: 260px; background: var(--teal); top: 30%; right: -90px; animation-delay: -8s; opacity: .15; }
.bg-shapes span:nth-child(4) { width: 90px; height: 90px; background: var(--blue); bottom: 6%; right: 18%; animation-delay: -2s; opacity: .15; }
.bg-shapes span:nth-child(5) { width: 60px; height: 60px; background: var(--purple); top: 14%; right: 30%; animation-delay: -10s; opacity: .15; }
.bg-shapes span:nth-child(6) { width: 120px; height: 120px; background: var(--gold); bottom: -30px; left: 45%; animation-delay: -6s; opacity: .18; }
@keyframes floaty { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(30px, -40px) scale(1.08); } 66% { transform: translate(-20px, 25px) scale(.95); } }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; display: flex; align-items: center; gap: 16px;
  padding: 10px clamp(12px, 3vw, 28px); background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px); border-bottom: 2px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--display); font-size: 1.4rem; font-weight: 600; white-space: nowrap; }
.logo b { color: var(--red); }
.logo-flag { display: grid; grid-template-rows: repeat(3, 1fr); width: 30px; height: 22px; border-radius: 5px; overflow: hidden; box-shadow: var(--shadow-sm); transform: rotate(-6deg); transition: transform .3s; }
.logo:hover .logo-flag { transform: rotate(6deg) scale(1.1); }
.logo-flag i:nth-child(1) { background: #222; } .logo-flag i:nth-child(2) { background: #dd0000; } .logo-flag i:nth-child(3) { background: #ffce00; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { display: flex; align-items: center; gap: 6px; padding: 8px 12px; white-space: nowrap; border-radius: 14px; text-decoration: none; color: var(--ink2); font-weight: 700; transition: background .2s, color .2s, transform .2s; }
.nav a:hover { background: var(--bg2); color: var(--ink); transform: translateY(-1px); }
.nav a.active { background: var(--brand); color: var(--bg); }
.top-stats { display: flex; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; background: var(--card); border: 2px solid var(--line); font-weight: 800; white-space: nowrap; }
.pill.bump { animation: bump .5s; }
@keyframes bump { 40% { transform: scale(1.3); } }

@media (max-width: 1700px) { .nav .lbl { display: none; } .nav a { font-size: 1.25rem; padding: 8px 10px; } }
@media (max-width: 640px) {
  .topbar { padding-bottom: 8px; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .nav { position: fixed; bottom: 0; left: 0; right: 0; justify-content: space-around; background: var(--card); border-top: 2px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 60; }
  .top-stats { margin-left: auto; }
  body { padding-bottom: 70px; }
  .logo-text { font-size: 1.15rem; }
}

/* ---------- layout ---------- */
#app { max-width: 1120px; margin: 0 auto; padding: clamp(16px, 3vw, 32px) clamp(14px, 3vw, 28px) 80px; outline: none; }
.view { animation: viewIn .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.card { background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: clamp(16px, 2.5vw, 26px); box-shadow: var(--shadow); margin-bottom: 20px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 28px 0 12px; }
.section-title .badge-ico { font-size: 1.4rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  padding: 12px 20px; border-radius: 16px; font-weight: 800; font-size: 1rem; text-decoration: none;
  background: var(--blue); color: #fff; box-shadow: 0 4px 0 #1f5fcc; transition: transform .12s, box-shadow .12s, filter .2s;
  user-select: none;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #1f5fcc; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.green { background: var(--green); box-shadow: 0 4px 0 #168a56; }
.btn.red { background: var(--red); box-shadow: 0 4px 0 #a8242f; }
.btn.gold { background: var(--gold); color: #3b2a00; box-shadow: 0 4px 0 #d39a10; }
.btn.purple { background: var(--purple); box-shadow: 0 4px 0 #6f37b7; }
.btn.ghost { background: var(--card); color: var(--ink); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); }
.btn.big { padding: 16px 28px; font-size: 1.15rem; border-radius: 18px; }
.btn.small { padding: 8px 14px; font-size: .9rem; border-radius: 12px; }
.btn.tiny { padding: 5px 10px; font-size: .82rem; border-radius: 10px; box-shadow: 0 2px 0 var(--line); }
.btn.round { width: 46px; height: 46px; padding: 0; border-radius: 50%; font-size: 1.2rem; }
.btn.rec.listening { background: var(--red); box-shadow: 0 4px 0 #a8242f; animation: pulse 1s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(230, 57, 70, .5); } 100% { box-shadow: 0 0 0 18px rgba(230, 57, 70, 0); } }

.say-btn { border: 0; background: var(--bg2); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; flex: none; font-size: .95rem; transition: transform .15s, background .2s; }
.say-btn:hover { transform: scale(1.12); background: var(--gold); }
.say { border-bottom: 2px dotted var(--blue); cursor: pointer; transition: background .2s; border-radius: 4px; }
.say:hover { background: color-mix(in srgb, var(--gold) 35%, transparent); }
.saying { animation: saying .8s infinite; }
@keyframes saying { 50% { background: var(--gold); } }

/* ---------- characters ---------- */
svg.char { width: 120px; height: auto; overflow: visible; display: block; }
svg.char .char-inner { animation: bob 3.2s ease-in-out infinite; transform-origin: 100px 220px; }
svg.char .eyes { animation: blink 4.5s infinite; transform-box: fill-box; transform-origin: center; }
svg.char .m-open { display: none; transform-box: fill-box; transform-origin: center top; }
svg.char.talking .m-closed { display: none; }
svg.char.talking .m-open { display: inline; animation: talk .22s ease-in-out infinite alternate; }
svg.char.talking .head { animation: nod .9s ease-in-out infinite; transform-box: fill-box; transform-origin: center bottom; }
svg.char .arm { display: none; transform-origin: 148px 186px; }
svg.char.waving .arm { display: inline; animation: wave 1.4s ease-in-out infinite; }
svg.char.happy .char-inner { animation: jump .6s ease-in-out 3; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes talk { from { transform: scaleY(.35); } to { transform: scaleY(1.05); } }
@keyframes nod { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-2.5deg); } 70% { transform: rotate(2deg); } }
@keyframes wave { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-18deg); } 75% { transform: rotate(12deg); } }
@keyframes jump { 50% { transform: translateY(-18px); } }

.char-bubble { display: flex; gap: 16px; align-items: flex-end; margin: 10px 0 20px; }
.cb-char { flex: none; text-align: center; }
.cb-char svg.char { width: 110px; }
.cb-name { display: inline-block; font-weight: 800; font-size: .85rem; background: var(--bg2); padding: 2px 10px; border-radius: 999px; margin-top: 4px; }
.bubble { position: relative; background: var(--card); border: 2px solid var(--line); border-radius: 20px 20px 20px 6px; padding: 14px 18px; box-shadow: var(--shadow-sm); animation: popIn .5s cubic-bezier(.3, 1.6, .5, 1); flex: 1; }
.bubble::before { content: ''; position: absolute; left: -12px; bottom: 14px; border: 8px solid transparent; border-right-color: var(--line); border-bottom-color: var(--line); }
.b-de { font-weight: 800; font-size: 1.08rem; margin-bottom: .3em; }
.b-en { color: var(--ink2); font-size: .95rem; }
@keyframes popIn { from { opacity: 0; transform: scale(.85) translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: auto 1fr; gap: clamp(16px, 4vw, 40px); align-items: center; background: linear-gradient(135deg, #1f2a48, #33437a); color: #fff; border: 0; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -40px; top: -40px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 194, 60, .35), transparent 70%); }
.hero h1 { color: #fff; }
.hero h1 .flag-word { background: linear-gradient(90deg, #ffce00, #ff6b6b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: #d7ddf3; max-width: 60ch; }
.hero svg.char { width: clamp(130px, 18vw, 190px); }
.hero .bubble { color: var(--ink); max-width: 520px; margin-bottom: 14px; }
.hero .bubble .b-de { color: var(--ink); }
.hero .bubble .b-en { color: var(--ink2); }
@media (max-width: 640px) { .hero { grid-template-columns: 1fr; text-align: center; } .hero svg.char { margin: 0 auto; } .hero .row { justify-content: center; } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: var(--shadow-sm); display: flex; gap: 12px; align-items: center; animation: popIn .5s backwards; }
.stat:nth-child(2) { animation-delay: .08s; } .stat:nth-child(3) { animation-delay: .16s; } .stat:nth-child(4) { animation-delay: .24s; }
.stat .s-ico { font-size: 1.9rem; }
.stat b { display: block; font-family: var(--display); font-size: 1.6rem; line-height: 1; }
.stat span { color: var(--ink2); font-size: .85rem; font-weight: 700; }

.ring { --p: 0; width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--green) calc(var(--p) * 1%), var(--bg2) 0); transition: --p 1s; position: relative; flex: none; }
.ring::before { content: ''; position: absolute; inset: 12px; border-radius: 50%; background: var(--card); }
.ring span { position: relative; font-family: var(--display); font-size: 1.5rem; font-weight: 700; }

.week-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.week-card { border-radius: 18px; padding: 18px; color: #fff; position: relative; overflow: hidden; box-shadow: var(--shadow-sm); text-decoration: none; transition: transform .2s; }
.week-card:hover { transform: translateY(-4px) rotate(-.5deg); }
.week-card h3 { color: #fff; margin-bottom: 4px; }
.week-card p { margin: 0; opacity: .9; font-size: .92rem; }
.week-card .wk-bar { height: 8px; background: rgba(255, 255, 255, .3); border-radius: 99px; margin-top: 12px; overflow: hidden; }
.week-card .wk-bar i { display: block; height: 100%; background: #fff; border-radius: 99px; }
.wk1 { background: linear-gradient(135deg, #3a86ff, #5e60ce); }
.wk2 { background: linear-gradient(135deg, #12a189, #2ec4b6); }
.wk3 { background: linear-gradient(135deg, #e5386d, #ff7b54); }
.wk4 { background: linear-gradient(135deg, #8a5cf6, #c05ce0); }

.heat { display: grid; grid-template-columns: repeat(15, 1fr); gap: 5px; }
.heat i { aspect-ratio: 1; border-radius: 5px; background: var(--bg2); }
.heat i.l1 { background: #b8ebd0; } .heat i.l2 { background: #6fd3a0; } .heat i.l3 { background: #22b573; }

/* ---------- plan / roadmap ---------- */
.week-block { margin-bottom: 30px; }
.week-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: 18px; color: #fff; margin-bottom: 16px; }
.week-head h2 { color: #fff; margin: 0; font-size: 1.3rem; }
.week-head p { margin: 0; opacity: .9; font-size: .92rem; }
.path { display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; }
.node-wrap { display: flex; align-items: center; gap: 14px; width: min(560px, 100%); animation: popIn .5s backwards; }
.node { flex: none; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 1.5rem; text-decoration: none; color: #fff; border: 0; cursor: pointer; transition: transform .2s; position: relative; }
.node:hover { transform: scale(1.08); }
.node.available { background: var(--blue); box-shadow: 0 6px 0 #1f5fcc; animation: nodePulse 2s infinite; }
.node.done { background: var(--green); box-shadow: 0 6px 0 #168a56; }
.node.locked { background: #c9c2b3; box-shadow: 0 6px 0 #a39b8a; cursor: not-allowed; }
.node.review { background: var(--gold); color: #3b2a00; box-shadow: 0 6px 0 #d39a10; }
.node .chk { position: absolute; right: -4px; top: -4px; background: #fff; color: var(--green); width: 26px; height: 26px; border-radius: 50%; font-size: .9rem; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
@keyframes nodePulse { 0%, 100% { box-shadow: 0 6px 0 #1f5fcc, 0 0 0 0 rgba(58, 134, 255, .45); } 50% { box-shadow: 0 6px 0 #1f5fcc, 0 0 0 14px rgba(58, 134, 255, 0); } }
.node-info { flex: 1; background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 10px 16px; text-decoration: none; color: var(--ink); transition: transform .2s, border-color .2s; }
.node-info:hover { transform: translateX(4px); border-color: var(--blue); }
.node-info b { display: block; font-size: 1.02rem; }
.node-info small { color: var(--ink2); }
.node-wrap.locked .node-info { opacity: .6; }
.path-tag { display: inline-block; font-size: .72rem; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: var(--bg2); color: var(--ink2); margin-right: 6px; text-transform: uppercase; letter-spacing: .03em; }

/* ---------- day view ---------- */
.day-head { display: flex; gap: 20px; align-items: center; }
.day-num { flex: none; width: 82px; height: 82px; border-radius: 24px; background: var(--brand); color: var(--bg); display: grid; place-items: center; font-family: var(--display); line-height: 1; text-align: center; transform: rotate(-4deg); box-shadow: var(--shadow-sm); }
.day-num small { display: block; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; }
.day-num b { font-size: 2.1rem; }
.day-head h1 { margin: 0; }
.day-head .sub { color: var(--ink2); font-weight: 700; }
.steps { display: flex; gap: 6px; overflow-x: auto; padding: 6px 2px 10px; margin: 18px 0 8px; scrollbar-width: thin; }
.step { flex: 1 0 auto; display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 14px; background: var(--card); border: 2px solid var(--line); cursor: pointer; font-weight: 800; color: var(--ink2); text-decoration: none; white-space: nowrap; transition: all .2s; font-size: .92rem; }
.step:hover { border-color: var(--blue); color: var(--ink); }
.step.active { background: var(--brand); color: var(--bg); border-color: var(--brand); transform: translateY(-2px); }
.step.visited:not(.active) { border-color: var(--green); color: var(--green); }
.progress { height: 12px; border-radius: 99px; background: var(--bg2); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--green), var(--teal)); border-radius: 99px; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.step-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 26px; }

.goals { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.goals li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 14px; background: var(--bg2); font-weight: 600; animation: popIn .4s backwards; }
.goals li::before { content: '🎯'; }
.schedule { display: grid; gap: 8px; }
.sched-row { display: grid; grid-template-columns: 74px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--line); }
.sched-row .mins { font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: var(--blue); }
.sched-row small { color: var(--ink2); display: block; }
.timer { font-family: var(--display); font-size: 1.6rem; font-weight: 700; min-width: 90px; text-align: center; }

/* vocab */
.legend { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; font-weight: 800; }
.legend span { padding: 3px 10px; border-radius: 99px; color: #fff; }
.g-der { color: var(--der); } .g-die { color: var(--die); } .g-das { color: var(--das); } .g-pl { color: var(--pl); }
.bg-der { background: var(--der); } .bg-die { background: var(--die); } .bg-das { background: var(--das); } .bg-pl { background: var(--pl); } .bg-other { background: #7a8199; }
.vocab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.vcard { position: relative; background: var(--card); border: 2px solid var(--line); border-left-width: 8px; border-radius: 16px; padding: 12px 14px 12px 14px; transition: transform .2s, box-shadow .2s; animation: popIn .4s backwards; display: flex; gap: 10px; }
.vcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.vcard.der { border-left-color: var(--der); } .vcard.die { border-left-color: var(--die); } .vcard.das { border-left-color: var(--das); } .vcard.other { border-left-color: #b9bfd0; }
.vcard .v-main { flex: 1; min-width: 0; }
.vcard .v-de { font-weight: 800; font-size: 1.1rem; }
.vcard .v-de .art { font-weight: 800; }
.vcard .v-forms { font-size: .82rem; color: var(--ink2); }
.vcard .v-en { margin-top: 2px; }
.vcard .v-ex { font-size: .86rem; color: var(--ink2); margin-top: 6px; border-top: 1px dashed var(--line); padding-top: 6px; }
.vcard.playing { border-color: var(--gold); transform: scale(1.03); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 40%, transparent); }
.hide-en .v-en, .hide-en .v-ex, .hide-en .b-en, .hide-en .ex-en, .hide-en .ln-en { filter: blur(6px); transition: filter .2s; cursor: pointer; }
.hide-en .v-en:hover, .hide-en .v-ex:hover, .hide-en .ln-en:hover, .hide-en .ex-en:hover { filter: none; }

/* grammar */
.gram { font-size: 1.02rem; }
.gram h3 { margin-top: 1.4em; display: flex; align-items: center; gap: 8px; }
.gram h3::before { content: ''; width: 8px; height: 22px; background: var(--gold); border-radius: 4px; }
.gram h4 { margin-top: 1.1em; color: var(--ink2); }
.gram ul, .gram ol { padding-left: 1.3em; }
.gram li { margin-bottom: .35em; }
.gtable-wrap { overflow-x: auto; margin: 12px 0 16px; border-radius: 14px; border: 2px solid var(--line); }
.gtable { border-collapse: collapse; width: 100%; min-width: 360px; font-size: .97rem; }
.gtable th, .gtable td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.gtable th { background: var(--bg2); font-family: var(--display); font-weight: 600; }
.gtable tr:last-child td { border-bottom: 0; }
.gtable tr:hover td { background: color-mix(in srgb, var(--gold) 10%, transparent); }
.gtable td:first-child { font-weight: 700; }
.gtable b, .gram b.e { color: var(--red); }
.ex { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; padding: 8px 12px; border-radius: 12px; background: var(--bg2); margin: 6px 0; animation: popIn .35s backwards; }
.ex .say-btn { grid-row: span 2; background: var(--card); }
.ex-de { font-weight: 700; }
.ex-en { color: var(--ink2); font-size: .92rem; }
.ex-de b { color: var(--red); }
.rule, .tip, .warn, .note { border-radius: 14px; padding: 12px 16px 12px 52px; margin: 14px 0; position: relative; }
.rule::before, .tip::before, .warn::before, .note::before { position: absolute; left: 14px; top: 10px; font-size: 1.35rem; }
.rule { background: color-mix(in srgb, var(--blue) 12%, var(--card)); border: 2px solid color-mix(in srgb, var(--blue) 35%, transparent); }
.rule::before { content: '📏'; }
.tip { background: color-mix(in srgb, var(--gold) 18%, var(--card)); border: 2px solid color-mix(in srgb, var(--gold) 50%, transparent); }
.tip::before { content: '💡'; }
.warn { background: color-mix(in srgb, var(--red) 10%, var(--card)); border: 2px solid color-mix(in srgb, var(--red) 35%, transparent); }
.warn::before { content: '⚠️'; }
.note { background: color-mix(in srgb, var(--teal) 12%, var(--card)); border: 2px solid color-mix(in srgb, var(--teal) 35%, transparent); }
.note::before { content: '🧠'; }
.formula { font-family: var(--display); font-size: 1.1rem; background: var(--brand); color: var(--bg); padding: 10px 16px; border-radius: 14px; display: inline-block; margin: 6px 0; }
.slots { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.slots span { padding: 6px 12px; border-radius: 10px; background: var(--bg2); font-weight: 700; border: 2px solid var(--line); }
.slots span.v { background: var(--red); color: #fff; border-color: var(--red); }
.slots span.v2 { background: var(--purple); color: #fff; border-color: var(--purple); }
.slots span.s { background: var(--blue); color: #fff; border-color: var(--blue); }
.slots small { display: block; font-size: .7rem; opacity: .8; font-weight: 600; }
.gram-topic { border-top: 3px dashed var(--line); padding-top: 18px; margin-top: 18px; }
.gram-topic:first-child { border: 0; margin-top: 0; padding-top: 0; }
.level { display: inline-block; font-size: .75rem; font-weight: 800; padding: 2px 9px; border-radius: 99px; color: #fff; background: var(--teal); vertical-align: middle; }
.level.A2 { background: var(--blue); } .level.B1 { background: var(--purple); } .level.B2 { background: var(--red); }

/* grammar index */
.search { width: 100%; padding: 14px 18px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 1.05rem; }
.search:focus, input:focus, textarea:focus, select:focus { outline: 3px solid color-mix(in srgb, var(--blue) 45%, transparent); outline-offset: 1px; }
.letter { font-family: var(--display); font-size: 1.6rem; color: var(--red); margin: 18px 0 8px; }
.topic-card { display: block; padding: 14px 16px; border-radius: 16px; background: var(--card); border: 2px solid var(--line); text-decoration: none; color: var(--ink); transition: transform .15s, border-color .15s; }
.topic-card:hover { transform: translateY(-3px); border-color: var(--blue); }
.topic-card b { display: block; }
.topic-card small { color: var(--ink2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); cursor: pointer; font-weight: 800; color: var(--ink2); }
.chip.on { background: var(--brand); color: var(--bg); border-color: var(--brand); }

/* ---------- exercises ---------- */
.ex-shell { max-width: 760px; margin: 0 auto; }
.ex-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.ex-top { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding-bottom: 10px; }
.ex-top .progress { flex: 1; }
.coach { position: relative; flex: none; width: 70px; }
.coach svg.char { width: 70px; }
.coach-say { position: absolute; left: 62px; top: -4px; white-space: nowrap; background: var(--card); border: 2px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 4px 10px; font-weight: 800; font-size: .85rem; opacity: 0; transform: scale(.6); transform-origin: left bottom; transition: opacity .2s, transform .25s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none; z-index: 2; }
.coach-say.show { opacity: 1; transform: none; }
.coach-say.ok { border-color: var(--green); color: var(--green); }
.coach-say.bad { border-color: var(--red); color: var(--red); }
svg.char.sad .head { animation: headShake .5s ease-in-out 2; transform-box: fill-box; transform-origin: center bottom; }
svg.char.sad .brow { transform: translateY(3px) rotate(-6deg); transform-box: fill-box; transform-origin: center; }
@keyframes headShake { 25% { transform: rotate(-7deg); } 75% { transform: rotate(7deg); } }
.kbd-hint { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--bg2); color: var(--ink2); font-size: .75rem; font-weight: 800; margin-right: 10px; vertical-align: 1px; }
@media (max-width: 640px) { .kbd-hint { display: none; } }
.ex-card { background: var(--card); border: 2px solid var(--line); border-radius: 22px; padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow); animation: slideIn .4s cubic-bezier(.2, .8, .2, 1); }
@keyframes slideIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
.ex-kind { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink2); margin-bottom: 6px; }
.ex-q { font-size: 1.25rem; font-weight: 800; margin-bottom: 16px; }
.ex-q .blank { display: inline-block; min-width: 60px; border-bottom: 3px solid var(--blue); margin: 0 4px; }
.ex-hint { color: var(--ink2); font-size: .92rem; margin-top: -8px; margin-bottom: 14px; }
.opts { display: grid; gap: 10px; }
.opt { text-align: left; padding: 14px 18px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); cursor: pointer; font-weight: 700; font-size: 1.02rem; box-shadow: 0 3px 0 var(--line); transition: transform .12s, border-color .15s, background .15s; }
.opt:hover { border-color: var(--blue); transform: translateY(-1px); }
.opt.sel { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 10%, var(--card)); }
.opt.right { border-color: var(--green); background: var(--ok-bg); }
.opt.wrong { border-color: var(--red); background: var(--bad-bg); }
.opts.gender { grid-template-columns: repeat(3, 1fr); }
.opts.gender .opt { text-align: center; font-size: 1.2rem; }
.txt-in { width: 100%; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 1.1rem; font-weight: 700; }
.umlauts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.umlauts button { width: 40px; height: 38px; border-radius: 10px; border: 2px solid var(--line); background: var(--card); cursor: pointer; font-weight: 800; }
.umlauts button:hover { border-color: var(--blue); }
.word-bank, .word-line { display: flex; flex-wrap: wrap; gap: 8px; min-height: 54px; padding: 8px; border-radius: 14px; }
.word-line { border: 2px dashed var(--line); margin-bottom: 12px; background: var(--bg2); }
.wchip { padding: 9px 14px; border-radius: 12px; background: var(--card); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); font-weight: 800; cursor: pointer; animation: popIn .25s; transition: transform .1s; }
.wchip:hover { transform: translateY(-2px); }
.wchip.used { visibility: hidden; }
.match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.match-grid .opt { text-align: center; }
.match-grid .opt.matched { opacity: .35; pointer-events: none; border-color: var(--green); background: var(--ok-bg); }
.feedback { margin-top: 16px; padding: 14px 16px; border-radius: 16px; font-weight: 700; animation: popIn .3s; }
.feedback.ok { background: var(--ok-bg); color: #137a4a; }
.feedback.bad { background: var(--bad-bg); color: #b21f2d; }
:root[data-theme="dark"] .feedback.ok { color: #7ef0b5; } :root[data-theme="dark"] .feedback.bad { color: #ffb3bd; }
.feedback .expl { font-weight: 600; color: var(--ink); margin-top: 6px; font-size: .95rem; }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pop { animation: correctPop .45s; }
@keyframes correctPop { 50% { transform: scale(1.04); } }
.ex-actions { display: flex; gap: 10px; margin-top: 18px; justify-content: flex-end; flex-wrap: wrap; }
.result-big { font-family: var(--display); font-size: 3.4rem; font-weight: 700; color: var(--green); }
.listen-big { width: 90px; height: 90px; border-radius: 50%; font-size: 2.2rem; }

/* ---------- dialogue ---------- */
.stage { position: relative; border-radius: 22px; padding: 20px 16px 0; overflow: hidden; display: flex; justify-content: space-around; align-items: flex-end; min-height: 230px; background: linear-gradient(180deg, #bde0fe 0%, #e0f1ff 65%, #a3d9a5 65%, #8cc98f 100%); border: 2px solid var(--line); }
.stage.indoor { background: linear-gradient(180deg, #ffe8c7 0%, #fff3df 66%, #c99a6b 66%, #b88a5c 100%); }
.stage.cafe { background: linear-gradient(180deg, #ffd6a5 0%, #ffe9cf 66%, #8d6346 66%, #7b5539 100%); }
.stage.street { background: linear-gradient(180deg, #a2d2ff 0%, #cde6ff 62%, #9aa3b5 62%, #8a93a5 100%); }
.stage.shop { background: linear-gradient(180deg, #caffbf 0%, #ecffe8 66%, #c2b8a3 66%, #ada28c 100%); }
.stage.doctor { background: linear-gradient(180deg, #d7f3f5 0%, #eefbfc 66%, #b5c9d6 66%, #a5b9c6 100%); }
.stage.station { background: linear-gradient(180deg, #e2e2f5 0%, #f2f2fb 62%, #8e8e9e 62%, #7c7c8c 100%); }
.stage .deco { position: absolute; font-size: 2.2rem; opacity: .9; }
.stage .actor { position: relative; text-align: center; transition: transform .4s, filter .4s; z-index: 1; }
.stage .actor svg.char { width: clamp(110px, 18vw, 160px); }
.stage .actor.dim { filter: saturate(.6) brightness(.95); transform: scale(.94); }
.stage .actor.speaking { transform: scale(1.06) translateY(-4px); }
.stage .actor .nm { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); background: rgba(255, 255, 255, .92); color: #1f2a48; padding: 2px 10px; border-radius: 99px; font-weight: 800; font-size: .82rem; white-space: nowrap; }
.stage .actor.flip svg.char { transform: scaleX(-1); }
.scene-info { margin: 14px 0; }
.lines { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.ln { display: flex; gap: 10px; align-items: flex-end; max-width: 88%; animation: popIn .4s cubic-bezier(.3, 1.6, .5, 1); }
.ln.right { align-self: flex-end; flex-direction: row-reverse; }
.ln .av { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: none; background: var(--bg2); border: 2px solid var(--line); }
.ln .av svg.char { width: 78px; margin: -4px 0 0 -19px; }
.ln .av svg.char .char-inner { animation: none; }
.ln .bub { background: var(--card); border: 2px solid var(--line); padding: 10px 14px; border-radius: 18px 18px 18px 6px; cursor: pointer; transition: border-color .2s; }
.ln.right .bub { border-radius: 18px 18px 6px 18px; background: color-mix(in srgb, var(--blue) 10%, var(--card)); }
.ln .bub:hover { border-color: var(--blue); }
.ln.now .bub { border-color: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 35%, transparent); }
.ln-who { font-size: .75rem; font-weight: 800; color: var(--ink2); }
.ln-de { font-weight: 800; }
.ln-en { color: var(--ink2); font-size: .92rem; }
.ln.pending { display: none; }
.your-turn { border: 3px dashed var(--gold); border-radius: 18px; padding: 14px; margin-top: 12px; background: color-mix(in srgb, var(--gold) 10%, var(--card)); animation: popIn .4s; }

/* ---------- speaking ---------- */
.speak-item { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 14px 16px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); margin-bottom: 10px; animation: popIn .4s backwards; }
.speak-item .sp-de { font-weight: 800; font-size: 1.1rem; }
.speak-item .sp-en { color: var(--ink2); font-size: .92rem; }
.speak-item .sp-res { grid-column: 1 / -1; }
.heard { padding: 10px 14px; border-radius: 12px; background: var(--bg2); margin-top: 6px; }
.heard .w-ok { color: var(--green); font-weight: 800; }
.heard .w-miss { color: var(--red); font-weight: 800; text-decoration: underline wavy; }
.score-badge { display: inline-block; font-family: var(--display); font-weight: 700; padding: 2px 10px; border-radius: 99px; color: #fff; background: var(--green); }
.score-badge.mid { background: var(--gold); color: #3b2a00; } .score-badge.low { background: var(--red); }

/* writing */
textarea.write { width: 100%; min-height: 180px; padding: 14px 16px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 1.05rem; resize: vertical; }
.checklist { list-style: none; padding: 0; display: grid; gap: 8px; }
.checklist label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 12px; background: var(--bg2); cursor: pointer; font-weight: 600; }
.checklist input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--green); }
.model { border-left: 6px solid var(--green); }

/* done */
.done-wrap { text-align: center; padding: 20px 0; }
.done-wrap svg.char { width: 200px; margin: 0 auto; }
.badges { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 18px 0; }
.badge { padding: 12px 16px; border-radius: 16px; background: var(--card); border: 2px solid var(--line); font-weight: 800; animation: popIn .5s backwards; }

/* flashcards */
.flash-wrap { perspective: 1200px; max-width: 520px; margin: 0 auto; }
.flash { position: relative; height: 280px; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3, 1.3, .5, 1); cursor: pointer; }
.flash.flipped { transform: rotateY(180deg); }
.flash .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; background: var(--card); border: 3px solid var(--line); box-shadow: var(--shadow); }
.flash .back { transform: rotateY(180deg); }
.flash .f-word { font-family: var(--display); font-size: clamp(1.6rem, 5vw, 2.3rem); font-weight: 600; }
.flash .f-sub { color: var(--ink2); margin-top: 8px; }
.flash .face.der { border-color: var(--der); } .flash .face.die { border-color: var(--die); } .flash .face.das { border-color: var(--das); }
.boxes { display: flex; gap: 8px; justify-content: center; margin: 14px 0; flex-wrap: wrap; }
.boxes span { padding: 6px 12px; border-radius: 12px; background: var(--card); border: 2px solid var(--line); font-weight: 800; font-size: .85rem; }

/* pronunciation */
.alpha { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.alpha button { aspect-ratio: 1; border-radius: 18px; border: 2px solid var(--line); background: var(--card); cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .15s; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.alpha button:hover { transform: translateY(-3px) rotate(-2deg); border-color: var(--blue); }
.alpha b { font-family: var(--display); font-size: 1.8rem; line-height: 1; }
.alpha small { color: var(--ink2); font-size: .78rem; font-weight: 700; }
.alpha button.special b { color: var(--red); }

/* settings */
.set-row { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.set-row:last-child { border: 0; }
.set-row label b { display: block; }
.set-row small { color: var(--ink2); }
select, input[type="range"] { font: inherit; }
select { padding: 10px 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: var(--ink); max-width: 100%; }
.switch { position: relative; width: 54px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 99px; cursor: pointer; transition: .2s; }
.switch span::before { content: ''; position: absolute; width: 22px; height: 22px; left: 4px; top: 4px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::before { transform: translateX(24px); }

/* toast */
#toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 200%); opacity: 0; visibility: hidden; background: var(--brand); color: var(--bg); padding: 12px 22px; border-radius: 16px; font-weight: 800; z-index: 100; transition: transform .35s cubic-bezier(.3, 1.4, .5, 1), opacity .25s, visibility .25s; box-shadow: var(--shadow); max-width: 90vw; text-align: center; }
#toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
#toast.ok { background: var(--green); color: #fff; } #toast.bad { background: var(--red); color: #fff; }
@media (max-width: 640px) { #toast { bottom: 90px; } }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 120; display: none; }

.kbd { display: inline-block; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg2); font-size: .85em; font-weight: 700; }
.foot { text-align: center; color: var(--ink2); font-size: .85rem; margin-top: 30px; }

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

/* ---------- trainer drills ---------- */
.drill-opts { display: grid; gap: 10px; }
.drill-tag { display: inline-block; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink2); background: var(--bg2); padding: 3px 10px; border-radius: 99px; margin-bottom: 10px; }
.drill-q { font-family: var(--display); font-size: clamp(1.4rem, 4vw, 1.9rem); font-weight: 600; margin: 4px 0 6px; line-height: 1.3; }
.drill-q .blank { display: inline-block; min-width: 54px; text-align: center; border-bottom: 3px solid var(--blue); color: var(--blue); }
.drill-person { color: var(--purple); }
.gtable tr.hl td, .gtable td.hl { background: color-mix(in srgb, var(--gold) 35%, transparent); font-weight: 800; }

/* ---------- stories ---------- */
.story-card svg.char, .scen svg.char { width: 64px; flex: none; }
.story-card { transition: transform .2s, border-color .2s; }
.story-card:hover { transform: translateY(-3px); border-color: var(--blue); }
.story { display: grid; gap: 4px; font-size: 1.12rem; }
.st-line { margin: 0; padding: 8px 12px; border-radius: 12px; cursor: pointer; transition: background .25s; display: grid; gap: 2px; }
.st-line:hover { background: var(--bg2); }
.st-line.now { background: color-mix(in srgb, var(--gold) 30%, var(--card)); }
.st-de { font-weight: 700; }
.st-en { font-size: .9rem; color: var(--ink2); }

/* ---------- AI tutor ---------- */
.ai-badge { display: inline-block; font-size: .78rem; font-weight: 800; padding: 3px 10px; border-radius: 99px; color: #fff; background: linear-gradient(90deg, var(--purple), var(--blue)); vertical-align: middle; }
.ai-box { border: 2px solid color-mix(in srgb, var(--purple) 40%, var(--line)); background: color-mix(in srgb, var(--purple) 7%, var(--card)); border-radius: 18px; padding: 14px 16px; margin-top: 12px; animation: popIn .35s; }
.ai-box ul { margin: 6px 0; }
.ai-corrected { background: var(--card); border-radius: 12px; padding: 10px 12px; margin: 10px 0; border: 1px solid var(--line); }
.ai-corrected p { margin: 6px 0 0; white-space: pre-line; font-weight: 600; }
.mistake-list { list-style: none; padding: 0; display: grid; gap: 8px; margin: 10px 0; }
.mistake-list li { background: var(--card); border-radius: 12px; padding: 8px 12px; border: 1px solid var(--line); }
.mistake-list small, .fix-box small { display: block; color: var(--ink2); margin-top: 2px; }
.m-wrong { color: var(--red); text-decoration: line-through; font-weight: 700; }
.m-right { color: var(--green); font-weight: 800; }
.ai-thinking { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-weight: 700; color: var(--ink2); }
.ai-thinking svg.char { width: 54px; }
.dots::after { content: ''; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.ai-ask { border-top: 3px dashed var(--line); margin-top: 20px; padding-top: 16px; }
#tAi, #tAi .btn { display: inline-flex; }

/* chat */
.chat-head { display: flex; gap: 16px; align-items: center; }
.chat-head svg.char { width: 96px; flex: none; }
.chat { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; max-height: 55vh; overflow-y: auto; padding: 6px 4px; }
.msg { display: flex; gap: 10px; align-items: flex-end; max-width: 88%; animation: popIn .35s cubic-bezier(.3, 1.6, .5, 1); }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg .av { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: none; background: var(--bg2); border: 2px solid var(--line); }
.msg .av svg.char { width: 72px; margin: -4px 0 0 -18px; }
.msg .av svg.char .char-inner { animation: none; }
.msg .bub { background: var(--card); border: 2px solid var(--line); padding: 10px 14px; border-radius: 18px 18px 18px 6px; min-width: 0; }
.msg.me .bub { border-radius: 18px 18px 6px 18px; background: color-mix(in srgb, var(--blue) 10%, var(--card)); }
.fix-box { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--bad-bg); font-size: .92rem; }
.fix-box.ok { background: var(--ok-bg); }
.typing { display: flex; gap: 5px; padding: 14px 16px !important; }
.typing span { width: 8px; height: 8px; border-radius: 50%; background: var(--ink2); animation: typingDot 1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typingDot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }
.chat-input { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
@media (max-width: 640px) { .chat-input { grid-template-columns: 1fr; } .chat-head svg.char { width: 70px; } }

/* home: today card */
.today { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.today a { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--bg2); text-decoration: none; color: var(--ink); border: 2px solid transparent; transition: border-color .2s, transform .2s; }
.today a:hover { border-color: var(--blue); transform: translateY(-2px); }
.today .t-ico { font-size: 1.6rem; }
.today b { display: block; font-family: var(--display); font-size: 1.25rem; }
.today small { color: var(--ink2); font-weight: 700; }

/* certificate */
.cert-wrap canvas { width: 100%; max-width: 760px; height: auto; border-radius: 16px; box-shadow: var(--shadow); display: block; margin: 12px auto; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); text-decoration: none; font-size: 1.1rem; }
.icon-btn.active { background: var(--brand); border-color: var(--brand); }

/* ---------- real-life scenes ---------- */
.scn-card { text-decoration: none; color: inherit; transition: transform .2s, border-color .2s; display: block; }
.scn-card:hover { transform: translateY(-4px); border-color: var(--blue); }
.scn-thumb { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 2 / 1; max-width: 100%; border: 2px solid var(--line); }
.scn-thumb svg { width: 100%; height: 100%; display: block; }
.scn-icon { position: absolute; left: 12px; top: 10px; font-size: 2.2rem; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .25)); }
.scn-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.scn-big-icon { font-size: 1.5rem; }
.scn-dots { display: flex; gap: 6px; }
.scn-dots span { width: 28px; height: 10px; border-radius: 99px; background: var(--line); transition: background .3s; }
.scn-dots span.now { background: var(--gold); }
.scn-dots span.done { background: var(--green); }
.scn-stage { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 2 / 1; max-width: 100%; border: 2px solid var(--line); background: #e9eef4; min-height: 220px; }
.scn-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scn-actors { position: absolute; inset: 0; }
.scn-actor { position: absolute; bottom: 0; transform: translateX(-50%); width: clamp(96px, 22%, 230px); transition: transform .4s, filter .4s; }
.scn-actor svg.char { width: 100%; }
.scn-actor .nm { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); background: rgba(255, 255, 255, .92); color: #1f2a48; padding: 1px 9px; border-radius: 99px; font-weight: 800; font-size: .72rem; white-space: nowrap; }
.scn-actor.speaking { transform: translateX(-50%) scale(1.06); }
.scn-actor.thinking svg.char { animation: think 1.2s ease-in-out infinite; }
@keyframes think { 50% { transform: rotate(-3deg); } }
.walk-in-l { animation: walkInL 1.2s cubic-bezier(.2, .8, .3, 1) backwards; }
.walk-in-r { animation: walkInR 1.2s cubic-bezier(.2, .8, .3, 1) backwards; }
.walk-out { animation: walkOut .7s ease-in forwards; }
@keyframes walkInL { from { transform: translateX(-260%); } to { transform: translateX(-50%); } }
@keyframes walkInR { from { transform: translateX(260%); } to { transform: translateX(-50%); } }
@keyframes walkOut { to { transform: translateX(300%); opacity: 0; } }
svg.char.walking .char-inner { animation: walkBob .3s ease-in-out infinite; }
@keyframes walkBob { 50% { transform: translateY(-8px) rotate(1.5deg); } }
.scn-bubble { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%) scale(.6); width: max-content; max-width: min(320px, 46vw); background: #fff; color: #1f2a48; border: 2px solid #1f2a48; border-radius: 16px; padding: 8px 12px; font-size: .92rem; line-height: 1.3; opacity: 0; transition: opacity .2s, transform .25s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none; z-index: 3; box-shadow: 0 4px 0 rgba(31, 42, 72, .15); }
.scn-bubble::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 8px solid transparent; border-top-color: #1f2a48; }
.scn-bubble.show { opacity: 1; transform: translateX(-50%) scale(1); }
.scn-actor[data-c="alex"] .scn-bubble { left: 0; transform: translateX(-10%) scale(.6); }
.scn-actor[data-c="alex"] .scn-bubble.show { transform: translateX(-10%) scale(1); }
.scn-actor[data-c="alex"] .scn-bubble::after { left: 30%; }
.scn-actor.side-r .scn-bubble { left: auto; right: 10%; transform: scale(.6); transform-origin: right bottom; }
.scn-actor.side-r .scn-bubble.show { transform: scale(1); }
.scn-actor.side-r .scn-bubble::after { left: auto; right: 24%; transform: none; }
.sb-de { display: block; font-weight: 800; }
.sb-en { display: block; font-size: .78rem; color: #5a6480; margin-top: 2px; }
.scn-stage.no-en .sb-en { display: none; }
.scn-card-overlay { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; opacity: 0; background: rgba(31, 42, 72, .55); }
.scn-card-overlay > div { background: #fff; color: #1f2a48; border-radius: 18px; padding: 14px 26px; text-align: center; display: grid; gap: 2px; transform: scale(.8); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.scn-card-overlay small { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #5a6480; }
.scn-card-overlay b { font-family: var(--display); font-size: 1.6rem; }
.scn-card-overlay.show { animation: titleCard 2.2s ease forwards; }
.scn-card-overlay.show > div { animation: titlePop 2.2s ease forwards; }
@keyframes titleCard { 0% { opacity: 0; } 12%, 70% { opacity: 1; } 100% { opacity: 0; } }
@keyframes titlePop { 0% { transform: scale(.7); } 15%, 70% { transform: scale(1); } 100% { transform: scale(1.05); } }
.scn-controls { margin: 12px 0; }
.scn-panel { margin-top: 0; }
.scn-log { display: flex; flex-direction: column; gap: 10px; max-height: 360px; overflow-y: auto; padding: 4px; }
.scn-log-title { align-self: center; font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink2); background: var(--bg2); padding: 3px 12px; border-radius: 99px; margin-top: 6px; }
.scn-log .bub { cursor: pointer; }
/* background animations */
.fly-across { animation: flyAcross 11s linear infinite; }
@keyframes flyAcross { from { transform: translate(260px, 20px); } to { transform: translate(860px, -40px); } }
.belt-slide { animation: beltSlide 5s ease-in-out infinite alternate; }
@keyframes beltSlide { from { transform: translateX(0); } to { transform: translateX(60px); } }
.belt-move { animation: beltMove 7s linear infinite; }
.belt-move.d2 { animation-delay: -3.5s; }
@keyframes beltMove { from { transform: translateX(-20px); } to { transform: translateX(330px); } }
.carousel { animation: carousel 9s linear infinite; }
@keyframes carousel { from { transform: translateX(-80px); } to { transform: translateX(760px); } }
.clouds { animation: clouds 6s linear infinite; }
@keyframes clouds { from { transform: translateX(30px); } to { transform: translateX(-30px); } }
.swing { animation: swing 3.5s ease-in-out infinite; }
@keyframes swing { 0%, 100% { transform: rotate(3deg); } 50% { transform: rotate(-3deg); } }
.flicker { animation: flicker .25s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: bottom; }
@keyframes flicker { to { transform: scaleY(1.2) scaleX(.85); opacity: .85; } }
.blink { animation: blinkTxt 1.6s steps(2) infinite; }
@keyframes blinkTxt { 50% { opacity: .35; } }
.tick { animation: tick 6s steps(60) infinite; }
@keyframes tick { to { transform: rotate(360deg); } }
.steam { animation: steam 2.4s ease-in-out infinite; }
@keyframes steam { 0% { opacity: 0; transform: translateY(6px); } 40% { opacity: .9; } 100% { opacity: 0; transform: translateY(-10px); } }
.grow { animation: grow 2.4s ease-out infinite alternate; transform-box: fill-box; transform-origin: bottom; }
@keyframes grow { from { transform: scaleY(.3); } to { transform: scaleY(1); } }
.ring { animation: ringPhone 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ringPhone { 0%, 60%, 100% { transform: rotate(0); } 10%, 30%, 50% { transform: rotate(-8deg); } 20%, 40% { transform: rotate(8deg); } }
.stamp { animation: stamp 2.6s ease-in-out infinite; }
@keyframes stamp { 0%, 60%, 100% { transform: translateY(0); } 70% { transform: translateY(-14px); } 80% { transform: translateY(2px); } }
.screen-black { fill: #111 !important; }
@media (max-width: 640px) { .scn-bubble { font-size: .78rem; padding: 6px 9px; max-width: 58vw; } .scn-actor .nm { font-size: .62rem; } }

/* ---------- teacher inbox & admin dashboard ---------- */
.icon-btn { position: relative; }
.icon-btn .nb, .nb-inline { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: .7rem; font-weight: 800; display: inline-grid; place-items: center; }
.icon-btn .nb { position: absolute; top: -4px; right: -4px; }
.msg-item { border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-top: 12px; background: var(--card); }
.msg-item.open { border-left: 6px solid var(--gold); }
.msg-item.answered { border-left: 6px solid var(--green); }
.msg-text { white-space: pre-line; margin: 8px 0; font-weight: 600; }
.msg-reply { background: var(--ok-bg); border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.msg-reply p { white-space: pre-line; margin: 6px 0; }
.adm-table tbody tr { cursor: pointer; }
.adm-table tbody tr.sel td { background: color-mix(in srgb, var(--blue) 12%, transparent); }
.adm-table td, .adm-table th { white-space: nowrap; font-variant-numeric: tabular-nums; }
.act { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; background: var(--line); }
.act.on { background: var(--green); } .act.mid { background: var(--gold); }
.day-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
.day-grid span { aspect-ratio: 1; border-radius: 10px; background: var(--bg2); display: grid; place-items: center; align-content: center; font-weight: 800; font-size: .85rem; color: var(--ink2); }
.day-grid span small { font-size: .62rem; font-weight: 700; }
.day-grid span.part { background: color-mix(in srgb, var(--gold) 35%, var(--card)); color: var(--ink); }
.day-grid span.done { background: var(--green); color: #fff; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.kv b { font-variant-numeric: tabular-nums; }
.chart-wrap { position: relative; max-width: 640px; }
.bar-chart { width: 100%; height: auto; display: block; overflow: visible; }
.bar-chart .bar { fill: var(--blue); }
.bar-chart .bar-g.hover .bar { fill: color-mix(in srgb, var(--blue) 75%, var(--ink)); }
.bar-chart .grid { stroke: var(--line); stroke-width: 1; }
.bar-chart .baseline { stroke: var(--ink2); stroke-width: 1.5; }
.bar-chart .axis { fill: var(--ink2); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart-tip { position: absolute; transform: translate(-50%, -110%); background: var(--brand); color: var(--bg); padding: 4px 10px; border-radius: 8px; font-size: .8rem; font-weight: 800; pointer-events: none; white-space: nowrap; }

/* ---------- realistic humans: lip-sync, expressions, gaze, breathing ---------- */
svg.char.human .mouth > * { display: none; }
svg.char.human .m-closed { display: inline; }
svg.char.human.smile .m-closed { display: none; }
svg.char.human.smile .m-smile { display: inline; }
svg.char.human.worried .m-closed { display: none; }
svg.char.human.worried .m-sad { display: inline; }
svg.char.human.talking .m-closed, svg.char.human.talking .m-smile, svg.char.human.talking .m-sad { display: none; }
svg.char.human.talking:not([data-v]) .m-m { display: inline; }
svg.char.human.talking[data-v="a"] .m-a, svg.char.human.talking[data-v="e"] .m-e,
svg.char.human.talking[data-v="o"] .m-o, svg.char.human.talking[data-v="m"] .m-m { display: inline; }
svg.char.human .brow { transform-box: fill-box; transform-origin: center; transition: transform .35s ease; }
svg.char.human.worried .brow.bl { transform: translateY(1px) rotate(10deg); }
svg.char.human.worried .brow.br { transform: translateY(1px) rotate(-10deg); }
svg.char.human.curious .brow.bl { transform: translateY(-3.5px); }
svg.char.human.curious .brow.br { transform: translateY(-2px) rotate(-4deg); }
svg.char.human.smile .brow { transform: translateY(-1.5px); }
svg.char.human.sad .brow.bl { transform: rotate(9deg); }
svg.char.human.sad .brow.br { transform: rotate(-9deg); }
svg.char.human .iris { transform: translateX(var(--lx, 0px)); transition: transform .5s ease; }
svg.char.human .torso { transform-box: fill-box; transform-origin: center bottom; animation: breathe 3.8s ease-in-out infinite; }
svg.char.human .arm-talk { display: none; transform-origin: 154px 222px; }
svg.char.human.gest:not(.waving) .arm-talk { display: inline; animation: gesture 1.6s ease-in-out infinite; }
svg.char.human.idle .head { animation: headIdle 7s ease-in-out infinite; transform-box: fill-box; transform-origin: center bottom; }
svg.char.human.talking .head, svg.char.human.idle.talking .head { animation: nodSoft 1.4s ease-in-out infinite; }
svg.char.human.sad .head, svg.char.human.idle.sad .head { animation: headShake .5s ease-in-out 2; }
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.012, 1.025); } }
@keyframes gesture { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-9deg) translateY(-3px); } 60% { transform: rotate(4deg); } }
@keyframes nodSoft { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-1.6deg) translateY(.5px); } 60% { transform: rotate(1.3deg); } }
@keyframes headIdle { 0%, 40%, 100% { transform: rotate(0); } 50%, 60% { transform: rotate(2deg); } 75% { transform: rotate(-1.5deg); } }
@media (prefers-reduced-motion: reduce) { svg.char.human .torso, svg.char.human .head, svg.char.human .arm-talk { animation: none !important; } }

/* ---------- scene realism: camera, light, crowd, announcements ---------- */
.scn-cam { position: absolute; inset: 0; transition: transform 1.3s cubic-bezier(.25, .8, .3, 1), transform-origin 1.3s cubic-bezier(.25, .8, .3, 1); will-change: transform; }
.scn-light { position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(ellipse 70% 55% at 50% 18%, rgba(255, 255, 255, .16), transparent 70%), radial-gradient(ellipse 85% 85% at 50% 50%, transparent 58%, rgba(10, 16, 30, .30) 100%); transition: background .8s; }
.scn-stage[data-mood="evening"] .scn-light { background: radial-gradient(ellipse 50% 45% at 50% 35%, rgba(255, 196, 120, .16), transparent 70%), linear-gradient(rgba(120, 60, 20, .14), rgba(60, 20, 10, .18)), radial-gradient(ellipse 85% 85% at 50% 50%, transparent 52%, rgba(20, 8, 0, .42) 100%); }
.scn-stage[data-mood="night"] .scn-light { background: linear-gradient(rgba(20, 30, 80, .28), rgba(10, 15, 40, .34)), radial-gradient(ellipse 85% 85% at 50% 50%, transparent 50%, rgba(0, 0, 20, .5) 100%); }
.scn-stage[data-mood="cool"] .scn-light { background: linear-gradient(rgba(200, 230, 255, .10), rgba(120, 160, 200, .10)), radial-gradient(ellipse 85% 85% at 50% 50%, transparent 58%, rgba(10, 20, 40, .30) 100%); }
.scn-actor svg.char { filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .22)); }
.scn-actors.has-speaker .scn-actor:not(.speaking) svg.char { filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .22)) brightness(.9) saturate(.9); }
.scn-actor svg.char { transition: filter .4s; }
.walker { animation: walkerGo 18s linear infinite; opacity: .5; }
.walker.rev { animation-name: walkerBack; }
.wbob { animation: wbob .55s ease-in-out infinite; }
@keyframes walkerGo { from { transform: translateX(-80px); } to { transform: translateX(880px); } }
@keyframes walkerBack { from { transform: translateX(880px) scaleX(-1); } to { transform: translateX(-80px) scaleX(-1); } }
@keyframes wbob { 50% { transform: translateY(-2.5px); } }
.scn-announce { position: absolute; top: 10px; left: 50%; transform: translate(-50%, -140%); z-index: 4; background: #1d2433; color: #fff; border: 2px solid #ffce00; border-radius: 14px; padding: 8px 16px; max-width: min(560px, 92%); width: max-content; transition: transform .45s cubic-bezier(.3, 1.4, .5, 1), opacity .3s; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); opacity: 0; pointer-events: none; }
.scn-announce.show { transform: translate(-50%, 0); opacity: 1; }
.scn-announce b { display: block; color: #ffce00; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.scn-announce .sb-en { color: #c6cfdc; }
.scn-stage.no-en .scn-announce .sb-en { display: none; }
.scn-caption { position: absolute; left: 50%; top: 10px; transform: translate(-50%, -10px); pointer-events: none; z-index: 4; background: rgba(15, 20, 35, .82); color: #fff; padding: 6px 16px; border-radius: 10px; font-style: italic; font-weight: 700; opacity: 0; transition: opacity .35s, transform .35s; max-width: 90%; text-align: center; }
.scn-caption small { display: block; font-weight: 600; color: #c6cfdc; }
.scn-stage.no-en .scn-caption small { display: none; }
.scn-caption.show { opacity: 1; transform: translate(-50%, 0); }
.scn-log-note { align-self: center; font-style: italic; color: var(--ink2); font-size: .88rem; text-align: center; max-width: 90%; }
.scn-log.hide-en .scn-log-note .ln-en { display: none; }
/* extra background animations */
.train-in { animation: trainIn 9s cubic-bezier(.15, .7, .3, 1) infinite; }
@keyframes trainIn { 0% { transform: translateX(900px); } 40%, 85% { transform: translateX(0); } 100% { transform: translateX(-1000px); } }
.landscape { animation: landscape 7s linear infinite; }
@keyframes landscape { from { transform: translateX(0); } to { transform: translateX(-400px); } }
.landscape.far { animation-duration: 22s; }
.hanger { animation: swing 4s ease-in-out infinite; transform-box: fill-box; transform-origin: top center; }
.beep { animation: blinkTxt .9s steps(2) infinite; }
.siren { animation: siren 1s steps(2) infinite; }
@keyframes siren { 50% { fill: #e63946; } }
.curtain { animation: curtain 6s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: left; }
@keyframes curtain { from { transform: scaleX(1); } to { transform: scaleX(.92); } }
@media (prefers-reduced-motion: reduce) { .scn-cam { transition: none; } .walker, .wbob, .train-in, .landscape { animation: none; } }

/* ---------- writing studio ---------- */
.wr-card { text-decoration: none; color: inherit; display: block; transition: transform .2s, border-color .2s; }
.wr-card:hover { transform: translateY(-3px); border-color: var(--purple, #9b5de5); }
.wr-ico { font-size: 1.6rem; }
.wr-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 18px; align-items: start; }
.wr-layout > .card { margin: 0; }
@media (max-width: 900px) { .wr-layout { grid-template-columns: 1fr; } }
.wr-task-de { font-weight: 700; display: flex; gap: 8px; align-items: flex-start; }
.wr-points, .wr-cover { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.wr-points li, .wr-cover li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 10px; border-radius: 12px; background: var(--bg2); }
.wr-points li > span, .wr-cover li > span { font-weight: 800; width: 1.2em; flex: none; text-align: center; }
.wr-points small, .wr-cover small { display: block; color: var(--ink2); font-size: .8rem; }
.wr-points li.ok, .wr-cover li.ok { background: color-mix(in srgb, var(--green) 16%, var(--card)); }
.wr-points li.ok > span, .wr-cover li.ok > span { color: var(--green); }
.wr-points li.no, .wr-cover li.no { background: color-mix(in srgb, var(--red) 12%, var(--card)); }
.wr-points li.no > span, .wr-cover li.no > span { color: var(--red); }
.wr-model summary { cursor: pointer; font-weight: 800; margin-top: 8px; }
.wr-text { width: 100%; min-height: 260px; resize: vertical; font-size: 1.05rem; line-height: 1.6; font-family: var(--font); }
.wr-edit .umlauts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.wr-meter { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.wr-meter .track { flex: 0 0 140px; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.wr-meter .track i { display: block; height: 100%; width: 0; background: var(--blue); border-radius: 99px; transition: width .3s; }
.wr-meter .track i.ok { background: var(--green); }
.wr-meter .track i.over { background: var(--gold); }
#wrOut { margin-top: 18px; }
.wr-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.wr-ring { --c: var(--green); width: 92px; height: 92px; border-radius: 50%; flex: none; display: grid; place-content: center; text-align: center; background: radial-gradient(closest-side, var(--card) 76%, transparent 78%), conic-gradient(var(--c) calc(var(--p) * 1%), var(--line) 0); }
.wr-ring.mid { --c: var(--gold); }
.wr-ring.low { --c: var(--red); }
.wr-ring b { font-family: var(--display); font-size: 1.8rem; line-height: 1; }
.wr-ring small { color: var(--ink2); font-weight: 700; font-size: .72rem; }
.wr-tabs { margin: 16px 0 10px; }
.wr-pane { position: relative; white-space: pre-wrap; line-height: 1.9; font-size: 1.05rem; background: var(--bg2); border-radius: 16px; padding: 14px 16px; border: 2px solid var(--line); overflow-wrap: anywhere; }
.wr-pane del { background: color-mix(in srgb, var(--red) 18%, transparent); color: var(--red); text-decoration: line-through; border-radius: 4px; padding: 0 2px; }
.wr-pane ins { background: color-mix(in srgb, var(--green) 22%, transparent); color: inherit; text-decoration: none; font-weight: 800; border-radius: 4px; padding: 0 2px; }
mark.wm { background: color-mix(in srgb, var(--red) 15%, transparent); color: inherit; border-bottom: 3px solid var(--red); border-radius: 4px 4px 0 0; padding: 0 2px; cursor: pointer; transition: background .2s; }
mark.wm:hover, mark.wm.on, mark.wm:focus-visible { background: color-mix(in srgb, var(--red) 30%, transparent); outline: none; }
mark.wm sup { font-size: .62rem; font-weight: 800; color: var(--red); margin-left: 1px; }
.wr-pop { position: absolute; z-index: 5; width: min(340px, calc(100% - 12px)); background: var(--card); border: 2px solid var(--ink); border-radius: 14px; padding: 10px 12px; box-shadow: 0 10px 28px rgba(0, 0, 0, .2); white-space: normal; line-height: 1.45; font-size: .95rem; }
.wr-pop-x { position: absolute; top: 4px; right: 6px; border: 0; background: none; cursor: pointer; color: var(--ink2); font-size: .9rem; }
.wr-mlist { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 8px; }
.wr-m { border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; background: var(--card); transition: border-color .2s, background .2s; }
.wr-m.on { border-color: var(--red); background: color-mix(in srgb, var(--red) 6%, var(--card)); }
.wr-num { display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; font-size: .8rem; }
.wr-fix { margin: 6px 0 4px; font-size: 1.05rem; }
.wr-bars { display: grid; gap: 8px; }
.wr-bar { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 28px; gap: 10px; align-items: center; font-size: .9rem; font-weight: 700; }
.wr-bar .track { height: 14px; background: var(--bg2); border-radius: 99px; overflow: hidden; }
.wr-bar .track i { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
.wr-bar b { text-align: right; font-variant-numeric: tabular-nums; }
.wr-prev { background: var(--bg2); border-radius: 12px; padding: 8px 12px; margin-top: 0; font-weight: 700; }
.wr-trend { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 18px; border-bottom: 2px solid var(--line); }
.wr-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; text-decoration: none; color: var(--ink2); position: relative; max-width: 48px; }
.wr-col i { display: block; width: 100%; background: var(--blue); border-radius: 6px 6px 0 0; transition: filter .2s; }
.wr-col:hover i { filter: brightness(1.15); }
.wr-col small { position: absolute; top: -18px; font-size: .72rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.wr-hist { display: grid; gap: 6px; }
.wr-hrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 10px; border-radius: 12px; text-decoration: none; color: inherit; border: 2px solid var(--line); }
.wr-hrow:hover { border-color: var(--blue); }
@media (max-width: 640px) { .nav a { padding: 8px 5px; font-size: 1.15rem; } .wr-bar { grid-template-columns: 100px 1fr 24px; } }
a.chip { text-decoration: none; display: inline-block; }

/* ---------- speaking practice ---------- */
.sp-tabs { margin: 4px 0 16px; }
.sp-goal { height: 6px; border-radius: 99px; background: var(--line); margin-top: 4px; overflow: hidden; width: 110px; }
.sp-goal i { display: block; height: 100%; background: var(--green); border-radius: 99px; transition: width .4s; }
.sp-att { margin-top: 10px; }
.sp-label { font-weight: 800; margin-bottom: 6px; color: var(--ink2); }
.sp-btns { gap: 8px; }
.sp-note { font-size: .88rem; margin: 6px 0 0; }
.sp-heard { margin-top: 10px; }
.sp-words { margin: 8px 0 4px; line-height: 2; font-size: 1.08rem; }
.say-word { font: inherit; border: 0; background: none; cursor: pointer; padding: 0 3px; }
.sp-subs { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 6px; font-size: .92rem; }
.sp-tips { margin: 8px 0 0; padding-left: 0; list-style: none; font-size: .9rem; color: var(--ink2); }
.sp-tips li { margin-top: 3px; }
.sp-target { font-size: clamp(1.25rem, 2.6vw, 1.6rem); font-weight: 800; font-family: var(--display); margin: 10px 0; line-height: 1.35; }
.sp-target.blurred, .blurred { filter: blur(7px); cursor: pointer; user-select: none; transition: filter .3s; }
.sp-prompt { font-size: clamp(1.15rem, 2.4vw, 1.45rem); font-weight: 800; margin: 10px 0 4px; }
.sp-answer { background: color-mix(in srgb, var(--green) 14%, var(--card)); border-radius: 12px; padding: 8px 12px; margin: 10px 0 0; }
.sp-kind { font-weight: 800; color: var(--ink2); text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; margin-top: 8px; }
.sp-dots { display: flex; gap: 5px; margin: 12px 0 4px; }
.sp-dots span { flex: 1; height: 8px; border-radius: 99px; background: var(--line); transition: background .3s; }
.sp-dots span.now { background: var(--gold); }
.sp-dots span.ok { background: var(--green); }
.sp-dots span.bad { background: var(--red); opacity: .6; }
.sp-weak { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-src { gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.sp-src select { min-width: 0; max-width: 100%; flex: 1 1 220px; }
.sp-toggle { display: flex; gap: 6px; align-items: center; font-weight: 700; }
.sp-shadow { display: flex; gap: 16px; align-items: flex-start; margin-top: 10px; }
.sp-sh-char { flex: none; text-align: center; }
.sp-sh-char svg.char { width: 110px; }
.sp-sh-char small { display: block; font-weight: 800; color: var(--ink2); }
@media (max-width: 640px) { .sp-shadow { flex-direction: column; align-items: center; } .sp-shadow > div:last-child { width: 100%; } .sp-sh-char svg.char { width: 90px; } }
.sp-type { margin-top: 12px; }
.call-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; padding: 10px 12px; border-radius: 14px; background: var(--bg2); }
.call-bar .btn.listening { animation: pulse 1.2s infinite; }
.scn-speak { display: grid; gap: 6px; justify-items: start; }

/* ---------- accounts: registration, profile, students ---------- */
.reg-wrap { max-width: 760px; margin: 0 auto; }
.reg-hero { display: flex; gap: 18px; align-items: center; margin-bottom: 14px; }
.reg-hero svg.char { width: 110px; flex: none; }
@media (max-width: 640px) { .reg-hero { flex-direction: column; text-align: center; } }
.reg-form { display: grid; gap: 14px; }
.reg-form label { display: grid; gap: 4px; font-weight: 700; }
.reg-form .txt-in { width: 100%; }
.reg-form fieldset { border: 0; padding: 0; margin: 0; }
.reg-form legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
.reg-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .reg-2 { grid-template-columns: 1fr; } }
.req { color: var(--red); }
.chip-check { display: inline-flex !important; cursor: pointer; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span { padding: 7px 13px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); font-weight: 800; color: var(--ink2); transition: background .15s, border-color .15s; }
.chip-check input:checked + span { background: var(--brand); color: var(--bg); border-color: var(--brand); }
.chip-check input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.reg-consent { display: flex !important; grid-template-columns: none; gap: 10px; align-items: flex-start; font-weight: 600 !important; background: var(--bg2); padding: 10px 12px; border-radius: 12px; }
.reg-consent input { margin-top: 4px; }
.reg-acc { display: flex; align-items: center; gap: 8px; margin-top: 0; }
.reg-acc img, .prof-av { width: 34px; height: 34px; border-radius: 50%; }
.prof-av { width: 52px; height: 52px; margin-right: 6px; }
.me-chip { display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 12px; border-radius: 99px; border: 2px solid var(--line); background: var(--card); text-decoration: none; color: var(--ink); font-weight: 800; white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.me-chip.active { background: var(--brand); color: var(--bg); border-color: var(--brand); }
@media (max-width: 640px) { .me-chip { padding: 0 9px; max-width: 96px; } }
.st-chip { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .8rem; font-weight: 800; background: var(--bg2); white-space: nowrap; }
.st-active { background: color-mix(in srgb, var(--green) 18%, var(--card)); }
.st-paused { background: color-mix(in srgb, var(--gold) 25%, var(--card)); }
.st-finished { background: color-mix(in srgb, var(--blue) 18%, var(--card)); }
.warn-tag { background: color-mix(in srgb, var(--gold) 30%, var(--card)); }
.prof-grid { margin-top: 12px; }
.prof-box { border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px; background: var(--bg2); }
.tl-wrap { max-height: 360px; overflow-y: auto; border: 2px solid var(--line); border-radius: 16px; padding: 4px 14px 10px; }
.tl-day { margin: 12px 0 4px; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink2); }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.timeline li { display: grid; grid-template-columns: 26px 46px 1fr; gap: 6px; align-items: baseline; font-size: .92rem; }
.tl-time { color: var(--ink2); font-variant-numeric: tabular-nums; font-size: .82rem; }
@media (max-width: 480px) { #stat-streak { display: none; } .me-chip .me-name { display: none; } .me-chip { padding: 0 10px; } }

/* =========================================================
   MOBILE – tab bar, "More" sheet, compact layouts, touch
   ========================================================= */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button, .chip, .opt, label, summary, [data-say] { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.lbl-s, .nav-more { display: none; }
.sheet-backdrop, .more-sheet { display: none; }

@media (max-width: 640px) {
  /* bottom tab bar: 5 labelled items */
  .nav { gap: 0; padding: 4px 2px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(0, 0, 0, .06); }
  .nav .nav-sec { display: none; }
  .nav a, .nav-more { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 5px 2px; border-radius: 14px; font-size: 1.3rem; line-height: 1.1; min-height: 52px; color: var(--ink2); }
  .nav-more { border: 0; background: none; font: inherit; font-size: 1.3rem; cursor: pointer; }
  .nav a.active, .nav-more.active, .nav-more[aria-expanded="true"] { background: var(--brand); color: var(--bg); }
  .nav a:hover { transform: none; }
  .lbl-s { display: block; font-size: .66rem; font-weight: 800; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  /* top bar: settings & account live in the More sheet */
  .top-stats a[data-nav="settings"], .top-stats #navMe { display: none !important; }
  .topbar { padding-top: calc(8px + env(safe-area-inset-top)); }
  /* More sheet */
  .sheet-backdrop { display: block; position: fixed; inset: 0; background: rgba(10, 14, 28, .45); z-index: 70; opacity: 0; transition: opacity .2s; }
  .sheet-backdrop.open { opacity: 1; }
  .more-sheet { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 71; background: var(--card); border-radius: 22px 22px 0 0; padding: 8px 14px calc(78px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 30px rgba(0, 0, 0, .2); transform: translateY(100%); transition: transform .22s cubic-bezier(.3, .9, .4, 1); max-height: 80vh; overflow-y: auto; }
  .more-sheet.open { transform: none; }
  .sheet-backdrop[hidden], .more-sheet[hidden] { display: none; }
  .sheet-handle { width: 44px; height: 5px; border-radius: 99px; background: var(--line); margin: 4px auto 12px; }
  .more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .more-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 16px; background: var(--bg2); border: 2px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 800; font-size: .82rem; text-align: center; }
  .more-item.active { border-color: var(--brand); }
  .mi-ico { font-size: 1.7rem; position: relative; line-height: 1; }
  .mi-ico .nb { position: absolute; top: -6px; right: -12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: .68rem; display: grid; place-items: center; }

  /* page chrome */
  #app { padding: 14px 12px 90px; }
  h1 { font-size: clamp(1.45rem, 6.4vw, 1.9rem); }
  .card { padding: 16px 14px; border-radius: 18px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
  .stat { padding: 10px; gap: 8px; border-radius: 14px; }
  .stat .s-ico { font-size: 1.35rem; }
  .stat b { font-size: 1.15rem; }
  .stat span:not(.s-ico) { font-size: .74rem; line-height: 1.25; }
  .sp-goal { width: 100%; }
  /* tab rows scroll sideways instead of wrapping into many lines */
  .tabs-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin-left: -12px; margin-right: -12px; padding: 2px 12px 6px; scroll-snap-type: x proximity; }
  .tabs-row::-webkit-scrollbar { display: none; }
  .tabs-row .chip { flex: none; scroll-snap-align: start; }
  .chip { padding: 8px 13px; }
  /* bigger touch targets */
  .btn.tiny { min-height: 34px; padding: 6px 11px; }
  .btn.small { min-height: 40px; }
  .say-btn { min-width: 36px; min-height: 36px; }
  .opt { min-height: 48px; }
  /* tables scroll inside their card */
  .gtable-wrap { margin-left: -14px; margin-right: -14px; padding: 0 14px; }

  /* real-life scenes: taller stage, readable bubbles */
  .scn-stage { aspect-ratio: 4 / 3; border-radius: 16px; min-height: 0; margin-left: -4px; margin-right: -4px; }
  .scn-actor { width: clamp(110px, 34%, 200px); }
  .scn-bubble { font-size: .8rem; max-width: 64vw; padding: 6px 9px; border-radius: 12px; }
  .sb-en { font-size: .7rem; }
  .scn-caption { font-size: .8rem; padding: 5px 10px; max-width: 94%; }
  .scn-announce { font-size: .82rem; padding: 6px 10px; }
  .scn-controls { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 6px; margin: 10px -12px; padding: 0 12px 4px; }
  .scn-controls::-webkit-scrollbar { display: none; }
  .scn-controls .btn { flex: none; }
  .scn-controls .spacer { display: none; }
  .scn-top { margin-bottom: 8px; }
  .scn-dots span { width: 18px; }
  .scn-card-overlay b { font-size: 1.25rem; }
  .scn-log { max-height: none; }

  /* dialogue / chat / writing */
  .wr-text { min-height: 200px; font-size: 16px; }
  .wr-pane { font-size: 1rem; padding: 12px; }
  .wr-pop { width: calc(100% - 12px); }
  .chat-input textarea { font-size: 16px; }
  .sp-target { font-size: 1.25rem; }
  .sp-btns .btn { flex: 1 1 auto; }
  .sp-heard .row { flex-wrap: wrap; }
  .timeline li { grid-template-columns: 22px 40px 1fr; font-size: .86rem; }
}
@media (max-width: 380px) {
  .more-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .more-item { padding: 12px 4px; font-size: .76rem; }
  .lbl-s { font-size: .6rem; }
  .logo-text { font-size: 1rem; }
}
/* inputs at 16px so iPhones don't zoom in on focus */
@media (max-width: 640px) { input, textarea, select, .txt-in { font-size: 16px !important; } }
@media (max-width: 640px) {
  .say-btn, .vocab-card .say-btn, .ex .say-btn { width: 38px !important; height: 38px !important; min-width: 38px; flex: none; }
  input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; flex: none; }
  .sp-toggle { min-height: 40px; }
}
@media (max-width: 640px) and (pointer: coarse) { body.kb-open .nav { display: none; } body.kb-open { padding-bottom: 0; } }
/* phones in landscape: keep the scene inside the screen */
@media (max-height: 500px) and (orientation: landscape) {
  .scn-stage { aspect-ratio: auto; height: 78vh; max-height: 360px; }
  .topbar { position: static; }
}

/* ---------- teacher portal entry points ---------- */
.icon-btn .adm-lbl, .icon-btn .adm-lbl-s { display: none; }
#navAdmin:not(.hidden) { width: auto; padding: 0 14px; border-radius: 99px; gap: 6px; display: inline-flex; align-items: center; font-weight: 800; font-size: .95rem; text-decoration: none; color: var(--ink); background: var(--gold); border-color: var(--gold); }
#navAdmin .adm-lbl { display: inline; }
@media (max-width: 640px) { #navAdmin .adm-lbl { display: none; } #navAdmin .adm-lbl-s { display: inline; } #navAdmin:not(.hidden) { padding: 0 10px; font-size: .85rem; } }
.portal-card { border: 3px solid var(--gold); background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 16%, var(--card)), var(--card)); }
.portal-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.portal-ico { font-size: 2.6rem; }
.portal-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.portal-stats span { background: var(--card); border: 2px solid var(--line); border-radius: 99px; padding: 4px 12px; font-size: .88rem; }
.login-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 8px 14px; margin-bottom: 14px; font-size: .92rem; }
.login-status img { width: 28px; height: 28px; border-radius: 50%; }
.login-status a { font-weight: 800; }
.st-invited { background: color-mix(in srgb, var(--purple) 16%, var(--card)); }
.inv-row td { vertical-align: middle; }
.add-stu summary { cursor: pointer; list-style: none; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.add-stu summary::-webkit-details-marker { display: none; }
.add-stu summary::before { content: '▸'; font-weight: 800; transition: transform .2s; }
.add-stu[open] summary::before { transform: rotate(90deg); }
.add-steps { margin: 14px 0 0; padding-left: 22px; display: grid; gap: 14px; }
.add-steps li { padding-left: 4px; }
.inv-form { display: grid; grid-template-columns: 1.2fr 1.4fr 1.2fr auto; gap: 8px; margin-top: 8px; align-items: center; }
.inv-form #invInfo { grid-column: 1 / -1; }
@media (max-width: 760px) { .inv-form { grid-template-columns: 1fr; } }
#navAdmin.conn-off:not(.hidden) { background: var(--card); border-color: var(--line); }
.conn-banner { display: flex; gap: 10px; align-items: center; padding: 12px 16px; margin-bottom: 14px; border-radius: 16px; border: 2px solid var(--gold); background: color-mix(in srgb, var(--gold) 18%, var(--card)); color: var(--ink); text-decoration: none; }
.conn-card details { margin-top: 12px; }
.conn-card b, .conn-card li { overflow-wrap: anywhere; }

/* ---------- stand-alone website: login screen, logins in the teacher portal ---------- */
body.login-open { overflow: hidden; }
.login-screen { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: max(24px, env(safe-area-inset-top)) 16px 32px; background: radial-gradient(circle at 20% 10%, color-mix(in srgb, var(--gold, #ffce00) 30%, var(--bg)) 0, var(--bg) 55%); }
.login-box { width: 100%; max-width: 440px; margin: auto 0; background: var(--card); color: var(--ink); border: 2px solid var(--line); border-radius: 24px; padding: 22px 22px 18px; box-shadow: 0 18px 50px rgba(31, 42, 72, .18); animation: pop-in .35s ease-out; }
.login-hero { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.login-hero svg { width: 92px; height: 92px; flex: none; }
.login-hero h1 { margin: 2px 0 2px; font-size: 1.7rem; }
.login-hero p { margin: 0; font-size: .95rem; }
.login-logo { display: flex; align-items: center; gap: 8px; font-family: Fredoka, sans-serif; font-weight: 600; font-size: 1.05rem; }
.login-form { display: grid; gap: 12px; }
.login-form label { display: grid; gap: 4px; font-weight: 700; }
.login-form .txt-in { width: 100%; font-size: 16px; padding: 12px 14px; }
.login-form .btn { width: 100%; justify-content: center; }
.pw-wrap { position: relative; display: block; }
.pw-wrap .txt-in { padding-right: 48px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; font-size: 1.15rem; cursor: pointer; padding: 6px; }
.login-err { min-height: 1.3em; margin: 0; font-weight: 700; color: var(--red); }
.login-err:empty { display: none; }
.login-help { font-size: .9rem; margin: 10px 0 4px; }
.login-guest { border: 0; background: none; color: var(--ink2, #667); font: inherit; font-size: .88rem; text-decoration: underline; cursor: pointer; padding: 6px 0; }
@keyframes pop-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.cred-card { margin-top: 12px; padding: 12px 14px; border: 2px dashed var(--green); border-radius: 16px; background: color-mix(in srgb, var(--green) 9%, var(--card)); }
.cred-card .kv b { overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
.login-adm { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--line); }
.nowrap { white-space: nowrap; }
.pw-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.pw-form .txt-in { flex: 1 1 180px; min-width: 0; }
@media (max-width: 480px) { .login-box { padding: 18px 16px 14px; border-radius: 20px; } .login-hero svg { width: 72px; height: 72px; } .login-hero h1 { font-size: 1.45rem; } }
.setup-warn ul { margin: 6px 0; padding-left: 18px; }
.setup-warn li { margin: 4px 0; }
.setup-warn code { font-size: .85em; }
.lock-card { text-align: center; max-width: 620px; margin: 24px auto; padding: 26px 22px; }
.lock-card svg { width: 120px; height: 120px; }
.lock-card h1 { margin: 6px 0 8px; }
/* learning status (teacher portal) */
.lst-chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .8rem; font-weight: 800; white-space: nowrap; border: 1.5px solid transparent; }
.lst-excellent { background: color-mix(in srgb, #f4b400 20%, var(--card)); border-color: #f4b400; }
.lst-ontrack { background: color-mix(in srgb, var(--green) 16%, var(--card)); border-color: var(--green); }
.lst-behind { background: color-mix(in srgb, #ff8c42 18%, var(--card)); border-color: #ff8c42; }
.lst-help { background: color-mix(in srgb, var(--red) 15%, var(--card)); border-color: var(--red); }
.lst-inactive { background: color-mix(in srgb, #8a94b0 18%, var(--card)); border-color: #8a94b0; }
.lst-new { background: color-mix(in srgb, #5b8def 14%, var(--card)); border-color: #5b8def; }
.learn-box { border: 2px solid var(--line); border-radius: 16px; padding: 14px; margin: 12px 0 14px; background: color-mix(in srgb, var(--bg) 40%, var(--card)); }
.learn-box .row { gap: 10px; flex-wrap: wrap; }
.learn-reasons { margin: 8px 0; padding-left: 18px; font-size: .92rem; }
.learn-reasons li { margin: 3px 0; }
.pace-bar { position: relative; height: 14px; border-radius: 999px; background: var(--line); overflow: visible; margin: 4px 0 2px; }
.pace-done { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(90deg, var(--green), #6ad49b); }
.pace-exp { position: absolute; top: -9px; width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 9px solid var(--ink); transform: translateX(-7px); }
.goal-dots { display: flex; gap: 5px; margin-top: 6px; }
.goal-dots span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 800; background: var(--line); color: var(--ink2, #667); }
.goal-dots span.some { background: color-mix(in srgb, var(--green) 30%, var(--card)); color: var(--ink); }
.goal-dots span.hit { background: var(--green); color: #fff; }
.area-row { display: grid; grid-template-columns: minmax(110px, 1.2fr) 2fr auto; gap: 8px; align-items: center; font-size: .9rem; margin: 4px 0; }
.area-bar { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.area-bar i { display: block; height: 100%; border-radius: 999px; background: #5b8def; }
.kv b.good { color: var(--green); } .kv b.bad { color: var(--red); }
.attn-card { border-color: #ff8c42; }
.attn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 4px; border-top: 1px dashed var(--line); cursor: pointer; }
.attn-row:first-of-type { border-top: 0; }
.attn-row:hover { background: color-mix(in srgb, var(--line) 40%, transparent); }
/* ---------- plans & payments ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 16px 0; }
.plan-card { position: relative; background: var(--card); border: 2px solid var(--line); border-top: 6px solid var(--pc); border-radius: 20px; padding: 20px 18px 18px; display: flex; flex-direction: column; box-shadow: var(--shadow-sm, 0 4px 14px rgba(31,42,72,.08)); }
.plan-card.popular { border-color: var(--pc); transform: translateY(-4px); box-shadow: 0 14px 34px color-mix(in srgb, var(--pc) 25%, transparent); }
.plan-card.current { outline: 3px solid var(--pc); outline-offset: 2px; }
.plan-ribbon { position: absolute; top: -13px; right: 14px; background: var(--pc); color: #fff; font-size: .75rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.plan-ribbon.mine { right: auto; left: 14px; background: var(--ink); }
.plan-ico { font-size: 2rem; line-height: 1; }
.plan-card h3 { margin: 6px 0 2px; font-size: 1.35rem; }
.plan-tag { margin: 0 0 10px; }
.plan-price { font-family: Fredoka, sans-serif; font-size: 1.9rem; font-weight: 700; color: var(--pc); margin-bottom: 8px; }
.plan-price small { font-size: .9rem; color: var(--ink2, #667); font-weight: 500; }
.plan-feat { list-style: none; padding: 0; margin: 0 0 16px; flex: 1; }
.plan-feat li { padding: 5px 0 5px 24px; position: relative; font-size: .93rem; border-top: 1px dashed var(--line); }
.plan-feat li:first-child { border-top: 0; }
.plan-feat li::before { content: '✓'; position: absolute; left: 2px; color: var(--pc); font-weight: 900; }
.plan-card .btn { width: 100%; justify-content: center; color: #fff; }
.plan-card .btn.ghost { color: var(--ink); }
.plan-status { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 16px; border: 2px solid var(--green); background: color-mix(in srgb, var(--green) 10%, var(--card)); }
.plan-status.soon { border-color: #ff8c42; background: color-mix(in srgb, #ff8c42 12%, var(--card)); }
.plan-status.late { border-color: var(--red); background: color-mix(in srgb, var(--red) 10%, var(--card)); }
.pay-info { padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--gold, #ffce00) 14%, var(--card)); border: 1.5px dashed var(--line); font-weight: 600; overflow-wrap: anywhere; }
.plan-chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .8rem; font-weight: 800; white-space: nowrap; background: color-mix(in srgb, var(--pc) 16%, var(--card)); border: 1.5px solid var(--pc); }
.plan-chip.none { --pc: #9aa3bd; }
.pay-paid { color: var(--green); } .pay-soon { color: #d9731f; } .pay-overdue { color: var(--red); font-weight: 800; } .pay-unset, .pay-none { color: var(--ink2, #667); }
.pay-chip-overdue { background: color-mix(in srgb, var(--red) 14%, var(--card)); border-color: var(--red); }
.pay-chip-soon { background: color-mix(in srgb, #ff8c42 16%, var(--card)); border-color: #ff8c42; }
.pay-chip-unset { background: color-mix(in srgb, #9aa3bd 16%, var(--card)); border-color: #9aa3bd; }
.plan-box { border: 2px solid var(--line); border-radius: 16px; padding: 14px; margin: 0 0 14px; }
.plan-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 6px 0; }
.plan-form label { display: grid; gap: 3px; font-size: .85rem; font-weight: 700; flex: 1 1 140px; min-width: 0; }
.plan-form label.wide { flex: 2 1 220px; }
.plan-form .txt-in { width: 100%; }
.pay-add { margin: 8px 0 12px; }
.pay-add summary { cursor: pointer; }
.pay-table { margin-top: 8px; font-size: .9rem; }
.pay-settings .plan-grid { margin: 12px 0; }
.pay-settings summary { cursor: pointer; }
@media (max-width: 480px) { .plan-card.popular { transform: none; } .plan-price { font-size: 1.6rem; } }
/* tablets & small laptops: less-used pages move into a "More" menu so the top bar never overflows */
@media (min-width: 641px) and (max-width: 899px) {
  .nav .nav-sec { display: none; }
  .nav-more { display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; font: inherit; font-size: 1.25rem; padding: 8px 10px; border-radius: 12px; cursor: pointer; color: var(--ink2); }
  .nav-more:hover { background: var(--bg2); }
  .nav-more.active, .nav-more[aria-expanded="true"] { background: var(--brand); color: var(--bg); }
  .sheet-backdrop { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(10, 14, 28, .25); opacity: 0; transition: opacity .18s; }
  .sheet-backdrop.open { opacity: 1; }
  .more-sheet { display: block; position: fixed; top: 74px; right: 16px; width: min(440px, calc(100vw - 32px)); z-index: 71; background: var(--card); border: 2px solid var(--line); border-radius: 20px; padding: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, .18); opacity: 0; transform: translateY(-8px); transition: opacity .18s, transform .18s; max-height: 75vh; overflow-y: auto; }
  .more-sheet.open { opacity: 1; transform: none; }
  .sheet-backdrop[hidden], .more-sheet[hidden] { display: none; }
  .sheet-handle { display: none; }
  .more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .more-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 16px; background: var(--bg2); border: 2px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 800; font-size: .82rem; text-align: center; }
  .more-item.active { border-color: var(--brand); }
  .mi-ico { font-size: 1.7rem; position: relative; line-height: 1; }
  .mi-ico .nb { position: absolute; top: -6px; right: -12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: .68rem; display: grid; place-items: center; }
}
@media (min-width: 641px) and (max-width: 860px) { #stat-streak { display: none; } .me-chip .me-name { display: none; } }
@media (min-width: 641px) and (max-width: 720px) { #stat-xp { display: none; } .nav a, .nav-more { padding: 8px 7px; } }
#navAdmin { white-space: nowrap; }
@media (min-width: 641px) and (max-width: 1000px) { #navAdmin .adm-lbl { display: none; } #navAdmin .adm-lbl-s { display: inline; } }
/* free trial & WhatsApp contact */
.wa-btn { background: #25d366 !important; color: #fff !important; border-color: #1da851 !important; }
.wa-card { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; margin: 0 0 16px; border-radius: 18px; border: 2px solid #25d366; background: color-mix(in srgb, #25d366 10%, var(--card)); }
.wa-card > div:nth-child(2) { flex: 1 1 220px; }
.wa-ico { font-size: 2rem; }
.trial-card { padding: 12px 16px; margin: 0 0 16px; border-radius: 16px; border: 2px dashed var(--gold, #ffce00); background: color-mix(in srgb, var(--gold, #ffce00) 12%, var(--card)); }
.trial-card a { font-weight: 800; }
.lock-what { font-family: Fredoka, sans-serif; font-size: 1.15rem; font-weight: 600; margin: 0 0 8px; }
.lock-badge { position: absolute; top: 6px; right: 6px; z-index: 2; font-size: .78rem; line-height: 1; padding: 3px 6px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--line); box-shadow: 0 2px 6px rgba(0, 0, 0, .12); pointer-events: none; }
.lock-badge.free { background: #25d366; color: #fff; border-color: #1da851; font-weight: 900; letter-spacing: .03em; }
a.plan-locked { opacity: .78; }
@media (max-width: 640px) { .node-wrap { transform: none !important; } }

/* ======================================================
   FREE TRIAL – welcome section, previews, celebration
   ====================================================== */
.trial-hero { position: relative; overflow: hidden; margin-bottom: 22px; padding: 22px 20px 20px; border-radius: 26px; color: #fff;
  background: radial-gradient(circle at 12% 0%, #ff6b8b 0, transparent 45%), radial-gradient(circle at 100% 20%, #ffd166 0, transparent 40%), linear-gradient(135deg, #4b3cc9 0%, #2d6be4 55%, #19a8c9 100%);
  box-shadow: 0 18px 44px rgba(45, 60, 160, .35); animation: tIn .6s ease-out; }
@keyframes tIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.t-sparkles i { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .7); animation: tFloat 7s linear infinite; }
.t-sparkles i:nth-child(1) { left: 8%; top: 80%; animation-delay: 0s; }
.t-sparkles i:nth-child(2) { left: 30%; top: 95%; width: 5px; height: 5px; animation-delay: 1.4s; }
.t-sparkles i:nth-child(3) { left: 55%; top: 90%; animation-delay: 2.8s; }
.t-sparkles i:nth-child(4) { left: 75%; top: 85%; width: 6px; height: 6px; animation-delay: 4s; }
.t-sparkles i:nth-child(5) { left: 92%; top: 92%; width: 4px; height: 4px; animation-delay: 5.2s; }
.t-sparkles i:nth-child(6) { left: 45%; top: 70%; width: 10px; height: 10px; background: rgba(255, 209, 102, .7); animation-delay: 3.3s; }
@keyframes tFloat { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-420px) scale(1.1); opacity: 0; } }
.t-head { position: relative; display: flex; gap: 14px; align-items: center; }
.t-bruno svg { width: 118px; height: 118px; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .25)); animation: tBob 3s ease-in-out infinite; }
@keyframes tBob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(2deg); } }
.t-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; background: #fff; color: #4b3cc9; font-weight: 900; font-size: .78rem; letter-spacing: .06em; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); animation: tPulse 2.2s ease-in-out infinite; }
@keyframes tPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.t-title { color: #fff; margin: 8px 0 6px; font-size: clamp(1.35rem, 4.6vw, 2rem); line-height: 1.15; }
.t-title span { background: linear-gradient(90deg, #ffd166, #fff, #ffd166); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: tShine 2.6s linear infinite; }
@keyframes tShine { to { background-position: -200% 0; } }
.t-sub { margin: 0; opacity: .95; }
.t-free { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 18px 0 16px; }
.t-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 20px; background: rgba(255, 255, 255, .96); text-decoration: none; box-shadow: 0 10px 24px rgba(0, 0, 0, .18); transition: transform .25s, box-shadow .25s; animation: tIn .6s ease-out backwards; }
.t-card:nth-child(2) { animation-delay: .12s; }
.t-card:hover { transform: translateY(-5px) rotate(-.4deg); box-shadow: 0 18px 34px rgba(0, 0, 0, .25); }
.t-card { color: #1f2a48; } .t-card b { font-size: 1.05rem; } .t-card > span { color: #56607a; font-size: .92rem; } .t-card small { color: #6b7591; }
.t-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.t-card-ico { font-size: 1.8rem; margin-left: auto; }
.t-free-tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-weight: 900; font-size: .74rem; letter-spacing: .08em; color: #fff; background: linear-gradient(90deg, #1fbf63, #25d366, #7cf0a8, #25d366, #1fbf63); background-size: 300% 100%; animation: tShine 2.4s linear infinite; box-shadow: 0 3px 10px rgba(37, 211, 102, .45); }
.t-ring { width: 46px; height: 46px; transform: rotate(-90deg); }
.t-ring-bg { fill: none; stroke: #e6e1d6; stroke-width: 3.6; }
.t-ring-fg { fill: none; stroke: #25d366; stroke-width: 3.6; stroke-linecap: round; transition: stroke-dasharray 1s; }
.t-go { margin-top: auto; padding-top: 8px; font-weight: 900; color: #2d6be4 !important; font-size: .98rem !important; }
.t-thumb { position: relative; height: 130px; border-radius: 14px; overflow: hidden; margin-bottom: 6px; }
.t-thumb svg { width: 100%; height: 100%; display: block; animation: tKen 14s ease-in-out infinite alternate; transform-origin: 60% 50%; }
@keyframes tKen { from { transform: scale(1); } to { transform: scale(1.14) translateX(-3%); } }
.t-thumb .t-free-tag { position: absolute; top: 8px; left: 8px; }
.t-play { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: #2d6be4; font-size: 1.3rem; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); animation: tPulse 1.8s ease-in-out infinite; }
.t-stats { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 4px 0 16px; padding: 12px; border-radius: 18px; background: rgba(255, 255, 255, .14); backdrop-filter: blur(4px); }
.t-stats div { text-align: center; }
.t-stats b { display: block; font-family: var(--display, Fredoka, sans-serif); font-size: clamp(1.2rem, 4vw, 1.7rem); line-height: 1.1; }
.t-stats span { font-size: .76rem; opacity: .9; }
.t-h3 { color: #fff; margin: 0 0 8px; font-size: 1.05rem; }
.t-strip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 10px; scrollbar-width: thin; }
.t-lock-tile, .t-feat { position: relative; flex: 0 0 168px; height: 112px; border-radius: 16px; overflow: hidden; scroll-snap-align: start; text-decoration: none; color: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, .2); transition: transform .2s; }
.t-lock-tile:hover, .t-feat:hover { transform: translateY(-3px); }
.t-lock-tile svg { width: 100%; height: 100%; display: block; filter: saturate(.65) brightness(.75) blur(1px); transition: filter .3s; }
.t-lock-tile:hover svg { filter: saturate(1) brightness(.9) blur(0); }
.t-lock-name { position: absolute; left: 8px; right: 8px; bottom: 7px; font-weight: 800; font-size: .82rem; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.t-lock-ico { position: absolute; top: 7px; right: 8px; font-size: .9rem; background: rgba(0, 0, 0, .35); border-radius: 999px; padding: 2px 6px; }
.t-feat { display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; padding: 10px 12px; background: linear-gradient(140deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .08)); border: 1.5px solid rgba(255, 255, 255, .35); }
.t-feat-ico { font-size: 1.7rem; margin-bottom: auto; }
.t-feat b { font-size: .9rem; } .t-feat small { font-size: .74rem; opacity: .9; line-height: 1.25; }
.t-cta { position: relative; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.t-cta .btn.ghost { background: rgba(255, 255, 255, .15) !important; color: #fff !important; border-color: rgba(255, 255, 255, .45) !important; }
.t-pulse { animation: tGlow 2s ease-in-out infinite; }
@keyframes tGlow { 0%, 100% { box-shadow: 0 4px 0 #1da851, 0 0 0 0 rgba(37, 211, 102, .6); } 50% { box-shadow: 0 4px 0 #1da851, 0 0 0 12px rgba(37, 211, 102, 0); } }
@media (max-width: 640px) {
  .trial-hero { padding: 18px 14px 16px; border-radius: 22px; }
  .t-head { flex-direction: column; text-align: center; }
  .t-bruno svg { width: 96px; height: 96px; }
  .t-stats { grid-template-columns: repeat(3, 1fr); }
  .t-stats div:nth-child(n+4) { grid-column: span 1; }
  .t-cta .btn { flex: 1 1 100%; justify-content: center; }
}

/* lock card with a taste of the content */
.lock-rich { position: relative; overflow: hidden; }
.lock-rich::before { content: ''; position: absolute; inset: 0 0 auto; height: 6px; background: linear-gradient(90deg, #4b3cc9, #2d6be4, #19a8c9, #25d366); }
.lock-big { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; font-size: 2rem; background: color-mix(in srgb, var(--gold, #ffce00) 25%, var(--card)); box-shadow: 0 6px 18px rgba(0, 0, 0, .12); animation: tWiggle 3s ease-in-out infinite; }
@keyframes tWiggle { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(-12deg); } 88% { transform: rotate(10deg); } 92% { transform: rotate(-6deg); } 96% { transform: rotate(4deg); } }
.pv { text-align: left; margin: 12px auto 14px; padding: 14px; border-radius: 18px; border: 2px solid var(--line); background: color-mix(in srgb, var(--bg) 50%, var(--card)); max-width: 560px; animation: tIn .5s ease-out; }
.pv-head { display: flex; gap: 12px; align-items: center; }
.pv-day-no { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display, Fredoka, sans-serif); font-weight: 700; font-size: 1.4rem; color: #fff; background: linear-gradient(135deg, #4b3cc9, #2d6be4); box-shadow: 0 5px 0 #2a2a8a; }
.pv-head small { display: block; font-weight: 900; letter-spacing: .06em; color: var(--ink2); font-size: .72rem; }
.pv-head b { display: block; font-size: 1.05rem; }
.pv-head .muted { font-size: .88rem; }
.pv-goals { margin: 10px 0 6px; padding-left: 20px; font-size: .92rem; }
.pv-goals li { margin: 3px 0; }
.pv-label { margin: 8px 0 6px; font-weight: 800; font-size: .9rem; }
.pv-words { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pv-word { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 11px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; font: inherit; text-align: left; animation: tPop .4s ease-out backwards; transition: transform .15s, border-color .15s; }
.pv-word:hover { transform: translateY(-2px); border-color: #2d6be4; }
.pv-word.said { border-color: #25d366; background: color-mix(in srgb, #25d366 10%, var(--card)); }
.pv-word b { font-size: .95rem; } .pv-word small { color: var(--ink2); font-size: .75rem; }
.pv-word b::after { content: ' 🔊'; font-size: .75rem; }
@keyframes tPop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
.pv-more { font-weight: 800; color: var(--ink2); font-size: .85rem; padding: 0 4px; }
.pv-thumb { position: relative; height: 190px; border-radius: 14px; overflow: hidden; }
.pv-thumb svg { width: 100%; height: 100%; display: block; animation: tKen 12s ease-in-out infinite alternate; }
.pv-scene-ico { position: absolute; left: 10px; top: 10px; font-size: 1.8rem; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .4)); }
.pv-lock { position: absolute; right: 10px; top: 10px; background: rgba(0, 0, 0, .45); color: #fff; border-radius: 999px; padding: 4px 9px; }
.pv-scene-title { display: block; font-size: 1.2rem; margin-top: 6px; }
.pv-feat { text-align: center; }
.pv-feat-ico { display: block; font-size: 2.6rem; animation: tBob 3s ease-in-out infinite; }
.pv-feat b { display: block; font-size: 1.15rem; margin: 4px 0; }
.pv-feat ul { list-style: none; padding: 0; margin: 6px 0 0; }
.pv-feat li { padding: 4px 0; } .pv-feat li::before { content: '✓ '; color: #25d366; font-weight: 900; }

/* "unlock with a plan" hint on locked cards */
a.plan-locked { opacity: 1; filter: saturate(.55); transition: filter .25s; }
a.plan-locked:hover { filter: none; }
a.plan-locked:hover .lock-badge:not(.free)::after { content: ' Unlock with a plan'; font-weight: 800; }
.lock-badge.free { animation: tShine 2.4s linear infinite; background: linear-gradient(90deg, #1fbf63, #25d366, #7cf0a8, #25d366, #1fbf63); background-size: 300% 100%; }

/* celebration after the free Day 1 / scene */
.trial-modal { position: fixed; inset: 0; z-index: 9500; display: grid; place-items: center; padding: 16px; background: rgba(10, 14, 40, .55); backdrop-filter: blur(3px); animation: tFade .25s ease-out; }
@keyframes tFade { from { opacity: 0; } to { opacity: 1; } }
.tm-box { position: relative; width: min(520px, 100%); max-height: 92vh; overflow-y: auto; text-align: center; padding: 22px 20px 20px; border-radius: 26px; background: var(--card); color: var(--ink); box-shadow: 0 30px 70px rgba(0, 0, 0, .35); animation: tModal .45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes tModal { from { opacity: 0; transform: translateY(30px) scale(.9); } to { opacity: 1; transform: none; } }
.tm-x { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 1.1rem; cursor: pointer; color: var(--ink2); }
.tm-bruno svg { width: 110px; height: 110px; animation: tBob 2.4s ease-in-out infinite; }
.tm-box h2 { margin: 4px 0 8px; }
.tm-next { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px 0 16px; }
.tm-next span { display: flex; flex-direction: column; padding: 8px 12px; border-radius: 14px; border: 2px dashed var(--line); font-size: .82rem; max-width: 150px; }
.tm-next b { font-size: .9rem; } .tm-next b::before { content: '🔒 '; }
.tm-next .tm-more { justify-content: center; font-weight: 800; color: var(--ink2); }
.tm-cta { display: flex; flex-direction: column; gap: 8px; }
.tm-cta .btn { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  .trial-hero, .trial-hero *, .lock-rich *, .tm-box, .tm-box *, .lock-badge, .pv * { animation: none !important; transition: none !important; }
}
.t-goals { list-style: none; margin: 6px 0 0; padding: 0; font-size: .86rem; color: #3d4766; }
.t-goals li { padding: 2px 0 2px 20px; position: relative; } .t-goals li::before { content: '✓'; position: absolute; left: 2px; color: #25d366; font-weight: 900; }

/* ======================================================
   JOB GERMAN – Sales Advisor track
   ====================================================== */
.job-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 24px 22px; margin-bottom: 18px; border-radius: 26px; color: #fff;
  background: radial-gradient(circle at 0% 0%, #e76f51 0, transparent 42%), radial-gradient(circle at 100% 100%, #2a9d8f 0, transparent 45%), linear-gradient(135deg, #1f1f1f 0%, #3d405b 60%, #264653 100%); box-shadow: 0 16px 40px rgba(31, 31, 31, .3); animation: tIn .5s ease-out; }
.job-hero h1 { color: #fff; margin: 8px 0 6px; font-size: clamp(1.5rem, 4.5vw, 2.2rem); }
.job-hero p { opacity: .95; margin: 0 0 12px; }
.jh-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; background: #fff; color: #1f1f1f; font-weight: 900; font-size: .75rem; letter-spacing: .08em; }
.jh-art { display: flex; align-items: flex-end; }
.jh-art svg { width: 120px; height: auto; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .3)); }
.jh-art svg + svg { margin-left: -24px; }
.jh-prog { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.jh-bar { flex: 1; max-width: 280px; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.jh-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #e9c46a, #2a9d8f); }
.jh-ghost { background: rgba(255, 255, 255, .14) !important; color: #fff !important; border-color: rgba(255, 255, 255, .4) !important; box-shadow: none !important; }
.job-list { list-style: none; padding: 0; margin: 6px 0 10px; }
.job-list li { padding: 6px 0 6px 24px; position: relative; border-top: 1px dashed var(--line); }
.job-list li:first-child { border-top: 0; }
.job-list li::before { content: '✓'; position: absolute; left: 2px; color: var(--green); font-weight: 900; }
.job-list b, .job-steps b { display: block; font-size: .95rem; } .job-list small, .job-steps small { color: var(--ink2); }
.job-steps { list-style: none; padding: 0; margin: 6px 0 10px; }
.job-steps li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-top: 1px dashed var(--line); }
.job-steps li:first-child { border-top: 0; }
.job-steps li > span { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--bg2); font-size: 1.2rem; }
.job-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 20px; }
.job-day { position: relative; display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 18px; background: var(--card); border: 2px solid var(--line); text-decoration: none; color: var(--ink); transition: transform .2s, border-color .2s; animation: tIn .4s ease-out backwards; }
.job-day:hover { transform: translateY(-3px); border-color: #2a9d8f; }
.job-day b { display: block; font-size: .98rem; } .job-day small { color: var(--ink2); }
.jd-no { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display, Fredoka, sans-serif); font-weight: 700; font-size: 1.15rem; color: #fff; background: linear-gradient(135deg, #3d405b, #264653); }
.job-day.done .jd-no { background: linear-gradient(135deg, #2a9d8f, #22b573); }
.jd-int .jd-no { background: linear-gradient(135deg, #e76f51, #f4a261); }
.jd-ok { margin-left: auto; font-weight: 900; color: var(--green); font-size: .85rem; white-space: nowrap; }
.job-play { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.job-play > div:first-child svg.char { width: 110px; }
.jp-thumb { flex: 0 0 220px; height: 120px; border-radius: 14px; overflow: hidden; }
.jp-thumb svg { width: 100%; height: 100%; display: block; animation: tKen 12s ease-in-out infinite alternate; }
.job-play > div:last-child { flex: 1 1 240px; }
.jp-list { margin-top: 8px; }
.jp-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 4px; border-top: 1px dashed var(--line); animation: tIn .35s ease-out backwards; }
.jp-row:first-of-type { border-top: 0; }
.jp-txt b { display: block; font-size: 1.02rem; } .jp-txt small { color: var(--ink2); }
.jp-att { grid-column: 1 / -1; }
.jp-att:empty { display: none; }
.jd-head { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.jd-head h1 { margin: 2px 0 4px; }
.jd-head small { font-weight: 900; letter-spacing: .06em; color: var(--ink2); }
.jd-head .muted { margin: 0; }
.jd-big { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display, Fredoka, sans-serif); font-weight: 700; font-size: 1.7rem; color: #fff; background: linear-gradient(135deg, #3d405b, #264653); box-shadow: 0 6px 0 #1b1f2e; }
.jd-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 14px; }
.jd-steps span { padding: 4px 12px; border-radius: 999px; background: var(--bg2); font-size: .82rem; font-weight: 800; color: var(--ink2); }
.jd-steps span.on { background: #264653; color: #fff; }
.iv-list { display: grid; gap: 10px; }
.iv-q { background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 0; overflow: hidden; }
.iv-q[open] { border-color: #2a9d8f; }
.iv-q summary { display: flex; gap: 12px; align-items: center; padding: 12px 14px; cursor: pointer; list-style: none; }
.iv-q summary::-webkit-details-marker { display: none; }
.iv-q summary b { display: block; } .iv-q summary small { color: var(--ink2); }
.iv-no { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: #fff; background: #e76f51; }
.iv-body { padding: 0 14px 14px; }
.iv-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.iv-ans { padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, #2a9d8f 9%, var(--card)); border: 1.5px solid color-mix(in srgb, #2a9d8f 35%, var(--line)); }
.iv-lbl { font-size: .72rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: #2a9d8f; }
.iv-de { font-weight: 800; font-size: 1.04rem; margin: 4px 0; } .iv-en { color: var(--ink2); margin: 0 0 8px; font-size: .92rem; }
.iv-tip { margin: 10px 0 0; font-size: .9rem; }
.iv-tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.iv-tips div { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 14px; background: var(--bg2); }
.iv-tips span { font-size: 1.6rem; } .iv-tips small { color: var(--ink2); }
@media (max-width: 640px) { .job-hero { grid-template-columns: 1fr; } .jh-art { display: none; } .jp-thumb { flex-basis: 100%; height: 140px; } }

/* keeping progress: welcome back, in-app browser warning, progress link */
.welcome-back { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 14px; border-radius: 18px; border: 2px solid var(--green); background: color-mix(in srgb, var(--green) 10%, var(--card)); color: var(--ink); text-decoration: none; animation: tIn .45s ease-out; }
.welcome-back > span:nth-child(2) { flex: 1 1 200px; }
.welcome-back small { color: var(--ink2); }
.wb-ico { font-size: 1.8rem; animation: tWiggle 3s ease-in-out infinite; }
.inapp-warn { padding: 12px 16px; margin-bottom: 14px; border-radius: 16px; border: 2px solid #ff8c42; background: color-mix(in srgb, #ff8c42 13%, var(--card)); }
.prog-link .pl-url { width: 100%; font-size: .78rem; font-family: ui-monospace, Menlo, Consolas, monospace; margin: 8px 0; word-break: break-all; }
.restore-card svg.char { width: 110px; margin: 0 auto; }
.wb-more { margin: -6px 0 14px 4px; font-size: .88rem; } .wb-more a { font-weight: 800; }

/* ===================== EXAM PREP (telc & Goethe) ===================== */
.xm-crumbs { font-size: .9rem; margin: 0 0 10px; color: var(--ink2); }
.xm-lv { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; padding: 2px 8px; border-radius: 999px; background: var(--lv); color: #fff; font-weight: 900; font-size: .75rem; letter-spacing: .04em; }
.xm-tag { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--bg2); font-size: .75rem; font-weight: 700; color: var(--ink2); }
.xm-tag.gold { background: var(--gold); color: #1f2a48; }
.xm-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.xm-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .75rem; font-weight: 900; background: var(--bg2); color: var(--ink2); white-space: nowrap; }
.xm-chip.hi, .xm-mockchip b.hi { background: var(--ok-bg); color: #138a55; } .xm-chip.mid, .xm-mockchip b.mid { background: #fff3cf; color: #9a6a00; } .xm-chip.lo, .xm-mockchip b.lo { background: var(--bad-bg); color: #c22d3a; }
.xm-mockchip b { padding: 0 6px; border-radius: 999px; }

/* hero */
.xm-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 26px 24px; margin-bottom: 18px; border-radius: 26px; color: #fff;
  background: radial-gradient(circle at 0% 0%, #22b573 0, transparent 40%), radial-gradient(circle at 100% 0%, #3a86ff 0, transparent 42%), radial-gradient(circle at 80% 120%, #9b5de5 0, transparent 50%), linear-gradient(135deg, #14213d 0%, #1f2a48 55%, #2b2d6e 100%);
  box-shadow: 0 18px 44px rgba(31, 42, 72, .35); animation: tIn .55s ease-out; }
.xm-hero::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle, rgba(255, 255, 255, .5) 1px, transparent 1.5px) 0 0 / 26px 26px; opacity: .12; pointer-events: none; animation: exDrift 30s linear infinite; }
@keyframes exDrift { to { background-position: 260px 130px; } }
.xm-hero h1 { color: #fff; margin: 8px 0 6px; font-size: clamp(1.6rem, 5vw, 2.4rem); line-height: 1.15; }
.xm-hero p { opacity: .95; margin: 0 0 12px; max-width: 640px; }
.xm-hero a:not(.btn) { color: var(--gold); }
.xm-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--gold); color: #1f2a48; font-weight: 900; font-size: .75rem; letter-spacing: .08em; }
.xm-b1 { background: linear-gradient(90deg, #ffc23c, #ff8c42); -webkit-background-clip: text; background-clip: text; color: transparent; }
.xm-hero-prog { display: flex; align-items: center; gap: 16px; margin: 4px 0 16px; flex-wrap: wrap; }
.xm-hero-stats { display: grid; gap: 4px; font-size: .95rem; }
.xm-ghost { color: #fff !important; border-color: rgba(255, 255, 255, .5) !important; background: rgba(255, 255, 255, .08) !important; }
.xm-hero-art { position: relative; width: 200px; height: 190px; z-index: 1; }
.xm-hero-art svg { position: absolute; left: 0; bottom: 0; width: 120px; height: auto; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .35)); }
.xm-cert { position: absolute; right: 0; top: 6px; width: 120px; height: 150px; border-radius: 12px; background: linear-gradient(160deg, #fffdf6, #f3e7c6); color: #1f2a48; display: grid; place-items: center; align-content: center; gap: 2px; box-shadow: 0 10px 24px rgba(0, 0, 0, .35); transform: rotate(8deg); animation: exCert 4s ease-in-out infinite; border: 3px double #c9a64a; }
.xm-cert span { font-size: .6rem; font-weight: 900; letter-spacing: .15em; color: #8a6d1f; }
.xm-cert b { font-family: var(--display); font-size: 2.6rem; line-height: 1; color: #9b5de5; }
.xm-cert i { font-size: .8rem; font-weight: 800; font-style: normal; }
.xm-cert::after { content: '★'; position: absolute; bottom: 10px; right: 12px; width: 30px; height: 30px; border-radius: 50%; background: #e63946; color: #fff; display: grid; place-items: center; font-size: .9rem; box-shadow: 0 0 0 3px #ffc23c; }
@keyframes exCert { 0%, 100% { transform: rotate(8deg) translateY(0); } 50% { transform: rotate(4deg) translateY(-8px); } }

/* progress rings */
.xm-ring { --p: 0; --c: var(--green); width: 70px; height: 70px; border-radius: 50%; flex: none; display: grid; place-content: center; text-align: center; background: radial-gradient(closest-side, var(--card) 74%, transparent 76%), conic-gradient(var(--c) calc(var(--p) * 1%), var(--line) 0); animation: popIn .5s ease-out; }
.xm-ring b { font-family: var(--display); font-size: 1rem; color: var(--ink); }
.xm-ring.big { width: 96px; height: 96px; background: radial-gradient(closest-side, #1f2a48 74%, transparent 76%), conic-gradient(var(--gold) calc(var(--p) * 1%), rgba(255, 255, 255, .18) 0); }
.xm-ring.big b { color: #fff; font-size: 1.5rem; line-height: 1; } .xm-ring.big small { color: #cfd6ee; font-size: .7rem; }
.mid > .xm-ring { --c: var(--gold); } .lo > .xm-ring { --c: var(--red); }

/* roadmap */
.xm-road { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.xm-phase { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; border-top: 6px solid var(--lv); animation: tIn .5s ease-out backwards; }
.xm-ph-head { display: flex; gap: 10px; align-items: center; padding: 14px 16px 6px; }
.xm-ph-head b { display: block; font-family: var(--display); font-size: 1.1rem; color: var(--lv); } .xm-ph-head small { color: var(--ink2); }
.xm-ph-ico { font-size: 1.8rem; animation: bob 3s ease-in-out infinite; }
.xm-nodes { position: relative; padding: 6px 14px 14px; }
.xm-nodes::before { content: ''; position: absolute; left: 36px; top: 20px; bottom: 34px; width: 4px; border-radius: 4px; background: repeating-linear-gradient(var(--line) 0 8px, transparent 8px 14px); }
.xm-node { position: relative; display: grid; grid-template-columns: 46px 1fr; gap: 10px; align-items: center; padding: 8px 6px; border-radius: 14px; color: inherit; text-decoration: none; animation: slideIn .45s ease-out backwards; transition: background .2s, transform .2s; }
.xm-node:hover { background: var(--bg2); transform: translateX(3px); }
.xm-dot { --p: 0; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(closest-side, var(--card) 72%, transparent 75%), conic-gradient(var(--lv) calc(var(--p) * 1%), var(--line) 0); position: relative; z-index: 1; }
.xm-dot b { font-family: var(--display); font-size: 1.05rem; }
.xm-node.done .xm-dot { background: var(--lv); color: #fff; } .xm-node.done .xm-dot b { color: #fff; }
.xm-node.now .xm-dot { animation: exPulse 2s ease-out infinite; }
@keyframes exPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--lv) 55%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
.xm-node.now { background: color-mix(in srgb, var(--lv) 10%, transparent); }
.xm-nt { min-width: 0; } .xm-nt small { color: var(--ink2); display: block; font-size: .75rem; } .xm-nt em { color: var(--lv); font-style: normal; font-weight: 900; }
.xm-nt b { display: block; font-size: .9rem; line-height: 1.25; }
.xm-nbar { display: block; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: 5px; }
.xm-nbar i { display: block; height: 100%; background: var(--lv, var(--green)); border-radius: 6px; transition: width .6s; animation: exGrow 1s ease-out; transform-origin: left; }
@keyframes exGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.xm-date { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.xm-date input { width: auto; display: inline-block; }

/* overview blocks */
.xm-ul { margin: 0; padding-left: 20px; } .xm-ul li { margin: 4px 0; }
.xm-lvls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 0 6px; }
.xm-lvcard { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; border-left: 6px solid var(--lv); transition: transform .2s; }
.xm-lvcard:hover { transform: translateY(-3px); }
.xm-lvbig { font-family: var(--display); font-size: 1.8rem; color: var(--lv); }
.xm-lvcard small { display: block; color: var(--ink2); }
.xm-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.xm-tool { display: grid; gap: 2px; color: inherit; text-decoration: none; transition: transform .2s, box-shadow .2s; animation: popIn .45s ease-out backwards; }
.xm-tool:nth-child(2) { animation-delay: .05s; } .xm-tool:nth-child(3) { animation-delay: .1s; } .xm-tool:nth-child(4) { animation-delay: .15s; } .xm-tool:nth-child(5) { animation-delay: .2s; } .xm-tool:nth-child(6) { animation-delay: .25s; }
.xm-tool:hover { transform: translateY(-4px) rotate(-.5deg); }
.xm-tool span { font-size: 1.8rem; } .xm-tool small { color: var(--ink2); }
.xm-mocks { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.xm-mockchip { padding: 8px 14px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow-sm); font-weight: 800; color: inherit; text-decoration: none; border: 2px solid var(--line); transition: border-color .2s, transform .2s; }
.xm-mockchip:hover { border-color: var(--gold); transform: translateY(-2px); }

/* week page */
.xm-whead { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; padding: 20px; margin-bottom: 16px; border-radius: 24px; background: linear-gradient(135deg, color-mix(in srgb, var(--lv) 16%, var(--card)), var(--card)); border: 2px solid color-mix(in srgb, var(--lv) 35%, transparent); animation: tIn .5s ease-out; }
.xm-whead h1, .xm-whead h2 { margin: .25em 0; }
.xm-wn { width: 86px; height: 86px; border-radius: 22px; background: var(--lv); color: #fff; display: grid; place-items: center; align-content: center; text-align: center; box-shadow: 0 8px 0 color-mix(in srgb, var(--lv) 60%, #000); animation: popIn .5s ease-out; }
.xm-wn b { font-family: var(--display); font-size: 2.2rem; line-height: 1; } .xm-wn small { font-size: .65rem; font-weight: 900; letter-spacing: .1em; opacity: .9; }
.xm-cheer { margin: 0 0 8px; font-weight: 700; color: var(--ink2); }
.xm-wprog { display: grid; gap: 4px; max-width: 420px; } .xm-wprog .xm-nbar { height: 10px; } .xm-wprog small { color: var(--ink2); }
.xm-can { margin: 0; padding: 0; list-style: none; } .xm-can li { padding: 5px 0 5px 28px; position: relative; } .xm-can li::before { content: '✔'; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--ok-bg); color: var(--green); display: grid; place-items: center; font-size: .75rem; font-weight: 900; }
.xm-mat, .xm-phr { display: flex; flex-wrap: wrap; gap: 8px; }
.xm-g { display: inline-grid; text-align: left; gap: 1px; padding: 7px 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: inherit; text-decoration: none; cursor: pointer; font: inherit; transition: border-color .2s, transform .15s; }
.xm-g:hover { border-color: var(--gold); transform: translateY(-2px); }
.xm-g small { color: var(--ink2); font-size: .78rem; }
.xm-g.saying, .xm-w.saying { animation: saying .6s; }
.xm-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin: 16px 0; }
.xm-day { animation: tIn .45s ease-out backwards; transition: box-shadow .3s; position: relative; }
.xm-day.done { box-shadow: 0 0 0 3px var(--green), var(--shadow); }
.xm-dh { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.xm-dh b { display: block; } .xm-dh small { color: var(--ink2); }
.xm-dd { width: 42px; height: 42px; border-radius: 12px; background: var(--brand); color: var(--bg); display: grid; place-items: center; font-family: var(--display); font-weight: 700; flex: none; }
.xm-day.done .xm-dd { background: var(--green); color: #fff; }
.xm-ok { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 900; animation: popIn .4s ease-out; }
.xm-items { list-style: none; margin: 0; padding: 0; }
.xm-items li { display: grid; grid-template-columns: 26px 1fr; align-items: center; gap: 6px; padding: 6px 0; border-top: 1px dashed var(--line); }
.xm-items li:first-child { border-top: 0; }
.xm-items input { width: 20px; height: 20px; accent-color: var(--green); cursor: pointer; }
.xm-items a { display: grid; grid-template-columns: 24px 1fr auto; gap: 6px; align-items: center; color: inherit; text-decoration: none; padding: 4px 6px; border-radius: 10px; transition: background .2s; }
.xm-items a:hover { background: var(--bg2); }
.xm-items small { color: var(--ink2); font-size: .75rem; white-space: nowrap; }
.xm-items li.on a > span:nth-child(2) { text-decoration: line-through; text-decoration-color: var(--green); text-decoration-thickness: 2px; opacity: .7; }
.xm-sun { background: linear-gradient(135deg, #fff6dd, var(--card)); }
:root[data-theme="dark"] .xm-sun { background: var(--card); }

/* format page */
.xm-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 12px; }
.xm-tabb { padding: 8px 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); font: inherit; font-weight: 800; cursor: pointer; color: inherit; text-decoration: none; }
.xm-tabb.on { background: var(--brand); border-color: var(--brand); color: var(--bg); }
.xm-fparts { display: grid; gap: 10px; }
.xm-fpart { display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 12px; border-radius: 16px; background: var(--bg2); animation: slideIn .4s ease-out backwards; }
.xm-fpart p { margin: 4px 0 0; }
.xm-pico { font-size: 1.6rem; width: 44px; height: 44px; border-radius: 12px; background: var(--card); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.xm-pass { font-weight: 800; margin-bottom: 0; }
.xm-strats { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.xm-strat { animation: popIn .4s ease-out backwards; } .xm-strat p { margin: 6px 0 0; }
.xm-tlist { display: grid; gap: 4px; } .xm-tlist.cols { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.xm-tl { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; color: inherit; text-decoration: none; transition: background .2s; }
.xm-tl:hover { background: var(--bg2); }
.xm-tl > span:first-child { font-size: .78rem; font-weight: 800; color: var(--ink2); min-width: 46px; }
.xm-group { margin-bottom: 18px; } .xm-gh { display: flex; align-items: baseline; gap: 12px; justify-content: space-between; border-bottom: 3px solid var(--lv); margin-bottom: 10px; }
.xm-gh h2 { margin: 0 0 6px; }
.xm-mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.xm-mod h3 { margin: 0 0 6px; font-size: 1.05rem; } .xm-mod h3 small { color: var(--ink2); font-weight: 600; font-size: .8rem; }

/* task runner */
.xm-thead { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; }
.xm-tico { font-size: 2rem; width: 58px; height: 58px; border-radius: 16px; background: var(--bg2); display: grid; place-items: center; animation: popIn .4s ease-out; }
.xm-ttl { margin: .25em 0 0; font-size: clamp(1.2rem, 3.5vw, 1.6rem); }
.xm-instr { margin: 14px 0 10px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--blue) 10%, var(--card)); border-left: 5px solid var(--blue); }
.xm-instr small { display: block; color: var(--ink2); margin-top: 3px; }
.xm-tip { margin: 0 0 10px; padding: 10px 14px; border-radius: 14px; background: #fff6dd; color: #6b4e00; font-weight: 600; }
:root[data-theme="dark"] .xm-tip { background: #3a3215; color: #ffe08a; }
.xm-gloss { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 12px; }
.xm-gloss > b { margin-right: 4px; font-size: .85rem; }
.xm-gloss .xm-g { padding: 4px 10px; border-width: 1px; }
.xm-body { margin-top: 6px; }
.xm-text { padding: 14px 16px; border-radius: 14px; background: var(--bg2); margin: 10px 0; line-height: 1.6; border: 1px solid var(--line); }
.xm-text p { margin: 0 0 .7em; } .xm-text p:last-child { margin-bottom: 0; }
.xm-text.small { font-size: .95rem; background: #fffdf6; border-style: dashed; }
:root[data-theme="dark"] .xm-text.small { background: var(--bg2); }
.xm-audio { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: 16px; background: linear-gradient(135deg, #1f2a48, #33407a); color: #fff; margin: 10px 0 6px; }
.xm-left { font-size: .85rem; opacity: .9; }
.xm-wave { display: inline-flex; gap: 3px; align-items: center; height: 26px; }
.xm-wave i { width: 4px; height: 6px; border-radius: 3px; background: var(--gold); opacity: .5; }
.xm-audio.playing .xm-wave i { opacity: 1; animation: exWave .9s ease-in-out infinite alternate; }
.xm-audio.playing .xm-wave i:nth-child(2) { animation-delay: .1s; } .xm-audio.playing .xm-wave i:nth-child(3) { animation-delay: .25s; } .xm-audio.playing .xm-wave i:nth-child(4) { animation-delay: .05s; } .xm-audio.playing .xm-wave i:nth-child(5) { animation-delay: .3s; } .xm-audio.playing .xm-wave i:nth-child(6) { animation-delay: .15s; } .xm-audio.playing .xm-wave i:nth-child(7) { animation-delay: .2s; }
@keyframes exWave { from { height: 4px; } to { height: 24px; } }
.xm-trans { margin: 4px 0 10px; padding: 8px 12px; border-radius: 12px; background: var(--bg2); font-size: .92rem; }
.xm-trans summary { cursor: pointer; font-weight: 800; } .xm-trans p { margin: 6px 0; }
.xm-q { padding: 12px 0; border-top: 1px dashed var(--line); animation: tIn .35s ease-out backwards; }
.xm-qt { display: grid; grid-template-columns: auto 1fr; gap: 10px; font-weight: 700; margin-bottom: 8px; }
.xm-no { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--bg); display: grid; place-items: center; font-weight: 900; font-size: .85rem; }
.xm-q.ok .xm-no { background: var(--green); color: #fff; } .xm-q.bad .xm-no { background: var(--red); color: #fff; }
.xm-opts { display: grid; gap: 6px; padding-left: 38px; } .xm-opts.two { grid-template-columns: repeat(2, minmax(0, 200px)); }
.xm-opt { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.xm-opt:hover { border-color: var(--blue); }
.xm-opt input { position: absolute; opacity: 0; pointer-events: none; }
.xm-opt:has(input:checked) { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 12%, var(--card)); transform: scale(1.01); }
.xm-opt:has(input:focus-visible) { outline: 3px solid var(--gold); }
.xm-ol { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 900; font-size: .8rem; flex: none; }
.xm-opts.two .xm-ol { display: none; }
.xm-opt:has(input:checked) .xm-ol { background: var(--blue); color: #fff; border-color: var(--blue); }
.xm-opt.right { border-color: var(--green); background: var(--ok-bg); animation: correctPop .4s; }
.xm-opt.wrong { border-color: var(--red); background: var(--bad-bg); animation: shake .4s; }
.xm-ex { margin: 8px 0 0 38px; padding: 8px 12px; border-radius: 12px; background: var(--bg2); font-size: .92rem; animation: tIn .3s ease-out; }
.xm-ads { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 10px 0; }
.xm-ad { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #fffdf6; border: 2px dashed #e6d6a8; font-size: .92rem; animation: popIn .35s ease-out backwards; }
:root[data-theme="dark"] .xm-ad { background: var(--bg2); border-color: var(--line); }
.xm-ak { width: 28px; height: 28px; border-radius: 8px; background: var(--gold); color: #1f2a48; display: grid; place-items: center; font-weight: 900; }
.xm-mrow { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; }
.xm-mrow .xm-qt { margin: 0; font-weight: 600; } .xm-mrow .xm-ex { grid-column: 1 / -1; }
.xm-sel { font: inherit; padding: 7px 10px; border-radius: 10px; border: 2px solid var(--line); background: var(--card); color: inherit; min-width: 74px; }
.xm-q.ok .xm-sel { border-color: var(--green); background: var(--ok-bg); } .xm-q.bad .xm-sel { border-color: var(--red); background: var(--bad-bg); }
.xm-xnote { font-size: .85rem; }
.xm-cloze { line-height: 2.3; }
.xm-gap { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.xm-gap sup { font-weight: 900; color: var(--blue); }
.xm-gap .xm-sel { padding: 3px 6px; min-width: 0; font-size: .92rem; }
.xm-gap.ok .xm-sel { border-color: var(--green); background: var(--ok-bg); } .xm-gap.bad .xm-sel { border-color: var(--red); background: var(--bad-bg); }
.xm-wordbox { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; border-radius: 14px; border: 2px dashed var(--line); }
.xm-wordbox span { padding: 3px 10px; border-radius: 999px; background: var(--bg2); font-weight: 700; }
.xm-gapex { padding-left: 22px; } .xm-gapex li { margin: 5px 0; }
.xm-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; padding: 14px; border-radius: 14px; border: 2px solid var(--line); background: repeating-linear-gradient(transparent 0 30px, color-mix(in srgb, var(--blue) 6%, transparent) 30px 31px); }
.xm-field { display: grid; gap: 4px; font-weight: 800; font-size: .9rem; }
.xm-field.ok input { border-color: var(--green); background: var(--ok-bg); } .xm-field.bad input { border-color: var(--red); background: var(--bad-bg); }
.xm-field .xm-ex { margin: 0; padding: 2px 8px; }
.xm-en { margin: 6px 0; } .xm-en summary { cursor: pointer; color: var(--ink2); font-weight: 700; }
.xm-task-card { padding: 14px 16px; border-radius: 16px; background: color-mix(in srgb, var(--purple) 9%, var(--card)); border: 2px solid color-mix(in srgb, var(--purple) 30%, transparent); margin: 10px 0; }
.xm-task-card p { margin: 0 0 .6em; }
.xm-points { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.xm-points label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.xm-points input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--green); flex: none; }
.xm-points small { display: block; color: var(--ink2); font-weight: 400; }
.xm-ta { width: 100%; min-height: 200px; font-size: 1.05rem; line-height: 1.6; resize: vertical; }
.xm-wc { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-weight: 800; font-size: .9rem; }
.xm-wcbar { flex: 1; max-width: 240px; height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.xm-wcbar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .3s, background .3s; }
.xm-wcbar.full i { background: var(--green); }
.xm-more { margin: 10px 0; padding: 10px 14px; border-radius: 14px; background: var(--bg2); }
.xm-more summary { cursor: pointer; font-weight: 800; } .xm-more .xm-phr { margin-top: 10px; }
.xm-checklist { margin: 8px 0 0; padding-left: 20px; }
.xm-model { margin: 14px 0; padding: 14px 16px; border-radius: 16px; background: var(--ok-bg); border: 2px solid var(--green); animation: tIn .4s ease-out; }
.xm-model h4 { margin: 0 0 8px; } .xm-model-de p { margin: 0 0 .6em; }
.xm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 12px 0 0; perspective: 900px; }
.xm-card { border: 0; padding: 0; background: none; cursor: pointer; font: inherit; color: inherit; height: 110px; animation: popIn .4s ease-out backwards; }
.xm-card-in { position: relative; display: block; width: 100%; height: 100%; transition: transform .5s; transform-style: preserve-3d; }
.xm-card.flip .xm-card-in { transform: rotateY(180deg); }
.xm-card-f, .xm-card-b { position: absolute; inset: 0; display: grid; place-items: center; padding: 10px; border-radius: 16px; backface-visibility: hidden; text-align: center; font-weight: 800; box-shadow: var(--shadow-sm); }
.xm-card-f { background: var(--card); border: 2px solid var(--gold); }
.xm-card-b { background: var(--gold); color: #1f2a48; transform: rotateY(180deg); font-weight: 700; }
.xm-timer-row { display: flex; gap: 12px; align-items: center; margin: 12px 0; flex-wrap: wrap; }
.xm-tm { font-family: var(--display); font-size: 1.3rem; }
.xm-modelbox { margin-top: 10px; }
.xm-line.now { background: color-mix(in srgb, var(--gold) 25%, transparent); border-radius: 10px; }
.xm-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 2px solid var(--line); }
.xm-score { display: flex; gap: 16px; align-items: center; margin-top: 14px; padding: 16px; border-radius: 18px; background: var(--bg2); animation: popIn .45s ease-out; }
.xm-score.hi { background: var(--ok-bg); } .xm-score.lo { background: var(--bad-bg); } .xm-score.mid { background: #fff3cf; }
:root[data-theme="dark"] .xm-score.mid { background: #3a3215; }
.xm-big { font-size: 2.6rem; }
.xm-partlist { margin: 6px 0; padding-left: 20px; }
.say-btn.sm { width: 28px; height: 28px; font-size: .8rem; }

/* mock */
.xm-mockbar { position: sticky; top: 64px; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 12px; border-radius: 16px; background: var(--brand); color: var(--bg); box-shadow: var(--shadow); }
.xm-clock { font-family: var(--display); font-size: 1.25rem; padding: 2px 10px; border-radius: 10px; background: rgba(255, 255, 255, .15); }
.xm-clock.low { background: var(--red); color: #fff; animation: blinkTxt 1s infinite; }
.xm-mt { animation: tIn .4s ease-out backwards; }
.xm-mockhero { background: radial-gradient(circle at 0 0, var(--lv) 0, transparent 50%), linear-gradient(135deg, #14213d, #1f2a48); }
.xm-trophy { font-size: 4.5rem; filter: grayscale(1) opacity(.5); transition: filter .5s; z-index: 1; }
.xm-trophy.won { filter: none; animation: jump 1.2s ease-in-out infinite; }
.xm-final { font-size: 1.15rem; }
.xm-parts { display: grid; gap: 12px; margin: 10px 0 16px; }
.xm-part { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; color: inherit; text-decoration: none; animation: slideIn .4s ease-out backwards; transition: transform .2s; }
a.xm-part:hover { transform: translateX(4px); }
.xm-part small { display: block; color: var(--ink2); }
.xm-speakpart { grid-template-columns: 44px 1fr; }
.xm-hist { display: flex; flex-wrap: wrap; gap: 6px; }

/* words */
.xm-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.xm-theme { display: grid; gap: 2px; text-align: center; justify-items: center; color: inherit; text-decoration: none; border-bottom: 5px solid var(--lv); transition: transform .2s; animation: popIn .4s ease-out backwards; }
.xm-theme:hover { transform: translateY(-4px) scale(1.02); }
.xm-theme span { font-size: 2rem; } .xm-theme small { color: var(--ink2); }
.xm-words { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 12px 0; }
.xm-w { display: grid; gap: 1px; text-align: left; padding: 9px 12px; border-radius: 12px; border: 0; border-left: 5px solid #b9bfd0; background: var(--card); box-shadow: var(--shadow-sm); font: inherit; color: inherit; cursor: pointer; animation: tIn .3s ease-out backwards; transition: transform .15s; }
.xm-w:hover { transform: translateY(-2px); }
.xm-w.der { border-left-color: var(--der); } .xm-w.die { border-left-color: var(--die); } .xm-w.das { border-left-color: var(--das); }
.xm-w i { font-style: normal; font-size: .78rem; color: var(--ink2); } .xm-w small { color: var(--ink2); }
.xm-words.noen .xm-w small { filter: blur(5px); } .xm-words.noen .xm-w:hover small { filter: none; }
.xm-der { color: var(--der); font-weight: 900; } .xm-die { color: var(--die); font-weight: 900; } .xm-das { color: var(--das); font-weight: 900; }
.xm-quiz { text-align: center; padding: 16px; border-radius: 18px; background: var(--bg2); margin: 10px 0; animation: popIn .3s ease-out; }
.xm-quiz h3 { margin: 6px 0 12px; font-size: 1.4rem; }
.xm-qopts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.xm-qo.right { background: var(--ok-bg) !important; border-color: var(--green) !important; } .xm-qo.wrong { background: var(--bad-bg) !important; border-color: var(--red) !important; animation: shake .4s; }
.xm-filter { margin: 8px 0 12px; max-width: 360px; }
.xm-tblwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.xm-tbl { border-collapse: collapse; width: 100%; margin: 6px 0 12px; font-size: .95rem; }
.xm-tbl th, .xm-tbl td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.xm-tbl th { background: var(--bg2); font-weight: 900; }
.xm-tbl tr:nth-child(even) td { background: color-mix(in srgb, var(--bg2) 50%, transparent); }
.xm-ist { color: var(--purple); font-weight: 800; }
.xm-pvs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.xm-pv { padding: 12px 14px; } .xm-pv small { display: block; color: var(--ink2); } .xm-pv p { margin: 8px 0 0; }
.xm-prep { color: var(--blue); }
.xm-case { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: .72rem; font-weight: 900; color: #fff; }
.xm-case.akk { background: var(--die); } .xm-case.dat { background: var(--das); }
.xm-cons { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.xm-con { padding: 10px 12px; border-radius: 14px; background: var(--bg2); } .xm-con > b { font-size: 1.1rem; color: var(--blue); } .xm-con > small { margin-left: 6px; color: var(--ink2); } .xm-con p { margin: 6px 0 0; font-size: .92rem; }
.xm-rm { margin-bottom: 10px; } .xm-rm summary { cursor: pointer; } .xm-rm summary small { color: var(--ink2); }

/* notes */
.xm-ntoc { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 16px; }
.xm-ntoc a { padding: 5px 12px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow-sm); font-size: .85rem; font-weight: 700; color: inherit; text-decoration: none; }
.xm-ntoc a.on { background: var(--gold); color: #1f2a48; }
.xm-notes { display: grid; gap: 14px; }
.xm-note { animation: tIn .4s ease-out backwards; border-top: 6px solid var(--gold); }
.xm-nh { display: flex; align-items: center; gap: 12px; } .xm-nh h2 { margin: 0; flex: 1; } .xm-nh small { color: var(--ink2); }
.xm-nh span { width: 38px; height: 38px; border-radius: 12px; background: var(--gold); color: #1f2a48; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 1.1rem; }
.xm-note h4 { margin: 14px 0 6px; color: var(--blue); }

@media (max-width: 1000px) { .xm-road { grid-template-columns: 1fr; } .xm-tools { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .xm-hero { grid-template-columns: 1fr; padding: 20px 16px; }
  .xm-hero-art { display: none; }
  .xm-lvls { grid-template-columns: 1fr; }
  .xm-tools { grid-template-columns: 1fr 1fr; gap: 8px; } .xm-tool { padding: 12px; }
  .xm-whead { grid-template-columns: 1fr; gap: 10px; padding: 16px; } .xm-wn { width: 64px; height: 64px; border-radius: 16px; } .xm-wn b { font-size: 1.6rem; }
  .xm-days { grid-template-columns: 1fr; }
  .xm-opts { padding-left: 0; } .xm-ex { margin-left: 0; } .xm-opts.two { grid-template-columns: 1fr 1fr; }
  .xm-mrow { grid-template-columns: 1fr; } .xm-mrow .xm-sel { justify-self: start; }
  .xm-thead { grid-template-columns: 1fr; } .xm-tico { display: none; }
  .xm-mockbar { top: 56px; } .xm-mockbar b { font-size: .85rem; }
  .xm-score { flex-direction: column; align-items: flex-start; }
  .xm-words { grid-template-columns: 1fr 1fr; } .xm-qopts { grid-template-columns: 1fr; }
  .xm-part { grid-template-columns: 40px 1fr; } .xm-part > :last-child:not(div) { grid-column: 2; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { .xm-hero::after, .xm-cert, .xm-node.now .xm-dot, .xm-ph-ico, .xm-trophy.won { animation: none; } }
@media print {
  .topbar, .no-print, .more-sheet, .more-backdrop, .toast, .bottom-nav, .tabbar { display: none !important; }
  body { background: #fff !important; } #app { padding: 0 !important; max-width: none !important; }
  .xm-note { box-shadow: none !important; border: 1px solid #ccc; break-inside: avoid; page-break-inside: avoid; animation: none !important; }
}

/* ===================== WRITING COACH ===================== */
.ck-badge-off { background: linear-gradient(135deg, #22b573, #2ec4b6) !important; color: #fff !important; }
.ck-crit { display: grid; gap: 8px; margin: 14px 0 8px; }
.ck-row { display: grid; grid-template-columns: 30px 120px 1fr 40px; gap: 10px; align-items: center; animation: slideIn .4s ease-out backwards; }
.ck-ic { font-size: 1.3rem; } .ck-l b { display: block; font-size: .92rem; } .ck-l small { color: var(--ink2); font-size: .75rem; }
.ck-track { height: 12px; border-radius: 99px; background: var(--line); overflow: hidden; }
.ck-track i { display: block; height: 100%; width: var(--w); border-radius: 99px; background: var(--green); animation: ckFill 1s cubic-bezier(.2, .8, .2, 1) backwards; }
.ck-track i.mid { background: var(--gold); } .ck-track i.lo { background: var(--red); }
@keyframes ckFill { from { width: 0; } }
.ck-v { font-family: var(--display); font-size: 1.1rem; text-align: right; }
.ck-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; } .ck-facts span { padding: 3px 10px; border-radius: 99px; background: var(--bg2); font-size: .8rem; font-weight: 700; }
.ck-note { font-size: .85rem; margin-top: 14px; }
.ck-hunt-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; justify-content: space-between; margin-bottom: 14px; }
.ck-hunt-stats { display: flex; gap: 10px; flex-wrap: wrap; } .ck-hunt-stats span { padding: 6px 12px; border-radius: 12px; background: var(--card); box-shadow: var(--shadow-sm); font-weight: 700; }
.ck-hunt { animation: popIn .35s ease-out; }
.ck-badge { display: inline-block; padding: 3px 10px; border-radius: 99px; background: var(--red); color: #fff; font-weight: 900; font-size: .75rem; letter-spacing: .05em; }
.ck-wrong { font-size: 1.3rem; font-weight: 700; margin: .6em 0 .3em; padding: 12px 14px; border-radius: 14px; background: var(--bad-bg); border-left: 5px solid var(--red); }
.ck-fix { width: 100%; font-size: 1.1rem; }
.ck-res { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg2); animation: popIn .3s ease-out; }
.ck-res.ok { background: var(--ok-bg); } .ck-res.bad { background: var(--bad-bg); }
.ck-diff { font-size: 1.05rem; line-height: 1.7; } .ck-diff del { color: var(--red); text-decoration: line-through; } .ck-diff ins { color: #138a55; font-weight: 800; text-decoration: none; background: rgba(34, 181, 115, .15); border-radius: 4px; padding: 0 2px; }
.ck-hint { padding: 8px 12px; border-radius: 12px; background: #fff6dd; color: #6b4e00; }
:root[data-theme="dark"] .ck-hint { background: #3a3215; color: #ffe08a; }
.xm-points li .xm-pmark { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--bg2); font-weight: 900; font-size: .8rem; flex: none; }
.xm-points li { display: flex; gap: 10px; align-items: flex-start; }
.xm-points li.ok .xm-pmark { background: var(--green); color: #fff; } .xm-points li.no .xm-pmark { background: var(--red); color: #fff; }
.xm-phrows { display: grid; gap: 6px; margin-top: 10px; }
.xm-phrow { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 10px; background: var(--card); }
.xm-phrow small { display: block; color: var(--ink2); } .xm-ins.done { background: var(--ok-bg); }
.xm-uml { margin-top: 6px; }

/* ===================== LISTENING GYM ===================== */
.ls-hero, .lf-hero, .dm-hero, .pl-hero, .gm-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 24px 22px; margin-bottom: 16px; border-radius: 26px; color: #fff; box-shadow: 0 16px 40px rgba(31, 42, 72, .3); animation: tIn .5s ease-out; }
.ls-hero h1, .lf-hero h1, .dm-hero h1, .pl-hero h1, .gm-hero h1 { color: #fff; margin: 8px 0 6px; font-size: clamp(1.5rem, 4.6vw, 2.2rem); }
.ls-hero p, .lf-hero p, .dm-hero p, .pl-hero p, .gm-hero p { margin: 0 0 10px; opacity: .95; }
.ls-hero { background: radial-gradient(circle at 10% 0%, #2ec4b6 0, transparent 45%), linear-gradient(135deg, #0b3954, #087e8b 70%, #2ec4b6); }
.ls-hstats { display: flex; gap: 10px; flex-wrap: wrap; } .ls-hstats span { padding: 5px 12px; border-radius: 99px; background: rgba(255, 255, 255, .15); font-weight: 700; }
.ls-hero-art { position: relative; width: 170px; height: 120px; }
.ls-eq { position: absolute; inset: 20px 0 0; display: flex; align-items: flex-end; gap: 5px; }
.ls-eq i { flex: 1; border-radius: 4px; background: linear-gradient(#ffc23c, #ff8c42); animation: lsEq 1.1s ease-in-out infinite alternate; height: 30%; }
.ls-eq i:nth-child(odd) { animation-duration: .8s; } .ls-eq i:nth-child(3n) { animation-delay: .2s; } .ls-eq i:nth-child(4n) { animation-delay: .45s; }
@keyframes lsEq { from { height: 12%; } to { height: 95%; } }
.ls-ear { position: absolute; right: -8px; top: -10px; font-size: 3rem; animation: bob 2.4s ease-in-out infinite; }
.ls-tabs { margin: 0 0 14px; }
.ls-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 14px; }
.ls-big-card { display: grid; gap: 4px; color: inherit; text-decoration: none; border-top: 6px solid var(--c); transition: transform .2s; animation: popIn .4s ease-out backwards; }
.ls-big-card:hover { transform: translateY(-4px) rotate(-.4deg); } .ls-big-card span { font-size: 2.2rem; } .ls-big-card small { color: var(--ink2); }
.ls-tips li { margin: 6px 0; }
.ls-modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 14px; }
.ls-mode { display: grid; gap: 4px; justify-items: start; color: inherit; text-decoration: none; position: relative; animation: popIn .4s ease-out backwards; transition: transform .2s; }
.ls-mode:hover { transform: translateY(-3px); } .ls-mode small { color: var(--ink2); }
.ls-mico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.6rem; background: var(--bg2); font-weight: 900; }
.ls-best { position: absolute; top: 10px; right: 10px; font-size: .75rem; font-weight: 800; }
.ls-drill { animation: popIn .35s ease-out; }
.ls-prog { font-size: .9rem; color: var(--ink2); }
.ls-player { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px; margin: 14px 0; border-radius: 18px; background: linear-gradient(135deg, #0b3954, #087e8b); color: #fff; justify-content: center; }
.ls-player .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .08); }
.ls-wave { display: inline-flex; gap: 3px; align-items: center; height: 30px; }
.ls-wave i { width: 4px; height: 6px; border-radius: 3px; background: var(--gold); opacity: .5; }
.ls-player.playing .ls-wave i { opacity: 1; animation: xmWave .8s ease-in-out infinite alternate; }
.ls-player.playing .ls-wave i:nth-child(2n) { animation-delay: .15s; } .ls-player.playing .ls-wave i:nth-child(3n) { animation-delay: .3s; }
@keyframes xmWave { from { height: 4px; } to { height: 28px; } }
.ls-plays { color: #cfe; }
.ls-in { display: flex; gap: 8px; } .ls-in input { flex: 1; font-size: 1.2rem; text-align: center; }
.ls-ta { width: 100%; font-size: 1.1rem; }
.ls-res { margin-top: 10px; padding: 10px 14px; border-radius: 14px; animation: popIn .3s ease-out; }
.ls-res.ok { background: var(--ok-bg); } .ls-res.bad { background: var(--bad-bg); }
.ls-done { text-align: center; padding: 10px; } .ls-done .xm-ring { margin: 0 auto; width: 96px; height: 96px; }
.ls-ph { margin: 18px 0 8px; }
.ls-clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.ls-clip { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; color: inherit; text-decoration: none; border-left: 5px solid var(--lv); padding: 12px 14px; animation: slideIn .35s ease-out backwards; transition: transform .2s; }
.ls-clip:hover { transform: translateX(3px); } .ls-clip small { display: block; color: var(--ink2); } .ls-clip.done { opacity: .85; }
.ls-cico { font-size: 1.6rem; }
.ls-cliproom { border-top: 6px solid var(--lv); }
.ls-chead { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; }
.ls-cbig { font-size: 2.6rem; width: 70px; height: 70px; border-radius: 20px; display: grid; place-items: center; background: var(--bg2); animation: popIn .4s ease-out; }
.ls-reals { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.ls-real { padding: 12px 14px; animation: popIn .35s ease-out backwards; } .ls-said { font-size: 1.15rem; }
.ls-full { margin: 6px 0 2px; font-weight: 700; color: var(--blue); } .ls-en { margin: 0 0 4px; }
.ls-qopts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ls-qo.right { background: var(--ok-bg) !important; border-color: var(--green) !important; } .ls-qo.wrong { background: var(--bad-bg) !important; border-color: var(--red) !important; animation: shake .4s; }

/* ===================== CONVERSATIONS ===================== */
.cv-intro { display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: center; }
.cv-intro-av svg { width: 110px; height: auto; }
.cv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.cv-card { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; color: inherit; text-decoration: none; border-left: 5px solid var(--lv); animation: popIn .35s ease-out backwards; transition: transform .2s; }
.cv-card:hover { transform: translateY(-3px); }
.cv-av svg { width: 64px; height: auto; } .cv-info b { display: block; margin-top: 4px; } .cv-info small { color: var(--ink2); }
.cv-go { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; font-weight: 900; }
.cv-room { animation: tIn .4s ease-out; }
.cv-top { display: flex; gap: 14px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 10px; }
.cv-progress { min-width: 160px; display: grid; gap: 4px; justify-items: end; }
.cv-pbar { width: 180px; height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; } .cv-pbar i { display: block; height: 100%; width: 0; background: var(--lv); transition: width .5s; border-radius: 99px; }
.cv-stage { display: grid; grid-template-columns: 170px 1fr; gap: 16px; align-items: end; padding: 18px; border-radius: 24px; background: linear-gradient(180deg, color-mix(in srgb, var(--lv) 14%, var(--card)), var(--card)); border: 2px solid color-mix(in srgb, var(--lv) 30%, transparent); margin-bottom: 12px; }
.cv-partner { text-align: center; } .cv-partner svg { width: 160px; height: auto; } .cv-name { display: block; font-weight: 800; font-size: .85rem; color: var(--ink2); }
.cv-bubble { position: relative; padding: 16px 18px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow); align-self: center; }
.cv-bubble::before { content: ''; position: absolute; left: -12px; bottom: 30px; border: 12px solid transparent; border-right-color: var(--card); border-left: 0; }
.cv-bubble.pop { animation: popIn .35s ease-out; }
.cv-de { font-size: 1.25rem; font-weight: 700; margin: 0 0 6px; } .cv-en { color: var(--ink2); margin: 0 0 8px; }
.cv-me { animation: tIn .35s ease-out; }
.cv-start { text-align: center; }
.cv-wait { display: flex; gap: 10px; align-items: center; justify-content: center; color: var(--ink2); } .cv-wait svg { width: 40px; height: auto; } .cv-wait span { font-size: 2rem; animation: blinkTxt 1s infinite; }
.cv-task { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.cv-you { padding: 4px 12px; border-radius: 99px; background: var(--gold); color: #1f2a48; font-weight: 900; animation: pulseGold 1.6s ease-in-out infinite; }
@keyframes pulseGold { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 194, 60, .6); } 50% { box-shadow: 0 0 0 8px rgba(255, 194, 60, 0); } }
.cv-tasktext { margin: 0; font-weight: 700; font-size: 1.05rem; }
.cv-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cv-mic.listening { animation: pulse 1.2s infinite; }
.cv-type { display: flex; gap: 8px; margin-top: 10px; } .cv-type input { flex: 1; }
.cv-res { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg2); animation: popIn .3s ease-out; }
.cv-res.ok { background: var(--ok-bg); } .cv-res.bad { background: var(--bad-bg); }
.cv-alt { margin: 8px 0; }
.cv-present { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; margin-bottom: 10px; }
.cv-timer { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--bg); font-family: var(--display); font-size: 1.5rem; }
.cv-timer.low { background: var(--red); color: #fff; animation: blinkTxt 1s infinite; }
.cv-live { min-height: 60px; padding: 10px 12px; border-radius: 14px; border: 2px dashed var(--line); color: var(--ink2); font-style: italic; }
.cv-end { text-align: center; } .cv-end .xm-ring { margin: 0 auto; width: 110px; height: 110px; } .cv-end .xm-ring b { font-size: 1.5rem; }

/* ===================== LIVING IN GERMANY ===================== */
.lf-hero { background: radial-gradient(circle at 100% 0%, #ffce00 0, transparent 35%), radial-gradient(circle at 0% 100%, #dd0000 0, transparent 40%), linear-gradient(135deg, #1a1a1a, #3d1f1f 60%, #6b1d1d); }
.lf-hprog { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.lf-art { position: relative; width: 190px; height: 170px; } .lf-art svg { position: absolute; left: 40px; bottom: 0; width: 110px; height: auto; }
.lf-b { position: absolute; font-size: 1.8rem; animation: lfFloat 4s ease-in-out infinite; }
.lf-b.b1 { left: 0; top: 10px; } .lf-b.b2 { right: 0; top: 0; animation-delay: .6s; } .lf-b.b3 { left: 10px; bottom: 30px; animation-delay: 1.2s; } .lf-b.b4 { right: 10px; bottom: 40px; animation-delay: 1.8s; } .lf-b.b5 { left: 80px; top: -6px; animation-delay: 2.4s; }
@keyframes lfFloat { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-10px) rotate(6deg); } }
.lf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 14px; }
.lf-card { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; color: inherit; text-decoration: none; border-left: 6px solid var(--c); animation: popIn .35s ease-out backwards; transition: transform .2s; }
.lf-card:hover { transform: translateY(-3px); }
.lf-ico { font-size: 2rem; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 15%, var(--card)); }
.lf-card small { color: var(--ink2); display: block; } .lf-card b { display: block; }
.lf-bar, .pl-wbar, .gm-lvbar { display: block; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 6px; }
.lf-bar i, .pl-wbar i, .gm-lvbar i { display: block; height: 100%; background: var(--c, var(--green)); border-radius: 99px; animation: exGrow 1s ease-out; transform-origin: left; }
.lf-ok { width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 900; }
.lf-thead { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; padding: 20px; border-radius: 24px; margin-bottom: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 18%, var(--card)), var(--card)); border: 2px solid color-mix(in srgb, var(--c) 35%, transparent); animation: tIn .45s ease-out; }
.lf-thead h1 { margin: .2em 0; } .lf-thead p { margin: 0; }
.lf-tico { font-size: 3rem; width: 86px; height: 86px; border-radius: 24px; display: grid; place-items: center; background: var(--c); box-shadow: 0 8px 0 color-mix(in srgb, var(--c) 60%, #000); animation: popIn .5s ease-out; }
.lf-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.lf-fact { display: grid; grid-template-columns: auto 1fr; gap: 12px; animation: popIn .4s ease-out backwards; } .lf-fact p { margin: 4px 0 0; }
.lf-fico { font-size: 1.8rem; }
.lf-steps ul { list-style: none; margin: 0; padding: 0; } .lf-steps li { padding: 6px 0; border-top: 1px dashed var(--line); } .lf-steps li:first-child { border-top: 0; }
.lf-steps label { display: flex; gap: 10px; cursor: pointer; } .lf-steps input { width: 20px; height: 20px; accent-color: var(--green); flex: none; margin-top: 2px; }
.lf-steps li.on span { text-decoration: line-through; opacity: .65; }
.lf-tips li { margin: 6px 0; } .lf-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.lf-dia .lf-lines { display: grid; gap: 10px; margin-top: 12px; }
.lf-line { display: grid; grid-template-columns: 54px 1fr; gap: 10px; align-items: end; transition: transform .3s; }
.lf-line.me { grid-template-columns: 1fr 54px; } .lf-line.me .lf-av { order: 2; } .lf-line.me .lf-bub { background: color-mix(in srgb, var(--gold) 22%, var(--card)); }
.lf-av svg { width: 54px; height: auto; }
.lf-bub { padding: 10px 12px; border-radius: 16px; background: var(--bg2); } .lf-bub small { color: var(--ink2); font-weight: 800; } .lf-bub p { margin: 2px 0; }
.lf-line.now { transform: scale(1.02); } .lf-line.now .lf-bub { box-shadow: 0 0 0 3px var(--gold); }
.lf-en { color: var(--ink2); font-size: .9rem; }
.lf-paper { position: relative; padding: 22px 20px 18px; border-radius: 6px; background: #fffdf6; color: #1f2a48; box-shadow: 0 10px 24px rgba(0, 0, 0, .12); font-family: 'Courier New', ui-monospace, monospace; font-size: .92rem; line-height: 1.5; transform: rotate(-.6deg); animation: popIn .45s ease-out; }
.lf-paper::after { content: ''; position: absolute; top: -10px; left: 50%; width: 80px; height: 22px; margin-left: -40px; background: rgba(255, 206, 0, .55); transform: rotate(2deg); }
.lf-pkind { font-family: var(--font); font-weight: 900; font-size: .75rem; letter-spacing: .1em; color: #8a6d1f; margin-bottom: 8px; text-transform: uppercase; }
.lf-sms { background: #e8f5e9; border-radius: 18px; transform: none; font-family: var(--font); } .lf-sms::after { display: none; }
.lf-good { color: var(--green); }

/* ===================== MOTIVATION ===================== */
#stat-xp { position: relative; cursor: pointer; background: radial-gradient(closest-side, var(--card) 86%, transparent 88%) padding-box, conic-gradient(var(--gold) var(--gp, 0%), var(--line) 0) border-box; border: 3px solid transparent; }
#stat-xp.gm-goaldone { box-shadow: 0 0 0 2px var(--green); }
#stat-xp.gm-hit { animation: bump .45s; }
.gm-lvb { position: absolute; right: -8px; bottom: -8px; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 99px; background: var(--purple); color: #fff; font-style: normal; font-weight: 900; font-size: .7rem; display: grid; place-items: center; box-shadow: 0 2px 0 rgba(0, 0, 0, .2); }
.gm-fly { position: fixed; z-index: 9999; pointer-events: none; transform: translate(-50%, -50%); font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: #fff; background: linear-gradient(135deg, #ffc23c, #ff8c42); padding: 4px 10px; border-radius: 99px; box-shadow: 0 6px 16px rgba(255, 140, 66, .45); animation: gmPopIn .25s ease-out; }
.gm-fly.go { transition: transform .75s cubic-bezier(.55, -0.35, .7, 1), opacity .75s; opacity: .3; }
@keyframes gmPopIn { from { transform: translate(-50%, -50%) scale(.4); } to { transform: translate(-50%, -50%) scale(1); } }
.gm-burst { position: fixed; z-index: 9998; pointer-events: none; width: 0; height: 0; }
.gm-burst i { position: absolute; width: 9px; height: 9px; border-radius: 50%; left: -4px; top: -4px; animation: gmBurst .7s cubic-bezier(.2, .8, .3, 1) forwards; font-style: normal; font-size: 14px; line-height: 9px; }
@keyframes gmBurst { 0% { transform: translate(0, 0) scale(.4); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1.1); opacity: 0; } }
#gmPops { position: fixed; z-index: 9990; right: 16px; top: 76px; display: grid; gap: 8px; width: min(340px, calc(100vw - 32px)); pointer-events: none; }
.gm-pop { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 18px; background: var(--card); color: var(--ink); box-shadow: 0 12px 30px rgba(0, 0, 0, .2); border-left: 6px solid var(--gold); animation: gmSlide .45s cubic-bezier(.2, 1.4, .4, 1); pointer-events: auto; }
.gm-pop.badge { border-left-color: var(--purple); } .gm-pop.goal { border-left-color: var(--green); } .gm-pop.streak { border-left-color: #ff6b35; }
.gm-pop small { display: block; color: var(--ink2); } .gm-pop.out { animation: gmOut .45s ease-in forwards; }
@keyframes gmSlide { from { transform: translateX(120%) scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes gmOut { to { transform: translateX(120%); opacity: 0; } }
.gm-pico { font-size: 2rem; } .gm-shine { animation: gmShine 1.2s ease-out; } .gm-flame { animation: flicker .4s ease-in-out infinite alternate; display: inline-block; }
@keyframes gmShine { 0% { transform: scale(.3) rotate(-30deg); filter: brightness(2); } 60% { transform: scale(1.3) rotate(10deg); } 100% { transform: none; filter: none; } }
.gm-ov { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; background: rgba(15, 20, 40, .7); backdrop-filter: blur(3px); animation: fadeIn .25s ease-out; padding: 16px; }
.gm-ov.out { animation: fadeOut .28s ease-in forwards; }
@keyframes fadeIn { from { opacity: 0; } } @keyframes fadeOut { to { opacity: 0; } }
.gm-rays { position: absolute; width: 900px; height: 900px; left: 50%; top: 50%; margin: -450px 0 0 -450px; background: repeating-conic-gradient(rgba(255, 206, 0, .18) 0 10deg, transparent 10deg 20deg); border-radius: 50%; animation: gmSpin 14s linear infinite; mask-image: radial-gradient(circle, #000 20%, transparent 65%); -webkit-mask-image: radial-gradient(circle, #000 20%, transparent 65%); }
@keyframes gmSpin { to { transform: rotate(360deg); } }
.gm-card { position: relative; text-align: center; padding: 28px 30px; border-radius: 28px; background: var(--card); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .4); max-width: 380px; animation: gmCardIn .55s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes gmCardIn { from { transform: scale(.4) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
.gm-card h2 { margin: 10px 0 6px; font-size: 2rem; }
.gm-lvbig { width: 120px; height: 120px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#ffc23c, #ff8c42, #ff4d6d, #9b5de5, #3a86ff, #22b573, #ffc23c); animation: gmSpin 4s linear infinite; }
.gm-lvbig span { width: 96px; height: 96px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-family: var(--display); font-size: 3rem; animation: gmSpin 4s linear infinite reverse; }
.gm-newtitle { font-size: 1.1rem; }
.gm-chest { font-size: 5rem; animation: gmChest 1.2s ease-in-out; }
@keyframes gmChest { 0% { transform: scale(.3); } 30% { transform: scale(1.2) rotate(-12deg); } 45% { transform: rotate(12deg); } 60% { transform: rotate(-8deg); } 75% { transform: scale(1.1); } 100% { transform: none; } }
.gm-home { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 12px; margin-bottom: 16px; }
.gm-home .card { margin: 0; }
.gm-lvcard { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.gm-lvcard small { display: block; color: var(--ink2); } .gm-xpline { display: block; font-family: var(--display); font-size: 1.3rem; }
.gm-lvring, .gm-goalring, .gm-qring { --p: 0; position: relative; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(closest-side, var(--card) 76%, transparent 78%), conic-gradient(var(--purple) calc(var(--p) * 1%), var(--line) 0); animation: popIn .5s ease-out; flex: none; }
.gm-lvring span, .gm-goalring span { display: grid; text-align: center; line-height: 1; } .gm-lvring b, .gm-goalring b { font-family: var(--display); font-size: 1.5rem; } .gm-lvring small, .gm-goalring small { font-size: .65rem; color: var(--ink2); }
.gm-lvring.big { width: 120px; height: 120px; background: radial-gradient(closest-side, #1f2a48 78%, transparent 80%), conic-gradient(var(--gold) calc(var(--p) * 1%), rgba(255, 255, 255, .2) 0); } .gm-lvring.big b { font-size: 2.6rem; color: #fff; } .gm-lvring.big small { color: #cfd6ee; }
.gm-goalring { background: radial-gradient(closest-side, var(--card) 76%, transparent 78%), conic-gradient(var(--green) calc(var(--p) * 1%), var(--line) 0); }
.gm-goalring.done { animation: gmGlow 1.6s ease-in-out infinite; }
@keyframes gmGlow { 50% { box-shadow: 0 0 0 8px rgba(34, 181, 115, .2); } }
.gm-goalcard { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; } .gm-goalcard small { display: block; }
.gm-mixbtn { margin-top: 8px; animation: pulseGold 2s ease-in-out infinite; }
.gm-quests { display: grid; gap: 6px; margin-top: 8px; }
.gm-q { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; color: inherit; text-decoration: none; padding: 6px 8px; border-radius: 12px; transition: background .2s; animation: slideIn .35s ease-out backwards; }
.gm-q:hover { background: var(--bg2); } .gm-q small { display: block; color: var(--ink2); }
.gm-qring { width: 40px; height: 40px; background: radial-gradient(closest-side, var(--card) 72%, transparent 75%), conic-gradient(var(--gold) calc(var(--p) * 1%), var(--line) 0); }
.gm-q.done .gm-qring { background: var(--green); color: #fff; font-weight: 900; }
.gm-q.done b { text-decoration: line-through; opacity: .7; }
.gm-chestrow { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--bg2); }
.gm-chestico { font-size: 1.6rem; animation: bob 2s ease-in-out infinite; } .gm-chestrow.open { background: var(--ok-bg); }
.gm-hero { background: radial-gradient(circle at 0% 0%, #9b5de5 0, transparent 45%), radial-gradient(circle at 100% 100%, #ffc23c 0, transparent 40%), linear-gradient(135deg, #1f2a48, #2b2d6e); grid-template-columns: auto 1fr; }
.gm-hero h1 small { font-size: 1rem; opacity: .8; }
.gm-lvbar.big { height: 12px; background: rgba(255, 255, 255, .2); } .gm-lvbar i { background: linear-gradient(90deg, var(--gold), #ff8c42); }
.gm-heat { grid-template-columns: repeat(14, 1fr); }
.gm-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gm-badge { display: grid; justify-items: center; text-align: center; gap: 2px; padding: 14px 10px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow-sm); filter: grayscale(1); opacity: .6; animation: popIn .35s ease-out backwards; }
.gm-badge.on { filter: none; opacity: 1; box-shadow: 0 0 0 2px var(--gold), var(--shadow-sm); }
.gm-bico { font-size: 2.2rem; } .gm-badge.on .gm-bico { animation: bob 3s ease-in-out infinite; }
.gm-badge small { color: var(--ink2); font-size: .75rem; } .gm-badge em { font-style: normal; font-size: .72rem; color: var(--green); font-weight: 800; }
.gm-bbar { width: 80%; height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 4px; } .gm-bbar i { display: block; height: 100%; background: var(--gold); }

/* ===================== DAILY MIX ===================== */
.dm-hero { background: radial-gradient(circle at 100% 0%, #ffc23c 0, transparent 40%), linear-gradient(135deg, #ff6b35, #ff8c42 50%, #ffc23c); }
.dm-art { position: relative; width: 140px; } .dm-art svg { width: 120px; height: auto; } .dm-bolt { position: absolute; right: 0; top: 0; font-size: 2.6rem; animation: flicker .5s ease-in-out infinite alternate; }
.dm-steps { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 14px; padding-bottom: 12px; }
.dm-step { display: grid; justify-items: center; gap: 2px; opacity: .5; transition: opacity .3s, transform .3s; } .dm-step span { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow-sm); font-size: 1.3rem; }
.dm-step small { font-size: .72rem; font-weight: 800; text-align: center; }
.dm-step.on { opacity: 1; transform: scale(1.12); } .dm-step.on span { box-shadow: 0 0 0 3px var(--gold); animation: pulseGold 1.6s infinite; }
.dm-step.done { opacity: 1; } .dm-step.done span { background: var(--green); color: #fff; }
.dm-track { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; } .dm-track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ff8c42, #ffc23c); transition: width .6s; }
.dm-card { min-height: 260px; } .dm-card.dm-in { animation: dmIn .4s ease-out; }
@keyframes dmIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
.dm-start, .dm-end { text-align: center; padding: 20px 0; } .dm-doneb { color: var(--green); font-weight: 800; }
.dm-trophy { font-size: 5rem; animation: jump 1.2s ease-in-out infinite; }
.dm-flip { position: relative; height: 170px; perspective: 900px; cursor: pointer; margin: 10px 0; }
.dm-face { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; border-radius: 20px; backface-visibility: hidden; transition: transform .5s; box-shadow: var(--shadow); }
.dm-face b { font-size: 1.8rem; } .dm-face small { color: var(--ink2); }
.dm-face.f { background: var(--card); border: 3px solid var(--gold); } .dm-face.b { background: var(--gold); color: #1f2a48; transform: rotateY(180deg); } .dm-face.b small { color: #5a4a10; }
.dm-flip.flip .f { transform: rotateY(-180deg); } .dm-flip.flip .b { transform: rotateY(0); }
.dm-prompt, .dm-q { font-size: 1.2rem; font-weight: 700; }
.dm-nav { margin-top: 12px; justify-content: flex-end; }

/* ===================== MY PLAN ===================== */
.pl-wiz { max-width: 760px; margin: 0 auto; animation: tIn .45s ease-out; }
.pl-wtop { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; }
.pl-bruno svg { width: 110px; height: auto; }
.pl-wbub { position: relative; padding: 14px 16px; border-radius: 20px; background: var(--bg2); }
.pl-wbub::before { content: ''; position: absolute; left: -12px; top: 30px; border: 12px solid transparent; border-right-color: var(--bg2); border-left: 0; }
.pl-wbub b { font-size: 1.2rem; } .pl-wbub p { margin: 4px 0 0; } .pl-wbub.pop { animation: popIn .35s ease-out; }
.pl-dots { display: flex; gap: 6px; justify-content: center; margin: 16px 0; } .pl-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); transition: all .3s; }
.pl-dots i.on { width: 28px; border-radius: 99px; background: var(--gold); } .pl-dots i.done { background: var(--green); }
.pl-body { min-height: 180px; }
.pl-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.pl-opt { display: grid; justify-items: center; gap: 4px; padding: 16px 10px; border-radius: 18px; border: 3px solid var(--line); background: var(--card); color: inherit; font: inherit; cursor: pointer; transition: transform .15s, border-color .15s, background .15s; animation: popIn .35s ease-out backwards; }
.pl-opt span { font-size: 2rem; } .pl-opt:hover { border-color: var(--gold); box-shadow: 0 4px 0 var(--gold); }
.pl-opt.on { border-color: var(--green); background: var(--ok-bg); transform: scale(1.03); }
.pl-date { display: grid; gap: 12px; justify-items: center; } .pl-date input { font-size: 1.2rem; text-align: center; }
.pl-test { text-align: center; } .pl-tq { font-size: 1.3rem; font-weight: 700; } .pl-gap { display: inline-block; min-width: 60px; border-bottom: 3px solid var(--gold); }
.pl-analyse { display: grid; justify-items: center; gap: 12px; } .pl-analyse ul { list-style: none; padding: 0; margin: 0; } .pl-analyse li { margin: 6px 0; opacity: 0; animation: tIn .4s ease-out forwards; font-weight: 700; }
.pl-spin { width: 60px; height: 60px; border-radius: 50%; border: 6px solid var(--line); border-top-color: var(--gold); animation: gmSpin .9s linear infinite; }
.pl-hero { background: radial-gradient(circle at 0% 0%, #22b573 0, transparent 40%), radial-gradient(circle at 100% 100%, #3a86ff 0, transparent 45%), linear-gradient(135deg, #14213d, #1f2a48); }
.pl-hstats { display: flex; gap: 10px; flex-wrap: wrap; } .pl-count { display: grid; padding: 8px 14px; border-radius: 16px; background: rgba(255, 255, 255, .12); text-align: center; } .pl-count b { font-family: var(--display); font-size: 1.6rem; line-height: 1; } .pl-count small { font-size: .75rem; opacity: .85; }
.pl-feas { display: grid; justify-items: center; text-align: center; gap: 4px; width: 210px; padding: 14px; border-radius: 20px; background: rgba(255, 255, 255, .12); }
.pl-feas span { font-size: 2.4rem; animation: bob 2.4s ease-in-out infinite; } .pl-feas b { font-size: 1.2rem; } .pl-feas small { font-size: .82rem; opacity: .9; }
.pl-feas.comfy, .pl-feas.good { box-shadow: inset 0 0 0 2px #22b573; } .pl-feas.tight { box-shadow: inset 0 0 0 2px #ffc23c; } .pl-feas.hard { box-shadow: inset 0 0 0 2px #ff4d6d; }
.pl-day { padding: 12px 14px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow-sm); margin-bottom: 8px; border-left: 5px solid var(--blue); animation: tIn .3s ease-out backwards; }
.pl-day.review { border-left-color: var(--teal); } .pl-day.exam { border-left-color: var(--red); } .pl-day.done { border-left-color: var(--green); } .pl-day.past:not(.done) { opacity: .75; }
.pl-day.today { box-shadow: 0 0 0 3px var(--gold), var(--shadow); }
.pl-dh { display: flex; gap: 12px; align-items: center; } .pl-dh small { display: block; color: var(--ink2); }
.pl-dd { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; align-content: center; background: var(--bg2); line-height: 1; flex: none; } .pl-dd b { font-family: var(--display); font-size: 1.2rem; } .pl-dd small { font-size: .65rem; }
.pl-extra { padding: 1px 6px; border-radius: 99px; background: var(--purple); color: #fff; font-size: .65rem; font-weight: 800; }
.pl-week summary { cursor: pointer; display: grid; gap: 4px; } .pl-wdays { margin-top: 10px; }
.pl-cta, .pl-homecard { margin-bottom: 14px; animation: tIn .4s ease-out; }
.pl-cta { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; color: inherit; text-decoration: none; background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 22%, var(--card)), var(--card)); border: 2px solid var(--gold); }
.pl-cta small, .pl-homecard small { display: block; color: var(--ink2); }
.pl-ctaico { font-size: 2.4rem; animation: bob 2.6s ease-in-out infinite; }
.pl-homecard.free { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; color: inherit; text-decoration: none; }
.pl-chip { padding: 3px 10px; border-radius: 99px; background: var(--gold); color: #1f2a48; font-weight: 800; font-size: .8rem; }
.pl-hprog { display: grid; gap: 4px; margin-top: 8px; }
.pl-missed .btn { margin-left: 8px; }
.wr-ring { --p: 0; }

@media (max-width: 1000px) { .gm-home { grid-template-columns: 1fr 1fr; } .gm-questcard { grid-column: 1 / -1; } }
@media (max-width: 640px) {
  .ls-hero, .lf-hero, .dm-hero, .pl-hero, .gm-hero { grid-template-columns: 1fr; padding: 20px 16px; }
  .ls-hero-art, .lf-art, .dm-art { display: none; }
  .pl-feas { width: auto; }
  .ls-cards { grid-template-columns: 1fr 1fr; gap: 8px; } .ls-big-card { padding: 12px; }
  .ck-row { grid-template-columns: 26px 92px 1fr 34px; gap: 6px; }
  .cv-stage { grid-template-columns: 1fr; justify-items: center; padding: 12px; } .cv-partner svg { width: 110px; } .cv-bubble::before { display: none; }
  .cv-intro { grid-template-columns: 1fr; } .cv-intro-av { display: none; }
  .cv-card { grid-template-columns: 52px 1fr auto; } .cv-av svg { width: 52px; }
  .lf-thead { grid-template-columns: 1fr; } .lf-tico { width: 64px; height: 64px; font-size: 2.2rem; }
  .gm-home { grid-template-columns: 1fr; }
  .dm-steps { gap: 2px; } .dm-step span { width: 36px; height: 36px; font-size: 1.05rem; } .dm-step small { font-size: .6rem; }
  .pl-wtop { grid-template-columns: 70px 1fr; } .pl-bruno svg { width: 70px; }
  .pl-opts { grid-template-columns: 1fr 1fr; }
  .ls-qopts { grid-template-columns: 1fr; }
  #gmPops { top: auto; bottom: 86px; right: 12px; }
}
@media (prefers-reduced-motion: reduce) { .ls-eq i, .lf-b, .gm-rays, .gm-lvbig, .gm-lvbig span, .dm-bolt, .gm-mixbtn, .cv-you, .pl-ctaico, .pl-feas span { animation: none !important; } }

/* ===================== GAMES ARCADE ===================== */
.ga-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 24px 22px; margin-bottom: 16px; border-radius: 26px; color: #fff; background: radial-gradient(circle at 0 0, #ff006e 0, transparent 40%), radial-gradient(circle at 100% 100%, #3a86ff 0, transparent 45%), linear-gradient(135deg, #240046, #3c096c 60%, #5a189a); box-shadow: 0 16px 40px rgba(60, 9, 108, .35); animation: tIn .5s ease-out; }
.ga-hero h1 { color: #fff; margin: 8px 0 6px; font-size: clamp(1.6rem, 5vw, 2.4rem); } .ga-hero p { margin: 0 0 10px; opacity: .95; }
.ga-art { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 2.4rem; } .ga-art span { animation: bob 2.2s ease-in-out infinite; } .ga-art span:nth-child(2) { animation-delay: .4s; } .ga-art span:nth-child(3) { animation-delay: .8s; } .ga-art span:nth-child(4) { animation-delay: 1.2s; }
.ga-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.ga-card { position: relative; display: grid; gap: 4px; color: inherit; text-decoration: none; border-bottom: 6px solid var(--gc); overflow: hidden; animation: popIn .4s ease-out backwards; transition: transform .2s; }
.ga-card::before { content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: color-mix(in srgb, var(--gc) 18%, transparent); transition: transform .4s; }
.ga-card:hover { transform: translateY(-5px) rotate(-.6deg); } .ga-card:hover::before { transform: scale(1.4); }
.ga-ico { font-size: 2.6rem; position: relative; } .ga-card small { color: var(--ink2); }
.ga-best, .ga-new { position: absolute; top: 12px; right: 12px; padding: 2px 8px; border-radius: 99px; font-size: .72rem; font-weight: 900; }
.ga-best { background: var(--gold); color: #1f2a48; } .ga-new { background: var(--red); color: #fff; animation: pulseGold 1.8s infinite; }
.ga-box { border-top: 6px solid var(--gc); min-height: 380px; position: relative; overflow: hidden; }
.ga-intro { text-align: center; padding: 20px 0; } .ga-big { font-size: 4rem; display: inline-block; animation: jump 1.6s ease-in-out infinite; }
.ga-hud { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 800; margin-bottom: 8px; }
.ga-pts b { font-family: var(--display); font-size: 1.6rem; color: var(--gc, var(--ink)); }
.ga-lives { font-size: 1.2rem; letter-spacing: 2px; } .ga-combo { color: #ff6b35; font-weight: 900; animation: popIn .3s; }
.ga-timebar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; margin-bottom: 14px; }
.ga-timebar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #22b573, #ffc23c); border-radius: 99px; }
.ga-timebar i.low { background: var(--red); animation: blinkTxt .6s infinite; }
.ga-float { position: fixed; z-index: 9999; pointer-events: none; transform: translate(-50%, 0); font-family: var(--display); font-weight: 700; font-size: 1.3rem; color: var(--green); animation: gaFloat .9s ease-out forwards; text-shadow: 0 2px 0 rgba(0, 0, 0, .1); white-space: nowrap; }
.ga-float.bad { color: var(--red); font-size: 1rem; } .ga-float.big { font-size: 1.8rem; color: #ff6b35; }
@keyframes gaFloat { from { opacity: 1; transform: translate(-50%, 0) scale(.8); } 30% { transform: translate(-50%, -20px) scale(1.15); } to { opacity: 0; transform: translate(-50%, -60px) scale(1); } }
.ga-end { text-align: center; padding: 16px 0; animation: popIn .45s ease-out; }
.ga-trophy { font-size: 4.5rem; } .ga-trophy.rec { animation: jump 1s ease-in-out infinite; }
.ga-score { font-family: var(--display); font-size: 3.4rem; line-height: 1; } .ga-score small { display: block; font-size: .9rem; color: var(--ink2); font-family: var(--font); }
.dd-stage { text-align: center; padding: 26px 10px; border-radius: 22px; background: var(--bg2); margin-bottom: 14px; }
.dd-word { font-family: var(--display); font-size: clamp(2rem, 8vw, 3.2rem); }
.dd-word.in { animation: ddIn .25s ease-out; } .dd-word.shake { animation: shake .4s; color: var(--red); }
@keyframes ddIn { from { transform: translateY(-20px) scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }
.dd-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dd-b { font: inherit; font-family: var(--display); font-size: 1.6rem; padding: 18px 0; border: 0; border-radius: 18px; color: #fff; cursor: pointer; box-shadow: 0 6px 0 rgba(0, 0, 0, .2); transition: transform .08s; }
.dd-b:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0, 0, 0, .2); }
.dd-b.der { background: var(--der); } .dd-b.die { background: var(--die); } .dd-b.das { background: var(--das); }
.mm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; perspective: 900px; }
.mm-card { height: 96px; border: 0; padding: 0; background: none; cursor: pointer; font: inherit; color: inherit; animation: popIn .35s ease-out backwards; }
.mm-in { position: relative; display: block; width: 100%; height: 100%; transition: transform .45s; transform-style: preserve-3d; }
.mm-card.flip .mm-in { transform: rotateY(180deg); }
.mm-f, .mm-b { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 14px; backface-visibility: hidden; padding: 6px; font-weight: 800; font-size: .9rem; text-align: center; }
.mm-f { background: linear-gradient(135deg, #3a86ff, #9b5de5); color: #fff; font-size: 2rem; box-shadow: var(--shadow-sm); }
.mm-b { transform: rotateY(180deg); background: var(--card); border: 3px solid var(--blue); } .mm-b.en { border-color: var(--gold); }
.mm-card.got .mm-b { background: var(--ok-bg); border-color: var(--green); animation: correctPop .4s; }
.sb-en { font-size: 1.1rem; font-weight: 700; text-align: center; }
.sb-line { min-height: 64px; padding: 14px; border-radius: 16px; border: 3px dashed var(--line); font-size: 1.25rem; font-weight: 700; text-align: center; margin-bottom: 12px; }
.sb-line.win { border-color: var(--green); background: var(--ok-bg); } .sb-line.shake { animation: shake .4s; border-color: var(--red); }
.sb-w { display: inline-block; animation: popIn .2s; }
.sb-tiles { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 12px; }
.sb-tile { font: inherit; font-weight: 800; font-size: 1.1rem; padding: 10px 14px; border-radius: 12px; border: 0; background: var(--gold); color: #1f2a48; box-shadow: 0 4px 0 #c99a1f; cursor: pointer; animation: popIn .3s ease-out backwards; transition: transform .1s, opacity .2s; }
.sb-tile:disabled { opacity: .25; transform: scale(.9); box-shadow: none; }
.vb-card { text-align: center; padding: 22px; border-radius: 20px; background: var(--bg2); margin-bottom: 12px; } .vb-card.in { animation: ddIn .25s ease-out; }
.vb-q { font-size: 1.8rem; margin-top: 6px; } .vb-q b:first-child { color: var(--blue); }
.vb-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .vb-o { font-size: 1.2rem; padding: 14px; }
.vb-o.right { background: var(--ok-bg) !important; border-color: var(--green) !important; } .vb-o.wrong { background: var(--bad-bg) !important; border-color: var(--red) !important; animation: shake .4s; }
.bb-sky { position: relative; height: 300px; border-radius: 20px; overflow: hidden; background: linear-gradient(180deg, #bde0fe, #e0f2fe); margin-bottom: 12px; }
:root[data-theme="dark"] .bb-sky { background: linear-gradient(180deg, #1b263b, #26324d); }
.bb { position: absolute; left: var(--x); bottom: -90px; width: 22%; min-width: 74px; aspect-ratio: 1; border-radius: 50%; border: 0; cursor: pointer; font: inherit; font-weight: 800; font-size: .85rem; color: #1f2a48; padding: 6px; background: radial-gradient(circle at 30% 30%, #fff 0, rgba(255, 255, 255, .7) 18%, rgba(173, 216, 230, .65) 60%, rgba(100, 160, 220, .5)); box-shadow: inset -6px -6px 14px rgba(0, 80, 160, .25), 0 6px 14px rgba(0, 0, 0, .1); animation: bbRise var(--s) ease-in-out var(--d) infinite; }
@keyframes bbRise { 0% { transform: translateY(0) translateX(0); } 50% { transform: translateY(-230px) translateX(10px); } 100% { transform: translateY(-390px) translateX(-6px); } }
.bb.pop { animation: bbPop .35s ease-out forwards; } .bb.nope { animation: shake .4s; filter: grayscale(1) opacity(.5); pointer-events: none; }
@keyframes bbPop { to { transform: scale(1.6); opacity: 0; } }
.wo-grid { display: grid; gap: 6px; justify-content: center; margin: 8px 0 12px; }
.wo-row { display: grid; grid-template-columns: repeat(5, 52px); gap: 6px; } .wo-row.shake { animation: shake .4s; }
.wo-t { height: 52px; display: grid; place-items: center; border-radius: 10px; border: 2px solid var(--line); font-family: var(--display); font-size: 1.6rem; text-transform: uppercase; background: var(--card); }
.wo-t.typed { border-color: var(--ink2); animation: popIn .15s; }
.wo-t.f { color: #fff; border-color: transparent; animation: woFlip .5s ease-in-out backwards; animation-delay: calc(var(--i) * .12s); }
.wo-t.g { background: #22b573; } .wo-t.y { background: #e9b500; } .wo-t.x { background: #8a8fa3; }
@keyframes woFlip { 0% { transform: rotateX(90deg); } 100% { transform: none; } }
.wo-kb { display: grid; gap: 6px; } .wo-kr { display: flex; gap: 4px; justify-content: center; }
.wo-k { min-width: 30px; height: 46px; padding: 0 6px; border: 0; border-radius: 8px; background: var(--bg2); color: inherit; font: inherit; font-weight: 800; cursor: pointer; flex: 1; max-width: 44px; }
.wo-k.wide { max-width: 66px; flex: 1.6; } .wo-k.g { background: #22b573; color: #fff; } .wo-k.y { background: #e9b500; color: #fff; } .wo-k.x { background: #8a8fa3; color: #fff; }
.wo-res { text-align: center; padding: 12px; border-radius: 16px; margin-bottom: 12px; animation: popIn .4s; } .wo-res.ok { background: var(--ok-bg); } .wo-res.bad { background: var(--bad-bg); }

/* ===================== READING ROOM ===================== */
.rd-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 24px 22px; margin-bottom: 16px; border-radius: 26px; color: #fff; background: radial-gradient(circle at 100% 0, #ffc23c 0, transparent 40%), linear-gradient(135deg, #3d2c8d, #5f4bb6 60%, #916bbf); box-shadow: 0 16px 40px rgba(61, 44, 141, .35); animation: tIn .5s ease-out; }
.rd-hero h1 { color: #fff; margin: 8px 0 6px; font-size: clamp(1.6rem, 5vw, 2.3rem); } .rd-hero p { margin: 0 0 10px; }
.rd-hl { background: #ffe58a; color: #1f2a48; padding: 0 4px; border-radius: 4px; }
.rd-art { position: relative; width: 150px; height: 120px; } .rd-book { font-size: 4rem; position: absolute; left: 40px; top: 20px; animation: bob 3s ease-in-out infinite; }
.rd-l { position: absolute; font-family: var(--display); font-size: 1.6rem; color: #ffe58a; animation: lfFloat 4s ease-in-out infinite; } .rd-l.l1 { left: 0; top: 0; } .rd-l.l2 { right: 0; top: 10px; animation-delay: 1s; } .rd-l.l3 { left: 10px; bottom: 0; animation-delay: 2s; } .rd-l.l4 { right: 10px; bottom: 10px; animation-delay: 3s; }
.rd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 16px; }
.rd-card { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; color: inherit; text-decoration: none; border-left: 5px solid var(--lv); animation: popIn .35s ease-out backwards; transition: transform .2s; }
.rd-card:hover { transform: translateY(-3px); } .rd-card small { display: block; color: var(--ink2); } .rd-ico { font-size: 2rem; }
.rd-head { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; margin-bottom: 10px; } .rd-big { font-size: 3rem; width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; background: color-mix(in srgb, var(--lv) 15%, var(--card)); animation: popIn .4s; }
.rd-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.rd-text { position: relative; font-size: 1.15rem; line-height: 1.85; animation: tIn .4s ease-out; } .rd-text p { margin: 0 0 1em; }
.rd-w { font: inherit; border: 0; padding: 0 2px; margin: 0; border-radius: 4px; background: #fff1b8; color: inherit; cursor: pointer; border-bottom: 2px dotted #c99a1f; }
:root[data-theme="dark"] .rd-w { background: #4a3f12; }
.rd-w.on { background: var(--gold); color: #1f2a48; }
.rd-text.nohl .rd-w { background: none; border-bottom-color: transparent; }
.rd-s.now { background: color-mix(in srgb, var(--blue) 18%, transparent); border-radius: 4px; }
.rd-pop { position: absolute; z-index: 5; display: grid; gap: 2px; min-width: 160px; max-width: 240px; padding: 8px 12px; border-radius: 12px; background: var(--brand); color: var(--bg); box-shadow: var(--shadow); font-size: .95rem; line-height: 1.3; animation: popIn .2s; }
.rd-chat { display: grid; gap: 2px; max-width: 80%; margin: 6px 0; padding: 8px 12px; border-radius: 16px; background: var(--bg2); }
.rd-chat.r { margin-left: auto; background: #dcf8c6; } :root[data-theme="dark"] .rd-chat.r { background: #22432a; }
.rd-chat small { font-weight: 800; color: var(--ink2); } .rd-chat span.now { background: color-mix(in srgb, var(--blue) 18%, transparent); }
.rd-wordbox summary { cursor: pointer; } .rd-task { border-left: 5px solid var(--gold); }
@media (max-width: 640px) {
  .ga-hero, .rd-hero { grid-template-columns: 1fr; padding: 20px 16px; } .ga-art, .rd-art { display: none; }
  .mm-grid { grid-template-columns: repeat(3, 1fr); } .mm-card { height: 84px; } .mm-b { font-size: .78rem; }
  .wo-row { grid-template-columns: repeat(5, 48px); } .wo-t { height: 48px; } .wo-k { min-width: 24px; padding: 0 2px; font-size: .85rem; }
  .vb-opts { grid-template-columns: 1fr 1fr; } .rd-text { font-size: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) { .bb { animation: none; bottom: 40%; } .ga-art span, .ga-big, .rd-book, .rd-l { animation: none; } }

/* ===========================================================
   NAVIGATION – compact grouped menu (desktop dropdowns, tablet/phone sheet)
   =========================================================== */
.nav-dd { position: relative; }
.nav-ddb { display: none; }
.more-h { margin: 6px 2px 8px; font-family: var(--font); font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink2); }
.more-h ~ .more-h { margin-top: 16px; }
@media (max-width: 899px) {
  .nav-dd { display: contents; }
  .nav-menu { display: contents; }
  .nav .nav-mob { display: flex; }
}
@media (min-width: 641px) and (max-width: 899px) { .nav .nav-mob { font-size: 1.25rem; padding: 8px 10px; } .nav .nav-mob .lbl-s { display: none; } }
@media (min-width: 900px) {
  .topbar { background: color-mix(in srgb, var(--card) 92%, transparent); border-bottom: 1px solid var(--line); box-shadow: 0 1px 12px rgba(31, 42, 72, .05); padding-top: 8px; padding-bottom: 8px; }
  .nav { gap: 2px; align-items: center; margin-left: 28px; margin-right: auto; }
  .nav .nav-mob, .nav-more { display: none !important; }
  .nav .lbl { display: inline; }
  .nav a.nav-top, .nav-ddb { font-size: .95rem; padding: 8px 13px; border-radius: 10px; font-weight: 700; color: var(--ink2); }
  .nav a.nav-top .ico { display: none; }
  .nav a.nav-top:hover { transform: none; }
  .nav-ddb { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; font-family: inherit; cursor: pointer; transition: background .15s, color .15s; }
  .nav-ddb svg { width: 10px; height: 8px; transition: transform .2s; opacity: .7; }
  .nav-ddb:hover, .nav-dd.open .nav-ddb { background: var(--bg2); color: var(--ink); }
  .nav-ddb.active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--red); border-radius: 10px 10px 4px 4px; }
  .nav a.nav-top.active { background: none; color: var(--ink); box-shadow: inset 0 -2px 0 var(--red); border-radius: 10px 10px 4px 4px; }
  .nav-dd.open .nav-ddb svg { transform: rotate(180deg); }
  .nav-menu { position: absolute; top: calc(100% + 10px); left: -8px; z-index: 80; min-width: 290px; display: grid; gap: 2px; padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 44px rgba(31, 42, 72, .16); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .16s, transform .16s, visibility 0s .16s; }
  .nav-menu::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
  .nav-dd[data-group="learn"] .nav-menu { grid-template-columns: 1fr 1fr; min-width: 540px; }
  .nav-dd.open .nav-menu { opacity: 1; visibility: visible; transform: none; transition: opacity .16s, transform .16s; }
  .nav-menu a.nav-sec { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; white-space: normal; color: var(--ink); font-weight: 700; }
  .nav-menu a.nav-sec:hover { background: var(--bg2); transform: none; }
  .nav-menu a.nav-sec.active { background: color-mix(in srgb, var(--blue) 10%, var(--card)); color: var(--ink); }
  .nav-menu .ico { flex: 0 0 38px; height: 38px; display: grid; place-items: center; font-size: 1.2rem; border-radius: 10px; background: var(--bg2); }
  .nd-t { display: flex; flex-direction: column; line-height: 1.25; }
  .nd-t .lbl { font-size: .93rem; }
  .nd-t small { font-size: .78rem; font-weight: 600; color: var(--ink2); }
}
@media (min-width: 900px) and (hover: hover) { .nav-dd:hover .nav-menu { opacity: 1; visibility: visible; transform: none; transition: opacity .16s, transform .16s; } .nav-dd:hover .nav-ddb { background: var(--bg2); color: var(--ink); } .nav-dd:hover .nav-ddb svg { transform: rotate(180deg); } }
@media (min-width: 900px) and (max-width: 1080px) { .nav { margin-left: 12px; } .nav a.nav-top, .nav-ddb { padding: 8px 9px; font-size: .9rem; } #stat-streak { display: none; } }
.nd-t small { display: none; }
@media (min-width: 900px) { .nd-t small { display: block; } }
/* ---------- site footer ---------- */
.site-foot { position: relative; z-index: 1; margin-top: 48px; padding: 32px clamp(16px, 4vw, 40px) 24px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--card) 70%, transparent); color: var(--ink2); font-size: .92rem; }
.sf-cols { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 24px; }
.sf-brand p { margin: 10px 0 0; max-width: 340px; line-height: 1.6; }
.site-foot nav b { display: block; color: var(--ink); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.site-foot nav a { display: block; padding: 3px 0; color: var(--ink2); text-decoration: none; }
.site-foot nav a:hover { color: var(--ink); text-decoration: underline; }
.sf-small { max-width: 1180px; margin: 22px auto 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: .8rem; }
@media (max-width: 860px) { .sf-cols { grid-template-columns: 1fr 1fr; } .sf-brand { grid-column: 1 / -1; } }
@media (max-width: 420px) { .sf-cols { grid-template-columns: 1fr; } }
@media print { .site-foot { display: none; } }
/* ---------- home: why section & characters ---------- */
.meet-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
.why { margin: 36px 0 28px; padding: clamp(20px, 4vw, 34px); border-radius: var(--r); background: var(--card); border: 2px solid var(--line); box-shadow: var(--shadow); }
.why-head { max-width: 720px; margin-bottom: 18px; }
.why-head h2 { margin: 10px 0 6px; }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.why-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 16px; background: var(--bg2); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: transform .2s, box-shadow .2s; }
.why-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.why-card span:last-child { color: var(--ink2); font-size: .92rem; line-height: 1.5; }
.why-ico { font-size: 1.8rem; }
.why-stats { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink2); font-weight: 700; font-size: .92rem; }
.why-stats b { color: var(--ink); font-family: var(--display); font-size: 1.25rem; margin-right: 4px; }
@media (max-width: 1000px) { .why-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .why-grid { grid-template-columns: 1fr; } }
