/*
 merchace places
 VOICE   plain and practical, like the rest of merchace.com
 IDEA    groups and businesses near you on a live map; edge-to-edge panes, inset lists, bottom sheets
 COLOUR  merchace blue (#2667dc) on soft blue-white; navy in dark mode; green/amber/red only for status; gold stars
 TYPE    Space Grotesk for headings, Inter for everything else
 SHAPE   rounded cards (14–24px), thin light borders, soft shadows, pill buttons
 LAYOUT  phone: one screen at a time + tab bar; desktop: sidebar list + full-bleed content, no outer margins
*/
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); }
/* Colours: dark (navy; also always used inside AR and calls) */
:root, .theme-dark {
  --bg: #0c1220;
  --bg2: #111a2c;
  --s1: #162036;      /* raised surface */
  --s2: #1d2840;      /* inputs, bubbles (merchace navy panel) */
  --s3: #27344f;      /* pressed / hover */
  --line: rgba(255, 255, 255, .08);
  --line2: rgba(255, 255, 255, .15);
  --ink: #eef2f8;
  --ink2: #a7b2c5;
  --ink3: #75819a;
  --accent: #4c8bff;        /* merchace bright blue */
  --accent2: #2667dc;
  --btn: #2667dc;           /* primary buttons */
  --btn-hover: #154c91;
  --green: #3ccf74;
  --amber: #f5b544;
  --red: #ff6b6b;
  --violet: #a98bff;
  --orange: #ff9a52;
  --glass: 22, 32, 54;      /* floating panels over the map (rgb triplet) */
  --glass2: 29, 40, 64;     /* toasts, banners */
  --mapbg: #0e1626;
  --accent-ink: #9cc0ff;    /* accent-coloured text on tinted chips */
  --amber-ink: #ffd28c;
  --star: #f5a623;
  --shadow: 1;              /* shadow strength */
  color-scheme: dark;
}
.theme-dark { color: var(--ink); }
/* Colours: light, the merchace.com palette (Settings → Appearance, or following the device) */
:root[data-theme="light"] {
  --bg: #f4f7fc;
  --bg2: #f8faff;
  --s1: #ffffff;
  --s2: #eef1f6;
  --s3: #e3e8f0;
  --line: #e3e8f0;
  --line2: #d6deeb;
  --ink: #161c27;
  --ink2: #4f5a6d;
  --ink3: #8a93a3;
  --accent: #2667dc;
  --accent2: #154c91;
  --btn: #2667dc;
  --btn-hover: #154c91;
  --green: #1d7a3e;
  --amber: #a3620a;
  --red: #c5303a;
  --violet: #6d4ad6;
  --orange: #c8611a;
  --glass: 255, 255, 255;
  --glass2: 255, 255, 255;
  --mapbg: #e9eef6;
  --accent-ink: #2667dc;
  --amber-ink: #a3620a;
  --star: #f5a623;
  --shadow: .4;
  color-scheme: light;
}
:root {
  --r: 14px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --tabbar: calc(58px + var(--sab));
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Ubuntu, system-ui, sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; min-width: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.4; overflow: hidden; overscroll-behavior: none; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: var(--accent); }
.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: rgba(47, 139, 255, .35); }
* { scrollbar-width: thin; scrollbar-color: var(--s3) transparent; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 999px; padding: 0 18px; min-height: 44px;
  background: var(--s2); color: var(--ink); font-weight: 600; white-space: nowrap; transition: background .15s, transform .1s; }
.btn:hover { background: var(--s3); }
a.btn { text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--btn); color: #fff; }
.btn.primary:hover { background: var(--btn-hover); }
.btn.danger { background: rgba(255, 90, 79, .16); color: var(--red); }
.btn.danger:hover { background: rgba(255, 90, 79, .26); }
.btn.ghost { background: transparent; color: var(--accent); padding: 0 6px; }
.btn.small { min-height: 34px; padding: 0 14px; font-size: 14px; border-radius: 999px; }
.btn.big { min-height: 52px; font-size: 17px; width: 100%; border-radius: 999px; }
.btn:disabled { opacity: .4; cursor: default; transform: none; }
.btn .ic { width: 18px; height: 18px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--ink2); flex: none; transition: background .15s; }
.icon-btn:hover { background: var(--s2); color: var(--ink); }
.icon-btn.tint { color: var(--accent); }
input, select, textarea { width: 100%; min-height: 44px; border: 1px solid transparent; border-radius: 12px; background: var(--s2); padding: 10px 12px; font-size: 16px; outline: none; transition: border-color .15s; }
input:focus, textarea:focus, select:focus { border-color: color-mix(in srgb, var(--accent) 70%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
/* text fields show focus with their own border, not the browser's offset ring */
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input::placeholder, textarea::placeholder { color: var(--ink3); }
textarea { resize: none; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink2) 50%), linear-gradient(135deg, var(--ink2) 50%, transparent 50%);
  background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
label, .field-label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 400; color: var(--ink); }
.check input { width: 22px; min-height: 22px; height: 22px; margin: 0; accent-color: var(--accent); }
.form { display: grid; gap: 14px; }
.error { color: var(--red); min-height: 1.4em; margin: 8px 0 0; font-size: 14px; }
.note { color: var(--ink2); font-size: 13px; margin: 0; }
.seg { display: flex; background: var(--s1); border-radius: 12px; padding: 3px; margin-bottom: 18px; }
.seg-btn { flex: 1; border: 0; border-radius: 10px; background: transparent; color: var(--ink2); font-weight: 600; min-height: 38px; }
.seg-btn.on { background: var(--s3); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, calc(.4 * var(--shadow))); }
.search-field { display: flex; align-items: center; gap: 8px; background: var(--s2); border-radius: 12px; padding: 0 12px; min-height: 40px; color: var(--ink3); font-weight: 400; }
.search-field input, .search-field input:focus { background: transparent; border: 0; box-shadow: none; padding: 0; min-height: 40px; font-size: 16px; color: var(--ink); }
.search-field { border: 1px solid transparent; transition: border-color .15s, box-shadow .15s; }
.search-field:focus-within { border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.search-field:focus-within .ic { color: var(--accent); }
.search-field .ic { width: 18px; height: 18px; }
.search-field.glass { background: rgba(var(--glass), .82); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border: 1px solid var(--line); box-shadow: 0 6px 24px rgba(0, 0, 0, calc(.35 * var(--shadow))); min-height: 46px; }
.search-field.glass:focus-within { border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent), 0 6px 24px rgba(0, 0, 0, calc(.35 * var(--shadow))); }

