/* Pinsake: flat UI, hairline borders, one accent. Light and dark via prefers-color-scheme or [data-theme]. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/vendor/fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/vendor/fonts/inter-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --bg: #ffffff;
  --bg-2: #f5f6f7;
  --bg-3: #eceef0;
  --bg-hover: #f1f2f4;
  --line: #e2e4e8;
  --line-2: #cfd3d9;
  --text: #15171a;
  --text-2: #565c66;
  --text-3: #868c96;
  --accent: #0f7b63;
  --accent-hover: #0b6853;
  --accent-soft: #e4f2ee;
  --accent-text: #0c6b56;
  --on-accent: #ffffff;
  --danger: #d1343a;
  --danger-soft: #fdecec;
  --warn: #b26b00;
  --focus: 0 0 0 3px rgba(15, 123, 99, 0.28);
  --shadow-1: 0 1px 2px rgba(16, 18, 22, 0.10), 0 1px 1px rgba(16, 18, 22, 0.04);
  --shadow-2: 0 2px 6px rgba(16, 18, 22, 0.10), 0 8px 24px rgba(16, 18, 22, 0.10);
  --shadow-3: 0 12px 40px rgba(16, 18, 22, 0.20), 0 2px 8px rgba(16, 18, 22, 0.10);
  --scrim: rgba(12, 14, 17, 0.42);
  --r: 10px;
  --r-sm: 7px;
  --side-w: 372px;
  --panel-w: 392px;
  --top-safe: env(safe-area-inset-top, 0px);
  --bottom-safe: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
:root[data-theme='dark'] {
  --bg: #17191c;
  --bg-2: #1f2125;
  --bg-3: #282b30;
  --bg-hover: #23262a;
  --line: #2d3036;
  --line-2: #3b3f46;
  --text: #eceef1;
  --text-2: #a6acb5;
  --text-3: #767d87;
  --accent: #33bb8b;
  --accent-hover: #45c99a;
  --accent-soft: #15322a;
  --accent-text: #5fd3a8;
  --on-accent: #062219;
  --danger: #f0565c;
  --danger-soft: #3a1c1e;
  --warn: #e3a33a;
  --focus: 0 0 0 3px rgba(51, 187, 139, 0.35);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-3: 0 12px 40px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.4);
  --scrim: rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg-2);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  overscroll-behavior: none;
  font-feature-settings: 'cv11', 'ss01';
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--focus); }
::selection { background: var(--accent-soft); }

.i { width: 18px; height: 18px; flex: none; display: block; }
.i-sm { width: 16px; height: 16px; }
.i-xs { width: 14px; height: 14px; }
.i-lg { width: 22px; height: 22px; }

/* ---------- buttons and fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: var(--r-sm);
  font-weight: 550; font-size: 14px; white-space: nowrap;
  border: 1px solid var(--line-2); background: var(--bg); color: var(--text);
  transition: background-color .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--bg-hover); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--bg-hover); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: transparent; }
.btn.danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.block { width: 100%; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; gap: 6px; }
.btn.lg { height: 44px; font-size: 15px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: var(--r-sm); display: inline-grid; place-items: center;
  color: var(--text-2); flex: none;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text); }
.icon-btn.sm { width: 28px; height: 28px; }
.icon-btn.on { color: var(--accent-text); }

.field { display: grid; gap: 6px; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 11px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--bg); color: var(--text);
  transition: border-color .12s, box-shadow .12s;
}
.textarea { height: auto; min-height: 96px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23868c96' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
.hint { font-size: 12.5px; color: var(--text-3); }
.err { font-size: 13px; color: var(--danger); }
.row { display: flex; align-items: center; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kbd { font: 600 11px var(--font); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--text-2); background: var(--bg-2); }
.divider { height: 1px; background: var(--line); margin: 6px 0; }

/* ---------- logo ---------- */
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16.5px; letter-spacing: -0.01em; color: var(--text); }
.logo-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); display: grid; place-items: center; color: var(--on-accent); }
.logo-mark svg { width: 16px; height: 16px; }

/* ---------- shell ---------- */
#space { position: fixed; inset: 0; left: var(--side-w); background: #e2e6ea; overflow: hidden; }
:root[data-theme='dark'] #space { background: #1b1e22; }
#space::before { content: ""; position: absolute; inset: 0; opacity: var(--space, 0); background: radial-gradient(120% 90% at 50% 45%, #15295a 0%, #0b1736 40%, #060b1c 75%, #03060f 100%); }
#space canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: var(--space, 0); }
#map { position: fixed; inset: 0; left: var(--side-w); background: transparent; }
body.auth #map, body.auth #space, body.share-mode.no-side #map { left: 0; }

#topbar {
  position: fixed; z-index: 30; left: 0; top: 0; width: var(--side-w);
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'brand acct' 'search search';
  gap: 10px 8px; padding: 12px 14px 12px; background: var(--bg); border-right: 1px solid var(--line);
}
#topbar .brand { grid-area: brand; display: flex; align-items: center; gap: 10px; min-width: 0; height: 34px; }
#topbar .acct { grid-area: acct; display: flex; align-items: center; gap: 4px; }
#topbar .search { grid-area: search; }

#side {
  position: fixed; z-index: 20; left: 0; top: 108px; bottom: 0; width: var(--side-w);
  background: var(--bg); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; min-height: 0;
}
body.auth #topbar, body.auth #side, body.auth .map-ui { display: none; }

.sync { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.sync.warn { color: var(--warn); }
.sync .i { width: 15px; height: 15px; }

.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-3); color: var(--text); font-weight: 650; font-size: 13px; border: 1px solid var(--line);
}
.avatar:hover { border-color: var(--line-2); }

/* ---------- search ---------- */
.search { position: relative; }
.search-box {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 6px 0 11px;
  border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); transition: border-color .12s, box-shadow .12s, background-color .12s;
}
.search-box:focus-within { background: var(--bg); border-color: var(--accent); box-shadow: var(--focus); }
.search-box .i { color: var(--text-3); }
.search-box input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none; font-size: 14.5px; }
.search-box input::placeholder { color: var(--text-3); }
.search-box input:focus-visible { box-shadow: none; }
.search-box input::-webkit-search-cancel-button, .search-box input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 50; max-height: min(64vh, 560px); overflow: auto;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-2); padding: 6px;
}
.sr-head { font-size: 11.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); padding: 8px 8px 4px; }
.sr-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 7px 8px; border-radius: var(--r-sm); }
.sr-item:hover, .sr-item.active { background: var(--bg-hover); }
.sr-item .sr-ic { width: 30px; height: 30px; border-radius: 8px; background: var(--bg-3); display: grid; place-items: center; color: var(--text-2); flex: none; }
.sr-item .sr-t { font-weight: 550; }
.sr-item .sr-s { font-size: 12.5px; color: var(--text-3); }
.sr-empty { padding: 14px 10px; color: var(--text-3); font-size: 13px; }

