/* ドパドパクッキング・超破壊光線と同じ並び：暗い紫の地に、緑・ピンク・水色・電光イエローのネオン。オレンジは使わない */
:root { color-scheme: dark;
  --bg: #07021a; --ink: #ffffff; --dark: #12002e; --deep: #1e0846; --mid: #2d1460;
  --g: #39ff7f; --g2: #b8ff2e; --p: #ff2fd2; --c: #2cf2ff; --y: #f2ff3d; --v: #8b45ff; --mute: #d9ccff;
  --disp: "Dela Gothic One", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  --body: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
  --ol: 0 2px 0 var(--dark), 2px 0 0 var(--dark), -2px 0 0 var(--dark), 0 -2px 0 var(--dark), 2px 2px 0 var(--dark), -2px 2px 0 var(--dark), 2px -2px 0 var(--dark), -2px -2px 0 var(--dark), 0 0 12px rgba(18, 0, 46, .9); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font-family: var(--body); font-weight: 700;
  overscroll-behavior: none; touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
#cv { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.num, .head { font-family: var(--disp); font-weight: 400; }
.num, .goal b { display: inline-block; }
.pop { animation: pop .26s cubic-bezier(.2, 1.7, .4, 1); }
@keyframes pop { 0% { transform: scale(1.7) rotate(-6deg); } 100% { transform: none; } }
.slam { animation: slamIn .34s cubic-bezier(.2, 1.5, .4, 1) !important; animation-delay: calc(var(--i, 0) * 50ms) !important; }
/* 透明から始めない：動きが止まる端末・裏のタブでも、部品は最初から見えていて押せる */
@keyframes slamIn { 0% { transform: scale(1.35) rotate(-4deg); } 60% { transform: scale(.95) rotate(1deg); } 100% { transform: none; } }
.lab { font-size: 12px; font-weight: 900; color: var(--g); white-space: nowrap; letter-spacing: .04em; text-shadow: var(--ol); }

/* ボタン：斜めの板＋縞。ずらした影 */
.btn { position: relative; isolation: isolate; display: inline-grid; place-items: center; appearance: none; -webkit-appearance: none; border: 0; margin: 0; background: none; cursor: pointer; touch-action: manipulation; white-space: nowrap;
  min-width: min(64vw, 240px); height: 58px; padding: 0 34px; font-family: var(--disp); font-weight: 400; font-size: 21px; line-height: 1; letter-spacing: .04em; color: var(--dark);
  filter: drop-shadow(6px 7px 0 var(--v)) drop-shadow(0 0 16px rgba(44, 242, 255, .5)); outline: none; }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #fff; clip-path: polygon(6% 0, 100% 0, 94% 100%, 0 100%); }
.btn::after { content: ""; position: absolute; inset: 5px 9px; z-index: -1; background: repeating-linear-gradient(-60deg, var(--c) 0 18px, #a6fbff 18px 36px); clip-path: polygon(6% 0, 100% 0, 94% 100%, 0 100%); }
.btn:active { transform: translate(4px, 5px); }
.btn:focus-visible::before { background: var(--y); }
.btn.main { min-width: min(78vw, 300px); height: 74px; padding: 0 40px; font-size: 30px; filter: drop-shadow(7px 8px 0 var(--p)) drop-shadow(0 0 20px rgba(57, 255, 127, .55)); animation: jit 2.6s steps(1) infinite; }
.btn.main::after { background: repeating-linear-gradient(-60deg, var(--g) 0 18px, var(--g2) 18px 36px); }
.btn.main.sm { min-width: min(56vw, 220px); height: 60px; font-size: 22px; }
.btn.line.half { min-width: 0; padding: 0 26px; }
@keyframes jit { 0%, 100% { transform: none; } 91% { transform: translate(-3px, 1px); } 93% { transform: translate(4px, -2px); } 95% { transform: translate(-2px, 2px); } 97% { transform: none; } }
/* 小さいボタン：水色の札 */
.btn.small { display: inline-flex; align-items: center; gap: 5px; min-width: 0; height: auto; min-height: 40px; padding: 6px 12px; font-family: var(--body); font-weight: 900; font-size: 14px; letter-spacing: 0; background: var(--c); border: 3px solid #fff; box-shadow: 4px 4px 0 var(--v); filter: none; }
.btn.small::before, .btn.small::after, .grid .btn::before, .grid .btn::after { display: none; }
.btn.small:focus-visible, .grid .btn:focus-visible { outline: 3px solid var(--y); outline-offset: 2px; }

/* 上の帯：左に「もくひょう」の札、右に「のこり」の札。札は塗りだけ（押せない物に線を付けない）。中は文字と絵だけ */
.hud { position: fixed; top: 0; left: 0; right: 0; padding: calc(env(safe-area-inset-top, 0px) + 6px) max(10px, calc(50% - 260px)) 8px; display: flex; flex-direction: column; gap: 6px; background: linear-gradient(#12002e, rgba(18, 0, 46, .7)); pointer-events: none; z-index: 5; }
.hud[data-off], .bot[data-off] { visibility: hidden; }
.hud button { pointer-events: auto; }
.htop { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; }
.st { justify-self: center; display: flex; align-items: baseline; gap: 6px; }
.st .num { font-size: 20px; line-height: 1; text-shadow: var(--ol); }
.hard { font-family: var(--disp); font-weight: 400; font-size: 13px; color: var(--p); text-shadow: var(--ol); }
.hrow { display: grid; grid-template-columns: minmax(0, 1fr) clamp(86px, 26vw, 110px); gap: 8px; }
.pane { border-radius: 18px; background: #2a0f5c; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 8px 8px; min-height: 84px; }
.pane .lab { font-family: var(--disp); font-weight: 400; font-size: 12px; color: var(--mute); text-shadow: none; letter-spacing: .06em; }
.tp .big { font-size: 46px; line-height: 1; color: var(--y); text-shadow: 0 3px 0 var(--p); font-variant-numeric: tabular-nums; }
.tp.low .big { color: var(--p); text-shadow: 0 3px 0 var(--dark); animation: lowpulse .6s ease-in-out infinite; }
@keyframes lowpulse { 50% { transform: scale(1.12); } }
.goals { display: flex; justify-content: center; align-items: center; gap: 14px; }
.goal { display: flex; align-items: center; gap: 2px; }
.goal b { font-family: var(--disp); font-weight: 400; font-size: 26px; line-height: 1; min-width: 1.2em; text-shadow: var(--ol); font-variant-numeric: tabular-nums; }
.goal .lab { align-self: flex-end; padding-bottom: 3px; }
.goal svg { display: block; color: var(--g); }
.goals.lg { justify-content: center; flex-wrap: wrap; gap: 10px 20px; max-width: 100%; }
.goals.lg .goal b { font-size: 30px; }
.goals.n3 { gap: 6px; }
.goals.n3 .goal b { font-size: 20px; min-width: 1.1em; }
.goals.n3 .goal { gap: 0; }
/* 下の帯：道具だけ。帯は画面の端から端まで（地面）なので、中のボタンは枠を持てる */
.bot { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px max(10px, calc(50% - 260px)) calc(env(safe-area-inset-bottom, 0px) + 10px); display: flex; align-items: center; background: linear-gradient(rgba(18, 0, 46, .6), #12002e); pointer-events: none; z-index: 5; }
.btn.round { width: 52px; height: 52px; min-width: 0; padding: 0; border-radius: 50%; display: grid; place-items: center; background: var(--c); border: 3px solid #fff; box-shadow: 4px 4px 0 var(--v); filter: none; pointer-events: auto; color: var(--dark); flex: none; }
.btn.round.sm { width: 42px; height: 42px; box-shadow: 3px 3px 0 var(--v); }
.btn.round::before, .btn.round::after { display: none; }
.btn.round:focus-visible { outline: 3px solid var(--y); outline-offset: 2px; }
.hint { position: fixed; left: 0; right: 0; margin: 0; padding: 0 16px; text-align: center; font-size: 15px; font-weight: 900; line-height: 1.6; color: #fff; text-shadow: var(--ol); pointer-events: none; }
/* 下の帯：設定の丸いボタンと、ドパドパタイムのゲージ（ゲージは canvas が描く） */
.bot { position: fixed; left: 0; right: 0; bottom: 0; padding: 6px max(14px, calc(50% - 256px)) calc(env(safe-area-inset-bottom, 0px) + 12px); display: flex; align-items: center; gap: 14px; pointer-events: none; }
.gslot { flex: 1; height: 46px; }
.btn.round { width: 52px; height: 52px; min-width: 0; padding: 0; border-radius: 50%; display: grid; place-items: center; background: var(--c); border: 3px solid #fff; box-shadow: 4px 4px 0 var(--v); filter: none; pointer-events: auto; color: var(--dark); flex: none; }
.btn.round::before, .btn.round::after { display: none; }
.btn.round:focus-visible { outline: 3px solid var(--y); outline-offset: 2px; }

.sheet { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: calc(env(safe-area-inset-top, 0px) + 20px) 20px calc(env(safe-area-inset-bottom, 0px) + 22px); }
#sTitle, .sheet.split { justify-content: space-between; }
#sTitle { pointer-events: none; }
.rtop { flex: 1; min-width: 0; max-width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.rbot { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-bottom: 5vh; }
.tstage { margin: 0; display: flex; align-items: baseline; gap: 8px; }
.tstage .num { font-size: 34px; line-height: 1; color: var(--y); text-shadow: var(--ol), 3px 4px 0 var(--p); }
.head .lab { display: block; font-family: var(--body); font-size: 16px; -webkit-text-stroke: 0; text-shadow: var(--ol); margin-bottom: 4px; }
#sTitle .btn { pointer-events: auto; }
.logo { display: block; flex: none; transform: rotate(-3deg); animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: rotate(-1.5deg) translateY(-7px) scale(1.025); } }
.tbot { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.rowb { display: flex; gap: 14px; }
.col { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.head { margin: 0; font-size: clamp(40px, 13vw, 72px); line-height: 1.1; letter-spacing: .04em; color: var(--y); -webkit-text-stroke: .12em var(--dark); paint-order: stroke fill; text-shadow: .08em .1em 0 var(--p); text-align: center; }
.head.sm { font-size: clamp(26px, 8vw, 38px); }
.head.bad { color: #b9adc4; text-shadow: .08em .1em 0 var(--v); }
.stars { display: flex; gap: 6px; min-height: 84px; align-items: flex-end; }
.stars svg { width: 64px; height: 64px; transform: scale(0) rotate(-40deg); transition: transform .32s cubic-bezier(.3, 1.9, .5, 1); filter: drop-shadow(4px 5px 0 var(--p)); overflow: visible; }
.stars svg:nth-child(2) { width: 84px; height: 84px; margin-bottom: 8px; }
.stars svg.in { transform: scale(1) rotate(-8deg); }
.stars svg:nth-child(2).in { transform: scale(1); }
.stars svg:nth-child(3).in { transform: scale(1) rotate(8deg); }
.stars:empty, #rGoals:empty { display: none; }
.stats { margin: 0; display: grid; grid-template-columns: auto auto; gap: 4px 12px; align-items: baseline; }
.stats dt { font-size: 14px; color: var(--g); text-align: right; text-shadow: var(--ol); }
.stats dd { margin: 0; font-family: var(--disp); font-weight: 400; font-size: 26px; line-height: 1.15; color: #fff; text-shadow: var(--ol); }
.stats dd small { font-family: var(--body); font-weight: 900; font-size: 13px; margin-left: 4px; color: var(--mute); }
.pager { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 2px 0 6px; max-width: 100%; }
.pager .btn.small { padding: 6px 9px; font-size: 13px; }
.pager .num { font-family: var(--disp); font-weight: 400; font-size: 18px; color: var(--y); text-shadow: var(--ol); min-width: 6.4em; text-align: center; }
.btn.small:disabled { opacity: .35; cursor: default; }
.tbot .rowb { width: min(100%, 400px); gap: 8px; }
.rowb .btn.line.half { flex: 1 1 0; min-width: 0; padding: 0 6px; font-size: 16px; }
.achline { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 8px; font-size: 14px; color: #fff; text-shadow: var(--ol); }
.achline:empty { display: none; }
.achline b { font-size: 15px; color: var(--y); }
.rechero { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: -6px; }
.rechero .num { font-size: clamp(38px, 12vw, 52px); line-height: 1; color: var(--y); text-shadow: var(--ol), 3px 4px 0 var(--p); }
.recnums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: min(100%, 400px); text-align: center; }
.recnums div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.recnums b { font-family: var(--disp); font-weight: 400; font-size: 24px; line-height: 1.1; color: #fff; text-shadow: var(--ol); }
.recnums b small { font-family: var(--body); font-weight: 900; font-size: 12px; color: var(--mute); margin-left: 2px; }
.recnums span { font-size: 12px; font-weight: 900; color: var(--g); text-shadow: var(--ol); }
.rectabs { display: flex; gap: 10px; }
.rectabs .btn.small.tab { background: var(--mid); color: var(--mute); box-shadow: 3px 3px 0 var(--v); border-color: var(--mute); }
.rectabs .btn.small.tab[aria-selected="true"] { color: #12002e; background: var(--y); border-color: #fff; box-shadow: 3px 3px 0 var(--p); }
.rec { width: min(100%, 420px); max-height: 46vh; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; padding: 4px 6px 12px; }
.medals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 8px; }
.medal { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.medal .mc { width: 62px; height: 62px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: hsl(calc(270 - var(--k) * 150) 80% calc(24% + var(--k) * 26%)); }
.medal .mc b { font-family: var(--disp); font-weight: 400; font-size: 22px; line-height: 1; color: #fff; text-shadow: var(--ol); }
.medal .mc small { font-size: 11px; font-weight: 900; color: #fff; opacity: .85; }
.medal.all .mc { background: #f2c94c; }
.medal.all .mc b { color: #12002e; text-shadow: none; }
.medal.all .mc small { color: #12002e; }
.medal .ml { word-break: keep-all; overflow-wrap: anywhere; font-size: 13px; font-weight: 900; line-height: 1.25; color: #fff; text-shadow: var(--ol); }
.medal .mn { display: flex; align-items: center; gap: 3px; font-size: 11px; line-height: 1.3; color: var(--mute); }
.blocks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.btn.small.blk { height: auto; min-height: 66px; min-width: 0; padding: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-family: var(--disp); font-weight: 400; font-size: 18px; color: #fff; background: var(--mid); box-shadow: 4px 4px 0 var(--p); text-shadow: var(--ol); }
.btn.small.blk small { font-family: var(--body); font-weight: 900; font-size: 12px; color: var(--mute); letter-spacing: 0; text-shadow: none; }
.btn.small.blk.full small { color: var(--g); }
.sbest { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 900; color: #fff; text-shadow: var(--ol); }
.sbest b { font-family: var(--disp); font-weight: 400; font-size: 20px; color: var(--y); }
.sbest svg { width: 54px; height: 18px; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 10px; width: min(100%, 400px); max-height: 56vh; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; padding: 6px 10px 12px 6px; }
.grid .btn { min-width: 0; height: auto; min-height: 58px; padding: 4px 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 20px; color: #fff; background: var(--mid); border: 3px solid #fff; box-shadow: 4px 4px 0 var(--p); filter: none; }
.grid .btn svg { width: 36px; height: 12px; display: block; }
.grid .btn { min-height: 112px; padding: 6px 0 4px; gap: 2px; }
.grid .btn .th { width: 52px; height: 52px; display: block; }
.grid .btn .sn { font-size: 18px; line-height: 1; }
.grid .btn .bs { font-family: var(--body); font-weight: 900; font-size: 11px; line-height: 1; min-height: 11px; color: var(--mute); letter-spacing: 0; }
.grid .btn:disabled { opacity: .35; cursor: default; }
.grid .btn.now { color: var(--y); }
.tut { position: fixed; left: 0; right: 0; margin: 0; padding: 0 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.tut p { margin: 0; font-size: clamp(16px, 4.8vw, 20px); font-weight: 900; line-height: 1.5; text-align: center; color: #fff; text-shadow: var(--ol); }
.tut .steps { display: flex; align-items: center; gap: 4px; }
.tut .steps canvas { display: block; }
.tut .steps svg { width: 18px; height: 18px; color: var(--g); flex: none; }
#bSkip { position: fixed; right: 14px; top: calc(env(safe-area-inset-top, 0px) + 10px); pointer-events: auto; }
@media (max-height: 640px) { .sheet { gap: 10px; } .btn.main { height: 62px; font-size: 26px; } .btn { height: 50px; } .col { gap: 10px; } }
@media (prefers-reduced-motion: reduce) { .btn.main, .logo { animation: none; } }

/* 並びの検査の間は動きを止める */
.noanim *, .noanim .slam, .noanim .pop { animation: none !important; transition: none !important; }

/* 上の帯のゲージ：12 のコマ。線は付けない（押せない物なので） */
.gauge { flex: 1 0 100%; display: flex; align-items: center; gap: 8px; }
.gauge .lab { font-family: var(--disp); font-weight: 400; font-size: 12px; letter-spacing: 0; }
.segs { flex: 1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; height: 10px; }
.segs i { display: block; background: var(--mid); transform: skewX(-20deg); transition: background .2s; }
.segs i.on { background: var(--g); }
.segs i.on:nth-child(n+7) { background: var(--y); }
.segs i.on:nth-child(n+11) { background: var(--p); }
.gauge.full .segs i { animation: gfull .4s steps(2) infinite; }
.gauge.full .lab { color: var(--y); }
@keyframes gfull { 50% { filter: brightness(1.8); } }
/* 下の帯のどうぐ */
.items { flex: 1; display: flex; justify-content: center; gap: max(18px, 6vw); align-items: flex-start; }
.it { display: flex; flex-direction: column; align-items: center; gap: 3px; pointer-events: auto; }
.it .btn.round { width: 66px; height: 66px; border-radius: 20px; background: var(--mid); box-shadow: 4px 5px 0 var(--p); }
.it .btn.round canvas { display: block; pointer-events: none; }
.it.on .btn.round { background: var(--y); }
.it.zero .btn.round { opacity: .4; }
.it.new .btn.round { animation: nudge 1.1s ease-in-out infinite; }
.it .nm { font-size: 12px; font-weight: 900; color: #fff; text-shadow: var(--ol); white-space: nowrap; }
.it .nm b { font-family: var(--disp); font-weight: 400; color: var(--y); margin-left: 4px; }
.it.on .nm { color: var(--y); }
.btn.nope { animation: nope .32s; }
@keyframes nudge { 0%, 100% { transform: none; } 15% { transform: rotate(-12deg) scale(1.08); } 30% { transform: rotate(10deg) scale(1.08); } 45% { transform: none; } }
@keyframes nope { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.itip { position: fixed; left: 12px; right: 12px; margin: 0 auto; max-width: 420px; padding: 6px 14px; border-radius: 14px; background: rgba(45, 20, 96, .96); color: #fff; font-size: 13px; font-weight: 900; line-height: 1.5; text-align: center; pointer-events: none; z-index: 15; }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 30; }
/* ログインボーナス：マスは塗りだけ（押せない物に線を付けない）。きょうの日は文字の色で示す */
.days { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: min(100%, 400px); }
.day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 92px; padding: 8px 2px; border-radius: 14px; background: rgba(45, 20, 96, .92); position: relative; }
.day.d7 { grid-column: span 2; background: rgba(139, 69, 255, .55); }
.day.d7 .ic { gap: 0 6px; }
.day.d7 .q { font-size: 12px; }
.day .dn { font-size: 12px; font-weight: 900; color: var(--mute); }
.day.today .dn { color: var(--y); font-size: 14px; }
.day.today { animation: nudge 1.4s ease-in-out infinite; }
.day.done { opacity: .45; }
.day > svg { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; color: var(--g); }
.day .ic { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 0 2px; }
.day .q { font-family: var(--disp); font-weight: 400; font-size: 13px; color: #fff; }
.reward { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; max-width: 100%; }
.reward:empty { display: none; }
.reward .rw { display: flex; align-items: center; gap: 2px; }
.reward .num { font-size: 22px; color: var(--y); text-shadow: var(--ol); }
.own { margin: 0; font-size: 13px; font-weight: 900; color: var(--mute); }
.own .num { color: #fff; font-size: 18px; }
.tstage .ico { display: block; }

.newtip { margin: 4px 0 0; display: flex; align-items: center; justify-content: center; gap: 10px; max-width: 86vw; }
.newtip[hidden] { display: none; }
.newtip canvas { flex: none; }
.newtip span { display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.45; color: #efe6f5; text-align: left; }
.newtip i { font-style: normal; white-space: nowrap; }
.newtip b { font-family: var(--disp); font-weight: 400; font-size: 18px; color: var(--y, #f2ff3d); text-shadow: var(--ol); }
.hardbig { margin: 0; font-family: var(--disp); font-weight: 400; font-size: clamp(22px, 7vw, 32px); color: var(--p); text-shadow: var(--ol); animation: nudge 1.4s ease-in-out infinite; }
.hint { display: none; }
