/* =========================================================
   KABUATE! v3  style.css   — Neon Market Theme —
   ========================================================= */
:root {
  --bg0: #050816;
  --bg1: #0b1230;
  --glass: rgba(18, 26, 64, .62);
  --glass2: rgba(30, 41, 95, .55);
  --line: rgba(125, 211, 252, .18);
  --line2: rgba(125, 211, 252, .35);
  --text: #eef3ff;
  --mute: #93a3d1;
  --dim: #5b6894;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --mag: #e040fb;
  --pink: #f472b6;
  --gold: #fbbf24;
  --ok: #22c55e;
  --ng: #ef4444;
  --mP: #60a5fa;
  --mS: #34d399;
  --mG: #fb7185;
  --mR: #a78bfa;
  --r: 18px;
  --font: 'M PLUS Rounded 1c', 'Hiragino Maru Gothic ProN', 'Yu Gothic', 'Meiryo', sans-serif;
  --num: 'Orbitron', 'M PLUS Rounded 1c', monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg0); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  font-family: var(--font); color: var(--text); background: var(--bg0);
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
button:disabled { cursor: default; }
input, select { font-family: inherit; }
img { display: block; max-width: 100%; }
.num { font-family: var(--num); letter-spacing: .02em; }
.mono { font-family: var(--num); letter-spacing: .06em; }
small { color: var(--mute); }

#bg-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
#fx-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 900; pointer-events: none; }
#fx-layer { position: fixed; inset: 0; z-index: 901; pointer-events: none; overflow: hidden; }
#toast-root { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
#modal-root { position: relative; z-index: 1100; }

#app {
  position: relative; z-index: 1;
  width: 100%; max-width: 520px; margin: 0 auto;
  min-height: 100vh; min-height: 100dvh;
  padding: max(14px, env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom));
}
.screen { animation: scrIn .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes scrIn { from { opacity: 0; transform: translateY(12px) scale(.99); } to { opacity: 1; transform: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 18px; border-radius: 14px; font-weight: 800; font-size: 1rem;
  background: var(--glass2); border: 1px solid var(--line2);
  transition: transform .12s, filter .2s, box-shadow .2s;
}
.btn small { color: rgba(255, 255, 255, .6); font-size: .7rem; font-weight: 700; }
.btn:active:not(:disabled) { transform: scale(.96); }
.btn:disabled { opacity: .45; }
.btn.primary { background: linear-gradient(135deg, #22d3ee, #3b82f6 55%, #8b5cf6); border-color: transparent; box-shadow: 0 6px 24px rgba(59, 130, 246, .45), inset 0 1px 0 rgba(255, 255, 255, .35); color: #fff; }
.btn.primary:hover:not(:disabled) { filter: brightness(1.12); }
.btn.gold { background: linear-gradient(135deg, #fde68a, #fbbf24, #f59e0b); color: #3b2500; border: 0; box-shadow: 0 6px 30px rgba(251, 191, 36, .5); }
.btn.danger { background: linear-gradient(135deg, #f43f5e, #be123c); border-color: transparent; color: #fff; }
.btn.success { background: linear-gradient(135deg, #34d399, #059669); border-color: transparent; color: #fff; }
.btn.ghost { background: rgba(255, 255, 255, .04); }
.btn.full { width: 100%; }
.btn.xl { padding: 20px; font-size: 1.25rem; letter-spacing: .1em; border-radius: 18px; }
.mt { margin-top: 12px; }
.row { display: flex; }
.gap { gap: 10px; }
.row.gap > * { flex: 1; }
.icon-btn {
  width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center;
  background: var(--glass); border: 1px solid var(--line); font-size: 1.1rem; font-weight: 900;
}
.icon-btn:active { transform: scale(.92); }

/* ---------- headers ---------- */
.sub-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 18px; }
.sub-head h2 { margin: 0; font-size: 1.35rem; font-weight: 900; letter-spacing: .04em; text-shadow: 0 0 18px rgba(34, 211, 238, .45); }
.sub-head p { margin: 2px 0 0; font-size: .78rem; color: var(--mute); }

/* ---------- title ---------- */
.title-screen { min-height: calc(100dvh - 60px); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 18px; cursor: pointer; text-align: center; }
.ts-hero { position: relative; width: 100%; border-radius: 22px; overflow: hidden; box-shadow: 0 0 0 2px rgba(125, 211, 252, .5), 0 0 60px rgba(224, 64, 251, .45), 0 20px 60px rgba(0, 0, 0, .6); animation: floaty 5s ease-in-out infinite; }
.ts-catch { margin: 6px 0 0; font-size: 1rem; font-weight: 800; color: #cfe3ff; }
.ts-catch b { font-size: 1.3rem; color: var(--gold); text-shadow: 0 0 14px rgba(251, 191, 36, .6); }
.ts-tap { margin: 18px 0 0; font-family: var(--num); font-size: .95rem; letter-spacing: .25em; color: var(--cyan); text-shadow: 0 0 12px var(--cyan); animation: blink 1.4s ease-in-out infinite; }
.ts-ver { margin: 0; font-family: var(--num); font-size: .65rem; color: var(--dim); letter-spacing: .2em; }
@keyframes blink { 50% { opacity: .25; } }
@keyframes floaty { 50% { transform: translateY(-6px); } }

.shine { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .35) 50%, transparent 65%); background-size: 250% 100%; animation: shine 4.5s ease-in-out infinite; mix-blend-mode: overlay; pointer-events: none; }
@keyframes shine { 0% { background-position: 150% 0; } 60%, 100% { background-position: -100% 0; } }

/* ---------- menu ---------- */
.menu { display: flex; flex-direction: column; gap: 12px; }
.profile {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; text-align: left;
  border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(10px);
}
.profile img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; object-position: top; border: 2px solid var(--c); box-shadow: 0 0 14px var(--c); }
.pf-body { flex: 1; min-width: 0; }
.pf-name { font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-title { font-size: .68rem; font-weight: 800; color: var(--gold); border: 1px solid rgba(251, 191, 36, .5); border-radius: 99px; padding: 1px 8px; margin-left: 4px; }
.pf-xp { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.pf-xp .lv { font-family: var(--num); font-size: .75rem; color: var(--cyan); font-weight: 800; }
.pf-gear { color: var(--mute); font-size: 1.2rem; }
.xp-bar { flex: 1; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.xp-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--mag)); box-shadow: 0 0 10px var(--cyan); transition: width .9s cubic-bezier(.2, .8, .2, 1); }

.hero { position: relative; border-radius: 20px; overflow: hidden; box-shadow: 0 0 0 1.5px rgba(125, 211, 252, .45), 0 0 40px rgba(224, 64, 251, .3); }
.ticker { overflow: hidden; border-radius: 10px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); height: 30px; display: flex; align-items: center; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.tk-track { display: flex; gap: 22px; white-space: nowrap; animation: tick 70s linear infinite; font-size: .78rem; font-weight: 700; color: #c7d6ff; }
.tk-track span { display: inline-flex; align-items: center; gap: 6px; }
.tk-track b { color: var(--cyan); font-size: .72rem; }
.mk-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.mk-dot.mk-P { background: var(--mP); } .mk-dot.mk-S { background: var(--mS); } .mk-dot.mk-G { background: var(--mG); }
@keyframes tick { to { transform: translateX(-50%); } }

.mode-card {
  position: relative; overflow: hidden; text-align: left;
  border-radius: var(--r); padding: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .015)), var(--glass);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03), 0 10px 30px rgba(0, 0, 0, .35);
  transition: transform .15s, box-shadow .25s, border-color .25s;
  display: flex; flex-direction: column; gap: 3px;
}
.mode-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, var(--c), var(--c2)); opacity: .16; transition: opacity .25s; }
.mode-card::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(var(--c), var(--c2)); box-shadow: 0 0 16px var(--c); }
.mode-card > * { position: relative; }
.mode-card:hover { border-color: color-mix(in srgb, var(--c) 60%, transparent); box-shadow: 0 0 26px color-mix(in srgb, var(--c) 35%, transparent), 0 10px 30px rgba(0, 0, 0, .35); }
.mode-card:hover::before { opacity: .28; }
.mode-card:active { transform: scale(.97); }
.mode-card b { font-size: 1.05rem; font-weight: 900; }
.mode-card small { font-size: .72rem; }
.mc-ic { font-size: 1.7rem; line-height: 1; margin-bottom: 4px; filter: drop-shadow(0 0 10px var(--c)); }
.mode-card.feature, .mode-card.wide { flex-direction: row; align-items: center; gap: 14px; padding: 18px 16px; }
.mode-card.feature .mc-ic, .mode-card.wide .mc-ic { font-size: 2.2rem; margin: 0; }
.mode-card.feature b { font-size: 1.35rem; letter-spacing: .05em; }
.mode-card.feature { animation: pulseGlow 3s ease-in-out infinite; }
@keyframes pulseGlow { 50% { box-shadow: 0 0 30px rgba(244, 63, 94, .35), 0 10px 30px rgba(0, 0, 0, .35); } }
.mc-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.mc-best { text-align: right; display: flex; flex-direction: column; }
.mc-best small { font-family: var(--num); font-size: .6rem; letter-spacing: .15em; }
.mc-best b { font-size: .9rem; color: var(--gold); }
.mc-prog { text-align: right; min-width: 92px; }
.mc-prog b { font-size: 1.1rem; color: var(--cyan); }
.mc-prog i { font-style: normal; font-size: .7rem; color: var(--mute); }
.mini-bar { display: block; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .1); margin-top: 6px; overflow: hidden; }
.mini-bar span { display: block; height: 100%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sub-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 4px; }
.sub-nav button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); font-size: .7rem; font-weight: 800; color: #cbd8ff; }
.sub-nav button span { font-size: 1.4rem; }
.sub-nav button:active { transform: scale(.94); }

/* ---------- market badge / stars ---------- */
.mk { display: inline-block; font-size: .62rem; font-weight: 900; padding: 2px 7px; border-radius: 6px; white-space: nowrap; letter-spacing: .05em; border: 1px solid currentColor; }
.mk-P { color: var(--mP); background: rgba(96, 165, 250, .12); }
.mk-S { color: var(--mS); background: rgba(52, 211, 153, .12); }
.mk-G { color: var(--mG); background: rgba(251, 113, 133, .12); }
.mk-R { color: var(--mR); background: rgba(167, 139, 250, .12); }
.stars { color: var(--gold); font-size: .72rem; letter-spacing: -1px; white-space: nowrap; text-shadow: 0 0 6px rgba(251, 191, 36, .6); }
.stars i { font-style: normal; color: rgba(255, 255, 255, .13); text-shadow: none; }

