:root {
  --bg: #f4f6fb;
  --bg2: #eef1f9;
  --card: #ffffff;
  --ink: #1e2433;
  --ink2: #46506b;
  --muted: #8c95ad;
  --line: #e8ecf5;
  --primary: #5b6cff;
  --primary-d: #4453e8;
  --violet: #8b5cf6;
  --mint: #10b981;
  --sky: #0ea5e9;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --ok: #22c55e;
  --bad: #ef4444;
  --r: 18px;
  --shadow: 0 2px 8px rgba(30, 36, 51, .05), 0 10px 30px rgba(30, 36, 51, .06);
  --shadow-s: 0 1px 3px rgba(30, 36, 51, .07);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
#app { max-width: 620px; margin: 0 auto; padding: 0 16px 96px; }
button { font-family: inherit; font-size: inherit; border: 0; background: none; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ---------- 通用 ---------- */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.bold { font-weight: 700; }
.center { text-align: center; }
.hidden { display: none !important; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mt20 { margin-top: 20px; } .mt24 { margin-top: 24px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--bg2); color: var(--ink2); }
.pill.pri { background: #eceeff; color: var(--primary-d); }
.pill.ok { background: #e7f8ee; color: #0f9d58; }
.pill.warn { background: #fff4e0; color: #c07800; }
.pill.bad { background: #feecee; color: #d63a4d; }
.pill.gray { background: #f0f2f8; color: #8c95ad; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 20px; border-radius: 14px; font-weight: 700; font-size: 16px;
  background: var(--card); color: var(--ink); box-shadow: var(--shadow-s); transition: transform .08s; }
.btn:active { transform: scale(.97); }
.btn.pri { background: linear-gradient(135deg, var(--primary), var(--violet)); color: #fff;
  box-shadow: 0 6px 18px rgba(91, 108, 255, .28); }
.btn.ghost { background: transparent; box-shadow: none; color: var(--ink2); }
.btn.block { width: 100%; }
.btn.lg { min-height: 58px; font-size: 17px; border-radius: 16px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- 顶栏 ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between;
  padding: 18px 2px 10px; position: sticky; top: 0; z-index: 20;
  background: linear-gradient(var(--bg) 70%, rgba(244, 246, 251, 0)); }
.brand { display: flex; align-items: center; gap: 10px; }
.logo { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--violet)); color: #fff; font-weight: 800; font-size: 17px;
  box-shadow: 0 6px 16px rgba(91,108,255,.3); }
.brand h1 { font-size: 17px; margin: 0; font-weight: 800; letter-spacing: .2px; }
.brand .sub { font-size: 11px; color: var(--muted); margin-top: -2px; }
.stu-chip { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  background: #fff; box-shadow: var(--shadow-s); font-weight: 600; font-size: 14px; }
.stu-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }

/* ---------- 首页 ---------- */
.hero { position: relative; overflow: hidden; border-radius: 22px; padding: 20px;
  background: linear-gradient(135deg, #5b6cff 0%, #8b5cf6 55%, #a855f7 100%); color: #fff;
  box-shadow: 0 12px 30px rgba(91,108,255,.3); }
.hero::after { content: ""; position: absolute; width: 200px; height: 200px; right: -60px; top: -90px;
  border-radius: 50%; background: rgba(255,255,255,.14); }
.hero::before { content: ""; position: absolute; width: 120px; height: 120px; right: 40px; bottom: -70px;
  border-radius: 50%; background: rgba(255,255,255,.1); }
.hero .day { font-size: 34px; font-weight: 800; line-height: 1.1; letter-spacing: -.5px; }
.hero .day small { font-size: 14px; font-weight: 600; opacity: .85; margin-left: 4px; }
.hero .line { font-size: 13px; opacity: .92; margin-top: 6px; }
.hero .stats { display: flex; gap: 18px; margin-top: 16px; position: relative; z-index: 1; }
.hero .stat b { font-size: 20px; display: block; line-height: 1.2; }
.hero .stat span { font-size: 11px; opacity: .8; }

.sec-title { display: flex; align-items: center; justify-content: space-between; margin: 22px 2px 10px; }
.sec-title h2 { font-size: 15px; margin: 0; font-weight: 800; }
.sec-title .more { font-size: 13px; color: var(--primary-d); font-weight: 600; }

.mod { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r);
  background: var(--card); box-shadow: var(--shadow); margin-bottom: 12px; width: 100%; text-align: left;
  transition: transform .1s; }
.mod:active { transform: scale(.985); }
.mod .ico { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; font-size: 24px; flex: none; }
.mod .ico.a { background: #eef0ff; }
.mod .ico.b { background: #e8f7ff; }
.mod .ico.c { background: #fff2e6; }
.mod .ico.d { background: #eafaf1; }
.mod h3 { margin: 0; font-size: 16px; font-weight: 700; }
.mod p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.mod .arrow { margin-left: auto; color: #c4cade; font-size: 20px; }

.task-line { display: flex; align-items: center; gap: 8px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.task-line:last-child { border-bottom: 0; }
.task-line .k { font-size: 12px; color: var(--muted); width: 42px; flex: none; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 9px;
  background: var(--bg2); font-size: 12.5px; font-weight: 650; color: var(--ink2); }
.chip.new { background: #eceeff; color: var(--primary-d); }
.chip.rev { background: #fff4e0; color: #b37100; }
.chip.done { background: #e7f8ee; color: #0f9d58; }

.revrow { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.revrow:last-child { border-bottom: 0; }
.revrow:active { opacity: .65; }

/* ---------- 单元列表 ---------- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ucard { background: var(--card); border-radius: 15px; padding: 13px; box-shadow: var(--shadow-s);
  border: 1.5px solid transparent; text-align: left; }
.ucard.active { border-color: #d7dcff; }
.ucard .code { font-size: 11px; font-weight: 700; color: var(--primary-d); letter-spacing: .4px; }
.ucard .tt { font-size: 13.5px; font-weight: 700; margin-top: 3px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 37px; }
.ucard .bar { height: 5px; border-radius: 3px; background: var(--bg2); margin-top: 9px; overflow: hidden; }
.ucard .bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--primary), var(--violet)); }

/* ---------- 单词卡 ---------- */
.wordrow { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.wordrow:last-child { border-bottom: 0; }
.wordrow .w { font-size: 16px; font-weight: 700; }
.wordrow .ipa { font-size: 12px; color: var(--muted); font-family: "Segoe UI", Arial, sans-serif; }
.wordrow .df { font-size: 13px; color: var(--ink2); }
.dots { display: flex; gap: 3px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: #e2e6f0; display: block; }
.dots i.on1 { background: #c7d2fe; } .dots i.on2 { background: #818cf8; } .dots i.on3 { background: #22c55e; }
.spk { width: 34px; height: 34px; border-radius: 11px; background: var(--bg2); display: grid; place-items: center;
  color: var(--primary-d); flex: none; }
.spk svg, .bigspk svg { width: 58%; height: 58%; }
.sico { width: 34px; height: 34px; margin: 0 auto 4px; color: var(--primary-d); }
.sico svg { width: 100%; height: 100%; }
.pillico { display: inline-flex; width: 14px; height: 14px; margin-right: 2px; }
.pillico svg { width: 14px; height: 14px; }
.bigspk svg { width: 40%; height: 40%; stroke-width: 2.1; }

/* ---------- 关卡 ---------- */
.play { min-height: 100vh; display: flex; flex-direction: column; padding-bottom: 20px; }
.play-top { display: flex; align-items: center; gap: 12px; padding: 16px 0 8px; }
.progress { flex: 1; height: 10px; background: #e6eaf4; border-radius: 6px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; border-radius: 6px;
  background: linear-gradient(90deg, #22c55e, #4ade80); transition: width .35s cubic-bezier(.2,.8,.2,1); }
.streak { font-size: 13px; font-weight: 800; color: var(--amber); min-width: 40px; text-align: right; }
.qcard { background: var(--card); border-radius: 22px; box-shadow: var(--shadow); padding: 26px 20px 22px;
  margin-top: 12px; min-height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: box-shadow .2s, border-color .2s; border: 2px solid transparent; }
.qcard.right { border-color: #86efac; background: #f6fff9; }
.qcard.wrong { border-color: #fca5a5; background: #fff7f7; }
.bigword { font-size: 40px; font-weight: 800; letter-spacing: -.5px; line-height: 1.15; text-align: center;
  word-break: break-word; }
.bigzh { font-size: 30px; font-weight: 800; text-align: center; line-height: 1.3; }
.qipa { font-size: 15px; color: var(--muted); margin-top: 8px; font-family: "Segoe UI", Arial, sans-serif; }
.bigspk { width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--violet)); color: #fff; margin-top: 18px;
  box-shadow: 0 10px 24px rgba(91,108,255,.32); }
.bigspk:active { transform: scale(.94); }
.opts { display: grid; gap: 10px; margin-top: 16px; }
.opt { display: flex; align-items: center; gap: 10px; padding: 15px 16px; border-radius: 14px; background: var(--card);
  box-shadow: var(--shadow-s); font-size: 15.5px; font-weight: 600; text-align: left; border: 2px solid transparent; }
.opt .idx { width: 24px; height: 24px; border-radius: 8px; background: var(--bg2); display: grid; place-items: center;
  font-size: 12px; font-weight: 800; color: var(--muted); flex: none; }
.opt.right { border-color: #86efac; background: #f2fff7; }
.opt.wrong { border-color: #fca5a5; background: #fff5f5; }
.opt:active { transform: scale(.99); }
.selfcheck { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.selfcheck .btn { min-height: 60px; }

/* ---------- 今日任务进度 / 完成 ---------- */
.taskprog { padding: 2px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.pbar { height: 8px; border-radius: 5px; background: #e9edf6; overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 5px;
  background: linear-gradient(90deg, #22c55e, #4ade80); transition: width .4s; }
.donebanner { display: flex; align-items: center; gap: 12px; padding: 14px;
  background: linear-gradient(135deg, #e9fbf0, #f2fff7); border: 1.5px solid #b7f0cd;
  border-radius: 14px; margin-bottom: 12px; }
.donebanner.big { padding: 18px; margin-top: 14px; }
.donebanner .db-ico { font-size: 30px; line-height: 1; }
.donebanner .db-title { font-weight: 800; font-size: 16px; color: #0f9d58; }
.donebanner .db-sub { font-size: 12.5px; color: #3f7a5c; margin-top: 2px; }
.chip.done { background: #e7f8ee; color: #0f9d58; }

/* ---------- 复习门禁 ---------- */
.gatebar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px; margin-bottom: 12px;
  background: linear-gradient(135deg, #fff7ed, #fffaf2); border: 1.5px solid #fed7aa;
  border-radius: 14px; }
.gatebar .gb-ico { font-size: 24px; }
.gatebar .gb-title { font-weight: 800; font-size: 15px; color: #b45309; }
.gatebar .gb-sub { font-size: 12.5px; color: #a16207; margin-top: 2px; }
.gatebar .grow { min-width: 150px; }
.gatebar #gateGo { width: 100%; }

/* ---------- 麦克风 / 判音 ---------- */
.micbtn { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%;
  min-height: 54px; margin-top: 14px; border-radius: 16px; font-size: 16px; font-weight: 800;
  color: #fff; background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 8px 20px rgba(16,185,129,.28); transition: transform .1s; }
.micbtn:active { transform: scale(.98); }
.micbtn svg { width: 22px; height: 22px; }
.micbtn.sm { min-height: 46px; font-size: 14.5px; margin-top: 14px; }
.micbtn.sm svg { width: 18px; height: 18px; }
.micbtn.rec { background: linear-gradient(135deg, #f97316, #ef4444); box-shadow: 0 8px 20px rgba(239,68,68,.3); }
.micdot { width: 10px; height: 10px; border-radius: 50%; background: #fff; display: inline-block;
  animation: pulse 1s infinite; margin-right: 2px; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
.micres { margin-top: 12px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; font-weight: 700;
  width: 100%; }
.micres.ok { background: #e7f8ee; color: #0f9d58; }
.micres.part { background: #fff4e0; color: #b37100; }
.micres.bad { background: #feecee; color: #d63a4d; }

/* 分音节彩色 */
.sylword { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline;
  gap: 0 6px; margin-top: 12px; line-height: 1.15; }
.syl { font-size: 40px; font-weight: 800; letter-spacing: -.5px; padding: 2px 2px 4px;
  border-radius: 8px; transition: background .15s, transform .12s; }
.syl.c1 { color: #f97316; }
.syl.c2 { color: #6366f1; }
.syl:active { transform: scale(.95); }
.syl.lit { background: #fff7ed; }
.syseg { display: inline-flex; gap: 4px; margin-top: 16px; background: var(--bg2);
  padding: 4px; border-radius: 11px; }
.syb { padding: 6px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.syb.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-s); }

/* 拼词 */
.answer-slot { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 20px 0 4px; min-height: 52px;
  padding: 6px 4px 10px; border-bottom: 2px dashed #dfe4f0; width: 100%; }
.slot { box-shadow: inset 0 -2px 0 #e2e7f2; }
.slot { width: 34px; height: 44px; border-radius: 9px; background: #eef1f9; display: grid; place-items: center;
  font-size: 22px; font-weight: 800; color: var(--ink); }
.slot.filled { background: #e6e9ff; color: var(--primary-d); }
.slot.ok { background: #dcfce7; color: #15803d; }
.slot.no { background: #fee2e2; color: #b91c1c; }
.slot.gap { background: transparent; border-bottom: 2px solid #cbd5e1; border-radius: 0; }
.tiles { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.tile { width: 44px; height: 52px; border-radius: 12px; background: #fff; box-shadow: 0 2px 0 #dfe4f0, var(--shadow-s);
  font-size: 22px; font-weight: 800; color: var(--ink2); }
.tile:active { transform: translateY(2px); box-shadow: var(--shadow-s); }
.tile.used { opacity: .25; pointer-events: none; }
.inputword { width: 100%; text-align: center; font-size: 28px; font-weight: 800; letter-spacing: 2px;
  border: 0; border-bottom: 3px solid #dfe4f0; background: transparent; padding: 10px; outline: none; color: var(--ink);
  font-family: inherit; }
.inputword:focus { border-color: var(--primary); }

/* 结算 */
.result { text-align: center; padding: 10px 0; }
.result .big { font-size: 54px; font-weight: 800; line-height: 1;
  background: linear-gradient(135deg, var(--primary), var(--violet)); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; }
.stars { font-size: 34px; letter-spacing: 6px; margin: 6px 0; }
.wronglist { text-align: left; margin-top: 10px; }
.wronglist .item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.wronglist .item:last-child { border-bottom: 0; }

/* ---------- 课文 ---------- */
.sent { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.sent:last-child { border-bottom: 0; }
.sent .no { width: 22px; font-size: 11px; color: #c4cade; font-weight: 700; padding-top: 4px; flex: none; }
.sent .en { font-size: 16.5px; line-height: 1.6; }
.sent .zh { font-size: 13px; color: var(--muted); margin-top: 4px; }
.sent.on { background: #f7f8ff; border-radius: 10px; }
.sent.on .en { color: var(--primary-d); }
.wt { border-bottom: 1.5px dashed #f59e0b; color: #b37100; font-weight: 650; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 0; }
.tbtn { padding: 8px 13px; border-radius: 11px; background: #fff; box-shadow: var(--shadow-s); font-size: 13px;
  font-weight: 650; color: var(--ink2); }
.tbtn.on { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(91,108,255,.3); }

/* ---------- 课文跟读评测 ---------- */
.tbtn.mic { display: inline-flex; align-items: center; gap: 4px; }
.tbtn.mic svg { width: 14px; height: 14px; }
.evalbar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 6px 0 10px;
  background: #eef1ff; border-radius: 12px; }
.pronrow { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.pbtn { display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; border-radius: 10px;
  background: #e8f8f1; color: #0f9d58; font-size: 12.5px; font-weight: 700; }
.pbtn svg { width: 14px; height: 14px; }
.pbtn.rec { background: #fff1e8; color: #d9541e; }
.pscore { font-size: 12.5px; font-weight: 800; padding: 3px 8px; border-radius: 8px; }
.pscore.ok { background: #e7f8ee; color: #0f9d58; }
.pscore.bad { background: #feecee; color: #d63a4d; }
.pheard { font-size: 11.5px; color: var(--muted); }
.wok { color: #0f9d58; }
.wbad { color: #e11d48; text-decoration: underline wavy #e11d48; text-underline-offset: 3px; }

/* ---------- 记录 ---------- */
.kpi { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi .k { background: var(--card); border-radius: 15px; padding: 14px 10px; text-align: center; box-shadow: var(--shadow-s); }
.kpi .k b { font-size: 22px; display: block; line-height: 1.2; }
.kpi .k span { font-size: 11px; color: var(--muted); }
.dayrow { padding: 13px 0; border-bottom: 1px solid var(--line); }
.dayrow:last-child { border-bottom: 0; }
.accbadge { min-width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  font-weight: 800; font-size: 16px; flex: none; }

/* ---------- 设置 ---------- */
.field { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0;
  border-bottom: 1px solid var(--line); }
.field:last-child { border-bottom: 0; }
.field label { font-size: 14.5px; font-weight: 600; }
.field .hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.inp { border: 1.5px solid var(--line); border-radius: 11px; padding: 10px 12px; font-size: 15px;
  font-family: inherit; outline: none; background: #fbfcff; min-width: 0; }
.inp:focus { border-color: var(--primary); }
.switch { width: 50px; height: 30px; border-radius: 999px; background: #dfe4f0; position: relative; transition: .2s; flex: none; }
.switch i { position: absolute; width: 24px; height: 24px; border-radius: 50%; background: #fff; top: 3px; left: 3px;
  transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch.on { background: var(--primary); }
.switch.on i { left: 23px; }

.qrbox { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.qrbox:last-of-type { border-bottom: 0; }
.qrbox img { width: 104px; height: 104px; border-radius: 12px; background: #fff; flex: none;
  box-shadow: 0 1px 4px rgba(30,36,51,.08); }

.adm-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.adm-row:last-child { border-bottom: 0; }
.adm-ops { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.adm-ops .tbtn { padding: 6px 10px; font-size: 12px; }

/* ---------- 底部导航 ---------- */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(255,255,255,.92); backdrop-filter: blur(14px);
  border-top: 1px solid rgba(232,236,245,.9); padding-bottom: var(--safe-b); }
.nav-in { max-width: 620px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 8px;
  font-size: 10.5px; color: var(--muted); font-weight: 600; }
.nav button .ni { width: 22px; height: 22px; display: block; opacity: .5; }
.nav button .ni svg { width: 22px; height: 22px; display: block; }
.nav button.on { color: var(--primary-d); }
.nav button.on .ni { opacity: 1; color: var(--primary-d); }

/* ---------- toast / modal ---------- */
.toast { position: fixed; left: 50%; bottom: 110px; transform: translate(-50%, 20px); z-index: 90;
  background: rgba(30,36,51,.94); color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 14px;
  font-weight: 600; opacity: 0; pointer-events: none; transition: .22s; max-width: 82vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.modal-wrap { position: fixed; inset: 0; background: rgba(20,24,36,.42); z-index: 80; display: grid;
  place-items: center; padding: 20px; backdrop-filter: blur(2px); }
.modal-box { background: #fff; border-radius: 20px; padding: 22px; width: 100%; max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2); animation: pop .18s ease-out; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes shake { 10%,90% { transform: translateX(-2px); } 30%,70% { transform: translateX(4px); }
  50% { transform: translateX(-5px); } }
.shake { animation: shake .4s; }
@keyframes floatup { from { opacity: 1; transform: translate(-50%, 0) scale(1); }
  to { opacity: 0; transform: translate(-50%, -60px) scale(1.5); } }
.plus1 { position: fixed; left: 50%; bottom: 40%; font-size: 30px; font-weight: 800; color: #22c55e;
  pointer-events: none; animation: floatup .7s ease-out forwards; z-index: 95; }

@media (min-width: 560px) {
  .grid2 { grid-template-columns: repeat(3, 1fr); }
}