/* ---------- sign in ---------- */
.auth { position: fixed; inset: 0; overflow: auto; display: grid; place-items: center; padding: calc(24px + var(--sat)) 22px calc(24px + var(--sab));
  background: radial-gradient(1200px 600px at 50% -10%, rgba(47, 139, 255, .18), transparent 60%), var(--bg); }
.auth-inner { width: min(400px, 100%); }
.auth-logo { width: 76px; height: 76px; display: block; margin: 0 auto 14px; border-radius: 20px; box-shadow: 0 10px 40px rgba(47, 139, 255, .35); }
.auth h1 { text-align: center; font-size: 34px; line-height: 1.05; margin: 0 0 8px; letter-spacing: -.02em; }
.auth-sub { text-align: center; color: var(--ink2); margin: 0 0 26px; text-wrap: balance; }

/* ---------- layout ---------- */
.app { position: fixed; inset: 0; display: grid; grid-template-columns: 380px minmax(0, 1fr); background: var(--bg); }
.side { display: flex; flex-direction: column; background: var(--bg2); border-right: 1px solid var(--line); height: 100%; overflow: hidden; padding-top: var(--sat); }
.main { position: relative; height: 100%; overflow: hidden; }
.pane { position: absolute; inset: 0; display: none; flex-direction: column; background: var(--bg); }
.app[data-screen=map] #pane-map, .app[data-screen=list] #pane-map { display: block; }
.app[data-screen=chat] #pane-chat { display: flex; }
.app[data-screen=me] #pane-me { display: flex; }
.tabbar { display: none; }
.desk-only { display: inline-grid; }

