/* CI Grand 3D location map */
:root {
  --bg: #090f1b;
  --glass: rgba(11, 17, 30, .78);
  --line: rgba(242, 207, 122, .16);
  --gold: #f2cf7a;
  --gold-hi: #ffe9ad;
  --gold-lo: #b98d3a;
  --text: #e9eefb;
  --dim: #93a4c4;
  --mute: #63748f;
  --panel-w: 348px;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
#map { position: fixed; inset: 0; }
.vignette { position: fixed; inset: 0; pointer-events: none; z-index: 2;
  background:
    linear-gradient(180deg, rgba(9,15,27,.92) 0%, rgba(9,15,27,.35) 14%, rgba(9,15,27,0) 30%),
    radial-gradient(120% 90% at 50% 55%, rgba(9,15,27,0) 55%, rgba(9,15,27,.72) 100%); }

.glass { background: var(--glass); border: 1px solid var(--line); border-radius: 16px;
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 18px 50px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.04); }
.ui { position: fixed; z-index: 5; opacity: 0; transform: translateY(10px); transition: opacity .7s ease, transform .7s ease; pointer-events: none; }
body.ready .ui { opacity: 1; transform: none; pointer-events: auto; }
body.ready .fine { pointer-events: none; }

/* ---------- intro ---------- */
.intro { position: fixed; inset: 0; z-index: 9; display: grid; place-items: center; text-align: center; pointer-events: none;
  background: radial-gradient(60% 50% at 50% 50%, rgba(9,15,27,.78), rgba(9,15,27,.2) 70%, rgba(9,15,27,0));
  transition: opacity 1.4s ease; }
.intro.out { opacity: 0; }
.intro-kicker { letter-spacing: .42em; font-size: 11px; text-transform: uppercase; color: var(--dim); animation: rise 1s .1s both; }
.intro-title { font-family: var(--serif); font-weight: 600; font-size: clamp(56px, 11vw, 132px); letter-spacing: .12em; line-height: 1;
  color: var(--gold); text-shadow: 0 0 60px rgba(242,207,122,.35); margin: 14px 0 12px; animation: rise 1.1s .25s both; }
.intro-sub { letter-spacing: .3em; font-size: 12px; text-transform: uppercase; color: var(--gold-hi); opacity: .85; animation: rise 1.1s .5s both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- brand ---------- */
.brand { top: 18px; left: 18px; width: var(--panel-w); padding: 16px 18px 14px; }
.brand-top { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 44px; height: 44px; color: var(--gold); flex: none; filter: drop-shadow(0 0 10px rgba(242,207,122,.35)); }
.brand-name { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 30px; letter-spacing: .16em; line-height: 1; color: var(--gold); }
.brand-tag { margin: 5px 0 0; font-size: 10px; letter-spacing: .32em; text-transform: uppercase; color: var(--dim); }
.brand-addr { margin: 12px 0 12px; font-size: 12.5px; line-height: 1.45; color: var(--dim); }
.brand-facts { list-style: none; margin: 0; padding: 12px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-top: 1px solid var(--line); }
.brand-facts b { display: block; font-family: var(--serif); font-size: 24px; font-weight: 600; color: var(--gold-hi); line-height: 1; }
.brand-facts span { display: block; margin-top: 4px; font-size: 10.5px; color: var(--mute); line-height: 1.3; }

/* ---------- hud ---------- */
.hud { top: 18px; right: 18px; display: flex; gap: 10px; }
.stat { text-align: left; min-width: 122px; padding: 11px 14px 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); transition: border-color .25s, transform .25s; }
.stat:hover, .stat.on { border-color: rgba(242,207,122,.6); transform: translateY(-2px); }
.stat small { display: block; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); white-space: nowrap; }
.stat b { display: block; margin-top: 6px; font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1; color: var(--gold-hi); }
.stat b i { font-style: normal; font-family: var(--sans); font-size: 11px; font-weight: 600; color: var(--dim); margin-left: 4px; letter-spacing: .04em; }
.stat span { display: block; margin-top: 4px; font-size: 11px; color: var(--dim); }

/* ---------- panel ---------- */
.panel { top: 214px; left: 18px; bottom: 96px; width: var(--panel-w); display: flex; flex-direction: column; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 4px; }
.panel-head h2 { margin: 0; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); font-weight: 700; }
.panel-close { display: none; background: none; border: 0; font-size: 22px; color: var(--dim); line-height: 1; }
.chips { display: flex; gap: 6px; padding: 10px 14px 12px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 6px 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.03);
  font-size: 11.5px; font-weight: 600; color: var(--dim); white-space: nowrap; transition: all .2s; }
