:root {
  --ink: #2b2a33; --muted: #6d6b78; --line: rgba(43, 42, 51, 0.12);
  --before: #e2674f; --after: #2a9d8f; --accent: var(--before);
  --panel: rgba(255, 253, 248, 0.94); --cream: #f6f1e7;
  --shadow: 0 6px 24px rgba(30, 28, 40, 0.16), 0 1px 3px rgba(30, 28, 40, 0.1);
  --r: 16px;
  --font: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
}
body.mode-after { --accent: var(--after); }
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; overflow: hidden; background: #cfe6f4; color: var(--ink); font-family: var(--font); font-weight: 500; -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible, input:focus-visible { outline: 3px solid #3f6fa8; outline-offset: 2px; }
a { color: #1f7a6f; text-underline-offset: 3px; }
[hidden] { display: none !important; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#c:active { cursor: grabbing; }
body.view-walk #c { cursor: crosshair; }

/* ── ピン ── */
#pins { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.pin { position: absolute; left: 0; top: 0; pointer-events: auto; padding: 0; will-change: transform; }
.pin.off, .pin.hid { display: none; }
.pin .dot { position: relative; display: grid; place-items: center; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28); transition: transform 0.18s, background 0.18s; }
.pin .dot::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: pulse 2.6s ease-out infinite; }
.pin .ico { font-size: 16px; line-height: 1; }
.pin .lbl { position: absolute; left: 24px; top: -15px; white-space: nowrap; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 700; padding: 6px 10px; border-radius: 9px; opacity: 0; transform: translateX(-4px); transition: opacity 0.15s, transform 0.15s; pointer-events: none; }
.pin:hover { z-index: 3; }
.pin:hover .dot { transform: scale(1.14); }
.pin:hover .lbl, .pin:focus-visible .lbl { opacity: 1; transform: none; }
.pin.sel { z-index: 2; }
.pin.sel .dot { transform: scale(1.22); background: var(--accent); }
.pin.saved .dot { box-shadow: 0 0 0 3px #f2c94c, 0 2px 8px rgba(0, 0, 0, 0.28); }
@keyframes pulse { 0% { transform: scale(0.7); opacity: 0.7; } 70%, 100% { transform: scale(1.35); opacity: 0; } }

/* ── 吹き出し（うさぎさんの部屋） ── */
#bubbles { position: fixed; inset: 0; pointer-events: none; z-index: 6; overflow: hidden; }
.bubble { position: absolute; left: 0; top: 0; max-width: 250px; min-width: 120px; padding: 8px 12px 9px; border-radius: 16px; background: #fffdf8; border: 2.5px solid var(--ink); box-shadow: 0 4px 0 rgba(43, 42, 51, 0.18); pointer-events: auto; will-change: transform; }
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -9px; width: 14px; height: 14px; margin-left: -7px; background: #fffdf8; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(45deg); }
.bubble b { display: block; font-size: 10.5px; font-weight: 900; letter-spacing: 0.04em; }
.bubble.b-u b { color: #4d7fb8; } .bubble.b-t b { color: #1f3a63; }
.bubble p { font-size: 13.5px; font-weight: 700; line-height: 1.5; }
.bubble button { margin-top: 5px; padding: 3px 9px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 11.5px; font-weight: 700; }
body.has-panel #bubbles, body.loading #bubbles { display: none; }

/* ── 上部 ── */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 10; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px 0; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.brand { background: var(--panel); border-radius: var(--r); padding: 9px 14px 10px; box-shadow: var(--shadow); min-width: 0; }
.brand h1 { font-size: 17px; font-weight: 900; letter-spacing: 0.01em; line-height: 1.25; }
.brand h1 span { color: var(--accent); transition: color 0.3s; }
.brand p { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.modeSwitch { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); display: grid; grid-template-columns: 1fr 1fr; width: 320px; height: 52px; border-radius: 999px; background: var(--panel); box-shadow: var(--shadow); cursor: pointer; user-select: none; }
.modeSwitch .opt { position: relative; z-index: 1; display: grid; place-items: center; font-size: 14px; font-weight: 700; color: var(--muted); transition: color 0.3s; }
.modeSwitch .opt b { font-size: 18px; font-weight: 900; margin-left: 2px; }
.modeSwitch .opt { display: flex; align-items: center; justify-content: center; }
.modeSwitch .knob { position: absolute; top: 5px; left: 5px; width: calc(50% - 5px); height: calc(100% - 10px); border-radius: 999px; background: var(--before); transition: transform 0.4s cubic-bezier(0.3, 1.3, 0.5, 1), background 0.4s; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
body.mode-after .modeSwitch .knob { transform: translateX(100%); background: var(--after); }
body.mode-before .modeSwitch .before, body.mode-after .modeSwitch .after { color: #fff; }
.tools { display: flex; gap: 8px; }
.tool { position: relative; display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 13px; border-radius: 999px; background: var(--panel); box-shadow: var(--shadow); font-size: 13px; font-weight: 700; white-space: nowrap; }
.tool:hover { background: #fff; }
.tool i { font-style: normal; font-size: 11px; min-width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 9px; background: var(--line); }
.tool i.has { background: #f2c94c; }
.tool[aria-pressed="true"] { background: var(--ink); color: #fff; }
.otherRow { margin-top: 10px; font-size: 13px; font-weight: 700; text-align: center; }

/* ── 刺激メーター（ASDの部屋） ── */
.meter { align-self: center; display: flex; align-items: center; gap: 10px; max-width: 100%; background: var(--panel); border-radius: 14px; padding: 7px 12px; box-shadow: var(--shadow); font-size: 11.5px; }
.meter b { font-weight: 900; white-space: nowrap; color: var(--muted); }
.meter ul { list-style: none; display: flex; gap: 9px; padding: 0; }
.meter li { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.meter em { font-style: normal; font-weight: 700; }
.meter i { display: block; width: 40px; height: 9px; border-radius: 5px; background: rgba(43, 42, 51, 0.1); overflow: hidden; }
.meter u { display: block; height: 100%; border-radius: 5px; background: var(--accent); transition: width 0.9s cubic-bezier(0.3, 1, 0.4, 1), background 0.4s; }

/* ── 左側 ── */
.side { position: fixed; left: 16px; top: 92px; z-index: 9; display: flex; flex-direction: column; gap: 10px; width: 108px; }
.viewSwitch, .rooms { display: flex; flex-direction: column; gap: 4px; background: var(--panel); padding: 5px; border-radius: var(--r); box-shadow: var(--shadow); }
.side button { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 11px; font-size: 13px; font-weight: 700; text-align: left; color: var(--muted); }
.side button:hover { background: rgba(43, 42, 51, 0.06); color: var(--ink); }
.side button.on { background: var(--ink); color: #fff; }
.rooms button { padding: 6px 10px; }

/* ── 下部 ── */
.bottom { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 9; width: min(700px, calc(100% - 28px)); display: flex; flex-direction: column; gap: 8px; pointer-events: none; transition: left 0.3s; }
.bottom > * { pointer-events: auto; }
.story { align-self: center; max-width: 100%; background: var(--ink); color: #fff; border-radius: 14px; padding: 8px 14px; font-size: 13.5px; line-height: 1.55; box-shadow: var(--shadow); border-left: 5px solid var(--accent); }
.story b { margin-right: 10px; white-space: nowrap; color: #ffe9a8; }
.timebar { background: var(--panel); border-radius: 20px; padding: 8px; box-shadow: var(--shadow); }
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.chips button { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 6px; border-radius: 13px; color: var(--muted); font-size: 13px; }
.chips button b { font-size: 16px; font-weight: 900; color: var(--ink); }
.chips button small { font-size: 12px; }
.chips button:hover { background: rgba(43, 42, 51, 0.06); }
.chips button.on { background: var(--accent); color: #fff; transition: background 0.3s; }
.chips button.on b { color: #fff; }
.sliderRow { display: flex; align-items: center; gap: 10px; padding: 6px 8px 2px; }
.play { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 11px; flex: none; }
#clock { font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; min-width: 52px; text-align: center; }
#time { flex: 1; -webkit-appearance: none; appearance: none; height: 10px; border-radius: 5px; background: linear-gradient(90deg, #f6bd92 0%, #cfe6f4 14%, #cfe6f4 52%, #f6bd92 62%, #2a3158 72%, #10162f 100%); }
#time::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 4px solid var(--ink); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); cursor: grab; }
#time::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--ink); cursor: grab; }

/* ── カード ── */
.card { position: fixed; right: 16px; top: 80px; z-index: 12; width: 372px; max-height: calc(100% - 96px); overflow-y: auto; background: var(--panel); border-radius: 20px; box-shadow: var(--shadow); padding: 18px 18px 14px; animation: cardIn 0.25s ease-out; scrollbar-width: thin; }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } }
.x { position: absolute; right: 10px; top: 10px; width: 32px; height: 32px; border-radius: 50%; font-size: 20px; line-height: 1; color: var(--muted); background: rgba(43, 42, 51, 0.06); }
.x:hover { background: rgba(43, 42, 51, 0.12); }
.cardHead { display: flex; gap: 12px; align-items: flex-start; padding-right: 34px; }
.cardHead .ico { flex: none; display: grid; place-items: center; width: 46px; height: 46px; font-size: 24px; border-radius: 14px; background: #fff; border: 2px solid var(--accent); }
.zone { font-size: 12px; color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 4px; }
.sl { font-style: normal; font-size: 10.5px; padding: 1px 6px; border-radius: 6px; background: rgba(43, 42, 51, 0.08); color: var(--ink); }
.sl-morning { background: #ffe2c2; } .sl-day { background: #d5ecf8; } .sl-evening { background: #f9d0b8; } .sl-night { background: #2a3158; color: #fff; }
.card h3 { font-size: 18px; font-weight: 900; line-height: 1.4; margin-top: 3px; }
.ba { display: grid; gap: 8px; margin-top: 14px; }
.b { border-radius: 14px; padding: 10px 12px 11px; border: 2px solid transparent; background: rgba(43, 42, 51, 0.045); opacity: 0.72; transition: opacity 0.25s, border-color 0.25s, background 0.25s; }
.b h4 { font-size: 12px; font-weight: 900; margin-bottom: 3px; }
.b p { font-size: 14px; line-height: 1.7; }
.b.before h4 { color: #c0503c; } .b.after h4 { color: #1f7a6f; }
.b.cur { opacity: 1; background: #fff; }
.b.before.cur { border-color: var(--before); } .b.after.cur { border-color: var(--after); }
.swap { width: 100%; margin-top: 8px; padding: 10px; border-radius: 12px; font-size: 13.5px; font-weight: 900; color: #fff; background: var(--ink); }
.swap:hover { opacity: 0.9; }
.why, .try { margin-top: 12px; }
.why h4, .try h4 { font-size: 12px; font-weight: 900; color: var(--muted); margin-bottom: 2px; }
.why p { font-size: 13.5px; line-height: 1.7; }
.try { background: #fff7d6; border-radius: 12px; padding: 9px 12px 10px; }
.try h4 { color: #8a6a00; }
.try p { font-size: 14.5px; font-weight: 700; line-height: 1.6; }
.acts { display: grid; gap: 8px; margin-top: 12px; }
.save { padding: 11px; border-radius: 12px; font-weight: 900; font-size: 14px; background: #fff; border: 2px solid #f2c94c; }
.save.on { background: #f2c94c; }
.art { font-size: 12.5px; line-height: 1.5; }
.nav { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.nav button { padding: 7px 12px; border-radius: 10px; font-weight: 700; background: rgba(43, 42, 51, 0.06); color: var(--ink); }
.nav button:hover { background: rgba(43, 42, 51, 0.12); }
@media (min-width: 760px) { body.has-card .bottom { left: calc((100% - 388px) / 2 + 40px); width: min(640px, calc(100% - 388px - 150px)); } }

/* ── パネル ── */
.panel { position: fixed; right: 0; top: 0; bottom: 0; z-index: 30; width: min(430px, 100%); overflow-y: auto; background: #fffdf8; box-shadow: -10px 0 40px rgba(30, 28, 40, 0.2); padding: 22px 20px 40px; animation: panelIn 0.28s ease-out; }
@keyframes panelIn { from { transform: translateX(30px); opacity: 0; } }
.panel h2 { font-size: 21px; font-weight: 900; }
.panel h2 small { font-size: 13px; color: var(--muted); font-weight: 700; margin-left: 6px; }
.panel h3 { font-size: 14px; font-weight: 900; margin: 20px 0 6px; padding-left: 9px; border-left: 4px solid var(--after); }
.panel .sub { font-size: 13.5px; line-height: 1.8; color: #4b4a55; margin-top: 6px; }
.panel ul { list-style: none; padding: 0; }
.panel li { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); }
.panel .row { flex: 1; display: flex; align-items: center; gap: 10px; padding: 9px 4px; text-align: left; min-width: 0; }
.panel .row:hover .t { color: #1f7a6f; }
.panel .row .ico { flex: none; width: 30px; font-size: 19px; text-align: center; }
.panel .row .t { font-size: 14px; font-weight: 700; line-height: 1.45; }
.panel .row small { display: flex; gap: 4px; align-items: center; font-size: 11px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.star { flex: none; width: 38px; height: 38px; font-size: 20px; color: #c9c5b8; border-radius: 50%; }
.star.on { color: #e0a800; }
.chk { display: flex; gap: 8px; align-items: center; font-size: 13px; margin-top: 12px; padding: 9px 11px; border-radius: 10px; background: rgba(43, 42, 51, 0.05); cursor: pointer; }
.mine li { display: block; padding: 12px 0; }
.mineHead { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.mineHead b { flex: 1; line-height: 1.45; } .mineHead .ico { font-size: 20px; }
.tryline { font-size: 13.5px; line-height: 1.6; background: #fff7d6; border-radius: 10px; padding: 8px 10px; margin: 6px 0; font-weight: 700; }
.mineActs { display: flex; gap: 12px; align-items: center; font-size: 13px; }
.mineActs button { padding: 6px 12px; border-radius: 9px; background: var(--ink); color: #fff; font-weight: 700; }
.empty { margin: 30px 0; text-align: center; font-size: 14px; line-height: 1.9; color: var(--muted); }
.fine { font-size: 11.5px; color: var(--muted); margin-top: 18px; line-height: 1.7; }
.help dt { font-size: 14px; font-weight: 900; margin-top: 14px; }
.help dd { font-size: 13.5px; line-height: 1.75; color: #4b4a55; }
kbd { display: inline-block; min-width: 20px; padding: 0 5px; margin: 0 1px; border-radius: 5px; border: 1px solid var(--line); border-bottom-width: 2px; background: #fff; font: 700 11.5px ui-monospace, monospace; text-align: center; }

/* ── 歩くモード ── */
#joy { display: none; position: fixed; left: 22px; bottom: 200px; z-index: 11; width: 104px; height: 104px; border-radius: 50%; background: rgba(255, 253, 248, 0.5); border: 2px solid rgba(43, 42, 51, 0.25); touch-action: none; }
#joyKnob { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: var(--ink); opacity: 0.85; }
@media (pointer: coarse) { #joy { display: block; } }
.walkHint { position: fixed; left: 50%; top: 84px; transform: translateX(-50%); z-index: 8; background: rgba(43, 42, 51, 0.82); color: #fff; font-size: 12.5px; padding: 7px 14px; border-radius: 999px; white-space: nowrap; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; transition: opacity 1s; pointer-events: none; }
.walkHint.fade { opacity: 0; }
.tap { position: fixed; z-index: 6; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 3px solid #fff; pointer-events: none; animation: tap 0.6s ease-out forwards; }
@keyframes tap { from { transform: scale(0.3); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }

/* ── 探し物チャレンジ ── */
.game { position: fixed; left: 50%; top: 82px; transform: translateX(-50%); z-index: 13; width: min(460px, calc(100% - 24px)); background: var(--panel); border-radius: 18px; box-shadow: var(--shadow); padding: 12px 14px 14px; border-top: 5px solid var(--accent); }
.gHead { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.gHead b { font-weight: 900; } .gMode { font-size: 12px; color: #fff; background: var(--accent); padding: 2px 8px; border-radius: 8px; }
.gHead button { margin-left: auto; width: 28px; height: 28px; border-radius: 50%; background: rgba(43, 42, 51, 0.07); font-size: 17px; }
.gLead { font-size: 13.5px; margin: 6px 0 8px; }
.gRow { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.gTime { font-size: 30px; font-weight: 900; font-variant-numeric: tabular-nums; min-width: 64px; }
.gUnit { font-size: 13px; margin-right: 8px; }
.gRow i { font-style: normal; font-size: 13px; font-weight: 700; padding: 4px 9px; border-radius: 9px; background: rgba(43, 42, 51, 0.07); color: var(--muted); }
.gRow i.ok { background: var(--after); color: #fff; }
.gHint { margin-left: auto; padding: 5px 11px; border-radius: 9px; background: #fff7d6; border: 1px solid #f2c94c; font-size: 12.5px; font-weight: 700; }
.game.done { text-align: center; } .game.done .gHead { text-align: left; }
.gBig { font-size: 44px; font-weight: 900; line-height: 1.1; margin-top: 4px; color: var(--accent); }
.game.done p { font-size: 13.5px; line-height: 1.75; margin: 4px 0 10px; }
.gCmp b { font-size: 17px; }
.game.done button:not(.primary):not([data-act="endGame"]) { display: block; margin: 8px auto 0; font-size: 13px; text-decoration: underline; color: var(--muted); }
body.gaming .side, body.gaming .story, body.gaming .timebar, body.gaming .walkHint { opacity: 0.25; pointer-events: none; }
.ring { position: fixed; z-index: 7; width: 90px; height: 90px; margin: -45px 0 0 -45px; border-radius: 50%; border: 4px solid #f2c94c; pointer-events: none; animation: ring 0.85s ease-in-out 3; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25); }
@keyframes ring { 0%, 100% { transform: scale(1.5); opacity: 0.2; } 50% { transform: scale(0.8); opacity: 1; } }
.toast { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 40; background: var(--ink); color: #fff; font-size: 18px; font-weight: 900; padding: 12px 22px; border-radius: 999px; pointer-events: none; }
.toast.show { animation: toast 1.8s ease-out forwards; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, -30%) scale(0.8); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -70%); } }

/* ── はじめに ── */
.intro { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(246, 241, 231, 0.78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: opacity 0.6s; overflow-y: auto; }
.intro.out { opacity: 0; pointer-events: none; }
.introBox { width: min(540px, 100%); background: #fffdf8; border-radius: 26px; box-shadow: 0 20px 70px rgba(30, 28, 40, 0.25); padding: 30px 30px 24px; text-align: center; }
.kicker { font-size: 12.5px; font-weight: 900; color: var(--after); letter-spacing: 0.06em; }
.intro h2 { font-size: clamp(28px, 6.4vw, 40px); font-weight: 900; line-height: 1.25; margin: 6px 0 12px; text-wrap: balance; }
.intro h2 span { background: linear-gradient(90deg, var(--before) 0 46%, var(--after) 54% 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 15px; line-height: 1.85; }
.how { list-style: none; padding: 0; margin: 18px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: left; }
.how li { font-size: 12.5px; line-height: 1.55; background: var(--cream); border-radius: 12px; padding: 9px 11px; color: #4b4a55; }
.how b { display: block; font-size: 13.5px; font-weight: 900; color: var(--ink); }
.primary { display: inline-block; padding: 14px 34px; border-radius: 999px; background: var(--after); color: #fff; font-size: 17px; font-weight: 900; box-shadow: 0 6px 18px rgba(42, 157, 143, 0.4); transition: transform 0.15s; }
.primary:hover:not(:disabled) { transform: translateY(-2px); }
.primary:disabled { background: #b9b6ab; box-shadow: none; cursor: progress; }
.game .primary { font-size: 14.5px; padding: 11px 20px; }
.note { font-size: 11.5px; line-height: 1.75; color: var(--muted); margin-top: 16px; text-align: left; }
.nojs { position: fixed; inset: auto 0 0 0; z-index: 99; padding: 16px; background: #fff; }
body.loading .topbar, body.loading .side, body.loading .bottom { opacity: 0; }
.topbar, .side, .bottom { transition: opacity 0.5s; }

/* ── 中くらいの幅：上部のボタンはアイコンだけにして、切り替えスイッチと重ならないようにする ── */
@media (max-width: 1180px) and (min-width: 760px) {
  .tool span { display: none; }
  .brand p { display: none; }
  .modeSwitch { width: 280px; }
}

/* ── スマホ ── */
@media (max-width: 759px) {
  .topbar { flex-wrap: wrap; padding: 8px 8px 0; gap: 6px; }
  .brand { padding: 6px 10px 7px; border-radius: 12px; }
  .brand h1 { font-size: 13.5px; } .brand p { display: none; }
  .brand h1 span { display: none; }
  .topbar { justify-content: flex-start; } .tools { margin-left: auto; }
  .tools { gap: 5px; } .tool { height: 36px; padding: 0 10px; } .tool span { display: none; }
  .modeSwitch { position: relative; left: auto; top: auto; transform: none; order: 3; width: 100%; height: 46px; }
  .modeSwitch .opt { font-size: 13px; } .modeSwitch .opt b { font-size: 16px; }
  .side { left: 8px; top: 106px; width: auto; gap: 6px; }
  .viewSwitch, .rooms { padding: 4px; border-radius: 13px; }
  .side button { padding: 7px 8px; font-size: 12px; }
  .viewSwitch button span { display: none; } .viewSwitch { flex-direction: row; } .viewSwitch button { font-size: 17px; padding: 6px 9px; }
  .rooms button { padding: 5px 8px; }
  .bottom { bottom: max(8px, env(safe-area-inset-bottom)); width: calc(100% - 16px); gap: 6px; }
  .story { font-size: 12.5px; padding: 7px 11px; line-height: 1.5; }
  .story b { display: block; margin: 0; }
  .chips button { flex-direction: column; gap: 0; padding: 5px 2px; font-size: 11px; }
  .chips button span { display: none; } .chips button b { font-size: 15px; } .chips button small { font-size: 10.5px; }
  .sliderRow { gap: 8px; padding: 6px 4px 2px; } #clock { font-size: 16px; min-width: 46px; }
  .card { left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-height: 58%; border-radius: 22px 22px 0 0; padding: 16px 16px calc(14px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(30, 28, 40, 0.25); }
  body.has-card .bottom { opacity: 0; pointer-events: none; }
  body.has-card .bottom > * { pointer-events: none; }
  .card h3 { font-size: 16.5px; } .b p { font-size: 13.5px; }
  .pin .lbl { display: none; }
  .bubble { max-width: 200px; padding: 6px 10px 7px; } .bubble p { font-size: 12.5px; }
  .meter { width: 100%; gap: 6px; padding: 6px 9px; justify-content: space-between; } .meter b { display: none; } .meter ul { gap: 7px; width: 100%; justify-content: space-between; } .meter em { display: none; } .meter i { width: 38px; }
  .game { top: 104px; }
  .walkHint { top: 108px; left: 112px; right: 8px; transform: none; max-width: none; white-space: normal; border-radius: 12px; font-size: 11.5px; line-height: 1.5; }
  .introBox { padding: 22px 18px 18px; border-radius: 22px; } .lead { font-size: 13.5px; } .lead br { display: none; }
  .how { gap: 6px; margin: 14px 0; } .how li { font-size: 11.5px; padding: 8px 9px; } .how b { font-size: 12.5px; }
}
@media (max-height: 560px) and (min-width: 760px) { .side { top: 76px; } .rooms button { padding: 4px 10px; } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
