/* Real UI and engine stages; concept images are never runtime backgrounds. */
#main-menu canvas,#main-menu img,#ball-library-screen canvas,#ball-library-screen img,#roguelike-run-screen canvas,#roguelike-run-screen img { image-rendering:auto; }
#main-menu { display:block; padding:clamp(14px,3vw,44px); overflow:hidden; background:radial-gradient(ellipse at 73% 58%,#3c264b 0%,#21162e 45%,#100b1b 85%); }
#main-menu.hidden,#roguelike-run-screen.hidden,.title-legacy { display:none!important; }
#main-menu>.pinfall-bg-scene { display:none; }
.title-shell { position:relative; display:grid; grid-template-columns:minmax(300px,.85fr) minmax(0,1.15fr); grid-template-rows:auto minmax(0,1fr) auto auto; gap:16px 30px; width:min(1500px,100%); height:100%; margin:auto; font-family:'VT323',monospace; color:#f1dfc1; }
.title-shell::before { content:''; position:absolute; inset:0; z-index:1; pointer-events:none; background:linear-gradient(90deg,#171020f2 0%,#21162ed9 35%,#25193266 54%,transparent 68%); }
.title-lockup { grid-column:1; grid-row:1; z-index:2; }
.title-lockup h1 { margin:0; font-family:'Press Start 2P',monospace; font-size:clamp(44px,5vw,90px); line-height:1.15; letter-spacing:-.05em; color:#f1dfc1; text-shadow:4px 5px #0d0815; }
.title-lockup h1 span { color:#bd8cdd; }
.title-lockup p { margin:10px 0 0; padding-top:8px; border-top:1px solid #8e668f; color:#f1c77b; letter-spacing:.34em; font-size:clamp(16px,1.8vw,25px); }
.title-actions { display:grid; grid-column:1; grid-row:2; align-content:center; gap:12px; z-index:2; }
.title-actions button { display:flex; align-items:center; gap:20px; min-height:64px; padding:12px 24px; border:2px solid #b18ac1; background:linear-gradient(115deg,#21162eeb,#21162e88); color:#d4b6e6; text-align:left; font:bold clamp(23px,2.4vw,34px)/1.1 'VT323',monospace; letter-spacing:.06em; box-shadow:0 4px #0d0816; cursor:pointer; }
.title-actions button>span { width:32px; text-align:center; font:28px monospace; }
.title-actions button>b { margin-left:auto; }
.title-actions .title-play { color:#211127; background:linear-gradient(120deg,#d5b0ee,#af7cce); border-color:#f1d998; outline:1px solid #f1d998; outline-offset:5px; }
.title-actions button:disabled { opacity:.5; cursor:wait; }
.title-actions button:focus-visible,.title-secondary button:focus-visible,.title-bag-strip button:focus-visible,.title-modal button:focus-visible { outline:3px solid #ffe6a5; outline-offset:4px; }
.title-ball-stage { position:relative; grid-column:1/-1; grid-row:1/4; z-index:0; min-width:0; min-height:0; align-self:stretch; isolation:isolate; }
.title-fallback { position:absolute; inset:0 0 0 46%; }
.title-fallback>[data-engine-fallback] { position:absolute; bottom:13%; left:0; width:64%; height:66%; object-fit:contain; z-index:1; }
.title-fallback>[data-engine-fallback]+[data-engine-fallback] { left:auto; right:0; bottom:25%; width:37%; height:44%; z-index:0; }
.menu-engine-canvas { position:absolute; inset:0; width:100%; height:100%; display:block; pointer-events:none; z-index:3; }
.title-ball-stage .menu-engine-canvas { -webkit-mask-image:linear-gradient(to bottom,transparent 0%,#000 10%,#000 78%,transparent 100%),linear-gradient(to right,transparent 0%,#000 8%,#000 90%,transparent 100%); mask-image:linear-gradient(to bottom,transparent 0%,#000 10%,#000 78%,transparent 100%),linear-gradient(to right,transparent 0%,#000 8%,#000 90%,transparent 100%); -webkit-mask-composite:source-in; mask-composite:intersect; }
[data-engine-fallback][hidden] { display:none!important; }
.title-secondary { position:relative; z-index:2; grid-column:1; grid-row:3; display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.title-secondary button { min-height:38px; padding:5px 14px; border:1px solid #8a6a99; background:#20152e; color:#e9d4f2; font:18px 'VT323',monospace; cursor:pointer; }
.title-secondary small { margin-left:auto; color:#a18ba9; font-size:14px; }
.title-bag-strip { position:relative; z-index:2; grid-column:1/-1; display:grid; grid-template-columns:120px minmax(0,1fr) minmax(0,1fr) minmax(180px,1fr); gap:12px; align-items:center; padding:12px 18px; border:1px solid #8b6b92; background:#191120e8; min-height:84px; }
.title-bag-strip>b { font-size:23px; }
.title-bag-strip button { display:flex; align-items:center; gap:12px; min-height:58px; min-width:0; padding:3px 12px; background:#241a30; border:1px solid #8d719c; color:#f1dfc1; font:22px 'VT323',monospace; cursor:pointer; }
.title-bag-strip button img,.title-bag-strip button canvas { width:56px; height:56px; object-fit:contain; }
.title-bag-strip button>span { color:#efc981; font-size:17px; }
.title-bag-strip button[data-title-goal] { flex-direction:column; align-items:flex-start; gap:2px; border:0; background:transparent; }
.title-bag-strip button[data-title-goal]>span { font-size:14px; letter-spacing:.1em; }
.title-modal { position:absolute; inset:0; z-index:90; display:grid; place-items:center; padding:20px; background:#0c0817e8; font-family:'VT323',monospace; }
.title-modal[hidden] { display:none!important; }
.title-modal-shell { width:min(620px,100%); max-height:100%; overflow:auto; padding:24px; border:2px solid #ba97cd; background:#21182e; color:#f1dfc1; }
.title-modal-shell header { display:flex; justify-content:space-between; gap:20px; align-items:center; margin-bottom:20px; }
.title-modal-shell h2 { margin:0; font:36px 'VT323',monospace; }
.title-modal button { min-height:44px; padding:8px 16px; background:#513563; color:#f1dfc1; border:1px solid #bc98cf; font:20px 'VT323',monospace; cursor:pointer; }
.title-modal label { display:flex; flex-direction:column; gap:10px; font-size:22px; margin:18px 0; }
.title-modal input { width:100%; min-height:40px; accent-color:#b98ddd; }
.title-modal .title-option { flex-direction:row; align-items:center; font-size:19px; }
.title-modal .title-option input { width:22px; min-height:32px; margin:0; }
#ball-library-screen { position:fixed; inset:0; z-index:76; padding:max(16px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left)); background:radial-gradient(ellipse at 24% 40%,#3d294c,#21172e 55%,#130e1d); color:#f1dfc1; font-family:'VT323',monospace; overflow:hidden; }
#ball-library-screen[hidden] { display:none!important; }
#ball-library-screen,#ball-library-screen * { box-sizing:border-box; }
.collection-shell { display:grid; grid-template-rows:auto auto minmax(0,1fr) auto; gap:14px; width:min(1480px,100%); height:100%; margin:auto; }
.collection-header { display:flex; justify-content:space-between; align-items:center; gap:16px; padding-bottom:12px; border-bottom:1px solid #8d758455; }
.collection-header>div>span { color:#e7bc79; font-size:13px; letter-spacing:.16em; }
.collection-header h2 { margin:5px 0 0; font:48px/.95 'VT323',monospace; letter-spacing:.03em; color:#f1dfc1; }
.collection-header h2 span { color:#bf91e1; }
.collection-back { min-height:44px; padding:10px 18px; border:1px solid #b68dc6; color:#eddaef; background:#291c37; font:19px 'VT323',monospace; cursor:pointer; }
.collection-back>b { margin-left:18px; color:#efca85; }
.collection-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.collection-tabs button { display:flex; align-items:baseline; justify-content:center; gap:12px; min-height:48px; padding:8px; border:1px solid #8a6b98; background:#21172c; color:#bda2ca; font:24px/1 'VT323',monospace; cursor:pointer; }
.collection-tabs button[aria-selected=true] { color:#23152e; border-color:#f0cf90; background:#c39ae1; box-shadow:0 3px #876698; }
.collection-tabs small { font:13px/1 'VT323',monospace; }
.collection-stage { display:grid; grid-template-columns:minmax(260px,.8fr) minmax(0,1.2fr); gap:28px; min-height:0; min-width:0; }
.collection-hero { position:relative; display:grid; grid-template-rows:auto minmax(0,1fr) auto; min-height:0; min-width:0; padding:16px 20px; background:radial-gradient(ellipse at 45% 32%,#493154,#21172e 68%); border:1px solid #a27bb1; border-bottom:4px solid #8f6b9d; }
.collection-kind { font-size:13px; color:#d7b987; letter-spacing:.14em; }
.collection-hero-art { position:relative; display:grid; place-items:center; min-height:0; min-width:0; overflow:hidden; }
.collection-hero-art>[data-engine-fallback],.collection-hero-art>.collection-tier-art { position:absolute; inset:8px; width:calc(100% - 16px); height:calc(100% - 16px); max-width:none; max-height:none; object-fit:contain; filter:drop-shadow(0 8px 8px #0007); }
.collection-tier-art { width:110px; height:125px; color:#edc380; }
.collection-tier-art[data-tier=after_hours] { color:#c5a4f1; }
.collection-tier-art[data-tier=no_mercy] { color:#fb9a9c; }
.tier-shield { fill:#191322; stroke:currentColor; stroke-width:2; }
.tier-crown { fill:currentColor; }
.tier-crown-base { stroke:currentColor; stroke-width:3; }
.collection-tier-art text { fill:currentColor; font:36px 'VT323',monospace; }
.tier-stars { fill:currentColor; }
.collection-hero-copy { position:relative; min-width:0; padding-top:6px; }
.collection-ownership { color:#cfaccf; font-size:13px; letter-spacing:.1em; }
.collection-ownership.is-owned { color:#75e5ce; }
.collection-ownership.is-locked { color:#e9bb82; }
.collection-hero-copy h3 { margin:4px 0; color:#f1dfc1; font:clamp(26px,3vw,40px)/.95 'VT323',monospace; text-transform:uppercase; overflow-wrap:anywhere; }
.collection-hero-copy p { margin:6px 0 10px; font:18px/1.1 'VT323',monospace; color:#dfcbe5; }
.collection-hero-copy>small { display:block; margin-top:7px; color:#bda7c6; font-size:14px; line-height:1.15; }
.collection-hero-copy>.collection-unlock { color:#edc087; }
.collection-equip { display:flex; align-items:center; justify-content:space-between; width:100%; min-height:48px; padding:10px 16px; border:1px solid #efd496; background:#bb91d7; color:#22132b; font:23px/1 'VT323',monospace; cursor:pointer; }
.collection-equip:disabled { background:#35263f; border-color:#76607e; color:#aa8db6; cursor:default; }
.collection-rack { display:grid; grid-template-rows:auto minmax(0,1fr); min-height:0; min-width:0; }
.collection-rack-heading { display:flex; justify-content:space-between; align-items:baseline; gap:12px; padding:4px 4px 12px; }
.collection-rack-heading b { color:#edc785; font-size:20px; font-weight:400; }
.collection-rack-heading span { color:#b69ac5; font-size:13px; text-align:right; }
.collection-card-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); grid-auto-rows:minmax(184px,1fr); gap:12px; min-height:0; overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable; scroll-padding-block:14px; padding:3px 7px 20px 3px; align-content:start; }
.collection-card { position:relative; display:grid; grid-template-rows:minmax(0,1fr) auto; gap:8px; min-width:0; min-height:184px; padding:12px; border:1px solid #84658f; border-bottom:3px solid #6a5074; background:linear-gradient(145deg,#352640,#21172e); color:#f1dfc1; text-align:center; cursor:pointer; }
.collection-card[aria-pressed=true] { border-color:#f4d28c; outline:2px solid #b58cd5; outline-offset:1px; background:radial-gradient(ellipse at 50% 35%,#55405f,#2b2039 80%); }
.collection-card.is-locked { background:linear-gradient(145deg,#2d2238,#1b1426); }
.collection-card-number { position:absolute; left:10px; top:8px; color:#ae8ebb; font-size:13px; }
.collection-card-art { position:relative; display:grid; place-items:center; min-height:0; overflow:hidden; }
.collection-card-art img,.collection-card-art canvas { position:absolute; inset:0; margin:auto; width:100%; height:100%; max-width:140px; object-fit:contain; }
.collection-card-copy b { display:block; color:#e9d8ec; font:20px/1 'VT323',monospace; }
.collection-card-copy small { display:block; margin-top:6px; color:#e4bb84; font-size:13px; }
.collection-card.is-owned .collection-card-copy small { color:#7fddca; }
.collection-footer { display:grid; grid-template-columns:100px minmax(0,1fr) 230px; gap:16px; align-items:center; position:relative; border-top:1px solid #9e7ca766; padding:10px 0 0; min-height:76px; }
.collection-bag-label { font-size:22px; color:#e9d5b9; }
.collection-bag-label small { display:block; color:#aa91b5; font-size:11px; margin-top:3px; }
.collection-bag { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.collection-bag-slot { display:flex; align-items:center; gap:8px; min-height:64px; padding:4px 10px; border:1px solid #80618d; background:#241a30; text-align:left; color:#eed9e9; cursor:pointer; }
.collection-bag-slot[aria-pressed=true] { border-color:#e3ca87; background:#3c2948; }
.collection-bag-slot img,.collection-bag-slot canvas { width:52px; height:52px; object-fit:contain; }
.collection-bag-slot b { display:block; font:20px 'VT323',monospace; }
.collection-bag-slot small { color:#bfa4cc; font:13px 'VT323',monospace; }
.collection-footer-hint { text-align:right; }
.collection-footer-hint b { display:block; color:#cfb0df; font-size:18px; }
.collection-footer-hint span { display:block; color:#a88eb4; margin-top:4px; font-size:13px; }
.collection-status { position:absolute; right:0; bottom:100%; padding-bottom:3px; color:#7fe5cf; font-size:14px; }
#ball-library-screen button { touch-action:manipulation; }
#ball-library-screen button:focus-visible { outline:3px solid #fff0b8; outline-offset:3px; }
/* Play is a full-width two-ball confirmation, not a collection sidebar. */
#roguelike-run-screen { display:block; position:fixed; inset:0; height:100dvh; padding:max(12px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left)); }
#roguelike-run-screen .equipment-shell { width:min(1320px,100%); height:100%; display:grid; grid-template-rows:auto minmax(0,1fr) auto auto; gap:12px; }
#roguelike-run-screen .equipment-header { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:18px; align-items:center; padding-bottom:10px; }
#roguelike-run-screen .equipment-header h2 { font-size:clamp(30px,4vw,50px); }
.ready-kit { display:flex; gap:8px; align-items:center; }
.ready-kit button { display:flex; align-items:center; gap:4px; min-height:40px; padding:5px 9px; border:1px solid #94739e; background:#241a30; color:#dcc4e5; font:15px 'VT323',monospace; }
#roguelike-run-screen .ready-kit #selected-relic-art { display:block; width:24px; height:24px; }
#selected-relic-art svg { width:100%; height:100%; }
#roguelike-run-screen .equipment-body { display:block; min-height:0; min-width:0; }
#roguelike-run-screen .equipment-stage { position:relative; display:grid; grid-template-rows:auto minmax(0,1fr) auto; gap:8px; height:100%; overflow:hidden; padding:0; }
.ready-bag-heading { display:flex; justify-content:space-between; gap:10px; color:#ddb77a; font-size:14px; letter-spacing:.06em; }
.ready-bag-heading span { color:#bca1ca; font-size:13px; text-align:right; }
.ready-bag-cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; min-height:0; }
.ready-ball { display:grid; grid-template-rows:auto minmax(0,1fr) auto; min-height:0; min-width:0; padding:12px 18px; border:2px solid #9872a7; background:radial-gradient(ellipse at 40% 45%,#3d2d48,#21182d 75%); color:#f1dfc1; text-align:left; cursor:pointer; }
.ready-ball:first-child { border-color:#5dcce7; box-shadow:inset 0 0 0 2px #3a344c; }
.ready-ball-top { display:flex; justify-content:space-between; gap:8px; color:#c5accd; font:14px 'VT323',monospace; }
.ready-ball-top b { font-weight:400; color:#e8c783; }
.ready-ball-art { position:relative; display:grid; place-items:center; min-height:0; min-width:0; }
.ready-ball-art>img,.ready-ball-art>canvas[data-engine-fallback] { position:absolute; inset:8% 12% 16%; width:76%; height:76%; max-width:100%; max-height:100%; object-fit:contain; }
.ready-ball-name { display:flex; justify-content:space-between; align-items:baseline; gap:10px; }
.ready-ball-name b { color:#f1dfc1; font:clamp(24px,3vw,38px) 'VT323',monospace; text-transform:uppercase; }
.ready-ball-name small { padding:4px 8px; border:1px solid #8c6a9b; color:#d5b5e6; font:15px 'VT323',monospace; }
.ready-bag-note { margin:0; text-align:center; color:#b39abc; font-size:13px; }
#roguelike-run-screen #progression-setup { padding:0; margin:0; background:transparent; border:0; min-height:0; }
.quick-circuit-heading { display:flex; justify-content:space-between; color:#d8b780; font-size:14px; margin-bottom:6px; }
.quick-circuit-heading span { color:#a98db5; }
.quick-circuit-cards { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.quick-circuit-cards button { display:flex; align-items:center; gap:12px; min-height:64px; min-width:0; padding:9px 14px; background:#261c32; border:1px solid #7f638c; color:#d3b8df; text-align:left; cursor:pointer; }
.quick-circuit-cards button[aria-pressed=true] { border-color:#e6ce8e; background:#24414a; color:#f5e0b8; }
.quick-circuit-cards button:disabled { opacity:.6; cursor:default; }
.circuit-numeral { font-size:28px; color:#cfabd7; }
.quick-circuit-cards b { display:block; font:24px/.95 'VT323',monospace; }
.quick-circuit-cards small { display:block; font:12px 'VT323',monospace; margin-top:5px; }
.quick-circuit-cards strong { margin-left:auto; font:13px 'VT323',monospace; white-space:nowrap; }
.quick-finish { display:flex; justify-content:space-between; gap:12px; width:100%; min-height:36px; margin-top:4px; padding:4px 0; background:transparent; border:0; color:#bfa3ce; font:14px 'VT323',monospace; cursor:pointer; }
.quick-finish b { color:#e5c586; font-weight:400; }
#roguelike-run-screen .equipment-footer { display:grid; grid-template-columns:100px 140px minmax(0,1fr); gap:14px; min-height:64px; padding-top:8px; }
#roguelike-run-screen .equipment-start { min-height:56px; padding:8px 20px; }
#roguelike-run-screen .equipment-start>span { font-size:29px; }
#roguelike-run-screen .equipment-start small { font-size:11px; }
@media(max-width:1000px) {
    .collection-stage { grid-template-columns:minmax(230px,.85fr) minmax(0,1.15fr); gap:16px; }
    .collection-card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .collection-footer { grid-template-columns:80px minmax(0,1fr); }
    .collection-footer-hint { display:none; }
    .title-bag-strip { grid-template-columns:80px 1fr 1fr; }
    .title-bag-strip button[data-title-goal] { display:none; }
    .title-lockup h1 { font-size:clamp(44px,6.5vw,70px); }
    .title-actions button { min-height:54px; padding:10px 16px; }
}
@media(max-width:640px) {
    #main-menu { padding:12px; }
    .title-shell { grid-template-columns:1fr; grid-template-rows:auto minmax(100px,.75fr) minmax(0,1fr) auto auto; gap:10px; }
    .title-shell::before { background:linear-gradient(to bottom,transparent 0%,transparent 32%,#17102099 48%,#171020dd 100%); }
    .title-lockup { grid-row:1; }
    .title-lockup h1 { font-size:clamp(36px,10vw,58px); }
    .title-lockup p { font-size:15px; margin-top:6px; letter-spacing:.2em; }
    .title-ball-stage { grid-column:1; grid-row:2; }
    .title-fallback { left:0; }
    .title-actions { grid-row:3; gap:7px; }
    .title-actions button { min-height:44px; padding:7px 16px; font-size:23px; }
    .title-actions button>span { font-size:19px; }
    .title-secondary { grid-row:4; }
    .title-secondary button { min-height:34px; font-size:16px; }
    .title-bag-strip { grid-row:5; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px; padding:6px; min-height:66px; }
    .title-bag-strip>b { display:none; }
    .title-bag-strip button { gap:5px; padding:2px 6px; font-size:18px; min-height:50px; }
    .title-bag-strip button img,.title-bag-strip button canvas { width:40px; height:40px; }
    .title-bag-strip button>span { font-size:13px; }
    #ball-library-screen { padding:10px; }
    .collection-shell { gap:9px; }
    .collection-header { padding-bottom:8px; }
    .collection-header h2 { font-size:33px; }
    .collection-header>div>span { font-size:10px; }
    .collection-back { padding:8px 12px; min-height:42px; font-size:16px; }
    .collection-back>b { margin-left:6px; }
    .collection-tabs { gap:5px; }
    .collection-tabs button { min-height:44px; padding:5px 2px; flex-direction:column; align-items:center; gap:3px; font-size:18px; }
    .collection-tabs small { font-size:11px; }
    .collection-stage { grid-template-columns:1fr; grid-template-rows:auto minmax(0,1fr); gap:10px; }
    .collection-hero { display:grid; grid-template-columns:130px minmax(0,1fr); grid-template-rows:auto auto; gap:0 10px; padding:10px; }
    .collection-kind { grid-column:2; font-size:10px; }
    .collection-hero-art { grid-row:1/3; grid-column:1; min-height:145px; }
    .collection-hero-copy { grid-column:2; padding-top:4px; }
    .collection-hero-copy h3 { font-size:25px; }
    .collection-hero-copy p { font-size:15px; margin:5px 0 8px; }
    .collection-hero-copy>small { font-size:11px; margin-top:5px; }
    .collection-ownership { font-size:11px; }
    .collection-equip { min-height:42px; padding:8px 9px; font-size:19px; }
    .collection-rack-heading { padding:0 2px 7px; }
    .collection-rack-heading b { font-size:16px; }
    .collection-rack-heading span { font-size:11px; }
    .collection-card-grid { gap:8px; grid-auto-rows:160px; padding-bottom:18px; }
    .collection-card { min-height:160px; padding:9px; }
    .collection-card-copy b { font-size:17px; }
    .collection-card-copy small { font-size:11px; margin-top:4px; }
    .collection-footer { grid-template-columns:minmax(0,1fr); min-height:62px; gap:0; padding-top:6px; }
    .collection-bag-label { display:none; }
    .collection-bag-slot { gap:5px; min-height:56px; padding:3px 6px; }
    .collection-bag-slot img,.collection-bag-slot canvas { width:42px; height:42px; }
    .collection-bag-slot b { font-size:17px; }
    .collection-bag-slot small { font-size:11px; }
    .collection-status { font-size:11px; background:#21172e; }
    #roguelike-run-screen { padding:10px; }
    #roguelike-run-screen .equipment-shell { gap:8px; }
    #roguelike-run-screen .equipment-shell { grid-template-rows:auto minmax(0,min(340px,44dvh)) auto auto; align-content:space-between; }
    #roguelike-run-screen .equipment-header { grid-template-columns:1fr auto; gap:6px; }
    #roguelike-run-screen .equipment-header h2 { font-size:30px; }
    .ready-kit { grid-column:1/-1; grid-row:2; justify-content:center; }
    .ready-kit button { min-height:30px; padding:3px 8px; font-size:12px; }
    #roguelike-run-screen .ready-kit #selected-relic-art { width:18px; height:18px; }
    .ready-bag-heading { font-size:11px; }
    .ready-bag-heading span { font-size:10px; max-width:48%; }
    .ready-bag-cards { gap:8px; }
    #roguelike-run-screen .ready-bag-cards { min-height:0; }
    .ready-ball { padding:8px; }
    .ready-ball-top { font-size:11px; }
    .ready-ball-top b { font-size:10px; }
    .ready-ball-name { flex-direction:column; gap:1px; align-items:flex-start; }
    .ready-ball-name b { font-size:25px; }
    .ready-ball-name small { font-size:11px; border:0; padding:0; }
    .ready-bag-note { font-size:10px; }
    .quick-circuit-heading { font-size:11px; }
    .quick-circuit-cards { gap:6px; }
    .quick-circuit-cards button { min-height:64px; padding:7px 6px; gap:5px; flex-wrap:wrap; }
    .circuit-numeral { display:none; }
    .quick-circuit-cards b { font-size:20px; }
    .quick-circuit-cards small { font-size:10px; margin-top:4px; }
    .quick-circuit-cards strong { margin-left:0; font-size:10px; }
    .quick-finish { min-height:30px; font-size:11px; gap:6px; }
    #roguelike-run-screen .equipment-footer { grid-template-columns:56px 96px minmax(0,1fr); gap:8px; min-height:54px; }
    #roguelike-run-screen .equipment-start { min-height:48px; padding:6px 10px; }
    #roguelike-run-screen .equipment-start>span { font-size:24px; }
    #roguelike-run-screen .equipment-start small { display:none; }
    #roguelike-run-screen .equipment-daily { padding:5px; min-height:48px; font-size:15px; }
    #roguelike-run-screen .equipment-daily>span { font-size:10px; }
    #roguelike-run-screen .equipment-seed>summary { font-size:10px; min-height:44px; }
}
@media(max-height:600px) and (min-width:641px) {
    #main-menu { padding:12px 24px; }
    .title-shell { gap:9px 22px; }
    .title-lockup h1 { font-size:clamp(38px,4.4vw,52px); }
    .title-lockup p { font-size:16px; margin-top:5px; }
    .title-actions { gap:7px; }
    .title-actions button { min-height:43px; padding:7px 14px; font-size:23px; }
    .title-bag-strip { min-height:64px; padding:5px 12px; }
    .title-bag-strip button { min-height:48px; }
    .title-bag-strip button img,.title-bag-strip button canvas { width:42px; height:42px; }
    #ball-library-screen { padding:8px 16px; }
    .collection-shell { gap:8px; }
    .collection-header { padding-bottom:5px; }
    .collection-header h2 { font-size:32px; }
    .collection-tabs button { min-height:37px; font-size:20px; }
    .collection-hero { padding:9px 14px; }
    .collection-hero-copy h3 { font-size:27px; }
    .collection-hero-copy p { font-size:15px; margin:4px 0 7px; }
    .collection-equip { min-height:40px; font-size:20px; }
    .collection-footer { min-height:58px; padding-top:5px; }
    .collection-bag-slot { min-height:48px; }
    .collection-bag-slot img,.collection-bag-slot canvas { width:40px; height:40px; }
    #roguelike-run-screen .equipment-shell { gap:7px; }
    .ready-bag-note { display:none; }
    .quick-circuit-cards button { min-height:48px; }
    #roguelike-run-screen .equipment-footer { min-height:50px; }
    #roguelike-run-screen .equipment-start { min-height:44px; }
}
@media(prefers-reduced-motion:reduce) { #main-menu *,#ball-library-screen *,#roguelike-run-screen * { animation:none!important; transition:none!important; } }