.chip:hover { color: var(--text); border-color: rgba(255,255,255,.25); }
.chip.on { color: #10151f; background: var(--c, var(--gold)); border-color: transparent; }
.list { list-style: none; margin: 0; padding: 0 8px 6px; overflow-y: auto; flex: 1; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.14) transparent; }
.item { display: grid; grid-template-columns: 30px 1fr auto; gap: 11px; align-items: center; width: 100%; text-align: left;
  padding: 9px 10px; border: 1px solid transparent; border-radius: 12px; background: none; transition: background .2s, border-color .2s; }
.item:hover { background: rgba(255,255,255,.045); }
.item.on { background: rgba(242,207,122,.09); border-color: rgba(242,207,122,.35); }
.ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }
.ico svg { width: 15px; height: 15px; fill: currentColor; }
.item-name { display: block; font-size: 13px; font-weight: 600; line-height: 1.25; color: var(--text); }
.item-note { display: block; margin-top: 2px; font-size: 11px; color: var(--mute); line-height: 1.3; }
.item-num { text-align: right; white-space: nowrap; }
.item-num b { display: block; font-size: 14px; font-weight: 700; color: var(--gold-hi); }
.item-num span { display: block; font-size: 10.5px; color: var(--mute); margin-top: 1px; }
.panel-foot { margin: 0; padding: 9px 18px 12px; font-size: 10.5px; color: var(--mute); border-top: 1px solid var(--line); line-height: 1.4; }

/* ---------- route card ---------- */
.route { right: 18px; bottom: 96px; width: 318px; padding: 16px 18px 16px; }
.route[hidden] { display: none; }
.route-x { position: absolute; top: 8px; right: 10px; background: none; border: 0; font-size: 22px; color: var(--dim); line-height: 1; }
.route-from { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.route-from i { text-transform: none; font-family: var(--serif); font-size: 14px; letter-spacing: 0; color: var(--mute); }
.route-ico { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 20%, transparent); color: var(--c); }
.route-ico svg { width: 12px; height: 12px; fill: currentColor; }
.route h3 { margin: 8px 24px 2px 0; font-family: var(--serif); font-weight: 600; font-size: 25px; line-height: 1.1; color: var(--text); }
.route-note { margin: 0 0 12px; font-size: 12px; color: var(--dim); }
.route-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.route-nums b { display: block; font-family: var(--serif); font-weight: 600; font-size: 34px; line-height: 1; color: var(--gold-hi); }
.route-nums div + div b { font-size: 26px; color: var(--text); padding-top: 8px; }
.route-nums span { display: block; margin-top: 4px; font-size: 10.5px; color: var(--mute); }
.route-bar { margin-top: 14px; height: 2px; background: rgba(255,255,255,.08); border-radius: 2px; overflow: hidden; }
.route-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); box-shadow: 0 0 10px var(--gold); }

