/* ぬりかくれんぼ — 見た目
 *   部屋の色を邪魔しないように、操作の板はすりガラスの暗い色。押せるものは黄、見つけた・逃げ切ったは水色、危ないは赤。
 *   遊ぶ画面の操作はすべて舞台（#stage）の中に重ねる。骨格はルート AGENTS.md のとおり（普通にスクロールするページ。fixed は使わない）
 */
[hidden] { display: none !important; }
/* 言語。<html lang> は src/lang.js が描く前に決める */
html[lang="ja"] [lang="en"], html[lang="en"] [lang="ja"] { display: none !important; }

:root {
  --bg: #15171c;
  --glass: rgba(16, 18, 24, .74);
  --glass2: rgba(34, 38, 48, .86);
  --line: rgba(255, 255, 255, .12);
  --text: #f1ede6;
  --sub: #a7a299;
  --accent: #ffd84a;
  --accent-ink: #2a2116;
  --mint: #5ef2d0;
  --red: #ff5a4a;
  --sans: "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.7; -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg .fill { fill: currentColor; stroke: none; }

#app { padding: 0 16px 48px; }
#site-header, #main, #guide-section, .related-apps, #ad-section, #site-footer { max-width: 1200px; margin-left: auto; margin-right: auto; }
#site-header { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.apps-link { color: var(--sub); text-decoration: none; font-size: 14px; }
.app-name { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: .02em; }
.app-name small { font-size: 12px; color: var(--sub); font-weight: 500; margin-left: 6px; }
/* 副題はブラウザの題名と同じ言葉。狭い画面では隠す（言語の切り替えが押し出される） */
.header-sub { margin-left: 6px; font-size: 12px; font-weight: 500; color: var(--sub); letter-spacing: 0; }
@media (max-width: 720px) { .header-sub { display: none; } }
.langsw { margin-left: auto; display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.langsw button { font-size: 12px; padding: 3px 10px; border: 0; background: none; color: var(--sub); cursor: pointer; }
.langsw button[aria-pressed="true"] { background: var(--glass2); color: var(--text); font-weight: 800; }

/* ── 舞台 ─────────────────────────── */
#stage {
  position: relative;
  width: min(100%, calc(76svh * 16 / 9));
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: #0d0e11;
  user-select: none;
  -webkit-user-select: none;
  container-type: inline-size;
}
@media (max-width: 720px) {
  #stage { aspect-ratio: 3 / 4; width: min(100%, calc(76svh * 3 / 4)); }
}
#view { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#view:active { cursor: grabbing; }
#stage[data-mode="hide"] #view { cursor: crosshair; }
#stage[data-mode="hide"] #view[data-tool="pick"] { cursor: copy; }
#stage[data-mode="seek"] #view { cursor: crosshair; }

/* 押した手ごたえ。どのボタンも少し沈む */
.btn, .icon-btn, .tool, .mode, .room-card, .swatch, .color-big, #pad button { transition: transform .08s ease, background .15s, border-color .15s, color .15s; }
.btn:active, .icon-btn:active, .tool:active, .mode:active, .room-card:active, .swatch:active, .color-big:active, #pad button:active { transform: scale(.93); }

.btn {
  border: 1px solid var(--line); background: var(--glass2);
  border-radius: 12px; padding: 9px 16px;
  font-size: 15px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: rgba(255, 255, 255, .3); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 3px 0 #b8952a; }
.btn.primary:hover { background: #ffe27a; }
.btn.primary:active { box-shadow: 0 1px 0 #b8952a; }
.btn.small { padding: 5px 12px; font-size: 13px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--glass); cursor: pointer; padding: 0;
  backdrop-filter: blur(6px);
}
.icon-btn:hover { border-color: rgba(255, 255, 255, .3); }

/* ── 上の帯 ── */
#hud {
  position: absolute; left: 0; right: 0; top: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 56px 8px 10px; min-height: 54px;
  background: linear-gradient(rgba(0, 0, 0, .55), rgba(0, 0, 0, 0));
  pointer-events: none;
}
#hud > * { pointer-events: auto; }
#hud .spacer { flex: 1; pointer-events: none; }
#hud-phase { display: flex; flex-direction: column; line-height: 1.2; text-shadow: 0 1px 3px #000; pointer-events: none; }
#hud-title { font-size: 16px; font-weight: 800; }
#hud-room { font-size: 12px; color: #d7d2c8; }
#hud-time {
  min-width: 76px; text-align: center; padding: 3px 12px; border-radius: 12px;
  background: var(--glass); border: 1px solid var(--line);
  font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
#hud-time:empty { display: none; }
#hud-time.warn { color: #fff; background: rgba(200, 40, 30, .85); border-color: var(--red); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }
#mute { position: absolute; right: 10px; top: 8px; }
#mute .off { display: none; }
#mute.muted .on { display: none; }
#mute.muted .off { display: inline; }

/* 探す: 見つけた人の数 */
#hud-count { display: flex; gap: 3px; padding: 4px 8px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); }
#hud-count i {
  width: 18px; height: 22px; display: block;
  background: currentColor; color: rgba(255, 255, 255, .28);
  -webkit-mask: var(--who) center / contain no-repeat; mask: var(--who) center / contain no-repeat;
  --who: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 22'%3E%3Ccircle cx='9' cy='5' r='4'/%3E%3Cpath d='M2 22v-6a7 7 0 0114 0v6z'/%3E%3C/svg%3E");
}
#hud-count i.found { color: var(--mint); animation: popin .35s ease-out; }
@keyframes popin { 0% { transform: scale(.3); } 70% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* ── 鬼のあやしさ ── */
#meter {
  position: absolute; left: 50%; top: 60px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
#meter svg { color: #cfc9bf; }
#meter .bar { width: min(220px, 34cqw); height: 12px; border-radius: 6px; background: rgba(255, 255, 255, .12); overflow: hidden; }
#meter-bar { height: 100%; width: 0; background: var(--mint); border-radius: 6px; transition: width .15s linear, background .3s; }
#meter-pct { min-width: 38px; font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; }
#meter.hot { border-color: var(--red); animation: pulse .6s ease-in-out infinite; }
#meter.hot svg { color: var(--red); }

#vignette {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(220, 20, 20, .75) 100%);
  transition: opacity .2s;
}

#eye-frame {
  position: absolute; border: 2px solid rgba(255, 255, 255, .7); border-radius: 10px;
  pointer-events: none; box-shadow: 0 4px 14px rgba(0, 0, 0, .5);
}
#eye-label { position: absolute; left: 8px; top: 4px; font-size: 12px; font-weight: 800; text-shadow: 0 1px 3px #000; }
#view-swap { position: absolute; }

