/* Layout: full-bleed sphere; hairline Midnight glass chrome pinned to the four corners; labels are brass-edged plaques on gold stems. */

/* Brand Fonts - EN (Local first, un-comment url(...) once font files are uploaded to assets/fonts/) */
@font-face {
  font-family: "Beaufort Extended";
  src: local("Beaufort Extended"), local("BeaufortExtended")/*, url("fonts/BeaufortExtended-Regular.woff2") format("woff2")*/;
  font-weight: 300 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Beaufort Extended";
  src: local("Beaufort Extended Medium"), local("BeaufortExtended-Medium")/*, url("fonts/BeaufortExtended-Medium.woff2") format("woff2")*/;
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Beaufort Extended";
  src: local("Beaufort Extended Bold"), local("BeaufortExtended-Bold")/*, url("fonts/BeaufortExtended-Bold.woff2") format("woff2")*/;
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Halyard Text";
  src: local("Halyard Text"), local("HalyardText-Regular")/*, url("fonts/HalyardText-Regular.woff2") format("woff2")*/;
  font-weight: 300 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Halyard Text";
  src: local("Halyard Text Medium"), local("HalyardText-Medium")/*, url("fonts/HalyardText-Medium.woff2") format("woff2")*/;
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand Core (AGENTS.md mục 4) */
  --midnight: #002A30;
  --gold: #B99765;
  --brass: #D78F7D;
  --crystal: #EFECEA;
  --charcoal: #333333;
  --black: #000000;

  /* Brand Secondary / Highlights */
  --gold-hi: #DCC291;
  --gold-glow: #E9C882;
  --cream-hi: #FFF8EA;
  --glow-core: #FFF6DE;
  --white-soft: #FFFFFF;
  --water: #78BEE6;
  --water-light: #E6F5FF;
  --park: #78B46E;

  /* Glass, Structure & Brand Opacities (rgba trong :root, tương thích iOS 15 / Chrome cũ) */
  --midnight-glass: rgba(0, 42, 48, .78);
  --midnight-soft: rgba(0, 42, 48, .55);
  --midnight-90: rgba(0, 42, 48, .9);
  --midnight-85: rgba(0, 42, 48, .85);
  --midnight-66: rgba(0, 27, 31, .66);
  --midnight-intro-a: rgba(0, 42, 48, .72);
  --midnight-intro-b: rgba(0, 20, 23, .94);
  --midnight-proj-a: rgba(0, 42, 48, .96);
  --midnight-proj-b: rgba(0, 30, 34, .96);

  --hair: rgba(185, 151, 101, .45);
  --mute: rgba(239, 236, 234, .62);
  --crystal-94: rgba(239, 236, 234, .94);
  --crystal-90: rgba(239, 236, 234, .9);
  --crystal-45: rgba(239, 236, 234, .45);
  --crystal-40: rgba(239, 236, 234, .4);

  --gold-10: rgba(185, 151, 101, .1);
  --gold-12: rgba(185, 151, 101, .12);
  --gold-14: rgba(185, 151, 101, .14);
  --gold-18: rgba(185, 151, 101, .18);
  --gold-20: rgba(185, 151, 101, .2);
  --gold-30: rgba(185, 151, 101, .3);

  --gold-hi-85: rgba(220, 194, 145, .85);
  --gold-hi-70: rgba(220, 194, 145, .7);
  --gold-hi-55: rgba(220, 194, 145, .55);

  --brass-35: rgba(215, 143, 125, .35);
  --white-soft-85: rgba(255, 255, 255, .85);
  --white-soft-40: rgba(255, 255, 255, .4);

  /* Shadows */
  --shadow-black-80: rgba(0, 0, 0, .8);
  --shadow-black-75: rgba(0, 0, 0, .75);
  --shadow-black-70: rgba(0, 0, 0, .7);
  --shadow-black-65: rgba(0, 0, 0, .65);
  --shadow-black-60: rgba(0, 0, 0, .6);
  --shadow-black-50: rgba(0, 0, 0, .5);
  --shadow-black-45: rgba(0, 0, 0, .45);
  --shadow-black-25: rgba(0, 0, 0, .25);
  --shadow-midnight-80: rgba(0, 42, 48, .8);
  --shadow-midnight-55: rgba(0, 42, 48, .55);

  /* Overlays for Area & Road (khôi phục đúng giá trị chuẩn ban đầu) */
  --lake-stroke: rgba(205, 236, 255, .9);
  --lake-fill: rgba(120, 190, 230, .22);
  --park-stroke: rgba(196, 232, 172, .95);
  --park-fill: rgba(120, 180, 110, .22);
  --gov-fill: rgba(185, 151, 101, .20);
  --project-fill: rgba(185, 151, 101, .30);
  --custom-fill: rgba(239, 236, 234, .14);
  --custom-stroke: rgba(239, 236, 234, .85);
  /* B11 — road & area casing system */
  --road-casing:  rgba(0, 0, 0, .22);
  --road-band:    #DCC291;
  --road-core:    #FFF8EA;
  --road-glow:    rgba(220, 194, 145, .35);
  --area-casing:  rgba(0, 0, 0, .2);
  --lake-line:    rgba(214, 238, 242, .95);
  --lake-fill:    rgba(120, 180, 196, .22);
  --gov-fill:     rgba(220, 194, 145, .26);
  --project-fill: rgba(220, 194, 145, .14);
  --mp-border: rgba(244, 221, 176, .95);

  --serif: "Beaufort Extended", "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: "Halyard Text", "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  --title-weight: 300;
  --title-line-height: 1.06;
  --ease: cubic-bezier(.4, 0, .2, 1);
  color-scheme: dark;
}
:root[lang="vi"], html[lang="vi"] {
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  --title-weight: 400;
  --title-line-height: 1.18;
}
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; background: var(--midnight); color: var(--crystal); font-family: var(--sans); font-weight: 300; overflow: hidden; }
* { box-sizing: border-box; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 1px solid var(--gold-hi); outline-offset: 2px; }

#viewer { position: fixed; inset: 0; }
.psv-container { background: var(--midnight) !important; }
.psv-loader { color: var(--gold) !important; }
.psv-loader-container { background: transparent; }

/* ---------- chrome ---------- */
.chrome { position: fixed; z-index: 20; display: flex; gap: 8px; align-items: center; pointer-events: none; }
.chrome > * { pointer-events: auto; }
.chrome.tl { top: calc(16px + env(safe-area-inset-top, 0px)); left: max(16px, env(safe-area-inset-left, 0px)); align-items: flex-start; flex-direction: column; gap: 10px; }
.chrome.tr { top: calc(16px + env(safe-area-inset-top, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); }
.chrome.bc { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); justify-content: center; flex-direction: column; }

.glass { background: var(--midnight-glass); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); border: 1px solid var(--hair); }

.lockup { padding: 12px 18px 11px; text-align: center; line-height: 1; }
.scene-title { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--crystal); padding: 6px 10px; background: var(--midnight-soft); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

.ibtn { width: 40px; height: 40px; display: grid; place-items: center; transition: background .5s var(--ease), color .5s var(--ease); }
.ibtn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.ibtn:hover, .ibtn[aria-pressed="true"] { color: var(--gold-hi); background: var(--gold-12); }
.tools { display: flex; }
.tools .ibtn + .ibtn { border-left: 1px solid var(--gold-20); }
.lang { display: flex; height: 40px; }
.lang button { padding: 0 12px; font-size: 11px; letter-spacing: .16em; color: var(--mute); transition: color .5s var(--ease); }
.lang button[aria-pressed="true"] { color: var(--gold-hi); }

.compass { width: 40px; height: 40px; position: relative; }
.compass .needle { position: absolute; inset: 0; display: grid; place-items: center; transition: transform .15s linear; }
.compass .needle::before { content: ""; width: 0; height: 0; border: 4px solid transparent; border-bottom: 13px solid var(--brass); transform: translateY(-7px); }
.compass .n { position: absolute; top: 1px; font-size: 7px !important; left: 0; right: 0; text-align: center; font-size: 8px; letter-spacing: .1em; color: var(--mute); }

/* filters */
.filters { display: flex; gap: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 11px 16px 10px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); border-bottom: 1px solid transparent; transition: color .5s var(--ease), border-color .5s var(--ease); display: flex; align-items: center; gap: 8px; }
.chip i { width: 6px; height: 6px; border: 1px solid currentColor; transform: rotate(45deg); }
.chip[aria-pressed="true"] { color: var(--gold-hi); border-bottom-color: var(--gold); }
.chip[aria-pressed="true"] i { background: currentColor; }

.scenes { display: flex; gap: 8px; justify-content: center; }
.scenes button { width: 92px; aspect-ratio: 2/1; max-width: 100%; background-size: cover; background-position: center; border: 1px solid var(--hair); opacity: .7; transition: opacity .5s var(--ease), border-color .5s var(--ease); position: relative; }
.scenes button[aria-current="true"] { opacity: 1; border-color: var(--gold-hi); }
.scenes button span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 9px; letter-spacing: .1em; padding: 3px; background: var(--midnight-soft); }

