@font-face { font-family: 'Unbounded'; src: url(/fonts/unbounded.woff2) format('woff2'); font-weight: 200 900; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url(/fonts/spacegrotesk.woff2) format('woff2'); font-weight: 300 700; font-display: swap; }

:root {
  --bg: #07060b;
  --ink: #f6f3ff;
  --mute: #aaa5c2;
  --dim: #6f6a86;
  --glass: rgba(15, 12, 25, .74);
  --glass-2: rgba(22, 18, 36, .9);
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --hot: #ff2bd6;
  --violet: #8a5cff;
  --cyan: #1ee3ff;
  --lime: #c6ff3d;
  --amber: #ffb423;
  --grad: linear-gradient(100deg, var(--hot) 0%, var(--violet) 55%, var(--cyan) 100%);
  --grad-hot: linear-gradient(100deg, #ff2bd6, #9b4dff);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .85);
  --blur: blur(18px) saturate(1.4);
  --display: 'Unbounded', 'Space Grotesk', system-ui, sans-serif;
  --text: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --panel-w: 384px;
  --dock-h: 62px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.4 var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---------- map ---------- */
#map { position: fixed; inset: 0; z-index: 0; background: #0b0912; }
#map.no-map { display: grid; place-items: center; padding: 40% 24px 0; color: var(--mute); text-align: center; }
.maplibregl-map { font: inherit; }
.map-tint {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(255, 43, 214, .14), transparent 55%),
    radial-gradient(120% 80% at 100% 100%, rgba(30, 227, 255, .10), transparent 55%),
    radial-gradient(140% 100% at 50% 50%, transparent 55%, rgba(5, 4, 9, .55));
}
.maplibregl-ctrl.maplibregl-ctrl-attrib { background: rgba(7, 6, 11, .66); color: var(--dim); font-size: 10px; }
.maplibregl-ctrl-attrib a { color: var(--mute); }
.maplibregl-ctrl-attrib.maplibregl-compact { background: rgba(7, 6, 11, .66); }
.maplibregl-ctrl-attrib-button { filter: invert(1) opacity(.6); }

/* person pins (MapLibre positions .maplibregl-marker absolutely: never override position here) */
.pin { width: 44px; height: 44px; cursor: pointer; --c: hsl(var(--h) 100% 64%); }
.pin-av {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #1d1830, #0b0913 70%);
  border: 3px solid var(--c);
  box-shadow: 0 0 0 3px rgba(7, 6, 11, .7), 0 0 22px -2px var(--c);
  font: 800 13px/1 var(--display); color: var(--c); letter-spacing: -.02em;
  transition: transform .2s;
}
.pin-av.emo { font-size: 21px; }
.pin:hover .pin-av { transform: scale(1.08); }
.pin::after {
  content: ''; position: absolute; right: -1px; bottom: 1px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--lime); border: 2.5px solid #0b0913; box-shadow: 0 0 10px var(--lime);
}
.pin.f-live::after { animation: blink 1.6s ease-in-out infinite; }
.pin.f-recent::after { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.pin.f-stale::after { background: #5b5770; box-shadow: none; }
.pin.f-stale .pin-av { filter: grayscale(.9) brightness(.7); box-shadow: 0 0 0 3px rgba(7, 6, 11, .7); }
.pin.f-stale .pin-tag { opacity: .6; }
.pin-tag {
  position: absolute; top: 50px; left: 50%; transform: translateX(-50%);
  max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(10, 8, 18, .86); border: 1px solid var(--line-2);
  font: 600 12px/1.2 var(--text); color: var(--ink);
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .8);
}
.pin.is-me { --c: #fff; }
.pin.is-me .pin-tag { background: var(--grad-hot); border-color: transparent; font-weight: 700; }
.pin.is-here .pin-av::before { content: '🎉'; position: absolute; top: -10px; right: -12px; font-size: 16px; filter: drop-shadow(0 2px 4px #000); }
.pin-av { position: relative; }

/* party pin */
.party { width: 84px; height: 84px; display: grid; place-items: center; cursor: pointer; }
.party-count {
  position: absolute; top: 6px; right: 2px; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px;
  display: grid; place-items: center; background: var(--lime); color: #0b0913; font: 900 12px/1 var(--display);
  border: 3px solid #0b0913; box-shadow: 0 0 16px rgba(198, 255, 61, .8);
}
.party::before, .party::after {
  content: ''; position: absolute; inset: 14px; border-radius: 50%;
  border: 2px solid var(--hot); opacity: 0; animation: ripple 2.8s cubic-bezier(.2, .6, .3, 1) infinite;
}
.party::after { animation-delay: 1.4s; border-color: var(--cyan); }
.party-disc {
  position: relative; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; font-size: 28px;
  background: radial-gradient(circle, #120e1f 58%, transparent 60%), conic-gradient(var(--hot), var(--violet), var(--cyan), var(--lime), var(--hot));
  box-shadow: 0 0 34px -2px rgba(255, 43, 214, .75), 0 0 70px -10px rgba(30, 227, 255, .5);
  animation: spin 6s linear infinite;
}
.party-disc span { display: block; animation: spin 6s linear infinite reverse; }
.party-tag {
  position: absolute; top: 78px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  padding: 4px 10px; border-radius: 999px; background: var(--grad); color: #fff;
  font: 800 10px/1.2 var(--display); letter-spacing: .12em; text-transform: uppercase;
  box-shadow: 0 8px 22px -8px rgba(255, 43, 214, .9);
}

/* popups */
.glass-pop { z-index: 5; }
.glass-pop .maplibregl-popup-content {
  padding: 14px 16px; min-width: 230px; border-radius: 20px; color: var(--ink); font: inherit;
  background: var(--glass-2); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.glass-pop .maplibregl-popup-tip { display: none; }
.pop-here { list-style: none; margin: -2px 0 12px; padding: 0; max-height: 190px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.pop-here-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px; border: 0; border-radius: 12px; background: none; text-align: left; font-weight: 600; font-size: 14px; }
.pop-here-row:hover { background: rgba(255, 255, 255, .07); }
.pop-here-row .av { width: 28px; height: 28px; font-size: 10px; }
.pop-here-row .av.emo { font-size: 15px; }
.pop-here-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-here-row small { color: var(--mute); font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.pop-head { display: flex; align-items: center; gap: 10px; }
.pop-name { font: 800 16px/1.15 var(--display); letter-spacing: -.01em; overflow-wrap: anywhere; }
.pop-fresh { display: flex; align-items: center; gap: 6px; color: var(--mute); font-size: 13px; margin-top: 2px; }
.pop-info { margin: 10px 0 12px; color: var(--ink); font-size: 14px; }
.pop-info small { display: block; color: var(--mute); font-size: 12.5px; }
.pop-actions { display: flex; gap: 8px; }
.pop-actions .btn { height: 36px; padding: 0 14px; font-size: 13px; flex: 1; }

/* ---------- avatars ---------- */
.av {
  --c: hsl(var(--h) 100% 66%);
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: #0f0c1a; border: 2px solid var(--c); box-shadow: 0 0 14px -4px var(--c);
  font: 800 11px/1 var(--display); color: var(--c);
}
.av.emo { font-size: 17px; }
.av.lg { width: 42px; height: 42px; font-size: 13px; }
.av.lg.emo { font-size: 21px; }

/* ---------- header ---------- */
.top {
  position: fixed; z-index: 10; top: calc(16px + var(--safe-t)); left: 16px;
  width: min(420px, calc(100vw - var(--panel-w) - 64px));
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.top > * { pointer-events: auto; }
.brand-row { display: flex; align-items: center; gap: 10px; }
.brand {
  margin: 0; font: 900 30px/1 var(--display); letter-spacing: -.035em; text-transform: uppercase;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .6);
}
.brand-b {
  margin-left: .12em;
  background: linear-gradient(100deg, var(--hot), var(--violet), var(--cyan), var(--hot)) 0 0 / 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 14px rgba(255, 43, 214, .55));
  animation: shimmer 6s linear infinite;
}
.live-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  font-size: 12.5px; color: var(--mute); white-space: nowrap;
}
.live-pill b { color: var(--ink); font-weight: 700; }
.live-pill.off .dot { background: var(--dim); box-shadow: none; animation: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); animation: blink 1.6s ease-in-out infinite; flex: none; }
.me-chip {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 3px;
  border-radius: 999px; background: var(--glass); border: 1px solid var(--line);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); font-weight: 600; font-size: 13px; max-width: 160px;
}
.me-chip .av { width: 28px; height: 28px; font-size: 10px; }
.me-chip .av.emo { font-size: 15px; }
.me-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.party-card {
  position: relative; padding: 16px; border-radius: 22px;
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
}
.party-card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.2px; pointer-events: none;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.pc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pc-label { display: inline-flex; align-items: center; gap: 8px; font: 800 11px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--hot); }
.disco { font-style: normal; font-size: 15px; display: inline-block; animation: spin 5s linear infinite; }
.pc-dist { font-size: 12.5px; color: var(--mute); white-space: nowrap; }
.pc-addr { margin: 8px 0 14px; font: 700 17px/1.25 var(--display); letter-spacing: -.015em; }
.pc-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn {
  height: 40px; padding: 0 16px; border-radius: 999px; border: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap;
  transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:active { transform: scale(.96); }
.btn-hot { background: var(--grad); color: #fff; box-shadow: 0 10px 28px -10px rgba(255, 43, 214, .9); }
.btn-hot:hover { box-shadow: 0 12px 34px -8px rgba(255, 43, 214, 1); }
.btn-glass { background: rgba(255, 255, 255, .07); border: 1px solid var(--line-2); }
.btn-glass:hover, .btn-icon:hover { background: rgba(255, 255, 255, .13); }
.btn-icon { width: 40px; padding: 0; background: rgba(255, 255, 255, .07); border: 1px solid var(--line-2); }
.btn-ghost { background: none; color: var(--mute); font-weight: 600; }
.btn-ghost:hover { color: var(--ink); }
.btn.big { height: 56px; font-size: 16px; padding: 0 22px; }

/* ---------- floating map controls ---------- */
.map-ctrls { position: fixed; z-index: 10; right: calc(var(--panel-w) + 32px); bottom: 24px; display: flex; flex-direction: column; gap: 10px; }
.fab {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-2);
  display: grid; place-items: center; font-size: 20px;
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--shadow); transition: transform .15s, background .2s;
}
.fab:hover { background: var(--glass-2); }
.fab:active { transform: scale(.92); }
.fab svg { width: 21px; height: 21px; }

/* ---------- dock + share ---------- */
.dock {
  position: fixed; z-index: 10; bottom: 24px;
  left: calc((100vw - var(--panel-w) - 32px) / 2); transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
}
.dock-btn {
  position: relative; width: var(--dock-h); height: var(--dock-h); border-radius: 50%; border: 1px solid var(--line-2);
  display: grid; place-items: center; align-content: center; gap: 1px;
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shadow);
}
.dock-btn svg { width: 22px; height: 22px; }
.dock-btn b { font-size: 11px; line-height: 1; }
.badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--hot); color: #fff; font: 800 11px/1 var(--text); box-shadow: 0 0 12px rgba(255, 43, 214, .8);
}
.dock-btn .badge { position: absolute; top: -2px; right: -2px; }
.bg-chip {
  position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; white-space: nowrap;
  background: var(--glass-2); border: 1px solid rgba(138, 92, 255, .55); color: var(--ink); font-weight: 700; font-size: 13px;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: 0 0 22px -6px rgba(138, 92, 255, .9), var(--shadow);
}
.bg-chip:active { transform: translateX(-50%) scale(.96); }