/* ---------- sidebar content ---------- */
.side-actions { display: flex; gap: 8px; padding: 0 14px 12px; border-bottom: 1px solid var(--line); }
.side-actions .btn.primary { flex: 1; }
.side-scroll { flex: 1; overflow: auto; min-height: 0; padding: 8px 8px 16px; }
.side-head { display: flex; align-items: center; gap: 6px; padding: 8px 8px 6px 10px; }
.side-head h2 { margin: 0; font-size: 12px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); flex: 1; }
.side-foot { border-top: 1px solid var(--line); padding: 10px 14px calc(10px + var(--bottom-safe)); display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.side-foot .meter { width: 40px; }
.side-foot { gap: 8px; padding-right: 8px; }
.side-foot .btn.ghost { padding: 0 8px; }
.meter { height: 4px; border-radius: 4px; background: var(--bg-3); overflow: hidden; width: 70px; flex: none; }
.meter > i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

.list { border-radius: var(--r); }
.list + .list { margin-top: 2px; }
.list-row { display: flex; align-items: center; gap: 4px; padding: 3px 4px 3px 2px; border-radius: var(--r-sm); min-height: 40px; }
.list-row:hover { background: var(--bg-hover); }
.list-row .tw { width: 26px; height: 30px; display: grid; place-items: center; color: var(--text-3); border-radius: 6px; }
.list-row .tw .i { transition: transform .15s; }
.list.open .list-row .tw .i { transform: rotate(90deg); }
.list-row .sw { width: 12px; height: 12px; border-radius: 4px; flex: none; margin-right: 6px; }
.list-row .nm { flex: 1; min-width: 0; font-weight: 600; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 0; }
.list-row .ct { font-size: 12px; color: var(--text-3); min-width: 22px; text-align: right; padding-right: 10px; font-variant-numeric: tabular-nums; }
.list-row .acts { display: none; align-items: center; }
.list-row .icon-btn { width: 30px; height: 30px; }
.list-row:hover .acts, .list-row:focus-within .acts, .list-row.keep .acts { display: flex; }
.list-row:hover .ct, .list-row:focus-within .ct, .list-row.keep .ct { display: none; }
.list.hidden-list .nm, .list.hidden-list .sw { opacity: .45; }
.list-row .shared { color: var(--accent-text); display: inline-flex; margin-left: 6px; vertical-align: -3px; }
@media (hover: none) { .list-row .acts { display: flex; } .list-row .ct { display: none; } }

.pins { padding: 2px 0 6px 0; }
.pin-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 6px 8px 6px 12px; border-radius: var(--r-sm); min-height: 46px; }
.pin-row:hover { background: var(--bg-hover); }
.pin-row.sel { background: var(--accent-soft); }
.pin-row .pbox { width: 38px; height: 38px; border-radius: 8px; background: var(--bg-2); display: grid; place-items: center; flex: none; }
.pin-row .pt { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pin-row .ps { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pin-row .thumb { width: 38px; height: 38px; border-radius: 7px; object-fit: cover; background: var(--bg-3); flex: none; }
.more-row { width: 100%; padding: 8px 12px; text-align: left; font-size: 13px; font-weight: 550; color: var(--accent-text); border-radius: var(--r-sm); }
.more-row:hover { background: var(--bg-hover); }
.empty { text-align: center; padding: 26px 18px; color: var(--text-2); }
.empty .i { width: 28px; height: 28px; margin: 0 auto 10px; color: var(--text-3); }
.empty .et { display: block; color: var(--text); font-size: 14.5px; font-weight: 650; margin-bottom: 4px; }
.empty b { color: var(--text); font-weight: 600; }
.empty p { margin: 0 0 14px; font-size: 13px; }
.pins .empty { padding: 12px 18px 14px; text-align: left; font-size: 13px; color: var(--text-3); }

/* pin glyph used in lists, search and panel */
.glyph { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; font-size: 13px; line-height: 1; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55); }
.glyph.light { color: #15171a; }
.glyph .i { width: 15px; height: 15px; stroke-width: 2.2; }
.glyph.lg { width: 34px; height: 34px; font-size: 17px; }
.glyph.lg .i { width: 19px; height: 19px; }
.glyph .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- map ui ---------- */
.map-ui { position: fixed; z-index: 15; }
.ctrl-stack { top: 12px; right: 12px; display: flex; flex-direction: column; gap: 8px; transition: right .2s; }
body.panel-open .ctrl-stack { right: calc(var(--panel-w) + 24px); }
.ctrl-group { background: var(--bg); border-radius: var(--r); box-shadow: var(--shadow-2); border: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; }
.ctrl-group .cbtn { width: 40px; height: 40px; display: grid; place-items: center; color: var(--text); }
.ctrl-group .cbtn + .cbtn { border-top: 1px solid var(--line); }
.ctrl-group .cbtn:hover { background: var(--bg-hover); }
.ctrl-group .cbtn[aria-disabled="true"] { color: var(--text-3); cursor: default; }
.ctrl-group .cbtn[aria-disabled="true"]:hover { background: none; }
.ctrl-group .cbtn.on { color: var(--accent-text); background: var(--accent-soft); }
.ctrl-group .cbtn.follow { color: var(--on-accent); background: var(--accent); }
.ctrl-group .cbtn.busy .i { animation: spin 1s linear infinite; }
.ctrl-group .cbtn .i { width: 19px; height: 19px; }
.cbtn.compass .i { transition: transform .1s linear; }

.fab {
  right: 16px; bottom: calc(26px + var(--bottom-safe)); display: none;
  height: 52px; padding: 0 20px 0 16px; border-radius: 26px; background: var(--accent); color: var(--on-accent);
  font-weight: 650; font-size: 15px; gap: 8px; align-items: center; box-shadow: var(--shadow-3);
}
.fab .i { width: 22px; height: 22px; }

.hint-pill {
  top: 14px; left: calc(var(--side-w) + (100vw - var(--side-w)) / 2); transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 8px 8px 8px 14px; border-radius: 22px; box-shadow: var(--shadow-2);
  display: flex; align-items: center; gap: 10px; font-weight: 550; font-size: 13.5px; white-space: nowrap;
}
.hint-pill .btn { height: 28px; border-radius: 14px; background: transparent; color: inherit; border-color: color-mix(in srgb, var(--bg) 35%, transparent); }
body.placing .maplibregl-canvas-container { cursor: crosshair; }
body.placing .maplibregl-canvas-container canvas { cursor: crosshair; }

/* pick-a-spot (centre crosshair) */
.picker-pin { position: fixed; z-index: 14; left: calc(var(--side-w) + (100vw - var(--side-w)) / 2); top: 50%; transform: translate(-50%, -100%); pointer-events: none; filter: drop-shadow(0 3px 4px rgba(0,0,0,.35)); }
.picker-pin::after { content: ''; position: absolute; left: 50%; bottom: -4px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: rgba(0,0,0,.35); filter: blur(1px); }
.picker-bar {
  left: calc(var(--side-w) + (100vw - var(--side-w)) / 2); transform: translateX(-50%); bottom: calc(24px + var(--bottom-safe));
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-3); padding: 12px; width: min(420px, calc(100vw - 24px));
}
.picker-bar .pb-t { font-weight: 650; }
.picker-bar .pb-s { font-size: 13px; color: var(--text-2); margin: 2px 0 10px; }
.picker-bar .pb-s span { display: block; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; margin-top: 2px; }

/* popovers and menus */
.pop {
  position: fixed; z-index: 80; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-3); padding: 6px; min-width: 200px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow: auto;
  animation: pop-in .12s ease-out;
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: var(--r-sm); text-align: left; font-size: 14px; }
.menu-item:hover, .menu-item:focus-visible { background: var(--bg-hover); box-shadow: none; }
.menu-item .i { color: var(--text-2); }
.menu-item.danger, .menu-item.danger .i { color: var(--danger); }
.menu-item .end { margin-left: auto; color: var(--text-3); font-size: 12px; }
.menu-sep { height: 1px; background: var(--line); margin: 5px 4px; }
.menu-label { font-size: 11.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); padding: 8px 10px 4px; }
.acct-card { padding: 8px 10px 10px; }
.acct-card b { display: block; font-size: 14.5px; }
.acct-card span { font-size: 12.5px; color: var(--text-3); }
.seg { display: flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 2px; gap: 2px; }
.seg button { flex: 1; height: 28px; border-radius: 5px; font-size: 12.5px; font-weight: 550; color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.seg button.on { background: var(--bg); color: var(--text); box-shadow: var(--shadow-1); }

.styles-pop { width: 316px; padding: 12px; }
.style-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 10px; }
.range-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 2px 4px 6px 32px; font-size: 12.5px; color: var(--text-2); }
.range-row input[type=range] { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); }
.style-opt { display: grid; gap: 5px; justify-items: center; font-size: 12px; font-weight: 550; color: var(--text-2); }
.style-opt .sw { width: 100%; height: 62px; border-radius: 10px; border: 2px solid transparent; box-shadow: inset 0 0 0 1px var(--line); background-size: cover; background-position: center; }
.style-opt:hover .sw { border-color: var(--line-2); }
.style-opt.on { color: var(--accent-text); }
.style-opt.on .sw { border-color: var(--accent); }
.toggle-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px 3px; font-size: 13.5px; }
.toggle-row .i { color: var(--text-2); }
.switch { margin-left: auto; width: 36px; height: 21px; border-radius: 11px; background: var(--line-2); position: relative; transition: background-color .15s; flex: none; }
.switch::after { content: ''; position: absolute; left: 2px; top: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(15px); }