/* ---------- bottom sheet (desktop defaults) ---------- */
.mobile-sheet-btn { display: none; }
.sheet-header { display: none; }
.sheet-sec { display: none; }
.editor-mobile-notice { display: none; }
.bottom-sheet { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.sheet-body { display: flex; flex-direction: column; gap: 8px; align-items: center; }

/* ---------- markers ---------- */
.poi { position: relative; display: flex; flex-direction: column; align-items: center; cursor: pointer; transform-origin: bottom center; }
.poi .plaque { display: flex; align-items: center; gap: 10px; padding: 9px 16px 8px 12px; background: var(--midnight-90); border: 1px solid var(--hair); box-shadow: 0 10px 28px -12px var(--shadow-black-70); white-space: nowrap; transition: background .5s var(--ease), border-color .5s var(--ease), transform .5s var(--ease); }
.poi .plaque svg { width: 15px; height: 15px; flex: none; stroke: var(--gold); fill: none; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.poi .name { font-family: var(--serif); font-weight: 500; line-height: 1.2; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-hi); }
.poi .stem { width: 1px; height: var(--lift, 60px); background: linear-gradient(var(--gold), var(--gold-hi-85)); }
.poi .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--crystal); box-shadow: 0 0 0 3px var(--hair), 0 0 14px 2px var(--gold-hi-70); margin-bottom: -4.5px; }
.poi:hover .plaque, .poi.is-active .plaque { background: var(--midnight); border-color: var(--gold-hi); transform: translateY(-3px); }
.poi.is-dim { opacity: .35; }

.poi.project .plaque { padding: 12px 20px 11px 14px; border-color: var(--gold); background: linear-gradient(180deg, var(--midnight-proj-a), var(--midnight-proj-b)); }
.poi.project .name { font-size: 18px; letter-spacing: .14em; }
.poi.project .dot { width: 14px; height: 14px; margin-bottom: -7px; background: var(--gold-hi); }
.poi.project .dot::before, .poi.project .dot::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 14px; height: 14px; margin: 0 0 0 -7px; border: 1px solid var(--gold-hi); border-radius: 50%; animation: ring 3.2s var(--ease) infinite; }
.poi.project .dot::after { animation-delay: 1.6s; }
@keyframes ring { from { transform: scale(1); opacity: .9; } to { transform: scale(5.5); opacity: 0; } }

.sky-brand { text-align: center; color: var(--cream-hi); pointer-events: none; text-shadow: 0 2px 24px var(--shadow-midnight-80), 0 0 3px var(--shadow-midnight-55); }
.sky-brand .a { font-family: var(--serif); font-size: clamp(34px, 5vw, 64px); font-weight: 500; letter-spacing: .34em; padding-left: .34em; line-height: 1; color: var(--cream-hi); }
.sky-brand .b { margin-top: 12px; font-family: var(--serif); font-size: clamp(14px, 1.8vw, 22px); letter-spacing: .5em; padding-left: .5em; color: var(--cream-hi); display: flex; align-items: center; justify-content: center; gap: 14px; }
.sky-brand .b::before, .sky-brand .b::after { content: ""; width: 42px; height: 1px; background: currentColor; opacity: .7; }
.sky-brand .c { margin-top: 10px; font-family: var(--serif); font-style: italic; font-size: clamp(13px, 1.4vw, 17px); letter-spacing: .08em; color: var(--cream-hi); }
/* B11 — road labels: chip style running along road */
.road-label { font-family: var(--sans); font-weight: 600; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--road-band); white-space: nowrap; background: rgba(0, 42, 48, .82); border: 1px solid var(--hair); padding: 4px 10px; border-radius: 2px; text-shadow: none; pointer-events: none; transition: background .5s var(--ease), color .5s var(--ease); }
.road-label.minor { font-family: var(--sans); font-weight: 600; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--road-band); background: rgba(0, 42, 48, .82); border: 1px solid var(--hair); padding: 4px 10px; border-radius: 2px; text-shadow: none; }
.road-label.sel { outline: 1px dashed var(--white-soft); outline-offset: 4px; }

/* B11 — road polylines: glow/casing/band/core/flow */
/* Major road: only glow layer gets blur */
.road-glow { filter: blur(3px); }
/* halo = casing + band combined via CSS; no blur for minor/planned */
.road-halo { transition: stroke .5s var(--ease), stroke-width .5s var(--ease), filter .5s var(--ease); }
.road-halo.sel, .road-halo:hover { filter: drop-shadow(0 0 calc(var(--zk, 1) * 5px) var(--road-glow)); }
.road-flow { animation: flow 6s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -88; } }

/* ---------- info card ---------- */
.card { position: fixed; z-index: 30; max-height: calc(100% - 200px); overflow-y: auto; left: max(16px, env(safe-area-inset-left, 0px)); bottom: calc(110px + env(safe-area-inset-bottom, 0px)); width: min(360px, calc(100vw - 32px)); padding: 22px 24px 20px; transform: translateY(12px); opacity: 0; pointer-events: none; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.card.open { opacity: 1; transform: none; pointer-events: auto; }
.card .eyebrow { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); display: flex; align-items: center; gap: 10px; }
.card .eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
.card h2 { font-family: var(--serif); font-weight: var(--title-weight); line-height: var(--title-line-height); font-size: 26px; margin: 12px 0 8px; text-wrap: balance; }
.card p { font-size: 13.5px; line-height: 1.65; color: var(--mute); margin: 0; }
.card .meta { margin-top: 14px; font-size: 11px; letter-spacing: .08em; color: var(--crystal-45); font-variant-numeric: tabular-nums; }
.card .x { position: absolute; top: 10px; right: 10px; }

/* ---------- list drawer ---------- */
.drawer { position: fixed; z-index: 25; top: calc(68px + env(safe-area-inset-top, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); width: min(320px, calc(100vw - 32px)); max-height: calc(100% - 210px); overflow-y: auto; opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .5s var(--ease), transform .5s var(--ease); }
.drawer.open { opacity: 1; transform: none; pointer-events: auto; }
.drawer h3 { margin: 0; padding: 16px 20px 6px; font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); font-weight: 400; }
.drawer button { display: flex; width: 100%; text-align: left; align-items: baseline; gap: 12px; padding: 10px 20px; font-family: var(--serif); font-size: 16px; border-top: 1px solid var(--gold-14); transition: background .5s var(--ease), color .5s var(--ease); }
.drawer button:hover { background: var(--gold-10); color: var(--gold-hi); }
.drawer button small { white-space: nowrap; flex: none; margin-left: auto; font-family: var(--sans); font-size: 10px; letter-spacing: .12em; color: var(--mute); text-transform: uppercase; }

/* ---------- intro ---------- */
.intro { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: radial-gradient(ellipse at center, var(--midnight-intro-a), var(--midnight-intro-b)); transition: opacity 1.2s var(--ease), visibility 1.2s; text-align: center; padding: 24px; }
.intro.gone { opacity: 0; visibility: hidden; }
.intro, .intro * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }  /* kéo chuột lúc đang tải không bôi đen chữ */
.intro .hint { margin-top: 44px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--mute); }
.intro .go { margin-top: 26px; padding: 14px 34px; border: 1px solid var(--gold); color: var(--gold-hi); font-size: 11px; letter-spacing: .28em; text-transform: uppercase; transition: background .5s var(--ease), color .5s var(--ease); }
.intro .go:hover { background: var(--gold); color: var(--midnight); }
.intro .go[disabled] { opacity: .5; cursor: wait; }