/* ---------- selection screens ---------- */
.level-list, .grade-list { display: flex; flex-direction: column; gap: 10px; }
.level-card, .grade-card {
  display: flex; align-items: center; gap: 14px; padding: 16px; text-align: left; border-radius: var(--r);
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 18%, transparent), transparent 70%), var(--glass);
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  transition: transform .15s, box-shadow .2s;
}
.level-card:hover:not(:disabled), .grade-card:hover:not(:disabled) { box-shadow: 0 0 24px color-mix(in srgb, var(--c) 35%, transparent); }
.level-card:active:not(:disabled), .grade-card:active:not(:disabled) { transform: scale(.97); }
.lc-ic, .gc-medal { font-size: 2rem; width: 44px; text-align: center; filter: drop-shadow(0 0 10px var(--c)); }
.lc-body, .gc-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lc-body b, .gc-body b { font-size: 1.15rem; font-weight: 900; color: var(--c); text-shadow: 0 0 12px color-mix(in srgb, var(--c) 50%, transparent); }
.lc-body small, .gc-body small { font-size: .74rem; }
.gc-meta { font-size: .66rem; color: var(--dim); font-weight: 700; }
.lc-best, .gc-rec { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.lc-best small { font-family: var(--num); font-size: .58rem; letter-spacing: .15em; }
.lc-best b { font-size: .9rem; color: var(--gold); }
.gc-rec span { font-size: .66rem; color: var(--mute); font-weight: 800; }
.gc-rec span.pass { color: #fff; background: linear-gradient(135deg, #f43f5e, #be123c); padding: 2px 8px; border-radius: 6px; }
.gc-rec b { font-family: var(--num); font-size: 1.1rem; }
.gc-rec i { font-style: normal; font-size: .7rem; color: var(--mute); }
.grade-card.locked { opacity: .45; filter: grayscale(.7); }
.grade-card.passed { border-color: var(--c); }

.rule-box { margin-top: 16px; padding: 14px; border-radius: 14px; background: rgba(0, 0, 0, .3); border: 1px dashed var(--line2); font-size: .8rem; line-height: 1.75; color: #c6d3f5; }
.rule-box > b:first-child { display: block; color: var(--cyan); margin-bottom: 4px; font-size: .85rem; }
.rule-box b { color: var(--gold); }
.best-line { text-align: center; margin: 18px 0 12px; color: var(--mute); font-size: .85rem; font-weight: 700; }
.best-line b { color: var(--gold); font-size: 1.15rem; margin-left: 6px; }

.chara-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cp { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 10px; border-radius: 14px; background: var(--glass); border: 2px solid transparent; transition: all .2s; }
.cp img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: top; border-radius: 10px; filter: grayscale(.6) brightness(.7); transition: filter .2s; }
.cp b { font-size: .72rem; font-weight: 900; white-space: nowrap; }
.cp small { font-size: .6rem; }
.cp.on { border-color: var(--c); box-shadow: 0 0 20px color-mix(in srgb, var(--c) 60%, transparent); transform: translateY(-3px); }
.cp.on img { filter: none; }
.cp-detail { margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--c) 18%, transparent); border: 1px solid var(--c); display: flex; flex-direction: column; gap: 2px; }
.cp-detail b { font-size: 1.05rem; }
.cp-detail .skill { font-size: .82rem; font-weight: 800; color: #fff; }

/* chips / panel */
.panel { padding: 16px; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); margin-bottom: 12px; backdrop-filter: blur(8px); }
.panel h4 { margin: 14px 0 8px; font-size: .82rem; color: var(--cyan); letter-spacing: .05em; }
.panel h4:first-child { margin-top: 0; }
.panel h4 small { font-weight: 700; margin-left: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chips.center { justify-content: center; margin-bottom: 12px; }
.chip { padding: 8px 13px; border-radius: 99px; font-size: .8rem; font-weight: 800; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); color: #b9c7ee; transition: all .15s; }
.chips.sm .chip { padding: 6px 10px; font-size: .72rem; }
.chip.on { background: linear-gradient(135deg, rgba(34, 211, 238, .3), rgba(59, 130, 246, .3)); border-color: var(--cyan); color: #fff; box-shadow: 0 0 12px rgba(34, 211, 238, .3); }
.note { font-size: .78rem; color: var(--mute); margin: 0 0 10px; }

/* ---------- play ---------- */
.play { display: flex; flex-direction: column; gap: 12px; min-height: calc(100dvh - 50px); }
.hud { display: flex; align-items: center; gap: 10px; }
.hud-main { flex: 1; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 8px 14px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); min-height: 40px; }
.hud-main small { font-family: var(--num); font-size: .6rem; letter-spacing: .2em; }
.hud-main .prog { font-size: .95rem; color: var(--cyan); }
.hud-main .prog i, .hud-main .score i { font-style: normal; font-size: .65rem; color: var(--mute); margin-left: 2px; }
.hud-main .score { font-size: 1.05rem; color: var(--gold); }
#asset-num { font-size: 1.2rem; color: var(--gold); text-shadow: 0 0 14px rgba(251, 191, 36, .5); }
#asset-num.bump { animation: bump .35s; }
@keyframes bump { 40% { transform: scale(1.18); } }
.hud-combo { min-width: 58px; text-align: center; line-height: 1; }
.hud-combo b { display: block; font-family: var(--num); font-size: 1.35rem; color: var(--gold); text-shadow: 0 0 12px rgba(251, 191, 36, .7); animation: bump .3s; }
.hud-combo small { font-family: var(--num); font-size: .5rem; letter-spacing: .15em; color: #fde68a; }
.hud-combo.hot b { color: #fb7185; text-shadow: 0 0 16px #f43f5e, 0 0 30px #f43f5e; }

.tbar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.tbar.none { visibility: hidden; height: 0; }
.tbar-fill { height: 100%; width: 100%; background: linear-gradient(90deg, var(--cyan), var(--blue)); box-shadow: 0 0 10px var(--cyan); border-radius: inherit; }
.tbar-fill.low { background: linear-gradient(90deg, #f43f5e, #fb923c); box-shadow: 0 0 12px #f43f5e; }

.hp-row { display: flex; align-items: center; gap: 10px; }
.hp-face { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: top; border: 2px solid var(--cyan); }
.hp-bar { position: relative; flex: 1; height: 20px; border-radius: 99px; background: rgba(0, 0, 0, .45); border: 1px solid var(--line2); overflow: hidden; }
.hp-fill { height: 100%; background: linear-gradient(90deg, #22c55e, #a3e635); box-shadow: 0 0 14px rgba(34, 197, 94, .7); border-radius: inherit; transition: width .12s linear; }
.hp-fill.low { background: linear-gradient(90deg, #ef4444, #f97316); box-shadow: 0 0 16px rgba(239, 68, 68, .9); animation: hpblink .6s infinite; }
@keyframes hpblink { 50% { filter: brightness(1.5); } }
.hp-num { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-family: var(--num); font-size: .7rem; font-weight: 800; text-shadow: 0 1px 3px #000; }
.shield { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 1.1rem; background: conic-gradient(var(--cyan) calc(var(--p, 1) * 360deg), rgba(255, 255, 255, .08) 0); filter: grayscale(1) opacity(.5); }
.shield.ready { filter: none; box-shadow: 0 0 16px var(--cyan); }
.stage-chip { align-self: center; font-family: var(--num); font-size: .62rem; letter-spacing: .12em; padding: 4px 12px; border-radius: 99px; background: rgba(224, 64, 251, .15); border: 1px solid rgba(224, 64, 251, .5); color: #f5d0fe; }

.q-card {
  position: relative; padding: 18px 18px 16px; border-radius: 22px;
  background: linear-gradient(160deg, rgba(59, 130, 246, .22), rgba(224, 64, 251, .12)), var(--glass);
  border: 1px solid var(--line2);
  box-shadow: 0 0 40px rgba(59, 130, 246, .2), inset 0 1px 0 rgba(255, 255, 255, .1);
  min-height: 170px; display: flex; flex-direction: column; gap: 6px;
  backdrop-filter: blur(10px);
}
.q-card.enter { animation: qIn .4s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes qIn { from { opacity: 0; transform: translateX(30px) rotate(1deg); } to { opacity: 1; transform: none; } }
.q-card.ok { border-color: var(--ok); box-shadow: 0 0 40px rgba(34, 197, 94, .45); }
.q-card.ng { border-color: var(--ng); box-shadow: 0 0 40px rgba(239, 68, 68, .45); }
.q-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.q-type { font-size: .7rem; font-weight: 900; padding: 4px 10px; border-radius: 99px; background: rgba(34, 211, 238, .16); border: 1px solid rgba(34, 211, 238, .5); color: #a5f3fc; }
.q-title { font-size: .66rem; color: var(--mute); font-weight: 800; }
.q-ask { font-size: .8rem; color: var(--mute); font-weight: 800; margin-top: 4px; }
.q-prompt { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 900; word-break: break-word; }
.q-prompt.desc { font-size: .98rem; line-height: 1.7; text-align: left; justify-content: flex-start; font-weight: 700; }
.q-prompt.code { font-family: var(--num); font-size: 3.6rem; letter-spacing: .12em; color: #fff; text-shadow: 0 0 22px var(--cyan), 0 0 44px rgba(34, 211, 238, .5); }
.q-prompt.name { font-size: 1.6rem; line-height: 1.35; text-shadow: 0 0 18px rgba(147, 197, 253, .5); }
.q-hint { font-size: .7rem; color: var(--dim); font-weight: 800; text-align: right; }

.choices { display: grid; gap: 9px; }
.choice {
  display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 14px; border-radius: 14px;
  background: rgba(15, 23, 60, .78); border: 1.5px solid rgba(125, 211, 252, .22);
  font-weight: 800; font-size: .98rem; line-height: 1.3;
  transition: transform .12s, border-color .15s, background .15s, opacity .2s;
  animation: chIn .35s both; animation-delay: var(--d);
}
@keyframes chIn { from { opacity: 0; transform: translateY(10px); } }
.choice kbd { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-family: var(--num); font-size: .72rem; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); color: var(--mute); }
.choice span { flex: 1; word-break: break-word; }
.choice em { display: block; font-style: normal; font-family: var(--num); font-size: .72rem; color: var(--gold); margin-top: 2px; }
.choice.mono span { font-family: var(--num); font-size: 1.25rem; letter-spacing: .15em; }
.choices.n4.mono-grid, .choices:has(.choice.mono) { grid-template-columns: 1fr 1fr; }
.choice:hover:not(.ok):not(.ng):not(.dim) { border-color: var(--cyan); background: rgba(34, 211, 238, .1); }
.choice:active { transform: scale(.97); }
.choice.ok { border-color: var(--ok); background: rgba(34, 197, 94, .22); box-shadow: 0 0 20px rgba(34, 197, 94, .45); }
.choice.ok kbd { background: var(--ok); color: #fff; border-color: var(--ok); }
.choice.ng { border-color: var(--ng); background: rgba(239, 68, 68, .22); animation: shakeX .4s; }
.choice.ng kbd { background: var(--ng); color: #fff; border-color: var(--ng); }
.choice.dim { opacity: .35; }
@keyframes shakeX { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.feedback { min-height: 54px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fb-line { font-size: .95rem; font-weight: 800; display: flex; gap: 10px; align-items: baseline; animation: fbIn .25s; }
.fb-line b { font-size: 1.15rem; }
.fb-line.ok b { color: var(--ok); text-shadow: 0 0 12px rgba(34, 197, 94, .7); }
.fb-line.ng b { color: var(--ng); }
.fb-line.shield b { color: var(--cyan); }
.fb-line .gain { font-family: var(--num); color: var(--gold); font-size: .95rem; }
.fb-line .gain i { font-style: normal; color: #fb7185; font-size: .8rem; }
.fb-stock { font-size: .75rem; color: var(--mute); display: flex; align-items: center; gap: 6px; }
.fb-head { width: 100%; font-weight: 900; font-size: 1.1rem; margin-bottom: 8px; }
.fb-head.ok { color: var(--ok); } .fb-head.ng { color: var(--ng); }
.fb-head span { color: #fff; font-size: .9rem; margin-left: 6px; }
.play-training .feedback { align-items: stretch; }
@keyframes fbIn { from { opacity: 0; transform: translateY(6px); } }

/* stock card */
.stock-card { width: 100%; padding: 14px; border-radius: 16px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); text-align: left; }
.sc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sc-code { font-family: var(--num); font-weight: 800; color: var(--cyan); font-size: .95rem; letter-spacing: .08em; }
.sc-sec { font-size: .7rem; color: var(--mute); font-weight: 800; }
.sc-head .stars { margin-left: auto; }
.sc-name { font-size: 1.3rem; font-weight: 900; margin: 6px 0; }
.sc-desc { font-size: .84rem; line-height: 1.7; color: #cdd8f6; }
.sc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.sc-grid div { padding: 8px 4px; border-radius: 10px; background: rgba(255, 255, 255, .04); text-align: center; }
.sc-grid small { display: block; font-size: .6rem; }
.sc-grid b { font-size: .85rem; }

/* rush */
.slots { display: flex; justify-content: center; gap: 10px; margin-top: 4px; }
.slots span { width: 62px; height: 74px; border-radius: 14px; display: grid; place-items: center; font-family: var(--num); font-size: 2.2rem; font-weight: 900; background: rgba(0, 0, 0, .4); border: 2px solid var(--line2); transition: all .15s; }
.slots span.on { border-color: var(--cyan); box-shadow: 0 0 16px rgba(34, 211, 238, .55); animation: caret 1s infinite; }
@keyframes caret { 50% { box-shadow: 0 0 4px rgba(34, 211, 238, .2); } }
.slots.ok span { border-color: var(--ok); color: #bbf7d0; box-shadow: 0 0 18px rgba(34, 197, 94, .6); animation: none; }
.slots.ng span { border-color: var(--ng); color: #fecaca; animation: none; }
.r-msg { text-align: center; min-height: 22px; font-weight: 800; color: var(--mute); }
.r-msg b { color: #fff; font-size: 1.1rem; }
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: auto; }
.key { height: 58px; border-radius: 14px; font-family: var(--num); font-size: 1.4rem; font-weight: 800; background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .02)); border: 1px solid var(--line2); box-shadow: 0 4px 0 rgba(0, 0, 0, .4); transition: transform .06s, box-shadow .06s; }
.key:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .4); background: rgba(34, 211, 238, .2); }
.key.bs { color: #fca5a5; }
.key.pass { grid-column: span 3; height: 46px; font-family: var(--font); font-size: .9rem; color: var(--mute); }

/* flash card */
.flip-wrap { perspective: 1200px; flex: 1; display: flex; }
.flip { position: relative; flex: 1; min-height: 360px; transform-style: preserve-3d; transition: transform .55s cubic-bezier(.3, .9, .3, 1.1); cursor: pointer; }
.flip.on { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto;
  background: linear-gradient(160deg, rgba(59, 130, 246, .25), rgba(224, 64, 251, .14)), var(--glass); border: 1px solid var(--line2); box-shadow: 0 0 40px rgba(59, 130, 246, .2); }
.face.back { transform: rotateY(180deg); background: linear-gradient(160deg, rgba(34, 197, 94, .16), rgba(34, 211, 238, .12)), var(--glass); }
.face .q-type { align-self: flex-start; }
.f-ask { margin: 4px 0 0; font-size: .8rem; color: var(--mute); font-weight: 800; }
.f-desc { flex: 1; font-size: 1.02rem; line-height: 1.8; font-weight: 700; margin: 0; }
.f-code { flex: 1; display: grid; place-items: center; margin: 0; font-family: var(--num); font-size: 4rem; text-shadow: 0 0 24px var(--cyan); }
.f-name { flex: 1; display: grid; place-items: center; text-align: center; margin: 0; font-size: 1.8rem; font-weight: 900; }
.f-tap { text-align: center; margin: 0; font-size: .75rem; color: var(--cyan); animation: blink 1.6s infinite; }
.f-ans { font-size: 1.4rem; font-weight: 900; text-align: center; padding: 6px 0 4px; }
.f-ans .mono { color: var(--cyan); font-size: 1.1rem; margin-left: 6px; }
.face .stock-card .sc-name { display: none; }
.flash-btns { display: flex; gap: 10px; }
.flash-btns .btn { flex: 1; font-size: .92rem; padding: 14px 8px; white-space: nowrap; }
.f-ans { font-size: 1.2rem; line-height: 1.4; }

/* ---------- result ---------- */
.result { display: flex; flex-direction: column; gap: 14px; text-align: center; padding-top: 6px; }
.res-mode { margin: 0; font-weight: 900; letter-spacing: .08em; color: var(--mute); }
.res-sub { margin: 2px 0 0; font-size: .75rem; color: var(--dim); }
.res-rank-wrap { position: relative; height: 150px; display: grid; place-items: center; }
.res-rank { font-family: var(--num); font-size: 7.5rem; font-weight: 900; line-height: 1; animation: rankIn .8s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: .15s; }
@keyframes rankIn { from { transform: scale(3) rotate(-12deg); opacity: 0; filter: blur(8px); } }
.rank-SSS { background: linear-gradient(90deg, #fde68a, #f472b6, #22d3ee, #a78bfa, #fde68a); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 22px rgba(251, 191, 36, .7)); animation: rankIn .8s cubic-bezier(.2, 1.4, .4, 1) both .15s, rainbow 3s linear infinite; }
@keyframes rainbow { to { background-position: 300% 0; } }
.rank-SS { color: #fde68a; text-shadow: 0 0 30px rgba(251, 191, 36, .8); }
.rank-S { color: #f9a8d4; text-shadow: 0 0 30px rgba(244, 114, 182, .8); }
.rank-A { color: #67e8f9; text-shadow: 0 0 30px rgba(34, 211, 238, .7); }
.rank-B { color: #93c5fd; text-shadow: 0 0 24px rgba(59, 130, 246, .6); }
.rank-C { color: #94a3b8; }
.stamp { position: absolute; right: 8%; top: 18%; font-size: 1.5rem; font-weight: 900; padding: 6px 14px; border: 4px double currentColor; border-radius: 10px; transform: rotate(14deg); animation: stampIn .5s cubic-bezier(.3, 1.6, .5, 1) both .6s; letter-spacing: .1em; background: rgba(0, 0, 0, .3); }
.stamp.pass { color: #f43f5e; text-shadow: 0 0 10px rgba(244, 63, 94, .6); }
.stamp.fail { color: #94a3b8; }
@keyframes stampIn { from { transform: scale(3) rotate(14deg); opacity: 0; } }
.res-score small { font-family: var(--num); font-size: .7rem; letter-spacing: .2em; }
.res-score .big { font-size: 2.4rem; font-weight: 900; color: #fff; text-shadow: 0 0 20px rgba(147, 197, 253, .6); margin-top: 2px; }
.newrec { display: inline-block; margin-top: 8px; padding: 4px 14px; border-radius: 99px; background: linear-gradient(90deg, #f43f5e, #e040fb); font-weight: 900; font-size: .82rem; animation: bump 1s infinite; }
.res-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; }
.res-stats div { padding: 10px 6px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); }
.res-stats small { display: block; font-size: .62rem; }
.res-stats b { font-size: 1rem; }
.res-chara { display: flex; align-items: center; gap: 12px; text-align: left; }
.res-chara img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: top; border: 2px solid var(--cyan); box-shadow: 0 0 20px rgba(34, 211, 238, .5); flex: none; }
.bubble { position: relative; flex: 1; padding: 12px 14px; border-radius: 16px; background: #fff; color: #1e293b; font-weight: 800; font-size: .9rem; line-height: 1.5; }
.bubble::before { content: ''; position: absolute; left: -8px; top: 50%; transform: translateY(-50%); border: 8px solid transparent; border-right-color: #fff; border-left: 0; }
.xp-box { padding: 12px 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); }
.xp-top { display: flex; justify-content: space-between; font-weight: 800; margin-bottom: 8px; font-size: .85rem; }
.xp-top b { font-family: var(--num); color: var(--cyan); }
.xp-gain { font-family: var(--num); color: var(--gold); }
.xp-box .xp-bar { height: 10px; }
.misses { text-align: left; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); padding: 4px 12px; }
.misses summary { cursor: pointer; padding: 10px 0; font-weight: 800; font-size: .9rem; }
.miss-list { display: flex; flex-direction: column; gap: 6px; padding-bottom: 10px; }
.miss { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(0, 0, 0, .3); text-align: left; font-size: .88rem; }
.miss .mono { color: var(--cyan); font-size: .8rem; }
.miss b { flex: 1; }
.miss i { font-style: normal; color: var(--mute); }
.res-btns { display: flex; gap: 10px; }
.res-btns .btn { flex: 1; }
.unlock { margin: 0; font-weight: 900; color: var(--gold); animation: bump 1.2s infinite; }
.unlock.dim { color: var(--mute); animation: none; }

/* certificate */
.cert { padding: 6px; border-radius: 10px; background: linear-gradient(135deg, #b45309, #fde68a, #b45309, #fde68a); box-shadow: 0 10px 40px rgba(0, 0, 0, .5); animation: certIn .8s cubic-bezier(.2, 1.2, .4, 1) both 1s; }
@keyframes certIn { from { transform: translateY(30px) scale(.9); opacity: 0; } }
.cert-in { position: relative; padding: 18px 16px; border-radius: 6px; background: #fffbeb; color: #422006; border: 2px solid #b45309; font-family: 'Hiragino Mincho ProN', 'Yu Mincho', serif; }
.cert-t { margin: 0; font-size: 1.5rem; font-weight: 900; letter-spacing: .3em; color: #92400e; }
.cert-g { margin: 8px 0 0; font-size: .95rem; }
.cert-g b { font-size: 1.3rem; color: #b91c1c; }
.cert-n { margin: 10px 0; font-size: 1.25rem; font-weight: 900; border-bottom: 1px solid #b45309; display: inline-block; padding: 0 20px 2px; }
.cert-b { margin: 0; font-size: .78rem; line-height: 1.8; }
.cert-d { margin: 10px 0 0; font-size: .72rem; color: #78350f; }
.cert-seal { position: absolute; right: 14px; bottom: 12px; width: 46px; height: 46px; border-radius: 8px; border: 3px solid #dc2626; color: #dc2626; display: grid; place-items: center; font-weight: 900; font-size: 1.3rem; transform: rotate(-8deg); opacity: .85; }

/* perfect overlay */
.perfect { position: fixed; inset: 0; z-index: 950; display: grid; place-items: center; background: radial-gradient(circle, rgba(251, 191, 36, .3), rgba(5, 8, 22, .92) 70%), url(../assets/img/hero.jpg) center / cover, #050816; animation: scrIn .4s; }
.pf-in { text-align: center; padding: 20px; }
.pf-sss { font-family: var(--num); font-size: 8rem; font-weight: 900; line-height: 1; background: linear-gradient(90deg, #fde68a, #f472b6, #22d3ee, #fde68a); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 30px rgba(251, 191, 36, .9)); animation: rankIn 1s cubic-bezier(.2, 1.4, .4, 1) both, rainbow 3s linear infinite; }
.pf-t { font-size: 2.2rem; font-weight: 900; margin: 6px 0; text-shadow: 0 0 20px rgba(251, 191, 36, .8); }
.pf-line { font-size: 1.15rem; font-weight: 800; margin-bottom: 30px; color: #fde68a; }

/* ---------- charas ---------- */
.chara-list { display: flex; flex-direction: column; gap: 14px; }
.chara-card { display: flex; gap: 14px; padding: 14px; border-radius: 20px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 22%, transparent), transparent 60%), var(--glass); border: 1.5px solid color-mix(in srgb, var(--c) 40%, transparent); }
.chara-card.on { border-color: var(--c); box-shadow: 0 0 28px color-mix(in srgb, var(--c) 45%, transparent); }
.cc-img { width: 38%; flex: none; border-radius: 14px; overflow: hidden; background: #0b1230; }
.cc-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; min-height: 200px; }
.cc-body { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cc-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cc-top b { font-size: 1.15rem; font-weight: 900; color: var(--c); filter: brightness(1.4); }
.cc-type { font-size: .62rem; font-weight: 900; padding: 2px 8px; border-radius: 99px; background: var(--c); color: #fff; }
.cc-mk { font-size: .68rem; }
.cc-body p { margin: 2px 0; font-size: .78rem; line-height: 1.6; color: #cdd8f6; }
.cc-skill { font-size: .76rem; font-weight: 900; padding: 6px 8px; border-radius: 8px; background: rgba(0, 0, 0, .3); border-left: 3px solid var(--c); }
.stats { display: flex; flex-direction: column; gap: 3px; margin: 4px 0 6px; }
.stat { display: flex; align-items: center; gap: 8px; }
.stat small { width: 30px; font-size: .62rem; font-weight: 800; }
.stat span { display: flex; gap: 3px; }
.stat i { width: 14px; height: 6px; border-radius: 2px; background: rgba(255, 255, 255, .1); }
.stat i.on { background: var(--c); box-shadow: 0 0 6px var(--c); filter: brightness(1.3); }
.cc-body .btn { margin-top: auto; padding: 10px; font-size: .85rem; }

/* ---------- ranking ---------- */
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); margin-bottom: 14px; }
.tabs button { padding: 10px 2px; border-radius: 10px; font-size: .68rem; font-weight: 800; color: var(--mute); white-space: nowrap; letter-spacing: -.02em; }
.tabs button.on { background: linear-gradient(135deg, rgba(34, 211, 238, .3), rgba(59, 130, 246, .3)); color: #fff; box-shadow: 0 0 12px rgba(34, 211, 238, .25); }
.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); }
.rank-row.top1 { border-color: rgba(251, 191, 36, .7); box-shadow: 0 0 18px rgba(251, 191, 36, .25); background: linear-gradient(90deg, rgba(251, 191, 36, .15), transparent), var(--glass); }
.rank-row.top2 { border-color: rgba(203, 213, 225, .5); }
.rank-row.top3 { border-color: rgba(214, 144, 90, .5); }
.rk-pos { width: 30px; text-align: center; font-family: var(--num); font-weight: 900; font-size: 1.1rem; }
.rk-face { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; object-position: top; }
.rk-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rk-name b { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-name small { font-size: .64rem; }
.rk-score { font-weight: 800; color: var(--gold); font-size: .9rem; }
.rk-score i { font-style: normal; font-size: .65rem; color: var(--mute); }
.rk-pass { font-size: .7rem; font-weight: 900; color: #fff; background: #e11d48; padding: 3px 8px; border-radius: 6px; }
.rk-pass.off { background: rgba(255, 255, 255, .08); color: var(--dim); }
.empty { text-align: center; padding: 40px 20px; color: var(--mute); line-height: 1.8; border-radius: 16px; background: var(--glass); border: 1px dashed var(--line2); }

/* ---------- achievements ---------- */
.cur-title { text-align: center; padding: 12px; border-radius: 14px; background: rgba(251, 191, 36, .08); border: 1px solid rgba(251, 191, 36, .4); margin-bottom: 14px; font-size: .85rem; color: var(--mute); font-weight: 700; }
.cur-title b { color: var(--gold); font-size: 1.1rem; margin-left: 8px; text-shadow: 0 0 12px rgba(251, 191, 36, .6); }
.ach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ach { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 14px 8px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); text-align: center; opacity: .5; }
.ach.got { opacity: 1; border-color: rgba(251, 191, 36, .45); background: linear-gradient(160deg, rgba(251, 191, 36, .14), transparent), var(--glass); }
.ach.equip { border-color: var(--gold); box-shadow: 0 0 20px rgba(251, 191, 36, .45); }
.ach.equip::after { content: '装備中'; position: absolute; top: 6px; right: 6px; font-size: .55rem; font-weight: 900; background: var(--gold); color: #3b2500; padding: 2px 6px; border-radius: 4px; }
.ach-ic { font-size: 2rem; }
.ach b { font-size: .85rem; }
.ach small { font-size: .65rem; }
.ach-title { font-size: .72rem; font-weight: 900; color: var(--gold); }
.ach-date { font-size: .58rem; color: var(--dim); }

/* ---------- zukan ---------- */
.z-top { display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); margin-bottom: 12px; font-weight: 800; }
.z-top b { font-size: 1.4rem; color: var(--cyan); }
.z-top small { font-size: .62rem; font-weight: 700; }
.ring { width: 74px; height: 74px; flex: none; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--cyan) calc(var(--p) * 360deg), rgba(255, 255, 255, .08) 0); position: relative; }
.ring::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: #0b1230; }
.ring span { position: relative; font-size: .8rem; }
.z-filter { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.z-filter input, .z-filter select, .panel input[type=text] {
  width: 100%; padding: 12px 14px; border-radius: 12px; font-size: .9rem; font-weight: 700;
  background: rgba(0, 0, 0, .35); color: var(--text); border: 1px solid var(--line2); outline: none;
}
.z-filter select { padding: 10px 8px; font-size: .78rem; }
.z-filter input:focus, .panel input[type=text]:focus { border-color: var(--cyan); box-shadow: 0 0 12px rgba(34, 211, 238, .3); }
.z-count { font-size: .72rem; color: var(--mute); margin: 0 0 6px; font-weight: 700; }
.z-rows { display: flex; flex-direction: column; gap: 5px; }
.z-row { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); text-align: left; font-size: .86rem; }
.z-row .mono { color: var(--cyan); font-size: .76rem; width: 40px; }
.z-row b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.z-row.unk b { color: var(--mute); }
.z-row:active { transform: scale(.98); }

/* ---------- settings ---------- */
.toggle, .range { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; font-weight: 800; font-size: .9rem; border-bottom: 1px solid rgba(255, 255, 255, .05); cursor: pointer; }
.toggle input { display: none; }
.toggle i { width: 48px; height: 28px; border-radius: 99px; background: rgba(255, 255, 255, .12); position: relative; transition: background .2s; }
.toggle i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle input:checked + i { background: linear-gradient(135deg, var(--cyan), var(--blue)); box-shadow: 0 0 12px rgba(34, 211, 238, .5); }
.toggle input:checked + i::after { transform: translateX(20px); }
.range input { width: 55%; accent-color: var(--cyan); }
.credit { text-align: center; font-size: .66rem; color: var(--dim); line-height: 1.8; margin-top: 20px; }

/* ---------- overlays ---------- */
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(15, 23, 60, .95); border: 1px solid var(--line2); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); animation: toastIn .35s cubic-bezier(.2, 1.3, .4, 1); backdrop-filter: blur(10px); }
.toast.gold { border-color: var(--gold); box-shadow: 0 0 24px rgba(251, 191, 36, .4), 0 10px 30px rgba(0, 0, 0, .5); }
.toast.out { opacity: 0; transform: translateY(-10px); transition: all .4s; }
.toast b { display: block; font-size: .9rem; }
.toast small { font-size: .72rem; }
.t-ic { font-size: 1.6rem; flex: none; }
.t-ic img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; object-position: top; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-20px) scale(.95); } }

.modal-wrap { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(2, 4, 14, .72); backdrop-filter: blur(6px); animation: fadeIn .2s; }
.modal-wrap.out { opacity: 0; transition: opacity .2s; }
.modal { width: min(100%, 460px); max-height: 86vh; overflow-y: auto; padding: 18px; border-radius: 22px; background: linear-gradient(160deg, #141d4a, #0b1230); border: 1px solid var(--line2); box-shadow: 0 0 50px rgba(59, 130, 246, .3); animation: modalIn .3s cubic-bezier(.2, 1.3, .4, 1); }
.modal.small { width: min(100%, 360px); }
.confirm-msg { text-align: center; font-weight: 800; line-height: 1.7; margin: 6px 0 18px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: scale(.9) translateY(10px); } }

.pop-text { position: absolute; transform: translate(-50%, -50%); font-family: var(--num); font-weight: 900; font-size: 1.3rem; color: #fff; text-shadow: 0 0 12px var(--cyan), 0 2px 4px #000; animation: popUp 1.1s ease-out forwards; white-space: nowrap; }
.pop-text.gold { color: #fde68a; text-shadow: 0 0 14px #f59e0b, 0 2px 4px #000; }
@keyframes popUp { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 20% { opacity: 1; transform: translate(-50%, -80%) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -260%) scale(1); } }
.flash { position: absolute; inset: 0; animation: flash .45s ease-out forwards; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
.banner { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); padding: 14px 28px; border-radius: 16px; font-size: 1.4rem; font-weight: 900; white-space: nowrap; background: rgba(5, 8, 22, .85); border: 2px solid var(--cyan); box-shadow: 0 0 40px rgba(34, 211, 238, .6); animation: bannerIn 1.9s cubic-bezier(.2, 1.2, .4, 1) forwards; text-align: center; }
.banner b { color: var(--gold); margin-left: 6px; }
.banner.combo { border-color: #f43f5e; box-shadow: 0 0 40px rgba(244, 63, 94, .7); font-family: var(--num); font-size: 1.7rem; }
.banner.expand { border-color: var(--mag); box-shadow: 0 0 40px rgba(224, 64, 251, .7); font-size: 1.1rem; }
.banner.shield { border-color: var(--cyan); }
.banner.over { font-family: var(--num); font-size: 2.6rem; border-color: var(--ng); color: #fecaca; box-shadow: 0 0 60px rgba(239, 68, 68, .8); }
.banner.lvup { border-color: var(--gold); box-shadow: 0 0 40px rgba(251, 191, 36, .7); }
@keyframes bannerIn { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } 25% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -70%) scale(1); } }
.countdown { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(5, 8, 22, .55); }
.countdown span { font-family: var(--num); font-size: 7rem; font-weight: 900; color: #fff; text-shadow: 0 0 30px var(--cyan), 0 0 60px var(--blue); animation: cd .52s ease-out; }
.countdown span.go { color: var(--gold); text-shadow: 0 0 30px var(--gold), 0 0 60px #f97316; }
@keyframes cd { from { transform: scale(2); opacity: 0; } 40% { opacity: 1; transform: scale(1); } }
.shake { animation: shake .4s; }
@keyframes shake { 20% { transform: translate(-6px, 2px); } 40% { transform: translate(5px, -3px); } 60% { transform: translate(-4px, 1px); } 80% { transform: translate(3px, 0); } }

@media (min-width: 560px) {
  .q-prompt.desc { font-size: 1.05rem; }
  .choice { font-size: 1.02rem; }
}
@media (max-width: 360px) {
  .q-prompt.code { font-size: 2.8rem; }
  .slots span { width: 54px; height: 64px; }
  .mode-card.feature b { font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- daily ---------- */
.badge-new { display: inline-block; vertical-align: middle; font-family: var(--num); font-size: .55rem; letter-spacing: .1em; padding: 2px 6px; border-radius: 5px; background: linear-gradient(135deg, #f43f5e, #e040fb); color: #fff; animation: blink 1.4s infinite; }
.daily-card { animation: dailyGlow 2.6s ease-in-out infinite; }
.daily-card.done { animation: none; }
@keyframes dailyGlow { 50% { box-shadow: 0 0 26px rgba(251, 191, 36, .35), 0 10px 30px rgba(0, 0, 0, .35); } }
.daily-card .mc-best b { font-size: .82rem; }
.d-mini { font-style: normal; font-size: .66rem; font-weight: 900; color: #fb923c; margin-top: 2px; }
.d-hero { display: flex; gap: 10px; margin-bottom: 12px; }
.d-no, .d-streak { flex: 1; padding: 16px 12px; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.d-no { background: linear-gradient(160deg, rgba(251, 191, 36, .18), rgba(34, 211, 238, .1)), var(--glass); border-color: rgba(251, 191, 36, .45); }
.d-no small, .d-streak small { font-family: var(--num); font-size: .58rem; letter-spacing: .2em; }
.d-no b { font-size: 2rem; color: var(--gold); text-shadow: 0 0 16px rgba(251, 191, 36, .6); }
.d-no span { font-size: .78rem; font-weight: 800; color: #cfe3ff; }
.d-streak .flame { font-size: 1.6rem; filter: grayscale(1) opacity(.4); }
.d-streak.on .flame { filter: drop-shadow(0 0 12px #f97316); animation: floaty 1.6s ease-in-out infinite; }
.d-streak b { font-size: 1.9rem; line-height: 1; }
.d-streak.on b { color: #fb923c; text-shadow: 0 0 16px rgba(249, 115, 22, .7); }
.d-streak em { font-style: normal; font-size: .65rem; color: var(--dim); font-weight: 800; }
.d-start { margin-top: 4px; animation: pulseGold 2s ease-in-out infinite; }
@keyframes pulseGold { 50% { box-shadow: 0 0 40px rgba(251, 191, 36, .75); } }
.d-next { text-align: center; font-size: .78rem; color: var(--mute); font-weight: 700; margin: 12px 0; }
.d-next b { color: var(--cyan); font-size: .95rem; margin-left: 6px; }
.d-today { padding: 16px; border-radius: var(--r); background: linear-gradient(160deg, rgba(34, 197, 94, .14), rgba(34, 211, 238, .08)), var(--glass); border: 1px solid rgba(34, 197, 94, .45); margin-bottom: 12px; }
.d-today-top { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.d-today-top > div:last-child { display: flex; flex-direction: column; }
.d-today-top small { font-size: .68rem; font-weight: 800; }
.d-today-top b { font-size: 1.6rem; color: #fff; }
.d-today-top b i { font-style: normal; font-size: .7rem; color: var(--mute); margin-left: 3px; }
.d-today-top span { font-size: .75rem; color: var(--mute); font-weight: 800; }
.res-rank.sm { font-size: 3.6rem; width: 84px; text-align: center; }
.d-log { display: flex; justify-content: center; gap: 5px; }
.d-log i { width: 22px; height: 22px; border-radius: 6px; }
.d-log i.ok { background: linear-gradient(135deg, #4ade80, #16a34a); box-shadow: 0 0 8px rgba(34, 197, 94, .6); }
.d-log i.ng { background: linear-gradient(135deg, #f87171, #b91c1c); box-shadow: 0 0 8px rgba(239, 68, 68, .5); }
.daily-share { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-d { aspect-ratio: 1; border-radius: 9px; display: grid; place-items: center; font-family: var(--num); font-size: .7rem; font-weight: 800; color: var(--dim); background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .06); }
.cal-d.today { border: 2px solid var(--cyan); color: #fff; box-shadow: 0 0 12px rgba(34, 211, 238, .45); }
.cal-d.r-SSS, .cal-d.r-SS, .cal-d.r-S { background: linear-gradient(135deg, #fbbf24, #f472b6); color: #3b0a2a; border-color: transparent; }
.cal-d.r-A, .cal-d.r-B { background: linear-gradient(135deg, #22d3ee, #3b82f6); color: #04223a; border-color: transparent; }
.cal-d.r-C { background: #475569; color: #e2e8f0; border-color: transparent; }
.cal-legend { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 6px; margin-top: 10px; font-size: .64rem; color: var(--mute); font-weight: 700; }
.cal-legend .cal-d { width: 18px; font-size: .5rem; border-radius: 5px; margin-left: 6px; }

/* ---------- survival stage (VTuber風) ---------- */
.vt-stage { margin-top: auto; position: relative; display: flex; align-items: flex-end; gap: 10px; height: 150px; margin-left: -16px; margin-right: -16px; padding: 0 16px; pointer-events: none;
  background: linear-gradient(0deg, color-mix(in srgb, var(--c) 22%, transparent), transparent 85%); border-bottom: 2px solid color-mix(in srgb, var(--c) 70%, transparent); }
.vt-av { position: relative; width: 120px; height: 150px; flex: none; animation: breathe 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
.vt-glow { position: absolute; left: 50%; bottom: 2px; width: 110px; height: 22px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(color-mix(in srgb, var(--c) 80%, transparent), transparent 70%); filter: blur(2px); }
.vt-img { position: absolute; left: 50%; bottom: 0; height: 150px; width: auto; max-width: none; transform: translateX(-50%); opacity: 0; transition: opacity .12s; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--c) 60%, transparent)); }
.vt-img.on { opacity: 1; }
.vt-img.fb { height: 110px; width: 110px; bottom: 12px; border-radius: 50%; object-fit: cover; object-position: top; border: 3px solid var(--c); }
.vt-av.hop { animation: hop .5s cubic-bezier(.3, 1.6, .5, 1), breathe 3.2s ease-in-out infinite .5s; }
.vt-av.shake { animation: shakeX .45s, breathe 3.2s ease-in-out infinite .45s; }
@keyframes breathe { 50% { transform: translateY(-2px) scale(1.015, .99); } }
@keyframes hop { 0% { transform: translateY(0) scale(1, 1); } 25% { transform: translateY(4px) scale(1.06, .92); } 55% { transform: translateY(-18px) scale(.96, 1.05); } 100% { transform: none; } }
.vt-side { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding-bottom: 10px; }
.vt-name { font-weight: 900; font-size: .85rem; color: #fff; text-shadow: 0 0 10px var(--c); }
.vt-name small { display: block; font-size: .62rem; color: var(--mute); font-weight: 800; text-shadow: none; }
.vt-bubble { order: -1; align-self: flex-start; position: relative; max-width: 100%; padding: 9px 13px; border-radius: 14px; background: #fff; color: #1e293b; font-weight: 900; font-size: .85rem; line-height: 1.4; opacity: 0; transform: translateY(6px) scale(.9); transform-origin: left bottom; transition: opacity .18s, transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.vt-bubble::after { content: ''; position: absolute; left: -7px; bottom: 10px; border: 7px solid transparent; border-right-color: #fff; border-left: 0; }
.vt-bubble.show { opacity: 1; transform: none; }

/* ---------- combo cut-in ---------- */
.cutin { position: absolute; inset: 0; }
.ci-band { position: absolute; left: -10%; right: -10%; top: var(--y, 65%); height: 130px; overflow: hidden;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, #000), var(--c) 45%, color-mix(in srgb, var(--c) 60%, #fff));
  box-shadow: 0 0 50px var(--c), inset 0 3px 0 rgba(255, 255, 255, .7), inset 0 -3px 0 rgba(255, 255, 255, .7);
  transform: skewY(-4deg) scaleX(0); transform-origin: left center; animation: ciBand 1.65s cubic-bezier(.2, .9, .3, 1) forwards; }
.ci-lines { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .0) 0 26px, rgba(255, 255, 255, .25) 26px 30px); animation: ciLines .4s linear infinite; }
.ci-img { position: absolute; left: 0; top: calc(var(--y, 65%) - 40px); height: 240px; width: auto; max-width: none; filter: drop-shadow(0 6px 20px rgba(0, 0, 0, .6)); animation: ciImg 1.65s cubic-bezier(.2, .9, .3, 1) forwards; }
.ci-img.fb { height: 140px; width: 140px; top: calc(var(--y, 65%) - 5px); border-radius: 50%; object-fit: cover; object-position: top; border: 4px solid #fff; }
.ci-text { position: absolute; right: 5%; top: calc(var(--y, 65%) + 14px); text-align: right; animation: ciText 1.65s cubic-bezier(.2, .9, .3, 1) forwards; max-width: 58%; }
.ci-text b { display: block; font-size: 2rem; font-weight: 900; color: #fff; text-shadow: 3px 3px 0 rgba(0, 0, 0, .35), 0 0 20px rgba(255, 255, 255, .8); font-style: italic; }
.ci-text span { display: inline-block; margin-top: 6px; padding: 6px 12px; border-radius: 10px; background: rgba(5, 8, 22, .85); font-weight: 900; font-size: .95rem; color: #fff; }
@keyframes ciBand { 0% { transform: skewY(-4deg) scaleX(0); opacity: 1; } 14% { transform: skewY(-4deg) scaleX(1); } 82% { opacity: 1; transform: skewY(-4deg) scaleX(1); } 100% { opacity: 0; transform: skewY(-4deg) scaleX(1) translateY(-20px); } }
@keyframes ciLines { to { background-position: 30px 0; } }
@keyframes ciImg { 0% { transform: translateX(-110%); } 18% { transform: translateX(-4%); } 80% { transform: translateX(4%); opacity: 1; } 100% { transform: translateX(30%); opacity: 0; } }
@keyframes ciText { 0%, 12% { transform: translateX(120%); opacity: 0; } 26% { transform: translateX(-4%); opacity: 1; } 80% { transform: translateX(0); opacity: 1; } 100% { transform: translateX(-20%); opacity: 0; } }

/* ---------- survival roguelike ---------- */
.cc-img img { object-fit: contain; object-position: bottom; padding-top: 6px; }
.cp-detail b small { font-size: .7rem; margin-left: 4px; }
.psv { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(0, 0, 0, .28); }
.psv > span { font-size: 1.4rem; }
.psv b { display: block; font-size: .85rem; }
.psv small { display: block; font-size: .72rem; color: #d6defa; }
.choice.gone { opacity: 0; transform: scale(.9); pointer-events: none; transition: opacity .35s, transform .35s; }
.q-card.boss { border-color: #f43f5e; box-shadow: 0 0 46px rgba(244, 63, 94, .55), inset 0 0 30px rgba(244, 63, 94, .15); background: linear-gradient(160deg, rgba(244, 63, 94, .28), rgba(124, 58, 237, .18)), var(--glass); }
.q-card.boss .q-type { background: rgba(244, 63, 94, .25); border-color: #f43f5e; color: #fecdd3; }
.banner.boss { border-color: #f43f5e; box-shadow: 0 0 50px rgba(244, 63, 94, .8); color: #fecdd3; }
.surv-strip { display: flex; flex-wrap: nowrap; justify-content: safe center; gap: 5px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.surv-strip::-webkit-scrollbar { display: none; }
.surv-strip > * { flex: none; }
.surv-strip:empty { display: none; }
.sc { position: relative; display: inline-flex; align-items: center; gap: 3px; padding: 3px 7px; border-radius: 8px; font-size: .9rem; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
.sc i { font-style: normal; font-family: var(--num); font-size: .55rem; color: var(--gold); }
.sc.r2 { border-color: rgba(96, 165, 250, .7); box-shadow: 0 0 8px rgba(96, 165, 250, .35); }
.sc.r3 { border-color: rgba(224, 64, 251, .8); box-shadow: 0 0 10px rgba(224, 64, 251, .45); }
.ev-chip { padding: 3px 10px; border-radius: 99px; font-size: .7rem; font-weight: 900; background: rgba(251, 191, 36, .16); border: 1px solid rgba(251, 191, 36, .6); color: #fde68a; animation: pulseGold 2s infinite; }
.ev-chip b { color: #fff; margin-left: 4px; }

.card-pick, .event-pop { position: fixed; inset: 0; z-index: 940; display: grid; place-items: center; padding: 16px; background: rgba(2, 4, 14, .78); backdrop-filter: blur(6px); animation: fadeIn .2s; }
.card-pick.out, .event-pop.out { opacity: 0; transition: opacity .25s; }
.cpk-in { width: min(100%, 480px); text-align: center; }
.cpk-t { margin: 0 0 14px; font-size: 1.15rem; font-weight: 900; text-shadow: 0 0 16px rgba(34, 211, 238, .7); }
.cpk-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pcard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px 12px; min-height: 200px; border-radius: 16px; text-align: center;
  background: linear-gradient(170deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .02)), #121a44; border: 2px solid rgba(148, 163, 184, .5);
  animation: cardIn .45s cubic-bezier(.2, 1.3, .4, 1) both; animation-delay: var(--d); transition: transform .15s, box-shadow .2s; }
.pcard:hover { transform: translateY(-6px); }
.pcard:active { transform: scale(.96); }
.pcard.r2 { border-color: #60a5fa; box-shadow: 0 0 20px rgba(96, 165, 250, .4); }
.pcard.r3 { border-color: #e040fb; box-shadow: 0 0 26px rgba(224, 64, 251, .55); background: linear-gradient(170deg, rgba(224, 64, 251, .22), rgba(34, 211, 238, .08)), #121a44; }
.pc-rar { font-family: var(--num); font-size: .55rem; letter-spacing: .12em; color: var(--mute); }
.r2 .pc-rar { color: #93c5fd; } .r3 .pc-rar { color: #f0abfc; }
.pc-ic { font-size: 2.2rem; filter: drop-shadow(0 0 10px rgba(255, 255, 255, .35)); }
.pcard b { font-size: .86rem; line-height: 1.3; }
.pcard b i { display: block; font-style: normal; font-family: var(--num); font-size: .6rem; color: var(--gold); }
.pcard small { font-size: .7rem; line-height: 1.5; color: #d6defa; }
.pcard kbd { margin-top: auto; font-family: var(--num); font-size: .6rem; color: var(--dim); }
@keyframes cardIn { from { opacity: 0; transform: translateY(40px) rotateY(80deg); } }
.ev-in { width: min(100%, 360px); padding: 22px; border-radius: 22px; text-align: center; background: linear-gradient(160deg, rgba(251, 191, 36, .22), rgba(224, 64, 251, .14)), #121a44; border: 2px solid var(--gold); box-shadow: 0 0 50px rgba(251, 191, 36, .45); animation: modalIn .35s cubic-bezier(.2, 1.3, .4, 1); }
.ev-in small { font-family: var(--num); letter-spacing: .25em; font-size: .62rem; color: #fde68a; }
.ev-ic { display: block; font-size: 3rem; margin: 6px 0; }
.ev-in b { font-size: 1.4rem; }
.ev-in p { margin: 6px 0 0; font-weight: 800; font-size: .88rem; color: #e2e8f0; }
.owned { padding: 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); }
.owned small { display: block; margin-bottom: 8px; font-weight: 800; }
.owned > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.owned .sc { font-size: .75rem; font-weight: 800; }
@media (max-width: 380px) { .cpk-list { gap: 6px; } .pcard { padding: 12px 5px; } .pcard small { font-size: .64rem; } }

/* ---------- survival routes / boss battle ---------- */
.stage-chip .area-prog { margin-left: 8px; font-family: var(--num); font-size: .8em; color: var(--mute); }
.stage-chip .boss-chip { color: #fecdd3; font-weight: 900; text-shadow: 0 0 10px rgba(244, 63, 94, .8); }
.stage-chip .pips { display: inline-flex; gap: 5px; margin-left: 8px; vertical-align: middle; }
.stage-chip .pips i { width: 11px; height: 11px; border-radius: 50%; border: 2px solid #f43f5e; }
.stage-chip .pips i.hit { background: #22d3ee; border-color: #22d3ee; box-shadow: 0 0 8px #22d3ee; }
.stage-chip .pips i.miss { background: #475569; border-color: #475569; }
.ev-in.boss-in { border-color: #f43f5e; box-shadow: 0 0 60px rgba(244, 63, 94, .6); background: linear-gradient(160deg, rgba(244, 63, 94, .3), rgba(124, 58, 237, .2)), #121a44; }
.ev-in .sub { font-size: .76rem; color: #fde68a; }
.ev-in.lose { border-color: #64748b; box-shadow: none; background: #121a44; }
.cpk-t small { display: block; margin-top: 4px; font-size: .72rem; color: #fde68a; text-shadow: none; }
.pcard.route { border-color: rgba(34, 211, 238, .6); }
.pcard.route.home { border-color: var(--gold); box-shadow: 0 0 24px rgba(251, 191, 36, .5); }
.rt-home { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); padding: 1px 10px; border-radius: 99px; font-size: .65rem; font-weight: 900; background: var(--gold); color: #1a1300; white-space: nowrap; }
.rt-meta { display: flex; flex-direction: column; gap: 2px; font-size: .68rem; font-weight: 800; }
.rt-diff { color: #fbbf24; letter-spacing: .1em; }
.rt-rew { color: #67e8f9; font-family: var(--num); }
.rt-arrow { align-self: center; color: var(--dim); }

.mode-grid .span2 { grid-column: span 2; }

/* ---------- rank D / E ---------- */
.rank-D { color: #a8a29e; }
.rank-E { color: #78716c; }

/* ---------- 検定（新方式） ---------- */
.kt-best { text-align: center; padding: 18px 14px; border-radius: 20px; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 22%, transparent), rgba(255, 255, 255, .03)), var(--glass); border: 2px solid color-mix(in srgb, var(--c) 70%, transparent); box-shadow: 0 0 30px color-mix(in srgb, var(--c) 30%, transparent); }
.kt-best small { display: block; font-size: .72rem; color: var(--mute); font-weight: 800; }
.kt-rank { font-family: var(--num); font-size: 4.2rem; font-weight: 900; line-height: 1.1; }
.kt-best b { display: block; font-size: 1.1rem; }
.kt-meta { display: block; margin-top: 4px; font-size: .72rem; color: var(--mute); }
.kt-plan { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); font-size: .82rem; }
.kt-plan > b { display: block; margin-bottom: 6px; }
.kt-plan div { display: flex; gap: 10px; padding: 3px 0; }
.kt-plan .num { width: 64px; color: var(--gold); font-size: .75rem; }
.kt-plan small { display: block; margin-top: 6px; color: var(--mute); font-size: .7rem; }
.kt-table { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 12px 0 16px; }
.kt-table div { text-align: center; padding: 8px 2px; border-radius: 10px; background: rgba(0, 0, 0, .25); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); }
.kt-table b { display: block; font-family: var(--num); font-size: 1.05rem; color: var(--c); }
.kt-table span { display: block; font-size: .6rem; font-weight: 800; }
.kt-table small { display: block; font-size: .52rem; color: var(--mute); line-height: 1.3; margin-top: 2px; }
.cert-g2 { margin: 2px 0 8px; font-weight: 900; font-size: 1rem; }

/* ---------- シェア ---------- */
.btn.share { margin: 4px 0 10px; background: linear-gradient(90deg, #0ea5e9, #8b5cf6); color: #fff; border: 0; box-shadow: 0 0 20px rgba(139, 92, 246, .45); }
.share-t { margin: 0 0 10px; font-weight: 900; font-size: 1.1rem; text-align: center; }
.share-pre { margin: 0 0 12px; padding: 12px; border-radius: 12px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); white-space: pre-wrap; word-break: break-all; font: 700 .82rem/1.6 var(--font, inherit); }
.share-btns { display: grid; gap: 8px; }
.btn.sns { display: flex; justify-content: center; align-items: center; text-decoration: none; color: #fff; border: 0; font-weight: 900; }
.btn.sns.x { background: #000; border: 1px solid #333; }
.btn.sns.line { background: #06c755; }
.btn.sns.more { background: #334155; }

/* ---------- 初回の名前入力 ---------- */
.onb { text-align: center; }
.onb-face { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; object-position: top; border: 3px solid #4A90E2; box-shadow: 0 0 20px rgba(74, 144, 226, .6); }
.onb-t { margin: 8px 0 4px; font-size: 1.2rem; font-weight: 900; }
.onb-s { margin: 0 0 12px; font-size: .78rem; color: #d6defa; line-height: 1.6; }
.onb input { width: 100%; padding: 12px 14px; margin-bottom: 10px; border-radius: 12px; border: 2px solid var(--line); background: rgba(0, 0, 0, .35); color: #fff; font: inherit; font-weight: 800; font-size: 1rem; text-align: center; }
.onb input:focus { outline: none; border-color: #22d3ee; box-shadow: 0 0 14px rgba(34, 211, 238, .5); }
.onb input.shake { animation: shake .4s; border-color: #f43f5e; }

/* ---------- なかよし度 ---------- */
.bond-box { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: linear-gradient(120deg, color-mix(in srgb, var(--c) 22%, transparent), rgba(255, 255, 255, .03)); border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); }
.bond-box img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: top; border: 2px solid var(--c); }
.bb-body { flex: 1; min-width: 0; }
.bb-top { display: flex; justify-content: space-between; font-size: .8rem; }
.bb-top span { color: #f9a8d4; font-weight: 900; font-family: var(--num); }
.bb-bar { height: 8px; margin: 6px 0 3px; border-radius: 99px; background: rgba(0, 0, 0, .4); overflow: hidden; }
.bb-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #f472b6, #fbbf24); box-shadow: 0 0 10px #f472b6; }
.bond-box small, .ccb-top small { font-size: .68rem; color: var(--mute); }
.bb-up { margin-top: 6px; padding: 4px 8px; border-radius: 8px; background: rgba(244, 114, 182, .18); font-size: .72rem; font-weight: 900; color: #fbcfe8; animation: pulseGold 2s infinite; }
.cc-bond { margin: 8px 0; padding: 8px 10px; border-radius: 12px; background: rgba(0, 0, 0, .25); }
.ccb-top { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; }
.ccb-story { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.ccb-story .chip { padding: 4px 8px; font-size: .66rem; }
.ccb-story .chip.lock { opacity: .5; }
.story { text-align: center; }
.story img { height: 200px; object-fit: contain; filter: drop-shadow(0 0 16px var(--c)); }
.story small { display: block; margin-top: 6px; font-size: .7rem; color: var(--mute); font-weight: 800; }
.story b { display: block; margin: 4px 0 8px; font-size: 1.15rem; }
.story p { margin: 0 0 14px; text-align: left; font-size: .88rem; line-height: 1.9; color: #e2e8f0; }
.cutin.gold .ci-band { background: linear-gradient(90deg, #92400e, #fbbf24 45%, #fef3c7); box-shadow: 0 0 60px #fbbf24, inset 0 3px 0 #fff, inset 0 -3px 0 #fff; }

/* ---------- デイリーミッション ---------- */
.ms-card { display: block; width: 100%; padding: 0; text-align: left; }
.missions { padding: 12px 14px; border-radius: 16px; background: var(--glass); border: 1px solid rgba(251, 191, 36, .35); margin-bottom: 12px; }
.missions.compact { margin-bottom: 0; padding: 10px 12px; }
.ms-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: .85rem; }
.ms-head .num { color: var(--gold); }
.ms-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.ms-row + .ms-row { border-top: 1px dashed rgba(255, 255, 255, .08); }
.ms-ic { font-size: .8rem; }
.ms-body { flex: 1; min-width: 0; }
.ms-body b { display: block; font-size: .76rem; }
.ms-bar { height: 5px; margin-top: 4px; border-radius: 99px; background: rgba(0, 0, 0, .4); overflow: hidden; }
.ms-bar i { display: block; height: 100%; background: linear-gradient(90deg, #22d3ee, #fbbf24); }
.ms-rw { text-align: right; font-size: .68rem; font-weight: 800; font-family: var(--num); white-space: nowrap; }
.ms-rw small { display: block; font-size: .58rem; color: var(--mute); font-family: inherit; }
.ms-row.done b { color: var(--mute); text-decoration: line-through; }
.ms-row.done .ms-rw { color: #4ade80; }
.ms-note { margin: 6px 0 0; font-size: .68rem; color: var(--mute); }
.missions.compact .ms-note { display: none; }
.toast.gold { border-color: var(--gold); box-shadow: 0 0 24px rgba(251, 191, 36, .45); }

/* ---------- コレクション ---------- */
.cl-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.cl-sum div { text-align: center; padding: 8px 4px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); }
.cl-sum small { display: block; font-size: .62rem; color: var(--mute); }
.cl-sum b { font-size: .95rem; color: var(--gold); }
.tabs:has(> :nth-child(5)) { grid-template-columns: repeat(5, 1fr); }
.cl-note { margin: 0 0 10px; font-size: .72rem; color: var(--mute); text-align: center; }
.cl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.cl-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 8px; border-radius: 14px; text-align: center; background: var(--glass); border: 1px solid var(--line); }
.cl-item > span { font-size: 1.9rem; }
.cl-item b { font-size: .8rem; }
.cl-item small { font-size: .64rem; color: #cbd5e1; line-height: 1.4; }
.cl-item em { font-style: normal; font-size: .62rem; color: var(--gold); font-weight: 800; }
.cl-item.r2 { border-color: #60a5fa; } .cl-item.r3 { border-color: #e040fb; }
.cl-item.boss { border-color: #f43f5e; }
.cl-item.unk { opacity: .45; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.bdg { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); text-align: center; }
.bdg b { font-size: .68rem; line-height: 1.3; }
.bdg small { font-size: .6rem; color: var(--mute); }
.bdg-ring { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#22d3ee calc(var(--p) * 360deg), rgba(255, 255, 255, .08) 0); }
.bdg-ring span { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #0d1336; font-size: 1.3rem; }
.bdg.bronze { border-color: #d6905a; } .bdg.silver { border-color: #cbd5e1; } .bdg.gold { border-color: var(--gold); box-shadow: 0 0 14px rgba(251, 191, 36, .45); }
.shiny-list { display: grid; gap: 6px; }
.shiny-card { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; text-align: left; background: linear-gradient(110deg, rgba(251, 191, 36, .2), rgba(224, 64, 251, .18), rgba(34, 211, 238, .18)); border: 1px solid var(--gold); }
.shiny-card b { flex: 1; font-size: .85rem; }
.shiny-card small { font-size: .62rem; color: var(--mute); }

/* ---------- オリジナルアイコン（絵文字の置き換え） ---------- */
img.emo { display: inline-block; width: 1.25em; height: 1.25em; vertical-align: -0.28em; object-fit: contain; margin: 0 .04em; pointer-events: none; user-select: none; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); }
.mc-ic img.emo, .pc-ic img.emo, .ev-ic img.emo, .ach-ic img.emo, .cl-item > span img.emo, .bdg-ring img.emo { width: 1.1em; height: 1.1em; vertical-align: middle; }
.sub-nav button span img.emo { width: 1.5em; height: 1.5em; }
.t-ic img.emo { width: 1.6em; height: 1.6em; }
.tier-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; box-shadow: 0 0 6px currentColor; }
.tier-dot.t1 { background: #4ade80; color: #4ade80; } .tier-dot.t2 { background: #facc15; color: #facc15; } .tier-dot.t3 { background: #f87171; color: #f87171; }

/* ---------- メニュー：スクロールしにくいコンパクト配置（画面の高さに合わせて詰める） ---------- */
.screen-menu { --g: clamp(6px, 1.3vh, 12px); --pad: clamp(9px, 1.7vh, 18px); }
.menu, .mn-col { display: flex; flex-direction: column; gap: var(--g); }
.screen-menu .profile { padding: clamp(6px, 1vh, 10px) 12px; }
.screen-menu .profile img { width: clamp(36px, 5.5vh, 46px); height: clamp(36px, 5.5vh, 46px); }
.screen-menu .ticker { height: clamp(24px, 3.2vh, 30px); }
.screen-menu .mode-card { padding: var(--pad) 12px; }
.screen-menu .mode-card.feature, .screen-menu .mode-card.wide { padding: var(--pad) 14px; gap: 12px; }
.screen-menu .mode-card.feature .mc-ic, .screen-menu .mode-card.wide .mc-ic { font-size: clamp(1.6rem, 3.6vh, 2.2rem); }
.screen-menu .mode-card.feature b { font-size: clamp(1.15rem, 2.6vh, 1.35rem); }
.screen-menu .mode-grid { gap: var(--g); }
.mode-grid.g3 { grid-template-columns: repeat(3, 1fr); }
.mode-grid.g3 .mode-card { align-items: center; text-align: center; padding: var(--pad) 6px; }
.mode-grid.g3 .mode-card::after { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: 3px; background: linear-gradient(90deg, var(--c), var(--c2)); }
.mode-grid.g3 .mode-card b { font-size: clamp(.8rem, 3.3vw, .98rem); white-space: nowrap; }
.mode-grid.g3 .mode-card small { font-size: .62rem; line-height: 1.3; }
.screen-menu .mc-ic { font-size: clamp(1.4rem, 3.2vh, 1.7rem); margin-bottom: 2px; }
.mode-card.slim { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 2px; align-items: center; }
.mode-card.slim .mc-ic { grid-row: span 3; margin: 0; }
.mode-card.slim b { font-size: .92rem; }
.mode-card.slim small { font-size: .64rem; }
.mode-card.slim small b { font-size: .8rem; color: var(--cyan); }
.mode-card.slim .mini-bar { margin-top: 3px; }
.mode-card.slim .cl-sh b { color: var(--gold); }
.screen-menu .sub-nav { margin-top: 0; gap: 6px; }
.screen-menu .sub-nav button { padding: clamp(7px, 1.2vh, 12px) 4px; font-size: .66rem; }
.screen-menu .sub-nav button span { font-size: clamp(1.1rem, 2.6vh, 1.4rem); }
.ms-card .ms-strip { display: flex; align-items: center; gap: 10px; padding: clamp(7px, 1.1vh, 10px) 12px; border-radius: 14px; background: var(--glass); border: 1px solid rgba(251, 191, 36, .35); font-size: .78rem; }
.ms-strip > b { white-space: nowrap; }
.ms-strip .num { color: var(--gold); font-size: .8rem; }
.mss-bars { flex: 1; display: flex; gap: 5px; }
.mss-bars > i { flex: 1; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.mss-bars > i > i { display: block; height: 100%; background: linear-gradient(90deg, #22d3ee, #fbbf24); }
.mss-bars > i.done > i { background: #4ade80; box-shadow: 0 0 6px #4ade80; }
.mss-go { color: var(--mute); font-weight: 900; }
/* 画面が低いとき（横向きスマホ・小さいPCウィンドウ） */
@media (max-height: 640px) {
  .screen-menu .mode-grid.g3 .mode-card small { display: none; }
}
/* 横に広い画面（PC・タブレット横・スマホ横）は2列 */
@media (min-width: 760px) and (min-aspect-ratio: 5/4) {
  body[data-scr="menu"] #app { max-width: 980px; }
  .menu { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .screen-menu { --g: clamp(6px, 1.6vh, 14px); --pad: clamp(8px, 2.2vh, 20px); }
}
@media (min-width: 760px) and (min-aspect-ratio: 5/4) and (min-height: 560px) {
  body[data-scr="menu"] #app { display: flex; flex-direction: column; justify-content: center; }
}
.mode-card.slim small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mode-card.slim > * { min-width: 0; }
.mn-col { min-width: 0; }
@media (min-width: 760px) and (min-aspect-ratio: 5/4) {
  html:has(body[data-scr="menu"]) { font-size: clamp(14px, 2.15vh, 22px); }
  body[data-scr="menu"] #app { max-width: min(1180px, 150vh); }
  .screen-menu .profile img { width: clamp(36px, 6vh, 64px); height: clamp(36px, 6vh, 64px); }
  .screen-menu .ticker { height: clamp(24px, 4vh, 40px); }
  .screen-menu .mss-bars > i { height: 8px; }
}
@media (min-width: 760px) and (min-aspect-ratio: 5/4) {
  .menu { align-items: stretch; }
  .mn-col > .mode-card, .mn-col > .mode-grid, .mn-col > .sub-nav { flex: 1 1 auto; }
  .mn-col .mode-grid > .mode-card, .mn-col .sub-nav > button { justify-content: center; }
}
.mode-card.slim b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 760px) and (min-aspect-ratio: 5/4) and (max-height: 460px) {
  html:has(body[data-scr="menu"]) { font-size: 13px; }
}
body[data-scr="menu"] #app { display: flex; flex-direction: column; justify-content: center; }
@media (min-width: 600px) and (max-aspect-ratio: 5/4) and (min-height: 860px) {
  html:has(body[data-scr="menu"]) { font-size: 18px; }
  body[data-scr="menu"] #app { max-width: 620px; }
}

/* ---------- 初回ガイド（銘柄検定へ） ---------- */
.guide .onb-s b { color: var(--gold); }
.gd-rank { font-family: var(--num); letter-spacing: .05em; }
.gd-steps { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.gd-steps li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.gd-steps li:first-child { border-color: rgba(251, 191, 36, .6); background: rgba(251, 191, 36, .12); box-shadow: 0 0 14px rgba(251, 191, 36, .25); }
.gd-steps li > span { font-size: 1.4rem; }
.gd-steps b { display: block; font-size: .85rem; }
.gd-steps small { font-size: .68rem; }
.gd-later { margin-top: 8px; font-size: .85rem; padding: 10px; }
.mode-card.guide { border-color: rgba(251, 191, 36, .8); animation: guideGlow 1.6s ease-in-out infinite; overflow: visible; }
@keyframes guideGlow { 50% { box-shadow: 0 0 0 2px rgba(251, 191, 36, .9), 0 0 26px rgba(251, 191, 36, .6); } }
.gd-badge { position: absolute !important; top: -9px; left: 50%; transform: translateX(-50%); z-index: 2; white-space: nowrap; font-size: .6rem; font-weight: 900; padding: 2px 8px; border-radius: 99px; background: linear-gradient(135deg, #fbbf24, #f97316); color: #1a1030; box-shadow: 0 0 10px rgba(251, 191, 36, .8); animation: gdBob 1.2s ease-in-out infinite; }
@keyframes gdBob { 50% { transform: translateX(-50%) translateY(-3px); } }
/* ---------- 応援（OFUSE） ---------- */
.panel.support { border-color: rgba(251, 191, 36, .45); background: linear-gradient(145deg, rgba(251, 191, 36, .1), rgba(244, 114, 182, .08)), var(--glass); }
.sup-btn { text-decoration: none; color: #1a1030; background: linear-gradient(135deg, #fde68a, #fbbf24 55%, #f472b6); border: none; font-weight: 900; box-shadow: 0 0 18px rgba(251, 191, 36, .45); }
/* ---------- オンライン（全国）ランキング ---------- */
.ol-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0; padding: 12px 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); font-size: .8rem; }
.ol-box.wait { color: var(--mute); justify-content: center; }
.ol-box.off { justify-content: center; text-align: center; }
.ol-box.ok { border-color: rgba(34, 211, 238, .55); background: linear-gradient(135deg, rgba(34, 211, 238, .14), rgba(224, 64, 251, .1)), var(--glass); box-shadow: 0 0 22px rgba(34, 211, 238, .2); animation: olIn .45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes olIn { from { transform: scale(.9); opacity: 0; } }
.olb-main { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; }
.olb-main small { width: 100%; font-size: .66rem; letter-spacing: .1em; color: var(--cyan); font-weight: 800; }
.olb-main b { font-size: 1.9rem; color: #fff; text-shadow: 0 0 14px rgba(34, 211, 238, .8); line-height: 1; }
.olb-main b i { font-style: normal; font-size: .9rem; margin-left: 2px; }
.olb-main span { font-weight: 800; color: #cfe6ff; }
.olb-new, .olb-best { font-style: normal; font-weight: 900; font-size: .72rem; padding: 3px 9px; border-radius: 99px; }
.olb-new { background: linear-gradient(135deg, #fbbf24, #f472b6); color: #1a1030; }
.olb-best { background: rgba(255, 255, 255, .08); color: #cbd8ff; }
.olb-go { width: 100%; padding: 9px; font-size: .82rem; }
.ol-spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .2); border-top-color: var(--cyan); animation: olSpin .8s linear infinite; vertical-align: -2px; }
@keyframes olSpin { to { transform: rotate(360deg); } }
.rk-scope { margin: 10px 0 4px; }
.rk-total { text-align: center; font-size: .78rem; color: var(--mute); margin: 6px 0 10px; }
.rk-total b { color: var(--cyan); }
.rank-row.me { border-color: rgba(251, 191, 36, .7) !important; box-shadow: 0 0 16px rgba(251, 191, 36, .3); background: linear-gradient(90deg, rgba(251, 191, 36, .14), transparent), var(--glass); }
.rk-you { font-style: normal; font-size: .6rem; padding: 1px 6px; border-radius: 99px; background: var(--gold); color: #1a1030; vertical-align: 2px; }
.rk-gap { text-align: center; color: var(--mute); letter-spacing: .3em; margin: 2px 0; }
.rank-row .rk-pos.num { font-size: .75rem; }
.rank-row .rk-score i { font-style: normal; font-size: .7em; margin-left: 1px; color: var(--mute); }
.sc-none { color: var(--mute); font-style: italic; }