/* ---------- pin panel ---------- */
#panel {
  position: fixed; z-index: 40; top: 12px; right: 12px; bottom: 12px; width: var(--panel-w);
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-3);
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateX(calc(100% + 24px)); transition: transform .22s cubic-bezier(.2,.8,.2,1); visibility: hidden;
}
body.panel-open #panel { transform: none; visibility: visible; }
.sheet-handle { display: none; }
.panel-scroll { flex: 1; overflow: auto; overscroll-behavior: contain; }
.panel-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 14px; background: var(--bg); border-bottom: 1px solid transparent; }
.panel-top.stuck { border-bottom-color: var(--line); }
.panel-top .pt-title { flex: 1; min-width: 0; font-weight: 600; font-size: 13px; color: var(--text-3); }
.cover { position: relative; aspect-ratio: 16 / 10; background: var(--bg-3); cursor: zoom-in; overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover .count { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.62); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 12px; display: inline-flex; gap: 5px; align-items: center; }
.pv-head { padding: 14px 18px 4px; display: flex; gap: 12px; align-items: flex-start; }
.pv-head h1 { margin: 0; font-size: 21px; line-height: 1.25; font-weight: 650; letter-spacing: -0.012em; word-break: break-word; }
.pv-sub { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 13px; color: var(--text-2); margin-top: 5px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 550; color: var(--text-2); max-width: 100%; }
.chip .sw { width: 9px; height: 9px; border-radius: 3px; flex: none; }
button.chip:hover { background: var(--bg-hover); color: var(--text); }
.actions { display: flex; gap: 4px; padding: 12px 12px 14px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.actions::-webkit-scrollbar { display: none; }
.act { flex: 1 1 0; display: grid; justify-items: center; gap: 5px; min-width: 60px; padding: 8px 4px 6px; border-radius: var(--r); font-size: 12px; font-weight: 550; color: var(--text-2); }
a.act:hover { text-decoration: none; }
.act .ic { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--accent-text); }
.act:hover { background: var(--bg-hover); color: var(--text); }
.act.primary .ic { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.act.danger .ic { color: var(--danger); }
.pv-sec { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.pv-sec:last-child { border-bottom: 0; }
.pv-sec h3 { margin: 0 0 8px; font-size: 12px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.notes { font-size: 14.5px; line-height: 1.6; word-wrap: break-word; }
.notes p { margin: 0 0 8px; }
.notes p:last-child { margin-bottom: 0; }
.notes ul, .notes ol { margin: 0 0 8px; padding-left: 22px; }
.notes code { font: 13px ui-monospace, Consolas, monospace; background: var(--bg-2); padding: 1px 5px; border-radius: 4px; }
.notes-empty { color: var(--text-3); font-size: 13.5px; }
.facts { display: grid; gap: 2px; }
.fact { display: flex; align-items: flex-start; gap: 12px; padding: 7px 4px; border-radius: var(--r-sm); font-size: 13.5px; }
.fact > .i { color: var(--text-3); margin-top: 1px; }
.fact .fv { flex: 1; min-width: 0; word-break: break-word; }
.fact .fv.mono { font-variant-numeric: tabular-nums; }
.fact .icon-btn { width: 28px; height: 28px; margin: -5px -2px -5px 0; opacity: .7; }
.fact:hover .icon-btn { opacity: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); font-size: 12.5px; font-weight: 600; }
button.tag:hover { filter: brightness(0.97); }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photo-grid .ph { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--bg-3); }
.photo-grid .ph img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.photo-grid .ph .x { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; }
.photo-grid .ph .x .i { width: 14px; height: 14px; }
.photo-grid .ph .cov { position: absolute; left: 5px; bottom: 5px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 9px; }
.photo-grid .ph.busy::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.photo-grid .ph .prog { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.35); z-index: 2; overflow: hidden; }
.photo-grid .ph .prog i { display: block; height: 100%; background: #fff; width: 0; transition: width .15s; }
.photo-grid .add { aspect-ratio: 1; border-radius: 8px; border: 1.5px dashed var(--line-2); display: grid; place-items: center; align-content: center; gap: 4px; color: var(--text-2); font-size: 12px; font-weight: 550; }
.photo-grid .add:hover { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.photo-grid.drag { outline: 2px dashed var(--accent); outline-offset: 4px; border-radius: 8px; }
.meta-line { font-size: 12px; color: var(--text-3); }

/* editor */
.ed { padding: 6px 18px 18px; display: grid; gap: 16px; }
.ed .name-input { font-size: 19px; font-weight: 650; height: 46px; letter-spacing: -0.01em; }
.swatches { display: grid; grid-template-columns: repeat(7, 28px); gap: 9px 10px; align-items: center; }
.swatch { width: 28px; height: 28px; border-radius: 50%; position: relative; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.swatch.on::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--text); }
.swatch.custom { background: conic-gradient(#e5484d, #f5a524, #46a758, #12a594, #0d74ce, #8e4ec6, #d6409f, #e5484d); }
.swatch.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; border: 0; padding: 0; }
.icon-pick { display: flex; align-items: center; gap: 10px; }
.icon-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.icon-grid button { aspect-ratio: 1; border-radius: 8px; display: grid; place-items: center; color: var(--text-2); }
.icon-grid button:hover { background: var(--bg-hover); color: var(--text); }
.icon-grid button.on { background: var(--accent-soft); color: var(--accent-text); }
.icon-grid .i { width: 20px; height: 20px; }
.icons-pop { width: 340px; padding: 10px; }
.chips-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 38px; padding: 5px 8px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--bg); }
.chips-input:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.chips-input input { flex: 1; min-width: 90px; border: 0; outline: none; background: transparent; height: 26px; }
.chips-input .tag { padding-right: 4px; gap: 3px; }
.chips-input .tag button { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; color: inherit; }
.chips-input .tag button:hover { background: rgba(0,0,0,.08); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.loc-box { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.ed-foot { position: sticky; bottom: 0; display: flex; gap: 8px; align-items: center; padding: 12px 18px calc(12px + var(--bottom-safe)); background: var(--bg); border-top: 1px solid var(--line); }
.saved-note { font-size: 12px; color: var(--text-3); display: inline-flex; align-items: center; gap: 5px; }

/* ---------- modal ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 100; background: var(--scrim); display: grid; place-items: center; padding: 16px; animation: fade .15s ease-out; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(460px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: var(--bg); border-radius: 14px; box-shadow: var(--shadow-3); border: 1px solid var(--line); animation: rise .18s cubic-bezier(.2,.8,.2,1); }
.modal.wide { width: min(620px, 100%); }
@keyframes rise { from { transform: translateY(10px); opacity: .6; } }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 4px 20px; }
.modal-head h2 { margin: 0; font-size: 17px; font-weight: 650; flex: 1; }
.modal-body { padding: 8px 20px 20px; display: grid; gap: 14px; }
.modal-body p { margin: 0; color: var(--text-2); }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 18px; }
.keybox { font: 600 19px ui-monospace, 'Cascadia Mono', Consolas, monospace; letter-spacing: .06em; text-align: center; padding: 16px; border-radius: var(--r); background: var(--bg-2); border: 1px dashed var(--line-2); user-select: all; }
.settings-sec { display: grid; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.settings-sec:first-child { border-top: 0; padding-top: 0; }
.settings-sec h3 { margin: 0; font-size: 14px; font-weight: 650; }
.settings-sec .hint { margin-top: -6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--text-2); }
.check input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; }
.file-drop { border: 1.5px dashed var(--line-2); border-radius: var(--r); padding: 22px; text-align: center; color: var(--text-2); display: grid; gap: 6px; justify-items: center; }
.file-drop.drag { border-color: var(--accent); background: var(--accent-soft); }
.file-drop .i { width: 26px; height: 26px; color: var(--text-3); }
.opt-list { display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); text-align: left; width: 100%; }
.opt:hover { background: var(--bg-hover); }
.opt .oi { width: 36px; height: 36px; border-radius: 9px; background: var(--bg-2); display: grid; place-items: center; color: var(--text-2); flex: none; }
.opt b { display: block; font-weight: 600; }
.opt span { font-size: 12.5px; color: var(--text-3); }
.share-url { display: flex; gap: 8px; }
.share-url .input { font-size: 13px; }

/* ---------- toast ---------- */
.toasts { position: fixed; z-index: 120; left: 50%; bottom: calc(24px + var(--bottom-safe)); transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 24px); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; background: var(--text); color: var(--bg); padding: 10px 10px 10px 16px; border-radius: 10px; box-shadow: var(--shadow-3); font-size: 14px; font-weight: 500; animation: rise .18s ease-out; }
.toast.err { background: var(--danger); color: #fff; }
.toast .ta { font-weight: 650; color: inherit; padding: 4px 8px; border-radius: 6px; text-decoration: underline; text-underline-offset: 2px; }
.toast .ta:hover { background: rgba(127,127,127,.2); }
.toast.solo { padding-right: 16px; }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 110; background: rgba(8, 9, 11, .94); display: grid; grid-template-rows: auto 1fr auto; color: #fff; animation: fade .15s; touch-action: pan-y; }
.lb-top { display: flex; align-items: center; gap: 8px; padding: calc(10px + var(--top-safe)) 12px 10px 18px; }
.lb-top .grow { font-weight: 600; }
.lb-top .icon-btn { color: #fff; }
.lb-top .icon-btn:hover { background: rgba(255,255,255,.1); }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; overflow: hidden; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; }
.lb-nav:hover { background: rgba(255,255,255,.22); }
.lb-nav.prev { left: 14px; }
.lb-nav.next { right: 14px; }
.lb-strip { display: flex; gap: 6px; justify-content: center; padding: 10px 12px calc(14px + var(--bottom-safe)); overflow-x: auto; }
.lb-strip img { width: 52px; height: 52px; object-fit: cover; border-radius: 6px; opacity: .5; cursor: pointer; flex: none; }
.lb-strip img.on { opacity: 1; outline: 2px solid #fff; outline-offset: 1px; }

/* ---------- map popups ---------- */
.maplibregl-popup.wm-tip { pointer-events: none; }
.maplibregl-popup.wm-tip .maplibregl-popup-content { padding: 0; border-radius: 10px; box-shadow: var(--shadow-2); background: var(--bg); color: var(--text); overflow: hidden; font-family: var(--font); }
.maplibregl-popup.wm-tip .maplibregl-popup-tip { border-top-color: var(--bg); border-bottom-color: var(--bg); }
.tip { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; max-width: 280px; }
.tip img { width: 44px; height: 44px; border-radius: 7px; object-fit: cover; flex: none; }
.tip .glyph { margin-left: 2px; }
.tip b { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tip span { display: block; font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.maplibregl-ctrl-attrib { font-size: 11px; }
.maplibregl-ctrl-bottom-right { right: 0; }
body.panel-open .maplibregl-ctrl-bottom-right { right: calc(var(--panel-w) + 24px); }
.maplibregl-ctrl-scale { border-color: var(--text-2); color: var(--text); background: color-mix(in srgb, var(--bg) 80%, transparent); }

/* ---------- auth ---------- */
#auth { position: fixed; inset: 0; z-index: 60; display: flex; pointer-events: none; }
#auth .auth-panel {
  pointer-events: auto; width: 440px; max-width: 100%; height: 100%; overflow: auto; background: var(--bg);
  border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 34px 44px calc(28px + var(--bottom-safe));
}
.auth-panel .logo { margin-bottom: 44px; }
.auth-panel h1 { font-size: 30px; line-height: 1.15; letter-spacing: -0.025em; margin: 0 0 10px; font-weight: 700; }
.auth-panel .lede { color: var(--text-2); margin: 0 0 26px; font-size: 15px; }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs button { padding: 0 0 10px; font-weight: 600; color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.auth-form { display: grid; gap: 14px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 42px; }
.pw-wrap .icon-btn { position: absolute; right: 3px; top: 2px; }
.linkish { color: var(--accent-text); font-weight: 550; font-size: 13px; }
.linkish:hover { text-decoration: underline; }
.feats { margin-top: auto; padding-top: 30px; display: grid; gap: 14px; }
.feat { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: var(--text-2); }
.feat .fi { width: 32px; height: 32px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; flex: none; }
.feat b { color: var(--text); font-weight: 600; display: block; }
.auth-legal { font-size: 12px; color: var(--text-3); margin-top: 22px; }

/* share mode: the list's header in the sidebar */
.share-banner { padding: 14px 16px 14px; border-bottom: 1px solid var(--line); }
.share-banner .sb-k { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.share-banner .sb-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.share-banner .sb-t { margin: 6px 0 3px; font-size: 21px; line-height: 1.2; font-weight: 720; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.share-banner .sb-s { font-size: 12.5px; color: var(--text-3); }
.share-banner .sb-d { margin: 9px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--text-2); white-space: pre-line; max-height: 7.5em; overflow: auto; }
.share-banner .sb-acts { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.share-banner .btn.busy { opacity: .7; pointer-events: none; }
.side-foot .logo-sm .logo-mark { width: 20px; height: 20px; border-radius: 6px; }
.side-foot .logo-sm .logo-mark svg { width: 13px; height: 13px; }
.share-dead { margin-top: 80px; }
.share-dead-card { display: none; }

/* phones and embeds: the list name sits where the search box is */
.share-top { display: none; }
.share-top .st-main { display: flex; flex-direction: column; min-width: 0; flex: 1; text-align: left; gap: 1px; padding: 0 4px; }
.share-top .st-main b { font-size: 15px; font-weight: 680; }
.share-top .st-main span { font-size: 12.5px; color: var(--text-3); }
.share-top .st-menu { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); flex: none; }
.share-top .st-menu:hover { background: var(--bg-hover); }
.share-top .btn { flex: none; border-radius: 999px; }
.share-top .st-logo { flex: none; display: grid; }

/* embedded on another website (/s/<token>?embed=1) */
body.embed #side, body.embed #topbar .brand, body.embed #topbar .acct, body.embed #topbar .search, body.embed #fab { display: none !important; }
body.embed #map { left: 0; }
body.embed #topbar { left: 10px; right: auto; top: 10px; width: min(420px, calc(100% - 72px)); padding: 0; background: transparent; border: 0; grid-template-columns: 1fr; grid-template-areas: 'search'; }
body.embed .share-top { display: flex; grid-area: search; align-items: center; gap: 8px; height: 50px; padding: 0 7px 0 7px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
body.embed .share-top .logo-mark { width: 34px; height: 34px; border-radius: 9px; }
body.embed .share-top .logo-mark svg { width: 20px; height: 20px; }
body.embed #controls [data-locate], body.embed #controls [data-tools], body.embed .ctrl-group:has([data-tools]) { display: none; }
body.embed .ctrl-group.zoom { display: flex !important; }
body.embed .share-dead-card { display: grid; place-items: center; position: fixed; inset: 0; z-index: 50; background: var(--bg); }

/* save a shared list: the list being saved */
.save-copy { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); margin-bottom: 14px; }
.save-copy .sw { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.save-copy b { display: block; font-size: 15px; }
.save-copy span { font-size: 12.5px; color: var(--text-3); }

/* share dialog: link preview card and embed code */
.og-card { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg); }
.og-img { position: relative; aspect-ratio: 1200 / 630; background: var(--bg-3); display: grid; place-items: center; overflow: hidden; }
.og-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.og-img.busy::after { content: 'Making the picture…'; position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 70%, transparent); font-size: 13px; font-weight: 600; color: var(--text-2); }
.og-empty { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); }
.og-text { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 11px; border-top: 1px solid var(--line); min-width: 0; }
.og-text .og-host { font-size: 11.5px; color: var(--text-3); text-transform: lowercase; }
.og-text b { font-size: 14px; }
.og-text .og-d { font-size: 12.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.og-row { display: flex; align-items: center; gap: 12px; margin: 8px 0 4px; }
.og-row .hint { flex: 1; margin: 0; }
.embed-box { margin: 10px 0 8px; border: 1px solid var(--line); border-radius: var(--r); padding: 0 12px; }
.embed-box summary { display: flex; align-items: center; gap: 8px; min-height: 42px; cursor: pointer; font-weight: 600; font-size: 14px; list-style: none; }
.embed-box summary::-webkit-details-marker { display: none; }
.embed-box summary::after { content: ''; margin-left: auto; width: 7px; height: 7px; border-right: 1.8px solid var(--text-3); border-bottom: 1.8px solid var(--text-3); transform: rotate(45deg); transition: transform .15s; }
.embed-box[open] summary::after { transform: rotate(225deg); }
.embed-box[open] { padding-bottom: 12px; }
.embed-box .hint { margin: 0 0 8px; }
.textarea.mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 12px; line-height: 1.5; min-height: 0; resize: none; }

/* drawer scrim (phones) */
.scrim { position: fixed; inset: 0; z-index: 32; background: var(--scrim); animation: fade .15s; }

/* ---------- phones and small tablets ---------- */
@media (max-width: 820px) {
  :root { --side-w: 0px; }
  body { font-size: 15px; }
  .input, .select, .textarea, .search-box input { font-size: 16px; }
  #map { left: 0; }
  #topbar {
    left: 10px; right: 10px; top: calc(10px + var(--top-safe)); width: auto; padding: 0; background: transparent; border: 0;
    grid-template-columns: 1fr; grid-template-areas: 'search';
  }
  #topbar .brand { display: none; }
  #topbar .acct { display: none; }
  .search-box { height: 48px; border-radius: 24px; background: var(--bg); border-color: var(--line); box-shadow: var(--shadow-2); padding: 0 5px 0 4px; }
  .search-box > .i.lead { display: none; }
  .search-box .menu-btn { display: grid; }
  .search-box .avatar-sm { display: grid; }
  .search-results { border-radius: 14px; max-height: calc(100dvh - 90px - var(--top-safe)); }
  #side {
    top: 0; width: min(86vw, 360px); transform: translateX(-102%); transition: transform .22s cubic-bezier(.2,.8,.2,1); z-index: 35;
    box-shadow: var(--shadow-3); padding-top: var(--top-safe);
  }
  body.drawer-open #side { transform: none; }
  body.share-mode:not(.embed) #topbar .search { display: none; }
  .share-banner .sb-lbl { display: none; }
  .share-banner [data-sb="download"] { width: 30px; padding: 0; justify-content: center; }
  body.share-mode:not(.embed) .share-top { display: flex; grid-area: search; align-items: center; gap: 4px; height: 52px; padding: 0 7px 0 5px; border-radius: 26px; background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
  .share-dead-card { display: grid; place-items: center; position: fixed; inset: 0; z-index: 50; background: var(--bg); padding: 24px; }
  .side-brand { display: flex !important; }
  .ctrl-stack { top: calc(68px + var(--top-safe)); right: 10px; }
  body.panel-open .ctrl-stack { right: 10px; }
  .ctrl-group .cbtn { width: 44px; height: 44px; }
  .ctrl-group.zoom { display: none; }
  .fab { display: inline-flex; }
  body.panel-open .fab, body.picking .fab, body.drawer-open .fab { display: none; }
  .hint-pill { left: 50%; top: calc(70px + var(--top-safe)); }
  .picker-pin { left: 50%; }
  .picker-bar { left: 50%; }
  body.panel-open .maplibregl-ctrl-bottom-right { right: 0; }
  .maplibregl-ctrl-bottom-right, .maplibregl-ctrl-bottom-left { bottom: var(--bottom-safe); }

  /* the panel becomes a bottom sheet */
  #panel {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; border-radius: 16px 16px 0 0; border-bottom: 0;
    height: calc(100dvh - 54px - var(--top-safe)); transform: translateY(100%);
    transition: transform .26s cubic-bezier(.2,.8,.2,1);
  }
  body.panel-open #panel { transform: translateY(var(--sheet-y, 52%)); }
  #panel.dragging { transition: none; }
  .sheet-handle { display: block; position: absolute; z-index: 5; top: 0; left: 0; right: 0; height: 22px; cursor: grab; touch-action: none; }
  .sheet-handle::after { content: ''; position: absolute; top: 8px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: var(--line-2); }
  .panel-top { padding-top: 16px; touch-action: none; }
  .ed-foot { padding-bottom: calc(12px + var(--bottom-safe)); }
  .panel-scroll { display: flex; flex-direction: column; }
  .panel-scroll > * { flex: none; }
  .panel-scroll > .pv-head { order: 1; padding-top: 6px; }
  .panel-scroll > .actions { order: 2; }
  .panel-scroll > .cover { order: 3; margin: 14px 16px 0; border-radius: 12px; aspect-ratio: 16 / 9; }
  .panel-scroll > .pv-sec, .panel-scroll > .ed, .panel-scroll > .pv-mark { order: 4; }

  #auth .auth-panel { width: 100%; border: 0; padding: calc(26px + var(--top-safe)) 22px calc(24px + var(--bottom-safe)); }
  .auth-panel h1 { font-size: 27px; }
  .auth-panel .logo { margin-bottom: 30px; }
  .feats { padding-top: 26px; }
  .modal-wrap { align-items: end; padding: 0; }
  .modal, .modal.wide { width: 100%; border-radius: 16px 16px 0 0; max-height: calc(100dvh - 30px); padding-bottom: var(--bottom-safe); }
  .toasts { bottom: calc(92px + var(--bottom-safe)); }
  .styles-pop { width: min(320px, calc(100vw - 20px)); }
  .icons-pop { width: calc(100vw - 20px); }
  .icon-grid { grid-template-columns: repeat(8, 1fr); }
}
@media (max-width: 480px) {
  .two { grid-template-columns: 1fr; }
  .settings-sec .row { flex-wrap: wrap; }
  .settings-sec .row .input { max-width: none !important; flex: 1 1 100%; }
}
@media (min-width: 821px) {
  .search-box .menu-btn, .search-box .avatar-sm, .side-brand { display: none !important; }
}
.side-brand { display: none; align-items: center; gap: 10px; padding: 14px 14px 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.avatar-sm { width: 36px; height: 36px; border-radius: 50%; place-items: center; background: var(--bg-3); font-weight: 650; font-size: 14px; flex: none; display: none; }
.menu-btn { width: 40px; height: 40px; border-radius: 50%; place-items: center; color: var(--text-2); display: none; flex: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; }
}

/* ---------- glyph variants (lists, search, panel) ---------- */
.glyph.sq { border-radius: 8px; }
.glyph.hx { clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%); box-shadow: none; }
.glyph .em { width: 80%; height: 80%; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.glyph.sq .em { border-radius: 6px; }
.glyph .em img { width: 76%; height: 76%; display: block; }
.glyph .tx { font-weight: 750; font-size: 12.5px; letter-spacing: -0.02em; }
.glyph .tx.n2 { font-size: 10.5px; }
.glyph .tx.n3 { font-size: 8.5px; }
.glyph.lg .tx { font-size: 16px; }
.glyph.lg .tx.n2 { font-size: 13px; }
.glyph.lg .tx.n3 { font-size: 10.5px; }
.glyph .ph { width: calc(100% - 5px); height: calc(100% - 5px); border-radius: inherit; object-fit: cover; display: block; }

/* ---------- symbol picker ---------- */
.pop.sym-pop { width: 404px; padding: 0; overflow: hidden; }
.sym { display: flex; flex-direction: column; height: min(500px, calc(100vh - 24px)); }
.sym-tabs { display: flex; align-items: center; gap: 2px; padding: 8px 8px 0 10px; border-bottom: 1px solid var(--line); }
.sym-tabs [data-tab] { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; font-weight: 600; font-size: 13.5px; color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.sym-tabs [data-tab]:hover { color: var(--text); }
.sym-tabs [data-tab].on { color: var(--text); border-bottom-color: var(--accent); }
.sym-tab-emoji { width: 17px; height: 17px; }
.sym-tabs [data-none] { margin-bottom: 4px; }
.sym-search { position: relative; display: flex; gap: 8px; padding: 10px 10px 6px; }
.sym-search .sb { flex: 1; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border-radius: 9px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text-3); }
.sym-search .sb:focus-within { border-color: var(--accent); box-shadow: var(--focus); background: var(--bg); }
.sym-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; height: 100%; font-size: 14px; color: var(--text); }
.sym-search input:focus-visible { box-shadow: none; }
.sym-search input::-webkit-search-cancel-button { display: none; }
.tone-btn { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); display: grid; place-items: center; background: var(--bg); }
.tone-btn span, .tone-row span { width: 18px; height: 18px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.tone-row { position: absolute; right: 10px; top: 50px; z-index: 3; display: flex; gap: 4px; padding: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-2); }
.tone-row button { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; }
.tone-row button:hover, .tone-row button.on { background: var(--bg-hover); }
.sym-cats { display: flex; gap: 2px; padding: 0 8px 6px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.sym-cats::-webkit-scrollbar { display: none; }
.sym-cats button { flex: none; width: 34px; height: 32px; border-radius: 7px; display: grid; place-items: center; color: var(--text-3); }
.sym-cats button:hover { background: var(--bg-hover); color: var(--text); }
.sym-cats button.on { background: var(--accent-soft); color: var(--accent-text); }
.sym-cats img { width: 19px; height: 19px; }
.sym-body { flex: 1; min-height: 0; overflow: auto; padding: 4px 8px 10px; overscroll-behavior: contain; outline: none; }
.sym-sec h4 { position: sticky; top: -4px; z-index: 1; margin: 0; padding: 10px 4px 6px; font-size: 11.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); background: var(--bg); }
.sym-grid { display: grid; gap: 2px; }
.sym-grid.icons, .sym-grid.emoji { grid-template-columns: repeat(9, 1fr); }
.sym-cell { aspect-ratio: 1; border-radius: 8px; display: grid; place-items: center; color: var(--text-2); }
.sym-cell:hover, .sym-cell:focus-visible { background: var(--bg-hover); color: var(--text); box-shadow: none; }
.sym-cell:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sym-cell.on { background: var(--accent-soft); color: var(--accent-text); box-shadow: inset 0 0 0 1.5px var(--accent); }
.sym-cell .i { width: 21px; height: 21px; }
.sym-cell img { width: 25px; height: 25px; display: block; user-select: none; }
.sym-empty { display: grid; justify-items: center; gap: 6px; padding: 40px 20px; text-align: center; color: var(--text-3); font-size: 13px; }
.sym-empty .i, .sym-empty img { width: 28px; height: 28px; }
.sym-empty b { color: var(--text); font-size: 14px; }
.sym-foot { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 8px 12px; border-top: 1px solid var(--line); background: var(--bg-2); }
.sf-prev { width: 34px; height: 34px; flex: none; display: grid; place-items: center; }
.sf-prev img { width: 30px; height: 30px; }
.sf-prev .i { width: 24px; height: 24px; color: var(--text-2); }
.sf-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-3); color: var(--text-2); }
.sf-ico[style], .sf-ico[style] .i { color: #fff; }
.sf-ico .i { width: 19px; height: 19px; }
.sf-text { min-width: 0; display: grid; }
.sf-text b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-text b::first-letter { text-transform: uppercase; }
.sf-text span { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sym-text { padding: 14px 6px; display: grid; gap: 12px; }
.sym-text h4 { margin: 4px 0 0; font-size: 11.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.st-row { display: flex; align-items: flex-end; gap: 12px; }
.st-row .grow { display: grid; gap: 6px; }
.st-prev { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 750; flex: none; box-shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 0 0 2px rgba(255,255,255,.7); }
.st-quick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.st-quick button { height: 36px; border-radius: 8px; border: 1px solid var(--line); font-weight: 650; font-size: 13.5px; }
.st-quick button:hover { background: var(--bg-hover); border-color: var(--line-2); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.modal.sym-modal .modal-body { padding: 0; }
.modal.sym-modal .sym { height: min(72dvh, 600px); }
.modal.sym-modal .sym-grid.icons, .modal.sym-modal .sym-grid.emoji { grid-template-columns: repeat(8, 1fr); }

/* ---------- appearance (pin editor) ---------- */
.appear { display: grid; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.ap-preview { position: relative; height: 132px; border-radius: 9px; overflow: hidden; display: grid; place-items: center; background-color: #eceae4; background-size: 240px auto; background-position: center; box-shadow: inset 0 0 0 1px rgba(0,0,0,.07); }
.ap-preview::before { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.22); }
.ap-preview.dark::before { background: rgba(0,0,0,.12); }
.ap-pin { position: relative; display: grid; justify-items: center; }
.ap-pin canvas { display: block; }
.ap-pin[data-anchor="bottom"] { transform: translateY(-14px); }
.ap-lbl { position: absolute; top: 100%; margin-top: 3px; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; font-weight: 700; font-size: 13px; color: #1b1d21; text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff, 0 0 4px #fff; }
.ap-pin:not([data-anchor="bottom"]) .ap-lbl { margin-top: 6px; }
.ap-preview.dark .ap-lbl { color: #fff; text-shadow: 0 0 2px #000, 0 0 3px #000, 0 0 4px rgba(0,0,0,.8); }
.ap-note { position: absolute; left: 8px; top: 8px; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 10px; background: rgba(255,255,255,.88); color: #4a4f57; }
.ap-sym { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 8px 10px 8px 8px; border-radius: 10px; border: 1px solid var(--line); }
.ap-sym:hover { background: var(--bg-hover); border-color: var(--line-2); }
.ap-sym .grow { display: grid; min-width: 0; }
.ap-sym b { font-size: 12px; color: var(--text-3); font-weight: 600; }
.ap-sym [data-symname] { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-sym [data-symname]::first-letter { text-transform: uppercase; }
.ap-change { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 600; color: var(--accent-text); flex: none; }
.ap-row { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 10px; }
.seg.shapes button svg { width: 19px; height: 19px; }
.seg.shapes button { height: 32px; color: var(--text-3); }
.seg.shapes button.on { color: var(--accent-text); }
.seg.sizes button { height: 30px; }
.ap-photo { margin-top: -4px; }
.ap-colour { display: grid; gap: 8px; }
.palette { display: grid; gap: 5px; }
.pal-row { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; }
.pal-row.neutral { margin-top: 4px; }
.csw { aspect-ratio: 1; width: 100%; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); transition: transform .08s; }
.csw:hover { transform: scale(1.12); }
.csw.white { box-shadow: inset 0 0 0 1px var(--line-2); }
.csw.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
.csw.sm { width: 22px; height: 22px; flex: none; }
.pal-tools { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.hexbox { display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 9px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); cursor: text; }
.hexbox:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.hx-sw { width: 16px; height: 16px; border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); flex: none; }
.hexbox input { width: 70px; border: 0; outline: none; background: transparent; font: 600 13px ui-monospace, Consolas, monospace; letter-spacing: .03em; color: var(--text); text-transform: uppercase; }
.hexbox input:focus-visible { box-shadow: none; }
.pal-more { position: relative; overflow: hidden; cursor: pointer; }
.pal-more input { position: absolute; inset: 0; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.pal-recent { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.pr-l { font-size: 11.5px; color: var(--text-3); margin-right: 2px; }
@media (max-width: 820px) {
  .pal-row { gap: 6px; }
  .ap-preview { height: 120px; }
}

/* ---------- map tools ---------- */
.tool-card {
  z-index: 18; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-3);
  left: calc(var(--side-w) + 14px); top: 12px; width: 360px; max-width: calc(100vw - 28px);
  animation: rise .18s ease-out;
}
body.panel-open .tool-card.near-card, body.panel-open .tool-card.route-card { max-height: calc(100vh - 24px); }
.tool-card.draw-bar {
  left: calc(var(--side-w) + (100vw - var(--side-w)) / 2); transform: translateX(-50%); top: 14px; width: auto; min-width: 420px; max-width: min(640px, calc(100vw - var(--side-w) - 28px));
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 12px;
}
body.panel-open .tool-card.draw-bar { left: calc(var(--side-w) + (100vw - var(--side-w) - var(--panel-w) - 24px) / 2); max-width: min(560px, calc(100vw - var(--side-w) - var(--panel-w) - 48px)); min-width: 0; }
body.panel-open .tool-card.near-card, body.panel-open .tool-card.route-card { z-index: 18; }
.tc-ic { width: 34px; height: 34px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; flex: none; }
.tc-t { font-weight: 650; font-size: 14px; }
.tc-s { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.draw-bar .grow { min-width: 0; }
.draw-bar .tc-s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-head { display: flex; align-items: center; gap: 10px; padding: 10px 8px 8px 12px; }
.rc-prof { margin: 0 12px 8px; }
.rc-prof button { gap: 5px; }
.rc-legs { list-style: none; margin: 0; padding: 0 6px; max-height: 220px; overflow: auto; border-top: 1px solid var(--line); }
.rc-legs:empty { display: none; }
.rc-legs li { display: flex; align-items: center; gap: 8px; padding: 7px 6px; font-size: 13px; border-bottom: 1px solid var(--line); }
.rc-legs li:last-child { border-bottom: 0; }
.rl-n { width: 20px; height: 20px; border-radius: 50%; background: #1a73e8; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; flex: none; }
.rl-d { color: var(--text-3); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rc-foot { display: flex; align-items: center; gap: 8px; padding: 8px 10px 10px 12px; border-top: 1px solid var(--line); }
.rc-foot .hint { flex: 1; min-width: 0; font-size: 11.5px; }
.near-card { display: flex; flex-direction: column; max-height: min(560px, calc(100vh - 24px)); }
.near-list { flex: 1; min-height: 0; overflow: auto; border-top: 1px solid var(--line); padding: 4px; }
.near-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 8px; border-radius: 8px; }
.near-row:hover, .near-row.on { background: var(--bg-hover); }
.near-row .grow { display: grid; min-width: 0; }
.near-row b { font-weight: 600; font-size: 13.5px; }
.near-row .grow > span { font-size: 12px; color: var(--text-3); }
.nr-d { font-size: 12px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.near-skel { height: 44px; margin: 6px; border-radius: 8px; background: linear-gradient(90deg, var(--bg-2), var(--bg-3), var(--bg-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.near-pop { width: 340px; padding: 10px; }
.np-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
.np-grid button { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 8px; font-size: 13px; font-weight: 550; text-align: left; }
.np-grid button:hover { background: var(--bg-hover); }
.np-ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.5); }
.pbox.dr { background: color-mix(in srgb, var(--c) 14%, var(--bg)); color: var(--c); }
.glyph.dr .i { width: 19px; height: 19px; color: #fff; }
.dr-name { margin-bottom: 2px; }
body.tooling .fab { display: none; }
@media (max-width: 820px) {
  .tool-card { left: 10px; right: 10px; width: auto; top: auto; bottom: calc(14px + var(--bottom-safe)); }
  .tool-card.draw-bar, body.panel-open .tool-card.draw-bar { left: 10px; right: 64px; transform: none; min-width: 0; max-width: none; top: calc(66px + var(--top-safe)); bottom: auto; flex-wrap: wrap; z-index: 45; }
  .draw-bar .grow { flex: 1 1 calc(100% - 50px); }
  .near-card { max-height: 48dvh; }
  .near-pop { width: calc(100vw - 20px); }
}

/* ---------- sidebar: tabs, filters, selection, reordering ---------- */
.side-tabs { display: flex; gap: 2px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.side-tabs button { padding: 10px 10px 9px; font-weight: 600; font-size: 13.5px; color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.side-tabs button:hover { color: var(--text); }
.side-tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.side-head .icon-btn.on { color: var(--accent-text); background: var(--accent-soft); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 8px 10px 10px; }
.fchip { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; border-radius: 14px; border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 550; color: var(--text-2); background: var(--bg); }
.fchip:hover { background: var(--bg-hover); }
.fchip.on { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.fchip .i { width: 13px; height: 13px; }
.fdot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.fclear { font-size: 12.5px; font-weight: 600; color: var(--text-3); padding: 0 6px; }
.fclear:hover { color: var(--text); text-decoration: underline; }
.pin-row { position: relative; cursor: pointer; }
.pin-row:focus-visible { box-shadow: var(--focus); }
.pin-row.picked { background: var(--accent-soft); }
.pr-chk { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--line-2); display: grid; place-items: center; flex: none; color: transparent; background: var(--bg); }
.pr-chk.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pr-chk .i { width: 12px; height: 12px; stroke-width: 3; }
.grip { width: 16px; display: grid; place-items: center; color: var(--text-3); cursor: grab; flex: none; margin-left: -6px; opacity: 0; touch-action: none; }
.pin-row:hover .grip, .list-row:hover .grip { opacity: 1; }
@media (hover: none) { .grip { opacity: .6; } }
.list-row .lgrip { margin-left: -4px; margin-right: -6px; }
.drag-ghost { position: fixed; z-index: 200; pointer-events: none; background: var(--bg); box-shadow: var(--shadow-3); border-radius: var(--r-sm); opacity: .95; }
.drag-src { opacity: .35; }
.drop-line { height: 2px; background: var(--accent); border-radius: 2px; margin: -1px 8px; }
.pr-marks { display: inline-flex; align-items: center; gap: 6px; flex: none; color: var(--text-3); }
.pr-st { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; }
.pr-st.st-want { color: #0d74ce; background: color-mix(in srgb, #0d74ce 12%, transparent); }
.pr-st.st-been { color: #46a758; background: color-mix(in srgb, #46a758 14%, transparent); }
.pr-st.st-fav { color: #e5484d; background: color-mix(in srgb, #e5484d 12%, transparent); }
.pr-rt { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 650; color: #b07800; }
.pr-rt .i { fill: #f5a524; color: #f5a524; }
.pl-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
.list-desc { margin: 0 12px 6px 40px; font-size: 12.5px; color: var(--text-3); line-height: 1.45; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 10px; }
.tag.big { height: 30px; padding: 0 6px 0 11px; font-size: 13.5px; gap: 7px; }
.tag.big span { font-size: 11.5px; font-weight: 700; background: color-mix(in srgb, var(--accent) 18%, transparent); border-radius: 9px; padding: 1px 7px; }
.bulk { display: flex; align-items: center; gap: 4px; padding: 10px 10px calc(10px + var(--bottom-safe)) 14px; border-top: 1px solid var(--line); background: var(--bg-2); }
.bk-n { font-weight: 650; font-size: 13.5px; }
.bulk .icon-btn:disabled { opacity: .35; cursor: default; }
.danger-ic { color: var(--danger) !important; }
.bk-pop { width: 330px; padding: 12px; }
.bk-pal { display: grid; gap: 5px; }
.side-foot .icon-btn { position: relative; }
.badge { position: absolute; top: 1px; right: 0; min-width: 15px; height: 15px; border-radius: 8px; background: var(--text-2); color: var(--bg); font-size: 9.5px; font-weight: 700; display: grid; place-items: center; padding: 0 3px; }
.side-skel { padding: 14px; display: grid; gap: 12px; }
.sk { border-radius: 8px; background: linear-gradient(90deg, var(--bg-2), var(--bg-3), var(--bg-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.sk-btn { height: 36px; }
.sk-line { height: 14px; width: 40%; margin-top: 8px; }
.sk-row { height: 42px; }
.bin-list { display: grid; gap: 2px; max-height: 50vh; overflow: auto; margin: 0 -8px; }
.bin-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; }
.bin-row:hover { background: var(--bg-hover); }
.bin-row .grow { display: grid; min-width: 0; }
.bin-row b { font-weight: 600; }
.bin-row .grow > span { font-size: 12px; color: var(--text-3); }
.bin-row .thumb { width: 38px; height: 38px; border-radius: 7px; object-fit: cover; flex: none; }
.share-banner .sb-d { font-size: 12.5px; color: var(--text-2); margin-top: 4px; }

/* ---------- pin panel: status, rating, notes ---------- */
.pv-mark { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.ed .pv-mark { padding: 0; border: 0; }
.status-seg { display: flex; gap: 6px; flex-wrap: wrap; }
.status-seg button { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 15px; border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.status-seg button:hover { background: var(--bg-hover); }
.status-seg button .i { width: 14px; height: 14px; }
.status-seg .st-want.on { background: #0d74ce; border-color: #0d74ce; color: #fff; }
.status-seg .st-been.on { background: #3d9a50; border-color: #3d9a50; color: #fff; }
.status-seg .st-fav.on { background: #e5484d; border-color: #e5484d; color: #fff; }
.st-badge { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12.5px; font-weight: 600; color: #fff; }
.st-badge.st-want { background: #0d74ce; } .st-badge.st-been { background: #3d9a50; } .st-badge.st-fav { background: #e5484d; }
.stars { display: inline-flex; gap: 1px; }
.star { width: 26px; height: 26px; display: grid; place-items: center; color: var(--line-2); border-radius: 6px; }
button.star:hover { background: var(--bg-hover); }
.star .i { width: 19px; height: 19px; }
.star.on { color: #f5a524; }
.star.on .i { fill: #f5a524; }
.stars.ro .star { width: 18px; height: 18px; }
.stars.ro .star .i { width: 15px; height: 15px; }
.notes ul.checklist { list-style: none; padding-left: 2px; }
.notes ul.checklist li { display: flex; align-items: flex-start; gap: 9px; padding: 2px 0; }
.notes ul.checklist li input { width: 17px; height: 17px; margin: 3px 0 0; accent-color: var(--accent); flex: none; cursor: pointer; }
.notes ul.checklist li[data-checked="true"] > span { color: var(--text-3); text-decoration: line-through; }
.photo-grid .ph .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px; font-size: 11px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.65)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }

/* formatting editor */
.rte-wrap { border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--bg); transition: border-color .12s, box-shadow .12s; }
.rte-wrap:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.rte-bar { display: flex; gap: 2px; padding: 4px; border-bottom: 1px solid var(--line); }
.rte-bar button { width: 30px; height: 28px; border-radius: 6px; display: grid; place-items: center; color: var(--text-2); }
.rte-bar button:hover { background: var(--bg-hover); color: var(--text); }
.rte-bar button.on { background: var(--accent-soft); color: var(--accent-text); }
.rte { min-height: 110px; max-height: 360px; overflow: auto; padding: 10px 12px; outline: none; font-size: 14.5px; line-height: 1.55; }
.rte:focus-visible { box-shadow: none; }
.rte.empty::before { content: attr(data-placeholder); color: var(--text-3); position: absolute; pointer-events: none; max-width: 300px; }
.rte p { margin: 0 0 8px; }
.rte ul, .rte ol { margin: 0 0 8px; padding-left: 22px; }
.rte ul.checklist { list-style: none; padding-left: 2px; }
.rte ul.checklist li { position: relative; padding-left: 26px; }
.rte ul.checklist li::before { content: ""; position: absolute; left: 0; top: 3px; width: 15px; height: 15px; border: 1.5px solid var(--line-2); border-radius: 4px; background: var(--bg); cursor: pointer; }
.rte ul.checklist li[data-checked="true"]::before { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 12px no-repeat; border-color: var(--accent); }
.rte ul.checklist li[data-checked="true"] { color: var(--text-3); text-decoration: line-through; }
.rte a { color: var(--accent-text); text-decoration: underline; }
.link-pop { display: flex; gap: 6px; width: 320px; padding: 4px; }
.link-pop .input { height: 32px; font-size: 13px; }
.pop.link-pop-wrap { min-width: 0; }
.lb-cap { display: flex; justify-content: center; padding: 0 16px 4px; }
.lb-cap-t { color: #e6e8eb; font-size: 14px; text-align: center; max-width: 700px; }
.lb-cap-in { width: min(520px, 100%); height: 36px; border-radius: 8px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; padding: 0 12px; font-size: 14px; text-align: center; }
.lb-cap-in::placeholder { color: rgba(255,255,255,.5); }
.lb-cap-in:focus { outline: none; border-color: rgba(255,255,255,.55); }

/* ---------- command menu ---------- */
.modal.cmdk-modal { width: min(620px, 100%); align-self: start; margin-top: 10vh; }
.modal.cmdk-modal .modal-head { display: none; }
.modal.cmdk-modal .modal-body { padding: 0; }
.cmdk-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 56px; border-bottom: 1px solid var(--line); color: var(--text-3); }
.cmdk-in input { flex: 1; border: 0; outline: none; background: transparent; font-size: 16.5px; color: var(--text); height: 100%; }
.cmdk-in input:focus-visible { box-shadow: none; }
.cmdk-res { max-height: min(56vh, 480px); overflow: auto; padding: 6px; }
.cmdk-res .kbd { margin-left: auto; }

/* ---------- tour ---------- */
.tour-ring { position: fixed; z-index: 150; border-radius: 12px; box-shadow: 0 0 0 3px var(--accent), 0 0 0 9999px rgba(10,12,16,.38); pointer-events: none; transition: all .25s cubic-bezier(.2,.8,.2,1); }
.tour-card { position: fixed; z-index: 151; width: 300px; max-width: calc(100vw - 24px); background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-3); padding: 14px 14px 12px; transition: left .25s, top .25s; }
.tour-card b { display: block; font-size: 15.5px; margin-bottom: 4px; }
.tour-card p { margin: 0 0 12px; color: var(--text-2); font-size: 13.5px; }
.tc-step { font-size: 11.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 6px; }
.steps-list { margin: 0; padding-left: 22px; display: grid; gap: 10px; color: var(--text-2); }
.steps-list .i { display: inline; vertical-align: -3px; }
@media (max-width: 820px) {
  .modal.cmdk-modal { margin-top: 0; align-self: end; }
  .side-tabs { padding: 0 10px; }
}

/* line-based editor */
.rte .ln { min-height: 1.55em; position: relative; }
.rte .ln:not([data-t="ol"]) { counter-reset: ol; }
.rte .ln[data-t="ul"], .rte .ln[data-t="ol"], .rte .ln[data-t="check"] { padding-left: 26px; }
.rte .ln[data-t="ul"]::before { content: ""; position: absolute; left: 9px; top: .68em; width: 6px; height: 6px; border-radius: 50%; background: var(--text-2); }
.rte .ln[data-t="ol"] { counter-increment: ol; }
.rte .ln[data-t="ol"]::before { content: counter(ol) "."; position: absolute; left: 0; width: 20px; text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; }
.rte .ln[data-t="check"]::before { content: ""; position: absolute; left: 1px; top: .2em; width: 15px; height: 15px; border: 1.5px solid var(--line-2); border-radius: 4px; background: var(--bg); cursor: pointer; }
.rte .ln[data-t="check"][data-checked="true"]::before { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 12px no-repeat; border-color: var(--accent); }
.rte .ln[data-t="check"][data-checked="true"] { color: var(--text-3); text-decoration: line-through; }
.rte.empty::before { left: 12px; top: 10px; }
.rte { position: relative; }

/* what the name says: symbol set from the name, or the named place under a new pin */
.name-help { display: flex; align-items: center; gap: 10px; margin: 8px 0 2px; padding: 8px 10px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.name-help[hidden] { display: none; }
.name-help .glyph { width: 26px; height: 26px; flex: none; }
.name-help b { color: var(--text); font-weight: 650; }
.name-help .nh-sub { display: block; font-size: 12px; color: var(--text-3); margin-top: 1px; text-transform: none; }
.name-help.poi { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.name-help .btn { flex: none; }
.marks .marks-off { display: none; font-size: 13px; color: var(--text-3); }
.marks.personal .pv-mark { display: none; }
.marks.personal .marks-off { display: block; }

/* list badges: the list's colour with its symbol */
.glyph.lst { width: 22px; height: 22px; border-radius: 6px; box-shadow: none; }
.glyph.lst .i { width: 13px; height: 13px; }
.glyph.lst .em img { width: 15px; height: 15px; }
.glyph.lst .tx { font-size: 10px; }
.list-row .glyph.lst { margin-right: 6px; }
.glyph.lst.xs { width: 16px; height: 16px; border-radius: 5px; }
.glyph.lst.xs .i { width: 10px; height: 10px; }
.glyph.lst.xs .em img { width: 11px; height: 11px; }
.glyph.lst.xl { width: 40px; height: 40px; border-radius: 11px; }
.glyph.lst.xl .i { width: 22px; height: 22px; }
.glyph.lst.xl .em img { width: 26px; height: 26px; }
.glyph.lst.xl .tx { font-size: 15px; }
.chip .lst-sw.xs, .chip .lst-sw { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.share-banner .sb-badge.glyph { width: 18px; height: 18px; border-radius: 5px; }
.share-banner .sb-badge.glyph .i { width: 11px; height: 11px; }
.share-banner .lst-sw.sb-badge { width: 10px; height: 10px; border-radius: 3px; }
.ln-row { display: flex; align-items: center; gap: 10px; }
.ln-row .input { flex: 1; }
.ln-badge { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--bg); padding: 1px; }
.ln-badge:hover { border-color: var(--line-2); }
.ln-empty { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: rgba(255,255,255,.9); }
.ln-hint { font-size: 12.5px; color: var(--text-3); margin-top: 6px; min-height: 18px; }
/* pickers opened from a dialog sit above it */
body:has(> .modal-wrap) > .pop { z-index: 120; }

/* info tiles under a pin */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; padding: 10px 12px 11px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); text-align: left; color: var(--text); }
button.tile { cursor: pointer; }
button.tile:hover { border-color: var(--line-2); background: var(--bg-hover); }
.tile .tl-ic { color: var(--text-3); display: grid; margin-bottom: 4px; }
.tile .tl-k { font-size: 12px; color: var(--text-3); }
.tile .tl-v { font-size: 13.5px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .tl-v.mono { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tile .tl-link { color: var(--accent-text); }
.tile .tl-act { position: absolute; top: 9px; right: 10px; color: var(--text-3); opacity: 0; transition: opacity .12s; }
.tile:hover .tl-act { opacity: 1; }
.tl-wait { display: inline-block; width: 46px; height: 12px; border-radius: 4px; background: var(--bg-3); vertical-align: middle; }

/* getting started guide (sidebar) */
.guide { margin: 4px 12px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); overflow: hidden; }
.gd-head { display: flex; align-items: center; gap: 6px; padding: 8px 6px 6px 12px; }
.gd-toggle { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; height: 30px; text-align: left; }
.gd-toggle b { font-size: 14px; font-weight: 680; }
.gd-toggle .gd-n { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.gd-toggle .i { margin-left: auto; color: var(--text-3); transition: transform .15s; }
.guide.collapsed .gd-toggle .i { transform: rotate(-90deg); }
.gd-bar { height: 4px; margin: 0 12px 6px; border-radius: 2px; background: var(--bg-3); overflow: hidden; }
.gd-bar i { display: block; height: 100%; background: var(--accent); border-radius: 2px; transition: width .3s; }
.gd-steps { list-style: none; margin: 0; padding: 2px 6px 8px; }
.guide.collapsed .gd-steps { display: none; }
.gd-steps button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; text-align: left; color: var(--text); }
.gd-steps button:hover { background: var(--bg-hover); }
.gd-steps .ok button { color: var(--text-3); cursor: default; }
.gd-steps .ok button:hover { background: none; }
.gd-steps .ok .gd-t b { font-weight: 500; text-decoration: line-through; text-decoration-color: var(--line-2); }
.gd-ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 1.5px solid var(--line-2); color: var(--text-2); }
.gd-steps .ok .gd-ic { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.gd-steps .cur .gd-ic { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.gd-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.gd-t b { font-size: 13.5px; font-weight: 600; }
.gd-t span { font-size: 12.5px; color: var(--text-2); line-height: 1.4; }
.gd-steps button > .i { color: var(--text-3); flex: none; }
.guide.all-done .gd-head { padding: 10px 6px 10px 12px; }
.guide.all-done .gd-check { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; flex: none; }
.guide.all-done .grow { display: flex; flex-direction: column; margin-left: 4px; }
.guide.all-done b { font-size: 14px; }
.guide.all-done .grow span { font-size: 12.5px; color: var(--text-3); }

/* welcome screen */
.welcome-modal { width: min(500px, 100%); }
.welcome-modal .modal-head { padding-bottom: 0; border-bottom: 0; }
.welcome-modal .modal-head h2:empty { display: none; }
.welcome-modal .modal-head { justify-content: flex-end; }
.wl-top { text-align: center; padding: 0 8px 4px; }
.wl-mark { width: 52px; height: 52px; border-radius: 15px; background: var(--accent); color: var(--on-accent); display: inline-grid; place-items: center; margin-bottom: 12px; }
.wl-mark .i { width: 28px; height: 28px; }
.wl-top h2 { margin: 0 0 6px; font-size: 23px; letter-spacing: -0.015em; font-weight: 720; }
.wl-top p { margin: 0 auto; max-width: 360px; color: var(--text-2); font-size: 14.5px; line-height: 1.5; }
.wl-opts { display: grid; gap: 8px; margin: 18px 0 6px; }
.wl-opt { display: flex; align-items: center; gap: 14px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; text-align: left; background: var(--bg); color: var(--text); }
.wl-opt:hover { border-color: var(--accent); background: var(--accent-soft); }
.wl-opt .wl-ic { width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; flex: none; }
.wl-opt:hover .wl-ic { background: var(--bg); }
.wl-opt b { display: block; font-size: 14.5px; font-weight: 650; }
.wl-opt .grow span { display: block; font-size: 13px; color: var(--text-2); margin-top: 2px; line-height: 1.4; }
.wl-opt > .i { color: var(--text-3); flex: none; }
.wl-foot { margin: 10px 0 0; text-align: center; font-size: 12.5px; color: var(--text-3); }

/* open it on your phone */
.qr-wrap { display: flex; gap: 18px; align-items: center; margin-bottom: 14px; }
.qr { width: 156px; height: 156px; flex: none; border-radius: 12px; border: 1px solid var(--line); background: #fff; padding: 6px; display: grid; place-items: center; font-size: 12px; color: var(--text-3); text-align: center; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr-text .steps-list { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
.qr-text .steps-list li + li { margin-top: 6px; }
@media (max-width: 480px) { .qr-wrap { flex-direction: column; align-items: stretch; } .qr { align-self: center; } }
.name-help .nh-alt { display: block; font-size: 12px; color: var(--text-3); margin-top: 3px; }
.name-help .nh-alt .linkish { font-size: 12px; }
