/* インターバル鬼 — ジムの墨と鬼の赤。直角・極太・打撃の手ごたえ */
:root {
  --sumi: #0b0b0c;
  --char: #151516;
  --char2: #1d1d1f;
  --line: #2e2e31;
  --oni: #d10f26;
  --oni-d: #a00b1d;
  --oni-hi: #ff5a6c;
  --gofun: #f5f2ee;
  --bone: #cdc8c1;
  --ash: #9d9791;
  --rest: #343437;
  --f-num: "Big Shoulders Display", "Zen Kaku Gothic New", sans-serif;
  --f-shout: "Dela Gothic One", "Zen Kaku Gothic New", sans-serif;
  --f-body: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  --r: 2px;
  --hit: cubic-bezier(.2, 1.4, .4, 1);
  --ease: cubic-bezier(.2, .9, .1, 1);
  --sb: env(safe-area-inset-bottom, 0px);
  --st: env(safe-area-inset-top, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--sumi); color: var(--gofun);
  font: 500 15px/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  line-break: strict; overflow: hidden;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3, .btn, button, .eyebrow, .tab, .ph, .call, .row-t b, .lh-t, .bar-t, .ob-t, .title, .stamp, .done-t, .nf-t, .empty-t, .pc-n, .blk-t, .sh-t { font-feature-settings: "palt"; word-break: keep-all; overflow-wrap: normal; }
p.note, .ob-d, .row-t small, .sh-d, .ab-note, .lead, .done-msg, .co small, .pc-s, .empty-d { word-break: normal; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.nb { white-space: nowrap; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 24px; height: 24px; flex: none; display: inline-block; vertical-align: middle; }
.ic.sm { width: 20px; height: 20px; }
.ic.xs { width: 14px; height: 14px; }
.ic.lg { width: 34px; height: 34px; }
.ic.xl { width: 40px; height: 40px; }
:focus-visible { outline: 3px solid var(--oni-hi); outline-offset: 2px; }
.eyebrow { font: 800 14px/1.2 var(--f-num); letter-spacing: .22em; color: var(--oni-hi); }

/* ---------- 枠 ---------- */
.app { position: relative; height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; margin: 0 auto; background: var(--sumi); }
@media (min-width: 600px) {
  body { background: #050505 repeating-linear-gradient(-62deg, rgba(209, 15, 38, .07) 0 3px, transparent 3px 46px); }
  .app, .splash, .onboard { max-width: 430px; left: 0; right: 0; margin: 0 auto; }
  .app { box-shadow: 0 0 0 1px #222, 0 30px 80px rgba(0, 0, 0, .8); }
}
.views { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.view { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--sumi); z-index: 1; }
.view.leaving { pointer-events: none; z-index: 0; }
.scroller { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 0 16px 32px; }

/* ---------- タブ ---------- */
.tabs {
  --ti: 0;
  position: relative; flex: none; z-index: 5;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 0 0 var(--sb); background: #060606; border-top: 1px solid #242426;
}
.immersive .tabs { display: none; }
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 62px; color: var(--ash); font: 700 12.5px/1.2 var(--f-body);
  transition: color .15s;
}
.tab:active .ic { transform: scale(.86); }
.tab .ic { transition: transform .15s var(--hit); }
.tab.on { color: var(--gofun); }
.tab.on .ic { color: var(--oni-hi); }
.tab-bar {
  position: absolute; top: -1px; left: 0; width: 25%; height: 4px;
  transform: translateX(calc(var(--ti) * 100%)); transition: transform .32s var(--hit);
}
.tab-bar::before { content: ""; position: absolute; left: 28%; right: 28%; top: 0; bottom: 0; background: var(--oni); transform: skewX(-24deg); }
.tabs.none .tab-bar { opacity: 0; }

/* ---------- 見出し ---------- */
.lh { flex: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: calc(18px + var(--st)) 16px 14px; }
.lh-t { font: 400 30px/1.2 var(--f-shout); letter-spacing: .02em; margin-top: 4px; }
.hbtn { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 14px; border: 2px solid var(--oni); color: var(--gofun); font-weight: 700; font-size: 14px; }
.hbtn:active { background: var(--oni); }
.bar { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: calc(6px + var(--st)) 10px 6px; border-bottom: 1px solid #222; background: var(--sumi); }
.bar-t { font: 700 17px/1.3 var(--f-body); text-align: center; white-space: nowrap; }
.bk { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding-right: 8px; font-weight: 700; font-size: 15px; color: var(--gofun); justify-self: start; }
.bk .ic { color: var(--oni-hi); }
.bk:active { opacity: .6; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 52px; padding: 0 20px; border-radius: var(--r);
  font: 700 16px/1.2 var(--f-body);
  transition: transform .12s var(--hit);
}
.btn:active { transform: scale(.95); }
.btn.red { background: var(--oni); color: #fff; box-shadow: 0 4px 0 var(--oni-d); }
.btn.red:active { box-shadow: 0 1px 0 var(--oni-d); transform: translateY(3px); }
.btn.ghost { border: 2px solid #4a4a4e; color: var(--gofun); background: var(--sumi); }
.btn.wide { width: 100%; }

/* ---------- タイマー（ホーム） ---------- */
.home { padding: 0 0 32px; }
.hero { position: relative; height: 54vh; height: 54dvh; min-height: 360px; max-height: 500px; overflow: hidden; background: #000; }
.hero-top { position: absolute; left: 0; right: 0; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: calc(14px + var(--st)) 16px 0; }
.brand { font: 400 20px/1.2 var(--f-shout); letter-spacing: .04em; }
.streak-pill { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 12px 0 8px; background: var(--oni); color: #fff; font-weight: 700; font-size: 14px; }
.streak-pill b { font: 900 20px/1 var(--f-num); }
.hero img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 78%; display: block; }
.hero-ov {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 90px 18px 76px;
  background: linear-gradient(rgba(11, 11, 12, 0), rgba(11, 11, 12, .82) 42%, var(--sumi));
}
.title { font: 400 40px/1.15 var(--f-shout); margin: 6px 0 8px; letter-spacing: .01em; }
.struct { font-size: 14px; color: var(--bone); }
.go-wrap { position: relative; display: grid; grid-template-columns: 1fr 128px 1fr; align-items: end; gap: 8px; margin: -62px 16px 16px; z-index: 2; }
.tot { padding-bottom: 6px; }
.tot.right { text-align: right; }
.tot-l { font-size: 12px; color: var(--ash); font-weight: 700; }
.tot-v { font: 800 34px/1 var(--f-num); letter-spacing: .01em; }
.tot-v small { font-size: 16px; margin-left: 2px; color: var(--bone); }
.go {
  position: relative; display: grid; place-items: center; width: 128px; height: 128px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ef2b42, var(--oni) 55%, #8f0a1a);
  box-shadow: 0 0 0 6px var(--sumi), 0 0 0 8px var(--oni-d), 0 14px 34px rgba(209, 15, 38, .5);
  transition: transform .14s var(--hit);
}
.go::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--oni); animation: pulse 1.8s ease-out infinite; pointer-events: none; }
@keyframes pulse { from { transform: scale(1); opacity: .9; } to { transform: scale(1.32); opacity: 0; } }
.go:active { transform: scale(.92); }
.go-in { display: flex; flex-direction: column; align-items: center; gap: 2px; color: #fff; font: 400 18px/1.1 var(--f-shout); }
.band { display: flex; gap: 2px; height: 14px; margin: 0 16px; }
.band i { display: block; min-width: 2px; }
.band.tall { height: 22px; margin: 12px 0 0; }
.b-work { background: var(--oni); }
.b-rest { background: #4a4a4e; }
.b-prep { background: #6c6862; }
.b-setrest { background: repeating-linear-gradient(-45deg, #4a4a4e 0 3px, #222 3px 6px); }
.legend { display: flex; align-items: center; gap: 14px; margin: 8px 16px 0; font-size: 13px; color: var(--bone); }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; vertical-align: -1px; }
.lg-w { background: var(--oni); }
.lg-r { background: #4a4a4e; }
.legend .lv { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.horns { display: inline-flex; gap: 0; }
.horn1, .horn2, .horn3 { width: 16px; height: 16px; color: #3e3e42; }
.horns .on { color: var(--oni-hi); }
.blk { margin: 22px 16px 0; }
.scroller:not(.home) > .blk { margin: 22px 0 0; }
.blk-t { font: 700 17px/1.4 var(--f-body); margin-bottom: 10px; display: flex; align-items: baseline; gap: 8px; }
.blk-t::before { content: ""; width: 10px; height: 10px; background: var(--oni); transform: skewX(-20deg); align-self: center; }
.blk-t small { font: 500 13px var(--f-body); color: var(--ash); margin-left: 4px; }
.mvl { display: flex; flex-wrap: wrap; gap: 6px; }
.mvl li { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; background: var(--char2); border-left: 3px solid var(--oni); font-weight: 700; font-size: 14px; }
.mvl b { font: 900 20px/1 var(--f-num); color: var(--oni-hi); min-width: 16px; text-align: center; }
.coach-row { display: flex; align-items: center; gap: 12px; margin: 22px 16px 0; padding: 12px 12px 12px 14px; background: var(--char); border: 1px solid var(--line); }
.coach-row:active { background: var(--char2); }
.cr-i { flex: none; width: 44px; height: 44px; display: grid; place-items: center; background: var(--oni); color: #fff; clip-path: polygon(0 0, 100% 0, 100% 75%, 75% 100%, 0 100%); }
.cr-t { flex: 1; display: flex; flex-direction: column; }
.cr-t b { font-size: 15px; }
.cr-t small { font-size: 13px; color: var(--bone); }
.swap-btn { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 52px; margin: 10px 16px 0; border: 2px solid #3a3a3e; font-weight: 700; }
.swap-btn:active { background: var(--char2); }
.note { margin: 18px 16px 0; font-size: 13px; color: var(--ash); }

/* ---------- 実行中 ---------- */
.run { position: relative; height: 100%; display: flex; flex-direction: column; overflow: hidden; background: var(--sumi); padding: calc(8px + var(--st)) 18px calc(14px + var(--sb)); user-select: none; -webkit-user-select: none; }
.fill { position: absolute; inset: 0; transform-origin: 50% 100%; background: var(--char2); will-change: transform; }
.run[data-phase="prep"] .fill { background: #4a0a13; }
.run[data-phase="work"] .fill { background: var(--oni); }
.run[data-phase="rest"] .fill { background: var(--rest); }
.run[data-phase="setrest"] .fill { background: repeating-linear-gradient(-45deg, #2c2c2f 0 14px, #232326 14px 28px); }
.claw { position: absolute; right: -30px; top: 60px; width: 160px; height: 220px; pointer-events: none; opacity: .09;
  background: linear-gradient(115deg, transparent 0 22%, #fff 22% 26%, transparent 26% 44%, #fff 44% 49%, transparent 49% 66%, #fff 66% 70%, transparent 70%); }
.run > :not(.fill):not(.claw):not(.hold-hint) { position: relative; }
.run-hd { display: flex; align-items: center; gap: 10px; }
.run-name { flex: 1; text-align: center; font: 700 15px/1.3 var(--f-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rbtn { position: relative; width: 48px; height: 48px; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .35); border-radius: 50%; }
.rbtn:active { transform: scale(.9); }
.ring { position: absolute; inset: 0; width: 48px; height: 48px; transform: rotate(-90deg); pointer-events: none; }
.ring circle { fill: none; stroke: #fff; stroke-width: 3; stroke-dasharray: 132; stroke-dashoffset: 132; }
.hold.holding .ring circle { animation: holdr .8s linear forwards; }
@keyframes holdr { to { stroke-dashoffset: 0; } }
.hold-hint { position: absolute; left: 18px; top: calc(62px + var(--st)); padding: 6px 12px; background: #000; color: #fff; font-size: 13px; font-weight: 700; opacity: 0; transition: opacity .2s; pointer-events: none; }
.run.hint .hold-hint { opacity: 1; }
.run-body { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 6px 0; }
.ph { font: 400 32px/1.2 var(--f-shout); letter-spacing: .06em; }
.mv { margin-top: 2px; font: 700 19px/1.4 var(--f-body); }
.sec { margin: 4px 0 2px; }
.sec b { display: block; font: 900 clamp(150px, 47vw, 210px)/.86 var(--f-num); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.run[data-phase="ready"] .sec b { font-size: clamp(110px, 32vw, 150px); }
.sec.hit b { animation: hit .32s var(--hit); }
@keyframes hit { from { transform: scale(1.1); } }
.call { min-height: 3em; max-width: 18em; font: 400 21px/1.45 var(--f-shout); }
.run[data-phase="ready"] .call { font: 700 15px/1.6 var(--f-body); color: var(--bone); }
.tally { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.pips { display: flex; flex-wrap: wrap; gap: 5px; flex: 1; }
.pip { width: 9px; height: 26px; background: rgba(255, 255, 255, .22); transform: skewX(-18deg); }
.pip[data-st="done"] { background: #fff; }
.pip[data-st="now"] { background: transparent; box-shadow: inset 0 0 0 2px #fff; animation: blink .8s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: .3; } }
.setno { flex: none; font-size: 14px; font-weight: 700; }
.setno b { font: 900 28px/1 var(--f-num); margin-right: 2px; }
.next { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, .28); font-weight: 700; font-size: 15px; }
.next b { font: 800 20px/1 var(--f-num); }
.ctrl { display: grid; grid-template-columns: 72px 1fr 72px; align-items: center; justify-items: center; margin: 4px 0 10px; }
.cbtn { width: 64px; height: 64px; display: grid; place-items: center; color: #fff; border: 2px solid rgba(255, 255, 255, .55); border-radius: 50%; background: rgba(0, 0, 0, .25); transition: transform .12s var(--hit); }
.cbtn:disabled { opacity: .3; }
.cbtn:active { transform: scale(.88); }
.cbtn.big { width: 100px; height: 100px; background: #fff; color: var(--sumi); border: 0; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.run[data-phase="ready"] .cbtn.big { background: var(--oni); color: #fff; box-shadow: 0 0 0 6px rgba(209, 15, 38, .25); }
.run-ft { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 14px; font-size: 13px; font-weight: 700; }
.run-ft b { font: 800 17px/1 var(--f-num); margin: 0 2px; }
.wake { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 1px solid rgba(255, 255, 255, .45); }
.wake[data-st="on"] { background: #fff; color: var(--sumi); }
.run[data-paused="true"] .sec b { opacity: .45; }
.run[data-paused="true"]::after {
  content: "一時停止中　画面をタップで再開"; position: absolute; left: 50%; top: calc(66px + var(--st)); transform: translateX(-50%);
  padding: 6px 14px; background: #000; color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap;
}

/* ---------- 完遂 ---------- */
.done { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; background: #000; }
.done-bg { position: absolute; left: 0; top: 0; width: 100%; height: 64%; object-fit: cover; object-position: 50% 92%; filter: brightness(1.25) contrast(1.05); }
.done-shade { position: absolute; inset: 0; background: linear-gradient(rgba(11, 11, 12, .2), rgba(11, 11, 12, 0) 30%, rgba(11, 11, 12, .75) 52%, var(--sumi) 64%); }
.done-x { position: absolute; top: calc(10px + var(--st)); right: 12px; z-index: 2; background: rgba(0, 0, 0, .6); }
.done-in { position: relative; padding: 0 20px calc(24px + var(--sb)); }
.stamp {
  width: 128px; height: 128px; margin: 0 0 18px; display: grid; place-items: center;
  border: 5px solid var(--oni); outline: 2px solid var(--oni); outline-offset: 4px; color: var(--oni-hi);
  font: 400 44px/1 var(--f-shout); transform: rotate(-9deg); background: rgba(11, 11, 12, .72);
}
.stamp.in { animation: stamp .42s var(--hit) both; }
@keyframes stamp { from { transform: rotate(-9deg) scale(2.2); opacity: 0; } 60% { opacity: 1; } }
.is-cut .stamp { border-color: #8a8580; outline-color: #8a8580; color: var(--bone); }
.done-t { font: 400 32px/1.25 var(--f-shout); margin: 4px 0 14px; }
.done-st { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #333; border: 1px solid #333; }
.done-st div { background: var(--sumi); padding: 10px 12px; }
.done-st dt { font-size: 12px; color: var(--ash); font-weight: 700; }
.done-st dd { font: 800 30px/1.1 var(--f-num); }
.done-st small { font-size: 15px; color: var(--bone); margin-left: 2px; }
.done-msg { margin: 14px 0 0; font: 700 17px/1.6 var(--f-body); }
.done-note { margin-top: 6px; font-size: 13px; color: var(--bone); }
.done-act { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; margin-top: 18px; }

/* ---------- メニュー ---------- */
.lead { font-size: 14px; color: var(--bone); margin-bottom: 14px; }
.plist { display: grid; gap: 10px; }
.pc { position: relative; overflow: hidden; background: var(--oni-d); }
.pc-del { position: absolute; right: 0; top: 0; bottom: 0; width: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #fff; font-weight: 700; font-size: 13px; background: var(--oni-d); }
.pc-in { position: relative; display: flex; align-items: stretch; background: var(--char); border: 1px solid var(--line); transition: transform .25s var(--ease); touch-action: pan-y; }
.pc.sel .pc-in { border-color: var(--oni); box-shadow: inset 4px 0 0 var(--oni); }
.pc-pick { flex: 1; min-width: 0; display: flex; gap: 12px; text-align: left; padding: 8px; }
.pc-pick:active { background: var(--char2); }
.pc-pick img { flex: none; width: 92px; height: 92px; object-fit: cover; filter: contrast(1.08); }
.pc-t { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.pc-n { font: 700 17px/1.35 var(--f-body); }
.pc-n em { display: inline-block; margin-left: 8px; padding: 1px 6px; font: 700 12px/1.5 var(--f-body); font-style: normal; background: var(--oni); color: #fff; vertical-align: 3px; }
.pc-s { font-size: 13px; color: var(--bone); }
.pc-m { display: flex; align-items: center; gap: 10px; }
.pc-m b { font: 800 22px/1 var(--f-num); }
.pc-edit { flex: none; width: 52px; display: grid; place-items: center; border-left: 1px solid var(--line); color: var(--bone); }
.pc-edit:active { background: var(--char2); }
.new-card { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 16px; border: 2px dashed #46464a; }
.new-card .ic { color: var(--oni-hi); }
.new-card span { display: flex; flex-direction: column; }
.new-card small { font-size: 13px; color: var(--bone); }
.new-card:active { background: var(--char); }

/* ---------- メニューを組む ---------- */
.ed { padding-top: 14px; }
.fl { display: flex; justify-content: space-between; margin: 18px 0 8px; font-weight: 700; font-size: 14px; color: var(--bone); }
.ed > .fl:first-child { margin-top: 0; }
.cnt { font: 700 14px var(--f-num); color: var(--ash); }
.tin { width: 100%; min-height: 52px; padding: 0 14px; background: var(--char); border: 2px solid var(--line); border-radius: var(--r); font-size: 17px; font-weight: 700; }
.tin::placeholder { color: #8a847e; }
.tin:focus { outline: 0; border-color: var(--oni); }
.tin[aria-invalid="true"] { border-color: var(--oni-hi); }
.err { margin-top: 6px; color: var(--oni-hi); font-size: 14px; font-weight: 700; }
.pv { margin-top: 16px; padding: 14px; background: var(--char); border: 1px solid var(--line); }
.pv-top { display: flex; justify-content: space-between; align-items: flex-end; }
.pv-top span { display: block; font-size: 12px; font-weight: 700; color: var(--ash); }
.pv-tot b { font: 900 46px/1 var(--f-num); }
.pv-kc { text-align: right; }
.pv-kc b { font: 800 28px/1 var(--f-num); }
.pv-kc small { font-size: 14px; color: var(--bone); margin-left: 2px; }
.stps { margin-top: 8px; }
.stp { display: grid; grid-template-columns: 1fr 48px 92px 48px; align-items: center; gap: 4px; min-height: 64px; border-bottom: 1px solid #222; }
.stp-l { font-weight: 700; font-size: 15px; }
.sb { width: 48px; height: 48px; display: grid; place-items: center; background: var(--char2); border: 1px solid #3a3a3e; color: var(--gofun); transition: transform .1s var(--hit); touch-action: manipulation; }
.sb:active { transform: scale(.88); background: var(--oni); border-color: var(--oni); }
.stp-v { text-align: center; white-space: nowrap; }
.stp-v b { font: 900 30px/1 var(--f-num); }
.stp-v small { font-size: 13px; color: var(--bone); margin-left: 2px; font-weight: 700; }
.seg3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg3 button { min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: var(--char); border: 2px solid var(--line); font-weight: 700; font-size: 14px; }
.seg3 [aria-checked="true"] { border-color: var(--oni); background: #2a0a10; }
.chosen { display: grid; gap: 4px; }
.chosen li { display: flex; align-items: center; gap: 10px; min-height: 48px; padding-left: 10px; background: var(--char2); border-left: 3px solid var(--oni); font-weight: 700; }
.chosen li b { font: 900 20px/1 var(--f-num); color: var(--oni-hi); width: 18px; }
.chosen li span { flex: 1; }
.chosen li button { width: 48px; height: 48px; display: grid; place-items: center; color: var(--bone); }
.chosen li.none { border-left-color: #444; color: var(--ash); font-weight: 500; font-size: 14px; padding: 10px 12px; }
.pal { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pm { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 12px 0 8px; border: 1px solid #4a4a4e; font-size: 14px; font-weight: 700; color: var(--gofun); }
.pm .ic { color: var(--oni-hi); }
.pm:active { background: var(--oni); border-color: var(--oni); }
.ed-act { position: sticky; bottom: -32px; display: flex; gap: 8px; margin: 24px -16px -32px; padding: 14px 16px calc(16px + var(--sb)); background: var(--sumi); border-top: 1px solid #242426; }
.ed-act .wide { flex: 1; }

/* ---------- 記録 ---------- */
.sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #2a2a2d; border: 1px solid #2a2a2d; }
.sum > div { background: var(--char); padding: 12px 12px 10px; }
.sum-l { font-size: 12px; font-weight: 700; color: var(--ash); }
.sum-v { font: 900 34px/1.05 var(--f-num); }
.sum-v small { font-size: 15px; color: var(--bone); margin-left: 2px; font-weight: 700; }
.streak { background: var(--oni) !important; }
.streak .sum-l, .streak .sum-v small { color: #fff; }
.week { display: block; width: 100%; height: auto; }
.bar-bg { fill: #19191b; }
.bar-v { fill: var(--oni); transform-box: fill-box; transform-origin: 50% 100%; animation: rise .5s var(--hit) both; animation-delay: calc(var(--i) * 40ms); }
@keyframes rise { from { transform: scaleY(0); } }
.today .bar-v { fill: var(--oni-hi); }
.bar-n { font: 800 15px var(--f-num); fill: var(--gofun); text-anchor: middle; }
.bar-d { font: 700 13px var(--f-body); fill: var(--bone); text-anchor: middle; }
.today .bar-d { fill: var(--oni-hi); }
.cal { display: grid; gap: 4px; }
.cal-h, .cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-h span { text-align: center; font-size: 12px; font-weight: 700; color: var(--ash); }
.c, .cal-k i { display: block; height: 30px; background: #1b1b1d; }
.cal-k i { height: 12px; }
.c[data-lv="1"], .cal-k i[data-lv="1"] { background: #5a0b17; }
.c[data-lv="2"], .cal-k i[data-lv="2"] { background: #9c0c1f; }
.c[data-lv="3"], .cal-k i[data-lv="3"] { background: var(--oni-hi); }
.c[data-lv="f"] { background: transparent; box-shadow: inset 0 0 0 1px #222; }
.cal-k { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 8px; font-size: 12px; color: var(--ash); }
.cal-k i { width: 12px; }
.hist { display: grid; gap: 14px; }
.hg-d { font: 700 14px/1.4 var(--f-body); color: var(--bone); margin-bottom: 6px; }
.hg-d small { font-size: 13px; }
.hg ul { display: grid; gap: 4px; }
.hr { display: grid; grid-template-columns: 44px 1fr auto auto; align-items: center; gap: 10px; min-height: 56px; padding: 8px 10px; background: var(--char); }
.hr-t { font: 800 16px var(--f-num); color: var(--ash); }
.hr-n { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hr-v { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.hr-v b { font: 800 19px var(--f-num); }
.hr-v small { font-size: 12px; color: var(--bone); }
.tag { padding: 2px 7px; font-size: 12px; font-weight: 700; }
.tag.full { background: var(--oni); color: #fff; }
.tag.cut { border: 1px solid #555; color: var(--bone); }
.empty { position: relative; min-height: 460px; margin-top: 4px; display: flex; align-items: flex-end; overflow: hidden; }
.empty img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.empty-in { position: relative; width: 100%; padding: 30px 18px 22px; background: linear-gradient(rgba(11, 11, 12, 0), var(--sumi) 38%); text-align: center; }
.empty-t { font: 400 22px/1.4 var(--f-shout); }
.empty-d { margin: 4px 0 14px; color: var(--bone); }

/* ---------- 設定 ---------- */
.grp { margin: 20px 0 8px; font: 800 14px/1.2 var(--f-num); letter-spacing: .16em; color: var(--oni-hi); }
.scroller > .grp:first-child { margin-top: 4px; }
.rows { background: var(--char); border: 1px solid var(--line); }
.row { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; text-align: left; border-bottom: 1px solid #262628; }
.row:last-child { border-bottom: 0; }
button.row:active, a.row:active { background: var(--char2); }
.row-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-t b { font-size: 15px; }
.row-t small { font-size: 13px; color: var(--bone); }
.row.danger b { color: var(--oni-hi); }
.tg { flex: none; width: 54px; height: 30px; position: relative; background: #333; transition: background .15s; }
.tg i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; background: #8d8882; transition: transform .2s var(--hit), background .15s; }
.sw[aria-checked="true"] .tg { background: var(--oni); }
.sw[aria-checked="true"] .tg i { transform: translateX(24px); background: #fff; }
.wstp { display: flex; align-items: center; gap: 4px; }
.wstp output { min-width: 64px; text-align: center; white-space: nowrap; }
.wstp b { font: 900 28px/1 var(--f-num); }
.wstp small { font-size: 13px; color: var(--bone); margin-left: 2px; }
.coach { display: grid; gap: 6px; margin-bottom: 10px; }
.co { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; text-align: left; padding: 12px 14px; background: var(--char); border: 2px solid var(--line); }
.co b { font: 700 17px/1.4 var(--f-body); }
.co small { align-self: center; font-size: 13px; color: var(--bone); }
.co-s { grid-column: 1 / -1; margin-top: 4px; font-size: 14px; font-weight: 700; color: var(--bone); }
.co[aria-checked="true"] { border-color: var(--oni); background: #220a0e; }
.co[aria-checked="true"] .co-s { color: var(--gofun); }
.seg { display: flex; gap: 2px; padding: 2px; background: #000; }
.seg button { min-height: 40px; padding: 0 10px; font-size: 13px; font-weight: 700; color: var(--bone); }
.seg [aria-checked="true"] { background: var(--oni); color: #fff; }
.ab { text-align: center; padding: 22px 0 14px; }
.ab img { border-radius: 24px; box-shadow: 0 12px 34px rgba(209, 15, 38, .3); }
.ab-n { font: 400 22px/1.4 var(--f-shout); margin-top: 10px; }
.ab-v { font-size: 13px; color: var(--bone); }
.ab-note { padding: 14px; background: var(--char); border-left: 4px solid var(--oni); font-size: 14px; line-height: 1.7; }
.ab-note.sub { margin-top: 8px; border-left-color: #555; color: var(--bone); }
.tech { display: flex; flex-wrap: wrap; gap: 6px; }
.tech li { padding: 5px 10px; background: var(--char2); font-size: 13px; font-weight: 700; color: var(--bone); }
.cta { display: flex; align-items: center; justify-content: space-between; min-height: 58px; margin-top: 22px; padding: 0 16px; background: var(--oni); color: #fff; font-weight: 700; box-shadow: 0 4px 0 var(--oni-d); }
.cta:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--oni-d); }
.nf { padding: 60px 0; text-align: center; display: grid; gap: 16px; justify-items: center; }
.nf-t { font: 400 22px/1.4 var(--f-shout); }

/* ---------- シート・トースト ---------- */
.scrim { position: absolute; inset: 0; z-index: 20; background: rgba(0, 0, 0, .66); opacity: 0; transition: opacity .25s; }
.scrim.on { opacity: 1; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 21; padding: 0 18px calc(18px + var(--sb)); background: var(--char); border-top: 4px solid var(--oni); transform: translateY(100%); transition: transform .3s var(--ease); }
.sheet.on { transform: none; }
.sh-grip { height: 26px; display: grid; place-items: center; touch-action: none; }
.sh-grip::before { content: ""; width: 44px; height: 4px; background: #555; }
.sh-t { font: 400 20px/1.4 var(--f-shout); outline: none; }
.sh-d { margin: 6px 0 16px; font-size: 14px; color: var(--bone); }
.sh-act { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.toast { position: absolute; left: 14px; right: 14px; bottom: calc(76px + var(--sb)); z-index: 30; display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 10px 12px 10px 16px; background: var(--gofun); color: #111; font-weight: 700; font-size: 14px; border-left: 6px solid var(--oni); transform: translateY(16px); opacity: 0; pointer-events: none; transition: transform .25s var(--hit), opacity .2s; }
.immersive .toast { bottom: calc(18px + var(--sb)); }
.toast.on { transform: none; opacity: 1; pointer-events: auto; }
.toast span { flex: 1; }
.toast button { min-height: 36px; padding: 0 10px; color: #9e0a1c; font-weight: 800; }

/* ---------- スプラッシュ・オンボーディング ---------- */
.splash { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--sumi); transition: opacity .3s; }
.splash img { border-radius: 26px; animation: thud .5s var(--hit); }
@keyframes thud { from { transform: scale(1.5); opacity: 0; } }
.splash-n { font: 400 26px/1.3 var(--f-shout); letter-spacing: .06em; }
.splash.out, .onboard.out { opacity: 0; pointer-events: none; }
.onboard { position: fixed; inset: 0; z-index: 55; background: var(--sumi); overflow: hidden; transition: opacity .3s; }
.ob-img { position: absolute; left: 0; top: 0; width: 100%; height: 72%; object-fit: cover; object-position: 50% 75%; }
.ob-shade { position: absolute; inset: 0; background: linear-gradient(rgba(11, 11, 12, .45), rgba(11, 11, 12, 0) 20%, rgba(11, 11, 12, 0) 46%, rgba(11, 11, 12, .9) 62%, var(--sumi) 72%); }
.ob-skip { position: absolute; top: calc(12px + var(--st)); right: 12px; min-height: 44px; padding: 0 16px; background: rgba(0, 0, 0, .7); color: #fff; font-weight: 700; font-size: 14px; }
.ob-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 24px calc(26px + var(--sb)); }
.ob-t { margin: 8px 0 10px; font: 400 30px/1.3 var(--f-shout); }
.ob-d { color: var(--bone); min-height: 5em; }
.ob-dots { display: flex; gap: 6px; margin: 14px 0 16px; }
.ob-dots i { width: 22px; height: 5px; background: #3a3a3e; transform: skewX(-24deg); }
.ob-dots i.on { background: var(--oni); }
.nojs, .fatal { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; background: var(--sumi); color: var(--gofun); }
.fatal-t { font-weight: 700; font-size: 18px; }
.fatal a { color: var(--oni-hi); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