/* ---------- editor ---------- */
.editor { position: fixed; z-index: 40; top: calc(16px + env(safe-area-inset-top, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); left: max(16px, env(safe-area-inset-left, 0px)); width: min(360px, calc(100vw - 32px)); display: flex; flex-direction: column; font-size: 12.5px; }
.editor header { padding: 14px 16px 10px; border-bottom: 1px solid var(--hair); display: flex; justify-content: space-between; align-items: baseline; }
.editor header b { font-family: var(--serif); font-weight: 500; font-size: 17px; letter-spacing: .06em; }
.editor header span { font-size: 10px; letter-spacing: .14em; color: var(--brass); text-transform: uppercase; }
.editor .body { flex: 1; overflow-y: auto; padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 14px; }
.editor .modes { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--hair); }
.editor .modes button { padding: 9px 4px; font-size: 10.5px; letter-spacing: .06em; color: var(--mute); transition: background .4s var(--ease), color .4s var(--ease); }
.editor .modes button + button { border-left: 1px solid var(--gold-20); }
.editor .modes button[aria-pressed="true"] { background: var(--gold); color: var(--midnight); }
.editor .hint { color: var(--mute); line-height: 1.55; min-height: 2.4em; }
.editor .coords { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.editor label { display: flex; flex-direction: column; gap: 4px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.editor input, .editor select, .editor textarea { font: 13px var(--sans); color: var(--crystal); background: var(--shadow-black-25); border: 1px solid var(--gold-30); padding: 7px 8px; border-radius: 0; text-transform: none; letter-spacing: 0; width: 100%; }
.editor textarea { resize: vertical; min-height: 56px; }
.editor .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.editor .sec { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); border-bottom: 1px solid var(--hair); padding-bottom: 6px; }
.editor .list { display: flex; flex-direction: column; }
.editor .list button { text-align: left; padding: 6px 8px; border-left: 2px solid transparent; color: var(--mute); display: flex; justify-content: space-between; gap: 8px; }
.editor .list button small { font-family: ui-monospace, Menlo, monospace; font-size: 10px; opacity: .7; white-space: nowrap; }
.editor .list button.sel { border-left-color: var(--gold); color: var(--crystal); background: var(--gold-10); }
.btns { display: flex; flex-wrap: wrap; gap: 6px; }
.btn { padding: 8px 12px; border: 1px solid var(--gold); color: var(--gold-hi); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; transition: background .4s var(--ease), color .4s var(--ease); }
.btn:hover { background: var(--gold); color: var(--midnight); }
.btn.solid { background: var(--gold); color: var(--midnight); }
.btn.warn { border-color: var(--brass); color: var(--brass); }
.btn.warn:hover { background: var(--brass); color: var(--midnight); }
.editor .out { font-family: ui-monospace, Menlo, monospace; font-size: 10.5px; min-height: 120px; }
.toast { position: fixed; z-index: 60; left: 50%; top: calc(20px + env(safe-area-inset-top, 0px)); transform: translate(-50%, -10px); padding: 10px 18px; font-size: 12px; letter-spacing: .06em; opacity: 0; transition: opacity .5s var(--ease), transform .5s var(--ease); pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.editing .card { left: calc(max(16px, env(safe-area-inset-left, 0px)) + min(360px, calc(100vw - 32px)) + 12px); }
body.editing .chrome.tl { left: calc(max(16px, env(safe-area-inset-left, 0px)) + min(360px, calc(100vw - 32px)) + 12px); }


/* ---------- B4: Declutter (chống chồng nhãn) ---------- */
.dc-hide { opacity: 0 !important; pointer-events: none !important; visibility: hidden; transition: opacity .5s var(--ease), visibility 0s .5s !important; } /* T0b-4 (từ MIK): mờ xong thì trình duyệt không vẽ nữa */
.dc-dim  { opacity: .4 !important; transition: opacity .5s var(--ease) !important; }
/* Nút "Xem như khách" trong Editor khi bật */
#ed-preview[aria-pressed="true"] { background: var(--gold); color: var(--midnight); }

@media (prefers-reduced-motion: reduce) {
  .road-flow, .poi.project .dot::before, .poi.project .dot::after { animation: none; }
  * { transition-duration: .01ms !important; }
  .dc-hide, .dc-dim { transition: none !important; }
}

/* ---------- real logo ---------- */
.lockup img { display: block; height: 46px; width: auto; }
.intro .logo { width: min(380px, 70vw); height: auto; }
.sky-brand.logo { cursor: default; }
.sky-brand.logo img { width: min(var(--w, 340px), 60vw); height: auto; filter: drop-shadow(0 3px 18px var(--shadow-midnight-55)); }
.sky-brand.logo .c { margin-top: 8px; }

/* ---------- K8 site layer ---------- */
.site-line { animation: flow 6s linear infinite; }
.tag { white-space: nowrap; font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; padding: 5px 10px 4px; cursor: default; }
.tag.tower { background: var(--gold); color: var(--midnight); font-weight: 600; cursor: pointer; box-shadow: 0 6px 16px -6px var(--shadow-black-60); transition: background .5s var(--ease); }
.tag.tower:hover { background: var(--gold-hi); }
.tag.soft { background: var(--midnight-66); color: var(--crystal); border: 1px solid var(--crystal-40); font-size: 10px; }
.tag.site { background: var(--midnight); color: var(--white-soft); border: 1.5px solid var(--crystal); font-size: 14px; font-weight: 600; letter-spacing: .1em; padding: 6px 14px; }
.am { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; background: var(--midnight); color: var(--crystal); border: 1.5px solid var(--crystal); cursor: pointer; font-variant-numeric: tabular-nums; transition: background .5s var(--ease); }
.am.has-img { border-color: var(--gold-hi); }
.am:hover { background: var(--gold); color: var(--midnight); }

/* ---------- richer card ---------- */
.card.with-img { padding: 0; width: min(380px, calc(100vw - 32px)); }
.card .cimg { margin: 0; position: relative; }
.card .cimg img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
/* Thẻ ảnh CG nhiều ảnh (T3) */
.card .cimg .ctrack { position: relative; }
.card .cimg.gal .ctrack img { transition: opacity .6s var(--ease); user-select: none; -webkit-user-drag: none; touch-action: pan-y; }
.card .cimg.gal .ctrack img:not(.on) { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.card .cimg.gal { touch-action: pan-y; }
.card .cimg.gal:focus-visible { outline: 1px solid var(--gold); outline-offset: -1px; }
.card .gnav { position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 1px solid var(--gold-30); border-radius: 50%; background: var(--midnight-glass); color: var(--crystal); cursor: pointer; opacity: .85; transition: opacity .5s var(--ease), border-color .5s var(--ease); }
.card .gnav:hover { opacity: 1; border-color: var(--gold); }
.card .gnav svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.card .gnav.prev { left: 8px; } .card .gnav.next { right: 8px; }
.card .gcount { position: absolute; right: 12px; bottom: 7px; font-size: 10px; letter-spacing: .12em; color: var(--crystal); text-shadow: 0 0 2px rgba(0, 0, 0, .7), 0 1px 4px rgba(0, 0, 0, .6); font-variant-numeric: tabular-nums; }
.card .gcount b { color: var(--gold-hi); font-weight: 500; }
.card .cimg.gal figcaption { padding-right: 56px; padding-top: 28px; }
.card .gnav::before { content: ""; position: absolute; inset: -6px; }
@media (max-width: 768px), (pointer: coarse) { .card .gnav { width: 44px; height: 44px; } .card .gnav.prev { left: 6px; } .card .gnav.next { right: 6px; } }
@media (prefers-reduced-motion: reduce) { .card .cimg.gal .ctrack img { transition: none; } }
.card .cimg figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 14px 7px; font-size: 10px; letter-spacing: .1em; color: var(--crystal); background: linear-gradient(transparent, var(--midnight-85)); }
.card.with-img .cbody { padding: 18px 24px 20px; }
.card .x { z-index: 2; }
.card.with-img .x { background: var(--midnight-glass); }
.card .num { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold-hi); font-weight: 600; font-size: 10px; letter-spacing: 0; margin-right: 2px; }
.card .csub { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-hi); margin: -2px 0 8px; }
.card .clist { list-style: none; margin: 4px 0 10px; padding: 0; font-size: 13.5px; }
.card .clist li { padding: 6px 0; border-bottom: 1px solid var(--gold-18); color: var(--crystal); }
.card .pill { display: inline-block; margin: 4px 0 6px; padding: 4px 10px; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; border: 1px solid currentColor; }
.card .pill.yes { color: var(--gold-hi); }
.card .pill.no { color: var(--brass); }
.card .facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; margin: 12px 0 4px; border-top: 1px solid var(--gold-30); }
.card .facts div { padding: 9px 0 8px; border-bottom: 1px solid var(--gold-18); min-width: 0; }
.card .facts dt { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.card .facts dd { margin: 3px 0 0; font-size: 14px; font-variant-numeric: tabular-nums; }
.card .clink { display: inline-block; margin-top: 14px; padding: 10px 16px; border: 1px solid var(--gold); color: var(--gold-hi); text-decoration: none; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; transition: background .5s var(--ease), color .5s var(--ease); }
.card .clink:hover { background: var(--gold); color: var(--midnight); }

/* ---------- v4: scene pins, labels, masterplan bar ---------- */
.scene-pin { display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.scene-pin .sp-box { display: flex; align-items: center; gap: 8px; padding: 7px 12px 6px 9px; background: var(--crystal-94); color: var(--midnight); border: 1px solid var(--gold); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 500; white-space: nowrap; box-shadow: 0 8px 22px -10px var(--shadow-black-60); transition: background .5s var(--ease); }
.scene-pin .sp-box svg { width: 16px; height: 16px; stroke: var(--midnight); fill: none; stroke-width: 1.4; }
.scene-pin i { width: 1px; height: 26px; background: linear-gradient(var(--gold), transparent); }
.scene-pin:hover .sp-box { background: var(--gold); }
.area-label { font-family: var(--serif); font-style: italic; font-size: 17px; letter-spacing: .06em; color: var(--white-soft); white-space: nowrap; text-shadow: 0 1px 3px var(--shadow-black-75), 0 0 16px var(--shadow-black-45); }
/* B11 — lake: italic Garamond, stronger shadow */
.area-label.lake { color: var(--water-light); font-size: 22px; text-shadow: 0 1px 2px rgba(0,0,0,.8), 0 0 12px rgba(0,42,48,.6); }
/* B11 — gov/project: chip like road labels */
.area-label.gov, .area-label.project { font-style: normal; font-family: var(--sans); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; padding: 5px 10px 4px; background: rgba(0, 42, 48, .82); border: 1px solid var(--hair); color: var(--road-band); text-shadow: none; }
.area-label.sel, .road-label.sel { outline: 1px dashed var(--white-soft); outline-offset: 4px; }
.mpbar { display: flex; align-items: center; justify-content: center; align-self: center; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.mpbar span { padding: 0 12px 0 14px; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.mpbar button { flex: none; padding: 9px 12px 8px; font-size: 11px; letter-spacing: .08em; color: var(--mute); border-left: 1px solid var(--gold-20); transition: color .5s var(--ease), background .5s var(--ease); }
.mpbar button[aria-pressed="true"] { color: var(--midnight); background: var(--gold); }
/* B6 — foreign filter separator + button */
.mpbar .mp-sep { flex: none; width: 1px; height: 28px; background: var(--hair); margin: 0 4px; align-self: center; border: none; padding: 0; }
#btn-foreign { color: var(--mute); border-left: none; }
#btn-foreign[aria-pressed="true"] { color: var(--midnight); background: var(--gold); }
/* K8A mờ khi bật lọc foreign — class trên .tag.tower, không bị dc-hide ghi đè */
.tag.tower.is-nonforeign { opacity: .4; transition: opacity .5s var(--ease); }
@media (prefers-reduced-motion: reduce) { .tag.tower.is-nonforeign { transition: none; } }
/* #mp-legend — chú thích foreign buyers, nằm trong .chrome.bc */
#mp-legend {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  background: var(--midnight-glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid var(--hair);
  color: var(--gold);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 6px 16px 5px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s var(--ease), visibility 0s .5s;
  z-index: 40;
}
#mp-legend.visible {
  opacity: 1;
  visibility: visible;
  transition: opacity .5s var(--ease), visibility 0s 0s;
}
@media (prefers-reduced-motion: reduce) {
  #mp-legend { transition: none; }
}
.card .route { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 2px 0 12px; font-size: 13px; }
.card .route span { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); padding-top: 2px; }
.card .route b { font-weight: 400; color: var(--crystal); }
.card .cimg.fit { background: var(--crystal); }
.card .cimg.fit img { object-fit: contain; aspect-ratio: 4 / 3; mix-blend-mode: multiply; padding: 10px; }
.card .cimg.fit figcaption { color: var(--midnight); background: linear-gradient(transparent, var(--crystal-90)); }

/* ---------- v4 editor ---------- */
.ed-tabs { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--hair); }
.ed-tabs button { padding: 10px 2px 9px; font-size: 10.5px; letter-spacing: .04em; color: var(--mute); border-bottom: 2px solid transparent; transition: color .4s var(--ease), border-color .4s var(--ease); }
.ed-tabs button[aria-pressed="true"] { color: var(--gold-hi); border-bottom-color: var(--gold); }
.editor footer { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--hair); }
.editor .ed-hint { font-size: 11px; line-height: 1.45; color: var(--mute); }
.editor .note { margin: 0; font-size: 11.5px; line-height: 1.55; color: var(--mute); }
.editor .draftbar { padding: 10px 12px; border: 1px dashed var(--brass); display: flex; flex-direction: column; gap: 8px; }
.editor .draftbar b { font-weight: 500; color: var(--brass); font-size: 12px; }
.editor input[disabled] { opacity: .6; }
.h-vert { display: block; width: 12px; height: 12px; background: var(--white-soft); border: 2px solid var(--midnight); transform: rotate(45deg); cursor: move; box-shadow: 0 0 0 2px var(--white-soft-40); }
.h-vert.draft { background: var(--brass); cursor: default; }
.h-mid { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--midnight-85); border: 1px solid var(--gold-hi); color: var(--gold-hi); font: 600 12px/1 var(--sans); font-style: normal; cursor: copy; opacity: .75; }
.h-mid:hover { opacity: 1; }
.h-cp { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brass); border: 2px solid var(--white-soft); color: var(--midnight); cursor: move; box-shadow: 0 0 0 6px var(--brass-35); }
.h-cp b { font: 700 10px/1 var(--sans); }
body.editing .poi, body.editing .road-label, body.editing .area-label, body.editing .sky-brand.logo { cursor: move; pointer-events: auto; }
body.editing .road-label { pointer-events: auto; }

