/* あれどこ？ — オフホワイトと淡い木、青い主ボタン、丸いカード。写真以外は簡単な形。 */
:root {
  --bg: #f8f5ef; --paper: #fffdf9; --card: #ffffff; --ink: #1f2b38; --ink-2: #5a6674; --ink-3: #8b94a0;
  --line: #ebe5da; --wood: #e9dcc6; --wood-2: #d7c3a1; --blue: #3f8fcb; --blue-2: #2f74aa; --blue-soft: #e4f0f9;
  --green: #4f9a6c; --green-soft: #e3f2e8; --red: #d0605a; --red-soft: #fbe7e5; --amber: #c98a2b; --amber-soft: #fbf0dc;
  --shadow: 0 1px 2px rgba(60, 45, 25, .06), 0 6px 20px rgba(60, 45, 25, .07);
  --radius: 18px; --font-scale: 1; --button-height: 52px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: calc(16px * var(--font-scale)); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif; line-height: 1.55; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
.icon { width: 1.25em; height: 1.25em; flex: none; }
a { color: var(--blue-2); }

#app { max-width: 560px; margin: 0 auto; min-height: 100dvh; padding: calc(var(--safe-t) + 8px) 16px calc(96px + var(--safe-b)); position: relative; }
.screen { animation: rise .28s ease both; }
@keyframes rise { from { transform: translateY(8px); } }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation: none !important; transition: none !important; }

/* 見出し */
.top { display: flex; align-items: center; gap: 10px; min-height: 56px; margin-bottom: 6px; }
.top h1 { font-size: 1.45rem; margin: 0; letter-spacing: .02em; line-height: 1.2; flex: 1; min-width: 0; }
.top h1 small { display: block; font-size: .72rem; color: var(--ink-3); font-weight: 500; letter-spacing: .04em; }
.top .grow { flex: 1; min-width: 0; }
.circle { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--paper); box-shadow: var(--shadow); display: grid; place-items: center; cursor: pointer; flex: none; }
.circle:active { transform: scale(.94); }
.crumbs { display: flex; flex-wrap: wrap; gap: 2px 4px; font-size: .78rem; color: var(--ink-3); margin: -2px 0 10px; }
.crumbs button { background: none; border: 0; padding: 2px 0; color: var(--ink-2); cursor: pointer; }
.crumbs span.sep { opacity: .5; }

