:root {
  --ink: #f3ead8;
  --ink-dim: rgba(243, 234, 216, .68);
  --glass: rgba(24, 16, 10, .32);          /* 菜单底色：更透，靠后面的模糊和文字投影保证看得清 */
  --line: rgba(243, 234, 216, .22);
  --gold: #d9a441;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b0806; color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", "Hiragino Sans", "Yu Gothic", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
canvas { position: fixed; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#stage { transition: filter .35s ease; }
body.fish-open #stage { filter: blur(7px) brightness(.62); }
#closeup { pointer-events: none; opacity: 0; transition: opacity .3s ease; }
body.fish-open #closeup { pointer-events: auto; opacity: 1; cursor: pointer; }
body.fish-open #hint { opacity: 0 !important; }

.pill { position: fixed; display: flex; align-items: center; gap: 10px; padding: 8px 14px;
  background: var(--glass); border: 1px solid var(--line); border-radius: 999px;
  backdrop-filter: blur(14px) saturate(1.15); -webkit-backdrop-filter: blur(14px) saturate(1.15);
  text-shadow: 0 1px 2px rgba(12, 7, 3, .6); }
#top-left { top: 14px; left: 14px; font-size: 14px; }
#top-left .temple { font-weight: 600; letter-spacing: .12em; }
#top-left .hall { color: var(--ink-dim); font-size: 12px; }
#top-right { top: 14px; right: 14px; gap: 6px; padding: 5px 6px; }
button { font: inherit; color: var(--ink); background: transparent; border: 0; cursor: pointer; }
#top-right button { font-size: 12px; padding: 6px 10px; border-radius: 999px; }
#top-right button:hover { background: rgba(243, 234, 216, .12); }
#btn-sound[aria-pressed="true"] { color: var(--gold); }

#name-tag { position: fixed; left: 0; top: 0; transform: translate(-50%, -100%); pointer-events: none;
  display: flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; letter-spacing: .14em;
  font-family: "Songti SC", "STSong", "Noto Serif SC", "Noto Serif CJK SC", Georgia, serif;
  color: var(--ink); text-shadow: 0 0 3px rgba(16, 9, 4, .95), 0 1px 2px rgba(16, 9, 4, .85), 0 0 8px rgba(16, 9, 4, .5);
  opacity: 0; transition: opacity .3s; }                     /* 头顶法号：不要底板，宋体字加深色描边，前面一枚小朱印 */
#name-tag b { display: grid; place-items: center; min-width: 17px; height: 17px; padding: 0 3px; box-sizing: border-box; border-radius: 3px;
  background: #b3261a; color: #fbe9d0; font-size: 10px; font-weight: 500; letter-spacing: 0; text-shadow: none; font-family: inherit;
  box-shadow: inset 0 0 0 1px rgba(251, 233, 208, .4), 0 1px 3px rgba(0, 0, 0, .45); }

#hint { position: fixed; bottom: calc(max(18px, env(safe-area-inset-bottom)) + 84px); left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--ink-dim);
  text-shadow: 0 1px 3px #000; pointer-events: none; transition: opacity .6s; text-align: center; width: max-content; max-width: 92vw; }

#actions { bottom: max(18px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); gap: 2px; padding: 6px; }
#actions button { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 66px; padding: 7px 0 6px;
  font-size: 12px; border-radius: 999px; transition: background .2s; }
#actions .ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; color: #e6c98a; }
#actions button.on .ic { color: var(--gold); }
#actions button:hover { background: rgba(243, 234, 216, .1); }
#actions button.on { background: rgba(217, 164, 65, .22); box-shadow: inset 0 0 0 1px rgba(217, 164, 65, .55); }

#progress { position: fixed; bottom: calc(max(18px, env(safe-area-inset-bottom)) + 76px); left: 50%; transform: translateX(-50%);
  width: min(300px, 70vw); font-size: 12px; color: var(--ink-dim); text-shadow: 0 1px 3px #000; }
.bar { height: 4px; margin-top: 5px; border-radius: 4px; background: rgba(243, 234, 216, .2); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .5s ease; }

