/* We Are Foilers · "Morning Glass" design
   Light, airy, ocean teal + a little sunshine. Mobile first. */
:root {
  --bg: #FFFFFF;
  --bg-soft: #F6FAFB;
  --ink: #0F2A3A;
  --ink-2: #3B5566;
  --muted: #7A8B96;
  --line: #DCE5EA;
  --line-soft: #EDF2F5;
  --accent: #18B2A2;
  --accent-ink: #0E8A7D;
  --accent-soft: #E2F6F3;
  --sun: #FFB648;
  --sun-soft: #FFF3DC;
  --coral: #FF7A59;
  --danger: #D9534F;
  --sea: #EEF7FA;

  --c-private: #18B2A2;
  --c-school: #FFB648;
  --c-shop: #0F2A3A;

  --r-sm: 12px;
  --r: 18px;
  --r-lg: 26px;
  --shadow: 0 12px 32px -14px rgba(15, 42, 58, .22);
  --shadow-sm: 0 4px 14px -6px rgba(15, 42, 58, .18);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --top-h: 60px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }
a { color: var(--accent-ink); }
button { font: inherit; color: inherit; }
svg { display: block; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; cursor: pointer; text-decoration: none;
  font-weight: 700; font-size: 14px; padding: 10px 16px; border-radius: 14px; background: var(--ink); color: #fff; transition: transform .12s, background .2s, box-shadow .2s; white-space: nowrap; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn:active { transform: scale(.97); }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.btn.accent { background: var(--accent); }
.btn.soft { background: var(--bg-soft); color: var(--ink); }
.btn.danger { background: #fff; color: var(--danger); box-shadow: inset 0 0 0 1.5px #F1C9C7; }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.locked { color: var(--ink-2); }
.icon-btn { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { background: var(--bg-soft); }
.icon-btn svg { width: 20px; height: 20px; }
.link-btn { border: 0; background: none; padding: 4px 0; cursor: pointer; color: var(--muted); font-size: 12.5px; font-weight: 600; display: inline-flex; gap: 5px; align-items: center; }
.link-btn svg { width: 14px; height: 14px; }
.link-btn:hover { color: var(--ink); }

/* ---------- Top bar ---------- */
.topbar { position: fixed; inset: 0 0 auto 0; height: var(--top-h); z-index: 1200; display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px 0 16px; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft); }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 17px; letter-spacing: -0.02em; }
.logo svg { width: 26px; height: 26px; color: var(--accent); }
.top-actions { display: flex; align-items: center; gap: 4px; }
.me-btn { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 99px; border: 0; background: var(--bg-soft); cursor: pointer; font-weight: 700; font-size: 13.5px; }
.me-btn .avatar { width: 32px; height: 32px; font-size: 13px; border-width: 2px; }

/* ---------- Layout ---------- */
.layout { position: fixed; inset: var(--top-h) 0 0 0; }
#map { position: absolute; inset: 0; background: var(--sea); }

/* Finder (search + filter chips) floats over the map on mobile */
.finder { position: absolute; z-index: 1001; top: 10px; left: 0; right: 0; pointer-events: none; }
.finder > * { pointer-events: auto; }
.search { display: flex; align-items: center; gap: 4px; margin: 0 12px; background: #fff; border-radius: 99px; padding: 4px 4px 4px 14px; box-shadow: var(--shadow); }
.search > svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 15px; padding: 8px 6px; background: transparent; color: var(--ink); }
.search input::placeholder { color: var(--muted); }
.search .icon-btn { width: 38px; height: 38px; border-radius: 99px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 0; cursor: pointer; font-weight: 700; font-size: 13px; padding: 7px 13px; border-radius: 99px;
  background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line), var(--shadow-sm); transition: background .15s, color .15s; }
