/* 掛川の街3D。マルシャンタウン3D の作り(カード・丸ボタン)を掛川の色(藍・白・茶)で */
:root {
  --ai: #1f3a5f; --ai2: #2e5585; --cha: #966432; --paper: #fbf8ef; --ink: #22252b; --line: #d8d2c2;
  --ok: #2f8f4e; --ng: #c0392b; --r: 12px;
  font-family: system-ui, -apple-system, "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #a9c8e6; color: var(--ink); -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
input, select { font: inherit; }
[hidden] { display: none !important; }
#world { position: fixed; inset: 0; touch-action: none; }
#world canvas { display: block; width: 100%; height: 100%; }

.loading { position: fixed; inset: 0; display: grid; place-items: center; background: linear-gradient(#1f3a5f, #2e5585); z-index: 50; color: #fff; }
.loading-card { text-align: center; }
.loading-card h1 { font-size: 30px; letter-spacing: .1em; margin: 0 0 12px; }
.loading .bar { width: 220px; height: 4px; background: rgba(255,255,255,.25); border-radius: 2px; overflow: hidden; margin: 16px auto; }
.loading .bar i { display: block; width: 40%; height: 100%; background: #fff; animation: load 1.2s infinite ease-in-out; }
@keyframes load { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
.closed-card { background: var(--paper); color: var(--ink); padding: 28px 36px; border-radius: var(--r); text-align: center; }

.hud-top { position: fixed; top: 8px; left: 8px; right: 8px; display: flex; align-items: center; gap: 10px; pointer-events: none; z-index: 10; }
.hud-top > * { pointer-events: auto; }
.title { background: var(--ai); color: #fff; padding: 6px 12px; border-radius: 999px; font-size: 14px; }
.compass { margin: 0 0 0 auto; width: 48px; height: 48px; border-radius: 50%; background: rgba(251,248,239,.92); border: 2px solid var(--ai); position: relative; }
.compass .dial { position: absolute; inset: 0; transform: rotate(var(--r, 0deg)); }
.compass .dial span { position: absolute; font-size: 10px; font-weight: 700; color: #555; line-height: 1; }
.compass .dial .n { top: 2px; left: 50%; transform: translateX(-50%); color: #c0392b; font-size: 12px; }
.compass .dial .s { bottom: 2px; left: 50%; transform: translateX(-50%); }
.compass .dial .e { right: 3px; top: 50%; transform: translateY(-50%); }
.compass .dial .w { left: 3px; top: 50%; transform: translateY(-50%); }
/* 自分の進む向き(画面に対して)。矢印は中心から上向きの三角 */
.compass .head { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: translate(-50%, -50%) rotate(var(--h, 0deg)); }
.compass .head::before { content: ''; position: absolute; left: -7px; top: -13px; border: 7px solid transparent; border-bottom: 14px solid var(--ai); border-top: 0; }
.compass .head::after { content: ''; position: absolute; left: -3px; top: 1px; width: 6px; height: 6px; border-radius: 50%; background: var(--ai); }
.heading { margin: 0 auto 0 0; background: rgba(251,248,239,.92); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 700; font-style: normal; color: var(--ai); white-space: nowrap; }
.heading:empty { display: none; }
.net { background: rgba(251,248,239,.92); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; display: flex; gap: 6px; align-items: center; font-size: 13px; margin-right: 150px; }
.net i { width: 8px; height: 8px; border-radius: 50%; background: #999; }
body[data-net="online"] .net i { background: #3bb15d; }
body[data-net="connecting"] .net i { background: #e8c547; }

.hud-left { position: fixed; left: 8px; top: 64px; display: flex; flex-direction: column; gap: 6px; z-index: 10; }
/* ボタンが増えた(2026-11-07 夜:観光マップ・エモート・買い物・ゲーム・まつり)ので、画面の高さに収まらなければ縦にスクロール */
.hud-left { max-height: calc(100vh - 80px); overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; padding-right: 2px; }
body.touch .hud-left { max-height: calc(100vh - 230px); }
.hud-left button { background: var(--ai); color: #fff; border: 0; border-radius: 10px; padding: 9px 12px; font-size: 14px; min-width: 112px; text-align: left; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.hud-left button:hover { background: var(--ai2); }
.hud-left .build { background: var(--cha); }
.bp-cat { font-size: 12px; color: #666; margin: 6px 0 2px; }
.hud-left .bgm { display: flex; gap: 4px; }
.hud-left .bgm button { min-width: 0; flex: 1; padding: 6px 6px; font-size: 12px; white-space: nowrap; background: #4a4f57; }
.hud-left .bgm button.off { background: #2a2c30; color: #aaa; }
.hud-left .bgm-title { max-width: 230px; color: #fff; font-size: 11px; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
body.riding .hud-left #btn-ride, body.armed .hud-left #btn-arms, body.battle .hud-left #btn-battle { outline: 3px solid #e8c547; }
.hud-left .learn { background: #2e7d4f; }
.hud-left .bosai { background: #c62828; }
body.hazard .hud-left #btn-bosai { outline: 3px solid #e8c547; }
/* 折りたたみのグループ(2026-11-07 深夜:あそぶ・めぐる・みんな・じぶん)。summary はボタンの見た目、中は少し内側で小さめ */
.hud-left .grp { min-width: 112px; }
.hud-left .grp > summary { list-style: none; cursor: pointer; user-select: none; background: #3d5a80; color: #fff; border-radius: 10px; padding: 9px 12px; font-size: 14px; box-shadow: 0 2px 6px rgba(0,0,0,.2); position: relative; }
.hud-left .grp > summary::-webkit-details-marker { display: none; }
.hud-left .grp > summary::after { content: '▸'; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 12px; opacity: .85; }
.hud-left .grp[open] > summary::after { content: '▾'; }
.hud-left .grp > summary:hover { background: var(--ai2); }
.hud-left .grp > summary i { font-style: normal; margin-right: 6px; }
.hud-left .grp > div { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 2px 10px; }
.hud-left .grp > div > button { padding: 7px 10px; font-size: 13px; min-width: 102px; }
body.riding .hud-left .grp.play > summary, body.armed .hud-left .grp.play > summary, body.battle .hud-left .grp.play > summary, body.festival .hud-left .grp.play > summary, body.emoting .hud-left .grp.play > summary { outline: 3px solid #e8c547; }
/* 投稿・掲示板・アート(2026-11-07) */
.hud-left .pair { display: flex; gap: 4px; }
.hud-left .pair button { min-width: 0; flex: 1; padding: 7px 6px; font-size: 12px; white-space: nowrap; background: #7a4a8c; }
.hud-left .art { background: #b8557a; }
.po-form label { display: block; font-size: 12px; color: #555; margin: 6px 0; }
.po-form input, .po-form textarea, .po-form select { display: block; width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; margin-top: 2px; font-size: 14px; }
.po-form textarea { resize: vertical; }
.po-row { display: flex; gap: 6px; }
.po-row label { flex: 1; }
.po-form .primary { width: 100%; }
.bp-note { font-size: 12px; color: #a0522d; margin: 4px 0; }
.bd-list { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; max-height: 50vh; overflow: auto; }
.bd-item { background: #fff; border-radius: 8px; padding: 6px 9px; font-size: 13px; }
.bd-item.bd-re { margin-left: 18px; background: #f3f0e6; border-left: 3px solid var(--line); }
.bd-meta { display: flex; gap: 8px; align-items: baseline; font-size: 12px; color: #666; }
.bd-meta b { color: var(--ai); font-size: 13px; }
.bd-meta i { font-style: normal; background: #e8eef6; border-radius: 999px; padding: 0 6px; font-size: 10px; }
.bd-body { white-space: pre-wrap; word-break: break-word; margin: 2px 0; }
.bd-btns { display: flex; gap: 6px; }
.bd-btns button { border: 0; background: none; color: var(--ai2); font-size: 12px; padding: 2px 4px; }
.bd-btns .bd-rep { color: #b00; }
.bd-reto { font-size: 12px; color: #666; background: #eef2f7; border-radius: 8px; padding: 4px 8px; margin-bottom: 4px; }
.bd-reto button { border: 0; background: none; color: var(--ai2); font-size: 12px; }
.po-mine .ic-sub { margin-top: 10px; }
.lb-post { background: #7a4a8c; color: #fff; font-weight: 700; }
.ic-kind.user { background: #7a4a8c; }
.ic-report { border: 1px solid #b00 !important; color: #b00 !important; margin-left: auto; }
.sp-list button.user { border-left: 3px solid #7a4a8c; }
.person-card { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); width: min(300px, calc(100vw - 24px)); background: var(--paper); border-radius: var(--r); box-shadow: 0 6px 24px rgba(0,0,0,.3); padding: 10px 12px; z-index: 14; border-top: 5px solid #7a4a8c; }
.pc-head { display: flex; justify-content: space-between; align-items: center; }
.pc-head b { font-size: 16px; color: var(--ai); }
.pc-head button { border: 0; background: none; font-size: 22px; line-height: 1; }
.chat-hint { background: rgba(122,74,140,.92); color: #fff; border-radius: 8px; padding: 4px 10px; font-size: 12px; margin-bottom: 4px; }
.board-hint { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); z-index: 12; border: 0; border-radius: 999px; background: #5e3d27; color: #fff; padding: 10px 18px; font-size: 15px; font-weight: 700; box-shadow: 0 3px 10px rgba(0,0,0,.35); }
body.touch .board-hint, body.touch .person-card { bottom: 190px; }
.ar-row { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin: 6px 0; font-size: 12px; }
.ar-row .primary { margin: 0 0 0 auto; }
.ar-pal { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin: 6px 0; }
.ar-pal .sw { aspect-ratio: 1; border: 2px solid #fff; border-radius: 6px; box-shadow: 0 0 0 1px var(--line); }
.ar-pal .sw.on { box-shadow: 0 0 0 3px var(--ai); }
.ar-cv { display: block; width: 100%; max-width: 320px; aspect-ratio: 1; margin: 6px auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; touch-action: none; cursor: crosshair; image-rendering: pixelated; }
.ar-title { display: block; font-size: 12px; color: #555; margin: 6px 0; }
.ar-title input { display: block; width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; margin-top: 2px; font-size: 14px; }
.ar-gal { display: flex; flex-direction: column; gap: 4px; max-height: 55vh; overflow: auto; }
.ar-item { display: grid; grid-template-columns: 48px 1fr auto; gap: 8px; align-items: center; background: #fff; border-radius: 8px; padding: 5px 8px; font-size: 13px; }
.ar-item small { display: block; color: #777; font-size: 11px; }
.ar-item button { border: 1px solid var(--ai); color: var(--ai); background: #fff; border-radius: 6px; padding: 4px 8px; font-size: 12px; }
.ar-thumb { width: 48px; height: 48px; border-radius: 4px; border: 1px solid var(--line); image-rendering: pixelated; }

/* アカウント(任意)。入口の画面(welcome)より上に出す */
/* ようこそ画面のアカウントの帯(登録ずみの人のログインを上に出す。2026-11-08) */
.welcome-acc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 8px 0 4px; padding: 8px 10px; border: 1px solid #1f3a5f; border-radius: 10px; background: #f3f6fb; color: #1f3a5f; font-size: 13px; }
.welcome-acc[hidden] { display: none; }
.welcome-acc span { flex: 1 1 200px; line-height: 1.5; }
.welcome-acc button { padding: 7px 12px; border-radius: 9px; border: 1px solid #1f3a5f; background: #fff; color: #1f3a5f; font-size: 13px; }
.welcome-acc button.acc-login { background: #1f3a5f; color: #fff; font-weight: 700; }
.welcome.returning:not(.pick) .looks-head, .welcome.returning:not(.pick) .looks, .welcome.pick .looks-me { display: none; }
.looks-me { display: flex; align-items: center; gap: 10px; margin: 6px 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 13px; }
.looks-me[hidden] { display: none; }
.looks-me img { width: 56px; aspect-ratio: 176 / 216; object-fit: contain; }
.looks-me span { flex: 1; }
.acc-link { display: block; width: 100%; margin: 8px 0; padding: 8px 10px; border: 1px dashed #1f3a5f; border-radius: 10px; background: #f3f6fb; color: #1f3a5f; font-size: 13px; text-align: left; }
.acc-foot { border: 0; background: rgba(255,255,255,.75); border-radius: 999px; width: 26px; height: 26px; font-size: 15px; line-height: 1; padding: 0; margin-right: 6px; }
.account { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.account-card { width: 100%; max-width: 380px; max-height: calc(100vh - 32px); overflow: auto; background: var(--paper, #fff); color: #222; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.35); padding: 14px 16px; border-top: 5px solid #1f3a5f; }
.account-card p { margin: 6px 0; font-size: 14px; }
.account-card .acc-note { font-size: 12.5px; color: #555; }
.account-card label { display: block; margin: 8px 0; font-size: 13px; }
.account-card input { display: block; width: 100%; box-sizing: border-box; margin-top: 3px; padding: 9px 10px; border: 1px solid #aab; border-radius: 8px; font-size: 16px; background: #fff; }
.account-card .acc-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.account-card .acc-row button { padding: 9px 14px; border-radius: 9px; border: 1px solid #1f3a5f; background: #fff; color: #1f3a5f; font-size: 14px; }
.account-card .acc-row button.primary { background: #1f3a5f; color: #fff; }
.account-card .acc-row button.danger { border-color: #b03030; color: #b03030; }
.account-card .acc-msg { min-height: 1.3em; font-size: 13px; color: #b03030; }
.side-panel { position: fixed; left: 136px; top: 64px; width: min(360px, calc(100vw - 150px)); max-height: calc(100vh - 120px); overflow: auto; background: var(--paper); border-radius: var(--r); box-shadow: 0 6px 24px rgba(0,0,0,.25); padding: 12px; z-index: 12; }
.sp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sp-head button, .bp-x { border: 0; background: none; font-size: 22px; line-height: 1; }
.sp-spots { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.sp-spots button, .chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 10px; font-size: 13px; }
.chip.on { background: var(--ai); color: #fff; border-color: var(--ai); }
#move-q, .sp-ll input, .bp-text { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.sp-list { display: flex; flex-direction: column; gap: 2px; margin: 8px 0; max-height: 50vh; overflow: auto; }
.sp-list button { text-align: left; border: 0; background: #fff; padding: 7px 9px; border-radius: 6px; }
.sp-list button:hover { background: #eef2f7; }
.sp-list small { display: block; color: #777; font-size: 11px; }
.sp-ll { display: flex; gap: 6px; }
.sp-ll button { white-space: nowrap; border: 0; background: var(--ai); color: #fff; border-radius: 8px; padding: 0 12px; }
.sp-hint, .bp-hint { color: #666; font-size: 12px; margin: 6px 0; }

.build-panel { position: fixed; right: 8px; top: 64px; width: min(380px, calc(100vw - 16px)); max-height: calc(100vh - 140px); overflow: auto; background: var(--paper); border-radius: var(--r); box-shadow: 0 6px 24px rgba(0,0,0,.25); padding: 10px; z-index: 12; border-top: 5px solid var(--cha); }
.bp-head { display: flex; align-items: center; gap: 8px; }
.bp-quota { font-size: 11px; color: #555; flex: 1; }
.bp-note { font-size: 12px; color: #a0522d; margin: 4px 0; }
.bp-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
.bp-tabs button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 5px 8px; font-size: 13px; }
.bp-tabs button.on { background: var(--cha); color: #fff; border-color: var(--cha); }
.bp-row, .bp-grid { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.bp-slider { display: grid; grid-template-columns: 70px 1fr 52px; align-items: center; gap: 6px; font-size: 12px; margin: 4px 0; }
.bp-sel { display: flex; gap: 8px; align-items: center; font-size: 13px; margin: 6px 0; }
.bp-colors { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin: 6px 0; }
.bp-colors .sw { aspect-ratio: 1; border: 2px solid #fff; border-radius: 6px; box-shadow: 0 0 0 1px var(--line); }
.bp-colors .sw.on { box-shadow: 0 0 0 2px var(--ai); }
.bp-list { display: flex; flex-direction: column; gap: 4px; }
.bp-item { background: #fff; border-radius: 8px; padding: 6px 8px; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 13px; }
.bp-item small { grid-column: 1; color: #777; font-size: 11px; }
.bp-item button, .bp-item em { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 12px; }
.bp-item button { border: 1px solid var(--ai); color: var(--ai); background: #fff; border-radius: 6px; padding: 4px 8px; }
.bp-item em { color: #999; }
.bp-desc { font-size: 13px; }
.bp-status { margin-top: 8px; font-size: 12px; background: #fff; border-radius: 8px; padding: 6px 8px; color: #444; }
.primary { background: var(--ai); color: #fff; border: 0; border-radius: 10px; padding: 9px 14px; font-size: 14px; margin: 6px 0; }
.build-panel .primary { background: var(--cha); }

.minimap { position: fixed; right: 8px; top: 8px; width: 140px; height: 140px; border-radius: 12px; border: 3px solid var(--ai); background: #ddd center / cover no-repeat; z-index: 11; overflow: hidden; cursor: pointer; }
.minimap i, .cm-img i { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #e0302a; border: 2px solid #fff; }
.minimap { background-size: 100% 100%; background-repeat: no-repeat; background-color: #cfd8c4; }
.minimap i { left: 50%; top: 50%; transform: rotate(var(--h, 0deg)); }
.minimap i::after { content: ''; position: absolute; left: 50%; top: -9px; margin-left: -4px; border: 4px solid transparent; border-bottom: 7px solid #e0302a; border-top: 0; }
body.building .minimap { display: none; }
.citymap { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: grid; place-items: center; z-index: 30; }
.cm-card { background: var(--paper); padding: 10px; border-radius: var(--r); position: relative; max-height: 92vh; }
.cm-card > button { position: absolute; right: 6px; top: 4px; border: 0; background: none; font-size: 24px; z-index: 2; }
.cm-img { position: relative; }
.cm-img img { display: block; max-height: calc(92vh - 20px); max-width: 90vw; cursor: crosshair; }

.chat { position: fixed; left: 8px; bottom: 34px; width: min(340px, calc(100vw - 16px)); z-index: 10; }
.chat-log { max-height: 160px; overflow: auto; font-size: 13px; display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
.chat-row { background: rgba(251,248,239,.85); border-radius: 8px; padding: 3px 8px; align-self: flex-start; }
.chat-row.mine { background: rgba(214,228,245,.9); }
.chat-row.sys { color: #666; font-size: 12px; }
.chat-report { border: 0; background: none; color: #b00; font-size: 12px; }
.chat form { display: flex; gap: 4px; }
.chat input { flex: 1; padding: 7px 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.95); }
.chat form button { border: 0; background: var(--ai); color: #fff; border-radius: 999px; padding: 0 12px; }

.stick, .jump, .fly-ctl, .build-touch { display: none; }
body.touch .stick { display: block; position: fixed; left: 24px; bottom: 40px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.3); border: 2px solid rgba(255,255,255,.7); z-index: 9; touch-action: none; }
body.touch .stick i { position: absolute; left: 35px; top: 35px; width: 50px; height: 50px; border-radius: 50%; background: rgba(31,58,95,.8); }
body.touch .jump { display: block; position: fixed; right: 24px; bottom: 50px; width: 72px; height: 72px; border-radius: 50%; border: 0; background: rgba(31,58,95,.8); color: #fff; z-index: 9; }
body.touch.flying .fly-ctl, body.touch.riding .fly-ctl { display: flex; flex-direction: column; gap: 8px; position: fixed; right: 110px; bottom: 50px; z-index: 9; }
.fly-ctl button { width: 56px; height: 56px; border-radius: 50%; border: 0; background: rgba(31,58,95,.8); color: #fff; font-size: 20px; }
body.touch.building .build-touch { display: grid; grid-template-columns: repeat(3, 56px); gap: 6px; position: fixed; right: 12px; bottom: 140px; z-index: 13; }
body.touch.building .jump { display: none; }
.build-touch button { width: 56px; height: 56px; border-radius: 12px; border: 0; background: var(--cha); color: #fff; font-size: 13px; }
body.touch.building .build-panel { max-height: 45vh; top: auto; bottom: 8px; right: 200px; width: min(380px, calc(100vw - 210px)); }
body.touch.building .chat { display: none; }

.hud-foot .bright, .hud-foot .lantern { display: inline-flex; align-items: center; gap: 3px; cursor: pointer; }
.hud-foot .bright input, .hud-foot .lantern input { width: 74px; height: 12px; margin: 0; accent-color: #c9a227; cursor: pointer; }
.hud-foot .lantern { display: none; }
.hud-foot .lantern input { accent-color: #e8402a; }
body.night .hud-foot .lantern { display: inline-flex; }
body.compact .hud-foot .bright input, body.compact .hud-foot .lantern input { width: 52px; }
.hud-foot { position: fixed; right: 8px; bottom: 6px; display: flex; gap: 10px; font-size: 11px; color: #222; background: rgba(251,248,239,.8); border-radius: 6px; padding: 2px 8px; z-index: 9; }
.toasts { position: fixed; left: 50%; top: 84px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; z-index: 40; pointer-events: none; }
.toast { background: rgba(31,58,95,.95); color: #fff; padding: 8px 14px; border-radius: 10px; font-size: 14px; transition: opacity .5s; }
.toast.error { background: rgba(192,57,43,.95); }
.toast.out { opacity: 0; }

.notice, .welcome { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; place-items: center; z-index: 45; padding: 16px; }
.notice-card, .welcome-card { background: var(--paper); border-radius: var(--r); padding: 18px 20px; max-width: 460px; width: 100%; box-shadow: 0 10px 30px rgba(0,0,0,.3); max-height: 92vh; overflow: auto; }
.notice-card button { margin-top: 8px; }
.welcome-card h1 { font-size: 20px; margin: 0 0 8px; color: var(--ai); }
.welcome-card p { font-size: 13px; line-height: 1.6; }
.welcome-card label { display: block; margin: 8px 0; font-size: 14px; }
.welcome-card input[name="name"] { display: block; width: 100%; padding: 8px 10px; margin-top: 4px; border: 1px solid var(--line); border-radius: 8px; }
.looks { display: flex; gap: 8px; }
.looks label { border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; background: #fff; }
.welcome-card .primary { width: 100%; font-size: 16px; padding: 12px; }
.welcome-card .how, .welcome-card .credit { color: #666; font-size: 12px; }
.compat-notice { position: fixed; inset: 0; display: grid; place-items: center; background: #1f3a5f; z-index: 100; color: #fff; padding: 20px; }
@media (max-height: 520px) {
  .hud-left { top: 54px; gap: 4px; }
  .hud-left button { padding: 6px 10px; font-size: 12px; min-width: 96px; }
  .minimap { width: 100px; height: 100px; }
  .chat-log { max-height: 90px; }
}

/* いまいる場所(ミニ地図の下) */
.here { position: fixed; right: 8px; top: 154px; width: 140px; z-index: 11; background: rgba(251,248,239,.94); border: 2px solid var(--ai); border-radius: 10px; padding: 4px 7px; font-size: 12px; line-height: 1.35; pointer-events: none; }
.here b { display: block; color: var(--ai); font-size: 13px; }
.here small { display: block; color: #666; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.here small:empty { display: none; }
body.building .here { display: none; }
body.aerial .here { border-color: var(--cha); }

/* 上空ビューの「あなた」の目印(画面の外なら端に寄せて矢印) */
.me-mark { position: fixed; left: 0; top: 0; z-index: 9; border: 3px solid #fff; border-radius: 16px; padding: 4px 12px 4px 8px; background: #e0302a; color: #fff; font-size: 15px; font-weight: 700; animation: me-pulse 1.6s ease-in-out infinite; white-space: nowrap; box-shadow: 0 1px 5px rgba(0,0,0,.45); cursor: pointer; }
.me-mark::after { content: ''; position: absolute; left: 50%; bottom: -9px; margin-left: -7px; border: 7px solid transparent; border-bottom: 0; border-top-color: #e0302a; }
.me-mark i { display: none; font-style: normal; margin-right: 4px; transform: rotate(var(--a, 0)); }
.me-mark b::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 50%; background: #fff; vertical-align: 1px; }
.me-mark.off b::before { display: none; }
.me-mark.off { opacity: .92; animation: none; }
@keyframes me-pulse { 50% { box-shadow: 0 0 0 6px rgba(224,48,42,.35), 0 1px 5px rgba(0,0,0,.45); } }
.me-mark.off::after { display: none; }
.me-mark.off i { display: inline-block; }

/* 上空ビューの地名・施設名 */
.labels { position: fixed; inset: 0; pointer-events: none; z-index: 8; overflow: hidden; }
.lb { position: absolute; left: 0; top: 0; pointer-events: auto; border: 0; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; border-radius: 6px; padding: 2px 6px; font-size: 12px; background: rgba(255,255,255,.88); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.lb:hover { outline: 2px solid var(--ai); z-index: 2; }
.lb-zone { font-size: 18px; font-weight: 700; background: none; box-shadow: none; color: #fff; text-shadow: 0 0 4px #1f3a5f, 0 0 2px #1f3a5f, 0 1px 3px #000; }
.lb-place { font-size: 15px; font-weight: 700; background: none; box-shadow: none; color: #fff; text-shadow: 0 0 3px #3a2a10, 0 0 2px #3a2a10, 0 1px 2px #000; }
.lb-ev { background: #c0392b; color: #fff; font-weight: 700; }
.lb-big { background: var(--ai); color: #fff; font-weight: 700; }
.lb-sight { background: #fff5dc; color: #6b4210; }
.lb-pub { background: #e8eef6; color: #1f3a5f; }
.lb-food { background: #fde8e0; color: #8a2d12; }
.lb-shop { background: #fff; color: #333; }
.lb-water { background: none; box-shadow: none; color: #0d4f8b; font-style: italic; text-shadow: 0 0 3px #fff, 0 0 2px #fff; }
.lb-bus { background: #f0f0f0; color: #555; font-size: 11px; }

/* 詳細カード(施設・イベント) */
.info-card { position: fixed; right: 8px; top: 216px; width: min(360px, calc(100vw - 16px)); max-height: calc(100vh - 260px); overflow: auto; background: var(--paper); border-radius: var(--r); box-shadow: 0 6px 24px rgba(0,0,0,.3); padding: 12px 14px; z-index: 14; border-top: 5px solid var(--ai); }
.ic-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.ic-head h2 { font-size: 18px; margin: 2px 0; color: var(--ai); }
.ic-head > button { border: 0; background: none; font-size: 24px; line-height: 1; }
.ic-kind { display: inline-block; font-size: 11px; background: var(--ai); color: #fff; border-radius: 999px; padding: 1px 8px; }
.ic-kind.ev { background: #c0392b; }
.ic-kana { color: #888; font-size: 11px; }
.info-card dl { display: grid; grid-template-columns: 76px 1fr; gap: 4px 8px; font-size: 13px; margin: 10px 0; }
.info-card dt { color: #777; }
.info-card dd { margin: 0; word-break: break-word; }
.info-card dd small { color: #888; margin-left: 4px; }
.info-card a { color: var(--ai2); }
.ic-link { border: 0; background: none; padding: 0; color: var(--ai2); text-decoration: underline; font-size: 13px; }
.ic-sub { font-size: 12px; color: #666; margin-top: 6px; }
.ic-btns { display: flex; gap: 8px; align-items: center; }
.ic-btns button:not(.primary) { border: 1px solid var(--ai); color: var(--ai); background: #fff; border-radius: 10px; padding: 8px 12px; }
.ic-credit { font-size: 11px; color: #888; margin: 8px 0 0; }

/* 検索・一覧 */
.sp-q { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.sp-chips { margin-top: 8px; }
.sp-check { display: block; font-size: 13px; margin: 6px 0; }
.sp-row { display: flex; gap: 2px; }
.sp-row > button:first-child { flex: 1; }
.sp-i { width: 30px; border: 0; background: #eef2f7; border-radius: 6px; color: var(--ai); font-weight: 700; font-family: Georgia, serif; }
.sp-list button.ev { border-left: 3px solid #c0392b; }
.sp-list button.now { background: #fff1ee; }

body.aerial .jump { display: none; }
@media (max-height: 520px) {
  .here { top: 112px; width: 100px; font-size: 11px; }
  .here b { font-size: 12px; }
  .info-card { top: auto; bottom: 8px; max-height: 70vh; }
}
@media (max-width: 640px) {
  .info-card { top: auto; bottom: 8px; max-height: 60vh; }
}
.sp-spots button.primary { background: var(--ai); color: #fff; border-color: var(--ai); padding: 8px 14px; }

/* 乗り物・武器・バトル・学び(2026-11-07) */
.fire, .dismount { display: none; }
body.touch.armed .fire { display: block; position: fixed; right: 24px; bottom: 140px; width: 72px; height: 72px; border-radius: 50%; border: 0; background: rgba(192,40,40,.85); color: #fff; font-weight: 700; z-index: 9; }
body.touch.riding .dismount { display: block; position: fixed; right: 110px; bottom: 180px; padding: 8px 12px; border-radius: 999px; border: 0; background: rgba(31,58,95,.8); color: #fff; z-index: 9; }
body.touch.riding .jump { display: none; }
.battle-hud { position: fixed; left: 50%; top: 8px; transform: translateX(-50%); z-index: 10; background: rgba(20,24,30,.78); color: #fff; border-radius: 10px; padding: 6px 10px; min-width: 220px; font-size: 13px; }
.bh-hp { position: relative; height: 14px; background: #3a3f48; border-radius: 7px; overflow: hidden; }
.bh-hp i { display: block; height: 100%; background: linear-gradient(90deg, #e0473a, #5fd16f); transition: width .2s; }
.bh-hp span { position: absolute; inset: 0; text-align: center; font-size: 11px; line-height: 14px; font-weight: 700; text-shadow: 0 1px 2px #000; }
.bh-row { display: flex; gap: 12px; justify-content: center; margin-top: 4px; }
body.hurt #world::after { content: ''; position: fixed; inset: 0; background: rgba(220,40,40,.28); pointer-events: none; z-index: 7; }
.crosshair { display: none; position: fixed; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 2px solid rgba(255,255,255,.9); border-radius: 50%; box-shadow: 0 0 3px #000; pointer-events: none; z-index: 8; }
body.armed .crosshair { display: block; }
.ln-table { border-collapse: collapse; font-size: 12px; margin: 6px 0; width: 100%; }
.ln-table th, .ln-table td { border-bottom: 1px solid var(--line); padding: 3px 6px; text-align: left; }
.ln-legend { font-size: 11px; line-height: 1.9; margin: 6px 0; }
.ln-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin: 0 4px 0 8px; vertical-align: -2px; border: 1px solid rgba(0,0,0,.2); }
.ln-here b { color: #c0392b; }
.learn-card { position: fixed; left: 50%; bottom: 56px; transform: translateX(-50%); width: min(560px, calc(100vw - 24px)); max-height: 46vh; overflow: auto; background: var(--paper); border-radius: var(--r); box-shadow: 0 6px 24px rgba(0,0,0,.3); padding: 12px 14px; z-index: 13; border-top: 5px solid #2e7d4f; font-size: 14px; line-height: 1.6; }
.lc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.lc-head b { font-size: 16px; }
.lc-head span { color: #666; font-size: 12px; }
.lc-ask { background: #eef5ef; border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
.lc-choices { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.lc-choices button, .lc-btns button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.lc-btns { display: flex; gap: 6px; margin-top: 8px; }
.lc-btns .primary, .sp-spots .primary { background: var(--ai); color: #fff; border-color: var(--ai); }
.lc-score b { font-size: 24px; color: #c0392b; }
body.touch .learn-card { bottom: 130px; max-height: 38vh; }

/* 観光マップ(2026-11-07) */
.hud-left .kankou { background: #c0702a; }
.kk-count { margin: 2px 0 8px; font-size: 14px; }
.kk-count b { font-size: 20px; color: #c0392b; }
.kk-count small { display: block; color: #666; font-size: 11px; }
.kk-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.15); }
.sp-list button.kk-row.done { background: #f1f7ec; }
.sp-list button.kk-row.done small { color: #2e7d4f; }
.kk-go { width: 44px; font-family: inherit; font-size: 12px; font-weight: 400; }
.kk-src { font-size: 11px; }
/* エモートのパネル(ui/emote.js):3 段の絵文字ボタン・数字キーの段・いっしょに踊る */
.em-row { margin: 6px 0 10px; }
.em-label { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.em-label small { color: #777; font-size: 11px; flex: 1; }
.em-keyrow { border: 1px solid var(--line); background: #fff; border-radius: 6px; font-size: 11px; padding: 1px 6px; color: #666; }
.em-keyrow.on { background: var(--ai); color: #fff; border-color: var(--ai); }
.em-btns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.em-btn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 2px 4px; font-size: 11px; line-height: 1.1; }
.em-btn.on { background: var(--ai); color: #fff; border-color: var(--ai); }
.em-btn i { position: absolute; left: 4px; top: 3px; font-style: normal; font-size: 10px; color: #999; }
.em-btn.on i { color: #dde; }
.em-emoji { font-size: 22px; }
.em-join { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.em-with { background: #fff4d6; border-color: #e8c547; text-align: left; }
.em-foot { display: flex; align-items: center; gap: 8px; }
.em-foot .sp-hint { margin: 0; }
body.emoting .hud-left #btn-emote { outline: 3px solid #e8c547; }
/* 買い物・もちもの(2026-11-07) */
.hud-left .shop { background: #1f8f4e; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.hud-left .shop .coin { font-style: normal; background: rgba(255,255,255,.2); border-radius: 999px; padding: 1px 7px; font-size: 12px; white-space: nowrap; }
.shop-hint { position: fixed; left: 50%; bottom: 166px; transform: translateX(-50%); z-index: 12; border: 0; border-radius: 999px; background: #1f8f4e; color: #fff; padding: 10px 18px; font-size: 15px; font-weight: 700; box-shadow: 0 3px 10px rgba(0,0,0,.35); }
body.touch .shop-hint { bottom: 236px; }
.sh-coin { margin-left: auto; margin-right: 8px; font-weight: 700; color: var(--cha); font-size: 14px; }
.sh-h { font-size: 15px; margin: 10px 0 4px; color: var(--ai); }
.sh-h small { display: block; font-weight: 400; color: #777; font-size: 11px; }
.sh-desc { display: block; color: #888; font-size: 11px; }
.sh-buy, .sh-use { border: 1px solid var(--ai); color: var(--ai); background: #fff; border-radius: 6px; padding: 3px 8px; font-size: 12px; white-space: nowrap; }
.sh-use { border-color: #1f8f4e; color: #1f8f4e; }
.sh-buy:disabled { opacity: .4; cursor: default; }
.sh-near { display: flex; flex-direction: column; gap: 2px; margin: 6px 0; }
.sh-near button { display: flex; gap: 6px; align-items: center; text-align: left; border: 0; background: #fff; padding: 6px 9px; border-radius: 6px; font-size: 13px; }
.sh-near button span { color: #777; font-size: 11px; flex: 1; }
.sh-near button em { font-style: normal; color: var(--ai2); font-size: 12px; }
.sh-how { font-size: 12px; color: #555; padding-left: 18px; margin: 4px 0; line-height: 1.7; }
.sh-how b { color: #1f8f4e; }
/* ゲーム・体験(オービー・茶摘み・タイムアタック) */
.hud-left .games { background: #c0672e; }
.game-hud { position: fixed; left: 50%; top: 64px; transform: translateX(-50%); z-index: 11; display: flex; align-items: center; gap: 10px; background: rgba(20,24,30,.8); color: #fff; border-radius: 10px; padding: 6px 12px; font-size: 13px; }
.game-hud em { font-style: normal; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.game-hud button { border: 0; background: #4a4f57; color: #fff; border-radius: 999px; padding: 4px 10px; font-size: 12px; }
body.gaming .toasts { top: 112px; }
.gm-list { display: flex; flex-direction: column; gap: 8px; }
.gm-item { background: #fff; border-radius: 8px; padding: 8px 10px; }
.gm-item small { display: block; color: #666; font-size: 12px; margin: 2px 0 4px; }
.gm-rec { font-size: 12px; color: #c0392b; margin-bottom: 4px; }
.gm-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.gm-btns button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 10px; font-size: 13px; margin: 0; }
.gm-btns .primary { background: var(--ai); color: #fff; border-color: var(--ai); }
/* まつり(掛川祭の屋台・遠州横須賀の祢里。2026-11-07) */
.hud-left #btn-festival { background: #b8302a; }
body.festival .hud-left #btn-festival { outline: 3px solid #e8c547; }
.fs-card { background: #fff; border-radius: 8px; padding: 8px 10px; margin: 6px 0; font-size: 13px; }
.fs-card b { color: var(--ai); font-size: 15px; }
.fs-card small { display: block; color: #666; font-size: 11px; margin: 2px 0 4px; }
.fs-card p { margin: 4px 0; line-height: 1.5; }
.fs-card .fs-src { color: #888; font-size: 11px; }
.fs-btns { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.fs-btns button:not(.primary) { border: 1px solid var(--ai); color: var(--ai); background: #fff; border-radius: 10px; padding: 8px 12px; }
.fs-btns .primary { background: #b8302a; margin: 0; }
.festival-hint { bottom: 170px; background: #b8302a; }
.enter-hint { bottom: 216px; background: #b07a1a; }
.vehicle-hint { bottom: 262px; background: #1f5f9f; }
body.touch .vehicle-hint { bottom: 332px; }
body.touch .enter-hint { bottom: 286px; }
body.touch .festival-hint { bottom: 240px; }

/* ===== スマホ(body.compact:タッチ、または幅 760 px 未満・高さ 520 px 未満。2026-11-07 夜) =====
   左の列は ☰ メニューに畳み、上には「☰ メニュー・移動・目線・会話」だけ。パネル・詳細カード・会話は下から出るシート。街を触ると閉じる */
.quick, .menu-head, .net2, .bp-min { display: none; }
.hud-left button i { font-style: normal; margin-right: 6px; }
body.compact .title, body.compact .hud-top .net { display: none; }
body.compact .hud-top { right: 116px; gap: 6px; }
body.compact .compass { width: 40px; height: 40px; }
body.compact .compass .head::before { left: -6px; top: -11px; border-width: 6px; border-bottom-width: 12px; }
body.compact .heading { font-size: 12px; padding: 3px 8px; }
body.compact .quick { display: flex; gap: 6px; position: fixed; left: 8px; top: 56px; z-index: 10; }
body.compact .quick button { position: relative; display: flex; align-items: center; gap: 4px; border: 0; border-radius: 999px; background: rgba(31,58,95,.92); color: #fff; padding: 0 12px; height: 40px; font-size: 13px; font-weight: 700; box-shadow: 0 2px 6px rgba(0,0,0,.25); white-space: nowrap; }
body.compact .quick button i { font-style: normal; font-size: 16px; }
body.compact .quick #menu-btn { background: var(--cha); }
body.compact.menu-open .quick #menu-btn { background: var(--ai2); }
body.compact .quick [data-n]::after { content: attr(data-n); position: absolute; right: -4px; top: -4px; background: #e0302a; color: #fff; border-radius: 999px; font-size: 10px; min-width: 18px; height: 18px; line-height: 18px; text-align: center; padding: 0 3px; }
/* 左の列 → 下からのシート(3 列の格子。絵文字 + 名前) */
body.compact .hud-left { display: none; }
body.compact.menu-open .hud-left { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; top: auto; max-height: min(72vh, 540px); max-height: min(72dvh, 540px); overflow-y: auto; padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); background: var(--paper); border-radius: 16px 16px 0 0; box-shadow: 0 -6px 24px rgba(0,0,0,.3); z-index: 15; overscroll-behavior: contain; }
body.compact .hud-left .menu-head { display: flex; align-items: center; gap: 8px; grid-column: 1 / -1; }
body.compact .hud-left .menu-head b { font-size: 16px; color: var(--ai); flex: 1; }
body.compact .hud-left .menu-head .coin { font-style: normal; background: #fff4d6; border: 1px solid #e8c547; border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 700; }
body.compact .hud-left .menu-head button { border: 0; background: none; font-size: 28px; line-height: 1; padding: 0 6px; box-shadow: none; min-width: 0; color: var(--ink); }
body.compact .hud-left > button, body.compact .hud-left .pair button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; min-height: 66px; padding: 8px 4px; text-align: center; font-size: 12px; line-height: 1.2; border-radius: 12px; }
body.compact .hud-left > button i, body.compact .hud-left .pair button i { font-size: 22px; margin: 0; }
body.compact .hud-left .pair { display: contents; }
body.compact .hud-left .grp { grid-column: 1 / -1; }
body.compact .hud-left .grp > summary { padding: 10px 12px; font-size: 14px; border-radius: 12px; }
body.compact .hud-left .grp > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 2px; }
body.compact .hud-left .grp > div > button, body.compact .hud-left .grp .pair button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; min-height: 66px; padding: 8px 4px; text-align: center; font-size: 12px; line-height: 1.2; border-radius: 12px; }
body.compact .hud-left .grp > div > button i, body.compact .hud-left .grp .pair button i { font-size: 22px; margin: 0; }
@media (min-width: 600px) { body.compact .hud-left .grp > div { grid-template-columns: repeat(5, 1fr); } }
/* 横持ち(幅 600 px 以上)は 5 列で低く */
@media (min-width: 600px) { body.compact.menu-open .hud-left { grid-template-columns: repeat(5, 1fr); max-height: min(80vh, 540px); max-height: min(80dvh, 540px); } body.compact .hud-left > button, body.compact .hud-left .pair button { min-height: 56px; padding: 6px 4px; } body.compact .hud-left > button i, body.compact .hud-left .pair button i { font-size: 20px; } }
body.compact .hud-left .shop .coin { font-size: 11px; padding: 0 6px; }
body.compact .hud-left .bgm { grid-column: 1 / -1; display: flex; gap: 6px; }
body.compact .hud-left .bgm button { min-height: 42px; font-size: 13px; }
body.compact .hud-left .bgm-title { grid-column: 1 / -1; max-width: none; color: #666; text-shadow: none; }
body.compact .hud-left .net2 { display: flex; flex-direction: row; justify-content: flex-start; gap: 8px; grid-column: 1 / -1; min-height: 44px; background: #fff; color: var(--ink); border: 1px solid var(--line); font-size: 13px; text-align: left; padding: 6px 12px; }
body.compact .hud-left .net2:hover { background: #fff; }
.net2 i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #999; margin: 0; }
body[data-net="online"] .net2 i { background: #3bb15d; }
body[data-net="connecting"] .net2 i { background: #e8c547; }
/* パネル・詳細カード・名札のカード → 下からのシート */
body.compact .side-panel, body.compact .info-card, body.compact .person-card { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: min(60vh, 540px); max-height: min(60dvh, 540px); border-radius: 16px 16px 0 0; padding: 8px 14px calc(12px + env(safe-area-inset-bottom)); transform: none; box-shadow: 0 -6px 24px rgba(0,0,0,.3); overscroll-behavior: contain; }
body.compact .side-panel { z-index: 15; }
body.compact .info-card, body.compact .person-card { z-index: 16; }
body.compact .side-panel::before, body.compact .info-card::before, body.compact .person-card::before { content: ''; display: block; width: 40px; height: 4px; border-radius: 2px; background: #ccc; margin: 0 auto 8px; }
body.compact .sp-list, body.compact .bd-list, body.compact .ar-gal { max-height: none; }
body.compact .sp-list button, body.compact .sh-near button { padding: 10px 10px; font-size: 14px; }
body.compact .sp-spots button, body.compact .chip, body.compact .gm-btns button, body.compact .lc-choices button, body.compact .lc-btns button { padding: 8px 12px; font-size: 14px; }
body.compact .sp-head button, body.compact .ic-head > button { font-size: 30px; padding: 0 6px; }
body.compact .sp-i { width: 40px; }
body.compact .kk-go { width: 52px; }
body.compact .sh-buy, body.compact .sh-use, body.compact .bp-item button, body.compact .ar-item button { padding: 7px 10px; font-size: 13px; }
body.compact .em-btn { min-height: 60px; }
/* 文字入力は 16 px 以上(iOS が勝手に拡大しないように) */
body.compact #move-q, body.compact .sp-q, body.compact .sp-ll input, body.compact .chat input, body.compact .po-form input, body.compact .po-form textarea, body.compact .po-form select, body.compact .bp-text, body.compact .ar-title input { font-size: 16px; }
body.compact .learn-card { left: 8px; right: 8px; width: auto; transform: none; }
/* 会話 → 💬 で下から出るシート(閉じている間の発言は 💬 に件数) */
body.compact .chat { display: none; }
body.compact.chat-open .chat { display: block; left: 0; right: 0; bottom: 0; width: auto; z-index: 15; background: var(--paper); border-radius: 16px 16px 0 0; padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 24px rgba(0,0,0,.3); }
body.compact.chat-open .chat-log { max-height: 32vh; }
/* 右上の地図・住所・知らせ・バトルとゲームの表示 */
body.compact .minimap { width: 100px; height: 100px; }
body.compact .here { top: 112px; width: 100px; font-size: 11px; padding: 3px 6px; }
body.compact .here b { font-size: 12px; }
body.compact .toasts { top: 104px; left: 8px; right: 8px; transform: none; align-items: flex-start; }
body.compact .toast { font-size: 13px; padding: 7px 12px; }
body.compact .battle-hud, body.compact .game-hud { top: 104px; left: 8px; transform: none; min-width: 0; }
body.compact.armed .toasts, body.compact.battle .toasts, body.compact.gaming .toasts { top: 160px; }
body.compact .board-hint, body.compact .shop-hint, body.compact .festival-hint, body.compact .enter-hint, body.compact .vehicle-hint { font-size: 14px; padding: 9px 16px; }
body.compact .hud-foot { font-size: 10px; padding: 1px 6px; right: auto; left: 50%; transform: translateX(-50%); }
body.compact .hud-foot #attribution { display: none; }
/* つくる:板は下からのシート。「▾」で頭だけにしてスティックで歩ける。タッチのボタンは板のすぐ上 */
body.compact .bp-min { display: inline-block; }
body.compact.building .build-panel { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 42vh; max-height: 42dvh; border-radius: 16px 16px 0 0; padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); }
body.compact.building .build-panel.min > :not(.bp-head) { display: none; }
body.compact.building .build-touch { right: 8px; bottom: calc(42vh + 10px); bottom: calc(42dvh + 10px); grid-template-columns: repeat(5, 52px); gap: 5px; }
body.compact.building .build-touch button { width: 52px; height: 52px; font-size: 12px; }
body.compact.building .build-panel.min ~ .build-touch { bottom: 70px; }
body.compact.building .chat, body.compact.building .quick, body.compact.building .here { display: none; }

/* オープニング(intro.js)。黒い帯 + 字幕 + とばす。HUD は body.intro で隠す */
.intro { position: fixed; inset: 0; z-index: 44; pointer-events: auto; cursor: pointer; animation: intro-in 1.2s ease-out; }
@keyframes intro-in { from { background: #000; } to { background: transparent; } }
.intro .bars::before, .intro .bars::after { content: ''; position: absolute; left: 0; right: 0; height: 11vh; background: #0b0f14; }
.intro .bars::before { top: 0; } .intro .bars::after { bottom: 0; }
.intro .caps { position: absolute; left: 0; right: 0; bottom: 16vh; text-align: center; padding: 0 16px; }
.intro .caps h1, .intro .caps p { position: absolute; left: 0; right: 0; margin: 0; opacity: 0; transform: translateY(8px); transition: opacity .7s ease, transform .7s ease; pointer-events: none; }
.intro .caps h1 { bottom: 56px; font-size: clamp(38px, 8vw, 76px); letter-spacing: .16em; color: #fff; font-weight: 700; transition: opacity .4s ease; }
.intro .caps h1 span { display: inline-block; opacity: 0; transform: translateY(26px) scale(1.5); filter: blur(6px); background: linear-gradient(180deg, #fff8e0 0%, #ffd766 45%, #c9871a 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; text-shadow: none; }
.intro .caps h1.on span { animation: intro-letter .8s cubic-bezier(.2,.9,.3,1.2) forwards; animation-delay: calc(var(--j) * .11s); }
@keyframes intro-letter { to { opacity: 1; transform: none; filter: blur(0); } }
.intro .caps h1::before { content: ''; position: absolute; left: 50%; top: 50%; width: 140%; height: 220%; transform: translate(-50%, -50%); background: radial-gradient(ellipse at center, rgba(255,214,110,.35), rgba(255,214,110,0) 60%); z-index: -1; pointer-events: none; }
.intro .caps h1 small { display: block; margin-top: 10px; font-size: clamp(11px, 1.6vw, 16px); letter-spacing: .5em; color: #fff3cc; font-weight: 400; text-shadow: 0 1px 8px rgba(0,0,0,.7); opacity: 0; transition: opacity .9s ease 1s; }
.intro .caps h1.on small { opacity: 1; }
.intro .rays { position: absolute; inset: -30%; background: conic-gradient(from 0deg at 50% 50%, rgba(255,235,170,0) 0deg, rgba(255,235,170,.16) 8deg, rgba(255,235,170,0) 16deg, rgba(255,235,170,0) 40deg, rgba(255,235,170,.12) 48deg, rgba(255,235,170,0) 58deg, rgba(255,235,170,0) 90deg, rgba(255,235,170,.14) 100deg, rgba(255,235,170,0) 112deg, rgba(255,235,170,0) 150deg, rgba(255,235,170,.1) 158deg, rgba(255,235,170,0) 170deg, rgba(255,235,170,0) 220deg, rgba(255,235,170,.13) 230deg, rgba(255,235,170,0) 242deg, rgba(255,235,170,0) 300deg, rgba(255,235,170,.1) 310deg, rgba(255,235,170,0) 322deg, rgba(255,235,170,0) 360deg); animation: intro-rays 30s linear infinite; mix-blend-mode: screen; pointer-events: none; opacity: .9; }
@keyframes intro-rays { to { transform: rotate(360deg); } }
.intro canvas.fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.intro .vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(0,0,0,.45) 100%); pointer-events: none; }
.intro.landed .bars::before, .intro.landed .bars::after { transition: height .9s ease; height: 0; }
.intro .caps p { bottom: 0; font-size: clamp(16px, 2.6vw, 24px); letter-spacing: .08em; color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,.7), 0 0 2px rgba(0,0,0,.9); line-height: 1.7; }
.intro .caps .on { opacity: 1; transform: none; }
.intro .skip { position: absolute; right: 16px; bottom: calc(11vh + 12px); background: rgba(251,248,239,.9); color: var(--ai); border: 0; border-radius: 999px; padding: 8px 14px; font-size: 14px; cursor: pointer; }
body.intro .hud-top, body.intro .quick, body.intro .hud-left, body.intro .minimap, body.intro .here, body.intro .hud-foot, body.intro .me-mark, body.intro .stick, body.intro .jump, body.intro .fly-ctl, body.intro #chat, body.intro .toasts { visibility: hidden; }

/* 目あてと称号(story.js)。上の中央の札と一覧の板 */
.story { position: fixed; left: 50%; top: 44px; transform: translateX(-50%); z-index: 11; display: flex; align-items: center; gap: 8px; background: rgba(251,248,239,.94); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px 5px 6px; font-size: 13px; cursor: pointer; max-width: 46vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.story b { background: var(--cha); color: #fff; border-radius: 999px; padding: 2px 8px; font-size: 12px; }
.story-card { position: fixed; left: 50%; top: 84px; transform: translateX(-50%); z-index: 46; width: min(440px, 92vw); background: var(--paper); border-radius: var(--r); box-shadow: 0 10px 30px rgba(0,0,0,.3); padding: 12px 14px; font-size: 13px; max-height: 80vh; overflow: auto; }
.story-card .story-head { display: flex; justify-content: space-between; align-items: center; }
.story-card .story-head button { border: 0; background: transparent; font-size: 18px; cursor: pointer; }
.story-card ol { padding-left: 20px; margin: 8px 0; }
.story-card li { margin: 4px 0; }
.story-card li.done { color: #6a7a6a; }
.story-card li small { display: block; color: #666; font-size: 11px; }
.story-card .row button { background: var(--ai); color: #fff; border: 0; border-radius: 8px; padding: 8px 12px; cursor: pointer; }
body.compact .story { top: 100px; left: 8px; transform: none; max-width: calc(100vw - 16px); font-size: 12px; }
body.compact .story-card { top: 136px; }
body.compact .toasts { top: 136px; }
body.intro .story, body.aerial .story { visibility: hidden; }
.welcome-card .welcome-intro { font-size: 13px; }

/* 防災の体験(2026-11-07 夜):水深の目盛り、水の中のカメラの青み */
.lc-meter-row { margin: 6px 0 2px; font-size: 13px; }
.lc-meter-row b { font-size: 18px; color: #1d3f8a; }
.lc-meter { height: 10px; background: #e3e6ea; border-radius: 5px; overflow: hidden; }
.lc-meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #8cc0ec, #1d3f8a); transition: width .3s; }
.ln-legend small { color: #666; margin-right: 2px; }
body.underwater::after { content: ''; position: fixed; inset: 0; background: rgba(18, 56, 100, .42); pointer-events: none; z-index: 5; }

/* キャラクター(2026-11-07 夜):ようこそ画面の 10 人の札、きせかえ画面、オープニングの仲間の帯 */
.welcome-card.welcome-wide { max-width: 720px; }
.looks-head { display: flex; justify-content: space-between; align-items: center; margin: 10px 0 6px; font-size: 14px; }
.looks { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.looks .cast-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0; padding: 6px 4px 8px; border: 2px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; text-align: center; transition: transform .15s, border-color .15s, box-shadow .15s; }
.looks .cast-card input { position: absolute; opacity: 0; pointer-events: none; }
.looks .cast-card img, .looks .cast-card i { width: 100%; aspect-ratio: 176 / 216; object-fit: contain; display: block; background: radial-gradient(ellipse at 50% 85%, rgba(31,58,95,.12), rgba(31,58,95,0) 60%); border-radius: 8px; }
.looks .cast-card b { font-size: 12px; line-height: 1.25; color: var(--ai); }
.looks .cast-card b small { display: inline-block; font-size: 10px; margin-right: 3px; color: #c9a227; font-weight: 700; }
.looks .cast-card span { font-size: 10px; color: #666; line-height: 1.3; }
.looks .cast-card:hover { transform: translateY(-2px); }
.looks .cast-card.on { border-color: var(--ai); box-shadow: 0 0 0 3px rgba(31,95,168,.18); background: #f3f8ff; }
body.compact .looks { grid-template-columns: repeat(3, 1fr); }
body.compact .looks .cast-card span { display: none; }
.look-editor { position: fixed; inset: 0; z-index: 47; background: rgba(0,0,0,.5); display: grid; place-items: center; padding: 12px; }
.le-card { background: var(--paper); border-radius: var(--r); box-shadow: 0 10px 30px rgba(0,0,0,.35); width: min(860px, 100%); max-height: 94vh; max-height: 94dvh; display: flex; flex-direction: column; overflow: hidden; }
.le-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.le-head b { font-size: 16px; color: var(--ai); flex: 1; }
.le-coin { background: #fff3cc; border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.le-x { border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; }
.le-body { display: grid; grid-template-columns: 280px 1fr; gap: 12px; padding: 12px 14px; overflow: auto; }
.le-left { display: flex; flex-direction: column; gap: 8px; }
.le-stage { width: 260px; height: 320px; border-radius: 12px; background: radial-gradient(ellipse at 50% 90%, rgba(31,58,95,.16), rgba(31,58,95,0) 60%), linear-gradient(180deg, #e9f2fb, #f7f3e8); cursor: grab; overflow: hidden; }
.le-stage canvas { display: block; }
.le-poses { display: flex; flex-wrap: wrap; gap: 4px; }
.le-poses .chip { font-size: 12px; padding: 4px 8px; }
.le-presets b { display: block; font-size: 12px; margin: 4px 0; }
.le-pre { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.lk-pre { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 4px 6px; font-size: 11px; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk-pre.on { background: var(--ai); color: #fff; border-color: var(--ai); }
.le-tabs { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.le-tabs button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.le-tabs button.on { background: var(--ai); color: #fff; border-color: var(--ai); }
.lk-row { margin-bottom: 8px; }
.lk-row > b { display: block; font-size: 12px; color: #555; margin-bottom: 3px; }
.lk-items { display: flex; flex-wrap: wrap; gap: 4px; }
.lk-opt { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 5px 9px; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.lk-opt em { font-style: normal; font-size: 10px; background: #fff3cc; border-radius: 999px; padding: 1px 5px; color: #7a5a00; }
.lk-opt.locked { background: #f6f3ea; color: #666; }
.lk-opt.on { background: var(--ai); color: #fff; border-color: var(--ai); }
.lk-opt.on em { background: rgba(255,255,255,.9); }
.lk-sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); background: var(--c); padding: 0; cursor: pointer; }
.lk-sw.on { box-shadow: 0 0 0 2px var(--ai); transform: scale(1.1); }
.le-hint { font-size: 11px; color: #666; margin: 8px 0 0; line-height: 1.5; }
.le-foot { display: flex; gap: 6px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.le-sp { flex: 1; }
.le-ok { background: var(--ai); color: #fff; border: 0; border-radius: 10px; padding: 10px 16px; font-size: 14px; cursor: pointer; }
body.compact .le-body { grid-template-columns: 1fr; }
body.compact .le-left { flex-direction: row; flex-wrap: wrap; }
body.compact .le-stage { width: 150px; height: 190px; }
body.compact .le-presets { flex: 1; min-width: 150px; }
body.compact .le-pre { grid-template-columns: 1fr; }
body.compact .le-poses { width: 100%; }
/* オープニングの仲間の帯(題名のあいだ) */
.intro .cast { position: absolute; left: 0; right: 0; bottom: calc(11vh + 4px); display: flex; justify-content: center; align-items: flex-end; gap: 2px; pointer-events: none; padding: 0 8px; }
.intro .cast img { width: clamp(44px, 9vw, 110px); aspect-ratio: 176 / 216; object-fit: contain; opacity: 0; transform: translateY(60px) scale(.4) rotate(-12deg); filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
.intro.strip .cast img { animation: intro-cast-in .55s cubic-bezier(.2,1.2,.3,1) forwards, intro-cast-bob 1.1s ease-in-out .55s infinite alternate; animation-delay: calc(var(--j) * .08s), calc(.55s + var(--j) * .08s); }
@keyframes intro-cast-in { to { opacity: 1; transform: none; } }
@keyframes intro-cast-bob { from { translate: 0 0; } to { translate: 0 -10px; } }
.intro .caps p { bottom: clamp(60px, 13vw, 130px); }
.intro.strip .caps h1 { bottom: clamp(110px, 20vw, 190px); }

/* ---- 📖 掛川ガイドブック・観光案内所・道案内・空から見る(2026-11-08。web/src/guide/) ---- */
.guide { position: fixed; inset: 0; z-index: 30; background: rgba(20,24,32,.45); display: flex; align-items: center; justify-content: center; padding: 12px; }
.guide[hidden] { display: none; }
.gb-card { width: min(980px, 100%); height: min(760px, calc(100vh - 24px)); height: min(760px, calc(100dvh - 24px)); background: var(--paper); color: var(--ink); border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.4); display: flex; flex-direction: column; overflow: hidden; border-top: 6px solid #1f5fa8; }
.gb-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 6px; }
.gb-head b { font-size: 18px; flex: 1; }
.gb-head button { border: 0; background: #ece6d6; border-radius: 999px; padding: 6px 12px; font-size: 14px; }
.gb-head [data-close] { font-size: 20px; padding: 2px 12px; }
.gb-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 12px 8px; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.gb-tabs button { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 14px; white-space: nowrap; }
.gb-tabs button i { font-style: normal; margin-right: 4px; }
.gb-tabs button.on { background: #1f5fa8; color: #fff; border-color: #1f5fa8; }
.gb-body { flex: 1; overflow-y: auto; padding: 12px 14px 20px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.gb-body h3 { font-size: 15px; margin: 16px 0 8px; border-left: 5px solid #1f5fa8; padding-left: 8px; }
.gb-body h4 { font-size: 14px; margin: 14px 0 6px; }
.gb-wait { text-align: center; color: #777; padding: 40px 0; }
.gb-note { font-size: 13px; color: #555; line-height: 1.6; }
.gb-src { font-size: 11px; color: #888; margin-top: 14px; line-height: 1.5; }
.gb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.gb-grid.one { grid-template-columns: minmax(0, 340px); }
.gb-tile { display: flex; flex-direction: column; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 0 0 8px; overflow: hidden; font-size: 14px; position: relative; cursor: pointer; color: var(--ink); }
.gb-tile:hover { box-shadow: 0 3px 10px rgba(0,0,0,.15); }
.gb-tile b { padding: 6px 8px 0; line-height: 1.35; }
.gb-tile small { padding: 2px 8px 0; color: #666; font-size: 12px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gb-tile em { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.6); color: #fff; font-style: normal; font-size: 11px; padding: 2px 7px; border-radius: 999px; }
.gb-img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #dfe6ec; }
.gb-img.big { border-radius: 12px; max-height: 360px; }
.gb-ph { display: flex; align-items: center; justify-content: center; background: var(--c); background-image: linear-gradient(135deg, rgba(255,255,255,0), rgba(255,255,255,.35)); }
.gb-ph i { font-style: normal; font-size: 34px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); color: #fff; }
.gb-pam { border-top: 5px solid var(--c); }
.gb-more { grid-column: 1 / -1; border: 1px dashed var(--line); background: #fff; border-radius: 10px; padding: 10px; }
.gb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.gb-chips .chip.on { background: #1f5fa8; color: #fff; border-color: #1f5fa8; }
.gb-q { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: 16px; }
.gb-count { font-size: 12px; color: #777; margin: 6px 0; }
.gb-kiosk { display: flex; gap: 12px; align-items: center; background: #e8f0fa; border-radius: 12px; padding: 10px; }
.gb-kiosk .gb-face { width: 96px; flex: none; aspect-ratio: 1; border-radius: 50%; }
.gb-kiosk small { color: #1f5fa8; font-weight: 700; }
.gb-kiosk p { margin: 4px 0; line-height: 1.6; }
.gb-first { display: block; width: 100%; margin: 10px 0 0; border: 0; border-radius: 12px; padding: 12px; font-size: 15px; font-weight: 700; color: #fff; background: linear-gradient(90deg, #1f5fa8, #2a9d8f); animation: gbPulse 1.6s ease-in-out infinite; }
@keyframes gbPulse { 50% { filter: brightness(1.15); } }
.gb-rows { display: grid; gap: 6px; }
.gb-row { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; }
.gb-row span { flex: 1; font-size: 14px; }
.gb-row small { display: block; color: #777; font-size: 12px; }
.gb-row button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 10px; }
.gb-btns { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.gb-btns button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 12px; font-size: 14px; color: var(--ink); }
.gb-btns button.primary { background: #1f5fa8; color: #fff; border-color: #1f5fa8; margin: 0; }
.gb-entry h2 { margin: 12px 0 2px; font-size: 22px; }
.gb-sub { color: #666; font-size: 13px; margin: 0 0 8px; }
.gb-lead { font-size: 16px; font-weight: 700; margin: 6px 0; }
.gb-story { background: #fff; border-left: 4px solid #2e7d4f; border-radius: 8px; padding: 8px 12px; margin: 10px 0; line-height: 1.7; }
.gb-story small { color: #2e7d4f; font-weight: 700; }
.gb-story p { margin: 4px 0 0; }
.gb-lines p { background: #fff; border-radius: 12px; padding: 8px 12px; margin: 6px 0; border: 1px solid var(--line); line-height: 1.6; }
.gp-cover { position: relative; }
.gp-cover .gb-img.big { max-height: 420px; }
.gp-title { position: absolute; left: 0; right: 0; bottom: 0; color: #fff; padding: 40px 16px 14px; border-radius: 0 0 12px 12px; background: linear-gradient(transparent, rgba(0,0,0,.72)); }
.gp-title small { opacity: .9; }
.gp-title h2 { margin: 2px 0 4px; font-size: 26px; }
.gp-title p { margin: 0 0 4px; line-height: 1.6; }
.gp-title em { font-style: normal; background: var(--c); padding: 2px 10px; border-radius: 999px; font-size: 13px; }
.gp-stops { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 14px; }
.gp-stops li { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 12px; background: #fff; border-radius: 12px; padding: 10px; border: 1px solid var(--line); break-inside: avoid; }
.gp-stops .gb-img { border-radius: 8px; }
.gp-stops h3 { border: 0; padding: 0; margin: 0 0 6px; font-size: 17px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gp-stops h3 span { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; background: var(--c); color: #fff; align-items: center; justify-content: center; font-size: 14px; flex: none; }
.gp-stops h3 small { font-size: 12px; background: #eee; border-radius: 999px; padding: 1px 8px; font-weight: 400; }
.gp-stops p { margin: 0; line-height: 1.7; font-size: 14px; }
.gp-foot { margin-top: 16px; }
.gm-wrap { display: grid; grid-template-columns: 200px 1fr; gap: 14px; }
.gm-toc { display: flex; flex-direction: column; gap: 4px; }
.gm-toc button { text-align: left; border: 0; background: transparent; border-radius: 8px; padding: 7px 8px; font-size: 14px; color: var(--ink); }
.gm-toc button i { font-style: normal; margin-right: 6px; }
.gm-toc button.on { background: #1f5fa8; color: #fff; }
.gm-page h2 { margin: 10px 0 8px; }
.gm-page p { line-height: 1.8; margin: 6px 0; }
.gm-keys { border-collapse: collapse; margin: 12px 0 0; width: 100%; max-width: 560px; font-size: 14px; }
.gm-keys caption { text-align: left; font-weight: 700; padding: 4px 0; }
.gm-keys th, .gm-keys td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; background: #fff; }
.gm-keys th { width: 42%; background: #f1ece0; }
.gv-main video { width: 100%; max-height: 480px; background: #000; border-radius: 12px; }
.gv-main b { display: block; margin-top: 6px; font-size: 16px; }
.kiosk-hint { bottom: 168px; background: #1f5fa8; }
body.touch .kiosk-hint { bottom: 238px; }
body.compact .kiosk-hint { font-size: 14px; padding: 9px 16px; }
.guide-nav { position: fixed; top: 56px; left: 50%; transform: translateX(-50%); z-index: 11; display: flex; align-items: center; gap: 8px; background: rgba(31,58,95,.92); color: #fff; border-radius: 999px; padding: 6px 8px 6px 12px; box-shadow: 0 3px 10px rgba(0,0,0,.3); font-size: 14px; max-width: calc(100vw - 24px); }
.guide-nav[hidden] { display: none; }
.guide-nav b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guide-nav i { font-style: normal; display: inline-block; color: #ffd650; font-size: 18px; transition: transform .25s; }
.guide-nav button { border: 0; background: rgba(255,255,255,.2); color: #fff; border-radius: 999px; padding: 2px 9px; }
body.compact .guide-nav { top: 104px; }
.guide-cine { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; pointer-events: none; padding: 0 16px calc(18px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0,0,0,.6)); color: #fff; }
.guide-cine[hidden] { display: none; }
.gc-cap { max-width: 720px; }
.gc-cap small { opacity: .85; }
.gc-cap b { display: block; font-size: 24px; margin: 2px 0; text-shadow: 0 2px 6px rgba(0,0,0,.5); }
.gc-cap p { margin: 0 0 8px; line-height: 1.6; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.gc-bar { height: 3px; background: rgba(255,255,255,.3); border-radius: 2px; }
.gc-bar i { display: block; height: 100%; width: 0; background: #ffd650; border-radius: 2px; }
.guide-cine button { pointer-events: auto; position: fixed; top: 60px; right: 12px; border: 0; border-radius: 999px; padding: 8px 14px; background: rgba(0,0,0,.6); color: #fff; font-size: 14px; }
body.guide-cine .hud-left, body.guide-cine .side-panel, body.guide-cine .quick, body.guide-cine .minimap, body.guide-cine .here, body.guide-cine .story, body.guide-cine .board-hint, body.guide-cine .labels, body.guide-cine .stick, body.guide-cine .jump, body.guide-cine .me-mark, body.guide-cine .guide-nav { display: none !important; }
#hud-left button.guide-btn { background: #1f5fa8; color: #fff; }
#hud-left button.guide-btn.new, #quick button.new { animation: gbPulse 1.4s ease-in-out infinite; box-shadow: 0 0 0 3px #ffd650; }
/* 撮影(pipeline/guide/capture.mjs):画面の飾りを全部隠す */
body.guide-shot > *:not(#world) { display: none !important; }
body.compact .gb-card { height: 100%; border-radius: 14px; }
body.compact .guide { padding: 6px; padding-top: max(6px, env(safe-area-inset-top)); }
@media (max-width: 640px) {
  .gb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .gm-wrap { grid-template-columns: 1fr; }
  .gm-toc { flex-direction: row; overflow-x: auto; }
  .gm-toc button { flex: none; white-space: nowrap; }
  .gp-stops li { grid-template-columns: 1fr; }
  .gp-title h2 { font-size: 20px; }
  .gb-kiosk .gb-face { width: 72px; }
}
@media print {
  body.guide-printing > *:not(#guide) { display: none !important; }
  body.guide-printing .guide { position: static; background: none; padding: 0; display: block; }
  body.guide-printing .gb-card { height: auto; box-shadow: none; border: 0; display: block; }
  body.guide-printing .gb-head, body.guide-printing .gb-tabs, body.guide-printing .gb-btns { display: none !important; }
  body.guide-printing .gb-body { overflow: visible; }
  body.guide-printing .gp-stops li { grid-template-columns: 220px 1fr; }
}
