/* Birdsong Spelling */
:root{color-scheme:light;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}body{margin:0;font:14px system-ui}img{max-width:100%}[hidden]{display:none!important}
@font-face{font-family:'Lilita One';font-style:normal;font-display:swap;font-weight:400;src:url(fonts/lilita-one-latin-ext-400-normal.woff2) format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Lilita One';font-style:normal;font-display:swap;font-weight:400;src:url(fonts/lilita-one-latin-400-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Nunito';font-style:normal;font-display:swap;font-weight:400;src:url(fonts/nunito-latin-ext-400-normal.woff2) format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Nunito';font-style:normal;font-display:swap;font-weight:400;src:url(fonts/nunito-latin-400-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Nunito';font-style:normal;font-display:swap;font-weight:600;src:url(fonts/nunito-latin-ext-600-normal.woff2) format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Nunito';font-style:normal;font-display:swap;font-weight:600;src:url(fonts/nunito-latin-600-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Nunito';font-style:normal;font-display:swap;font-weight:700;src:url(fonts/nunito-latin-ext-700-normal.woff2) format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Nunito';font-style:normal;font-display:swap;font-weight:700;src:url(fonts/nunito-latin-700-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Nunito';font-style:normal;font-display:swap;font-weight:800;src:url(fonts/nunito-latin-ext-800-normal.woff2) format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Nunito';font-style:normal;font-display:swap;font-weight:800;src:url(fonts/nunito-latin-800-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Nunito';font-style:normal;font-display:swap;font-weight:900;src:url(fonts/nunito-latin-ext-900-normal.woff2) format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Nunito';font-style:normal;font-display:swap;font-weight:900;src:url(fonts/nunito-latin-900-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Nunito';font-style:italic;font-display:swap;font-weight:600;src:url(fonts/nunito-latin-ext-600-italic.woff2) format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Nunito';font-style:italic;font-display:swap;font-weight:600;src:url(fonts/nunito-latin-600-italic.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Nunito';font-style:italic;font-display:swap;font-weight:700;src:url(fonts/nunito-latin-ext-700-italic.woff2) format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Nunito';font-style:italic;font-display:swap;font-weight:700;src:url(fonts/nunito-latin-700-italic.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Andika';font-style:normal;font-display:swap;font-weight:400;src:url(fonts/andika-latin-ext-400-normal.woff2) format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Andika';font-style:normal;font-display:swap;font-weight:400;src:url(fonts/andika-latin-400-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Andika';font-style:normal;font-display:swap;font-weight:700;src:url(fonts/andika-latin-ext-700-normal.woff2) format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Andika';font-style:normal;font-display:swap;font-weight:700;src:url(fonts/andika-latin-700-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
/* ===== Wattlebird Learning shared base (tokens come from each game's style.css) ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { background: var(--ground); color: var(--ink); font-family: var(--font-b); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bar); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: var(--link); }
svg { display: block; }
#app { position: relative; z-index: 1; min-height: 100%; display: flex; flex-direction: column; }
#main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 14px 28px; }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 90; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ----- buttons ----- */
.btn { --b: var(--btn); --bt: var(--btn-ink); --bd: var(--btn-edge); display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 46px; padding: .55em 1.15em; border: 0; border-radius: 14px; background: var(--b); color: var(--bt); font-weight: 800; font-size: 1rem; letter-spacing: .01em; box-shadow: 0 4px 0 var(--bd), 0 6px 14px rgba(0,0,0,.18); transition: transform .08s, box-shadow .08s, filter .15s; text-decoration: none; user-select: none; touch-action: manipulation; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--bd), 0 2px 6px rgba(0,0,0,.18); }
.btn[disabled], .btn[aria-disabled="true"] { filter: grayscale(.7) opacity(.55); cursor: not-allowed; transform: none; }
.btn.primary { --b: var(--accent); --bt: var(--accent-ink); --bd: var(--accent-edge); }
.btn.good { --b: var(--good); --bt: var(--good-ink); --bd: var(--good-edge); }
.btn.gold { --b: var(--gold); --bt: var(--gold-ink); --bd: var(--gold-edge); }
.btn.red { --b: var(--bad); --bt: #fff; --bd: var(--bad-edge); }
.btn.ghost { --b: transparent; --bt: currentColor; --bd: transparent; box-shadow: inset 0 0 0 2px var(--line); }
.btn.ghost:active { box-shadow: inset 0 0 0 2px var(--line); }
.btn.small { min-height: 36px; padding: .35em .85em; font-size: .9rem; border-radius: 11px; }
.btn.big { min-height: 58px; font-size: 1.2rem; padding: .6em 1.6em; border-radius: 18px; }
.btn.wide { width: 100%; }
.iconbtn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; border: 0; background: var(--chip); color: var(--chip-ink); font-size: 1.15rem; }

/* ----- modals ----- */
#modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: max(14px, env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) max(14px, env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px)); }
.m-back { position: absolute; inset: 0; background: var(--scrim); backdrop-filter: blur(3px); animation: fadeIn .2s ease-out; }
.m-box { position: relative; width: min(520px, 100%); max-height: calc(100% - 8px); overflow: auto; background: var(--paper); color: var(--paper-ink); border-radius: 22px; padding: 22px 20px 20px; box-shadow: 0 24px 60px rgba(0,0,0,.45); animation: popIn .28s cubic-bezier(.2,1.4,.4,1); overscroll-behavior: contain; }
.m-title { font-family: var(--font-d); font-weight: 400; font-size: 1.55rem; line-height: 1.15; margin-bottom: 8px; color: var(--paper-head); }
.m-text { margin: 6px 0; color: var(--paper-soft); }
.m-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.m-actions .btn { flex: 1 1 140px; }
.eyebrow { font-size: .78rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--eyebrow); }
.small { font-size: .86rem; }
.muted { opacity: .72; }

/* ----- toasts and tooltips ----- */
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(92vw, 460px); pointer-events: none; }
.toast { background: var(--toast); color: var(--toast-ink); padding: 11px 16px; border-radius: 14px; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.35); animation: toastIn .3s cubic-bezier(.2,1.3,.4,1); text-align: center; }
.toast.out { opacity: 0; transform: translateY(8px); transition: all .45s; }
#tip { position: fixed; z-index: 85; max-width: 260px; background: var(--toast); color: var(--toast-ink); padding: 7px 10px; border-radius: 10px; font-size: .84rem; font-weight: 700; pointer-events: none; box-shadow: 0 6px 18px rgba(0,0,0,.3); }

