/* ワカルラン：うしろは3Dの世界、手前はぷっくりした立体ボタンとガラスの表示。Wakaru Lens と同じ空色・丸いフォント */
:root {
  --mc: #1cb0f6; --mc-dark: #1386c0; --ink: #1f2a44; --sub: #5b6478;
  --ok: #58cc02; --ok-dark: #3f9a00; --ng: #ff4b4b; --ng-dark: #d33131; --gold: #ffc800; --gold-dark: #e09a00;
  --safe-top: env(safe-area-inset-top); --safe-bottom: env(safe-area-inset-bottom);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif; color: var(--ink);
  background: #8fc7ee; overflow: hidden; overscroll-behavior: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
[hidden] { display: none !important; }
.m-zzz { display: none; }

/* ===== 3Dの世界 ===== */
.view { position: fixed; inset: 0; z-index: 0; }
.view canvas { display: block; width: 100% !important; height: 100% !important; touch-action: none; }
.view.shake { animation: shake .45s ease-out; }
@keyframes shake { 15% { transform: translate(-7px, 3px); } 30% { transform: translate(6px, -4px); } 45% { transform: translate(-4px, 2px); } 60% { transform: translate(3px, -1px); } 80% { transform: translate(-1px, 1px); } }

.screen { position: fixed; inset: 0; z-index: 2; display: flex; flex-direction: column; padding: calc(10px + var(--safe-top)) 16px calc(14px + var(--safe-bottom)); animation: enter .28s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
.screen > * { width: 100%; max-width: 560px; margin-left: auto; margin-right: auto; }
.screen.panel { background: radial-gradient(120% 70% at 50% 0%, #bfe9ff 0%, #8fd2fb 45%, #5fb4ee 100%); }
.screen.panel::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 20% 30%, #fff3 0 2px, transparent 3px) 0 0 / 46px 46px, radial-gradient(circle at 70% 70%, #fff2 0 1.5px, transparent 2.5px) 0 0 / 34px 34px; pointer-events: none; }
.scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 2px 24px; position: relative; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }

/* ===== 起動 ===== */
.boot { position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; justify-items: center; gap: 18px; background: radial-gradient(circle at 50% 35%, #49c4ff, #1477d6); color: #fff; transition: opacity .5s; }
.boot.done { opacity: 0; pointer-events: none; }
.boot-logo { font-size: 46px; font-weight: 900; letter-spacing: 1px; text-shadow: 0 5px 0 #0d5aa8, 0 10px 24px #0005; }
.boot-logo span { color: #ffe14a; }
.boot-bar { width: 200px; height: 12px; border-radius: 99px; background: #0004; overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #ffe14a, #ffb800); transition: width .4s; }
.boot p { margin: 0; font-weight: 800; font-size: 13px; opacity: .9; }

/* ===== 部品 ===== */
.round { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #fff; color: var(--ink); font-size: 20px; font-weight: 900; box-shadow: 0 4px 0 #0002, inset 0 -3px 0 #0001; }
.round:active { transform: translateY(3px); box-shadow: 0 1px 0 #0002; }
.round.small { width: 36px; height: 36px; font-size: 16px; }
.round.off { color: #b0b6c4; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 6px; border-radius: 99px; background: #0d1a33a8; color: #fff; font-weight: 900; font-size: 15px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); white-space: nowrap; }
.pill::before { content: ""; width: 24px; height: 24px; border-radius: 50%; flex: none; }
.pill.coin::before, .cn { background: radial-gradient(circle at 35% 30%, #fff6b0, #ffd23a 45%, #e09a00 100%); box-shadow: inset 0 -2px 0 #b97600, 0 0 0 2px #fff4; }
.cn { display: inline-block; width: 15px; height: 15px; border-radius: 50%; vertical-align: -2px; margin-right: 3px; }
.pill.fire::before { background: radial-gradient(circle at 50% 75%, #ffe14a 0 25%, #ff8a00 45%, #ff3d2e 70%); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
.pill.star::before { background: #ffc800; clip-path: polygon(50% 2%, 63% 36%, 98% 38%, 70% 60%, 80% 96%, 50% 75%, 20% 96%, 30% 60%, 2% 38%, 37% 36%); width: 22px; height: 22px; }
.pill.star { padding-left: 8px; }

/* 立体ボタン（ツヤつき） */
.gbtn { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 100%; min-height: 56px; padding: 10px 14px; border-radius: 20px;
  background: linear-gradient(#ffffff, #eef3f9); color: var(--ink); box-shadow: 0 6px 0 #c9d3e0, 0 10px 18px #0002; transition: transform .08s; overflow: hidden; }
.gbtn::before { content: ""; position: absolute; left: 10px; right: 10px; top: 5px; height: 38%; border-radius: 14px; background: linear-gradient(#ffffffa0, #fff0); pointer-events: none; }
.gbtn b { font-size: 18px; font-weight: 900; letter-spacing: .5px; position: relative; }
.gbtn small { font-size: 11.5px; font-weight: 800; opacity: .9; position: relative; }
.gbtn:active { transform: translateY(5px); box-shadow: 0 1px 0 #c9d3e0; }
.gbtn.primary { background: linear-gradient(#7ee02a, #4cb800); color: #fff; box-shadow: 0 6px 0 #2f8a00, 0 10px 20px #2f8a0055; text-shadow: 0 2px 0 #0003; }
.gbtn.primary:active { box-shadow: 0 1px 0 #2f8a00; }
.gbtn.orange { background: linear-gradient(#ffc04a, #ff8a00); color: #fff; box-shadow: 0 6px 0 #c55e00, 0 10px 20px #c55e0055; text-shadow: 0 2px 0 #0003; }
.gbtn.orange:active { box-shadow: 0 1px 0 #c55e00; }
.gbtn.purple { background: linear-gradient(#c79bff, #8a52f0); color: #fff; box-shadow: 0 6px 0 #5f2fc0, 0 10px 20px #5f2fc055; text-shadow: 0 2px 0 #0003; }
.gbtn.purple:active { box-shadow: 0 1px 0 #5f2fc0; }
.gbtn.ghost { background: #ffffff55; color: #fff; box-shadow: none; border: 2px solid #ffffffa0; min-height: 48px; }
.gbtn.ghost::before { display: none; }
.gbtn.big { min-height: 76px; border-radius: 24px; }
.gbtn.big b { font-size: 24px; }
.gbtn.primary.big::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, #fff0, #fff8, #fff0); animation: shine 3.2s ease-in-out infinite; }
@keyframes shine { 55%, 100% { left: 130%; } }

.hbar { display: flex; align-items: center; gap: 10px; min-height: 48px; position: relative; z-index: 2; }
.hbar > b { flex: 1; font-size: 20px; font-weight: 900; color: #fff; text-shadow: 0 2px 0 #0003; }
.hbar.clear > b { text-shadow: 0 2px 6px #0006; }
.grp { margin: 16px 4px 8px; font-size: 14px; font-weight: 900; color: #fff; letter-spacing: 2px; text-shadow: 0 2px 0 #0002; display: flex; align-items: center; gap: 8px; }
.grp::after { content: ""; flex: 1; height: 2px; border-radius: 2px; background: #ffffff70; }

/* ===== タイトル ===== */
.screen.title { padding-bottom: calc(10px + var(--safe-bottom)); background: linear-gradient(#0000 0%, #0000 52%, #0b1f3b55 75%, #0b1f3bb0 100%); }
.tbar { display: flex; gap: 8px; align-items: center; }
.tbar .round { margin-left: auto; }
.logo { text-align: center; margin-top: 2vh; }
.logo-sub { margin: 0; display: inline-block; padding: 4px 14px; border-radius: 99px; background: #fff; color: #1386c0; font-weight: 900; font-size: 13px; box-shadow: 0 3px 0 #0002; }
.logo h1 { margin: 4px 0 0; font-size: clamp(52px, 15vw, 76px); line-height: 1; font-weight: 900; letter-spacing: -1px; animation: bob 3s ease-in-out infinite; }
.logo h1 span { display: inline-block; background: linear-gradient(#ffffff 0%, #e6f6ff 55%, #9fdcff 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 3px #0f6cc4; paint-order: stroke fill; filter: drop-shadow(0 5px 0 #0a4f96) drop-shadow(0 12px 16px #0005); }
.logo h1 .l2 { background-image: linear-gradient(#fff7b0 0%, #ffd23a 55%, #ff9f1a 100%); -webkit-text-stroke-color: #c25a00; filter: drop-shadow(0 5px 0 #8a3c00) drop-shadow(0 12px 16px #0005); transform: rotate(-4deg); margin-left: 2px; }
@keyframes bob { 50% { transform: translateY(-5px); } }
.logo-tag { margin: 8px 0 0; color: #fff; font-weight: 900; font-size: 13px; text-shadow: 0 2px 4px #0007; }
.tmenu { margin-top: auto; display: grid; gap: 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px 7px; border-radius: 16px; background: #ffffffe8; font-size: 12.5px; font-weight: 900; box-shadow: 0 4px 0 #0002; }
.tile:active { transform: translateY(3px); box-shadow: none; }
.ic { width: 28px; height: 28px; border-radius: 9px; display: block; position: relative; }
.ic-shop { background: linear-gradient(135deg, #ff7ec4, #d9559e); }
.ic-shop::after { content: ""; position: absolute; left: 6px; right: 6px; top: 9px; height: 9px; background: #fff; border-radius: 9px 9px 2px 2px; box-shadow: 0 5px 0 -2px #fff; }
.ic-rec { background: linear-gradient(135deg, #ffd04a, #e09a00); }
.ic-rec::after { content: ""; position: absolute; left: 7px; bottom: 6px; width: 3px; height: 8px; background: #fff; box-shadow: 5px -4px 0 #fff, 10px -8px 0 #fff; border-radius: 2px; }
.ic-help { background: linear-gradient(135deg, #5ad0ff, #1386c0); }
.ic-help::after { content: "?"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 17px; }
.foot { margin: 10px 0 0; text-align: center; font-size: 10px; color: #ffffffc0; font-weight: 700; }

/* ===== ジャンル ===== */
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cat { position: relative; display: grid; grid-template-columns: 46px 1fr; grid-template-rows: auto auto auto auto; column-gap: 10px; align-items: center; text-align: left; padding: 12px 12px 10px; border-radius: 20px; background: #fff; box-shadow: 0 5px 0 #0000001f, 0 10px 18px #0002; overflow: hidden; }
.cat::before { content: ""; position: absolute; right: -24px; top: -24px; width: 80px; height: 80px; border-radius: 50%; background: linear-gradient(135deg, var(--c1), var(--c2)); opacity: .12; }
.cat:active { transform: translateY(4px); box-shadow: 0 1px 0 #0000001f; }
.cat .cat-ic { grid-row: 1 / 3; }
.cat b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 900; line-height: 1.2; }
.cat small { font-size: 10.5px; color: var(--sub); font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cat .bar { grid-column: 1 / 3; margin-top: 9px; }
.cat .cnt { grid-column: 1 / 3; font-size: 10.5px; color: var(--sub); font-weight: 800; margin-top: 3px; }
.cat-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(140deg, var(--c1), var(--c2)); box-shadow: inset 0 -4px 0 #0002, inset 0 3px 0 #fff5, 0 3px 6px #0002; position: relative; overflow: hidden; }
.cat-ic::after { content: ""; position: absolute; left: 4px; right: 4px; top: 3px; height: 40%; border-radius: 10px; background: linear-gradient(#fff8, #fff0); }
.cat-ic span { color: #fff; font-weight: 900; font-size: 21px; text-shadow: 0 2px 0 #0003; position: relative; z-index: 1; }
.cat-ic.sm { width: 32px; height: 32px; border-radius: 10px; }
.cat-ic.sm span { font-size: 14px; }
.bar { display: block; height: 8px; border-radius: 9px; background: #e8eef6; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, var(--c1, #ffc800), var(--c2, #ff9600)); }

/* ===== ステージの道 ===== */
.map { padding-top: 26px; }
.map::after { content: ""; position: absolute; left: 50%; top: 30px; bottom: 30px; width: 10px; margin-left: -5px; background: repeating-linear-gradient(#ffffff90 0 14px, #fff0 14px 26px); border-radius: 5px; z-index: 0; }
.node { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; width: 72%; margin: 0 auto 18px; transform: translateX(var(--off)); text-align: left; }
.disc { flex: none; width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; font-weight: 900; color: #fff;
  background: radial-gradient(circle at 35% 28%, #fff8 0 14%, transparent 34%), linear-gradient(140deg, var(--c1), var(--c2)); box-shadow: 0 6px 0 #0003, 0 0 0 5px #fff, 0 12px 18px #0003; text-shadow: 0 2px 0 #0003; }
.node:active .disc { transform: translateY(4px); box-shadow: 0 2px 0 #0003, 0 0 0 5px #fff; }
.node.done .disc { box-shadow: 0 6px 0 #0003, 0 0 0 5px #ffd23a, 0 12px 18px #0003; }
.node.lock .disc { background: linear-gradient(140deg, #c9d2de, #9aa6b8); font-size: 22px; }
.node.lock .ninfo { background: #ffffffb8; } .node.lock .ninfo b { color: #6a7488; }
.node.now .disc { animation: beat 1.4s ease-in-out infinite; }
@keyframes beat { 50% { transform: scale(1.08); } }
.node.weak .disc { background: linear-gradient(140deg, #ff8a7a, #e8432e); }
.ninfo { display: flex; flex-direction: column; gap: 1px; padding: 8px 12px; border-radius: 14px; background: #ffffffe6; box-shadow: 0 3px 0 #0001; min-width: 0; flex: 1; }
.ninfo b { font-size: 15px; font-weight: 900; }
.ninfo small { font-size: 11px; color: var(--sub); font-weight: 700; }
.nst i { font-style: normal; color: #d8dee8; font-size: 15px; }
.nst i.on { color: #ffc800; text-shadow: 0 1px 0 #c58a00; }
.here { position: absolute; left: 6px; top: -16px; padding: 3px 9px; border-radius: 9px; background: #ff4b4b; color: #fff; font-size: 11px; font-weight: 900; box-shadow: 0 3px 0 #b02a2a; animation: bob 1.2s ease-in-out infinite; }
.map-foot { padding-top: 6px; position: relative; z-index: 2; }

/* ===== プレイ ===== */
.screen.play { padding: 0; pointer-events: none; animation: none; }
.screen.play > * { pointer-events: auto; max-width: none; }
.hud-top { position: relative; z-index: 3; display: flex; align-items: center; gap: 10px; margin: calc(8px + var(--safe-top)) 10px 0 !important; width: auto !important; padding: 5px 10px 5px 5px; border-radius: 99px; background: #0d1a3366; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.prog { flex: 1; display: flex; gap: 4px; align-items: center; }
.prog i { flex: 1; height: 10px; border-radius: 6px; background: #ffffff40; }
.prog i.ok { background: #6ee01a; } .prog i.ng { background: #ff5a5a; } .prog i.now { background: #fff; box-shadow: 0 0 8px #fff; }
.prog i.boss { flex: 1.5; background: linear-gradient(90deg, #ff9a3a55, #ff4b4b88); }
.prog i.boss.now { background: #ffd23a; } .prog i.boss.ok { background: #6ee01a; } .prog i.boss.ng { background: #ff5a5a; }
.prog .no { color: #fff; font-weight: 900; font-size: 17px; letter-spacing: 1px; }
.hearts { display: flex; gap: 3px; }
.hearts i { width: 22px; height: 20px; background: #ffffff40; clip-path: path("M11 19 C4 13 0 10 0 5.5 C0 2.4 2.4 0 5.5 0 C8 0 9.8 1.5 11 3.4 C12.2 1.5 14 0 16.5 0 C19.6 0 22 2.4 22 5.5 C22 10 18 13 11 19Z"); }
.hearts i.on { background: linear-gradient(#ff8a8a, #ff3b3b); }
.hud-score { position: relative; z-index: 3; display: flex; align-items: center; gap: 8px; margin: 6px 14px 0 !important; width: auto !important; pointer-events: none !important; }
.hud-score b { font-size: 26px; font-weight: 900; color: #fff; -webkit-text-stroke: 5px #0d1a33aa; paint-order: stroke fill; letter-spacing: .5px; }
.combo { font-size: 13px; font-weight: 900; color: #fff; background: linear-gradient(#ff9f3a, #ff6a00); padding: 2px 10px; border-radius: 99px; box-shadow: 0 2px 0 #b84a00; }
.combo:empty { display: none; }
.combo.hot { background: linear-gradient(#ffe14a, #ffb800); color: #6a3a00; box-shadow: 0 2px 0 #b07800, 0 0 14px #ffd23a; animation: beat .6s ease-in-out infinite; }
.qcard { position: relative; z-index: 3; margin: 8px 12px 0 !important; width: auto !important; padding: 12px 16px 14px; border-radius: 22px; background: linear-gradient(#0f1d38d8, #0a1529c8); color: #fff; border: 1px solid #ffffff2e; box-shadow: 0 12px 30px #0004; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); max-height: 30vh; overflow-y: auto; }
.qcard.in { animation: drop .32s cubic-bezier(.3, 1.4, .6, 1); }
@keyframes drop { from { transform: translateY(-18px) scale(.96); opacity: 0; } }
.qcard.boss { border: 2px solid #ff6a3a; box-shadow: 0 0 0 3px #ff6a3a44, 0 12px 30px #0005; }
.qmeta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 6px; font-size: 11.5px; font-weight: 800; color: #9fd8ff; }
.chip { padding: 2px 10px; border-radius: 99px; color: #fff; font-weight: 900; font-size: 11px; }
.qtext { margin: 0; font-size: 20px; line-height: 1.5; font-weight: 900; text-align: center; letter-spacing: .3px; }
.qcard.long .qtext { font-size: 14.5px; text-align: left; font-weight: 800; line-height: 1.6; }
.qitems { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.qitems:empty { display: none; }
.qitems li { font-size: 13px; line-height: 1.5; padding: 4px 8px; border-radius: 8px; background: #ffffff18; }
.count { position: fixed; z-index: 3; right: 12px; top: calc(38vh + var(--safe-top)); width: 72px !important; height: 72px; display: grid; place-items: center; color: #fff; text-shadow: 0 2px 6px #0008; }
.count svg { position: absolute; inset: 0; transform: rotate(-90deg); filter: drop-shadow(0 3px 8px #0006); }
.count circle { fill: #0d1a3399; stroke-width: 8; }
.count .ring-bg { stroke: #ffffff38; }
.count .ring { fill: none; stroke: #6ee01a; stroke-linecap: round; stroke-dasharray: 276.5; }
.count b { position: relative; font-size: 30px; font-weight: 900; }
.count.low .ring { stroke: #ff4b4b; }
.count.low { animation: beat .5s ease-in-out infinite; }
.count.low b { color: #ffd0d0; }
.banner { position: fixed; z-index: 5; left: 0; right: 0; top: 40%; margin: 0 !important; max-width: none !important; text-align: center; font-size: 64px; font-weight: 900; color: #fff; -webkit-text-stroke: 8px #0d1a33; paint-order: stroke fill; opacity: 0; pointer-events: none !important; }
.banner.show { animation: bannerIn 1s ease-out forwards; }
@keyframes bannerIn { 0% { opacity: 0; transform: scale(2.2); } 18% { opacity: 1; transform: scale(.92); } 28% { transform: scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: scale(1.05); } }
.banner.cd { font-size: 96px; top: 24%; }
.banner.go { top: 24%; }
.banner.go { color: #b6ff5a; -webkit-text-stroke-color: #1f5a00; font-size: 84px; }
.banner.boss { color: #ffdd55; -webkit-text-stroke-color: #a8180a; font-size: 72px; letter-spacing: 6px; }
.banner.boss.show { animation-duration: 1.4s; }
.banner.fever { color: #fff2a0; -webkit-text-stroke-color: #b05a00; font-size: 50px; }
.banner.place { top: 30%; font-size: 26px; -webkit-text-stroke: 6px #0d1a33aa; letter-spacing: 4px; }
.banner.place.show { animation-duration: 1.8s; }
.pop { position: fixed; z-index: 5; left: 0; right: 0; top: 33%; margin: 0 !important; max-width: none !important; text-align: center; opacity: 0; pointer-events: none !important; display: flex; flex-direction: column; align-items: center; }
.pop b { font-size: 38px; font-weight: 900; font-style: italic; color: #fff; -webkit-text-stroke: 6px #1f5a00; paint-order: stroke fill; letter-spacing: 1px; }
.pop span { font-size: 26px; font-weight: 900; color: #ffe14a; -webkit-text-stroke: 5px #7a4a00; paint-order: stroke fill; }
.pop.perfect b { color: #ffe14a; -webkit-text-stroke-color: #8a3c00; text-shadow: 0 0 18px #ffd23a; }
.pop.great b { color: #b6ff5a; }
.pop.good b { color: #9fe0ff; -webkit-text-stroke-color: #0d4a7a; }
.pop.miss b { color: #ff8a8a; -webkit-text-stroke-color: #6a0a0a; }
.pop.show { animation: popUp 1.1s ease-out forwards; }
@keyframes popUp { 0% { opacity: 0; transform: translateY(20px) scale(.5); } 15% { opacity: 1; transform: translateY(0) scale(1.15); } 25% { transform: scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-40px); } }

.answers { position: fixed; z-index: 3; left: 10px; right: 10px; bottom: calc(10px + var(--safe-bottom)); width: auto !important; max-width: 560px !important; margin: 0 auto !important; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.answers.kako { grid-template-columns: 1fr; gap: 6px; }
.ans { position: relative; display: flex; gap: 9px; align-items: center; text-align: left; min-height: 66px; border-radius: 18px; background: linear-gradient(#ffffff, #f0f4fa); box-shadow: 0 5px 0 color-mix(in srgb, var(--lc) 70%, #000), 0 8px 16px #0003; padding: 8px 10px; font-size: 16.5px; font-weight: 900; line-height: 1.3; transition: transform .12s, opacity .2s, filter .2s; animation: ansIn .3s cubic-bezier(.3, 1.4, .6, 1) backwards; }
.ans:nth-child(2) { animation-delay: .04s; } .ans:nth-child(3) { animation-delay: .08s; } .ans:nth-child(4) { animation-delay: .12s; }
@keyframes ansIn { from { transform: translateY(30px); opacity: 0; } }
.answers.long .ans { font-size: 14.5px; }
.answers.kako .ans { min-height: 44px; font-size: 13px; font-weight: 800; padding: 6px 10px; }
.ans b { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--lc); color: #fff; font-size: 15px; box-shadow: inset 0 -3px 0 #0002; }
.ans:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--lc); }
.ans.on { background: linear-gradient(color-mix(in srgb, var(--lc) 30%, #fff), #fff); transform: translateY(-4px) scale(1.03); box-shadow: 0 5px 0 color-mix(in srgb, var(--lc) 70%, #000), 0 0 0 3px var(--lc), 0 0 24px var(--lc); }
.ans.dim { opacity: .45; filter: saturate(.4); transform: scale(.96); }
.ans.right { background: linear-gradient(#e2ffc8, #c8f7a0); box-shadow: 0 5px 0 var(--ok-dark), 0 0 0 3px var(--ok); opacity: 1; filter: none; }
.ans.wrong { background: linear-gradient(#ffe0e0, #ffc4c4); box-shadow: 0 5px 0 var(--ng-dark), 0 0 0 3px var(--ng); }

/* ダッシュの集中線・フィーバーの光 */
.fx-lines, .fx-fever { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .2s; }
.fx-lines { background: repeating-conic-gradient(from 0deg at 50% 45%, #fff0 0deg 4deg, #ffffff55 4.4deg 5deg, #fff0 5.4deg 9deg);
  -webkit-mask: radial-gradient(circle at 50% 45%, #0000 0 30%, #000 75%); mask: radial-gradient(circle at 50% 45%, #0000 0 30%, #000 75%); }
body.dash .fx-lines { opacity: 1; animation: spinLines .25s linear infinite; }
@keyframes spinLines { to { transform: rotate(4deg) scale(1.03); } }
.fx-fever { box-shadow: inset 0 0 60px 10px #ffd23a; }
body.fever .fx-fever { opacity: 1; animation: glowPulse .8s ease-in-out infinite; }
@keyframes glowPulse { 50% { opacity: .45; } }

.sheet { position: fixed; z-index: 7; left: 0; right: 0; bottom: 0; max-width: 560px !important; margin: 0 auto !important; background: #fff; padding: 16px 18px calc(16px + var(--safe-bottom)); border-radius: 26px 26px 0 0; box-shadow: 0 -10px 30px #0003; animation: up .3s cubic-bezier(.3, 1.3, .6, 1); border-top: 6px solid var(--ng); }
@keyframes up { from { transform: translateY(100%); } }
.sheet-head { display: flex; align-items: center; gap: 10px; }
.sheet-head .mascot { width: 64px; flex: none; margin: -6px 0; }
.sheet-h { margin: 0; font-size: 20px; font-weight: 900; color: var(--ng-dark); }
.sheet-a { margin: 2px 0 0; font-weight: 800; font-size: 14.5px; }
.sheet-a b { color: var(--ok-dark); font-size: 17px; }
.sheet-why { margin: 10px 0 14px; padding: 10px 12px; border-radius: 14px; background: #f3f6fb; font-size: 14px; line-height: 1.65; color: #3d4560; font-weight: 700; max-height: 24vh; overflow-y: auto; }
.pause { position: fixed; inset: 0; z-index: 9; display: grid; place-items: center; background: #0b1a33a0; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); width: auto !important; max-width: none !important; }
.pause-box { width: min(300px, 84vw); padding: 20px; border-radius: 24px; background: #fff; display: grid; gap: 12px; text-align: center; box-shadow: 0 10px 30px #0005; }
.pause-box p { margin: 0 0 4px; font-size: 20px; font-weight: 900; }
.pause-box .gbtn.ghost { color: var(--sub); border-color: #dde3ec; }

/* ===== 結果 ===== */
.result .scroll { padding-top: 8px; }
.res-top { position: relative; text-align: center; padding: 14px 16px 18px; border-radius: 26px; background: #fff; box-shadow: 0 6px 0 #0000001a, 0 14px 30px #0002; margin-top: 40px; }
.res-top .mascot { width: 104px; margin: -62px auto -4px; }
.res-stars { margin: 0; font-size: 44px; letter-spacing: 6px; line-height: 1; min-height: 4px; }
.res-stars i { font-style: normal; color: #e3e8f0; display: inline-block; }
.res-stars i.on { color: #ffc800; text-shadow: 0 3px 0 #d39200; animation: starPop .5s cubic-bezier(.3, 1.6, .5, 1) backwards; animation-delay: calc(var(--d) + .3s); }
@keyframes starPop { from { transform: scale(0) rotate(-90deg); } }
.res-top h2 { margin: 8px 0 6px; font-size: 22px; font-weight: 900; }
.res-score { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.res-score small { width: 100%; font-size: 12px; color: var(--sub); font-weight: 800; }
.res-score b { font-size: 46px; font-weight: 900; line-height: 1.1; color: #136fd8; }
.rank { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 30px; font-weight: 900; color: #fff; transform: rotate(-8deg); box-shadow: 0 4px 0 #0003; animation: starPop .5s .6s cubic-bezier(.3, 1.6, .5, 1) backwards; }
.rank.rS { background: linear-gradient(135deg, #ffe14a, #ff9f1a); } .rank.rA { background: linear-gradient(135deg, #ff7a7a, #e8432e); } .rank.rB { background: linear-gradient(135deg, #5ad0ff, #1386c0); } .rank.rC { background: linear-gradient(135deg, #b8c2d0, #7a8698); }
.res-new { margin: 6px auto 0; display: inline-block; padding: 3px 12px; border-radius: 99px; background: #ff4b4b; color: #fff; font-weight: 900; font-size: 13px; animation: beat 1s ease-in-out infinite; }
.res-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.res-stats span { display: flex; flex-direction: column; padding: 8px 2px; border-radius: 12px; background: #f3f6fb; font-size: 10.5px; font-weight: 800; color: var(--sub); }
.res-stats b { font-size: 17px; color: var(--ink); }
.res-coins { margin: 12px 0 0; font-weight: 900; font-size: 16px; color: #b07800; }
.res-coins .cn { width: 18px; height: 18px; }
.btns { display: grid; gap: 12px; margin: 18px 0 6px; }
.rv-h { margin: 20px 4px 8px; color: #fff; font-size: 15px; font-weight: 900; text-shadow: 0 2px 0 #0002; }
.review { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.review li { background: #fff; border-radius: 16px; padding: 10px 12px; box-shadow: 0 3px 0 #0001; border-left: 6px solid var(--ok); }
.review li.ng { border-left-color: var(--ng); }
.rq { margin: 0; font-size: 14px; font-weight: 800; line-height: 1.5; display: flex; gap: 6px; }
.rq .mk { flex: none; font-weight: 900; color: var(--ok-dark); }
.review li.ng .rq .mk { color: var(--ng); }
.ra { margin: 4px 0 0; font-size: 13px; font-weight: 900; color: var(--ok-dark); }
.ra .you { color: var(--ng); font-weight: 800; margin-left: 4px; }
.rw { margin: 5px 0 0; font-size: 12.5px; line-height: 1.6; color: #4a5370; font-weight: 700; }
.rw a, .cta { color: #e07a00; font-weight: 900; }
.cta { display: block; padding: 12px; border-radius: 16px; background: #fff4e0; text-decoration: none; text-align: center; font-size: 13px; }

/* ===== きせかえ ===== */
.shop { padding-bottom: 0; }
.shop-panel { margin-top: auto !important; background: #fff; border-radius: 26px 26px 0 0; padding: 12px 14px calc(14px + var(--safe-bottom)); box-shadow: 0 -10px 30px #0003; max-height: 48vh; display: flex; flex-direction: column; }
.tabs { display: flex; gap: 6px; margin-bottom: 10px; flex: none; }
.tabs button { flex: 1; padding: 8px; border-radius: 12px; background: #eef2f8; font-weight: 900; color: var(--sub); }
.tabs button.on { background: var(--mc); color: #fff; box-shadow: 0 3px 0 var(--mc-dark); }
.items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; overflow-y: auto; padding: 2px 2px 6px; }
.item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 16px; background: #f5f8fc; box-shadow: 0 3px 0 #0000001a; border: 2px solid transparent; }
.item:active { transform: translateY(2px); }
.item.on { border-color: var(--ok); background: #effde3; }
.item.pv { border-color: var(--gold); background: #fff8dc; animation: beat 1s ease-in-out infinite; }
.item b { font-size: 12.5px; font-weight: 900; }
.item small { font-size: 11px; font-weight: 800; color: var(--sub); }
.item.on small { color: var(--ok-dark); }
.hat-ic { font-size: 26px; line-height: 1.2; }
.sw { width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 -3px 0 #0002, 0 2px 4px #0002; margin: 2px 0; }

/* ===== きろく・あそびかた ===== */
.rec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rec-grid div { display: flex; flex-direction: column; align-items: center; padding: 12px 6px; border-radius: 18px; background: #fff; box-shadow: 0 4px 0 #0000001a; }
.rec-grid b { font-size: 24px; font-weight: 900; color: #136fd8; }
.rec-grid small { font-size: 11.5px; font-weight: 800; color: var(--sub); }
.rec-row { display: grid; grid-template-columns: 32px 92px 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 14px; background: #fff; margin-bottom: 6px; }
.rec-row b { font-size: 13px; font-weight: 900; }
.rec-row small { font-size: 11px; font-weight: 800; color: var(--sub); }
.help ol { margin: 6px 0; padding: 14px 16px 14px 34px; border-radius: 20px; background: #fff; box-shadow: 0 4px 0 #0000001a; }
.help li { margin: 0 0 10px; line-height: 1.7; font-size: 14.5px; font-weight: 700; }
.help .note { color: #fff; font-weight: 800; font-size: 13px; padding: 0 6px; }

.toast-top { position: fixed; z-index: 30; left: 50%; top: calc(14px + var(--safe-top)); transform: translate(-50%, -150%); padding: 10px 18px; border-radius: 99px; background: #0d1a33e6; color: #fff; font-weight: 900; font-size: 14px; transition: transform .25s cubic-bezier(.3, 1.4, .6, 1), opacity .2s; white-space: nowrap; opacity: 0; pointer-events: none; }
.toast-top.show { transform: translate(-50%, 0); opacity: 1; }
.fx { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 40; }
.fx i { position: absolute; width: 9px; height: 13px; border-radius: 2px; animation: conf 1.2s ease-out forwards; }
@keyframes conf { to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }

@media (max-height: 720px) {
  .qtext { font-size: 18px; } .ans { min-height: 56px; font-size: 15px; } .qcard { max-height: 26vh; }
  .gbtn.big { min-height: 64px; } .logo h1 { font-size: 54px; } .count { width: 62px !important; height: 62px; }
}
@media (min-width: 700px) { .count { right: calc(50% - 300px); } }

/* ランキング */
.ic-rank { background: linear-gradient(135deg, #ffb84a, #e2721c); }
.ic-rank::after { content: "1"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 16px; }
.rankbox .nick { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 16px; padding: 8px 10px; margin-bottom: 10px; box-shadow: 0 4px 0 #0000001a; }
.rankbox .nick label { font-size: 12px; font-weight: 900; color: var(--sub); flex: none; }
.rankbox .nick input { flex: 1; min-width: 0; font: inherit; font-weight: 800; font-size: 16px; border: 2px solid #e3e8f0; border-radius: 10px; padding: 6px 8px; }
.rankbox .nick .gbtn { flex: none; width: auto; padding: 8px 16px; min-height: 0; font-size: 14px; }
.rankbox .note { color: #fff; font-weight: 800; font-size: 13px; padding: 0 6px; line-height: 1.6; }
.rank-me { font-weight: 900; font-size: 14px; color: #fff; text-shadow: 0 2px 0 #0003; margin: 0 2px 8px; min-height: 1.2em; }
.rank-list { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.rank-list li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 14px; background: #fff; box-shadow: 0 3px 0 #0000001a; }
.rank-list li.me { background: #fff6cf; outline: 3px solid #ffc800; }
.rank-list .no { font-weight: 900; font-size: 16px; text-align: center; color: var(--sub); }
.rank-list li:nth-child(1) .no { color: #e0a400; font-size: 20px; }
.rank-list li:nth-child(2) .no { color: #8d99ae; font-size: 18px; }
.rank-list li:nth-child(3) .no { color: #c0782e; font-size: 18px; }
.rank-list .nm { font-weight: 900; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-list .nm small { display: block; font-size: 11px; font-weight: 800; color: var(--sub); }
.rank-list .sc { font-weight: 900; font-size: 16px; color: #136fd8; }
.rank-list .empty { grid-template-columns: 1fr; text-align: center; font-weight: 800; color: var(--sub); }
