/* © 2026 SUKIMA GAMES All rights reserved. 無断転載・再配布禁止 */
:root { --ink: #1f2d44; --sky: #3f8ff0; --sun: #ffd23f; --good: #2ec27e; --bad: #ff5a5f; --green: #246e53; --paper: rgba(255, 255, 255, .93);
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #cfe6ff; color: var(--ink); font-family: var(--font); -webkit-user-select: none; user-select: none; touch-action: none; overscroll-behavior: none; }
canvas#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
#hurt { position: fixed; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, rgba(255, 60, 70, 0) 40%, rgba(255, 40, 60, .9) 100%); }
/* スコープ(覗くと外側が暗くなり、円の中が拡大される) */
#scope { --sr: 300px; position: fixed; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 50% 50%, transparent calc(var(--sr) - 3px), #0e1726 calc(var(--sr) + 1px)); }
#scope::before { content: ""; position: absolute; left: calc(50% - var(--sr)); top: calc(50% - 1px); width: calc(var(--sr) * 2); height: 2px; background: linear-gradient(90deg, transparent, rgba(14, 23, 38, .85) 12%, rgba(14, 23, 38, .85) 45%, transparent 48%, transparent 52%, rgba(14, 23, 38, .85) 55%, rgba(14, 23, 38, .85) 88%, transparent); }
#scope::after { content: ""; position: absolute; top: calc(50% - var(--sr)); left: calc(50% - 1px); height: calc(var(--sr) * 2); width: 2px; background: linear-gradient(180deg, transparent, rgba(14, 23, 38, .85) 12%, rgba(14, 23, 38, .85) 45%, transparent 48%, transparent 52%, rgba(14, 23, 38, .85) 55%, rgba(14, 23, 38, .85) 88%, transparent); }
#marks, #pops { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.mark { position: absolute; display: none; transform: translate(-50%, -50%); border-radius: 50%; border: 3px solid rgba(255, 255, 255, .85); box-shadow: 0 0 0 2px rgba(31, 45, 68, .3); }
.mark.hot { border-color: #ff4d5e; animation: pulse .25s infinite alternate; }
@keyframes pulse { to { transform: translate(-50%, -50%) scale(1.15); } }
.pop { position: absolute; transform: translate(-50%, -50%); font-weight: 900; font-size: 20px; text-shadow: 0 2px 0 rgba(31, 45, 68, .8), 0 0 6px rgba(31, 45, 68, .5); white-space: nowrap; animation: pop .9s ease-out forwards; }
@keyframes pop { 0% { opacity: 0; margin-top: 0; } 15% { opacity: 1; } 100% { opacity: 0; margin-top: -60px; } }

/* ---- プレイ中 ---- */
#playHud { position: fixed; inset: 0; pointer-events: none; display: none; }
body[data-state="play"] #playHud { display: block; }
.hTop { position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 14px; right: 14px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 8px; color: #fff; text-shadow: 0 2px 0 rgba(31, 45, 68, .5); }
.hpBox small { display: block; font-size: 13px; font-weight: 800; margin-bottom: 3px; }
.hpBar { width: min(200px, 38vw); height: 14px; border-radius: 8px; background: rgba(31, 45, 68, .45); box-shadow: 0 0 0 2px #fff; overflow: hidden; }
.hpBar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #2ec27e, #7ee0a8); transition: width .12s; }
.hpBox.low .hpBar i { background: linear-gradient(90deg, #ff5a5f, #ff9a9a); animation: blink .4s infinite alternate; }
.hpBox.drain .hpBar { box-shadow: 0 0 0 2px #ff9aa0; }
@keyframes blink { to { opacity: .55; } }
.center { text-align: center; line-height: 1; }
.center b { font-size: 42px; font-weight: 900; font-variant-numeric: tabular-nums; }
.center small { font-size: 16px; font-weight: 800; margin-left: 2px; }
.right { text-align: right; font-size: 20px; font-weight: 900; font-variant-numeric: tabular-nums; }
.right small { font-size: 12px; margin-left: 2px; }
.right em { display: block; font-style: normal; font-size: 15px; color: var(--sun); min-height: 18px; }
.cross { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; transform: translate(-50%, -50%); border-radius: 50%; border: 2px solid rgba(255, 255, 255, .85); box-shadow: 0 0 0 1.5px rgba(31, 45, 68, .35); }
.cross::after { content: ""; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1.5px rgba(31, 45, 68, .4); }
.hold { position: absolute; left: 50%; top: calc(50% + 96px); transform: translateX(-50%); width: 170px; height: 12px; border-radius: 8px; background: linear-gradient(90deg, rgba(255, 255, 255, .25) 0 11%, rgba(255, 210, 63, .55) 11% 30%, rgba(255, 90, 95, .3) 32% 100%); box-shadow: 0 0 0 2px #fff; opacity: 0; transition: opacity .1s; overflow: hidden; }
.hold.show { opacity: 1; }
.hold i { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--h) * 100%); background: rgba(255, 255, 255, .9); }
.hold.quick i { background: #ffd23f; box-shadow: 0 0 10px #ffd23f; }
.hold.deep i { background: #ff5a5f; }
.msg { position: absolute; left: 50%; top: 27%; transform: translate(-50%, 0) scale(.7); opacity: 0; font-size: 44px; font-weight: 900; color: #fff; text-shadow: 0 3px 0 rgba(31, 45, 68, .6); white-space: nowrap; }
.msg.show { opacity: 1; transform: translate(-50%, 0) scale(1); transition: transform .2s cubic-bezier(.2, 1.6, .4, 1), opacity .1s; }
.msg.quick { color: var(--sun); font-size: 56px; }
.msg.combo { color: #ff9f43; }
.msg.bad { color: #d6e3f5; font-size: 30px; }
.bolt { position: absolute; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--sun) calc(var(--f, 1) * 360deg), rgba(255, 255, 255, .25) 0); mask: radial-gradient(circle, transparent 18px, #000 19px); -webkit-mask: radial-gradient(circle, transparent 18px, #000 19px); }
.bolt span { display: none; }
.bolt.ready { background: conic-gradient(#7ee0a8 360deg, transparent 0); }
.hint { position: absolute; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(92vw, 560px); text-align: center; font-size: 14px; font-weight: 800; color: #fff; text-shadow: 0 2px 0 rgba(31, 45, 68, .6); }

/* ---- 操作 ---- */
#touch { position: fixed; inset: 0; display: none; }
body[data-state="play"] #touch { display: block; }
#touchLook { position: absolute; inset: 0; }
.tb { position: absolute; border: 0; border-radius: 50%; color: var(--ink); font-weight: 900; background: rgba(255, 255, 255, .88); box-shadow: 0 6px 18px rgba(31, 45, 68, .22), inset 0 -4px 0 rgba(31, 45, 68, .12); touch-action: none; }
.tb.on { transform: scale(.94); background: var(--sun); }
.tb.fire { right: 22px; bottom: calc(26px + env(safe-area-inset-bottom)); width: 118px; height: 118px; display: grid; place-content: center; gap: 2px; background: var(--sun); }
.tb.fire b { font-size: 24px; }
.tb.fire small { font-size: 11px; font-weight: 800; opacity: .75; }
.tb.pause { right: 14px; top: calc(70px + env(safe-area-inset-top)); width: 42px; height: 42px; font-size: 18px; }
@media (pointer: fine) { .tb.fire { width: 100px; height: 100px; } }
body.portrait .tb.fire { bottom: calc(40px + env(safe-area-inset-bottom)); }
body.portrait .hint { bottom: calc(180px + env(safe-area-inset-bottom)); }

/* ---- 画面 ---- */
.screen { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; touch-action: pan-y; }
#titleScreen { background: linear-gradient(180deg, rgba(63, 143, 240, .12), rgba(255, 255, 255, .22)); justify-content: flex-start; }
.mast { width: 100%; max-width: 980px; display: flex; justify-content: space-between; align-items: center; padding: env(safe-area-inset-top) 4px 0; font-size: 13px; font-weight: 700; color: #fff; text-shadow: 0 1px 0 rgba(31, 45, 68, .4); }
.mast a { color: #fff; text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: 6px; letter-spacing: .14em; font-size: 11px; }
.crown { width: 14px; height: 10px; background: var(--sun); clip-path: polygon(0 100%, 0 20%, 25% 60%, 50% 0, 75% 60%, 100% 20%, 100% 100%); }
.tCard { margin: auto 0; width: min(440px, 100%); background: var(--paper); border-radius: 24px; padding: 26px 24px 20px; box-shadow: 0 20px 60px rgba(31, 45, 68, .22); backdrop-filter: blur(6px); }
.kicker { display: inline-block; font-weight: 900; font-size: 13px; color: #fff; background: var(--ink); padding: 4px 10px; border-radius: 6px; transform: rotate(-2deg); }
.logo { margin: 12px 0 8px; font-size: 52px; line-height: .98; font-weight: 900; letter-spacing: -.02em; color: var(--green); text-shadow: 3px 3px 0 var(--sun); }
.lead { margin: 0 0 16px; font-size: 14px; line-height: 1.7; font-weight: 600; }
.btn { border: 0; border-radius: 14px; padding: 13px; font-size: 16px; font-weight: 800; background: #e7eef8; color: var(--ink); width: 100%; }
.btn.go { background: var(--green); color: #fff; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18); }
.btn.big { font-size: 22px; padding: 16px; }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 2px #d5deea; }
.btn.x { background: #111; color: #fff; }
.bestLine { margin-top: 10px; text-align: center; font-weight: 800; font-size: 13px; color: var(--green); }
.how { margin-top: 12px; font-size: 13px; }
.how summary { cursor: pointer; font-weight: 800; color: var(--green); }
.how dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 10px 0; }
.how dt { font-weight: 800; }
.how dd { margin: 0; }
.tips { margin: 6px 0; padding-left: 18px; line-height: 1.6; }
.opts { display: grid; gap: 8px; margin-top: 10px; font-size: 13px; font-weight: 700; }
.opts label { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.opts label:has(input[type="checkbox"]) { justify-content: flex-start; }
.opts input[type="range"] { flex: 1; max-width: 180px; }
.tFoot { font-size: 11px; color: #fff; text-shadow: 0 1px 0 rgba(31, 45, 68, .5); text-align: center; padding: 10px 0 env(safe-area-inset-bottom); }
.tFoot a { color: #fff; }
.panel { width: min(400px, 100%); background: var(--paper); border-radius: 22px; padding: 22px; box-shadow: 0 20px 60px rgba(31, 45, 68, .25); display: grid; gap: 10px; text-align: center; }
.panel h2 { margin: 0; font-size: 26px; font-weight: 900; }
#pauseScreen, #resultScreen { background: rgba(31, 45, 68, .4); }
.rKind { font-size: 30px; font-weight: 900; color: var(--bad); letter-spacing: .06em; }
.rNew { justify-self: center; background: var(--sun); padding: 3px 12px; border-radius: 99px; font-weight: 900; font-size: 13px; transform: rotate(-3deg); }
.rDist { font-size: 56px !important; color: var(--green); text-shadow: 3px 3px 0 var(--sun); line-height: 1; }
.rRank b { font-size: 20px; }
.rStats { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 4px 0; text-align: left; background: #f1f5fb; padding: 12px 16px; border-radius: 14px; }
.rStats dt { font-size: 12px; font-weight: 700; opacity: .7; align-self: center; }
.rStats dd { margin: 0; font-weight: 800; text-align: right; font-size: 13px; }
.shareMsg { margin: 0; font-size: 12px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-height: 560px) {
  .tCard { padding: 14px 18px; } .logo { font-size: 34px; margin: 6px 0 4px; } .logo br { display: none; } .lead { margin-bottom: 8px; font-size: 12px; }
  .btn.big { font-size: 18px; padding: 11px; } .tb.fire { width: 92px; height: 92px; bottom: calc(18px + env(safe-area-inset-bottom)); }
  .panel { padding: 12px; gap: 6px; } .rDist { font-size: 36px !important; } .hold { top: calc(50% + 70px); } .msg { font-size: 34px; } .msg.quick { font-size: 40px; }
}

#flash { position: fixed; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .95), rgba(255, 236, 160, .65) 60%, rgba(255, 210, 63, .2)); mix-blend-mode: screen; }
#burst { position: fixed; left: 50%; top: 50%; width: 140vmax; height: 140vmax; margin: -70vmax 0 0 -70vmax; pointer-events: none; opacity: 0;
  background: repeating-conic-gradient(from 0deg, rgba(255, 235, 140, .55) 0 4deg, transparent 4deg 12deg); -webkit-mask: radial-gradient(circle, transparent 10%, #000 40%, transparent 70%); mask: radial-gradient(circle, transparent 10%, #000 40%, transparent 70%); }
#burst.go { animation: burst .38s ease-out; }
@keyframes burst { 0% { opacity: .95; transform: scale(.25) rotate(0deg); } 100% { opacity: 0; transform: scale(1) rotate(14deg); } }
.weapons { position: absolute; left: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 5px; color: #fff; font-weight: 800; font-size: 13px; text-shadow: 0 2px 0 rgba(31, 45, 68, .6); }
.weapons span { display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 5px; border-radius: 99px; background: rgba(31, 45, 68, .35); opacity: .7; }
.weapons span b { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(255, 255, 255, .8); color: var(--ink); font-size: 11px; text-shadow: none; }
.weapons span.on { background: var(--green); opacity: 1; box-shadow: 0 0 0 2px #fff; }
.tb.swap { right: 28px; bottom: calc(160px + env(safe-area-inset-bottom)); width: 64px; height: 64px; display: grid; place-content: center; }
.tb.swap small { font-size: 12px; font-weight: 900; }
@media (pointer: fine) { .tb.swap { display: none; } }
body.portrait .tb.swap { bottom: calc(172px + env(safe-area-inset-bottom)); }
@media (max-height: 560px) { .tb.swap { bottom: calc(118px + env(safe-area-inset-bottom)); right: 120px; width: 56px; height: 56px; } }
body.portrait .weapons { bottom: calc(96px + env(safe-area-inset-bottom)); }
