/* 脳トレラボ */
:root {
  --bg: #0b1020; --bg2: #121a33; --panel: rgba(255,255,255,.055); --panel2: rgba(255,255,255,.09);
  --line: rgba(255,255,255,.12); --text: #eef2ff; --muted: #9aa3c7;
  --accent: #22d3ee; --accent2: #a78bfa; --pink: #f472b6; --ok: #34d399; --ng: #fb7185; --warn: #fbbf24;
  --grad: linear-gradient(135deg, #22d3ee, #a78bfa 55%, #f472b6);
  --shadow: 0 10px 40px rgba(0,0,0,.35);
  --r: 18px; --fs: 16px;
  --font: 'Zen Kaku Gothic New', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', system-ui, sans-serif;
  --num: 'Rajdhani', 'Zen Kaku Gothic New', sans-serif;
}
:root[data-theme="light"] {
  --bg: #f3f5fb; --bg2: #e6ebf7; --panel: rgba(255,255,255,.75); --panel2: #fff;
  --line: rgba(20,30,60,.12); --text: #141a2e; --muted: #5b6484;
  --shadow: 0 10px 30px rgba(30,40,90,.12);
}
html.big { --fs: 19px; }
* { box-sizing: border-box; }
html { font-size: var(--fs); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text); font-family: var(--font); font-weight: 500;
  line-height: 1.6; overflow-x: hidden; -webkit-tap-highlight-color: transparent;
}
body[data-screen="play"] { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
kbd { font: 600 .85em var(--num); background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 0 .4em; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.note { color: var(--muted); font-size: .82rem; }

/* 背景のオーブ */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(1200px 600px at 50% -10%, var(--bg2), var(--bg) 60%); }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .35; animation: drift 18s ease-in-out infinite alternate; }
.o1 { width: 420px; height: 420px; background: var(--accent); top: -120px; left: -80px; }
.o2 { width: 380px; height: 380px; background: var(--accent2); top: 30%; right: -120px; animation-delay: -6s; }
.o3 { width: 320px; height: 320px; background: var(--pink); bottom: -100px; left: 30%; animation-delay: -12s; }
:root[data-theme="light"] .orb { opacity: .22; }
@keyframes drift { to { transform: translate(40px, 30px) scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .orb, .brain-orb span { animation: none !important; } }

/* ヘッダー */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); backdrop-filter: blur(14px); background: color-mix(in srgb, var(--bg) 72%, transparent); border-bottom: 1px solid var(--line); }
body[data-screen="play"] .top { display: none; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.25rem; letter-spacing: .02em; }
.logo-mark { width: 38px; height: 38px; border-radius: 12px; background: var(--grad); display: grid; place-items: center; color: #fff; box-shadow: 0 6px 18px rgba(34,211,238,.35); }
.logo-mark svg { width: 26px; height: 26px; }
.logo-text em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
nav { display: flex; gap: 6px; }
.navbtn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); font-weight: 700; font-size: .92rem; }
.navbtn svg { width: 20px; height: 20px; }
.navbtn:hover { background: var(--panel2); }
.navbtn.icon-only { padding: 8px; }
main { max-width: 1040px; margin: 0 auto; padding: 0 16px 48px; }

