/* Arrow Grove: a garden game screen. Chunky 3D buttons press into their shadow; the board is the hero. */
:root {
  color-scheme: light;
  --font: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", "Varela Round", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ink: #22402f;
  --muted: #6b8270;
  --arrow: #2c4a3e;
  --green: #58b368;
  --green-dark: #3e8e4f;
  --green-deep: #2f6b45;
  --shade: #bcd5a5;
  --paper: #fffdf5;
  --sun: #ffd23f;
  --sun-edge: #e0a920;
  --sun-ink: #4a3500;
  --coral: #ef6654;
  font-family: var(--font);
  color: var(--ink);
  background: #dff0cf;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; overflow: hidden; background: linear-gradient(#ecf7e2, #d7eec4); }
button, input, select { font: inherit; }
button { cursor: pointer; border: 0; color: inherit; background: transparent; padding: 0; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:disabled { cursor: default; }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid #4b3bf0; outline-offset: 3px; }
[hidden] { display: none !important; }
.icon { width: 22px; height: 22px; flex: none; display: block; }

/* ---------- Scene ---------- */
#app {
  position: relative; width: 100%; max-width: 620px; height: 100dvh; min-height: 320px; margin: auto;
  display: flex; flex-direction: column; gap: 10px;
  padding: max(12px, var(--safe-top, env(safe-area-inset-top))) max(12px, var(--safe-right, env(safe-area-inset-right))) max(12px, var(--safe-bottom, env(safe-area-inset-bottom))) max(12px, var(--safe-left, env(safe-area-inset-left)));
}
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: radial-gradient(ellipse 70% 40% at 15% 0%, #fffdf0 0, transparent 70%), linear-gradient(#ecf7e2 0%, #dcefc9 100%); }
.hill { position: absolute; border-radius: 50%; }
.hill-back { width: 160vmax; height: 60vmax; left: -50vmax; bottom: -46vmax; background: #c8e5ad; }
.hill-front { width: 120vmax; height: 50vmax; right: -50vmax; bottom: -40vmax; background: #b9dd98; }

/* ---------- 3D buttons ---------- */
.icon-btn {
  position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--green-deep); box-shadow: 0 4px 0 var(--shade), 0 6px 14px #2f5a3214;
  transition: transform .08s, box-shadow .08s;
}
.icon-btn .icon { width: 25px; height: 25px; }
.icon-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--shade); }
.garden-btn .tree { width: 32px; height: 35px; margin-top: -2px; }
.icon-btn[data-new]::after { content: ""; position: absolute; top: 0; right: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--coral); border: 2px solid #fff; }
.btn {
  width: 100%; min-height: 54px; padding: 12px 20px; border-radius: 18px; display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 17px; font-weight: 900; letter-spacing: .2px; transition: transform .08s, box-shadow .08s;
}
.btn .icon { width: 22px; height: 22px; }
.btn.primary { background: var(--green); color: #fff; box-shadow: 0 5px 0 var(--green-dark), 0 10px 22px #3e8e4f40; }
.btn.primary:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--green-dark); }
.btn.ghost { min-height: 46px; font-size: 15px; background: #fff; color: var(--green-deep); box-shadow: 0 4px 0 var(--shade); }
.btn.ghost:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--shade); }