#toast {
  position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%);
  max-width: 86%; padding: 8px 16px; border-radius: 14px;
  background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(6px);
  font-size: 14px; font-weight: 700; pointer-events: none; text-align: center;
  animation: rise .22s ease-out;
}
@keyframes rise { from { opacity: 0; transform: translate(-50%, 10px); } }

/* 場面の切り替わりに出す大きな文字 */
#banner {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 18px 0; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .55) 20%, rgba(0, 0, 0, .55) 80%, transparent);
  text-shadow: 0 3px 10px rgba(0, 0, 0, .7);
  animation: bannerIn .45s cubic-bezier(.2, 1.4, .4, 1);
}
#banner b { font-size: clamp(30px, 7cqw, 64px); font-weight: 900; letter-spacing: .04em; line-height: 1.1; }
#banner span { font-size: clamp(13px, 2.2cqw, 18px); font-weight: 700; color: #e9e3d8; }
#banner.count b { font-size: clamp(56px, 14cqw, 120px); color: var(--accent); }
#banner.out { animation: bannerOut .3s ease-in forwards; }
@keyframes bannerIn { from { opacity: 0; transform: translateY(-50%) scale(.6); } }
@keyframes bannerOut { to { opacity: 0; transform: translateY(-50%) scale(1.1); } }

/* 結果の判子 */
#stamp {
  position: absolute; left: 50%; top: 42%;
  padding: 6px 26px; border: 6px solid currentColor; border-radius: 16px;
  font-size: clamp(34px, 8cqw, 76px); font-weight: 900; letter-spacing: .06em; white-space: nowrap;
  transform: translate(-50%, -50%) rotate(-8deg);
  background: rgba(0, 0, 0, .35); text-shadow: 0 3px 10px rgba(0, 0, 0, .6);
  pointer-events: none; animation: stamp .45s cubic-bezier(.3, 1.6, .5, 1);
}
#stamp.win { color: var(--mint); }
#stamp.lose { color: var(--red); }
@keyframes stamp { from { opacity: 0; transform: translate(-50%, -50%) rotate(-8deg) scale(2.4); } }

