:root {
  --ink: #2b3a55;
  --muted: #6b7a99;
  --card: #ffffff;
  --line: #e3ecf7;
  --sky1: #9fdcff;
  --sky2: #e6f7ff;
  --grass: #8fd16a;
  --blue: #3fa7ff;   --blue-d: #2380d6;
  --green: #4cc26b;  --green-d: #2f9a4d;
  --orange: #ff8a3d; --orange-d: #d9661c;
  --purple: #a77bff; --purple-d: #7e52d9;
  --pink: #ff6fa8;   --pink-d: #d94a83;
  --yellow: #ffc93c; --yellow-d: #d9a215;
  --red: #ff5d5d;    --red-d: #d63c3c;
  --teal: #2ec4b6;   --teal-d: #1f9c90;
  --gray: #eef3fa;   --gray-d: #c8d4e6;
  --radius: 22px;
  --shadow: 0 8px 24px rgba(43, 58, 85, 0.12);
  --font-head: 'Baloo 2', 'Nunito', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, sans-serif;
  --emoji: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(120% 60% at 50% 115%, var(--grass) 0 38%, transparent 38.5%),
    radial-gradient(80% 40% at 0% 105%, #7cc457 0 40%, transparent 40.5%),
    linear-gradient(180deg, var(--sky1), var(--sky2) 70%);
  background-attachment: fixed;
  overflow-x: hidden;
}
body::before, body::after {
  content: '';
  position: fixed;
  z-index: -1;
  top: 9%;
  left: -220px;
  width: 120px;
  height: 40px;
  border-radius: 40px;
  background: rgba(255, 255, 255, .8);
  box-shadow: 30px -22px 0 6px rgba(255, 255, 255, .8), 70px -6px 0 2px rgba(255, 255, 255, .8);
  animation: drift 70s linear infinite;
  pointer-events: none;
}
body::after { top: 32%; transform: scale(.7); animation-duration: 100s; animation-delay: -45s; }
@keyframes drift { to { left: calc(100vw + 40px); } }
h1, h2, h3 { font-family: var(--font-head); margin: .3em 0; line-height: 1.15; }
h1 { font-size: clamp(26px, 6vw, 38px); }
h2 { font-size: clamp(20px, 4.5vw, 28px); }
h3 { font-size: 19px; }
button { font-family: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
.screen {
  max-width: 880px;
  margin: 0 auto;
  padding: 12px 16px 40px;
  min-height: 100vh;
  animation: fadein .25s ease;
}
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } }
.btn {
  --c: var(--gray); --cd: var(--gray-d);
  border: 0;
  border-radius: 18px;
  padding: 12px 22px;
  font: 800 17px var(--font-body);
  background: var(--c);
  color: var(--ink);
  box-shadow: 0 5px 0 var(--cd);
  transition: transform .08s, box-shadow .08s, filter .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  user-select: none;
}
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--cd); }
.btn:hover:not(:disabled) { filter: brightness(1.05); }
.btn:disabled { opacity: .5; }
.btn.big { padding: 16px 32px; font-size: 21px; border-radius: 22px; }
.btn.small { padding: 8px 14px; font-size: 14px; border-radius: 14px; box-shadow: 0 4px 0 var(--cd); }
.btn.round { width: 60px; height: 60px; padding: 0; border-radius: 50%; font-size: 26px; font-family: var(--emoji); }
.btn.round.big { width: 76px; height: 76px; font-size: 34px; }
.btn.round.huge { width: 96px; height: 96px; font-size: 44px; }
.blue, .tile.blue, .mode-card.blue { --c: var(--blue); --cd: var(--blue-d); color: #fff; }
.green, .tile.green, .mode-card.green { --c: var(--green); --cd: var(--green-d); color: #fff; }
.orange, .tile.orange, .mode-card.orange { --c: var(--orange); --cd: var(--orange-d); color: #fff; }
.purple, .tile.purple, .mode-card.purple { --c: var(--purple); --cd: var(--purple-d); color: #fff; }
.pink, .tile.pink, .mode-card.pink { --c: var(--pink); --cd: var(--pink-d); color: #fff; }
.yellow, .mode-card.yellow { --c: var(--yellow); --cd: var(--yellow-d); color: #5a4300; }
.red, .mode-card.red { --c: var(--red); --cd: var(--red-d); color: #fff; }
.teal, .mode-card.teal { --c: var(--teal); --cd: var(--teal-d); color: #fff; }
.mode-card.gray { --c: #fff; --cd: var(--gray-d); }
.icon-btn {
  border: 0; background: #fff; width: 46px; height: 46px; border-radius: 14px;
  font-size: 22px; box-shadow: 0 4px 0 var(--gray-d); flex: none;
  display: inline-grid; place-items: center;
}
.icon-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--gray-d); }
.icon-btn.sm { width: 36px; height: 36px; font-size: 16px; border-radius: 10px; }
.row { display: flex; gap: 14px; justify-content: center; align-items: center; margin: 14px 0; }
.row.wrap { flex-wrap: wrap; }
.row.left { justify-content: flex-start; flex-wrap: wrap; }
.chip {
  background: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 800;
  box-shadow: 0 3px 0 var(--gray-d); white-space: nowrap; font-size: 15px;
}
.chip.big { font-size: 18px; padding: 8px 16px; }
.card { background: var(--card); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); margin: 16px 0; }
.lead { font-size: 18px; color: var(--muted); max-width: 520px; margin: 8px auto; }
.muted { color: var(--muted); font-size: 14px; }
.hint { color: var(--muted); font-size: 14px; margin: 6px 0; }
.input {
  border: 3px solid var(--line); border-radius: 16px; padding: 10px 14px;
  font: 700 17px var(--font-body); color: var(--ink); background: #fff; outline: none;
}
.input:focus { border-color: var(--blue); }
.input.big { font-size: 22px; padding: 14px 18px; width: min(360px, 100%); text-align: center; }
.bar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.bar h2 { flex: 1; margin: 0; font-size: clamp(18px, 4.5vw, 24px); }
.bar-extra { display: flex; gap: 8px; }
.hud {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: rgba(255, 255, 255, .85); backdrop-filter: blur(6px);
  border-radius: var(--radius); padding: 10px 12px; box-shadow: var(--shadow);
}
.me { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; text-align: left; }
.me-info { display: flex; flex-direction: column; line-height: 1.1; }
.me-info small { color: var(--muted); font-weight: 700; }
.ava { font-family: var(--emoji); font-size: 30px; width: 46px; height: 46px; display: inline-grid; place-items: center; background: #fff3d6; border-radius: 50%; flex: none; }
.ava.xl { font-size: 48px; width: 76px; height: 76px; }
.ava.xxl { font-size: 72px; width: 120px; height: 120px; margin: 0 auto; box-shadow: var(--shadow); }
.xpbar { flex: 1; min-width: 140px; height: 22px; background: var(--gray); border-radius: 999px; position: relative; overflow: hidden; }
.xpbar div { height: 100%; background: linear-gradient(90deg, var(--yellow), var(--orange)); border-radius: 999px; transition: width .6s; }
.xpbar span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.chips { display: flex; gap: 8px; align-items: center; }
.mascot { font-family: var(--emoji); font-size: 80px; line-height: 1; display: inline-block; filter: drop-shadow(0 6px 4px rgba(0,0,0,.15)); cursor: pointer; }
.mascot.big { font-size: 110px; }
.mascot.sm { font-size: 56px; }
.bounce { animation: bounce 2.2s ease-in-out infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-10px) rotate(3deg); } }
.hero { display: flex; align-items: center; gap: 14px; margin: 20px 4px 8px; }
.bubble {
  background: #fff; border-radius: 22px; padding: 14px 18px; font-size: 19px; font-weight: 800;
  box-shadow: var(--shadow); position: relative;
}
.bubble::before {
  content: ''; position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
  border: 10px solid transparent; border-right-color: #fff; border-left: 0;
}
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 14px; }
.tile {
  --c: #fff; --cd: var(--gray-d);
  position: relative; border: 0; border-radius: 26px; padding: 18px 14px 16px;
  background: var(--c); box-shadow: 0 7px 0 var(--cd); text-align: left;
  display: flex; flex-direction: column; gap: 2px; min-height: 140px;
  transition: transform .1s;
}
.tile:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--cd); }
.tile:hover { transform: translateY(-2px); }
.t-ic { font-family: var(--emoji); font-size: 44px; margin-bottom: 4px; }
.tile b { font-family: var(--font-head); font-size: 22px; }
.tile small { opacity: .9; font-weight: 700; }
.badge {
  position: absolute; top: 10px; right: 12px; background: var(--red); color: #fff;
  border-radius: 999px; min-width: 30px; height: 30px; display: grid; place-items: center;
  font-weight: 900; border: 3px solid #fff; animation: pulse 1.4s infinite;
}
@keyframes pulse { 50% { transform: scale(1.12); } }
.tile.wide { grid-column: span 2; min-height: 0; flex-direction: row; align-items: center; gap: 14px; }
.tile.wide .t-ic { margin: 0; }
.tile.wide > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; }
.abc-peek { font: 800 30px var(--font-head); opacity: .85; letter-spacing: 2px; }
.screen.screen-home { max-width: 1120px; }
.screen.has-nav { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
button.mascot { border: 0; background: none; padding: 0; }
.hero-card {
  position: relative; overflow: hidden; margin-top: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 26px 28px; border-radius: 30px; color: #fff;
  background:
    radial-gradient(circle at 92% 115%, rgba(255, 255, 255, .22) 0 90px, transparent 91px),
    radial-gradient(circle at 70% -30%, rgba(255, 255, 255, .16) 0 120px, transparent 121px),
    linear-gradient(120deg, #3f8cff, #6f6cff 55%, #a77bff);
  box-shadow: 0 10px 0 #4b4fc9, var(--shadow);
}
.hero-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.eyebrow { margin: 0; font-weight: 900; text-transform: uppercase; letter-spacing: .12em; font-size: 13px; opacity: .85; }
.hero-card h1 { margin: 0; font-size: clamp(30px, 6vw, 46px); text-wrap: balance; }
.hero-sub { margin: 2px 0 10px; font-size: 17px; font-weight: 700; opacity: .95; max-width: 46ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn.light { --c: #fff; --cd: #c9cff5; color: #4b4fc9; }
.hero-art { display: flex; align-items: center; gap: 18px; flex: none; }
.hero-art .mascot { font-size: 96px; }
.goal-ring {
  --p: 0; position: relative; width: 104px; height: 104px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--yellow) calc(var(--p) * 1%), rgba(255, 255, 255, .28) 0);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.goal-ring::before { content: ''; position: absolute; inset: 10px; border-radius: 50%; background: #5a63e6; }
.goal-ring b, .goal-ring small { position: relative; }
.goal-ring b { font: 800 28px/1 var(--font-head); }
.goal-ring small { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; opacity: .9; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; margin-top: 22px; align-items: start; }
.home-main, .home-side { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.home-side .card { margin: 0; }
.sec-title { margin: 0; font-size: 22px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 8px; }
.link-btn { border: 0; background: none; font-weight: 900; color: var(--blue-d); font-size: 15px; padding: 4px 0; }
.link-btn:hover { text-decoration: underline; }
.home-main .tiles { margin-top: 0; }
.tile { overflow: hidden; }
.t-bg { position: absolute; right: -14px; bottom: -22px; font-family: var(--emoji); font-size: 110px; opacity: .18; transform: rotate(-12deg); pointer-events: none; }
.tile b, .tile small, .t-ic { position: relative; }
.topic-strip {
  display: flex; gap: 12px; overflow-x: auto; padding: 4px 4px 14px; margin: 0 -4px;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.topic-chip {
  flex: 0 0 132px; scroll-snap-align: start; border: 0; background: #fff; border-radius: 22px; padding: 14px 10px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: 0 5px 0 var(--gray-d); text-align: center;
}
.topic-chip:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--gray-d); }
.topic-chip b { font-family: var(--font-head); font-size: 16px; line-height: 1.1; }
.topic-chip small { color: var(--muted); font-weight: 700; font-size: 12px; }
.topic-chip .stars i { font-size: 15px; }
.t-ring {
  --p: 0; width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--green) calc(var(--p) * 1%), var(--gray) 0);
}
.t-ring span { width: 58px; height: 58px; border-radius: 50%; background: var(--c); display: grid; place-items: center; font-family: var(--emoji); font-size: 32px; }
.quick-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.quick-game {
  border: 0; border-radius: 18px; padding: 12px; background: #fff; box-shadow: 0 5px 0 var(--gray-d);
  display: flex; align-items: center; gap: 10px; text-align: left; color: var(--ink);
}
.quick-game:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--gray-d); }
.quick-game b { font-size: 15px; line-height: 1.15; }
.qg-ic {
  width: 42px; height: 42px; border-radius: 14px; flex: none; display: grid; place-items: center;
  font-family: var(--emoji); font-size: 24px; background: var(--c); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .12);
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.card-head h3 { margin: 0 0 8px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.day i { width: 34px; height: 34px; border-radius: 50%; background: var(--gray); display: grid; place-items: center; font-style: normal; font-weight: 900; color: #fff; }
.day.done i { background: var(--orange); box-shadow: 0 3px 0 var(--orange-d); }
.day.today i { outline: 3px solid var(--orange); outline-offset: 2px; }
.day.future i { opacity: .5; }
.day small { font-weight: 800; color: var(--muted); }
.week-card .muted, .sticker-card .muted { margin: 10px 0 0; }
.wotd { background: linear-gradient(160deg, #fffbe8, #fff 60%); }
.wotd-body { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.wotd-pic { width: 84px; height: 84px; border-radius: 22px; background: #fff3c4; display: grid; place-items: center; flex: none; }
.wotd-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wotd-word { font: 800 32px/1.1 var(--font-head); word-break: break-word; }
.wotd-text .vi { color: var(--muted); font-weight: 700; }
.sticker-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 10px; }
.mini-slot { aspect-ratio: 1; border-radius: 12px; background: #f6f0ff; display: grid; place-items: center; font-family: var(--emoji); font-size: 26px; }
.mini-slot.empty { background: none; border: 2px dashed #d9cdf3; color: #c3b4e6; font: 800 18px var(--font-head); }
.sticker-card .btn { margin-top: 12px; }
.screen.screen-map, .screen.screen-modes { max-width: 1000px; }
.page-hero {
  --h1: #3f8cff; --h2: #6f6cff; --hd: #4b4fc9;
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; border-radius: 28px; color: #fff; margin-bottom: 14px;
  background:
    radial-gradient(circle at 95% 120%, rgba(255, 255, 255, .2) 0 70px, transparent 71px),
    linear-gradient(120deg, var(--h1), var(--h2));
  box-shadow: 0 8px 0 var(--hd), var(--shadow);
}
.ph-blue { --h1: #3f8cff; --h2: #6f6cff; --hd: #4b4fc9; }
.ph-green { --h1: #34b36a; --h2: #5fcf8a; --hd: #24864d; }
.ph-pink { --h1: #ff5f9e; --h2: #ff8fb8; --hd: #c9437a; }
.ph-purple { --h1: #8d63f2; --h2: #b28bff; --hd: #6a45c4; }
.page-hero .icon-btn { background: rgba(255, 255, 255, .92); color: var(--ink); }
.ph-ic {
  font-family: var(--emoji); font-size: 40px; width: 68px; height: 68px; border-radius: 22px; flex: none;
  display: grid; place-items: center; background: rgba(255, 255, 255, .25);
}
.ph-text { flex: 1; min-width: 0; }
.ph-text h1 { margin: 0; font-size: clamp(26px, 5vw, 36px); text-wrap: balance; }
.ph-text p { margin: 2px 0 0; font-weight: 700; opacity: .95; }
.ph-right { flex: none; }
.ph-stars { display: flex; flex-direction: column; align-items: center; background: rgba(255, 255, 255, .2); border-radius: 18px; padding: 8px 14px; }
.ph-stars .stars i { font-size: 28px; color: rgba(255, 255, 255, .45); }
.ph-stars .stars i.on { color: var(--yellow); }
.ph-stars small { font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.goal-ring.sm { width: 84px; height: 84px; }
.goal-ring.sm::before { inset: 8px; background: var(--hd, #5a63e6); }
.goal-ring.sm b { font-size: 20px; }
.goal-ring.sm small { font-size: 10px; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; }
.filter {
  border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 900; font-size: 15px; white-space: nowrap;
  background: rgba(255, 255, 255, .7); color: var(--ink);
}
.filter span { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 99px; background: var(--gray); font-size: 12px; margin-left: 4px; }
.filter.on { background: var(--ink); color: #fff; }
.filter.on span { background: rgba(255, 255, 255, .2); }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.topic-card {
  position: relative; border: 0; background: #fff; border-radius: 22px; padding: 14px; text-align: left;
  display: flex; align-items: center; gap: 14px; box-shadow: 0 5px 0 var(--gray-d); color: var(--ink);
}
.topic-card:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--gray-d); }
.topic-card:hover { transform: translateY(-2px); }
.topic-card.mix { grid-column: 1 / -1; background: linear-gradient(120deg, #fff8dc, #fff); }
.tc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tc-body b { font: 800 19px/1.15 var(--font-head); }
.tc-body small { color: var(--muted); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-body .dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.tc-foot { display: flex; align-items: center; gap: 8px; }
.tc-foot .mbar { flex: 1; margin: 0; }
.pill { position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 900; padding: 3px 9px; border-radius: 99px; }
.pill.new { background: #e3f1ff; color: var(--blue-d); }
.pill.progress { background: #e4f8ea; color: var(--green-d); }
.pill.mastered { background: #fff1c2; color: var(--yellow-d); }
.pill.gold { background: var(--yellow); color: #5a4300; }
.empty-note { grid-column: 1 / -1; text-align: center; font-weight: 800; color: var(--muted); padding: 30px 0; }
.word-peek { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; }
.peek {
  flex: none; border: 0; background: #fff; border-radius: 16px; padding: 6px 12px 6px 6px;
  display: flex; align-items: center; gap: 6px; font-weight: 800; box-shadow: 0 3px 0 var(--gray-d); color: var(--ink);
}
.peek.seen { background: #eef7ff; }
.peek.known { background: #e4f8ea; }
.feature-card {
  width: 100%; border: 0; border-radius: 24px; padding: 16px; margin: 4px 0 6px; text-align: left; color: var(--ink);
  display: flex; align-items: center; gap: 14px; background: linear-gradient(120deg, #e0fbf7, #fff 70%);
  box-shadow: 0 6px 0 #9adfd6;
}
.feature-card:active { transform: translateY(4px); box-shadow: 0 2px 0 #9adfd6; }
.fc-ic { font-family: var(--emoji); font-size: 40px; width: 64px; height: 64px; border-radius: 20px; background: var(--teal); display: grid; place-items: center; flex: none; }
.fc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fc-body b { font: 800 22px var(--font-head); }
.fc-body small { color: var(--muted); font-weight: 700; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.game-card {
  border: 0; border-radius: 20px; padding: 14px; background: #fff; box-shadow: 0 5px 0 var(--gray-d);
  display: flex; align-items: center; gap: 12px; text-align: left; color: var(--ink);
}
.game-card:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--gray-d); }
.game-card:hover { transform: translateY(-2px); }
.game-card .qg-ic { width: 54px; height: 54px; font-size: 30px; border-radius: 16px; }
.game-card.gray .qg-ic { background: var(--gray-d); }
.gc-body { min-width: 0; display: flex; flex-direction: column; }
.gc-body b { font: 800 18px var(--font-head); }
.gc-body small { color: var(--muted); font-weight: 700; }
@media (max-width: 560px) {
  .page-hero {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
    grid-template-areas: "back . right" "ic text text"; padding: 14px 16px 16px; gap: 10px 12px;
  }
  .page-hero .icon-btn { grid-area: back; }
  .ph-ic { grid-area: ic; width: 52px; height: 52px; font-size: 30px; border-radius: 16px; }
  .ph-text { grid-area: text; }
  .ph-text p { font-size: 14px; }
  .ph-right { grid-area: right; }
  .ph-stars { padding: 4px 10px; }
  .ph-stars .stars i { font-size: 22px; }
  .goal-ring.sm { width: 64px; height: 64px; }
  .goal-ring.sm b { font-size: 16px; }
  .goal-ring.sm small { font-size: 8px; }
  .topic-grid, .game-grid { grid-template-columns: minmax(0, 1fr); }
  .feature-card .btn { display: none; }
}
.ph-dark { --h1: #2b3a55; --h2: #46597f; --hd: #1b2638; }
.ph-orange { --h1: #ff8a3d; --h2: #ffb347; --hd: #d9661c; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 8px; }
.badge-card {
  position: relative; background: #fff; border-radius: 20px; padding: 16px 12px 14px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: 0 5px 0 var(--gray-d);
}
.badge-card b { font: 800 17px/1.15 var(--font-head); }
.badge-card small { color: var(--muted); font-weight: 700; font-size: 12px; }
.badge-card .qbar { width: 100%; margin-top: 6px; }
.bc-icon {
  width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; font-family: var(--emoji); font-size: 38px;
  background: radial-gradient(circle at 35% 30%, #fff8dc, #ffd36b); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .1), 0 0 0 4px #fff, 0 0 0 7px #ffc93c;
}
.badge-card.locked .bc-icon { filter: grayscale(1); opacity: .45; box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .08), 0 0 0 4px #fff, 0 0 0 7px var(--gray-d); }
.badge-card.earned { background: linear-gradient(180deg, #fffbe8, #fff 60%); }
.bc-pill { position: static; margin-top: 6px; }
.bc-count { font-variant-numeric: tabular-nums; }
.badge-banner {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 22px;
  background: linear-gradient(120deg, #ffc93c, #ff8a3d); color: #fff; box-shadow: 0 6px 0 var(--orange-d);
}
.bb-icon { font-family: var(--emoji); font-size: 44px; animation: bounce 2s ease-in-out infinite; }
.badge-reveal { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.badge-reveal > div { display: flex; flex-direction: column; align-items: center; max-width: 160px; }
.badge-reveal .sticker-reveal { font-size: 80px; }
.next-badge { width: 100%; border: 0; text-align: left; color: var(--ink); cursor: pointer; background: linear-gradient(160deg, #fff4e6, #fff 60%); }
.next-badge:hover { transform: translateY(-2px); }
.nb-body { display: flex; align-items: center; gap: 14px; }
.nb-icon { width: 60px; height: 60px; flex: none; border-radius: 50%; display: grid; place-items: center; font-family: var(--emoji); font-size: 32px; background: #ffe7c7; }
.nb-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nb-text b { font: 800 18px var(--font-head); }
.nb-text small { color: var(--muted); font-weight: 700; }
.nb-text .qbar { margin: 6px 0 2px; }
@media (max-width: 560px) {
  .badge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
.onboard { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; padding-top: 10px; }
.onboard-bar { display: flex; }
.welcome-hero {
  position: relative; overflow: hidden; text-align: center; border-radius: 32px; padding: 26px 20px 28px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background:
    radial-gradient(circle at 12% 112%, rgba(255, 255, 255, .7) 0 90px, transparent 91px),
    radial-gradient(circle at 92% -12%, rgba(255, 255, 255, .6) 0 110px, transparent 111px),
    linear-gradient(160deg, #ffffff, #fff6e0);
  box-shadow: 0 10px 0 #f1d9a6, var(--shadow);
}
.welcome-hero h1 { margin: 0; text-wrap: balance; }
.welcome-hero .lead { margin: 0; }
.welcome-hero.compact { padding: 18px 20px 20px; }
.welcome-hero.compact .mascot { font-size: 64px; }
.rest-hero { background: linear-gradient(160deg, #eef3ff, #e3e9ff); box-shadow: 0 10px 0 #c3cdf0, var(--shadow); }
.welcome-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 6px 0 8px; }
.welcome-stats span { background: #fff; border-radius: 99px; padding: 6px 14px; font-weight: 800; color: var(--muted); box-shadow: 0 3px 0 var(--gray-d); }
.welcome-stats b { color: var(--ink); font-family: var(--font-head); font-size: 18px; font-variant-numeric: tabular-nums; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.feature { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 20px; padding: 12px 14px; box-shadow: 0 5px 0 var(--gray-d); color: var(--ink); }
.feature .qg-ic { width: 50px; height: 50px; font-size: 28px; border-radius: 16px; }
.f-body { min-width: 0; display: flex; flex-direction: column; }
.f-body b { font: 800 18px var(--font-head); }
.f-body small { color: var(--muted); font-weight: 700; }
.rest-ideas { margin: 0; }
.rest-ideas h3 { margin-top: 0; }
.rest-ideas .feature { box-shadow: none; background: var(--gray); }
.onboard > #unlock { align-self: center; }
.onboard .profile-grid { margin-top: 0; }
.profile-card { gap: 4px; width: 170px; }
.profile-card .qbar { width: 100%; margin: 4px 0 0; }
.profile-card:hover { transform: translateY(-3px); }
.parents-link { align-self: center; }
.new-profile { margin: 0; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: center; padding: 24px; }
.np-preview { display: flex; flex-direction: column; align-items: center; gap: 12px; background: linear-gradient(160deg, #fff6e0, #ffe8c2); border-radius: 26px; padding: 26px 12px; }
.np-preview .ava.xxl { box-shadow: 0 8px 0 #f1d9a6; }
.np-name { font: 800 26px var(--font-head); text-align: center; word-break: break-word; }
.np-form { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.np-form .input.big { width: 100%; text-align: left; }
.np-form .avatar-grid { max-width: none; margin: 0; }
.np-form #save { align-self: flex-start; margin-top: 6px; }
.np-label { font: 800 18px var(--font-head); margin: 4px 0 0; }
.ava.pop { animation: popin .35s; }
@media (max-width: 640px) {
  .new-profile { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 14px; }
  .np-preview { flex-direction: row; justify-content: center; padding: 14px; }
  .np-preview .ava.xxl { width: 84px; height: 84px; font-size: 50px; margin: 0; }
  .np-form #save { align-self: stretch; }
  .profile-card { width: calc(50% - 8px); }
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
}
.mw-form { display: flex; gap: 14px; align-items: center; }
.mw-pic {
  width: 92px; height: 92px; flex: none; border-radius: 24px; border: 3px dashed var(--yellow-d); background: #fff8dc;
  font-family: var(--emoji); font-size: 52px; display: grid; place-items: center;
}
.mw-fields { flex: 1; min-width: 0; }
.mw-fields .input, .form .mw-emoji { width: 100%; }
.form .mw-emoji { max-width: 160px; font-family: var(--emoji); }
.mw-label { font-weight: 800; margin: 12px 0 6px; }
.emoji-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.ep { aspect-ratio: 1; border: 2px solid transparent; border-radius: 12px; background: var(--gray); font-family: var(--emoji); font-size: 24px; }
.ep:hover { background: #fff3c4; }
.ep.on { border-color: var(--orange); background: #fff1e4; }
.mw-error { color: var(--red-d); font-weight: 800; min-height: 1.2em; margin: 6px 0; }
@media (max-width: 560px) {
  .mw-pic { width: 72px; height: 72px; font-size: 40px; }
}
.st-orange { --s1: #ffe3c8; --s2: #ff8a3d; }
.st-blue { --s1: #d6ecff; --s2: #3fa7ff; }
.st-pink { --s1: #ffdbea; --s2: #ff6fa8; }
.st-purple { --s1: #ece2ff; --s2: #a77bff; }
.st-green { --s1: #dcf5e3; --s2: #4cc26b; }
.st-teal { --s1: #d5f5f1; --s2: #2ec4b6; }
.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.story-strip { display: flex; gap: 12px; overflow-x: auto; padding: 4px 4px 14px; margin: 0 -4px; scroll-snap-type: x mandatory; }
.story-card {
  position: relative; border: 0; background: #fff; border-radius: 24px; padding: 0; overflow: hidden; text-align: left; color: var(--ink);
  display: flex; flex-direction: column; box-shadow: 0 6px 0 var(--gray-d);
}
.story-card:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--gray-d); }
.story-card:hover { transform: translateY(-2px); }
.story-card.compact { flex: 0 0 170px; scroll-snap-align: start; }
.sc-cover {
  display: grid; place-items: center; height: 120px; font-family: var(--emoji); font-size: 68px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .45) 0 18%, transparent 19%), linear-gradient(135deg, var(--s1), var(--s2));
}
.compact .sc-cover { height: 96px; font-size: 54px; }
.sc-body { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 14px; }
.sc-body b { font: 800 19px/1.15 var(--font-head); }
.compact .sc-body b { font-size: 16px; }
.sc-body small { color: var(--muted); font-weight: 700; }
.sc-pill { position: static; align-self: flex-start; margin-top: 4px; }
.reader .steps i.quiz-step { flex: 0 0 22px; }
.auto-btn { border: 0; cursor: pointer; }
.auto-btn.on { background: var(--green); color: #fff; box-shadow: 0 3px 0 var(--green-d); }
.story-page {
  display: flex; flex-direction: column; align-items: center; gap: 14px; border-radius: 30px; padding: 20px 16px 24px; min-height: 60vh;
  background: linear-gradient(180deg, var(--s1), #fff 75%); box-shadow: var(--shadow);
}
.scene {
  display: flex; justify-content: center; align-items: flex-end; gap: 6px; width: 100%; max-width: 560px; min-height: 170px;
  background: rgba(255, 255, 255, .6); border-radius: 26px; padding: 18px; font-family: var(--emoji); font-size: clamp(64px, 16vw, 110px); line-height: 1;
}
.scene span { display: inline-block; animation: bounce 3s ease-in-out infinite; }
.story-text { margin: 0; text-align: center; max-width: 30ch; line-height: 1.5; }
.sw {
  border: 0; background: none; padding: 0 2px; border-radius: 8px; color: var(--ink);
  font: 800 clamp(26px, 6vw, 36px) var(--font-head); transition: background .15s;
}
.sw.vocab { text-decoration: underline 3px var(--s2); text-underline-offset: 6px; }
.sw.reading { background: var(--yellow); }
.sw:hover { background: rgba(255, 201, 60, .35); }
.choice-label { display: block; margin-top: 6px; font-weight: 800; color: var(--muted); }
@media (max-width: 560px) {
  .story-card.compact { flex-basis: 150px; }
  .scene { min-height: 130px; }
  .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .story-grid .sc-cover { height: 96px; font-size: 54px; }
  .story-grid .sc-body { padding: 10px 12px 12px; }
  .story-grid .sc-body b { font-size: 16px; }
}
.quiz-top { display: flex; align-items: center; gap: 12px; }
.qprog { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.steps { display: flex; gap: 5px; }
.steps i { flex: 1; height: 12px; border-radius: 99px; background: rgba(255, 255, 255, .75); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .06); transition: background .3s; }
.steps i.now { background: var(--yellow); animation: pulse 1.2s infinite; }
.steps i.ok { background: var(--green); }
.steps i.bad { background: var(--orange); }
.qprog small { font-weight: 900; color: var(--muted); font-size: 12px; text-align: center; }
.quiz-head { display: flex; align-items: center; gap: 10px; margin: 12px 2px 10px; }
.qh-ic { width: 44px; height: 44px; border-radius: 14px; background: #fff; display: grid; place-items: center; font-family: var(--emoji); font-size: 24px; box-shadow: 0 3px 0 var(--gray-d); flex: none; }
.qh-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.qh-text b { font: 800 19px var(--font-head); }
.qh-text small { color: var(--muted); font-weight: 800; }
.combo { background: linear-gradient(90deg, var(--orange), var(--pink)); color: #fff; font-weight: 900; padding: 6px 12px; border-radius: 99px; white-space: nowrap; box-shadow: 0 3px 0 var(--orange-d); }
.combo.pop { animation: popin .35s; }
.screen-quiz .stage { background: rgba(255, 255, 255, .7); box-shadow: var(--shadow); }
.feedback { display: flex; align-items: center; gap: 10px; }
.fb-owl { font-family: var(--emoji); font-size: 34px; line-height: 1; }
.feedback.ok .fb-owl { animation: bounce 1s ease-in-out infinite; }
.sent-slots { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: flex-end; max-width: 620px; }
.wslot {
  min-width: 70px; height: 54px; padding: 0 14px; border-radius: 14px; border: 0;
  font: 800 24px var(--font-head); color: var(--ink); background: #fff; box-shadow: 0 4px 0 var(--gray-d);
}
.wslot.blank { background: #f0fbf9; border: 3px dashed var(--teal); box-shadow: none; }
.wslot.filled { animation: popin .25s; }
.wslot.locked { background: #fff1c2; }
.sent-slots.right .wslot { background: #d9f7e1; box-shadow: 0 4px 0 var(--green); }
.sent-end { font: 800 34px var(--font-head); padding-bottom: 6px; }
.last-pair { display: inline-flex; align-items: flex-end; gap: 2px; }
.word-tiles { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 620px; }
.wtile {
  border: 0; border-radius: 16px; padding: 10px 18px; background: var(--teal); color: #fff;
  font: 800 24px var(--font-head); box-shadow: 0 5px 0 var(--teal-d);
}
.wtile:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--teal-d); }
.wtile.used { visibility: hidden; }
.read-card {
  display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 24px; padding: 18px 22px;
  box-shadow: var(--shadow); max-width: 560px;
}
.read-text { font: 800 clamp(26px, 6vw, 36px)/1.2 var(--font-head); text-wrap: balance; }
@media (max-width: 560px) {
  .wslot { min-width: 54px; height: 46px; font-size: 20px; padding: 0 10px; }
  .wtile { font-size: 20px; padding: 8px 14px; }
  .read-card { padding: 14px 16px; }
}
.result-wrap { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; padding-top: 8px; }
.result-wrap .card { margin: 0; }
.result-hero {
  --h1: #ffb347; --h2: #ff7eb3; --hd: #d9608f;
  position: relative; overflow: hidden; text-align: center; color: #fff; border-radius: 30px; padding: 22px 18px 16px;
  background:
    radial-gradient(circle at 10% 110%, rgba(255, 255, 255, .22) 0 80px, transparent 81px),
    radial-gradient(circle at 92% -10%, rgba(255, 255, 255, .2) 0 90px, transparent 91px),
    linear-gradient(135deg, var(--h1), var(--h2));
  box-shadow: 0 8px 0 var(--hd), var(--shadow);
}
.result-hero.rs-3 { --h1: #ffc93c; --h2: #ff8a3d; --hd: #d9661c; }
.result-hero.rs-1 { --h1: #6fb7ff; --h2: #8d8cff; --hd: #5a63e6; }
.result-hero h1 { margin: 2px 0 0; text-wrap: balance; }
.rh-medal { font-family: var(--emoji); font-size: 74px; line-height: 1; animation: bounce 2.2s ease-in-out infinite; }
.result-hero .big-stars span { font-size: 58px; color: rgba(255, 255, 255, .45); text-shadow: none; }
.result-hero .big-stars span:nth-child(2) { font-size: 76px; }
.result-hero .big-stars span.on { color: #fff6c4; text-shadow: 0 4px 0 rgba(0, 0, 0, .15); }
.result-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.rstat { background: #fff; border-radius: 20px; padding: 12px 8px; text-align: center; box-shadow: 0 5px 0 var(--gray-d); display: flex; flex-direction: column; align-items: center; }
.rstat span { font-family: var(--emoji); font-size: 24px; }
.rstat b { font: 800 26px/1.1 var(--font-head); font-variant-numeric: tabular-nums; }
.rstat small { color: var(--muted); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.lv-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.lv-row small { color: var(--muted); font-weight: 800; }
.xpbar.big { height: 18px; min-width: 0; }
.xpbar.big div { transition: width 1.2s cubic-bezier(.3, 1, .4, 1); }
.gift-banner {
  border: 0; width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 22px; text-align: left;
  background: linear-gradient(120deg, var(--pink), var(--purple)); color: #fff; box-shadow: 0 6px 0 var(--pink-d);
}
.gift-banner:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--pink-d); }
.gb-box { font-family: var(--emoji); font-size: 46px; animation: shake 1.2s infinite; }
.gb-text { display: flex; flex-direction: column; }
.gb-text b { font: 800 21px var(--font-head); }
.gb-text small { font-weight: 700; opacity: .95; }
.result-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.result-actions .btn { flex: 1 1 160px; }
.stat { gap: 2px; }
.st-ic { width: 38px; height: 38px; border-radius: 12px; background: var(--c); display: grid; place-items: center; font-family: var(--emoji); font-size: 20px; margin-bottom: 4px; }
@media (max-width: 560px) {
  .result-stats { grid-template-columns: repeat(2, 1fr); }
  .rh-medal { font-size: 60px; }
  .result-hero .big-stars span { font-size: 46px; }
  .result-hero .big-stars span:nth-child(2) { font-size: 60px; }
  .quiz-head { margin-top: 8px; }
  .combo { font-size: 13px; padding: 5px 10px; }
  .result-actions .btn.big { flex-basis: 140px; font-size: 17px; padding: 14px 12px; white-space: nowrap; }
}
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 20;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  width: min(560px, calc(100% - 24px));
  display: flex; gap: 4px; padding: 6px; border-radius: 26px;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(43, 58, 85, .22);
}
.tab-item {
  flex: 1; border: 0; background: none; border-radius: 20px; padding: 6px 2px;
  display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--muted);
}
.tab-ic { font-family: var(--emoji); font-size: 24px; line-height: 1.1; transition: transform .15s; }
.tab-item small { font-weight: 900; font-size: 12px; }
.tab-item.on { background: #fff1e4; color: var(--orange-d); }
.tab-item.on .tab-ic { transform: translateY(-2px) scale(1.12); }
button:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--blue) !important; outline-offset: 3px;
}
@media (max-width: 900px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .home-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
}
@media (max-width: 560px) {
  .hero-card { flex-direction: column-reverse; align-items: stretch; padding: 20px 18px; gap: 6px; }
  .hero-art { justify-content: space-between; }
  .hero-art .mascot { font-size: 72px; }
  .goal-ring { width: 84px; height: 84px; }
  .goal-ring b { font-size: 22px; }
  .hero-actions .btn.big { flex: 1 1 auto; font-size: 18px; padding: 14px 18px; }
  .home-side { grid-template-columns: minmax(0, 1fr); }
  .topic-chip { flex-basis: 116px; }
}
.abc-wrap { display: flex; flex-direction: column; align-items: center; }
.abc-card {
  width: min(380px, 100%); background: #fff; border-radius: 30px; padding: 18px 16px 12px; text-align: center;
  box-shadow: var(--shadow), 0 8px 0 var(--gray-d); cursor: pointer; outline: none;
}
.abc-card.pop { animation: popin .35s; }
.abc-big { font: 800 110px/1 var(--font-head); color: var(--orange); }
.abc-big span { color: var(--blue); margin-left: 8px; }
.abc-ex { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 6px; }
.abc-word { font: 800 34px var(--font-head); }
.abc-word .hl { color: var(--pink-d); text-decoration: underline 4px; text-underline-offset: 4px; }
.abc-sent { font-weight: 800; color: var(--muted); margin: 8px 0 0; }
.abc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 10px; width: 100%; max-width: 620px; margin: 18px 0; }
.abc-btn {
  border: 0; border-radius: 16px; aspect-ratio: 1; background: var(--c); box-shadow: 0 5px 0 var(--cd);
  font: 800 28px var(--font-head); display: flex; align-items: baseline; justify-content: center; gap: 2px; padding-top: 10px;
}
.abc-btn small { font-size: 18px; opacity: .85; }
.abc-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--cd); }
.abc-btn.on { outline: 4px solid var(--yellow); outline-offset: 2px; }
.abc-q { font: 800 110px/1 var(--font-head); color: var(--blue); padding: 0 20px; }
.hear-card { gap: 18px; }
.letter.mystery { min-width: 88px; height: 104px; font-size: 64px; border-radius: 20px; }
@media (max-width: 560px) {
  .hear-card { gap: 10px; padding: 12px 14px; }
  .letter.mystery { min-width: 64px; max-width: none; flex: none; height: 76px; font-size: 46px; }
}
.quest { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 2px dashed var(--line); }
.quest:first-of-type { border-top: 0; }
.quest.claimed { opacity: .55; }
.q-ic { font-family: var(--emoji); font-size: 28px; }
.q-body { flex: 1; }
.q-body small { color: var(--muted); font-weight: 700; }
.qbar, .mbar { display: block; height: 10px; background: var(--gray); border-radius: 99px; overflow: hidden; margin: 4px 0 2px; }
.qbar div, .mbar span { display: block; height: 100%; background: var(--green); border-radius: 99px; transition: width .5s; }
.q-done { font-size: 24px; color: var(--green); font-weight: 900; }
.q-reward { font-weight: 800; color: var(--yellow-d); }
.mini-stats { text-align: center; color: var(--muted); font-weight: 700; }
html.caps :is(.word, .wotd-word, .word-choice, .say-word, .ps-model, .ps-ghost, .ps-card b, .ps-mitem b, .choice-label,
  .book-word b, .book-detail h3, .bd-spell span, .sword b, .bp-word, .odd-choice small, .peek span, .wr b,
  .m-back.word b, .yn-word, .tile-l) { text-transform: uppercase; }
html.caps .stage:not([class*="q-abc"]) :is(.letter, .letter-choice) { text-transform: uppercase; }
.type-slots .letter { min-width: 40px; }
.type-slots .letter.cur { box-shadow: inset 0 -4px 0 var(--blue); animation: pulse 1.2s infinite; }
.type-slots .letter.ok { background: #d9f7e1; color: var(--green-d); }
.kb { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; width: min(520px, 100%); }
.kb-key {
  height: 50px; border: 0; border-radius: 14px; background: #fff; color: var(--ink); box-shadow: 0 4px 0 var(--gray-d);
  font: 800 24px var(--font-head); cursor: pointer; touch-action: manipulation;
}
.kb-key:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--gray-d); }
.kb-back { grid-column: span 2; background: #ffe9e0; font-family: var(--emoji); }
html.caps .kb-key { text-transform: uppercase; }
@media (max-width: 560px) {
  .kb { gap: 5px; }
  .kb-key { height: 44px; font-size: 21px; border-radius: 12px; }
  .type-slots .letter { min-width: 32px; }
}
.music-btn:not(.on) { opacity: .45; filter: grayscale(1); }
.music-btn.on { animation: pulse 2.4s infinite; }
.week-report { background: linear-gradient(160deg, #eef7ff, #fff 60%); }
.wr-summary { font-size: 17px; font-weight: 700; line-height: 1.5; margin: 0 0 10px; }
.week-report h4 { margin: 6px 0 4px; }
.wr-tips { margin: 0 0 12px; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
#rec.recording { animation: listen 1s infinite; }
.echo {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px;
  background: #fff; border-radius: 999px; padding: 6px 8px 6px 16px; box-shadow: 0 3px 0 var(--gray-d); min-height: 44px;
}
.echo-text { font-weight: 900; }
.screen-classroom { max-width: none; padding: 12px 20px; }
.class-show { display: flex; flex-direction: column; gap: 14px; min-height: calc(100dvh - 24px); }
.cs-top { display: flex; align-items: center; gap: 14px; }
.cs-title { flex: 1; font: 800 clamp(20px, 3vw, 34px) var(--font-head); }
.cs-count { font: 800 clamp(16px, 2vw, 24px) var(--font-head); color: var(--muted); }
.cs-stage {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2vh;
  background: #fff; border-radius: 36px; box-shadow: var(--shadow); padding: 3vh 3vw; outline: none; min-height: 50vh;
}
.cs-pic { font-family: var(--emoji); font-size: min(34vh, 30vw); line-height: 1; }
.cs-pic .pic { font-size: inherit; }
.cs-pic .pic.swatch { width: 1em; height: 1em; }
.cs-pic.hidden { opacity: .25; }
.cs-word { font: 800 min(14vh, 11vw) var(--font-head); line-height: 1.05; text-align: center; color: var(--gray-d); letter-spacing: .04em; }
.cs-word.shown { color: var(--ink); animation: popin .35s; }
html.caps .cs-word { text-transform: uppercase; }
.cs-controls { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.cs-controls .btn { font-size: clamp(18px, 2.2vw, 28px); min-width: 90px; }
.cs-teams { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.cs-team {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 22px; color: #fff;
  background: var(--c); box-shadow: 0 6px 0 var(--cd);
}
.cs-team b { flex: 1; font: 800 clamp(18px, 2vw, 26px) var(--font-head); }
.cs-score { font: 800 clamp(30px, 4vw, 52px) var(--font-head); min-width: 1.4em; text-align: center; }
.cs-score.pop { animation: pulse .5s; }
.cs-pm { display: flex; gap: 6px; }
.cs-pm .btn { min-width: 44px; }
.tour { position: fixed; inset: 0; z-index: 60; }
.tour-spot {
  position: fixed; border-radius: 24px; box-shadow: 0 0 0 200vmax rgba(20, 30, 50, .6);
  transition: all .35s ease; pointer-events: none;
}
.tour-bubble {
  position: fixed; background: #fff; border-radius: 24px; padding: 16px 18px 14px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px; width: min(340px, calc(100vw - 32px)); animation: popin .3s;
}
.tour-owl { position: absolute; top: -30px; left: 16px; font-family: var(--emoji); font-size: 46px; animation: bounce 2s infinite; }
.tour-text { margin: 10px 0 0; font: 800 19px/1.35 var(--font-head); color: var(--ink); }
.tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tour-dots { display: flex; gap: 5px; }
.tour-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--gray-d); }
.tour-dots i.on { background: var(--orange); width: 20px; border-radius: 99px; }
.leaderboard { display: flex; flex-direction: column; gap: 8px; }
.lb-row { display: grid; grid-template-columns: 34px 46px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 16px; background: var(--gray); }
.lb-row.me { background: #fff6d6; box-shadow: inset 0 0 0 2px var(--yellow); }
.lb-rank { font-family: var(--emoji); font-size: 24px; text-align: center; font-weight: 900; color: var(--muted); }
.lb-ava { font-family: var(--emoji); font-size: 34px; text-align: center; }
.lb-name { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lb-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-xp { font: 800 17px var(--font-head); white-space: nowrap; }
.profile-card { position: relative; }
.profile-card.leader { box-shadow: 0 6px 0 var(--yellow-d), 0 0 0 3px var(--yellow); }
.pc-crown { position: absolute; top: -18px; left: 50%; transform: translateX(-50%) rotate(-8deg); font-family: var(--emoji); font-size: 34px; animation: bounce 2s infinite; }
.battle-setup { display: flex; flex-direction: column; gap: 10px; max-width: 640px; margin: 0 auto; }
.battle-setup h3 { margin: 6px 0 0; }
.bs-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bs-mode {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 10px; text-align: center;
  border: 3px solid var(--line); border-radius: 20px; background: #fff; color: var(--ink); cursor: pointer;
}
.bs-mode span { font-family: var(--emoji); font-size: 40px; }
.bs-mode b { font: 800 19px var(--font-head); }
.bs-mode small { color: var(--muted); font-weight: 700; }
.bs-mode.on { border-color: var(--purple); background: #f3edff; }
.bs-levels { display: flex; gap: 8px; flex-wrap: wrap; }
.bs-levels .filter { background: var(--gray); }
.bs-levels .filter.on { background: var(--ink); }
.bs-name { display: flex; flex-direction: column; gap: 4px; font-weight: 800; }
.bs-name .input, .bs-topic { width: min(360px, 100%); }
.bs-vs { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 8px 0; }
.bs-player { display: flex; flex-direction: column; align-items: center; font-family: var(--emoji); font-size: 48px; line-height: 1.1; }
.bs-player b { font: 800 18px var(--font-head); }
.bs-x { font: 800 30px var(--font-head); color: #fff; background: var(--red); border-radius: 16px; padding: 4px 14px; box-shadow: 0 4px 0 var(--red-d); transform: rotate(-6deg); }
.battle-setup #bstart { align-self: center; }
.screen-battle { padding-bottom: 12px; }
.battle { display: flex; flex-direction: column; gap: 10px; min-height: calc(100dvh - 40px); max-width: 980px; margin: 0 auto; }
.bmid { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border-radius: 999px; padding: 6px 8px 6px 6px; box-shadow: 0 3px 0 var(--gray-d); }
.bround { font-weight: 900; color: var(--muted); }
.bvs { font: 800 20px var(--font-head); white-space: nowrap; }
.bpanel { flex: 1; display: flex; flex-direction: column; gap: 10px; background: rgba(255, 255, 255, .7); border-radius: 26px; padding: 12px; border: 4px solid transparent; }
.bpanel.bp0 { border-color: rgba(63, 167, 255, .45); }
.bpanel.bp1 { border-color: rgba(255, 111, 168, .45); }
.bpanel.flip { transform: rotate(180deg); }
.bpanel.win { animation: bwin .8s; }
@keyframes bwin { 30% { background: #fff4c2; } }
.bpanel.flip.win { animation: bwinflip .8s; }
@keyframes bwinflip { 30% { background: #fff4c2; } }
.bp-head { display: flex; justify-content: space-between; align-items: center; }
.bp-who { font-family: var(--emoji); font-size: 24px; }
.bp-who b { font: 800 19px var(--font-head); }
.bp-score { font: 800 24px var(--font-head); min-width: 46px; text-align: center; background: var(--ink); color: #fff; border-radius: 14px; padding: 2px 10px; }
.bp-prompt { display: flex; align-items: center; justify-content: center; gap: 12px; }
.bp-word { font: 800 34px var(--font-head); }
.bp-grid { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bopt {
  position: relative; min-height: 96px; border: 0; border-radius: 22px; background: #fff; cursor: pointer;
  box-shadow: 0 5px 0 var(--gray-d); display: grid; place-items: center; touch-action: manipulation;
}
.bopt:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--gray-d); }
.bopt.wrong { background: #ffe1e1; opacity: .6; }
.bopt.miss { outline: 3px dashed var(--red); }
.bopt.right { background: #d9f7e2; box-shadow: 0 5px 0 var(--green-d); }
.bp-grid.locked .bopt:not(.right) { filter: grayscale(.7); }
.bp-grid.done .bopt { pointer-events: none; }
.bopt-owl { position: absolute; top: 6px; right: 8px; font-family: var(--emoji); font-size: 26px; animation: popin .3s; }
.ollie-bar { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 22px; padding: 10px 14px; box-shadow: 0 4px 0 var(--gray-d); }
.ob-owl { font-family: var(--emoji); font-size: 46px; }
.ob-owl.think { animation: bounce 1s infinite; }
.ob-text { flex: 1; display: flex; flex-direction: column; }
.ob-text b { font: 800 20px var(--font-head); }
.ob-text small { color: var(--muted); font-weight: 800; }
.battle.solo .bpanel { border-color: transparent; }
.battle-end { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.battle-end h2 { margin: 0; font: 800 32px var(--font-head); }
.be-trophy { font-family: var(--emoji); font-size: 80px; animation: bounce 1.6s infinite; }
.be-score { display: flex; gap: 14px; }
.be-score span { display: flex; flex-direction: column; align-items: center; font-family: var(--emoji); font-size: 40px; background: var(--gray); border-radius: 18px; padding: 10px 16px; }
.be-score b { font: 800 16px var(--font-head); }
.be-score i { font: 800 30px var(--font-head); font-style: normal; }
@media (min-width: 900px) and (orientation: landscape) {
  .battle.two { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; }
  .battle.two .bmid { grid-column: 1 / -1; grid-row: 1; }
  .battle.two .bp1 { grid-column: 2; grid-row: 2; }
  .battle.two .bp0 { grid-column: 1; grid-row: 2; }
  .battle.two .bpanel.flip { transform: none; }
}
@media (max-width: 560px) {
  .battle { min-height: calc(100dvh - 24px); gap: 8px; }
  .bpanel { padding: 8px; gap: 6px; border-radius: 20px; }
  .bp-word { font-size: 26px; }
  .bopt { min-height: 72px; border-radius: 18px; }
  .battle.two .bopt .pic.lg { font-size: 46px; }
  .bvs { font-size: 17px; }
  .bround { font-size: 13px; }
}
.pic.flag { line-height: 0; }
.flag-svg { width: 1.3em; height: .87em; border-radius: .08em; box-shadow: 0 0 0 .03em rgba(0, 0, 0, .25), 0 .05em .12em rgba(0, 0, 0, .15); display: block; }
.mini-flag { display: inline-block; vertical-align: middle; font-size: 18px; }
.mini-flag .flag-svg { width: 1.2em; height: .8em; }
.article-line { font: 800 30px var(--font-head); margin: 0; text-align: center; }
.article-line .word { font: inherit; }
.article-gap { display: inline-block; min-width: 70px; border-bottom: 4px solid var(--purple); color: var(--purple-d); text-align: center; }
.article-gap.filled { animation: popin .3s; }
.choice.article-choice { min-height: 84px; font: 800 40px var(--font-head); }
.article-gap.wide { min-width: 150px; }
.tt-pics.many { gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 420px; }
.choice.tt-choice { font-size: 30px; }
.article-tip { max-width: 440px; text-align: center; margin: 0; }
@media (max-width: 560px) { .article-line { font-size: 24px; } }
.where-scene {
  position: relative; width: min(360px, 100%); height: 220px; border-radius: 24px; overflow: hidden;
  background: linear-gradient(#fff7ea 0 78%, #e8c99a 78%); box-shadow: var(--shadow);
}
.w-table { position: absolute; left: 12%; bottom: 22%; width: 42%; height: 46%; }
.w-top { position: absolute; top: 0; left: 0; right: 0; height: 14px; border-radius: 6px; background: #b07a46; box-shadow: 0 4px 0 #8a5a2e; }
.w-leg { position: absolute; top: 12px; bottom: 0; width: 10px; background: #8a5a2e; border-radius: 0 0 4px 4px; }
.w-leg.l { left: 8%; } .w-leg.r { right: 8%; }
.w-box { position: absolute; right: 9%; bottom: 22%; width: 26%; height: 32%; }
.w-back { position: absolute; inset: 0 0 auto 0; height: 22%; background: #c98d4a; border-radius: 4px 4px 0 0; }
.w-front { position: absolute; left: 0; right: 0; bottom: 0; height: 70%; background: #e0a560; border-radius: 4px; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .12); z-index: 2; }
.w-thing { position: absolute; font-family: var(--emoji); font-size: 44px; line-height: 1; transform: translate(-50%, -100%); z-index: 1; }
.w-thing.at-on { left: 33%; top: calc(32% + 2px); }               
.w-thing.at-under { left: 33%; top: 78%; font-size: 38px; }        
.w-thing.at-in { left: 78%; top: 58%; font-size: 46px; }           
.w-thing.at-next { left: 6%; top: 78%; font-size: 38px; }          
.where-choices .choice { font-size: 22px; }
.grammar-games { margin-bottom: 8px; }
.teacher-quizzes { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.teacher-quizzes .qg-grade { white-space: nowrap; }
.teacher-quizzes .qg-text b { overflow-wrap: anywhere; }
.sec-title.pick-topic { margin-top: 18px; }
.count-box {
  display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 6px 10px; width: min(380px, 100%); min-height: 150px;
  padding: 14px; border-radius: 24px; background: #fff; box-shadow: var(--shadow);
}
.count-box span { font-family: var(--emoji); font-size: 44px; line-height: 1.1; }
.order-strip { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; width: 100%; max-width: 560px; }
.order-strip span { padding: 6px 10px; border-radius: 12px; background: rgba(255, 255, 255, .8); font-weight: 800; color: var(--muted); font-size: 15px; }
.order-strip span.base { background: var(--purple); color: #fff; font-size: 18px; box-shadow: 0 3px 0 var(--purple-d); }
.order-strip span.gap { background: #fff3c4; color: #8a6200; outline: 3px dashed var(--yellow-d); min-width: 44px; text-align: center; }
.order-choice { font-size: 22px !important; }
.pro-line { display: grid; gap: 4px; justify-items: center; }
.pro-line small { font: 800 20px var(--font-body, inherit); color: var(--muted); }
.tobe-pic span { white-space: nowrap; }
.screen.screen-welcome { max-width: 1160px; }
.landing { display: flex; flex-direction: column; gap: 22px; padding-bottom: 30px; }
.ld-bar { position: sticky; top: 8px; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 18px; border-radius: 22px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); box-shadow: var(--shadow); }
.ld-brand { display: flex; align-items: center; gap: 8px; font: 800 24px var(--font-head); color: var(--orange); white-space: nowrap; }
.ld-brand b { color: var(--blue); font: inherit; }
.ld-logo { display: block; height: 56px; width: auto; }
.ld-foot .ld-logo { height: 40px; }
@media (max-width: 520px) { .ld-logo { height: 44px; } }
@media (max-width: 520px) { .ld-brand { font-size: 17px; gap: 5px; } .ld-brand .ld-owl { font-size: 24px; } .ld-bar { padding-left: 12px; gap: 8px; } .ld-bar-cta { padding: 9px 12px; font-size: 15px; white-space: nowrap; } }
.ld-owl { font-family: var(--emoji); font-size: 30px; }
.ld-nav { display: flex; gap: 4px; margin-left: auto; }
.ld-nav button { border: 0; background: none; padding: 8px 12px; border-radius: 12px; font: 800 15px var(--font-body); color: var(--muted); cursor: pointer; }
.ld-nav button:hover { background: var(--gray); color: var(--ink); }
.ld-bar-cta { padding: 10px 18px; font-size: 16px; }
.ld-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 28px; align-items: center; padding: 34px; border-radius: 36px; background: radial-gradient(circle at 96% -10%, rgba(255, 255, 255, .7) 0 140px, transparent 141px), linear-gradient(150deg, #ffffff, #fff4d9); box-shadow: 0 10px 0 #f1d9a6, var(--shadow); }
.ld-eyebrow { display: inline-block; margin: 0 0 6px; padding: 5px 14px; border-radius: 99px; background: #e3f2ff; color: var(--blue-d); font-weight: 900; font-size: 14px; }
.ld-hero h1 { margin: 0; font-size: clamp(34px, 5.4vw, 60px); line-height: 1.05; text-wrap: balance; }
.ld-hero h1 span { color: var(--orange); display: block; }
.ld-lead { font-size: 19px; color: var(--muted); margin: 14px 0 18px; max-width: 520px; font-weight: 700; line-height: 1.5; }
.ld-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.ld-trust { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-weight: 800; color: var(--ink); font-size: 15px; }
.ld-demo { border-radius: 26px; background: #fff; box-shadow: 0 14px 34px rgba(43, 58, 85, .2); overflow: hidden; border: 3px solid #fff; }
.ld-demo-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: linear-gradient(90deg, #3fa7ff, #6f7bff); color: #fff; }
.ld-demo-top b { flex: 1; font: 800 16px var(--font-head); }
.ld-demo-top .chip { background: rgba(255, 255, 255, .95); color: var(--ink); }
.ld-dots { display: flex; gap: 5px; }
.ld-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .55); }
.ld-demo-body { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px; background: linear-gradient(180deg, #e8f6ff, #f7fbff); }
.ld-demo-body .mascot { font-size: 58px; border: 0; background: none; padding: 0; }
.ld-demo-word { font-size: 22px; padding: 10px 26px; }
.ld-demo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; width: 100%; max-width: 330px; }
.ld-demo-pic { border: 0; border-radius: 18px; background: #fff; padding: 12px; box-shadow: 0 5px 0 var(--gray-d); cursor: pointer; display: grid; place-items: center; }
.ld-demo-pic:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--gray-d); }
.ld-demo-pic.right { background: #dff7e5; box-shadow: 0 5px 0 var(--green); }
.ld-demo-pic.wrong { opacity: .45; }
.ld-demo-msg { margin: 0; min-height: 22px; font-weight: 800; color: var(--muted); text-align: center; }
.ld-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 18px; border-radius: 26px; background: linear-gradient(90deg, #3fa7ff, #6f7bff); color: #fff; box-shadow: 0 8px 0 #4b62c9; text-align: center; }
.ld-stats div { display: grid; gap: 2px; }
.ld-stats b { font: 800 clamp(26px, 4vw, 40px) var(--font-head); line-height: 1; font-variant-numeric: tabular-nums; }
.ld-stats small { font-weight: 800; opacity: .92; font-size: 14px; }
.ld-sec { padding: 30px; border-radius: 32px; background: rgba(255, 255, 255, .94); box-shadow: var(--shadow); scroll-margin-top: 84px; }
.ld-kicker { margin: 0; font-weight: 900; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--blue-d); }
.ld-sec h2 { margin: 4px 0 16px; font-size: clamp(24px, 3.6vw, 36px); text-wrap: balance; }
.ld-sub { margin: -8px 0 16px; color: var(--muted); font-weight: 700; max-width: 680px; }
.ld-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ld-feature { padding: 18px; border-radius: 22px; background: var(--gray); display: grid; gap: 6px; align-content: start; transition: transform .15s, box-shadow .15s; }
.ld-feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); background: #fff; }
.ld-feature .qg-ic { width: 54px; height: 54px; font-size: 30px; border-radius: 16px; }
.ld-feature h3 { margin: 6px 0 0; font-size: 20px; color: var(--ink); }
.ld-feature p { margin: 0; color: var(--muted); font-weight: 700; line-height: 1.45; }
.ld-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ld-steps li { position: relative; padding: 22px 18px 18px; border-radius: 22px; background: #fff7e0; text-align: center; display: grid; gap: 4px; justify-items: center; }
.ld-step-n { position: absolute; top: -12px; left: 16px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--orange); color: #fff; font: 800 18px var(--font-head); box-shadow: 0 3px 0 var(--orange-d); }
.ld-step-ic { font-family: var(--emoji); font-size: 46px; line-height: 1.1; }
.ld-steps h3 { margin: 2px 0 0; font-size: 20px; }
.ld-steps p { margin: 0; color: var(--muted); font-weight: 700; line-height: 1.45; }
.ld-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ld-level { padding: 20px; border-radius: 22px; background: #f1fbf3; border: 3px solid #cdeed5; display: grid; gap: 6px; align-content: start; }
.ld-level.lv2 { background: #eaf5ff; border-color: #c4e1fb; }
.ld-level.lv3 { background: #f3edff; border-color: #dccdfb; }
.ld-level-ic { font-family: var(--emoji); font-size: 40px; line-height: 1; }
.ld-level h3 { margin: 0; font-size: 24px; }
.ld-level ul { margin: 0; padding-left: 20px; font-weight: 700; color: var(--ink); line-height: 1.6; }
.ld-level-topics { margin: 6px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.ld-level-topics span { font-family: var(--emoji); font-size: 24px; }
.ld-level-topics small { flex-basis: 100%; color: var(--muted); font-weight: 700; }
.ld-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.ld-topic { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 99px; background: #fff; box-shadow: 0 3px 0 var(--gray-d); font-weight: 800; }
.ld-topic i { font-style: normal; font-family: var(--emoji); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--c); font-size: 18px; }
.ld-topic small { color: var(--muted); font-weight: 800; }
.ld-parents { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 26px; align-items: center; }
.ld-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ld-checks li { position: relative; padding-left: 34px; font-weight: 700; color: var(--muted); line-height: 1.45; }
.ld-checks li::before { content: '✓'; position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; font-weight: 900; font-size: 14px; }
.ld-checks b { color: var(--ink); }
.ld-report { padding: 18px; border-radius: 22px; background: #fff; box-shadow: 0 12px 30px rgba(43, 58, 85, .16); display: grid; gap: 10px; transform: rotate(1.5deg); }
.ld-report-head { display: flex; align-items: center; gap: 10px; }
.ld-report-head > span { font-family: var(--emoji); font-size: 34px; }
.ld-report-head b { display: block; font: 800 18px var(--font-head); }
.ld-report-head small, .ld-report-note { color: var(--muted); font-weight: 700; }
.ld-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 90px; align-items: end; }
.ld-bars span { display: grid; grid-template-rows: 1fr auto; height: 100%; justify-items: center; align-items: end; gap: 3px; }
.ld-bars i { width: 70%; min-height: 4px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #6fc0ff, #3fa7ff); }
.ld-bars small { font-weight: 800; color: var(--muted); font-size: 11px; }
.ld-report-row { display: grid; grid-template-columns: 96px 1fr 40px; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; }
.ld-meter { height: 10px; border-radius: 99px; background: var(--gray); overflow: hidden; }
.ld-meter i { display: block; height: 100%; border-radius: 99px; background: var(--green); }
.ld-report-note { text-align: right; font-size: 12px; }
.ld-faq { display: grid; gap: 8px; max-width: 820px; }
.ld-faq details { border-radius: 16px; background: var(--gray); padding: 0 16px; }
.ld-faq summary { cursor: pointer; padding: 14px 0; font: 800 18px var(--font-head); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.ld-faq summary::-webkit-details-marker { display: none; }
.ld-faq summary::after { content: '+'; font-size: 24px; line-height: 1; color: var(--blue-d); }
.ld-faq details[open] summary::after { content: '−'; }
.ld-faq p { margin: 0; padding: 0 0 14px; color: var(--muted); font-weight: 700; line-height: 1.5; }
.ld-final { text-align: center; padding: 34px 20px; border-radius: 32px; background: linear-gradient(150deg, #ffb347, #ff8a3d); color: #fff; box-shadow: 0 10px 0 var(--orange-d); display: grid; gap: 6px; justify-items: center; }
.ld-final-owl { font-family: var(--emoji); font-size: 64px; line-height: 1; }
.ld-final h2 { margin: 0; font-size: clamp(24px, 4vw, 36px); }
.ld-final p { margin: 0 0 10px; font-weight: 800; opacity: .95; }
.ld-final .btn { --c: #fff; --cd: #ffd9b8; color: var(--orange-d); }
.ld-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 20px; border-radius: 22px; background: rgba(255, 255, 255, .9); }
.ld-foot small { color: var(--muted); font-weight: 700; }
.ld-links { display: flex; flex-wrap: wrap; gap: 6px 16px; flex-basis: 100%; order: 3; }
.ld-links a { font-weight: 800; color: var(--blue-d); }
@media (max-width: 900px) {
  .ld-nav { display: none; }
  .ld-bar-cta { margin-left: auto; }
  .ld-hero, .ld-parents { grid-template-columns: minmax(0, 1fr); }
  .ld-features, .ld-steps, .ld-levels { grid-template-columns: minmax(0, 1fr); }
  .ld-stats { grid-template-columns: repeat(3, 1fr); row-gap: 14px; }
  .ld-hero, .ld-sec { padding: 20px; border-radius: 26px; }
  .ld-report { transform: none; }
}
@media (min-width: 901px) and (max-width: 1100px) { .ld-features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .ld-feature { transition: none; } }
.diff-card { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 12px 14px; border-radius: 20px; background: #fff; box-shadow: var(--shadow); margin-bottom: 12px; }
.diff-head { display: grid; gap: 1px; min-width: 0; }
.diff-head b { font: 800 18px var(--font-head); }
.diff-head small { color: var(--muted); font-weight: 700; }
.diff-pick { display: flex; gap: 6px; padding: 4px; border-radius: 16px; background: #eef3fa; }
.diff-opt { border: 0; background: none; border-radius: 12px; padding: 8px 14px; font: 800 15px var(--font-head); color: var(--muted); display: flex; align-items: center; gap: 6px; cursor: pointer; }
.diff-opt span { font-family: var(--emoji); font-size: 18px; }
.diff-opt.on { background: #fff; color: var(--ink); box-shadow: 0 2px 0 var(--gray-d); }
.tier-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font: 800 18px var(--font-head); color: var(--ink); }
.tier-head .pill { position: static; margin-left: 4px; }
.tier-head small { color: var(--muted); font-size: 14px; }
.tier-head.mine { color: var(--green-d, #2e9e4f); }
.qg-lv { font-family: var(--emoji); font-size: 12px; margin-left: 6px; letter-spacing: 0; }
.diff-suggest { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #f1fbf3; }
.ds-ic { font-family: var(--emoji); font-size: 40px; line-height: 1; }
.ds-text { flex: 1; min-width: 180px; display: grid; gap: 2px; }
.ds-text b { font: 800 18px var(--font-head); }
.ds-text small { color: var(--muted); font-weight: 700; }
.grid3 { grid-template-columns: repeat(3, 1fr); }
.rhyme-choices.no-pics .opp-pic { display: none; }
.rhyme-choices.no-pics .choice { min-height: 64px; align-content: center; }
@media (max-width: 560px) { .diff-pick { width: 100%; } .diff-opt { flex: 1; justify-content: center; padding: 8px 6px; } }
.diff-pick.locked .diff-opt:disabled { opacity: .45; cursor: default; }
.np-diff { align-self: start; }
.np-diff-desc { margin: 0; }
.diff-head .link-btn { justify-self: start; text-align: left; }
.placed-sub { margin: 4px 0 0; font-weight: 800; }
.placed-card { display: grid; gap: 8px; }
.placed-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; background: #f5f8fc; }
.placed-row.mine { background: #fff3c4; outline: 2px solid var(--yellow-d); }
.placed-row b { flex: 1; font: 800 17px var(--font-head); }
.pr-ic { font-family: var(--emoji); font-size: 24px; }
.pr-marks { display: flex; gap: 4px; }
.pr-marks i { font-style: normal; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: #fff; background: #4cc26b; }
.pr-marks i.bad { background: #ff7b7b; }
.q-past .yn-row { width: min(600px, 100%); gap: 10px; }
.q-tquiz .yn-row { width: min(600px, 100%); gap: 10px; }
.q-tquiz .choice.article-choice { font-size: clamp(17px, 4.4vw, 26px); padding-left: 6px; padding-right: 6px; min-width: 0; min-height: 68px; overflow-wrap: anywhere; }
.q-tquiz .prompt, .q-tquiz .article-line { overflow-wrap: anywhere; }
.q-past .choice.article-choice { font-size: clamp(17px, 4.4vw, 26px); padding-left: 6px; padding-right: 6px; min-width: 0; }
.join-card { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 28px 22px; }
.join-ic { font-family: var(--emoji); font-size: 64px; line-height: 1; }
.join-card h1 { margin: 0; }
.join-card p { margin: 0; max-width: 460px; }
.code-input { text-transform: uppercase; letter-spacing: .25em; font-family: ui-monospace, Consolas, monospace; font-weight: 800; text-align: center; }
.input.code-input:not(.big) { width: 150px; }
.join-msg { min-height: 22px; font-weight: 800; color: var(--red-d); }
.contact-form { display: grid; gap: 14px; max-width: 640px; padding: 22px; border: 2px solid var(--line); border-radius: 20px; background: #fff; }
.contact-form label { display: grid; gap: 6px; font-weight: 800; color: var(--ink); }
.contact-form input, .contact-form textarea { width: 100%; padding: 12px 14px; border: 2px solid var(--gray-d); border-radius: 12px; font: 600 16px var(--font-body); color: var(--ink); background: #fff; }
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(63, 167, 255, .2); }
.contact-form .bad { border-color: var(--red); }
.cf-trap { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf-note { margin: 0; font-weight: 600; }
.cf-send { justify-self: start; border: 0; border-radius: 12px; padding: 13px 22px; background: #0aa574; color: #fff; font: 800 16px var(--font-body); cursor: pointer; }
.cf-send:hover:not(:disabled) { background: #088a61; }
.cf-send:disabled { opacity: .5; cursor: default; }
.cf-status { margin: 0; min-height: 22px; font-weight: 800; color: var(--muted); }
.cf-status.ok { color: var(--green-d); }
.cf-status.err { color: var(--red-d); }
.site-foot { border-radius: 28px; background: #26326c; color: #dfe4f7; padding: 28px 30px 16px; }
.sf-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.sf-about .ld-logo { height: 62px; background: #fff; border-radius: 14px; padding: 8px 12px; }
.sf-about p { margin: 12px 0 0; max-width: 340px; font-weight: 700; line-height: 1.5; color: #c3cbea; }
.sf-col { display: grid; gap: 8px; align-content: start; }
.sf-col h4 { margin: 0 0 4px; font: 800 18px var(--font-head); color: #fff; }
.sf-col a { color: #dfe4f7; font-weight: 700; text-decoration: none; }
.sf-col a:hover { color: #fff; text-decoration: underline; }
.sf-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: 22px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .18); }
.sf-bottom small { color: #c3cbea; font-weight: 700; }
.sf-bottom .link-btn { color: #fff; }
@media (max-width: 760px) { .sf-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .sf-about { grid-column: 1 / -1; } .site-foot { padding: 22px 20px 14px; } }
.screen.screen-info { max-width: 900px; }
.info-page { display: grid; gap: 16px; padding-bottom: 30px; }
.info-card { padding: 26px 30px; }
.info-lead { font-size: 19px; font-weight: 700; color: var(--muted); margin: 0 0 6px; line-height: 1.55; }
.info-sec h2 { font-size: 22px; margin: 22px 0 8px; }
.info-sec p, .info-sec li { font-weight: 600; line-height: 1.6; color: var(--ink); }
.info-sec p { margin: 0 0 8px; }
.info-sec ul { margin: 0 0 8px; padding-left: 22px; }
.info-sec a { color: var(--blue-d); font-weight: 800; }
.info-updated { margin: 22px 0 0; color: var(--muted); font-weight: 700; font-size: 14px; }
.legal-links { text-align: center; margin: 18px 0 0; font-size: 14px; color: var(--muted); }
.legal-links a { color: var(--muted); font-weight: 700; }
@media (max-width: 560px) { .info-card { padding: 18px; } }
.grade-strip-wrap { margin-bottom: 14px; }
.grade-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.grade-chip { position: relative; display: grid; justify-items: center; gap: 2px; padding: 12px 8px 10px; border: 0; border-radius: 20px; background: #fff; color: var(--ink); box-shadow: 0 5px 0 var(--gray-d); cursor: pointer; }
.grade-chip:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--gray-d); }
.grade-chip.mine { outline: 3px solid var(--yellow-d); background: #fffbe8; }
.gc-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-family: var(--emoji); font-size: 30px; background: #ffe9a8; }
.grade-chip.g2 .gc-ic, .ld-gc-ic.g2 { background: #ffd9b8; } .grade-chip.g3 .gc-ic, .ld-gc-ic.g3 { background: #c9e7ff; }
.grade-chip.g4 .gc-ic, .ld-gc-ic.g4 { background: #d9d0ff; } .grade-chip.g5 .gc-ic, .ld-gc-ic.g5 { background: #c8f0d2; }
.grade-chip b { font: 800 18px var(--font-head); }
.grade-chip small { color: var(--muted); font-weight: 700; }
.grade-chip .mbar { width: 80%; margin-top: 4px; }
.gc-mine { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-style: normal; font-size: 11px; font-weight: 900; padding: 2px 9px; border-radius: 99px; background: var(--yellow); color: #5c4300; }
@media (max-width: 640px) {
  .grade-strip { grid-template-columns: repeat(5, 118px); overflow-x: auto; padding: 10px 2px 8px; scroll-snap-type: x proximity; }
  .grade-chip { scroll-snap-align: start; }
}
.ld-gradecards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
button.ld-gradecard { border: 0; text-align: left; font: inherit; cursor: pointer; }
button.ld-gradecard:hover { transform: translateY(-3px); box-shadow: var(--shadow); background: #fff; }
.ld-gradecard { display: grid; gap: 4px; align-content: start; padding: 18px 14px; border-radius: 22px; background: var(--gray); color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s; }
a.ld-gradecard:hover { transform: translateY(-3px); box-shadow: var(--shadow); background: #fff; }
.ld-gc-ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-family: var(--emoji); font-size: 32px; background: #ffe9a8; }
.ld-gradecard h3 { margin: 6px 0 0; font-size: 22px; }
.ld-gradecard p { margin: 0; color: var(--muted); font-weight: 700; line-height: 1.4; }
.ld-gradecard small { color: var(--ink); font-weight: 800; margin-top: 4px; }
@media (max-width: 1000px) { .ld-gradecards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .ld-gradecards { grid-template-columns: minmax(0, 1fr); } }
.grade-link { box-shadow: 0 5px 0 rgba(76, 194, 107, .35); }
.grade-link .bl-ic { background: #e2f6e7; }
.grade-list { display: grid; gap: 12px; }
.grade-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 0; border-radius: 22px; background: #fff; color: var(--ink); text-align: left; box-shadow: 0 5px 0 var(--gray-d); cursor: pointer; }
.grade-card:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--gray-d); }
.grade-card.mine { outline: 3px solid var(--yellow-d); background: #fffbe8; }
.grade-ic { width: 64px; height: 64px; flex: none; border-radius: 20px; display: grid; place-items: center; font-family: var(--emoji); font-size: 36px; background: #ffe9a8; box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .1); }
.grade-ic.g2 { background: #ffd9b8; } .grade-ic.g3 { background: #c9e7ff; } .grade-ic.g4 { background: #d9d0ff; } .grade-ic.g5 { background: #c8f0d2; }
.grade-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.grade-body b { font: 800 22px var(--font-head); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.grade-body .pill { position: static; }
.grade-body small { color: var(--muted); font-weight: 700; }
.grade-count { color: var(--ink) !important; }
.grade-pct { font-style: normal; font-weight: 800; color: var(--muted); font-size: 13px; }
.grade-mine { margin: 0 0 12px; padding: 8px 14px; border-radius: 14px; background: #fff3c4; font-weight: 800; color: #8a6200; display: inline-block; }
.grade-set { margin: 0 0 12px; }
.grade-quiz { margin-bottom: 12px; }
.grade-quiz .stars { margin-left: 6px; }
.qg-grade { margin-left: 6px; letter-spacing: 0; font-size: 11px; font-weight: 900; color: var(--muted); background: var(--gray); border-radius: 99px; padding: 1px 7px; }
.np-grade .diff-opt { padding: 8px 12px; }
.ld-grade-rows { display: grid; gap: 14px; }
.ld-grade-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: start; }
.ld-grade-name { display: flex; align-items: center; gap: 8px; font: 800 19px var(--font-head); padding-top: 4px; }
.ld-grade-name i { font-style: normal; font-family: var(--emoji); font-size: 24px; }
@media (max-width: 700px) { .ld-grade-row { grid-template-columns: minmax(0, 1fr); gap: 6px; } }
.units-link { box-shadow: 0 5px 0 rgba(63, 167, 255, .3); }
.units-link .bl-ic { background: #e3f2ff; }
.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 14px; }
.unit-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; border-radius: 18px; background: #fff; color: var(--ink); text-align: left; box-shadow: 0 4px 0 var(--gray-d); cursor: pointer; }
.unit-card:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--gray-d); }
.unit-n { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--blue); color: #fff; font: 800 22px var(--font-head); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .15); }
.unit-body { display: grid; gap: 1px; min-width: 0; }
.unit-body b { font: 800 17px var(--font-head); line-height: 1.15; }
.unit-body small { color: var(--muted); font-weight: 700; }
.unit-lines { display: grid; gap: 8px; margin-bottom: 14px; }
.unit-line { display: grid; gap: 6px; padding: 10px 14px; border: 0; border-radius: 18px; background: #fff; box-shadow: var(--shadow); text-align: left; cursor: pointer; color: var(--ink); }
.ul-q, .ul-a { font: 800 18px var(--font-head); padding: 6px 12px; border-radius: 16px 16px 16px 4px; background: #eaf5ff; justify-self: start; }
.ul-a { background: #fff3c4; border-radius: 16px 16px 4px 16px; justify-self: end; }
.unit-words { margin-bottom: 14px; }
.unit-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 12px; }
.unit-nav { justify-content: space-between; }
.rs-level, .cert-path { margin: 0; font-weight: 800; }
.rs-level { font-size: 2.3cqw; color: #444; }
.cert-path { font-size: 2.4cqw; color: #666; }
.path-link { box-shadow: 0 5px 0 rgba(63, 167, 255, .3); margin: 0 0 14px; }
.path-link .bl-ic { background: #e3f2ff; }
.path { display: grid; gap: 6px; }
.path-list { list-style: none; margin: 0 0 8px; padding: 0 0 0 26px; display: grid; gap: 8px; border-left: 4px dotted #b9d7f5; margin-left: 24px; }
.stop { position: relative; width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 0; border-radius: 18px; background: #fff; color: var(--ink); text-align: left; box-shadow: 0 4px 0 var(--gray-d); cursor: pointer; }
.stop:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--gray-d); }
.stop.next { outline: 3px solid var(--yellow-d); background: #fffbe8; }
.stop.done { background: #f1fbf3; }
.stop-ic { margin-left: -52px; width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; font-family: var(--emoji); font-size: 24px; background: var(--c); border: 4px solid #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .15); }
.stop.done .stop-ic { background: #4cc26b; color: #fff; font: 800 22px var(--font-head); }
.stop-body { flex: 1; min-width: 0; display: grid; }
.stop-body b { font: 800 18px var(--font-head); }
.stop-body small { color: var(--muted); font-weight: 700; }
.stop-steps { display: flex; gap: 4px; }
.stop-steps i { font-style: normal; font-family: var(--emoji); font-size: 16px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #eef3fa; filter: grayscale(1); opacity: .45; }
.stop-steps i.on { filter: none; opacity: 1; background: #fff3c4; }
.stop .pill { position: static; }
@media (max-width: 560px) { .stop-steps i { width: 24px; height: 24px; font-size: 13px; } .stop-body b { font-size: 16px; } }
.rhyme-base { border: 0; flex: none; width: min(220px, 70%); color: var(--ink); cursor: pointer; }
.rhyme-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(520px, 100%); gap: 12px; }
.choice.rhyme-choice { display: grid; justify-items: center; gap: 2px; padding: 12px 6px; font: 800 22px var(--font-head); }
.qg-text { display: grid; gap: 1px; min-width: 0; }
.qg-stars { font-size: 13px; line-height: 1; letter-spacing: 1px; color: #d5dbe6; }
.qg-stars i { font-style: normal; }
.qg-stars i.on { color: var(--yellow-d); }
@media (max-width: 560px) { .choice.rhyme-choice { font-size: 18px; } .rhyme-choices { gap: 8px; } }
.opp-row { display: flex; align-items: center; justify-content: center; gap: 12px; width: min(460px, 100%); }
.opp-card { flex: 1; display: grid; justify-items: center; gap: 2px; padding: 14px 8px; border-radius: 22px; background: #fff; box-shadow: var(--shadow); font: 800 26px var(--font-head); }
.opp-card.gap { background: #fff3c4; outline: 3px dashed var(--yellow-d); box-shadow: none; color: #8a6200; }
.opp-card.filled { animation: popin .3s; }
.opp-pic { font-family: var(--emoji); font-size: 64px; line-height: 1.1; }
.opp-arrow { font: 800 34px var(--font-head); color: var(--muted); }
.math-box { display: grid; justify-items: center; gap: 10px; padding: 14px 20px; border-radius: 22px; background: #fff; box-shadow: var(--shadow); width: min(460px, 100%); }
.math-sum { display: flex; align-items: center; gap: 12px; font: 800 52px var(--font-head); line-height: 1; }
.math-sum span { color: var(--muted); }
.math-ans { color: var(--purple-d); min-width: 1.2em; text-align: center; }
.math-pics { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.math-dots { display: flex; flex-wrap: wrap; gap: 5px; max-width: 150px; }
.math-dots i { width: 20px; height: 20px; border-radius: 50%; background: var(--blue); }
.math-dots.b i { background: var(--orange); }
.math-dots.gone i { background: none; outline: 3px dashed #c9d3e3; outline-offset: -3px; }
.math-line { font-size: 26px; }
.math-line::first-letter { text-transform: uppercase; }
.tobe-pic span { font-family: var(--emoji); font-size: 84px; line-height: 1.1; }
.yn-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) {
  .opp-pic { font-size: 50px; }
  .opp-card { font-size: 22px; }
  .math-sum { font-size: 42px; }
  .math-line { font-size: 21px; }
}
.talk-row { display: flex; align-items: flex-end; gap: 10px; width: min(520px, 100%); }
.talk-owl { font-family: var(--emoji); font-size: 60px; line-height: 1; }
.talk-bubble {
  flex: 1; border: 0; text-align: left; background: #fff; border-radius: 22px 22px 22px 6px; padding: 14px 18px; cursor: pointer;
  font: 800 24px/1.25 var(--font-head); color: var(--ink); box-shadow: 0 5px 0 var(--gray-d);
}
.talk-choices { grid-template-columns: minmax(0, 1fr); width: min(520px, 100%); gap: 10px; }
.choice.talk-choice { min-height: 60px; font-size: 21px; text-align: left; padding: 12px 18px; justify-items: start; border-radius: 22px 22px 6px 22px; background: #eaf5ff; }
@media (max-width: 560px) {
  .count-box span { font-size: 36px; }
  .talk-bubble { font-size: 20px; }
  .choice.talk-choice { font-size: 18px; }
}
.clock-box { padding: 10px; }
.clock-svg { width: 200px; height: 200px; display: block; }
.clock-nums text { font: 800 9px var(--font-head); fill: #2b3a55; }
.clock-choice { font-size: 22px !important; }
.scene-board {
  position: relative; width: 100%; aspect-ratio: 16 / 10; max-height: 62vh; border-radius: 28px; overflow: hidden;
  box-shadow: var(--shadow); touch-action: none; user-select: none; -webkit-user-select: none;
}
.sc-park { background: linear-gradient(#8fd3ff 0 58%, #7ed957 58% 100%); }
.sc-ocean { background: linear-gradient(#bfe8ff 0 28%, #3fa7ff 28% 85%, #f6d98b 85%); }
.sc-space { background: radial-gradient(circle at 20% 30%, #3a4a9a, #141a40 60%, #0b0e26); }
.sc-farm { background: linear-gradient(#ffe0a6 0 55%, #b5e07a 55% 80%, #9b6b3d 80%); }
.scene-deco { position: absolute; font-family: var(--emoji); pointer-events: none; line-height: 1; }
.scene-deco.d0 { top: 6%; left: 6%; font-size: 52px; }
.scene-deco.d1 { top: 8%; right: 10%; font-size: 46px; }
.scene-deco.d2 { bottom: 8%; left: 10%; font-size: 64px; }
.scene-deco.d3 { bottom: 10%; right: 8%; font-size: 44px; }
.placed {
  position: absolute; transform: translate(-50%, -50%); border: 0; background: none; padding: 0; line-height: 1; cursor: grab;
  font-family: var(--emoji); touch-action: none; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .25)); transition: font-size .15s;
}
.placed.sel { outline: 3px dashed #fff; outline-offset: 4px; border-radius: 12px; }
.placed:active { cursor: grabbing; }
.scene-tools {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; gap: 8px;
  padding: 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, .85); box-shadow: 0 3px 10px rgba(0, 0, 0, .15);
}
.scene-tools[hidden] { display: none; }
.scene-tray { margin-top: 12px; }
.tray { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tray-st { width: 52px; height: 52px; border: 0; border-radius: 14px; background: var(--gray); font-family: var(--emoji); font-size: 32px; cursor: pointer; }
.tray-st:active { transform: scale(.9); }
@media (max-width: 560px) {
  .scene-board { aspect-ratio: 4 / 5; }
  .scene-deco.d0, .scene-deco.d1 { font-size: 38px; }
  .scene-deco.d2 { font-size: 46px; }
  .tray-st { width: 46px; height: 46px; font-size: 28px; }
}
.speed-clock {
  flex: 1; display: flex; align-items: baseline; justify-content: center; gap: 6px;
  font: 800 34px var(--font-head); color: var(--ink);
}
.speed-clock small { font: 800 14px var(--font-body); color: var(--muted); }
.speed-clock.hurry { color: var(--red); animation: pulse 1s infinite; }
.speed-score { margin-left: auto; min-width: 56px; text-align: center; font: 800 30px var(--font-head); color: #fff; background: var(--green); border-radius: 16px; padding: 2px 12px; box-shadow: 0 4px 0 var(--green-d); }
.speed-score.pop { animation: pulse .35s; }
.speed-word { font-size: 28px; }
html.caps .speed-word { text-transform: uppercase; }
.speed-stage .choice { min-height: 104px; }
.install-card { background: linear-gradient(160deg, #e3f1ff, #fff 65%); }
.install-card .card-head { align-items: center; }
.install-card p { margin: 0 0 10px; }
.install-help { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: left; }
.install-help h3 { margin: 0; text-align: center; }
.install-help ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-weight: 700; line-height: 1.4; }
.ih-ic { font-family: var(--emoji); }
.levelup-modal { position: relative; overflow: hidden; background: linear-gradient(180deg, #fff6d6, #fff 70%); }
.levelup-show { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.levelup-show > :not(.lu-rays) { position: relative; }
.lu-rays {
  position: absolute; left: 50%; top: 120px; width: 520px; height: 520px; margin: -260px 0 0 -260px; pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 201, 60, .32) 0 10deg, transparent 10deg 20deg); border-radius: 50%;
  animation: spin 14s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.levelup-show .eyebrow { font: 800 18px var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--orange-d); margin: 0; }
.lu-badge {
  width: 140px; height: 140px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff3b0, var(--yellow) 60%, var(--yellow-d)); box-shadow: 0 8px 0 var(--yellow-d), 0 0 0 8px #fff;
  font: 800 72px var(--font-head); color: #6a4b00;
}
.lu-badge.pop { animation: pulse .6s; }
.levelup-show h2 { margin: 6px 0 0; font: 800 30px var(--font-head); }
.lu-reward { margin: 0 0 6px; font-weight: 800; color: var(--muted); }
.bedtime-banner {
  display: flex; align-items: center; gap: 14px; width: 100%; margin: 0 0 12px; padding: 14px 18px; border: 0; border-radius: 22px;
  background: linear-gradient(120deg, #1d2b64, #4b3c8f); color: #fff; text-align: left; cursor: pointer; box-shadow: 0 6px 0 #141d45;
}
.bedtime-banner .db-go { color: #1d2b64; }
.screen-bedtime { padding: 0; max-width: none; }
.night {
  position: fixed; inset: 0; z-index: 5; overflow: auto; display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding: 16px 16px 28px; background: radial-gradient(circle at 80% 10%, #3a4a9a 0, #1b2050 45%, #0d1030 100%); color: #f3f0ff;
}
.night-sky { position: absolute; inset: 0; pointer-events: none; }
.night-sky i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff7c2; box-shadow: 0 0 8px #fff7c2; animation: twinkle 2.8s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .2; transform: scale(.6); } }
.night-top { position: relative; width: min(640px, 100%); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.night-top .icon-btn { background: rgba(255, 255, 255, .14); color: #fff; }
.night-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.night-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .22); }
.night-dots i.done { background: #b8a6ff; }
.night-dots i.now { background: #ffe58a; box-shadow: 0 0 10px #ffe58a; }
.night-card {
  position: relative; flex: 1; width: min(560px, 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  border-radius: 40px; background: rgba(255, 255, 255, .07); border: 2px solid rgba(255, 255, 255, .12); padding: 30px 20px; cursor: pointer; text-align: center;
}
.night-card.fade { animation: nightin 1.2s ease; }
@keyframes nightin { from { opacity: 0; transform: scale(.96); } }
.nc-pic .pic { font-size: min(150px, 34vw); filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .35)); }
.nc-pic.sleepy { font-family: var(--emoji); font-size: 110px; animation: bounce 3s ease-in-out infinite; }
.nc-word { font: 800 min(84px, 15vw) var(--font-head); line-height: 1; color: #fff3c4; letter-spacing: .03em; }
.nc-word.small { font-size: min(48px, 10vw); }
.night-card .vi, .nc-sub { color: #c9c3ef; font-weight: 700; margin: 0; }
html.caps .nc-word:not(.small) { text-transform: uppercase; }
.night-next { position: relative; background: rgba(255, 255, 255, .16); color: #fff; box-shadow: 0 5px 0 rgba(0, 0, 0, .25); }
.event-banner {
  display: flex; align-items: center; gap: 14px; width: 100%; margin: 0 0 12px; padding: 14px 18px; border: 0; border-radius: 22px;
  background: linear-gradient(120deg, var(--e1), var(--e2)); color: #fff; text-align: left; cursor: pointer;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .18);
}
.event-banner:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0, 0, 0, .18); }
.eb-ic { font-family: var(--emoji); font-size: 40px; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; background: rgba(255, 255, 255, .25); flex: none; animation: wiggle 2.5s infinite; }
.event-banner .db-go { color: var(--ink); }
.event-won { background: linear-gradient(120deg, var(--e1), var(--e2)); }
.event-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 8px; }
.ev-badge {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 8px; border-radius: 20px; text-align: center;
  background: #fff; border: 3px dashed var(--gray-d); color: var(--muted);
}
.ev-badge span { font-family: var(--emoji); font-size: 40px; filter: grayscale(1); opacity: .6; }
.ev-badge b { color: var(--ink); }
.ev-badge.won { border: 0; color: #fff; background: linear-gradient(140deg, var(--e1), var(--e2)); box-shadow: 0 5px 0 rgba(0, 0, 0, .15); }
.ev-badge.won span { filter: none; opacity: 1; }
.ev-badge.won b { color: #fff; }
.daily-banner {
  display: flex; align-items: center; gap: 14px; width: 100%; margin: 0 0 6px; padding: 14px 18px; border: 0; border-radius: 22px;
  background: linear-gradient(120deg, var(--pink), #ff9a6b); color: #fff; text-align: left; cursor: pointer;
  box-shadow: 0 6px 0 var(--pink-d);
}
.daily-banner:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--pink-d); }
.daily-banner.done { background: linear-gradient(120deg, #6fd18a, #4cc2a6); box-shadow: 0 6px 0 var(--green-d); }
.db-ic { font-family: var(--emoji); font-size: 34px; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 18px; background: rgba(255, 255, 255, .25); flex: none; }
.db-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.db-text b { font: 800 22px var(--font-head); }
.db-text small { font-weight: 800; opacity: .95; }
.db-go { background: #fff; color: var(--pink-d); font-weight: 900; padding: 8px 14px; border-radius: 999px; white-space: nowrap; }
.daily-banner.done .db-go { color: var(--green-d); }
.daily-banner:not(.done) .db-ic { animation: pulse 2s infinite; }
.daily-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.daily-layout .card { margin: 0; }
.daily-today { display: flex; flex-direction: column; gap: 12px; }
.daily-today .btn { align-self: flex-start; }
.daily-peek { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.dp { aspect-ratio: 1; display: grid; place-items: center; border-radius: 16px; background: var(--gray); }
.dp.mystery { font: 800 28px var(--font-head); color: #fff; background: linear-gradient(135deg, var(--pink), var(--purple)); box-shadow: 0 4px 0 var(--purple-d); }
.dp .pic.swatch { width: 30px; height: 30px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cal-head h3 { margin: 0; }
.cal-head .icon-btn[disabled] { opacity: .35; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.cal-wd { text-align: center; font-weight: 900; color: var(--muted); font-size: 13px; }
.cal-day {
  aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px;
  background: var(--gray); font-weight: 800; line-height: 1.1;
}
.cal-day.empty { background: none; }
.cal-day.future { opacity: .45; }
.cal-day.today { box-shadow: inset 0 0 0 3px var(--pink); }
.cal-day.done { background: #ffe9a8; color: #6a4b00; }
.cal-day.done.s3 { background: var(--yellow); }
.cal-day i { font-style: normal; font-size: 10px; letter-spacing: -1px; color: #b07a00; }
.cal-day.done.s3 i { color: #7a4f00; }
.cal-note { margin: 10px 0 0; }
.daily-done { background: linear-gradient(120deg, var(--pink), #ff9a6b); box-shadow: 0 6px 0 var(--pink-d); }
@media (max-width: 760px) {
  .daily-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .daily-banner { padding: 12px 14px; gap: 10px; }
  .db-ic { width: 46px; height: 46px; font-size: 28px; }
  .db-text b { font-size: 19px; }
  .db-text small { font-size: 12px; }
  .db-go { padding: 6px 10px; font-size: 14px; }
  .cal-day i { font-size: 8px; }
}
.pet-figure { position: relative; display: inline-grid; place-items: center; width: var(--ps); height: var(--ps); flex: none; }
.pet-pic { font-family: var(--emoji); font-size: var(--ps); line-height: 1; }
.pet-hat { position: absolute; left: 50%; top: calc(var(--ps) * -.34); transform: translateX(-50%); font-family: var(--emoji); font-size: calc(var(--ps) * .5); line-height: 1; }
.pet-hat.face { top: calc(var(--ps) * .22); font-size: calc(var(--ps) * .46); }
.pet-figure.chomp { animation: chomp .5s 2; }
@keyframes chomp { 50% { transform: scale(1.15, .9); } }
.page-hero .ph-right .chip { color: var(--ink); }
.pet-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.pet-layout .card { margin: 0; }
.pet-home { grid-row: span 2; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; background: linear-gradient(180deg, #fff3df, #fff 70%); }
.pet-bubble {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 22px;
  background: #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, .07); font: 800 22px var(--font-head); min-height: 56px;
}
.pet-bubble::after { content: ''; position: absolute; left: 50%; bottom: -12px; margin-left: -12px; border: 12px solid transparent; border-bottom: 0; border-top-color: #fff; }
.pet-bubble b { color: var(--orange-d, #e8780a); }
.pet-stage {
  position: relative; border: 0; background: radial-gradient(circle at 50% 58%, #ffe2b8 0 42%, transparent 43%);
  width: 220px; height: 210px; display: grid; place-items: end center; padding-bottom: 16px; cursor: pointer; overflow: visible;
}
.pet-stage .pet-figure { animation: bounce 2.4s ease-in-out infinite; }
.pet-stage.super::before { content: '✨'; position: absolute; top: 10px; right: 18px; font-family: var(--emoji); font-size: 30px; animation: pulse 1.6s infinite; }
.pet-mood { position: absolute; right: 16px; bottom: 26px; font-family: var(--emoji); font-size: 34px; }
.pet-heart { position: absolute; bottom: 50%; font-family: var(--emoji); font-size: 26px; animation: heartup 1.3s ease-out forwards; pointer-events: none; }
@keyframes heartup { to { transform: translateY(-110px) scale(1.4); opacity: 0; } }
.pet-name { margin: 0; font: 800 30px var(--font-head); }
.pet-name small { display: block; font: 800 15px var(--font-body); color: var(--muted); text-transform: capitalize; }
.pet-bars { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.pet-bar { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 4px 10px; text-align: left; font-weight: 800; }
.pet-bar small { grid-column: 2; color: var(--muted); font-weight: 700; }
.food-tray { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.food {
  aspect-ratio: 1; border: 0; border-radius: 20px; background: #fff7ea; box-shadow: 0 5px 0 #f3d7ad;
  display: grid; place-items: center; cursor: pointer;
}
.food .pic { font-size: clamp(36px, 9vw, 52px); }
.food:active { transform: translateY(4px); box-shadow: 0 1px 0 #f3d7ad; }
.food.eaten { animation: eaten .7s forwards; }
@keyframes eaten { to { transform: translateY(-60px) scale(.2); opacity: 0; } }
.hat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hat {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border: 3px solid transparent;
  border-radius: 18px; background: var(--gray); color: var(--ink); cursor: pointer;
}
.hat-pic { font-family: var(--emoji); font-size: 34px; line-height: 1.1; }
.hat b { font-size: 14px; }
.hat small { font-weight: 800; color: var(--muted); font-size: 13px; }
.hat.own { background: #fff7ea; }
.hat.on { border-color: var(--orange); background: #fff; }
.hat.on small { color: var(--orange-d, #e8780a); }
.pet-card { width: 100%; border: 0; text-align: left; color: var(--ink); cursor: pointer; background: linear-gradient(160deg, #fff3df, #fff 65%); }
.pc-body { display: flex; align-items: center; gap: 14px; padding-top: 14px; }
.pc-text { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.pc-text small { color: var(--muted); font-weight: 700; }
.pc-eggs { font-family: var(--emoji); font-size: 30px; letter-spacing: -6px; }
.pet-card .pet-figure .pet-hat:not(.face) { top: calc(var(--ps) * -.3); }
.adopt { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.adopt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 480px; }
.adopt-pet {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 6px; border: 4px solid transparent;
  border-radius: 22px; background: var(--gray); color: var(--ink); cursor: pointer;
}
.adopt-pet .pic { font-size: 56px; }
.adopt-pet b { text-transform: capitalize; font-size: 16px; }
.adopt-pet.on { border-color: var(--orange); background: #fff7ea; transform: scale(1.04); }
.adopt-name { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 800; }
.adopt-name input {
  font: 800 24px var(--font-head); text-align: center; padding: 8px 16px; border-radius: 16px; border: 3px solid var(--gray-d);
  width: min(280px, 80vw); color: var(--ink);
}
.adopt-name input:focus { outline: 0; border-color: var(--orange); }
@media (max-width: 760px) {
  .pet-layout { grid-template-columns: minmax(0, 1fr); }
  .pet-home { grid-row: auto; }
}
@media (max-width: 560px) {
  .pet-bubble { font-size: 19px; padding: 8px 14px; }
  .food-tray { gap: 8px; }
  .adopt-pet .pic { font-size: 44px; }
}
.book-link {
  display: flex; align-items: center; gap: 12px; width: 100%; margin: 14px 0 4px; padding: 12px 16px;
  border: 0; border-radius: 20px; background: #fff; text-align: left; color: var(--ink);
  box-shadow: 0 5px 0 rgba(126, 82, 217, .25);
}
.book-link:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(126, 82, 217, .25); }
.filters + .book-link { margin: 0 0 12px; }
.bl-ic { font-family: var(--emoji); font-size: 30px; width: 50px; height: 50px; display: grid; place-items: center; border-radius: 16px; background: #efe7ff; flex: none; }
.bl-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.bl-text b { font: 800 19px var(--font-head); }
.bl-text small { color: var(--muted); font-weight: 700; }
.bl-go { font: 800 28px var(--font-head); color: var(--purple-d); }
.book-tools { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.book-search {
  display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 18px; padding: 4px 16px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .06); border: 3px solid transparent;
}
.book-search:focus-within { border-color: var(--purple); }
.story-tools { margin-bottom: 4px; }
.story-none { text-align: center; padding: 24px 0; }
#slist .tier-head { margin-top: 14px; }
.book-search span { font-family: var(--emoji); font-size: 22px; }
.book-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 800 20px var(--font-body); color: var(--ink); padding: 10px 0; }
.book-tools .filters { padding-bottom: 2px; }
.book-letters { display: flex; flex-wrap: wrap; gap: 6px; }
.book-letter {
  width: 38px; height: 38px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .75);
  font: 800 19px var(--font-head); color: var(--purple-d);
}
.book-letter.on { background: var(--purple); color: #fff; box-shadow: 0 3px 0 var(--purple-d); }
.book-count { margin: 6px 2px 8px; font-weight: 800; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.book-word {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px 10px;
  border: 0; border-radius: 20px; background: #fff; color: var(--ink); box-shadow: 0 4px 0 rgba(0, 0, 0, .07);
}
.book-word:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .07); }
.book-word .pic { font-size: 46px; height: 52px; }
.book-word .pic.swatch { width: 46px; height: 46px; }
.book-word b { font: 800 19px var(--font-head); line-height: 1.1; text-align: center; overflow-wrap: anywhere; }
.bw-topic { color: var(--muted); font-weight: 700; font-size: 12px; text-align: center; }
.bw-state { position: absolute; top: 6px; right: 8px; font-family: var(--emoji); font-size: 16px; }
.book-word.st-new { background: rgba(255, 255, 255, .8); }
.book-word.st-mastered { box-shadow: 0 4px 0 rgba(217, 162, 21, .45); }
.book-word.st-tricky { box-shadow: 0 4px 0 rgba(214, 60, 60, .35); }
.book-empty { grid-column: 1 / -1; text-align: center; padding: 30px 0; color: var(--muted); font-weight: 800; }
.book-empty span { font-family: var(--emoji); font-size: 56px; }
.book-detail { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.book-detail h3 { font: 800 38px var(--font-head); margin: 0; }
.book-detail p { margin: 0; }
.bd-pic { width: 120px; height: 120px; border-radius: 30px; background: #f3edff; display: grid; place-items: center; }
.bd-spell { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.bd-spell span {
  min-width: 34px; height: 40px; padding: 0 6px; display: grid; place-items: center; border-radius: 10px;
  background: var(--purple); color: #fff; font: 800 22px var(--font-head); box-shadow: 0 3px 0 var(--purple-d);
}
.bd-spell .gap { width: 10px; }
.book-detail .row { flex-wrap: wrap; justify-content: center; margin-top: 6px; }
@media (max-width: 560px) {
  .book-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
  .book-word .pic { font-size: 38px; height: 44px; }
  .book-word b { font-size: 16px; }
  .book-letter { width: 34px; height: 34px; font-size: 17px; }
  .bd-spell span { min-width: 28px; height: 34px; font-size: 18px; }
}
.center-page { text-align: center; padding-top: 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.logo { font-size: clamp(40px, 10vw, 64px); color: var(--orange); text-shadow: 0 4px 0 #fff; margin: 0; }
.logo span { color: var(--blue); }
.features { list-style: none; padding: 0; margin: 8px 0 18px; text-align: left; font-size: 18px; font-weight: 700; }
.features li { background: rgba(255,255,255,.85); margin: 8px 0; padding: 10px 16px; border-radius: 16px; }
.profile-grid { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 10px; }
.profile-card {
  border: 0; background: #fff; border-radius: 24px; padding: 18px 16px; width: 150px;
  display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: 0 6px 0 var(--gray-d);
  font-size: 18px;
}
.profile-card:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--gray-d); }
.profile-card small { color: var(--muted); font-weight: 700; }
.profile-card.add { background: rgba(255,255,255,.6); border: 3px dashed var(--gray-d); box-shadow: none; }
.avatar-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; max-width: 420px; width: 100%; margin-bottom: 12px; }
.ava-btn { border: 4px solid transparent; background: #fff; border-radius: 18px; font-size: 34px; font-family: var(--emoji); aspect-ratio: 1; box-shadow: 0 4px 0 var(--gray-d); }
.ava-btn.on { border-color: var(--orange); transform: scale(1.08); }
.map { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 10px 0 30px; }
.map::before {
  content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 8px; margin-left: -4px;
  background: repeating-linear-gradient(180deg, #fff 0 16px, transparent 16px 28px); border-radius: 4px; opacity: .8;
}
.map-node {
  position: relative; border: 0; background: #fff; border-radius: 24px; padding: 12px 16px;
  display: flex; align-items: center; gap: 14px; text-align: left; width: min(420px, 92%);
  box-shadow: 0 6px 0 var(--gray-d);
}
.map-node:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--gray-d); }
.map-node.left { align-self: flex-start; }
.map-node.right { align-self: flex-end; }
.map-node.mix { align-self: center; background: #fffbe8; }
.node-ic {
  font-family: var(--emoji); font-size: 40px; width: 72px; height: 72px; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: var(--c); box-shadow: inset 0 -6px 0 rgba(0,0,0,.12);
}
.node-info { flex: 1; display: flex; flex-direction: column; }
.node-info b { font-family: var(--font-head); font-size: 21px; }
.node-info small { color: var(--muted); font-weight: 700; }
.stars i { font-style: normal; color: #d8e0ec; font-size: 20px; }
.stars i.on { color: var(--yellow); text-shadow: 0 2px 0 var(--yellow-d); }
.modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.mode-card {
  border: 0; border-radius: 24px; padding: 18px 14px; background: var(--c); box-shadow: 0 6px 0 var(--cd);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
}
.mode-card:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--cd); }
.mode-card:hover { transform: translateY(-2px); }
.m-ic { font-family: var(--emoji); font-size: 46px; }
.mode-card b { font-family: var(--font-head); font-size: 20px; }
.mode-card small { font-weight: 700; opacity: .9; }
.pic { font-family: var(--emoji); font-size: 48px; line-height: 1; display: inline-grid; place-items: center; }
.pic.sm { font-size: 30px; }
.pic.md { font-size: 48px; }
.pic.lg { font-size: 72px; }
.pic.xl { font-size: 120px; }
.pic.num { font-family: var(--font-head); font-weight: 800; color: var(--blue); }
.pic.swatch { width: 1em; height: 1em; border-radius: 50%; background: var(--sw); border: 4px solid rgba(0,0,0,.12); box-shadow: inset 0 -6px 0 rgba(0,0,0,.12); }
.flash-wrap { display: flex; flex-direction: column; align-items: center; }
.flashcard {
  width: min(360px, 90vw); height: 380px; position: relative; perspective: 1200px; cursor: pointer; outline: none;
}
.flashcard .face {
  position: absolute; inset: 0; background: #fff; border-radius: 30px; box-shadow: var(--shadow), 0 8px 0 var(--gray-d);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  backface-visibility: hidden; transition: transform .5s cubic-bezier(.3,1.4,.5,1);
}
.flashcard .back { transform: rotateY(180deg); background: #fffbe8; }
.flashcard.flipped .front { transform: rotateY(-180deg); }
.flashcard.flipped .back { transform: rotateY(0); }
.flashcard .word { font-family: var(--font-head); font-size: 46px; font-weight: 800; }
.flashcard .vi { font-size: 22px; font-weight: 800; color: var(--orange-d); }
.spell-out { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; padding: 0 12px; }
.spell-out span {
  min-width: 38px; height: 44px; display: grid; place-items: center; border-radius: 10px;
  background: var(--purple); color: #fff; font: 800 26px var(--font-head); box-shadow: 0 4px 0 var(--purple-d);
}
.wr .vi, .wname .vi, .say-word .vi { color: var(--muted); }
.dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 360px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.7); }
.dots i.done { background: var(--green); }
.dots i.on { background: var(--orange); transform: scale(1.3); }
.quiz-bar { gap: 10px; }
.progress { flex: 1; height: 20px; background: rgba(255,255,255,.8); border-radius: 99px; overflow: hidden; }
.progress div { height: 100%; width: 0; background: linear-gradient(90deg, var(--green), #7be495); border-radius: 99px; transition: width .4s; }
.quiz-title { text-align: center; margin: 4px 0; font-weight: 800; color: var(--muted); }
.stage { display: flex; flex-direction: column; align-items: center; gap: 14px; background: rgba(255,255,255,.55); border-radius: 30px; padding: 18px 14px 26px; min-height: 60vh; }
.prompt { font-family: var(--font-head); font-size: clamp(20px, 5vw, 26px); font-weight: 800; margin: 4px 0; text-align: center; }
.big-pic { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 28px; padding: 14px 24px; box-shadow: var(--shadow); }
.choices { display: grid; gap: 14px; width: min(520px, 100%); }
.grid2 { grid-template-columns: repeat(2, 1fr); }
.grid4 { grid-template-columns: repeat(4, 1fr); }
.choice {
  border: 0; background: #fff; border-radius: 24px; padding: 16px 8px; min-height: 120px;
  display: grid; place-items: center; box-shadow: 0 6px 0 var(--gray-d); transition: transform .1s, background .2s;
}
.choice:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 var(--gray-d); }
.choice.word-choice { min-height: 76px; font: 800 26px var(--font-head); }
.choice.letter-choice { min-height: 76px; font: 800 36px var(--font-head); }
.choice.right { background: #d9f7e1; box-shadow: 0 6px 0 var(--green); }
.choice.wrong { background: #ffe1e1; box-shadow: 0 6px 0 var(--red); opacity: .6; }
.choice.glow { animation: glow 1s infinite; }
.odd-choice { gap: 4px; }
.odd-choice small { font: 800 18px var(--font-head); color: var(--ink); }
.odd-choice.same { opacity: .55; }
.yn-word { font-size: 26px; }
.yn-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; width: min(420px, 100%); }
.choice.yn { min-height: 96px; font-family: var(--emoji); font-size: 44px; gap: 2px; }
.choice.yn b { font: 800 22px var(--font-head); }
.choice.yn.yes:not(.wrong):not(.right) { background: #eafbea; }
.choice.yn.no:not(.wrong):not(.right) { background: #fff0f0; }
@keyframes glow { 50% { box-shadow: 0 6px 0 var(--yellow-d), 0 0 0 6px rgba(255, 201, 60, .7); } }
.spelled { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.letter {
  min-width: 52px; height: 64px; padding: 0 8px; border-radius: 14px; background: #fff; border: 0;
  display: grid; place-items: center; font: 800 36px var(--font-head); box-shadow: 0 5px 0 var(--gray-d);
}
.letter.blank { background: #fff8dc; border: 3px dashed var(--yellow-d); color: var(--yellow-d); box-shadow: none; }
.letter.filled { background: #d9f7e1; animation: popin .3s; }
.letter.locked { background: #fff1c2; }
.spelled.right .letter { background: #d9f7e1; box-shadow: 0 5px 0 var(--green); }
.gap { width: 18px; }
.letter-tiles { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 560px; }
.tile-l {
  width: 58px; height: 64px; border: 0; border-radius: 16px; background: var(--purple); color: #fff;
  font: 800 34px var(--font-head); box-shadow: 0 5px 0 var(--purple-d);
}
.tile-l:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--purple-d); }
.tile-l.used { visibility: hidden; }
@keyframes popin { from { transform: scale(.4); } }
.say-word { font: 800 44px var(--font-head); text-align: center; }
.say-word small { display: block; font-size: 20px; color: var(--muted); }
.status { font-weight: 800; color: var(--muted); text-align: center; min-height: 1.4em; }
#mic.listening { animation: listen 1s infinite; }
@keyframes listen { 50% { box-shadow: 0 5px 0 var(--red-d), 0 0 0 16px rgba(255, 93, 93, .3); } }
.sky {
  position: relative; width: 100%; max-width: 620px; height: 52vh; min-height: 340px; overflow: hidden;
  border-radius: 24px; background: linear-gradient(180deg, #bfe8ff, #f0fbff);
}
.balloon {
  position: absolute; left: var(--x); bottom: -170px; width: 22%; max-width: 130px; border: 0; background: none; padding: 0;
  animation: rise var(--d) linear var(--delay) infinite;
  display: flex; flex-direction: column; align-items: center;
}
.b-body {
  width: 100%; aspect-ratio: .85; border-radius: 50% 50% 48% 48%; background: var(--c);
  display: grid; place-items: center;
  box-shadow: inset -10px -12px 0 rgba(0,0,0,.12), inset 10px 10px 0 rgba(255,255,255,.3);
}
.b-body .pic { background: rgba(255,255,255,.85); border-radius: 50%; padding: 6px; }
.b-body .pic.swatch { padding: 0; background: var(--sw); }
.b-body { border: 2px solid rgba(0, 0, 0, .08); }
.b-string { width: 2px; height: 50px; background: #8aa; }
.balloon.popped { animation: pop .35s forwards; pointer-events: none; }
@keyframes rise { from { transform: translateY(0); } to { transform: translateY(calc(-52vh - 360px)); } }
@keyframes pop { to { transform: scale(1.6); opacity: 0; } }
.feedback {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 150%); z-index: 30;
  padding: 14px 28px; border-radius: 22px; font: 800 24px var(--font-head); color: #fff;
  transition: transform .3s cubic-bezier(.3,1.5,.5,1); pointer-events: none; white-space: nowrap;
}
.feedback.show { transform: translate(-50%, 0); }
.feedback.ok { background: var(--green); box-shadow: 0 6px 0 var(--green-d); }
.feedback.bad { background: var(--orange); box-shadow: 0 6px 0 var(--orange-d); }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.search-stage { min-height: 0; }
.search-wrap { display: flex; gap: 18px; align-items: flex-start; justify-content: center; width: 100%; flex-wrap: wrap; }
.search-grid {
  display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 5px; width: min(100%, 440px);
  padding: 10px; background: #fff; border-radius: 22px; box-shadow: 0 6px 0 rgba(0, 0, 0, .08);
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.scell {
  aspect-ratio: 1; min-width: 0; display: grid; place-items: center; border-radius: 12px; cursor: pointer;
  background: var(--gray); font: 800 clamp(20px, 6vw, 30px) var(--font-head); color: var(--ink);
  transition: background .15s, transform .15s;
}
.scell.found { background: var(--fc); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .18); }
.scell.sel { background: var(--blue); color: #fff; transform: scale(1.08); }
.scell.hint { animation: glowcell 1.6s 2; }
@keyframes glowcell { 50% { background: var(--yellow); color: #5a4300; transform: scale(1.18); } }
.search-list { display: flex; flex-direction: column; gap: 8px; min-width: 190px; }
.sword {
  display: flex; align-items: center; gap: 10px; border: 0; border-radius: 16px; padding: 8px 14px;
  background: #fff; color: var(--ink); box-shadow: 0 4px 0 rgba(0, 0, 0, .07); text-align: left;
}
.sword .pic { font-size: 30px; }
.sword .pic.swatch { width: 30px; height: 30px; }
.sword b { font: 800 20px var(--font-head); flex: 1; }
.sw-check { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--gray); color: transparent; font-weight: 900; }
.sword.done { background: var(--fc); color: #fff; }
.sword.done b { text-decoration: line-through; text-decoration-thickness: 3px; }
.sword.done .sw-check { background: #fff; color: var(--green-d); }
.hint-chip { border: 0; cursor: pointer; }
.hint-chip:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--gray-d); }
@media (max-width: 560px) {
  .search-wrap { gap: 12px; }
  .search-grid { padding: 7px; gap: 4px; border-radius: 18px; }
  .scell { border-radius: 9px; }
  .search-list { flex-direction: row; flex-wrap: wrap; justify-content: center; min-width: 0; }
  .sword { padding: 6px 10px; gap: 6px; }
  .sword b { font-size: 17px; }
  .sword .pic { font-size: 24px; }
  .sword .pic.swatch { width: 24px; height: 24px; }
  .sw-check { display: none; }
}
.memory-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; width: 100%; max-width: 500px; margin: 0 auto; }
.memory-stage { min-height: 0; }
.mcard { border: 0; background: none; padding: 0; aspect-ratio: 3/4; perspective: 800px; }
.mcard .inner { position: relative; display: block; width: 100%; height: 100%; transition: transform .45s; transform-style: preserve-3d; }
.mcard.flipped .inner { transform: rotateY(180deg); }
.m-front, .m-back {
  position: absolute; inset: 0; border-radius: 18px; display: grid; place-items: center; backface-visibility: hidden;
  box-shadow: 0 5px 0 rgba(0,0,0,.15);
}
.m-front { background: repeating-linear-gradient(45deg, var(--blue) 0 12px, #5ab5ff 12px 24px); font-family: var(--emoji); font-size: 40px; }
.m-back { background: #fff; transform: rotateY(180deg); padding: 6px; }
.m-back.word b { font: 800 clamp(16px, 3.6vw, 24px) var(--font-head); word-break: break-word; text-align: center; }
.mcard.matched .m-back { background: #d9f7e1; animation: popin .4s; }
.big-stars span { font-size: 70px; color: #d8e0ec; display: inline-block; text-shadow: 0 5px 0 rgba(0,0,0,.08); }
.big-stars span.on { color: var(--yellow); text-shadow: 0 5px 0 var(--yellow-d); animation: starpop .6s backwards; }
.big-stars span:nth-child(2) { font-size: 90px; transform: translateY(-14px); }
.big-stars span:nth-child(2).on { animation-name: starpop2; }
@keyframes starpop { from { transform: scale(0) rotate(-90deg); } }
@keyframes starpop2 { from { transform: translateY(-14px) scale(0) rotate(-90deg); } }
.rewards { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.levelup { font: 800 26px var(--font-head); color: var(--purple-d); background: #fff; padding: 10px 24px; border-radius: 20px; animation: pulse 1.2s infinite; }
.word-review { width: 100%; text-align: left; }
.wr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.wr { display: flex; align-items: center; gap: 10px; border: 0; border-radius: 14px; padding: 8px 10px; background: var(--gray); text-align: left; }
.wr > span:not(.pic) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wr .pic { flex: none; }
.wr small { color: var(--muted); }
.wr.bad { background: #fff1e6; }
.album-wrap { text-align: center; }
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 10px; margin: 14px 0 20px; }
.slot { aspect-ratio: 1; border-radius: 18px; display: grid; place-items: center; font-size: 40px; font-family: var(--emoji); border: 0; }
.slot.owned { background: #fff; box-shadow: 0 5px 0 var(--gray-d); }
.slot.locked { background: rgba(255,255,255,.45); border: 3px dashed rgba(43,58,85,.2); color: rgba(43,58,85,.3); font: 800 28px var(--font-head); }
.wiggle { animation: wiggle .5s; }
@keyframes wiggle { 25% { transform: rotate(-12deg) scale(1.15); } 75% { transform: rotate(12deg) scale(1.15); } }
.modal-back { position: fixed; inset: 0; background: rgba(30, 45, 70, .45); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fadein .2s; }
.modal { background: #fff; border-radius: 28px; padding: 22px; width: min(420px, 100%); box-shadow: var(--shadow); text-align: center; animation: popin .3s; }
.ask p { font-size: 18px; font-weight: 700; }
.gift { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.gift-box { font-size: 110px; font-family: var(--emoji); border: 0; background: none; animation: shake 1s infinite; }
.sticker-reveal { font-size: 120px; font-family: var(--emoji); animation: reveal .6s cubic-bezier(.3,1.6,.5,1); }
@keyframes reveal { from { transform: scale(0) rotate(-180deg); } }
.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 60;
  background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 16px; font-weight: 800;
  animation: fadein .2s; transition: opacity .4s; max-width: 90vw; text-align: center;
}
.toast.out { opacity: 0; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; }
.parent .tabs { display: flex; gap: 8px; margin: 10px 0; overflow-x: auto; }
.tab { border: 0; background: rgba(255,255,255,.6); border-radius: 14px; padding: 10px 16px; font-weight: 800; font-size: 15px; white-space: nowrap; }
.tab.on { background: #fff; box-shadow: 0 4px 0 var(--gray-d); }
.pchips { display: flex; gap: 8px; flex-wrap: wrap; }
.pchip { border: 0; background: rgba(255,255,255,.6); border-radius: 999px; padding: 6px 14px; font-weight: 800; }
.pchip.on { background: var(--orange); color: #fff; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat { background: #fff; border-radius: 18px; padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.stat b { font: 800 28px var(--font-head); }
.stat small { color: var(--muted); font-weight: 700; }
.chart { display: flex; gap: 10px; align-items: flex-end; height: 180px; padding-top: 10px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; gap: 4px; }
.chart .barv { width: 100%; max-width: 46px; background: linear-gradient(180deg, var(--blue), #8ccfff); border-radius: 10px 10px 4px 4px; min-height: 4px; }
.chart .val { font-size: 13px; font-weight: 800; color: var(--muted); }
.chart .lab { font-size: 13px; font-weight: 800; }
.trow { display: grid; grid-template-columns: 150px 1fr 48px; align-items: center; gap: 10px; padding: 4px 0; font-weight: 700; }
.mbar.wide { height: 14px; margin: 0; }
.wrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.wname { flex: 1; display: flex; flex-direction: column; min-width: 120px; }
.wname small { color: var(--muted); }
.wstat { font-size: 14px; font-weight: 700; color: var(--muted); }
.lvl { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 99px; background: #ffe1e1; color: var(--red-d); }
.lvl3 { background: #fff1c2; color: var(--yellow-d); }
.lvl4, .lvl5 { background: #d9f7e1; color: var(--green-d); }
.form label { display: flex; flex-direction: column; gap: 4px; font-weight: 800; margin: 10px 0; }
.form label.check { flex-direction: row; align-items: center; gap: 10px; }
.form label.btn { display: inline-flex; flex-direction: row; margin: 0; }
.form select { font: 700 16px var(--font-body); padding: 10px; border-radius: 12px; border: 3px solid var(--line); background: #fff; color: var(--ink); }
.form input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--green); }
.form .input { width: 140px; }
.print-kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 10px 0; }
.print-kind {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; text-align: left;
  border: 3px solid var(--line); border-radius: 18px; background: #fff; color: var(--ink); cursor: pointer;
}
.print-kind span { font-family: var(--emoji); font-size: 28px; }
.print-kind b { font-size: 17px; }
.print-kind small { color: var(--muted); font-weight: 700; }
.print-kind.on { border-color: var(--blue); background: #eef7ff; }
@media (max-width: 640px) {
  .print-kinds { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .print-kind { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: center; padding: 10px 12px; }
  .print-kind span { grid-row: span 2; }
}
.print-opts { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 20px; }
.form .print-opts .input { width: min(360px, 100%); }
.muted.small { font-size: 13px; }
.print-area { background: #e9eef5; border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 12px; max-height: 70vh; overflow: auto; }
.ps-page {
  background: #fff; color: #222; width: 100%; max-width: 720px; margin: 0 auto; aspect-ratio: 210 / 297;
  padding: 5% 6%; display: flex; flex-direction: column; gap: 3%; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); font-family: var(--font-body);
  container-type: inline-size;
}
.ps-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; border-bottom: 2px solid #222; padding-bottom: 1.5cqw; }
.ps-head b { display: block; font: 800 4.6cqw var(--font-head); line-height: 1.1; }
.ps-head small { font-size: 2.2cqw; color: #666; font-weight: 700; }
.ps-name { font-size: 2.4cqw; font-weight: 700; white-space: nowrap; }
.ps-name i { display: inline-block; width: 18cqw; border-bottom: 1.5px solid #222; margin: 0 1.5cqw 0 .5cqw; }
.ps-name i.short { width: 11cqw; margin-right: 0; }
.ps-page .pic.swatch { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ps-vi { display: block; font-size: 2.4cqw; color: #666; font-weight: 700; }
.ps-cards { flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, 1fr); }
.ps-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1cqw; border: 1.5px dashed #999; margin: -0.75px; text-align: center; }
.ps-card .pic { font-size: 13cqw; }
.ps-card .pic.swatch { width: 12cqw; height: 12cqw; }
.ps-card .pic.num { color: #222; }
.ps-card b { font: 800 6cqw var(--font-head); line-height: 1.1; }
.ps-trace { flex: 1; display: grid; grid-template-rows: repeat(6, 1fr); }
.ps-trow { display: flex; align-items: center; gap: 3cqw; border-bottom: 1px solid #ddd; }
.ps-tpic { width: 14cqw; display: grid; place-items: center; flex: none; }
.ps-tpic .pic { font-size: 10cqw; }
.ps-tpic .pic.swatch { width: 9cqw; height: 9cqw; }
.ps-tlines { flex: 1; display: flex; flex-direction: column; gap: 2cqw; min-width: 0; }
.ps-line {
  display: flex; gap: 4cqw; align-items: flex-end; height: 7.5cqw;
  border-bottom: 1.5px solid #555; background: linear-gradient(transparent 55%, #cfd8e3 55% 57%, transparent 57%);
}
.ps-line b { font: 700 6.4cqw var(--font-body); line-height: 1; margin-bottom: -.2em; white-space: nowrap; letter-spacing: .06em; }
.ps-model { color: #222; }
.ps-ghost { color: #c4cbd4; }
.ps-match { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 20cqw; padding: 2cqw 4cqw; }
.ps-col { display: grid; grid-template-rows: repeat(6, 1fr); }
.ps-mitem { display: flex; align-items: center; justify-content: space-between; gap: 3cqw; }
.ps-mitem.right { justify-content: flex-start; }
.ps-mitem .pic { font-size: 11cqw; }
.ps-mitem .pic.swatch { width: 10cqw; height: 10cqw; }
.ps-mitem b { font: 800 5.6cqw var(--font-head); }
.ps-dot { width: 2.6cqw; height: 2.6cqw; border-radius: 50%; background: #222; flex: none; }
.cert-sheet { padding: 4%; }
.cert-frame { flex: 1; border: 1.2cqw double #d9a520; border-radius: 3cqw; padding: 5cqw 6cqw; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.6cqw; background: #fffdf5; }
.cert-top { font-family: var(--emoji); font-size: 13cqw; line-height: 1; }
.cert-kicker { margin: 0; font: 800 3cqw var(--font-head); letter-spacing: .3em; text-transform: uppercase; color: #3fa7ff; }
.cert-frame h2 { margin: 0; font: 800 6.6cqw var(--font-head); color: #8a6200; line-height: 1.1; }
.cert-line { margin: 0; font-size: 3cqw; color: #555; font-weight: 700; }
.cert-name { margin: 1cqw 0; font: 800 9cqw var(--font-head); line-height: 1.1; border-bottom: .5cqw solid #d9a520; padding: 0 4cqw 1cqw; }
.cert-name span { font-family: var(--emoji); }
.cert-level { margin: 0; font: 800 5cqw var(--font-head); color: #2e9e4f; }
.cert-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2cqw; width: 100%; margin-top: 2cqw; }
.cert-stats div { border: .3cqw solid #eadba8; border-radius: 2cqw; padding: 1.6cqw 1cqw; display: grid; gap: .4cqw; background: #fff; }
.cert-stats b { font: 800 5.4cqw var(--font-head); line-height: 1; }
.cert-stats small, .cert-foot small { font-size: 2.1cqw; color: #666; font-weight: 700; }
.cert-sub { margin: 2cqw 0 0; font: 800 2.8cqw var(--font-head); color: #8a6200; }
.cert-topics { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2cqw; }
.cert-topics span { font-size: 2.5cqw; font-weight: 800; padding: .8cqw 1.8cqw; border-radius: 99px; background: #fff3c4; }
.cert-foot { margin-top: auto; width: 100%; display: flex; justify-content: space-between; align-items: flex-end; gap: 2cqw; }
.cert-foot > div:not(.cert-owl) { display: grid; gap: .4cqw; border-top: .3cqw solid #222; padding-top: 1cqw; min-width: 26cqw; }
.cert-foot b { font: 800 3cqw var(--font-head); }
.cert-owl { font-family: var(--emoji); font-size: 10cqw; line-height: 1; }
.report-sheet { gap: 2cqw; }
.report-sheet h4 { margin: 1.5cqw 0 0; font: 800 3cqw var(--font-head); }
.rs-ava { font-family: var(--emoji); font-size: 7cqw; }
.rs-summary { margin: 0; font-size: 2.6cqw; line-height: 1.5; font-weight: 700; }
.rs-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2cqw; }
.rs-stats div { border: 1.5px solid #ddd; border-radius: 2cqw; padding: 1.5cqw; text-align: center; }
.rs-stats b { display: block; font: 800 5cqw var(--font-head); }
.rs-stats small { font-size: 2.1cqw; color: #666; font-weight: 700; }
.rs-chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2cqw; height: 18cqw; align-items: end; }
.rs-chart div { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: .5cqw; }
.rs-bar { width: 60%; background: #3fa7ff; border-radius: 1cqw 1cqw 0 0; min-height: 2px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.rs-chart i { font-style: normal; font-size: 2cqw; font-weight: 800; order: -1; }
.rs-chart small { font-size: 2cqw; font-weight: 700; color: #555; }
.rs-topics { display: grid; grid-template-columns: 1fr 1fr; gap: 1cqw 4cqw; }
.rs-topics div { display: grid; grid-template-columns: 22cqw 1fr 7cqw; align-items: center; gap: 1.5cqw; font-size: 2.3cqw; font-weight: 700; }
.rs-meter { height: 1.6cqw; background: #eee; border-radius: 1cqw; overflow: hidden; }
.rs-meter span { display: block; height: 100%; background: #4cc26b; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.rs-tricky { display: flex; flex-wrap: wrap; gap: 1.5cqw; }
.rs-tricky span { display: flex; align-items: center; gap: 1cqw; border: 1.5px solid #ddd; border-radius: 99px; padding: .6cqw 2cqw; }
.rs-tricky .pic { font-size: 4cqw; }
.rs-tricky b { font-size: 2.6cqw; }
.rs-tips { margin: 0; padding-left: 4cqw; font-size: 2.4cqw; line-height: 1.5; }
.print-root { display: none; }
@media print {
  @page { size: A4; margin: 0; }
  body.printing { background: #fff !important; margin: 0; padding: 0; }
  body.printing > *:not(.print-root) { display: none !important; }
  body.printing .print-root { display: block; }
  .print-root .ps-page { box-shadow: none; max-width: none; width: 210mm; height: 297mm; aspect-ratio: auto; break-after: page; margin: 0; }
  .print-root .ps-page:last-child { break-after: auto; }
}
@media (max-width: 560px) {
  .hud { gap: 8px; }
  .xpbar { order: 3; flex-basis: 100%; }
  .tiles { gap: 10px; }
  .tile { min-height: 124px; padding: 14px 12px; }
  .tile b { font-size: 19px; }
  .t-ic { font-size: 36px; }
  .bubble { font-size: 16px; }
  .mascot { font-size: 64px; }
  .choice { min-height: 100px; }
  .pic.xl { font-size: 96px; }
  .flashcard { height: 330px; }
  .memory-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .spelled { gap: 4px; flex-wrap: nowrap; width: 100%; }
  .letter { min-width: 0; flex: 1 1 0; max-width: 36px; height: 46px; padding: 0; font-size: 24px; border-radius: 10px; }
  .gap { flex: none; }
  .gap { width: 10px; }
  .tile-l { width: 48px; height: 56px; font-size: 28px; }
  .trow { grid-template-columns: 110px 1fr 40px; font-size: 14px; }
  .avatar-grid { grid-template-columns: repeat(4, 1fr); }
  .map-node { width: 100%; }
  .map-node.left, .map-node.right { align-self: stretch; }
}
.screen.enter > :not(.tabbar) { animation: screenin .32s cubic-bezier(.2, .8, .3, 1) backwards; }
.screen.enter > :nth-child(2):not(.tabbar) { animation-delay: .04s; }
.screen.enter > :nth-child(3):not(.tabbar) { animation-delay: .08s; }
.screen.enter > :nth-child(n+4):not(.tabbar) { animation-delay: .12s; }
@keyframes screenin { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .balloon { animation: none; bottom: 20%; }
}
