/* 新办公室室内设计方案 · 交互式样板间 —— 界面样式 */
:root {
  --brand: #2e7d6b;
  --ink: #1b1c1e; --ink2: #5c5f64; --ink3: #8d9095; --ink4: #b6b8bb;
  --paper: #f7f6f2; --paper2: #efede7; --card: rgba(249, 248, 245, 0.92);
  --line: rgba(27, 28, 30, 0.09); --line2: rgba(27, 28, 30, 0.16);
  --r: 14px; --rs: 10px;
  --shadow: 0 10px 34px rgba(20, 22, 26, 0.14), 0 1px 2px rgba(20, 22, 26, 0.06);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "Cascadia Mono", Consolas, "Roboto Mono", monospace;
  font-family: var(--font);
  color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #e7e4dd; }
body { -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#scene:active { cursor: grabbing; }
body[data-mode="overview"] #scene { cursor: default; }
.glass { background: var(--card); backdrop-filter: blur(16px) saturate(1.15); -webkit-backdrop-filter: blur(16px) saturate(1.15); border: 1px solid rgba(255, 255, 255, 0.65); box-shadow: var(--shadow); }
.k { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink3); font-weight: 500; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
svg.i { width: 16px; height: 16px; flex: none; }

/* ───────── 顶栏 ───────── */
#top { position: fixed; z-index: 10; left: 16px; right: 16px; top: max(14px, env(safe-area-inset-top)); display: flex; align-items: center; gap: 10px; pointer-events: none; }
#top > * { pointer-events: auto; }
.proj { display: flex; align-items: center; gap: 11px; height: 46px; padding: 0 16px 0 8px; border-radius: var(--r); text-align: left; }
.proj .mk { width: 32px; height: 32px; border-radius: 9px; background: var(--ink); display: grid; place-items: center; flex: none; }
.proj .mk svg { width: 18px; height: 18px; }
.proj b { display: block; font-size: 14px; font-weight: 600; letter-spacing: 0.06em; white-space: nowrap; }
.proj small { display: block; font-size: 11px; color: var(--ink3); margin-top: 2px; letter-spacing: 0.04em; white-space: nowrap; }
.seg { display: inline-flex; padding: 4px; border-radius: 13px; gap: 2px; height: 46px; align-items: center; }
.seg button { height: 38px; padding: 0 14px; border-radius: 10px; font-size: 13.5px; color: var(--ink2); white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; transition: background .15s, color .15s; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--ink); color: #fff; }
#modes { margin: 0 auto; }
#tools { display: flex; gap: 8px; align-items: center; }
.tb { height: 46px; padding: 0 14px; border-radius: var(--r); font-size: 13px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; text-decoration: none; }
.tb:hover { background: rgba(255, 255, 255, 0.98); }
.tb.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tb .chip { font-size: 11.5px; color: var(--ink3); }
.tb.on .chip { color: rgba(255, 255, 255, 0.7); }
#todSeg button { padding: 0 11px; }

/* ───────── 导览卡片 ───────── */
#card { position: fixed; z-index: 6; left: 16px; bottom: max(16px, env(safe-area-inset-bottom)); width: 360px; border-radius: 18px; padding: 18px 18px 14px; transition: opacity .3s, transform .3s; }
body:not([data-mode="tour"]) #card { opacity: 0; transform: translateY(12px); pointer-events: none; }
#card .no { display: flex; align-items: center; gap: 10px; }
#card .no .bar { flex: 1; height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; }
#card .no .bar i { display: block; height: 100%; background: var(--brand); transition: width .4s; }
#card .exp { display: none; width: 26px; height: 26px; border-radius: 8px; place-items: center; color: var(--ink2); background: rgba(27,28,30,.06); }
#card.expanded .exp svg { transform: rotate(180deg); }
#card h2 { margin: 8px 0 2px; font-size: 21px; font-weight: 600; letter-spacing: 0.04em; }
#card .area { font-size: 12px; color: var(--ink3); }
#card ul { margin: 11px 0 12px; padding: 0 0 0 17px; font-size: 13.3px; line-height: 1.7; color: #34363a; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.chips .lab { font-size: 11.5px; color: var(--ink3); align-self: center; margin-right: 2px; }
.hchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 5px; border-radius: 99px; background: rgba(27, 28, 30, 0.06); font-size: 12.3px; }
.hchip:hover { background: rgba(27, 28, 30, 0.11); }
.hchip em { font-style: normal; font-family: var(--mono); font-size: 10.5px; min-width: 22px; height: 18px; padding: 0 5px; display: inline-grid; place-items: center; border-radius: 99px; background: var(--ink); color: #fff; }
.cchip { font-size: 12px; padding: 4px 9px; border-radius: 99px; border: 1px solid var(--line2); }
.cchip:hover { background: #fff; }
.nav { display: flex; gap: 8px; }
.nav button { height: 38px; border-radius: 11px; background: rgba(27, 28, 30, 0.07); font-size: 13px; padding: 0 14px; }
.nav button:hover { background: rgba(27, 28, 30, 0.12); }
.nav .pri { flex: 1; background: var(--ink); color: #fff; }
.nav .pri:hover { background: #000; }
.nav #auto.on { background: var(--brand); color: #fff; }

/* ───────── 3D 热点 ───────── */
#pins { position: fixed; inset: 0; z-index: 4; pointer-events: none; }
.pin { position: absolute; left: 0; top: 0; pointer-events: auto; display: flex; align-items: center; gap: 0; transform: translate(-50%, -50%); transition: opacity .2s; }
.pin .dot { width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, 0.96); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28), 0 0 0 2px rgba(255, 255, 255, 0.45); display: grid; place-items: center; font-family: var(--mono); font-size: 10.5px; font-weight: 600; color: var(--ink); position: relative; }
.pin .dot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.85); opacity: 0; }
.pin.hot .dot::after { animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.7); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
.pin .lbl { max-width: 0; overflow: hidden; white-space: nowrap; font-size: 12.5px; background: rgba(255, 255, 255, 0.96); border-radius: 0 99px 99px 0; padding: 0; height: 26px; line-height: 26px; margin-left: -13px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18); transition: max-width .25s, padding .25s; z-index: -1; }
.pin:hover .lbl, .pin.near .lbl { max-width: 260px; padding: 0 12px 0 20px; }
.pin.on .dot { background: var(--ink); color: #fff; }
.pin.far { opacity: .78; }
.pin.far .dot { transform: scale(.82); }
.pin.on .lbl { max-width: 260px; padding: 0 12px 0 20px; }
body[data-mode="overview"] .pin .dot { width: 22px; height: 22px; font-size: 9.5px; }
body[data-mode="plan"] #pins { display: none; }

/* ───────── 报告面板 ───────── */
#report { position: fixed; z-index: 12; top: calc(max(14px, env(safe-area-inset-top)) + 58px); right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); width: 470px; border-radius: 18px; display: flex; flex-direction: column; overflow: hidden; transform: translateX(calc(100% + 24px)); transition: transform .35s cubic-bezier(.2, .8, .2, 1); background: rgba(250, 249, 246, 0.97); }
#report.open { transform: none; }
.rp-head { flex: none; display: flex; align-items: center; gap: 6px; padding: 12px 12px 10px 18px; border-bottom: 1px solid var(--line); }
.rp-head .crumb { flex: 1; min-width: 0; font-size: 12px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ibtn { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--ink2); }
.ibtn:hover { background: rgba(27, 28, 30, 0.07); color: var(--ink); }
.ibtn[disabled] { opacity: .3; pointer-events: none; }
.rp-body { flex: 1; overflow: auto; padding: 22px 22px 40px; scrollbar-width: thin; }
.rp-body h1 { margin: 6px 0 8px; font-size: 22px; line-height: 1.35; font-weight: 600; letter-spacing: 0.02em; }
.rp-body .kick { font-size: 14px; line-height: 1.7; color: var(--ink2); margin: 0 0 14px; }
.rp-body h3 { margin: 26px 0 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; color: var(--ink3); text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.rp-body h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.rp-body p { font-size: 14px; line-height: 1.85; color: #2e3034; margin: 0 0 10px; }
.rp-body ul.pts { margin: 0; padding: 0; list-style: none; }
.rp-body ul.pts li { position: relative; padding: 0 0 10px 18px; font-size: 14px; line-height: 1.75; color: #2e3034; }
.rp-body ul.pts li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 6px; height: 6px; border-radius: 2px; background: var(--brand); transform: rotate(45deg); }
.rp-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 6px; }
.btn { height: 36px; padding: 0 14px; border-radius: 10px; font-size: 13px; background: rgba(27, 28, 30, 0.07); display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }
.btn:hover { background: rgba(27, 28, 30, 0.12); }
.btn.pri { background: var(--ink); color: #fff; }
.btn.pri:hover { background: #000; }
table.spec { width: 100%; border-collapse: collapse; font-size: 13.3px; }
table.spec th { width: 92px; text-align: left; vertical-align: top; font-weight: 500; color: var(--ink3); padding: 9px 10px 9px 0; border-top: 1px solid var(--line); white-space: nowrap; }
table.spec td { padding: 9px 0; border-top: 1px solid var(--line); line-height: 1.65; color: #2e3034; }
.std { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.std .v { font-size: 14.5px; font-weight: 600; color: var(--ink); line-height: 1.5; font-variant-numeric: tabular-nums; }
.std .t { font-size: 13px; margin: 2px 0 4px; color: #2e3034; line-height: 1.6; }
.std .s { font-size: 11.5px; color: var(--ink3); line-height: 1.55; }
.std .s a { color: var(--ink3); }
.case-ref { border-radius: 14px; background: var(--paper2); padding: 14px 15px; margin-bottom: 10px; }
.case-ref .hd { display: flex; align-items: baseline; gap: 8px; }
.case-ref .hd b { font-size: 14.5px; font-weight: 600; }
.case-ref .hd span { font-size: 12px; color: var(--ink3); }
.case-ref p { font-size: 13.4px; margin: 6px 0 8px; line-height: 1.75; }
.case-ref .fact { font-size: 12.3px; color: var(--ink2); line-height: 1.65; border-left: 2px solid var(--brand); padding-left: 10px; margin: 8px 0; }
.case-ref .fact a { color: var(--ink3); white-space: nowrap; }
.case-ref .more { font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; color: var(--ink2); }
.schemes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sch { border: 1px solid var(--line); border-radius: 12px; padding: 10px 11px; text-align: left; }
.sch:hover { border-color: var(--line2); background: #fff; }
.sch.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: #fff; }
.sch .sw { display: flex; height: 6px; border-radius: 99px; overflow: hidden; margin-bottom: 8px; }
.sch .sw i { flex: 1; }
.sch b { display: block; font-size: 12.5px; }
.sch span { display: block; font-size: 12px; color: var(--ink2); line-height: 1.55; margin-top: 3px; }
.note { font-size: 12.3px; color: var(--ink3); line-height: 1.65; margin-top: 18px; padding-top: 12px; border-top: 1px dashed var(--line2); }
.pal { display: flex; gap: 6px; margin: 4px 0 4px; }
.pal i { width: 38px; height: 38px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.facts { margin: 0; padding: 0 0 0 20px; font-size: 12.8px; line-height: 1.7; color: var(--ink2); }
.facts li { margin-bottom: 6px; }
.facts a { color: var(--ink3); word-break: break-all; }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 4px 0 6px; }
.meta div { font-size: 12.8px; line-height: 1.5; }
.meta div span { display: block; font-size: 11px; color: var(--ink3); letter-spacing: 0.08em; margin-bottom: 2px; }
.hs-list { display: flex; flex-direction: column; gap: 4px; }
.hs-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-align: left; font-size: 13.5px; }
.hs-item:hover { background: rgba(27, 28, 30, 0.06); }
.hs-item em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--ink3); width: 22px; }
.case-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.case-card { text-align: left; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; }
.case-card:hover { background: #fff; border-color: var(--line2); }
.case-card .pal2 { display: flex; height: 5px; border-radius: 99px; overflow: hidden; margin-bottom: 8px; }
.case-card .pal2 i { flex: 1; }
.case-card b { display: block; font-size: 13px; font-weight: 600; }
.case-card span { display: block; font-size: 11.5px; color: var(--ink3); margin-top: 2px; line-height: 1.45; }

/* ───────── 抽屉 ───────── */
.drawer { position: fixed; z-index: 13; right: 16px; top: calc(max(14px, env(safe-area-inset-top)) + 58px); width: 360px; max-height: calc(100% - 150px); overflow: auto; border-radius: 18px; padding: 18px; opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .2s, transform .2s; }
.drawer.open { opacity: 1; transform: none; pointer-events: auto; }
.drawer h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.drawer p.lead { margin: 0 0 14px; font-size: 12.5px; color: var(--ink2); line-height: 1.6; }
.drawer h4 { margin: 18px 0 8px; font-size: 11.5px; letter-spacing: 0.14em; color: var(--ink3); font-weight: 600; }
#themes { display: grid; gap: 8px; }
.theme { text-align: left; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.6); display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
.theme .sw { grid-row: span 2; display: grid; grid-template-columns: 1fr 1fr; width: 38px; height: 38px; border-radius: 9px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.theme b { font-size: 14px; font-weight: 600; }
.theme small { font-size: 12px; color: var(--ink2); }
.theme.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: #fff; }
#themeBlurb { margin: 12px 0 0; font-size: 12.5px; line-height: 1.7; color: var(--ink2); padding: 10px 12px; background: rgba(27, 28, 30, 0.04); border-radius: 10px; }
.colorrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
input[type="color"] { width: 44px; height: 38px; border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: #fff; cursor: pointer; }
#presets { display: flex; flex-wrap: wrap; gap: 6px; }
#presets button { font-size: 12px; padding: 5px 9px 5px 6px; border-radius: 99px; background: rgba(27, 28, 30, 0.05); display: inline-flex; align-items: center; gap: 6px; }
#presets button i { width: 14px; height: 14px; border-radius: 50%; }
#presets button.on { background: var(--ink); color: #fff; }
.optrow { display: flex; gap: 6px; flex-wrap: wrap; }
.optrow button { padding: 7px 12px; border-radius: 99px; background: rgba(27, 28, 30, 0.06); font-size: 12.5px; }
.optrow button.on { background: var(--ink); color: #fff; }
#stopList { display: grid; gap: 2px; }
#stopList .zone { padding: 8px 10px; border-radius: 10px; font-size: 14px; display: flex; align-items: center; gap: 10px; text-align: left; width: 100%; }
#stopList .zone:hover { background: rgba(27, 28, 30, 0.05); }
#stopList .zone.on { background: rgba(27, 28, 30, 0.08); font-weight: 600; }
#stopList .zone em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--ink3); width: 20px; }
#stopList .sub { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 0 8px 40px; }
#stopList .sub button { font-size: 12px; color: var(--ink2); padding: 3px 8px; border-radius: 99px; background: rgba(27, 28, 30, 0.04); }
#stopList .sub button:hover { background: rgba(27, 28, 30, 0.1); color: var(--ink); }

/* ───────── 平面图 ───────── */
#plan { position: fixed; inset: 0; z-index: 8; background: #e9e6df; display: none; }
body[data-mode="plan"] #plan { display: block; }
.plan-stage { position: absolute; inset: 0; overflow: hidden; cursor: grab; touch-action: none; }
.plan-stage:active { cursor: grabbing; }
.plan-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.plan-world img { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.plan-world svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.plan-world .zfill { fill: transparent; stroke: none; cursor: pointer; transition: fill .2s; }
.plan-world .zfill:hover, .plan-world .zfill.on { fill: rgba(255, 255, 255, 0.16); }
.plan-world .zlab { pointer-events: none; }
.plan-world .zlab rect { fill: rgba(250, 249, 246, 0.92); }
.plan-world .zlab text { font-family: var(--font); fill: var(--ink); }
.plan-world .ppin { cursor: pointer; }
.plan-world .ppin circle.b { fill: #fff; stroke: rgba(0, 0, 0, 0.25); }
.plan-world .ppin text { font-family: var(--mono); font-weight: 600; fill: var(--ink); pointer-events: none; }
.plan-world .ppin:hover circle.b, .plan-world .ppin.on circle.b { fill: var(--ink); }
.plan-world .ppin:hover text, .plan-world .ppin.on text { fill: #fff; }
.plan-side { position: absolute; z-index: 2; left: 16px; top: calc(max(14px, env(safe-area-inset-top)) + 62px); bottom: max(16px, env(safe-area-inset-bottom)); width: 300px; border-radius: 18px; padding: 18px; overflow: auto; }
.plan-side h2 { margin: 4px 0 4px; font-size: 19px; font-weight: 600; letter-spacing: 0.04em; }
.plan-side p { font-size: 12.5px; color: var(--ink2); line-height: 1.65; margin: 0 0 12px; }
.atable { width: 100%; border-collapse: collapse; font-size: 13px; }
.atable td { padding: 7px 0; border-top: 1px solid var(--line); }
.atable td.a { text-align: right; font-family: var(--mono); font-size: 12.5px; color: var(--ink2); }
.atable tr { cursor: pointer; }
.atable tr:hover td { color: var(--ink); background: rgba(255, 255, 255, 0.5); }
.atable tr.tot td { font-weight: 600; cursor: default; border-top: 1px solid var(--line2); }
.atable i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 8px; vertical-align: 0; }
.plan-tools { position: absolute; z-index: 2; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); display: flex; gap: 8px; }
.plan-tools button { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; }
.plan-loading { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; color: var(--ink2); letter-spacing: 0.1em; }

/* ───────── 封面 ───────── */
#cover { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px; background: rgba(28, 29, 31, 0.32); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .35s; }
#cover.open { opacity: 1; pointer-events: auto; }
.cv { width: min(880px, 100%); max-height: calc(100vh - 40px); overflow: auto; border-radius: 22px; background: var(--paper); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3); display: grid; grid-template-columns: 1.05fr 1fr; }
.cv-l { padding: 34px 34px 30px; }
.cv-r { padding: 34px 30px 30px; background: var(--paper2); border-radius: 0 22px 22px 0; }
.cv h1 { font-size: 30px; line-height: 1.3; margin: 12px 0 10px; font-weight: 600; letter-spacing: 0.04em; }
.cv .lead { font-size: 14px; line-height: 1.85; color: var(--ink2); margin: 0 0 18px; }
.cv .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin: 6px 0 22px; }
.cv .stats div b { display: block; font-size: 22px; font-weight: 600; font-family: var(--mono); letter-spacing: -0.01em; }
.cv .stats div span { font-size: 12px; color: var(--ink3); }
.cv .ctas { display: flex; flex-wrap: wrap; gap: 8px; }
.cv .ctas .btn { height: 42px; padding: 0 18px; font-size: 14px; }
.cv h4 { margin: 0 0 10px; font-size: 11.5px; letter-spacing: 0.14em; color: var(--ink3); font-weight: 600; }
.cv .zl2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: 13px; margin-bottom: 18px; }
.cv .zl2 div { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 5px 0; }
.cv .zl2 span { font-family: var(--mono); font-size: 12px; color: var(--ink3); }
.cv .disc { font-size: 11.5px; color: var(--ink3); line-height: 1.65; margin-top: 14px; }

/* ───────── 其他 ───────── */
#miniWrap { position: fixed; z-index: 5; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); padding: 8px; border-radius: 14px; transition: right .35s cubic-bezier(.2, .8, .2, 1); }
body.rp-open #miniWrap { right: 502px; }
#mini { display: block; width: 210px; height: 184px; cursor: pointer; border-radius: 8px; }
#miniWrap small { display: block; font-size: 10.5px; color: var(--ink3); margin: 4px 2px 0; }
body[data-mode="overview"] #miniWrap, body[data-mode="plan"] #miniWrap { display: none; }
#hint { position: fixed; z-index: 5; left: 50%; top: calc(max(14px, env(safe-area-inset-top)) + 64px); transform: translateX(-50%); border-radius: 12px; padding: 7px 8px 7px 14px; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink2); white-space: nowrap; }
#hint p { margin: 0; }
#hint[hidden] { display: none; }
body[data-mode="overview"] #hint, body[data-mode="plan"] #hint { display: none; }
#ovTip { position: fixed; z-index: 5; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); font-size: 12.5px; color: var(--ink2); padding: 8px 14px; border-radius: 99px; white-space: nowrap; }
body:not([data-mode="overview"]) #ovTip { display: none; }
#joy { position: fixed; z-index: 5; left: 24px; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 20px); width: 104px; height: 104px; border-radius: 50%; background: rgba(255, 255, 255, 0.35); border: 1px solid rgba(255, 255, 255, 0.7); display: none; touch-action: none; backdrop-filter: blur(6px); }
#joy i { position: absolute; left: 32px; top: 32px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.95); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
@media (pointer: coarse) { body[data-mode="walk"] #joy { display: block; } #fullscreen { display: none; } }
#fade { position: fixed; inset: 0; background: #f4f3ef; opacity: 0; pointer-events: none; z-index: 3; }
.ping { position: fixed; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 2px solid var(--brand); pointer-events: none; z-index: 4; animation: ping .7s ease-out forwards; }
@keyframes ping { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
#labels { position: fixed; inset: 0; pointer-events: none; z-index: 3; }
.zl { position: absolute; left: 0; top: 0; pointer-events: auto; padding: 5px 11px; border-radius: 99px; background: rgba(250, 249, 246, 0.94); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14); font-size: 12.5px; white-space: nowrap; }
.zl:hover { background: #fff; }
#loading { position: fixed; inset: 0; background: var(--paper); z-index: 40; display: grid; place-items: center; transition: opacity .6s; }
#loading.done { opacity: 0; pointer-events: none; }
#loading div { text-align: center; color: var(--ink2); font-size: 12.5px; letter-spacing: 0.12em; }
#loading b { display: block; font-size: 19px; color: var(--ink); font-weight: 600; letter-spacing: 0.16em; margin-bottom: 12px; }
#loadStep { display: block; min-height: 1.4em; }
#loading i { display: block; width: 140px; height: 2px; margin: 18px auto 0; background: rgba(0, 0, 0, 0.08); overflow: hidden; position: relative; }
#loading i::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--ink); animation: load 1.1s ease-in-out infinite; }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* ───────── 手机 ───────── */
@media (max-width: 860px) {
  #top { left: 10px; right: 10px; gap: 6px; flex-wrap: wrap; }
  .proj { height: 40px; padding: 0 6px; }
  .proj .t { display: none; }
  .seg { height: 40px; }
  .seg button { height: 32px; padding: 0 9px; font-size: 12.5px; }
  #modes { margin: 0; }
  #tools { margin-left: auto; gap: 6px; }
  .tb { height: 40px; padding: 0 10px; }
  .tb .lbl, .tb .chip { display: none; }
  #todSeg, #reportLink { display: none; }
  #card { left: 10px; right: 10px; width: auto; bottom: max(10px, env(safe-area-inset-bottom)); padding: 14px 14px 12px; }
  #card h2 { font-size: 18px; }
  #card ul { font-size: 12.8px; margin: 8px 0; line-height: 1.6; }
  #report { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: 74vh; border-radius: 20px 20px 0 0; transform: translateY(105%); }
  #report.open { transform: none; }
  body.rp-open #miniWrap { right: 10px; }
  .drawer { left: 10px; right: 10px; width: auto; top: calc(max(14px, env(safe-area-inset-top)) + 54px); max-height: calc(100% - 140px); }
  #miniWrap { right: 10px; bottom: auto; top: calc(max(14px, env(safe-area-inset-top)) + 54px); padding: 5px; }
  #mini { width: 120px; height: 105px; }
  #miniWrap small { display: none; }
  #hint { top: auto; bottom: 218px; font-size: 12px; max-width: calc(100% - 24px); white-space: normal; }
  body[data-mode="tour"] #hint, body[data-mode="tour"] #miniWrap { display: none; }
  .plan-side { left: 10px; right: 10px; top: auto; bottom: max(10px, env(safe-area-inset-bottom)); width: auto; max-height: 36vh; }
  .plan-tools { bottom: auto; top: calc(max(14px, env(safe-area-inset-top)) + 104px); right: 10px; flex-direction: column; }
  .plan-tools button { width: 38px; height: 38px; }
  #card ul, #card #stopRefs { display: none; }
  #card.expanded ul { display: block; }
  #card.expanded #stopRefs { display: flex; }
  #card .exp { display: inline-grid; }
  #card h2 { margin-top: 6px; }
  .cv { grid-template-columns: 1fr; }
  .cv-r { border-radius: 0 0 22px 22px; }
  .cv-l, .cv-r { padding: 24px 22px; }
  .cv h1 { font-size: 24px; }
}

/* ───────── 折叠屏展开（约 4:3 的大内屏）：横向 ~900×640、竖向 ~640×900 ───────── */
/* 横向：宽度够放桌面布局，但高度只有 600 多 —— 收紧顶栏、卡片、报告面板 */
@media (min-width: 861px) and (max-height: 760px) {
  #top { left: 12px; right: 12px; gap: 6px; }
  .proj { height: 42px; padding: 0 6px; }
  .proj .t { display: none; }
  .seg { height: 42px; }
  .seg button { height: 34px; padding: 0 11px; font-size: 13px; }
  .tb { height: 42px; padding: 0 11px; }
  .tb .lbl, .tb .chip { display: none; }
  #reportLink { display: none; }
  #card { left: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: 300px; padding: 14px 14px 12px; max-height: calc(100% - 84px); overflow: auto; }
  #card h2 { font-size: 18px; margin-top: 4px; }
  #card ul { font-size: 12.6px; line-height: 1.6; margin: 8px 0; }
  #card .chips { margin-bottom: 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  #card .chips::-webkit-scrollbar { display: none; }
  #card .chips > * { flex: none; }
  .hchip { font-size: 11.8px; white-space: nowrap; }
  .nav button { height: 34px; }
  #report { top: calc(max(12px, env(safe-area-inset-top)) + 52px); right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: 400px; }
  .rp-body { padding: 18px 18px 32px; }
  .rp-body h1 { font-size: 19px; }
  #miniWrap { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); padding: 5px; }
  #mini { width: 150px; height: 131px; }
  #miniWrap small { display: none; }
  body.rp-open #miniWrap { display: none; }
  #hint { top: calc(max(12px, env(safe-area-inset-top)) + 56px); }
  .drawer { top: calc(max(12px, env(safe-area-inset-top)) + 52px); max-height: calc(100% - 70px); }
  .plan-side { top: calc(max(12px, env(safe-area-inset-top)) + 56px); left: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: 270px; padding: 14px; }
  .plan-side h2 { font-size: 17px; }
  .atable td { padding: 5px 0; }
  .cv { max-height: calc(100vh - 24px); }
  .cv-l, .cv-r { padding: 22px 24px; }
  .cv h1 { font-size: 24px; margin: 8px 0; }
  .cv .lead { font-size: 13px; line-height: 1.75; margin-bottom: 12px; }
  .cv .stats { margin: 4px 0 14px; gap: 10px 14px; }
  .cv .stats div b { font-size: 19px; }
}
/* 竖向展开：比手机宽一倍 —— 保留手机式底部面板，但显示项目名、限制卡片宽度 */
@media (min-width: 560px) and (max-width: 860px) {
  .proj .t { display: block; }
  .proj .t small { display: none; }
  .proj { padding: 0 14px 0 6px; }
  #card { right: auto; width: min(520px, calc(100% - 20px)); }
  #card ul, #card #stopRefs { display: block; }
  #card #stopRefs { display: flex; }
  #card .exp { display: none; }
  #report { height: 66vh; }
  .drawer { left: auto; width: 380px; }
  .plan-side { max-height: 32vh; }
  .plan-tools { top: auto; bottom: calc(32vh + max(10px, env(safe-area-inset-bottom)) + 12px); flex-direction: row; }
  #mini { width: 150px; height: 131px; }
}
/* 双屏（有铰链分段的折叠设备）：报告放进右半屏，3D 留在左半屏 */
@media (horizontal-viewport-segments: 2) {
  #report { left: calc(env(viewport-segment-left 1 0) + 12px); right: 12px; width: auto; }
  #card { max-width: calc(env(viewport-segment-width 0 0) - 24px); }
}
