/* Shared cream-paper UI. Loaded last; layout and gameplay remain module-owned. */
:root{--ui-paper:#f9f8ee;--ui-white:#fffef9;--ui-ink:#765836;--ui-muted:#96917a;--ui-line:#dfddcf;--ui-base:#b9ac9e;--ui-teal:#21b7ab;--ui-teal-dark:#148e85;--ui-red:#df6261;--ui-radius:999px}
body{font-family:"Trebuchet MS","PingFang SC","Microsoft YaHei",sans-serif;color:var(--ui-ink)}
body button.ui-control{color:var(--ui-ink)!important;background:var(--ui-paper)!important;border:2px solid var(--ui-line)!important;border-radius:var(--ui-radius)!important;box-shadow:0 4px 0 var(--ui-base),0 6px 10px #5f554510!important;font-weight:700;letter-spacing:.035em;min-height:44px;transition:background .16s,border-color .16s,box-shadow .12s,filter .12s;touch-action:manipulation}
body button.ui-control:active:not(:disabled){box-shadow:0 1px 0 var(--ui-base),inset 0 2px 3px #77604715!important;filter:brightness(.97)}
body button.ui-control:focus-visible{outline:3px solid var(--ui-teal)!important;outline-offset:4px!important}
@media(hover:hover){body button.ui-control:hover:not(:disabled){border-color:#bbb79f!important;background:#fffdf3!important}}
body button.ui-primary,#start #hm-game-start{border-color:#fffdf6!important;background:var(--ui-paper)!important;color:var(--ui-ink)!important;box-shadow:0 6px 0 var(--ui-base),0 8px 14px #64584518!important}
body button.ui-ghost{box-shadow:none!important;border-color:var(--ui-line)!important;background:#fffefaed!important;color:var(--ui-teal-dark)!important}
body button.ui-danger{color:#c35c54!important;border:2px dashed #db9c90!important;box-shadow:none!important;background:#fff9f0!important;padding:.6rem 1rem}
body button.ui-control:disabled,body button.ui-control[aria-disabled=true]{opacity:.45!important;box-shadow:none!important;filter:grayscale(.5);cursor:not-allowed}
body button.ui-control[aria-busy=true]{background:var(--ui-teal)!important;color:#fffdf0!important;border-color:#65ddd0!important;box-shadow:0 4px 0 var(--ui-teal-dark)!important}
body button.ui-control[aria-pressed=true]:not(#music),body button.ui-control.chosen,body #hud #summon[data-gathering=true],body #hud #celebrate[data-active=true]{background:#e4f6ed!important;border-color:var(--ui-teal)!important;color:#187f76!important;box-shadow:0 3px 0 #a0c7b9,0 0 0 2px #ffffff9c!important}
/* Local icon drawings are CSS backgrounds; hit targets remain the real buttons. */
[data-ui-icon]::before{content:"";display:inline-block;width:1.45rem;height:1.45rem;vertical-align:middle;background:var(--ui-icon) center/contain no-repeat;flex-shrink:0;margin-right:.42em;pointer-events:none}
/* Frame the supplied teal/gold note and charcoal slash without adding a second button rim. */
.music-off-artwork-ready [data-ui-icon="music-off"]::before{background-size:235% auto;background-position:50% 49%;border-radius:20%}
.ui-art-icon{font-size:0!important;display:inline-flex!important;align-items:center;justify-content:center;flex-shrink:0}
.ui-art-icon::before{width:1.9rem;height:1.9rem;margin:0}
body button.ui-icon-only{font-size:0!important;min-width:44px;padding:.5rem!important;line-height:1}
body button.ui-icon-only::before{width:1.6rem;height:1.6rem;margin:0}
body .home-brand-icon::before{width:1.7em;height:1.7em;font-size:1.3rem}.home-brand-icon{min-width:3.1rem;min-height:3.1rem}
#start{--home-ink:#705b40;--home-muted:#98917c}#start .welcome em{color:#29a89d}#start .welcome em::after{background:#c4e4d4}#start .home-weather,#start .home-brand-icon{background:var(--ui-paper);border:2px solid var(--ui-line);color:var(--ui-ink);box-shadow:0 3px 0 #c2b8a748}
#start #hm-game-start{border-radius:999px;padding-inline:1.5em}#start .entry-arrow{background:#f0ecdb;border:1px solid #e4ddc7}#start .entry-copy small{color:#96917a;opacity:1}#start .home-pet{border-color:#fffef6;box-shadow:0 5px 0 #bcb2a06b,0 12px 20px #67594512}#start .pet-caption h3{color:#765d40}
#hud{--park-ink:var(--ui-ink);--park-muted:var(--ui-muted);--park-paper:#faf9efd9;color:var(--ui-ink)}
#hud .brand,#hud .top-actions,#hud #view-tools,#hud #context,#hud #toast{background:#faf9eef0;border:1px solid var(--ui-line);box-shadow:0 4px 12px #554d3515}
#hud h1{color:var(--ui-ink)}#hud #album.ui-control{border:0!important;border-top:1px dashed var(--ui-line)!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;min-height:36px}#hud #album::before{width:1.1rem;height:1.1rem}
#hud .top-actions{gap:.55rem;background:#faf9eeaa;padding:.55rem;border-radius:2rem}#hud .top-actions button{padding:.45rem .8rem;min-height:44px}#hud #view-tools{border-radius:1.4rem}#hud #view-tools button{min-width:44px;min-height:44px}#hud #map>span{display:none}
#hud #celebrate>span:first-child{display:none!important}#hud #celebrate::before,#hud #summon::before{width:1.9rem;height:1.9rem;float:left;margin-right:.6rem}#hud #summon{text-align:left;min-width:10.5rem}#hud #summon b{white-space:nowrap}#hud #celebrate,#hud #summon{padding:.7rem 1rem}#hud #celebrate small,#hud #summon small{color:#96917a}
#hud #play::before{display:block;margin:0 auto .15rem;width:2rem;height:2rem}#hud .actions #play{border-width:3px!important}#hud #switch{padding:0}#hud #stick,#room-stick{background:var(--ui-paper);border:3px solid #e3dfce;box-shadow:0 4px 0 var(--ui-base)}#hud #joystick,#room-joystick{border:2px dashed #dedac1;background:#f9f8ee66;box-shadow:inset 0 0 0 .5rem #fffdf530}
body .paper,body .blind-paper,body .arcade-menu,body .run-paper{background:var(--ui-paper);color:var(--ui-ink);border:2px solid #e3dfcf;border-radius:1.8rem;box-shadow:0 10px 0 #b9ac9e44,0 20px 60px #403e3828}
body .paper h2,body .blind-head h2,body .arcade-menu h2,body .run-paper h2{color:var(--ui-ink);font-family:inherit;font-weight:800}
body #map-panel .destination{border-radius:1.2rem!important;box-shadow:0 2px 0 #c6bcab!important;margin:.7rem 0;padding:.75rem 1rem;min-height:54px}body .destination small{color:#928b78}.destination .icon::before{width:2rem;height:2rem}body .destination .stamp{color:var(--ui-teal-dark)}
body .close.ui-control{background:transparent!important;box-shadow:none!important;border:0!important;min-width:44px}
body #character-wheel{background:#5e615064;backdrop-filter:blur(6px);color:var(--ui-ink)}.wheel-heading{color:var(--ui-paper);text-shadow:0 2px 8px #383d35}.wheel-heading small,.wheel-heading p{color:#fff9e9}.pet-wheel{background:radial-gradient(circle,#faf8eff7 0 29%,#faf8eecc 30% 67%,#fffdf2 68% 70%,transparent 71%);border-color:#faf9ed;box-shadow:0 8px 0 #b9ac9e77,0 20px 50px #2f46332b}.wheel-center small,.wheel-center span{color:#9c917b}.wheel-center b{color:#765836}.wheel-cross{opacity:.2;background:repeating-conic-gradient(from 45deg,#a49a7e 0deg 1deg,transparent 1deg 90deg)}
body .pet-choice.ui-control{padding:0;border-width:3px!important;box-shadow:0 4px 0 #b9ac9e!important}.pet-choice>small{background:#f9f8ee;color:#9e927f;border:1px solid #d9d5c3}.pet-choice>span:not(.pet-portrait){color:#765836;background:#faf8ee;border:1px solid #dfdac9}.pet-choice.chosen>span:not(.pet-portrait){background:#21b7ab;color:#fffef2;border-color:#21b7ab}.pet-choice.chosen::after{content:'✓';position:absolute;right:-.15rem;top:.3rem;width:1.6rem;height:1.6rem;line-height:1.6rem;border-radius:50%;color:white;background:var(--ui-teal);border:2px solid #fffdf2;font-size:.85rem}.wheel-footer>span{color:#fff8e9}
body #rooms-ui{color:var(--ui-ink)}body #rooms-ui button.ui-control{border-radius:1rem!important}body #rooms-ui .room-owners button{border-radius:999px!important}.room-editor,.room-bottom,.room-theme-card{background:#faf8eef2;border:1px solid var(--ui-line)}body #rooms-ui .room-catalog span{display:block!important}#rooms-ui .room-catalog span::before{width:1.5rem;height:1.5rem}body #rooms-ui .room-colors button.ui-control{background:var(--swatch)!important;min-height:44px!important;min-width:44px!important;width:44px;height:44px;border-radius:50%!important;border:3px solid #fffdf4!important;box-shadow:0 0 0 1px #dfdacb!important}body #rooms-ui .room-colors button[aria-pressed=true]{box-shadow:0 0 0 3px var(--ui-teal)!important}body #rooms-ui .room-colors button[aria-pressed=true]::after{content:'✓';color:#435b48;font-size:1.1rem;text-shadow:0 1px 2px white}
body .room-controls{border-top:1px dashed #d8d2bf}body #room-reset.ui-control{color:#c35c54!important}.room-owners button i{border:1px solid #bfb598}
body .arcade-choices>button.ui-control,body .run-cards>button.ui-control{border-radius:1.2rem!important}.arcade-art.ui-art-icon::before{width:4rem;height:4rem}.arcade-choices em{color:var(--ui-teal-dark)}body .run-cards button[aria-pressed=true]{transform:none}.run-cards button{position:relative}.run-cards button[aria-pressed=true]::after{content:'✓';position:absolute;top:.25rem;right:.25rem;background:var(--ui-teal);color:white;border:2px solid white;border-radius:50%;width:1.2rem;height:1.2rem;font-size:.7rem;line-height:1.1rem}.run-controls button::before{display:block;margin:0 auto .2rem;width:1.7rem;height:1.7rem}body .run-controls button{font-size:1rem;min-height:56px}.run-primary::before{float:right;margin:.15rem .5rem 0}.run-route span,.run-tip{background:#faf8eeed;color:var(--ui-ink)}.run-score>span{background:#f6e6b7;color:#796038}
/* The prize-grid is artwork, not a pill menu: retain its cabinet composition. */
body .blind-box.ui-control{border-radius:.7rem!important;background:#faf8ee0d!important;color:#fff9dd!important;border:1px solid #e9e2c533!important;box-shadow:none!important}.blind-box.chosen{outline:2px solid var(--ui-teal)}body .blind-footer button{min-height:48px}.blind-footer button small{color:#94856c}
/* Reference select treatment, including native keyboard/focus behavior. */
select{appearance:none;color:var(--ui-ink);background:#fffef9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23958d79' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") right .9rem center/1rem no-repeat;border:2px solid #e2ddc9;border-radius:1.1rem;min-height:44px;padding:.7rem 2.6rem .7rem 1rem;font:inherit}select:focus-visible{outline:3px solid #21b7ab66;border-color:var(--ui-teal)}select:disabled{opacity:.4}select option:checked{color:var(--ui-teal-dark);background:#e7f5ef}
body .ranking-paper{background:var(--ui-paper);color:var(--ui-ink);border-color:var(--ui-line)}body .ranking-rows li{background:#f4f2e6;border-color:var(--ui-line)}body .ranking-rows .ranking-first{background:#e3f5eb;border-color:var(--ui-teal)}
body #hud #nearby-play{border-radius:999px!important}.arcade-art.ui-art-icon{display:flex!important}.run-medal.ui-art-icon{display:flex!important}.champion-empty.ui-art-icon::before{width:2rem;height:2rem}
@media(max-aspect-ratio:4/5){
 :root{font-size:14px}
 #hud header{padding:2dvh 3vw 0;display:block}#hud .brand{min-width:0;width:45vw;max-width:19rem;padding:.5rem .75rem}#hud .park-brand-row{gap:.4rem}#hud h1{font-size:1.1rem}#hud .park-flower{width:2.2rem;height:2.2rem}#hud .park-weather{margin-left:auto}#hud #album{margin-top:.3rem;padding:.25rem .1rem;font-size:.7rem}
 #hud .top-actions{position:absolute;top:2dvh;right:3vw;max-width:46vw;width:46vw;display:grid;grid-template-columns:1fr 1fr;gap:.5rem;padding:.4rem;border-radius:1.4rem}#hud .top-actions button{min-width:0;padding:.45rem .2rem;font-size:.67rem}#hud .top-actions button::before{width:1.15rem;height:1.15rem;margin-right:.2rem}#hud .top-actions #music{grid-column:2;min-height:40px;position:absolute;position:fixed;left:3vw;right:auto;top:calc(2dvh + 9rem);width:44px}#hud .top-actions #map{grid-column:2;grid-row:2}#hud #view-tools{top:calc(2dvh + 11rem);right:3vw;padding:.4rem .5rem}#hud #zoom-hint{font-size:.6rem}#hud #view-tools #view-reset::before{display:none}
 #hud #toast{top:32dvh;max-width:88vw;width:max-content;font-size:.82rem}#hud #context{bottom:3dvh;min-width:0;width:92vw;max-width:92vw;padding:.65rem .8rem}#hud #place{font-size:.94rem}#hud #hint{font-size:.66rem}#hud #leader{bottom:11dvh;max-width:48vw}#hud #leader>span{display:none}#hud #joystick{bottom:17dvh;width:8rem;height:8rem}#hud .actions{bottom:16dvh;gap:1.2rem}#hud .actions #play{width:5.8rem;height:5.8rem}#hud .actions #switch{width:4.5rem;height:4.5rem}#hud #summon{bottom:29dvh;min-height:48px}#hud #celebrate{bottom:calc(29dvh + 5.3rem);min-height:48px}#hud #exit-game{bottom:29dvh}#hud #celebrate small,#hud #summon small{font-size:.6rem}
 .wheel-heading{top:8dvh;left:6%;width:88%;text-align:center}.wheel-heading h2{font-size:2rem}.wheel-heading p{font-size:.85rem}.pet-wheel{left:50%;top:46%;width:min(84vw,48dvh)}.wheel-center span{font-size:.7rem}.wheel-center small{font-size:.75rem}.wheel-center b{font-size:1.4rem}.pet-choice>span:not(.pet-portrait){font-size:.9rem}.wheel-footer{left:6%;right:6%;bottom:9dvh}.wheel-footer>span{font-size:.82rem;line-height:1.8}.wheel-footer button{min-height:48px;font-size:.9rem}
 .paper{width:92vw;max-width:92vw;max-height:88dvh;padding:1.6rem}.paper p{font-size:.85rem}.destination b{font-size:.95rem}.destination small{font-size:.74rem}
 #rooms-ui .room-head{display:flex;flex-wrap:wrap;gap:.8rem}#rooms-ui .room-heading{flex:1}#rooms-ui .room-heading h2{font-size:1.2rem}#rooms-ui .room-owners{order:3;display:flex;width:100%;justify-content:space-between;gap:.45rem}#rooms-ui .room-owners button{flex:1;min-width:0;padding:.4rem;font-size:.8rem}#rooms-ui .room-hint{display:none}#rooms-ui .room-theme-card{top:20dvh;right:3vw;width:34vw;padding:.8rem}#rooms-ui .room-editor{top:19dvh;right:2vw;width:36vw;bottom:27dvh;padding:.7rem}#rooms-ui .room-catalog{grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem .4rem}#rooms-ui .room-catalog button{font-size:.72rem;padding:.4rem .15rem;min-height:52px}#rooms-ui .room-row,#rooms-ui .room-moves{flex-wrap:wrap;gap:.6rem}.room-moves button{min-width:40%}#rooms-ui .room-colors{flex-wrap:wrap;gap:.65rem}#rooms-ui .room-bottom{min-height:0;bottom:2dvh;padding:.8rem;gap:.8rem;flex-wrap:wrap;max-height:21dvh;overflow:auto}#rooms-ui .room-bottom>div{flex:1}#rooms-ui .room-bottom .room-save{display:none}#rooms-ui.is-editing #room-mode{right:40vw;bottom:25dvh;min-width:0;font-size:.7rem;padding:.65rem}#rooms-ui #room-status{left:3vw!important;width:60vw!important;bottom:23dvh!important;font-size:.65rem}
 .blind-layout{grid-template-columns:1fr}.blind-paper{width:94vw;max-height:92dvh}.blind-head p{padding-right:2rem}.blind-right,#blind-preview{min-height:0}.blind-art{max-width:22dvh}.blind-footer{flex-wrap:wrap}.blind-footer>span{max-width:100%;font-size:.8rem}.blind-footer button{width:100%}.blind-right{padding:1rem}#blind-preview>span{font-size:2rem}
}
@media(prefers-reduced-motion:reduce){body button.ui-control{transition:none}}
