/* ============================================================================
   app.css – Giao diện website 360° Đông Hòa Sunrise City
   Màu chủ đạo: nâu cao cấp + vàng ánh kim. Font: Be Vietnam Pro.
   ========================================================================== */
:root {
  --b900: #1c1109; --b800: #2b1a0f; --b700: #3a2414; --b600: #5a3a21; --b500: #754e2d;
  --gold: #c9a26b; --gold-2: #e3c48f; --gold-3: #f3dfb8; --cream: #f7efe3; --muted: #cdbba3;
  --p1: #9758f7; --p1-soft: #c7a6ff;
  --glass: rgba(34, 21, 11, 0.74); --glass-2: rgba(48, 30, 16, 0.86);
  --line: rgba(227, 196, 143, 0.22);
  --radius: 16px;
  --shadow: 0 12px 40px rgba(10, 5, 2, 0.45);
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--b800); color: var(--cream); overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
#app { position: fixed; inset: 0; overflow: hidden; user-select: none; -webkit-user-select: none; }
#stage { position: absolute; inset: 0; cursor: grab; }
#stage:active { cursor: grabbing; }
#stage.pointer { cursor: pointer; }
#vignette { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 55%, transparent 58%, rgba(20, 10, 4, 0.38) 100%),
              linear-gradient(to bottom, rgba(20, 10, 4, 0.42), transparent 16%, transparent 80%, rgba(20, 10, 4, 0.5)); }
.ico { width: 20px; height: 20px; display: block; }

/* ---------- Kính mờ ---------- */
.glass { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(14px) saturate(1.25); -webkit-backdrop-filter: blur(14px) saturate(1.25); box-shadow: var(--shadow); }

/* ---------- Thanh trên ---------- */
#topbar { position: absolute; top: calc(14px + var(--safe-t)); left: 18px; right: 18px; display: flex; align-items: flex-start;
  justify-content: space-between; pointer-events: none; z-index: 20; }
#topbar > * { pointer-events: auto; }
.brand { padding: 0; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.55)); }
.brand img { height: 74px; display: block; }
.top-actions { display: flex; gap: 10px; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--glass);
  border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--gold-2);
  transition: background .2s, transform .2s, color .2s; position: relative; }
.icon-btn:hover { background: var(--glass-2); color: var(--gold-3); transform: translateY(-1px); }
.icon-btn.active { background: linear-gradient(145deg, var(--gold-2), var(--gold)); color: var(--b800); }
[data-tip]:hover::after { content: attr(data-tip); position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  background: var(--b900); color: var(--cream); font-size: 12px; padding: 5px 10px; border-radius: 8px; white-space: nowrap; pointer-events: none; }
.top-actions [data-tip]:hover::after { right: auto; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); }

