/* あたまる(2026-10-17)。色・字・部品はここに集める(仕様書 §3) */
:root {
  --brand: #C9F2E5; --brand-strong: #9EDFCC; --bg: #F2FFFB; --card: #FFFFFF;
  --yellow: #FFF4B8; --pink: #FFD9E6; --ink: #365A52; --ink-sub: #66867E;
  --ok: #319B77; --ng: #DB6979;
  --mint-deep: #4FBFA0; --pink-deep: #F28DB0; --yellow-deep: #F2C84B;
  --shadow: 0 6px 0 rgba(54, 90, 82, .14), 0 10px 22px rgba(54, 90, 82, .10);
  --r-card: 26px; --r-btn: 22px;
  --font: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font); font-weight: 500;
  -webkit-user-select: none; user-select: none; touch-action: manipulation; overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; padding: 0; }
button:disabled { cursor: default; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }

/* 背景の泡・星・雲(控えめ) */
.sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background: radial-gradient(110% 60% at 50% -10%, var(--brand) 0%, var(--bg) 70%); }
.sky svg { position: absolute; }
.sky .fl { animation: float 9s ease-in-out infinite; }
.sky .fl2 { animation: float 12s ease-in-out infinite reverse; }
@keyframes float { 50% { transform: translateY(-14px); } }