/* sidebar */
.side-head { display: flex; align-items: center; gap: 12px; padding: 14px 12px 10px 16px; }
.me-btn { border: 0; padding: 0; background: none; border-radius: 50%; }
.me-text { flex: 1; display: grid; gap: 1px; }
.me-line { display: flex; align-items: center; gap: 6px; }
.me-line b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
#me-status { width: auto; min-height: 26px; height: 26px; padding: 0 24px 0 10px; font-size: 12px; font-weight: 600; border-radius: 13px; background-color: var(--s2); color: var(--ink2); background-position: calc(100% - 13px) 55%, calc(100% - 9px) 55%; background-size: 4px 4px; }
.psm { min-height: 26px; height: 26px; padding: 0; border: 0; background: transparent; font-size: 13px; color: var(--ink2); border-radius: 6px; }
.psm:focus { background: var(--s2); padding: 0 8px; }
.search-row { display: flex; gap: 6px; padding: 4px 12px 10px 16px; align-items: center; }
.search-row .search-field { flex: 1; }
.lists { flex: 1; overflow: auto; padding: 0 0 20px; }
.sec-h { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: none; padding: 16px 16px 6px; font-size: 13px; font-weight: 600; color: var(--ink2); text-align: left; }
.sec-h .chev { width: 14px; height: 14px; transition: transform .15s; color: var(--ink3); transform: rotate(90deg); }
.sec-h[aria-expanded=false] .chev { transform: none; }
.sec-h .n { color: var(--ink3); font-weight: 500; }
.item { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 16px; border: 0; background: none; text-align: left; min-height: 62px; color: var(--ink); }
button.item:hover { background: var(--s1); }
button.item:active { background: var(--s2); }
.item::after { content: ""; position: absolute; left: 72px; right: 0; bottom: 0; border-bottom: 1px solid var(--line); }
.item:last-child::after { display: none; }
.item.on { background: rgba(47, 139, 255, .14); }
.item .who { flex: 1; display: grid; gap: 1px; }
.item .who b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .who small { color: var(--ink2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item.off .who b { color: var(--ink2); }
.item .acts { flex: none; }
.empty-line { color: var(--ink3); font-size: 14px; padding: 4px 16px 10px; }
.badge { flex: none; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; font-style: normal; }
.tag { flex: none; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 10px; background: var(--s2); color: var(--ink2); white-space: nowrap; }
.tag.here { background: rgba(48, 209, 88, .15); color: var(--green); }
.acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* avatars */
.avatar { --c: #2f7df6; position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; padding: 0; border: 0;
  background: linear-gradient(150deg, color-mix(in srgb, var(--c) 78%, #fff), color-mix(in srgb, var(--c) 82%, #000)); color: #fff; font-weight: 700; font-size: 16px; letter-spacing: .01em; }
.avatar.big { width: 64px; height: 64px; font-size: 23px; }
.avatar.sm { width: 36px; height: 36px; font-size: 13px; }
.avatar.xs { width: 28px; height: 28px; font-size: 11px; }
.avatar::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 28%; height: 28%; min-width: 10px; min-height: 10px; border-radius: 50%; border: 2.5px solid var(--bg2); display: none; }
.avatar[data-s=online]::after { display: block; background: var(--green); }
.avatar[data-s=busy]::after { display: block; background: var(--red); }
.avatar[data-s=away]::after { display: block; background: var(--amber); }
.avatar.grp { border-radius: 30%; }
.avatar .ic { width: 55%; height: 55%; }

/* ---------- map ---------- */
#pane-map { background: var(--mapbg); }
.map { position: absolute; inset: 0; background: var(--mapbg); z-index: 0; isolation: isolate; }
.sheet-open .map-bottom { display: none; }
.leaflet-container { background: var(--mapbg); font: inherit; }
:root:not([data-theme="light"]) .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.88) contrast(.92) saturate(.55); }
.leaflet-control-zoom { border: 1px solid var(--line) !important; border-radius: 12px !important; overflow: hidden; box-shadow: 0 6px 24px rgba(0, 0, 0, calc(.35 * var(--shadow))) !important; }
.leaflet-control-zoom a { background: rgba(var(--glass), .9) !important; color: var(--ink) !important; border-color: var(--line) !important; width: 40px !important; height: 40px !important; line-height: 40px !important; }
.leaflet-control-attribution { background: rgba(var(--glass), .7) !important; color: var(--ink3) !important; font-size: 10px; border-radius: 8px 0 0 0; }
.leaflet-control-attribution a { color: var(--ink2) !important; }
.map-search { position: absolute; top: calc(12px + var(--sat)); left: 12px; right: 72px; z-index: 700; max-width: 520px; }
.search-results { list-style: none; margin: 8px 0 0; padding: 6px; background: rgba(var(--glass), .96); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, calc(.5 * var(--shadow))); max-height: 50vh; overflow: auto; }
.search-results button { display: grid; width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 10px; min-height: 48px; }
.search-results button:hover, .search-results button:focus { background: var(--s2); outline: none; }
.search-results small { color: var(--ink2); }
.search-results li.note, .search-results li.error { padding: 12px; }
.map-tools { position: absolute; right: 12px; top: calc(12px + var(--sat)); z-index: 600; display: grid; gap: 10px; }
.fab { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: rgba(var(--glass), .86); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); color: var(--ink); box-shadow: 0 6px 24px rgba(0, 0, 0, calc(.4 * var(--shadow))); }
.fab.on { color: var(--accent); }
.map-banner { position: absolute; left: 12px; right: 72px; top: calc(68px + var(--sat)); z-index: 600; max-width: 520px; background: rgba(255, 179, 64, .14); color: var(--amber-ink); border: 1px solid rgba(255, 179, 64, .3); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-radius: 12px; padding: 9px 12px; font-size: 13px; }
.map-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 550; padding: 0 12px 14px; display: grid; gap: 10px; pointer-events: none; }
.map-bottom > * { pointer-events: auto; }
.here-card { max-width: 440px; background: rgba(var(--glass), .9); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; display: grid; gap: 8px; box-shadow: 0 10px 40px rgba(0, 0, 0, calc(.45 * var(--shadow))); }
.here-card .lbl { font-size: 12px; font-weight: 600; color: var(--ink2); }
.here-card b { font-size: 17px; }
.here-card .row { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.pulse { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(48, 209, 88, .6); animation: pulse 1.8s infinite; margin-right: 8px; vertical-align: 1px; }
.pulse.wait { background: var(--amber); box-shadow: 0 0 0 0 rgba(255, 179, 64, .6); }
.pulse.bad { background: var(--red); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(0, 0, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); } }
.nearby-strip { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; }
.nearby-strip::-webkit-scrollbar { display: none; }
.nearby-strip:empty { display: none; }
.net { scroll-snap-align: start; flex: none; width: 220px; background: rgba(var(--glass), .9); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; text-align: left; display: grid; gap: 3px; color: var(--ink); }
.net:hover { border-color: var(--line2); }
.net .row { display: flex; gap: 8px; align-items: center; }
.net b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.net small { color: var(--ink2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pin { --c: #4d5563; position: relative; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--c); border: 2px solid rgba(255, 255, 255, .9); box-shadow: 0 2px 10px rgba(0, 0, 0, calc(.6 * var(--shadow))); color: #fff; font: 700 12px/1 system-ui, sans-serif; }
.pin i { font-style: normal; }
.pin.grp { --c: var(--orange); }
.pin.spot { --c: var(--violet); }
.pin.in { box-shadow: 0 0 0 4px rgba(48, 209, 88, .45), 0 2px 10px rgba(0, 0, 0, calc(.6 * var(--shadow))); }
.pin .cnt { position: absolute; top: -7px; right: -9px; background: var(--accent); color: #fff; border-radius: 9px; font-size: 10px; padding: 2px 5px; border: 2px solid var(--mapbg); }
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 0 0 8px rgba(47, 139, 255, .22), 0 2px 6px rgba(0, 0, 0, calc(.5 * var(--shadow))); }
.leaflet-top.leaflet-right { top: calc(170px + var(--sat)); right: 5px; }
@media (pointer: coarse) { .leaflet-control-zoom { display: none; } } /* phones pinch to zoom */

/* sheets (place sheet + modal) */
.sheet { position: absolute; left: 12px; bottom: 12px; z-index: 800; width: min(440px, calc(100% - 24px)); max-height: calc(100% - 90px - var(--sat)); overflow: auto;
  background: rgba(var(--glass), .97); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, calc(.6 * var(--shadow))); animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 14px 10px 8px 18px; background: inherit; }
.sheet-head b { flex: 1; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grabber { display: none; }
.sheet-body { padding: 0 18px 18px; display: grid; gap: 12px; }
.place-addr { color: var(--ink2); margin: 0; font-size: 14px; }
.netlist { list-style: none; margin: 0; padding: 0; background: var(--s2); border-radius: 14px; overflow: hidden; }
.netrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; }
.netrow + .netrow { border-top: 1px solid var(--line); }
.netrow .nm { display: grid; gap: 2px; }
.netrow .nm b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.netrow .nm small { color: var(--ink2); font-size: 13px; }
.sec { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px 2px 6px; border-radius: 8px; white-space: nowrap; }
.sec .ic { width: 13px; height: 13px; }
.sec.open { background: rgba(48, 209, 88, .14); color: var(--green); }
.sec.password { background: rgba(255, 179, 64, .14); color: var(--amber); }
.sec.approval { background: rgba(47, 139, 255, .16); color: var(--accent-ink); }
.sec.invite { background: rgba(176, 124, 255, .16); color: var(--violet); }
.sec.hidden { background: var(--s3); color: var(--ink2); }
.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 15px; width: 21px; flex: none; }
.bars i { display: block; width: 4px; background: var(--s3); border-radius: 1.5px; }
.bars i:nth-child(1) { height: 25%; } .bars i:nth-child(2) { height: 50%; } .bars i:nth-child(3) { height: 75%; } .bars i:nth-child(4) { height: 100%; }
.bars[data-n="1"] i:nth-child(-n+1), .bars[data-n="2"] i:nth-child(-n+2), .bars[data-n="3"] i:nth-child(-n+3), .bars[data-n="4"] i:nth-child(-n+4) { background: var(--ink); }
.bars[data-n="4"] i { background: var(--green); }

/* ---------- conversation ---------- */
.nav { flex: none; display: flex; align-items: center; gap: 10px; min-height: 60px; padding: calc(8px + var(--sat)) 8px 8px 12px; background: rgba(var(--glass), .92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--line); z-index: 5; }
.nav .back { display: none; color: var(--accent); }
.nav .back .ic { width: 28px; height: 28px; }
.nav-title { flex: 1; display: grid; line-height: 1.2; }
.nav-title b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-title small { color: var(--ink2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toolbar { flex: none; display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); background: var(--bg2); }
.toolbar::-webkit-scrollbar { display: none; }
.toolbar:empty { display: none; }
.tool { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 18px; background: var(--s2); color: var(--ink); padding: 0 13px 0 10px; min-height: 34px; font-size: 13px; font-weight: 600; }
.tool:hover { background: var(--s3); }
.tool .ic { width: 16px; height: 16px; color: var(--accent); }
.tool.danger .ic { color: var(--red); }
.chips { flex: none; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--ink2); background: var(--bg2); }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--s2); border: 0; border-radius: 16px; padding: 3px 10px 3px 3px; min-height: 30px; font-size: 13px; color: var(--ink); }
.chip .avatar { width: 24px; height: 24px; font-size: 10px; }
.chip .avatar::after { border-width: 2px; min-width: 8px; min-height: 8px; }
.msgs { flex: 1; overflow: auto; list-style: none; margin: 0; padding: 14px 12px 6px; display: flex; flex-direction: column; gap: 2px; overscroll-behavior: contain; }
.msg { display: flex; align-items: flex-end; gap: 8px; margin-top: 8px; max-width: 100%; }
.msg.cont { margin-top: 0; }
.msg.mine { justify-content: flex-end; }
.msg .avatar.xs::after { display: none; }
.av-gap { width: 28px; flex: none; }
.bubble { position: relative; max-width: min(78%, 560px); background: var(--s2); border-radius: 20px; padding: 8px 12px 6px; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg:not(.mine) .bubble { border-bottom-left-radius: 6px; cursor: pointer; }
.msg.mine .bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.msg.cont:not(.mine) .bubble { border-top-left-radius: 8px; }
.msg.cont.mine .bubble { border-top-right-radius: 8px; }
.bubble .who { display: block; font-size: 12px; font-weight: 700; margin-bottom: 1px; white-space: normal; }
.bubble time { float: right; margin: 6px 0 -2px 10px; font-size: 11px; color: var(--ink3); white-space: nowrap; }
.msg.mine .bubble time { color: rgba(255, 255, 255, .7); }
.msg.locked .bubble { background: transparent; border: 1px dashed var(--line2); color: var(--ink2); font-style: italic; }
.msg.sys { justify-content: center; margin: 10px 0; }
.msg.sys span { background: var(--s1); color: var(--ink2); font-size: 12px; padding: 5px 12px; border-radius: 12px; text-align: center; max-width: 85%; }
.msg.nudge span { background: rgba(255, 138, 61, .16); color: var(--orange); font-weight: 600; }
.typing { flex: none; min-height: 18px; padding: 0 18px; font-size: 12px; color: var(--ink2); }
.statusbar { flex: none; font-size: 11px; color: var(--ink3); padding: 2px 16px 4px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer { flex: none; display: flex; gap: 6px; align-items: flex-end; padding: 8px 10px calc(8px + var(--sab)); background: rgba(var(--glass), .94); border-top: 1px solid var(--line); }
.composer textarea { flex: 1; min-height: 40px; max-height: 140px; border-radius: 20px; padding: 9px 14px; line-height: 1.35; background: var(--s2); }
.send { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: var(--accent); color: #fff; transition: transform .1s, opacity .15s; }
.send:disabled { opacity: .35; }
.send:active { transform: scale(.92); }
.send .ic { width: 20px; height: 20px; stroke-width: 2.5; }
.emo-wrap { position: relative; }
.emo-pop { position: absolute; bottom: 50px; left: 0; z-index: 20; display: grid; grid-template-columns: repeat(6, 42px); gap: 2px; background: var(--s1); border: 1px solid var(--line); border-radius: 16px; padding: 8px; box-shadow: 0 16px 50px rgba(0, 0, 0, calc(.6 * var(--shadow))); }
.emo-pop button { border: 0; background: none; font-size: 24px; height: 42px; border-radius: 10px; }
.emo-pop button:hover { background: var(--s2); }
.shake { animation: shake .5s 2; }
@keyframes shake { 0%, 100% { transform: translate(0); } 20% { transform: translate(-8px, 3px); } 40% { transform: translate(7px, -4px); } 60% { transform: translate(-5px, -2px); } 80% { transform: translate(6px, 2px); } }

/* ---------- settings ---------- */
.me-body { flex: 1; overflow: auto; padding: 18px 16px calc(24px + var(--sab)); display: grid; gap: 26px; align-content: start; justify-items: center; }
.me-body section { display: grid; gap: 12px; width: min(600px, 100%); background: var(--s1); border-radius: 18px; padding: 16px; }
.me-body section:first-child { background: none; padding: 0; }
.me-body .item::after { display: none; }
.me-body h3 { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink2); }
.group-box { background: var(--s1); border-radius: 16px; padding: 14px; display: grid; gap: 12px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 36px; height: 36px; border-radius: 50%; border: 0; box-shadow: inset 0 0 0 2px var(--line2); }
.swatch.on { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ink); }

/* ---------- modal: bottom sheet on phones, dialog on desktop ---------- */
.modal-back { position: fixed; inset: 0; z-index: 2550; background: rgba(0, 0, 0, .55); display: grid; place-items: center; padding: 20px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(480px, 100%); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; background: var(--s1); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, calc(.6 * var(--shadow))); overflow: hidden; animation: up .22s ease-out; }
.modal-body { padding: 4px 18px 20px; overflow: auto; display: grid; gap: 14px; }
.modal-body h4 { margin: 6px 0 0; font-size: 13px; font-weight: 600; color: var(--ink2); }
.modal-body .item { padding-left: 0; padding-right: 0; }
.modal-body .item::after { left: 56px; }
.radio-cards { display: grid; gap: 1px; background: var(--line); border-radius: 14px; overflow: hidden; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: var(--s2); font-weight: 400; color: var(--ink); cursor: pointer; font-size: 15px; }
.radio-card:has(input:checked) { background: rgba(47, 139, 255, .14); }
.radio-card input { width: 20px; min-height: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.radio-card b { font-weight: 600; }
.radio-card small { display: block; color: var(--ink2); font-size: 13px; }
.code-box { font: 600 19px/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace; text-align: center; background: var(--s2); border-radius: 14px; padding: 14px; word-spacing: .35em; }
.copy-row { display: flex; gap: 6px; }
.copy-row input { font-size: 14px; }
details summary { cursor: pointer; font-weight: 600; color: var(--accent); list-style: none; padding: 6px 0; }
details summary::-webkit-details-marker { display: none; }
blockquote { margin: 0; padding: 10px 12px; background: var(--s2); border-radius: 12px; }

/* toasts */
.toasts { position: fixed; left: 12px; right: 12px; margin: 0 auto; top: calc(12px + var(--sat)); z-index: 3000; display: grid; gap: 8px; max-width: 420px; pointer-events: none; }
@media (min-width: 900px) { .toasts { left: auto; right: 16px; top: 74px; width: 380px; margin: 0; } }
.toast { pointer-events: auto; display: grid; gap: 2px; background: rgba(var(--glass2), .96); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid var(--line); border-radius: 16px; padding: 11px 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, calc(.55 * var(--shadow))); animation: drop .25s ease-out; }
.toast b { font-size: 13px; color: var(--ink2); font-weight: 600; }
.toast p { margin: 0; font-size: 14px; }
@keyframes drop { from { transform: translateY(-16px); opacity: 0; } }