body.editing .chrome.bc { left: calc(max(16px, env(safe-area-inset-left, 0px)) + min(360px, calc(100vw - 32px)) + 12px); }

.editor .ed-pw summary { cursor: pointer; font-size: 11px; color: var(--mute); padding: 2px 0 6px; }
.editor .ed-pw label { margin-top: 4px; }

/* =====================================================================
   B3: Mobile <= 640px
   ===================================================================== */
@media (max-width: 640px) {
  /* Brand lockup & intro */
  .lockup { padding: 9px 13px 8px; }
  .lockup img { height: 34px; }
  .intro .logo { width: min(280px, 75vw); }
  .intro .hint { margin-top: 28px; font-size: 10.5px; padding: 0 16px; }
  .intro .go { min-height: 44px; padding: 13px 34px; font-size: 11px; }

  /* Markers & labels */
  .poi .name { font-size: 12px; }
  .poi .plaque { padding: 7px 11px 6px 9px; gap: 7px; }
  .poi.project .name { font-size: 14px; }
  .poi.project .plaque { padding: 9px 14px 8px 11px; }
  .road-label { font-size: 11px; }
  .road-label.minor { font-size: 11px; }

  /* Sky brand (tỉ lệ vừa vặn, không che khuất cảnh bay) */
  .sky-brand.logo img { width: min(var(--w, 170px), 36vw); }
  .sky-brand.logo .c { font-size: 11px; margin-top: 4px; }
  .sky-brand .a { font-size: clamp(18px, 4.5vw, 24px); letter-spacing: .2em; padding-left: .2em; }
  .sky-brand .b { margin-top: 5px; font-size: clamp(9.5px, 2.2vw, 12px); letter-spacing: .28em; padding-left: .28em; gap: 6px; }
  .sky-brand .b::before, .sky-brand .b::after { width: 18px; }
  .sky-brand .c { margin-top: 5px; font-size: clamp(10px, 2.2vw, 12px); letter-spacing: .06em; }

  /* Card thông tin */
  body.card-open .mobile-sheet-btn { display: none !important; }
  .card {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border: none;
    border-top: 1px solid var(--hair);
    border-radius: 0;
    box-shadow: 0 -12px 36px var(--shadow-black-80);
    padding: 0 0 env(safe-area-inset-bottom, 0px) 0;
    transform: translateY(16px);
  }
  .card.open { transform: none; }
  .card.with-img { width: 100%; }
  .card .cimg { margin: 0; position: relative; width: 100%; }
  .card .cimg img, .card .cimg.fit img {
    aspect-ratio: 2 / 1;
    width: 100%;
    display: block;
  }
  .card .cimg.fit img { object-fit: contain; padding: 8px; }
  .card .cbody { padding: 18px 20px 22px; }
  .card:not(.with-img) .cbody { padding-top: 26px; }
  .card h2 { font-size: 22px; margin: 10px 0 6px; }
  .card .x {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    background: var(--midnight-85);
    border: 1px solid var(--hair);
    color: var(--crystal);
    display: grid;
    place-items: center;
    transition: background .4s var(--ease), color .4s var(--ease);
  }
  .card .x:hover { background: var(--midnight); color: var(--gold-hi); }

  /* Thanh công cụ & nút bấm touch target >= 44px */
  .scene-title { display: none; }
  .chrome.tr { flex-direction: column; align-items: flex-end; gap: 6px; }
  .tools { flex-direction: column; }
  .tools .ibtn + .ibtn { border-left: 0; border-top: 1px solid var(--gold-20); }
  #btn-full { display: none; }
  .lang { height: 44px; }
  .lang button { min-width: 44px; min-height: 44px; padding: 0 12px; }
  .compass { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
  .ibtn { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }

  /* Drawer danh sách */
  .drawer {
    top: calc(16px + env(safe-area-inset-top, 0px));
    right: calc(max(16px, env(safe-area-inset-right, 0px)) + 52px);
    width: auto;
    left: max(16px, env(safe-area-inset-left, 0px));
    max-height: calc(100% - 140px);
  }
  .drawer button { min-height: 44px; padding: 12px 18px; font-size: 15px; }

  /* Gộp 3 thanh dưới thành 1 nút mở bảng điều khiển (Bottom Sheet) */
  .chrome.bc {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    left: max(14px, env(safe-area-inset-left, 0px));
    right: max(14px, env(safe-area-inset-right, 0px));
    gap: 0;
  }
  .chrome.bc.sheet-open .mobile-sheet-btn { display: none; }
  .mobile-sheet-btn {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 44px;
    min-height: 44px;
    padding: 0 20px;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gold-hi);
    background: var(--midnight-glass);
    border: 1px solid var(--hair);
    box-shadow: 0 8px 24px var(--shadow-black-70);
    transition: background .4s var(--ease), border-color .4s var(--ease);
  }
  .mobile-sheet-btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.4; }
  .mobile-sheet-btn:hover, .mobile-sheet-btn[aria-expanded="true"] {
    background: var(--midnight);
    border-color: var(--gold);
  }
  .bottom-sheet {
    display: none;
    width: min(420px, 100%);
    background: var(--midnight-glass);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    backdrop-filter: blur(16px) saturate(1.2);
    border: 1px solid var(--hair);
    box-shadow: 0 14px 36px var(--shadow-black-80);
    flex-direction: column;
    max-height: 62vh;
    overflow: hidden;
  }
  .bottom-sheet.open { display: flex; }
  .sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 6px 4px 16px;
    border-bottom: 1px solid var(--gold-18);
    flex: none;
  }
  .sheet-title {
    font-size: 10.5px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 500;
  }
  .sheet-close {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    display: grid;
    place-items: center;
    color: var(--mute);
    transition: color .4s var(--ease);
  }
  .sheet-close svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.4; }
  .sheet-close:hover { color: var(--gold-hi); }
  .sheet-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 12px 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    align-items: stretch;
  }
  .sheet-body > * { flex-shrink: 0; }
  .sheet-sec {
    display: block;
    font-size: 9.5px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
    padding: 8px 2px 2px;
    text-align: left;
  }
  .sheet-body .scenes {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    width: 100%;
    padding-bottom: 2px;
  }
  .sheet-body .scenes::-webkit-scrollbar { display: none; }
  .sheet-body .scenes button { min-height: 44px; width: 90px; flex: none; }

  /* #mpbar trên mobile: lưới 4 cột (2x2 nếu < 380px), ẩn span */
  .sheet-body .mpbar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
    border: 1px solid var(--hair);
    background: var(--midnight-soft);
    overflow: visible;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
    gap: 0;
  }
  .sheet-body .mpbar span { display: none !important; }
  .sheet-body .mpbar button {
    min-height: 44px;
    height: auto;
    padding: 6px 4px;
    font-size: 10.5px;
    line-height: 1.2;
    letter-spacing: .02em;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: normal;
    word-break: normal;
    border-left: 1px solid var(--gold-20);
    border-top: none;
    border-right: none;
    border-bottom: none;
  }
  .sheet-body .mpbar button:first-of-type { border-left: none; }

  /* B6 — nút foreign: full-width dưới lưới 4 nút, cao 44px */
  .sheet-body .mpbar .mp-sep { display: none; }
  .sheet-body .mpbar #btn-foreign {
    grid-column: 1 / -1;
    min-height: 44px;
    border-left: none;
    border-top: 1px solid var(--gold-20);
    font-size: 11px;
    letter-spacing: .06em;
  }

  /* #filters trên mobile: lưới 2 cột, mỗi ô cao 44px, chữ xuống tối đa 2 dòng */
  .sheet-body .filters {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    border: 1px solid var(--hair);
    background: var(--midnight-soft);
    overflow: visible;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
    gap: 0;
  }
  .sheet-body .filters .chip {
    min-height: 44px;
    height: auto;
    padding: 8px 10px;
    font-size: 11px;
    line-height: 1.25;
    letter-spacing: .06em;
    white-space: normal;
    word-break: break-word;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
    text-align: left;
    border-right: 1px solid var(--gold-20);
    border-bottom: 1px solid var(--gold-20);
    border-left: none;
    border-top: none;
  }
  .sheet-body .filters .chip:nth-child(2n) { border-right: none; }

  /* Editor layout trên mobile: ẩn panel, hiện thông báo giữa màn hình */
  body.editing .chrome.tl { display: flex; }
  body.editing .chrome.bc { display: none; }
  body.editing .editor { display: none !important; }
  .editor-mobile-notice {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 60;
    width: min(320px, calc(100vw - 48px));
    padding: 26px 24px 22px;
    background: var(--midnight-glass);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    backdrop-filter: blur(16px) saturate(1.2);
    border: 1px solid var(--hair);
    box-shadow: 0 18px 48px var(--shadow-black-80);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    color: var(--crystal);
  }
  .editor-mobile-notice .ed-notice-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: var(--gold);
    border: 1px solid var(--gold-30);
    border-radius: 50%;
    background: var(--gold-10);
  }
  .editor-mobile-notice .ed-notice-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
  }
  .editor-mobile-notice p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--crystal);
  }
}