.share-btn {
  position: relative; height: var(--dock-h); min-width: 290px; padding: 0 26px 0 12px; border: 0; border-radius: 999px;
  display: flex; align-items: center; gap: 12px; text-align: left; overflow: hidden; isolation: isolate;
  background: var(--grad); color: #fff;
  box-shadow: 0 16px 40px -14px rgba(255, 43, 214, .95), 0 0 0 1px rgba(255, 255, 255, .14) inset;
  transition: transform .15s, box-shadow .3s;
}
.share-btn:active { transform: scale(.97); }
.share-btn::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%) -150% 0 / 60% 100% no-repeat;
  animation: sheen 3.2s ease-in-out infinite;
}
.share-ico {
  width: 40px; height: 40px; border-radius: 50%; flex: none; background: rgba(0, 0, 0, .22);
  display: grid; place-items: center; position: relative;
}
.share-ico::before {
  content: ''; width: 16px; height: 16px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg) translate(1px, -1px);
  background: #fff; box-shadow: 0 0 12px #fff;
}
.share-txt { display: flex; flex-direction: column; min-width: 0; }
.share-txt b { font: 800 14.5px/1.2 var(--display); letter-spacing: -.01em; white-space: nowrap; }
.share-txt small { font-size: 12px; opacity: .82; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.share-btn[data-state="pending"] { background: #1a1530; box-shadow: 0 0 0 1px var(--line-2) inset; }
.share-btn[data-state="pending"]::after { display: none; }
.share-btn[data-state="pending"] .share-ico::before { width: 18px; height: 18px; border-radius: 50%; transform: none; background: none; border: 2.5px solid rgba(255, 255, 255, .25); border-top-color: #fff; box-shadow: none; animation: spin .8s linear infinite; }

.share-btn[data-state="live"] {
  background: linear-gradient(100deg, #10180a, #0f1220); color: var(--ink);
  box-shadow: 0 0 0 1.5px var(--lime) inset, 0 0 34px -8px rgba(198, 255, 61, .7), var(--shadow);
}
.share-btn[data-state="live"]::after { display: none; }
.share-btn[data-state="live"] .share-ico { background: rgba(198, 255, 61, .12); }
.share-btn[data-state="live"] .share-ico::before { width: 14px; height: 14px; border-radius: 50%; transform: none; background: var(--lime); box-shadow: 0 0 0 0 rgba(198, 255, 61, .7); animation: sonar 1.8s ease-out infinite; }
.share-btn[data-state="live"] b { color: var(--lime); }

/* ---------- panel ---------- */
.panel {
  position: fixed; z-index: 20; top: calc(16px + var(--safe-t)); right: 16px; bottom: 16px; width: var(--panel-w);
  display: flex; flex-direction: column; border-radius: 26px; overflow: hidden;
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.sheet-grab { display: none; }
.tabs { display: flex; align-items: center; gap: 6px; padding: 12px 12px 10px; border-bottom: 1px solid var(--line); }
.tab {
  height: 36px; padding: 0 14px; border-radius: 999px; border: 0; background: none; color: var(--mute);
  display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14px;
}
.tab[aria-selected="true"] { background: rgba(255, 255, 255, .1); color: var(--ink); box-shadow: 0 0 0 1px var(--line-2) inset; }
.tab .count { font-size: 12px; color: var(--dim); font-weight: 700; }
.tab[aria-selected="true"] .count { color: var(--lime); }
.online { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--dim); white-space: nowrap; padding-right: 4px; }
.online .dot { width: 6px; height: 6px; }
.pane { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.empty { position: absolute; inset: 40% 24px auto; margin: 0; text-align: center; color: var(--dim); font-size: 14px; line-height: 1.6; pointer-events: none; }

.msgs { list-style: none; margin: 0; padding: 14px 14px 6px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.msg { display: flex; gap: 9px; align-items: flex-end; max-width: 92%; }
.msg-body { min-width: 0; }
.msg-meta { display: flex; align-items: baseline; gap: 8px; margin: 0 0 3px 4px; font-size: 12px; }
.msg-name { border: 0; padding: 0; background: none; font-weight: 700; color: hsl(var(--h) 100% 72%); max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-name:disabled { cursor: default; }
.msg-time { color: var(--dim); font-size: 11px; }
.msg-text {
  margin: 0; padding: 8px 12px; border-radius: 6px 18px 18px 18px; background: rgba(255, 255, 255, .075);
  border: 1px solid var(--line); overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.4;
}
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg.mine .msg-meta { justify-content: flex-end; margin: 0 4px 3px 0; }
.msg.mine .msg-text { background: var(--grad-hot); border-color: transparent; border-radius: 18px 6px 18px 18px; color: #fff; }
.msg.mine .av { display: none; }
.msg.grouped .msg-meta { display: none; }
.msg.grouped .av { visibility: hidden; }
.sys { align-self: center; text-align: center; font-size: 12px; color: var(--mute); padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.sys time { color: var(--dim); margin-left: 6px; }

.composer { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.composer input {
  flex: 1; min-width: 0; height: 46px; padding: 0 18px; border-radius: 999px;
  background: rgba(255, 255, 255, .07); border: 1px solid var(--line-2); font-size: 16px; outline: none;
}
.composer input:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(138, 92, 255, .25); }
.composer input::placeholder { color: var(--dim); }
.send { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--grad); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 22px -8px rgba(255, 43, 214, .9); flex: none; }
.send svg { width: 20px; height: 20px; }

.people { list-style: none; margin: 0; padding: 8px; overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.person { display: flex; align-items: center; gap: 4px; border-radius: 16px; transition: background .15s; }
.person:hover { background: rgba(255, 255, 255, .05); }
.person-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px; border: 0; background: none; text-align: left; border-radius: 16px; }
.person-txt { min-width: 0; flex: 1; }
.person-name { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; }
.person-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.moon { font-style: normal; font-size: 12px; }
.you { font: 800 9px/1 var(--display); letter-spacing: .1em; padding: 3px 6px; border-radius: 999px; background: var(--grad-hot); color: #fff; }
.person-sub { color: var(--mute); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-sub .here { color: var(--lime); font-weight: 700; }
.fresh { display: inline-flex; align-items: center; gap: 5px; }
.fresh::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.fresh.f-recent::before { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
.fresh.f-stale::before { background: #5b5770; box-shadow: none; }
.go { height: 34px; padding: 0 12px; margin-right: 8px; font-size: 12.5px; }

/* ---------- dialog ---------- */
.dlg {
  width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); margin: auto; padding: 0; border: 0; border-radius: 30px;
  background: #120f1e; color: var(--ink); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .9), 0 0 0 1px var(--line-2);
  overflow: auto;
}
.dlg::backdrop { background: rgba(4, 3, 8, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dlg form, .dlg-body { padding: 26px 24px 20px; display: flex; flex-direction: column; gap: 16px; position: relative; }
.dlg form::before, .dlg-body::before {
  content: ''; position: absolute; top: -120px; left: 50%; width: 360px; height: 220px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 43, 214, .35), transparent); pointer-events: none;
}
.dlg h2 {
  position: relative; margin: 0; font: 900 32px/1 var(--display); letter-spacing: -.035em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.dlg-sub { margin: -6px 0 0; color: var(--mute); font-size: 14px; }
.lang-switch {
  align-self: flex-end; margin: -8px -6px -10px 0; position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); color: var(--mute);
  font-size: 12.5px; font-weight: 700; text-decoration: none;
}
.lang-switch:hover { color: var(--ink); background: rgba(255, 255, 255, .12); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font: 700 11px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.field input {
  height: 54px; padding: 0 18px; border-radius: 16px; font-size: 18px; font-weight: 600;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); outline: none;
}
.field input:focus { border-color: var(--hot); box-shadow: 0 0 0 4px rgba(255, 43, 214, .2); }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 8px; }
.emo-opt {
  height: 44px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04);
  font-size: 22px; display: grid; place-items: center; transition: transform .12s, background .15s;
}
.emo-opt.none { font: 800 13px/1 var(--display); color: var(--mute); }
.emo-opt:hover { background: rgba(255, 255, 255, .1); }
.emo-opt[aria-checked="true"] { background: rgba(255, 43, 214, .16); border-color: var(--hot); box-shadow: 0 0 0 2px rgba(255, 43, 214, .4), 0 0 18px -4px var(--hot); transform: scale(1.06); }
.dlg-err { margin: -6px 0 0; color: var(--hot); font-weight: 600; font-size: 14px; }
.dlg-actions { display: flex; flex-direction: column; gap: 6px; }
.fine { margin: 0; color: var(--dim); font-size: 12.5px; text-align: center; }
.dlg-note { margin: -4px 0 0; padding: 10px 14px; border-radius: 14px; background: rgba(30, 227, 255, .08); border: 1px solid rgba(30, 227, 255, .3); font-size: 14px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 12px; }
.steps li { counter-increment: s; position: relative; padding-left: 40px; color: var(--mute); font-size: 14px; }
.steps li b { color: var(--ink); }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--grad); color: #fff; font: 800 12px/1 var(--display);
}
.stores { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.stores .btn { height: 36px; font-size: 13px; }
.manual { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; font-size: 13px; color: var(--mute); }
.manual summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.manual dl { margin: 10px 0 8px; display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: center; }
.manual dt { color: var(--dim); }
.manual dd { margin: 0; display: flex; align-items: center; gap: 8px; min-width: 0; }
.manual code { font: 500 12px/1.3 ui-monospace, Menlo, monospace; color: var(--ink); overflow-wrap: anywhere; min-width: 0; }
.mini { flex: none; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .06); font-size: 11.5px; font-weight: 700; }

/* ---------- toast ---------- */
.toast {
  position: fixed; z-index: 50; left: 50%; bottom: calc(var(--dock-h) + 44px); transform: translateX(-50%);
  max-width: min(420px, calc(100vw - 32px)); padding: 12px 18px; border-radius: 16px;
  background: var(--glass-2); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); font-weight: 600; font-size: 14px; text-align: center;
  animation: pop .25s cubic-bezier(.2, .9, .3, 1.3);
}
@media (min-width: 900px) { .toast { left: calc((100vw - var(--panel-w) - 32px) / 2); bottom: 150px; } }
.noscript { position: fixed; inset: auto 16px 40% 16px; text-align: center; font-weight: 700; }

/* ---------- mobile ---------- */
@media (max-width: 899px) {
  .top { left: 10px; right: 10px; top: calc(10px + var(--safe-t)); width: auto; gap: 8px; }
  .brand { font-size: 23px; }
  .live-pill { height: 26px; padding: 0 9px; font-size: 12px; }
  .party-card { padding: 12px 12px 12px 14px; border-radius: 20px; }
  .pc-addr { font-size: 14.5px; margin: 6px 0 10px; }
  .pc-actions { flex-wrap: nowrap; }
  .pc-actions .btn { height: 38px; padding: 0 13px; font-size: 13px; }
  .pc-actions .btn-icon { width: 38px; padding: 0; }
  #callParty { flex: 1; min-width: 0; overflow: hidden; }

  .dock { left: 12px; right: 12px; bottom: calc(12px + var(--safe-b)); transform: none; display: grid; grid-template-columns: var(--dock-h) 1fr var(--dock-h); }
  :root { --dock-h: 58px; }
  .dock { gap: 8px; }
  .share-btn { min-width: 0; padding: 0 12px 0 8px; gap: 10px; }
  .share-ico { width: 38px; height: 38px; }
  .share-txt b { font: 700 15.5px/1.15 var(--text); letter-spacing: 0; }
  .map-ctrls { right: 12px; bottom: calc(var(--dock-h) + 26px + var(--safe-b)); gap: 8px; }
  .fab { width: 44px; height: 44px; }
  .maplibregl-ctrl-bottom-left { bottom: calc(var(--dock-h) + 18px + var(--safe-b)); }
  .toast { bottom: calc(var(--dock-h) + 74px + var(--safe-b)); }

  .panel {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; height: min(76dvh, 660px);
    border-radius: 28px 28px 0 0; border-bottom: 0; padding-bottom: var(--safe-b);
    background: var(--glass-2);
    transform: translateY(calc(100% + 24px)); visibility: hidden;
    transition: transform .38s cubic-bezier(.2, .85, .25, 1), visibility 0s .38s;
  }
  .panel.open { transform: none; visibility: visible; transition: transform .38s cubic-bezier(.2, .85, .25, 1), visibility 0s; }
  .sheet-grab { display: block; height: 22px; border: 0; background: none; position: relative; flex: none; }
  .sheet-grab::before { content: ''; position: absolute; top: 9px; left: 50%; width: 44px; height: 5px; margin-left: -22px; border-radius: 9px; background: var(--line-2); }
  .tabs { padding-top: 0; }
}
@media (min-width: 900px) {
  .dock-btn { display: none; }
}
@media (min-width: 900px) and (hover: hover) {
  .bg-chip { display: none; }
}
@media (max-width: 380px) {
  :root { --dock-h: 52px; }
  .share-txt small { display: none; }
  .share-ico { display: none; }
  .share-btn { padding: 0 12px; justify-content: center; }
  .share-txt b { font-size: 14.5px; }
  .pc-actions .btn-hot { padding: 0 11px; }
}

/* ---------- motion ---------- */
@keyframes blink { 50% { opacity: .35; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: 300% 0; } }
@keyframes ripple { 0% { transform: scale(.8); opacity: .9; } 100% { transform: scale(2.3); opacity: 0; } }
@keyframes sheen { 0%, 55% { background-position: -150% 0; } 100% { background-position: 250% 0; } }
@keyframes sonar { 0% { box-shadow: 0 0 0 0 rgba(198, 255, 61, .7); } 100% { box-shadow: 0 0 0 14px rgba(198, 255, 61, 0); } }
@keyframes pop { from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(.96); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
