/* eShowcase · Interactive Mall Directory (demo) */
@font-face { font-family: 'Lato'; src: local('Lato Regular'), local('Lato-Regular'), url('../fonts/Lato-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Lato'; src: local('Lato Bold'), local('Lato-Bold'), url('../fonts/Lato-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Lato'; src: local('Lato Black'), local('Lato-Black'), url('../fonts/Lato-Black.ttf') format('truetype'); font-weight: 900; font-display: swap; }

:root {
  --brand: #ff5c06; --brand-d: #e14a00; --brand-soft: #fff1e8;
  --grey: #666666; --light: #f3f3f3; --ink: #1f2a37; --muted: #8a93a0; --line: #e6e8ec;
  --card: #ffffff; --radius: 22px; --shadow: 0 18px 50px rgba(31,42,55,.16), 0 3px 10px rgba(31,42,55,.06);
  --font: 'Lato', 'PingFang HK', 'PingFang TC', 'Noto Sans CJK TC', 'Noto Sans TC', 'Microsoft JhengHei', 'Helvetica Neue', Arial, sans-serif;
  --side: 340px; --top: 74px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--light); color: var(--ink); font-family: var(--font);
  -webkit-user-select: none; user-select: none; -webkit-font-smoothing: antialiased; touch-action: manipulation; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* ---------- top bar ---------- */
.topbar { position: fixed; inset: 0 0 auto 0; height: var(--top); display: flex; align-items: center; gap: 18px; padding: 0 26px;
  background: #fff; border-bottom: 1px solid var(--line); z-index: 30; }
.brandmark { width: 44px; height: 44px; border-radius: 14px; background: var(--brand); display: grid; place-items: center; box-shadow: 0 6px 16px rgba(255,92,6,.35); }
.brandmark svg { width: 26px; height: 26px; }
.title { display: flex; flex-direction: column; line-height: 1.1; }
.title b { font-size: 22px; font-weight: 900; letter-spacing: .5px; }
.title span { font-size: 12.5px; font-weight: 700; letter-spacing: 2.2px; color: var(--muted); text-transform: uppercase; margin-top: 4px; }
.demo-badge { margin-left: 6px; padding: 6px 12px; border-radius: 99px; background: var(--brand-soft); color: var(--brand-d); font-size: 12.5px; font-weight: 900; letter-spacing: 1px; border: 1px dashed rgba(255,92,6,.5); }
.spacer { flex: 1; }
.clock { font-size: 20px; font-weight: 900; letter-spacing: 1px; color: var(--ink); font-variant-numeric: tabular-nums; }
.clock small { display: block; font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: 1px; text-align: right; }
.floor-pill { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 16px; border-radius: 99px; background: var(--ink); color: #fff; font-weight: 900; font-size: 13px; letter-spacing: 2px; }
.floor-pill i { font-style: normal; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; font-size: 16px; letter-spacing: 0; }
.lang { display: flex; padding: 4px; border-radius: 99px; background: var(--light); border: 1px solid var(--line); }
.lang button { min-width: 64px; height: 40px; padding: 0 14px; border-radius: 99px; font-weight: 900; font-size: 15px; color: var(--grey); transition: all .25s; }
.lang button.on { background: #fff; color: var(--brand); box-shadow: 0 3px 10px rgba(31,42,55,.12); }

/* ---------- sidebar ---------- */
.side { position: fixed; top: var(--top); left: 0; bottom: 0; width: var(--side); background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 20; }
.search { margin: 20px 20px 12px; position: relative; }
.search input { width: 100%; height: 54px; border-radius: 16px; border: 2px solid var(--line); background: var(--light); padding: 0 48px 0 50px; font: 700 16px var(--font); color: var(--ink); outline: none; transition: border-color .2s, background .2s; -webkit-user-select: text; user-select: text; }
.search input:focus { border-color: var(--brand); background: #fff; }
.search svg { position: absolute; left: 16px; top: 15px; width: 24px; height: 24px; stroke: var(--muted); }
.search .clear { position: absolute; right: 8px; top: 8px; width: 38px; height: 38px; border-radius: 12px; display: none; color: var(--muted); font-size: 22px; font-weight: 700; }
.search.has .clear { display: block; }
.zones { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 14px; border-bottom: 1px solid var(--line); }
.zone-chip { height: 40px; min-width: 46px; padding: 0 14px; border-radius: 99px; background: var(--light); font-weight: 900; font-size: 14px; color: var(--grey); display: inline-flex; align-items: center; gap: 7px; border: 2px solid transparent; transition: all .2s; }
.zone-chip i { width: 12px; height: 12px; border-radius: 4px; transform: rotate(45deg); background: var(--c); }
.zone-chip.on { background: #fff; border-color: var(--c, var(--brand)); color: var(--ink); box-shadow: 0 4px 12px rgba(31,42,55,.1); }
.zone-chip[data-zone="all"].on { border-color: var(--brand); color: var(--brand); }
.count { padding: 12px 22px 6px; font-size: 12.5px; font-weight: 900; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; }
.list { flex: 1; overflow-y: auto; padding: 4px 12px 20px; -webkit-overflow-scrolling: touch; }
.list::-webkit-scrollbar { width: 6px; } .list::-webkit-scrollbar-thumb { background: #d9dde3; border-radius: 3px; }
.item { width: 100%; display: flex; align-items: center; gap: 14px; padding: 10px 10px; border-radius: 16px; text-align: left; transition: background .2s, transform .15s; }
.item:active { transform: scale(.985); }
.item:hover { background: var(--light); }
.item.on { background: var(--brand-soft); box-shadow: inset 0 0 0 2px rgba(255,92,6,.35); }
.logo-mini { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-weight: 900; font-size: 15px; color: #fff; background: var(--c); letter-spacing: .5px; }
.item .meta { flex: 1; min-width: 0; }
.item .nm { font-weight: 900; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .sub { font-size: 12.5px; color: var(--muted); font-weight: 700; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .no { flex: none; font-size: 12px; font-weight: 900; color: var(--grey); background: var(--light); padding: 5px 8px; border-radius: 8px; letter-spacing: .5px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); font-weight: 700; }
.side-foot { padding: 12px 20px 16px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); font-weight: 700; line-height: 1.5; }
.side-foot b { color: var(--brand-d); }

/* ---------- map ---------- */
.stage { position: fixed; top: var(--top); left: var(--side); right: 0; bottom: 0; overflow: hidden;
  background: radial-gradient(1200px 700px at 60% 40%, #fbfbfc 0%, #eef0f3 60%, #e6e9ee 100%); touch-action: none; }
#map { width: 100%; height: 100%; display: block; }
#map text { font-family: var(--font); }
#layer-labels, #layer-overlay, #layer-shadow, #route-layer, #dog-layer, .layer-labels, .layer-overlay, .layer-shadow, .route-layer { pointer-events: none; }
.unit { cursor: pointer; transition: transform .45s cubic-bezier(.2,.9,.25,1.2), opacity .35s, filter .35s; }
.unit .unit-top { transition: stroke .3s, stroke-width .3s; }
#map.dimmed .unit:not(.selected):not(.zone-in):not(.route-mark) { opacity: .38; }
#map.dimmed .unit.route-mark:not(.selected) { opacity: .8; }
#map.dimmed .unit-no:not(.selected):not(.zone-in) { opacity: .35; }
.unit.selected { transform: translateY(-16px); filter: drop-shadow(0 14px 10px rgba(255,92,6,.38)); }
.unit.selected .unit-top { stroke: #ff5c06; stroke-width: 4; }
.unit.flash .unit-top { animation: flash 1s ease 2; }
@keyframes flash { 50% { fill: #fff; } }
.unit-no { transition: transform .45s cubic-bezier(.2,.9,.25,1.2), opacity .35s; }
.unit-no.selected { transform: translateY(-16px); }
.hint { position: absolute; left: 50%; top: 22px; transform: translateX(-50%); padding: 12px 20px 12px 16px; border-radius: 99px; background: rgba(31,42,55,.88); color: #fff; font-weight: 700; font-size: 15px; display: flex; gap: 10px; align-items: center; box-shadow: var(--shadow); transition: opacity .4s, transform .4s; pointer-events: none; white-space: nowrap; }
.hint svg { width: 22px; height: 22px; }
.hint.hide { opacity: 0; transform: translate(-50%, -14px); }

.zoom { position: absolute; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 8px; z-index: 5; transition: right .45s cubic-bezier(.2,.8,.2,1); }
.zoom button { width: 54px; height: 54px; border-radius: 16px; background: #fff; box-shadow: 0 6px 18px rgba(31,42,55,.12); font-size: 26px; font-weight: 900; color: var(--ink); display: grid; place-items: center; }
.zoom button:active { transform: scale(.94); }
.zoom svg { width: 24px; height: 24px; }
body.card-open .zoom { right: 444px; }

.legend { position: absolute; left: 22px; bottom: 22px; display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-radius: 18px; background: rgba(255,255,255,.92); box-shadow: 0 6px 18px rgba(31,42,55,.1); font-size: 13px; font-weight: 700; color: var(--grey); flex-wrap: wrap; max-width: calc(100% - 140px); }
.legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend i.z { width: 13px; height: 13px; border-radius: 4px; background: var(--c); transform: rotate(45deg) scale(.95); }
.legend i.yah { width: 14px; height: 14px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--brand); }
.legend i.path { width: 26px; height: 6px; border-radius: 3px; background: repeating-linear-gradient(90deg, var(--brand) 0 8px, #ffb48a 8px 12px); }
.legend .sep { width: 1px; height: 18px; background: var(--line); }

/* ---------- info card ---------- */
.card { position: absolute; top: 18px; right: 18px; bottom: 18px; width: 408px; background: var(--card); border-radius: 28px; box-shadow: var(--shadow); z-index: 10; display: flex; flex-direction: column; overflow: hidden;
  transform: translateX(calc(100% + 40px)); transition: transform .5s cubic-bezier(.2,.85,.2,1), opacity .3s; opacity: 0; }
body.card-open .card { transform: none; opacity: 1; }
.card .photo { position: relative; height: 190px; flex: none; background: linear-gradient(135deg, var(--c1), var(--c2)); overflow: hidden; }
.card .photo::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255,255,255,.08) 0 14px, transparent 14px 28px); }
.card .photo .ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: rgba(255,255,255,.95); font-weight: 900; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; }
.card .photo .ph svg { width: 54px; height: 54px; stroke: rgba(255,255,255,.95); }
.card .ribbon { position: absolute; left: 16px; top: 16px; padding: 6px 12px; border-radius: 99px; background: rgba(255,255,255,.95); color: var(--brand-d); font-size: 12px; font-weight: 900; letter-spacing: 1px; }
.card .close { position: absolute; right: 14px; top: 14px; width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.95); font-size: 26px; font-weight: 700; color: var(--ink); display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.card .body { flex: 1; overflow-y: auto; padding: 0 26px 18px; position: relative; }
.card .head { display: flex; gap: 16px; align-items: flex-end; margin-top: -38px; position: relative; }
.logo { flex: none; width: 88px; height: 88px; border-radius: 24px; background: #fff; box-shadow: 0 8px 22px rgba(31,42,55,.18); display: grid; place-items: center; position: relative; }
.logo b { width: 72px; height: 72px; border-radius: 18px; display: grid; place-items: center; font-weight: 900; font-size: 25px; color: var(--c); border: 2px dashed var(--c); background: color-mix(in srgb, var(--c) 8%, white); }
.logo small { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font-size: 9.5px; font-weight: 900; letter-spacing: 1.5px; color: var(--muted); }
.chips { display: flex; gap: 6px; padding-bottom: 6px; flex-wrap: wrap; }
.chip { padding: 6px 10px; border-radius: 10px; font-size: 12.5px; font-weight: 900; background: var(--light); color: var(--grey); letter-spacing: .4px; }
.chip.z { background: var(--c); color: #fff; }
.card h2 { margin: 26px 0 2px; font-size: 27px; font-weight: 900; line-height: 1.15; }
.card h3 { margin: 0 0 14px; font-size: 15px; font-weight: 700; color: var(--muted); }
.rows { border-top: 1px solid var(--line); }
.row { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.row .ic { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--light); display: grid; place-items: center; }
.row .ic svg { width: 20px; height: 20px; stroke: var(--grey); }
.row .k { font-size: 11.5px; font-weight: 900; letter-spacing: 1.2px; color: var(--muted); text-transform: uppercase; }
.row .v { font-size: 16px; font-weight: 700; margin-top: 2px; }
.desc { font-size: 15px; line-height: 1.6; color: #3b4656; margin: 14px 0 0; font-weight: 400; }
.card .foot { flex: none; padding: 16px 22px 22px; border-top: 1px solid var(--line); background: #fff; }
.btn-dir { width: 100%; height: 66px; border-radius: 20px; background: var(--brand); color: #fff; font-size: 20px; font-weight: 900; letter-spacing: .5px; display: flex; align-items: center; justify-content: center; gap: 12px; box-shadow: 0 10px 24px rgba(255,92,6,.38); transition: transform .15s, box-shadow .2s, background .2s; }
.btn-dir:active { transform: scale(.98); box-shadow: 0 5px 14px rgba(255,92,6,.38); }
.btn-dir svg { width: 26px; height: 26px; }
.btn-dir .paw { animation: pawbob 1.4s ease-in-out infinite; }
@keyframes pawbob { 50% { transform: translateY(-3px) rotate(-8deg); } }
.demo-note { text-align: center; font-size: 11.5px; color: var(--muted); font-weight: 700; margin-top: 10px; }

/* ---------- route banner ---------- */
.route { position: absolute; left: 50%; top: 18px; transform: translate(-50%, calc(-100% - 60px)); visibility: hidden; min-width: 520px; max-width: calc(100% - 120px); background: #fff; border-radius: 24px; box-shadow: var(--shadow); padding: 12px 12px 12px 14px; display: flex; align-items: center; gap: 14px; z-index: 12; transition: transform .5s cubic-bezier(.2,.85,.2,1), visibility .5s; }
body.routing .route { transform: translate(-50%, 0); visibility: visible; }
.route .logo-mini { width: 54px; height: 54px; border-radius: 16px; font-size: 17px; }
.route .info { flex: 1; min-width: 0; }
.route .to { font-size: 12px; font-weight: 900; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; }
.route .nm { font-size: 19px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.route .stats { display: flex; gap: 8px; margin-top: 4px; }
.route .stat { font-size: 13.5px; font-weight: 900; color: var(--brand-d); background: var(--brand-soft); padding: 4px 10px; border-radius: 9px; white-space: nowrap; }
.route .stat.ok { color: #1f8a4c; background: #e7f7ee; }
.route button { height: 52px; padding: 0 18px; border-radius: 16px; font-weight: 900; font-size: 15px; white-space: nowrap; }
.route .again { background: var(--light); color: var(--ink); }
.route .info-btn { background: var(--light); color: var(--ink); }
.route .end { background: var(--ink); color: #fff; }
.progress { position: absolute; left: 22px; right: 22px; bottom: 0; height: 4px; border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 4px; }

/* ---------- route & dog (SVG) ---------- */
.route-halo { fill: none; stroke: #ff5c06; stroke-opacity: .18; stroke-width: 30; stroke-linecap: round; stroke-linejoin: round; }
.route-line { fill: none; stroke: #ff5c06; stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; }
.route-flow { fill: none; stroke: #fff; stroke-width: 4.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 2 20; animation: flow 0.9s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -22; } }
.dest-pin { transform-box: fill-box; transform-origin: 50% 100%; }
.dest-pin.pop { animation: pinpop .6s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes pinpop { from { transform: scale(0) translateY(-30px); opacity: 0; } to { transform: none; opacity: 1; } }
.dest-pulse { animation: pulse 1.6s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulse { from { transform: scale(.4); opacity: .7; } to { transform: scale(1.6); opacity: 0; } }
.bubble { transition: opacity .3s; }

/* idle overlay */
.attract { position: absolute; right: 24px; top: 22px; padding: 10px 16px; border-radius: 14px; background: #fff; font-size: 13px; font-weight: 700; color: var(--grey); box-shadow: 0 6px 18px rgba(31,42,55,.1); display: none; }

@media (max-width: 1200px) { :root { --side: 300px; } .card { width: 370px; } body.card-open .zoom { right: 400px; } .route { min-width: 440px; } }

/* ---------- shop-name labels ---------- */
#name-labels, .name-labels { pointer-events: none; }
.unit-no.has-name { opacity: 0 !important; }
.name-label.nl-turn .nl-name { fill: #1f2a37; }
.name-label { transition: transform .45s cubic-bezier(.2,.9,.25,1.2), opacity .35s; animation: nlIn .35s ease both; }
.name-label.selected { transform: translateY(-16px); }
.name-label .nl-name { letter-spacing: .2px; }
@keyframes nlIn { from { opacity: 0; } }
#map.dimmed .name-label:not(.selected):not(.zone-in):not(.nl-turn):not(.nl-dest) { opacity: .35; }

/* ---------- step-by-step directions (sidebar while routing) ---------- */
.steps { display: none; flex: 1; flex-direction: column; overflow: hidden; }
body.routing .side .search, body.routing .side .zones, body.routing .side .count, body.routing .side .list { display: none; }
body.routing .steps { display: flex; }
.steps-head { padding: 22px 22px 14px; border-bottom: 1px solid var(--line); }
.steps-head .k { font-size: 12.5px; font-weight: 900; letter-spacing: 1.5px; color: var(--brand-d); text-transform: uppercase; }
.steps-head .d { font-size: 21px; font-weight: 900; margin-top: 6px; }
.steps-head .d span { font-size: 14px; color: var(--muted); font-weight: 700; }
.steps ol { list-style: none; margin: 0; padding: 12px 12px 8px; overflow-y: auto; flex: 1; position: relative; }
.steps li { position: relative; }
.steps li:not(:last-child)::after { content: ''; position: absolute; left: 31px; top: 52px; bottom: -6px; width: 3px; border-radius: 2px; background: repeating-linear-gradient(#ffd0b5 0 5px, transparent 5px 9px); }
.step { width: 100%; display: flex; gap: 12px; align-items: flex-start; padding: 12px 12px; margin-bottom: 6px; border-radius: 18px; text-align: left; transition: background .3s, box-shadow .3s, transform .2s; }
.step .num { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--light); color: var(--grey); display: grid; place-items: center; font-weight: 900; font-size: 17px; transition: all .3s; position: relative; z-index: 1; }
.step .sic { flex: none; width: 30px; height: 40px; display: grid; place-items: center; }
.step .sic svg { width: 26px; height: 26px; stroke: var(--grey); transition: stroke .3s; }
.step .tx { flex: 1; font-size: 16px; font-weight: 700; line-height: 1.45; color: #3b4656; padding-top: 8px; }
.step.done .num { background: #ffe6d6; color: var(--brand-d); }
.step.done .tx { color: var(--muted); }
.step.on { background: var(--brand-soft); box-shadow: inset 0 0 0 2px rgba(255,92,6,.4); }
.step.on .num { background: var(--brand); color: #fff; box-shadow: 0 6px 14px rgba(255,92,6,.4); transform: scale(1.06); }
.step.on .sic svg { stroke: var(--brand); }
.step.on .tx { color: var(--ink); font-weight: 900; }
.step.arrive.on { background: #e9f8ef; box-shadow: inset 0 0 0 2px rgba(31,138,76,.35); }
.step.arrive.on .num { background: #1f9d57; box-shadow: 0 6px 14px rgba(31,157,87,.35); }
.step.arrive.on .sic svg { stroke: #1f9d57; }
.steps-foot { padding: 10px 22px 14px; font-size: 11.5px; font-weight: 700; color: var(--muted); }

/* ---------- "Take it on your phone" (QR) ---------- */
.btn-phone { width: 100%; height: 54px; margin-top: 10px; border-radius: 18px; background: #fff; color: var(--ink); border: 2px solid var(--ink); font-size: 16.5px; font-weight: 900; display: flex; align-items: center; justify-content: center; gap: 10px; transition: transform .15s, background .2s; }
.btn-phone small { font-weight: 700; color: var(--muted); font-size: 13px; }
.btn-phone:active { transform: scale(.98); background: var(--light); }
.btn-phone svg { width: 22px; height: 22px; stroke: var(--ink); flex: none; }
.btn-phone .qr-ic { stroke: var(--brand); }
.route .phone-btn { background: var(--brand-soft); color: var(--brand-d); display: inline-flex; align-items: center; gap: 8px; box-shadow: inset 0 0 0 2px rgba(255,92,6,.35); }
.route .phone-btn svg { width: 20px; height: 20px; stroke: var(--brand-d); }
.qr-modal { position: fixed; inset: 0; z-index: 60; background: rgba(20,28,38,.0); display: grid; place-items: center; transition: background .3s; padding: 20px; }
.qr-modal[hidden] { display: none; }
body.qr-open .qr-modal { background: rgba(20,28,38,.55); }
.qr-box { position: relative; width: min(520px, 100%); max-height: 100%; overflow: auto; background: #fff; border-radius: 30px; box-shadow: var(--shadow); padding: 26px 30px 24px; transform: translateY(24px) scale(.97); opacity: 0; transition: transform .35s cubic-bezier(.2,.9,.25,1.1), opacity .25s; }
body.qr-open .qr-box { transform: none; opacity: 1; }
.qr-box .close { position: absolute; right: 16px; top: 16px; width: 46px; height: 46px; border-radius: 50%; background: var(--light); font-size: 26px; font-weight: 700; display: grid; place-items: center; }
.qr-head { display: flex; gap: 14px; align-items: center; padding-right: 50px; }
.qr-head .logo-mini { width: 52px; height: 52px; border-radius: 16px; }
.qr-head .k { font-size: 12.5px; font-weight: 900; letter-spacing: 1.5px; color: var(--brand-d); text-transform: uppercase; }
.qr-head .nm { font-size: 22px; font-weight: 900; margin-top: 4px; line-height: 1.2; }
.qr-head .nm span { font-size: 14px; color: var(--muted); font-weight: 700; }
.qr-code { margin: 20px auto 16px; width: min(330px, 100%); aspect-ratio: 1; padding: 10px; border-radius: 22px; background: #fff; box-shadow: 0 0 0 2px var(--line), 0 10px 26px rgba(31,42,55,.08); }
.qr-code svg { width: 100%; height: 100%; display: block; }
.qr-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.qr-steps li { display: flex; gap: 12px; align-items: center; font-size: 15.5px; font-weight: 700; color: #3b4656; line-height: 1.4; }
.qr-steps li b { color: var(--ink); font-weight: 900; }
.qr-steps i { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 14px; }
.qr-url { margin-top: 14px; padding: 8px 12px; border-radius: 12px; background: var(--light); font: 700 11.5px/1.45 ui-monospace, Menlo, Consolas, monospace; color: var(--muted); word-break: break-all; -webkit-user-select: text; user-select: text; }
.qr-nonet { margin: 22px 0 6px; padding: 22px; border-radius: 20px; background: var(--brand-soft); border: 2px dashed rgba(255,92,6,.45); display: flex; gap: 16px; align-items: flex-start; }
.qr-nonet svg { flex: none; width: 40px; height: 40px; stroke: var(--brand-d); }
.qr-nonet p { margin: 0; font-size: 15px; line-height: 1.55; font-weight: 700; color: #3b4656; }
.qr-nonet p b { display: block; color: var(--brand-d); font-size: 17px; margin-bottom: 4px; }

/* ---------- toast + add-to-home-screen ---------- */
.toast { position: absolute; left: 50%; top: 16px; transform: translate(-50%, -80px); padding: 10px 18px; border-radius: 99px; background: var(--ink); color: #fff; font-weight: 900; font-size: 14px; white-space: nowrap; z-index: 25; transition: transform .45s cubic-bezier(.2,.9,.25,1.1); pointer-events: none; box-shadow: var(--shadow); }
.toast.on { transform: translate(-50%, 0); }
body.routing .toast.on { transform: translate(-50%, 0); top: auto; bottom: 18px; }
.a2hs { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); width: min(560px, calc(100% - 20px)); z-index: 40; background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 10px 10px 10px 12px; display: flex; align-items: center; gap: 12px; animation: a2hsIn .5s cubic-bezier(.2,.9,.25,1.1) both; }
.a2hs[hidden] { display: none; }
@keyframes a2hsIn { from { transform: translate(-50%, 30px); opacity: 0; } }
.a2hs img { width: 42px; height: 42px; border-radius: 11px; flex: none; }
.a2hs .tx { flex: 1; font-size: 13.5px; font-weight: 700; line-height: 1.4; color: #3b4656; }
.a2hs .tx b { color: var(--ink); font-weight: 900; }
.a2hs .go { height: 40px; padding: 0 16px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 900; font-size: 14px; flex: none; }
.a2hs .x { width: 34px; height: 34px; border-radius: 50%; background: var(--light); font-size: 20px; font-weight: 700; color: var(--grey); flex: none; }
.ios-share { display: inline-block; width: 14px; height: 17px; vertical-align: -3px; margin: 0 1px;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 18' fill='none' stroke='%23007aff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 1v10M3.5 4.5 7 1l3.5 3.5M4.5 7H2v10h10V7H9.5'/%3E%3C/svg%3E"); }
.a2hs.ios::after { content: ''; position: absolute; left: 50%; bottom: -9px; width: 18px; height: 18px; background: #fff; transform: translateX(-50%) rotate(45deg); border-radius: 3px; }
.sheet-handle { display: none; }

/* ---------- phone (portrait) layout: full-screen map + bottom sheet ---------- */
@media (max-width: 760px) {
  :root { --top: calc(54px + env(safe-area-inset-top)); --sheet: 40vh; }
  body.routing { --sheet: 36vh; }
  body.sheet-full { --sheet: 76vh; }
  body.routing.sheet-full { --sheet: 62vh; }
  .topbar { padding: env(safe-area-inset-top) 12px 0; gap: 10px; }
  .brandmark { width: 34px; height: 34px; border-radius: 11px; } .brandmark svg { width: 20px; height: 20px; }
  .title b { font-size: 17px; } .title span { display: none; }
  .demo-badge { font-size: 10.5px; padding: 4px 8px; margin-left: 0; }
  .clock, .floor-pill { display: none; }
  .lang { padding: 3px; } .lang button { min-width: 44px; height: 32px; padding: 0 10px; font-size: 13px; }
  .stage { left: 0; bottom: 0; }
  .side { top: auto; bottom: 0; right: 0; width: auto; height: var(--sheet); border-right: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -10px 30px rgba(31,42,55,.14); padding-bottom: env(safe-area-inset-bottom); z-index: 22; }
  .side { transition: transform .4s cubic-bezier(.2,.85,.2,1); }
  body.card-open .side { transform: translateY(105%); }
  .sheet-handle { display: block; flex: none; height: 22px; width: 100%; position: relative; }
  .sheet-handle i { position: absolute; left: 50%; top: 8px; width: 42px; height: 5px; margin-left: -21px; border-radius: 3px; background: #d5d9df; }
  .search { margin: 2px 14px 10px; } .search input { height: 46px; font-size: 16px; border-radius: 14px; } .search svg { top: 11px; } .search .clear { top: 4px; }
  .zones { flex-wrap: nowrap; overflow-x: auto; padding: 0 14px 10px; scrollbar-width: none; } .zones::-webkit-scrollbar { display: none; }
  .zone-chip { height: 34px; flex: none; font-size: 13px; padding: 0 12px; }
  .count { padding: 8px 16px 4px; font-size: 11.5px; }
  .list { padding: 2px 8px 12px; } .item { padding: 8px; gap: 12px; } .logo-mini { width: 40px; height: 40px; border-radius: 12px; font-size: 13px; }
  .side-foot { display: none; }
  .steps-head { padding: 4px 16px 10px; } .steps-head .d { font-size: 17px; margin-top: 3px; } .steps-head .k { font-size: 11px; }
  .steps ol { padding: 8px 8px 4px; } .step { padding: 8px 10px; gap: 10px; margin-bottom: 4px; border-radius: 14px; }
  .step .num { width: 32px; height: 32px; font-size: 14px; } .step .sic { width: 24px; height: 32px; } .step .sic svg { width: 22px; height: 22px; }
  .step .tx { font-size: 14.5px; padding-top: 5px; line-height: 1.4; }
  .steps li:not(:last-child)::after { left: 25px; top: 42px; }
  .steps-foot { padding: 4px 16px 8px; }
  .zoom, .legend { display: none; }
  .hint { top: 12px; font-size: 13px; padding: 9px 14px 9px 12px; max-width: calc(100% - 24px); white-space: normal; } .hint svg { width: 18px; height: 18px; flex: none; }
  .card { position: fixed; top: auto; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; height: min(68vh, 600px); border-radius: 24px; z-index: 35; transform: translateY(calc(100% + 30px)); }
  .card .photo { height: 112px; } .card .head { margin-top: -30px; } .logo { width: 70px; height: 70px; border-radius: 20px; } .logo b { width: 56px; height: 56px; font-size: 20px; border-radius: 14px; }
  .card .body { padding: 0 18px 12px; } .card h2 { font-size: 22px; margin-top: 22px; } .card h3 { font-size: 13.5px; margin-bottom: 8px; }
  .row { padding: 8px 0; } .row .ic { width: 34px; height: 34px; } .row .v { font-size: 15px; } .desc { font-size: 14px; }
  .card .foot { padding: 10px 14px 12px; } .btn-dir { height: 56px; font-size: 18px; border-radius: 18px; } .demo-note { margin-top: 6px; }
  .btn-phone, .route .phone-btn { display: none; }      /* already on the phone */
  .route { left: 8px; right: 8px; top: 8px; min-width: 0; max-width: none; transform: translateY(calc(-100% - 30px)); border-radius: 20px; padding: 8px 8px 10px 10px; gap: 10px; }
  body.routing .route { transform: none; }
  .route .logo-mini { width: 42px; height: 42px; border-radius: 13px; font-size: 13px; }
  .route .to { font-size: 10.5px; letter-spacing: 1px; } .route .nm { font-size: 16px; }
  .route .stats { gap: 5px; margin-top: 3px; } .route .stat { font-size: 11.5px; padding: 3px 7px; }
  .route .stat:nth-child(2) { display: none; }
  .route button { height: 42px; padding: 0 12px; border-radius: 13px; font-size: 13.5px; }
  .route .again span, .route .info-btn { display: none; }
  .progress { left: 16px; right: 16px; }
  .a2hs { bottom: calc(var(--sheet) + 12px); }
  body.card-open .a2hs, body.qr-open .a2hs, body.sheet-full .a2hs { display: none; }
  body.routing .toast.on { bottom: auto; top: 96px; }
  .qr-box { padding: 20px 18px; border-radius: 24px; }
}

/* ---------- animated escalators (steps scroll, handrail glint, chevrons pulse) ---------- */
.escalator .esc-steps line { stroke: #24507d; stroke-width: 1.3; opacity: .7; }
.escalator .esc-steps { animation: escStep var(--esc-t, .6s) linear infinite; will-change: transform; }
.escalator.dir-down .esc-steps { animation-direction: reverse; }
@keyframes escStep { from { transform: translate(0, 0); } to { transform: translate(var(--dx), var(--dy)); } }
.escalator .esc-rail { stroke: #e9eff6; stroke-width: 3; stroke-linecap: round; }
.escalator .esc-glint { stroke: #fff; stroke-width: 3.4; stroke-linecap: round; stroke-dasharray: 14 86; opacity: .95; filter: drop-shadow(0 0 1.5px rgba(160,215,255,.9));
  animation: escGlint calc(var(--esc-t, .6s) * 6) linear infinite; }
.escalator.dir-down .esc-glint { animation-direction: reverse; }
@keyframes escGlint { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -100; } }
.escalator .esc-chev { fill: none; stroke: #fff; stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; opacity: .45; animation: escChev 1.4s ease-in-out infinite; }
.escalator .esc-chev.c1 { animation-delay: .35s; }
@keyframes escChev { 0%, 100% { opacity: .35; } 30% { opacity: 1; } 60% { opacity: .55; } }
.escalator.dir-up .chev-down, .escalator.dir-down .chev-up, .escalator.dir-off .chev-down { display: none; }
.escalator.dir-off .esc-steps, .escalator.dir-off .esc-glint, .escalator.dir-off .esc-chev { animation: none; }
.escalator.dir-off .esc-glint { display: none; }
@media (prefers-reduced-motion: reduce) {
  .escalator .esc-steps, .escalator .esc-glint, .escalator .esc-chev { animation: none !important; }
  .escalator .esc-glint { display: none; } .escalator .esc-chev { opacity: .9; }
}

/* ================= multi-floor: stacked 2.5D view ================= */
/* each floor sits in <g class="floor-pos"> (translated up by the floor gap, set in app.js); the inner <g class="floor"> only fades / scales */
#map g.floor { transition: opacity .85s cubic-bezier(.45,0,.2,1); transform-box: fill-box; transform-origin: 50% 50%; }
#map g.floor.inactive { opacity: .38; pointer-events: none; }
#map g.floor .name-labels, #map g.floor .layer-labels, #map g.floor .layer-overlay .zone-tag { transition: opacity .45s ease; }
#map g.floor.inactive .name-labels, #map g.floor.inactive .layer-labels, #map g.floor.inactive .layer-overlay .zone-tag { opacity: 0; }
#map g.floor.inactive .escalator .esc-steps, #map g.floor.inactive .escalator .esc-glint, #map g.floor.inactive .escalator .esc-chev { animation-play-state: paused; }
#map g.floor.focus-in { animation: flFocusIn .9s cubic-bezier(.3,0,.2,1) both; }
#map g.floor.focus-out { animation: flFocusOut .9s cubic-bezier(.45,0,.2,1) both; }
@keyframes flFocusIn { 0% { scale: .955; } 100% { scale: 1; } }
@keyframes flFocusOut { 0% { scale: 1; } 45% { scale: .982; } 100% { scale: 1; } }
#dog-layer { transition: opacity .35s; }
/* inter-floor layers: corner columns, escalator bands spanning the gap, the gap part of a route */
.stack-layer { pointer-events: none; }
.stack-col { opacity: .9; }
.stack-col-line { stroke: #7f90a6; stroke-width: 1.6; stroke-dasharray: 3 7; opacity: .55; }
.stack-col.front { opacity: .45; } .stack-col-line.front { opacity: .35; }
.shaft { opacity: .78; transition: opacity .5s; }
.shaft-body { fill: url(#shaftGrad); stroke: #5d84b3; stroke-width: 1.4; stroke-opacity: .6; }
.shaft-rail { stroke: #2c5786; stroke-width: 3.2; stroke-linecap: round; opacity: .55; }
.shaft-treads { stroke: #3a6ea5; stroke-opacity: .42; stroke-dasharray: 3 13; animation: shaftUp 1.1s linear infinite; }
.shaft.dir-down .shaft-treads { animation-name: shaftDown; }
.shaft.dir-off .shaft-treads { animation: none; }
@keyframes shaftUp { to { stroke-dashoffset: -16; } }
@keyframes shaftDown { to { stroke-dashoffset: 16; } }
.shaft-badge circle { fill: #fff; stroke: #3a6ea5; stroke-width: 2.5; }
.shaft-badge path { fill: none; stroke: #3a6ea5; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.shaft.on-route { opacity: 1; }
.shaft.on-route .shaft-rail { stroke: #ff5c06; opacity: .8; }
.shaft.on-route .shaft-badge circle { stroke: #ff5c06; } .shaft.on-route .shaft-badge path { stroke: #ff5c06; }
body.routing .shaft:not(.on-route) { opacity: .35; }
.route-gap-dash { fill: none; stroke: #ff5c06; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 2 14; opacity: .7; animation: flow .9s linear infinite; }
body[data-view="floor"][data-floor="1"] .route-gap-dash { opacity: .3; }
body[data-view="floor"][data-floor="2"] .route-gap-dash { opacity: .5; }
@media (prefers-reduced-motion: reduce) {
  #map g.floor { transition: opacity .35s; }
  #map g.floor.focus-in, #map g.floor.focus-out { animation: none; }
  .shaft-treads { animation: none; }
  .floors .thumb { transition: none !important; }
}
.floors { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 20px; background: rgba(255,255,255,.94); box-shadow: 0 8px 22px rgba(31,42,55,.14); z-index: 6; }
.floors button { position: relative; width: 74px; height: 64px; border: 0; border-radius: 14px; background: rgba(241,243,247,.7); color: #1f2a37; font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; transition: background .25s, color .25s, transform .15s; }
.floors button b { font-size: 22px; line-height: 1; font-weight: 800; }
.floors button span { font-size: 11px; font-weight: 700; opacity: .7; }
.floors button.on { background: transparent; color: #fff; transition: color .3s ease .45s, transform .15s; }
.floors .thumb { position: absolute; left: 0; top: 0; width: 74px; height: 64px; border-radius: 14px; background: var(--brand); box-shadow: 0 6px 14px rgba(255,92,6,.35); transition: transform .85s cubic-bezier(.65,0,.35,1), width .3s, height .3s; z-index: 0; pointer-events: none; }
.floors button { z-index: 1; }
.floors button svg { width: 26px; height: 26px; stroke: currentColor; }
.floors button.on svg { animation: none; }
.floor-pill i.roll { animation: pillRoll .6s cubic-bezier(.3,1.4,.5,1); }
.floor-pill i.all { font-size: 11px; letter-spacing: -.5px; }
@keyframes pillRoll { 0% { transform: translateY(60%) scale(.6); opacity: 0; } 100% { transform: none; opacity: 1; } }
.floors button.on span { opacity: .95; }
.floors button:active { transform: scale(.95); }
.floors button.has::after { content: ''; position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: #1fa37a; box-shadow: 0 0 0 2px #fff; }
body.card-open .floors { right: 448px; transition: right .45s cubic-bezier(.2,.8,.2,1); }
@media (max-width: 1200px) { body.card-open .floors { right: 400px; } }
.floor-flash { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(.9); pointer-events: none; opacity: 0; display: flex; align-items: baseline; gap: 12px; padding: 14px 26px; border-radius: 22px; background: rgba(31,42,55,.82); color: #fff; z-index: 7; }
.floor-flash b { font-size: 44px; font-weight: 800; } .floor-flash span { font-size: 20px; font-weight: 700; opacity: .85; }
.floor-flash.on { animation: flFlash 1.3s ease forwards; }
@keyframes flFlash { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.85); } 18% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.04); } }
.legend i.esc { width: 22px; height: 12px; border-radius: 3px; background: repeating-linear-gradient(90deg, #8b97a8 0 3px, #c9d1dc 3px 6px); }
body[data-view="floor"][data-floor="1"] .legend span[data-floor="2"], body[data-view="floor"][data-floor="2"] .legend span[data-floor="1"] { display: none; }
.zone-chip sub { font-size: 9px; font-weight: 800; opacity: .6; margin-left: 2px; vertical-align: baseline; }
.item .no { display: inline-flex; align-items: center; gap: 6px; }
.fb { font-size: 10px; font-weight: 800; line-height: 1; padding: 3px 5px; border-radius: 6px; background: #e8ecf2; color: #4a5566; }
.fb.f2 { background: #ffe4d4; color: #c24400; }
.chip.fl { background: #1f2a37; color: #fff; }
.chip.fl.f2 { background: var(--brand); }
.stat.st-esc { display: inline-flex; align-items: center; gap: 4px; background: #fff2ea; color: #c24400; }
.esc-ic { width: 16px; height: 16px; stroke: currentColor; vertical-align: -3px; }
.step.escalator .sic { background: #ffe4d4; color: #c24400; }
.step .sfl { font-style: normal; font-size: 10px; font-weight: 800; margin-left: 6px; padding: 2px 5px; border-radius: 5px; background: #e8ecf2; color: #4a5566; vertical-align: 1px; }
.escalator { cursor: pointer; }
body.riding .route .st-live { background: #ffe4d4; color: #c24400; }
@media (max-width: 760px) {
  .floors { right: 10px; top: 74px; transform: none; flex-direction: column; padding: 5px; gap: 5px; border-radius: 16px; transition: top .3s; }
  .floors button { width: 50px; height: 46px; border-radius: 11px; }
  .floors button b { font-size: 17px; } .floors button span { display: none; } .floors button svg { width: 22px; height: 22px; }
  body.routing .floors { top: calc(var(--bannerH, 104px) + 18px); }
  body.card-open .floors { display: none; }
  .floor-flash b { font-size: 32px; } .floor-flash span { font-size: 15px; }
}

/* packaged Android app: no QR / phone hand-off without a public base URL, no install banner */
.no-qr .btn-phone, .no-qr .route .phone-btn { display: none !important; }
.is-app .a2hs { display: none !important; }