/* ---------- Chú giải ---------- */
#legend { position: absolute; left: 18px; top: calc(108px + var(--safe-t)); width: 252px; z-index: 15; overflow: hidden; }
.legend-head { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); font-weight: 600; }
.chev { width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .3s; margin-top: -4px; }
#legend.collapsed .chev { transform: rotate(-135deg); margin-top: 4px; }
.legend-body { padding: 0 16px 14px; display: grid; gap: 10px; max-height: 420px; transition: max-height .35s, padding .35s, opacity .3s; }
#legend.collapsed .legend-body { max-height: 0; padding-bottom: 0; opacity: 0; }
.lg-row { display: flex; gap: 12px; align-items: center; }
.lg-row b { display: block; font-size: 14px; font-weight: 600; }
.lg-row small { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.lg-phase1 { cursor: pointer; border-radius: 12px; padding: 6px; margin: -6px; transition: background .2s; }
.lg-phase1:hover { background: rgba(151, 88, 247, 0.14); }
.sw { width: 28px; height: 28px; border-radius: 8px; flex: none; }
.sw-p1 { background: var(--p1); box-shadow: 0 0 0 2px rgba(255, 255, 255, .85) inset, 0 0 16px 2px rgba(151, 88, 247, .75); animation: p1glow 2.6s ease-in-out infinite; }
@keyframes p1glow { 50% { box-shadow: 0 0 0 2px rgba(255, 255, 255, .85) inset, 0 0 24px 6px rgba(199, 166, 255, .9); } }
.sw-other { background: conic-gradient(#f55aa1 0 25%, #cfe956 0 50%, #7ddfb3 0 75%, #f9b153 0); opacity: .85; box-shadow: 0 0 0 2px rgba(255, 255, 255, .5) inset; }
.lg-sep { height: 1px; background: var(--line); margin: 2px 0; }
.lg-toggles { display: grid; gap: 8px; }
.tg { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--cream); cursor: pointer; }
.tg input { display: none; }
.tg i { width: 34px; height: 20px; border-radius: 20px; background: rgba(255, 255, 255, .18); position: relative; transition: background .25s; flex: none; }
.tg i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .25s; }
.tg input:checked + i { background: var(--gold); }
.tg input:checked + i::after { transform: translateX(14px); }

/* ---------- Thanh công cụ dưới ---------- */
#dock { position: absolute; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translateX(-50%); display: flex; gap: 4px; padding: 6px; z-index: 20; border-radius: 22px; max-width: calc(100% - 24px); }
.dock-btn { display: flex; align-items: center; gap: 9px; padding: 11px 16px; border-radius: 16px; font-size: 14px; font-weight: 500; color: var(--cream); white-space: nowrap; transition: background .2s, color .2s; }
.dock-btn .ico { color: var(--gold-2); }
.dock-btn:hover { background: rgba(227, 196, 143, 0.12); }
.dock-btn.active { background: linear-gradient(145deg, var(--gold-2), var(--gold)); color: var(--b800); }
.dock-btn.active .ico { color: var(--b800); }
.dock-btn.p1 .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--p1); box-shadow: 0 0 10px 2px rgba(151, 88, 247, .9); animation: blink 1.8s infinite; }
@keyframes blink { 50% { opacity: .35; } }

/* ---------- Điều khiển phải ---------- */
#sidectrl { position: absolute; right: 18px; bottom: calc(96px + var(--safe-b)); display: grid; gap: 10px; z-index: 15; justify-items: center; }
#compass { width: 50px; height: 50px; border-radius: 50%; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(12px); position: relative; margin-bottom: 4px; }
#compass .needle { position: absolute; inset: 0; transition: transform .1s linear; }
#compass .needle::before { content: ''; position: absolute; left: 50%; top: 7px; margin-left: -5px; border: 5px solid transparent; border-bottom: 16px solid var(--gold-2); border-top: 0; }
#compass .needle::after { content: ''; position: absolute; left: 50%; bottom: 7px; margin-left: -5px; border: 5px solid transparent; border-top: 16px solid rgba(247, 239, 227, .35); border-bottom: 0; }
#compass span { position: absolute; left: 50%; top: -18px; transform: translateX(-50%); font-size: 11px; font-weight: 700; color: var(--gold-2); text-shadow: 0 1px 3px #000; }

/* ---------- Gợi ý ---------- */
#hint { position: absolute; left: 50%; bottom: calc(92px + var(--safe-b)); transform: translateX(-50%); z-index: 14; display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--cream); background: rgba(28, 17, 9, .55); padding: 8px 16px; border-radius: 30px; backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .6s; pointer-events: none; white-space: nowrap; }
#hint.on { opacity: 1; }
.hint-hand { width: 18px; height: 18px; border: 2px solid var(--gold-2); border-radius: 50%; position: relative; animation: hintSwipe 2.4s ease-in-out infinite; }
@keyframes hintSwipe { 0%, 100% { transform: translateX(-6px); } 50% { transform: translateX(6px); } }

/* ---------- Nhãn trên ảnh 360 ---------- */
#labels { position: absolute; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.lbl { position: absolute; left: 0; top: 0; opacity: 0; transition: opacity .35s; will-change: transform; pointer-events: none; }
.lbl.on { opacity: 1; }
.lbl.on .poi-card, .lbl.on .phase-card, .lbl.on .blk-c { pointer-events: auto; }
.poi-card { position: absolute; left: 0; bottom: var(--lift, 60px); transform: translateX(-50%); display: flex; align-items: center; gap: 8px;
  padding: 5px 13px 5px 5px; border-radius: 30px; background: linear-gradient(180deg, rgba(58, 36, 20, .92), rgba(36, 22, 12, .92));
  border: 1px solid rgba(227, 196, 143, .55); box-shadow: 0 6px 18px rgba(0, 0, 0, .4); white-space: nowrap; cursor: pointer;
  transition: transform .2s, border-color .2s; }