#fish-panel { position: fixed; bottom: calc(max(18px, env(safe-area-inset-bottom)) + 78px); left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px; }
#fish-panel[hidden], #progress[hidden] { display: none; }
#fish-count { display: flex; align-items: baseline; gap: 6px; text-shadow: 0 2px 8px #000; }
#fish-count b { font-size: 34px; font-weight: 300; font-variant-numeric: tabular-nums; }
#fish-count small { font-size: 12px; color: var(--ink-dim); }
#fish-panel .row { display: flex; gap: 2px; padding: 4px; background: var(--glass); border: 1px solid var(--line);
  border-radius: 999px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
#fish-panel .row button { padding: 7px 16px; font-size: 13px; border-radius: 999px; }
#fish-panel .row button.on { background: rgba(217, 164, 65, .25); color: var(--gold); }
#bead-lap { font-size: 13px; color: var(--gold); text-shadow: 0 1px 4px #000; min-height: 18px; }
#bead-lap[hidden] { display: none; }
#toast { position: fixed; top: 22%; left: 50%; transform: translateX(-50%); padding: 8px 18px; font-size: 14px; letter-spacing: .1em; color: var(--ink);
  background: var(--glass); border: 1px solid var(--line); border-radius: 999px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transition: opacity .5s; pointer-events: none; }
#fish-panel .tip { font-size: 12px; color: var(--ink-dim); text-shadow: 0 1px 3px #000; }

#loading { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; background: radial-gradient(ellipse at 50% 40%, #2a1b10, #0b0806 70%); transition: opacity .8s ease; }
#loading.done { opacity: 0; pointer-events: none; }
.load-title { font-size: 34px; letter-spacing: .5em; text-indent: .5em; font-weight: 300; }
.load-sub { font-size: 13px; color: var(--ink-dim); }
#loading .bar { width: 180px; }
#loading .bar i { width: 38% !important; border-radius: 4px; animation: flow 1.6s ease-in-out infinite alternate; }
#loading .bar.det i { animation: none; transition: width .3s ease; }
#loading.failed .bar { visibility: hidden; }
#load-msg { max-width: 300px; padding: 0 20px; font-size: 14px; line-height: 1.7; text-align: center; color: var(--ink); }
#load-retry { padding: 9px 30px; border: 1px solid var(--gold); border-radius: 20px; background: rgba(0, 0, 0, .25); color: var(--gold); font-size: 15px; }
#load-diag { position: absolute; left: 0; right: 0; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 0 12px; font-size: 10px; line-height: 1.5; text-align: center; color: var(--ink-dim); opacity: .55; word-break: break-all; }
@keyframes flow { from { transform: translateX(-10%); } to { transform: translateX(175%); } }

@media (max-width: 520px) {
  #actions button { width: 54px; font-size: 11px; }
  #actions { gap: 0; }
  #actions { padding: 5px; }
  #top-left .hall { display: none; }
}
#room { color: var(--gold); font-size: 12px; }
#room:empty { display: none; }
.peer-tag { position: fixed; left: 0; top: 0; transform: translate(-50%, -100%); pointer-events: none; font-size: 12px; white-space: nowrap; letter-spacing: .12em;
  font-family: "Songti SC", "STSong", "Noto Serif SC", "Noto Serif CJK SC", Georgia, serif;
  color: rgba(243, 234, 216, .88); text-shadow: 0 0 3px rgba(16, 9, 4, .95), 0 1px 2px rgba(16, 9, 4, .85), 0 0 8px rgba(16, 9, 4, .5);
  opacity: 0; transition: opacity .3s; }                     /* 别的香客：同样的字，不带朱印 */
#fps { position: fixed; top: 92px; left: 14px; font: 12px ui-monospace, monospace; color: #9f9; text-shadow: 0 1px 2px #000; pointer-events: none; }
#clock { color: var(--ink-dim); font-size: 12px; }
#clock:empty { display: none; }
@media (max-width: 520px) { #clock { display: none; } }
#btn-lang { min-width: 34px; font-weight: 600; }
#lang-menu { position: fixed; top: 54px; right: 14px; z-index: 6; display: flex; flex-direction: column; gap: 2px; padding: 6px; background: var(--glass); border: 1px solid var(--line); border-radius: 14px;
  backdrop-filter: blur(14px) saturate(1.15); -webkit-backdrop-filter: blur(14px) saturate(1.15);
  text-shadow: 0 1px 2px rgba(12, 7, 3, .6); }