/* ---------- dock ---------- */
.dock { left: 50%; bottom: 22px; transform: translate(-50%, 10px); display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 999px; white-space: nowrap; }
body.ready .dock { transform: translate(-50%, 0); }
.dock button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 999px; border: 0; background: none; font-size: 12.5px; font-weight: 600; color: var(--dim); transition: all .2s; }
.dock button:hover { color: var(--text); background: rgba(255,255,255,.06); }
.dock button[aria-pressed="true"] { color: var(--gold-hi); background: rgba(242,207,122,.12); }
.dock button.primary { color: #171307; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); padding: 10px 18px 10px 14px; box-shadow: 0 6px 22px rgba(242,207,122,.28); }
.dock button.primary:hover { filter: brightness(1.06); }
.dock button.primary svg { width: 15px; height: 15px; fill: currentColor; }
.dock-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.only-mobile { display: none !important; }

.fine { left: calc(var(--panel-w) + 36px); bottom: 6px; margin: 0; font-size: 10px; color: var(--mute); max-width: 40vw; }

/* ---------- map markers ---------- */
.pin { display: flex; align-items: center; gap: 7px; padding: 0; border: 0; background: none; cursor: pointer; --c: #fff; }
.pin-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #0b111e; background: var(--c);
  box-shadow: 0 0 0 3px rgba(9,15,27,.75), 0 0 16px color-mix(in srgb, var(--c) 70%, transparent); transition: transform .25s; }
.pin-dot svg { width: 13px; height: 13px; fill: currentColor; }
.pin-lbl { position: absolute; left: 33px; top: 50%; transform: translateY(-50%); padding: 4px 9px 5px; border-radius: 8px; white-space: nowrap; pointer-events: none;
  background: rgba(9,15,27,.86); border: 1px solid rgba(255,255,255,.1); font-size: 11.5px; font-weight: 600; color: var(--text); line-height: 1.2;
  opacity: 0; transition: opacity .25s; }
.pin-lbl small { display: block; font-size: 10px; font-weight: 500; color: var(--c); margin-top: 1px; }
.pin.show .pin-lbl, .pin:hover .pin-lbl, .pin.on .pin-lbl { opacity: 1; }
.pin:hover, .pin.on { z-index: 4; }
.pin:hover .pin-dot, .pin.on .pin-dot { transform: scale(1.25); }
.pin.on .pin-dot { box-shadow: 0 0 0 3px rgba(9,15,27,.75), 0 0 0 6px color-mix(in srgb, var(--c) 45%, transparent), 0 0 26px var(--c); }
.pin.dim .pin-dot { opacity: .3; box-shadow: 0 0 0 3px rgba(9,15,27,.75); }
.pin.dim .pin-lbl { opacity: 0; }
.pin.dim:hover .pin-dot, .pin.dim:hover .pin-lbl { opacity: 1; }
.pin.off, .beacon.off { visibility: hidden; }
body:not(.started) .pin, body:not(.started) .beacon { visibility: hidden; }

.beacon { width: 0; height: 0; pointer-events: none; }
.beacon-tag { position: absolute; left: 50%; bottom: 78px; transform: translateX(-50%); padding: 7px 14px 8px; border-radius: 10px; white-space: nowrap; text-align: center;
  background: linear-gradient(180deg, #ffe9ad, #f2cf7a); color: #1b1505; box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 0 34px rgba(242,207,122,.45); }
.beacon-tag b { display: block; font-family: var(--serif); font-size: 19px; font-weight: 700; letter-spacing: .16em; line-height: 1; }
.beacon-tag span { display: block; margin-top: 3px; font-size: 8.5px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; opacity: .75; }
.beacon-stem { position: absolute; left: -1px; bottom: 0; width: 2px; height: 78px; background: linear-gradient(180deg, #f2cf7a, rgba(242,207,122,.15)); }
.beacon-pulse, .beacon-pulse::before, .beacon-pulse::after { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; content: ""; }
.beacon-pulse { background: #ffe9ad; box-shadow: 0 0 22px #f2cf7a; }
.beacon-pulse::before, .beacon-pulse::after { left: 0; top: 0; border: 2px solid #f2cf7a; animation: pulse 2.6s ease-out infinite; }
.beacon-pulse::after { animation-delay: 1.3s; }
@keyframes pulse { from { transform: scale(1); opacity: .9; } to { transform: scale(6.5); opacity: 0; } }

.beacon-tag, .beacon-stem { transition: all .35s ease; }
.beacon.far .beacon-tag { bottom: 30px; padding: 4px 9px 5px; border-radius: 7px; }
.beacon.far .beacon-tag b { font-size: 12.5px; }
.beacon.far .beacon-tag span { display: none; }
.beacon.far .beacon-stem { height: 30px; }

.car { width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255,233,173,.45), 0 0 22px 6px rgba(255,233,173,.75); pointer-events: none; }

.maplibregl-ctrl-bottom-right { z-index: 4; }
.maplibregl-ctrl-group { background: var(--glass) !important; border: 1px solid var(--line); box-shadow: none !important; }
.maplibregl-ctrl-group button + button { border-top-color: var(--line) !important; }
.maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1) brightness(1.6); }
.maplibregl-ctrl-attrib { background: rgba(9,15,27,.6) !important; color: var(--mute); font-size: 10px; }
.maplibregl-ctrl-attrib a { color: var(--dim) !important; }
.maplibregl-ctrl-attrib-button { filter: invert(1); }

/* ---------- small screens ---------- */
@media (max-width: 1180px) { .hud .stat:nth-child(n+4) { display: none; } }
@media (max-width: 980px) { .hud .stat:nth-child(n+3) { display: none; } .route { width: 290px; } }
@media (max-width: 760px) {
  :root { --panel-w: auto; }
  .brand { left: 10px; right: 10px; top: 10px; width: auto; padding: 12px 14px; }
  .brand-addr, .brand-facts { display: none; }
  .brand-name { font-size: 24px; }
  .brand-mark { width: 36px; height: 36px; }
  .hud { top: 78px; left: 10px; right: 10px; gap: 8px; overflow-x: auto; scrollbar-width: none; }
  .hud .stat { display: block !important; flex: none; min-width: 116px; padding: 9px 12px; }
  .stat b { font-size: 24px; }
  .panel { top: auto; left: 8px; right: 8px; bottom: 74px; width: auto; height: 52vh; display: none; }
  body.places .panel { display: flex; }
  .panel-close { display: block; }
  .route { left: 8px; right: 8px; bottom: 74px; width: auto; padding: 12px 14px; }
  body.places .route { display: none; }
  .route h3 { font-size: 21px; }
  .route-nums b { font-size: 28px; }
  .dock { left: 8px; right: 8px; bottom: 10px; transform: translateY(10px); overflow-x: auto; scrollbar-width: none; justify-content: flex-start; border-radius: 18px; }
  body.ready .dock { transform: none; }
  .dock button { padding: 9px 12px; flex: none; }
  .only-mobile { display: inline-flex !important; }
  .fine { display: none; }
  .maplibregl-ctrl-bottom-right { bottom: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .beacon-pulse::before, .beacon-pulse::after { animation: none; }
}