/* ボタン */
.btn { min-height: var(--button-height); border-radius: 999px; border: 0; padding: 0 20px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow); font-weight: 650; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn.primary { background: var(--blue); color: #fff; box-shadow: 0 6px 18px rgba(63, 143, 203, .32); }
.btn.ghost { background: transparent; box-shadow: none; color: var(--blue-2); }
.btn.danger { color: var(--red); }
.btn.small { min-height: 38px; padding: 0 14px; font-size: .88rem; }
.btn.wide { width: 100%; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row > .grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 12px; }
.spacer { height: 14px; }

/* チップ */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 7px 13px; font-size: .86rem; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.chip.on { background: var(--blue-soft); border-color: #bcdaf0; color: var(--blue-2); font-weight: 650; }
.chip .n { font-size: .74rem; background: rgba(0, 0, 0, .06); border-radius: 999px; padding: 0 7px; }
.chip.warn { background: var(--amber-soft); border-color: #f0dbb5; color: #8a5a10; }

/* カード */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card h2, .section-title { font-size: 1rem; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.section-title { margin: 20px 2px 10px; }
.section-title .more { margin-left: auto; font-size: .82rem; font-weight: 600; color: var(--blue-2); background: none; border: 0; cursor: pointer; }
.muted { color: var(--ink-3); }
.small { font-size: .82rem; }
.tiny { font-size: .72rem; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: var(--wood); color: #6a5434; font-weight: 650; }
.badge.blue { background: var(--blue-soft); color: var(--blue-2); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.amber { background: var(--amber-soft); color: #8a5a10; }
.badge.red { background: var(--red-soft); color: var(--red); }

/* ホームの「あれどこ？」 */
.ask { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 58px; border-radius: 20px; border: 0; background: var(--paper); box-shadow: var(--shadow); padding: 0 16px; color: var(--ink-3); font-size: 1.02rem; cursor: text; }
.ask .icon { color: var(--blue); width: 1.4em; height: 1.4em; }
.ask input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; font-size: 1.05rem; color: var(--ink); }
.status-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 2px; }
.stat { background: var(--paper); border-radius: 16px; padding: 10px 12px; box-shadow: var(--shadow); border: 0; text-align: left; cursor: pointer; }
.stat b { display: block; font-size: 1.35rem; line-height: 1.1; }
.stat span { font-size: .74rem; color: var(--ink-2); }
.stat.hot b { color: var(--amber); }

/* 空間 */
.space { position: relative; background: radial-gradient(ellipse at 50% 40%, #fffdf8 0%, #f3eee5 70%); border-radius: 24px; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; touch-action: pan-y; }
.space .scene { width: 100%; height: 330px; display: block; }
.space.tall .scene { height: 420px; }
.space-tools { position: absolute; right: 10px; top: 10px; display: grid; gap: 8px; }
.space-tools .circle { width: 40px; height: 40px; }
.space-hint { position: absolute; left: 12px; bottom: 10px; font-size: .74rem; color: var(--ink-3); background: rgba(255, 253, 249, .85); padding: 3px 9px; border-radius: 999px; }
.site-switch { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; font-size: 1.45rem; font-weight: 750; padding: 0; cursor: pointer; }
.scene polygon[data-act], .scene g[data-act] { cursor: pointer; }
.scene .faded { opacity: .28; }
.scene .lbl rect { fill: rgba(255, 253, 249, .94); stroke: rgba(70, 58, 44, .14); stroke-width: .015; }
.scene .lbl text { font-size: .22px; fill: var(--ink); font-weight: 700; }
.scene .lbl text.sub { font-size: .16px; fill: var(--ink-3); font-weight: 500; }
.scene .lbl.hl rect { fill: var(--blue); stroke: none; }
.scene .lbl.hl text { fill: #fff; }
.scene .lbl.muted text { fill: var(--ink-3); font-weight: 500; }
.scene .lbl.floorname rect { fill: var(--ink); }
.scene .lbl.floorname text { fill: #fff; }
.scene .boxface.hl, .scene .storage.hl { stroke: var(--blue) !important; stroke-width: .05 !important; filter: drop-shadow(0 0 .08px rgba(63, 143, 203, .9)); }
.scene .boxface.out { opacity: .45; stroke-dasharray: .05 .04; }
.scene .beacon circle { fill: none; stroke: var(--blue); stroke-width: .05; animation: beacon 1.6s ease-out infinite; transform-origin: center; transform-box: fill-box; }
.scene .beacon .b2 { animation-delay: .8s; }
.scene .beacon path { fill: var(--blue); animation: bob 1.2s ease-in-out infinite; }
@keyframes beacon { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
@keyframes bob { 50% { transform: translateY(-.12px); } }
.floor-pills { display: flex; gap: 6px; position: absolute; left: 10px; top: 10px; flex-direction: column; }
.floor-pills button { border: 0; border-radius: 12px; padding: 6px 10px; background: rgba(255, 253, 249, .9); box-shadow: var(--shadow); font-weight: 700; font-size: .82rem; cursor: pointer; color: var(--ink-2); }
.floor-pills button.on { background: var(--ink); color: #fff; }

/* 写真グリッド */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.tile { position: relative; border: 0; padding: 0; background: none; text-align: left; cursor: pointer; min-width: 0; }
.ph { aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: #f0ebe2; position: relative; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .03); display: grid; place-items: center; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph.cover img { object-fit: contain; background: #efe9de; }
.ph.missing::after { content: '写真なし'; font-size: .7rem; color: var(--ink-3); position: absolute; }
.tile .nm { font-size: .8rem; font-weight: 650; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .nm.none { color: var(--ink-3); font-weight: 500; }
.tile .wh { font-size: .68rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .flag { position: absolute; left: 6px; top: 6px; display: flex; gap: 4px; }
.tile .flag .badge { font-size: .62rem; padding: 1px 6px; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.tile .check { position: absolute; right: 7px; top: 7px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; background: rgba(0, 0, 0, .18); display: grid; place-items: center; color: #fff; }
.tile.sel .ph { outline: 3px solid var(--blue); outline-offset: -3px; }
.tile.sel .check { background: var(--blue); }
.tile.past .ph { filter: grayscale(.7); opacity: .7; }
.kindmark { position: absolute; right: 6px; bottom: 6px; background: rgba(255, 253, 249, .92); border-radius: 999px; padding: 2px 6px; font-size: .62rem; font-weight: 700; color: var(--ink-2); }

/* はこのタイル */
.boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.boxtile { border: 0; border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); padding: 12px; text-align: left; cursor: pointer; display: grid; gap: 6px; }
.boxtile .cube { width: 54px; height: 44px; }
.boxtile b { font-size: .9rem; }
.boxtile span { font-size: .72rem; color: var(--ink-3); }
.boxtile.out { opacity: .65; }

/* 一覧行 */
.list { display: grid; gap: 8px; }
.li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--paper); border-radius: 16px; border: 0; width: 100%; text-align: left; cursor: pointer; box-shadow: var(--shadow); }
.li .ph { width: 56px; height: 56px; flex: none; border-radius: 12px; }
.li .grow { flex: 1; min-width: 0; }
.li b { display: block; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .sub { font-size: .76rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .icon { color: var(--ink-3); }

/* 答え */
.answer { border-radius: 20px; padding: 14px 16px; background: var(--green-soft); color: #23573a; display: flex; gap: 10px; align-items: flex-start; }
.answer.warn { background: var(--amber-soft); color: #7a5112; }
.answer.past, .answer.none { background: #efebe5; color: var(--ink-2); }
.answer .icon { margin-top: 3px; }
.answer b { font-size: 1.02rem; }

/* 下のナビ */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255, 253, 249, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + var(--safe-b)); }
.nav .inner { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; }
.nav a { text-decoration: none; color: var(--ink-3); display: grid; justify-items: center; gap: 2px; font-size: .68rem; padding: 4px 0; }
.nav a.on { color: var(--blue-2); font-weight: 700; }
.nav a .icon { width: 1.5em; height: 1.5em; }
.nav .fab { width: 60px; height: 60px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; margin: -22px auto 0; box-shadow: 0 8px 20px rgba(63, 143, 203, .4); }
.nav .fab .icon { width: 1.8em; height: 1.8em; }
.nav a.cap { color: var(--ink-2); }

/* シート */
.sheet-back { position: fixed; inset: 0; background: rgba(31, 43, 56, .32); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease both; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: var(--bg); width: 100%; max-width: 560px; max-height: 88dvh; overflow: auto; border-radius: 26px 26px 0 0; padding: 10px 16px calc(20px + var(--safe-b)); animation: up .26s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: #d8d1c5; margin: 0 auto 10px; }
.sheet h2 { font-size: 1.15rem; margin: 2px 0 12px; }
.sheet-actions { position: sticky; bottom: calc(-20px - var(--safe-b)); background: linear-gradient(transparent, var(--bg) 30%); padding: 16px 0 4px; display: flex; gap: 10px; }
.sheet-actions .btn { flex: 1; }

/* フォーム */
label.f { display: grid; gap: 6px; font-size: .84rem; color: var(--ink-2); font-weight: 600; }
.input, select.input, textarea.input { width: 100%; min-height: 48px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); padding: 10px 14px; font-size: 1rem; color: var(--ink); }
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { outline: 2px solid #bcdaf0; border-color: var(--blue); }
.seg { display: flex; background: #efe9df; border-radius: 999px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 999px; min-height: 38px; font-weight: 650; color: var(--ink-2); cursor: pointer; font-size: .86rem; }
.seg button.on { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatch.on { box-shadow: 0 0 0 2px var(--blue); }
.toggle { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; }
.toggle input { width: 48px; height: 28px; accent-color: var(--blue); }

/* 行き先えらび */
.target { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); width: 100%; text-align: left; cursor: pointer; }
.target.on { border-color: var(--blue); background: var(--blue-soft); }
.target .sw { width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center; color: #fff; }
.target .grow { flex: 1; min-width: 0; }
.target b { display: block; font-size: .92rem; }
.target small { display: block; color: var(--ink-3); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* トースト */
#toast { position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 80; background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 16px; font-size: .9rem; display: flex; gap: 12px; align-items: center; max-width: calc(100% - 32px); transition: .25s; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#toast .toast-act { border: 0; background: rgba(255, 255, 255, .16); color: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }

/* 選択中の操作バー */
.selbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + var(--safe-b)); z-index: 35; width: min(528px, calc(100% - 32px)); background: var(--paper); border-radius: 22px; box-shadow: 0 10px 30px rgba(40, 30, 15, .18); padding: 10px 10px 10px 16px; display: flex; align-items: center; gap: 8px; }
.selbar b { flex: 1; }

/* カメラ */
.cam { position: fixed; inset: 0; background: #101418; z-index: 40; display: flex; flex-direction: column; color: #fff; }
.cam video, .cam .still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam .still { background: #2a2f35; display: grid; place-items: center; }
.cam .still img { max-width: 70%; max-height: 50%; border-radius: 18px; }
.cam-top { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; padding: calc(var(--safe-t) + 10px) 12px 10px; background: linear-gradient(rgba(0, 0, 0, .55), transparent); }
.cam-top .circle { background: rgba(0, 0, 0, .35); color: #fff; box-shadow: none; }
.cam-target { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .16); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 0; color: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 650; cursor: pointer; text-align: left; }
.cam-target span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cam-target .sw { width: 18px; height: 18px; border-radius: 6px; flex: none; }
.cam-mid { flex: 1; position: relative; z-index: 1; }
.cam-guide { position: absolute; left: 12%; right: 12%; top: 30%; height: 22%; border: 2px solid rgba(255, 255, 255, .8); border-radius: 18px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .25); }
.cam-guide::after { content: ''; position: absolute; left: 8%; right: 8%; top: 50%; height: 2px; background: #ff5b5b; box-shadow: 0 0 10px #ff5b5b; animation: scanline 1.6s ease-in-out infinite alternate; }
@keyframes scanline { from { transform: translateY(-30px); } to { transform: translateY(30px); } }
.cam-msg { position: absolute; left: 0; right: 0; top: 18%; text-align: center; font-size: .9rem; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.cam-bottom { position: relative; z-index: 2; padding: 10px 12px calc(16px + var(--safe-b)); background: linear-gradient(transparent, rgba(0, 0, 0, .7) 30%); }
.strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; min-height: 64px; scrollbar-width: none; }
.strip .ph { width: 52px; height: 52px; flex: none; border-radius: 12px; border: 2px solid rgba(255, 255, 255, .8); animation: pop .3s ease both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.shutter-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.shutter { width: 78px; height: 78px; border-radius: 50%; border: 5px solid #fff; background: rgba(255, 255, 255, .25); cursor: pointer; padding: 0; position: relative; }
.shutter::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: #fff; transition: transform .1s; }
.shutter:active::after { transform: scale(.85); }
.shutter.busy::after { background: #ffd36a; }
.cam .btn { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: none; }
.cam .btn.primary { background: var(--blue); }
.cam .seg { background: rgba(255, 255, 255, .14); }
.cam .seg button { color: rgba(255, 255, 255, .85); white-space: nowrap; padding: 0 10px; }
.cam .seg button.on { color: var(--ink); }
.modes { display: flex; justify-content: center; gap: 4px; margin-top: 12px; }
.modes button { border: 0; background: none; color: rgba(255, 255, 255, .65); font-weight: 700; padding: 6px 12px; border-radius: 999px; cursor: pointer; font-size: .86rem; letter-spacing: .04em; }
.modes button.on { color: #ffd36a; background: rgba(255, 255, 255, .1); }
.flash { position: fixed; inset: 0; background: #fff; z-index: 60; pointer-events: none; animation: flash .25s ease-out forwards; }
@keyframes flash { from { opacity: .7; } to { opacity: 0; } }
.counter { font-size: .8rem; opacity: .9; text-align: center; }
.scan-card { position: absolute; left: 12px; right: 12px; bottom: calc(215px + var(--safe-b)); max-height: 46dvh; overflow: auto; z-index: 3; background: var(--paper); color: var(--ink); border-radius: 22px; padding: 12px; display: flex; gap: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); animation: up .25s ease both; }
.scan-card .ph { width: 64px; height: 92px; aspect-ratio: auto; flex: none; border-radius: 8px; }
.scan-card .grow { flex: 1; min-width: 0; }
.scan-card b { display: block; }
.owned-big { font-size: 1.25rem; font-weight: 800; }

/* ゲーム */
.game { display: grid; gap: 14px; }
.meter { height: 8px; border-radius: 99px; background: #e9e3d8; overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), #6cc3a0); border-radius: 99px; transition: width .3s; }
.deck { position: relative; height: min(440px, calc(100dvh - 330px)); min-height: 280px; }
#app.nonav { padding-bottom: calc(20px + var(--safe-b)); }
.game { overscroll-behavior: none; }
.gcard { position: absolute; inset: 0; background: var(--paper); border-radius: 26px; box-shadow: 0 14px 36px rgba(60, 45, 25, .16); padding: 14px 14px 18px; display: flex; flex-direction: column; gap: 12px; touch-action: none; user-select: none; will-change: transform; }
.gcard.under { transform: translateY(10px) scale(.96) rotate(-1.5deg); opacity: .7; }
.gcard .ph { flex: 1; aspect-ratio: auto; border-radius: 18px; pointer-events: none; }
.gcard img, .plan img { -webkit-user-drag: none; user-select: none; pointer-events: none; }
.gcard .q { text-align: center; font-size: 1.35rem; font-weight: 800; letter-spacing: .02em; }
.gcard .q em { font-style: normal; color: var(--blue-2); }
.gcard .ctx { text-align: center; font-size: .78rem; color: var(--ink-3); margin-top: -6px; }
.gcard .stamp { position: absolute; top: 26px; padding: 6px 14px; border: 4px solid; border-radius: 12px; font-weight: 900; font-size: 1.4rem; opacity: 0; transform: rotate(-12deg); }
.gcard .stamp.yes { left: 22px; color: var(--green); }
.gcard .stamp.no { right: 22px; color: var(--red); transform: rotate(12deg); }
.gcard .stamp.skip { left: 50%; transform: translateX(-50%); color: var(--amber); }
.answers { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; align-items: center; justify-items: center; }
.answers button { border: 0; background: none; display: grid; justify-items: center; gap: 4px; font-size: .78rem; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.answers .ball { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; box-shadow: var(--shadow); background: var(--paper); }
.answers .no .ball { color: var(--red); background: var(--red-soft); }
.answers .yes .ball { color: var(--green); background: var(--green-soft); }
.answers .skip .ball { width: 52px; height: 52px; color: var(--amber); background: var(--amber-soft); }
.beat { display: flex; justify-content: center; gap: 6px; }
.beat i { width: 9px; height: 9px; border-radius: 50%; background: #e2dbcf; transition: background .1s, transform .1s; }
.beat i.on { background: var(--blue); transform: scale(1.35); }
.combo { text-align: center; font-weight: 800; color: var(--blue-2); min-height: 1.4em; }
.combo.pop { animation: pop .25s ease; }
.result-hero { text-align: center; padding: 26px 10px; }
.result-hero .big { font-size: 3rem; font-weight: 900; color: var(--blue-2); line-height: 1; }

/* 棚を歩く */
.walk { columns: 3; column-gap: 8px; }
.walk .tile { break-inside: avoid; margin-bottom: 8px; display: block; width: 100%; }
.walk .ph { aspect-ratio: auto; }
.walk .ph img { height: auto; }
.walk .ph.cover { aspect-ratio: 2 / 3; }

/* 設定 */
.setlist { display: grid; gap: 2px; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.setlist > * { padding: 14px 16px; background: var(--paper); border: 0; text-align: left; width: 100%; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.setlist > * + * { border-top: 1px solid var(--line); }
.setlist .grow { flex: 1; }
.setlist small { color: var(--ink-3); display: block; font-size: .76rem; }

/* オンボーディング */
.hero { text-align: center; padding: 30px 6px 10px; }
.hero .logo { width: 96px; height: 96px; margin: 0 auto 10px; border-radius: 26px; box-shadow: var(--shadow); }
.hero h1 { font-size: 2rem; margin: 6px 0; letter-spacing: .04em; }
.hero p { color: var(--ink-2); margin: 0 auto; max-width: 30em; }
.choice { display: flex; gap: 14px; align-items: center; text-align: left; padding: 16px; border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); border: 0; width: 100%; cursor: pointer; }
.choice .ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue-2); flex: none; }
.choice .ic .icon { width: 1.6em; height: 1.6em; }
.choice b { display: block; font-size: 1.02rem; }
.choice span { font-size: .82rem; color: var(--ink-2); }
.steps { display: flex; gap: 6px; justify-content: center; margin: 4px 0 14px; }
.steps i { width: 28px; height: 5px; border-radius: 3px; background: #e2dbcf; }
.steps i.on { background: var(--blue); }
.quick-add { display: flex; flex-wrap: wrap; gap: 6px; }

/* 2D編集 */
.plan { position: relative; background: #fbf8f2; border-radius: 18px; box-shadow: inset 0 0 0 1px var(--line); touch-action: none; overflow: hidden; }
.plan .blk { position: absolute; border-radius: 6px; border: 2px solid rgba(90, 70, 45, .35); background: var(--wood-2); display: grid; place-items: center; font-size: .7rem; font-weight: 700; color: #5c4626; cursor: grab; touch-action: none; text-align: center; line-height: 1.1; padding: 2px; }
.plan .blk.room { background: var(--wood); border-color: rgba(90, 70, 45, .3); align-content: start; padding-top: 6px; }
.plan .blk.sel { outline: 3px solid var(--blue); }

/* 印刷ラベル */
.labels { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.label { background: #fff; border: 1px dashed #c9c0b2; border-radius: 12px; padding: 10px; display: grid; gap: 4px; justify-items: center; text-align: center; break-inside: avoid; }
.label svg { width: 110px; height: 110px; }
.label b { font-size: .95rem; }
.label .code { font-size: .8rem; font-weight: 800; letter-spacing: .08em; }
.label .stripe { height: 6px; width: 100%; border-radius: 3px; }
@media print {
  body { background: #fff; }
  .nav, .top, .noprint, #toast { display: none !important; }
  #app { padding: 0; max-width: none; }
  .labels { grid-template-columns: repeat(4, 1fr); }
}

.empty { text-align: center; padding: 30px 12px; color: var(--ink-3); }
.empty .icon { width: 2.4em; height: 2.4em; margin: 0 auto 8px; opacity: .6; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .88rem; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }
.timeline { display: grid; gap: 10px; border-left: 2px solid var(--line); margin-left: 6px; padding-left: 14px; }
.timeline div { font-size: .84rem; position: relative; }
.timeline div::before { content: ''; position: absolute; left: -20px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--wood-2); }
.timeline small { color: var(--ink-3); display: block; font-size: .72rem; }
.hero-photo { border-radius: 24px; overflow: hidden; background: #efe9de; aspect-ratio: 4 / 3; display: grid; place-items: center; box-shadow: var(--shadow); }
.hero-photo img { width: 100%; height: 100%; object-fit: contain; }
.tagline { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { border-radius: 999px; padding: 4px 11px; font-size: .82rem; background: var(--blue-soft); color: var(--blue-2); font-weight: 650; border: 0; }
.tag.pending { background: #f3efe8; color: var(--ink-2); border: 1px dashed #d6ccbc; cursor: pointer; }
.tag.ai { border-color: #b9a6e6; }
.notice { background: var(--amber-soft); color: #7a5112; border-radius: 14px; padding: 10px 12px; font-size: .84rem; }
.walkhero { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.walkhero .tile { width: 92px; flex: none; }