@media (max-width: 380px) {
  .sheet-body .mpbar {
    grid-template-columns: repeat(2, 1fr);
  }
  .sheet-body .mpbar button {
    font-size: 11px;
    padding: 8px 6px;
  }
  .sheet-body .mpbar button:nth-of-type(2n + 1) {
    border-left: none;
  }
  .sheet-body .mpbar button:nth-of-type(2n) {
    border-left: 1px solid var(--gold-20);
  }
  .sheet-body .mpbar button:nth-of-type(n + 3) {
    border-top: 1px solid var(--gold-20);
  }
}

/* ===== T1 · biển tên kiểu sticker (chỉ dùng khi ?baked=1) ===== */
.bk{display:flex;flex-direction:column;align-items:center;pointer-events:none;font-family:"Inter",Arial,sans-serif;-webkit-font-smoothing:antialiased}
.bk.tap .bk-plate{pointer-events:auto;cursor:pointer} /* T0b-5: nhãn in sẵn có thẻ → bấm được như v4 */
.bk-plate{white-space:nowrap;text-transform:uppercase;border-radius:2px;line-height:1;display:flex;align-items:center;gap:9px}
.bk-stem{display:block;width:2px;height:var(--stem)}
.bk-dot{display:block;width:11px;height:11px;border-radius:50%;border:2px solid #fff;box-shadow:0 1px 4px rgba(0,20,24,.45)}
.bk-road .bk-plate{background:var(--c);color:var(--t);font-weight:700;font-size:13px;letter-spacing:.09em;padding:8px 13px 7px;
  border:1px solid rgba(255,255,255,.55);box-shadow:0 3px 10px rgba(0,25,30,.38)}
.bk-road .bk-stem{background:linear-gradient(var(--c),rgba(255,255,255,.9))}
.bk-road .bk-dot{background:var(--c)}
.bk-mark .bk-plate{background:linear-gradient(180deg,#D9BC86,#B99765);color:#002A30;font-weight:700;font-size:14px;letter-spacing:.16em;padding:9px 16px 8px;
  border:1px solid #F3E2BF;box-shadow:0 0 0 1px rgba(0,42,48,.35),0 4px 14px rgba(0,20,24,.45)}
.bk-mark .bk-plate svg{width:24px;height:13px;flex:none;color:#002A30}
.bk-mark .bk-stem{background:linear-gradient(#B99765,rgba(233,204,148,.85))}
.bk-mark .bk-dot{background:#B99765}
.bk-area .bk-plate{background:rgba(239,236,234,.96);color:#002A30;font-weight:700;font-size:13px;letter-spacing:.08em;padding:8px 13px 7px 11px;
  border-left:4px solid var(--c);box-shadow:0 3px 12px rgba(0,25,30,.35)}
.bk-area .bk-plate small{display:block;font-weight:500;font-size:10px;letter-spacing:.12em;color:#4d5a5c;margin-top:4px}
.bk-area .bk-stem,.bk-area .bk-dot{background:var(--c)}
.bk-water .bk-plate{color:#fff;font-weight:400;font-size:22px;letter-spacing:.32em;text-shadow:0 1px 3px rgba(0,30,40,.55),0 0 14px rgba(0,30,40,.35)}
@media (max-width:640px){.bk-road .bk-plate,.bk-area .bk-plate{font-size:11px;padding:6px 10px 5px}.bk-mark .bk-plate{font-size:12px;padding:7px 12px 6px}.bk-water .bk-plate{font-size:17px}}
.bk-lot .bk-plate{background:rgba(0,42,48,.84);color:#EFECEA;font-weight:600;font-size:11px;letter-spacing:.1em;padding:5px 8px 4px;
  border-left:3px solid var(--c);box-shadow:0 2px 8px rgba(0,20,24,.35)}
@media (max-width:640px){.bk-lot .bk-plate{font-size:10px;padding:4px 7px 3px}}

/* ===== T3 · Desktop cũng gộp các thanh dưới thành 1 nút "Khám phá & Bộ lọc" (như mobile) ===== */
@media (min-width: 641px) {
  /* Gộp 3 thanh dưới thành 1 nút mở bảng điều khiển (Bottom Sheet) */
  .chrome.bc {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    left: max(14px, env(safe-area-inset-left, 0px));
    right: max(14px, env(safe-area-inset-right, 0px));
    gap: 0;
  }
  .chrome.bc.sheet-open .mobile-sheet-btn { display: none; }
  .mobile-sheet-btn {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 44px;
    min-height: 44px;
    padding: 0 20px;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gold-hi);
    background: var(--midnight-glass);
    border: 1px solid var(--hair);
    box-shadow: 0 8px 24px var(--shadow-black-70);
    transition: background .4s var(--ease), border-color .4s var(--ease);
  }
  .mobile-sheet-btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.4; }
  .mobile-sheet-btn:hover, .mobile-sheet-btn[aria-expanded="true"] {
    background: var(--midnight);
    border-color: var(--gold);
  }
  .bottom-sheet {
    display: none;
    width: min(420px, 100%);
    background: var(--midnight-glass);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    backdrop-filter: blur(16px) saturate(1.2);
    border: 1px solid var(--hair);
    box-shadow: 0 14px 36px var(--shadow-black-80);
    flex-direction: column;
    max-height: 62vh;
    overflow: hidden;
  }
  .bottom-sheet.open { display: flex; }
  .sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 6px 4px 16px;
    border-bottom: 1px solid var(--gold-18);
    flex: none;
  }
  .sheet-title {
    font-size: 10.5px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 500;
  }
  .sheet-close {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    display: grid;
    place-items: center;
    color: var(--mute);
    transition: color .4s var(--ease);
  }
  .sheet-close svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.4; }
  .sheet-close:hover { color: var(--gold-hi); }
  .sheet-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 12px 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    align-items: stretch;
  }
  .sheet-body > * { flex-shrink: 0; }
  .sheet-sec {
    display: block;
    font-size: 9.5px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
    padding: 8px 2px 2px;
    text-align: left;
  }
  .sheet-body .scenes {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    width: 100%;
    padding-bottom: 2px;
  }
  .sheet-body .scenes::-webkit-scrollbar { display: none; }
  .sheet-body .scenes button { min-height: 44px; width: 90px; flex: none; }

  /* #mpbar trên mobile: lưới 4 cột (2x2 nếu < 380px), ẩn span */
  .sheet-body .mpbar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
    border: 1px solid var(--hair);
    background: var(--midnight-soft);
    overflow: visible;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
    gap: 0;
  }
  .sheet-body .mpbar span { display: none !important; }
  .sheet-body .mpbar button {
    min-height: 44px;
    height: auto;
    padding: 6px 4px;
    font-size: 10.5px;
    line-height: 1.2;
    letter-spacing: .02em;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: normal;
    word-break: normal;
    border-left: 1px solid var(--gold-20);
    border-top: none;
    border-right: none;
    border-bottom: none;
  }
  .sheet-body .mpbar button:first-of-type { border-left: none; }

  /* B6 — nút foreign: full-width dưới lưới 4 nút, cao 44px */
  .sheet-body .mpbar .mp-sep { display: none; }
  .sheet-body .mpbar #btn-foreign {
    grid-column: 1 / -1;
    min-height: 44px;
    border-left: none;
    border-top: 1px solid var(--gold-20);
    font-size: 11px;
    letter-spacing: .06em;
  }

  /* #filters trên mobile: lưới 2 cột, mỗi ô cao 44px, chữ xuống tối đa 2 dòng */
  .sheet-body .filters {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    border: 1px solid var(--hair);
    background: var(--midnight-soft);
    overflow: visible;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
    gap: 0;
  }
  .sheet-body .filters .chip {
    min-height: 44px;
    height: auto;
    padding: 8px 10px;
    font-size: 11px;
    line-height: 1.25;
    letter-spacing: .06em;
    white-space: normal;
    word-break: break-word;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
    text-align: left;
    border-right: 1px solid var(--gold-20);
    border-bottom: 1px solid var(--gold-20);
    border-left: none;
    border-top: none;
  }
  .sheet-body .filters .chip:nth-child(2n) { border-right: none; }
  .chrome.bc { left: 50%; right: auto; transform: translateX(-50%); align-items: center; }
  .bottom-sheet { width: 440px; }
}
/* ===== T3 · Nhãn điểm đến kiểu sticker (Crystal, chữ Midnight, vạch vàng) ===== */
.poi .plaque { gap: 8px; padding: 7px 12px 6px 10px; background: rgba(239,236,234,.95); border: none; border-left: 3px solid var(--gold);
  box-shadow: 0 3px 12px rgba(0,25,30,.35); border-radius: 2px; }
.poi .plaque svg { width: 13px; height: 13px; stroke: var(--midnight); }
.poi .name { font-family: var(--sans); font-weight: 600; font-size: 12px; letter-spacing: .08em; color: var(--midnight); }
.poi .stem { background: linear-gradient(var(--gold), rgba(255,255,255,.85)); }
.poi .dot { width: 8px; height: 8px; background: var(--gold); box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0,20,24,.45); margin-bottom: -4px; }
.poi:hover .plaque, .poi.is-active .plaque { background: #fff; border-color: var(--gold); transform: translateY(-2px); }
.poi.project .plaque { background: linear-gradient(180deg, var(--midnight-proj-a), var(--midnight-proj-b)); border: 1px solid var(--gold); border-left-width: 1px; }
.poi.project .plaque svg { stroke: var(--gold); }
.poi.project .name { font-family: var(--serif); color: var(--gold-hi); font-size: 17px; font-weight: 500; letter-spacing: .14em; }
@media (max-width: 640px) { .poi .name { font-size: 10.5px; } .poi .plaque { padding: 5px 9px 4px 8px; gap: 6px; } .poi.project .name { font-size: 13px; } }
@media (max-width: 640px) { #btn-rotate { display: none; } }

/* T3 — la bàn mặt đất (chỉ hiện khi nhìn xuống) */
#viewer .gc-line, #viewer .gc-lbl { opacity: 0; transition: opacity .6s cubic-bezier(.4,0,.2,1); pointer-events: none; }
#viewer.look-down .gc-line, #viewer.look-down .gc-lbl { opacity: 1; }
.gc-lbl { font: 500 9px/1 Inter, Arial, sans-serif; letter-spacing: .24em; text-transform: uppercase; color: #EFECEA; background: rgba(0,42,48,.62); border: 1px solid rgba(185,151,101,.45); padding: 3px 5px 3px 7px; border-radius: 1px; white-space: nowrap; }
.gc-lbl.n { color: #DCC291; border-color: #B99765; background: rgba(0,42,48,.85); }
@media (prefers-reduced-motion: reduce) { #viewer .gc-line, #viewer .gc-lbl { transition: none; } }

/* T1g — nhãn điểm đến bị chồng được nâng lên nhiều tầng (declutter đặt --raise); chân nhãn kéo dài theo */
.poi .plaque { transform: translateY(calc(-1 * var(--raise, 0px))); }
.poi:hover .plaque, .poi.is-active .plaque { transform: translateY(calc(-1 * var(--raise, 0px) - 2px)); }
.poi .stem { position: relative; }
.poi .stem::before { content: ""; position: absolute; left: 0; bottom: 100%; width: 1px; height: var(--raise, 0px); background: var(--gold); opacity: .8; }
.poi:not(.project) .plaque { padding: 5px 10px 4px 8px; gap: 7px; }
.poi:not(.project) .name { font-size: 11px; }
@media (max-width: 640px) { .poi:not(.project) .plaque { padding: 4px 8px 3px 7px; gap: 5px; } .poi:not(.project) .name { font-size: 10px; } }
/* T1h — mobile: thanh công cụ thu gọn còn la bàn + nút "⋯", mở ra khi bấm (không che biển in bên phải) */
#btn-more { display: none; }
#btn-more svg { fill: currentColor; stroke: none; }
@media (max-width: 640px) {
  #btn-more { display: grid; }
  .chrome.tr:not(.tools-open) .tools .ibtn:not(#btn-more) { display: none; }
  .chrome.tr:not(.tools-open) .tools .ibtn#btn-more { border-top: 1px solid var(--gold-20); }
  .chrome.tr.tools-open #btn-rotate { display: none; }
}

/* ===== T1i · Phân loại nhãn ===== */
/* Nhãn đặc biệt: giao thông (ga metro, sân bay, cầu) — vàng, chữ Midnight */
.poi.s-tr .plaque, .bk-mark .bk-plate { background: linear-gradient(180deg, #DCC08B, #B99765); border: 1px solid #F3E2BF; border-left: 1px solid #F3E2BF;
  box-shadow: 0 0 0 1px rgba(0,42,48,.35), 0 4px 14px rgba(0,20,24,.45); }
.poi.s-tr .name { color: var(--midnight); font-weight: 700; }
.poi.s-tr .plaque svg { stroke: var(--midnight); }
.poi.s-tr .stem { background: linear-gradient(#B99765, rgba(233,204,148,.85)); }
.poi.s-tr .dot { background: #B99765; }
/* thiên nhiên (công viên, sông) — xanh rêu, chữ trắng */
.poi.s-na .plaque { background: rgba(31,92,80,.94); border: 1px solid rgba(160,214,190,.7); border-left: 1px solid rgba(160,214,190,.7); }
.poi.s-na .name { color: #F2FBF6; font-weight: 600; }
.poi.s-na .plaque svg { stroke: #BFE8D2; }
.poi.s-na .stem { background: linear-gradient(#7CC3A3, rgba(255,255,255,.85)); }
.poi.s-na .dot { background: #4FA383; }
/* khu đô thị khác — đồng (brass), chữ trắng */
.poi.s-ur .plaque { background: rgba(166,96,78,.94); border: 1px solid #F0C2B5; border-left: 1px solid #F0C2B5; }
.poi.s-ur .name { color: #FFF6F2; font-weight: 600; }
.poi.s-ur .plaque svg { stroke: #FFE0D6; }
.poi.s-ur .stem { background: linear-gradient(#D78F7D, rgba(255,255,255,.85)); }
.poi.s-ur .dot { background: #D78F7D; }
/* điểm thường (trường, TTTM, khách sạn, toà nhà) — sticker sáng, nhỏ gọn để lùi về sau */
.poi.minor .plaque { padding: 5px 9px 4px 7px; gap: 6px; background: rgba(239,236,234,.9); border-left-width: 2px; }
.poi.minor .name { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; }
.poi.minor .plaque svg { width: 11px; height: 11px; }
.poi.minor .dot { width: 6px; height: 6px; margin-bottom: -3px; }
/* tên đường — biển màu tuyến, chữ đậm có viền sáng, nổi nhất */
.bk-road .bk-plate { font-size: 13.5px; font-weight: 800; letter-spacing: .1em; padding: 8px 14px 7px; color: var(--t);
  border: 1.5px solid rgba(255,255,255,.85); box-shadow: 0 0 0 1px rgba(0,30,35,.35), 0 0 16px 2px color-mix(in srgb, var(--c) 55%, transparent), 0 4px 12px rgba(0,25,30,.4);
  text-shadow: 0 1px 2px rgba(0,25,30,.25); }
.bk-road .bk-stem { height: calc(var(--stem) * .7); }
/* tên hồ — chữ nghiêng có chân, nhỏ, trắng */
.bk-water .bk-plate { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 17px; letter-spacing: .06em; text-transform: none;
  color: #fff; text-shadow: 0 1px 2px rgba(0,30,40,.6), 0 0 10px rgba(0,30,40,.35); }
/* Khu 13 Bộ ngành… */
.bk-area .bk-plate { font-size: 12px; }
@media (max-width: 640px) {
  .bk-road .bk-plate { font-size: 11px; padding: 6px 10px 5px; }
  .bk-water .bk-plate { font-size: 14px; }
  .poi.minor .name { font-size: 9.5px; }
}
/* tên căn (masterplan) — nằm ngang, nhỏ, theo mức phóng */
.tag.unit { padding: 1px 3px; font-size: calc(var(--zk,1) * 8.5px); font-weight: 700; letter-spacing: .02em; color: var(--midnight); background: none;
  text-shadow: 0 0 2px rgba(255,255,255,.9), 0 0 4px rgba(255,255,255,.7); line-height: 1.05; text-align: center; cursor: pointer; }
.tag.unit.b4 { color: #fff; text-shadow: 0 0 2px rgba(0,42,48,.9), 0 0 4px rgba(0,42,48,.7); }
.tag.unit small { display: none; font-size: .78em; font-weight: 500; letter-spacing: 0; }
#viewer.zoom-in .tag.unit small { display: block; }
.tag.unit.is-sel { color: var(--gold-hi); text-shadow: 0 0 3px var(--midnight); }
.tag.tower { font-size: 10px; padding: 4px 8px 3px; }
/* T1i — bớt rối: ở chế độ "Tất cả", điểm thường chỉ hiện khi phóng to (hoặc khi chọn nhóm trong bộ lọc) */
/* T1n: KHÔNG dùng display:none — PSV đo kích thước marker lúc vẽ; ẩn bằng display làm kích thước = 0 → khi hiện lại nhãn lệch khỏi điểm */
body.f-all #viewer:not(.zoom-mid) .poi.minor:not(.is-active) { visibility: hidden; opacity: 0; pointer-events: none; }
/* T1j — mốc lớn (Lotte Center, Nhà hát Opera, Bộ Công an): Midnight, chữ vàng có chân */
.poi.s-lm .plaque { background: rgba(0,42,48,.94); border: 1px solid var(--gold); border-left: 1px solid var(--gold); }
.poi.s-lm .name { font-family: var(--serif); color: var(--gold-hi); font-weight: 600; font-size: 13px; letter-spacing: .1em; }
.poi.s-lm .plaque svg { stroke: var(--gold); }
.poi.s-lm .stem { background: linear-gradient(var(--gold), var(--gold-hi-85)); }
.poi.s-lm .dot { background: var(--gold); }
/* T1j — nhìn xuống masterplan: ẩn nhãn dự án nổi (bản vẽ đã có tên tòa, ranh K8CT1) để không che căn */
#viewer.look-down .poi.project { opacity: 0; pointer-events: none; transition: opacity .5s var(--ease); }

/* ===== T1k · Hệ nhãn thống nhất (sau Muse review) =====
   Chỉ TÊN ĐƯỜNG mang màu (trùng màu tuyến in trên ảnh). Mốc & giao thông: Midnight + chữ vàng có chân.
   Khu đô thị/khu vực: Crystal + vạch đồng. Thiên nhiên: chữ nghiêng trắng, không biển. Điểm thường: chip nhỏ khi phóng to. */
.poi.s-tr .plaque, .bk-mark .bk-plate { background: rgba(0,42,48,.94); border: 1px solid var(--gold); border-left: 1px solid var(--gold); box-shadow: 0 4px 14px rgba(0,20,24,.45); }
.poi.s-tr .name { font-family: var(--serif); color: var(--gold-hi); font-weight: 600; font-size: 13px; letter-spacing: .1em; }
.bk-mark .bk-plate { font-family: var(--serif); color: var(--gold-hi); font-weight: 600; font-size: 14px; letter-spacing: .12em; padding: 8px 14px 7px; }
.poi.s-tr .plaque svg { stroke: var(--gold); }
.bk-mark .bk-plate svg { color: var(--gold); }
.poi.s-tr .stem, .bk-mark .bk-stem { background: linear-gradient(var(--gold), var(--gold-hi-85)); }
.poi.s-tr .dot, .bk-mark .bk-dot { background: var(--gold); }
.poi.s-ur .plaque { background: rgba(239,236,234,.96); border: none; border-left: 4px solid #D78F7D; box-shadow: 0 3px 12px rgba(0,25,30,.35); }
.poi.s-ur .name { font-family: var(--sans); color: var(--midnight); font-weight: 700; font-size: 12px; }
.poi.s-ur .plaque svg { stroke: var(--midnight); }
.poi.s-ur .stem { background: linear-gradient(#D78F7D, rgba(255,255,255,.85)); }
.poi.s-ur .dot { background: #D78F7D; }
.poi.s-na .plaque { background: none; border: none; box-shadow: none; padding: 0 2px; }
.poi.s-na .plaque svg { display: none; }
.poi.s-na .name { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 17px; letter-spacing: .05em; text-transform: none; color: #fff;
  text-shadow: 0 1px 2px rgba(0,30,40,.7), 0 0 10px rgba(0,30,40,.45); }
.poi.s-na .stem { background: linear-gradient(rgba(255,255,255,.9), rgba(255,255,255,.5)); }
.poi.s-na .dot { width: 6px; height: 6px; background: #fff; box-shadow: 0 0 0 1px rgba(0,42,48,.5); margin-bottom: -3px; }
.poi.s-na:hover .plaque, .poi.s-na.is-active .plaque { background: none; }
.bk-road .bk-plate { font-size: 12.5px; font-weight: 700; padding: 7px 13px 6px; border: 1px solid rgba(255,255,255,.8);
  box-shadow: 0 0 0 1px rgba(0,30,35,.3), 0 3px 10px rgba(0,25,30,.35); text-shadow: none; }
.bk-road.minor .bk-plate { font-size: 9.5px; font-weight: 600; letter-spacing: .08em; padding: 4px 7px 3px; background: rgba(239,236,234,.9); color: #002A30;
  border: none; box-shadow: 0 1px 5px rgba(0,25,30,.3); }
.bk-road.minor .bk-stem { height: 14px; background: rgba(255,255,255,.85); }
.bk-road.minor .bk-dot { width: 6px; height: 6px; border-width: 1px; background: #E9D6AE; }
@media (max-width: 640px) { .poi.s-na .name { font-size: 14px; } .bk-mark .bk-plate { font-size: 12px; padding: 6px 10px 5px; } .poi.s-tr .name { font-size: 11.5px; } }
.poi.s-na .name, .bk-water .bk-plate { text-shadow: 0 1px 2px rgba(0,42,48,.9), 0 0 6px rgba(0,42,48,.75), 0 0 14px rgba(0,42,48,.5); }
/* T5b — Editor trên nền ảnh đã in: nhãn đường/vùng dạng biển phẳng, không xoay, dễ kéo */
body.editing .road-label, body.editing .road-label.minor { background: rgba(239,236,234,.96); color: #002A30; border: 1px solid #002A30; font-size: 11px; letter-spacing: .08em; padding: 4px 8px; box-shadow: 0 2px 6px rgba(0,25,30,.4); }
body.editing .area-label, body.editing .area-label.lake, body.editing .area-label.gov, body.editing .area-label.project { font-family: var(--sans); font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(0,42,48,.88); color: #EFECEA; border: 1px dashed rgba(255,255,255,.7); padding: 4px 8px; text-shadow: none; }

/* T1n — chấm của biển đường/khu nằm đúng điểm neo (bù viền chấm) */
.bk-road .bk-dot, .bk-mark .bk-dot, .bk-area .bk-dot { margin-bottom: -6px; }

/* T5 — màn chờ tức thì (#boot-splash) giữ đúng bố cục màn mở đầu thật → không nhảy khi đổi */
.intro .boot-hint { min-height: 1.4em; }
@media (max-width: 640px) { .intro .boot-hint { min-height: 2.6em; } }
.intro .go { min-width: 240px; } /* đủ chỗ cho "Đang tải ảnh 360°…" → nút không co giãn khi đổi chữ */

/* ---------- T0b · Editor sign-in (từ nền MIK) ---------- */
.edit-login { position: fixed; z-index: 70; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(320px, calc(100vw - 48px)); padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 18px 48px var(--shadow-black-80); }
.edit-login b { font-family: var(--serif); font-weight: 500; font-size: 17px; letter-spacing: .06em; color: var(--gold-hi); }
.edit-login label { display: flex; flex-direction: column; gap: 6px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.edit-login input { font: 16px var(--sans); color: var(--crystal); background: var(--shadow-black-25); border: 1px solid var(--gold-30); padding: 9px 10px; border-radius: 0; width: 100%; min-height: 44px; }
.edit-login input:focus { outline: 1px solid var(--gold); outline-offset: 1px; }
.edit-login .el-err { min-height: 1.4em; font-size: 12px; line-height: 1.4; color: var(--brass); }
.edit-login .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.edit-login .btn { min-height: 44px; }
.edit-login .btn[disabled] { opacity: .6; cursor: wait; }
.editor .ed-warn { margin: 0; padding: 8px 16px; font-size: 11px; line-height: 1.45; color: var(--brass); border-bottom: 1px solid var(--hair); }
body.signin .intro > * { opacity: 0; pointer-events: none; }

/* T0b-3 — bảng chia sẻ: sao chép liên kết · lưu ảnh góc nhìn */
.share-pop { position: fixed; z-index: 60; display: flex; flex-direction: column; min-width: 236px; padding: 4px 0; animation: sharePop .5s cubic-bezier(.4,0,.2,1); }
.share-pop button { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 18px 0 14px; background: none; border: 0; color: var(--crystal, #EFECEA); font: 400 13px/1.2 var(--sans); letter-spacing: .04em; text-align: left; cursor: pointer; transition: background .5s cubic-bezier(.4,0,.2,1), color .5s cubic-bezier(.4,0,.2,1); }
.share-pop button + button { border-top: 1px solid var(--gold-20); }
.share-pop button:hover, .share-pop button:focus-visible { background: rgba(185,151,101,.12); color: var(--gold-hi, #DCC291); outline: none; }
.share-pop svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--gold, #B99765); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
@keyframes sharePop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .share-pop { animation: none; } }

/* ---------- T0b-4: hiệu năng (lấy từ MIK TASK-20) ---------- */
/* Điện thoại / cảm ứng: bỏ làm mờ nền sau kính (phải tính lại mỗi khung khi ảnh 360 chuyển động), bù bằng nền đặc hơn */
@media (pointer: coarse) {
  :root { --midnight-glass: rgba(0, 42, 48, .9); --midnight-soft: rgba(0, 42, 48, .76); }
  .glass, .scene-title, #mp-legend, .bottom-sheet, .edit-login, .share-pop, .editor-mobile-notice { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}
/* ?fps=1 — đồng hồ khung hình để đo trên máy thật */
.fps-box { position: fixed; z-index: 99; left: max(8px, env(safe-area-inset-left, 0px)); top: 42%; padding: 4px 7px; font: 11px/1.35 ui-monospace, Menlo, monospace; white-space: pre; color: #EFECEA; background: rgba(0, 42, 48, .85); border: 1px solid #B99765; pointer-events: none; }

/* BẢN THỬ ?thu=1 — tên đường chạy dọc thân đường (T0b-2) */
.geo-road{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:1;overflow:visible}
.geo-road text{font-family:var(--sans);font-weight:700;letter-spacing:.14em;fill:#fff;stroke:var(--rc);stroke-width:3.2px;stroke-linejoin:round;paint-order:stroke}
.geo-road text.minor{font-weight:600;letter-spacing:.12em}
.geo-road text.area{letter-spacing:.2em}
.geo-road text.lot{font-weight:700;letter-spacing:.1em;stroke-width:3.6px}
.geo-road text.tap{pointer-events:auto;cursor:pointer}
.geo-road .hit{fill:none;stroke:transparent;stroke-linecap:round;pointer-events:stroke;cursor:pointer}
html.trial-geo .bk.flat{visibility:hidden!important;opacity:0!important;pointer-events:none!important}  /* in phẳng trên mặt đất thay biển */
html.trial-geo .bk-road:not(.minor){visibility:hidden!important;opacity:0!important;pointer-events:none!important}
.psv-marker.occ-k8{visibility:hidden!important;pointer-events:none!important}  /* bản thử tháp: biển mặt đất nằm sau tháp */
/* biển điểm đến chỉ nhận bấm ở biển tên + chấm; khoảng trống dọc thân cột không chặn bấm căn masterplan (anh Tuấn 25/11: K8B bị biển K8CT1 chặn) */
.psv-marker.m-poi, .poi{pointer-events:none} .poi .plaque, .poi .dot{pointer-events:auto}
#viewer.look-down .poi.project .plaque, #viewer.look-down .poi.project .dot{pointer-events:none}
/* thu10 — chú giải màu lô đất (góc dưới trái, thu gọn mặc định) */
.lu-legend{position:fixed;z-index:19;left:max(16px,env(safe-area-inset-left,0px));bottom:calc(18px + env(safe-area-inset-bottom,0px));font-family:var(--sans);color:var(--crystal);display:flex;flex-direction:column-reverse;align-items:flex-start;gap:6px}
.lu-legend[hidden]{display:none}
.lu-btn{display:flex;align-items:center;gap:10px;height:34px;padding:0 13px 0 11px;background:var(--midnight-glass);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border:1px solid var(--hair);color:inherit;font:inherit;font-size:10px;letter-spacing:.16em;text-transform:uppercase;cursor:pointer;transition:border-color .5s var(--ease)}
.lu-btn:hover,.lu-legend.open .lu-btn{border-color:var(--gold)}
.lu-dots{display:flex;gap:3px}
.lu-dots i,.lu-list i{display:block;width:7px;height:7px;background:var(--c);border-radius:1px}
.lu-list{list-style:none;margin:0;padding:10px 14px 10px 12px;background:var(--midnight-glass);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border:1px solid var(--hair);display:grid;gap:7px;font-size:11px;letter-spacing:.04em;opacity:0;transform:translateY(6px);visibility:hidden;transition:opacity .5s var(--ease),transform .5s var(--ease),visibility .5s}
.lu-legend.open .lu-list{opacity:1;transform:none;visibility:visible}
.lu-list li{display:flex;align-items:center;gap:10px;white-space:nowrap}
.lu-list i{width:14px;height:9px;background:color-mix(in srgb,var(--c) 62%,transparent);border:1.5px solid var(--c)}
body.card-open .lu-legend{opacity:0;pointer-events:none}
@media (max-width:640px){.lu-t{display:none}.lu-btn{height:36px;padding:0 11px}.lu-legend{bottom:calc(72px + env(safe-area-inset-bottom,0px))}body.editing .lu-legend{display:none}}
body:has(#bottom-chrome.sheet-open) .lu-legend,body:has(#drawer.open) .lu-legend{display:none}
@media (prefers-reduced-motion:reduce){.lu-list{transition:none}}
/* thu13 — nhãn lô kiểu 'tag' (bản thử ?nhan=tag): ngang, một cỡ, ô màu nhỏ, không nền */
.geo-road .lot-tag text{fill:var(--crystal);font-family:var(--sans);font-weight:600;letter-spacing:.12em;text-transform:uppercase;stroke:rgba(0,42,48,.78);stroke-width:3px;paint-order:stroke;stroke-linejoin:round}
.geo-road .lot-tag .sw{fill:var(--c);stroke:rgba(0,42,48,.85);stroke-width:1.5px;paint-order:stroke}
.geo-road .lot-tag.tap{pointer-events:auto;cursor:pointer}
/* T7 — kiosk (TV nhà mẫu): ẩn nút không dùng trên màn công cộng, không bôi đen/không menu chạm giữ */
html.kiosk #btn-share,html.kiosk #btn-full,html.kiosk #btn-gyro,html.kiosk .clink{display:none!important}
html.kiosk body{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