.chip svg { width: 15px; height: 15px; }
.chip.on { background: var(--ink); color: #fff; box-shadow: var(--shadow-sm); }
.chip .count { background: var(--accent); color: #fff; border-radius: 99px; font-size: 11px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 5px; }
.finder .chips .chip.plain { box-shadow: inset 0 0 0 1.5px var(--line); }

/* ---------- Panel (bottom sheet on mobile, sidebar on desktop) ---------- */
.panel { position: absolute; z-index: 1100; left: 0; right: 0; bottom: 0; background: #fff; border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: 0 -10px 40px -18px rgba(15,42,58,.3); display: flex; flex-direction: column; max-height: calc(100% - 64px);
  transition: height .32s cubic-bezier(.2,.8,.2,1); height: 132px; padding-bottom: env(safe-area-inset-bottom); }
.panel[data-size="half"] { height: 58%; }
.panel[data-size="full"] { height: calc(100% - 64px); }
.grip { flex: none; height: 26px; display: grid; place-items: center; cursor: grab; border: 0; background: none; width: 100%; touch-action: none; }
.grip span { width: 40px; height: 5px; border-radius: 9px; background: var(--line); }
.panel-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 24px; -webkit-overflow-scrolling: touch; }

.panel-head { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.panel-head h2 { font-size: 19px; }
.panel-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.panel-head .grow { flex: 1; min-width: 0; }
.quip { color: var(--muted); font-size: 13.5px; display: flex; gap: 6px; align-items: center; }
.quip svg { width: 15px; height: 15px; color: var(--accent); flex: none; }

/* ---------- List rows ---------- */
.rows { display: grid; gap: 2px; margin: 0 -8px; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; background: none; border-radius: 16px; padding: 9px 8px; cursor: pointer; }
.row:hover { background: var(--bg-soft); }
.row-main { flex: 1; min-width: 0; display: grid; }
.row-name { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.row-sub, .row-disc { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-disc { color: var(--ink-2); font-weight: 600; }
.row-icons { display: flex; gap: 2px; color: var(--accent); }
.row-icons i svg { width: 16px; height: 16px; }
.mini-badge { width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; }
.mini-badge svg { width: 11px; height: 11px; }
.mini-pill { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 1px 7px; border-radius: 99px; }

/* ---------- Avatars ---------- */
.avatar { width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 19px;
  background-size: cover; background-position: center; text-shadow: 0 1px 6px rgba(0,0,0,.12); position: relative; }
.avatar.sm { width: 46px; height: 46px; font-size: 18px; }
.avatar.lg { width: 64px; height: 64px; font-size: 25px; }
.avatar.xl { width: 92px; height: 92px; font-size: 36px; }
.avatar.t-school, .avatar.t-shop { border-radius: 30%; }

/* ---------- Card ---------- */
.card { border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line-soft); box-shadow: var(--shadow); padding: 18px; }
.card-top { display: flex; gap: 14px; align-items: center; }
.who { flex: 1; min-width: 0; }
.who h3 { font-size: 22px; font-weight: 800; }
.name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.loc { font-size: 13px; color: var(--muted); display: flex; align-items: flex-start; gap: 5px; margin-top: 3px; line-height: 1.35; }
.loc svg { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.loc.travel { color: var(--accent-ink); font-weight: 700; }
.pill { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 4px 9px; border-radius: 99px; }
.pill svg { width: 12px; height: 12px; }
.pill.t-private, .mini-pill.t-private { background: var(--accent-soft); color: var(--accent-ink); }
.pill.t-school, .mini-pill.t-school { background: var(--sun-soft); color: #A86800; }
.pill.t-shop, .mini-pill.t-shop { background: #E7EDF1; color: var(--ink); }
.pill.away { background: var(--accent); color: #fff; }
.stats { margin: 16px 0 12px; display: grid; gap: 8px; }
.stat { display: flex; align-items: center; font-size: 14px; font-weight: 700; }
.lvl { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.lvl small { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-right: 6px; }
.dot { width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line); }
.dot.on { background: var(--accent); box-shadow: none; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12.5px; font-weight: 700; display: inline-flex; gap: 5px; align-items: center; padding: 5px 10px; border-radius: 99px; background: var(--bg-soft); }
.tag svg { width: 14px; height: 14px; color: var(--accent); }
.gear { display: flex; gap: 7px; align-items: center; font-size: 13px; color: var(--ink-2); margin-top: 12px; }
.gear svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.about { margin-top: 12px; font-size: 14.5px; color: var(--ink-2); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.demo-tag { font-size: 11px; font-weight: 700; color: var(--muted); background: var(--bg-soft); padding: 2px 8px; border-radius: 99px; }

.back { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 10px -6px; }
.back svg { width: 18px; height: 18px; }

/* ---------- Empty, banners ---------- */
.empty { text-align: center; padding: 24px 12px; color: var(--ink-2); }
.empty .doodle { width: 54px; height: 54px; margin: 0 auto 10px; color: var(--accent); }
.empty h3 { font-size: 17px; margin-bottom: 4px; }
.empty p { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--sun-soft); color: #7A4D00; font-size: 13.5px; margin-bottom: 12px; }
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.notice.teal { background: var(--accent-soft); color: var(--accent-ink); }
.notice.red { background: #FDECEC; color: #9B2C2C; }
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.demo-badge { background: var(--sun-soft); color: #A86800; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 99px; cursor: pointer; border: 0; }

/* ---------- Me / travel switch ---------- */
.switch2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--bg-soft); border-radius: 18px; margin: 4px 0 14px; }
.switch2 button { border: 0; background: none; border-radius: 14px; padding: 10px 8px; cursor: pointer; text-align: left; display: grid; gap: 1px; min-width: 0; }
.switch2 button b { display: flex; align-items: center; gap: 6px; font-size: 13.5px; }
.switch2 button b svg { width: 16px; height: 16px; }
.switch2 button span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switch2 button.on { background: #fff; box-shadow: var(--shadow-sm); }
.switch2 button.on b { color: var(--accent-ink); }
.me-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.me-links { display: flex; justify-content: center; gap: 18px; margin-top: 16px; }

/* ---------- Footer ---------- */
.foot { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line-soft); font-size: 12.5px; color: var(--muted); text-align: center; display: grid; gap: 8px; }
.foot nav { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.foot a, .foot button { color: var(--ink-2); text-decoration: none; font-weight: 600; background: none; border: 0; cursor: pointer; padding: 0; font-size: 12.5px; }
.foot .heart { color: var(--coral); display: inline-block; width: 13px; height: 13px; vertical-align: -2px; }
.foot-contact a { display: inline-flex; align-items: center; gap: 5px; }
.foot-contact svg { width: 14px; height: 14px; }
.faq + .foot-contact { margin-top: 18px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; font-size: 13px; }
.faq + .foot-contact a { color: var(--ink-2); font-weight: 600; text-decoration: none; }

/* ---------- Map pins ---------- */
.leaflet-container { font-family: var(--font); background: var(--sea); }
.pin-wrap { background: none; border: 0; }
.pin { position: relative; width: 40px; height: 40px; transition: transform .15s; }
.pin .avatar { width: 40px; height: 40px; font-size: 16px; border: 3px solid #fff; box-shadow: 0 6px 16px -6px rgba(15,42,58,.5); }
.pin.sel { transform: scale(1.2); z-index: 1000; }
.pin .badge { position: absolute; right: -5px; bottom: -4px; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; border: 2px solid #fff; color: #fff; }
.pin .badge svg { width: 11px; height: 11px; }
.pin .badge.school { background: var(--c-school); }
.pin .badge.shop { background: var(--c-shop); }
.pin .badge.away { background: var(--accent); }
.halo { fill: var(--accent); fill-opacity: .12; stroke: var(--accent); stroke-opacity: .55; stroke-dasharray: 4 6; stroke-width: 1.5; }
.cluster-wrap { background: none; }
.cluster { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--accent-ink); font-weight: 800; font-size: 14px;
  box-shadow: 0 0 0 6px rgba(24,178,162,.18), 0 8px 18px -8px rgba(15,42,58,.45); }
.cluster.big { width: 52px; height: 52px; font-size: 15px; }
.leaflet-control-zoom { border: 0 !important; box-shadow: var(--shadow-sm) !important; border-radius: 14px !important; overflow: hidden; }
.leaflet-control-zoom a { width: 38px !important; height: 38px !important; line-height: 38px !important; color: var(--ink) !important; border-color: var(--line-soft) !important; }
.leaflet-control-attribution { font-size: 10px; background: rgba(255,255,255,.7) !important; border-radius: 8px 0 0 0; }
@media (max-width: 899px) {
  .leaflet-control-zoom { display: none; }
  .leaflet-bottom.leaflet-right { bottom: 134px; }
}

/* ---------- Dialogs ---------- */
dialog { border: 0; padding: 0; background: #fff; color: var(--ink); width: 100%; max-width: 100%; max-height: 100%; height: 100%; margin: 0; }
dialog::backdrop { background: rgba(15,42,58,.35); backdrop-filter: blur(2px); }
.dlg { display: flex; flex-direction: column; height: 100%; }
.dlg-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px 20px; border-bottom: 1px solid var(--line-soft); }
.dlg-head h2 { flex: 1; font-size: 19px; }
.dlg-body { flex: 1; overflow-y: auto; padding: 18px 20px 24px; }
.dlg-foot { padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-soft); display: flex; gap: 8px; background: #fff; }
.dlg-foot .btn { flex: 1; }
dialog.small .dlg-body { flex: none; }

/* ---------- Forms ---------- */
.field { margin-bottom: 20px; }
.field > label, .field > .label { display: block; font-weight: 800; font-size: 14px; margin-bottom: 7px; }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.field .hint.err { color: var(--danger); font-weight: 600; }
.input, textarea.input, select.input { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--bg-soft); border: 1.5px solid transparent; border-radius: 14px; padding: 11px 14px; outline: 0; transition: border .15s, background .15s; }
.input:focus { border-color: var(--accent); background: #fff; }
textarea.input { resize: vertical; min-height: 84px; }
.input-row { display: flex; gap: 8px; }
.input-row .input { flex: 1; min-width: 0; }
.prefix { position: relative; }
.prefix > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.prefix .input { padding-left: 32px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--bg-soft); border-radius: 16px; }
.seg button { border: 0; background: none; padding: 10px 6px; border-radius: 12px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.pick { display: flex; flex-wrap: wrap; gap: 7px; }
.pick .chip { box-shadow: inset 0 0 0 1.5px var(--line); }
.pick .chip.on { box-shadow: none; }
.levels { display: grid; gap: 8px; margin-top: 12px; }
.level-row { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; background: var(--bg-soft); border-radius: 14px; }
.level-row b { font-size: 14px; flex: 1; }
.level-pick { display: flex; gap: 3px; }
.level-pick button { border: 0; cursor: pointer; width: 34px; height: 30px; border-radius: 9px; background: #fff; display: grid; place-items: center; }
.level-pick button span { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line); }
.level-pick button.on span { background: var(--accent); box-shadow: none; }
.level-name { font-size: 11.5px; color: var(--muted); width: 74px; text-align: right; }
.photo-row { display: flex; align-items: center; gap: 16px; }
.photo-row .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.results { margin-top: 8px; display: grid; gap: 2px; }
.results button { text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 12px; cursor: pointer; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.results button svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.results button:hover { background: var(--bg-soft); }
.chosen { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 14px; }
.chosen svg { width: 18px; height: 18px; flex: none; }
.chosen span { flex: 1; }
.chosen button { border: 0; background: none; color: var(--accent-ink); font-weight: 700; cursor: pointer; text-decoration: underline; font-size: 13px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; margin: 1px 0 0; }
.radio-list { display: grid; gap: 6px; }
.radio-list label { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-radius: 14px; background: var(--bg-soft); cursor: pointer; font-weight: 600; font-size: 14px; }
.radio-list input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.section-title { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 26px 0 12px; }
.section-title:first-child { margin-top: 0; }
.counter { float: right; font-weight: 600; color: var(--muted); font-size: 12px; }
.auth-hero { text-align: center; margin: 4px 0 22px; }
.auth-hero .doodle { width: 56px; height: 56px; margin: 0 auto 10px; color: var(--accent); }
.auth-hero h3 { font-size: 22px; margin-bottom: 6px; }
.auth-hero p { color: var(--muted); font-size: 14px; }
.faq h4 { font-size: 15px; margin: 18px 0 4px; }
.faq p { color: var(--ink-2); font-size: 14px; }

/* ---------- Toast ---------- */
.toast { position: fixed; z-index: 3000; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 14px;
  font-weight: 700; font-size: 14px; box-shadow: var(--shadow); transition: opacity .2s, transform .2s; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
  .finder { top: 0; left: 0; width: 400px; padding-top: 14px; z-index: 1150; }
  .search { margin: 0 16px; box-shadow: none; background: var(--bg-soft); }
  .chips { padding: 12px 16px 10px; flex-wrap: wrap; overflow: visible; }
  .chip { box-shadow: inset 0 0 0 1.5px var(--line); }
  .chip.on { box-shadow: none; }
  #map { left: 400px; }
  .panel { top: 0; bottom: 0; left: 0; right: auto; width: 400px; height: auto !important; max-height: none; border-radius: 0; box-shadow: none; border-right: 1px solid var(--line-soft); padding-top: var(--finder-h, 110px); }
  .grip { display: none; }
  .panel-body { padding: 8px 16px 24px; }
  dialog { width: 560px; height: auto; max-height: min(860px, calc(100% - 48px)); margin: auto; border-radius: var(--r-lg); box-shadow: var(--shadow); }
  dialog.small { width: 440px; }
  .dlg { max-height: min(860px, calc(100vh - 48px)); }
}

/* doodles are spans, give them a box */
.doodle { display: block; }
.doodle svg { width: 100%; height: 100%; }

/* ---------- Admin ---------- */
body.admin { background: var(--bg-soft); height: auto; }
.adm { max-width: 860px; margin: 0 auto; padding: calc(var(--top-h) + 20px) 16px 60px; }
.adm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.adm-stats div { background: #fff; border-radius: var(--r); padding: 14px; display: grid; box-shadow: var(--shadow-sm); }
.adm-stats b { font-size: 26px; letter-spacing: -0.02em; }
.adm-stats span { color: var(--muted); font-size: 13px; }
.adm-setting { display: flex; gap: 16px; align-items: center; background: #fff; border-radius: var(--r); padding: 14px 16px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.adm-setting > div { flex: 1; }
.adm-setting p { font-size: 13px; margin-top: 2px; }
.toggle { width: 52px; height: 30px; flex: none; border: 0; border-radius: 99px; background: var(--line); cursor: pointer; position: relative; transition: background .2s; }
.toggle span { position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s; }
.toggle.on { background: var(--accent); }
.toggle.on span { transform: translateX(22px); }
.adm-tabs { margin-bottom: 14px; background: #fff; }
.adm-tabs button.on { background: var(--bg-soft); box-shadow: none; }
.count-dot { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11px; margin-left: 4px; }
.adm-item { background: #fff; border-radius: var(--r); padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow-sm); display: grid; gap: 12px; }
.adm-main { display: flex; gap: 12px; align-items: flex-start; }
.adm-text { flex: 1; min-width: 0; }
.adm-name { font-weight: 800; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.adm-sub { font-size: 12.5px; color: var(--muted); display: flex; gap: 4px; align-items: center; margin-top: 2px; }
.adm-sub svg { width: 13px; height: 13px; flex: none; }
.adm-about { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; }
.adm-report { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 8px; padding: 8px 10px; border-radius: 12px; background: #FDECEC; color: #9B2C2C; font-size: 13px; }
.adm-report > svg { width: 15px; height: 15px; flex: none; }
.adm-report > span { flex: 1; min-width: 180px; }
.adm-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.mini-pill.blocked { background: #FDECEC; color: #9B2C2C; }
@media (min-width: 700px) {
  .adm-item { grid-template-columns: 1fr auto; align-items: center; }
  .adm-acts { justify-content: flex-end; max-width: 300px; }
}

/* small phones: keep the top bar on one line */
.logo { white-space: nowrap; }
@media (max-width: 420px) {
  .me-btn .label { display: none; }
  .me-btn { padding: 4px; }
  .logo { font-size: 16px; }
}

/* ---------- Partner check & auto entries ---------- */
.avatar .verified { position: absolute; right: -3px; top: -3px; width: 38%; height: 38%; min-width: 15px; min-height: 15px; max-width: 24px; max-height: 24px; display: block; filter: drop-shadow(0 1px 2px rgba(15,42,58,.25)); }
.avatar .verified svg { width: 100%; height: 100%; }
.avatar .verified svg circle { stroke: #fff; stroke-width: 2; }
.partner-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800; color: #2F80ED; }
.partner-tag svg { width: 14px; height: 14px; }
.auto-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; padding: 10px 12px; border-radius: 14px; background: var(--bg-soft); font-size: 12.5px; color: var(--ink-2); }
.auto-note > svg { width: 17px; height: 17px; flex: none; color: var(--muted); margin-top: 1px; }
.link-btn.strong { color: var(--accent-ink); font-weight: 800; padding: 0; font-size: 12.5px; text-decoration: underline; }
.partner-box { margin-top: 16px; padding: 14px; border-radius: var(--r); background: linear-gradient(135deg, #EAF3FE, #E8F7F5); }
.partner-box h4 { display: flex; align-items: center; gap: 6px; font-size: 15px; margin-bottom: 4px; }
.partner-box h4 svg { width: 18px; height: 18px; }
.partner-box p { font-size: 13px; color: var(--ink-2); margin-bottom: 10px; }
.copy-row { display: flex; gap: 8px; align-items: center; background: var(--bg-soft); border-radius: 14px; padding: 6px 6px 6px 14px; font-weight: 700; font-size: 14px; }
.copy-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-flag { display: flex; gap: 8px; align-items: center; margin-top: 8px; padding: 8px 10px; border-radius: 12px; font-size: 13px; }
.adm-flag > svg { width: 16px; height: 16px; flex: none; }
.adm-flag.teal { background: var(--accent-soft); color: var(--accent-ink); }
.adm-flag.blue { background: #EAF3FE; color: #1D5FB8; }
.adm-flag a { color: inherit; font-weight: 700; word-break: break-all; }
.adm-help { font-size: 13px; margin: -4px 0 12px; }
.adm-tabs { grid-auto-columns: auto; overflow-x: auto; }
.adm-tabs button { white-space: nowrap; padding: 10px 12px; }
.btn.small svg circle { stroke: none; }

/* ---------- Legal pages ---------- */
body.legal { background: #fff; }
.legal .adm { max-width: 720px; }
.legal h1 { font-size: 32px; margin: 14px 0 18px; }
.legal h2 { font-size: 19px; margin: 28px 0 8px; }
.legal h3 { font-size: 15.5px; margin: 18px 0 4px; }
.legal p, .legal li { color: var(--ink-2); margin: 0 0 10px; }
.legal ul { padding-left: 20px; }
.legal .small { font-size: 12.5px; margin-top: 30px; }
.todo { background: var(--sun-soft); color: #A86800; padding: 1px 6px; border-radius: 6px; font-weight: 700; }