#lang-menu[hidden] { display: none; }
#lang-menu button { padding: 7px 16px; font-size: 13px; text-align: left; border-radius: 9px; }
#lang-menu button:hover { background: rgba(243, 234, 216, .12); }
#lang-menu button.on { color: var(--gold); }
#actions button span { white-space: nowrap; }

/* 每日功课 */
#daily-btn { top: 58px; left: 14px; padding: 6px 12px; font-size: 12px; gap: 6px; color: var(--ink); }
#daily-btn b { color: var(--gold); font-weight: 600; }
#daily-btn.done { color: var(--gold); }
body.fish-open #daily-btn { opacity: 0; pointer-events: none; }
#daily-mask { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 8; display: grid; place-items: center; background: rgba(8, 5, 3, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
#daily-mask[hidden] { display: none; }
#daily-panel { width: min(340px, 88vw); max-height: 84vh; overflow: auto; padding: 22px 22px 16px; background: rgba(30, 20, 12, .94); border: 1px solid var(--line); border-radius: 18px; text-align: center; }
#daily-panel h3 { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: .2em; text-indent: .2em; }
#daily-panel .sub { margin: 6px 0 14px; font-size: 12px; color: var(--ink-dim); }
#daily-panel ul { list-style: none; margin: 0 0 12px; padding: 0; text-align: left; }
#daily-panel li { display: flex; align-items: center; gap: 10px; padding: 9px 4px; font-size: 14px; border-bottom: 1px solid rgba(243, 234, 216, .1); }
#daily-panel li i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); font-style: normal; font-size: 12px; color: #1e140c; }
#daily-panel li.ok i { background: var(--gold); border-color: var(--gold); }
#daily-panel li.ok span { color: var(--ink-dim); }
#daily-panel .hint, #daily-panel .note, #daily-panel .empty { font-size: 12px; color: var(--ink-dim); line-height: 1.6; }
#daily-panel .note { margin: 12px 0 0; opacity: .7; }
#daily-panel .saying { margin: 6px 0 4px; padding: 14px 8px 4px; }
#daily-panel .saying .q { margin: 0; font-size: 17px; line-height: 1.7; font-family: "Songti SC", "STSong", "Noto Serif SC", "Hiragino Mincho ProN", Georgia, serif; }
#daily-panel .saying .src { margin: 8px 0 0; font-size: 12px; color: var(--ink-dim); }
#daily-panel .stamp { margin: 4px 0 2px; }
#daily-panel .row { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
#daily-panel .row button { padding: 8px 16px; font-size: 13px; border-radius: 999px; border: 1px solid var(--line); }
#daily-panel .row button.gold { color: #1e140c; background: var(--gold); border-color: var(--gold); }
#daily-panel .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
#daily-panel .grid .empty { grid-column: 1 / -1; padding: 18px 0; }
#daily-panel .cell { display: grid; place-items: center; padding: 6px 0; background: rgba(243, 234, 216, .93); border-radius: 8px; }
#daily-panel .stamp canvas { background: rgba(243, 234, 216, .93); border-radius: 10px; padding: 6px; box-sizing: content-box; }
#daily-seal { position: fixed; left: 50%; top: 44%; z-index: 9; transform: translate(-50%, -50%); padding: 14px; background: rgba(243, 234, 216, .95); border-radius: 16px; pointer-events: none; }
#daily-seal[hidden] { display: none; }
#daily-seal.go { animation: seal 2.6s ease both; }
@keyframes seal { 0% { transform: translate(-50%, -50%) scale(2.2) rotate(-10deg); opacity: 0; } 14% { transform: translate(-50%, -50%) scale(.94) rotate(0); opacity: 1; } 20% { transform: translate(-50%, -50%) scale(1); } 86% { opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 0; } }
@media (max-width: 520px) { #daily-btn { top: 56px; } }
#daily-panel canvas, #daily-seal canvas { position: static; top: auto; right: auto; bottom: auto; left: auto; display: block; margin: 0 auto; touch-action: auto; }   /* 页面里的画布默认铺满全屏，朱印的小画布要回到正常排版 */

/* 晨钟暮鼓 */
#event-pill { position: fixed; top: 58px; left: 50%; transform: translateX(-50%); z-index: 5; padding: 6px 16px; font-size: 13px; letter-spacing: .12em; color: var(--gold);
  background: var(--glass); border: 1px solid rgba(217, 164, 65, .5); border-radius: 999px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); pointer-events: none; }
