/* Ver.5: navy laboratory shell, tall chamber, compact side console. */
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 15% 0,#163866 0,transparent 55%),linear-gradient(145deg,#0d1b35,#132b4a 65%,#10213d);color:#edf3fc;font-family:system-ui,sans-serif;min-height:100vh}main{max-width:1240px;margin:auto;padding:20px 24px}header,.bar,.legend,.actions{display:flex;justify-content:space-between;align-items:center;gap:10px}header>div{display:flex;gap:6px}.brand{font-size:10px;letter-spacing:2px;font-weight:800;color:#98b7de}button{font:inherit;cursor:pointer;border:1px solid #46648d;border-radius:10px;background:linear-gradient(#263f65,#1a3154);color:#edf4ff;padding:10px 16px;min-height:44px;touch-action:manipulation}button:hover{border-color:#9cc7f5}button:disabled{opacity:.45;cursor:default}button:focus-visible{outline:3px solid #ffce7b;outline-offset:3px}button.active{background:linear-gradient(#ffdf91,#e5ac4f);color:#332617;border-color:#ffdf99;box-shadow:0 3px 16px #e9b95822}h1{font-size:clamp(24px,3.5vw,36px);letter-spacing:.02em;margin:16px 0 5px}p{line-height:1.7}#subtitle{color:#f7dba0;font-weight:700;margin:0 0 5px;font-size:14px}#best{font-size:12px;color:#b4d2f6}.play-layout{display:grid;grid-template-columns:minmax(0,1fr) 268px;gap:18px;align-items:start}.game{position:relative;background:#233f60;border:1px solid #6280a0;border-radius:16px;overflow:hidden;box-shadow:0 20px 60px #07132955,inset 0 0 0 1px #b9e0ff11}.bar{padding:10px 16px;font-size:11px;font-weight:700;color:#b8d3ee;background:linear-gradient(90deg,#152b4c,#28466a);border-bottom:1px solid #5d7a9b}canvas{display:block;width:100%;height:auto;aspect-ratio:1000/900;touch-action:none;user-select:none}.console{min-width:0;background:linear-gradient(145deg,#203b61e8,#142b4c);border:1px solid #3b5a82;border-radius:16px;padding:15px;position:sticky;top:16px;box-shadow:0 10px 35px #08162d44}#result{text-align:center;padding:10px 0 16px;border-bottom:1px solid #3b567b;min-height:200px}#rating{font-weight:900;letter-spacing:.6px;color:#9fbadb;font-size:16px;overflow-wrap:anywhere}#score{font-size:clamp(23px,2.3vw,29px);line-height:1.3;margin:12px 0;font-weight:950;color:#ffe5a3;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}#details{font-size:11px;margin-top:9px;color:#bcd0e6;line-height:1.7}#breakdown{font-size:10px;margin:10px auto 0;line-height:1.8;color:#8eaccd}.high #rating{color:#ffd185}.high #score{text-shadow:0 0 25px #e8ac5355}.jackpot #rating{color:#a5e3ff;animation:pop .45s ease-out}.jackpot #score{text-shadow:0 0 25px #7dcaff88;color:#fff0bd}.actions{justify-content:center;flex-wrap:wrap;margin:16px 0 10px}#retry{background:linear-gradient(#ffdc86,#eab257);color:#302417;border:1px solid #ffdf99;width:100%;font-size:18px;font-weight:900;min-height:54px;box-shadow:0 4px 0 #9a642d}#help{text-align:center;font-size:12px;margin:15px 0;line-height:1.9}.legend{font-size:11px;color:#a4bcdb;flex-direction:column;align-items:flex-start;line-height:1.8}.legend span{max-width:100%}details{font-size:12px;color:#a8c0df;margin-top:16px;border:1px solid #36567e;padding:12px 16px;border-radius:10px;background:#142b4c77}summary{cursor:pointer}footer{font-size:11px;color:#7d9ec7;margin-top:16px;padding-top:10px}.sr{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0)}@keyframes pop{from{transform:scale(1.12)}to{transform:scale(1)}}@media(max-width:850px){main{max-width:760px;padding:16px}.play-layout{grid-template-columns:minmax(0,1fr)}.console{position:static;padding:12px}#result{min-height:0;padding:5px 0 12px}#score{font-size:30px;margin:5px 0}.actions{margin:12px 0}#retry{width:auto;min-width:210px}#help{margin:12px 0 8px}.legend{flex-direction:row;flex-wrap:wrap}#breakdown{max-width:630px}#rating{font-size:17px}}@media(max-width:480px){main{padding:10px}header{align-items:flex-start}.brand{max-width:155px;line-height:1.8;font-size:9px}header button{font-size:11px;padding:7px 9px}h1{font-size:24px;margin-top:13px}#subtitle{font-size:12px}.bar{padding:9px;font-size:10px}.play-layout{gap:10px}.console{padding:10px}#retry{flex:1;min-width:180px}#score{font-size:28px}#rating{font-size:15px}#breakdown{font-size:10px}.legend{font-size:10px}}@media(prefers-reduced-motion:reduce){.jackpot #rating{animation:none}}

