@font-face {
    font-family: 'Bricolage Grotesque';
    font-style: normal;
    font-weight: 700 800;
    font-display: swap;
    src: url('/fonts/bricolage-grotesque-latin.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Bricolage Grotesque';
    font-style: normal;
    font-weight: 700 800;
    font-display: swap;
    src: url('/fonts/bricolage-grotesque-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@view-transition { navigation: auto; }

:root {
    --paper: #ffffff;
    --surface: #f4f5f3;
    --ink: #121614;
    --muted: #5c635e;
    --line: #e4e7e3;
    --key-ledge: #d3d8d2;
    --brand: #c2410c;
    --brand-deep: #923009;
    --brand-soft: #fde9dc;
    --brand-line: #f6cdb2;
    --brand-tint: #fef4ee;
    --gold: #ffc21a;
    --gold-wash: #fff6d6;
    --gold-line: #ffe08a;
    --success: #1fb553;
    --success-surface: #dcf7e5;
    --success-ink: #0d6a2d;
    --danger: #e5484d;
    --danger-surface: #fde4e2;
    --danger-strong: #c4262c;
    --danger-ink: #a3181d;
    --display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
    --body: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
    --ease: cubic-bezier(.16, 1, .3, 1);
    --bq-game: var(--brand);
    --bq-game-shadow: var(--brand-deep);
    --bq-game-soft: var(--brand-soft);
    --bq-game-line: var(--brand-line);
    --bq-game-tint: var(--brand-tint);
    color-scheme: light;
}

[data-game='sprint'] { --bq-game: #2a5fc4; --bq-game-shadow: #1f4893; --bq-game-soft: #e6effc; --bq-game-line: #c8daf5; --bq-game-tint: #f2f7fe; }
[data-game='blitz'] { --bq-game: #b3184f; --bq-game-shadow: #86113a; --bq-game-soft: #fbe4ec; --bq-game-line: #f3c4d4; --bq-game-tint: #fdf1f5; }
[data-game='older'] { --bq-game: #6d3ad8; --bq-game-shadow: #522aa6; --bq-game-soft: #efe8fd; --bq-game-line: #d9cbf8; --bq-game-tint: #f7f3fe; }
[data-game='flags'] { --bq-game: #0c6585; --bq-game-shadow: #084a62; --bq-game-soft: #dff0f6; --bq-game-line: #bddfeb; --bq-game-tint: #eff8fb; }
[data-game='survival'] { --bq-game: #0b6e6f; --bq-game-shadow: #075152; --bq-game-soft: #ddf1f0; --bq-game-line: #bde2e0; --bq-game-tint: #eef8f8; }
[data-game='expert'] { --bq-game: #121614; --bq-game-shadow: #000000; --bq-game-soft: #e8eaee; --bq-game-line: #cfd3da; --bq-game-tint: #f3f4f6; }
[data-game='daily'] { --bq-game: #121614; --bq-game-shadow: #000000; --bq-game-soft: #fdf1c9; --bq-game-line: #f1dc92; --bq-game-tint: #fef8e4; }
[data-game='album'] { --bq-game: var(--brand); --bq-game-shadow: var(--brand-deep); --bq-game-soft: var(--brand-soft); --bq-game-line: var(--brand-line); --bq-game-tint: var(--brand-tint); }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 16px/1.5 var(--body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img { max-width: 100%; display: block; }

[hidden] { display: none !important; }

a { color: inherit; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; margin: 0; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

main { flex: 1; overflow-x: clip; }

/* Header */
.bq-header { position: sticky; top: 0; z-index: 30; background: rgb(255 255 255 / .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); view-transition-name: bq-header; }
.bq-header .wrap { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 24px/1 var(--display); letter-spacing: -0.03em; }
.brand img { width: 40px; height: 40px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { padding: 10px 14px; border-radius: 12px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 650; }
.nav a:hover { background: var(--surface); color: var(--ink); }
.nav a[aria-current='page'] { background: var(--brand-tint); color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand-line); }
.daily-key { margin-left: auto; }
.daily-key .short { display: none; }

/* Keys */
.key {
    --k: var(--bq-game);
    --kl: var(--bq-game-shadow);
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 52px; padding: 12px 22px; border: 0; border-radius: 14px;
    background: var(--k); color: #fff; box-shadow: 0 4px 0 var(--kl);
    font: 700 15px/1.2 var(--body); text-decoration: none; cursor: pointer;
    transition: transform 80ms var(--ease), box-shadow 80ms var(--ease), filter 140ms;
}
.key:hover { filter: brightness(1.07); }
.key:active { transform: translateY(4px); box-shadow: 0 0 0 var(--kl); }
.key:focus-visible { outline-color: var(--bq-game); }
.key-lg { min-height: 60px; padding: 12px 28px; font-size: 17px; }
.key-ink { --k: var(--ink); --kl: #000; }
.key-outline { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--key-ledge), 0 4px 0 var(--key-ledge); }
.key-outline:active { box-shadow: inset 0 0 0 2px var(--key-ledge), 0 0 0 var(--key-ledge); }
.key svg { width: 20px; height: 20px; flex: none; }
.keys { display: flex; flex-wrap: wrap; gap: 12px; }

/* Home hero */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 32px 56px; align-items: center; padding: 56px 0 48px; }
.hero h1 { font-size: clamp(44px, 4.6vw, 66px); }
.hero h1 span { display: block; color: var(--brand); }
.hero p { font-size: 18px; color: var(--muted); max-width: 32ch; margin: 20px 0 28px; }
.hero .note { font-size: 15px; margin: 20px 0 0; }

.sheet { background: var(--surface); border-radius: 28px; padding: 24px; }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.sheet-head h2 { font-size: 20px; }
.sheet-head span { color: var(--muted); font-size: 13px; font-weight: 650; }
.stickers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.sticker, .slot { aspect-ratio: 1; border-radius: 18px; display: grid; place-items: center; }
.sticker { background: #fff; box-shadow: 0 10px 22px -16px rgb(146 48 9 / .55); animation: peel .6s var(--ease) both; }
.sticker:nth-child(odd) { transform: rotate(-3deg); }
.sticker:nth-child(even) { transform: rotate(2.5deg); }
.sticker img { width: 64%; height: 64%; object-fit: contain; }
.slot { border: 2px dashed #c8d1c9; color: #8a948c; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
@keyframes peel { from { translate: 0 8px; scale: .92; } }

.meter { height: 14px; border-radius: 999px; background: #fff; box-shadow: inset 0 2px 0 rgb(18 22 20 / .06); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--gold); border-radius: inherit; }
.meter-row { display: flex; align-items: center; gap: 14px; margin-top: 18px; font-size: 13px; font-weight: 650; color: var(--muted); }
.meter-row .meter { flex: 1; }

/* Daily band */
.band { background: var(--bq-game-soft); border: 1px solid var(--bq-game-line); border-radius: 24px; padding: 28px; }
.daily-band { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; margin-bottom: 56px; view-transition-name: bq-game-daily; }
.cal { width: 72px; border-radius: 14px; background: #fff; overflow: hidden; text-align: center; box-shadow: 0 0 0 1px var(--bq-game-line); }
.cal b { display: block; background: var(--ink); color: #fff; font-size: 12px; padding: 4px 0; font-weight: 700; }
.cal span { display: block; font: 800 30px/1.3 var(--display); }
.daily-band h2 { font-size: 30px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.daily-band p { margin: 6px 0 12px; color: var(--muted); }
.squares { display: flex; gap: 6px; flex-wrap: wrap; }
.squares i { width: 22px; height: 22px; border-radius: 6px; background: #fff; box-shadow: inset 0 0 0 2px var(--bq-game-line); }
.squares i.ok { background: var(--success); box-shadow: none; }
.squares i.no { background: var(--danger); box-shadow: none; }
.streak { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: #fff; font: 700 13px/1.4 var(--body); letter-spacing: 0; }

/* Sections */
.section { margin: 0 0 56px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head h2 { font-size: 38px; }
.section-head p { margin: 6px 0 0; color: var(--muted); }

/* Game tiles */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile {
    position: relative; display: flex; flex-direction: column; gap: 14px; min-height: 212px; padding: 20px;
    background: var(--bq-game-soft); border: 1px solid var(--bq-game-line); border-radius: 24px; text-decoration: none;
    transition: transform 140ms var(--ease), box-shadow 140ms var(--ease);
}
.tile.big { grid-column: span 2; grid-row: span 2; }
@media (hover: hover) { .tile:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -18px rgb(18 22 20 / .45); } }
.tile:active { transform: translateY(1px); box-shadow: none; }
.tile:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 24px; }
.chip { width: 48px; height: 48px; border-radius: 14px; background: var(--bq-game); color: #fff; display: grid; place-items: center; flex: none; }
.chip svg { width: 26px; height: 26px; }
.tile h3 { font-size: 23px; }
.tile p { margin: -6px 0 0; color: var(--muted); font-size: 14px; }
.tile .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pill { display: inline-flex; padding: 6px 12px; border-radius: 999px; background: rgb(255 255 255 / .7); font-size: 12px; font-weight: 700; white-space: nowrap; }
.play { width: 40px; height: 40px; border-radius: 50%; background: var(--bq-game); color: #fff; display: grid; place-items: center; }
.play svg { width: 18px; height: 18px; }
.tile-crests { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: auto 0 8px; }
.tile-crests span { aspect-ratio: 1; background: #fff; border-radius: 18px; display: grid; place-items: center; }
.tile-crests img { width: 66%; height: 66%; object-fit: contain; }

/* Chapters */
.chapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.chapter { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 24px; background: var(--surface); text-decoration: none; border: 1px solid transparent; transition: transform 140ms var(--ease), box-shadow 140ms var(--ease); }
@media (hover: hover) { .chapter:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -18px rgb(18 22 20 / .45); } }
.chapter:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 24px; }
.stack { display: flex; margin-bottom: 10px; }
.stack span { width: 52px; height: 52px; border-radius: 14px; background: #fff; display: grid; place-items: center; box-shadow: 0 0 0 3px var(--surface); }
.stack span + span { margin-left: -12px; }
.stack img { width: 70%; height: 70%; object-fit: contain; }
.chapter h3 { font-size: 20px; }
.chapter p { margin: 0; color: var(--muted); font-size: 14px; }
.chapter .count { margin-top: 8px; font-size: 13px; font-weight: 700; }

/* Prose pages */
.prose { max-width: 720px; padding: 56px 0; }
.prose h1 { font-size: 48px; margin-bottom: 20px; }
.prose h2 { font-size: 26px; margin: 32px 0 10px; }
.prose p, .prose li { color: #2c322e; font-size: 17px; }

/* Footer */
.foot-site { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.foot-site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.foot-site nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-site a { text-decoration: none; }
.foot-site a:hover { color: var(--ink); text-decoration: underline; }

/* Game page */
.game { padding-top: 8px; padding-bottom: 160px; }
.setup { display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; align-items: center; margin-top: 32px; }
.setup h1 { font-size: clamp(36px, 4vw, 52px); }
.setup p { color: var(--muted); font-size: 17px; margin: 12px 0 24px; max-width: 46ch; }
.setup .sample { display: grid; grid-template-columns: repeat(3, 96px); gap: 12px; }
.setup .sample span { aspect-ratio: 1; border-radius: 18px; background: #fff; display: grid; place-items: center; box-shadow: 0 0 0 1px var(--bq-game-line); }
.setup .sample img { width: 66%; height: 66%; object-fit: contain; }
.pools { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.pools a { display: inline-flex; min-height: 44px; align-items: center; padding: 8px 14px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); text-decoration: none; font-size: 14px; font-weight: 650; }
.pools a[aria-current='true'] { box-shadow: inset 0 0 0 2px var(--bq-game); background: var(--bq-game-tint); }
.pools a:hover { background: var(--bq-game-tint); }

.bar { position: sticky; top: 72px; z-index: 20; background: #fff; display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.bar h1 { font-size: 18px; letter-spacing: -0.01em; margin-right: auto; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--muted); text-decoration: none; background: none; border: 0; cursor: pointer; }
.icon-btn:hover { background: var(--surface); color: var(--ink); }
.icon-btn svg { width: 22px; height: 22px; }
.toggle { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 12px; border: 2px solid var(--line); background: #fff; color: var(--ink); font: 700 13px/1 var(--body); cursor: pointer; }
.toggle[aria-pressed='true'] { border-color: var(--bq-game); background: var(--bq-game-tint); }
.toggle svg { width: 16px; height: 16px; }

.status { display: flex; align-items: center; gap: 10px; margin: 4px 0 20px; flex-wrap: wrap; }
.status .s { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--line); background: #fff; font: 700 22px/1 var(--body); font-variant-numeric: tabular-nums; }
.status .s svg { width: 20px; height: 20px; color: var(--muted); }
.status .s.hot { background: #fff1e6; border-color: #fbd3b4; }
.status .s.hot svg { color: #c2410c; }
.status .right { margin-left: auto; }
.hearts svg { color: var(--danger) !important; }
.hearts svg.lost { color: var(--line) !important; }
.hearts svg.pulse { animation: pulse .5s var(--ease); }
@keyframes pulse { 50% { scale: 1.35; } }
.segments { display: flex; gap: 6px; margin-bottom: 20px; }
.segments i { flex: 1; height: 12px; border-radius: 999px; background: var(--line); }
.segments i.ok { background: var(--success); }
.segments i.no { background: var(--danger); }
.track { height: 16px; border-radius: 999px; background: var(--surface); overflow: hidden; margin-bottom: 20px; }
.track i { display: block; height: 100%; background: var(--bq-game); border-radius: inherit; transition: width 200ms linear; }

.board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; animation: slide-in 280ms var(--ease); }
@keyframes slide-in { from { translate: 20px 0; } }
.stage { aspect-ratio: 1; max-height: 420px; width: 100%; border-radius: 24px; border: 2px solid var(--line); background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; transition: box-shadow 200ms; }
.stage img { width: 62%; height: 62%; min-height: 0; object-fit: contain; }
.stage.won { box-shadow: 0 0 0 4px var(--success-surface); border-color: var(--success); }
.stage.won img { animation: press .55s var(--ease); }
.stage.lost { box-shadow: 0 0 0 4px var(--danger-surface); border-color: var(--danger); }
.stage figcaption { text-align: center; font-size: 13px; color: var(--muted); font-weight: 600; }
@keyframes press { 40% { scale: .9; rotate: -4deg; } 70% { scale: 1.06; rotate: 2deg; } }
.ask h2 { font-size: 22px; margin-bottom: 16px; }
.answers { display: grid; gap: 12px; }
.answer {
    display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 16px; width: 100%;
    border: 2px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 4px 0 var(--line);
    font: 700 17px/1.25 var(--body); color: var(--ink); text-align: left; cursor: pointer;
    transition: transform 80ms var(--ease), box-shadow 80ms var(--ease), opacity 200ms;
}
.answer kbd { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface); color: var(--muted); font: 700 13px/1 var(--body); }
@media (hover: hover) { .answer:not(:disabled):hover { border-color: var(--bq-game); box-shadow: 0 4px 0 var(--bq-game); background: var(--bq-game-tint); } }
.answer:not(:disabled):active { transform: translateY(4px); box-shadow: 0 0 0 var(--line); }
.answer:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.answer:disabled { cursor: default; opacity: .55; }
.answer.correct { opacity: 1; background: var(--success-surface); border-color: var(--success); box-shadow: 0 4px 0 var(--success); color: var(--success-ink); animation: pop .35s var(--ease); }
.answer.correct kbd { background: var(--success-ink); color: #fff; }
.answer.wrong { opacity: 1; background: var(--danger-surface); border-color: var(--danger); box-shadow: 0 4px 0 var(--danger); color: var(--danger-ink); animation: shake .4s; }
.answer.wrong kbd { background: var(--danger-strong); color: #fff; }
@keyframes pop { 50% { scale: 1.025; } }
@keyframes shake { 20%, 60% { translate: -6px 0; } 40%, 80% { translate: 6px 0; } }
.answer .flag { width: 54px; height: 36px; border-radius: 6px; background: var(--surface); flex: none; display: grid; place-items: center; overflow: hidden; }
.answer .flag img { width: 100%; height: 100%; object-fit: contain; outline: 1px solid rgb(18 22 20 / .1); outline-offset: -1px; }
.flags-grid { grid-template-columns: 1fr 1fr; }
.flags-grid .answer { flex-direction: column; justify-content: center; padding: 12px; gap: 8px; position: relative; text-align: center; }
.flags-grid .answer .flag { width: 100%; height: auto; aspect-ratio: 3 / 2; border-radius: 10px; }
.flags-grid .answer kbd { position: absolute; top: 10px; left: 10px; }
.flags-grid .answer .nm { min-height: 1.25em; font-size: 15px; }
.hint { margin-top: 14px; font-size: 13px; color: var(--muted); }

.versus { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; animation: slide-in 280ms var(--ease); }
.versus h2 { grid-column: 1 / -1; font-size: 26px; text-align: center; margin-bottom: 4px; }
.vs-card { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 16px; border: 2px solid var(--line); border-radius: 24px; background: #fff; box-shadow: 0 4px 0 var(--line); cursor: pointer; font: inherit; color: inherit; text-align: center; transition: transform 80ms var(--ease), box-shadow 80ms var(--ease); }
.vs-card img { width: 140px; height: 140px; object-fit: contain; }
.vs-card b { font: 800 22px/1.15 var(--display); letter-spacing: -0.02em; }
.vs-card .meta { color: var(--muted); font-size: 14px; }
.vs-card .yr { font: 800 34px/1 var(--display); min-height: 34px; font-variant-numeric: tabular-nums; }
@media (hover: hover) { .vs-card:not(:disabled):hover { border-color: var(--bq-game); box-shadow: 0 4px 0 var(--bq-game); background: var(--bq-game-tint); } }
.vs-card:not(:disabled):active { transform: translateY(4px); box-shadow: 0 0 0 var(--line); }
.vs-card:disabled { cursor: default; }
.vs-card.correct { background: var(--success-surface); border-color: var(--success); box-shadow: 0 4px 0 var(--success); }
.vs-card.wrong { background: var(--danger-surface); border-color: var(--danger); box-shadow: 0 4px 0 var(--danger); }

/* Feedback sheet */
.sheet-fb { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; border-top: 2px solid; box-shadow: 0 -10px 30px rgb(19 28 46 / .1); animation: up 260ms var(--ease); view-transition-name: bq-sheet; }
.sheet-fb.ok { background: var(--success-surface); color: var(--success-ink); border-color: var(--success); }
.sheet-fb.no { background: var(--danger-surface); color: var(--danger-ink); border-color: var(--danger); }
.sheet-fb .wrap { display: flex; align-items: center; gap: 16px; padding-top: 20px; padding-bottom: 24px; }
.sheet-fb .ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: currentColor; flex: none; }
.sheet-fb .ico svg { width: 22px; height: 22px; color: #fff; }
.sheet-fb .txt { flex: 1; min-width: 0; }
.sheet-fb strong { display: block; font: 800 22px/1.2 var(--display); }
.sheet-fb .txt span { font-weight: 600; }
.sheet-fb .key { min-width: 200px; --k: var(--success-ink); --kl: #08471e; }
.sheet-fb.no .key { --k: var(--danger-strong); --kl: #8c1519; }
.sheet-fb .auto { position: absolute; top: 0; left: 0; height: 4px; background: currentColor; opacity: .4; animation: grow 2s linear forwards; }
@keyframes grow { from { width: 0; } to { width: 100%; } }
@keyframes up { from { translate: 0 100%; } }

/* Finish */
.finish { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin-top: 24px; align-items: start; }
.score-card { text-align: center; padding: 32px; }
.score-card h1 { font-size: 30px; }
.score-card .big { font: 700 96px/1 var(--display); font-variant-numeric: tabular-nums; margin: 16px 0 4px; animation: settle .7s var(--ease); }
.score-card .sub { color: var(--muted); font-weight: 650; }
.score-card .squares { justify-content: center; margin: 20px 0; }
.score-card .squares i { animation: peel .4s var(--ease) both; }
.score-card .keys { justify-content: center; }
@keyframes settle { from { scale: .6; } 70% { scale: 1.06; } }
.review h2 { font-size: 23px; margin-bottom: 14px; }
.review ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.review li { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 16px; }
.review li img { width: 44px; height: 44px; object-fit: contain; flex: none; }
.review li b { display: block; }
.review li span { color: var(--muted); font-size: 14px; }
.review .ok-all { color: var(--muted); }
.copied { font-size: 14px; color: var(--success-ink); font-weight: 650; min-height: 21px; margin-top: 10px; }

/* Album page */
.album-head { display: grid; grid-template-columns: 1fr minmax(240px, 360px); gap: 24px; align-items: center; margin: 32px 0; }
.album-head h1 { font-size: 48px; }
.album-head p { color: var(--muted); margin: 10px 0 0; }
.album-chapter { margin-bottom: 40px; }
.album-chapter h2 { font-size: 24px; display: flex; gap: 12px; align-items: baseline; margin-bottom: 14px; }
.album-chapter h2 span { font: 700 14px/1 var(--body); color: var(--muted); letter-spacing: 0; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.album-grid .cell { aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; }
.album-grid .got { background: #fff; border: 2px solid var(--line); }
.album-grid .got img { width: 66%; height: 66%; object-fit: contain; }
.album-grid .empty { border: 2px dashed var(--bq-game-line); color: #b3a79f; font-size: 12px; font-weight: 700; }

.loading { padding: 80px 0; text-align: center; color: var(--muted); }

@media (max-width: 1100px) {
    .bento { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; padding: 32px 0; }
    .stickers .sticker:nth-child(n+9), .stickers .slot:nth-child(n+9) { display: none; }
    .daily-band { grid-template-columns: auto 1fr; }
    .daily-band .key { grid-column: 1 / -1; }
    .board, .finish, .setup, .album-head { grid-template-columns: 1fr; }
    .stage { max-height: 300px; aspect-ratio: auto; height: 260px; }
    .setup .sample { grid-template-columns: repeat(3, 76px); }
}

@media (max-width: 700px) {
    .wrap { padding: 0 16px; }
    .bq-header { backdrop-filter: none; background: #fff; }
    .bq-header .wrap { height: 64px; gap: 8px; }
    .brand { font-size: 20px; }
    .brand img { width: 34px; height: 34px; }
    .nav { order: 3; position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); justify-content: space-around; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); z-index: 30; }
    .playing .nav { display: none; }
    body:not(.playing) { padding-bottom: 64px; }
    .nav a { min-height: 44px; display: flex; align-items: center; }
    .daily-key { min-height: 44px; padding: 8px 16px; }
    .daily-key .long, .daily-key svg { display: none; }
    .daily-key .short { display: inline; }
    .bar { top: 64px; }
    .bar .toggle span { display: none; }
    .band { padding: 20px; border-radius: 18px; }
    .bento { grid-template-columns: 1fr 1fr; gap: 12px; }
    .tile { min-height: 150px; border-radius: 18px; padding: 16px; }
    .tile.big { grid-column: 1 / -1; grid-row: auto; }
    .tile .chip { width: 40px; height: 40px; }
    .tile h3 { font-size: 20px; }
    .tile p, .tile .play { display: none; }
    .tile.big p { display: block; }
    .chapters { grid-auto-flow: column; grid-auto-columns: 78%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
    .chapter { scroll-snap-align: start; }
    .section-head h2 { font-size: 30px; }
    .sheet { border-radius: 22px; padding: 18px; }
    .stickers { gap: 10px; }
    .sticker, .slot { border-radius: 14px; }
    .answer { min-height: 56px; }
    .answer kbd { display: none; }
    .stage { height: 210px; border-radius: 18px; gap: 8px; }
    .stage img { width: 140px; height: 140px; }
    .ask h2 { font-size: 20px; margin-bottom: 12px; }
    .board { gap: 16px; }
    .vs-card { padding: 16px 10px; border-radius: 18px; }
    .vs-card img { width: 88px; height: 88px; }
    .vs-card b { font-size: 17px; }
    .vs-card .yr { font-size: 26px; }
    .sheet-fb .wrap { flex-wrap: wrap; }
    .sheet-fb .key { width: 100%; }
    .sheet-fb { border-radius: 20px 20px 0 0; }
    .status .s { font-size: 19px; }
    .album-head h1, .prose h1 { font-size: 38px; }
    .score-card .big { font-size: 80px; }
}

@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .sticker:nth-child(n) { transform: none; }
    .sheet-fb .auto { display: none; }
}