/* ── 塗る道具（舞台に重ねる）── */
.dock {
  position: absolute; display: flex; gap: 6px; padding: 6px;
  background: var(--glass); border: 1px solid var(--line); border-radius: 16px;
  backdrop-filter: blur(8px);
}
.dock-left { left: 10px; top: 62px; flex-direction: column; align-items: center; }
.dock-right { right: 10px; top: 62px; flex-direction: column; }
.dock-bottom { left: 50%; bottom: 10px; transform: translateX(-50%); align-items: center; }
.dock .sep { width: 1px; align-self: stretch; background: var(--line); margin: 2px 2px; }
.tool {
  width: 52px; min-height: 52px; padding: 5px 0 3px; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border: 1px solid transparent; background: transparent; cursor: pointer;
}
.tool:hover { background: rgba(255, 255, 255, .08); }
.tool small { font-size: 11px; font-weight: 700; color: #d9d4ca; line-height: 1.2; }
.tool.on { background: var(--accent); color: var(--accent-ink); }
.tool.on small { color: var(--accent-ink); }
.tool.size i { display: block; width: var(--d); height: var(--d); border-radius: 50%; background: currentColor; margin: calc((20px - var(--d)) / 2) 0; }
.color-big {
  width: 52px; height: 52px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 3px solid #fff; background: none; box-shadow: 0 0 0 2px rgba(0, 0, 0, .5), 0 3px 8px rgba(0, 0, 0, .4);
  display: grid; place-items: center;
}
#color-chip { width: 100%; height: 100%; border-radius: 50%; display: block; }
#recent { display: flex; flex-direction: column; gap: 5px; }
#recent .swatch { width: 30px; height: 30px; border-radius: 50%; }
.swatch { width: 34px; height: 34px; border-radius: 10px; border: 2px solid rgba(255, 255, 255, .25); cursor: pointer; padding: 0; }
.swatch:hover { border-color: #fff; }
.swatch.now { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
#pose-icon svg { width: 26px; height: 26px; }
/* 視点のボタンには «押すとどうなるか» の絵を出す */
#view-toggle[data-v="near"] .v-near, #view-toggle[data-v="far"] .v-far { display: none; }

.pop {
  position: absolute; padding: 10px; border-radius: 16px;
  background: rgba(20, 22, 29, .94); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  animation: popup .16s ease-out;
}
@keyframes popup { from { opacity: 0; transform: scale(.92); } }
#palette { left: 76px; top: 62px; width: min(300px, calc(100% - 96px)); transform-origin: top left; }
.pop-head { font-size: 12px; font-weight: 700; color: var(--sub); margin-bottom: 6px; }
#swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 6px; }
.free { display: flex; align-items: center; gap: 8px; margin-top: 10px; cursor: pointer; font-size: 13px; font-weight: 700; }
.free input { width: 34px; height: 34px; padding: 0; border: 0; background: none; cursor: pointer; }
#poses { right: 76px; top: 62px; display: grid; grid-template-columns: repeat(5, 60px); gap: 4px; transform-origin: top right; }
#poses .tool { width: 60px; }
#poses svg { width: 30px; height: 30px; }

/* 歩くボタン（PC でも出す） */
#pad {
  position: absolute; left: 10px; bottom: 10px;
  display: grid; grid-template-columns: repeat(3, 48px); grid-template-rows: repeat(2, 48px); gap: 5px;
}
#pad button {
  border: 1px solid var(--line); border-radius: 14px; background: var(--glass);
  display: grid; place-items: center; touch-action: none; cursor: pointer; padding: 0;
}
#pad [data-k="f"] { grid-column: 2; grid-row: 1; }
#pad [data-k="l"] { grid-column: 1; grid-row: 2; }
#pad [data-k="b"] { grid-column: 2; grid-row: 2; }
#pad [data-k="r"] { grid-column: 3; grid-row: 2; }
#stage[data-mode="hide"] #pad { bottom: 86px; }

/* ── 最初の画面・部屋の一覧 ── */
#menu, #rooms, #busy, #result, #handoff {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center;
  padding: 16px; overflow: auto;
}
#menu { background: radial-gradient(ellipse at center, rgba(13, 14, 17, .2), rgba(13, 14, 17, .78)); gap: 12px; }
#menu > :first-child { margin-top: auto; }
#menu > :last-child { margin-bottom: auto; }
.logo { margin: 0; font-size: clamp(40px, 9cqw, 84px); font-weight: 900; letter-spacing: .02em; line-height: 1.05; white-space: nowrap; }
/* 英語名は 13 字あるので小さく（スマホ幅で 1 行に収める） */
html[lang="en"] .logo { font-size: clamp(30px, 7cqw, 68px); }
.logo span { display: inline-block; text-shadow: 0 4px 0 rgba(0, 0, 0, .45), 0 6px 18px rgba(0, 0, 0, .5); animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px) rotate(var(--r)); } }
.tagline { margin: 0; font-size: clamp(14px, 2.2cqw, 18px); font-weight: 700; text-shadow: 0 2px 6px #000; }
.mode-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.mode {
  width: min(260px, 42cqw); min-width: 190px; padding: 16px 18px 14px; border-radius: 18px; cursor: pointer; text-align: left;
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  background: var(--glass2); border: 2px solid var(--line); backdrop-filter: blur(8px);
  box-shadow: 0 6px 0 rgba(0, 0, 0, .35);
}
.mode:hover { border-color: var(--accent); }
.mode svg { grid-row: 1 / 3; width: 40px; height: 40px; color: var(--accent); }
.mode b { font-size: 26px; font-weight: 900; line-height: 1.2; }
.mode .desc { font-size: 13px; color: #d9d4ca; line-height: 1.5; }
/* ふたりで・今日の部屋は、隠れる・探すより一段小さく */
.sub-row { margin-top: 0; }
.mode.sub { padding: 10px 14px; border-radius: 14px; box-shadow: 0 4px 0 rgba(0, 0, 0, .35); }
.mode.sub svg { width: 28px; height: 28px; }
.mode.sub b { font-size: 17px; }
.mode.sub .desc { font-size: 12px; }
#go-daily .desc { color: var(--accent); }

#rooms { background: rgba(13, 14, 17, .9); padding: 0; }
.rooms-head {
  position: sticky; top: 0; z-index: 1; width: 100%;
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: rgba(13, 14, 17, .96); border-bottom: 1px solid var(--line);
}
#rooms-title { font-size: 18px; font-weight: 900; white-space: nowrap; }
.seg { margin-left: auto; display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; flex: none; }
.seg button { font-size: 13px; padding: 4px 12px; border: 0; background: none; color: var(--sub); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 800; }
#room-grid { width: 100%; padding: 12px 14px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.room-card {
  position: relative; padding: 0; border-radius: 12px; overflow: hidden; cursor: pointer; text-align: left;
  background: #22262f; border: 2px solid transparent;
}
.room-card:hover { border-color: var(--accent); }
.room-card .thumb { display: block; width: 100%; aspect-ratio: 16 / 9; background: #2b2f38 center / cover; }
.room-card .cap { display: flex; flex-direction: column; padding: 4px 9px 7px; line-height: 1.35; }
.room-card .cap b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-card .cap small { font-size: 11px; color: var(--sub); }
.room-card .no { position: absolute; left: 6px; top: 6px; min-width: 24px; padding: 0 6px; border-radius: 8px; background: rgba(0, 0, 0, .65); font-size: 12px; font-weight: 800; text-align: center; }

/* ふたりで遊ぶときの «画面を渡す» 画面。隠れた場所が見えないよう、舞台をすっかり覆う */
#handoff { justify-content: center; background: #15171c; z-index: 5; }
.handoff-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 420px; }
.handoff-card small { font-size: 14px; font-weight: 800; color: var(--sub); }
.handoff-card h2 { margin: 0; font-size: clamp(28px, 6cqw, 44px); font-weight: 900; color: var(--accent); }
.handoff-card p { margin: 0 0 8px; font-size: 15px; }
.handoff-card .btn { font-size: 18px; padding: 12px 28px; }

#busy { justify-content: center; gap: 12px; background: rgba(13, 14, 17, .65); font-weight: 800; font-size: 16px; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 5px solid rgba(255, 255, 255, .2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 結果 ── */
#result { background: rgba(13, 14, 17, .5); justify-content: flex-start; animation: fadein .25s ease-out; }
@keyframes fadein { from { opacity: 0; } }
.result-card {
  margin: auto 0; width: 100%; max-width: 540px; padding: 16px 18px;
  background: rgba(20, 22, 29, .95); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .55); animation: slideup .35s cubic-bezier(.2, 1.2, .4, 1);
}
@keyframes slideup { from { opacity: 0; transform: translateY(30px); } }
.result-card h2 { margin: 0; font-size: 28px; font-weight: 900; }
.result-card h2.win { color: var(--mint); }
.result-card h2.lose { color: var(--red); }
.result-card p { margin: 2px 0 10px; font-size: 14px; color: #ddd8ce; }
.result-card #result-cap { margin: 0 0 4px; font-size: 12px; color: var(--sub); }
#result-shot { display: block; width: 100%; height: auto; border-radius: 10px; background: #000; }
.shot-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.toggle { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--sub); cursor: pointer; }
#result-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
#result-buttons .btn.primary { flex: 1 1 100%; font-size: 17px; padding: 11px 16px; }