/* ---------- calls ---------- */
.call { position: fixed; inset: 0; z-index: 2500; background: radial-gradient(900px 600px at 50% 20%, #1b2a44, #07080a); }
#remote-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.call-face { position: absolute; inset: 0; display: grid; place-items: center; }
.call-face .avatar { width: 132px; height: 132px; font-size: 48px; }
.call-face .avatar::after { display: none; }
#local-video { position: absolute; right: 14px; top: calc(80px + var(--sat)); width: min(28vw, 180px); aspect-ratio: 3/4; object-fit: cover; border-radius: 16px; background: #000; transform: scaleX(-1); box-shadow: 0 10px 30px rgba(0, 0, 0, calc(.5 * var(--shadow))); }
.call-top { position: absolute; top: 0; left: 0; right: 0; padding: calc(18px + var(--sat)) 20px 30px; display: grid; justify-items: center; gap: 4px; text-align: center; background: linear-gradient(rgba(0, 0, 0, .55), transparent); }
.call-top b { font-size: 24px; }
.call-top #call-state { color: var(--ink2); font-variant-numeric: tabular-nums; }
.call-top .lock { display: inline-flex; gap: 5px; align-items: center; font-size: 12px; color: var(--ink3); }
.call-top .lock .ic { width: 13px; height: 13px; }
.call-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 22px; padding: 26px 16px calc(30px + var(--sab)); background: linear-gradient(transparent, rgba(0, 0, 0, .6)); }
.cbtn { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: #fff; }
.cbtn .ic { width: 26px; height: 26px; }
.cbtn .off-ic { display: none; }
.cbtn.off { background: #fff; color: #111; }
.cbtn.off .on-ic { display: none; }
.cbtn.off .off-ic { display: block; }
.cbtn.end { background: var(--red); }
.incoming { position: fixed; left: 10px; right: 10px; margin: 0 auto; top: calc(10px + var(--sat)); z-index: 2600; max-width: 440px; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px;
  background: rgba(var(--glass2), .97); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 16px 50px rgba(0, 0, 0, calc(.6 * var(--shadow))); animation: drop .25s ease-out; }
.incoming .avatar::after { display: none; }
.inc-text { flex: 1; display: grid; }
.inc-text p { margin: 0; color: var(--ink2); font-size: 13px; }
.round-btn { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border: 0; border-radius: 50%; color: #fff; }
.round-btn.accept { background: var(--green); }
.round-btn.decline { background: var(--red); }

/* ---------- phones ---------- */
@media (max-width: 899px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; padding-bottom: var(--tabbar); }
  .app[data-screen=list] .side { display: flex; }
  .app[data-screen=list] .main { display: none; }
  /* the map runs under the translucent tab bar; everything tappable sits above it */
  .map-bottom { bottom: var(--tabbar); }
  .leaflet-bottom { bottom: var(--tabbar); }
  .sheet { bottom: var(--tabbar) !important; max-height: calc(100% - var(--tabbar) - 70px - var(--sat)) !important; }
  .me-body { padding-bottom: calc(24px + var(--tabbar)); }
  .desk-only { display: none; }
  .nav .back { display: inline-grid; margin-left: -6px; }
  .side-head { padding-top: 10px; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1500; height: var(--tabbar); padding-bottom: var(--sab);
    background: rgba(var(--glass), .9); backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5); border-top: 1px solid var(--line); }
  .app[data-screen=chat] .tabbar { display: none; }
  .tabbar button { position: relative; flex: 1; display: grid; justify-items: center; align-content: center; gap: 2px; border: 0; background: none; color: var(--ink3); font-size: 11px; font-weight: 600; }
  .tabbar button.on { color: var(--accent); }
  .tabbar .ic { width: 24px; height: 24px; }
  .tabbar .dot { position: absolute; top: 7px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
  .map-search { right: 70px; }
  .here-card { max-width: none; }
  .net { width: 72vw; }
  .sheet { left: 0; right: 0; bottom: 0; width: 100%; max-height: 78%; border-radius: 22px 22px 0 0; border-bottom: 0; }
  .grabber { display: block; position: absolute; top: 6px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 3px; background: var(--s3); }
  .modal-back { place-items: end stretch; padding: 0; }
  .modal { width: 100%; max-height: 90dvh; border-radius: 22px 22px 0 0; border-bottom: 0; padding-bottom: var(--sab); }
  .bubble { max-width: 80%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- search mode ---------- */
.seg.mini { display: inline-flex; margin: 8px 0 0; padding: 3px; background: rgba(var(--glass), .86); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line); border-radius: 12px; }
.seg.mini .seg-btn { min-height: 30px; padding: 0 14px; flex: none; font-size: 13px; }
.map-search .map-banner { position: static; display: block; margin-top: 8px; }

/* ---------- item results ---------- */
.ires-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ires-tools select { width: auto; min-height: 36px; height: 36px; padding: 0 30px 0 12px; font-size: 14px; border-radius: 10px; }
.ires-tools .icon-btn { width: 36px; height: 36px; background: var(--s2); }
.ires { list-style: none; margin: 0; padding: 0; background: var(--s2); border-radius: 14px; overflow: hidden; }
.ires li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.ires li + li { border-top: 1px solid var(--line); }
.ires .pick { width: 22px; height: 22px; min-height: 22px; flex: none; accent-color: var(--accent); margin: 0; }
.ires .body { flex: 1; display: grid; gap: 2px; text-align: left; border: 0; background: none; padding: 0; color: var(--ink); }
.ires .top { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; }
.ires .top b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ires .price { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ires small { color: var(--ink2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attr-row { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.attr { font-size: 11px; padding: 1px 7px; border-radius: 7px; background: var(--s3); color: var(--ink2); white-space: nowrap; }
.attr.key { background: rgba(47, 139, 255, .18); color: var(--accent-ink); }
.sheet-foot { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 10px 18px calc(12px + var(--sab)); background: inherit; border-top: 1px solid var(--line); }
.sheet-foot .btn { flex: 1; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.kv dt { color: var(--ink2); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.action-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 8px; }
.action-grid .btn { justify-content: flex-start; padding: 0 14px; white-space: nowrap; min-width: 0; }
.action-grid .btn > :not(.ic) { overflow: hidden; text-overflow: ellipsis; }
.compare-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
table.compare { border-collapse: collapse; font-size: 14px; min-width: 100%; }
table.compare th, table.compare td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; min-width: 130px; }
table.compare th { position: sticky; left: 0; background: var(--s1); color: var(--ink2); font-weight: 600; min-width: 96px; z-index: 1; }
table.compare td.best { color: var(--green); font-weight: 700; }
table.compare td.num { font-variant-numeric: tabular-nums; }

/* ---------- AR ---------- */
.ar { position: fixed; inset: 0; z-index: 2400; background: #000; overflow: hidden; touch-action: none; }
#ar-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ar-shade { position: absolute; inset: 0; background: linear-gradient(rgba(0, 0, 0, .55), transparent 22%, transparent 70%, rgba(0, 0, 0, .55)); pointer-events: none; }
.ar.radar-mode { background: radial-gradient(900px 700px at 50% 45%, #13213a, #07080a); }
.ar.radar-mode #ar-video, .ar.radar-mode .ar-shade { display: none; }
.ar-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--sat)) 12px 10px; }
.ar-top .icon-btn { background: rgba(0, 0, 0, .45); color: #fff; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.ar-title { flex: 1; display: grid; line-height: 1.2; text-shadow: 0 1px 4px rgba(0, 0, 0, .7); }
.ar-title b { font-size: 16px; }
.ar-title small { color: rgba(255, 255, 255, .75); font-size: 12px; }
.ar-compass { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 16px; background: rgba(0, 0, 0, .45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ar-compass .ic { width: 16px; height: 16px; }
.ar-labels { position: absolute; inset: 0; }
.ar-label { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); display: grid; justify-items: center; gap: 4px; border: 0; padding: 0; background: none; color: #fff; will-change: transform; }
.ar-label .tagbox { display: grid; gap: 1px; max-width: 200px; padding: 8px 12px; border-radius: 14px; background: rgba(var(--glass), .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, .14); text-align: left; box-shadow: 0 8px 24px rgba(0, 0, 0, calc(.4 * var(--shadow))); }
.ar-label b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-label small { font-size: 12px; color: rgba(255, 255, 255, .75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-label .stem { width: 2px; height: 18px; background: linear-gradient(rgba(255, 255, 255, .8), rgba(255, 255, 255, 0)); }
.ar-label.near .tagbox { border-color: rgba(48, 209, 88, .7); }
.ar-label.sel .tagbox { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 139, 255, .35); }
.ar-edge { position: absolute; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-radius: 16px; background: rgba(0, 0, 0, .5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: 12px; font-weight: 700; }
.ar-edge.left { left: 8px; } .ar-edge.right { right: 8px; }
.ar-hint { position: absolute; left: 50%; top: calc(76px + var(--sat)); transform: translateX(-50%); max-width: calc(100% - 32px); padding: 8px 14px; border-radius: 14px; background: rgba(0, 0, 0, .6); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: 13px; text-align: center; }
.ar-radar { position: absolute; left: 50%; top: 48%; width: min(86vw, 62vh, 520px); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 139, 255, .10) 0 1px, transparent 1px) 0 0 / 100% 100%, repeating-radial-gradient(circle, transparent 0 calc(25% - 1px), rgba(255, 255, 255, .10) calc(25% - 1px) 25%); border: 1px solid rgba(255, 255, 255, .16); }
.ar-radar .me { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; box-shadow: 0 0 0 8px rgba(47, 139, 255, .25); }
.ar-radar .north { position: absolute; left: 50%; top: -22px; transform: translateX(-50%); font-size: 12px; font-weight: 700; color: var(--red); }
.ar-radar .rlbl { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 3px; border: 0; background: none; color: #fff; padding: 0; }
.ar-radar .rlbl i { width: 12px; height: 12px; border-radius: 50%; background: var(--orange); border: 2px solid #fff; }
.ar-radar .rlbl.near i { background: var(--green); }
.ar-radar .rlbl.sel i { background: var(--accent); box-shadow: 0 0 0 5px rgba(47, 139, 255, .35); }
.ar-radar .rlbl span { font-size: 11px; font-weight: 600; white-space: nowrap; max-width: 170px; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 3px #000; }
.ar-guide { position: absolute; left: 12px; right: 12px; bottom: calc(14px + var(--sab)); margin: 0 auto; max-width: 460px; display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 22px; background: rgba(var(--glass), .86); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, .14); }
.ar-arrow { display: grid; place-items: center; width: 64px; height: 64px; flex: none; border-radius: 50%; background: var(--accent); color: #fff; transition: transform .15s linear; }
.ar-arrow .ic { width: 34px; height: 34px; fill: #fff; }
.ar-arrow.here { background: var(--green); }
.ar-guide-text { flex: 1; display: grid; }
.ar-guide-text b { font-size: 20px; font-variant-numeric: tabular-nums; }
.ar-guide-text small { color: var(--ink2); font-size: 14px; }
.ar-card { position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 520px; max-height: 70%; overflow: auto; background: rgba(var(--glass), .97); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0; padding-bottom: var(--sab); animation: up .22s ease-out; }
.ar-guide:not([hidden]) ~ .ar-card { bottom: calc(110px + var(--sab)); border-radius: 22px; border-bottom: 1px solid var(--line); }
.ar-list { list-style: none; margin: 0; padding: 0; }
@media (min-width: 900px) { .ar-card { bottom: 16px; border-radius: 22px; border-bottom: 1px solid var(--line); } }

/* ---------- items shown inline + AR focus panel ---------- */
.items-live { display: grid; gap: 8px; }
.items-h { margin: 4px 0 0; font-size: 13px; font-weight: 600; color: var(--ink2); }
.ires li.hl { background: rgba(47, 139, 255, .14); }
.ires.compact li, .items-live.compact .ires li { padding: 8px 12px; }
.netrow button.nm { border: 0; background: none; padding: 0; text-align: left; color: var(--ink); display: grid; gap: 2px; cursor: pointer; }
.netrow button.nm:hover b { color: var(--accent); }
.ar-focus { position: absolute; left: 10px; right: 10px; bottom: calc(12px + var(--sab)); margin: 0 auto; max-width: 460px; max-height: 42%; overflow: auto; display: grid; gap: 8px; padding: 12px;
  background: rgba(var(--glass), .86); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, .14); border-radius: 20px; animation: up .2s ease-out; }
.focus-head { display: flex; align-items: center; gap: 10px; border: 0; background: none; color: var(--ink); padding: 2px 4px; text-align: left; }
.focus-head .who { flex: 1; display: grid; }
.focus-head b { font-size: 16px; }
.focus-head small { color: var(--ink2); font-size: 13px; }
.ar-focus .ires { background: rgba(255, 255, 255, .06); }

.tag.cat { background: rgba(47, 139, 255, .16); color: var(--accent-ink); }
.ar-label .tagbox .cat { font-style: normal; font-size: 10px; font-weight: 700; color: var(--accent-ink); text-transform: none; }

/* ---------- reviews ---------- */
.stars { color: var(--star); letter-spacing: 1px; white-space: nowrap; }
.stars.dim { color: var(--ink3); }
.rating-line { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; border-radius: 12px; background: var(--s2); padding: 10px 12px; color: var(--ink); text-align: left; min-height: 44px; }
.rating-line:hover { background: var(--s3); }
.rating-line b { font-variant-numeric: tabular-nums; }
.rating-line .note { flex: 1; }
.rating-line .ic { width: 18px; height: 18px; color: var(--ink3); }
small.rate { color: var(--star) !important; }
.rev-summary.solo { grid-template-columns: 1fr; }
.rev-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; background: var(--s2); border-radius: 16px; padding: 14px 16px; }
.rev-big { display: grid; justify-items: center; gap: 2px; }
.rev-big b { font-size: 36px; line-height: 1; font-variant-numeric: tabular-nums; }
.rev-bars { display: grid; gap: 4px; }
.rev-bar { display: grid; grid-template-columns: 12px minmax(0, 1fr) 28px; gap: 8px; align-items: center; font-size: 12px; color: var(--ink2); }
.rev-bar > i { display: block; height: 7px; border-radius: 4px; background: var(--s3); overflow: hidden; }
.rev-bar > i > i { display: block; height: 100%; background: var(--star); border-radius: 4px; }
.rev-bar small { text-align: right; font-variant-numeric: tabular-nums; }
.rev-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rev-list li { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.rev-head { display: flex; align-items: center; gap: 10px; }
.rev-head .who { flex: 1; display: grid; }
.rev-head small { color: var(--ink2); font-size: 12px; }
.rev-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.rev-reply { background: var(--s2); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.rev-reply b { font-size: 12px; color: var(--ink2); }
.rev-reply p { margin: 2px 0 0; }
.star-pick { display: flex; gap: 6px; justify-content: center; }
.star-pick button { border: 0; background: none; font-size: 38px; line-height: 1; color: var(--ink3); width: 48px; height: 52px; border-radius: 10px; }
.star-pick button.on { color: var(--star); }
.star-pick button:hover { background: var(--s2); }

/* ---------- business claims ---------- */
.claim { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: var(--s2); }
.claim p { margin: 0; }
.tag.verified { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }

/* ---------- appearance picker ---------- */
.appear-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: var(--s2); }
.appear-seg button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; border: 0; border-radius: 9px; background: none; color: var(--ink2); font-weight: 600; }
.appear-seg button .ic { width: 17px; height: 17px; }
.appear-seg button.on { background: var(--s1); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, calc(.3 * var(--shadow))); }

/* ---------- merchace type: Space Grotesk for headings ---------- */
h1, h2, h3, .auth h1, .sheet-head b, #chat-title, #modal-title, .here-card b, .modal-head h2, .modal-head b, .here-card .place-name, .ar-title b, .rev-big b { font-family: var(--display); letter-spacing: -.01em; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 0; font-size: 14px; }
.auth-links a { color: var(--accent); text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }

/* ---------- location check in progress ---------- */
.here-wait { display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 10%, var(--s2)); color: var(--ink); }
.here-wait-top { display: flex; align-items: center; gap: 8px; }
.here-wait-top b { flex: 1; font-weight: 600; }
.here-wait-top span { font-variant-numeric: tabular-nums; color: var(--ink2); }
.here-wait-top .ic { width: 18px; height: 18px; color: var(--accent); animation: herePulse 1.4s ease-in-out infinite; }
.here-wait-bar { height: 6px; border-radius: 999px; background: var(--s3); overflow: hidden; }
.here-wait-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--accent); transition: width .2s linear; }
.here-wait small { color: var(--ink2); }
@keyframes herePulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .here-wait-top .ic { animation: none; } .here-wait-bar i { transition: none; } }

/* ---------- Places logo in the map search bar (phones) ---------- */
.search-logo { display: none; flex: none; border-radius: 7px; }
@media (max-width: 899px) {
  .search-field.glass .search-logo { display: block; }
  .search-field.glass .search-ic { display: none; }
}
.auth-logo { box-shadow: 0 8px 30px rgba(38, 103, 220, calc(.25 * var(--shadow))); border-radius: 22%; }

/* ---------- browsing as a guest ---------- */
.auth-close { position: absolute; top: calc(12px + var(--sat)); right: 12px; z-index: 2; }
.guest-signin { display: none; }
body.guest .guest-signin { display: inline-flex; }
body.guest .side-head .me-status, body.guest #me-status, body.guest #me-psm, body.guest #open-me, body.guest .side-head .icon-btn:not(.guest-signin):not(.site-btn) { display: none; }

.auth { z-index: 3000; }
#auth-error.hint { color: var(--ink2); }

/* ---------- links back to merchace.com ---------- */
.search-logo-link { display: none; flex: none; }
@media (max-width: 899px) { .search-field.glass .search-logo-link { display: block; } }
.site-btn { color: inherit; text-decoration: none; }
.back-link { display: block; width: fit-content; margin: 18px auto 0; color: var(--ink2); font-size: 14px; text-decoration: none; }
.back-link:hover { color: var(--accent); text-decoration: underline; }
body.guest #me-avatar, body.guest .me-line, body.guest #me-name { display: none; }
body.guest .side-head { justify-content: space-between; }