.poi-card:hover { transform: translateX(-50%) translateY(-2px); border-color: var(--gold-2); }
.poi-ico { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(145deg, var(--gold-2), var(--gold)); color: var(--b800); display: grid; place-items: center; flex: none; }
.poi-ico .ico { width: 15px; height: 15px; stroke-width: 2; }
.poi-name { font-size: 13px; font-weight: 600; letter-spacing: .01em; color: var(--cream); line-height: 1.2; }
.poi-name em { display: block; font-style: normal; font-weight: 400; font-size: 11px; color: var(--gold-3); opacity: .85; }
.poi-stem { position: absolute; left: -1px; bottom: 0; width: 2px; height: var(--lift, 60px); background: linear-gradient(to top, rgba(227, 196, 143, .95), rgba(227, 196, 143, .35)); }
.poi-dot { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold-2); border: 2px solid #fff; box-shadow: 0 0 0 0 rgba(227, 196, 143, .7); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(227, 196, 143, .7); } 70% { box-shadow: 0 0 0 12px rgba(227, 196, 143, 0); } 100% { box-shadow: 0 0 0 0 rgba(227, 196, 143, 0); } }
.poi.tier1 .poi-name { font-size: 14px; }
.poi.tier1 .poi-ico { width: 30px; height: 30px; }
.poi.tier3 .poi-card { padding: 3px 11px 3px 3px; }
.poi.tier3 .poi-ico { width: 22px; height: 22px; }
.poi.tier3 .poi-name { font-size: 12px; }
.poi.inproj .poi-card { border-color: var(--gold-2); }
.poi.far .poi-dot { width: 9px; height: 9px; left: -4.5px; top: -4.5px; }
.poi-pop { position: absolute; left: 0; bottom: calc(var(--lift, 60px) + 46px); transform: translateX(-50%); width: 240px; padding: 12px 14px; border-radius: 14px;
  background: var(--glass-2); border: 1px solid var(--line); font-size: 13px; line-height: 1.5; color: var(--cream); white-space: normal; box-shadow: var(--shadow); }
.shield-badge { position: absolute; transform: translate(-50%, -50%); padding: 4px 10px; border-radius: 7px; background: #2b62a8; color: #fff; font-weight: 700; font-size: 13px;
  letter-spacing: .04em; border: 2px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .45); }
.phase-card { position: absolute; left: 0; bottom: var(--lift, 90px); transform: translateX(-50%); text-align: center; cursor: pointer; white-space: nowrap; }
.phase-pill { display: inline-flex; align-items: center; gap: 10px; padding: 9px 18px 9px 12px; border-radius: 40px;
  background: linear-gradient(135deg, rgba(110, 58, 196, .92), rgba(66, 33, 122, .92)); border: 1.5px solid rgba(214, 190, 255, .9);
  box-shadow: 0 0 0 4px rgba(151, 88, 247, .18), 0 10px 28px rgba(40, 10, 80, .55); font-weight: 700; font-size: 15px; letter-spacing: .06em; color: #fff; }
.phase-pill .dot { width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255, 255, 255, .8); animation: pulseW 2s infinite; }
@keyframes pulseW { 70% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } }
.phase-pill small { font-weight: 500; letter-spacing: .02em; opacity: .9; font-size: 13px; }
.phase-sub { margin-top: 6px; font-size: 12px; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .9); }
.phase-stem { position: absolute; left: -1px; bottom: 0; width: 2px; height: var(--lift); background: linear-gradient(to top, rgba(214, 190, 255, .9), rgba(214, 190, 255, .2)); }
.blk-c { position: absolute; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 50%; background: #fff; color: #8a5a33; display: grid; place-items: center;
  font-weight: 700; font-size: 11.5px; box-shadow: 0 3px 10px rgba(0, 0, 0, .35); cursor: pointer; letter-spacing: -.01em; }