#event-pill[hidden] { display: none; }
#daily-panel .event { margin: 4px 0 2px; padding: 10px 6px 2px; border-top: 1px solid rgba(243, 234, 216, .1); }
#daily-panel .event p { margin: 0 0 5px; font-size: 12px; line-height: 1.5; color: var(--ink-dim); }
#daily-panel .event p.next { color: var(--gold); }
#daily-panel .event p.head { color: var(--ink); font-size: 13px; letter-spacing: .15em; }
#daily-panel .event .bar { margin: 2px 0 7px; }

/* 长明灯面板（样式与功课页一致） */
.sheet-mask { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 8; display: grid; place-items: end center; padding-bottom: 110px; background: rgba(8, 5, 3, .25); }
.sheet-mask[hidden] { display: none; }
.sheet { width: min(340px, 88vw); padding: 20px 22px 16px; background: rgba(30, 20, 12, .94); border: 1px solid var(--line); border-radius: 18px; text-align: center; }
.sheet h3 { margin: 0 0 8px; font-size: 20px; font-weight: 500; letter-spacing: .2em; text-indent: .2em; }
.sheet p { margin: 0 0 10px; font-size: 13px; line-height: 1.65; color: var(--ink-dim); }
.sheet p.big { font-size: 15px; color: var(--gold); }
.sheet p.wish { color: var(--ink); font-family: "Songti SC", "STSong", "Noto Serif SC", Georgia, serif; }
.sheet input { width: 100%; padding: 9px 12px; margin: 2px 0 12px; font: inherit; font-size: 14px; color: var(--ink); background: rgba(243, 234, 216, .08); border: 1px solid var(--line); border-radius: 10px; outline: none; text-align: center; }
.sheet input::placeholder { color: rgba(243, 234, 216, .4); }
.sheet .row { display: flex; justify-content: center; gap: 8px; margin-top: 4px; }
.sheet .row button { padding: 8px 18px; font-size: 13px; border-radius: 999px; border: 1px solid var(--line); }
.sheet .row button.gold { color: #1e140c; background: var(--gold); border-color: var(--gold); }
.sheet .row button:disabled { opacity: .5; cursor: default; }
.sheet p.note { margin: 12px 0 0; font-size: 12px; opacity: .75; }

/* 回向 */
#daily-panel input { width: 100%; padding: 9px 12px; margin: 2px 0 10px; font: inherit; font-size: 14px; color: var(--ink); background: rgba(243, 234, 216, .08); border: 1px solid var(--line); border-radius: 10px; outline: none; text-align: center; }
#daily-panel input::placeholder { color: rgba(243, 234, 216, .4); }
#daily-panel .chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 2px 0 6px; }
#daily-panel .chips button { padding: 6px 12px; font-size: 13px; border-radius: 999px; border: 1px solid var(--line); }
#daily-panel .chips button.on { color: #1e140c; background: var(--gold); border-color: var(--gold); }
#daily-panel .row { flex-wrap: wrap; }

/* 小沙弥说话的气泡 */
#novice-say { position: fixed; left: 0; top: 0; z-index: 4; transform: translate(-50%, -100%); max-width: min(240px, 70vw); padding: 9px 14px; font-size: 13px; line-height: 1.55; color: #3a2a18;
  background: rgba(243, 234, 216, .95); border-radius: 14px 14px 14px 4px; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); opacity: 0; transition: opacity .35s; pointer-events: none; }
#daily-panel .hint.fest { color: var(--gold); font-size: 13px; }

/* 顶部栏防重叠（main.js 的 fitTop 按实测加类） */
#top-left, #top-right { white-space: nowrap; }
body.top-tight #top-left { gap: 6px; padding: 8px 11px; font-size: 13px; }
body.top-tight #top-left .temple { letter-spacing: .02em; }
body.top-tight #room { font-size: 11px; }
body.top-tight #top-right { gap: 0; padding: 4px; }
body.top-tight #top-right button { font-size: 11px; padding: 6px 7px; }
body.top-tight #btn-lang { min-width: 28px; }
body.top-wrap #top-left { flex-wrap: wrap; row-gap: 0; border-radius: 16px; padding: 6px 11px; white-space: normal; }
body.top-wrap #top-left > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
body.top-wrap #daily-btn { top: 74px; }