/* ----- effects ----- */
.popfx { position: fixed; z-index: 88; transform: translate(-50%, -50%); pointer-events: none; font-family: var(--font-d); font-size: 1.5rem; color: var(--pop); text-shadow: 0 2px 0 rgba(0,0,0,.35), 0 0 14px rgba(0,0,0,.25); animation: popUp 1.25s ease-out forwards; white-space: nowrap; }
.popfx.bad { color: var(--bad-pop); }
.popfx.gold { color: var(--gold); }
.flashfx { position: fixed; inset: 0; z-index: 87; pointer-events: none; animation: flash .45s ease-out forwards; }
.flytok { position: fixed; z-index: 89; pointer-events: none; transform: translate(-50%, -50%); font-size: 1.2rem; line-height: 1; }
.shake { animation: shake .45s; }
.bump { animation: bump .45s; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: scale(.86) translateY(12px); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes popUp { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.7); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.08); } 100% { opacity: 0; transform: translate(-50%, -190%) scale(1); } }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* ----- forms ----- */
.field { display: grid; gap: 6px; }
.field label { font-weight: 800; font-size: .92rem; }
.field input[type=text] { width: 100%; min-height: 50px; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--line-paper); background: var(--input); color: var(--paper-ink); font-size: 1.1rem; font-weight: 700; }
.field input[type=text]:focus { outline: none; border-color: var(--focus); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg button { min-height: 40px; padding: 6px 12px; border-radius: 11px; border: 2px solid var(--line-paper); background: transparent; color: var(--paper-ink); font-weight: 800; }
.seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

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

/* ===== maths rounds (shared by the Wattlebird games; colours come from each game's tokens) ===== */
kbd { display: inline-block; padding: 0 .4em; border-radius: 5px; border: 1px solid currentColor; font: 700 .8em var(--font-b); opacity: .85; }
.mround { display: grid; gap: 10px; max-width: 780px; margin: 0 auto; }
.mr-prog { display: grid; justify-items: end; gap: 4px; font-weight: 800; font-variant-numeric: tabular-nums; flex: none; }
.mr-meter { display: block; width: 110px; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.mr-meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--accent)); transition: width .3s; }
.mr-stage { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 16 / 6.5; max-width: 100%; box-shadow: 0 12px 30px rgba(0, 0, 0, .35); background: var(--ground-2); }
.mr-stage > svg, .mr-stage .scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.mr-card { background: var(--paper); color: var(--paper-ink); border-radius: 20px; padding: 16px; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); display: grid; gap: 10px; transition: box-shadow .15s; }
.mr-card.good { box-shadow: 0 0 0 4px var(--good), 0 12px 30px rgba(0, 0, 0, .3); }
.mr-card.fast { box-shadow: 0 0 0 4px var(--gold), 0 12px 30px rgba(0, 0, 0, .3); }
.mr-card.bad { box-shadow: 0 0 0 4px var(--bad), 0 12px 30px rgba(0, 0, 0, .3); }
.mr-story { font-weight: 600; font-size: 1.14rem; line-height: 1.42; color: var(--paper-head); text-align: center; text-wrap: balance; }
.mr-row { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.mr-q { font-family: var(--font-d); font-size: clamp(2.3rem, 8.5vw, 3.6rem); line-height: 1; color: var(--paper-head); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.mr-eq { font-family: var(--font-d); font-size: clamp(2rem, 7.5vw, 3.1rem); color: var(--paper-soft); line-height: 1; }
.storyq .mr-q, .storyq .mr-eq { display: none; }
.mr-ans { width: 4.2ch; font-family: var(--font-d); font-size: clamp(2.3rem, 8.5vw, 3.6rem); line-height: 1.1; text-align: center; border: 3px solid var(--line-paper); border-radius: 14px; background: var(--input); color: var(--paper-ink); padding: 2px 6px; font-variant-numeric: tabular-nums; }
.mr-ans:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(255, 209, 102, .35); }
.mr-ans::placeholder { color: rgba(0, 0, 0, .22); }
.q-in { animation: qIn .25s ease-out; }
@keyframes qIn { from { opacity: 0; transform: translateY(6px) scale(.96); } }
.mr-speed { display: flex; align-items: center; gap: 8px; }
.mr-track { flex: 1; height: 10px; border-radius: 5px; background: var(--paper-2); overflow: hidden; }
.mr-track i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--gold), var(--accent)); border-radius: 5px; }
.mr-speed.late .mr-track i { background: var(--line-paper); }
.mr-fb { min-height: 1.7em; display: grid; gap: 4px; justify-items: center; text-align: center; font-weight: 700; }
.fb-fast { color: #9a6e0a; }
.fb-good { color: var(--right); }
.fb-bad { color: var(--wrong); }
.fb-tip { color: var(--paper-soft); font-weight: 600; max-width: 52ch; }
.fb-do { color: var(--paper-ink); }
.fb-hint, .fb-again, .fb-story { color: var(--paper-soft); font-weight: 600; }
.fb-math { color: var(--paper-head); font-weight: 800; }
.mr-foot { display: flex; justify-content: space-between; gap: 10px; min-height: 1.6em; color: var(--ink-soft); font-weight: 700; font-size: .9rem; }
.mr-combo.hot { color: var(--pop); }
@media (pointer: coarse) { .mr-hint { display: none; } }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 420px; width: 100%; margin: 0 auto; }
.keypad button { min-height: 54px; border-radius: 14px; border: 0; background: var(--btn); color: var(--btn-ink); font-size: 1.5rem; font-weight: 800; box-shadow: 0 4px 0 var(--btn-edge); touch-action: manipulation; user-select: none; }
.keypad button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--btn-edge); }
.keypad .kp-go { background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 0 var(--accent-edge); }
.mr-count { position: fixed; inset: 0; display: grid; place-items: center; font-family: var(--font-d); font-size: clamp(3rem, 14vw, 6rem); color: var(--pop); text-shadow: 0 4px 0 rgba(0, 0, 0, .35); pointer-events: none; z-index: 60; }
.mr-count.pulse { animation: cPulse .55s ease-out; }
@keyframes cPulse { from { transform: scale(.6); opacity: 0; } 40% { transform: scale(1.1); opacity: 1; } to { transform: scale(1); } }
.mdone { display: grid; place-items: center; padding-top: 10px; }
.md-card { width: min(640px, 100%); background: var(--paper); color: var(--paper-ink); border-radius: 24px; padding: 20px; box-shadow: 0 20px 50px rgba(0, 0, 0, .4); display: grid; gap: 12px; text-align: center; }
.md-card .eyebrow { color: var(--eyebrow-paper); }
.md-title { font-family: var(--font-d); font-weight: 400; font-size: clamp(1.7rem, 5vw, 2.3rem); color: var(--paper-head); }
.md-ticket { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; text-align: left; background: var(--paper-2); border-radius: 18px; padding: 12px; }
.md-ticket > svg { width: 96px; height: 96px; flex: none; }
.md-stars { font-size: 1.8rem; color: var(--gold-edge); letter-spacing: .05em; line-height: 1; }
.dimstar { opacity: .25; }
.md-boost { font-weight: 700; max-width: 34ch; margin-top: 4px; }
.md-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.md-stats div { background: var(--paper-2); border-radius: 14px; padding: 8px; }
.md-stats b { display: block; font-family: var(--font-d); font-weight: 400; font-size: 1.5rem; color: var(--paper-head); }
.md-stats small { color: var(--paper-soft); font-weight: 700; }
@media (max-width: 480px) { .md-stats { grid-template-columns: repeat(2, 1fr); } }
.md-gold { font-weight: 800; color: #9a6e0a; }
.md-unlock, .md-perfect { font-weight: 800; color: var(--right); }
.md-miss { color: var(--paper-soft); }
.md-bank { font-weight: 700; }
.mdone .btnrow { justify-content: center; }
.focuspick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 640px) { .focuspick { grid-template-columns: repeat(2, 1fr); } }
.focuspick button, .sumlevels button { display: grid; gap: 2px; align-content: start; padding: 10px 12px; border-radius: 14px; border: 2px solid var(--line); background: var(--glass); color: var(--ink); text-align: left; min-width: 0; }
.focuspick b, .sumlevels b { font-weight: 800; }
.focuspick small, .sumlevels small { color: var(--ink-soft); font-weight: 600; font-size: .8rem; }
.focuspick button[aria-pressed="true"], .sumlevels button[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.sumlevels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
@media (max-width: 640px) { .sumlevels { grid-template-columns: 1fr 1fr; } }
.sumlevels button[disabled] { opacity: .5; cursor: not-allowed; }
.sl-st { color: var(--gold); font-size: .9rem; }
.fg-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; }
.fgrid-wrap { overflow-x: auto; max-width: 100%; }
.factgrid { border-collapse: separate; border-spacing: 2px; }
.factgrid th { font-size: .68rem; font-weight: 800; color: var(--ink-soft); min-width: 18px; height: 18px; text-align: center; padding: 0; }
.factgrid td { width: 18px; height: 18px; border-radius: 4px; padding: 0; }
.st-stone { background: rgba(255, 255, 255, .09); }
.st-bronze { background: #b7773f; }
.st-silver { background: #b9c3c9; }
.st-gold { background: #f2c43a; }
.st-diamond { background: linear-gradient(135deg, #d6f7ff, #6fd6ff); }
.fg-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--ink-soft); font-weight: 600; font-size: .84rem; margin-bottom: 8px; }
.fg-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; }
.sumstars { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sumstars .ss { padding: 10px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); display: grid; gap: 2px; }
.sumstars .ss.locked { opacity: .55; }
.sumstars small { color: var(--ink-soft); font-weight: 600; }
.sumstars span { color: var(--gold); }
.mm-sec { margin-top: 8px; }
.mini-h.dark { color: var(--eyebrow); }
.fg-cap { font-weight: 800; color: var(--ink-soft); margin-bottom: 4px; }
.fg-cap b { color: var(--ink); }

/* Birdsong Spelling: a sunny Australian backyard. Cream paper cards on a sky-and-grass ground,
   Wattlebird green and gold, Lilita One headings, Andika for every word a child spells. */
:root {
  color-scheme: light;
  --ground: #eaf6ef; --ground-2: #d8eee0; --ground-3: #bfe3cc; --bar: #fffdf7;
  --ink: #2a1d10; --ink-soft: #5d5040;
  --paper: #fffaf0; --paper-2: #f5eedd; --paper-ink: #2a1d10; --paper-head: #1f150b; --paper-soft: #5d5040;
  --line: rgba(42, 29, 16, .16); --line-paper: #e2d6bf; --glass: rgba(26, 136, 104, .08); --glass-2: rgba(26, 136, 104, .14);
  --accent: #1a8868; --accent-ink: #ffffff; --accent-edge: #0f5c45;
  --good: #2fa86a; --good-ink: #ffffff; --good-edge: #1d7a4a;
  --gold: #f8c11a; --gold-ink: #2a1d10; --gold-edge: #c9930a;
  --bad: #e0533d; --bad-edge: #a8361f;
  --btn: #ffffff; --btn-ink: #2a1d10; --btn-edge: #d9ccb2;
  --chip: rgba(26, 136, 104, .1); --chip-ink: #2a1d10;
  --focus: #f2a31a; --link: #0f6e53; --link-paper: #0f6e53; --scrim: rgba(18, 32, 24, .5);
  --toast: #1f150b; --toast-ink: #fffaf0; --pop: #f8c11a; --bad-pop: #e0533d;
  --eyebrow: #b8430f; --eyebrow-paper: #b8430f; --input: #ffffff;
  --right: #1d8a55; --right-bg: #e2f6ea; --wrong: #c8442f; --wrong-bg: #fdebe5;
  --mark: #ffe27a; --mark-edge: #f2a31a;
  --bronze: #c98a4a; --silver: #aeb8c0; --goldc: #f2c43a; --learning: #f0a6a0; --new: #e7e0d0;
  --font-d: 'Lilita One', 'Arial Rounded MT Bold', 'Trebuchet MS', sans-serif;
  --font-b: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-w: 'Andika', 'Nunito', 'Segoe UI', system-ui, sans-serif;
}
body { background: var(--ground); }
#sky { position: fixed; inset: 0; z-index: 0; background: linear-gradient(180deg, #bfe6f2 0%, #e4f5f7 38%, #eaf6ef 60%, #dcefdf 100%); }
#sky::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 24vh; background: radial-gradient(120% 100% at 50% 100%, #c9e8c4 0%, transparent 70%); }
.hide-sm { }
@media (max-width: 640px) { .hide-sm { display: none !important; } }
@media (max-width: 420px) { .hide-xs { display: none !important; } }
.linkbtn { background: none; border: 0; color: var(--link); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; padding: 6px 4px; }
.lead { color: var(--ink-soft); max-width: 64ch; margin-bottom: 14px; font-size: 1.04rem; }
.h-title { font-family: var(--font-d); font-weight: 400; font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: .01em; margin: 6px 0 10px; color: var(--paper-head); }
.sec-h { font-family: var(--font-d); font-weight: 400; font-size: 1.25rem; margin: 20px 0 10px; letter-spacing: .01em; }
.sec-h small { font-family: var(--font-b); font-weight: 800; font-size: .85rem; color: var(--ink-soft); margin-left: 6px; }
.mini-h { font-weight: 900; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--eyebrow-paper); margin: 16px 0 4px; }
.empty { color: var(--ink-soft); padding: 14px 0; }
.side-note { color: var(--ink-soft); font-size: .92rem; margin-top: 8px; max-width: 66ch; }
.btnrow { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.btnrow.center { justify-content: center; }
.panel { background: var(--paper); color: var(--paper-ink); border-radius: 22px; padding: 20px; box-shadow: 0 10px 30px rgba(40, 60, 40, .14); }
.panel.wide { max-width: 860px; margin: 8px auto; }
.panel.center { text-align: center; }
.dimstar { opacity: .25; }
.tag { display: inline-block; font-family: var(--font-b); font-size: .7rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; background: var(--gold); color: var(--gold-ink); border-radius: 8px; padding: 1px 7px; vertical-align: middle; }
.rare { display: inline-block; background: #d6456f; color: #fff; border-radius: 8px; padding: 0 7px; font-size: .78em; letter-spacing: .04em; }
kbd { display: inline-block; padding: 0 .4em; border-radius: 5px; border: 1px solid currentColor; font: 700 .8em var(--font-b); opacity: .85; }

/* ----- logo ----- */
.logo { display: inline-flex; align-items: center; gap: .35em; position: relative; color: var(--paper-head); line-height: .9; }
.logo-bird { width: 2.6em; height: 2.1em; flex: none; }
.logo-bird svg { width: 100%; height: 100%; overflow: visible; }
.logo-txt { display: grid; }
.logo-top, .logo-bot { font-family: var(--font-d); letter-spacing: .02em; }
.logo-top { font-size: 1.06em; color: #d8433b; }
.logo-bot { font-size: 1.06em; color: var(--accent); }
.logo-notes { position: absolute; top: -.5em; left: 2.2em; font-size: .5em; color: var(--accent); letter-spacing: .3em; opacity: .7; }
.logo.big { font-size: clamp(2.3rem, 8vw, 3.4rem); filter: drop-shadow(0 3px 0 rgba(42, 29, 16, .12)); }
.logo.sm { font-size: .95rem; }
.logo.sm .logo-txt { display: flex; gap: .25em; }
.logo.sm .logo-bird { width: 2em; height: 1.6em; }
.logo.sm .logo-notes { display: none; }

/* ----- top bar ----- */
#top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bar); border-bottom: 1px solid var(--line); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 7px; box-shadow: 0 2px 10px rgba(40, 60, 40, .06); }
.tb-in { display: flex; align-items: center; gap: 10px; max-width: 1180px; margin: 0 auto; }
.tb-player { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 2px 8px 2px 2px; border-radius: 14px; min-width: 0; text-align: left; }
.tb-player:hover { background: var(--glass); }
.tb-av { width: 42px; height: 42px; flex: none; }
.tb-who { display: grid; min-width: 0; }
.tb-who b { font-weight: 900; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 12ch; }
.tb-who small { color: var(--ink-soft); font-weight: 800; font-size: .76rem; white-space: nowrap; }
.xpbar { display: block; height: 6px; border-radius: 4px; background: rgba(42, 29, 16, .1); overflow: hidden; margin-top: 3px; width: 110px; }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--accent)); border-radius: 4px; }
.xpbar.big { width: 100%; height: 9px; margin-top: 8px; }
.tb-home { margin: 0 auto; background: none; border: 0; padding: 4px 8px; border-radius: 12px; }
.tb-home:hover { background: var(--glass); }
.tb-right { display: flex; align-items: center; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 10px; border-radius: 12px; background: var(--chip); color: var(--chip-ink); font-weight: 900; font-variant-numeric: tabular-nums; border: 0; }
.chip small { font-weight: 700; color: var(--ink-soft); margin-left: -3px; }
.chipbtn:hover { background: var(--glass-2); }
.chiptoken { width: 24px; height: 24px; }
.ico { width: 20px; height: 20px; display: inline-block; }
.iconbtn { background: var(--chip); }
@media (max-width: 760px) { .tb-home { display: none; } .tb-right { margin-left: auto; } }
@media (max-width: 420px) { .xpbar { width: 70px; } .tb-who b { max-width: 8ch; } .tb-who small { display: none; } }

/* ----- scenes ----- */
.scene { width: 100%; height: 100%; display: block; }
.cloud { animation: drift 60s linear infinite; }
.cloud.c2 { animation-duration: 80s; animation-delay: -30s; }
@keyframes drift { from { translate: -30px 0; } 50% { translate: 30px 0; } to { translate: -30px 0; } }
.waves { animation: wave 5s linear infinite; }
@keyframes wave { from { translate: 0 0; } to { translate: 20px 0; } }
.bird { width: 100%; height: auto; display: block; overflow: visible; }

/* ----- splash, create, players ----- */
.splash { min-height: 70vh; display: grid; place-content: center; justify-items: center; gap: 18px; }
.splash-sub { color: var(--ink-soft); font-weight: 800; }
.create, .players { display: grid; justify-items: center; gap: 18px; padding-top: 14px; }
.create-card { display: grid; grid-template-columns: 220px 1fr; width: min(800px, 100%); background: var(--paper); color: var(--paper-ink); border-radius: 22px; overflow: hidden; box-shadow: 0 18px 46px rgba(40, 60, 40, .18); }
.create-prev { background: linear-gradient(180deg, #bfe6f2, #8cc56e); display: grid; place-content: center; justify-items: center; gap: 10px; padding: 20px; }
.cp-av { width: 170px; height: 170px; }
.cp-av svg { width: 100%; height: 100%; }
.cp-name { font-family: var(--font-d); font-size: 1.2rem; color: #fff; text-shadow: 0 1px 0 #2d5a24, 0 2px 6px rgba(20, 50, 20, .55); text-align: center; word-break: break-word; }
.create-form { padding: 20px; display: grid; gap: 12px; min-width: 0; }
.lk-row { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 10px; }
.lk-lab { font-weight: 900; font-size: .9rem; }
.lk-sw { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 3px solid #fff; background: var(--c); box-shadow: 0 0 0 1px var(--line-paper); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--accent); }
.seg button { min-height: 38px; padding: 5px 11px; font-size: .9rem; }
.seg button small { font-weight: 700; opacity: .8; }
.seg.dark button { color: var(--ink); border-color: var(--line-paper); background: #fff; }
.seg.dark button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (max-width: 640px) { .create-card { grid-template-columns: 1fr; } .cp-av { width: 120px; height: 120px; } .lk-row { grid-template-columns: 1fr; gap: 4px; } }
.pl-grid { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.pl-card { display: grid; justify-items: center; gap: 6px; width: 170px; padding: 16px 12px; border-radius: 20px; border: 0; background: var(--paper); color: var(--paper-ink); box-shadow: 0 8px 22px rgba(40, 60, 40, .14); }
.pl-card:hover { transform: translateY(-2px); }
.pl-card svg { width: 96px; height: 96px; }
.pl-card b { font-size: 1.05rem; }
.pl-card small { color: var(--paper-soft); font-weight: 700; font-size: .8rem; text-align: center; }
.pl-card.add { border: 3px dashed var(--line-paper); background: transparent; box-shadow: none; }
.pl-plus { width: 96px; height: 96px; display: grid; place-items: center; font-size: 3rem; color: var(--accent); }

/* ----- home ----- */
.hub { display: grid; gap: 18px; }
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; align-items: stretch; }
.hero-scene { border-radius: 24px; overflow: hidden; min-height: 280px; box-shadow: 0 14px 34px rgba(40, 60, 40, .2); border: 3px solid #fff; background: #bfe6f2; }
.hero-copy { background: var(--paper); border-radius: 24px; padding: 20px; box-shadow: 0 10px 28px rgba(40, 60, 40, .12); display: grid; gap: 10px; align-content: start; }
.hero-title { font-family: var(--font-d); font-weight: 400; font-size: clamp(1.8rem, 4.4vw, 2.6rem); line-height: 1.05; color: var(--paper-head); }
.hero-text { color: var(--paper-soft); font-size: 1.04rem; }
.hero-goal { font-size: .95rem; color: var(--paper-ink); }
.hero-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } .hero-scene { min-height: 0; aspect-ratio: 2 / 1; } }
.guide { display: flex; gap: 10px; align-items: flex-start; margin-top: 6px; }
.g-av { width: 62px; height: 52px; flex: none; }
.g-av svg { width: 100%; height: 100%; }
.g-say { background: #eef7f1; border: 2px solid #cfe6d6; border-radius: 16px 16px 16px 4px; padding: 8px 12px; }
.g-say b { font-size: .82rem; color: var(--accent); }
.g-say p { font-size: .95rem; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.hcard { display: flex; gap: 12px; align-items: center; text-align: left; padding: 14px; border-radius: 20px; border: 0; background: var(--paper); color: var(--paper-ink); box-shadow: 0 8px 22px rgba(40, 60, 40, .12); min-width: 0; }
button.hcard:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(40, 60, 40, .16); }
.hc-ico { width: 64px; height: 64px; flex: none; display: grid; place-items: center; }
.hc-ico svg { width: 100%; height: 100%; }
.hc-ico .hc-bird { width: 64px; height: 52px; }
.big-ico { font-size: 2.4rem; }
.hc-txt { display: grid; gap: 2px; min-width: 0; flex: 1; }
.hc-txt b { font-size: 1.05rem; }
.hc-txt small { color: var(--paper-soft); font-weight: 700; font-size: .84rem; }
.hc-last { color: var(--accent) !important; }
.hub-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; padding: 8px 0 4px; }
.sup { color: #9a5a00; }

/* ----- level ladder and word chips ----- */
.lvbar { display: flex; height: 8px; border-radius: 5px; background: var(--new); overflow: hidden; margin-top: 4px; width: 100%; }
.lvbar i { display: block; height: 100%; }
.lvbar .g { background: var(--goldc); } .lvbar .s { background: var(--silver); } .lvbar .b { background: var(--bronze); } .lvbar .l { background: var(--learning); }
.fg-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-weight: 800; font-size: .86rem; color: var(--ink-soft); margin-bottom: 10px; }
.fg-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 5px; }
.st-g { background: var(--goldc); } .st-s { background: var(--silver); } .st-b { background: var(--bronze); } .st-l { background: var(--learning); }
.lv-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.lvcard { display: flex; gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 18px; border: 0; background: var(--paper); color: var(--paper-ink); box-shadow: 0 6px 18px rgba(40, 60, 40, .1); }
.lvcard.cur { box-shadow: 0 0 0 3px var(--accent), 0 6px 18px rgba(40, 60, 40, .1); }
.lvcard.locked { opacity: .72; }
.lvcard.champ { background: linear-gradient(135deg, #fff8e0, #fdeef3); }
.lvbadge { width: 54px; height: 54px; flex: none; }
.lvbadge.big { width: 86px; height: 86px; }
.lv-body { display: grid; gap: 2px; flex: 1; min-width: 0; }
.lv-body b { font-size: 1.02rem; }
.lv-body small { color: var(--paper-soft); font-weight: 700; font-size: .82rem; }
.lv-lock { color: #8a5a2a !important; }
.champ-h { color: #b8336a; }
.levelv .lv-head { display: flex; gap: 16px; align-items: center; margin-bottom: 6px; }
.setcard { background: var(--paper); border-radius: 18px; padding: 12px 14px; margin-top: 12px; box-shadow: 0 6px 18px rgba(40, 60, 40, .08); }
.set-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.set-h .sec-h { margin: 4px 0; }
.set-tip { color: var(--paper-soft); font-size: .92rem; margin-bottom: 8px; }
.wchips { display: flex; flex-wrap: wrap; gap: 6px; }
.wchip { font-family: var(--font-w); font-size: 1.02rem; padding: 3px 10px; border-radius: 10px; border: 2px solid transparent; background: var(--new); color: #6a6050; }
.wchip.st-learning { background: #fdeceb; border-color: var(--learning); color: var(--paper-ink); }
.wchip.st-bronze { background: #f6e6d4; border-color: var(--bronze); color: var(--paper-ink); }
.wchip.st-silver { background: #eef2f5; border-color: var(--silver); color: var(--paper-ink); }
.wchip.st-gold { background: #fff3c4; border-color: var(--goldc); color: var(--paper-ink); }
.wchip .wmark mark { padding: 0 1px; }

/* ----- the word itself: big, clear letters with the tricky bit marked ----- */
.wmark { font-family: var(--font-w); letter-spacing: .02em; }
.wmark mark { display: inline-block; line-height: 1.04; background: var(--mark); color: inherit; border-radius: .18em; padding: .01em .05em .06em; box-shadow: inset 0 -.1em 0 var(--mark-edge); }
.wmark.fix u { text-decoration: none; color: var(--wrong); border-bottom: .12em solid var(--wrong); }
.sr-word { margin: 2px 0; font-size: clamp(2.4rem, 9vw, 3.6rem); line-height: 1.2; text-align: center; color: var(--paper-head); transition: opacity .25s, filter .25s, transform .25s; }
.sr-word.big { font-size: clamp(2.8rem, 11vw, 4.2rem); }
.sr-word.covering { opacity: 0; filter: blur(6px); transform: scale(.94); }
.covering { opacity: 0; transition: opacity .45s; }
.sr-recall { display: grid; justify-items: center; gap: 4px; background: var(--paper-2); border-radius: 16px; padding: 10px 14px; border-left: 5px solid var(--gold); margin-top: 4px; width: 100%; }
.sr-recall .wmark.mid { font-size: clamp(1.8rem, 6.5vw, 2.6rem); line-height: 1.15; }
.sr-rlab { font-size: .76rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--eyebrow); }
.sr-hook { color: var(--paper-ink); font-weight: 700; font-size: 1.02rem; text-align: center; max-width: 56ch; text-wrap: balance; }
.sr-fix { font-size: clamp(2.2rem, 8vw, 3.2rem); line-height: 1.2; text-align: center; margin-bottom: 2px; }
.sr-you { color: var(--paper-soft); font-size: .9rem; }
.sr-you span { font-family: var(--font-w); color: #8a7a6a; }
.sr-aids { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.sayit, .parts { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; font-family: var(--font-w); font-size: 1.15rem; }
.sayit b, .parts b { background: #eaf4ee; border: 2px solid #cfe6d6; border-radius: 10px; padding: 1px 8px; font-weight: 700; }
.sayit i, .parts i { font-style: normal; color: var(--accent); font-weight: 900; }
.parts b.drop { text-decoration: line-through; color: var(--wrong); background: var(--wrong-bg); border-color: #f2c4b8; }
.sr-def { color: var(--paper-soft); text-align: center; }

/* ----- a spelling round ----- */
.sround { display: grid; gap: 10px; max-width: 760px; margin: 0 auto; }
.sr-bar { display: flex; align-items: center; gap: 10px; }
.sr-title { flex: 1; display: grid; min-width: 0; text-align: center; }
.sr-title b { font-family: var(--font-d); font-weight: 400; font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-title small { color: var(--ink-soft); font-weight: 800; font-size: .82rem; }
.sr-dots { display: flex; gap: 4px; flex: none; }
.sr-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(42, 29, 16, .14); }
.sr-dots i.ok { background: var(--good); }
.sr-dots i.miss { background: #f0a040; }
@media (max-width: 420px) { .sr-dots { gap: 3px; } .sr-dots i { width: 7px; height: 7px; } }
.ts-count { font-weight: 900; color: var(--ink-soft); flex: none; min-width: 64px; text-align: right; }
.sr-stage { position: relative; height: 92px; border-radius: 18px; overflow: hidden; border: 3px solid #fff; box-shadow: 0 6px 16px rgba(40, 60, 40, .12); background: linear-gradient(180deg, #8fd3f0, #e4f6fb); }
.rs-sky { position: absolute; inset: 0 0 auto; width: 100%; height: 60px; }
.rs-ground { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 34px; }
.rs-branch { position: absolute; left: 10px; right: 84px; bottom: 30px; height: 7px; background: #8b5e34; border: 2px solid var(--ink); border-radius: 6px; transform: rotate(-.5deg); }
.rs-bath { position: absolute; right: 12px; bottom: 4px; width: 66px; height: 52px; }
.rs-bird { --k: 0; position: absolute; bottom: 34px; width: 74px; left: calc(6px + (100% - 166px) * var(--k)); transition: left .6s cubic-bezier(.3, 1.3, .5, 1); }
.rs-bird svg { display: block; width: 100%; height: auto; }
.rs-bird.hop { animation: hop .45s; }
@keyframes hop { 40% { translate: 0 -10px; } }
@media (max-height: 760px) { .sr-stage { display: none; } }
.sr-card { background: var(--paper); color: var(--paper-ink); border-radius: 22px; padding: 16px; box-shadow: 0 10px 28px rgba(40, 60, 40, .14); display: grid; gap: 10px; justify-items: center; transition: box-shadow .15s; min-height: 220px; align-content: start; }
.sr-card.good { box-shadow: 0 0 0 4px var(--good), 0 10px 28px rgba(40, 60, 40, .14); }
.sr-card.bad { box-shadow: 0 0 0 4px #f0a040, 0 10px 28px rgba(40, 60, 40, .14); }
.sr-card .eyebrow { color: var(--eyebrow); }
.sr-h { font-family: var(--font-d); font-weight: 400; font-size: 1.8rem; color: var(--paper-head); }
.sr-tip { font-weight: 800; text-align: center; max-width: 54ch; }
.sr-lesson { color: var(--paper-soft); text-align: center; max-width: 60ch; }
.sr-ex { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center; font-size: 2rem; margin: 6px 0; }
.sr-hear { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.sr-sent { font-size: 1.22rem; font-weight: 700; text-align: center; line-height: 1.5; max-width: 52ch; text-wrap: balance; }
.sr-sent.big { font-size: 1.45rem; }
.sr-sent.done b { background: var(--mark); border-radius: 6px; padding: 0 4px; }
.gap { display: inline-block; width: 3.4em; height: 1.1em; border-bottom: 3px solid var(--accent); vertical-align: -.15em; margin: 0 .1em; background: rgba(26, 136, 104, .07); border-radius: 4px 4px 0 0; }
.sr-note { color: var(--paper-soft); font-size: .92rem; text-align: center; max-width: 56ch; }
.sr-defrow { margin-top: -4px; }
.sr-do { color: var(--paper-soft); text-align: center; max-width: 54ch; }
.sr-typed { width: min(100%, 520px); min-height: 66px; border-bottom: 4px solid var(--line-paper); display: flex; align-items: center; justify-content: center; font-family: var(--font-w); font-size: clamp(2rem, 8vw, 2.8rem); color: var(--paper-head); letter-spacing: .03em; padding: 0 6px; overflow-wrap: anywhere; }
.sr-typed .t-ph { color: #b9ad98; font-size: 1.1rem; font-family: var(--font-b); font-weight: 700; margin-left: 8px; }
.caret { display: inline-block; width: 3px; height: 1.05em; background: var(--accent); margin-left: 2px; animation: blink 1s steps(2) infinite; border-radius: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.sr-typed.gapsw { border-bottom: 0; font-size: clamp(2.2rem, 8vw, 3rem); }
.gapset { display: inline-flex; gap: 2px; margin: 0 1px; }
.gapc { display: inline-grid; place-items: center; min-width: .7em; height: 1.1em; border-radius: 6px; background: #fff; border: 2px dashed var(--mark-edge); line-height: 1; }
.gapc.on { background: var(--mark); border-style: solid; }
.sr-fb { display: grid; gap: 8px; justify-items: center; text-align: center; font-weight: 700; width: 100%; }
.fb-good { color: var(--right); font-size: 1.25rem; font-weight: 900; }
.fb-bad { color: var(--wrong); font-size: 1.1rem; font-weight: 900; }
.streak { color: #c2410c; font-size: .95rem; margin-left: 6px; }
.sr-peek { font-size: 2.4rem; }
.sr-kb { width: 100%; }
.sr-kb.off { display: none; }
.kb { display: grid; gap: 6px; max-width: 640px; margin: 0 auto; user-select: none; -webkit-user-select: none; }
.kb-row { display: flex; gap: 5px; justify-content: center; }
.kb-k { flex: 1 1 0; min-width: 0; max-width: 58px; height: 50px; border: 0; border-radius: 11px; background: #fff; color: var(--paper-head); font-family: var(--font-w); font-size: 1.35rem; font-weight: 700; box-shadow: 0 3px 0 var(--btn-edge), 0 4px 10px rgba(40, 60, 40, .08); touch-action: manipulation; padding: 0; }
.kb-k:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--btn-edge); background: #fff6d6; }
.kb-k.hit { animation: keyhit .22s ease-out; }
@keyframes keyhit { 0%, 45% { transform: translateY(2px); box-shadow: 0 1px 0 var(--btn-edge); background: #fff6d6; } }
.kb-sym { background: #f3eee2; max-width: 46px; }
.kb-back { background: #f3eee2; max-width: 70px; flex-grow: 1.4; font-family: var(--font-b); }
.kb-last { margin-top: 2px; }
.kb-go { max-width: 320px; flex: 1 1 auto; background: var(--accent); color: #fff; font-family: var(--font-b); font-weight: 900; font-size: 1.15rem; box-shadow: 0 4px 0 var(--accent-edge); height: 52px; }
.kb-go:active { background: #157a5c; box-shadow: 0 1px 0 var(--accent-edge); }
@media (max-width: 420px) { .kb-k { height: 46px; font-size: 1.2rem; border-radius: 9px; } .kb-row { gap: 4px; } .kb { gap: 5px; } }
@media (pointer: fine) and (min-width: 900px) { .kb-k { height: 44px; } }

/* ----- end of a round ----- */
.mdone { display: grid; place-items: center; padding-top: 10px; }
.md-card { background: var(--paper); border-radius: 24px; padding: 22px 20px; width: min(620px, 100%); box-shadow: 0 14px 34px rgba(40, 60, 40, .16); display: grid; gap: 12px; justify-items: center; text-align: center; }
.md-title { font-family: var(--font-d); font-weight: 400; font-size: clamp(1.7rem, 5vw, 2.3rem); color: var(--paper-head); }
.md-ticket { display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; text-align: left; }
.md-ticket .token { width: 76px; height: 76px; }
@media (max-width: 520px) { .md-ticket > div { text-align: center; } }
.md-stars { font-size: 1.6rem; color: #f2a31a; letter-spacing: .08em; }
.md-boost { color: var(--paper-soft); font-weight: 700; max-width: 36ch; text-align: left; }
.md-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; width: 100%; }
.md-stats > div { background: var(--paper-2); border-radius: 14px; padding: 8px; display: grid; }
.md-stats b { font-size: 1.4rem; }
.md-stats small { color: var(--paper-soft); font-weight: 700; font-size: .8rem; }
.md-gold, .md-new { font-weight: 800; }
.md-miss { display: grid; gap: 6px; justify-items: center; background: #fff6e8; border-radius: 16px; padding: 10px 14px; width: 100%; }
.md-miss small { color: var(--paper-soft); }
.md-words { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; font-size: 1.6rem; }
.md-hs { text-align: left; display: grid; gap: 4px; font-size: .95rem; }
.md-perfect { color: var(--right); font-weight: 900; }
.md-bank { color: var(--paper-soft); font-weight: 700; }
.md-card .lvbadge.big, .md-card .champbadge.big { width: 110px; height: 110px; }

/* ----- test my level ----- */
.testintro .h-title.dark, .sec-h.dark { color: var(--paper-head); }
.yeargrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.champ-tease { display: flex; gap: 12px; align-items: center; background: linear-gradient(135deg, #fff8e0, #fdeef3); border-radius: 16px; padding: 12px; margin-top: 14px; }
.champbadge { width: 56px; height: 56px; flex: none; }
.ts-ladder { display: flex; gap: 6px; justify-content: center; }
.ts-ladder .tl { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: .85rem; background: #fff; color: var(--ink-soft); border: 3px solid var(--c); opacity: .6; }
.ts-ladder .tl.on { opacity: 1; background: var(--c); color: #fff; transform: scale(1.15); }
.ts-ladder .tl.pass { opacity: 1; background: #e2f6ea; color: var(--right); }
.ts-ladder .tl.fail { opacity: .45; }
.ts-champ { display: flex; gap: 8px; align-items: center; font-weight: 800; color: #b8336a; }
.ts-champ .champbadge { width: 34px; height: 34px; }

/* ----- sound-alikes ----- */
.hs-tier { margin-top: 8px; }
.hs-tier.locked .hs-grid { opacity: .55; }
.hs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
@media (max-width: 520px) { .hs-grid { grid-template-columns: 1fr 1fr; gap: 8px; } .hs-card { font-size: 1rem; padding: 10px; } }
.hs-card { display: grid; gap: 4px; text-align: left; padding: 12px; border-radius: 16px; border: 0; background: var(--paper); color: var(--paper-ink); box-shadow: 0 5px 14px rgba(40, 60, 40, .1); font-family: var(--font-w); font-size: 1.12rem; }
.hs-card.done { background: #fffbe8; }
.hs-st { color: #f2a31a; font-family: var(--font-b); }
.hs-learn { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
.hs-w { background: var(--paper-2); border-radius: 16px; padding: 12px; display: grid; gap: 6px; }
.hs-w h3 { font-family: var(--font-w); font-size: 2rem; color: var(--paper-head); }
.hs-mean { font-weight: 800; }
.hs-w .sr-hook { text-align: left; font-size: .98rem; }
.hs-ex { color: var(--paper-soft); }
.hs-ex b { background: var(--mark); border-radius: 5px; padding: 0 3px; color: var(--paper-head); }
.hs-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; width: 100%; }
.hs-opt { position: relative; min-height: 60px; border-radius: 16px; border: 3px solid var(--line-paper); background: #fff; color: var(--paper-head); font-family: var(--font-w); font-size: 1.5rem; font-weight: 700; padding: 6px 12px 6px 34px; box-shadow: 0 3px 0 var(--btn-edge); text-align: center; }
.v-card .hs-opt, .visit .hs-opt { font-family: var(--font-b); font-size: 1.05rem; font-weight: 800; }
.hs-opt .k { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-family: var(--font-b); font-size: .78rem; font-weight: 900; color: #b9ad98; }
.hs-opt:hover:not([disabled]) { border-color: var(--accent); }
.hs-opt.right { border-color: var(--good); background: var(--right-bg); }
.hs-opt.wrong { border-color: var(--bad); background: var(--wrong-bg); }
.hs-opt[disabled] { cursor: default; }

/* ----- birdwatching ----- */
.pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.placecard { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; text-align: left; padding: 0; border: 0; border-radius: 18px; overflow: hidden; background: var(--paper); color: var(--paper-ink); box-shadow: 0 6px 18px rgba(40, 60, 40, .12); }
.placecard.locked { opacity: .6; }
.placecard.wait:not(.locked) { opacity: .85; }
.placecard[disabled] { cursor: default; }
.pc-scene { position: relative; aspect-ratio: 2 / 1; display: block; overflow: hidden; }
.pc-scene > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pc-lock { position: absolute; inset: auto 8px 8px auto; background: rgba(31, 21, 11, .75); color: #fff; font-weight: 800; font-size: .8rem; padding: 3px 8px; border-radius: 10px; }
.pc-body { display: grid; gap: 2px; padding: 10px 12px 12px; }
.pc-body small { color: var(--paper-soft); font-weight: 700; font-size: .82rem; }
.pc-prog { color: var(--accent); font-weight: 800; font-size: .85rem; }
.visit { display: grid; gap: 10px; max-width: 760px; margin: 0 auto; }
.v-stage { position: relative; aspect-ratio: 2 / 1; border-radius: 22px; overflow: hidden; border: 3px solid #fff; box-shadow: 0 10px 26px rgba(40, 60, 40, .18); }
.v-stage > svg { position: absolute; inset: 0; }
.v-bird { position: absolute; left: 34%; bottom: 6%; width: 34%; transform: translate(120%, -120%) scale(.4) rotate(-14deg); opacity: 0; transition: transform 1.3s cubic-bezier(.3, .9, .4, 1.1), opacity .4s; }
.v-bird.in { transform: none; opacity: 1; }
.v-bird.pulse { animation: vpulse 1.4s ease-in-out infinite; }
@keyframes vpulse { 50% { transform: scale(1.04); } }
.v-bird svg { width: 100%; height: auto; }
.v-card { background: var(--paper); border-radius: 22px; padding: 16px; box-shadow: 0 10px 28px rgba(40, 60, 40, .14); display: grid; gap: 10px; justify-items: center; text-align: center; }
.v-wait { color: var(--paper-soft); font-weight: 800; padding: 20px; }
.v-name { font-family: var(--font-d); font-weight: 400; font-size: clamp(1.7rem, 5vw, 2.3rem); color: var(--paper-head); }
.v-sci { font-style: italic; color: var(--paper-soft); margin-top: -6px; }
.v-intro { font-weight: 800; color: #d8433b; }
.v-notes { text-align: left; background: var(--paper-2); border-radius: 16px; padding: 10px 14px; max-width: 60ch; }
.v-notes ul { margin: 4px 0 6px 18px; padding: 0; display: grid; gap: 4px; }
.v-size { color: var(--paper-soft); font-size: .92rem; }
.v-q { font-family: var(--font-d); font-weight: 400; font-size: 1.5rem; color: var(--paper-head); }
.v-clue { background: var(--paper-2); border-radius: 14px; padding: 10px 14px; font-size: 1.05rem; max-width: 60ch; }
.v-photo { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; justify-content: center; text-align: left; }
.polaroid { position: relative; width: 220px; background: #fff; padding: 10px 10px 34px; box-shadow: 0 8px 22px rgba(0, 0, 0, .2); transform: rotate(-3deg); border-radius: 4px; }
.polaroid > svg { width: 100%; aspect-ratio: 4 / 3; height: auto; }
.pol-bird { position: absolute; left: 18%; top: 14%; width: 64%; }
.pol-cap { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-family: var(--font-d); color: var(--paper-head); }
.v-newfact { background: #fff6d6; border-radius: 12px; padding: 8px 10px; max-width: 40ch; }
.visit .sr-kb { margin-top: 6px; }
@media (min-width: 1000px) {
  .visit { max-width: 1180px; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; column-gap: 16px; }
  .visit > .sr-bar { grid-column: 1 / -1; }
  .v-stage { position: sticky; top: 10px; }
}
.tabs { display: flex; gap: 6px; margin-bottom: 4px; }
.tabs button { border: 0; border-radius: 12px; padding: 8px 14px; font-weight: 900; background: var(--chip); color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--accent); color: #fff; }
.bk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.bcard { display: grid; justify-items: center; gap: 2px; padding: 8px; border: 0; border-radius: 16px; background: var(--paper); color: var(--paper-ink); box-shadow: 0 4px 12px rgba(40, 60, 40, .1); text-align: center; }
.bcard.unseen { background: #f1ede2; }
.bcard .bc-art { width: 100%; }
.bcard b { font-size: .9rem; line-height: 1.15; }
.bcard small { color: #f2a31a; font-size: .8rem; }
.bcard.unseen small { color: var(--paper-soft); }
.bird.sil { filter: none; opacity: .75; }
.ff-top { display: flex; gap: 12px; align-items: center; }
.ff-art { width: 160px; flex: none; }
.ff-sci { font-style: italic; color: var(--paper-soft); }
.ff-alt { font-size: .88rem; color: var(--paper-soft); }
.ff-you { font-weight: 800; color: var(--accent); font-size: .9rem; }
.ff-data { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 12px; margin: 12px 0 4px; }
.ff-data div { background: var(--paper-2); border-radius: 12px; padding: 6px 10px; }
.ff-data .wide { grid-column: 1 / -1; }
.ff-data dt { font-size: .72rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--eyebrow-paper); }
.ff-data dd { margin: 0; font-weight: 600; font-size: .94rem; }
.ff-facts { margin: 4px 0 0 18px; padding: 0; display: grid; gap: 6px; }
.ff-facts .lockd { color: var(--paper-soft); }
.ff-src { font-size: .82rem; color: var(--paper-soft); }
.ff-src a { color: var(--link-paper); }
.m-ff .m-box, .m-box.m-ff { width: min(640px, 100%); }
@media (max-width: 520px) { .ff-top { flex-direction: column; text-align: center; } .ff-data { grid-template-columns: 1fr 1fr; } }
.garden .g-hero { border-radius: 22px; overflow: hidden; aspect-ratio: 2 / 1; border: 3px solid #fff; box-shadow: 0 10px 26px rgba(40, 60, 40, .16); }
.pl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.plant { display: flex; gap: 10px; align-items: flex-start; background: var(--paper); border-radius: 16px; padding: 10px 12px; box-shadow: 0 4px 12px rgba(40, 60, 40, .08); }
.plant.locked { opacity: .6; }
.plant p { font-size: .9rem; color: var(--paper-soft); }
.plant .pl-b { color: var(--accent); font-weight: 800; }
.pl-ico, .om-plant { width: 64px; height: 56px; flex: none; display: block; }
.om-plant { width: 110px; height: 90px; margin: 0 auto; }
.plantico { width: 100%; height: 100%; }
.advice { display: grid; gap: 8px; padding-left: 20px; max-width: 70ch; }
.om-scene { display: block; width: 100%; aspect-ratio: 2 / 1; border-radius: 14px; overflow: hidden; margin-bottom: 8px; }
.open-m, .rank-m { text-align: center; display: grid; justify-items: center; gap: 6px; }
.rankbadge { width: 64px; height: 64px; }
.rankbadge.big { width: 110px; height: 110px; }

/* ----- grown-ups ----- */
.grown { max-width: 980px; margin: 0 auto; }
.gsec { background: var(--paper); border-radius: 20px; padding: 14px 16px; margin-top: 14px; box-shadow: 0 6px 18px rgba(40, 60, 40, .08); }
.gsec .sec-h { margin-top: 4px; }
.mini-h.dark { color: var(--eyebrow-paper); }
.gcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.gcard { background: var(--paper-2); border-radius: 14px; padding: 10px; display: grid; }
.gcard b { font-size: 1.4rem; }
.gcard b small { font-size: .8rem; color: var(--paper-soft); }
.gcard > small { color: var(--paper-soft); font-weight: 700; font-size: .8rem; }
.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: minmax(120px, 210px) 1fr 70px; gap: 10px; align-items: center; font-size: .9rem; font-weight: 700; }
.bar .lvbar { height: 10px; margin: 0; }
.bar-v { text-align: right; color: var(--paper-soft); }
@media (max-width: 520px) { .bar { grid-template-columns: 1fr 60px; } .bar .lvbar { grid-column: 1 / -1; grid-row: 2; } }
.tablewrap { overflow-x: auto; }
.catchlog { width: 100%; border-collapse: collapse; font-size: .92rem; }
.catchlog th, .catchlog td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line-paper); }
.catchlog .num { text-align: right; }
.catchlog .wmark { font-size: 1.2rem; }
.catchlog .miss { font-family: var(--font-w); color: #8a7a6a; }
.setrow { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 10px 0; }
.setrow > span { font-weight: 900; min-width: 150px; }
.sel { min-height: 40px; border-radius: 11px; border: 2px solid var(--line-paper); padding: 4px 10px; background: #fff; max-width: 100%; }
.hows { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.how { background: var(--paper-2); border-radius: 14px; padding: 10px 12px; }
.how b { color: var(--accent); }
.how p { font-size: .92rem; color: var(--paper-soft); margin-top: 2px; }
.about .m-text { font-size: .95rem; }
.about-sup { background: #fff6d6; border-radius: 14px; padding: 10px; margin-top: 10px; display: grid; gap: 6px; justify-items: start; }
.m-box { background: var(--paper); }