/* 探す: 押した所に出る字 */
.float {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap;
  font-size: 24px; font-weight: 900; text-shadow: 0 2px 6px #000;
  pointer-events: none; animation: floatup .9s ease-out forwards;
}
.float.ok { color: var(--mint); font-size: 28px; }
.float.ng { color: var(--red); }
@keyframes floatup { 0% { transform: translate(-50%, -50%) scale(.6); } 20% { transform: translate(-50%, -60%) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -140%) scale(1); } }
.ripple { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 3px solid #fff; pointer-events: none; animation: ripple .45s ease-out forwards; }
@keyframes ripple { to { opacity: 0; transform: scale(4); } }
#stage.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* ── 狭い画面 ── */
@media (max-width: 720px) {
  #hud { padding-right: 52px; min-height: 48px; gap: 6px; }
  #hud-title { font-size: 14px; }
  #hud-time { font-size: 18px; min-width: 60px; padding: 2px 8px; }
  #hud .btn.primary { padding: 7px 12px; font-size: 14px; }
  #hud-count i { width: 14px; height: 18px; }
  .dock { gap: 3px; padding: 4px; border-radius: 14px; }
  .dock-left, .dock-right { top: 54px; }
  .tool { width: 44px; min-height: 46px; }
  .tool small { font-size: 10px; }
  .color-big { width: 44px; height: 44px; }
  #recent .swatch { width: 26px; height: 26px; }
  #palette { left: 64px; right: 64px; width: auto; top: 54px; }
  #poses { right: 64px; top: 54px; grid-template-columns: repeat(3, 56px); }
  #poses .tool { width: 56px; }
  #meter { top: 52px; }
  #stage[data-mode="hide"] #pad { bottom: 74px; }
  #pad { grid-template-columns: repeat(3, 42px); grid-template-rows: repeat(2, 42px); }
  .mode { min-width: 0; width: 100%; }
  .mode b { font-size: 22px; }
  .sub-row { gap: 8px; flex-wrap: nowrap; width: 100%; }
  .sub-row .mode.sub { flex: 1 1 0; padding: 8px 10px; column-gap: 8px; }
  .mode.sub svg { width: 22px; height: 22px; }
  .mode.sub b { font-size: 15px; }
  .mode.sub .desc { font-size: 11px; line-height: 1.4; }
  .rooms-head { flex-wrap: wrap; row-gap: 6px; }
  #rooms-title { font-size: 16px; }
  #room-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 10px; }
  /* 狭い画面では案内が歩くボタンに重なるので、ボタンより上に出す */
  #toast { bottom: 108px; font-size: 13px; }
  #stage[data-mode="hide"] #toast { bottom: 172px; }
}

#guide-section { margin-top: 28px; font-size: 14.5px; }
#guide-section h2 { font-size: 18px; margin: 0 0 6px; }
#guide-section h3 { font-size: 15px; margin: 14px 0 4px; color: var(--accent); }
#guide-section ul { margin: 0; padding-left: 1.3em; }
/* 関連アプリ（画像つきのカード。文字だけのリンクは押されない） */
.related-apps { margin-top: 32px; }
.related-apps-title { font-size: 18px; margin: 0 0 10px; }
.related-apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(180px, calc(50% - 5px)), 1fr)); gap: 10px; }
.related-app-link.ra-card { display: flex; flex-direction: column; overflow: hidden; border-radius: 10px; border: 1px solid var(--line); background: #1f232b; color: var(--text); text-decoration: none; transition: transform .15s, border-color .15s; }
.related-app-link.ra-card:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .2); }
.ra-card .ra-thumb { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.ra-card .ra-name { display: block; padding: 8px 12px 10px; font-size: 13px; font-weight: 700; line-height: 1.4; }
#ad-section { margin-top: 28px; }

#site-footer { margin-top: 28px; padding: 14px 0 0; border-top: 1px solid var(--line); text-align: center; font-size: 12px; color: var(--sub); }
#site-footer p { margin: 6px 0 0; }
#site-footer a { color: var(--sub); text-decoration: none; }
#site-footer a:hover { color: var(--text); }
.footer-sep { margin: 0 8px; opacity: .5; }