/* ---------- Tooltip ---------- */
#tooltip { position: absolute; z-index: 30; pointer-events: none; padding: 7px 12px; border-radius: 10px; background: rgba(28, 17, 9, .92); border: 1px solid rgba(214, 190, 255, .6);
  font-size: 13px; color: #fff; white-space: nowrap; transform: translate(14px, 14px); opacity: 0; transition: opacity .15s; }
#tooltip.on { opacity: 1; }
#tooltip b { color: var(--p1-soft); }

/* ---------- Khung thông tin ---------- */
#panel { position: absolute; top: calc(108px + var(--safe-t)); right: 18px; bottom: calc(96px + var(--safe-b)); width: 400px; z-index: 25; transform: translateX(calc(100% + 30px));
  transition: transform .45s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; }
#panel.open { transform: none; }
.panel-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; z-index: 2; }
.panel-body { overflow-y: auto; padding: 26px 24px 24px; scrollbar-width: thin; scrollbar-color: var(--b500) transparent; }
.panel-body h2 { margin: 0 0 4px; font-size: 22px; font-weight: 700; color: var(--gold-3); letter-spacing: .01em; padding-right: 40px; }
.kicker { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 8px; }
.panel-body p { font-size: 14px; line-height: 1.65; color: #eadfcf; margin: 10px 0; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0; }
.fact { padding: 12px 8px; border-radius: 12px; background: rgba(227, 196, 143, .08); border: 1px solid var(--line); text-align: center; }
.fact b { display: block; font-size: 24px; font-weight: 700; color: var(--gold-2); line-height: 1.1; }
.fact b small { font-size: 13px; font-weight: 500; margin-left: 2px; }
.fact span { font-size: 11.5px; color: var(--muted); }
.rows { display: grid; gap: 0; margin: 14px 0; border-top: 1px solid var(--line); }
.rows div { display: grid; grid-template-columns: 112px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.rows dt { color: var(--muted); } .rows dd { margin: 0; color: var(--cream); font-weight: 500; }
.partners { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.partner { background: #fff; border-radius: 12px; padding: 10px; display: grid; place-items: center; gap: 6px; text-align: center; }
.partner img { max-width: 100%; max-height: 54px; object-fit: contain; }
.partner small { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #8a5a33; font-weight: 600; }
.p1-head { display: flex; align-items: center; gap: 10px; }
.p1-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 30px; background: rgba(151, 88, 247, .2); border: 1px solid rgba(199, 166, 255, .6); color: #e4d4ff; font-weight: 600; font-size: 12.5px; }
.p1-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--p1-soft); animation: blink 1.8s infinite; }
.blocks { display: grid; gap: 8px; margin-top: 14px; }
.block-row { display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line); cursor: pointer; transition: background .2s, border-color .2s; text-align: left; width: 100%; }
.block-row:hover { background: rgba(151, 88, 247, .14); border-color: rgba(199, 166, 255, .55); }
.block-row .bid { width: 46px; height: 46px; border-radius: 50%; background: #fff; color: #8a5a33; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.block-row b { display: block; font-size: 14px; } .block-row small { color: var(--muted); font-size: 12px; }
.block-row .go { color: var(--gold-2); }
.region { display: grid; gap: 12px; margin-top: 12px; }
.region-card { padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.region-card h4 { margin: 0 0 8px; display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--gold-3); }
.region-card h4 .poi-ico { width: 30px; height: 30px; }
.region-card ul { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.7; color: #eadfcf; }
.poi-list { display: grid; gap: 6px; margin-top: 10px; }
.poi-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; cursor: pointer; transition: background .2s; text-align: left; width: 100%; font-size: 13.5px; }
.poi-row:hover { background: rgba(227, 196, 143, .1); }
.poi-row .poi-ico { width: 28px; height: 28px; }
.poi-row small { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.quote { margin: 16px 0 6px; padding: 14px 16px; border-left: 3px solid var(--gold); background: rgba(227, 196, 143, .07); border-radius: 0 12px 12px 0; font-size: 13.5px; line-height: 1.65; color: #eadfcf; font-style: italic; }
.cta { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.btn-gold, .btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 30px; font-weight: 600; font-size: 14px; transition: transform .2s, box-shadow .2s, background .2s; }
.btn-gold { background: linear-gradient(145deg, var(--gold-2), var(--gold)); color: var(--b800); box-shadow: 0 6px 18px rgba(201, 162, 107, .35); }
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(201, 162, 107, .45); }
.btn-ghost { border: 1px solid var(--line); color: var(--cream); }
.btn-ghost:hover { background: rgba(255, 255, 255, .06); }
.btn-gold .ico, .btn-ghost .ico { width: 18px; height: 18px; }

/* ---------- Hộp thoại ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(16, 9, 4, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity .35s; }
.modal.open { opacity: 1; pointer-events: auto; }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 3; }
.modal-card { position: relative; background: linear-gradient(180deg, #33200f, #24160b); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow);
  transform: translateY(16px) scale(.98); transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.modal.open .modal-card { transform: none; }
.lot-card { width: min(1060px, calc(100vw - 32px)); height: min(640px, calc(100vh - 48px)); display: grid; grid-template-columns: 1fr 340px; overflow: hidden; }
.lot-visual { position: relative; background: radial-gradient(circle at 50% 40%, #4a3020, #20130a); overflow: hidden; }
.lot-stage { position: absolute; inset: 22px; display: grid; place-items: center; }
.lot-stage .wrap { position: relative; transform-origin: center; }
.lot-stage img { display: block; width: 100%; height: 100%; }
.lot-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lot-stage .lp { fill: transparent; stroke: transparent; cursor: pointer; transition: fill .2s; }
.lot-stage .lp:hover { fill: rgba(255, 255, 255, .22); }
.lot-stage .lp.sel { fill: rgba(255, 214, 140, .28); stroke: #ffd28a; stroke-width: 3; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 6px rgba(255, 200, 110, .95)); animation: selPulse 1.8s ease-in-out infinite; }
@keyframes selPulse { 50% { fill: rgba(255, 214, 140, .12); } }
.lot-stage .dim { fill: rgba(20, 10, 4, .0); }
.lot-info { padding: 34px 28px 26px; display: flex; flex-direction: column; border-left: 1px solid var(--line); overflow-y: auto; }
.lot-code { font-size: 12px; letter-spacing: .2em; color: var(--gold); text-transform: uppercase; font-weight: 600; }
.lot-title { font-size: 34px; font-weight: 700; color: var(--gold-3); margin: 6px 0 4px; line-height: 1.1; }
.lot-status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 30px; background: rgba(151, 88, 247, .22); border: 1px solid rgba(199, 166, 255, .6);
  color: #eadcff; font-size: 12.5px; font-weight: 600; margin: 8px 0 18px; align-self: flex-start; }
.lot-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--p1-soft); animation: blink 1.8s infinite; }
.lot-stats { display: grid; gap: 10px; }
.stat { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, .045); border: 1px solid var(--line); }
.stat .poi-ico { width: 38px; height: 38px; } .stat .poi-ico .ico { width: 19px; height: 19px; }
.stat small { display: block; font-size: 12px; color: var(--muted); }
.stat b { font-size: 19px; color: var(--cream); font-weight: 700; }
.stat b sup { font-size: 11px; }
.lot-nav { display: flex; gap: 8px; margin-top: 14px; }
.lot-nav button { flex: 1; padding: 9px; border-radius: 12px; border: 1px solid var(--line); font-size: 13px; color: var(--cream); }
.lot-nav button:hover { background: rgba(255, 255, 255, .06); }
.lot-note { font-size: 12.5px; color: var(--muted); line-height: 1.55; margin-top: 14px; }
.lot-info .cta { margin-top: auto; padding-top: 16px; }
.contact-line { font-size: 14px; color: var(--gold-3); font-weight: 600; margin-top: 10px; }

/* ---------- Bản đồ ---------- */
.map-shell { position: absolute; inset: 0; display: flex; flex-direction: column; }
.map-top { display: flex; align-items: center; justify-content: center; padding: calc(14px + var(--safe-t)) 70px 10px; position: relative; }
.map-top .modal-close { top: calc(10px + var(--safe-t)); }
.map-tabs { display: flex; gap: 4px; padding: 5px; border-radius: 30px; background: var(--glass); border: 1px solid var(--line); overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.map-tab { padding: 9px 16px; border-radius: 24px; font-size: 13.5px; white-space: nowrap; color: var(--cream); }
.map-tab.active { background: linear-gradient(145deg, var(--gold-2), var(--gold)); color: var(--b800); font-weight: 600; }
.map-view { position: relative; flex: 1; overflow: hidden; cursor: grab; touch-action: none; }
.map-view:active { cursor: grabbing; }
.map-canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.map-canvas img { position: absolute; display: block; user-select: none; -webkit-user-drag: none; }
.map-ctrl { position: absolute; right: 18px; bottom: calc(18px + var(--safe-b)); display: grid; gap: 8px; }

/* ---------- Hướng dẫn ---------- */
.guide-card { width: min(420px, calc(100vw - 32px)); background: linear-gradient(180deg, #3a2414, #24160b); border: 1px solid var(--line); border-radius: 24px; padding: 26px 24px 20px;
  text-align: center; box-shadow: var(--shadow); transform: translateY(16px); transition: transform .4s; }
.modal.open .guide-card { transform: none; }
.guide-anim { height: 170px; border-radius: 18px; position: relative; overflow: hidden; background: url('../img/pano/pano_2k.jpg') 62% 70% / 320% auto; }
.guide-anim::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 10, 4, .1), rgba(20, 10, 4, .45)); }
.guide-step { font-size: 11px; letter-spacing: .2em; color: var(--gold); text-transform: uppercase; margin-top: 18px; font-weight: 600; }
.guide-text h3 { margin: 6px 0 6px; font-size: 21px; color: var(--gold-3); }
.guide-text p { margin: 0; font-size: 14px; color: #eadfcf; line-height: 1.6; min-height: 45px; }
.guide-dots { display: flex; gap: 6px; justify-content: center; margin: 16px 0; }
.guide-dots i { width: 7px; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .25); transition: width .3s, background .3s; }
.guide-dots i.on { width: 22px; background: var(--gold-2); }
.guide-actions { display: flex; justify-content: space-between; gap: 10px; }
.g-hand { position: absolute; z-index: 2; width: 46px; height: 46px; left: 50%; top: 50%; margin: -10px 0 0 -14px; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5)); }
.g-hand svg { width: 100%; height: 100%; }
.anim-drag .guide-anim { animation: panBg 3.2s ease-in-out infinite; }
.anim-drag .g-hand { animation: dragHand 3.2s ease-in-out infinite; }
@keyframes dragHand { 0%, 100% { transform: translateX(-60px); } 45%, 55% { transform: translateX(60px); } }
@keyframes panBg { 0%, 100% { background-position: 58% 70%; } 45%, 55% { background-position: 66% 70%; } }
.g-trail { position: absolute; left: 50%; top: 50%; height: 3px; width: 120px; margin-left: -60px; border-radius: 3px; background: linear-gradient(90deg, transparent, rgba(227, 196, 143, .9), transparent); z-index: 1; opacity: .8; }
.anim-pinch .guide-anim { animation: zoomBg 3s ease-in-out infinite; }
@keyframes zoomBg { 0%, 100% { background-size: 320% auto; } 50% { background-size: 420% auto; } }
.g-f { position: absolute; z-index: 2; width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: 0 0 0 6px rgba(255, 255, 255, .25); left: 50%; top: 50%; margin: -11px; }
.anim-pinch .g-f.a { animation: pinA 3s ease-in-out infinite; }
.anim-pinch .g-f.b { animation: pinB 3s ease-in-out infinite; }
@keyframes pinA { 0%, 100% { transform: translate(-18px, 14px); } 50% { transform: translate(-62px, 40px); } }
@keyframes pinB { 0%, 100% { transform: translate(18px, -14px); } 50% { transform: translate(62px, -40px); } }
.g-lot { position: absolute; z-index: 1; left: 50%; top: 50%; width: 140px; height: 56px; margin: -28px 0 0 -70px; border-radius: 6px; background: repeating-linear-gradient(90deg, #9758f7 0 18px, #7b44d6 18px 20px);
  box-shadow: 0 0 22px 4px rgba(151, 88, 247, .7); transform: perspective(300px) rotateX(48deg); }
.g-lot::after { content: ''; position: absolute; left: 60px; top: 0; width: 20px; height: 100%; background: rgba(255, 214, 140, .0); animation: lotSel 2.6s infinite; outline: 2px solid transparent; }
@keyframes lotSel { 0%, 40% { background: rgba(255, 214, 140, 0); outline-color: transparent; } 55%, 100% { background: rgba(255, 214, 140, .6); outline-color: #ffd28a; } }
.anim-tap .g-hand { animation: tapHand 2.6s ease-in-out infinite; }
@keyframes tapHand { 0%, 30% { transform: translate(40px, 40px) scale(1); } 45% { transform: translate(0, 0) scale(.9); } 55% { transform: translate(0, 0) scale(1); } 100% { transform: translate(0, 0); } }
.g-ripple { position: absolute; z-index: 2; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px; border-radius: 50%; border: 2px solid #fff; opacity: 0; animation: ripple 2.6s infinite; }
@keyframes ripple { 0%, 44% { transform: scale(.4); opacity: 0; } 46% { opacity: 1; } 75%, 100% { transform: scale(3.4); opacity: 0; } }

/* ---------- Màn hình chờ ---------- */
#loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 40%, #4a2f1b 0%, #2b1a0f 55%, #160d06 100%); transition: opacity .9s, visibility .9s; }
#loader.done { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; padding: 20px; }
.loader-logo { width: min(260px, 60vw); animation: rise 1.4s cubic-bezier(.2, .8, .2, 1) both; filter: drop-shadow(0 8px 30px rgba(227, 196, 143, .25)); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.loader-tag { margin-top: 18px; font-size: 13px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold-2); animation: rise 1.4s .3s both; }
.loader-bar { width: min(280px, 64vw); height: 2px; margin: 26px auto 0; background: rgba(255, 255, 255, .12); border-radius: 2px; overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-3)); transition: width .4s; }
.loader-note { margin-top: 12px; font-size: 12px; color: var(--muted); }
#nowebgl[hidden] { display: none; }
#nowebgl { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--b800); padding: 30px; text-align: center; font-size: 15px; }

/* ---------- Di động ---------- */
@media (max-width: 760px) {
  .brand img { height: 52px; }
  #topbar { left: 12px; right: 12px; top: calc(10px + var(--safe-t)); }
  .icon-btn { width: 40px; height: 40px; }
  #legend { left: 12px; top: auto; bottom: calc(86px + var(--safe-b)); width: 210px; }
  #legend .lg-toggles { display: none; }
  #legend .lg-sep { display: none; }
  .legend-head { padding: 9px 12px; }
  .legend-body { padding: 0 12px 10px; gap: 8px; }
  .sw { width: 22px; height: 22px; }
  .lg-row b { font-size: 13px; } .lg-row small { font-size: 11px; }
  #dock { left: 10px; right: 10px; transform: none; bottom: calc(10px + var(--safe-b)); justify-content: space-between; padding: 5px; border-radius: 18px; max-width: none; }
  .dock-btn { flex-direction: column; gap: 3px; padding: 7px 4px; font-size: 10.5px; flex: 1; border-radius: 13px; white-space: normal; text-align: center; line-height: 1.15; }
  .dock-btn .lbl-long { display: none; }
  #sidectrl { right: 12px; bottom: auto; top: calc(70px + var(--safe-t)); }
  #sidectrl #btnZoomIn, #sidectrl #btnZoomOut { display: none; }
  #compass { width: 42px; height: 42px; }
  #hint { bottom: calc(138px + var(--safe-b)); font-size: 11.5px; padding: 7px 13px; }
  #panel { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: 74vh; border-radius: 22px 22px 0 0; transform: translateY(105%); }
  #panel.open { transform: none; }
  .lot-card { grid-template-columns: 1fr; grid-template-rows: 46% 54%; height: calc(100vh - 32px); }
  .lot-info { border-left: 0; border-top: 1px solid var(--line); padding: 20px 18px; }
  .lot-title { font-size: 26px; }
  .poi-name { font-size: 12px; }
  .poi.tier3 { display: none; }
  .phase-pill { font-size: 13px; padding: 7px 14px 7px 10px; }
}
@media (max-width: 760px) and (orientation: landscape) {
  #legend { display: none; }
}