/* 每日一签 */
.sheet p.lot-q { font-size: 16px; line-height: 1.7; margin-bottom: 4px; }
.sheet p.lot-src { font-size: 12px; margin-bottom: 14px; }
.sheet p.lot-k { margin: 0 0 2px; font-size: 11px; letter-spacing: .2em; opacity: .7; }
.sheet p.lot-v { color: var(--ink); font-size: 14px; }
.sheet p.lot-v.gold { color: var(--gold); }
.event.lot button { margin-top: 6px; padding: 6px 16px; font-size: 12px; border-radius: 999px; border: 1px solid var(--line); }
.event.lot button.gold { color: #1e140c; background: var(--gold); border-color: var(--gold); }

/* 分享卡浮层：整张图居中显示，下面提示和按钮 */
#card-mask { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 18px 16px calc(max(18px, env(safe-area-inset-bottom))); background: rgba(8, 5, 3, .86); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#card-mask[hidden] { display: none; }
#card-mask img { max-width: min(92vw, 430px); max-height: calc(100vh - 150px); border-radius: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, .6); -webkit-touch-callout: default; user-select: auto; }
#card-mask p { margin: 0; font-size: 13px; color: var(--ink-dim); text-align: center; max-width: 320px; line-height: 1.5; }
#card-mask .row { display: flex; gap: 10px; }
#card-mask .row button { padding: 9px 20px; font-size: 13px; border-radius: 999px; border: 1px solid var(--line); }
#card-mask .row button.gold { color: #1e140c; background: var(--gold); border-color: var(--gold); }

/* 测试：山门上的“出山门 · 看全院”牌子，和转场的黑幕 */
#gate-tag { position: fixed; left: 0; top: 0; transform: translate(-50%, -100%); z-index: 3; padding: 6px 14px; border-radius: 999px; white-space: nowrap; cursor: pointer;
  font: 14px "Songti SC", "STSong", "Noto Serif SC", serif; letter-spacing: .12em; color: #1e140c; background: var(--gold); border: 1px solid rgba(255, 240, 200, .6);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .4); }
#gate-tag::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 14px; background: var(--gold); }
#veil { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 50; background: #0b0806; opacity: 0; transition: opacity .9s ease; }
#veil.on { opacity: 1; }

/* 全院共建（测试）：告示牌点开后的面板，沿用供灯那块 .sheet */
.sheet .cbar { height: 6px; border-radius: 3px; background: rgba(243, 234, 216, .16); overflow: hidden; margin: 4px 0 4px; }
.sheet .cbar i { display: block; height: 100%; background: linear-gradient(90deg, #b9832f, var(--gold)); }
.sheet .csteps { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-dim); margin-bottom: 10px; }
.sheet .csteps span.on { color: var(--gold); }
.sheet .cnums { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; font-size: 12px; color: var(--ink-dim); margin-bottom: 10px; }
.sheet .cnums b { color: var(--ink); font-size: 14px; }
.sheet .cnums .need { flex-basis: 100%; text-align: center; font-size: 14px; color: var(--gold); margin-top: 4px; }
.sheet .cnums .need b { color: var(--gold); font-size: 20px; }
.sheet ul.cdonors { list-style: none; margin: 0 0 8px; padding: 0; text-align: left; }
.sheet ul.cdonors li { display: flex; gap: 8px; align-items: baseline; padding: 5px 0; border-top: 1px solid rgba(243, 234, 216, .08); font-size: 13px; }
.sheet ul.cdonors li b { font: 500 13px "Songti SC", "STSong", serif; white-space: nowrap; }
.sheet ul.cdonors li i { font-style: normal; flex: 1; color: var(--ink-dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet ul.cdonors li span { color: var(--gold); font-size: 12px; }
.sheet p.cnames { font: 15px/2 "Songti SC", "STSong", serif; color: var(--ink); }
.sheet .cpresets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.sheet .cpresets button { padding: 8px 0; border-radius: 10px; border: 1px solid var(--line); font-size: 13px; }
.sheet .cpresets button.on { border-color: var(--gold); color: var(--gold); background: rgba(217, 164, 65, .12); }
.sheet input[type=number] { width: 100%; padding: 9px 12px; margin: 0 0 6px; font: inherit; font-size: 14px; color: var(--ink); background: rgba(243, 234, 216, .08); border: 1px solid var(--line); border-radius: 10px; }
.sheet label.clabel { display: block; text-align: left; font-size: 12px; color: var(--ink-dim); margin: 6px 0 3px; }
.sheet label.ccheck { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-dim); margin: 0 0 6px; }
.sheet p.cerr { color: #ff9a8a; font-size: 12px; min-height: 16px; margin: 0; }
.sheet p.cbox { border: 1px dashed rgba(127, 193, 255, .5); border-radius: 10px; padding: 8px 10px; color: #9fd0ff; font-size: 12px; }
.sheet { max-height: calc(100vh - 150px); overflow-y: auto; }

/* 全院地图（测试）：右上角按钮 + 平面图 */
#btn-map { top: 58px; right: 14px; z-index: 4; padding: 6px 12px; font-size: 12px; gap: 6px; color: var(--ink); cursor: pointer; }
#btn-map .ic { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
@media (max-width: 520px) { #btn-map { top: 56px; } }
body.fish-open #btn-map { opacity: 0; pointer-events: none; }
.sheet .cmap { margin: 0 -8px 8px; }
.sheet .cmap svg { display: block; width: 100%; height: auto; touch-action: manipulation; }
.cmap .mbg { fill: rgba(243, 234, 216, .07); }
.cmap .mwall { fill: none; stroke: rgba(243, 234, 216, .35); stroke-width: 1.2; stroke-dasharray: 4 3; }
.cmap .mwall.ok { stroke: rgba(243, 234, 216, .7); stroke-dasharray: none; }
.cmap .mroad { stroke: rgba(243, 234, 216, .2); stroke-linecap: square; }
.cmap .mb { fill: rgba(30, 20, 12, .85); stroke: rgba(243, 234, 216, .55); stroke-width: .8; stroke-dasharray: 2.4 1.8; }
.cmap .mb.ok { fill: #8f3a26; stroke: var(--gold); stroke-dasharray: none; }
.cmap .mb.main { fill: #a8452c; stroke-width: 1.4; }
.cmap .mb.pond { fill: rgba(60, 110, 150, .25); }
.cmap .mb.pond.ok { fill: #3c6e96; stroke: #9fd0ff; }
.cmap .mfill { fill: rgba(217, 164, 65, .38); pointer-events: none; }
.cmap .mname { fill: #f3ead8; text-anchor: middle; font-family: "Songti SC", "STSong", "Noto Serif SC", Georgia, serif; pointer-events: none; }
.cmap .mhit { fill: transparent; stroke: none; cursor: pointer; }
.cmap .mhit.on { stroke: #fff; stroke-width: 1.6; fill: rgba(255, 255, 255, .12); }
.cmap .mring { fill: rgba(127, 193, 255, .25); stroke: #9fd0ff; stroke-width: .8; pointer-events: none; }
.cmap .mme { fill: #9fd0ff; stroke: #0b0806; stroke-width: .5; pointer-events: none; }
.sheet p.cmapinfo { min-height: 21px; margin-bottom: 8px; }
.sheet p.cmapinfo b { color: var(--ink); font-weight: 500; font-size: 14px; }
.sheet:has(.cmap) { width: min(430px, 94vw); padding-left: 18px; padding-right: 18px; }

/* 虚拟摇杆（触屏）：左下角，底部菜单上方 */
#joy { position: fixed; left: max(16px, env(safe-area-inset-left)); bottom: calc(max(18px, env(safe-area-inset-bottom)) + 112px); z-index: 4; width: 104px; height: 104px; border-radius: 50%;
  background: rgba(24, 16, 10, .22); border: 1px solid var(--line); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: .65; transition: opacity .2s;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
#joy.on { opacity: 1; }
#joy i { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(243, 234, 216, .5); border: 1px solid rgba(255, 255, 255, .65); pointer-events: none; }
body.fish-open #joy { display: none; }