#app { position: relative; z-index: 1; max-width: 480px; margin: 0 auto; min-height: 100%; min-height: 100dvh;
  padding: max(10px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
.view { flex: 1; display: flex; flex-direction: column; animation: viewin .22s ease-out; }
@keyframes viewin { from { opacity: 0; transform: translateY(8px); } }

/* 上の帯 */
.top { display: flex; align-items: center; gap: 8px; min-height: 48px; }
.top h2 { flex: 1; margin: 0; text-align: center; font-size: 20px; font-weight: 800; }
.top .sp { width: 48px; }
.back { width: 48px; height: 48px; border-radius: 50%; background: var(--card); box-shadow: 0 3px 0 rgba(54,90,82,.14); display: flex; align-items: center; justify-content: center; }
.back svg { width: 22px; height: 22px; }
.back:active { transform: translateY(2px); box-shadow: none; }
.chip { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: rgba(255,255,255,.8); color: var(--ink); font-size: 14px; font-weight: 800; text-decoration: none; box-shadow: 0 3px 0 rgba(54,90,82,.12); }

/* ロゴ */
.logo { text-align: center; margin: 4px 0 0; line-height: 1; }
.logo .ja { display: inline-flex; gap: .02em; font-size: 62px; font-weight: 800; letter-spacing: .01em; }
.logo .ja span { color: var(--c); -webkit-text-stroke: 7px #7a4a2a; paint-order: stroke fill; text-shadow: 0 0 0 #fff, 0 5px 0 #7a4a2a, 0 9px 14px rgba(54,90,82,.18); filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 2px #fff); display: inline-block; animation: poyo 3.2s ease-in-out infinite; animation-delay: calc(var(--i) * .18s); }
.logo .en { display: block; margin-top: 6px; font-size: 14px; font-weight: 800; letter-spacing: .3em; color: var(--ink-sub); }
@keyframes poyo { 0%, 70%, 100% { transform: none; } 78% { transform: translateY(-6px) scale(1.04, .97); } 86% { transform: scale(.97, 1.03); } }

/* キャラ(24段階の絵)。ふだんはゆっくり ゆれる、喜び = はねる、残念 = しょんぼり */
.mascot { position: relative; display: flex; flex-direction: column; align-items: center; }
.mascot .char { width: 210px; height: 210px; object-fit: contain; transform-origin: 50% 100%; animation: sway 3.6s ease-in-out infinite; filter: drop-shadow(0 8px 6px rgba(54,90,82,.18)); -webkit-user-drag: none; }
.mascot.sm .char { width: 124px; height: 124px; }
.mascot .stage { margin-top: 4px; font-size: 13px; font-weight: 800; background: var(--card); padding: 4px 12px; border-radius: 999px; box-shadow: 0 2px 0 rgba(54,90,82,.1); }
.mascot.joy .char { animation: jump .55s ease-out 3; }
.mascot.sad .char { animation: droop 1.2s ease-out forwards; }
.mascot.poke .char { animation: poke .5s ease-out; }
@keyframes sway { 0%, 100% { transform: rotate(-1.5deg) scale(1, 1); } 50% { transform: rotate(1.5deg) scale(1.02, .98); } }
@keyframes jump { 0%, 100% { transform: none; } 30% { transform: translateY(-22px) scale(.96, 1.05); } 60% { transform: scale(1.06, .94); } }
@keyframes droop { 40% { transform: scale(1.05, .9); } 100% { transform: scale(1.02, .94) rotate(-4deg); filter: drop-shadow(0 8px 6px rgba(54,90,82,.18)) saturate(.7); } }
@keyframes poke { 30% { transform: scale(1.12, .86); } 60% { transform: scale(.94, 1.08) translateY(-8px); } }

/* 図鑑 */
.zukan { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.zk { background: var(--bg); border-radius: 16px; padding: 4px 2px 6px; text-align: center; }
.zk img { width: 100%; height: auto; aspect-ratio: 1; display: block; }
.zk small { display: block; font-size: 10.5px; font-weight: 800; color: var(--ink-sub); line-height: 1.25; }
.zk.locked .zq { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1; font-size: 26px; font-weight: 800; color: #C8D6D2; }
.zk.now { background: var(--yellow); box-shadow: 0 0 0 3px #F2C84B inset; }


/* カード・ボタン */
.card { background: var(--card); border-radius: var(--r-card); padding: 18px; box-shadow: var(--shadow); }
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 60px; padding: 12px 18px; border-radius: var(--r-btn); font-size: 21px; font-weight: 800; color: var(--ink); background: var(--card); box-shadow: 0 6px 0 var(--sh, rgba(54,90,82,.18)); transition: transform .08s; }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 var(--sh, rgba(54,90,82,.18)); }
.btn svg { width: 28px; height: 28px; flex: none; }
.btn.mint { background: var(--brand-strong); --sh: #6fc3ab; }
.btn.pink { background: var(--pink); --sh: #f2a9c2; }
.btn.yellow { background: var(--yellow); --sh: #e9d27a; }
.btn.go { background: var(--mint-deep); color: #fff; --sh: #2f8f74; min-height: 64px; font-size: 23px; }
.btn.ghost { background: rgba(255,255,255,.7); box-shadow: none; font-size: 17px; min-height: 52px; }
.btn:disabled { opacity: .45; }
.btns { display: flex; flex-direction: column; gap: 14px; }
.minis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 72px; padding: 10px 4px; border-radius: 20px; background: rgba(255,255,255,.85); box-shadow: 0 4px 0 rgba(54,90,82,.12); font-size: 13.5px; font-weight: 800; }
.mini svg { width: 28px; height: 28px; }
.mini:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(54,90,82,.12); }

.home { gap: 14px; }
.home .mid { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 190px; }

/* 選択リスト(カテゴリ・種目・モード) */
.list { display: flex; flex-direction: column; gap: 12px; }
.item { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 84px; padding: 14px 16px; border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow); text-align: left; }
.item:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 rgba(54,90,82,.14); }
.item .ic { width: 56px; height: 56px; border-radius: 18px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--bg-ic, var(--brand)); }
.item .ic svg { width: 34px; height: 34px; }
.item .tx { flex: 1; }
.item .tx b { display: block; font-size: 20px; font-weight: 800; }
.item .tx small { display: block; font-size: 13.5px; color: var(--ink-sub); margin-top: 2px; line-height: 1.4; }
.item .arrow { width: 22px; height: 22px; color: var(--ink-sub); }
.item:disabled { box-shadow: 0 3px 0 rgba(54,90,82,.08); background: rgba(255,255,255,.6); }
.item:disabled .ic, .item:disabled .tx b { opacity: .5; }
.tag { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 13px; font-weight: 800; padding: 5px 12px; border-radius: 999px; background: #eef3f1; color: var(--ink-sub); }
.lead { text-align: center; color: var(--ink-sub); font-size: 14.5px; margin: 0 0 14px; line-height: 1.6; }

/* プレイ */
.play { gap: 10px; }
.hud { display: flex; gap: 8px; }
.hud > div { flex: 1; background: var(--card); border-radius: 18px; padding: 6px 4px; text-align: center; box-shadow: 0 3px 0 rgba(54,90,82,.1); }
.hud small { display: block; font-size: 11.5px; color: var(--ink-sub); font-weight: 800; }
.hud b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stagebox { position: relative; flex: 1; min-height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow); overflow: hidden; padding: 12px; }
.shown { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1; color: #1f3f38; letter-spacing: .02em; }
.shown .g { margin-left: .28em; }
.msg { font-size: 22px; font-weight: 800; text-align: center; line-height: 1.5; }
.msg small { display: block; font-size: 14px; color: var(--ink-sub); font-weight: 500; }
.cnt { font-size: 96px; font-weight: 800; color: var(--mint-deep); animation: pop .35s ease-out; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.upbanner { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: var(--yellow); padding: 6px 16px; border-radius: 999px; font-weight: 800; font-size: 16px; box-shadow: 0 3px 0 #e9d27a; animation: pop .35s ease-out; white-space: nowrap; }
.feedback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.82); }
.feedback svg { width: 46%; max-width: 150px; animation: pop .3s ease-out; }
.limit { height: 8px; border-radius: 99px; background: #e6f2ee; overflow: hidden; }
.limit i { display: block; height: 100%; background: var(--brand-strong); transform-origin: left; }
.limit.low i { background: var(--ng); }

/* 入力枠とテンキー */
.slots { display: flex; justify-content: center; flex-wrap: nowrap; gap: 4px; }
.slot { width: var(--sw, 34px); height: calc(var(--sw, 34px) * 1.3); border-radius: 10px; background: var(--bg); border: 3px solid var(--brand-strong); display: flex; align-items: center; justify-content: center; font-size: calc(var(--sw, 34px) * .75); font-weight: 800; font-variant-numeric: tabular-nums; }
.slot.cur { border-color: var(--mint-deep); background: #fff; box-shadow: 0 0 0 3px rgba(79,191,160,.25); }
.slot.gap { margin-left: calc(var(--sw, 34px) * .25); }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.key { min-height: 58px; border-radius: 18px; background: var(--card); font-size: 28px; font-weight: 800; box-shadow: 0 5px 0 rgba(54,90,82,.16); font-variant-numeric: tabular-nums; }
.key:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 rgba(54,90,82,.16); background: #f3fffb; }
.key.fn { font-size: 16px; background: #eef7f4; }
.key.ok { background: var(--mint-deep); color: #fff; font-size: 22px; box-shadow: 0 5px 0 #2f8f74; }
.key:disabled { opacity: .4; }
.padrow { display: flex; gap: 9px; }
.padrow .key { flex: 1; min-height: 46px; }
.pad.off { opacity: .35; pointer-events: none; }
/* 背の低いスマホ(iPhone SE など)でもプレイ画面が1画面に入るように */
@media (max-height: 720px) {
  .play { gap: 7px; } .top { min-height: 40px; } .top h2 { font-size: 18px; } .back { width: 40px; height: 40px; }
  .hud > div { padding: 3px 4px; } .hud small { font-size: 10.5px; } .hud b { font-size: 18px; }
  .stagebox { min-height: 110px; } .msg { font-size: 19px; } .cnt { font-size: 76px; }
  .pad { gap: 7px; } .key { min-height: 44px; font-size: 23px; border-radius: 15px; } .padrow { gap: 7px; } .padrow .key { min-height: 38px; } .key.fn { font-size: 14px; }
}

/* 結果 */
.result { gap: 12px; }
.result .card { text-align: center; }
.result .score { font-size: 54px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.result .score small { font-size: 20px; }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.stats3 div { background: var(--bg); border-radius: 16px; padding: 8px 2px; }
.stats3 small { display: block; font-size: 12px; color: var(--ink-sub); font-weight: 800; }
.stats3 b { font-size: 22px; font-variant-numeric: tabular-nums; }
.newbest { display: inline-block; margin-top: 10px; background: var(--yellow); padding: 5px 16px; border-radius: 999px; font-weight: 800; box-shadow: 0 3px 0 #e9d27a; animation: pop .4s ease-out; }
.diff { margin-top: 12px; font-size: 15px; line-height: 1.9; }
.diff .row { display: flex; justify-content: center; align-items: center; gap: 10px; }
.diff .row small { width: 64px; text-align: right; color: var(--ink-sub); font-weight: 800; }
.diff .row span { font-size: 24px; font-weight: 800; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.diff .x { color: var(--ng); text-decoration: underline wavy; text-underline-offset: 4px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row2 .btn { font-size: 19px; white-space: nowrap; padding: 12px 10px; gap: 6px; }
.row2 .btn svg { width: 24px; height: 24px; }

/* ランキング・成績 */
.tabs { display: flex; background: rgba(255,255,255,.75); border-radius: 999px; padding: 4px; margin-bottom: 12px; }
.tabs button { flex: 1; min-height: 44px; border-radius: 999px; font-weight: 800; font-size: 16px; color: var(--ink-sub); }
.tabs.scroll { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs.scroll::-webkit-scrollbar { display: none; }
.tabs.scroll button { flex: none; padding: 0 14px; font-size: 14.5px; white-space: nowrap; }
.tabs button[aria-pressed="true"] { background: var(--brand-strong); color: var(--ink); box-shadow: 0 3px 0 #6fc3ab; }
.note { text-align: center; color: var(--ink-sub); font-size: 14.5px; line-height: 1.7; padding: 18px 8px; }
.kv { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 2px; border-bottom: 2px dotted #e3f0ec; font-size: 15px; }
.kv:last-child { border-bottom: 0; }
.kv b { font-size: 20px; font-variant-numeric: tabular-nums; }
.kv b small { font-size: 13px; }
.sect { font-size: 15px; font-weight: 800; margin: 18px 4px 8px; }
.meter { height: 14px; border-radius: 99px; background: var(--bg); overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-strong), var(--mint-deep)); border-radius: 99px; }

/* 設定 */
.vol { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.vol input { flex: 1; height: 44px; accent-color: var(--mint-deep); }
.vol b { width: 58px; text-align: right; font-size: 20px; font-variant-numeric: tabular-nums; }
.vol svg { width: 30px; height: 30px; flex: none; }
.namebox { display: flex; gap: 10px; margin-top: 10px; }
.namebox input { flex: 1; min-width: 0; min-height: 52px; border-radius: 16px; border: 3px solid var(--brand-strong); padding: 0 14px; font: inherit; font-size: 18px; color: var(--ink); background: var(--bg); -webkit-user-select: text; user-select: text; }
.namebox .btn { width: auto; min-height: 52px; font-size: 17px; }

/* あそびかた */
.how { display: flex; flex-direction: column; gap: 12px; }
.how .card { display: flex; gap: 14px; align-items: center; padding: 14px; }
.how .pic { width: 104px; flex: none; }
.how .pic svg { width: 104px; height: 88px; display: block; }
.how h3 { margin: 0 0 4px; font-size: 17px; }
.how p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink-sub); }
.how p b { color: var(--ink); }

/* 下の余白をそろえる */
.spacer { flex: 1; min-height: 12px; }
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 800; font-size: 15px; max-width: calc(100% - 32px); text-align: center; animation: pop .25s ease-out; }

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

/* 背の低いスマホではホームのキャラを小さくして、下のボタンまで1画面に入れる */
@media (max-height: 720px) {
  .logo .ja { font-size: 50px; } .home { gap: 10px; } .home .mid { min-height: 0; }
  .home .mascot .char { width: 140px; height: 140px; }
  .mini { min-height: 60px; padding: 7px 4px; } .btn.go { min-height: 56px; } .row2 .btn { min-height: 52px; }
}

/* 結果の順位・ランキングの行 */
.rankline { margin-top: 8px; font-weight: 800; font-size: 16px; }
.rankline b { font-size: 24px; color: var(--mint-deep); }
.rankline.off { font-size: 13px; color: var(--ink-sub); font-weight: 500; }
.ranklist { padding: 6px 12px; }
.rk { display: flex; align-items: center; gap: 10px; min-height: 48px; border-bottom: 2px dotted #e3f0ec; }
.rk:last-child { border-bottom: 0; }
.rk .no { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; background: var(--bg); font-variant-numeric: tabular-nums; flex: none; }
.rk .no.n1 { background: #FFE27A; } .rk .no.n2 { background: #E3ECEA; } .rk .no.n3 { background: #F6D2B5; }
.rk .nm { flex: 1; min-width: 0; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk .sc { text-align: right; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.rk .sc small { font-size: 12px; margin-left: 1px; }
.rk .sc em { display: block; font-style: normal; font-size: 11.5px; color: var(--ink-sub); font-weight: 500; }
.rk.me { background: var(--yellow); border-radius: 14px; margin: 2px -6px; padding: 0 6px; border-bottom-color: transparent; }

/* たいせん */
.vsbody { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.vscenter { text-align: center; }
.vs .lbl { font-size: 14px; color: var(--ink-sub); font-weight: 800; }
.code { font-size: 64px; font-weight: 800; letter-spacing: .14em; color: var(--ink); margin: 4px 0; }
.dots { display: flex; justify-content: center; gap: 8px; margin: 8px 0; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--brand-strong); animation: dot 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes dot { 40% { transform: translateY(-8px); background: var(--mint-deep); } }
.vsplayers .pl { display: flex; align-items: center; gap: 8px; min-height: 48px; border-bottom: 2px dotted #e3f0ec; }
.vsplayers .pl:last-of-type { border-bottom: 0; }
.vsplayers .pl b { font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.vsplayers .pl small { color: var(--ink-sub); font-size: 12px; flex: 1; }
.vsplayers .pl span { font-size: 13px; font-weight: 800; padding: 4px 12px; border-radius: 999px; background: #eef3f1; color: var(--ink-sub); }
.vsplayers .pl span.ok { background: var(--brand-strong); color: var(--ink); }
.vsres { text-align: center; }
.vsres .big { font-size: 46px; font-weight: 800; line-height: 1.2; }
.vsres.win .big { color: var(--mint-deep); } .vsres.lose .big { color: var(--ng); } .vsres.draw .big { color: var(--ink-sub); }
.vsres .why { font-size: 13.5px; color: var(--ink-sub); margin-top: 4px; }
.vsscore { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 8px; }
.vsscore div { min-width: 0; }
.vsscore small { display: block; font-size: 12px; color: var(--ink-sub); font-weight: 800; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vsscore b { font-size: 32px; }
.vsscore span { font-size: 24px; color: var(--ink-sub); }
.vslast .row { gap: 8px; }
.vslast .row em { width: 22px; font-style: normal; font-weight: 800; }
.vslast .row span.o { color: var(--ok); } .vslast .row span.x { color: var(--ng); }
.vslast .row span { font-size: 22px; }
.hud .op.answered { background: var(--yellow); }
.hud .op small, .hud .me small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cnt.sm { font-size: 54px; margin-top: 4px; }

/* BGM の ON/OFF(ホーム右上。ダンゴリンと同じく BGM と効果音をまとめて) */
.chip.bgm { color: var(--ink-sub); }
.chip.bgm svg { opacity: .45; }
.chip.bgm[aria-pressed="true"] { background: var(--brand-strong); color: var(--ink); box-shadow: 0 3px 0 #6fc3ab; }
.chip.bgm[aria-pressed="true"] svg { opacity: 1; }
.rk .av { width: 44px; height: 44px; object-fit: contain; flex: none; margin: 0 -4px; }

/* せいせきの五角形と総合評価 */
.radarcard { padding: 10px 10px 16px; text-align: center; }
.radar { width: 100%; max-width: 340px; height: auto; display: block; margin: 0 auto; font-family: var(--font); }
.overall small { display: block; font-size: 13px; color: var(--ink-sub); font-weight: 800; }
.overall b { font-size: 44px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.overall b span { font-size: 18px; margin-left: 2px; }
.overall b.none { font-size: 26px; color: var(--ink-sub); }
.overall em { display: inline-block; margin-left: 8px; font-style: normal; font-weight: 800; background: var(--brand); padding: 3px 12px; border-radius: 999px; vertical-align: 10px; }
.overall .sub { font-size: 12.5px; color: var(--ink-sub); margin-top: 4px; }

/* 記憶の種目(絵柄・光るマス・順番、2026-10-17) */
.memstage { justify-content: flex-start; gap: 10px; padding: 14px 12px; min-height: 360px; }
.memstage .msg.sm { font-size: 17px; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; }
.memstage .msg .ask svg { width: 40px; height: 40px; vertical-align: middle; }
.memctl { display: flex; flex-direction: column; gap: 9px; }
.feedback.soft { background: transparent; pointer-events: none; align-items: flex-start; justify-content: flex-end; padding: 8px; }
.feedback.soft svg { width: 70px; opacity: .9; }
/* 絵柄 */
.cards { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 8px; width: 100%; max-width: 360px; margin: auto 0; }
.pcard { position: relative; aspect-ratio: 1; border-radius: 16px; background: #fff; border: 3px solid #E3F0EC; box-shadow: 0 4px 0 rgba(54,90,82,.12); padding: 0; overflow: hidden; }
.pcard .face { position: absolute; inset: 8%; display: flex; }
.pcard .face svg { width: 100%; height: 100%; }
.pcard .pback { position: absolute; inset: 0; background: repeating-linear-gradient(45deg, #9EDFCC 0 8px, #B5E8D8 8px 16px); opacity: 0; transition: opacity .15s; }
.cards.hidden-faces .pcard:not(.open) .face { visibility: hidden; }
.cards.hidden-faces .pcard:not(.open) .pback { opacity: 1; }
.pcard:active:not(:disabled) { transform: translateY(3px); box-shadow: none; }
.pcard.right { border-color: var(--ok); box-shadow: 0 0 0 4px rgba(49,155,119,.35); }
.pcard.wrong { border-color: var(--ng); }
.pcard:disabled { opacity: 1; }
/* 光るマス */
.lgrid { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 10px; width: 100%; max-width: 330px; margin: auto 0; }
.lcell { aspect-ratio: 1; border-radius: 18px; background: #EAF6F2; border: 3px solid #D7EDE6; box-shadow: 0 4px 0 rgba(54,90,82,.1); transition: background .08s, transform .08s; padding: 0; font-weight: 800; color: var(--ink); }
.lcell:disabled { opacity: 1; }
.lcell.lit { background: #FFE27A; border-color: #F2C84B; box-shadow: 0 0 18px 4px rgba(255,214,90,.75); transform: scale(1.05); }
.lcell.tap { animation: ltap .45s ease-out; }
/* 自分が押したマスも、お手本と同じ黄色で光らせる(2026-10-17 ユーザー指示) */
@keyframes ltap { 0%, 55% { background: #FF9EBB; border-color: #F2679F; box-shadow: 0 0 18px 4px rgba(242,103,159,.6); transform: scale(1.06); } 100% { background: #FFD3E2; border-color: #F2679F; transform: none; } } /* 押したマスはピンクに光る(2026-10-18 ユーザー指示) */
.lcell.picked { background: #FF9EBB; border-color: #F2679F; box-shadow: 0 0 18px 4px rgba(242,103,159,.55); transform: scale(1.05); transition: none; } /* 押したマス(0.18秒ピンクに光る。外す時は .lcell の transition でふわっと戻る) */
.lcell.ans { background: #FFF4B8; border-color: #F2C84B; }
.lcell small { font-size: 15px; }
/* 順番 */
.oshow { width: 170px; height: 170px; margin: auto; display: flex; align-items: center; justify-content: center; }
.oshow .opic { width: 100%; height: 100%; display: flex; animation: pop .25s ease-out; }
.oshow .opic svg { width: 100%; height: 100%; }
.oshow.blink .opic { visibility: hidden; }
.odots { display: flex; justify-content: center; gap: 6px; }
.odots i { width: 10px; height: 10px; border-radius: 50%; background: #E3F0EC; }
.odots i.on { background: var(--mint-deep); }
.oslots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: auto 0; }
.oslot { width: 62px; height: 62px; border-radius: 14px; background: var(--bg); border: 3px dashed var(--brand-strong); padding: 4px; display: flex; align-items: center; justify-content: center; color: var(--ink-sub); font-weight: 800; }
.oslot svg { width: 100%; height: 100%; }
.oslot.cur { border-style: solid; border-color: var(--mint-deep); }
.oslot.filled { background: #fff; border-style: solid; }
.oslot.bad { border-color: var(--ng); background: #fdeaea; }
.ochoices { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ochoice { width: 64px; height: 64px; border-radius: 16px; background: #fff; box-shadow: 0 4px 0 rgba(54,90,82,.14); padding: 6px; }
.ochoice svg { width: 100%; height: 100%; }
.ochoice:disabled { opacity: .25; box-shadow: none; }
.ochoice:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 rgba(54,90,82,.14); }
.mem .padrow .key { min-height: 52px; }
@media (max-height: 720px) { .memstage { min-height: 300px; } .oslot, .ochoice { width: 52px; height: 52px; } .oshow { width: 130px; height: 130px; } }
/* レベルアップ(記憶の種目は問題の前に単独で出す) */
.levelup { margin: auto; text-align: center; font-size: 22px; font-weight: 800; color: var(--ink); animation: pop .35s ease-out; }
.levelup b { display: block; font-size: 64px; line-height: 1.1; color: var(--mint-deep); }
.levelup small { display: block; font-size: 15px; color: var(--ink-sub); margin-top: 4px; }

/* 直感「どっちが多い?」(2026-10-17) */
.which .hud .tm.low { background: var(--pink); }
.which .hud .op { background: #F3F0FF; }
.wstage { padding: 10px; min-height: 0; flex: 1; justify-content: center; }
.wfield { position: relative; width: 100%; max-width: 380px; aspect-ratio: 100 / 110; max-height: 100%; margin: 0 auto; background: #F7FFFC; border-radius: 18px; border: 2px solid #E3F0EC; }
.wpic { position: absolute; aspect-ratio: 1; display: block; }
.wpic svg { width: 100%; height: 100%; display: block; }
.wfb { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; animation: wfb .25s ease-out forwards; }
.wfb svg { width: 34%; max-width: 130px; }
.wfb.ok { background: rgba(49,155,119,.10); } .wfb.ng { background: rgba(219,105,121,.10); }
@keyframes wfb { from { opacity: 0; transform: scale(.7); } 40% { opacity: 1; transform: none; } to { opacity: .9; } }
.wbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wbtn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 88px; padding: 10px; border-radius: 22px; background: #fff; box-shadow: 0 6px 0 rgba(54,90,82,.16); font-size: 16px; font-weight: 800; line-height: 1.25; text-align: left; }
.wbtn svg { width: 54px; height: 54px; flex: none; }
.wbtn:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(54,90,82,.16); }
.wbtn.right { background: #E3F6E7; box-shadow: 0 0 0 3px var(--ok); }
.wbtn.wrong { background: #FDEAEA; box-shadow: 0 0 0 3px var(--ng); }
@media (max-height: 720px) { .wbtn { min-height: 70px; } .wbtn svg { width: 42px; height: 42px; } }
.vswhich { flex: 1; display: flex; flex-direction: column; }
.vswhich .which > .top { display: none; } /* 対戦では外側の「たいせん」の帯を使う */
/* 記憶の種目のライフ(ハート。2026-10-18) */
.hud .life { display: flex; justify-content: center; gap: 2px; height: 30px; align-items: center; }
.hud .life i { color: #F7839A; display: flex; transition: opacity .3s, transform .3s; }
.hud .life i.lost { color: #C8D6D2; opacity: .6; transform: scale(.85); }
.misbanner { background: #FFE3EA; color: #B4405A; border-radius: 14px; padding: 6px 14px; font-weight: 800; font-size: 15px; margin-top: 10px; }
/* 対戦のライフ(1問までOK。2026-10-18) */
.hud .vlife { color: #F7839A; letter-spacing: -.05em; }
.hud .vlife i { font-style: normal; color: #C8D6D2; }

/* 60秒の新しい種目(2026-10-18 ユーザーの仕様「新ミニゲーム4種」、games/timed.js・timed-plays.js) */
.timed .hud .tm.low { background: var(--pink); }
.tstage { padding: 10px; min-height: 0; flex: 1; justify-content: center; gap: 8px; }
.tctl { min-height: 52px; }
.tchoices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tchoice { display: flex; align-items: center; justify-content: center; min-height: 84px; padding: 8px 6px; border-radius: 20px; background: #fff; box-shadow: 0 5px 0 rgba(54,90,82,.16); }
.tchoice:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(54,90,82,.16); }
.tchoice.right { background: #E3F6E7; box-shadow: 0 0 0 3px var(--ok); }
.tchoice.wrong { background: #FDEAEA; box-shadow: 0 0 0 3px var(--ng); }
.tchoice.pop { animation: tpop .3s ease-out; }
@keyframes tpop { 40% { transform: scale(1.08); } }
.tbtns { display: flex; gap: 10px; }
.tbtn { flex: 1; min-height: 52px; border-radius: 18px; background: #fff; box-shadow: 0 5px 0 rgba(54,90,82,.16); font-size: 17px; font-weight: 800; color: var(--ink); }
.tbtn.give { background: #FFF1F4; color: #B4405A; }
.tbtn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(54,90,82,.16); }
.tbtn:disabled { opacity: .5; }
/* へんてこ変身 */
.tf-rules { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.tf-rule { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 14px; background: #EEF4FF; font-size: 16px; font-weight: 800; line-height: 1.3; }
.tf-rule b { color: #4F7FC9; font-size: 19px; }
.tf-from { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 14px; border-radius: 16px; background: #F7FFFC; border: 2px solid #E3F0EC; }
.tf-from small { font-size: 12px; font-weight: 800; color: var(--ink-sub); }
.tf-arrow { font-weight: 800; color: var(--mint-deep); font-size: 15px; }
.tf-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px; }
.tf-it { display: block; }
/* 数字エレベーター・数字どろぼう(上の目標/いま) */
.ev-head { display: flex; gap: 10px; width: 100%; }
.ev-head > div { flex: 1; text-align: center; padding: 4px; border-radius: 14px; background: #FFF4F7; }
.ev-head > div.now { background: #F2FBF8; }
.ev-head small { display: block; font-size: 12px; font-weight: 800; color: var(--ink-sub); }
.ev-head b { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ev-msg { min-height: 20px; font-size: 14px; font-weight: 800; color: #B4405A; text-align: center; opacity: 0; }
.ev-msg.show { opacity: 1; animation: tpop .3s ease-out; } .ev-msg.ans { color: var(--ink); }
.ev-shaft { position: relative; width: 100%; max-width: 330px; flex: 1; min-height: 0; display: grid; grid-template-rows: repeat(var(--n), 1fr); gap: 4px; padding-left: 92px; max-height: calc(var(--n) * 52px); }
.ev-floor { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border-radius: 14px; background: #fff; border: 2px solid #E3F0EC; font-size: 20px; font-weight: 800; color: var(--ink); min-height: 34px; }
.ev-floor.op { background: #FFF9E3; border-color: #FFE7A1; }
.ev-floor.goal { background: #E3F6E7; border-color: #A9DDB7; font-size: 17px; }
.ev-floor.start { background: #F2F2F2; font-size: 15px; color: var(--ink-sub); }
.ev-floor.used { opacity: .45; }
.ev-floor .st { font-size: 12px; color: var(--ink-sub); }
.ev-car { position: absolute; left: 0; top: 0; width: 84px; height: calc((100% - (var(--n) - 1) * 4px) / var(--n)); transform: translateY(calc(var(--row, 0) * (100% + 4px))); transition: transform .25s ease-in-out;
  display: flex; align-items: center; justify-content: center; border-radius: 14px; background: linear-gradient(180deg, #8FD3BF, #4FBFA0); color: #fff; box-shadow: 0 3px 0 #319B77; }
.ev-car b { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ev-car.bump { animation: tpop .3s ease-out; }
.th-grid { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 10px; width: 100%; max-width: 360px; margin: auto 0; }
.th-tile { aspect-ratio: 1; border-radius: 18px; font-size: 28px; font-weight: 800; color: var(--ink); background: #fff; box-shadow: 0 5px 0 rgba(54,90,82,.18); transition: transform .2s, opacity .2s; }
.th-tile.c0 { background: #FFE3EA; } .th-tile.c1 { background: #DDEBFF; } .th-tile.c2 { background: #DFF5E6; } .th-tile.c3 { background: #FFF2C9; } .th-tile.c4 { background: #EDE3FF; }
.th-tile.got { transform: scale(.2) translateY(-60px); opacity: 0; pointer-events: none; }
.th-tile.ans { box-shadow: 0 0 0 4px var(--ok); }
/* ぺちゃんこ研究所 */
.fl-title { font-size: 18px; font-weight: 800; }
.fl-title b { color: #B4405A; font-size: 24px; }
.fl-pic { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; }
.fl-iso { width: 100%; max-width: 300px; max-height: 34vh; } /* 背の低い画面でもはみ出さない */
.fl-iso .fl-body { transform-box: fill-box; transform-origin: 50% 100%; }
.fl-iso.squash-top .fl-body { animation: flTop .35s ease-in forwards; }
.fl-iso.squash-side .fl-body { animation: flSide .35s ease-in forwards; }
@keyframes flTop { to { transform: scaleY(.25); } }
@keyframes flSide { to { transform: scaleX(.3); } }
.tchoice.fl svg { display: block; max-width: 100%; height: auto; }
@media (max-height: 720px) { .tchoice { min-height: 66px; } .ev-head b { font-size: 24px; } .tf-rule { font-size: 14px; padding: 5px 10px; } .th-tile { font-size: 24px; } }
/* 4択の種目は、問題のすぐ下に選択肢(2026-10-18 ユーザー「選択肢が下すぎて見づらい」) */
.timed-transform .tstage, .timed-flatten .tstage { flex: none; }
.timed-transform, .timed-flatten { justify-content: flex-start; }
/* せいせき: 種目ごとに1行、押すと開く(2026-10-18) */
.srows { padding: 2px 14px; }
.srow { border-bottom: 1px dashed #E3F0EC; }
.srow:last-child { border-bottom: 0; }
.srow summary { display: flex; align-items: center; gap: 8px; padding: 12px 0; list-style: none; cursor: pointer; font-weight: 800; }
.srow summary::-webkit-details-marker { display: none; }
.srow summary .nm { flex: 1; font-size: 16px; }
.srow summary b { font-size: 18px; } .srow summary b small { font-size: 12px; color: var(--ink-sub); }
.srow summary i { display: flex; width: 18px; height: 18px; color: var(--ink-sub); transition: transform .2s; }
.srow summary i svg { width: 100%; height: 100%; }
.srow[open] summary i { transform: rotate(90deg); }
.srow .kv { padding-left: 6px; }
.srow[open] { padding-bottom: 8px; }
/* ランキング: ジャンル → 種目の2段(2026-10-18) */
.tabs.gtabs { margin-bottom: 8px; }
.tabs.gtabs button { font-size: 15px; padding: 0 4px; }
.tabs.sub { background: rgba(255,255,255,.55); }
.tabs.sub button { min-height: 38px; font-size: 14px; }
/* せいせき: 種目ごとの記録をジャンル別・色つきに(2026-10-18) */
.sgroup { margin-bottom: 10px; background: var(--gc); background: color-mix(in srgb, var(--gc) 70%, #fff); }
.sgroup .srow { border-bottom-color: rgba(54,90,82,.14); }
.sghead { display: flex; align-items: center; gap: 8px; padding: 10px 0 4px; font-size: 16px; font-weight: 800; }
.sghead .ic { display: flex; width: 30px; height: 30px; padding: 4px; border-radius: 10px; background: #fff; }
.sghead .ic svg { width: 100%; height: 100%; }
.sghead em { margin-left: auto; font-style: normal; font-size: 20px; } .sghead em small { font-size: 12px; color: var(--ink-sub); }

/* ジャンルの色をどこでも(2026-10-18 ユーザー指示)。色は config.js の CATEGORIES の color(「あそぶ」のジャンル一覧と同じ) */
.item.gc-item, .list.gc .item:not(:disabled) { background: color-mix(in srgb, var(--gc) 50%, #fff); }
.gtint .hud > div { background: color-mix(in srgb, var(--gc) 65%, #fff); }
.gtint .stagebox { box-shadow: 0 0 0 3px color-mix(in srgb, var(--gc) 85%, #fff), var(--shadow); }
.result.gtint .card { background: linear-gradient(180deg, color-mix(in srgb, var(--gc) 70%, #fff) 0, #fff 120px); }
.result.gtint .stats3 > div { background: color-mix(in srgb, var(--gc) 45%, #fff); }
.tabs.gtabs { gap: 4px; }
.tabs.gtabs button { background: color-mix(in srgb, var(--gc) 45%, transparent); color: var(--ink); }
.tabs.gtabs button[aria-pressed="true"], .tabs.sub button[aria-pressed="true"] { background: var(--gc); color: var(--ink); box-shadow: 0 3px 0 color-mix(in srgb, var(--gc) 65%, #365A52); }
.result.gtint .btn.go { background: var(--gc); color: var(--ink); box-shadow: 0 6px 0 color-mix(in srgb, var(--gc) 60%, #365A52); }
.sghead em .gnote { display: block; text-align: right; font-size: 11.5px; font-weight: 800; color: #D9668A; line-height: 1.2; }
/* スマホの「下に引っぱって更新」(2026-10-18、js/ptr.js。現場タイムカードと同じ見た目・動き) */
html.ptr-on, html.ptr-on body { overscroll-behavior-y: contain; }
.ptr-indicator { position: fixed; top: 0; left: 50%; transform: translate(-50%, -48px); opacity: 0; z-index: 2000; display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: #fff; color: var(--ink); box-shadow: 0 4px 14px rgba(0,0,0,.18); font-size: 13px; font-weight: 800; pointer-events: none; }
.ptr-indicator .ptr-arrow { display: inline-block; transition: transform .15s; }
.ptr-indicator.is-ready .ptr-arrow { transform: rotate(180deg); }
.ptr-indicator.is-loading .ptr-arrow { animation: ptr-spin .8s linear infinite; }
.ptr-gauge { display: inline-block; visibility: hidden; width: 40px; height: 5px; border-radius: 3px; background: #E3F0EC; overflow: hidden; }
.ptr-gauge > span { display: block; height: 100%; width: 0; background: var(--mint-deep); }
.ptr-indicator.is-holding .ptr-gauge, .ptr-indicator.is-ready .ptr-gauge { visibility: visible; }
/* メーターの伸びは ptr.js が style.width で(動きを減らす設定でも伸びるように) */

@keyframes ptr-spin { to { transform: rotate(360deg); } }

/* ランキングの「総合」(2026-10-18)。一番上の段 → ジャンル → 種目 */
.tabs.otabs { margin-bottom: 8px; }
.tabs.otabs button { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 16px; color: var(--ink); }
.tabs.otabs button svg { width: 22px; height: 22px; }
.tabs.otabs button[aria-pressed="true"] { background: #FFE27A; box-shadow: 0 3px 0 #D9B640; }
.rkbtn { width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0; }
.rkbtn.me { width: calc(100% + 12px); } /* 自分の行は帯を左右に6pxはみ出させるので、その分広く(前は点数だけ左にずれていた。2026-10-18 ユーザー指摘) */
.kvbtn { width: 100%; font: inherit; color: inherit; background: none; border: 0; text-align: left; }
.gpop { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(54,90,82,.45); animation: viewin .2s ease-out; }
.gcard { width: 100%; max-width: 380px; background: var(--card); border-radius: 26px; padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.ghead { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.ghead img { width: 52px; height: 52px; object-fit: contain; }
.ghead b { flex: 1; font-size: 19px; } .ghead span { font-size: 22px; } .ghead small { font-size: 12px; color: var(--ink-sub); }


/* 進化の演出(2026-10-18 作り直し、mascot.js の evolveOverlay)。出す・消すは JS が .on を付けて切りかえる(待ち時間の CSS は使わない)。動きは付け足しの飾りだけ */
.evo2 { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 16px; overflow: hidden; opacity: 0; transition: opacity .3s; }
.evo2.show { opacity: 1; }
.e2-dark { position: absolute; inset: 0; background: radial-gradient(circle at 50% 42%, #2f5f55 0%, #12302a 75%); }
.e2-rays { position: absolute; left: 50%; top: 42%; width: 160vmax; height: 160vmax; margin: -80vmax 0 0 -80vmax; opacity: .7;
  background: repeating-conic-gradient(rgba(255,244,184,.22) 0 10deg, rgba(255,244,184,0) 10deg 24deg); animation: e2spin 6s linear infinite; }
@keyframes e2spin { to { transform: rotate(360deg); } }
.e2-x { position: absolute; left: 12px; top: max(12px, env(safe-area-inset-top)); z-index: 5; }
.e2-msg { position: relative; min-height: 30px; color: #fff; font-size: 21px; font-weight: 800; letter-spacing: .04em; text-shadow: 0 2px 6px rgba(0,0,0,.35); opacity: 0; transition: opacity .3s; }
.e2-stage { position: relative; width: 240px; height: 240px; flex: none; }
.e2-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; }
.e2-img.on, .e2-msg.on, .e2-conf.on, .e2-title.on, .e2-name.on, .e2-ok.on { opacity: 1; }
.e2-img[data-e="from"].shake { animation: e2shake .25s ease-in-out infinite alternate; }
@keyframes e2shake { from { transform: rotate(-3deg) scale(1.02); } to { transform: rotate(3deg) scale(1.06); } }
.e2-sil { filter: brightness(0) invert(1) drop-shadow(0 0 14px #fff) drop-shadow(0 0 30px rgba(255,244,184,.95)); }
.e2-small { transform: scale(.88); } .e2-big { transform: scale(1.12); }
.e2-new { filter: drop-shadow(0 0 14px rgba(255,244,184,.9)); }
.e2-new.pop { animation: e2pop .55s cubic-bezier(.3,1.6,.5,1); }
@keyframes e2pop { from { transform: scale(.4); } 60% { transform: scale(1.15); } to { transform: none; } }
.e2-white { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.e2-white.go { animation: e2white .8s ease-out; }
@keyframes e2white { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
.e2-word { position: absolute; left: 0; right: 0; top: 22%; text-align: center; font-weight: 800; -webkit-text-stroke: 7px #fff; paint-order: stroke fill; opacity: 0; pointer-events: none; }
.e2-pika { font-size: 38px; color: #FFB400; } .e2-kira { font-size: 34px; color: #F2679F; top: 18%; }
.e2-word.go { animation: e2word 1.1s ease-out; }
@keyframes e2word { 0% { opacity: 0; transform: scale(.5); } 25% { opacity: 1; transform: scale(1.15); } 70% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.e2-conf { position: absolute; left: 50%; top: 50%; opacity: 0; }
.e2-conf i { position: absolute; width: 10px; height: 14px; border-radius: 3px; background: var(--c); opacity: 0; }
.e2-conf.on i { animation: e2conf 1.4s ease-out forwards; }
@keyframes e2conf { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) rotate(0); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(var(--d) * -1)) rotate(400deg); } }
.e2-end { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 320px; }
.e2-title { font-size: 34px; line-height: 1.2; text-align: center; font-weight: 800; color: #FFE27A; -webkit-text-stroke: 6px #fff; paint-order: stroke fill; text-shadow: 0 4px 0 rgba(0,0,0,.18); opacity: 0; transition: opacity .3s; }
.e2-name { color: #fff; font-size: 18px; font-weight: 800; margin: 4px 0 14px; opacity: 0; transition: opacity .3s; }
.e2-name b { font-size: 26px; color: #FFE27A; }
.e2-ok { opacity: 0; transition: opacity .3s; }
.e2-ok:not(.on) { pointer-events: none; }
/* 押した時のダブルタップ拡大などの待ちを入れない(2026-10-18 速いタップを取りこぼさない) */
.th-tile, .lcell, .ochoice, .ev-floor, .tchoice, .pcard { touch-action: manipulation; -webkit-user-select: none; user-select: none; }
/* たいせん 3本勝負・5本勝負(2026-10-18、js/match.js) */
.mxboard { padding: 8px 10px; }
.mxboard table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mxboard th, .mxboard td { padding: 6px 4px; text-align: center; font-weight: 800; }
.mxboard thead th { font-size: 12px; color: var(--ink-sub); }
.mxboard tbody tr { background: color-mix(in srgb, var(--gc) 55%, #fff); }
.mxboard tbody th { font-size: 12px; white-space: nowrap; border-radius: 10px 0 0 10px; }
.mxboard tbody td:last-child { border-radius: 0 10px 10px 0; }
.mxboard td.mxm { text-align: left; } .mxboard td.mxm small { display: block; font-size: 10.5px; color: var(--ink-sub); }
.mxboard td.win { color: #D9557A; }
.mxboard tbody tr + tr th, .mxboard tbody tr + tr td { border-top: 4px solid var(--card); }
.mxboard tfoot th, .mxboard tfoot td { font-size: 16px; padding-top: 8px; }
.mxmodes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mxmode { position: relative; min-height: 62px; padding: 8px 10px; border-radius: 16px; background: color-mix(in srgb, var(--gc) 60%, #fff); box-shadow: 0 4px 0 rgba(54,90,82,.14); text-align: left; font-size: 15px; font-weight: 800; color: var(--ink); touch-action: manipulation; }
.mxmode small { display: block; font-size: 11px; color: var(--ink-sub); }
/* たいせんの種目えらび: ジャンルの見出しで間をあける・種目のアイコン(2026-10-18) */
.mxgenre { margin: 14px 2px 6px; font-size: 13px; font-weight: 800; color: var(--gi); }
.mxgenre:first-of-type { margin-top: 4px; }
.mxmode { display: flex; align-items: center; gap: 8px; }
.mxmode .mxic { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: rgba(255,255,255,.7); }
.mxmode .mxic svg { width: 24px; height: 24px; }
.mxmode .mxtx { line-height: 1.25; font-size: 14px; letter-spacing: -.02em; }
.mxmode em { position: absolute; right: 8px; top: 6px; font-style: normal; font-size: 10.5px; color: var(--ink-sub); }
.mxmode:disabled { opacity: .45; }
.mxmode.mine { opacity: 1; box-shadow: 0 0 0 3px #4FBFA0, 0 4px 0 rgba(54,90,82,.14); }
.mxmode.his { opacity: .75; box-shadow: 0 0 0 3px #F2679F; }
.mxnext { text-align: center; background: color-mix(in srgb, var(--gc) 65%, #fff); }
.mxnext small { display: block; font-size: 13px; color: var(--ink-sub); font-weight: 800; }
.mxnext b { display: block; font-size: 26px; margin: 4px 0; }
.mxnext span { font-size: 13px; color: var(--ink-sub); }
.mxgame { flex: 1; display: flex; flex-direction: column; }
.mx .vsbody { display: flex; flex-direction: column; gap: 10px; }
.vscode { font-size: 52px; font-weight: 800; letter-spacing: .2em; text-align: center; margin: 6px 0; }

/* たいせん: 遊んでいる間の右上の「あいて ○点」・同時に始めるまでの表示(2026-10-18) */
.mxopp { position: fixed; z-index: 20; right: max(10px, calc(50% - 230px)); top: max(10px, env(safe-area-inset-top)); display: flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #FFF1F4; box-shadow: 0 3px 0 rgba(54,90,82,.14); font-weight: 800; pointer-events: none; }
.mxopp small { font-size: 11px; color: var(--ink-sub); max-width: 6em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mxopp b { font-size: 18px; color: #D9557A; } .mxopp em { font-style: normal; font-size: 10.5px; color: var(--ink-sub); }
.mxsoon { margin-top: 10px; font-size: 18px; font-weight: 800; color: var(--mint-deep); text-align: center; }

/* 直感「どっちが長い？」(2026-10-18) */
.lg-title { font-weight: 800; font-size: 17px; text-align: center; color: var(--ink); }
.lg-title b { color: #C99A00; }
.lg-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.lg-side { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px 10px; border-radius: 18px; border: 3px solid #E6EFEC; background: #fff; box-shadow: 0 4px 0 rgba(54,90,82,.14); touch-action: manipulation; color: inherit; font: inherit; }
.timed-longer .tstage { flex: none; } /* 上はお題だけ。線を大きく */
.lg-side svg { width: 100%; height: min(56vh, 440px); display: block; }
.lg-side > b { font-size: 16px; color: var(--ink); }
.lg-side.right { border-color: #4CC38A; background: #EFFFF6; }
.lg-side.wrong { border-color: #F07A8E; background: #FFF1F4; }
.lg-bar { display: flex; align-items: center; gap: 6px; width: 100%; height: 16px; visibility: hidden; }
.lg-side.shown .lg-bar { visibility: visible; }
.lg-bar i { display: block; height: 10px; width: 0; border-radius: 6px; background: #FFD15C; }
.lg-side.right .lg-bar i { background: #4CC38A; }
.lg-bar em { font-style: normal; font-weight: 800; font-size: 13px; color: var(--ink-sub); }

/* 分析「交わらない線」「色分け境界線」(2026-10-18)。盤面の上では指でスクロールしない */
.timed-cross .tstage, .timed-divide .tstage { padding: 8px; gap: 4px; justify-content: flex-start; }
.ln-title { font-weight: 800; font-size: 16px; text-align: center; color: var(--ink); }
.ln-title b { color: #3F78C9; }
.ln-board { width: 100%; flex: 1; min-height: 0; max-height: calc(100dvh - 300px); touch-action: none; user-select: none; -webkit-user-select: none; display: block; }
.ln-bg { fill: #F6FBF9; stroke: #D5E7E1; stroke-width: 2; }
.ln-wall { fill: #8FA49E; stroke: #6B827B; stroke-width: 1.5; }
.ln-cur { opacity: .9; }
.ln-cur.bad { stroke: #F04E6A !important; }
.ln-board.ln-clear [data-lines] path { filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 5px #FFE58A); }
.ln-msg { min-height: 18px; font-size: 13px; font-weight: 800; color: #D9557A; text-align: center; }
.ln-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; width: 100%; }
.ln-btns .btn { min-height: 46px; font-size: 15px; padding: 8px 6px; }
.ln-grid { stroke: #DCEAE5; stroke-width: 1; } /* 交わらない線のマス目(2026-10-18) */

/* 知覚「透明かくれんぼ」「消える足場」(2026-10-18) */
.timed-hide .tstage, .timed-path .tstage { padding: 8px; gap: 6px; justify-content: flex-start; }
.hd-cv { width: 100%; max-height: calc(100dvh - 300px); aspect-ratio: 200 / 240; height: auto; object-fit: contain; border-radius: 12px; touch-action: none; display: block; margin: 0 auto; max-width: calc((100dvh - 300px) * 200 / 240); }
.pa-left { margin-left: 6px; color: #D9557A; font-variant-numeric: tabular-nums; }
.pa-board { --fade: 0; }
.pa-cell { stroke: #D5E7E1; stroke-width: 1.5; }
.pa-cell.safe { fill: #FFD966; }
.pa-cell.bad { fill: #8FA49E; }
.pa-board.hid .pa-cell.safe { fill: color-mix(in srgb, #DCE7E3 calc(var(--fade) * 100%), #FFD966); }
.pa-board.hid .pa-cell.bad { fill: color-mix(in srgb, #DCE7E3 calc(var(--fade) * 100%), #8FA49E); }
.pa-cell.lit { fill: #FFE38A; stroke: #E0A800; stroke-width: 2.5; }
.pa-sg { font-size: 22px; font-weight: 800; text-anchor: middle; fill: var(--ink); pointer-events: none; }
.pa-me { fill: rgba(63,143,214,.55); stroke: #fff; stroke-width: 3; pointer-events: none; }

/* 瞬発「もぐらたたき」「すきまシュート」(2026-10-18)。HUD は3つ */
.quick .hud { grid-template-columns: repeat(3, 1fr); }
.qk-stage { position: relative; padding: 10px; justify-content: center; }
.ml-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; max-width: min(360px, calc(100dvh - 330px)); touch-action: none; user-select: none; -webkit-user-select: none; }
.ml-hole { position: relative; aspect-ratio: 1; border-radius: 22px; background: #E3F1EC; overflow: hidden; touch-action: none; }
.ml-pit { position: absolute; left: 12%; right: 12%; bottom: 10%; height: 26%; border-radius: 50%; background: #6B5A4E; box-shadow: inset 0 4px 0 rgba(0,0,0,.25); }
.ml-win { position: absolute; left: 10%; right: 10%; top: 0; bottom: 23%; overflow: hidden; pointer-events: none; } /* 穴のまん中より上だけ見える窓(もぐらは穴から顔を出す) */
.ml-mole { position: absolute; left: 5%; right: 5%; bottom: -14%; height: 92%; transform: translateY(100%); pointer-events: none; }
.ml-lip { position: absolute; left: 12%; right: 12%; bottom: 10%; height: 13%; border-radius: 0 0 50% 50% / 0 0 100% 100%; background: #6B5A4E; pointer-events: none; } /* 穴の手前のふち */
.ml-mole svg { width: 100%; height: 100%; display: block; }
.ml-hole[data-ty="gold"] { background: #FFF6D6; }
.qk-pop { position: absolute; transform: translate(-50%, -50%); font-weight: 900; font-size: 20px; pointer-events: none; text-shadow: 0 2px 0 #fff, 0 0 6px #fff; }
.qk-pop.ok { color: #2E9E7C; } .qk-pop.gold { color: #C99A00; font-size: 24px; } .qk-pop.ng { color: #E2557A; }
.sh-board { width: 100%; max-width: min(340px, calc(100dvh - 340px)); aspect-ratio: 1; display: block; touch-action: manipulation; user-select: none; }
.sh-msg { min-height: 26px; margin-top: 6px; font-size: 18px; font-weight: 900; color: #5B6FD6; text-align: center; }
.sh-board { border-radius: 50%; transition: none; } .sh-msg.ok { color: #2E9E7C; } .sh-msg.ng { color: #E2557A; } /* すきまシュート 作り直し(2026-10-19) */
