body:has(.bowl-game){margin:0}
.bowl-game{--bowl-ink:#293d46;--bowl-blue:#28688a;--bowl-paper:#fffaf1;font-family:system-ui,'Segoe UI','Microsoft JhengHei',sans-serif;color:var(--bowl-ink);background:var(--bowl-paper);padding:16px 18px 30px}
.bowl-game *{box-sizing:border-box}
#bowl-app{max-width:480px;margin:auto}
.bowl-toolbar{display:flex;justify-content:space-between;gap:16px;font-size:14px;margin-bottom:12px}
.bowl-toolbar a{display:inline-flex;align-items:center;min-height:40px;color:var(--bowl-blue);text-underline-offset:4px}
.bowl-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.bowl-eyebrow{font-size:11px;letter-spacing:.08em;font-weight:750;color:var(--bowl-blue);margin:0 0 4px}
.bowl-heading h1{margin:0;font-size:clamp(28px,7vw,36px);line-height:1.2;letter-spacing:-.03em}
.bowl-pause{border:1px solid #819499;border-radius:9px;min-height:44px;padding:8px 12px;background:#fffdf6;color:var(--bowl-ink);font:600 14px/1.4 system-ui,sans-serif;cursor:pointer}
.bowl-levelbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;font-size:13px}
.bowl-levelbar>strong{min-width:0;line-height:1.4}
.bowl-steps{display:flex;gap:5px;list-style:none;padding:0;margin:0;flex-shrink:0}
.bowl-steps li{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;border:1px solid #819499;color:#435b65;background:#fffdf6;font-size:12px;font-weight:750}
.bowl-steps .is-done{background:#d6ebdf;color:#244c3a;border-color:#406d55}
.bowl-steps .is-current{background:var(--bowl-blue);border-color:var(--bowl-blue);color:#fff;outline:2px solid #9bbfce;outline-offset:2px}
.bowl-scores{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:8px}
.bowl-scores>div{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:13px;background:#eaf4f7;padding:8px 13px;border-radius:12px}
.bowl-scores>div:last-child{background:#f8e9bf}
.bowl-scores strong{font-size:27px;font-variant-numeric:tabular-nums;line-height:1.2}
.bowl-scores small{font-size:12px;color:#40545c;white-space:nowrap}
.bowl-scores>div>span:last-child{white-space:nowrap}
.bowl-progress{display:block;width:100%;height:5px;appearance:none;border:0;border-radius:5px;overflow:hidden;background:#dfe6dc;color:#28688a;margin-bottom:12px}
.bowl-progress::-webkit-progress-bar{background:#dfe6dc}
.bowl-progress::-webkit-progress-value{background:#28688a;border-radius:5px}
.bowl-progress::-moz-progress-bar{background:#28688a;border-radius:5px}
.bowl-scene-wrap{position:relative;border:2px solid var(--bowl-ink);border-radius:22px;overflow:hidden;background:#f3f4e9}
.bowl-stage{display:block;width:100%;height:clamp(170px,calc(100svh - 500px),390px);padding:0;border:0;background:transparent;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;cursor:pointer}
.bowl-stage:disabled{cursor:default;opacity:1}
.bowl-stage svg{display:block;width:100%;height:100%}
.bowl-tile{fill:none;stroke:#dfe5d9;stroke-width:1.5}
.bowl-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:16px;background:#fffaf1f5;pointer-events:none}
.bowl-overlay[data-result=success]{background:#edf5eaf5}
.bowl-overlay p{margin:7px 0;font-size:16px;line-height:1.5}
.bowl-overlay strong{font-size:clamp(34px,9vw,52px);line-height:1.3;letter-spacing:-.04em;font-variant-numeric:tabular-nums;white-space:nowrap}
.bowl-feedback{min-height:48px;display:grid;place-items:center;margin:8px 0 4px;text-align:center;font-size:15px;font-weight:700;line-height:1.5}
.bowl-action{display:block;width:100%;min-height:56px;padding:12px 18px;border:2px solid var(--bowl-ink);border-radius:14px;background:var(--bowl-blue);color:#fffdf6;font:800 19px/1.4 system-ui,'Microsoft JhengHei',sans-serif;cursor:pointer;touch-action:none;box-shadow:0 3px 0 var(--bowl-ink)}
.bowl-action:active:not(:disabled){background:#1c4f6b;box-shadow:none}
.bowl-action:disabled{background:#dce4e3;color:#40545c;cursor:default;box-shadow:none}
.bowl-instruction{margin:12px 0 18px;font-size:13px;text-align:center;line-height:1.5}
.bowl-rules{font-size:14px;line-height:1.65;border-top:1px solid #d8ddd4;padding-top:8px}
.bowl-rules summary{cursor:pointer;min-height:44px;padding:10px 0;font-weight:700}
.bowl-rules p{margin:8px 0}
.bowl-storage{font-size:12px;line-height:1.5;color:#56686f;margin:12px 0 0}
.bowl-game :focus-visible{outline:3px solid #b6422d;outline-offset:4px}
.bowl-stage:focus-visible{outline-offset:-6px}
.bowl-game [hidden]{display:none!important}
.bowl-skip{position:fixed;left:16px;top:-100px;z-index:999;background:#fffaf1;color:#293d46;padding:12px;border:2px solid #293d46}
.bowl-skip:focus{top:12px}
@media(max-width:360px){.bowl-game{padding-inline:12px}.bowl-scores>div{font-size:12px;padding-inline:9px}.bowl-scores strong{font-size:24px}.bowl-steps{gap:4px}.bowl-steps li{width:21px;height:21px}.bowl-overlay p{font-size:14px;margin:4px 0}}
@media(max-height:700px) and (orientation:portrait){.bowl-game{padding-top:8px}.bowl-toolbar{margin-bottom:6px}.bowl-toolbar a{min-height:32px}.bowl-heading{margin-bottom:8px}.bowl-heading h1{font-size:28px}.bowl-levelbar{margin-bottom:8px}.bowl-progress{margin-bottom:8px}.bowl-feedback{min-height:40px;font-size:14px}.bowl-action{min-height:52px}}
@media(max-height:600px) and (orientation:landscape){.bowl-stage{height:240px}}

.bowl-modes{display:flex;gap:4px;margin:0 0 12px;padding:3px;background:#efe7d9;border-radius:14px}
.bowl-modes button{flex:1;min-height:44px;border:1px solid transparent;border-radius:11px;background:transparent;color:var(--bowl-ink);font:650 14px/1.25 system-ui,sans-serif;cursor:pointer;touch-action:manipulation}
.bowl-modes button[aria-pressed=true]{background:#fffdf6;border-color:#91a3a6;box-shadow:0 1px 3px #29414a20}
.bowl-modes button:disabled{cursor:default}
#bowl-app[data-mode=endless] :is(.bowl-steps,.bowl-progress,.bowl-scores small,.bowl-classic-rule),#bowl-app[data-mode=classic] .bowl-endless-rule{display:none}
