/* タイプニの画面。決まりは docs/DESIGN_SYSTEM.md（方向 A「パティスリー」、2026-11-15 作り直し）。
   - 地はクリーム、部品は白い面と薄い影。カードやボタンに枠線を付けない
   - 強い色は --pri（いちご）1つ。押してほしい物にだけ使う
   - 太字（700）は見出し・数字・主なボタンだけ。本文は 500、小さい字は BIZ UDPGothic の 400
   明るい表示だけ（暗い表示は作らない） */
:root {
  color-scheme: light;
  /* 色 */
  --bg: #FBF5EE; --bg-2: #F4EADF; --surface: #FFFFFF; --surface-2: #F6EEE6;
  --ink: #3A2630; --ink-2: #74606A; --ink-3: #A8969C; --line: #EADDD3;
  --pri: #CF335C; --pri-2: #A3244A; --pri-soft: #FCE6EC; --pri-ink: #FFFFFF;
  --star: #F2B33D; --star-2: #C98A1E; --good: #27806A; --good-soft: #E3F4EE; --miss: #D9363E; --sky: #3E7FC0;
  --stage: #FFEFF3; --stage2: #FFD9E4;
  /* 書体 */
  --f-body: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;
  --f-small: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", sans-serif;
  --f-num: "Nunito", "Zen Maru Gothic", sans-serif;
  --f-display: "Dela Gothic One", "Hiragino Sans", sans-serif;
  /* 形 */
  --r-s: 10px; --r-m: 16px; --r-l: 24px; --r-xl: 32px;
  --sh-1: 0 1px 2px rgba(74, 40, 48, .05), 0 4px 16px rgba(74, 40, 48, .06);
  --sh-2: 0 2px 6px rgba(74, 40, 48, .05), 0 16px 40px rgba(74, 40, 48, .11);
  --toy: clamp(150px, 33vh, 300px);
  /* まだのもの（開いていない・手に入れていない）：絵の色を落として明るくする。文字はこれを使わず --ink-2 のまま（AA） */
  --locked: saturate(.18) brightness(1.1) contrast(.85);
  /* 前の名前（main.js・render.js が読む） */
  --accent: var(--pri); --accent-soft: var(--pri-soft); --panel: var(--surface); --muted: var(--ink-2); --sun: var(--star); --mint: var(--good);
}
/* 色のテーマ：主の色の系統だけを替える */
:root[data-theme="mint"] { --pri: #1F8468; --pri-2: #13604B; --pri-soft: #DDF2EA; --stage: #EAF7F2; --stage2: #CDEDE1; }
:root[data-theme="blue"] { --pri: #2F6DB0; --pri-2: #1F4E82; --pri-soft: #E0EBF8; --stage: #EDF3FB; --stage2: #D3E2F5; }
:root[data-theme="lemon"] { --pri: #B0650A; --pri-2: #7E4700; --pri-soft: #FFF0CE; --stage: #FFF8E3; --stage2: #FCE8B3; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
html, body { overflow-x: clip; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-weight: 500; font-size: 16px; line-height: 1.75; letter-spacing: 0; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
/* Zen Maru Gothic には字間を詰める情報（palt）が無いので、見出しとボタンは字間を少し詰める。本文は詰めない */
h1, h2, h3, .mode-t, .tile b, .mlab b, .lot .ln, .zitem .zn, .me-name, .ms-name, .zshelf-h h2 { letter-spacing: -.02em; }
h1, h2, h3 { font-weight: 700; line-height: 1.4; }
b, strong { font-weight: 700; }
button { font: inherit; color: inherit; letter-spacing: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: var(--pri); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--pri) 55%, transparent); outline-offset: 3px; border-radius: 12px; }
kbd { font-family: var(--f-num); font-weight: 700; font-size: .78em; border-radius: 6px; padding: 1px 7px; background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 -2px 0 var(--line); }
svg { display: block; }
.ic { width: 24px; height: 24px; flex: none; }
.ic .f { fill: transparent; } .ic .fs { fill: currentColor; }
.ic .d { fill: #FFC6DA; } .ic .r { fill: currentColor; } /* ノートのシールとしおり */
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; }

#app { min-height: 100vh; max-width: 1184px; margin: 0 auto; display: flex; flex-direction: column; padding: 0 32px 32px; }

/* ---------- 上の帯 ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; height: 76px; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); margin: 0 -32px; padding: 0 32px; }
.logo { line-height: 0; border-radius: 12px; }
.logo img { height: 40px; width: auto; }
.me { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.coin { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 12px; border-radius: 999px; background: var(--surface); box-shadow: var(--sh-1); font: 700 17px var(--f-num); font-variant-numeric: tabular-nums; }
.coin-ic { width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 36% 32%, #FFEDB0 0 22%, #F4BE4A 60%, #E0A02A); box-shadow: inset 0 0 0 1.5px #D2911F; display: inline-block; }
.me-btn { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 8px 0 6px; border-radius: 999px; background: var(--surface); box-shadow: var(--sh-1); text-align: left; transition: box-shadow .15s; }
.me-btn:hover { box-shadow: var(--sh-2); }
.me-av { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--pri-soft); flex: none; }
.me-av svg { width: 40px; height: 48px; margin-top: 1px; }
.me-t { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.me-name { font-weight: 700; font-size: 15px; max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-lv { font-family: var(--f-small); font-size: 13px; color: var(--ink-2); }
.me-pen { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.me-pen .ic { width: 18px; height: 18px; }
.ibtn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: var(--sh-1); color: var(--ink); }
.ibtn:hover { box-shadow: var(--sh-2); }

/* ---------- 共通の部品 ---------- */
.screen { flex: 1; display: flex; flex-direction: column; gap: 16px; }
.screen.sub { padding-top: 8px; }
.screen.sub > h2 { font-size: 20px; margin: 20px 0 0; }
.card { background: var(--surface); border-radius: var(--r-l); padding: 24px; box-shadow: var(--sh-1); }
.card h3 { font-size: 18px; margin: 0 0 8px; }
.card h3 + .note { margin-top: -2px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.lbl { font-family: var(--f-small); font-size: 13px; letter-spacing: .04em; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.note { font-family: var(--f-small); font-size: 14px; color: var(--ink-2); line-height: 1.75; }
.ok { color: var(--good); }
.warn { color: var(--miss); font-weight: 700; font-size: 14px; }
.empty { color: var(--ink-2); padding: 24px; text-align: center; }
.lead { font-size: 16px; color: var(--ink-2); margin: -4px 0 8px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 28px; border-radius: 999px; background: var(--pri); color: var(--pri-ink); font-weight: 700; font-size: 17px; letter-spacing: 0; white-space: nowrap; box-shadow: 0 4px 0 var(--pri-2); transition: transform .08s, box-shadow .08s, filter .15s; text-decoration: none; }
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--pri-2); }
.btn .ic { width: 20px; height: 20px; stroke-width: 2.2; }
.btn.ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line), 0 3px 0 var(--line); }
.btn.ghost:active { box-shadow: 0 0 0 var(--line); }
.card .btn.ghost, .modal-card .btn.ghost, .hero .btn.ghost { background: var(--surface); }
.btn.small { height: 42px; padding: 0 18px; font-size: 15px; }
.btn.big { height: 60px; padding: 0 40px; font-size: 19px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn kbd.k-in { background: rgba(255, 255, 255, .22); color: inherit; box-shadow: none; }
a.btn { color: var(--pri-ink); } a.btn.ghost { color: var(--ink); }

.sub-head { display: flex; align-items: center; gap: 16px; margin: 4px 0 8px; }
.sub-head h1 { font-size: 28px; letter-spacing: -.02em; }
.back { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px 0 10px; border-radius: 999px; color: var(--ink-2); font-size: 15px; font-weight: 500; }
.back:hover { background: var(--surface-2); color: var(--ink); }
.back .ic { width: 20px; height: 20px; }

.seg, .tabs { display: inline-flex; gap: 4px; background: var(--surface-2); border-radius: 999px; padding: 4px; }
.seg label, .tabs button { border-radius: 999px; padding: 6px 18px; cursor: pointer; color: var(--ink-2); font-weight: 500; }
.seg input, .tog input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked), .tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: var(--sh-1); }
.tog { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; padding: 6px 0; }
.tog span { display: inline-flex; align-items: center; gap: 10px; }
.tog span::before { content: ""; width: 44px; height: 26px; border-radius: 999px; background: var(--bg-2); box-shadow: inset 0 0 0 1.5px var(--line); transition: background .15s; flex: none; background-image: radial-gradient(circle at 13px 13px, #fff 0 9px, transparent 9.5px); }
.tog:has(input:checked) span::before { background-color: var(--pri); background-image: radial-gradient(circle at 31px 13px, #fff 0 9px, transparent 9.5px); box-shadow: none; }
.part, .tone, .theme-btn, .prof, .kchip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; border-radius: 999px; padding: 4px 16px; background: var(--surface-2); color: var(--ink); cursor: pointer; font-weight: 500; }
.part[aria-pressed="true"], .tone[aria-pressed="true"], .theme-btn[aria-pressed="true"], .prof[aria-pressed="true"] { background: var(--pri-soft); color: var(--pri-2); box-shadow: inset 0 0 0 2px var(--pri); font-weight: 700; }
.part.locked { color: var(--ink-3); }
.part small { font-family: var(--f-small); font-size: 13px; font-weight: 400; color: var(--ink-2); }

input[type="text"], select, textarea { font: inherit; font-weight: 500; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding: 0 14px; height: 48px; min-width: 0; }
textarea { height: auto; padding: 10px 14px; }
input[type="text"]:focus, select:focus, textarea:focus { outline: none; border-color: var(--pri); box-shadow: 0 0 0 3px var(--pri-soft); }
input[type="range"] { accent-color: var(--pri); width: 200px; }

.pr { display: inline-block; font-family: var(--f-small); font-size: 13px; color: var(--ink-2); background: var(--surface-2); border-radius: 6px; padding: 0 8px; }
.tagnew { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--pri); color: #FFFFFF; font: 800 12px/1 var(--f-num); letter-spacing: .06em; }

/* 確認の窓・トースト */
.modal { position: fixed; inset: 0; background: rgba(42, 24, 32, .42); display: grid; place-items: center; z-index: 50; padding: 20px; backdrop-filter: blur(2px); }
.modal-card { width: min(480px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; display: flex; flex-direction: column; gap: 14px; border-radius: var(--r-xl); box-shadow: var(--sh-2); padding: 28px; }
.modal-card:has(.zgrid) { width: min(640px, 100%); }
.modal-card .zgrid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.modal-card .zitem { padding: 8px 6px 10px; background: var(--surface-2); box-shadow: none; }
.modal-card .zitem svg { width: 80px; height: 80px; }
.modal-card .zitem .zn { min-height: 0; font-size: 13px; }
.modal-card h2 { font-size: 22px; }
.modal-card .row { margin-top: 6px; justify-content: flex-end; }
.modal-card input[type="text"] { width: 100%; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: #fff; border-radius: 999px; padding: 12px 22px; z-index: 60; box-shadow: var(--sh-2); font-size: 15px; max-width: calc(100% - 32px); }
/* プライバシーポリシーの改定のお知らせ（js/notice.js）。画面の下の小さな帯。遊んでいる最中は出さない */
.pnotice { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 45; width: min(680px, calc(100% - 32px)); display: flex; align-items: center; gap: 10px 16px; background: var(--surface); color: var(--ink); border-radius: var(--r-l); box-shadow: var(--sh-2), inset 0 0 0 1.5px var(--line); padding: 12px 14px 12px 20px; font-size: 14px; line-height: 1.7; }
.pnotice p { margin: 0; }
.pnotice b { display: block; font-size: 15px; }
.pnotice a { color: var(--pri); font-weight: 700; }
.pnotice .btn { flex: none; }
body:has(#play:not([hidden])) .pnotice { display: none; }
@media (max-width: 600px) { .pnotice { flex-direction: column; align-items: stretch; bottom: 12px; font-size: 13px; line-height: 1.6; } .pnotice .btn { align-self: flex-end; height: 38px; } }

/* ---------- 自分の欄（上の帯の名前から開く） ---------- */
.mesheet { position: fixed; inset: 0; z-index: 40; }
.mesheet-scrim { position: absolute; inset: 0; background: rgba(42, 24, 32, .22); }
.mesheet-card { position: absolute; top: 80px; right: max(16px, calc(50% - 560px)); width: min(400px, calc(100% - 32px)); background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-2); padding: 24px 24px 20px; display: flex; flex-direction: column; gap: 10px; animation: sheetIn .18s ease-out; }
@keyframes sheetIn { from { opacity: 0; transform: translateY(-6px); } }
.ms-top { display: flex; align-items: center; gap: 16px; }
.ms-av { width: 88px; height: 88px; border-radius: 50%; overflow: hidden; background: var(--pri-soft); flex: none; }
.ms-av svg { width: 88px; height: 106px; margin-top: 2px; }
.ms-k { font-family: var(--f-small); font-size: 13px; color: var(--ink-2); }
.ms-name { font-size: 22px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.ms-lv { font-family: var(--f-small); font-size: 14px; color: var(--ink-2); }
.ms-edit { display: flex; gap: 8px; margin-top: 6px; }
.ms-edit input { flex: 1; }
.ms-edit .btn { height: 48px; padding: 0 20px; font-size: 15px; }
.ms-links { display: flex; gap: 8px; flex-wrap: wrap; }
.mesheet hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0 2px; width: 100%; }
.who-list { display: flex; flex-wrap: wrap; gap: 8px; }
.who { display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 16px 0 6px; border-radius: 999px; background: var(--surface-2); font-weight: 500; }
.who svg { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); flex: none; }
.who[aria-pressed="true"] { background: var(--pri-soft); box-shadow: inset 0 0 0 2px var(--pri); font-weight: 700; }
.who.add { padding: 0 18px; color: var(--ink-2); }
.who.add .ic { width: 20px; height: 20px; }

/* ---------- トップ ---------- */
.home { display: flex; flex-direction: column; gap: 48px; padding-top: 8px; }
.home-h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.home-h h2 { font-size: 22px; }
.home-h .prog { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font: 700 15px var(--f-num); }
.home-h .prog .ic { width: 18px; height: 18px; color: var(--star); }

.hero { display: grid; grid-template-columns: 1.2fr .8fr; min-height: 340px; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-2); overflow: hidden; }
.hero-body { padding: 44px 48px 40px; display: flex; flex-direction: column; align-items: flex-start; }
.hero-k { font-size: 14px; font-weight: 700; letter-spacing: .04em; color: var(--pri); }
.hero-t { font-size: 40px; line-height: 1.25; letter-spacing: -.03em; margin: 6px 0 10px; }
.hero-where { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 15px; }
.hero-where i { width: 10px; height: 10px; border-radius: 50%; background: var(--hc, var(--pri)); }
.hero-d { margin: 14px 0 0; font-size: 16px; max-width: 30em; }
.hero-facts { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 15px; }
.hero-facts li { display: flex; align-items: center; gap: 8px; }
.hero-facts b { font-family: var(--f-small); font-weight: 400; font-size: 13px; color: var(--ink-2); }
.hero-lesson { color: var(--ink-2); }
.hero-go { display: flex; gap: 12px; flex-wrap: wrap; margin-top: auto; padding-top: 28px; }
.hero-art { position: relative; display: grid; place-items: center; background: color-mix(in srgb, var(--hc, #F3E9FF) 28%, #FFFFFF); }
.hero-art::before { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: color-mix(in srgb, var(--hc, #F3E9FF) 45%, #FFFFFF); }
.hero-art svg { position: relative; width: 240px; height: 240px; filter: drop-shadow(0 14px 18px rgba(74, 40, 48, .12)); }

/* 地図 */
.map-card { background: linear-gradient(#FFFAF4, #FBF0E5); border-radius: var(--r-xl); box-shadow: var(--sh-1); padding: 12px 12px 8px; }
.mapsvg { width: 100%; height: auto; }
.mapsvg .mnum { font: 800 15px var(--f-num); fill: #fff; }
.mapsvg .mname { font: 700 15px var(--f-body); fill: var(--ink); letter-spacing: -.02em; }
.mapsvg .mname.own { fill: var(--pri); }
.mapsvg .msub { font: 400 13px var(--f-small); fill: var(--ink-2); }
.mapsvg .msub.here { font: 700 14px var(--f-body); fill: var(--pri); }
.mapsvg .locked .mname { fill: var(--ink-2); font-weight: 500; }
.mapsvg .sel .mname { text-decoration: underline; text-decoration-color: var(--pri); text-decoration-thickness: 3px; }
.mapsvg .mspot:focus-visible .mname { fill: var(--pri); }
.mapsvg .mhere-t { font: 700 14px var(--f-body); fill: #FFFFFF; }
.mapsvg .mhere-s { font: 500 13px var(--f-body); fill: #FFFFFF; }
.mapsvg .mbubble { animation: pinBob 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.mapsvg .mhere { pointer-events: none; }
.mapsvg .mspot { cursor: pointer; }
.mapsvg .mspot:hover .mland, .mapsvg .mspot:focus-visible .mland { transform: translateY(-4px); }
.mapsvg .mland { transition: transform .15s; }
.mapsvg .mspot.locked { cursor: pointer; }
.mapsvg .mspot:focus-visible { outline: none; }
.mlab { list-style: none; padding: 0; margin: -4px 0 0; display: grid; grid-template-columns: repeat(5, 1fr) .82fr; text-align: center; }
.mlab .own b { color: var(--pri); }
.mapsvg .mown { cursor: pointer; }
.mlab li { padding: 0 6px; }
.mlab button { display: flex; flex-direction: column; align-items: center; gap: 0; width: 100%; padding: 6px 4px; border-radius: 14px; }
.mlab button:hover { background: rgba(255, 255, 255, .7); }
.mlab b { font-size: 14px; line-height: 1.45; word-break: keep-all; overflow-wrap: anywhere; }
.mlab span { font-family: var(--f-small); font-size: 14px; color: var(--ink-2); }
.mlab .here span { color: var(--pri); font-family: var(--f-body); font-weight: 700; }
.mlab .locked b { color: var(--ink-2); font-weight: 500; }
.mlab .sel b { text-decoration: underline 3px var(--pri); text-underline-offset: 6px; }

.home-two { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.home-big { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: -16px; }
.bigmode { position: relative; display: grid; grid-template-rows: 170px auto; text-align: left; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-2); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.bigmode:hover { transform: translateY(-3px); }
.bm-art { position: relative; display: block; overflow: hidden; }
.bm-kobo .bm-art { background: #FFF1DE; }
.bm-pop .bm-art { background: #E6F4EE; }
.bm-shelf { position: absolute; left: 24px; right: 120px; bottom: 26px; display: flex; justify-content: space-around; align-items: flex-end; border-bottom: 9px solid #E9C9A6; box-shadow: 0 5px 0 #5A3A40; }
.bm-shelf svg { width: 92px; height: 92px; margin-bottom: -9px; }
.bm-timer { position: absolute; right: 26px; top: 22px; width: 82px; height: 82px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px #5A3A40; display: grid; place-items: center; align-content: center; color: var(--pri); }
.bm-timer .ic { width: 22px; height: 22px; } .bm-timer b { font: 800 26px/1 var(--f-num); color: var(--ink); }
.bm-art .pbunt { height: 40px; }
.bm-cake { position: absolute; left: 50%; bottom: 6px; width: 190px; margin-left: -95px; }
.bm-cake svg { width: 100%; height: auto; }
.bm-txt { display: flex; flex-direction: column; padding: 18px 26px 22px; }
.bm-k { font-size: 13px; font-weight: 700; color: var(--pri); letter-spacing: .04em; }
.bm-t { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; }
.bm-d { font-family: var(--f-small); font-size: 14px; color: var(--ink-2); }
.bm-meta { margin-top: 8px; min-height: 44px; display: flex; align-items: center; gap: 4px; padding-right: 190px; font-size: 14px; } .bm-meta b { font: 800 18px var(--f-num); }
.bm-go { position: absolute; right: 20px; bottom: 22px; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 18px; border-radius: 999px; background: var(--pri); color: #fff; font-weight: 700; box-shadow: 0 3px 0 var(--pri-2); }
.bm-go .ic { width: 18px; height: 18px; }
.bm-pop .bm-go { background: var(--good); box-shadow: 0 3px 0 #1B5E4B; }
/* 全部回ったあとのトップ：自分のお店が主役 */
.hero-own .hero-art.hero-shop { background: radial-gradient(circle at 50% 62%, #FFFFFF 0 34%, transparent 34.5%), #FCE6EC; }
.hero-own .hero-art.hero-shop::before { display: none; }
.hero-shop > svg { width: 300px; height: 300px; filter: none; animation: none; }
.hero-shelf { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; gap: 2px; }
.hero-shelf svg { width: 64px; height: 64px; animation: none; filter: none; }
.soon-row { grid-column: 1 / -1; margin-top: 8px; }
.soon { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.soonc { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 18px 20px; border-radius: var(--r-l); background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1.5px var(--line); }
.soonc-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); margin-bottom: 6px; }
.soonc-ic .ic { width: 26px; height: 26px; }
.soonc b { font-size: 17px; color: var(--ink-2); } .soonc span:not(.soonc-ic) { font-family: var(--f-small); font-size: 13px; color: var(--ink-2); }
.soonc > .lk-ic { position: absolute; right: 16px; top: 16px; }
.map-card.map-mini { max-width: 760px; }
.modes { display: grid; gap: 12px; }
.mode { display: flex; align-items: center; gap: 18px; text-align: left; background: var(--surface); border-radius: var(--r-l); box-shadow: var(--sh-1); padding: 12px 20px 12px 12px; transition: box-shadow .15s, transform .15s; }
.mode:hover { box-shadow: var(--sh-2); transform: translateY(-2px); }
.mode-art { width: 88px; height: 88px; border-radius: 18px; display: grid; place-items: center; background: var(--mc, var(--pri-soft)); flex: none; }
.mode-art svg { width: 72px; height: 72px; }
.mode-txt { display: flex; flex-direction: column; flex: 1; }
.mode-t { font-size: 19px; font-weight: 700; }
.mode-d { font-family: var(--f-small); font-size: 14px; color: var(--ink-2); }
.mode > .ic { color: var(--ink-3); }
.m-challenge { --mc: #FDE6EC; } .m-party { --mc: #E1F3EC; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 188px; background: var(--surface); border-radius: var(--r-l); box-shadow: var(--sh-1); padding: 16px 10px; transition: box-shadow .15s, transform .15s; }
.tile:hover { box-shadow: var(--sh-2); transform: translateY(-2px); }
.tile .ic { width: 76px; height: 76px; padding: 18px; border-radius: 50%; background: var(--pri-soft); color: var(--pri); stroke-width: 1.6; margin-bottom: 12px; }
.tile .ic .f { fill: #FFFFFF; }
.tile b { font-size: 17px; }
.tile span { font-family: var(--f-small); font-size: 13px; color: var(--ink-2); }
.tile .tagnew { position: absolute; top: 12px; right: 12px; color: #FFFFFF; font: 800 12px/1 var(--f-num); }

.news { display: flex; align-items: center; gap: 14px; background: var(--surface); border-radius: var(--r-l); box-shadow: var(--sh-1); padding: 8px 20px 8px 10px; text-align: left; }
.news svg { width: 52px; height: 52px; flex: none; }
.news b { margin-right: 6px; }
.news-go { margin-left: auto; font-weight: 700; color: var(--pri); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.news-go .ic { width: 18px; height: 18px; }
.remind { display: flex; align-items: center; gap: 12px; background: #FFF6DC; border-radius: var(--r-l); padding: 12px 16px 12px 20px; }
.remind span { flex: 1; }

/* ---------- ストリートの画面（通りを選んで、お店＝ステージを選ぶ） ---------- */
#streets .map-card { margin-bottom: 8px; }
.st-band { position: relative; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-2); background: var(--surface); }
.st-scene { height: 150px; overflow: hidden; }
.st-scene svg { width: 100%; height: 100%; }
.st-band .st-head { position: absolute; left: 0; right: 0; top: 96px; padding: 0 24px; }
.st-shops { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; padding: 30px 28px 28px; }
.shopc { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 0 14px 16px; border-radius: var(--r-l); background: var(--surface); box-shadow: var(--sh-1), inset 0 0 0 1.5px var(--line); overflow: hidden; transition: transform .15s, box-shadow .15s; }
button.shopc:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.shopc .aw { width: calc(100% + 28px); height: 26px; background: repeating-linear-gradient(90deg, var(--aw) 0 22px, #fff 22px 44px); clip-path: polygon(0 0, 100% 0, 100% 62%, 93.75% 100%, 87.5% 62%, 81.25% 100%, 75% 62%, 68.75% 100%, 62.5% 62%, 56.25% 100%, 50% 62%, 43.75% 100%, 37.5% 62%, 31.25% 100%, 25% 62%, 18.75% 100%, 12.5% 62%, 6.25% 100%, 0 62%); }
.shopc-art { position: relative; width: 132px; height: 132px; margin: 6px 0 4px; border-radius: 50%; background: color-mix(in srgb, var(--aw) 18%, #FFFFFF); display: grid; place-items: center; }
.shopc-art svg { width: 120px; height: 120px; }
.shopc-art .shopc-lock { position: absolute; right: 2px; bottom: 6px; width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: #fff; color: var(--ink-2); box-shadow: var(--sh-1); }
.shopc-name { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.shopc-lesson { font-family: var(--f-small); font-size: 14px; color: var(--ink-2); }
.shopc-rule { font-family: var(--f-small); font-size: 13px; color: var(--ink-2); background: var(--surface-2); border-radius: 10px; padding: 4px 10px; margin-top: 6px; line-height: 1.5; text-wrap: balance; word-break: auto-phrase; } /* 言葉の切れ目で折り返し、1文字だけ次の行に残らないように */
.shopc-rule > span { display: grid; grid-template-columns: 3.2em 1fr; text-align: left; } /* ★の列と文の列を分け、狭いカードでも文が★の下にもぐらない */ .shopc-rule b { display: inline-block; min-width: 3.2em; color: var(--ink-3, #b9a9ad); letter-spacing: -1px; } .shopc-rule .got b { color: #F2B33D; } /* ★ごとの条件：取れた★は金色 */
.shopc-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 10px; min-height: 40px; }
.shopc-stars { color: var(--star); font-size: 18px; letter-spacing: 2px; } .shopc-stars .muted { color: var(--ink-3); }
.shopc-go { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 999px; background: var(--surface-2); font-weight: 700; font-size: 15px; }
.shopc-go.pri { background: var(--pri); color: #fff; box-shadow: 0 3px 0 var(--pri-2); height: 44px; padding: 0 22px; }
.shopc-go .ic { width: 18px; height: 18px; }
.shopc.next { box-shadow: 0 0 0 3px var(--pri), var(--sh-2); }
.shopc.locked .shopc-art svg { filter: var(--locked); opacity: .85; }
.shopc.locked .shopc-name { color: var(--ink-2); }
.st-map { margin-top: 32px; }
.st-map .map-card { transform-origin: top center; }
.st-bg { position: absolute; inset: 0; }
.st-bg svg { width: 100%; height: 100%; }
.st-head { position: relative; display: flex; align-items: center; gap: 12px; padding: 20px 24px 0; flex-wrap: wrap; }
.st-head h2 { font-size: 24px; background: rgba(255, 255, 255, .92); border-radius: 999px; padding: 2px 18px; }
.st-sub { font-family: var(--f-small); font-size: 14px; background: rgba(255, 255, 255, .85); border-radius: 999px; padding: 2px 12px; color: var(--ink-2); }
.st-place { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 999px; background: var(--pri); color: #FFFFFF; font-size: 14px; font-weight: 700; letter-spacing: -.02em; }
.st-band.dark .st-head h2 { background: rgba(255, 255, 255, .94); color: var(--ink); }
.st-lots { position: relative; display: flex; gap: 14px; overflow-x: auto; padding: 18px 24px 24px; }
.st-lock { background: rgba(255, 255, 255, .94); border-radius: var(--r-m); padding: 12px 20px; margin: 48px auto; display: flex; align-items: center; gap: 8px; }
.lot { flex: none; width: 160px; position: relative; display: flex; flex-direction: column; align-items: center; gap: 0; background: var(--surface); border-radius: var(--r-l); box-shadow: var(--sh-1); padding: 0 8px 14px; overflow: hidden; transition: transform .15s, box-shadow .15s; }
button.lot:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.lot .aw { width: calc(100% + 16px); height: 24px; background: repeating-linear-gradient(90deg, var(--aw) 0 20px, #fff 20px 40px); clip-path: polygon(0 0, 100% 0, 100% 62%, 93.75% 100%, 87.5% 62%, 81.25% 100%, 75% 62%, 68.75% 100%, 62.5% 62%, 56.25% 100%, 50% 62%, 43.75% 100%, 37.5% 62%, 31.25% 100%, 25% 62%, 18.75% 100%, 12.5% 62%, 6.25% 100%, 0 62%); }
.lot .li { width: 92px; height: 92px; margin-top: 4px; } .lot .li svg { width: 100%; height: 100%; }
.lot .ln { font-size: 15px; font-weight: 700; line-height: 1.4; text-align: center; }
.lot .lt { font-family: var(--f-small); font-size: 14px; color: var(--ink-2); text-align: center; }
.lot .ls { color: var(--star); font-size: 16px; letter-spacing: 2px; line-height: 1.4; }
.lot .ls .muted { color: var(--bg-2); }
.lot.next { box-shadow: 0 0 0 3px var(--pri), var(--sh-2); }
.lot.next::after { content: ""; position: absolute; top: 28px; left: 50%; width: 14px; height: 14px; margin-left: -7px; background: var(--pri); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 0 0 3px #fff; animation: pinBob 1.6s ease-in-out infinite; }
.lot.locked { background: rgba(255, 255, 255, .92); box-shadow: none; }
.lot.locked .li { opacity: .35; filter: saturate(.3); }
.lot.locked .ln { color: var(--ink-3); }

/* 通りの画面：左右の矢印で、となりの通りをのぞく */
.st-wrap { position: relative; }
.st-nav { position: absolute; top: 50%; z-index: 3; width: 52px; height: 52px; margin-top: -26px; border-radius: 50%; background: var(--surface); box-shadow: var(--sh-2); display: grid; place-items: center; color: var(--ink); }
.st-nav:hover { color: var(--pri); }
.st-nav .ic { width: 24px; height: 24px; stroke-width: 2.2; }
.st-prev { left: -20px; } .st-next { right: -20px; }
.st-no { font: 800 13px var(--f-num); background: rgba(255, 255, 255, .92); border-radius: 999px; padding: 4px 12px; color: var(--ink-2); }
.st-band.closed .st-lots { pointer-events: none; }
.st-band.closed .lot.locked { background: rgba(255, 255, 255, .95); }
.st-band.closed .lot.locked .li { opacity: .8; filter: saturate(.6); }
.st-band.closed .lot.locked .ln { color: var(--ink-2); }
.st-peek { display: inline-grid; place-items: center; width: 32px; height: 32px; background: var(--ink); color: #fff; border-radius: 50%; }
.st-peek .ic { width: 16px; height: 16px; }
.st-nearrow { display: flex; justify-content: space-between; gap: 12px; margin-top: 4px; }
.st-near { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--r-m); color: var(--ink); text-align: left; }
.st-near:hover { background: var(--surface); box-shadow: var(--sh-1); }
.st-near span { display: flex; flex-direction: column; line-height: 1.35; font-weight: 700; }
.st-near small { font-family: var(--f-small); font-weight: 400; font-size: 12.5px; color: var(--ink-2); }
.st-near-next { margin-left: auto; text-align: right; }
.st-near .ic { width: 20px; height: 20px; color: var(--ink-2); }

/* ---------- 工房（チャレンジ）・特訓 ---------- */
.kobo { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 24px; background: #FFF4E6; border-radius: var(--r-xl); box-shadow: var(--sh-1); padding: 36px 44px; overflow: hidden; }
.kobo h2 { font-size: 30px; line-height: 1.35; margin: 6px 0 16px; }
.kobo .note { margin-top: 10px; }
.kobo-art { position: relative; height: 200px; }
.kobo-shelf { position: absolute; left: 0; right: 60px; bottom: 26px; display: flex; justify-content: space-around; align-items: flex-end; border-bottom: 10px solid #E9C9A6; box-shadow: 0 6px 0 #5A3A40; padding: 0 10px; }
.kobo-shelf svg { width: 104px; height: 104px; margin-bottom: -10px; }
.kobo-timer { position: absolute; right: 0; top: 4px; width: 96px; height: 96px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 0 0 3px #5A3A40, var(--sh-1); display: grid; place-items: center; align-content: center; gap: 0; color: var(--pri); }
.kobo-timer .ic { width: 26px; height: 26px; }
.kobo-timer b { font: 800 30px/1 var(--f-num); color: var(--ink); }
.ch-grid, .menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.ch, .mcard { display: flex; flex-direction: column; gap: 4px; text-align: left; background: var(--surface); border-radius: var(--r-l); box-shadow: var(--sh-1); padding: 20px 22px; transition: box-shadow .15s, transform .15s; }
.ch:hover, .mcard:hover { box-shadow: var(--sh-2); transform: translateY(-3px); }
.ch { position: relative; align-items: flex-start; padding: 22px 24px 20px; }
#challenge .ch-grid { grid-template-columns: repeat(3, 1fr); }
.ch-tag { font-family: var(--f-num); font-weight: 800; font-size: 13px; color: var(--ink-3); letter-spacing: .06em; }
.ch-art { align-self: center; width: 128px; height: 128px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; margin: 4px 0 10px; }
.ch:nth-child(1) .ch-art { background: #FDE6EC; } .ch:nth-child(2) .ch-art { background: #FFF1D6; } .ch:nth-child(3) .ch-art { background: #EEE6FB; }
.ch-art svg { width: 112px; height: 112px; }
.ch .t, .mcard .t { font-size: 22px; font-weight: 700; }
.ch .d, .mcard .d { font-family: var(--f-small); font-size: 14px; color: var(--ink-2); }
.ch-lv { display: flex; gap: 4px; margin: 6px 0 2px; }
.ch-lv i { width: 22px; height: 8px; border-radius: 4px; background: var(--bg-2); }
.ch-lv i.on { background: var(--pri); }
.ch .b { font: 800 26px var(--f-num); color: var(--ink); margin: 6px 0 14px; display: flex; align-items: baseline; gap: 6px; }
.ch .b small { font-family: var(--f-small); font-weight: 400; font-size: 13px; color: var(--ink-2); }
.ch-go { margin-top: auto; align-self: stretch; display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: 999px; background: var(--pri); color: #fff; font-weight: 700; box-shadow: 0 3px 0 var(--pri-2); }
.ch-go .ic { width: 18px; height: 18px; }
.mcard .k { font-family: var(--f-num); font-weight: 700; color: var(--pri); overflow-wrap: anywhere; }
.playopts { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.fingers { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- プレイ ---------- */
#play { padding-top: 16px; }
.hud { display: grid; grid-template-columns: 1fr 1.2fr 1.6fr 1fr; gap: 12px; }
.cell { background: var(--surface); border-radius: var(--r-m); box-shadow: var(--sh-1); padding: 10px 16px; position: relative; overflow: hidden; min-width: 0; }
.cell .lbl { display: block; }
.big { font: 800 30px/1.15 var(--f-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.big small { font-family: var(--f-body); font-size: .5em; font-weight: 500; margin-left: 3px; color: var(--ink-2); }
.timebar { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--good); width: 100%; }
.timebar.low { background: var(--miss); }
.grip { display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.grip-top { display: flex; justify-content: space-between; align-items: baseline; }
.grip-top .lbl small { font-size: 12px; color: var(--ink-3); margin-left: 4px; }
.mult { font: 800 26px/1.1 var(--f-num); color: var(--pri); font-variant-numeric: tabular-nums; }
.gauge { position: relative; height: 10px; border-radius: 6px; background: var(--bg-2); }
.gauge-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 6px; background: var(--pri); transition: width .12s; }
.tick { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--surface); }
.stage { flex: 1; min-height: 420px; position: relative; border-radius: var(--r-xl); overflow: hidden; background: radial-gradient(120% 90% at 50% 100%, var(--stage2), var(--stage) 62%); box-shadow: var(--sh-1); }
.tag { position: absolute; left: 18px; top: 16px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; z-index: 3; }
.tag > span { background: rgba(255, 255, 255, .9); border-radius: 999px; padding: 2px 14px; font-size: 14px; }
.tag-name { font-weight: 700; }
.rarity { font-family: var(--f-num); font-weight: 700; color: var(--pri); }
.rarity.r { background: var(--pri) !important; color: #fff; }
.rarity.s { background: var(--star) !important; color: #3A2600; }
.tex { color: var(--ink-2); }
.level { position: absolute; right: 18px; top: 16px; z-index: 3; font-size: 13px; color: var(--ink-2); background: rgba(255, 255, 255, .9); border-radius: 999px; padding: 2px 14px; }
.floor { position: absolute; left: 50%; bottom: 10px; width: calc(var(--toy) * 1.3); height: calc(var(--toy) * .14); transform: translateX(-50%); border-radius: 50%; background: rgba(74, 40, 48, .08); }
.toy-wrap { position: absolute; left: 50%; bottom: 20px; width: var(--toy); height: var(--toy); margin-left: calc(var(--toy) / -2); z-index: 2; pointer-events: none; }
.toy-wrap.ghost { z-index: 3; }
.toy-inner { position: relative; width: 100%; height: 100%; transform-origin: 50% 100%; }
.toy-canvas { position: absolute; left: -50%; width: 200%; bottom: 0; height: 200%; pointer-events: none; display: block; }
.fx { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.pop { position: absolute; font-family: var(--f-num); font-weight: 900; white-space: nowrap; transform: translate(-50%, -50%); -webkit-text-stroke: 6px #FFFFFF; paint-order: stroke fill; }
.dot { position: absolute; border-radius: 50%; }
.splat { position: absolute; border-radius: 50% 50% 46% 54% / 60% 60% 40% 40%; opacity: .9; }
.count { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-display); font-size: min(26vw, 140px); color: var(--pri); z-index: 6; pointer-events: none; -webkit-text-stroke: 10px #FFFFFF; paint-order: stroke fill; }
.flash { position: absolute; inset: 0; background: var(--miss); opacity: 0; pointer-events: none; z-index: 1; }
.word { position: absolute; left: 50%; top: 56px; transform: translateX(-50%); z-index: 4; width: max-content; max-width: calc(100% - 40px); background: rgba(255, 255, 255, .94); border-radius: var(--r-l); padding: 14px 36px 16px; display: flex; flex-direction: column; align-items: center; text-align: center; box-shadow: var(--sh-2); }
.w-disp { font-size: clamp(28px, 3.6vw, 40px); font-weight: 700; line-height: 1.55; text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; letter-spacing: .04em; }
.w-disp ruby rt { font-size: .4em; font-weight: 500; color: var(--ink-2); letter-spacing: .02em; }
.w-kana { font-size: 18px; color: var(--ink-2); overflow-wrap: anywhere; }
.w-kana:empty { display: none; }
.w-kana .k-done { color: var(--ink-3); }
.w-roma { font-family: var(--f-num); font-weight: 700; font-size: clamp(26px, 3vw, 34px); letter-spacing: .06em; overflow-wrap: anywhere; line-height: 1.35; margin-top: 4px; }
.w-roma .t { color: var(--ink-3); }
.w-roma .c { background: var(--pri); border-radius: 6px; color: #fff; box-shadow: 0 3px 0 var(--pri-2); padding: 0 1px; }
.w-roma .c.bad { background: var(--miss); color: #fff; box-shadow: 0 3px 0 #8E1B21; }
.w-roma.hide .c, .w-roma.hide .r { visibility: hidden; }
.ime { position: absolute; right: 12px; top: -16px; background: var(--miss); color: #fff; font-size: 14px; border-radius: 999px; padding: 2px 14px; }
.foot { display: flex; gap: 14px; align-items: center; font-size: 14px; color: var(--ink-2); }
.foot .sp { flex: 1; }
.ready { position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: color-mix(in srgb, var(--stage) 86%, transparent); backdrop-filter: blur(3px); text-align: center; padding: 24px; }
.rd-title { font-size: 34px; font-weight: 700; color: var(--ink); }
.rd-goal { font-size: 19px; }
.rd-tip { background: var(--surface); border-radius: var(--r-m); padding: 10px 20px; font-size: 17px; max-width: 32em; box-shadow: var(--sh-1); }
.rd-go { display: flex; align-items: center; gap: 12px; font-size: 18px; margin-top: 8px; }
.rd-key { width: 60px; height: 60px; border-radius: 16px; background: var(--surface); display: grid; place-items: center; font: 800 26px var(--f-num); box-shadow: 0 4px 0 var(--line), var(--sh-1); }
.rd-key.on { background: var(--pri); color: #fff; box-shadow: 0 1px 0 var(--pri-2); transform: translateY(3px); }
.rd-space { height: 52px; padding: 0 32px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.04); } }
.tipline { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 6; background: var(--surface); border-radius: 999px; padding: 6px 20px; box-shadow: var(--sh-1); }
/* キーボードと両手の案内（js/game.js の buildKb）。1枚の絵で、指はまんなかの段のキーの真下。
   指の色は4つ（左右の同じ指は同じ色）。キーはうすい色、次のキーと押す指だけ濃い色にして持ち上げ、点線でつなぐ */
.kbguide {
  --f5: #7B5CB8; --f5s: #EEE7F8; --f4: #23866C; --f4s: #DDF1E9; --f3: #A66E0A; --f3s: #FBEFCB; --f2: #CF335C; --f2s: #FCE4EA; --f1: #4C7FB0; --f1s: #E2ECF6;
  position: absolute; right: 16px; bottom: 16px; z-index: 4; width: min(540px, calc(56% - 16px)); display: flex; flex-direction: column; gap: 4px;
  background: rgba(255, 255, 255, .92); padding: 12px 16px 0; border-radius: var(--r-l); box-shadow: var(--sh-1); overflow: hidden;
}
.kg-lbl { margin: 0; min-height: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 16px; color: var(--ink); }
.kg-lbl .kc { min-width: 30px; height: 30px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 8px; background: var(--ink); color: #fff; font: 800 17px var(--f-num); margin-right: 4px; }
.kg-lbl .fn { font-weight: 700; padding: 0 2px; border-bottom: 3px solid; }
.kg-lbl .f1 { color: var(--f1); } .kg-lbl .f5 { color: var(--f5); } .kg-lbl .f4 { color: var(--f4); } .kg-lbl .f3 { color: var(--f3); } .kg-lbl .f2 { color: var(--f2); }
.hand-was { margin-left: auto; font-size: 14px; color: var(--miss); }
.kg-svg { display: block; width: 100%; height: auto; overflow: visible; }
.kgk rect { fill: var(--surface-2); stroke: rgba(90, 58, 64, .14); stroke-width: 1.2; }
.kgk text { font: 700 15px var(--f-num); fill: var(--ink-2); text-anchor: middle; dominant-baseline: central; }
.kgk .bump { stroke: var(--ink-2); stroke-width: 2.4; stroke-linecap: round; }
.kgk.f1 rect { fill: var(--f1s); } .kgk.f5 rect { fill: var(--f5s); } .kgk.f4 rect { fill: var(--f4s); } .kgk.f3 rect { fill: var(--f3s); } .kgk.f2 rect { fill: var(--f2s); }
.kgk.kg-shift text { font-size: 17px; }
.kgk { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .12s; }
.kgk.next { transform: translateY(-4px) scale(1.12); }
.kgk.next rect { stroke: var(--ink); stroke-width: 2.5; }
.kgk.next text, .kgk.next .bump { fill: #fff; stroke: #fff; stroke-width: 0; }
.kgk.next .bump { stroke-width: 2.4; }
.kgk.f1.next rect { fill: var(--f1); } .kgk.f5.next rect { fill: var(--f5); } .kgk.f4.next rect { fill: var(--f4); } .kgk.f3.next rect { fill: var(--f3); } .kgk.f2.next rect { fill: var(--f2); }
.kgk.next { animation: kgBob 1s ease-in-out infinite; }
@keyframes kgBob { 50% { transform: translateY(-7px) scale(1.12); } }
.kgk.pressed rect { fill: #fff; stroke: var(--miss); stroke-width: 2.5; stroke-dasharray: 5 4; }
.kgk.pressed text { fill: var(--miss); }
/* 手：肌の1色に、茶色の線。指先の点は、その指の色 */
.kg-hands .palm, .kg-hands .hf rect { fill: #FFE2CF; }
.kg-hands .palm-line, .kg-hands .hf rect { stroke: #5A3A40; stroke-width: 2.5; stroke-linejoin: round; fill-opacity: 1; }
.kg-hands .palm-line { fill: none; }
.kg-hands .thumb-o { fill: none; stroke: #5A3A40; stroke-width: 23; stroke-linecap: round; }
.kg-hands .thumb { fill: none; stroke: #FFE2CF; stroke-width: 18; stroke-linecap: round; }
.hf { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .12s; }
.hf .tip { stroke: #fff; stroke-width: 0; }
.hf.f1 .tip { fill: var(--f1); } .hf.f5 .tip { fill: var(--f5); } .hf.f4 .tip { fill: var(--f4); } .hf.f3 .tip { fill: var(--f3); } .hf.f2 .tip { fill: var(--f2); }
.hf.on { transform: translateY(-12px); animation: hfBob 1s ease-in-out infinite; }
.hf.on rect { stroke-width: 3; }
.hf.f5.on rect { fill: var(--f5s); } .hf.f4.on rect { fill: var(--f4s); } .hf.f3.on rect { fill: var(--f3s); } .hf.f2.on rect { fill: var(--f2s); }
.hf .tip { transform-box: fill-box; transform-origin: center; }
.hf.on .tip { transform: scale(1.45); stroke-width: 2; }
@keyframes hfBob { 50% { transform: translateY(-16px); } }
.kg-links .link { fill: none; stroke-width: 2.5; stroke-dasharray: 2 6; stroke-linecap: round; }
.kg-links .f5 { stroke: var(--f5); } .kg-links .f4 { stroke: var(--f4); } .kg-links .f3 { stroke: var(--f3); } .kg-links .f2 { stroke: var(--f2); }
@media (prefers-reduced-motion: reduce) { .hf.on, .kgk.next { animation: none; } }
.kbguide.faded { opacity: .28; }
.kbguide.faded:hover { opacity: 1; }
/* 案内のあるお店では、スクイーズを左へ寄せて、案内と重ねない */
.stage.guided .toy-wrap, .stage.hinted .toy-wrap { left: 25%; }
.stage.guided .floor, .stage.hinted .floor { left: 25%; }

/* 遊び方ごとの見た目（js/modeview.js） */
.modeview { position: absolute; left: 18px; top: 58px; z-index: 4; width: 196px; background: rgba(255, 255, 255, .92); border-radius: var(--r-m); box-shadow: var(--sh-1); padding: 12px 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.modeview.ending { animation: mvDone .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes mvDone { 40% { transform: scale(1.08); } }
.mv-k { font-size: 13px; font-weight: 700; color: var(--pri); letter-spacing: .04em; white-space: nowrap; }
.mv-n { font-size: 14px; color: var(--ink-2); } .mv-n b { font: 800 24px var(--f-num); color: var(--ink); margin-right: 3px; }
.mv-sub { font-family: var(--f-small); font-size: 13px; color: var(--ink-2); }
.mv-jar { width: 70px; height: 92px; }
.mv-stack { display: flex; flex-direction: column; gap: 3px; width: 92px; }
.mv-stack i { height: 9px; border-radius: 5px; background: var(--bg-2); box-shadow: inset 0 0 0 1.5px var(--line); transition: background .2s, transform .3s; }
.mv-stack i.on { background: var(--c); box-shadow: inset 0 0 0 2px #5A3A40; animation: drop .35s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes drop { from { transform: translateY(-14px); opacity: 0; } }
.mv-trays { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mv-tray { display: flex; gap: 4px; padding: 5px 7px; border-radius: 10px; background: var(--surface-2); }
.mv-tray.full { background: var(--pri-soft); box-shadow: inset 0 0 0 2px var(--pri); }
.mv-tray i { width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); }
.mv-tray i.on { background: #F28DAB; box-shadow: inset 0 0 0 2px #5A3A40; animation: popIn .35s cubic-bezier(.3, 1.6, .5, 1); }
.mv-hearts { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.mv-heart { width: 26px; height: 26px; fill: var(--bg-2); }
.mv-heart.on { fill: #EE4D63; }
.mv-regain, .mv-next { width: 100%; height: 6px; border-radius: 3px; background: var(--bg-2); overflow: hidden; }
.mv-regain i, .mv-next i { display: block; height: 100%; background: var(--good); border-radius: 3px; }
.mv-next i { background: var(--star); width: 0; }
.mv-tickets { display: flex; gap: 4px; }
.mv-tickets i { width: 26px; height: 34px; border-radius: 5px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.mv-tickets i.on { background: #FFF6DC; box-shadow: inset 0 0 0 2px #5A3A40; background-image: linear-gradient(transparent 9px, #F28DAB 9px 12px, transparent 12px); animation: drop .3s ease-out; }
.mv-tickets i.on.last { background-color: #FFE0E0; }
.mv-tags { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.mv-tags i { width: 20px; height: 14px; border-radius: 3px; box-shadow: inset 0 0 0 1.5px var(--line); }
.mv-tags i.on { background: #FFFFFF; box-shadow: inset 0 0 0 2px #5A3A40; background-image: linear-gradient(90deg, transparent 4px, #F2B33D 4px 14px, transparent 14px); background-size: 100% 3px; background-position: 0 5px; background-repeat: no-repeat; animation: drop .3s ease-out; }
.mv-recipe { display: flex; flex-direction: column; line-height: 1.4; }
.mv-recipe b { font-size: 16px; } .mv-recipe span { font-family: var(--f-small); font-size: 13px; color: var(--ink-2); }
.mv-lines { display: flex; gap: 4px; }
.mv-lines i { width: 18px; height: 6px; border-radius: 3px; background: var(--bg-2); }
.mv-lines i.on { background: var(--pri); } .mv-lines i.cur { background: var(--star); }

/* ---------- 結果 ---------- */
#result { position: relative; overflow: hidden; }
.result-wrap { flex: 1; display: grid; grid-template-columns: minmax(0, 760px) 200px; justify-content: center; gap: 24px; align-items: center; padding-top: 16px; }
.result-card { display: flex; flex-direction: column; gap: 16px; border-radius: var(--r-xl); box-shadow: var(--sh-2); padding: 32px 36px; }
.rank-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
/* 結果の画面のボタン：主は1つを大きく、副は小さく1行に（折り返すときは副の行ごと） */
.r-acts { display: grid; gap: 10px; }
.ra-main { display: flex; }
.ra-main .btn { flex: 1; height: auto; min-height: 60px; padding: 8px 28px; gap: 12px; }
.ra-t { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; text-align: left; } .ra-t small { font-size: 13px; font-weight: 600; color: inherit; opacity: .9; }
.ra-main .btn kbd { margin-left: auto; }
.ra-sub { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; } .ra-sub .btn { padding: 0 10px; }
.ra-sub .btn kbd { margin-left: 4px; }
.r-sub { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--ink-2); }
@media (max-width: 520px) { .ra-sub { grid-auto-flow: row; grid-template-columns: 1fr 1fr; } }
.rank-letter { font-family: var(--f-display); font-size: 72px; line-height: 1; color: var(--pri); min-width: 80px; text-align: center; }
.rank-letter:has(.stars) { min-width: 0; }
.rank-name { font-size: 22px; font-weight: 700; }
.stars { font-size: 44px; letter-spacing: 6px; color: var(--star); line-height: 1; }
.stars .off { color: var(--ink-3); }
.cleared { display: block; font-size: 34px; font-weight: 700; color: var(--pri); letter-spacing: -.02em; }
.rn-sub { display: block; font-size: 16px; font-weight: 500; color: var(--ink); margin-top: 2px; }
.rw { display: flex; flex-direction: column; gap: 8px; flex-basis: 100%; }
.rw-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rw-toys { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.rw-toy { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 104px; text-align: center; font-size: 13px; font-weight: 700; line-height: 1.4; animation: popIn .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.rw-toy:nth-child(2) { animation-delay: .12s; } .rw-toy:nth-child(3) { animation-delay: .24s; } .rw-toy:nth-child(4) { animation-delay: .36s; } .rw-toy:nth-child(5) { animation-delay: .48s; } .rw-toy:nth-child(6) { animation-delay: .6s; }
.rw-toy svg { width: 88px; height: 88px; border-radius: 50%; background: var(--surface-2); }
.rw-toy small { display: block; font-size: 12px; color: var(--pri); }
@keyframes popIn { from { opacity: 0; transform: scale(.4) translateY(10px); } }
.coin-gain { font: 800 18px var(--f-num); }
.gain .ic { width: 18px; height: 18px; color: var(--star); }
.rw-more summary { cursor: pointer; color: var(--ink-2); font-size: 14px; list-style: none; padding: 4px 10px; }
.rw-more[open] summary { display: none; }
.total { font: 800 48px/1.1 var(--f-num); font-variant-numeric: tabular-nums; }
.total .newbest { font: 700 13px var(--f-body); background: var(--star); color: #3A2600; border-radius: 999px; padding: 3px 12px; margin-left: 12px; vertical-align: middle; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kpi { background: var(--surface-2); border-radius: var(--r-m); padding: 10px 14px; font-family: var(--f-small); font-size: 13px; color: var(--ink-2); }
.kpi b { display: block; font: 800 24px var(--f-num); color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi .up { color: var(--good); font-size: 13px; }
.gains { display: flex; flex-wrap: wrap; gap: 8px; }
.gain { background: var(--pri-soft); border-radius: 999px; padding: 4px 14px 4px 6px; display: inline-flex; align-items: center; gap: 6px; font-size: 15px; }
.gain svg { width: 32px; height: 32px; }
.gains .rankbox { flex-basis: 100%; }
.detail { display: flex; flex-direction: column; gap: 12px; }
.mascot-side { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mascot { width: 96px; height: 96px; flex: none; }
.mascot svg { width: 100%; height: 100%; overflow: visible; }
.mascot-side .mascot { width: 140px; height: 140px; }
.mascot.big { width: 160px; height: 160px; }
.bubble { position: relative; background: var(--surface); border-radius: 20px; padding: 12px 18px; font-size: 16px; box-shadow: var(--sh-1); }
.mascot-side .bubble::before { content: ""; position: absolute; left: 50%; top: -8px; width: 16px; height: 16px; background: var(--surface); transform: translateX(-50%) rotate(45deg); border-radius: 3px; }

/* ランキング */
.rankbox { display: flex; flex-direction: column; gap: 8px; background: #EEF4FB; border-radius: var(--r-m); padding: 14px 18px; }
.rk-head { display: flex; align-items: baseline; gap: 8px; } .rk-head b { font: 800 26px var(--f-num); }
.rk-msg { margin: 0; font-size: 16px; } .rk-msg b { color: var(--pri); font-size: 1.2em; }
.rk-tabs { align-self: flex-start; flex-wrap: wrap; display: flex; gap: 4px; background: rgba(255, 255, 255, .7); border-radius: 999px; padding: 3px; }
.rk-tabs button { border-radius: 999px; padding: 4px 14px; font-size: 14px; }
.rk-tabs button.on { background: var(--sky); color: #fff; font-weight: 700; }
.rk-tabs rt { font-size: .6em; }
.rk-list { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 2px; }
.rk-list li { display: flex; align-items: center; gap: 10px; padding: 4px 10px; border-radius: 10px; }
.rk-list li.rk-me { background: var(--pri-soft); }
.rk-n { width: 2em; text-align: right; font-family: var(--f-num); font-weight: 700; color: var(--ink-2); }
.rk-nm { flex: 1; }
.rk-list b { font-family: var(--f-num); font-variant-numeric: tabular-nums; }

/* ---------- 診断 ---------- */
.diag-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.kb { display: flex; flex-direction: column; gap: 6px; }
.kb-row { display: flex; gap: 6px; }
.kb-row:nth-child(2) { margin-left: 18px; } .kb-row:nth-child(3) { margin-left: 30px; } .kb-row:nth-child(4) { margin-left: 50px; }
.kb-key { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font: 700 17px var(--f-num); background: var(--surface-2); position: relative; }
.kb-key.home::after { content: ""; position: absolute; bottom: 5px; width: 10px; height: 2px; background: var(--ink-2); border-radius: 1px; }
.legend { display: flex; gap: 10px; align-items: center; font-family: var(--f-small); font-size: 13px; color: var(--ink-2); }
.sw { width: 18px; height: 12px; border-radius: 4px; display: inline-block; }
.fbars { display: flex; flex-direction: column; gap: 8px; }
.fbar { display: grid; grid-template-columns: 6.5em 1fr 4.5em; gap: 10px; align-items: center; font-size: 14px; }
.fbar .track { display: block; height: 10px; background: var(--bg-2); border-radius: 6px; overflow: hidden; }
.fbar .fill { display: block; height: 100%; background: var(--sky); border-radius: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.kchip b { font-family: var(--f-num); font-size: 19px; margin-right: 4px; }
.kchip small { font-family: var(--f-small); color: var(--ink-2); }
.good { background: var(--good-soft); border-radius: var(--r-m); padding: 12px 16px; }
.chart svg { width: 100%; height: 160px; }

/* ---------- 図鑑（シール帳の台紙） ---------- */
.zhead { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; }
.zcount { display: flex; align-items: baseline; gap: 8px; }
.zcount b { font: 800 44px/1 var(--f-num); }
.zcount span { color: var(--ink-2); font-family: var(--f-num); font-weight: 700; font-size: 20px; }
.zbar { height: 10px; border-radius: 6px; background: var(--bg-2); overflow: hidden; margin-top: 10px; }
.zbar i { display: block; height: 100%; background: var(--pri); border-radius: 6px; }
.zgoal { font-family: var(--f-small); font-size: 14px; color: var(--ink-2); margin-top: 8px; }
.zfins-legend { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.zfl { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 999px; padding: 4px 14px 4px 6px; box-shadow: var(--sh-1); font-size: 14px; }
.zfl i { width: 22px; height: 22px; border-radius: 50%; }
.zbook { background: #FFFDF9 radial-gradient(circle, #F0E4D8 1.2px, transparent 1.4px) 0 0 / 22px 22px; border-radius: var(--r-xl); box-shadow: var(--sh-1), inset 0 0 0 10px #FFFFFF; padding: 32px; }
.zshelf-h { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin: 10px 0 -4px; }
.zshelf-h:first-child { margin-top: 0; }
.zshelf-h h2 { font-size: 18px; }
.zshelf-h span { font-family: var(--f-num); font-weight: 700; color: var(--ink-2); font-size: 15px; }
.zshelf-h .zline { flex: 1; height: 0; border-top: 2px dashed var(--line); }
.zgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 14px; }
.zitem { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; padding: 14px 8px 14px; border-radius: 20px; background: #FFFFFF; box-shadow: var(--sh-1); transition: transform .15s, box-shadow .15s; }
button.zitem:hover { box-shadow: var(--sh-2); }
.zitem[data-sh="cake"] { --zt: #FDE6EC; } .zitem[data-sh="wagashi"] { --zt: #E6F2DF; } .zitem[data-sh="bread"] { --zt: #FBEBD3; } .zitem[data-sh="ice"] { --zt: #E2EFFA; } .zitem[data-sh="snack"] { --zt: #EEE6FB; }
button.zitem:hover { transform: translateY(-3px) rotate(-1deg); }
.zsticker { position: relative; width: 124px; height: 124px; border-radius: 50%; display: grid; place-items: center; background: var(--zt, var(--surface-2)); }
.zsticker svg { width: 116px; height: 116px; }
.zitem .zno { position: absolute; top: 8px; left: 12px; font: 800 13px var(--f-num); color: var(--ink-3); }
.zitem .zn { font-size: 14px; font-weight: 700; line-height: 1.4; margin-top: 8px; min-height: 2.8em; display: flex; align-items: center; justify-content: center; word-break: keep-all; overflow-wrap: anywhere; }
.ztabs { margin: 4px 0 16px; flex-wrap: wrap; }
.ztabs small { margin-left: 6px; font-size: 13px; color: var(--ink-3); }
.ztabs [aria-selected="true"] small { color: var(--pri); }
.zitem .zs { font-family: var(--f-small); font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.zitem .zst { color: var(--star); font-size: 13px; letter-spacing: 2px; line-height: 1.2; }
.zitem.locked .zst { color: var(--ink-3); }
.zd-rec { font-family: var(--f-small); font-size: 14px; color: var(--ink-2); line-height: 1.8; }
.zd-card[data-sh="cake"] { --zt: #FDE6EC; } .zd-card[data-sh="wagashi"] { --zt: #E6F2DF; } .zd-card[data-sh="bread"] { --zt: #FBEBD3; } .zd-card[data-sh="ice"] { --zt: #E2EFFA; } .zd-card[data-sh="snack"] { --zt: #EEE6FB; }
.zitem.locked { background: rgba(255, 255, 255, .55); box-shadow: none; }
.zitem.locked .zsticker { background: transparent; box-shadow: inset 0 0 0 2px var(--line); }
.zitem.locked .zsticker::after { content: "？"; position: absolute; font: 700 30px var(--f-body); color: var(--ink-3); }
.zitem.locked svg { filter: brightness(0) invert(.92) sepia(.25); opacity: .9; }
.zitem.locked .zn { color: var(--ink-3); font-weight: 500; }
.ztag { position: absolute; top: 8px; right: 8px; z-index: 1; }
.fins { display: flex; gap: 5px; justify-content: center; margin-top: 4px; }
.fin { width: 12px; height: 12px; border-radius: 50%; background: var(--bg-2); }
.fin.on.n { background: #F28DAB; } .fin.on.yume { background: #C9A8F2; }
.fin.on.kira { background: conic-gradient(#FFC4E1, #C9E8FF, #D9FFE8, #FFF2B8, #FFC4E1); } .fin.on.gold { background: #F2C14E; }
.zprog { font-family: var(--f-small); font-size: 13px; color: var(--ink-2); }
.zdetail { display: grid; grid-template-columns: 300px 1fr; gap: 32px; align-items: start; }
.zd-card { background: #FFFDF9 radial-gradient(circle, #F0E4D8 1.2px, transparent 1.4px) 0 0 / 22px 22px; border-radius: var(--r-xl); box-shadow: var(--sh-1), inset 0 0 0 10px #fff; padding: 32px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.zd-card .zsticker { width: 220px; height: 220px; background: var(--zt, var(--surface-2)); }
.zd-card .zsticker svg { width: 210px; height: 210px; }
.zd-no { font: 800 14px var(--f-num); color: var(--ink-3); }
.zd-name { font-size: 24px; word-break: keep-all; overflow-wrap: anywhere; }
.zd-stars { color: var(--star); font-size: 20px; } .zd-stars .muted { color: var(--bg-2); }
.zd-stars .zd-tex { color: var(--ink-2); font-size: 15px; margin-left: 8px; }
.zd-info { display: flex; flex-direction: column; gap: 16px; }
.zd-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.zd-facts div { background: var(--surface); border-radius: var(--r-m); padding: 12px 16px; box-shadow: var(--sh-1); font-family: var(--f-small); font-size: 13px; color: var(--ink-2); }
.zd-facts b { display: block; font: 700 18px var(--f-body); color: var(--ink); }
.zd-fins { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.zd-fin { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; background: var(--surface); border-radius: var(--r-l); padding: 14px 10px; box-shadow: var(--sh-1); }
.zd-fin svg { width: 76px; height: 76px; }
.zd-fin b { font-size: 15px; }
.zd-fin.locked svg { filter: brightness(0) opacity(.09); }
.zd-fin.locked { background: rgba(255, 255, 255, .7); }
.zd-fin small { font-family: var(--f-small); font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.zd-pr { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.zd-pr .btn { height: 36px; padding: 0 14px; font-size: 13px; font-weight: 500; }

/* ---------- 自分のお店 ---------- */
.shopview { border-radius: var(--r-xl); padding: 28px 28px 20px; background: linear-gradient(var(--wall), var(--wall2)); color: var(--tink); box-shadow: var(--sh-1); }
.shopview h2 { font-size: 24px; }
.shelves { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 0; margin-top: 14px; }
.slot { height: 108px; border-bottom: 8px solid var(--shelf); box-shadow: 0 5px 0 var(--trim); display: grid; place-items: end center; padding-bottom: 4px; margin-bottom: 16px; }
.slot svg { width: 84px; height: 84px; }
.slot.empty::after { content: "＋"; color: var(--trim); font-size: 22px; opacity: .5; margin-bottom: 22px; }
.lvbar { height: 10px; border-radius: 6px; background: rgba(255, 255, 255, .75); overflow: hidden; }
.lvbar i { display: block; height: 100%; background: var(--trim); }
.tones { display: flex; flex-wrap: wrap; gap: 8px; }
.tone i { width: 16px; height: 16px; border-radius: 50%; display: inline-block; }
.shopcard { display: flex; flex-direction: column; gap: 12px; }
.shopcard h3, .bagcard h3 { margin: 0; }
.bagcard { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; }
.bag-l { display: flex; flex-direction: column; gap: 12px; }
.bag-buy { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.bag-have { display: flex; flex-direction: column; line-height: 1.5; }
.bag-price { display: inline-flex; align-items: center; gap: 6px; font: 700 15px var(--f-num); }
.odds-t { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface-2); border-radius: var(--r-m); overflow: hidden; }
.odds-t caption { text-align: left; font-family: var(--f-small); font-size: 13px; color: var(--ink-2); padding: 0 0 8px; }
.odds-t th, .odds-t td { padding: 9px 16px; border-bottom: 1px solid var(--line); }
.odds-t tr:last-child th, .odds-t tr:last-child td { border-bottom: 0; }
.odds-t th { text-align: left; font-weight: 500; }
.odds-t td { text-align: right; font: 700 15px var(--f-num); font-variant-numeric: tabular-nums; }
.shop-links { display: flex; gap: 8px; }
#myshop { gap: 20px; }

/* ---------- 着せ替え（お店の奥の支度部屋） ---------- */
.dress { display: grid; grid-template-columns: 420px 1fr; gap: 24px; align-items: start; }
.dress-stage { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 12px; }
.dress-mirror { position: relative; height: 480px; border-radius: 210px 210px var(--r-xl) var(--r-xl); background: repeating-linear-gradient(90deg, #FFF6EE 0 26px, #FCEDE3 26px 52px); box-shadow: inset 0 0 0 10px #FFFFFF, inset 0 0 0 13px #5A3A40, var(--sh-1); overflow: hidden; display: grid; place-items: end center; }
.dress-mirror::after { content: ""; position: absolute; left: 50%; bottom: 26px; width: 250px; height: 46px; margin-left: -125px; border-radius: 50%; background: #F7D7E2; box-shadow: inset 0 0 0 3px #5A3A40; z-index: 0; }
.dress-prev { position: relative; z-index: 1; transition: transform .35s cubic-bezier(.2, .8, .3, 1); transform-origin: 50% 20%; padding-bottom: 14px; }
.dress-prev svg { width: 250px; height: 425px; }
.zoom-face .dress-prev { transform: scale(1.32) translateY(64px); }
.zoom-face .dress-mirror::after { opacity: 0; }
.dress-mirror::after { transition: opacity .3s; }
.dress-try { min-height: 56px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; background: var(--surface); border-radius: var(--r-m); padding: 10px 16px; box-shadow: var(--sh-1); }
.dt-k { font-size: 13px; font-weight: 700; color: #fff; background: var(--pri); border-radius: 999px; padding: 0 10px; }
.dress-try .back { margin-left: auto; height: 34px; }
.dress-side { display: flex; flex-direction: column; gap: 14px; }
.dress-rooms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.dress-rooms button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px 12px; border-radius: var(--r-l); background: var(--surface-2); color: var(--ink-2); font-weight: 500; }
.dress-rooms button .ic { width: 44px; height: 44px; stroke-width: 1.5; }
.dress-rooms button[aria-selected="true"] { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: var(--sh-1), inset 0 0 0 2px var(--pri); }
.dress-rooms button[aria-selected="true"] .ic { color: var(--pri); }
.dress-rooms button[aria-selected="true"] .ic .f { fill: var(--pri-soft); }
.dress-shelf { display: flex; flex-direction: column; gap: 16px; }
.dress-slots { align-self: flex-start; flex-wrap: wrap; }
.ditem-art > .ic { width: 36px; height: 36px; color: var(--ink-3); }
.dress-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.ditem { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px 10px; border-radius: var(--r-m); background: var(--surface-2); transition: transform .12s, box-shadow .12s; }
.ditem:hover { transform: translateY(-2px); box-shadow: var(--sh-1); background: var(--surface); }
.ditem-art { width: 92px; height: 92px; border-radius: 50%; overflow: hidden; background: #FFF6EE; display: grid; place-items: center; }
.ditem-art svg { width: 92px; height: 92px; }
.ditem b { font-size: 13px; font-weight: 700; text-align: center; line-height: 1.4; }
.ditem small { display: inline-flex; align-items: center; gap: 2px; font: 700 12px var(--f-num); color: var(--ink-2); }
.ditem small .ic { width: 13px; height: 13px; color: var(--star); }
.ditem.on { background: var(--pri-soft); box-shadow: inset 0 0 0 2px var(--pri); }
.ditem.on::after { content: ""; position: absolute; top: 8px; right: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--pri); box-shadow: 0 0 0 2px #fff; }
.ditem.locked .ditem-art { opacity: .55; }
.ditem.locked b { color: var(--ink-2); font-weight: 500; }
.dress-colors { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
.colors { display: flex; gap: 10px; flex-wrap: wrap; }
.color { width: 36px; height: 36px; border-radius: 50%; box-shadow: inset 0 0 0 3px #fff, 0 0 0 1.5px var(--line); }
.color[aria-pressed="true"] { box-shadow: inset 0 0 0 3px #fff, 0 0 0 3px var(--pri); }

/* ---------- バッジ ---------- */
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.badge { background: var(--surface); border-radius: var(--r-l); padding: 18px 12px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: var(--sh-1); }
.medal { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 800 20px var(--f-num); background: var(--mc); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .12), 0 0 0 4px #fff, 0 0 0 5.5px var(--mc); }
.badge.locked .medal { background: var(--bg-2); color: var(--ink-3); box-shadow: 0 0 0 4px #fff, 0 0 0 5.5px var(--bg-2); }
.badge .bn { font-size: 15px; font-weight: 700; margin-top: 6px; }
.badge .bd { font-family: var(--f-small); font-size: 13px; color: var(--ink-2); }

/* ---------- 設定 ---------- */
.set-tabs { margin-bottom: 8px; }
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.set-grid .card { display: flex; flex-direction: column; gap: 12px; }
.set-grid .wide { grid-column: 1 / -1; }
.set-grid .card > .btn, .set-grid .card > .row { align-self: flex-start; }
.set-h { display: flex; align-items: center; gap: 10px; }
.set-h .ic { color: var(--pri); }
.set-lead { font-size: 15px; color: var(--ink-2); }
.profiles { display: flex; flex-wrap: wrap; gap: 8px; }
.prof { padding-left: 4px; }
.prof .pav { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: #fff; }
.prof .pav svg { width: 36px; height: 43px; }
.themes { display: flex; gap: 8px; flex-wrap: wrap; }
.theme-btn { padding-left: 6px; }
.theme-btn i { width: 24px; height: 24px; border-radius: 50%; background: var(--sw); display: inline-block; }
.set-links { display: flex; flex-wrap: wrap; gap: 8px 16px; font-family: var(--f-small); font-size: 14px; }
.set-links a, .set-links button { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; font-family: inherit; font-size: inherit; }

/* ---------- パーティー（友だちと一日だけのお店。屋台の看板・旗・名札・みんなのケーキ） ---------- */
.pbunt { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 56px; }
.pbunt .flag { transform-box: fill-box; transform-origin: 50% 0; animation: flagSway 3.2s ease-in-out infinite; }
.pbunt .flag:nth-child(odd) { animation-delay: -1.6s; }
@keyframes flagSway { 50% { transform: rotate(5deg); } }
.phero, .psign { position: relative; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-2); background: #FFF4DE radial-gradient(circle at 12% 120%, #FFE1EA 0 30%, transparent 31%), radial-gradient(circle at 92% -20%, #E1F3EC 0 28%, transparent 29%); }
.phero-in { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 24px; padding: 64px 48px 36px; }
.phero h2 { font-size: 32px; line-height: 1.35; margin: 6px 0 18px; }
.psteps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.psteps li { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .85); border-radius: 999px; padding: 6px 16px 6px 6px; font-size: 15px; }
.psteps i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--pri); color: #fff; font: 800 15px var(--f-num); font-style: normal; flex: none; }
.phero-art .cake, .phero-art svg { width: 100%; max-width: 320px; margin: 0 auto; }
.pchoose { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pchoose .card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 28px; }
.pchoose h3 { font-size: 22px; margin: 4px 0 0; }
.pc-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--pri-soft); color: var(--pri); }
.pc-join .pc-ic { background: #E1F3EC; color: var(--good); }
.pc-ic .ic { width: 28px; height: 28px; } .pc-ic .ic .f { fill: #fff; }
.pkey-in { gap: 6px; flex-wrap: wrap; }
.pkey-in select { height: 48px; font-weight: 700; padding: 0 10px; background: var(--surface-2); border-color: transparent; }
.pkey-in span { color: var(--ink-3); }
.pkey-in input[type="text"] { font-family: var(--f-num); width: 12em; }
.pme { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pme > div { display: flex; flex-direction: column; line-height: 1.4; }
.pme b { font-size: 17px; }
.pbadge { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; background: var(--pc, #ccc); color: #3A2630; font-weight: 700; font-size: 14px; box-shadow: inset 0 0 0 2px #5A3A40; }
.pbadge.big { width: 48px; height: 48px; font-size: 20px; box-shadow: inset 0 0 0 2.5px #5A3A40; }
.ppast { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pcode { padding: 0; }
.pcode summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 16px 24px; font-weight: 700; }
.pcode summary::-webkit-details-marker { display: none; }
.pcode summary .ic { width: 20px; height: 20px; color: var(--pri); }
.pcode[open] { padding-bottom: 20px; }
.pcode > :not(summary) { margin: 0 24px 10px; }
.pcode textarea { width: calc(100% - 48px); resize: vertical; font-family: var(--f-num); }
.psign-in { padding: 64px 40px 26px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.psign .pkey { font-size: 40px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); background: #FFFFFF; border-radius: 20px; padding: 6px 28px; box-shadow: 0 0 0 3px #5A3A40, 0 6px 0 #5A3A40; margin: 4px 0 10px; line-height: 1.4; }
.ptok { display: inline-flex; align-items: center; gap: 8px; }
.ptok b { font: 800 22px var(--f-num); letter-spacing: .06em; }
.pwrap { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.pmain { display: flex; flex-direction: column; gap: 16px; }
.pplay { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.pplay .btn { margin-top: 10px; }
.pplay .btn .ic { width: 18px; height: 18px; }
.pticket { position: relative; display: flex; flex-direction: column; gap: 8px; background: #FFFFFF; border-radius: 18px; padding: 18px 22px; box-shadow: var(--sh-1); background-image: radial-gradient(circle at 0 50%, var(--bg) 0 12px, transparent 12.5px), radial-gradient(circle at 100% 50%, var(--bg) 0 12px, transparent 12.5px); border-top: 6px solid var(--star); }
.pticket code { font: 800 22px var(--f-num); letter-spacing: .04em; user-select: all; overflow-wrap: anywhere; }
.pres { flex-basis: 100%; }
.pcake { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding-top: 20px; }
.ptotal { display: flex; align-items: baseline; gap: 6px; font-size: 18px; }
.ptotal b { font: 800 52px/1 var(--f-num); color: var(--pri); }
.cake { width: min(340px, 100%); }
.cake svg { width: 100%; height: auto; }
.cake .flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker 1.4s ease-in-out infinite; }
@keyframes flicker { 50% { transform: scale(.85, 1.08); } }
.pnext { width: 100%; max-width: 340px; }
.pnext .zbar { margin: 0 0 6px; }
.pmem { list-style: none; padding: 0; margin: 10px 0 0; width: 100%; display: flex; flex-direction: column; gap: 4px; text-align: left; }
.pmem li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; background: var(--surface-2); }
.pmem li.me { background: var(--pri-soft); }
.pmem .pm-n { flex: 1; font-weight: 500; } .pmem .pm-n small { margin-left: 8px; font-size: 13px; color: var(--pri); font-weight: 700; }
.pmem b { font: 800 18px var(--f-num); } .pmem small.muted { font-family: var(--f-num); font-weight: 700; min-width: 4.5em; text-align: right; }
.pmedal { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 800 13px var(--f-num); color: var(--ink-2); flex: none; }
.pmedal.m1 { background: #F6D57A; color: #5A3A40; } .pmedal.m2 { background: #DDE2EA; color: #5A3A40; } .pmedal.m3 { background: #EBC4A0; color: #5A3A40; }
.pempty { color: var(--ink-2); padding: 12px; }
/* しめきり（夜9時）：看板の下の札・しめきったあとのケーキ（docs/MODES_PLAN.md 11章） */
.pdead { display: inline-flex; align-items: baseline; gap: 10px; flex-wrap: wrap; justify-content: center; font-weight: 700; color: var(--ink); background: #FFFFFF; border-radius: 999px; padding: 4px 18px; box-shadow: 0 0 0 2px #5A3A40; }
.pdead b { font-family: var(--f-num); color: var(--pri); }
.pdead.done { background: #5A3A40; color: #FFFFFF; }
.pclosed { background: var(--surface-2); }
.pcake.done { border-top: 6px solid #5A3A40; }
.pfinal { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pfinal span { color: var(--ink-2); font-size: 15px; }
.pfinal b { font: 800 40px/1.2 var(--f-num); color: var(--pri); }
.ppast-cmp { margin: 4px 0 0; }
.pres + .prb { flex-basis: 100%; }

/* ---------- 休憩・共有・実物（PR） ---------- */
.rest { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; }
.rest h1 { font-size: 32px; }
.rest p { font-size: 19px; }
.rest-count { font: 800 80px/1 var(--f-num); color: var(--pri); font-variant-numeric: tabular-nums; }
.share-img { max-width: min(100%, 760px); border-radius: var(--r-m); box-shadow: var(--sh-2); }
.share-acts { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 4px; }
.share-acts .btn .ic { width: 18px; height: 18px; }
.real-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 8px; }
.real-list .card { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.real-list .card h3 { font-size: 15px; margin: 0; line-height: 1.5; }
.real-list .row { gap: 6px; margin-top: auto; }
.real-list .btn.small { height: 36px; padding: 0 14px; font-size: 14px; font-weight: 500; background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line), 0 2px 0 var(--line); }
#real h3 { font-size: 17px; margin: 16px 0 10px; }
#real > p { max-width: 46em; }

/* ---------- 初めての人のページ（LP） ---------- */
.topbar.lp-mode .me { display: none; }
.lp { gap: 0; padding-bottom: 24px; }
.lp h2 { font-size: 30px; line-height: 1.4; text-align: center; margin-bottom: 28px; }
.lp-hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 32px; min-height: 560px; padding: 24px 0 40px; }
.lp-k { font-size: 15px; font-weight: 700; color: var(--pri); letter-spacing: .06em; }
.lp-hero h1 { font-size: 56px; line-height: 1.22; letter-spacing: -.04em; margin: 10px 0 18px; }
.lp-lead { font-size: 18px; line-height: 1.9; color: var(--ink); }
.lp-learn { display: flex; flex-direction: column; gap: 2px; margin: 16px 0 0; padding: 12px 16px; background: var(--surface); border-radius: var(--r-m); box-shadow: var(--sh-1); }
.lp-learn b { font-size: 18px; line-height: 1.5; font-weight: 700; color: var(--pri-2); word-break: auto-phrase; text-wrap: balance; }
.lp-lead { word-break: auto-phrase; }
@media (max-width: 520px) { .lp-learn b { font-size: 16px; } }
.lp-learn span { font-family: var(--f-small); font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.lp-tags { list-style: none; padding: 0; margin: 22px 0 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.lp-tags li { background: var(--surface); border-radius: 999px; padding: 4px 16px; font-size: 14px; box-shadow: var(--sh-1); }
.lp-go { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.lp-go .btn.big { height: 68px; padding: 0 56px; font-size: 21px; }
.lp-demo { position: relative; height: 500px; border-radius: 40px; background: radial-gradient(circle at 50% 60%, #FFFFFF 0 34%, transparent 34.5%), linear-gradient(160deg, #FFE1EA, #F3EAFF); box-shadow: var(--sh-2); overflow: hidden; }
.lp-demo-word { position: absolute; left: 50%; top: 36px; transform: translateX(-50%); background: #fff; border-radius: 22px; padding: 10px 28px 12px; text-align: center; box-shadow: var(--sh-1); z-index: 2; white-space: nowrap; }
.lp-demo-word b { display: block; font-size: 26px; letter-spacing: .04em; }
.lp-demo-word span { font: 700 22px var(--f-num); letter-spacing: .06em; color: var(--ink-3); }
.lp-demo-word span i { font-style: normal; color: var(--ink); }
.lp-demo-toy { position: absolute; left: 50%; bottom: 60px; width: 230px; height: 230px; margin-left: -115px; }
.lp-demo-fx { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.lp-sec { padding: 64px 0; }
.lp-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: st; }
.lp-steps li { position: relative; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-1); padding: 28px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; counter-increment: st; }
.lp-steps li::before { content: counter(st); position: absolute; top: 18px; left: 20px; width: 32px; height: 32px; border-radius: 50%; background: var(--pri); color: #fff; font: 800 16px/32px var(--f-num); text-align: center; }
.lp-steps b { font-size: 19px; margin-top: 8px; }
.lp-steps li > span:last-child { font-family: var(--f-small); font-size: 14px; color: var(--ink-2); }
.lp-step-art { height: 150px; display: flex; align-items: center; justify-content: center; }
.lp-step-art svg { width: 130px; height: 130px; }
#lpStep3 svg { width: 84px; height: 84px; margin: 0 -8px; }
.lp-mini-word { background: var(--surface-2); border-radius: 18px; padding: 12px 22px; display: flex; flex-direction: column; align-items: center; }
.lp-mini-word b { font-size: 26px; }
.lp-mini-word rt { font-size: .42em; color: var(--ink-2); }
.lp-mini-word i { font: 700 20px var(--f-num); font-style: normal; letter-spacing: .05em; color: var(--ink-3); }
.lp-mini-word u { text-decoration: none; background: var(--star); color: #2A1A00; border-radius: 4px; padding: 0 2px; }
.lp-world .mlab-n { display: flex; flex-direction: column; align-items: center; padding: 6px 4px; }
.lp-world .mlab-n > span { font-family: var(--f-small); font-size: 13px; color: var(--ink-2); }
.lp-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-feat { background: var(--surface); border-radius: var(--r-l); box-shadow: var(--sh-1); padding: 22px 24px; display: grid; grid-template-columns: 96px 1fr; grid-template-rows: auto 1fr; column-gap: 16px; align-items: center; }
.lp-feat-art { grid-row: 1 / 3; width: 96px; height: 96px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.lp-feat-art svg { width: 86px; height: 86px; }
.lp-feat b { font-size: 19px; align-self: end; }
.lp-feat span:last-child { font-family: var(--f-small); font-size: 14px; color: var(--ink-2); align-self: start; }
.lp-toys { padding: 24px 0; overflow: hidden; margin: 0 -32px; }
.lp-mq { display: flex; gap: 18px; width: max-content; animation: mq 60s linear infinite; }
.lp-mq span { width: 110px; height: 110px; border-radius: 50%; background: var(--surface); box-shadow: var(--sh-1); display: grid; place-items: center; flex: none; }
.lp-mq svg { width: 96px; height: 96px; }
@keyframes mq { to { transform: translateX(-50%); } }
.lp-safe-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.lp-safe-list li { background: var(--surface); border-radius: var(--r-l); box-shadow: var(--sh-1); padding: 22px 26px; display: flex; flex-direction: column; gap: 4px; }
.lp-safe-list b { font-size: 18px; }
.lp-safe-list span { font-family: var(--f-small); font-size: 15px; color: var(--ink-2); line-height: 1.8; }
.lp-end { text-align: center; padding: 56px 0 24px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.lp-end h2 { margin: 0; }
.lp-end .btn.big { height: 68px; padding: 0 64px; font-size: 21px; }
.lp-links { display: flex; gap: 20px; font-family: var(--f-small); font-size: 14px; margin-top: 18px; }
.lp-links a { color: var(--ink-2); }
.lp-small { font-family: var(--f-small); font-size: 13px; color: var(--ink-3); }

.lp-demo { cursor: pointer; touch-action: none; user-select: none; }
.lp-demo-hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); font-size: 13px; color: var(--ink-2); background: rgba(255, 255, 255, .8); border-radius: 999px; padding: 2px 14px; }
.lp-shelfbox { max-width: 640px; margin: 0 auto; background: #FFF4E6; border-radius: var(--r-xl); box-shadow: var(--sh-1); padding: 28px 40px 18px; }
.lp-shelfrow { display: flex; justify-content: space-around; align-items: flex-end; height: 128px; border-bottom: 12px solid #E9C9A6; box-shadow: 0 6px 0 #5A3A40; margin-bottom: 28px; }
.lp-put svg { width: 112px; height: 112px; margin-bottom: -12px; }
.lp-shelf .lp-put { opacity: 0; transform: translateY(-40px) scale(.8); }
.lp-shelf.in .lp-put { animation: putIn .6s cubic-bezier(.3, 1.6, .5, 1) var(--d) both; }
@keyframes putIn { from { opacity: 0; transform: translateY(-40px) scale(.8); } to { opacity: 1; transform: none; } }
.lp-own { width: 220px; height: 220px; margin-bottom: -10px; }
.lp-own svg { width: 100%; height: 100%; }
.rv { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .3, 1); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .lp-shelf .lp-put { opacity: 1; transform: none; } }


/* お祝い（js/fx.js の celebrate）。押すと飛ばせる */
.celebrate { position: fixed; inset: 0; z-index: 70; overflow: hidden; cursor: pointer; transition: opacity .25s; }
.celebrate.out { opacity: 0; }
.fxtape { position: absolute; width: 90px; height: 9px; border-radius: 5px; background: var(--c); box-shadow: inset 0 0 0 1.5px rgba(90, 58, 64, .4); transform-origin: 0 50%; }
.fxcone { position: absolute; width: 52px; height: 52px; }
.fxcone::before { content: ""; position: absolute; inset: 0; background: conic-gradient(from 200deg at 50% 100%, #F6D57A 0 20deg, #F28DAB 20deg 40deg, #F6D57A 40deg 60deg, #F28DAB 60deg 80deg, transparent 80deg); clip-path: polygon(50% 100%, 0 0, 100% 0); border-radius: 4px; }
.fxbanner { position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 4px; background: #FFFFFF; border-radius: var(--r-l); padding: 16px 36px; box-shadow: 0 0 0 4px #5A3A40, 0 8px 0 #5A3A40, var(--sh-2); text-align: center; white-space: nowrap; }
.fxbanner b { font-size: 30px; color: var(--pri); letter-spacing: -.02em; }
.fxbanner span { font-size: 16px; color: var(--ink); }
.fxbanner.pop { animation: bannerPop .6s cubic-bezier(.3, 1.6, .5, 1) both; }
.fxbanner.drop { top: 220px; animation: bannerDrop .7s cubic-bezier(.3, 1.4, .5, 1) both; }
.fxbanner.grand { top: 42%; padding: 22px 48px; animation: bannerPop .8s .2s cubic-bezier(.3, 1.6, .5, 1) both; }
.fxbanner.grand b { font-size: 38px; }
.fxbanner.calm { animation: none; }
@keyframes bannerPop { from { transform: translate(-50%, -50%) scale(.4); opacity: 0; } }
@keyframes bannerDrop { from { transform: translate(-50%, -160%); opacity: 0; } }
.fxkusu { position: absolute; left: 50%; top: 40px; width: 120px; height: 120px; margin-left: -60px; }
.fxkusu i.l, .fxkusu i.r { position: absolute; top: 0; width: 60px; height: 120px; background: #F28DAB; box-shadow: inset 0 0 0 3px #5A3A40; transition: transform .5s cubic-bezier(.3, .8, .4, 1); }
.fxkusu i.l { left: 0; border-radius: 60px 0 0 60px; transform-origin: 100% 0; background: radial-gradient(circle at 70% 40%, #FFFFFF 0 6px, transparent 7px) 0 0 / 24px 24px, #F28DAB; }
.fxkusu i.r { right: 0; border-radius: 0 60px 60px 0; transform-origin: 0 0; background: radial-gradient(circle at 30% 40%, #FFFFFF 0 6px, transparent 7px) 0 0 / 24px 24px, #F6D57A; }
.fxkusu i.cord { position: absolute; left: 58px; top: -40px; width: 4px; height: 42px; background: #5A3A40; }
.fxkusu.open i.l { transform: rotate(-70deg); } .fxkusu.open i.r { transform: rotate(70deg); }
.fxtapecut { position: absolute; left: 0; right: 0; top: 46%; height: 30px; }
.fxtapecut i.l, .fxtapecut i.r { position: absolute; top: 0; width: 50%; height: 30px; background: repeating-linear-gradient(90deg, #E05A62 0 40px, #FFFFFF 40px 80px); box-shadow: inset 0 0 0 3px #5A3A40; transition: transform .6s cubic-bezier(.3, .8, .4, 1), opacity .6s; }
.fxtapecut i.l { left: 0; transform-origin: 0 50%; } .fxtapecut i.r { right: 0; transform-origin: 100% 50%; }
.fxtapecut i.bow { position: absolute; left: 50%; top: -18px; width: 60px; height: 60px; margin-left: -30px; border-radius: 50%; background: radial-gradient(circle, #FFFFFF 0 10px, #E05A62 11px); box-shadow: 0 0 0 3px #5A3A40; transition: transform .5s, opacity .5s; }
.fxtapecut.cut i.l { transform: rotate(-24deg) scaleX(.5); opacity: 0; } .fxtapecut.cut i.r { transform: rotate(24deg) scaleX(.5); opacity: 0; } .fxtapecut.cut i.bow { transform: translateY(80px) scale(.6); opacity: 0; }
.celebrate.reduce * { animation: none !important; transition: none !important; }
/* 結果の星：1つずつ「ポン」と入る */
.stars .st-on { display: inline-block; animation: starPon .45s cubic-bezier(.3, 1.8, .5, 1) both; }
.stars .st-on:nth-child(2) { animation-delay: .25s; } .stars .st-on:nth-child(3) { animation-delay: .5s; }
@keyframes starPon { from { transform: scale(0) rotate(-40deg); opacity: 0; } }

/* ---------- まだのもの（docs/DESIGN_SYSTEM.md 4章「まだのもの」）----------
   絵は --locked で色を落とす。鍵の印（.lk-ic）と、開く条件を短く。文字は --ink-2 で読める濃さを保つ */
.lk-ic { width: 14px; height: 14px; vertical-align: -2px; margin-right: 3px; color: var(--ink-2); }
.lot.locked .li, .ditem.locked .ditem-art, .zd-fin.locked svg, .tone[disabled] i { filter: var(--locked); opacity: .85; }
.lot.locked .lt { display: inline-flex; align-items: center; color: var(--ink-2); }
.ditem.locked small { color: var(--ink-2); }
.ditem.locked { background: rgba(246, 238, 230, .6); }
.tone[disabled] { opacity: 1; color: var(--ink-2); background: rgba(246, 238, 230, .6); cursor: not-allowed; }
.tone[disabled] small { display: inline-flex; align-items: center; }
.badge.locked .bn { color: var(--ink-2); }

/* ---------- 動き（js/fx.js の粒・ボタンの手ごたえ・地図の小さな動き） ---------- */
.fxp { position: absolute; display: block; pointer-events: none; background: var(--c); border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(90, 58, 64, .55); will-change: transform, opacity; }
.fxp-drop { border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; }
.fxp-blob { border-radius: 46% 54% 52% 48% / 55% 48% 52% 45%; box-shadow: inset 0 0 0 1.5px rgba(90, 58, 64, .45), inset -3px -3px 0 rgba(90, 58, 64, .08); }
.fxp-star { border-radius: 0; background: none; box-shadow: none; }
.fxp-star::before { content: ""; position: absolute; inset: 0; background: var(--c); clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); }
.fxring { position: absolute; width: 160px; height: 160px; border-radius: 50%; border: 6px solid var(--c); pointer-events: none; }
.fxconf { position: absolute; width: 10px; height: 14px; border-radius: 3px; background: var(--c); box-shadow: inset 0 0 0 1.5px rgba(90, 58, 64, .4); pointer-events: none; z-index: 30; }
/* ボタン：押すと、ぷにっと縮んで戻る */
.btn:active, .ch:active, .mode:active, .tile:active, button.zitem:active, .lot:active { transform: translateY(3px) scale(.97); }
.tile:hover .ic { animation: wobble .6s ease-in-out; }
@keyframes wobble { 30% { transform: rotate(-8deg) scale(1.06); } 60% { transform: rotate(6deg); } }
/* トップの地図：看板と雲が、ゆっくり揺れる。いまここのピンは、はずむ */
.mapsvg .mland { transform-box: fill-box; transform-origin: 50% 100%; }
.mapsvg .mspot:not(.locked) .mland { animation: sway 4.8s ease-in-out infinite; }
.mapsvg .mspot:nth-of-type(2n) .mland { animation-delay: -2.4s; }
@keyframes sway { 50% { transform: rotate(.8deg) translateY(-1px); } }
.mapsvg .mpin { animation: pinBob 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes pinBob { 50% { transform: translateY(-6px); } }
.hero-art svg { animation: breathe 3.2s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes breathe { 50% { transform: scale(1.03, .97); } }

@media (max-width: 860px) {
  #app { padding: 0 16px 24px; }
  .topbar { margin: 0 -16px; padding: 0 16px; height: 64px; }
  .logo img { height: 32px; }
  .me-t, .coin-word { display: none; }
  .me-btn { padding-right: 6px; }
  .hero { grid-template-columns: 1fr; }
  .hero-art { min-height: 200px; order: -1; }
  .hero-art::before { width: 170px; height: 170px; }
  .hero-art svg { width: 160px; height: 160px; }
  .hero-body { padding: 24px 22px 26px; }
  .hero-t { font-size: 30px; }
  .home { gap: 36px; }
  .home-big, .home-two, .diag-grid, .set-grid, .dress, .result-wrap, .pwrap, .zdetail, .pchoose, .phero-in, .kobo { grid-template-columns: 1fr; }
  .kobo { padding: 24px; } .kobo-art { height: 150px; } .kobo-shelf svg { width: 76px; height: 76px; }
  .phero-in, .psign-in { padding: 56px 20px 24px; }
  .phero h2 { font-size: 24px; }
  .psign .pkey { font-size: 28px; }
  .map-card { overflow-x: auto; }
  .map-card > * { min-width: 820px; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .bagcard { grid-template-columns: 1fr; gap: 20px; }
  .tile { min-height: 140px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .hud { grid-template-columns: 1fr 1fr; }
  .zbook { padding: 18px; }
  .zgrid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .zsticker { width: 96px; height: 96px; } .zsticker svg { width: 80px; height: 80px; }
  .zhead { grid-template-columns: 1fr; } .zfins-legend { justify-content: flex-start; }
  .zd-facts, .zd-fins { grid-template-columns: repeat(2, 1fr); }
  .mesheet-card { top: 70px; }
  .st-prev { left: 4px; } .st-next { right: 4px; }
  .lp-hero, .lp-steps, .lp-feats, .lp-safe-list { grid-template-columns: 1fr; }
  .dress-stage { position: static; } .dress-mirror { height: 340px; }
  .lp-hero h1 { font-size: 38px; }
  .lp-demo { height: 380px; }
  .lp h2 { font-size: 24px; }
  .lp-toys { margin: 0 -16px; }
  /* タブは横に送る（縦に潰さない） */
  .tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .tabs button, .seg label { white-space: nowrap; flex: none; }
  .ztabs { flex-wrap: nowrap; }
  .news { flex-wrap: wrap; gap: 6px 12px; }
  .news-go { margin-left: 66px; }
  /* スマホの幅：案内は下いっぱいに。スクイーズは上へ逃がして小さく */
  .kbguide { left: 8px; right: 8px; bottom: 8px; width: auto; padding: 8px 10px 0; }
  .kg-lbl { font-size: 14px; min-height: 26px; }
  .kg-lbl .kc { min-width: 26px; height: 26px; font-size: 15px; }
  .stage.guided .toy-wrap { left: 74%; bottom: 236px; width: calc(var(--toy) * .5); height: calc(var(--toy) * .5); margin-left: calc(var(--toy) * -.25); }
  .stage.guided .floor { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- 見せ合いのお店（#/visit/…） ---------- */
.vs-hero { display: grid; grid-template-columns: 220px 1fr auto; align-items: center; gap: 24px; padding: 24px 32px; border-radius: var(--r-xl); background: var(--wall, #FFE4EF); color: var(--tink, var(--ink)); box-shadow: var(--sh-2); overflow: hidden; }
.vs-front svg { width: 220px; height: 220px; display: block; }
.vs-k { font-size: 14px; opacity: .8; margin: 0; }
.vs-txt h2 { font-size: 40px; letter-spacing: -.03em; line-height: 1.3; margin: 2px 0 12px; }
.vs-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.vs-meta .chip { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px; background: rgba(255, 255, 255, .8); color: var(--ink); font-size: 13px; }
.vs-owner { display: flex; flex-direction: column; align-items: center; gap: 2px; align-self: end; margin-bottom: -24px; }
.vs-owner svg { width: 150px; height: auto; display: block; }
.vs-owner span { font-size: 13px; background: var(--surface); color: var(--ink-2); padding: 0 12px; border-radius: 999px; margin: -18px 0 32px; position: relative; }
.vs-shelf { margin-top: 16px; }
.vs-shelf .shelves { grid-template-columns: repeat(4, 1fr); }
.vs-shelf .slot svg { width: 92px; height: 92px; }
.vs-shelf .slot.empty::after { content: ""; }
.vs-cta { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin: 24px 0 8px; color: var(--ink-2); }
.vs-cta p { margin: 0; text-align: center; }
.vs-logo { height: 32px; width: auto; }
/* いちばん下の PR。線で区切って、小さく。絵は出さない */
.prb { margin-top: 48px; padding-top: 24px; border-top: 1.5px solid var(--line); }
.prb h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; margin: 0 0 4px; }
.prb .note { font-size: 13px; }
.prb-list { display: grid; grid-template-columns: repeat(3, minmax(0, 200px)); gap: 12px; margin: 12px 0; }
.prb-more { display: flex; margin-top: 4px; }
.prb .prb-more.btn.small { height: 36px; padding: 0 16px; font-size: 14px; font-weight: 500; }
.sv-show { margin-left: auto; }
@media (max-width: 760px) {
  .vs-hero { grid-template-columns: 1fr auto; padding: 20px; gap: 12px; }
  .vs-front { display: none; }
  .vs-txt h2 { font-size: 24px; }
  .vs-shelf .slot.empty { display: none; }
  .vs-owner svg { width: 110px; }
  .vs-shelf .shelves { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) { .bm-meta { padding-right: 0; margin-bottom: 52px; } }

/* ---------- 新しい子の NEW（はねる）・仕上げの印・ノートの見出し ---------- */
.tagnew.bounce { animation: newBounce 1.6s cubic-bezier(.3, 1.6, .5, 1) infinite; transform-origin: 50% 100%; box-shadow: 0 2px 0 var(--pri-2); }
@keyframes newBounce { 0%, 55%, 100% { transform: translateY(0) scale(1); } 15% { transform: translateY(-7px) scale(1.06, .96); } 30% { transform: translateY(0) scale(1.08, .9); } 42% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .tagnew.bounce { animation: none; } }
.shopc-new { position: absolute; top: 10px; right: 10px; z-index: 2; }
.zitem .ztag { position: absolute; top: 8px; right: 8px; z-index: 1; }
.fin-ic { width: 16px; height: 16px; flex: none; }
.fins { gap: 3px; }
.zfl .fin-ic { width: 22px; height: 22px; }
.zhead-l { display: flex; align-items: center; gap: 16px; }
.zhead-c { flex: 1; max-width: 520px; }
.znote-ic { width: 64px; height: 64px; border-radius: 20px; background: var(--pri-soft); color: var(--pri); display: grid; place-items: center; flex: none; }
.znote-ic .ic { width: 40px; height: 40px; }
.znote-ic .ic .f { fill: #FFFFFF; }

/* ---------- 通りのイベント（冬のあったか通りなど）。トップのカードと、結果の行 ---------- */
.evcard { display: grid; grid-template-columns: 1fr 220px; gap: 24px; align-items: center; padding: 24px 32px; border-radius: var(--r-xl); background: #EEF4FB; box-shadow: var(--sh-1); position: relative; overflow: hidden; }
.evcard::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(#FFFFFF 2px, transparent 2.5px); background-size: 28px 28px; opacity: .8; pointer-events: none; }
.evcard > * { position: relative; }
.evcard h2 { font-size: 28px; letter-spacing: -.03em; margin: 2px 0 4px; }
.ev-d { margin: 0 0 12px; color: var(--ink-2); }
.ev-slots { display: flex; gap: 10px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.ev-slot { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ev-stamp { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: inset 0 0 0 2px #D5E2EF; color: #9BB3CC; font: 800 16px var(--f-num); }
.ev-slot.on .ev-stamp, .ev-stamp.on { background: #D93A48; color: #FFFFFF; box-shadow: 0 2px 0 #A8263A; transform: rotate(-8deg); }
.ev-slot.next .ev-stamp { box-shadow: inset 0 0 0 2.5px #D93A48; color: #D93A48; }
.ev-flake { width: 24px; height: 24px; }
.ev-gift { width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, .8); display: grid; place-items: center; overflow: hidden; }
.ev-gift svg { width: 44px; height: 44px; }
.ev-slot:not(.on) .ev-gift svg { filter: saturate(.18) brightness(1.1) contrast(.85); opacity: .85; }
.ev-meta { display: flex; gap: 16px; margin: 12px 0 0; font-size: 14px; color: var(--ink-2); }
.ev-meta b { font: 800 18px var(--f-num); color: var(--ink); }
.ev-r { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; background: var(--surface); border-radius: var(--r-l); padding: 16px; box-shadow: var(--sh-1); }
.ev-next-k { font-size: 13px; font-weight: 700; color: #D93A48; }
.ev-next-art svg { width: 90px; height: auto; display: block; }
.ev-next-art .ev-flake { color: #D93A48; width: 64px; height: 64px; margin: 28px; }
.ev-next-n { font-size: 18px; }
.ev-next-d { font-size: 14px; color: var(--ink-2); }
.rw-event { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #EEF4FB; border-radius: var(--r-m); padding: 10px 16px; }
.rw-event .ev-stamp { width: 40px; height: 40px; }
.rw-ev-t { display: flex; flex-direction: column; } .rw-ev-t b { font-size: 16px; }
.rw-ev-gift { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 999px; padding: 2px 14px 2px 4px; font-size: 14px; }
.rw-ev-gift svg { width: 40px; height: 40px; border-radius: 50%; }
@media (max-width: 760px) { .evcard { grid-template-columns: 1fr; padding: 20px; } .ev-slots { gap: 6px; } .ev-stamp, .ev-gift, .ev-gift svg { width: 38px; height: 38px; } }

/* 遊ぶ画面の英語の意味（英語の画面のときだけ。中身は game.js）：小さめ・2行まで */
.wmean { max-width: 34em; margin: 4px auto 0; font-family: var(--f-small); font-size: 14px; line-height: 1.5; color: var(--ink-2); text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wmean[hidden], .wmean:empty { display: none; }
/* 設定：ことばとキーボード */
.seg-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.kb-row { align-items: flex-start; }
.kb-btn { display: inline-flex; flex-direction: column; align-items: flex-start; height: auto; padding: 6px 14px; line-height: 1.3; }
.kb-btn b { font: 800 14px var(--f-num); letter-spacing: .04em; } .kb-btn small { font-size: 13px; color: var(--ink-2); }
.set-lang .lbl { min-width: 9.5em; padding-top: 6px; }
.set-lang .row { justify-content: flex-start; gap: 12px; } .set-lang .lbl { text-align: left; }

/* ---------- 結果：腕前（打鍵/分・正確率）を一段目に・★の目標の棒・のびしろキーの特訓 ---------- */
.skill { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sk { background: var(--surface-2); border-radius: var(--r-m); padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.sk .lbl { font-family: var(--f-small); font-size: 13px; color: var(--ink-2); }
.sk b { font: 800 40px/1.05 var(--f-num); font-variant-numeric: tabular-nums; } .sk b small { font-size: 20px; margin-left: 2px; }
.sk-d { font-family: var(--f-small); font-size: 14px; color: var(--ink-2); } .sk-d.up { color: var(--good); font-weight: 700; }
.sk-next { grid-column: 1 / -1; font-size: 15px; font-weight: 700; color: var(--ink); } /* 次の★まで：1行 */
.sk-goal { grid-column: 1 / -1; display: grid; grid-template-columns: 7.5em 1fr 12.5em; align-items: center; gap: 12px; }
.sk-goal-k { font-size: 13px; font-weight: 700; color: var(--ink); }
.sk-bar { position: relative; height: 12px; border-radius: 6px; background: var(--bg-2); overflow: hidden; }
.sk-bar i { display: block; height: 100%; border-radius: 6px; background: var(--star); }
.sk-goal-t { font-size: 14px; color: var(--ink-2); white-space: nowrap; } .sk-goal-t b { color: var(--ink); font-family: var(--f-num); }
.result-card .total { font-size: 32px; }
.sk-train { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 12px 16px; border-radius: var(--r-m); background: var(--pri-soft); color: var(--ink); }
.sk-train > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; } .sk-train small { font-size: 13px; color: var(--ink-2); }
.sk-train .ic { width: 20px; height: 20px; color: var(--pri); }
.sk-train-keys { display: flex; gap: 6px; }
.sk-train kbd { min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; background: var(--surface); box-shadow: 0 3px 0 var(--line); font: 800 16px var(--f-num); color: var(--pri); }
@media (max-width: 520px) { .sk b { font-size: 32px; } .sk-goal { grid-template-columns: 1fr; gap: 4px; } }
#rKpis { display: flex; flex-direction: column; align-items: stretch; gap: 12px; } #rKpis .detail { align-self: flex-start; } #rKpis .detail[open] { align-self: stretch; }

/* ---------- 自分のお店を持ってから：トップの主役・おすすめ・お店の中の遊び ---------- */
.own-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.own-stage { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 999px; background: var(--pri-soft); color: var(--pri); font-weight: 700; font-size: 14px; }
.own-grade { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px; border-radius: 999px; background: var(--ink); color: #FFFFFF; font-weight: 700; font-size: 14px; }
.own-grade .ic { width: 16px; height: 16px; } .own-grade .ic .fs { fill: var(--star); }
.own-next { display: flex; align-items: center; gap: 12px; margin: 14px 0 4px; font-weight: 700; }
.own-bar { flex: 0 0 200px; height: 12px; border-radius: 6px; background: var(--bg-2); overflow: hidden; } .own-bar i { display: block; height: 100%; background: var(--star); border-radius: 6px; }
.recs { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; }
.rec { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; background: var(--surface); border-radius: var(--r-l); box-shadow: var(--sh-1); padding: 18px 22px; }
.rec.big { flex-direction: row; align-items: center; gap: 20px; }
.rec-art svg { width: 88px; height: 88px; display: block; }
.rec-keys { display: flex; gap: 8px; } .rec-keys kbd { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 14px; background: var(--surface); box-shadow: 0 4px 0 var(--line), var(--sh-1); font: 800 26px var(--f-num); color: var(--pri); }
.rec-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.rec-k { font-size: 13px; font-weight: 700; color: var(--pri); }
.rec-t { font-size: 20px; letter-spacing: -.02em; }
.rec-d { font-family: var(--f-small); font-size: 14px; color: var(--ink-2); }
.rec.big .btn { margin-top: 6px; }
.playscard { margin-top: 16px; }
.plays-h { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.plays-bld svg { width: 96px; height: 96px; display: block; }
.plays-h h3 { margin: 0; }
.plays { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.pl { display: flex; align-items: center; gap: 10px; text-align: left; padding: 12px 14px; border-radius: var(--r-m); background: var(--surface-2); font-weight: 700; font-size: 15px; }
.pl > span { flex: 1; display: flex; flex-direction: column; } .pl small { font-weight: 500; font-size: 13px; color: var(--ink-2); }
.pl .ic { width: 24px; height: 24px; color: var(--pri); flex: none; }
.pl .pl-go { width: 18px; height: 18px; }
button.pl:hover { background: var(--pri-soft); }
.pl.locked { color: var(--ink-2); font-weight: 500; } .pl.locked .ic { color: var(--ink-3); width: 18px; height: 18px; }
.pl.soon .ic { color: var(--ink-3); }
@media (max-width: 760px) { .recs { grid-template-columns: 1fr; } .rec.big { flex-direction: column; align-items: flex-start; } .own-bar { flex-basis: 120px; } }
@media (max-width: 760px) {
  .hero-own .hero-art.hero-shop > svg { width: 220px; height: 220px; }
  .hero-own .hero-shop .hero-shelf svg { width: 40px; height: 40px; }
  .own-next { flex-direction: column; align-items: flex-start; gap: 6px; } .own-bar { flex-basis: auto; width: 100%; }
}

/* ---------- 打つ言葉が流れる見せ方（案。js/game.js の renderFlow、URL の ?flow=side / ?flow=up） ---------- */
/* 横：ローマ字を札にして横一列。打つ札はいつもカードの真ん中。打ち終えた札は左へ抜けて薄くなり、次の言葉の札が右から続く */
.word.flow-side { width: min(640px, calc(100% - 40px)); }
.word.flow-side .w-roma { position: relative; width: 100%; height: 64px; overflow: hidden; margin-top: 8px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 78%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 78%, transparent 100%); }
.fl-strip { position: absolute; left: 0; top: 6px; display: flex; align-items: center; gap: 6px; white-space: nowrap; will-change: transform; }
.fl-strip.go { transition: transform .14s cubic-bezier(.2, .8, .2, 1); }
.fl-t { min-width: 38px; height: 48px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 12px; background: var(--surface-2); color: var(--ink); font: 800 28px var(--f-num); }
.fl-t.done { background: transparent; color: var(--ink-3); }
.fl-t.cur { min-width: 46px; height: 54px; font-size: 32px; background: var(--pri); color: #fff; box-shadow: 0 4px 0 var(--pri-2), 0 0 0 4px var(--pri-soft); }
.fl-t.next { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line); }
.fl-sep { width: 14px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 6px; }
/* 回数で終わるお店の最後の言葉（仮の見た目。squeeze-client。画面の担当が直してよい）：「さいご！」の札・列の終わりの「ゴール」・終わった瞬間の「できあがり！」 */
.fl-goal { margin-left: 14px; height: 48px; padding: 0 14px; display: inline-grid; place-items: center; border-radius: 12px; background: var(--pri-soft); color: var(--pri-2); font: 800 20px var(--f-display); white-space: nowrap; }
.w-final-tag { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); padding: 2px 14px; border-radius: 999px; background: var(--pri); color: #fff; font: 800 15px var(--f-display); white-space: nowrap; }
.word.w-final { box-shadow: var(--sh-2), 0 0 0 4px var(--pri-soft); }
.count.count-end { font-size: min(13vw, 96px); }
.w-roma.hide .fl-t:not(.done) { color: transparent; }
/* 縦：いまの言葉のカードはいつも同じ場所。打ち終えた言葉は上へ抜け、次の2語は下に小さく並ぶ */
.word.flow-up { overflow: visible; }
.fu-prev { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); margin-bottom: 6px; white-space: nowrap; font-size: 16px; color: var(--ink-3); }
.fu-prev:empty { display: none; }
.fu-prev .fu-d { font-size: 16px; font-weight: 500; color: var(--ink-3); }
.fu-next { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fu-row { display: flex; align-items: baseline; gap: 10px; padding: 6px 18px; border-radius: 999px; background: rgba(255, 255, 255, .78); box-shadow: var(--sh-1); white-space: nowrap; }
.fu-row.r1 { opacity: .6; transform: scale(.92); }
.fu-d { font-size: 18px; font-weight: 700; color: var(--ink); }
.fu-r { font: 700 15px var(--f-num); letter-spacing: .04em; color: var(--ink-2); }
.word.flow-up .w-roma .c { font-size: 1.12em; padding: 0 3px; box-shadow: 0 3px 0 var(--pri-2), 0 0 0 4px var(--pri-soft); }
/* 設定の「動きを少なめ」（<html data-motion="low">。設定の画面は squeeze-client）。動きを減らす設定と同じ扱い */
html[data-motion="low"] *, html[data-motion="low"] *::before, html[data-motion="low"] *::after { transition: none !important; animation: none !important; }
@media (max-width: 720px) {
  .fu-prev, .fu-row.r1 { display: none; }
  .fl-t { min-width: 32px; height: 42px; font-size: 24px; }
  .fl-t.cur { min-width: 40px; height: 48px; font-size: 28px; }
}

/* スペースのキーと親指（スペースは「␣」の印。親指の色は --f1） */
.kgk.kg-space text { font-family: var(--f-body, inherit); font-size: 14px; font-weight: 700; }
.hf.th { transform-box: fill-box; transform-origin: 50% 100%; }
.hf.th.on { transform: translateY(-8px); }
.hf.th.on .thumb { stroke: var(--f1s); }
.hf.th.on .thumb-o { stroke: var(--f1); }
.w-roma .c.sp, .fl-t.sp { font-weight: 700; }
.fl-t.sp:not(.cur) { color: var(--ink-3); }

/* 練習のお店（キーボードの案内があるお店）では、遊ぶ画面に点数・連続ボーナス・作った数を出さず、進み（あと何回）だけにする。
   見るものを、言葉とキーボードと手にしぼる（docs/TYPING_PRACTICE_PATTERNS.md）。点数は結果の画面で見せる */
#play:has(.stage.guided) .hud { grid-template-columns: minmax(0, 360px); }
#play:has(.stage.guided) .hud .cell:not(:first-child) { display: none; }
#play:has(.stage.guided) .stage .level { display: none; }

/* トップの主役の子：ゆっくり弾み、ときどきぎゅっと縮んで戻り、まばたきする（打っている間の画面より小さく、遅く）。
   動きを減らす設定と data-motion="low" では、上の決まりで止まる */
.hero-live .hl-toy { transform-box: fill-box; transform-origin: 50% 100%; animation: hlLife 6.4s ease-in-out infinite; }
.hero-live .hl-sh { transform-box: fill-box; transform-origin: 50% 50%; animation: hlShadow 6.4s ease-in-out infinite; }
.hero-live .ey { transform-box: fill-box; transform-origin: 50% 50%; animation: hlBlink 4.8s infinite; }
@keyframes hlLife {
  0%, 25%, 50%, 66%, 90%, 100% { transform: none; }
  12%, 37% { transform: translateY(-7px); }
  72% { transform: scale(1.07, .9); }
  79% { transform: scale(.96, 1.05) translateY(-5px); }
  85% { transform: scale(1.02, .98); }
}
@keyframes hlShadow { 0%, 25%, 50%, 100% { transform: none; opacity: 1; } 12%, 37% { transform: scaleX(.88); opacity: .7; } 72% { transform: scaleX(1.08); } }
@keyframes hlBlink { 0%, 93%, 100% { transform: none; } 96% { transform: scaleY(.12); } }
/* つぎのお店のカードは中身が少ないので、縦の真ん中に寄せる（ボタンを下の端へ押しやらない） */
.hero:not(.hero-own) .hero-body { justify-content: center; }
.hero:not(.hero-own) .hero-go { margin-top: 0; }

/* 実物のスクイーズの1品のカード（js/main.js の prCard）。画像は楽天の商品の画像（押すと楽天）。無い品はゲームの子の絵か、絵なし */
.real-list { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.prc { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 12px 14px; background: var(--surface); border-radius: var(--r-m); box-shadow: var(--sh-1); text-align: center; }
.prc-art { display: block; width: 120px; height: 120px; border-radius: 14px; overflow: hidden; background: var(--bg-2); flex: none; }
.prc-art img { display: block; width: 120px; height: 120px; object-fit: cover; }
.prc-toy { display: grid; place-items: center; background: var(--pri-soft); }
.prc-toy svg { width: 96px; height: 96px; }
.prc-name { font-size: 14px; font-weight: 500; line-height: 1.5; }
.prc-noart .prc-name { margin-top: 8px; }
.prc-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: auto; }
.prc-btns .btn.small { height: 34px; padding: 0 12px; font-size: 13px; font-weight: 500; }
@media (max-width: 520px) { .real-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } .prb-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .prb .prc { padding: 8px 6px 10px; } .prb .prc-art, .prb .prc-art img { width: 84px; height: 84px; } .prc-art, .prc-art img { width: 100px; height: 100px; } }

/* 遊び方の札（.modeview）と、言葉のカードを重ねない。札があるときは、カードを札の右へ寄せる（横の流れの広いカードも） */
.stage:has(> .modeview:not([hidden]):not(.mv-push):not(.mv-windows)) .word { left: calc(50% + 108px); max-width: calc(100% - 268px); }
.stage:has(> .modeview:not([hidden]):not(.mv-push):not(.mv-windows)) .word.flow-side { width: min(600px, calc(100% - 268px)); }
@media (max-width: 720px) {
  /* スマホの幅：札は上の細い帯にし、言葉のカードはその下へ */
  .stage > .modeview { left: 8px; right: 8px; top: 50px; width: auto; flex-direction: row; justify-content: center; gap: 10px; padding: 6px 12px; min-height: 52px; }
  .stage > .modeview .mv-k { font-size: 13px; }
  .stage > .modeview .mv-n b { font-size: 18px; }
  .stage > .modeview .mv-sub { display: none; }
  .stage > .modeview .mv-jar { width: 30px; height: 40px; }
  .stage > .modeview .mv-stack { width: 48px; gap: 1px; } .stage > .modeview .mv-stack i { height: 3px; }
  .stage > .modeview .mv-tray i { width: 10px; height: 10px; } .stage > .modeview .mv-trays { display: flex; gap: 3px; } .stage > .modeview .mv-tray { padding: 3px 4px; gap: 2px; }
  .stage > .modeview .mv-tickets i { width: 14px; height: 18px; }
  .stage > .modeview .mv-tags { grid-template-columns: repeat(12, 1fr); gap: 2px; } .stage > .modeview .mv-tags i { width: 10px; height: 8px; }
  .stage > .modeview .mv-next { width: 40px; }
  .stage > .modeview .mv-recipe b { font-size: 13px; } .stage > .modeview .mv-recipe span { display: none; }
  .stage:has(> .modeview:not([hidden]):not(.mv-push):not(.mv-windows)) .word { top: 112px; left: 50%; max-width: calc(100% - 24px); }
  .stage:has(> .modeview:not([hidden]):not(.mv-push):not(.mv-windows)) .word.flow-side { width: calc(100% - 24px); }
}

/* 押し合い（js/modeview.js の push）：下に、左の自分の屋台・道の目盛り・右の時計（相手の屋台）。まん中の子は --push の分だけ左右へ */
.stage > .modeview.mv-push, .stage > .modeview.mv-windows { left: 16px; right: 16px; top: auto; bottom: 14px; width: auto; background: transparent; box-shadow: none; padding: 0; }
.mv-arena { width: 100%; display: flex; align-items: flex-end; gap: 12px; }
.mv-side { flex: none; width: 150px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mv-side b { font-size: 13px; font-weight: 700; color: var(--ink-2); background: rgba(255, 255, 255, .9); padding: 2px 10px; border-radius: 999px; }
.mv-stall { width: 140px; height: 105px; } .mv-stall.rival { transform: scaleX(-1); filter: hue-rotate(150deg) saturate(.8); }
.mv-clock { width: 96px; height: 112px; animation: mvClock 2.4s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes mvClock { 50% { transform: rotate(-4deg) translateX(-3px); } }
.mv-track { position: relative; flex: 1; height: 14px; margin-bottom: 34px; border-radius: 7px; background: var(--bg-2); box-shadow: inset 0 0 0 1.5px var(--line); }
.mv-track .mv-mid { position: absolute; left: 50%; top: -6px; bottom: -6px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--line); }
.mv-track .mv-goal { position: absolute; top: -4px; bottom: -4px; width: 10px; border-radius: 5px; }
.mv-track .mv-goal.l { left: -4px; background: var(--pri-soft); box-shadow: inset 0 0 0 2px var(--pri); }
.mv-track .mv-goal.r { right: -4px; background: #DDF1E9; box-shadow: inset 0 0 0 2px var(--good); }
.mv-track .mv-mark { position: absolute; top: 50%; left: calc(var(--x, .5) * 100%); width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: var(--pri); box-shadow: 0 0 0 4px #fff, 0 2px 6px rgba(74, 40, 48, .25); transition: left .25s cubic-bezier(.2, .8, .2, 1); }
.stage.mv-pushing .toy-wrap, .stage.mv-pushing .floor { translate: calc(var(--push, 0) * var(--toy) * .9) 0; transition: translate .25s cubic-bezier(.2, .8, .2, 1); }
/* 両側の窓口（windows）：左右に窓口、札はまん中へ少しずつ。まん中まで来たら待つ。打ちはじめた札に「いま」 */
.mv-wins { width: 100%; display: flex; align-items: flex-end; gap: 8px; }
.mv-win { flex: none; width: 120px; } .mv-win svg { width: 120px; height: 130px; display: block; }
.mv-lane { position: relative; flex: 1; height: 120px; border-bottom: 3px dotted var(--line); }
.mv-tk { position: absolute; bottom: 8px; min-width: 96px; padding: 10px 14px 8px; border-radius: 12px; background: #FFF8EE; box-shadow: inset 0 0 0 2px #5A3A40, 0 3px 0 rgba(90, 58, 64, .2); text-align: center; transition: left .25s cubic-bezier(.2, .8, .2, 1), right .25s cubic-bezier(.2, .8, .2, 1); }
.mv-tk.l { left: calc(var(--x, 0) * (50% - 104px)); } .mv-tk.r { right: calc(var(--x, 0) * (50% - 104px)); }
.mv-tk b { font-size: 16px; font-weight: 700; white-space: nowrap; }
.mv-tk::before { content: ""; position: absolute; left: 50%; top: -6px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 2px #5A3A40; }
.mv-tk.on { background: #fff; box-shadow: inset 0 0 0 3px var(--pri), 0 3px 0 var(--pri-2); }
.mv-tk em { white-space: nowrap; position: absolute; left: 50%; top: -28px; transform: translateX(-50%); font: 700 13px var(--f-body); font-style: normal; color: #fff; background: var(--pri); padding: 1px 10px; border-radius: 999px; }
.mv-tk.done { background: transparent; box-shadow: none; min-width: 0; padding: 0; animation: mvBye 1s ease-out forwards; }
.mv-guest { width: 56px; height: 66px; display: block; }
@keyframes mvBye { 0% { transform: translateY(0); } 30% { transform: translateY(-10px); } 100% { transform: translateY(-4px); opacity: 0; } }
@media (max-width: 720px) {
  .mv-side { width: 64px; } .mv-side b { display: none; } .mv-stall { width: 64px; height: 48px; } .mv-clock { width: 52px; height: 60px; }
  .stage.mv-pushing .toy-wrap, .stage.mv-pushing .floor { translate: calc(var(--push, 0) * var(--toy) * .35) 0; }
  .mv-track { margin-bottom: 18px; }
  .mv-win { width: 64px; } .mv-win svg { width: 64px; height: 70px; }
  .mv-tk { min-width: 64px; padding: 6px 8px 5px; } .mv-tk b { font-size: 13px; }
  .mv-tk.l { left: calc(var(--x, 0) * (50% - 70px)); } .mv-tk.r { right: calc(var(--x, 0) * (50% - 70px)); }
}
/* 画面の高さが低いときは、キーボードの案内を小さくして、言葉のカードにかけない。縦の流れの2つ先の言葉は、案内があるお店では出さない */
.kbguide { width: min(540px, calc(56% - 16px), calc((100vh - 420px) * 1.55)); }
.stage.guided .fu-row.r1, .stage.hinted .fu-row.r1 { display: none; }
@media (max-width: 720px) { .kbguide { width: auto; } }

/* となりの通り：次に回る通りの絵を大きく */
.map-card.map-near { padding: 0; overflow: hidden; }
.near-st { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; text-align: left; background: var(--surface); border-radius: inherit; }
.near-art { display: block; height: 220px; overflow: hidden; }
.near-art svg { width: 100%; height: 100%; display: block; }
.near-txt { display: flex; flex-direction: column; gap: 2px; padding: 16px 24px 20px; }
.near-txt b { font-size: 22px; letter-spacing: -.02em; }
.near-sub { font-size: 15px; color: var(--ink-2); }
.near-prog { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 14px; color: var(--ink-2); }
.near-prog .ic { width: 16px; height: 16px; color: var(--star); }
.near-go { position: absolute; right: 20px; bottom: 20px; }
@media (max-width: 720px) { .near-art { height: 150px; } .near-go { position: static; margin: 0 24px 20px; justify-self: start; } }

/* お知らせから来たお店のカード（main.js の spotShop）：短く光って、どのお店か分かるように。上に「ここで作れる「○○」」の札 */
.shopc.spot { animation: shopSpot 1.3s ease-in-out 2; box-shadow: 0 0 0 4px var(--star), var(--sh-2); z-index: 1; }
@keyframes shopSpot { 0%, 100% { box-shadow: 0 0 0 4px var(--star), var(--sh-2); transform: none; } 40% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--star) 35%, transparent), var(--sh-2); transform: translateY(-4px); } }
.shopc.has-here { position: relative; }
.shopc-here { position: absolute; left: 50%; top: 30px; transform: translateX(-50%); z-index: 2; max-width: calc(100% - 16px); padding: 3px 12px; border-radius: 999px; background: var(--star); color: var(--ink); font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 2px 0 rgba(90, 58, 64, .18); }
.shopc.locked .shopc-here { background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line); }
/* キーボードの案内があるお店の両側の窓口（ねこのマシュマロ屋さん）：窓口の帯を言葉のカードの高さへ上げ、札はカードの手前で待つ（案内と重ねない） */
.stage.guided > .modeview.mv-windows { top: 150px; bottom: auto; }
.stage.guided .mv-windows .mv-lane { height: 110px; border-bottom: 0; }
.stage.guided .mv-windows .mv-tk.l { left: calc(var(--x, 0) * (50% - 230px)); }
.stage.guided .mv-windows .mv-tk.r { right: calc(var(--x, 0) * (50% - 230px)); }
.stage.guided .mv-windows .mv-win svg { height: 110px; }
/* 画面の低いときも、右の窓口の札がキーボードの案内に隠れないように：案内を高さに合わせて小さくし、それでも重なるときは札と窓口を案内の手前に出す */
.stage.guided > .modeview.mv-windows { z-index: 5; }
@media (min-width: 721px) {
  .stage.guided:has(> .modeview.mv-windows:not([hidden])) .kbguide { left: auto; width: min(540px, calc(56% - 16px), max(300px, calc((100vh - 480px) * 1.55))); }
}
@media (max-width: 720px) {
  .stage.guided > .modeview.mv-windows { top: 196px; }
  .stage.guided .mv-windows .mv-lane { height: 76px; }
  .stage.guided .mv-windows .mv-win svg { height: 70px; }
  .stage.guided .mv-windows .mv-tk.l { left: calc(var(--x, 0) * (50% - 70px)); } .stage.guided .mv-windows .mv-tk.r { right: calc(var(--x, 0) * (50% - 70px)); }
}
/* 窓口の後ろに並ぶ札：窓口の上に、小さな札を少しずつずらして重ねる（4枚まで）。枚数は小さな字で */
.mv-win { position: relative; }
.mv-wait { position: absolute; left: 50%; bottom: calc(100% - 6px); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; height: 44px; width: 60px; }
.mv-wait.none { display: none; }
.mv-wait i { position: absolute; bottom: calc(var(--i, 0) * 6px); left: calc(8px + var(--i, 0) * 4px); width: 34px; height: 22px; border-radius: 5px; background: #FFF8EE; box-shadow: inset 0 0 0 2px #5A3A40; }
.mv-wait i::after { content: ""; position: absolute; left: 7px; right: 7px; top: 9px; height: 3px; border-radius: 2px; background: var(--line); }
.mv-wait small { position: absolute; right: -14px; bottom: -2px; font: 700 13px var(--f-num); color: var(--ink-2); background: rgba(255, 255, 255, .92); padding: 0 6px; border-radius: 999px; }
@media (max-width: 720px) { .mv-wait { transform: translateX(-50%) scale(.7); transform-origin: 50% 100%; } }

/* ---------- 3つの遊びの役割の札（お店＝練習・工房＝腕試し・ポップアップ＝友だちと）。トップ・遊び方の案内・LP で同じ形 ---------- */
.role { display: inline-block; align-self: flex-start; max-width: 100%; padding: 3px 12px 2px; border-radius: 14px; font-size: 14px; font-weight: 700; letter-spacing: .02em; line-height: 1.5; }
.role { word-break: auto-phrase; }
.role ruby { ruby-align: center; }
.role rt { font-size: 9px; font-weight: 500; letter-spacing: 0; }
.role-shop { background: var(--pri-soft); color: var(--pri-2); }
.role-kobo { background: #FFF1DE; color: #8A5A12; }
.role-pop { background: var(--good-soft); color: #1E6A57; }
.hero-kr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.bm-txt .role { margin-bottom: 6px; }
.near-txt .role { margin-bottom: 4px; }

/* 上の帯の「遊び方」（狭い幅では「？」だけ） */
.guide-btn { width: auto; padding: 0 16px 0 10px; gap: 6px; display: inline-flex; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink); }
.guide-btn .gb-ic { display: grid; color: var(--pri); }
@media (max-width: 640px) { .guide-btn { width: 44px; padding: 0; justify-content: center; } .guide-btn .gb-t { display: none; } }
@media (max-width: 420px) { .topbar, .me { gap: 6px; } .logo img { height: 26px; } .coin { height: 40px; padding: 0 10px 0 8px; gap: 6px; font-size: 15px; } .me-btn { height: 44px; } .me-pen { display: none; } .topbar .ibtn { width: 40px; height: 40px; } }

/* 小さな絵（遊び方の案内と LP）。トップのカードの絵（.bm-shelf・.bm-timer・.bm-cake）を小さくして使う */
.gd-mode-art, .lp-mode-art { position: relative; display: block; overflow: hidden; border-radius: var(--r-m); }
.gdm-shop .gd-mode-art, .lpm-shop .lp-mode-art { background: var(--pri-soft); }
.gdm-kobo .gd-mode-art, .lpm-kobo .lp-mode-art { background: #FFF1DE; }
.gdm-pop .gd-mode-art, .lpm-pop .lp-mode-art { background: #E6F4EE; }
.ma-bld { position: absolute; left: 0; right: 14%; top: 6%; bottom: 0; }
.ma-bld svg { display: block; width: 100%; height: 100%; }
.ma-toy { position: absolute; left: 50%; bottom: 6%; height: 48%; aspect-ratio: 1; }
.ma-toy svg { display: block; width: 100%; height: 100%; }
.gd-mode-art .bm-shelf, .lp-mode-art .bm-shelf { left: 10px; right: 46%; bottom: 14px; border-bottom-width: 5px; box-shadow: 0 3px 0 #5A3A40; }
.gd-mode-art .bm-shelf svg, .lp-mode-art .bm-shelf svg { width: 34%; height: auto; margin-bottom: -5px; }
.gd-mode-art .bm-timer, .lp-mode-art .bm-timer { right: 10%; top: 50%; width: 34%; height: auto; aspect-ratio: 1; transform: translateY(-55%); box-shadow: 0 0 0 2.5px #5A3A40; }
.gd-mode-art .bm-timer svg, .lp-mode-art .bm-timer svg { width: 34%; height: auto; }
.gd-mode-art .bm-timer b, .lp-mode-art .bm-timer b { font-size: 15px; }
.gd-mode-art > svg:first-child, .lp-mode-art > svg:first-child { position: absolute; left: 0; top: 0; width: 100%; height: auto; }
.gd-mode-art .bm-cake, .lp-mode-art .bm-cake { width: 62%; margin-left: -31%; bottom: 2px; }

/* ---------- 遊び方の案内（main.js の openGuide） ---------- */
.guide { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(58, 38, 48, .45); }
.guide-card { width: min(600px, 100%); height: min(640px, calc(100dvh - 32px)); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-2); overflow: hidden; }
.gd-head { display: flex; align-items: center; gap: 12px; padding: 18px 24px 0; }
.gd-k { font-size: 14px; font-weight: 700; color: var(--pri); letter-spacing: .04em; }
.gd-n { font-family: var(--f-num); font-weight: 700; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.gd-x { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); }
.gd-x:hover { background: var(--surface-2); }
.gd-page { flex: 1; overflow-y: auto; padding: 8px 32px 8px; animation: gdIn .22s ease-out; }
@keyframes gdIn { from { opacity: 0; translate: 12px 0; } }
@media (prefers-reduced-motion: reduce) { .gd-page { animation: none; } }
html[data-motion="low"] .gd-page { animation: none; }
.gd-page h2 { font-size: 22px; letter-spacing: -.02em; line-height: 1.4; margin: 4px 0 16px; word-break: auto-phrase; }
.gd-body p { font-size: 16px; line-height: 1.8; margin: 0 0 10px; }
.gd-again { font-family: var(--f-small); font-size: 14px !important; color: var(--ink-2); }
.gd-extra { margin: 4px 0 8px; }
.gd-art { display: flex; justify-content: center; margin: 0 0 16px; }
.gd-foot { display: flex; align-items: center; gap: 12px; padding: 16px 24px 20px; border-top: 1px solid var(--line); }
.gd-foot .btn { height: 48px; min-width: 112px; }
.gd-foot .btn:last-child { margin-left: auto; }
.gd-foot .btn[disabled] { visibility: hidden; }
.gd-dots { display: flex; gap: 6px; margin: 0 auto; }
.gd-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.gd-dots i.on { width: 22px; border-radius: 4px; background: var(--pri); }
/* 1枚目：3つの遊び */
.gd-modes { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 12px; }
.gd-mode { display: grid; grid-template-columns: 132px 1fr; gap: 16px; align-items: center; }
.gd-mode-art { height: 92px; }
.gd-mode-txt { display: flex; flex-direction: column; gap: 2px; }
.gd-mode-txt .role { margin-bottom: 2px; }
.gd-mode-txt b { font-size: 18px; }
.gd-mode-txt > span:last-child { font-family: var(--f-small); font-size: 14px; line-height: 1.7; color: var(--ink-2); }
/* 2枚目：お店に入る → 打って作る → 棚に並べる */
.gd-flow { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
.gd-flow li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 14px; }
.gd-flow li + li::before { content: ''; position: absolute; left: -9px; top: 44px; width: 8px; height: 8px; border-top: 2.5px solid var(--ink-3); border-right: 2.5px solid var(--ink-3); transform: rotate(45deg); }
.gd-fa { position: relative; width: 100%; height: 100px; border-radius: var(--r-m); background: var(--bg); overflow: hidden; }
.gd-word { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.gd-word b { font-size: 20px; }
.gd-word i { font-style: normal; font-family: var(--f-num); font-weight: 700; font-size: 14px; color: var(--ink-3); letter-spacing: .04em; }
.gd-word u { text-decoration: none; color: #fff; background: var(--pri); border-radius: 4px; padding: 0 2px; }
/* 3枚目：ホームポジション */
.gd-keys { width: 100%; max-width: 500px; height: auto; }
.gd-keys .gk { fill: var(--surface); stroke: #5A3A40; stroke-width: 2; }
.gd-keys .gk-on { fill: var(--pri-soft); stroke: var(--pri); stroke-width: 2.5; }
.gd-keys text { font: 700 17px var(--f-num); fill: var(--ink); }
.gd-keys .gk-bump { stroke: var(--pri); stroke-width: 3; stroke-linecap: round; }
.gd-keys .gk-finger { fill: var(--pri); }
.gd-keys .gk-lbl { font: 700 13px var(--f-body, sans-serif); fill: var(--pri-2); }
/* 4枚目：仕上げ */
.gd-fins { display: flex; justify-content: center; gap: 10px; }
.gd-fins .zsticker { width: 96px; height: 96px; }
.gd-fins .zsticker svg { width: 100%; height: 100%; }
/* 5枚目：おうちの人へ */
.gd-family { display: flex; gap: 12px; }
.gd-family span { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); }
.gd-family svg { width: 34px; height: 34px; }
@media (max-width: 520px) {
  .gd-page { padding: 4px 20px 8px; }
  .gd-head { padding: 14px 18px 0; }
  .gd-foot { padding: 12px 16px 16px; gap: 8px; }
  .gd-foot .btn { min-width: 92px; height: 44px; }
  .gd-mode { grid-template-columns: 96px 1fr; gap: 12px; }
  .gd-mode-art { height: 76px; }
  .gd-fa { height: 76px; }
  .gd-word b { font-size: 16px; }
  .gd-word i { font-size: 11px; letter-spacing: 0; }
  .gd-fins .zsticker { width: 64px; height: 64px; }
}

/* ---------- LP：遊ぶ場所は3つ ---------- */
.lp-modes-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lp-mode { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px 24px; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-1); }
.lp-mode-art { height: 150px; margin-bottom: 8px; }
.lp-mode > b { font-size: 22px; letter-spacing: -.02em; }
.lp-mode > span:last-child { font-family: var(--f-small); font-size: 14px; line-height: 1.7; color: var(--ink-2); }
@media (max-width: 760px) { .lp-modes-list { grid-template-columns: 1fr; } .lp-mode-art { height: 130px; } }

/* ===== 遊ぶ画面（キーボードの案内があるお店）2026-11-15 作り直し =====
   上に言葉、真ん中に子と遊び方の札、下に大きなキーボード。全部を真ん中の1本の線にそろえる（四隅に散らさない）。
   手はキーボードの上にうすく重ね、指先をまんなかの段のキーに置く。使うキーだけ濃く、ほかはうすく */
.stage.guided, .stage.hinted {
  --toyG: clamp(110px, calc(100vh - 640px), 220px);
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-rows: auto minmax(var(--toyG), 1fr) auto;
  column-gap: 20px; row-gap: 6px; padding: 48px 20px 12px; min-height: max(520px, calc(100vh - 84px));
}
.stage.guided > .word, .stage.hinted > .word {
  position: relative; grid-row: 1; grid-column: 1 / -1; justify-self: center; left: auto !important; top: auto !important; transform: none; max-width: 100% !important; z-index: 4;
}
.stage.guided > .word.flow-side, .stage.hinted > .word.flow-side { width: min(680px, 100%) !important; }
.stage.guided > .toy-wrap, .stage.hinted > .toy-wrap {
  position: relative; grid-row: 2; grid-column: 2; align-self: end; justify-self: center; left: auto !important; bottom: auto !important; margin: 0 0 10px !important;
  width: var(--toyG) !important; height: var(--toyG) !important;
}
.stage.guided > .floor, .stage.hinted > .floor {
  display: block !important; position: relative; grid-row: 2; grid-column: 2; align-self: end; justify-self: center; left: auto !important; bottom: auto; transform: none;
  width: calc(var(--toyG) * 1.3); height: calc(var(--toyG) * .14); margin-bottom: 2px;
}
.stage.guided > .modeview:not(.mv-push):not(.mv-windows), .stage.hinted > .modeview:not(.mv-push):not(.mv-windows) {
  position: relative; grid-row: 2; grid-column: 1; justify-self: end; align-self: center; left: auto; top: auto; width: 168px;
}
.stage.guided > .modeview.mv-push, .stage.guided > .modeview.mv-windows, .stage.hinted > .modeview.mv-push, .stage.hinted > .modeview.mv-windows {
  position: relative; grid-row: 2; grid-column: 1 / -1; align-self: end; left: auto; right: auto; top: auto !important; bottom: auto; width: 100%;
}
.stage.guided > .kbguide, .stage.hinted > .kbguide {
  position: relative; grid-row: 3; grid-column: 1 / -1; justify-self: center; right: auto; bottom: auto; left: auto !important;
  width: min(820px, 100%, calc((100vh - 340px) * 1.45)) !important; padding: 10px 18px 0; border-radius: var(--r-l);
}
.stage.guided > .tipline, .stage.hinted > .tipline { display: none; }
/* キー：板（色）と字を分けた。使わないキー（.out）はうすく */
.kgk rect { fill: #FFFFFF; stroke: rgba(90, 58, 64, .22); stroke-width: 1.4; }
.kgk.f1 rect { fill: var(--f1s); } .kgk.f5 rect { fill: var(--f5s); } .kgk.f4 rect { fill: var(--f4s); } .kgk.f3 rect { fill: var(--f3s); } .kgk.f2 rect { fill: var(--f2s); }
.kgk.out rect { fill: #F6F1EC; stroke: rgba(90, 58, 64, .08); }
.kgt text { font: 700 16px var(--f-num); fill: var(--ink); text-anchor: middle; dominant-baseline: central; }
.kgt.kg-space text { font-family: var(--f-body); font-size: 14px; }
.kgt.kg-shift text { font-size: 17px; }
.kgt .bump { stroke: var(--ink-2); stroke-width: 2.4; stroke-linecap: round; }
.kgt.out text { fill: #C9BDB8; } .kgt.out .bump { stroke: #C9BDB8; }
.kgk, .kgt { transform-box: view-box; transform-origin: 0 0; animation: none; transform: none; }
.kgk.next rect { stroke: var(--ink); stroke-width: 3; }
.kgk.f1.next rect { fill: var(--f1); } .kgk.f5.next rect { fill: var(--f5); } .kgk.f4.next rect { fill: var(--f4); } .kgk.f3.next rect { fill: var(--f3); } .kgk.f2.next rect { fill: var(--f2); }
.kgt.next text { fill: #FFFFFF; } .kgt.next .bump { stroke: #FFFFFF; }
.kgk.next rect { animation: kgGlow 1.1s ease-in-out infinite; }
@keyframes kgGlow { 50% { stroke-width: 5; } }
.kgk.pressed rect { fill: #FFFFFF; stroke: var(--miss); stroke-width: 2.5; stroke-dasharray: 5 4; }
.kgt.pressed text { fill: var(--miss); }
/* 手：キーボードの上にうすく。押す指だけ、その指の色で濃く */
.kg-hands .hf rect, .kg-hands .palm { fill: #FFE2CF; fill-opacity: .5; stroke: #5A3A40; stroke-opacity: .35; stroke-width: 1.8; }
.kg-hands .thumb-o { stroke: #5A3A40; stroke-opacity: .35; stroke-width: 24; }
.kg-hands .thumb { stroke: #FFE2CF; stroke-opacity: 1; stroke-width: 21; }
.kg-hands .th { opacity: .62; }
.hf, .hf.on { transform: none; animation: none; }
.hf.on rect { fill-opacity: .82; stroke-opacity: 1; stroke-width: 3; }
.hf.f2.on rect { fill: var(--f2s); stroke: var(--f2); } .hf.f3.on rect { fill: var(--f3s); stroke: var(--f3); } .hf.f4.on rect { fill: var(--f4s); stroke: var(--f4); } .hf.f5.on rect { fill: var(--f5s); stroke: var(--f5); }
.hf.th.on { opacity: 1; transform: none; } .hf.th.on .thumb-o { stroke: var(--f1); stroke-opacity: 1; } .hf.th.on .thumb { stroke: var(--f1s); }
.kg-links .link { stroke-width: 3; stroke-dasharray: 3 6; }
.kg-links .ring { fill: none; stroke-width: 3; opacity: .6; }
.kg-links .ring.f5 { stroke: var(--f5); } .kg-links .ring.f4 { stroke: var(--f4); } .kg-links .ring.f3 { stroke: var(--f3); } .kg-links .ring.f2 { stroke: var(--f2); }
.kg-lbl { justify-content: center; min-height: 34px; font-size: 17px; }
.kg-pair { display: inline-flex; align-items: center; gap: 4px; margin: 0 10px; }
/* 始める前：言葉と子の所だけを覆い、キーボードは見せたまま（覚えるキーが光っている） */
.stage.guided > .ready, .stage.hinted > .ready { position: relative; inset: auto; grid-row: 1 / 3; grid-column: 1 / -1; align-self: stretch; border-radius: var(--r-l); background: color-mix(in srgb, var(--stage) 70%, transparent); backdrop-filter: blur(4px); padding: 8px; }
.ready .rd-card { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 560px; padding: 22px 32px 20px; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-2); }
.rd-where { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--pri); }
.rd-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-3); }
.ready .rd-title { display: flex; align-items: center; gap: 10px; font-size: 30px; line-height: 1.3; }
.rd-cap { min-width: 56px; height: 56px; padding: 0 12px; display: inline-grid; place-items: center; border-radius: 14px; background: var(--pri); color: #fff; font: 800 28px var(--f-num); box-shadow: 0 4px 0 var(--pri-2); }
.rd-to { font-size: 20px; color: var(--ink-2); }
.rd-sub { margin: 0; font-size: 15px; color: var(--ink-2); }
.ready .rd-goal { margin: 4px 0 0; display: flex; align-items: baseline; gap: 10px; font-size: 18px; font-weight: 700; }
.rd-goal-k { flex: none; font-size: 13px; font-weight: 700; color: var(--good); background: var(--good-soft); border-radius: 999px; padding: 2px 10px; }
.ready .rd-go { margin-top: 10px; font-size: 18px; font-weight: 700; }
.ready .rd-space { height: 52px; min-width: 220px; display: inline-grid; place-items: center; padding: 0 28px; border-radius: 14px; background: var(--surface); box-shadow: 0 4px 0 var(--line), inset 0 0 0 2px var(--ink); font: 700 18px var(--f-body); color: var(--ink); }
.rd-home { margin: 0; font-family: var(--f-small); font-size: 14px; color: var(--ink-2); }
@media (max-height: 760px) { .ready .rd-card { padding: 14px 24px 14px; gap: 4px; } .rd-cap { min-width: 46px; height: 46px; font-size: 24px; } .ready .rd-space { height: 44px; } }
/* スマホの幅：同じ縦の並び。キーボードは幅いっぱい、札は子の左に小さく */
@media (max-width: 720px) {
  .stage.guided, .stage.hinted { --toyG: 110px; padding: 48px 8px 8px; column-gap: 8px; min-height: calc(100vh - 120px); }
  .stage.guided > .modeview:not(.mv-push):not(.mv-windows), .stage.hinted > .modeview:not(.mv-push):not(.mv-windows) { width: auto; min-height: 0; flex-direction: column; padding: 6px 10px; }
  .stage.guided > .kbguide, .stage.hinted > .kbguide { width: 100% !important; padding: 6px 6px 0; }
  .kg-lbl { font-size: 14px; }
  .ready .rd-card { padding: 14px 16px; }
  .ready .rd-goal { font-size: 15px; flex-direction: column; align-items: center; gap: 4px; }
  .ready .rd-go { flex-wrap: wrap; justify-content: center; } .ready .rd-space { min-width: 150px; }
}
/* 案内のあるお店：上の「あと○回」の欄は出さない（遊び方の札に同じ数がある）。数字の段を使わないお店は畳む */
#play:has(.stage.guided) .hud { display: none; }
.kbguide.no-num .r0 { display: none; }
.kgk.next, .kgt.next, .kgk.pressed { transform: none; animation: none; }
/* 最後の言葉と終わり（squeeze-client の play_end）の見た目：「さいご！」はカードの左上に（上の前の言葉と重ねない）。ゴールの札は本文の書体で */
.w-final-tag { top: -13px; left: 20px; transform: none; padding: 3px 12px; font: 700 14px var(--f-body); letter-spacing: .04em; box-shadow: 0 2px 0 var(--pri-2); }
.fl-goal { font: 700 18px var(--f-body); letter-spacing: .04em; box-shadow: inset 0 0 0 2px var(--pri); }
.word.w-final { box-shadow: var(--sh-2), 0 0 0 3px var(--pri); }
