:root{font:16px/1.45 "Segoe UI","Microsoft YaHei",sans-serif;color:#10223a;background:#eff3f7;--muted:#566984;--border:#d9e3ed;--stage:#142337;--lime:#c8f781}
*{box-sizing:border-box}
body{margin:0}
button{font:inherit;color:inherit;cursor:pointer}
button:focus-visible,canvas:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #4d9ce6;outline-offset:3px}
h1,h2,p{margin:0}
.mast{padding:14px clamp(14px,4vw,60px);min-height:84px;background:#fff;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:13px}
.mast h1{font-size:clamp(1.17rem,2.25vw,1.56rem);letter-spacing:-.035em}.mast p{font-size:.875rem;color:var(--muted)}
.mark{width:43px;height:43px;background:#15283e;border-radius:12px;display:grid;place-content:center;gap:3px;flex:none}
.mark i{display:block;width:18px;height:5px;border:1px solid var(--lime);transform:skewX(-24deg);border-radius:1px}.mark i:first-child{background:var(--lime)}
.scale-note{font-size:.86rem;color:#344b63;background:#edf3f8;border:1px solid #dfebf4;padding:4px 10px;border-radius:24px;margin-left:auto;white-space:nowrap}
main{max-width:1600px;margin:0 auto;padding:24px clamp(12px,4vw,60px) 0;display:grid;grid-template-columns:minmax(0,1fr) minmax(254px,302px);grid-template-areas:"viewer search" "viewer inspector";grid-template-rows:auto 1fr;gap:14px 18px;align-items:start}
.viewer{grid-area:viewer;min-width:0;background:var(--stage);color:#f7fbff;border:1px solid #28425e;border-radius:20px;overflow:hidden;box-shadow:0 15px 35px #192f4c1a}
.view-head,.view-foot{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:14px 18px}
.view-head h2{font-size:clamp(1.17rem,2.4vw,1.7rem);letter-spacing:-.035em}
.view-actions,.view-controls{display:flex;align-items:center;gap:5px;white-space:nowrap}
.view-controls{gap:3px;padding:3px;border:1px solid #46617b;border-radius:10px;background:#1e354d}
.level-control select{appearance:none;font:inherit;font-size:.875rem;color:#e6eff8;border:1px solid #46617b;border-radius:8px;background:#1e354d;padding:7px 23px 7px 8px;cursor:pointer;background-image:linear-gradient(45deg,transparent 50%,#e6eff8 50%),linear-gradient(135deg,#e6eff8 50%,transparent 50%);background-position:calc(100% - 12px) 15px,calc(100% - 8px) 15px;background-size:4px 4px;background-repeat:no-repeat}
.level-control select:focus-visible{outline:3px solid #4d9ce6;outline-offset:2px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.view-controls button,.instrument button{background:transparent;border:0;color:#e6eff8;border-radius:7px;padding:6px 10px;font-size:.875rem}
.view-controls button[aria-pressed=true],.instrument button[aria-pressed=true]{background:var(--lime);color:#1e3116;font-weight:700}
.stage{position:relative;height:clamp(450px,69vh,730px);background:radial-gradient(ellipse at 50% 46%,#2b425b,#182a40 66%,#142337)}
canvas{display:block;width:100%;height:100%;touch-action:none;cursor:grab}canvas:active{cursor:grabbing}
.instrument{position:absolute;right:12px;bottom:13px;display:grid;gap:3px;padding:4px;border:1px solid #49647f;border-radius:11px;background:#14263ae8}
.instrument button{min-width:38px;min-height:36px;padding:4px 6px}
.instrument button:nth-child(n+3){font-size:1.23rem;line-height:1}
.instrument button:hover:not([aria-pressed=true]){background:#3a536d}
.view-foot{min-height:51px;padding-block:9px;color:#c9d9ea;font-size:.875rem;border-top:1px solid #38526d;flex-wrap:wrap}
.route-steps{border-top:1px solid #38526d;background:#1b3047;padding:12px clamp(10px,2.5vw,18px)}
.route-head,.route-actions,.route-floors{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.route-head{justify-content:space-between;margin-bottom:8px}
.route-head h3{font-size:.98rem;font-weight:700}
.route-head button,.route-floors button{border:1px solid #637f98;border-radius:7px;background:transparent;color:#e5f0fa;padding:5px 9px;font-size:.875rem}
.route-floors button[aria-pressed=true]{background:var(--lime);border-color:var(--lime);color:#182913;font-weight:700}
.route-head button:hover,.route-floors button:hover:not([aria-pressed=true]){background:#39536d}
#route-instruction{margin-top:7px;font-size:.875rem;color:#e3eef8}
.route-legend{display:flex;flex-wrap:wrap;gap:6px 14px;margin-top:9px;color:#cfdfed;font-size:.8125rem}
.route-legend span{display:flex;align-items:center;gap:6px}
.route-legend span::before{width:21px;border-top:3px solid #d6fa77;content:""}
.route-legend span+span::before{border-top:3px dashed #ffd97c}
#route-stairs-marker::before{border-top:3px solid #83d7fc}
#route-room-marker::before{width:9px;height:9px;border:0;border-radius:50%;background:#d8c6ff}
.map-shortcuts{position:absolute;z-index:1;left:10px;right:64px;bottom:10px;display:flex;flex-wrap:wrap;gap:6px;pointer-events:none}
.map-shortcuts button{display:flex;gap:7px;align-items:center;min-height:38px;padding:5px 9px;border:1px solid #829bb6;border-radius:8px;background:#15283e;color:#fff;font-size:.875rem;font-weight:700;pointer-events:auto}
.map-shortcuts button[aria-pressed=true]{background:var(--lime);color:#1e3116;border-color:var(--lime)}
.map-shortcuts .route-outside{border-color:#ffd97c}
.route-outside::before{width:19px;border-top:3px dashed #ffd97c;content:""}
.map-shortcuts button:hover:not([aria-pressed=true]){background:#2b4662}
.inspector{grid-area:inspector;min-width:0;display:grid;gap:12px}
.panel{min-width:0;padding:15px;border:1px solid var(--border);border-radius:15px;background:#fff}
.room-search{grid-area:search;position:relative;z-index:2}
.room-search form{position:relative}
.search-modes{display:flex;gap:4px;margin-bottom:12px;padding:3px;border-radius:9px;background:#edf3f8}
.search-modes button{flex:1;min-width:0;background:transparent;border:0;border-radius:6px;padding:6px 8px;font-size:.92rem;font-weight:650}
.search-modes button[aria-pressed=true]{background:#fff;color:#183e5a;box-shadow:0 1px 4px #1c39521c}
.route-form{display:grid;gap:6px}
.route-form label{font-size:.875rem;font-weight:650}
.route-form select{min-width:0;width:100%;font:inherit;font-size:.875rem;color:#14263a;background:#f6f9fc;border:1px solid #afc1d5;border-radius:8px;padding:7px 8px}
.route-scope{margin-bottom:3px;color:var(--muted);font-size:.875rem}
.room-input{display:flex;gap:6px}
.room-input input,.room-input button,.room-results button{font:inherit;border-radius:8px;min-height:40px}
.room-input input{flex:1;min-width:0;width:100%;border:1px solid #afc1d5;background:#f6f9fc;color:#14263a;padding:6px 8px}
.room-input button{padding:6px 11px;border:0;background:var(--lime);color:#1b2d13;font-weight:750}
.room-input button:hover{background:#b9ef68}
.room-results{position:absolute;top:45px;inset-inline:0;display:grid;max-height:251px;overflow:auto;z-index:4;border:1px solid #c6d7e6;border-radius:8px;background:#fff;box-shadow:0 8px 20px #172c4833}
.room-results button{display:flex;align-items:center;justify-content:space-between;gap:8px;border:0;background:transparent;padding:6px 10px;text-align:left;font-weight:650}
.room-results button:hover,.room-results button:focus-visible{background:#e9f2fa;outline-offset:-2px}
.room-results button span{font-size:.875rem;font-weight:500;color:var(--muted)}
.room-status{margin-top:7px;font-size:.875rem;color:var(--muted)}
.room-status.error{color:#9c2335}
.room-action{justify-self:start;border:1px solid #afc1d5;border-radius:8px;background:#f1f6fb;padding:6px 10px;font-size:.875rem;font-weight:650}
#room-directions{margin-top:7px}
.room-action:hover{background:#e3edf6}
.section-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:12px}
.section-head h2{font-size:1.06rem}.section-head span{font-size:.875rem;color:var(--muted)}
.tower-picker{display:grid;grid-template-columns:1fr .75fr 1fr;grid-template-rows:repeat(3,minmax(38px,1fr));gap:5px}
.tower-picker button{border:1px solid #dae4ef;border-radius:8px;background:#f1f6fb;min-height:38px;font-size:.875rem;font-weight:650}
.tower-picker button[aria-pressed=true]{background:#203c55;color:#fff;border-color:#203c55}
.tower-picker button:hover:not([aria-pressed=true]){background:#dfebf6}
.tower-location{font-size:.875rem;color:var(--muted);margin-top:10px}
.toggle{display:flex;align-items:center;gap:8px;margin-top:12px;font-size:.875rem;color:#314964}
.toggle input{accent-color:#285d79;width:17px;height:17px}
[hidden]{display:none!important}
.plan-panel a{display:block;background:#f5f8fb;border:1px solid var(--border);border-radius:8px;padding:6px}
.plan-panel img{display:block;width:100%;max-height:245px;object-fit:contain}
.plan-panel p:empty{display:none}.plan-panel p{margin-top:6px;color:#984235;font-size:.875rem}
footer{max-width:1600px;margin:auto;padding:15px clamp(12px,4vw,60px) 23px;color:var(--muted);font-size:.875rem}
@media(max-width:840px){main{grid-template-columns:1fr;grid-template-areas:"search" "viewer" "inspector";grid-template-rows:auto;gap:12px}.stage{height:clamp(330px,56vh,615px)}}
@media(max-width:530px){.mast{min-height:68px;padding:9px 12px}.mark{width:36px;height:36px;border-radius:9px}main{padding:10px 8px 0}.viewer{border-radius:14px}.view-head,.view-foot{padding-inline:10px}.view-controls button{padding:5px 7px}.stage{height:clamp(325px,53vh,580px)}.instrument{right:6px;bottom:7px}.instrument button{min-width:32px;min-height:33px}.inspector{gap:7px}.panel{padding:10px}.tower-picker{grid-template-rows:repeat(3,minmax(36px,1fr))}.tower-picker button{min-height:35px}}
@media(max-width:530px){.stage{height:clamp(355px,61svh,585px)}}
