* { box-sizing: border-box; }
:root { font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Noto Sans JP', sans-serif; color: #2a2328; background: #fff; color-scheme: light; }
body { margin: 0; min-height: 100svh; display: flex; flex-direction: column; }
.game-nav-header { flex-shrink: 0; }
button { font: inherit; cursor: pointer; touch-action: manipulation; color: inherit; }
button:focus-visible { outline: 3px solid #8859a2; outline-offset: 2px; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
.stacker { width: 100%; max-width: 450px; margin: 0 auto; padding: 2px 8px max(4px, env(safe-area-inset-bottom)); flex: 1; min-height: 352px; display: flex; flex-direction: column; gap: 4px; }
.cabinet { --cast: #e893b5; position: relative; flex: 1; min-height: 290px; overflow: hidden; isolation: isolate; border: 4px solid #dbc4cf; border-radius: 14px; background: linear-gradient(#faf5f8, #e8e2ee); touch-action: none; user-select: none; -webkit-user-select: none; }
.cabinet::before { content: ''; position: absolute; inset: 25% 0 5%; background: repeating-linear-gradient(0deg, #fff6 0 1px, transparent 1px 4.7%), repeating-linear-gradient(90deg, #fff4 0 1px, transparent 1px 10%); pointer-events: none; }
[data-audience=male] .cabinet { border-color: #bd9b5d; box-shadow: inset 0 0 0 2px #fff4; background: linear-gradient(#292738, #4e3c50); }
.hud { position: absolute; inset: 7px 7px auto; display: flex; justify-content: space-between; align-items: start; z-index: 3; pointer-events: none; }
.hud output { border-radius: 8px; background: #fff; padding: 6px 9px; font-size: 13px; font-weight: 700; }
.pause { pointer-events: auto; min-width: 44px; height: 44px; border: 0; border-radius: 8px; background: #f3f4f6; font-size: 20px; }
.prize { position: absolute; top: 1%; left: 50%; transform: translateX(-50%); width: 130px; height: 24%; max-height: 145px; display: flex; flex-direction: column; align-items: center; padding: 3px 0 0; border: 0; background: transparent; z-index: 3; }
.prize img { width: 100%; min-height: 0; flex: 1; object-fit: contain; filter: drop-shadow(0 4px 3px #45343d22); }
.prize span { flex-shrink: 0; border-radius: 7px; padding: 3px 8px; background: #fff; font-size: 11px; }
.goal-line { position: absolute; bottom: 66%; left: 3%; right: 3%; border-bottom: 2px dashed #b7894c; height: 1px; }
.goal-line span { position: absolute; right: 0; bottom: 4px; color: #956b2e; background: #fffc; border-radius: 5px; padding: 2px 5px; font-size: 11px; }
.block { position: absolute; height: 4.65%; border: 0; border-radius: 5px; background: var(--cast); background-image: var(--art); background-size: 33px 33px; background-repeat: repeat-x; background-position: center; box-shadow: inset 0 0 0 2px #ffffffcc, inset 0 -5px 0 #0002; pointer-events: none; }
.block.moving { outline: 2px solid #fff; outline-offset: 1px; z-index: 2; }
.block.perfect { box-shadow: inset 0 0 0 2px #ffe9a3, 0 0 7px #f7c75c66; }
.block.cut { opacity: .8; }
.base-line { position: absolute; left: 4%; right: 4%; bottom: 4.8%; height: 1.2%; border-radius: 5px; background: #bca2b4; box-shadow: 0 3px 0 #fff8; }
.feedback { position: absolute; inset: 26% 5% auto; z-index: 3; text-align: center; font-size: 14px; font-weight: 700; color: #72552a; pointer-events: none; min-height: 16px; line-height: 16px; }
[data-audience=male] .feedback { color: #ffdfa0; }
.overlay { position: absolute; z-index: 5; inset: 26% 5% 13%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; background: #fffef6ed; border-radius: 12px; padding: 16px; }
.overlay strong { font-size: 21px; }
.overlay p { margin: 0; font-size: 13px; }
.overlay img { width: min(48%, 155px); max-height: 52%; object-fit: contain; }
.overlay #precision { font-size: 12px; }
.next-prize { min-height: 44px; padding: 8px 14px; border: 0; border-radius: 8px; background: #eef0f3; font-size: 13px; }
.overlay.won { inset: 24% 5% 8%; gap: 6px; }
.overlay.won img { flex: 1; min-height: 0; max-height: 42%; }
.overlay.won img { animation: arrival .65s ease-out; }
.cabinet[data-phase=ready] .overlay { inset: 37% 5% 27%; background: #fffef6dc; }
.controls { display: flex; gap: 6px; height: 52px; flex-shrink: 0; }
.stop { width: 100%; border: 0; border-radius: 8px; font-weight: 800; font-size: 19px; background: #f3f4f6; }
.stop[data-playing=true] { background: #a26080; color: #fff; box-shadow: inset 0 -4px 0 #0002; }
[data-audience=male] .stop[data-playing=true] { background: #7a5a28; }
.stop:active { transform: translateY(1px); }
.stop:disabled { opacity: .65; }
.stop[aria-disabled=true] { opacity: .7; }
.collection { width: min(426px, calc(100% - 24px)); max-height: calc(100svh - 32px); padding: 12px; margin: auto; border: 1px solid #e3e3e7; border-radius: 12px; color: #2a2328; background: #fff; }
.collection::backdrop { background: #2a232855; }
.picker-heading { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.picker-heading h2 { margin: 0; font-size: 13px; font-weight: 700; }
.close-collection { width: 44px; height: 44px; border: 0; border-radius: 8px; background: #f3f4f6; font-size: 23px; flex-shrink: 0; }
.choices { display: flex; justify-content: space-between; gap: 5px; padding: 6px 0; }
.choices button { display: flex; flex: 1; min-width: 0; flex-direction: column; align-items: center; gap: 3px; padding: 4px 2px; background: #f3f4f6; border: 2px solid transparent; border-radius: 8px; font-size: 10px; }
.choices button[aria-pressed=true] { border-color: #a26080; }
.choices img { width: 100%; max-width: 65px; aspect-ratio: 1; object-fit: contain; }
.save-note { font-size: 12px; color: #6e626a; }
@keyframes arrival { 0% { transform: translateY(-28px) scale(.6); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .overlay.won img { animation: none; } }
.run-info { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.run-info output { padding: 2px 6px; font-size: 12px; line-height: 16px; }
.run-info #width { font-size: 11px; }
.choose-course { pointer-events: auto; min-height: 44px; max-width: 82px; padding: 5px 7px; border: 0; border-radius: 8px; background: #f3f4f6; font-size: 11px; }
.choose-course:disabled { opacity: .8; }
.target-guide { position: absolute; height: 4.65%; outline: 2px dashed #66516d; outline-offset: -2px; border-radius: 5px; background: #fff3; pointer-events: none; }
[data-audience=male] .target-guide { outline-color: #ffdfa0; }
.picker-label { margin: 12px 0 6px; font-size: 13px; }
.courses { display: flex; flex-direction: column; gap: 6px; }
.courses button { display: flex; flex-direction: column; gap: 4px; min-height: 44px; padding: 9px 10px; text-align: left; border: 2px solid transparent; border-radius: 8px; background: #f3f4f6; font-size: 12px; }
.courses button[aria-pressed=true] { border-color: #a26080; background: #eef0f3; }
.courses strong { font-size: 13px; }