/* ヒーロー */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; align-items: center; padding: 40px 0 16px; }
.eyebrow { color: var(--accent); font-weight: 700; letter-spacing: .12em; font-size: .85rem; margin: 0 0 8px; }
h1 { font-size: clamp(1.75rem, 4.2vw, 2.8rem); line-height: 1.22; margin: 0 0 14px; font-weight: 900; letter-spacing: .01em; }
h1 .nw { white-space: nowrap; }
.lead { color: var(--muted); font-size: 1.02rem; margin: 0 0 22px; }
.lead b { color: var(--text); }
.pc { display: inline; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel2); font-weight: 700; min-height: 48px; transition: transform .12s, box-shadow .12s, background .12s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn.primary { background: var(--grad); color: #fff; border: 0; box-shadow: 0 10px 28px rgba(167,139,250,.35); text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.btn.big { font-size: 1.15rem; padding: 16px 30px; min-height: 60px; border-radius: 18px; }
.btn.danger { background: var(--ng); color: #fff; border: 0; }
.btn.share { background: #000; color: #fff; border: 0; }
:root[data-theme="light"] .btn.share { background: #111; }
.ghost { padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line); background: transparent; font-weight: 700; min-height: 44px; }
.ghost:hover { background: var(--panel); }
.ghost-link { display: inline-block; margin-top: 14px; color: var(--muted); font-weight: 700; }
.stats { display: flex; gap: 22px; margin-top: 26px; }
.stats > div { display: flex; flex-direction: column; }
.stats b { font: 700 1.9rem var(--num); line-height: 1; }
.stats b.ttl { font-family: var(--font); font-size: 1.3rem; }
.stats small { color: var(--muted); font-size: .8rem; }
.hero-art { position: relative; aspect-ratio: 1; max-width: 420px; justify-self: center; width: 100%; }
.hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 2; filter: drop-shadow(0 20px 40px rgba(0,0,0,.4)); }
.brain-orb { position: absolute; inset: 10%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.35), transparent 40%), var(--grad); box-shadow: 0 30px 80px rgba(167,139,250,.45), inset 0 -20px 60px rgba(0,0,0,.25); animation: breathe 5s ease-in-out infinite; }
.brain-orb span { position: absolute; inset: -8%; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); animation: ring 6s linear infinite; }
.brain-orb span:nth-child(2) { inset: -18%; border-color: rgba(34,211,238,.5); animation-duration: 9s; animation-direction: reverse; border-style: dashed; }
.brain-orb span:nth-child(3) { inset: -28%; border-color: rgba(244,114,182,.35); animation-duration: 14s; }
@keyframes breathe { 50% { transform: scale(1.04); } }
@keyframes ring { to { transform: rotate(360deg); } }
.hero-art img ~ .brain-orb { background: radial-gradient(circle, rgba(167,139,250,.35), transparent 70%); box-shadow: none; inset: 12%; }

