:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #eef3fa;
  --text: #1c2733;
  --text-2: #3b4757;
  --line: #d9e2ec;
  --primary: #2f6fd0;
  --primary-ink: #ffffff;
  --primary-soft: #e3edfb;
  --route: #1f5fc4;
  --route-active: #f08a00;
  --ok: #1d7a46;
  --warn-bg: #fff4dc;
  --warn-ink: #7a4b00;
  --danger: #b3261e;
  --radius: 16px;
  --shadow: 0 2px 10px rgba(30, 60, 100, .08);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 18px/1.55 "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--route-active); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* 頂列 */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--primary); color: var(--primary-ink);
}
.brand { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.brand-title { font-weight: 700; font-size: 20px; }
.badge { font-size: 13px; background: rgba(255,255,255,.22); padding: 1px 8px; border-radius: 99px; }
.icon-btn { background: none; border: 0; color: inherit; width: 40px; height: 40px; margin-left: -8px; border-radius: 10px; }
.icon-btn svg, .ctl svg, .mic-btn svg, .search-ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pill { font-size: 14px; padding: 2px 10px; border-radius: 99px; background: #fff; color: var(--warn-ink); font-weight: 700; }

.banner { margin: 12px 16px 0; padding: 12px 14px; border-radius: 12px; background: var(--primary-soft); color: #173f7a; font-size: 16px; }
.banner.is-warn { background: var(--warn-bg); color: var(--warn-ink); }
.banner.is-ok { background: #e2f4e9; color: #145a33; }

main { max-width: 720px; margin: 0 auto; padding: 12px 16px 40px; }
.page-title { font-size: 24px; margin: 8px 0 4px; }
.sec-title { font-size: 19px; margin: 22px 0 10px; }
.sub-title { font-size: 17px; margin: 18px 0 8px; }
.hint { color: var(--text-2); margin: 4px 0 14px; font-size: 16px; }
.small { font-size: 14px; color: var(--text-2); }
.center { text-align: center; }

/* 位置卡 */
.loc-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.loc-card .lc-main { flex: 1; min-width: 0; }
.loc-card .lc-k { font-size: 14px; color: var(--text-2); }
.loc-card .lc-v { font-weight: 700; font-size: 19px; }
.loc-card .lc-src { font-size: 14px; color: var(--text-2); }
.loc-card .btn-sm { flex: none; }

/* 搜尋 */
.search { margin-top: 14px; position: relative; display: flex; align-items: center; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 4px 6px 4px 12px; }
.search:focus-within { border-color: var(--primary); }
.search-ico { color: var(--text-2); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 10px 8px; font-size: 18px; }
.mic-btn { flex: none; width: 48px; height: 48px; border-radius: 12px; border: 0; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; }
.mic-btn.is-on { background: var(--primary); color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(47,111,208,.18); } }

.results { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; min-height: 60px; }
.item:active { background: var(--surface-2); }
.item .it-main { flex: 1; min-width: 0; }
.item .it-name { font-weight: 700; }
.item .it-sub { font-size: 14px; color: var(--text-2); }
.item .it-go { color: var(--primary); font-weight: 700; font-size: 15px; flex: none; }
.empty { color: var(--text-2); padding: 12px 4px; }

.hot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hot { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 12px; min-height: 72px; text-align: left; display: flex; gap: 10px; align-items: center; font-weight: 700; }
.hot .hi { font-size: 24px; flex: none; }
.hot:active { background: var(--surface-2); }

.wide-btn { margin-top: 10px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; border-radius: 14px; border: 2px solid var(--primary); background: var(--surface); color: var(--primary); font-weight: 700; }
.wb-ico { font-size: 22px; }

.cat-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cat { background: var(--surface-2); border: 0; border-radius: 12px; padding: 12px; text-align: left; font-weight: 600; display: flex; justify-content: space-between; }
.cat small { color: var(--text-2); font-weight: 400; }

.switch-row { margin-top: 20px; display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.switch-row span { flex: 1; display: flex; flex-direction: column; }
.switch-row small { color: var(--text-2); font-size: 14px; }
.switch { appearance: none; width: 56px; height: 32px; border-radius: 99px; background: #b8c4d2; position: relative; flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch:checked { background: var(--primary); }
.switch:checked::after { transform: translateX(24px); }

.disclaimer { margin-top: 20px; font-size: 14px; color: var(--text-2); background: var(--surface); border-left: 4px solid var(--route-active); padding: 10px 12px; border-radius: 8px; }
.foot-links { text-align: center; font-size: 14px; }
.foot-links a { color: var(--text-2); }

/* 按鈕 */
.btn-primary { width: 100%; min-height: 58px; border: 0; border-radius: 14px; background: var(--primary); color: #fff; font-weight: 700; font-size: 19px; }
.btn-primary:active { filter: brightness(.92); }
.btn-ghost { flex: 1; min-height: 52px; border-radius: 14px; border: 2px solid var(--primary); background: var(--surface); color: var(--primary); font-weight: 700; }
.btn-sm { min-height: 44px; padding: 6px 14px; border-radius: 12px; border: 2px solid var(--primary); background: var(--surface); color: var(--primary); font-weight: 700; font-size: 16px; }
.btn-sm.solid { background: var(--primary); color: #fff; }
.btn-danger { border-color: var(--danger); color: var(--danger); }

/* 列表篩選 */
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filters label { display: flex; flex-direction: column; font-size: 14px; color: var(--text-2); flex: 1; min-width: 130px; }
.filters select, .text-in { margin-top: 4px; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); font-size: 17px; width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { border: 2px solid var(--line); background: var(--surface); border-radius: 99px; padding: 6px 14px; font-size: 16px; }
.chip[aria-pressed="true"] { border-color: var(--primary); background: var(--primary); color: #fff; }

/* 起點分頁 */
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--surface-2); padding: 4px; border-radius: 14px; }
.tab { border: 0; background: transparent; border-radius: 10px; padding: 10px 4px; font-size: 15px; font-weight: 600; color: var(--text-2); }
.tab[aria-selected="true"] { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }
.tab-panel { margin-top: 14px; }
.qr-help { background: var(--surface); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.qr-help ol { margin: 8px 0; padding-left: 22px; }
.qr-ill { width: 56px; height: 56px; fill: none; stroke: var(--primary); stroke-width: 2.5; }

/* 導航 */
.nav-head { display: flex; align-items: center; gap: 12px; }
.nav-dest { font-size: 22px; font-weight: 800; }
.nav-meta { color: var(--text-2); font-size: 15px; }
.instr { margin-top: 12px; display: flex; gap: 14px; align-items: center; background: var(--surface); border: 2px solid var(--primary); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.instr-ico { flex: none; width: 68px; height: 68px; border-radius: 16px; background: var(--primary); color: #fff; display: grid; place-items: center; }
.instr-ico svg { width: 46px; height: 46px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.instr-step { font-size: 14px; color: var(--text-2); }
.instr-turn { font-size: 15px; font-weight: 800; color: var(--primary); }
.instr-text { font-size: 21px; font-weight: 700; line-height: 1.45; }
.instr.is-arrive { border-color: var(--ok); }
.instr.is-arrive .instr-ico { background: var(--ok); }
.instr.is-arrive .instr-turn { color: var(--ok); }

.voice-bar { margin-top: 10px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ctl { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; min-height: 60px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 600; }
.ctl:disabled { opacity: .4; }
.rate-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 15px; color: var(--text-2); }
.rate-row input[type=range] { flex: 1; accent-color: var(--primary); }
.rate-row output { width: 40px; }
.mute { display: flex; align-items: center; gap: 4px; }
.warn { background: var(--warn-bg); color: var(--warn-ink); padding: 10px 12px; border-radius: 12px; font-size: 15px; }

.map-wrap { position: relative; margin-top: 12px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #e9e4d3; }
.map { height: 46vh; min-height: 300px; touch-action: none; }
.map-svg { width: 100%; height: 100%; display: block; user-select: none; -webkit-user-select: none; }
.map-ctl { position: absolute; right: 8px; top: 8px; display: flex; flex-direction: column; gap: 6px; }
.map-ctl button { min-width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.95); font-weight: 700; font-size: 18px; }
.map-ctl button#m-fit, .map-ctl .txt { font-size: 14px; }
.map-legend { position: absolute; left: 8px; bottom: 8px; display: flex; gap: 10px; background: rgba(255,255,255,.92); padding: 4px 10px; border-radius: 10px; font-size: 13px; }
.map-legend span { display: flex; align-items: center; gap: 4px; }
.lg-route { display: inline-block; width: 22px; border-top: 4px dashed var(--route); }
.lg-active { display: inline-block; width: 22px; border-top: 6px solid var(--route-active); }

.map-base { opacity: .92; }
.route-casing { fill: none; stroke: #fff; stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; }
.route-line { fill: none; stroke: var(--route); stroke-width: 6; stroke-dasharray: 12 8; stroke-linecap: round; stroke-linejoin: round; }
.route-active-casing { fill: none; stroke: #fff; stroke-width: 15; stroke-linecap: round; stroke-linejoin: round; }
.route-active { fill: none; stroke: var(--route-active); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.mk .mk-shape { stroke: #fff; stroke-width: 3; }
.mk-start .mk-shape { fill: var(--ok); }
.mk-end .mk-shape { fill: var(--danger); }
.mk-here .mk-shape { fill: var(--primary); }
.mk-halo { fill: rgba(47,111,208,.25); }
.mk-text { fill: #fff; font-size: 13px; font-weight: 800; }
.mk-label { font-size: 15px; font-weight: 800; fill: var(--text); paint-order: stroke; stroke: #fff; stroke-width: 5px; stroke-linejoin: round; }

.mode-switch { grid-template-columns: 1fr 1fr; margin-top: 12px; }
.all-steps { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.all-steps button { width: 100%; display: flex; gap: 12px; align-items: flex-start; text-align: left; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 12px; }
.all-steps .as-ico { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; }
.all-steps .as-ico svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.all-steps .as-k { font-size: 14px; font-weight: 800; color: var(--primary); }
.all-steps .as-t { font-size: 19px; font-weight: 700; line-height: 1.45; }
.all-steps .is-cur button { border-color: var(--route-active); box-shadow: 0 0 0 2px var(--route-active) inset; }
.all-steps .is-cur .as-k::after { content: "（地圖上橘色這段）"; font-weight: 600; color: var(--text-2); }
.all-steps .is-arrive .as-ico { background: #e2f4e9; color: var(--ok); }
.all-steps .is-arrive .as-k { color: var(--ok); }
.home-map { height: 52vh; min-height: 320px; }
.pl-dot { fill: #fff; stroke: var(--primary); stroke-width: 3; }
.pl-hit { fill: transparent; }
.pl.is-sel .pl-dot { fill: var(--route-active); stroke: #fff; stroke-width: 3; }
.pl.is-here .pl-dot { fill: var(--primary); stroke: #fff; }
.pl-name { font-size: 15px; font-weight: 800; fill: var(--text); paint-order: stroke; stroke: #fff; stroke-width: 5px; stroke-linejoin: round; }
.pick-card { margin-top: 10px; background: var(--surface); border: 2px solid var(--route-active); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.pick-card .pk-name { font-size: 21px; font-weight: 800; }
.pick-card .pk-sub { font-size: 14px; color: var(--text-2); }

.pos-btns { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.pos-row { display: flex; gap: 10px; }

.steps { margin-top: 16px; background: var(--surface); border-radius: var(--radius); padding: 10px 14px; box-shadow: var(--shadow); }
.steps summary { font-weight: 700; padding: 6px 0; cursor: pointer; }
.steps ol { margin: 6px 0; padding-left: 26px; }
.steps li { padding: 6px 0; border-top: 1px solid var(--line); }
.steps li.is-cur { font-weight: 800; color: var(--primary); }
.steps li.is-done { color: var(--text-2); text-decoration: line-through; }

.fail-card { margin-top: 12px; background: #fdecea; color: #5f1410; border-radius: var(--radius); padding: 16px; }
.fail-card h2 { margin: 0 0 6px; font-size: 20px; }
.fail-card ul { margin: 6px 0 12px; padding-left: 22px; }
.fail-card .pos-row { flex-wrap: wrap; }

/* 管理後台 */
.adm-card { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-top: 12px; }
.adm-card h2 { margin: 0 0 8px; font-size: 19px; }
.adm-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.adm-row label { display: flex; flex-direction: column; font-size: 13px; color: var(--text-2); flex: 1; min-width: 120px; }
.adm-row input, .adm-row select { padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--line); font-size: 16px; background: #fff; }
.adm-row .chk { flex-direction: row; align-items: center; gap: 6px; flex: none; min-width: 0; font-size: 15px; color: var(--text); }
.adm-tools { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.adm-tools .btn-sm[aria-pressed="true"] { background: var(--primary); color: #fff; }
.adm-map { height: 58vh; min-height: 320px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); position: relative; background: #e9e4d3; touch-action: none; }
.net-edge { stroke: #1f5fc4; stroke-width: 3; opacity: .8; }
.net-edge.is-restricted { stroke: var(--danger); stroke-dasharray: 6 4; }
.net-edge.is-closed { stroke: #222; stroke-dasharray: 2 4; stroke-width: 4; }
.net-edge.is-stairs { stroke: #8a4bd0; }
.net-edge.is-sel { stroke: var(--route-active); stroke-width: 7; opacity: 1; }
.net-node { fill: #fff; stroke: #1f5fc4; stroke-width: 2.5; }
.net-node.t-entrance { fill: #1d7a46; stroke: #fff; }
.net-node.t-elevator { fill: #2f6fd0; stroke: #fff; }
.net-node.t-stairs, .net-node.t-escalator { fill: #8a4bd0; stroke: #fff; }
.net-node.t-room { fill: #f6d77b; stroke: #6b5200; }
.net-node.is-sel, .net-node.is-pick { fill: var(--route-active); stroke: #000; stroke-width: 3; }
.adm-legend { font-size: 13px; color: var(--text-2); display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.adm-tabs { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.adm-table td, .adm-table th { border-bottom: 1px solid var(--line); padding: 6px 4px; text-align: left; vertical-align: top; }
.adm-table input, .adm-table select { width: 100%; padding: 6px 8px; border-radius: 8px; border: 1.5px solid var(--line); font-size: 15px; background: #fff; }
.adm-scroll { overflow-x: auto; }
.help summary { display: flex; gap: 10px; align-items: center; cursor: pointer; list-style: none; }
.help summary::-webkit-details-marker { display: none; }
.help summary small { display: block; color: var(--text-2); font-size: 14px; }
.help summary::after { content: "展開"; margin-left: auto; font-size: 14px; color: var(--primary); font-weight: 700; }
.help[open] summary::after { content: "收合"; }
.help-ico { font-size: 26px; }
.help-log { margin-top: 12px; max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.help-msg { padding: 10px 12px; border-radius: 14px; font-size: 16px; line-height: 1.6; max-width: 92%; }
.help-msg.is-bot { background: var(--surface-2); align-self: flex-start; }
.help-msg.is-me { background: var(--primary); color: #fff; align-self: flex-end; }
.help-msg code { background: #fff; padding: 1px 4px; border-radius: 4px; font-size: 13px; word-break: break-all; }
.help-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.help-chips .chip { font-size: 14px; padding: 4px 12px; text-align: left; }
.help-form { display: flex; gap: 8px; margin-top: 10px; }
.help-form input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--line); font-size: 17px; }
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 12px; }
.qr-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; background: #fff; break-inside: avoid; }
.qr-card svg, .qr-card img { width: 150px; height: 150px; }
.qr-card .qc-t { font-weight: 800; }
.qr-card .qc-u { font-size: 11px; word-break: break-all; color: var(--text-2); }
.note { font-size: 14px; color: var(--text-2); }

@media (min-width: 640px) {
  .hot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cat-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media print {
  body * { visibility: hidden; }
  .qr-print, .qr-print * { visibility: visible; }
  .qr-print { position: absolute; left: 0; top: 0; width: 100%; }
}

/* ---------- 全螢幕導航 ---------- */
body.is-nav { overflow: hidden; }
body.is-nav .topbar { display: none; }
body.is-nav main { padding: 0; max-width: none; }
body.is-nav .banner { position: fixed; left: 70px; right: 70px; top: 45%; z-index: 40; margin: 0; box-shadow: var(--shadow); }
.nav-full { position: fixed; inset: 0; z-index: 10; background: #e9e4d3; }
.nav-map { position: absolute; inset: 0; touch-action: none; }

.nav-top { position: absolute; z-index: 5; left: 10px; right: 10px; top: calc(10px + env(safe-area-inset-top)); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.nav-top > * { pointer-events: auto; }
.nb { width: 100%; display: flex; align-items: center; gap: 6px; background: rgba(48, 52, 60, .95); color: #fff; border-radius: 16px; padding: 10px 4px; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.nb .instr-ico { flex: none; width: 58px; height: 58px; background: transparent; border-radius: 0; display: grid; place-items: center; }
.nb .instr-ico svg { width: 52px; height: 52px; fill: none; stroke: #fff; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.nb-txt { flex: 1; min-width: 0; }
.nb .instr-step { color: #c9d1dc; font-size: 14px; }
.nb .instr-text { color: #fff; font-size: 19px; font-weight: 800; line-height: 1.4; }
.nb-arr { flex: none; width: 36px; height: 56px; border: 0; background: transparent; color: #fff; display: grid; place-items: center; border-radius: 10px; }
.nb-arr svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.nb-arr:disabled { opacity: .25; }
.nb.is-arrive { background: rgba(29, 122, 70, .96); }
.sim-pill { border: 0; background: rgba(48, 52, 60, .92); color: #fff; border-radius: 10px; padding: 6px 16px; font-size: 16px; }
.sim-pill b { color: #ffb648; margin-left: 4px; }

.nav-side-l, .nav-side-r { position: absolute; z-index: 5; top: 50%; transform: translateY(-40%); display: flex; gap: 10px; }
.nav-side-l { left: 10px; flex-direction: column; }
.nav-side-r { right: 8px; align-items: center; }
.fab { width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgba(60, 64, 72, .88); color: #fff; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.fab svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.fab-txt { font-size: 12px; font-weight: 700; line-height: 1.15; }
.fab-txt[aria-pressed="false"] { background: rgba(255,255,255,.95); color: var(--text); }
#v-mute-btn .sp-off { display: none; }
#v-mute-btn[aria-pressed="true"] { background: var(--danger); }
#v-mute-btn[aria-pressed="true"] .sp-on { display: none; }
#v-mute-btn[aria-pressed="true"] .sp-off { display: inline; }
.map-ctl-v { display: flex; flex-direction: column; gap: 6px; }
.map-ctl-v button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.95); font-weight: 700; font-size: 18px; }
.map-ctl-v #m-fit { font-size: 13px; }
.prog { position: relative; width: 8px; height: 170px; border-radius: 99px; background: rgba(120, 130, 145, .45); }
.prog-fill { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 99px; background: #6aa84f; }
.prog-me { position: absolute; left: 50%; width: 22px; height: 22px; margin: 0 0 -11px -11px; border-radius: 50%; background: #fff; border: 3px solid var(--primary); }

.nav-full .fail-card { position: absolute; z-index: 6; left: 12px; right: 12px; top: calc(12px + env(safe-area-inset-top)); margin: 0; }
.nav-bottom { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; padding: 0 10px calc(10px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
.nav-actions { display: flex; gap: 8px; }
.nav-actions .btn-primary { flex: 1; box-shadow: 0 2px 10px rgba(0,0,0,.2); }
.nav-actions .btn-primary:disabled { opacity: .5; }
.btn-sim { flex: none; min-height: 58px; padding: 0 14px; border-radius: 14px; border: 2px solid var(--primary); background: #fff; color: var(--primary); font-weight: 800; font-size: 16px; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.btn-sim.is-on { background: var(--route-active); border-color: var(--route-active); color: #fff; }
.dest-wrap { border-radius: 16px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.dest-card { background: #fff; display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.dest-pin { flex: none; width: 34px; height: 34px; fill: #f2a516; stroke: #fff; stroke-width: 1; }
.dest-pin circle { fill: #fff; }
.dest-main { flex: 1; min-width: 0; }
.dest-k { font-size: 13px; color: var(--text-2); }
.nav-full .nav-dest { font-size: 20px; font-weight: 800; line-height: 1.3; }
.nav-full .nav-meta { font-size: 13px; color: var(--text-2); }
.nav-bar { background: var(--primary); color: #fff; display: grid; grid-template-columns: 1fr 1fr 1.5fr auto; align-items: center; padding: 8px 6px 8px 12px; }
.nbs { display: flex; align-items: baseline; gap: 3px; white-space: nowrap; }
.nbs b { font-size: 24px; }
.nbs small { font-size: 13px; opacity: .9; }
.nb-exit { border: 0; border-left: 1px solid rgba(255,255,255,.45); background: transparent; color: #fff; display: flex; flex-direction: column; align-items: center; padding: 0 8px 0 12px; font-size: 13px; }
.nb-exit svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

.sheet { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; max-height: 80vh; overflow-y: auto; background: var(--bg); border-radius: 20px 20px 0 0; padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 28px rgba(0,0,0,.25); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; font-size: 19px; margin-bottom: 10px; }
.sheet .mode-switch { margin-top: 0; }
.mk-me .me-arrow { fill: var(--primary); stroke: #fff; stroke-width: 3; stroke-linejoin: round; }
.mk-me .me-halo { fill: rgba(47,111,208,.22); }

/* 起點／終點標題：大字粗體＋與地圖標記相同的「起」「終」圓章 */
.field-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; font-size: 24px; font-weight: 900; color: var(--text); line-height: 1.2; }
.field-title small { font-size: 16px; font-weight: 600; color: var(--text-2); }
.field-title label { cursor: pointer; }
h2.field-title { margin-top: 0; }
#v-home > .field-title { margin-top: 22px; }
.ft-page { margin: 8px 0 4px; font-size: 26px; }
.ft-badge { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 18px; font-weight: 900; }
.ft-start { background: var(--ok); }
.ft-end { background: var(--danger); }
.loc-card { border-left: 6px solid var(--ok); }
.loc-card .lc-v { font-size: 21px; font-weight: 800; }
.loc-card .lc-v.is-empty { color: var(--danger); }
#search-form { margin-top: 0; border-color: var(--danger); border-width: 2.5px; }
.od-row { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.od-row + .od-row { margin-top: 4px; }
.od-row .ft-badge { width: 26px; height: 26px; font-size: 14px; }
.od-k { flex: none; font-size: 17px; font-weight: 900; }
.od-v { flex: 1; min-width: 0; font-size: 17px; font-weight: 700; line-height: 1.3; }
.nav-full .od-v.nav-dest { font-size: 18px; font-weight: 800; }

/* 相機掃描 QR Code */
.btn-scan { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; font-size: 20px; }
.btn-scan svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.scanner { position: relative; margin-top: 12px; border-radius: var(--radius); overflow: hidden; background: #000; aspect-ratio: 3 / 4; max-height: 62vh; width: 100%; }
.scanner video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; left: 50%; top: 46%; width: 62%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 4px solid #fff; border-radius: 18px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.scan-msg { position: absolute; left: 12px; right: 12px; top: 10px; margin: 0; text-align: center; color: #fff; font-size: 17px; font-weight: 700; text-shadow: 0 1px 3px #000; }
.scan-msg.is-bad { color: #ffd166; }
.scan-close { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); min-height: 48px; padding: 0 22px; border-radius: 99px; border: 0; background: rgba(255,255,255,.95); font-weight: 800; font-size: 17px; }
.qr-help { margin-top: 12px; }

/* ---------- 可讀性加強：所有區塊與欄位標題放大、加粗、提高對比 ---------- */
.page-title { font-size: 26px; font-weight: 900; }
.sec-title { font-size: 22px; font-weight: 900; color: var(--text); margin: 26px 0 12px; padding-left: 10px; border-left: 5px solid var(--primary); line-height: 1.25; }
.sub-title { font-size: 19px; font-weight: 800; color: var(--text); }
.hint { font-size: 17px; color: var(--text-2); }
.field-title small, .help summary small, .switch-row small { font-size: 16px; color: var(--text-2); }

/* 卡片與列表 */
.loc-card .lc-src, .item .it-sub, .pick-card .pk-sub, .small, .note { font-size: 15px; }
.item .it-name { font-size: 19px; }
.item .it-go { font-size: 17px; font-weight: 800; }
.hot { font-size: 18px; }
.cat { font-size: 18px; }
.switch-row strong { font-size: 19px; font-weight: 900; }
.disclaimer { font-size: 15px; }
.pick-card .pk-sub:first-child { font-size: 16px; font-weight: 800; color: var(--text); }

/* 篩選、分頁、表單標籤 */
.filters label, .adm-row label { font-size: 17px; font-weight: 800; color: var(--text); gap: 4px; }
.tab { font-size: 17px; font-weight: 800; color: var(--text-2); padding: 12px 4px; }
.tab[aria-selected="true"] { color: var(--primary); }
.chip { font-size: 17px; font-weight: 700; }

/* 導航頁 */
.nb .instr-step { font-size: 15px; color: #e3e8ef; font-weight: 700; }
.all-steps .as-k { font-size: 16px; }
.sheet-head { font-size: 21px; font-weight: 900; }
.rate-row { font-size: 17px; font-weight: 700; color: var(--text); }
.nav-full .nav-meta { font-size: 14px; }
.nbs small, .nb-exit { font-size: 14px; }
.fab-txt { font-size: 13px; font-weight: 800; }
.od-k { font-size: 18px; }

/* 管理後台 */
.adm-card h2 { font-size: 21px; font-weight: 900; }
.adm-table th { font-size: 16px; font-weight: 900; color: var(--text); background: var(--surface-2); }
.adm-legend { font-size: 15px; color: var(--text); }
.help summary b { font-size: 20px; }
.help-chips .chip { font-size: 15px; }
.item .it-name, .item .it-sub { display: block; }
.item .it-name { line-height: 1.35; }
.item .it-sub { margin-top: 2px; }
.quick-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.quick-list .wide-btn { margin-top: 0; font-size: 19px; min-height: 60px; }
.quick-list .wide-btn small { font-size: 14px; font-weight: 600; color: var(--text-2); }
.quick-list .wide-btn.is-none { border-style: dashed; border-color: #9aa8b8; color: var(--text-2); }

/* 首頁地圖：地點名稱標籤 */
.pl-chip rect { fill: #fff; stroke: var(--primary); }
.pl-chip text { fill: #13325f; font-weight: 800; }
.pl-chip.is-here rect { fill: var(--primary); }
.pl-chip.is-here text { fill: #fff; }
.pl-chip.is-sel rect { fill: var(--route-active); stroke: #fff; }
.pl-chip.is-sel text { fill: #fff; }
.pl-mini { fill: #fff; stroke: var(--primary); }
.pl-mini.is-here { fill: var(--primary); }
