:root {
  --bg: #07081a; --bg2: #0c0e24; --surface: #11142f; --surface2: #181c3d; --line: #262b57;
  --text: #eceeff; --muted: #9aa0cf; --faint: #6b72a8;
  --violet: #8b6cff; --teal: #2de2c8; --pink: #ff6fa5; --amber: #ffb547; --blue: #5ab5e8;
  --grad: linear-gradient(135deg, #8b6cff, #2de2c8);
  --radius: 16px; --shadow: 0 18px 50px rgba(3, 4, 20, .55);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.hidden { display: none !important; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---- header ---- */
#site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); background: rgba(7, 8, 26, .72); border-bottom: 1px solid rgba(38, 43, 87, .6); }
.bar { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.02em; font-size: 18px; }
.brand b { font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-mark { display: block; border-radius: 9px; }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a { padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; }
.nav a:hover, .nav a.on { color: var(--text); background: rgba(139, 108, 255, .12); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.me-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; max-width: 180px; }
.me-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { border-radius: 50%; display: block; object-fit: cover; background: var(--surface2); flex: none; }

/* ---- buttons / forms ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); padding: 11px 18px; border-radius: 12px; cursor: pointer; font-weight: 600; transition: transform .15s, background .15s, border-color .15s, box-shadow .2s; white-space: nowrap; }
.btn:hover { background: var(--surface2); border-color: #3a4290; transform: translateY(-1px); }
.btn.primary { background: var(--grad); border: 0; color: #08091c; box-shadow: 0 8px 28px rgba(45, 226, 200, .22); }
.btn.primary:hover { box-shadow: 0 10px 34px rgba(139, 108, 255, .4); filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.danger { border-color: #6b2440; color: #ff8fb3; } .btn.danger:hover { background: #3a1228; }
.btn.sm { padding: 7px 13px; font-size: 14px; border-radius: 10px; }
.btn.lg { padding: 15px 26px; font-size: 17px; border-radius: 14px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
label.f { display: block; margin: 14px 0 6px; font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
input[type=text], input[type=email], input[type=password], input[type=search], textarea, select {
  width: 100%; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(139, 108, 255, .22); }
textarea { resize: vertical; min-height: 84px; }
.hint { font-size: 13px; margin-top: 6px; min-height: 18px; color: var(--faint); }
.hint.ok { color: var(--teal); } .hint.bad { color: var(--pink); }
.seg { display: inline-flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { background: none; border: 0; padding: 8px 14px; border-radius: 9px; cursor: pointer; color: var(--muted); font-weight: 600; }
.seg button.on { background: var(--surface2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: rgba(139, 108, 255, .16); color: #c9bcff; letter-spacing: .03em; }
.chip.public { background: rgba(45, 226, 200, .14); color: var(--teal); }
.chip.warn { background: rgba(255, 181, 71, .15); color: var(--amber); }
.card { background: linear-gradient(180deg, var(--surface), var(--bg2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }

/* ---- toast / modal ---- */
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 400; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { background: var(--surface2); border: 1px solid var(--line); padding: 10px 18px; border-radius: 12px; box-shadow: var(--shadow); animation: pop .25s ease; max-width: min(90vw, 440px); }
.toast.err { border-color: #7b2a4a; color: #ffb3cb; } .toast.ok { border-color: #1f7a6d; color: var(--teal); }
.toast.out { opacity: 0; transition: opacity .5s; }
@keyframes pop { from { transform: translateY(10px) scale(.96); opacity: 0; } }
.modal-back { position: fixed; inset: 0; background: rgba(3, 4, 16, .7); backdrop-filter: blur(6px); z-index: 300; display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.modal { width: min(480px, 100%); max-height: 90vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); animation: pop .25s ease; }
.modal h3 { margin: 0 0 8px; font-size: 20px; letter-spacing: -.01em; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }

/* ======================= LANDING ======================= */
.hero { position: relative; overflow: hidden; padding: 96px 0 72px; isolation: isolate; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.aurora { position: absolute; inset: -20% -10% auto; height: 80%; z-index: -2; filter: blur(70px); opacity: .55;
  background: radial-gradient(40% 50% at 25% 40%, #5a3bd8 0, transparent 70%), radial-gradient(35% 45% at 75% 30%, #0fb8a6 0, transparent 70%), radial-gradient(30% 40% at 55% 75%, #c2347f 0, transparent 70%);
  animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate3d(3%, 6%, 0) scale(1.1) rotate(4deg); } }
.hero-inner { text-align: center; max-width: 820px; margin: 0 auto; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line); background: rgba(17, 20, 47, .7); color: var(--muted); font-size: 13px; font-weight: 600; }
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 rgba(45, 226, 200, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(45, 226, 200, 0); } 100% { box-shadow: 0 0 0 0 rgba(45, 226, 200, 0); } }
.hero h1 { font-size: clamp(38px, 7vw, 76px); line-height: 1.02; letter-spacing: -.04em; margin: 22px 0 18px; font-weight: 800; }
.hero h1 .w { display: inline-block; margin: 0 .12em; opacity: 0; transform: translateY(28px) rotate(2deg); animation: rise .8s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.hero p.lead { font-size: clamp(17px, 2.2vw, 21px); color: var(--muted); max-width: 640px; margin: 0 auto 30px; opacity: 0; animation: rise .8s .55s forwards; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; opacity: 0; animation: rise .8s .75s forwards; }
.addr-demo { margin: 36px auto 0; display: inline-flex; align-items: center; gap: 0; background: rgba(8, 10, 30, .8); border: 1px solid var(--line); border-radius: 14px; padding: 12px 18px; font: 600 clamp(15px, 2.4vw, 20px) ui-monospace, SFMono-Regular, Menlo, monospace; opacity: 0; animation: rise .8s .95s forwards; backdrop-filter: blur(6px); }
.addr-demo .lock { margin-right: 10px; color: var(--teal); }
.addr-demo .typed { color: var(--teal); min-width: 1ch; }
.addr-demo .caret { width: 2px; height: 1.2em; background: var(--teal); margin-left: 1px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.section { padding: 72px 0; }
.section h2 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -.03em; margin: 0 0 10px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 34px; }
.step { position: relative; padding: 26px; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(160deg, var(--surface), var(--bg2)); overflow: hidden; }
.step::after { content: ""; position: absolute; inset: auto -30% -60% auto; width: 80%; aspect-ratio: 1; background: radial-gradient(circle, rgba(139, 108, 255, .25), transparent 70%); }
.step .n { font: 800 13px ui-monospace, monospace; color: var(--teal); letter-spacing: .1em; }
.step h3 { margin: 10px 0 6px; font-size: 20px; }
.step .step-ic { font-size: 30px; margin-bottom: 10px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; display: block; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

.dir-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters input[type=search] { width: 220px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); grid-auto-rows: 188px; gap: 14px; grid-auto-flow: dense; }
.tile { --tc: hsl(var(--h) 75% 62%); position: relative; border-radius: 20px; padding: 18px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; border: 1px solid color-mix(in srgb, var(--tc) 40%, var(--line)); background: linear-gradient(160deg, color-mix(in srgb, var(--tc) 24%, var(--surface)), var(--bg2) 75%); transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s; transform-style: preserve-3d; animation: tilein .7s both; }
@keyframes tilein { from { opacity: 0; transform: translateY(24px) scale(.96); } }
.tile:hover { transform: translateY(-4px); box-shadow: 0 20px 50px color-mix(in srgb, var(--tc) 35%, transparent); }
.tile.t2 { grid-column: span 2; } .tile.t3 { grid-column: span 2; grid-row: span 2; }
.tile svg.const { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; pointer-events: none; }
.tile .live { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--teal); background: rgba(7, 8, 26, .6); padding: 4px 10px; border-radius: 99px; }
.tile .live i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); animation: pulse 2s infinite; }
.tile h3 { position: relative; margin: 0; font-size: 19px; letter-spacing: -.01em; line-height: 1.2; }
.tile.t3 h3 { font-size: 30px; } .tile.t2 h3 { font-size: 22px; }
.tile .addr { position: relative; font: 12px ui-monospace, monospace; color: var(--muted); margin: 3px 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .desc { position: relative; color: var(--muted); font-size: 14px; display: none; margin: 0 0 10px; }
.tile.t3 .desc, .tile.t2 .desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .stats { position: relative; display: flex; gap: 12px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.tile .stats b { color: var(--text); }
.tile .acts { position: relative; display: flex; gap: 8px; }
.tile .acts .btn { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.tile.ghost { border-style: dashed; background: transparent; color: var(--faint); align-items: center; justify-content: center; text-align: center; animation: none; }
.empty { text-align: center; padding: 40px 0; color: var(--muted); }
footer.site { border-top: 1px solid var(--line); padding: 34px 0 50px; color: var(--faint); font-size: 14px; }
footer.site .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }

/* ======================= AUTH / DASHBOARD ======================= */
.auth-wrap { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 32px 16px; position: relative; overflow: hidden; }
.auth-card { width: min(440px, 100%); }
.auth-card h1 { margin: 0 0 4px; font-size: 28px; letter-spacing: -.02em; }
.oauth { display: grid; gap: 10px; margin: 18px 0 6px; }
.oauth .btn { width: 100%; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; margin: 14px 0 4px; }
.or::before, .or::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.page { padding: 36px 0 80px; }
.page h1 { font-size: 34px; letter-spacing: -.03em; margin: 0 0 6px; }
.grid2 { display: grid; grid-template-columns: 340px 1fr; gap: 22px; align-items: start; }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }
.prof { text-align: center; }
.prof .big { margin: 6px auto 14px; border: 3px solid var(--line); box-shadow: 0 0 0 6px rgba(139, 108, 255, .1); }
.swatches { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 10px 0; }
.sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.sw.on { border-color: #fff; }
.row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.map-list { display: grid; gap: 12px; }
.map-row { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); transition: border-color .2s, transform .2s; }
.map-row:hover { border-color: #3a4290; transform: translateX(2px); }
.map-row .grow { flex: 1; min-width: 0; }
.map-row h4 { margin: 0; font-size: 17px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.map-row .url { font: 13px ui-monospace, monospace; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.addr-preview { font: 600 14px ui-monospace, monospace; color: var(--teal); margin-top: 8px; word-break: break-all; }
.sec-title { display: flex; justify-content: space-between; align-items: center; margin: 28px 0 14px; }
.sec-title h2 { margin: 0; font-size: 20px; }

/* ======================= MAP ======================= */
body.mapbody { overflow: hidden; height: 100vh; height: 100dvh; }
.m-top { position: fixed; inset: 0 0 auto 0; z-index: 40; height: 58px; display: flex; align-items: center; gap: 12px; padding: 0 14px; background: rgba(9, 11, 30, .82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.m-top .title { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.m-top .title b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-top .title small { color: var(--faint); font: 12px ui-monospace, monospace; }
.m-top .sp { flex: 1; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); animation: pulse 2s infinite; margin-right: 8px; flex: none; }
#vp { position: fixed; inset: 58px 0 0 0; overflow: hidden; touch-action: none; cursor: grab; background-color: #070819;
  background-image: radial-gradient(circle at 1px 1px, rgba(120, 130, 220, .22) 1.4px, transparent 1.6px); background-size: 40px 40px; }
#vp.panning { cursor: grabbing; } #vp.placing { cursor: crosshair; }
#vp::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(70% 60% at 50% 40%, transparent 40%, rgba(4, 5, 18, .4)); z-index: 1; }
#world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.pin { position: absolute; width: 0; height: 0; z-index: 3; }
.pin .dot { position: absolute; left: -19px; top: -19px; width: 38px; height: 38px; border-radius: 50% 50% 50% 8%; transform: rotate(-45deg); background: var(--pc, var(--violet)); display: grid; place-items: center; border: 2px solid rgba(255, 255, 255, .85); box-shadow: 0 6px 20px color-mix(in srgb, var(--pc, var(--violet)) 55%, transparent); transition: transform .25s cubic-bezier(.3, 1.6, .4, 1), box-shadow .25s; cursor: pointer; }
.pin .dot span { transform: rotate(45deg); font-size: 18px; line-height: 1; }
.pin:hover .dot { transform: rotate(-45deg) scale(1.15); }
.pin.sel .dot { transform: rotate(-45deg) scale(1.25); box-shadow: 0 0 0 6px color-mix(in srgb, var(--pc, var(--violet)) 35%, transparent), 0 6px 26px color-mix(in srgb, var(--pc, var(--violet)) 70%, transparent); }
.pin .lbl { position: absolute; left: 50%; top: 26px; transform: translateX(-50%); white-space: nowrap; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 8px; background: rgba(8, 10, 30, .85); border: 1px solid var(--line); max-width: 160px; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.pin.drop { animation: drop .6s cubic-bezier(.3, 1.6, .4, 1); }
@keyframes drop { from { transform: translateY(-60px) scale(.3); opacity: 0; } }
.av { position: absolute; left: 0; top: 0; z-index: 5; width: 0; height: 0; transition: transform 1.1s cubic-bezier(.45, .05, .2, 1); pointer-events: none; }
.av .a { position: absolute; left: -17px; top: -17px; width: 34px; height: 34px; transition: opacity .4s; }
.av .a .avatar { max-width: none; }
.av .a .avatar { border: 2.5px solid var(--ac, #fff); box-shadow: 0 4px 14px rgba(0, 0, 0, .5), 0 0 0 3px rgba(7, 8, 26, .6); }
.av.me .a .avatar { box-shadow: 0 0 0 3px var(--teal), 0 0 22px rgba(45, 226, 200, .6); }
.av .nm { position: absolute; left: 50%; top: 22px; transform: translateX(-50%); font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px; background: var(--ac, #444); color: #08091c; white-space: nowrap; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.av.walking .a { animation: hop .55s ease-in-out 2; }
@keyframes hop { 50% { transform: translateY(-9px); } }
.av.ghost .a .avatar { opacity: .9; border-style: dashed; }
svg.trace-layer { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; z-index: 2; pointer-events: none; }
.trace-layer path.seg { fill: none; stroke-width: 3; stroke-linecap: round; opacity: .5; }
.trace-layer path.hl { fill: none; stroke-width: 4.5; stroke-linecap: round; stroke-dasharray: 10 8; animation: dash 1s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -36; } }
.tool { width: 44px; height: 44px; border-radius: 14px; background: rgba(17, 20, 47, .9); border: 1px solid var(--line); cursor: pointer; display: grid; place-items: center; font-size: 20px; font-weight: 700; backdrop-filter: blur(8px); transition: background .15s, transform .15s; }
.tool:hover { background: var(--surface2); transform: scale(1.06); } .tool.on { background: var(--grad); color: #08091c; border: 0; }
.drawer { position: fixed; z-index: 45; top: 58px; right: 0; bottom: 0; width: min(400px, 100vw); background: rgba(12, 14, 36, .96); backdrop-filter: blur(16px); border-left: 1px solid var(--line); display: flex; flex-direction: column; transform: translateX(102%); transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.drawer.open { transform: none; }
.tabs { display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; flex: none; }
.tabs button { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; padding: 13px 10px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; position: relative; }
.tabs button.on { color: var(--text); border-color: var(--teal); }
.tabs button .badge { position: absolute; top: 6px; right: 4px; background: var(--pink); color: #fff; font-size: 10px; min-width: 16px; height: 16px; border-radius: 8px; display: grid; place-items: center; padding: 0 4px; }
.pane { flex: 1; overflow-y: auto; padding: 16px; display: none; flex-direction: column; gap: 12px; }
.pane.on { display: flex; }
.thread { display: flex; flex-direction: column; gap: 10px; }
.msg { display: flex; gap: 10px; animation: pop .25s; }
.msg .bub { background: var(--surface); border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; padding: 8px 12px; min-width: 0; }
.msg .who { font-size: 12px; font-weight: 700; color: var(--muted); display: flex; gap: 8px; align-items: baseline; }
.msg .who small { font-weight: 400; color: var(--faint); }
.msg .txt { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }
.msg.mine { flex-direction: row-reverse; } .msg.mine .bub { background: #1c2150; border-radius: 14px 4px 14px 14px; }
.msg .x { background: none; border: 0; color: var(--faint); cursor: pointer; font-size: 12px; padding: 0; }
.composer { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); flex: none; }
.composer input { flex: 1; }
.pin-card h3 { margin: 0 0 4px; font-size: 20px; display: flex; gap: 10px; align-items: center; }
.pin-card .note { white-space: pre-wrap; overflow-wrap: anywhere; color: #cfd3f5; }
.pin-card .by { font-size: 13px; color: var(--faint); }
.people .p { display: flex; align-items: center; gap: 10px; padding: 8px 4px; }
.people .p .grow { flex: 1; min-width: 0; }
.people .p .nm { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.trace { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.trace .hd { display: flex; align-items: center; gap: 10px; }
.trace .steps2 { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 4px 2px; align-items: center; font-size: 13px; }
.trace .steps2 span.s { background: var(--bg2); border: 1px solid var(--line); padding: 1px 8px; border-radius: 8px; cursor: pointer; }
.trace .steps2 span.s:hover { border-color: var(--teal); }
.trace .steps2 i { color: var(--faint); font-style: normal; }
.gate { position: fixed; inset: 58px 0 0 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: radial-gradient(60% 60% at 50% 40%, rgba(90, 59, 216, .25), rgba(7, 8, 26, .96)); }
.gate .card { width: min(460px, 100%); text-align: center; }
.gate h1 { margin: 14px 0 6px; font-size: 28px; letter-spacing: -.02em; }
.banner { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 41; background: var(--surface2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow); max-width: calc(100vw - 100px); }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.emoji-grid button { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; font-size: 20px; padding: 6px 0; cursor: pointer; }
.emoji-grid button.on { border-color: var(--teal); background: var(--surface2); }
@media (max-width: 720px) {
  .drawer { top: auto; height: 62vh; width: 100vw; border-left: 0; border-top: 1px solid var(--line); border-radius: 20px 20px 0 0; transform: translateY(102%); }
    .banner { bottom: 70px; }
  .m-top .title small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .hero h1 .w, .hero p.lead, .cta-row, .addr-demo, .reveal { opacity: 1; transform: none; }
}

:root { --drawer-w: 0px; --tray: 0px; }
.pin.dragging { z-index: 20; } .pin.dragging .dot { cursor: grabbing; transition: none; }
.pin-img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); margin: 6px 0; display: block; }

/* Font Awesome inside controls */
.tool i { font-size: 17px; } .tabs button i { margin-right: 6px; font-size: 13px; }
.btn i, .chip i { font-size: .92em; } .btn.sm i { font-size: .9em; } .msg .x i { font-size: 11px; }
.tile .stats i { color: var(--faint); font-size: 12px; margin-right: 1px; } .tile .stats span { white-space: nowrap; }
.oauth .btn i { font-size: 17px; }

/* ---- explore search ---- */
.search { position: relative; max-width: 640px; margin: 0 0 8px; }
.search input[type=search] { width: 100%; padding: 16px 84px 16px 50px; font-size: 17px; border-radius: 16px; background: linear-gradient(180deg, var(--surface), var(--bg2)); border: 1px solid var(--line); box-shadow: 0 10px 34px rgba(3, 4, 20, .4); -webkit-appearance: none; appearance: none; }
.search input[type=search]::-webkit-search-cancel-button { display: none; }
.search input[type=search]:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(45, 226, 200, .16), 0 10px 34px rgba(3, 4, 20, .4); }
.search-ic { position: absolute; left: 19px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 17px; pointer-events: none; transition: color .15s; }
.search:focus-within .search-ic { color: var(--teal); }
.search-clear { position: absolute; right: 52px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--surface2); color: var(--muted); cursor: pointer; display: grid; place-items: center; font-size: 13px; }
.search-clear:hover { background: var(--violet); color: #fff; }
.search-kbd { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font: 600 12px ui-monospace, monospace; color: var(--faint); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 7px; padding: 1px 8px; background: var(--bg2); }
.search:focus-within .search-kbd { opacity: 0; }
.search-meta { min-height: 22px; margin: 0 0 18px 4px; font-size: 14px; color: var(--muted); }
@media (hover: none) { .search-kbd { display: none; } .search input[type=search] { padding-right: 52px; } .search-clear { right: 12px; } }
.tile .acts { flex-wrap: wrap; }
.tile .acts .btn { flex: 1 1 auto; min-width: 0; padding: 7px 10px; font-size: 12.5px; gap: 6px; }
.tile.t1 .acts .btn:first-child i { display: none; }

.dom { font-weight: 500; color: var(--muted); font-size: .72em; margin-left: 1px; }
.tile h3 { overflow-wrap: anywhere; } .tile .dom { display: block; font: 12px ui-monospace, monospace; margin: 2px 0 8px; }
.map-row h4 .dom { font-size: .85em; }

/* pin glyph: plain dot, or the link's preview image */
.pin .dot span.gl { width: 14px; height: 14px; border-radius: 50%; background: rgba(255, 255, 255, .95); font-size: 0; display: block; transform: rotate(45deg); }
.pin .dot span.gl.has-img { width: 31px; height: 31px; background: #0a0c1a; overflow: hidden; }
.pin .dot span.gl img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.link-preview { display: flex; gap: 12px; align-items: center; margin-top: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); }
.link-preview .pv-img { width: 96px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; background: var(--surface2); }
.link-preview .pv-text { font-size: 13px; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.pin.big .dot { left: -27px; top: -27px; width: 54px; height: 54px; }
.pin.big .dot span.gl.has-img { width: 45px; height: 45px; }
.pin.big .lbl { top: 38px; }

/* ---- notes: rendered body + rich editor ---- */
.note-body { white-space: normal; overflow-wrap: anywhere; font-size: 14.5px; }
.note-body p { margin: 0 0 8px; } .note-body p:last-child, .note-body ul:last-child, .note-body ol:last-child { margin-bottom: 0; }
.note-body ul, .note-body ol { margin: 0 0 8px; padding-left: 22px; } .note-body li { margin: 2px 0; }
.note-body a { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(45, 226, 200, .45); cursor: pointer; }
.note-body a:hover { text-decoration-color: var(--teal); }
.note-body img.note-img { max-width: 100%; max-height: 260px; border-radius: 10px; border: 1px solid var(--line); display: block; margin: 6px 0; background: var(--surface2); }
.note-body strong { font-weight: 700; }
.msg .bub { min-width: 0; flex: 1; }
.rte-wrap { padding: 10px 12px 12px; border-top: 1px solid var(--line); flex: none; background: rgba(12, 14, 36, .98); }
.rt-bar { display: flex; align-items: center; gap: 2px; margin-bottom: 6px; flex-wrap: wrap; }
.rt-btn { width: 32px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; font-size: 14px; }
.rt-btn:hover { background: var(--surface2); color: var(--text); }
.rt-sep { width: 1px; height: 18px; background: var(--line); margin: 0 6px; }
.rte { min-height: 64px; max-height: 150px; overflow-y: auto; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); outline: none; font-size: 14.5px; overflow-wrap: anywhere; }
.rte:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(139, 108, 255, .2); }
.rte:empty::before { content: attr(data-ph); color: var(--faint); pointer-events: none; }
.rte ul, .rte ol { margin: 4px 0; padding-left: 22px; }
.rte a { color: var(--teal); text-decoration: underline; }
.rte img { max-width: 100%; max-height: 120px; border-radius: 8px; display: block; margin: 4px 0; }
.rt-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; font-size: 12px; }

/* ---- replay controls ---- */
.replay-bar { position: fixed; top: 70px; left: calc((100vw - var(--drawer-w, 0px)) / 2); transform: translateX(-50%); z-index: 47; display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 12px; background: rgba(17, 20, 47, .94); border: 1px solid var(--line); border-radius: 99px; box-shadow: var(--shadow); backdrop-filter: blur(10px); max-width: calc(100vw - 24px); animation: pop .25s ease; transition: left .35s cubic-bezier(.2, .8, .2, 1); }
.replay-bar .rp-info { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; max-width: 220px; }
.replay-bar .rp-info b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.replay-bar .rp-info small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface2); color: var(--text); cursor: pointer; display: grid; place-items: center; font-size: 13px; flex: none; }
.rp-btn:hover { background: var(--violet); border-color: var(--violet); } .rp-btn.go { background: var(--grad); color: #08091c; border: 0; }
@media (max-width: 720px) { .replay-bar { left: 50%; } }

/* ---- RTI-style map controls: round buttons, bottom-right ---- */
.rtools { position: fixed; left: 14px; bottom: calc(var(--tray, 0px) + 14px); z-index: 40; display: flex; flex-direction: column; gap: 8px; }   /* left side: the panel handle owns the right edge */
.rbtn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: rgba(17, 20, 47, .92); color: var(--text); font-size: 15px; font-weight: 700; cursor: pointer; display: grid; place-items: center; backdrop-filter: blur(8px); transition: background .15s, border-color .15s; }
.rbtn i { font-size: 14px; }
@media (hover: hover) { .rbtn:hover { background: var(--surface2); border-color: var(--teal); } }
.rdiv { height: 1px; background: var(--line); margin: 2px 6px; }
.pin { transform: scale(var(--ps, 1)); transform-origin: 0 0; }
@media (max-width: 720px) { .rtools { left: 12px; bottom: calc(var(--tray, 0px) + 12px); } }

/* ---- panel handle on the right edge (replaces the old bottom-left buttons) ---- */
.panel-handle { position: fixed; z-index: 46; top: 50%; right: var(--drawer-w, 0px); transform: translateY(-50%); width: 24px; height: 72px; border-radius: 14px 0 0 14px; border: 1px solid var(--line); border-right: 0; background: rgba(17, 20, 47, .94); color: var(--muted); cursor: pointer; display: grid; place-items: center; font-size: 13px; backdrop-filter: blur(8px); transition: right .35s cubic-bezier(.2, .8, .2, 1), background .15s, color .15s; padding: 0; }
.panel-handle:hover { background: var(--surface2); color: var(--text); }
.switch-row { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; user-select: none; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.sw-track { width: 36px; height: 20px; border-radius: 99px; background: var(--surface2); border: 1px solid var(--line); position: relative; transition: background .2s; flex: none; }
.sw-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
.switch-row input:checked + .sw-track { background: rgba(45, 226, 200, .25); border-color: var(--teal); }
.switch-row input:checked + .sw-track::after { transform: translateX(16px); background: var(--teal); }
.switch-row input:focus-visible + .sw-track { outline: 2px solid var(--teal); outline-offset: 2px; }
@media (max-width: 720px) {
  .panel-handle { top: auto; right: auto; left: 50%; bottom: var(--tray, 0px); transform: translateX(-50%); width: 72px; height: 24px; border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; transition: bottom .35s cubic-bezier(.2, .8, .2, 1); }
  body.drawer-open .panel-handle { bottom: 62vh; }
}
.note-body .img-fail, .note-body a.img-fail { display: inline-flex; gap: 6px; align-items: center; margin: 4px 0; padding: 8px 12px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); text-decoration: none; font-size: 13px; }
.img-dialog-preview { max-width: 100%; max-height: 180px; border-radius: 10px; border: 1px solid var(--line); margin-top: 10px; display: block; background: var(--surface2); }
#vp { transition: bottom .3s cubic-bezier(.2, .8, .2, 1); }
.rtools, .banner { transition: bottom .3s cubic-bezier(.2, .8, .2, 1); }

/* images are shown whole (scaled to fit), never cropped */
.pin-img { width: 100%; height: auto; max-height: 280px; object-fit: contain; background: var(--bg2); }
.link-preview .pv-img { width: 110px; height: 76px; object-fit: contain; }

/* Link / Text switch in the pin editor (like RTI's "Add a link or text") */
.seg.add-mode { display: flex; width: 100%; margin-bottom: 4px; }
.seg.add-mode button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
textarea.tall { min-height: 130px; }
.msg .who .on-pin { background: rgba(139, 108, 255, .16); color: #c9bcff; border: 0; border-radius: 99px; padding: 1px 9px; font-size: 11px; font-weight: 700; cursor: pointer; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg .who .on-pin:hover { background: var(--violet); color: #fff; }

/* ---- recording + saved traces ---- */
.rec-bar { position: fixed; top: 70px; left: calc((100vw - var(--drawer-w, 0px)) / 2); transform: translateX(-50%); z-index: 48; display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 14px; background: rgba(36, 14, 30, .95); border: 1px solid #7b2a4a; border-radius: 99px; box-shadow: var(--shadow); backdrop-filter: blur(10px); max-width: calc(100vw - 24px); animation: pop .25s ease; }
.rec-bar .rp-info { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; max-width: 240px; }
.rec-bar .rp-info b { font-size: 13px; } .rec-bar .rp-info small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: #ff4d6d; box-shadow: 0 0 0 0 rgba(255, 77, 109, .6); animation: recpulse 1.4s infinite; flex: none; }
.rec-dot.paused { animation: none; background: var(--amber); }
@keyframes recpulse { 70% { box-shadow: 0 0 0 9px rgba(255, 77, 109, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 109, 0); } }
.replay-bar.has-note { border-radius: 20px; align-items: flex-start; padding-top: 10px; }
.replay-bar .rp-note { margin-top: 4px; font-size: 13px; color: var(--text); white-space: normal; max-width: 260px; overflow-wrap: anywhere; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sec-head h4 { margin: 0; font-size: 15px; }
hr.sep { border: 0; border-top: 1px solid var(--line); width: 100%; margin: 12px 0 4px; }
.trace.saved { border-color: #3a4290; }
.ellip { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cap-list { display: grid; gap: 10px; max-height: 38vh; overflow-y: auto; padding-right: 4px; }
.cap-row { display: flex; gap: 10px; align-items: flex-start; }
.cap-n { width: 24px; height: 24px; border-radius: 50%; background: var(--surface2); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; margin-top: 2px; }
.cap-main { flex: 1; min-width: 0; display: grid; gap: 4px; } .cap-main b { font-size: 14px; }
@media (max-width: 720px) { .rec-bar, .replay-bar { left: 50%; } }
.btn .fa-circle { color: #ff4d6d; filter: drop-shadow(0 0 3px rgba(255, 77, 109, .5)); }

.notes-head { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.notes-head i { color: var(--teal); } .notes-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notes-empty { text-align: center; color: var(--muted); padding: 34px 10px 10px; display: grid; gap: 6px; justify-items: center; }
.notes-empty i { font-size: 26px; color: var(--faint); } .notes-empty p { margin: 6px 0 0; font-size: 15px; color: var(--text); }
.tabs button .badge { background: var(--surface2); color: var(--muted); }

/* pin panel: each part is labelled so title / description / link are never confused */
.pin-card .fld-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 12px 0 4px; }
.pin-card .fld-label:first-child { margin-top: 0; }
.pin-card h3 { margin: 0 0 2px; }
.pin-card .note { margin: 0 0 6px; }

/* ---- Traces tab: one clear action + saved traces; automatic log collapsed ---- */
.trace-intro { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: linear-gradient(135deg, rgba(139, 108, 255, .16), rgba(45, 226, 200, .10)); border: 1px solid #3a4290; }
.trace-intro .ti-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--grad); color: #08091c; display: grid; place-items: center; font-size: 17px; flex: none; }
.trace-intro > div:nth-child(2) { flex: 1; min-width: 0; } .trace-intro b { font-size: 15px; }
.trace-intro p { margin: 2px 0 0; font-size: 13px; color: var(--muted); line-height: 1.35; }
.trace-intro .btn { flex: none; }
.acc { border: 1px solid var(--line); border-radius: 14px; background: var(--bg2); margin-top: 6px; }
.acc > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; font-weight: 700; font-size: 14px; color: var(--muted); }
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary::after { content: "\f078"; font: 900 11px "Font Awesome 6 Free"; transition: transform .2s; margin-left: 8px; }
.acc[open] > summary::after { transform: rotate(180deg); } .acc[open] > summary { color: var(--text); }
.acc > summary small { font-weight: 600; color: var(--faint); margin-left: auto; text-transform: uppercase; letter-spacing: .06em; font-size: 10px; }
.acc-body { display: grid; gap: 10px; padding: 0 12px 14px; }

/* ---- visitor activity: search + one row per person ---- */
.mini-filters { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.mini-search { position: relative; display: flex; align-items: center; }
.mini-search > i { position: absolute; left: 12px; color: var(--faint); font-size: 13px; pointer-events: none; }
.mini-search input[type=search] { width: 100%; padding: 9px 32px 9px 34px; border-radius: 12px; font-size: 14px; -webkit-appearance: none; appearance: none; }
.mini-search input[type=search]::-webkit-search-cancel-button { display: none; }
.mini-search:focus-within > i { color: var(--teal); }
.mini-clear { position: absolute; right: 6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--surface2); color: var(--muted); cursor: pointer; display: grid; place-items: center; font-size: 11px; padding: 0; }
.mini-clear:hover { background: var(--violet); color: #fff; }
.mini-filters select { padding: 9px 10px; border-radius: 12px; font-size: 14px; max-width: 150px; }
.act-list { display: grid; gap: 8px; }
.person { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.person[open] { border-color: #3a4290; }
.person > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.person > summary::-webkit-details-marker { display: none; }
.person > summary::after { content: "\f078"; font: 900 10px "Font Awesome 6 Free"; color: var(--faint); margin-left: auto; transition: transform .2s; }
.person[open] > summary::after { transform: rotate(180deg); }
.person .pm { min-width: 0; display: grid; line-height: 1.25; }
.person .pm b { display: flex; align-items: center; gap: 6px; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .pm small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .pbody { padding: 0 12px 12px; }
.person .fld-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 8px 0 4px; }
.person .steps2 em { font-style: normal; color: var(--teal); font-weight: 700; }
.act-list + * { margin-top: 0; }
.acc-body .search-meta { min-height: 0; margin: 0 0 0 2px; font-size: 13px; }
.acc-body .search-meta:empty { display: none; }
.person .steps2 { display: flex; flex-wrap: wrap; gap: 4px 2px; align-items: center; font-size: 13px; }
.person .steps2 span.s { background: var(--bg2); border: 1px solid var(--line); padding: 1px 8px; border-radius: 8px; cursor: pointer; }
.person .steps2 span.s:hover { border-color: var(--teal); }
.person .steps2 i { color: var(--faint); font-style: normal; }

/* pin chips in paths: identical size, one line, long titles truncated */
.trace .steps2 span.s, .person .steps2 span.s { display: inline-flex; align-items: center; gap: 5px; max-width: 150px; height: 26px; padding: 0 9px; line-height: 1; white-space: nowrap; flex: none; }
.trace .steps2 span.s .t, .person .steps2 span.s .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.trace .steps2 span.s em, .person .steps2 span.s em { flex: none; }
.trace .steps2 i, .person .steps2 i { flex: none; }
.trace .steps2, .person .steps2 { gap: 6px 4px; }
.pane .search-meta { min-height: 0; margin: 0 0 0 2px; font-size: 13px; } .pane .search-meta:empty { display: none; }

.click-ripple { position: absolute; width: 0; height: 0; z-index: 4; pointer-events: none; }
.click-ripple::after { content: ""; position: absolute; left: -16px; top: -16px; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--teal); background: rgba(45, 226, 200, .18); animation: crip .65s ease-out forwards; }
@keyframes crip { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }

/* out-of-focus people are dimmed; back in focus they're normal again */
.av .a { transition: opacity .4s, filter .4s; }
.av.away .a { opacity: .42; filter: grayscale(.75) saturate(.6); }
.av.away .nm { opacity: .8; }
.live-dot.away { background: var(--faint); animation: none; }

/* header: members / online count + "is my own window in focus" dot */
.stats-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13px; cursor: pointer; white-space: nowrap; }
.stats-chip:hover { border-color: #3a4290; color: var(--text); }
.stats-chip b { color: var(--text); font-weight: 700; } .stats-chip i { font-size: 12px; }
.stats-chip .sc-sep { color: var(--faint); margin: 0 1px; }
.stats-chip .live-dot { margin: 0 2px 0 0; width: 7px; height: 7px; }
.focus-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px rgba(45, 226, 200, .18); flex: none; transition: background .2s, box-shadow .2s; }
.focus-dot.out { background: var(--faint); box-shadow: 0 0 0 3px rgba(107, 114, 168, .2); }
@media (max-width: 720px) { .stats-chip .sc-l { display: none; } .stats-chip { padding: 0 9px; } }

/* ======================= INBOX (bottom of the Pin tab in the right-hand panel) ======================= */
#vp, .rtools, .banner { transition: bottom .3s cubic-bezier(.2, .8, .2, 1); }
.tray-empty { color: var(--faint); font-size: 13px; align-self: center; padding: 0 6px; }
.add-tile { flex: 0 0 84px; border-radius: 12px; background: rgba(139, 108, 255, .08); border: 1px dashed var(--violet); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; font-size: 11px; font-weight: 600; color: var(--text); padding: 0; }
.add-tile .plus { position: relative; width: 26px; height: 26px; border-radius: 50%; background: var(--grad); color: #08091c; display: grid; place-items: center; }
.add-tile .plus::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--teal); animation: ripple 1.8s ease-out infinite; }
@keyframes ripple { from { transform: scale(1); opacity: .6; } to { transform: scale(1.9); opacity: 0; } }
.add-tile:hover { background: rgba(139, 108, 255, .18); } .add-tile .plus i { font-size: 15px; }
.capsule { position: relative; flex: 0 0 108px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; cursor: grab; transition: transform .15s, border-color .15s; }
.capsule:hover { border-color: #3a4290; transform: translateY(-2px); }
.capsule.dragging { opacity: .4; } .capsule.armed { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(45, 226, 200, .35); }
.cap-body { display: flex; flex-direction: column; height: 100%; }
.cap-thumb { position: relative; flex: 1; min-height: 40px; background: linear-gradient(135deg, #1a1f4a, #121538); display: grid; place-items: center; overflow: hidden; }
.cap-thumb img.fg { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: contain; display: block; }
.cap-thumb .bg { position: absolute; inset: -16px; background-size: cover; background-position: center; filter: blur(14px) brightness(.55) saturate(1.25); }
.cap-label { font-size: 10.5px; font-weight: 600; padding: 3px 6px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cap-btn { position: absolute; top: 4px; z-index: 2; width: 24px; height: 24px; border-radius: 8px; border: 0; background: rgba(7, 8, 26, .78); color: var(--text); cursor: pointer; display: grid; place-items: center; padding: 0; backdrop-filter: blur(4px); }
.cap-btn.place { left: 4px; } .cap-btn.del { right: 4px; } .cap-btn i { font-size: 11px; }
.cap-btn:hover { background: var(--violet); } .cap-btn.del:hover { background: #b0245c; }
.dom-card { width: 100%; height: 100%; display: grid; place-content: center; justify-items: center; gap: 1px; padding: 4px; text-align: center; background: linear-gradient(135deg, hsl(var(--h) 55% 30%), hsl(calc(var(--h) + 40) 60% 17%)); color: #fff; }
.dom-card b { font-size: 26px; line-height: 1; text-transform: uppercase; font-weight: 800; }
.dom-card span { font-size: 10px; opacity: .8; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-card { width: 100%; height: 100%; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; justify-content: center; background: linear-gradient(135deg, #2a2352, #1a1740); overflow: hidden; }
.note-card i { color: var(--amber); font-size: 14px; } .note-card p { margin: 0; font-size: 11.5px; line-height: 1.3; color: #e4e6ff; text-align: left; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
body.armed #vp { cursor: crosshair; }
.armed-hint { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 44; background: var(--grad); color: #08091c; font-weight: 700; padding: 8px 16px; border-radius: 99px; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; }
.armed-hint button { background: rgba(8, 9, 28, .2); border: 0; border-radius: 99px; padding: 2px 10px; cursor: pointer; font-weight: 700; color: inherit; }
#vp.drop-target::after { content: "Drop to place the pin here"; position: absolute; inset: 10px; z-index: 6; border: 2px dashed var(--teal); border-radius: 18px; background: rgba(45, 226, 200, .07); display: grid; place-items: center; color: var(--teal); font-weight: 700; pointer-events: none; }
.pin.dragging { z-index: 20; } .pin.dragging .dot { cursor: grabbing; transition: none; }
/* dashboard list */
.inbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.inbox-grid .capsule { flex: none; height: 140px; cursor: default; }

.cap-btn { width: 22px; height: 22px; } .dom-card b { font-size: 22px; } .dom-card span { font-size: 9px; max-width: 96px; }
.note-card { padding: 6px 8px; } .note-card p { font-size: 10.5px; -webkit-line-clamp: 2; }
.inbox-grid .capsule { height: 118px; } .inbox-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }

/* text card: the beginning of the note IS the preview (no icon) */
.note-card { align-items: flex-start; justify-content: flex-start; padding: 7px 9px; }
.note-card p { font-size: 11px; line-height: 1.32; -webkit-line-clamp: 4; color: #eceeff; }
.cap-btn.del { top: 4px; right: 4px; }

/* ---- owner activity feed + shared-inbox review ---- */
.bell { position: relative; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.bell:hover { color: var(--text); border-color: #3a4290; }
.bell.on { color: var(--text); }
.bell .bell-n { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--pink); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.act-sec { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.act-sec .n { background: var(--surface2); border-radius: 99px; padding: 0 8px; color: var(--muted); }
.act-empty { margin: 0; font-size: 13px; }
.act-card { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.act-card.new { border-color: var(--teal); box-shadow: 0 0 0 1px rgba(45, 226, 200, .25); }
.act-card.sugg { border-color: #5b49c9; }
.act-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.act-who { display: flex; align-items: center; gap: 8px; min-width: 0; } .act-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-what { color: var(--muted); font-size: 13px; margin-top: -4px; }
.act-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.act-title { font-weight: 700; overflow-wrap: anywhere; }
.act-link { color: var(--teal); font-size: 13px; overflow-wrap: anywhere; }
.act-btns { display: flex; gap: 8px; }
/* member's shared-inbox cards: review status */
.capsule.st-pending::after, .capsule.st-approved::after, .capsule.st-declined::after { position: absolute; left: 5px; top: 5px; z-index: 2; font-size: 9.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 1px 6px; border-radius: 99px; background: rgba(8, 10, 28, .82); pointer-events: none; }
.capsule.st-pending::after { content: "Pending"; color: #f5c451; }
.capsule.st-approved::after { content: "Approved"; color: var(--teal); }
.capsule.st-declined::after { content: "Declined"; color: #ff7a90; }
.capsule.st-declined { opacity: .6; }
/* activity feed: compact by default */
.act-card { gap: 6px; padding: 9px 12px; }
.act-sum { color: var(--text); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-more { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 0; }
.act-more .act-body, .act-more .act-sum { width: 100%; }
.act-toggle { background: none; border: 0; padding: 0; color: var(--teal); font-size: 12.5px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.act-toggle:hover { text-decoration: underline; }
.act-card .act-btns { margin-top: 2px; }
.hint.warn { color: #f5c451; }
.cap-ctl { display: flex; gap: 4px; flex: none; }
.cap-ctl .rp-btn { width: 30px; height: 30px; font-size: 12px; } .cap-ctl .rp-btn:disabled { opacity: .35; cursor: default; }
/* Traces tab: the walk-throughs and "Who's been where" each scroll on their own */
.scrolly { max-height: min(38vh, 360px); overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; align-content: start; scrollbar-width: thin; }
.scrolly::-webkit-scrollbar { width: 6px; } .scrolly::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.danger-zone { margin-top: 22px; padding: 14px; border: 1px solid rgba(255, 90, 120, .45); border-radius: 12px; display: grid; gap: 8px; justify-items: start; } .danger-zone b { color: var(--pink); } .danger-zone p { margin: 0; font-size: 13px; }
.btn.danger-ic:hover { color: var(--pink); border-color: var(--pink); }

/* ---- proximity chat ---- */
.chat-bubble { position: absolute; left: 14px; top: -42px; pointer-events: auto; width: 30px; height: 30px; border-radius: 50% 50% 50% 4px; border: 1px solid var(--line); background: rgba(17, 20, 47, .92); color: var(--muted); display: grid; place-items: center; cursor: pointer; font-size: 13px; backdrop-filter: blur(6px); box-shadow: 0 4px 14px rgba(0, 0, 0, .35); transform: scale(1); transition: transform .15s, background .15s, color .15s; }
.chat-bubble:hover { transform: scale(1.12); color: var(--text); }
.chat-bubble.group { color: #06201c; background: linear-gradient(135deg, var(--teal), #7aa8ff); border-color: transparent; }
.chat-bubble.dnd { opacity: .6; }
.chat-bubble.unread { animation: cbPulse 1.4s ease-in-out infinite; }
.chat-bubble .cb-n { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--pink); color: #fff; font-size: 10px; display: grid; place-items: center; }
@keyframes cbPulse { 50% { box-shadow: 0 0 0 7px rgba(45, 226, 200, .18); } }
.chat-panel { position: fixed; z-index: 60; width: 320px; height: 380px; display: flex; flex-direction: column; background: rgba(14, 16, 40, .97); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 50px rgba(0, 0, 0, .55); overflow: hidden; backdrop-filter: blur(10px); }
.chat-panel.hidden { display: none; }
.cp-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.cp-stack { display: flex; } .cp-stack .avatar { margin-left: -8px; border: 2px solid #0e1028; } .cp-stack .avatar:first-child { margin-left: 0; }
.cp-title { flex: 1; min-width: 0; display: grid; } .cp-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; } .cp-title small { color: var(--faint); font-size: 11.5px; }
.cp-ic { width: 28px; height: 28px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; } .cp-ic:hover { background: var(--surface2); color: var(--text); } .cp-ic.on { color: var(--pink); }
.cp-list { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; overscroll-behavior: contain; scrollbar-width: thin; }
.cp-empty { margin: auto; text-align: center; color: var(--faint); font-size: 13px; padding: 0 12px; }
.cm { max-width: 86%; align-self: flex-start; } .cm.me { align-self: flex-end; text-align: right; }
.cm-h { font-size: 11.5px; color: var(--muted); margin: 6px 2px 2px; } .cm-h span { color: var(--faint); margin-left: 6px; }
.cm-b { display: inline-block; text-align: left; background: var(--surface2); border-radius: 12px; padding: 6px 10px; font-size: 14px; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
.cm.me .cm-b { background: linear-gradient(135deg, rgba(122, 104, 255, .55), rgba(45, 226, 200, .35)); }
.cp-foot { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); } .cp-foot input { flex: 1; min-width: 0; }
.cp-send { width: 38px; border-radius: 10px; border: 0; background: linear-gradient(135deg, #7a68ff, var(--teal)); color: #06101f; cursor: pointer; }
@media (max-width: 720px) { .chat-panel { left: 0; right: 0; bottom: 0; top: auto; width: auto; height: 55vh; border-radius: 16px 16px 0 0; } }
.cp-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; background: rgba(122, 104, 255, .12); border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); } .cp-ask span { flex: 1 1 100%; }
/* do not disturb: a small moon on the avatar and a tag in the People list */
.av.dnd .a::after { content: "\f186"; font: 900 9px "Font Awesome 6 Free"; position: absolute; right: -5px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%; background: #5b49c9; color: #fff; display: grid; place-items: center; border: 2px solid #0e1028; }
.dnd-tag { margin-left: 8px; font-size: 11px; color: #b6a8ff; background: rgba(91, 73, 201, .22); border-radius: 99px; padding: 1px 8px; }

/* chat: replies, reactions, menu, typing */
.cm-row { display: flex; align-items: flex-start; gap: 4px; } .cm.me .cm-row { flex-direction: row-reverse; }
.cm-more { opacity: 0; width: 22px; height: 22px; flex: none; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; margin-top: 3px; transition: opacity .12s; }
.cm:hover .cm-more, .cm-more:focus-visible { opacity: 1; } .cm-more:hover { background: var(--surface2); color: var(--text); }
@media (hover: none) { .cm-more { opacity: .5; } }
.cm-b.gone { color: var(--faint); font-style: italic; background: transparent; border: 1px dashed var(--line); }
.cm-q { display: grid; gap: 1px; border-left: 3px solid var(--teal); background: rgba(0, 0, 0, .22); border-radius: 6px; padding: 3px 8px; margin: 0 0 5px; cursor: pointer; text-align: left; max-width: 100%; }
.cm-q b { font-size: 11.5px; color: var(--teal); } .cm-q span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm.flash .cm-b { animation: cmFlash 1.2s ease; } @keyframes cmFlash { 0%, 60% { box-shadow: 0 0 0 3px rgba(45, 226, 200, .45); } }
.cm-rx { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; } .cm.me .cm-rx { justify-content: flex-end; }
.cm-r { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 99px; padding: 1px 8px; font-size: 12px; cursor: pointer; } .cm-r.mine { border-color: var(--teal); background: rgba(45, 226, 200, .14); }
.cm-menu { position: absolute; z-index: 5; width: 200px; background: #151838; border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 14px 34px rgba(0, 0, 0, .55); display: grid; gap: 2px; }
.cm-emo { display: flex; justify-content: space-between; padding: 2px 2px 6px; border-bottom: 1px solid var(--line); margin-bottom: 2px; }
.cm-emo button { border: 0; background: transparent; font-size: 19px; border-radius: 8px; width: 30px; height: 30px; cursor: pointer; } .cm-emo button:hover { background: var(--surface2); transform: scale(1.15); }
.cm-mi { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--text); text-align: left; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 13.5px; } .cm-mi:hover { background: var(--surface2); } .cm-mi i { width: 14px; color: var(--muted); } .cm-mi.danger, .cm-mi.danger i { color: var(--pink); }
.cp-reply { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-top: 1px solid var(--line); background: rgba(45, 226, 200, .06); } .cp-reply.hidden, .cp-typing.hidden { display: none; }
.cp-reply-in { flex: 1; min-width: 0; display: grid; border-left: 3px solid var(--teal); padding-left: 8px; } .cp-reply-in b { font-size: 12px; color: var(--teal); } .cp-reply-in span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-typing { padding: 2px 14px 6px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.dots { display: inline-flex; gap: 3px; } .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--teal); animation: dotB 1.2s infinite ease-in-out; } .dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dotB { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
.chat-bubble.typing { box-shadow: 0 0 0 3px rgba(45, 226, 200, .35); }

/* chat: meta line, ticks, info, editing */
.cm-meta { display: inline-flex; align-items: center; gap: 4px; float: right; margin: 5px 0 -2px 10px; font-size: 10.5px; color: var(--faint); font-style: normal; line-height: 1; }
.cm-b.gone .cm-meta { display: none; }
.cm-t { font-size: 10px; color: var(--faint); } .cm-t.seen { color: var(--teal); }
.cp-info { position: absolute; inset: 0; z-index: 4; background: rgba(14, 16, 40, .985); display: flex; flex-direction: column; }
.ci-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ci-msg { padding: 12px 14px; display: grid; gap: 6px; justify-items: end; } .ci-msg .faint { font-size: 12px; }
.ci-list { padding: 4px 14px 14px; overflow-y: auto; display: grid; gap: 10px; }
.ci-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; } .ci-row b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ci-row span { color: var(--faint); font-size: 12px; } .ci-row span.ok { color: var(--teal); }

/* emoji picker */
.ep { display: grid; grid-template-rows: auto 1fr; min-height: 0; }
.ep-tabs { display: flex; gap: 2px; padding: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ep-tab { flex: none; border: 0; background: transparent; border-radius: 8px; width: 32px; height: 30px; font-size: 17px; cursor: pointer; opacity: .55; } .ep-tab.on { opacity: 1; background: var(--surface2); } .ep-tab:hover { opacity: 1; }
.ep-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 1px; padding: 6px; overflow-y: auto; max-height: 190px; scrollbar-width: thin; }
.ep-e { border: 0; background: transparent; font-size: 21px; line-height: 1; padding: 5px 0; border-radius: 8px; cursor: pointer; } .ep-e:hover { background: var(--surface2); transform: scale(1.12); }
.ep-empty { grid-column: 1 / -1; text-align: center; color: var(--faint); font-size: 12.5px; margin: 14px 0; }
.cp-emojipop { position: absolute; left: 8px; right: 8px; bottom: 62px; z-index: 5; background: #151838; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 34px rgba(0, 0, 0, .55); overflow: hidden; }
.cp-emoji { flex: none; width: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; } .cp-emoji:hover { background: var(--surface2); color: var(--text); }
.cm-menu.wide { width: 296px; padding: 0; overflow: hidden; }
.cm-emo .more { font-size: 13px; color: var(--muted); background: var(--surface2); border-radius: 50%; }
.cm-menu { width: 232px; }

/* the world map backdrop: lives in the pannable / zoomable world, centred on (0,0), so pins stay where they were placed on it */
#worldmap { position: absolute; left: -793.5px; top: -412.5px; width: 1587px; height: 825px; max-width: none; z-index: 0; pointer-events: none; user-select: none; opacity: .9; filter: brightness(1.35) saturate(1.1); }
.copy-inline { display: inline-flex; align-items: center; gap: 2px; vertical-align: middle; padding: 1px 2px 1px 8px; border-radius: 7px; background: rgba(255, 255, 255, .08); border: 1px solid var(--line); }
.copy-inline code { font: 600 13.5px ui-monospace, monospace; color: var(--text); overflow-wrap: anywhere; }
.copy-ic { border: 0; background: transparent; color: var(--muted); width: 24px; height: 22px; border-radius: 5px; cursor: pointer; font-size: 12px; } .copy-ic:hover { background: var(--surface2); color: var(--text); } .copy-ic.done { color: var(--teal); }
.av-picks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; justify-items: center; }
.av-pick { border: 2px solid transparent; background: none; padding: 2px; border-radius: 50%; cursor: pointer; line-height: 0; } .av-pick:hover, .av-pick:focus-visible { border-color: var(--teal); }
.av-style-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }

/* ---- landing page: calmer and more product-like (no aurora, no gradient text, flat buttons) ---- */
.landing .hero { padding: 92px 0 68px; }
.landing .hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background-image: radial-gradient(circle at 1px 1px, rgba(120, 130, 220, .2) 1.2px, transparent 1.4px); background-size: 36px 36px; -webkit-mask-image: radial-gradient(75% 80% at 50% 45%, #000 25%, transparent 100%); mask-image: radial-gradient(75% 80% at 50% 45%, #000 25%, transparent 100%); }
.landing .hero h1 { font-weight: 700; letter-spacing: -.035em; }
.landing .hero h1 .w { transform: translateY(12px); }
.landing .hero h1 .accent { color: #a5acff; }
.landing .hero p.lead { color: #aab0d6; }
.landing .btn.primary { background: #7d6cff; color: #fff; box-shadow: none; }
.landing .btn.primary:hover { background: #8b7cff; box-shadow: none; filter: none; }
.landing .grad-text { background: none; -webkit-text-fill-color: currentColor; color: #a5acff; }
.landing .step { background: var(--surface); border-radius: 14px; }
.landing .step::after { display: none; }
.landing .step .step-ic { background: none; -webkit-text-fill-color: currentColor; color: #a5acff; font-size: 22px; }
.landing .section h2 { font-weight: 700; }
.landing .hero-inner { position: relative; }
.landing .hero-inner::before { content: ""; position: absolute; inset: -30px -70px; z-index: -1; background: radial-gradient(closest-side, rgba(7, 8, 26, .88) 55%, transparent); pointer-events: none; }

/* ---- terms / privacy / help pages ---- */
.legal-page { width: min(760px, 100% - 32px); margin: 0 auto; padding: 48px 0 72px; line-height: 1.65; }
.legal-page h1, .doc-body h1 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -.02em; margin: 0 0 6px; }
.legal-updated { color: var(--faint); font-size: 14px; margin: 0 0 28px; } .legal-updated em { font-style: normal; }
.legal-page h2 { font-size: 20px; margin: 34px 0 8px; }
.legal-page p, .legal-page li { color: #c3c7e6; } .legal-page ul { padding-left: 22px; } .legal-page li { margin: 5px 0; }
.legal-page a, .doc-body a { color: var(--teal); }
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; padding-block: 40px 72px; align-items: start; }
.doc-toc { position: sticky; top: 76px; display: grid; gap: 2px; font-size: 14px; }
.doc-toc b { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 6px; }
.doc-toc a { color: var(--muted); padding: 5px 10px; border-radius: 8px; border-left: 2px solid transparent; } .doc-toc a:hover { color: var(--text); background: var(--surface); }
.doc-body { max-width: 760px; line-height: 1.65; }
.doc-body section { padding-top: 14px; scroll-margin-top: 72px; } .doc-body h2 { font-size: 24px; margin: 30px 0 10px; letter-spacing: -.01em; }
.doc-body h3 { font-size: 16px; margin: 20px 0 6px; } .doc-body p, .doc-body li { color: #c3c7e6; } .doc-body ul, .doc-body ol { padding-left: 22px; } .doc-body li { margin: 5px 0; }
.doc-body em { color: var(--text); font-style: normal; font-weight: 600; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 14.5px; display: block; overflow-x: auto; }
.doc-table th, .doc-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; } .doc-table th { color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 860px) { .doc { grid-template-columns: 1fr; gap: 12px; } .doc-toc { position: static; grid-auto-flow: column; overflow-x: auto; white-space: nowrap; padding-bottom: 8px; border-bottom: 1px solid var(--line); } .doc-toc b { display: none; } }
.site-links { display: flex; gap: 18px; flex-wrap: wrap; } .site-links a { color: var(--muted); } .site-links a:hover { color: var(--text); }
/* phones: the site header wraps to two rows instead of overflowing sideways */
@media (max-width: 680px) {
  #site-header .bar { flex-wrap: wrap; row-gap: 6px; height: auto; padding-block: 8px; }
  #site-header .nav { order: 3; flex: 1 0 100%; display: flex; gap: 4px; overflow-x: auto; }
  #site-header .nav-right { margin-left: auto; }
}

/* ---- inbox inside the side panel ---- */
.pane[data-p="pin"] { padding: 0; gap: 0; overflow: hidden; }
.pin-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.inbox-box { flex: none; max-height: 55%; display: flex; flex-direction: column; border-top: 1px solid var(--line); background: rgba(12, 14, 36, .7); transition: background .15s; }
.inbox-box.drop { background: rgba(45, 226, 200, .12); box-shadow: inset 0 0 0 2px var(--teal); }
.ib-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; }
.ib-toggle { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px 2px; cursor: pointer; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.ib-toggle:hover { color: var(--text); } .ib-toggle i { width: 10px; font-size: 10px; }
.ib-toggle .n { background: var(--surface2); border-radius: 99px; padding: 0 8px; color: var(--muted); letter-spacing: 0; }
.ib-hint { margin: 0; padding: 0 14px 8px; font-size: 12px; color: var(--faint); }
.ib-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; padding: 2px 12px 12px; overflow-y: auto; min-height: 0; align-content: start; }
.ib-cards .capsule { flex: none; width: auto; height: 92px; }
.ib-cards .tray-empty { grid-column: 1 / -1; padding: 8px 2px; }
.note-img-link { display: inline-block; max-width: 100%; cursor: pointer; line-height: 0; }
.note-img-link .note-img { max-width: 100%; }
/* chat: links and preview cards */
.cm-b a.cm-a { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; } .cm.me .cm-b a.cm-a { color: #e8fffb; }
.cm-card { display: block; margin: 0 0 6px; border-radius: 10px; overflow: hidden; background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .08); color: inherit; text-decoration: none; text-align: left; max-width: 240px; }
.cm-card:hover { border-color: var(--teal); }
.cm-card .cc-img { display: block; width: 100%; max-height: 130px; object-fit: cover; background: var(--surface2); }
.cm-card .cc-t { font-size: 13px; font-weight: 600; line-height: 1.3; padding: 7px 10px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.cm-card .cc-d { font-size: 11.5px; color: var(--muted); padding: 2px 10px 8px; }
.note-body .cm-card { max-width: 320px; margin: 4px 0 8px; }

/* ---- tags ---- */
.tag-pill { --th: 250; display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 99px; border: 1px solid hsl(var(--th) 55% 45% / .55); background: hsl(var(--th) 60% 50% / .16); color: hsl(var(--th) 80% 85%); font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
button.tag-pill { cursor: pointer; } button.tag-pill:hover, .tag-pill.on { background: hsl(var(--th) 60% 50% / .34); }
.tp-x { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0 0 0 2px; font-size: 10px; opacity: .8; } .tp-x:hover { opacity: 1; }
.tag-row, .ti-chips, .ti-sugg { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ti { display: grid; gap: 8px; } .ti-sugg { font-size: 12px; }
.pin-filter { display: flex; gap: 8px; align-items: center; min-width: 0; }
.pin-filter.hidden { display: none; }
.pf-search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 999px; background: rgba(12, 14, 36, .92); border: 1px solid var(--line); color: var(--muted); backdrop-filter: blur(6px); }
.pf-search input { border: 0; background: transparent; outline: 0; width: 160px; color: var(--text); font-size: 14px; padding: 0; height: auto; box-shadow: none; }
.pin-filter select { height: 36px; border-radius: 999px; background: rgba(12, 14, 36, .92); border: 1px solid var(--line); color: var(--text); padding: 0 14px; font-size: 14px; max-width: 200px; }
.pf-clear { height: 36px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--teal); background: rgba(45, 226, 200, .12); color: var(--teal); cursor: pointer; font-size: 13px; font-weight: 600; }
.pin.dim { opacity: .16; filter: grayscale(.7); }
.pin.dim:hover { opacity: .6; }

/* the pin search + tag filter sit in the top bar; on phones they drop to a row just under it */
.m-top .pin-filter { margin-left: 4px; }
.m-top .pf-search { height: 34px; } .m-top .pin-filter select, .m-top .pf-clear { height: 34px; }
@media (max-width: 900px) { .m-top .pf-search input { width: 110px; } .m-top .pin-filter select { max-width: 130px; } }
@media (max-width: 720px) {
  .m-top .pin-filter { position: absolute; left: 12px; right: 12px; top: 64px; margin: 0; flex-wrap: wrap; z-index: 41; }
  .m-top .pf-search input { width: 120px; }
}
.pf-clear { white-space: nowrap; flex: none; } .pf-search, .pin-filter select { flex: none; }

/* drop-downs: our own arrow with room to breathe (the native one sat right against the rounded edge) */
select, .pin-filter select, .mini-filters select {
  -webkit-appearance: none; appearance: none; cursor: pointer; text-overflow: ellipsis;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23a9acd0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 1.5 6 6l4.5-4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; background-size: 12px 8px;
}
select option { background: #151838; color: #ecedfb; }
/* multi-select tag filter */
.pf-tagwrap { position: relative; flex: none; } .pf-tagwrap.hidden, .pf-clear.hidden { display: none; }
.pf-tags { height: 36px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 999px; background: rgba(12, 14, 36, .92); border: 1px solid var(--line); color: var(--text); padding: 0 38px 0 14px; font-size: 14px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23a9acd0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 1.5 6 6l4.5-4.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; background-size: 12px 8px; }
.pf-tags.on { border-color: var(--teal); }
.m-top .pf-tags { height: 34px; }
.pf-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; width: 270px; max-height: 340px; display: flex; flex-direction: column; background: #151838; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .55); overflow: hidden; }
.pf-menu.hidden { display: none; }
.pfm-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.pfm-mode button { font-size: 12.5px; padding: 4px 10px; }
.pfm-clear { border: 0; background: none; color: var(--teal); font-size: 13px; cursor: pointer; }
.pfm-list { overflow-y: auto; padding: 6px; display: grid; gap: 2px; }
.pfm-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; } .pfm-row:hover { background: var(--surface2); }
.pfm-row input { width: 16px; height: 16px; accent-color: var(--teal); flex: none; padding: 0; } .pfm-row .tag-pill { flex: 1; min-width: 0; width: fit-content; }
@media (max-width: 720px) { .pf-menu { position: fixed; left: 12px; right: 12px; top: 112px; width: auto; } }
.ti-label { flex-basis: 100%; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-top: 2px; }