.game{margin-top:14px}.console{margin-top:14px}#help{font-size:12px} @media(max-width:850px){.console{margin-top:0}}

#breakdown{white-space:pre-line;text-align:left;font-size:11px;color:#bdd2e8;line-height:1.9;overflow-wrap:anywhere}#score,#best{overflow-wrap:anywhere;min-width:0}#score{font-size:clamp(20px,2.1vw,27px)} @media(max-width:850px){#score{font-size:clamp(22px,5vw,32px)}#breakdown{max-width:440px}}

#coverage{font-size:13px;color:#c7d9ec;margin-top:9px}#penalty{color:#ffd4aa;background:#72412c55;border:1px solid #e8a56e;border-radius:8px;font-weight:900;padding:9px;margin-top:9px}#penalty[hidden]{display:none}
/* Ver.6 result: a short calculation trail with a prominent spin multiplier. */
.play-layout{grid-template-columns:minmax(0,1fr) 350px}.console{position:relative;top:auto}#result{min-height:0;padding:8px 0 12px}#finalLabel{font-size:12px;letter-spacing:1.4px;color:#c0d7ef;margin-top:14px}#score{font-size:clamp(32px,3.1vw,43px);line-height:1.16;margin:8px 0 12px}#breakdown{white-space:normal;max-width:none;font-size:14px;line-height:1.5;margin-top:14px}.score-step{background:#10254188;border:1px solid #395879;border-radius:12px;padding:12px;margin:10px 0 0;text-align:left}.step-heading{display:flex;align-items:center;gap:8px}.step-heading h3{font-size:14px;margin:0;font-weight:750;color:#d7e6f7}.step-number{font-size:11px;display:grid;place-items:center;min-width:22px;height:22px;border-radius:50%;background:#304e71;color:#dbe8f7}.step-value{font-size:20px;font-weight:850;margin-top:6px;overflow-wrap:anywhere;color:#edf5ff;font-variant-numeric:tabular-nums}.score-step p{font-size:12px;color:#b5c9df;margin:5px 0 0;line-height:1.6}.spin-step{background:linear-gradient(125deg,#67482c55,#312f5866);border-color:#d6ab60}.spin-step .step-value{font-size:clamp(23px,3.8vw,31px);color:#ffdf94}.spin-step h3{color:#ffe5ae}.stage-result{font-size:14px;font-weight:750;text-align:right;padding:9px 4px;color:#d5e4f5;overflow-wrap:anywhere}.stage-result small{display:block;font-size:11px;font-weight:400;color:#a8bfd9;line-height:1.7;margin-top:4px}.bonus-line{display:flex;justify-content:space-between;gap:8px;padding:8px 0;border-bottom:1px solid #35527566;font-size:12px;align-items:baseline}.bonus-line span{color:#b7d7ed;overflow-wrap:anywhere}.bonus-line strong{font-size:13px;text-align:right;color:#d5f0e2;overflow-wrap:anywhere}.penalty-step{border-color:#e4a574;background:#6b40294d}.final-equation{border-top:1px solid #526d8d;margin-top:6px;padding-top:12px;font-size:13px}.exact-values{font-size:12px;margin-top:12px;padding:10px}.exact-values p{overflow-wrap:anywhere;color:#afc4df;font-size:12px;line-height:1.7}.console .actions{position:sticky;top:10px;z-index:3;padding:9px 0;background:#1a3356f5;border-radius:10px;margin:10px 0;box-shadow:0 5px 12px #10244277}#resultHint{font-size:13px;line-height:1.7;color:#f6d69a;margin:10px 0}#help{margin:16px 0 8px}@media(max-width:850px){.play-layout{grid-template-columns:minmax(0,1fr)}#breakdown{max-width:630px;margin:12px auto 0}.console .actions{top:6px}#score{font-size:clamp(32px,7vw,46px)}.score-step{padding:12px}.step-heading h3{font-size:15px}.step-value{font-size:21px}.bonus-line{font-size:13px}.bonus-line strong{font-size:14px}}@media(max-width:380px){.bonus-line{flex-wrap:wrap;gap:4px}.step-value{font-size:19px}.step-heading h3{font-size:14px}}
