/* Cat Math: a warm paper page, the teacher at the chalkboard, number tiles and symbol tiles. The title screen and the
   sheets are shared/mainmenu.js (menu.css, loaded after this); only their colors are set here (--sg-*). */
:root {
  --bg: #f5e7cf; --bg-hi: #fffaf0; --ink: #3b2a22; --ink-soft: #7a5f4e; --line: rgba(59, 42, 34, 0.18);
  --accent: #2f7a5d; --accent-dark: #205a44; --sheet: #fffaf2; --gold: #e8a923; --bad: #d1453b;
  --chalk-bg: #2f5d4a; --chalk: #f4f1e6;
  --tile: 84px;
  color-scheme: light;
}
* { box-sizing: border-box; }
* { touch-action: manipulation; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Baloo 2", ui-rounded, system-ui, sans-serif; color: var(--ink);
  background: radial-gradient(ellipse 110% 60% at 50% 0%, var(--bg-hi), transparent 70%), var(--bg);
  overflow: hidden; overscroll-behavior: none;
}
button { font: inherit; color: inherit; }
.app {
  position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--sg-corner-top) - 2px) 12px calc(env(safe-area-inset-bottom, 0px) + 10px);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.app[data-board="slate"] { --chalk-bg: #33373d; --chalk: #f2f2ee; }
.app[data-board="navy"] { --chalk-bg: #24345e; --chalk: #f2f0ff; }
.app[data-board="plum"] { --chalk-bg: #4b2e4f; --chalk: #fbeff6; }
.app[data-board="cork"] { --chalk-bg: #b9895a; --chalk: #3a2414; }
.app[data-board="white"] { --chalk-bg: #f6f7f4; --chalk: #2c3e66; }

/* ---- top bar ---- */
.bar { width: 100%; max-width: 520px; display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 8px; }
.icon-btn {
  width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 16px;
  background: rgba(255, 255, 255, 0.72); box-shadow: inset 0 1px 0 #fff, 0 2px 0 rgba(59, 42, 34, 0.13); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn svg { width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:active { transform: scale(0.94); }
.head { text-align: center; min-width: 0; }
.name { margin: 0; font-weight: 800; font-size: 22px; line-height: 1.1; color: var(--accent-dark); }
.sub { margin: 0; font-weight: 700; font-size: 15px; line-height: 1.2; color: var(--ink-soft); white-space: nowrap; }
.sub .tag { display: inline-block; margin-left: 6px; padding: 1px 8px 0; border-radius: 999px; background: #e3d3f4; color: #5c2f7a; font-size: 13px; }

/* ---- the clock and the star ---- */
.status { width: 100%; max-width: 440px; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0 8px; min-height: 36px; }
.clock {
  margin: 0; display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px 2px 10px; border-radius: 999px;
  background: #fff; box-shadow: inset 0 -2px 0 rgba(59, 42, 34, 0.1), 0 2px 6px -3px rgba(59, 42, 34, 0.35);
  font-weight: 800; font-size: 20px; line-height: 1.2; font-variant-numeric: tabular-nums;
}
.clock svg { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; margin-top: -2px; }
.clock.stopped { color: var(--accent); }
.clock[hidden] { display: inline-flex; visibility: hidden; }
.star { margin: 0; display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 15px; color: var(--ink-soft); text-align: right; }
.star .s { font-size: 22px; line-height: 1; color: rgba(59, 42, 34, 0.25); }
.star.got .s { color: var(--gold); text-shadow: 0 1px 0 #a8730f; }
.star.got { color: #8a5a0a; }

/* ---- the chalkboard ---- */
.stage { flex: 1 1 auto; min-height: 0; width: 100%; max-width: 440px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 14px; padding: 2px 4px 2vh; overflow-y: auto; overscroll-behavior: contain; }
/* centred when there's room; from the top (and scrollable) when there isn't */
.stage::before, .stage::after { content: ""; flex: 1 1 0; min-height: 0; margin: -7px 0; }
.ops[hidden] { display: none; }
.board {
  position: relative; width: 100%; min-height: 168px; display: flex; align-items: stretch; gap: 6px; padding: 12px 14px 16px 6px;
  border-radius: 14px; background:
    radial-gradient(ellipse 60% 50% at 30% 30%, rgba(255, 255, 255, 0.06), transparent 70%),
    radial-gradient(ellipse 45% 40% at 75% 75%, rgba(255, 255, 255, 0.05), transparent 70%), var(--chalk-bg);
  border: 10px solid #a8693a; box-shadow: inset 0 0 0 2px #6e3f1f, 0 0 0 2px #6e3f1f, 0 10px 18px -10px rgba(59, 42, 34, 0.55);
  color: var(--chalk);
}
.board::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: -4px; height: 7px; border-radius: 3px; background: #8a5129; }
.teacher { flex: none; width: 104px; align-self: flex-end; margin-bottom: -10px; transform-origin: 50% 100%; }
.teacher svg { display: block; width: 104px; height: 104px; }
.teacher.hop { animation: hop 0.5s ease-out; }
.teacher.cheer { animation: cheer 0.9s ease-out 2; }
.goal { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.make { margin: 0; font-weight: 800; font-size: 18px; line-height: 1; opacity: 0.85; }
.target { margin: 0; font-weight: 800; font-size: 64px; line-height: 1; letter-spacing: 1px; font-variant-numeric: tabular-nums; text-shadow: 0 0 1px currentColor; }
.board.won .target { color: #ffe27a; text-shadow: 0 0 14px rgba(255, 226, 122, 0.6); }
.app[data-board="white"] .board.won .target, .app[data-board="cork"] .board.won .target { color: #b0700c; text-shadow: none; }
.steps { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 1px; justify-items: center; font-weight: 700; font-size: 17px; line-height: 1.2; font-variant-numeric: tabular-nums; opacity: 0.9; }
.steps li.new { animation: chalk 0.35s ease-out; }
.steps li.hit { color: #ffe27a; }
.app[data-board="white"] .steps li.hit, .app[data-board="cork"] .steps li.hit { color: #b0700c; }
.steps .empty { opacity: 0.6; font-weight: 600; font-size: 15px; }
@keyframes chalk { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes hop { 0%, 100% { transform: none; } 35% { transform: translateY(-10px) scale(1.04, 0.96); } 60% { transform: scale(1.04, 0.96); } }
@keyframes cheer { 0%, 100% { transform: none; } 30% { transform: translateY(-14px) rotate(-5deg); } 60% { transform: translateY(-4px) rotate(5deg); } }

/* ---- the tiles ---- */
.nums { display: grid; grid-template-columns: repeat(var(--cols, 3), var(--tile)); gap: 12px; justify-content: center; }
.num {
  position: relative; display: inline-grid; place-items: center; width: var(--tile); height: var(--tile); border: 0; padding: 0; border-radius: 18px; cursor: pointer;
  font-weight: 800; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; color: #3b2414;
  background: linear-gradient(160deg, #f6d7a4, #e3ae6b 60%, #c98a45); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55), inset 0 -5px 0 rgba(110, 63, 31, 0.35), 0 4px 0 #8a5129, 0 8px 12px -6px rgba(59, 42, 34, 0.5);
  transition: transform 0.12s; -webkit-tap-highlight-color: transparent;
}
.num span { position: relative; }
.num.big { font-size: 27px; }
.num.huge { font-size: 22px; }
.num.made::before { content: ""; position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.75); }
.num.sel { transform: translateY(-6px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55), inset 0 -5px 0 rgba(110, 63, 31, 0.35), 0 0 0 4px var(--accent), 0 10px 0 -2px #8a5129, 0 14px 16px -6px rgba(59, 42, 34, 0.5); }
.num.goal { box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55), inset 0 -5px 0 rgba(110, 63, 31, 0.35), 0 0 0 4px var(--gold), 0 0 22px 4px rgba(232, 169, 35, 0.6); }
.num.pop { animation: merge 0.34s ease-out 0.13s both; }
.num.powered { animation: merge 0.34s ease-out 0.13s both, powered 0.9s ease-out 0.13s; }
@keyframes merge { 0% { transform: scale(0.62); } 45% { transform: scale(1.16, 0.88); } 70% { transform: scale(0.95, 1.06); } 100% { transform: none; } }
@keyframes powered { 0%, 100% { filter: none; } 30% { filter: brightness(1.35) saturate(1.3) drop-shadow(0 0 10px rgba(232, 169, 35, 0.9)); } }
/* ^ is optional from the retarget day on: a gold ring says it's the bonus tile */
.op.bonus { box-shadow: 0 0 0 3px var(--gold), 0 3px 0 rgba(110, 63, 31, 0.35); }
.pow-chip { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--gold); color: #3b2414; font-size: 15px; font-weight: 800; vertical-align: 3px; }
/* the effects layer: a tile sliding onto another, chalk dust, gold and stars */
.cm-fx { position: fixed; inset: 0; pointer-events: none; z-index: 12; overflow: hidden; }
.cm-ghost { position: fixed; margin: 0; pointer-events: none; z-index: 1; }
.cm-bit { position: fixed; width: 9px; height: 9px; border-radius: 50%; pointer-events: none; }
.cm-bit.chalk { background: rgba(255, 255, 255, 0.85); box-shadow: 0 0 4px rgba(255, 255, 255, 0.6); }
.cm-bit.gold { background: #ffd65a; box-shadow: 0 0 6px rgba(255, 196, 40, 0.9); width: 7px; height: 7px; }
.cm-bit.star { width: auto; height: auto; background: none; color: #ffd24a; font-size: 22px; line-height: 1; text-shadow: 0 0 8px rgba(255, 200, 40, 0.9); }
/* the solve: a held breath, then the burst */
.app.freeze .num:not(.goal), .app.freeze .op { opacity: 0.45; transition: opacity 0.12s; }
.app.freeze .num.goal { transform: scale(1.12); transition: transform 0.25s ease-out; }
.app.freeze .board .target { transform: scale(1.08); transition: transform 0.25s ease-out; }
.app.solved-burst .board .target { animation: ring 0.6s ease-out; }
.app.solved-burst .num.goal { animation: ring 0.6s ease-out; }
@keyframes ring { 0% { transform: scale(1.15); } 40% { transform: scale(0.96); } 100% { transform: none; } }
.star.spin .s { display: inline-block; animation: spin 0.8s cubic-bezier(.2,.8,.3,1.2); }
@keyframes spin { 0% { transform: scale(0.3) rotate(-180deg); } 70% { transform: scale(1.5) rotate(15deg); } 100% { transform: none; } }
.num.shake { animation: shake 0.36s ease-in-out; }
.slot { width: var(--tile); height: var(--tile); padding: 0; border-radius: 18px; border: 3px dashed rgba(59, 42, 34, 0.18); background: transparent; box-shadow: none; }
@keyframes pop { 0% { transform: scale(0.5); } 70% { transform: scale(1.1); } 100% { transform: none; } }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }
/* tile sets (unlocked) */
[data-tiles="yarn"] .num {
  border-radius: 50%; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
  background: repeating-linear-gradient(115deg, transparent 0 7px, rgba(255, 255, 255, 0.22) 7px 9px), radial-gradient(circle at 35% 30%, #f59ab8, #d8577f 60%, #a83460);
  box-shadow: inset 0 -5px 0 rgba(100, 20, 50, 0.3), 0 4px 0 #8a2a4f, 0 8px 12px -6px rgba(59, 42, 34, 0.5);
}
[data-tiles="cookie"] .num {
  border-radius: 50%; color: #3d2412;
  background: radial-gradient(circle at 28% 34%, #5a3418 0 3px, transparent 4px), radial-gradient(circle at 70% 26%, #5a3418 0 3px, transparent 4px), radial-gradient(circle at 76% 70%, #5a3418 0 3px, transparent 4px), radial-gradient(circle at 26% 74%, #5a3418 0 2.5px, transparent 3.5px), radial-gradient(circle at 40% 35%, #f4cf8e, #dca35c 65%, #b97a3b);
  box-shadow: inset 0 -5px 0 rgba(110, 63, 31, 0.3), 0 4px 0 #8a5129, 0 8px 12px -6px rgba(59, 42, 34, 0.5);
}
[data-tiles="gem"] .num {
  border-radius: 22px; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
  background: conic-gradient(from 45deg, #6fd1e8, #3a8fd6, #6a6fe0, #3a8fd6, #6fd1e8, #9fe6f0, #6fd1e8);
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.28), 0 4px 0 #2a4f93, 0 8px 12px -6px rgba(59, 42, 34, 0.5);
}
[data-tiles="paw"] .num {
  border-radius: 50%; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
  background: var(--paw) center 60% / 76% no-repeat, radial-gradient(circle at 35% 30%, #7fd1a8, #3e9a72 65%, #2a7656);
  box-shadow: inset 0 -5px 0 rgba(20, 70, 50, 0.3), 0 4px 0 #22603f, 0 8px 12px -6px rgba(59, 42, 34, 0.5);
}
[data-tiles="yarn"] .num.sel, [data-tiles="cookie"] .num.sel, [data-tiles="gem"] .num.sel, [data-tiles="paw"] .num.sel { box-shadow: 0 0 0 4px var(--accent), 0 12px 16px -6px rgba(59, 42, 34, 0.5); }
[data-tiles="yarn"] .num.goal, [data-tiles="cookie"] .num.goal, [data-tiles="gem"] .num.goal, [data-tiles="paw"] .num.goal { box-shadow: 0 0 0 4px var(--gold), 0 0 22px 4px rgba(232, 169, 35, 0.6); }
[data-tiles="yarn"] .slot, [data-tiles="cookie"] .slot, [data-tiles="paw"] .slot { border-radius: 50%; }

.ops { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.op {
  display: inline-grid; place-items: center; width: 58px; height: 58px; border: 0; border-radius: 50%; cursor: pointer; padding: 0;
  font-weight: 800; font-size: 32px; line-height: 1; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), inset 0 -4px 0 rgba(0, 0, 0, 0.2), 0 3px 0 rgba(59, 42, 34, 0.35);
  -webkit-tap-highlight-color: transparent; transition: transform 0.12s, opacity 0.2s;
}
.op[data-op="a"] { background: #4ba36e; }
.op[data-op="s"] { background: #3d86c6; }
.op[data-op="m"] { background: #e58a32; }
.op[data-op="d"] { background: #8a62c9; }
.op[data-op="p"] { background: #d4507e; font-size: 30px; }
.op.sel { transform: translateY(-5px) scale(1.06); box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--ink), 0 8px 10px -4px rgba(59, 42, 34, 0.5); }
.op:disabled { opacity: 0.18; cursor: default; transform: scale(0.86); box-shadow: none; }
.num:focus-visible, .op:focus-visible, .pill:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---- under the tiles ---- */
.controls { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.controls[hidden] { display: none; }
.pill {
  min-height: 48px; min-width: 88px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 4px 16px 2px;
  border: 0; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 800; font-size: 17px; cursor: pointer;
  box-shadow: inset 0 -3px 0 rgba(59, 42, 34, 0.12), 0 2px 0 rgba(59, 42, 34, 0.12); -webkit-tap-highlight-color: transparent;
}
.pill svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; margin-top: -2px; }
.pill:active { transform: translateY(2px); box-shadow: inset 0 -1px 0 rgba(59, 42, 34, 0.12); }
.pill:disabled { opacity: 0.45; cursor: default; }
.pill.primary { background: var(--accent); color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18), 0 2px 0 rgba(59, 42, 34, 0.15); }
.pill.gold { background: var(--gold); color: #3b2414; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.15), 0 2px 0 rgba(59, 42, 34, 0.15); }
.pill.quiet { background: transparent; box-shadow: none; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; min-width: 0; }
.done { width: 100%; text-align: center; }
.done-title { margin: 0; font-weight: 800; font-size: 24px; line-height: 1.15; color: var(--accent-dark); }
.done-next { margin: 0 0 8px; font-weight: 700; font-size: 15px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.done-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.done-row .pill { min-width: 0; flex: 1 1 28%; padding: 4px 10px 2px; }
.done-row .pill.wide { flex-basis: 100%; }
.toast {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 120px); z-index: 5; margin: 0; padding: 8px 16px 6px; max-width: calc(100vw - 32px);
  border-radius: 14px; background: var(--ink); color: #fff; font-weight: 800; font-size: 16px; text-align: center;
  transform: translate(-50%, -6px); opacity: 0; transition: opacity 0.18s, transform 0.18s; pointer-events: none;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---- sheets ---- */
.cm-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 0 6px; }
.cm-nums.three { grid-template-columns: repeat(3, 1fr); }
.cm-num { text-align: center; }
.cm-num b { display: block; font-size: 28px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.cm-num span { display: block; font-size: 13px; font-weight: 700; line-height: 1.15; color: var(--ink-soft); }
.cm-h { margin: 10px 0 4px; font-weight: 800; font-size: 17px; }
.cm-note { margin: 6px 0 0; font-weight: 700; font-size: 15px; line-height: 1.35; color: var(--ink-soft); }
.cm-fresh { margin: 0 0 6px; font-weight: 800; font-size: 15px; line-height: 1.3; color: var(--accent-dark); }
.cm-next { margin: 10px 0 0; text-align: center; font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }
.cm-share { width: 100%; min-height: 50px; margin-top: 8px; border: 0; border-radius: 16px; background: var(--accent); color: #fff; font-weight: 800; font-size: 18px; cursor: pointer; }
.cm-way { margin: 4px 0 0; padding: 10px 14px 8px; border-radius: 14px; background: var(--chalk-bg, #2f5d4a); color: var(--chalk, #f4f1e6); font-weight: 800; font-size: 19px; line-height: 1.35; list-style: none; font-variant-numeric: tabular-nums; }
.cm-way li:last-child { color: #ffe27a; }
.cm-week { display: grid; gap: 4px; }
.cm-wd { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 8px; padding: 6px 12px 4px; border-radius: 12px; background: rgba(255, 255, 255, 0.7); font-weight: 700; font-size: 15px; }
.cm-wd small { color: var(--ink-soft); font-size: 13px; }
.cm-wd .t { font-variant-numeric: tabular-nums; text-align: right; }
.cm-wd.today { box-shadow: inset 0 0 0 2px var(--accent); }
.cm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cm-day {
  width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 14px 4px;
  border: 1px solid var(--line); border-radius: 14px; background: #fff; text-align: left; cursor: pointer; font-weight: 800; font-size: 16px;
}
.cm-day small { display: block; font-weight: 700; font-size: 13px; color: var(--ink-soft); }
.cm-day .chip { flex: none; padding: 3px 10px 1px; border-radius: 999px; font-size: 14px; background: rgba(59, 42, 34, 0.08); font-variant-numeric: tabular-nums; }
.cm-day .chip.win { background: var(--accent); color: #fff; }
.cm-day .chip.lose { background: #8a7c76; color: #fff; }
.cm-day .chip.go { background: var(--gold); color: #3b2414; }
.cm-day:disabled { cursor: default; background: rgba(255, 255, 255, 0.5); }
.cm-more { min-height: 48px; border: 0; border-radius: 14px; background: rgba(59, 42, 34, 0.09); font-weight: 800; font-size: 16px; cursor: pointer; }
.cm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.cm-pick {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 100px; padding: 6px 4px 4px;
  border: 2px solid transparent; border-radius: 16px; background: rgba(255, 255, 255, 0.72); cursor: pointer;
}
.cm-pick svg { display: block; }
.cm-pick small { font-weight: 700; font-size: 12px; line-height: 1.1; color: var(--ink-soft); text-align: center; }
.cm-pick[aria-pressed="true"] { border-color: var(--accent); background: #fff; }
.cm-pick.locked { cursor: default; background: rgba(59, 42, 34, 0.06); }
.cm-pick.locked .q { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; border: 2px dashed rgba(59, 42, 34, 0.3); font-weight: 800; font-size: 24px; color: rgba(59, 42, 34, 0.4); }
.cm-pick .num { --tile: 54px; font-size: 24px; pointer-events: none; }
.cm-stamps { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cm-ach { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cm-ach li { display: flex; gap: 10px; align-items: center; padding: 8px 12px 6px; border-radius: 14px; background: rgba(255, 255, 255, 0.72); font-weight: 700; font-size: 15px; line-height: 1.25; }
.cm-ach li b { display: block; font-size: 16px; }
.cm-ach li.no { opacity: 0.55; }
.cm-ach .medal { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #f4c44e; color: #6b4a0c; font-weight: 800; }
.cm-ach li.no .medal { background: rgba(59, 42, 34, 0.14); color: transparent; }
.cm-ask { display: flex; gap: 8px; margin-top: 12px; }
.cm-ask .pill { flex: 1; }
.cm-ex { display: inline-flex; gap: 6px; align-items: center; font-weight: 800; }
.cm-ex .num { --tile: 44px; font-size: 20px; border-radius: 12px; pointer-events: none; }
.cm-ex .op { width: 38px; height: 38px; font-size: 22px; pointer-events: none; }

/* ---- the title screen's colors (the layout is shared/mainmenu.js) ---- */
#mm {
  --sg-bg: radial-gradient(ellipse 100% 70% at 50% 25%, var(--bg-hi), transparent 75%), var(--bg);
  --sg-ink: var(--ink); --sg-ink-soft: var(--ink-soft);
  --sg-title: var(--accent-dark); --sg-title-shadow: 0 2px 0 #fff;
  --sg-accent: var(--accent); --sg-accent-ink: #fff;
  --sg-card: #fff; --sg-card-ink: var(--ink); --sg-line: rgba(59, 42, 34, 0.16);
}
#mm .cm-title-art { width: 157px; height: 150px; }
#mm .cm-title-art svg { display: block; width: 100%; height: 100%; }
.sg-sheet { --sg-sheet-bg: var(--sheet); --sg-sheet-ink: var(--ink); --sg-accent: var(--accent); --sg-accent-ink: #fff; --sg-ink-soft: var(--ink-soft); }

@media (max-height: 760px) {
  :root { --tile: 64px; }
  .num { font-size: 30px; border-radius: 15px; }
  .num.big { font-size: 24px; }
  .num.huge { font-size: 19px; }
  .slot { border-radius: 15px; }
  .nums { gap: 10px; }
  .board { min-height: 128px; padding: 8px 12px 12px 4px; }
  .teacher, .teacher svg { width: 80px; height: 80px; }
  .make { font-size: 16px; }
  .target { font-size: 46px; }
  .steps { font-size: 15px; line-height: 1.15; margin-top: 4px; }
  .op { width: 50px; height: 50px; font-size: 28px; }
  .stage { gap: 10px; }
  .done-title { font-size: 21px; }
  .done-next { margin-bottom: 6px; }
  .pill { min-height: 46px; }
}
@media (prefers-reduced-motion: reduce) {
  .num.pop, .num.powered, .num.shake, .teacher.hop, .teacher.cheer, .steps li.new, .star.spin .s { animation: none; }
  .cm-fx { display: none; }
  .num.shake { outline: 3px solid var(--bad); }
  .toast, .num, .op { transition: none; }
}