/* ---------- Top bar: settings, the level and its grove, the garden (or the way back from the daily board) ---------- */
.topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 8px; flex: none; }
.corner { display: flex; gap: 8px; }
.corner.end { justify-content: flex-end; }
.level-block { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.grove-label { display: none; margin: 0; font-size: 12px; font-weight: 800; color: var(--muted); }
.level-pill {
  margin: 0; display: inline-flex; align-items: center; gap: 8px; padding: 6px 7px 6px 15px; min-height: 40px;
  border-radius: 999px; background: var(--green-deep); color: #fff; box-shadow: 0 4px 0 #1d4a2f;
  font-size: 19px; font-weight: 900; line-height: 1; white-space: nowrap;
}
#app[data-mode="daily"] .level-pill { background: var(--sun); color: var(--sun-ink); box-shadow: 0 4px 0 var(--sun-edge); padding-right: 15px; }
.tier { font-size: 11px; font-weight: 900; padding: 5px 9px; border-radius: 999px; background: #e3f4d3; color: var(--green-deep); }
.tier[data-tier="medium"] { background: #dcecff; color: #2c5d8f; }
.tier[data-tier="hard"] { background: #ffe1d1; color: #b04a22; }
.tier[data-tier="rest"] { background: #fff1b8; color: #7a5a00; }
.grove { display: flex; align-items: center; gap: 5px; }
.trail { display: flex; align-items: center; gap: 5px; margin: 0; padding: 0; list-style: none; }
.trail li { width: 11px; height: 11px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: inset 0 0 0 2px #b4cf9c; }
.trail li > span { display: none; }
.trail li[data-tier="hard"] { box-shadow: inset 0 0 0 2px #f0a07c; }
.trail li.done { background: var(--green); box-shadow: none; }
.trail li.current { width: 15px; height: 15px; background: var(--sun); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--sun-edge); }
.trail-goal { display: grid; }
.trail-goal svg { width: 30px; height: 33px; margin: -10px -4px -6px 0; }
.trail-caption { display: none; }

.chip { position: relative; min-height: 44px; padding: 5px 12px 5px 8px; border-radius: 16px; display: inline-flex; align-items: center; gap: 6px; font-weight: 900; transition: transform .08s, box-shadow .08s; }
.chip-text { display: flex; flex-direction: column; text-align: left; line-height: 1.05; }
.chip-text b { font-size: 13px; font-weight: 900; white-space: nowrap; }
.chip-text small { display: none; }
.journey-chip { background: #fff; color: var(--green-deep); box-shadow: 0 4px 0 var(--shade); }
.journey-chip:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--shade); }
@keyframes sun-turn { to { rotate: 360deg; } }

/* ---------- HUD: arrows left, progress, stars or the daily score ---------- */
.hud { position: relative; flex: none; display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 6px 12px; border-radius: 16px; background: #ffffffbf; box-shadow: 0 3px 0 #bcd5a5b3; }
.count { display: flex; align-items: center; gap: 6px; color: var(--green-deep); font-size: 13px; font-weight: 800; white-space: nowrap; }
.count > .icon { width: 18px; height: 18px; color: var(--green); }
#remaining b { display: inline-block; min-width: 1.2em; font-size: 19px; font-weight: 900; color: var(--ink); text-align: center; }
.progress-track { flex: 1; min-width: 40px; height: 10px; border-radius: 99px; background: #e2eed6; box-shadow: inset 0 1px 2px #0000001a; overflow: hidden; }
#progress { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #8cc06a, #58b368); transition: width .3s cubic-bezier(.2, .8, .3, 1); }
.rating { display: flex; gap: 1px; }
.rating span { display: grid; color: #d5dccd; }
.rating .lit { color: #f5b82e; }
.rating .icon { width: 21px; height: 21px; }
.score { display: flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.score small { font-size: 11px; font-weight: 800; color: var(--muted); }
.score b { display: inline-block; font-size: 19px; font-weight: 900; color: #c88a00; }
.milestone { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 16px; background: linear-gradient(90deg, #fff6c4, #fffdf2 60%, #fff6c4); color: #7a5a00; font-size: 15px; font-weight: 900; box-shadow: 0 3px 0 var(--sun-edge); pointer-events: none; white-space: nowrap; }
.milestone .icon { width: 22px; height: 22px; color: #f0a500; }
.cost { position: absolute; right: 22px; top: -4px; z-index: 3; font-size: 16px; font-weight: 900; color: var(--coral); pointer-events: none; }

/* ---------- Board ---------- */
.play-area { flex: 1; min-height: 0; display: flex; justify-content: center; }
/* The frame is its own compositing layer. Safari paints the board's SVG into the page's layer otherwise, so every
   frame of a flying arrow repainted the backdrop and this blurred shadow, and on an iPad a 0.3 s flight showed one or
   two frames (docs/qa/arrow-grove-2026-10-15). */
.board-frame { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 26px; background: var(--paper); border: 3px solid #fff; box-shadow: 0 6px 0 var(--shade), 0 16px 34px #2f5a3229; will-change: transform; }
.board-glow { position: absolute; inset: 0; border-radius: 22px; pointer-events: none; opacity: 0; box-shadow: inset 0 0 0 6px #ffe36e, inset 0 0 50px #ffd23f99; }
#board-scroll { width: 100%; height: 100%; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c6d1bc transparent; touch-action: none; }
#board-scroll.zoomed { cursor: grab; }
#board-scroll.dragging, #board-scroll.dragging .arrow-piece { cursor: grabbing; }
#board { display: block; width: calc(100% * var(--zoom, 1)); height: calc(100% * var(--zoom, 1)); overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: none; }
.floor circle { fill: var(--floor, #dbe7cf); }
/* Each grove has its own ink (game.js PALETTES); the meadow ink is the default. */
#app[data-palette="sea"] { --arrow: #1b5b66; --floor: #d3e6e6; }
#app[data-palette="dusk"] { --arrow: #34416f; --floor: #dde0ee; }
#app[data-palette="blossom"] { --arrow: #6c2d56; --floor: #f0dde7; }
.arrow-piece { cursor: pointer; outline: none; color: var(--arrow); }
.arrow-line { fill: none; stroke: currentColor; stroke-width: 4.8; stroke-linejoin: round; stroke-linecap: round; pointer-events: none; }
.arrow-head { fill: currentColor; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; pointer-events: visiblePainted; }
.arrow-hit { fill: none; stroke: transparent; stroke-width: 26; stroke-linecap: round; stroke-linejoin: round; pointer-events: stroke; }
@media (hover: hover) { .arrow-piece:hover { color: color-mix(in srgb, var(--arrow) 78%, #fff); } }
.arrow-piece.pressed { color: color-mix(in srgb, var(--arrow) 62%, #fff); }
.arrow-piece:focus-visible { color: #936926; filter: drop-shadow(0 0 3px #e3b65e); }
.arrow-piece.hinted { color: #79a746; filter: drop-shadow(0 0 4px #c6dba5); }
.arrow-piece.blocked:not(.hinted), .arrow-piece.obstacle { color: #ef6654; filter: none; }
.arrow-piece.leaving { color: #58b368; filter: none; pointer-events: none; }
.arrow-piece.leaving * { pointer-events: none; }
.burst { pointer-events: none; }
/* Level 1: everything but the next arrow steps back while the hand shows what to do. */
#board.lesson .arrow-piece:not(.lesson-target):not(.obstacle):not(.blocked):not(.leaving) { color: #d4ddd0; }
.arrow-piece.lesson-target { color: #3e9a52; animation: lesson-glow 1.3s ease-in-out infinite; }
.arrow-piece.lesson-target.blocked { color: #3e9a52; }
.coach { pointer-events: none; }
.coach-ring { fill: #ffd23f40; stroke: #ffd23f; stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: coach-ring 1.3s ease-out infinite; }
.coach-finger { animation: coach-tap 1.3s ease-in-out infinite; }
.coach-finger path { fill: #fffef6; stroke: #2c4a3e; stroke-width: 3; stroke-linejoin: round; }
@keyframes lesson-glow { 0%, 100% { filter: drop-shadow(0 0 2px #9be07a); } 50% { filter: drop-shadow(0 0 8px #7fd65a); } }
@keyframes coach-ring { 0% { scale: .55; opacity: 1; } 100% { scale: 1.5; opacity: 0; } }
@keyframes coach-tap { 0%, 100% { translate: 7px 10px; } 40% { translate: 0 0; } 52% { translate: 0 2px; } }
/* Zoom bar: in the board's spare margin, under a tall board (bottom) or beside a wide one (side),
   so it never covers an arrow. Zoomed in, the percentage turns green: it is the way back. */
#board-scroll { height: calc(100% - 46px); }
.board-frame[data-bar="side"] #board-scroll { width: calc(100% - 46px); height: 100%; }
.zoom-tools { position: absolute; z-index: 2; bottom: 6px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 2px; border-radius: 99px; background: #fff; box-shadow: 0 3px 0 var(--shade); }
.board-frame[data-bar="side"] .zoom-tools { bottom: auto; left: auto; right: 5px; top: 50%; transform: translateY(-50%); flex-direction: column-reverse; }
.zoom-tools button { display: grid; place-items: center; width: 38px; height: 32px; border-radius: 99px; color: var(--green-deep); transition: background .15s, color .15s; }
.zoom-tools .icon { width: 18px; height: 18px; stroke-width: 3; }
.zoom-tools button:disabled { opacity: .3; }
.zoom-tools #fit { width: 54px; font-size: 12px; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--muted); }
.board-frame[data-bar="side"] .zoom-tools #fit { width: 38px; font-size: 10px; }
.zoom-tools #fit:disabled { opacity: 1; }
.zoom-tools #fit:not(:disabled) { background: var(--green); color: #fff; }
@media (hover: hover) { .zoom-tools button:not(:disabled):not(#fit):hover { background: #eef5e6; } }
/* While zoomed: a small map of the arrows left, with a frame around the part in view. */
.minimap { position: absolute; z-index: 2; top: 8px; right: 8px; padding: 3px; box-sizing: content-box; border-radius: 10px; background: #fffef8f2; box-shadow: 0 2px 0 var(--shade), 0 4px 12px #2f5a3226; touch-action: none; cursor: pointer; animation: minimap-in .2s ease-out; }
.minimap[hidden] { display: none; }
.minimap svg { display: block; width: 100%; height: 100%; overflow: hidden; }
.mini-arrows path { fill: none; stroke: var(--arrow, #2c4a3e); stroke-width: 14; stroke-linecap: round; stroke-linejoin: round; opacity: .55; }
.mini-arrows path.lit { stroke: #79a746; opacity: 1; stroke-width: 22; }
.mini-view { fill: #ffd23f2e; stroke: var(--sun-edge); stroke-width: 16; }
@keyframes minimap-in { from { opacity: 0; scale: .9; } }
@media (prefers-reduced-motion: reduce) { .minimap { animation: none; } }
#board-loading { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: 10px; background: #fffdf5e6; color: var(--green-deep); font-weight: 800; cursor: progress; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid #d9ead0; border-top-color: var(--green); animation: sun-turn .8s linear infinite; }
#host-pause { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: #fffdf5ee; font-size: 26px; font-weight: 900; color: var(--green-deep); backdrop-filter: blur(6px); }

/* ---------- Bottom: one line of feedback and the tools ---------- */
.game-bottom { flex: none; display: flex; flex-direction: column; gap: 8px; }
.note { min-height: 40px; margin: 0 auto; max-width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 16px; border-radius: 20px; background: #ffffffd9; box-shadow: 0 3px 0 #bcd5a5b3; color: var(--green-deep); font-size: 14px; font-weight: 800; line-height: 1.3; text-align: center; }
.note[data-empty] { visibility: hidden; }
.note[data-kind="blocked"] { background: #ffe8e3; color: #b8402c; box-shadow: 0 3px 0 #f4b9ab; }
.note[data-kind="good"] { background: #eef9e4; color: var(--green-dark); }
.note[data-kind="coach"] { padding: 6px 16px 6px 6px; text-align: left; background: #fff; box-shadow: 0 4px 0 var(--sun-edge); }
.note-mipo svg { width: 40px; height: 40px; display: block; }
.tools { display: flex; justify-content: center; align-items: flex-end; gap: 16px; }
.tool { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 62px; color: var(--green-deep); font-size: 12px; font-weight: 900; }
.tool-face { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; background: #fff; box-shadow: 0 5px 0 var(--shade), 0 8px 14px #2f5a321f; transition: transform .08s, box-shadow .08s; }
.tool .icon { width: 26px; height: 26px; }
.tool.primary .tool-face { width: 64px; height: 64px; border-radius: 22px; background: linear-gradient(#fff8d2, #ffe58a); box-shadow: 0 5px 0 #e2b33a, 0 8px 16px #b8790033; }
.tool.primary .icon { width: 31px; height: 31px; color: #b87900; }
.tool:not(:disabled):active .tool-face { transform: translateY(4px); box-shadow: 0 1px 0 var(--shade); }
.tool:disabled { opacity: .4; }
.save-notice { margin: 0; font-size: 11px; font-weight: 700; color: #985d38; text-align: center; }

/* ---------- Dialogs ---------- */
dialog { border: 0; padding: 0; background: transparent; color: var(--ink); max-width: none; max-height: none; overflow: visible; }
dialog::backdrop { background: #1c3424a6; backdrop-filter: blur(4px); }
dialog.card #dialog-content { width: min(420px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); overflow: auto; padding: 24px 22px 22px; border-radius: 28px; background: var(--paper); border: 3px solid #fff; box-shadow: 0 8px 0 var(--shade), 0 30px 80px #14281959; text-align: center; }
.card-dialog h2 { margin: 6px 0 8px; font-size: 24px; font-weight: 900; color: var(--green-deep); }
.card-dialog h3 { margin: 18px 0 6px; font-size: 17px; font-weight: 900; }
.card-dialog p { margin: 8px 0 14px; font-size: 14px; font-weight: 600; line-height: 1.5; color: #4e6553; }
.dialog-icon { width: 46px; height: 46px; margin: 0 auto; color: var(--green); }
.dialog-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.setting-row { min-height: 56px; display: flex; align-items: center; justify-content: space-between; border-bottom: 2px dashed #e1ead7; text-align: left; font-size: 16px; font-weight: 800; }
input[role="switch"] { appearance: none; position: relative; width: 52px; height: 30px; margin: 0; border-radius: 99px; background: #d5dfcd; cursor: pointer; transition: background .15s; }
input[role="switch"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 0 #00000026; transition: translate .15s; }
input[role="switch"]:checked { background: var(--green); }
input[role="switch"]:checked::after { translate: 22px 0; }
.setting-row select { border: 0; border-radius: 12px; padding: 8px 12px; background: #eef6e6; color: var(--green-deep); font-weight: 800; }
.rule-demo svg { width: 200px; height: 80px; }
.demo-line { fill: none; stroke: var(--arrow); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.demo-head { fill: var(--arrow); }
.demo-line.blocker { stroke: var(--coral); }
.demo-line.free { stroke: var(--green); stroke-dasharray: 2 9; }
.demo-head.free { fill: var(--green); }
.stars-help, .keyboard-help { font-size: 12px !important; color: var(--muted) !important; margin: 6px 0 !important; }
.card-dialog .btn { margin-top: 10px; }

/* Results: a full sheet on phones, a big card elsewhere. The main button never scrolls away. */
dialog.results-dialog, dialog.sheet { width: 100vw; height: 100dvh; margin: 0; inset: 0; }
dialog.results-dialog #dialog-content, dialog.sheet #dialog-content { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.results { position: relative; width: min(480px, 100%); height: 100%; display: flex; flex-direction: column; overflow: hidden; background: radial-gradient(circle at 50% 0%, #fffbe0 0, #f2fbe9 45%, #dff2cf 100%); }
.results-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 20px 6px; }
.results-hero { position: relative; text-align: center; }
.rays { position: absolute; left: 50%; top: 52px; width: 440px; height: 440px; margin: -220px 0 0 -220px; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(#ffd23f3d 0 9deg, transparent 9deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 68%); mask: radial-gradient(circle, #000 18%, transparent 68%); animation: sun-turn 40s linear infinite; }
.results-hero > :not(.rays) { position: relative; }
.results .mipo { display: block; width: 92px; height: 92px; margin: 0 auto -2px; }
.results h2 { margin: 6px 0 4px; font-size: 28px; font-weight: 900; color: var(--green-deep); letter-spacing: -.3px; }
.big-stars { display: flex; justify-content: center; gap: 8px; margin: 8px 0 2px; }
.big-stars span { display: grid; color: #dce3d2; }
.big-stars .icon { width: 50px; height: 50px; filter: drop-shadow(0 3px 0 #0000001a); }
.big-stars span:nth-child(2) { translate: 0 -10px; }
.big-stars span:nth-child(2) .icon { width: 60px; height: 60px; }
.big-stars .lit { color: #ffc531; }
.big-stars .lit .icon { filter: drop-shadow(0 3px 0 #e09a10); }
.result-line { margin: 2px 0 12px; font-size: 14px; font-weight: 800; color: var(--muted); }
.results-body { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; padding-bottom: 6px; }
.reward-scene { position: relative; width: 168px; height: 168px; display: flex; align-items: center; justify-content: center; border-radius: 26px; background: #fff; box-shadow: 0 5px 0 var(--shade), 0 14px 30px #2f5a3226; }
.solved-pattern { width: 140px; height: 140px; color: var(--arrow); fill: currentColor; pointer-events: none; }
.pattern-line { fill: none; stroke: currentColor; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.pattern-head { fill: currentColor; transform-box: fill-box; transform-origin: center; }
.grove-reward { width: 250px; gap: 4px; }
.grove-reward .solved-pattern { width: 110px; height: 110px; }
.win-tree { width: 104px; height: 114px; transform-origin: 50% 90%; }
/* A grove's tree grows in its own moment before the results (screens.js revealGrowth). */
dialog.growth-dialog { width: 100vw; height: 100dvh; margin: 0; inset: 0; }
dialog.growth-dialog::backdrop { background: #10261a; }
dialog.growth-dialog #dialog-content { width: 100%; height: 100%; }
.growth { position: relative; width: 100%; height: 100%; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 20px;
  text-align: center; color: #fff; cursor: pointer; background: radial-gradient(circle at 50% 38%, #4f925b 0, #24533a 40%, #10291b 100%); }
.growth > * { position: relative; }
.growth-rays { position: absolute; left: 50%; top: 38%; width: 960px; height: 960px; margin: -480px 0 0 -480px; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(#ffe78042 0 7deg, transparent 7deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 8%, transparent 60%); mask: radial-gradient(circle, #000 8%, transparent 60%); animation: sun-turn 30s linear infinite; }
.growth-stage { width: 200px; height: 220px; display: grid; place-items: center; }
.growth-stage > *, .growth-stage::before { grid-area: 1 / 1; }
/* A pool of light the tree stands in. */
.growth-stage::before { content: ""; align-self: end; width: 80%; height: 22%; border-radius: 50%; background: radial-gradient(closest-side, #fff6c8, #fff2b000); }
.growth-stage .tree { width: 200px; height: 220px; transform-origin: 50% 90%; }
.growth-tree { filter: drop-shadow(0 0 26px #fff3b080); }
.growth-sapling { opacity: 0; }
.growth-ring { width: 170px; height: 170px; border-radius: 50%; border: 6px solid #ffe27a; box-shadow: 0 0 30px #ffe27a, inset 0 0 24px #ffe27a; opacity: 0; }
.growth-flash { width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, #fff 0, #fffbe0c0 40%, transparent 70%); opacity: 0; pointer-events: none; }
.growth-spark { width: 12px; height: 12px; border-radius: 50%; background: #fff3b0; box-shadow: 0 0 14px 3px #ffe27a; opacity: 0; }
.growth-kicker { margin: 12px 0 2px; font-size: 15px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase; color: var(--sun); }
.growth-title { max-width: 520px; margin: 0; font-size: clamp(22px, 6.5vw, 30px); font-weight: 900; line-height: 1.15; text-wrap: balance; text-shadow: 0 3px 0 #0b1f14; }
.growth-count { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 6px; padding: 6px 18px 6px 8px; border-radius: 99px; background: #ffffff1a; border: 2px solid #ffffff30; font-size: 15px; font-weight: 800; color: #e3f3d8; }
.growth-count .tree { width: 36px; height: 40px; }
.growth-count b { min-width: 1ch; font-size: 28px; font-weight: 900; line-height: 1; color: var(--sun); }
.growth .btn { width: min(320px, 100%); margin-top: 16px; }
@media (orientation: landscape) and (max-height: 520px) {
  .growth { padding: 12px 20px; }
  .growth-stage, .growth-stage .tree { width: 120px; height: 132px; }
  .growth-ring, .growth-flash { width: 110px; height: 110px; }
  .growth-kicker { margin-top: 4px; }
  .growth-title { font-size: 24px; }
  .growth-count { margin: 8px 0 2px; }
  .growth .btn { min-height: 46px; margin-top: 10px; }
}
.daily-seal { position: absolute; right: -14px; bottom: -12px; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--sun); color: #d27800; border: 4px solid #fff; box-shadow: 0 4px 0 var(--sun-edge); }
.daily-seal .icon { width: 32px; height: 32px; }
.daily-keepsake { margin: 0; font-size: 12px; font-weight: 800; color: #9a6c00; }
.daily-score { text-align: center; }
.daily-score > span { font-size: 12px; font-weight: 800; color: var(--muted); }
.daily-score > b { display: block; font-size: 46px; font-weight: 900; line-height: 1; color: #c88a00; }
#daily-result { margin: 6px 0 0; font-size: 13px; font-weight: 800; color: var(--green-deep); }
.daily-rival { margin: 4px 0 0; font-size: 13px; font-weight: 800; color: var(--muted); }
.streak { display: inline-flex; align-items: center; gap: 4px; margin: 6px 0 0; font-weight: 900; color: #e0662b; }
.streak .icon { width: 18px; height: 18px; fill: #ffb547; }
.grove-progress, .next-medal { width: 100%; max-width: 380px; padding: 10px 14px; border-radius: 18px; background: #ffffffc4; box-shadow: 0 3px 0 var(--shade); }
.grove-progress { text-align: center; }
.grove-progress .grove { justify-content: center; }
.grove-progress .trail li { width: 22px; height: 22px; }
.grove-progress .trail li > span { display: grid; font-size: 10px; font-weight: 900; color: #7d9a7f; }
.grove-progress .trail li.done > span, .grove-progress .trail li.current > span { color: #fff; }
.grove-progress .trail .icon { width: 12px; height: 12px; stroke-width: 3; }
.grove-progress .trail-goal svg { width: 40px; height: 44px; margin: 0; }
.grove-progress p { margin: 6px 0 0; font-size: 13px; font-weight: 800; color: var(--green-deep); }
.new-badges { width: 100%; max-width: 380px; padding: 8px 12px 10px; border-radius: 18px; background: linear-gradient(#fffbe2, #fff3c4); box-shadow: 0 3px 0 #ecd27f; text-align: center; perspective: 500px; }
.new-badges > small { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 900; color: #a06c00; letter-spacing: .3px; }
.medal-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; }
.new-medal { display: flex; align-items: center; gap: 8px; max-width: 170px; font-size: 13px; font-weight: 800; line-height: 1.2; text-align: left; }
.new-medal .medal { width: 42px; height: 48px; flex: none; }
.new-medal small { display: block; font-size: 11px; font-weight: 800; color: var(--muted); }
.next-medal { display: flex; align-items: center; gap: 12px; text-align: left; }
.next-medal .medal { width: 44px; height: 51px; flex: none; }
.next-medal > div { flex: 1; min-width: 0; }
.next-medal small { display: block; font-size: 11px; font-weight: 800; color: var(--muted); }
.next-medal b { display: block; font-size: 14px; font-weight: 900; }
.next-medal .goal { font-size: 11px; font-weight: 700; color: var(--muted); }
.bar { display: block; height: 8px; margin: 5px 0 3px; border-radius: 99px; background: #e2eed6; overflow: hidden; }
.bar i { display: block; width: var(--to, 0); height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ffd23f, #f5b82e); }
.daily-invite { width: 100%; max-width: 380px; min-height: 56px; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; border-radius: 18px; background: var(--sun); color: var(--sun-ink); box-shadow: 0 4px 0 var(--sun-edge), 0 8px 18px #a06e0026; text-align: left; transition: transform .08s, box-shadow .08s; }
.daily-invite > .icon:first-child { width: 32px; height: 32px; color: #e07b00; animation: sun-turn 14s linear infinite; }
.daily-invite > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.daily-invite b { font-size: 16px; font-weight: 900; }
.daily-invite small { font-size: 12px; font-weight: 700; opacity: .8; }
.daily-invite .go { width: 22px; height: 22px; }
.daily-invite:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sun-edge); }
/* The gap below the main button starts under its 5px raised edge, so the row under it never touches it. */
.results-actions { display: flex; flex-direction: column; gap: 15px; padding: 12px 20px max(16px, var(--safe-bottom, env(safe-area-inset-bottom))); background: linear-gradient(#dff2cf00, #dff2cff2 30%); }
.win-secondary { display: flex; gap: 10px; }
.win-secondary .btn { flex: 1; min-width: 0; padding: 10px; }
/* A longer label ("Challenge a friend", and more so translated) takes two lines on a narrow phone rather than spilling out. */
.win-secondary .btn span { min-width: 0; line-height: 1.15; text-align: start; text-wrap: balance; }
.win-secondary .btn .icon { flex: none; }
.confetti { position: absolute; inset: 0; z-index: 6; overflow: visible; pointer-events: none; }
.confetti .bit { position: absolute; width: 9px; height: 13px; border-radius: 3px; }
.confetti .bit-1 { border-radius: 60% 0; }
.confetti .bit-2 { width: 8px; height: 8px; border-radius: 50%; }

/* Garden collection */
.garden { width: min(560px, 100%); height: 100%; display: flex; flex-direction: column; overflow: hidden; background: linear-gradient(#f3fbe9, #e3f3d3); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; }
.sheet-head h2 { margin: 0; font-size: 24px; font-weight: 900; color: var(--green-deep); }
.sheet-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 18px; padding: 4px 18px 28px; }
.sheet-scroll > * { flex: none; }
.garden-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.garden-stats div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 16px; background: #fff; box-shadow: 0 3px 0 var(--shade); }
.garden-stats .icon { width: 22px; height: 22px; color: #f5b82e; }
.garden-stats div:nth-child(2) .icon { color: var(--arrow); }
.garden-stats b { font-size: 20px; font-weight: 900; }
.garden-stats span { font-size: 11px; font-weight: 800; color: var(--muted); }
.meadow { position: relative; overflow: hidden; padding: 16px 10px 12px; border-radius: 22px; background: linear-gradient(#dff3ff 0, #eef9ff 42%, #bfe39b 42%, #a6d483 100%); box-shadow: inset 0 -6px 0 #508c3c40, 0 3px 0 var(--shade); }
.grove-collection { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; }
.plot { width: 78px; display: flex; flex-direction: column; align-items: center; }
.plot .tree { width: 70px; height: 77px; }
.plot small { padding: 1px 7px; border-radius: 99px; background: #ffffffbf; color: #2f5a2f; font-size: 10px; font-weight: 800; white-space: nowrap; }
.plot.growing small { background: #fff6c8; }
.meadow-note { margin: 6px 0 0; text-align: center; font-size: 13px; font-weight: 800; color: #2f5a2f; }
.sheet section h3 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 8px; font-size: 17px; font-weight: 900; color: var(--green-deep); }
.sheet section h3 small { font-size: 12px; font-weight: 800; color: var(--muted); }
.badge-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.medal-family { padding: 10px 10px 12px; border-radius: 18px; background: #fff; box-shadow: 0 3px 0 var(--shade); text-align: center; }
.medal-row { min-height: 54px; display: flex; justify-content: center; gap: 2px; }
.badge { position: relative; display: inline-grid; }
.badge .medal { width: 44px; height: 51px; }
.badge.earned .medal { filter: drop-shadow(0 2px 0 #0000001f); }
.badge em { position: absolute; top: -4px; right: -6px; padding: 1px 5px; border-radius: 99px; background: var(--coral); color: #fff; border: 2px solid #fff; font-size: 9px; font-style: normal; font-weight: 900; }
.medal-family h4 { margin: 6px 0 2px; font-size: 14px; font-weight: 900; }
.medal-family p { min-height: 2.6em; margin: 0; font-size: 11px; font-weight: 700; line-height: 1.3; color: var(--muted); }
.medal-family .bar i { background: linear-gradient(90deg, #8cc06a, #58b368); }
.medal-family small { font-size: 11px; font-weight: 900; color: var(--green-deep); }
.medal-family .complete { display: flex; justify-content: center; align-items: center; gap: 4px; min-height: 0; color: var(--green); font-weight: 900; }
.medal-family .complete .icon { width: 14px; height: 14px; }
.seals .daily-invite { max-width: none; margin-bottom: 10px; }
.daily-invite.done { background: #fff; color: var(--green-deep); box-shadow: 0 4px 0 var(--shade); }
.daily-invite.done > .icon:first-child { width: 26px; height: 26px; margin: 3px; padding: 4px; border-radius: 50%; background: var(--green); color: #fff; stroke-width: 3.4; animation: none; }
.daily-invite.done:active { box-shadow: 0 1px 0 var(--shade); }
.seal-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; padding: 12px; border-radius: 18px; background: #fff; box-shadow: 0 3px 0 var(--shade); }
.seal-calendar b { font-size: 11px; font-weight: 900; color: var(--muted); text-align: center; }
.seal-calendar .day { aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: #f2f6ec; color: #8a9a84; font-size: 12px; font-weight: 800; }
.seal-calendar .day.sealed { background: var(--sun); color: #d27800; box-shadow: 0 2px 0 var(--sun-edge); }
.seal-calendar .day.sealed .icon { width: 70%; height: 70%; }
.seal-calendar .day.today { box-shadow: 0 0 0 2px var(--green); }
.seal-calendar .day.today.sealed { box-shadow: 0 0 0 2px var(--green), 0 2px 0 var(--sun-edge); }
.seal-calendar .day.future { opacity: .45; }

.loading { margin: auto; display: grid; justify-items: center; gap: 12px; color: var(--green-deep); font-size: 15px; font-weight: 800; text-align: center; }
.sprout { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 24px; background: #fff; box-shadow: 0 5px 0 var(--shade); font-size: 40px; color: var(--green); }

/* ---------- Bigger cards where there is room ---------- */
@media (min-width: 560px) and (min-height: 640px) {
  .results, .garden { height: auto; max-height: calc(100% - 40px); border-radius: 30px; border: 3px solid #fff; box-shadow: 0 8px 0 var(--shade), 0 30px 80px #14281966; }
  .garden { height: calc(100% - 40px); }
}

/* ---------- Short portrait screens ---------- */
@media (max-height: 640px) {
  #app { gap: 7px; padding-top: max(8px, var(--safe-top, 0px)); padding-bottom: max(8px, var(--safe-bottom, 0px)); }
  .hud { min-height: 36px; padding: 4px 10px; }
  .note { min-height: 34px; font-size: 13px; padding: 4px 12px; }
  .note-mipo svg { width: 30px; height: 30px; }
  .tools { gap: 12px; }
  .tool-face { width: 46px; height: 46px; border-radius: 15px; }
  .tool.primary .tool-face { width: 54px; height: 54px; border-radius: 18px; }
  .tool-label { font-size: 11px; }
}
@media (max-height: 700px) {
  .results .mipo { width: 64px; height: 64px; }
  .results h2 { font-size: 23px; }
  .big-stars .icon { width: 38px; height: 38px; }
  .big-stars span:nth-child(2) .icon { width: 46px; height: 46px; }
  .reward-scene { width: 124px; height: 124px; border-radius: 22px; }
  .solved-pattern { width: 104px; height: 104px; }
  .result-line { margin-bottom: 8px; font-size: 13px; }
  .results-body { gap: 10px; }
  .grove-reward { width: 220px; }
  .grove-reward .solved-pattern { width: 92px; height: 92px; }
  .win-tree { width: 86px; height: 95px; }
}
/* ---------- Narrow phones: the way back from the daily board shrinks to its arrow ---------- */
@media (max-width: 370px) {
  #app { padding-left: max(8px, var(--safe-left, 0px)); padding-right: max(8px, var(--safe-right, 0px)); }
  .corner { gap: 6px; }
  .icon-btn { width: 40px; height: 40px; }
  .chip { min-width: 44px; padding: 5px 9px; justify-content: center; }
  .chip .chip-text { display: none; }
  .level-pill { font-size: 17px; padding-left: 12px; }
  .progress-track { min-width: 16px; }
  .score small { display: none; }
}

/* ---------- Phones on their side: tools in a column beside the board ---------- */
@media (orientation: landscape) and (max-height: 520px) and (min-width: 560px) and (max-width: 899px) {
  #app { max-width: none; display: grid; grid-template-columns: 236px minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: "top board" "hud board" "bottom board"; gap: 7px 14px; padding: max(8px, var(--safe-top, 0px)) max(14px, var(--safe-right, 0px)) max(8px, var(--safe-bottom, 0px)) max(14px, var(--safe-left, 0px)); }
  .topbar { grid-area: top; grid-template-columns: auto 1fr; grid-template-areas: "corner end" "level level"; gap: 6px; }
  .topbar .corner { grid-area: corner; }
  .topbar .corner.end { grid-area: end; }
  .level-block { grid-area: level; gap: 5px; }
  .icon-btn { width: 36px; height: 36px; }
  .icon-btn .icon { width: 20px; height: 20px; }
  .chip { min-height: 36px; }
  .level-pill { min-height: 32px; font-size: 16px; }
  .hud { grid-area: hud; min-height: 34px; padding: 4px 10px; gap: 8px; }
  .count > .icon { display: none; }
  #remaining b { font-size: 17px; }
  .rating .icon { width: 18px; height: 18px; }
  .play-area { grid-area: board; }
  .game-bottom { grid-area: bottom; justify-content: flex-end; gap: 6px; }
  .note { min-height: 0; font-size: 12px; padding: 4px 10px; }
  .note-mipo svg { width: 28px; height: 28px; }
  .tools { gap: 10px; }
  .tool-face { width: 44px; height: 44px; border-radius: 14px; }
  .tool.primary .tool-face { width: 50px; height: 50px; border-radius: 16px; }
  .tool-label { font-size: 10px; }
}

/* ---------- Computers: the board takes the full height, with a column on each side ---------- */
@media (min-width: 900px) and (orientation: landscape) {
  /* Narrow side columns keep the board at two thirds of the width or more. */
  #app { --side: clamp(176px, 14vw, 232px); max-width: none; display: grid; grid-template-columns: var(--side) minmax(0, 1fr) var(--side); grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "top board hud" "top board bottom"; gap: 16px; padding: max(16px, var(--safe-top, 0px)) max(18px, var(--safe-right, 0px)) max(16px, var(--safe-bottom, 0px)) max(18px, var(--safe-left, 0px)); }
  /* Settings and the garden (or the way back from the daily board) above the level card. */
  .topbar { grid-area: top; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "corner end" "level level"; align-content: start; gap: 16px 10px; min-height: 0; overflow: auto; padding-bottom: 6px; }
  .topbar .corner { grid-area: corner; }
  .topbar .corner.end { grid-area: end; justify-content: flex-start; }
  .level-block { grid-area: level; gap: 10px; padding: 14px 8px; border-radius: 22px; background: #ffffffc4; box-shadow: 0 4px 0 var(--shade); }
  .grove-label { display: block; }
  .topbar .grove { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "trail trail" "goal caption"; align-items: center; gap: 10px 8px; width: 100%; padding-top: 10px; border-top: 2px dashed #e1ead7; }
  .topbar .trail { grid-area: trail; justify-content: center; gap: 3px; }
  .topbar .trail li, .topbar .trail li.current { width: 17px; height: 17px; }
  .topbar .trail li.current { box-shadow: 0 0 0 2px var(--sun-edge); }
  .level-pill { max-width: 100%; flex-wrap: wrap; justify-content: center; row-gap: 6px; border-radius: 22px; padding-right: 7px; }
  .topbar .trail-goal { grid-area: goal; }
  .trail-caption { grid-area: caption; display: block; font-size: 12px; font-weight: 800; line-height: 1.3; color: var(--green-deep); text-align: left; }
  .trail li > span { display: grid; font-size: 10px; font-weight: 900; color: #7d9a7f; }
  .trail li.done > span, .trail li.current > span { color: #fff; }
  .trail li.current > span { color: var(--sun-ink); }
  .trail .icon { width: 11px; height: 11px; stroke-width: 3; }
  .topbar .trail-goal svg { width: 40px; height: 44px; margin: 0; }
  .chip { width: 100%; padding: 5px 12px 5px 10px; }
  .chip-text b { font-size: 15px; }
  .chip-text small { display: block; margin-top: 2px; font-size: 11px; font-weight: 700; opacity: .8; }
  .hud { grid-area: hud; flex-direction: column; align-items: stretch; gap: 10px; padding: 14px; border-radius: 20px; }
  .count { justify-content: center; font-size: 14px; }
  #remaining b { font-size: 24px; }
  .progress-track { flex: none; }
  .rating { justify-content: center; }
  .rating .icon { width: 30px; height: 30px; }
  .score { justify-content: center; }
  .score b { font-size: 26px; }
  .milestone { font-size: 14px; white-space: normal; text-align: center; padding: 6px; }
  .cost { right: 50%; top: auto; bottom: 8px; }
  .play-area { grid-area: board; min-width: 0; }
  .game-bottom { grid-area: bottom; justify-content: flex-start; gap: 14px; min-height: 0; overflow: auto; padding: 0 2px 6px; }
  .tools { order: 1; flex-direction: column; align-items: stretch; gap: 10px; }
  .tool { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 5px 14px 5px 5px; border-radius: 18px; background: #fff; box-shadow: 0 4px 0 var(--shade); font-size: 15px; transition: transform .08s, box-shadow .08s; }
  .tool-face, .tool.primary .tool-face { width: 44px; height: 44px; border-radius: 14px; box-shadow: none; background: #f1f7ea; }
  .tool.primary .tool-face { background: linear-gradient(#fff8d2, #ffe58a); }
  .tool.primary .icon, .tool .icon { width: 26px; height: 26px; }
  .tool:not(:disabled):active { transform: translateY(3px); box-shadow: 0 1px 0 var(--shade); }
  .tool:not(:disabled):active .tool-face { transform: none; box-shadow: none; }
  .note { order: 2; min-height: 0; margin: 0; justify-content: flex-start; text-align: left; border-radius: 18px; padding: 10px 14px; font-size: 13px; }
  .note[data-kind="coach"] { flex-direction: column; align-items: flex-start; }
  .note[data-empty] { display: none; }
  .save-notice { order: 3; text-align: left; }
}

/* Wide, short sheets: the celebration on the left, the details on the right. */
@media (min-width: 700px) and (orientation: landscape) {
  .results { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); grid-template-rows: minmax(0, 1fr) auto; width: min(900px, calc(100% - 24px)); height: min(660px, calc(100% - 24px)); max-height: none; border-radius: 30px; border: 3px solid #fff; box-shadow: 0 8px 0 var(--shade), 0 30px 80px #14281966; }
  .results-scroll { display: contents; }
  .results-hero { grid-column: 1; grid-row: 1; align-self: center; padding: 18px 10px 0; }
  .results-body { grid-column: 2; grid-row: 1 / 3; justify-content: safe center; overflow-y: auto; padding: 20px 22px 20px 4px; }
  .results-actions { grid-column: 1; grid-row: 2; padding: 10px 26px 22px; background: none; }
  .reward-scene { width: 132px; height: 132px; border-radius: 22px; }
  .solved-pattern { width: 112px; height: 112px; }
  .grove-reward { width: 230px; }
  .grove-reward .solved-pattern { width: 92px; height: 92px; }
  .win-tree { width: 86px; height: 95px; }
}
/* Short frames (a phone on its side, a game page in a small window): every piece of the sheet still fits. */
@media (orientation: landscape) and (max-height: 520px) {
  .results .mipo { width: 52px; height: 52px; }
  .results h2 { font-size: 21px; }
  .big-stars .icon { width: 32px; height: 32px; }
  .big-stars span:nth-child(2) .icon { width: 38px; height: 38px; }
  .result-line { margin-bottom: 0; font-size: 13px; }
  .results-body { gap: 8px; padding-top: 14px; padding-bottom: 14px; }
  .reward-scene { width: 96px; height: 96px; border-radius: 18px; box-shadow: 0 4px 0 var(--shade); }
  .solved-pattern { width: 80px; height: 80px; }
  .grove-reward { width: 176px; }
  .grove-reward .solved-pattern { width: 70px; height: 70px; }
  .win-tree { width: 64px; height: 70px; }
  .daily-seal { width: 40px; height: 40px; right: -10px; bottom: -8px; border-width: 3px; }
  .daily-seal .icon { width: 22px; height: 22px; }
  .daily-score > b { font-size: 34px; }
  .grove-progress, .next-medal { padding: 6px 12px; }
  .grove-progress .trail li { width: 19px; height: 19px; }
  .grove-progress .trail-goal svg { width: 30px; height: 33px; }
  .grove-progress p { margin-top: 3px; font-size: 12px; }
  .new-badges { padding: 6px 10px 8px; }
  .new-badges > small { font-size: 12px; margin-bottom: 2px; }
  .new-medal { font-size: 12px; }
  .new-medal .medal, .next-medal .medal { width: 34px; height: 39px; }
  .daily-invite { min-height: 46px; padding: 5px 12px 5px 8px; border-radius: 16px; }
  .daily-invite > .icon:first-child { width: 26px; height: 26px; }
  .daily-invite b { font-size: 14px; }
  .daily-invite small { font-size: 11px; }
  .results-actions { gap: 14px; padding-bottom: 12px; }
  .results-actions .btn.primary { min-height: 46px; }
  .results-actions .btn.ghost { min-height: 38px; font-size: 14px; gap: 6px; }
  .results-actions .btn.ghost .icon { width: 18px; height: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