/* ブロック */
.block { margin-top: 44px; }
.block-head h2 { font-size: 1.45rem; margin: 0 0 4px; font-weight: 900; display: flex; align-items: center; gap: 10px; }
.tag { font: 700 .72rem var(--num); letter-spacing: .18em; background: var(--grad); color: #fff; padding: 3px 9px; border-radius: 999px; }
.block-head p { margin: 0 0 16px; color: var(--muted); font-size: .95rem; }

/* 今日の3種 */
.daily { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.dcard { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 22px 14px 18px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .15s, border-color .15s; overflow: hidden; }
.dcard::before { content: ''; position: absolute; inset: 0; background: var(--grad); opacity: 0; transition: opacity .2s; }
.dcard:hover { transform: translateY(-3px); border-color: var(--accent); }
.dcard:hover::before { opacity: .08; }
.dcard.done { border-color: var(--ok); }
.dnum { position: absolute; top: 10px; left: 14px; font: 700 .95rem var(--num); color: var(--muted); }
.check { position: absolute; top: 8px; right: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--ok); color: #062; display: grid; place-items: center; font-weight: 900; }
.dname { font-weight: 900; font-size: 1.1rem; }
.dsub { color: var(--muted); font-size: .85rem; }
.daily-age { margin-top: 14px; padding: 14px 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--ok); text-align: center; font-weight: 700; }
.daily-age b { font-family: var(--num); font-size: 1.3rem; color: var(--ok); }

/* アイコン */
.gicon { position: relative; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; color: #fff; flex: none; background: var(--grad); box-shadow: 0 8px 20px rgba(0,0,0,.25); overflow: hidden; }
.gicon svg { width: 38px; height: 38px; }
.gicon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.gicon.cat-calc { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.gicon.cat-memory { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.gicon.cat-focus { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.gicon.cat-judge { background: linear-gradient(135deg, #ec4899, #8b5cf6); }
.gicon.cat-lang { background: linear-gradient(135deg, #10b981, #06b6d4); }
.gicon.cat-space { background: linear-gradient(135deg, #3b82f6, #8b5cf6); }

/* 一覧 */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-weight: 700; font-size: .9rem; --c: var(--accent); }
.chip.on { background: var(--c); border-color: var(--c); color: #061020; }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.gcard { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); transition: transform .15s, border-color .15s, background .15s; }
.gcard:hover { transform: translateY(-2px); border-color: var(--accent2); background: var(--panel2); }
.gbody { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.gcat { font-size: .72rem; font-weight: 700; color: var(--c); letter-spacing: .1em; }
.gname { font-weight: 900; font-size: 1.08rem; }
.gdesc { color: var(--muted); font-size: .85rem; line-height: 1.45; }
.gbest { font-size: .78rem; margin-top: 4px; color: var(--accent); font-weight: 700; }
.garrow { font-size: 1.6rem; color: var(--muted); }

/* about */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.about-grid > div { padding: 18px 20px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); }
.about-grid h3 { margin: 0 0 6px; font-size: 1.05rem; }
.about-grid p { margin: 0; color: var(--muted); font-size: .92rem; }

/* プレイ画面 */
#scr-play { display: flex; flex-direction: column; min-height: 100dvh; padding-top: env(safe-area-inset-top); }
.play-head { display: flex; align-items: center; gap: 12px; padding: 12px 0 6px; }
.play-title { font-weight: 900; font-size: 1.1rem; flex: 1; }
.play-score { display: flex; align-items: baseline; gap: 4px; }
.play-score b { font: 700 2rem var(--num); line-height: 1; }
.play-score span { color: var(--muted); font-size: .85rem; }
.play-score em { font-style: normal; color: var(--warn); font-weight: 700; font-size: .85rem; margin-left: 8px; }
.timer { display: flex; align-items: center; gap: 10px; }
.timer .bar { flex: 1; height: 8px; border-radius: 99px; background: var(--panel2); overflow: hidden; }
.timer .bar div { height: 100%; background: var(--grad); border-radius: 99px; transition: width .1s linear; }
.timer span { font: 700 1.1rem var(--num); min-width: 2ch; text-align: right; }
.timer.low .bar div { background: var(--ng); }
.timer.low span { color: var(--ng); }
.stage-wrap { position: relative; flex: 1; display: flex; flex-direction: column; }
.stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 22px; padding: clamp(24px, 9vh, 90px) 0 24px; max-width: 560px; width: 100%; margin: 0 auto; }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; backdrop-filter: blur(10px); background: color-mix(in srgb, var(--bg) 70%, transparent); border-radius: var(--r); z-index: 5; }
.ov-card { text-align: center; max-width: 480px; padding: 26px 20px; }
.ov-card .gicon { width: 84px; height: 84px; margin: 0 auto 10px; border-radius: 24px; }
.ov-card .gicon svg { width: 50px; height: 50px; }
.ov-card h2 { margin: 0 0 8px; font-size: 1.6rem; font-weight: 900; }
.how { color: var(--muted); margin: 0 0 20px; font-size: .98rem; }
.how b { color: var(--text); }
.count { font: 700 7rem var(--num); line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; animation: pop .35s; }
.bigq { font: 700 clamp(2.4rem, 9vw, 3.6rem) var(--num); line-height: 1.1; letter-spacing: .04em; text-align: center; min-height: 1.2em; }
.pop { animation: pop .18s ease-out; }
@keyframes pop { from { transform: scale(.85); opacity: .4; } to { transform: scale(1); opacity: 1; } }
.sub-info { color: var(--muted); font-weight: 700; text-align: center; min-height: 1.6em; }
.sub-info b { color: var(--text); font-family: var(--num); font-size: 1.2em; }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.choice { min-height: 68px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel2); font: 700 1.6rem var(--num); display: flex; align-items: center; justify-content: center; gap: 8px; transition: transform .08s; touch-action: manipulation; }
.choice:active { transform: scale(.96); }
.choices.colors .choice { font-family: var(--font); font-size: 1.3rem; }
.dot { width: 18px; height: 18px; border-radius: 50%; display: inline-block; }
.choices.shapes .choice { min-height: 110px; padding: 8px; color: var(--text); }
.choices.shapes svg { width: 90px; height: 90px; }
.hit-ok { animation: okflash .35s; }
.hit-ng { animation: ngflash .4s; }
@keyframes okflash { 0% { background: var(--ok); color: #053; border-color: var(--ok); } 100% { } }
@keyframes ngflash { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); background: var(--ng); } 40% { transform: translateX(7px); background: var(--ng); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }

.mode-badge { padding: 8px 18px; border-radius: 999px; font-weight: 900; font-size: 1.05rem; background: var(--accent); color: #061020; }
.mode-badge.meaning { background: var(--warn); }
.stroop-word { font-family: var(--font); font-weight: 900; font-size: clamp(3rem, 12vw, 4.6rem); }

.grid-board { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 6px; width: min(100%, 460px); aspect-ratio: 1; }
.cell { border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); display: grid; place-items: center; font: 700 clamp(1rem, 5vw, 1.6rem) var(--num); padding: 0; touch-action: manipulation; transition: transform .08s; }
.cell:active { transform: scale(.94); }
.cell.num.done { opacity: .15; pointer-events: none; }
.flash-board { gap: 10px; }
.cell.light { background: var(--panel); border-color: var(--line); transition: background .08s, box-shadow .08s; }
.cell.light.lit { background: var(--accent); box-shadow: 0 0 30px var(--accent), inset 0 0 20px rgba(255,255,255,.5); border-color: #fff; }
.cell.shape svg { width: 80%; height: 80%; }
.odd-board { gap: 4px; }
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: min(100%, 340px); }
.numpad .cell { height: 60px; font-size: 1.5rem; }
.numpad .cell.enter { background: var(--accent); color: #061020; font-family: var(--font); font-size: 1.1rem; }
.digits-disp { letter-spacing: .12em; min-height: 1.3em; width: 100%; border-bottom: 2px solid var(--line); padding-bottom: 6px; }
.digits-disp.typing { color: var(--accent); }

.react-pad { width: 100%; max-width: 480px; aspect-ratio: 4/3; border-radius: 24px; border: 0; display: grid; place-items: center; font-size: 1.6rem; font-weight: 900; color: #fff; transition: background .05s; touch-action: manipulation; text-shadow: 0 2px 8px rgba(0,0,0,.3); }
.react-pad.wait { background: #ef4444; }
.react-pad.go { background: #22c55e; }
.react-pad.foul { background: #f59e0b; }
.react-pad.done { background: #3b82f6; }
.react-pad b { font: 700 3.4rem var(--num); }
.react-pad small { display: block; font-size: .9rem; font-weight: 700; opacity: .85; }

.slots { display: flex; gap: 8px; justify-content: center; min-height: 64px; }
.slot { width: 56px; height: 64px; border-radius: 12px; border: 2px dashed var(--line); display: grid; place-items: center; font-size: 1.7rem; font-weight: 900; background: var(--panel); }
.tiles { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.tile { width: 64px; height: 72px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel2); font-size: 1.9rem; font-weight: 900; touch-action: manipulation; transition: transform .08s, opacity .15s; }
.tile:active { transform: scale(.94); }
.tile.used { opacity: .15; pointer-events: none; }
.row-ctl { display: flex; gap: 10px; }
.rot-target { width: 150px; height: 150px; padding: 10px; border-radius: 18px; background: var(--panel2); border: 2px solid var(--accent); box-shadow: 0 0 30px rgba(34,211,238,.25); }
.rot-target svg { width: 100%; height: 100%; }

/* 結果 */
#scr-result { padding-top: 20px; }
.res-card { max-width: 560px; margin: 0 auto; padding: 26px 22px; border-radius: 24px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); text-align: center; animation: pop .3s; }
.res-head { display: flex; align-items: center; gap: 12px; justify-content: center; text-align: left; }
.res-gname { font-weight: 900; font-size: 1.3rem; }
.res-cat { font-size: .75rem; color: var(--c); font-weight: 700; letter-spacing: .1em; }
.res-score { margin: 16px 0 4px; }
.res-score .num { font: 700 5rem var(--num); line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.res-score .unit { font-size: 1.2rem; color: var(--muted); margin-left: 6px; font-weight: 700; }
.res-tier { color: var(--warn); font-weight: 900; }
.res-rank { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 12px 0 18px; }
.badge { width: 74px; height: 74px; border-radius: 22px; display: grid; place-items: center; font: 700 3rem var(--num); color: #fff; background: var(--muted); box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.rank-S .badge { background: linear-gradient(135deg, #fbbf24, #f472b6, #a78bfa); }
.rank-A .badge { background: linear-gradient(135deg, #22d3ee, #a78bfa); }
.rank-B .badge { background: linear-gradient(135deg, #34d399, #22d3ee); }
.rank-C .badge { background: linear-gradient(135deg, #60a5fa, #34d399); }
.rank-D .badge { background: linear-gradient(135deg, #94a3b8, #64748b); }
.res-rank .word { font-weight: 900; font-size: 1.3rem; }
.res-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.res-meta > div { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 6px; display: flex; flex-direction: column; }
.res-meta small { color: var(--muted); font-size: .72rem; }
.res-meta b { font: 700 1.7rem var(--num); line-height: 1.1; }
.res-meta b span { font-size: .8rem; color: var(--muted); margin-left: 2px; }
.res-best { margin-top: 14px; font-weight: 900; color: var(--warn); font-size: 1.1rem; animation: pop .4s .3s both; }
.res-daily { margin-top: 12px; padding: 10px; border-radius: 12px; background: var(--panel2); font-weight: 700; font-size: .95rem; }
.res-daily b { color: var(--ok); }
.res-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 20px; }
.res-btns .btn { flex: 1 1 140px; }
.res-btns .btn.primary.big { flex-basis: 100%; }

/* 記録 */
.page-head { display: flex; align-items: center; gap: 12px; padding: 18px 0 10px; }
.page-head h2 { margin: 0; font-size: 1.5rem; font-weight: 900; }
.rec-top { display: grid; grid-template-columns: 1fr 260px; gap: 16px; align-items: center; }
.rec-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rec-stats > div { padding: 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; }
.rec-stats small { color: var(--muted); font-size: .78rem; }
.rec-stats b { font: 700 2rem var(--num); line-height: 1.1; }
.rec-stats b.ttl { font-family: var(--font); font-size: 1.3rem; }
.rec-stats b span { font-size: .85rem; color: var(--muted); margin-left: 2px; }
.rec-stats em { font-style: normal; color: var(--muted); font-size: .75rem; }
.radar { width: 100%; max-width: 260px; margin: 0 auto; display: block; }
.radar .ring { fill: none; stroke: var(--line); }
.radar .axis { stroke: var(--line); }
.radar .area { fill: color-mix(in srgb, var(--accent) 35%, transparent); stroke: var(--accent); stroke-width: 2; }
.radar text { font: 700 11px var(--font); text-anchor: middle; }
.radar tspan { font-family: var(--num); font-size: 12px; }
#rec-body h3 { margin: 26px 0 10px; font-size: 1.1rem; }
.rec-list { display: grid; gap: 8px; }
.rec-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.rec-row .gicon { width: 44px; height: 44px; border-radius: 12px; }
.rec-row .gicon svg { width: 26px; height: 26px; }
.rname { flex: 1; font-weight: 700; }
.rbest { font: 700 1.2rem var(--num); }
.rrank { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font: 700 1.2rem var(--num); color: #fff; background: var(--muted); }
.rrank.rank-S { background: linear-gradient(135deg, #fbbf24, #f472b6); } .rrank.rank-A { background: linear-gradient(135deg, #22d3ee, #a78bfa); } .rrank.rank-B { background: #34d399; } .rrank.rank-C { background: #60a5fa; } .rrank.rank-D { background: #94a3b8; }
.rrank.rank-none { background: transparent; }
.hist-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.hdate { color: var(--muted); font-family: var(--num); width: 90px; }
.hname { flex: 1; font-weight: 700; }
.hscore { font-family: var(--num); font-weight: 700; }
.hist-row .rrank { width: 28px; height: 28px; font-size: 1rem; }

/* 設定 */
.settings { max-width: 560px; display: grid; gap: 10px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); font-weight: 700; }
select { font: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); }
input[type=range] { width: 180px; accent-color: var(--accent); }
.switch { appearance: none; width: 52px; height: 30px; border-radius: 99px; background: var(--muted); position: relative; cursor: pointer; margin: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch:checked { background: var(--ok); }
.switch:checked::after { left: 25px; }

/* フッター */
.foot { text-align: center; padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }
body[data-screen="play"] .foot { display: none; }
.foot-links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 6px; font-weight: 700; }
.foot p { margin: 0; }

/* スマホ */
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 22px; gap: 10px; }
  .hero-art { max-width: 200px; order: -1; margin: 30px auto 20px; }
  .pc { display: none; }
  .stats { gap: 18px; }
  .daily { grid-template-columns: 1fr; }
  .dcard { flex-direction: row; text-align: left; padding: 14px 44px 14px 40px; }
  .dcard .gicon { width: 52px; height: 52px; border-radius: 14px; }
  .dcard .gicon svg { width: 30px; height: 30px; }
  .about-grid { grid-template-columns: 1fr; }
  .rec-top { grid-template-columns: 1fr; }
  .navbtn span { display: none; }
  .navbtn { padding: 8px; }
  .res-score .num { font-size: 4.2rem; }
}
@media (max-width: 380px) { .slot { width: 46px; height: 56px; } .tile { width: 52px; height: 62px; font-size: 1.6rem; } }
