/* MN Fair Foodie Finder — brand system per DESIGN.md */
:root {
  /* Color */
  --gold: #E89C31;
  --gold-deep: #C97F1B;
  --gold-soft: #F6C778;
  --ketchup: #D64533;
  --ribbon: #2B4C9B;
  --ink: #211A16;
  --ink-60: #6E655C;
  --ink-30: #B9B0A5;
  --cream: #FFF7EC;
  --paper: #FFFFFF;
  --line: #EFE8DD;

  /* Shape */
  --r-card: 20px;
  --r-input: 14px;
  --r-pill: 999px;

  /* Elevation */
  --shadow: 0 1px 2px rgba(33,26,22,.06), 0 8px 24px rgba(33,26,22,.08);
  --shadow-lift: 0 2px 4px rgba(33,26,22,.08), 0 16px 40px rgba(33,26,22,.14);

  --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: #F4EFE7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}
#app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; margin: 0; font-family: var(--font-display); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  /* extra top padding on notched phones so the header clears the status bar */
  padding: calc(12px + env(safe-area-inset-top)) 18px 12px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-icon { display: inline-flex; }
.brand-name {
  font-family: var(--font-display); font-weight: 800; font-size: 18px;
  letter-spacing: -.01em; color: var(--ink); display: flex; flex-direction: column; line-height: 1.05;
}
.brand-eyebrow {
  font-family: var(--font-body); font-weight: 700; font-size: 9px;
  letter-spacing: .32em; color: var(--ketchup);
}
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  position: relative; background: none; border: none; color: var(--ink);
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--cream); }
.badge-dot[hidden] { display: none; }
.badge-dot {
  position: absolute; top: 2px; right: 2px; min-width: 15px; height: 15px;
  background: var(--ketchup); color: #fff; font-size: 9.5px; font-weight: 700;
  border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center; padding: 0 3px;
}
.avatar-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line);
  background: var(--cream); font-size: 17px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
}
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- main / tabbar ---------- */
#view { flex: 1; padding: 20px 18px calc(104px + env(safe-area-inset-bottom)); }
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 40;
  display: flex; background: var(--paper);
  border-top: 1px solid var(--line);
  /* lift the tap row above Safari's toolbar + home-swipe zone so taps hit tabs, not chrome */
  padding-bottom: calc(env(safe-area-inset-bottom) + 8px);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 56px; padding: 8px 0; font-size: 11px; font-weight: 600; color: var(--ink-30);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none;
}
.tab:active { background: var(--cream); }

/* segmented control (Explore: Foods | Vendors) */
.segmented {
  display: flex; gap: 4px; background: var(--cream); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px; margin: 2px 0 14px;
}
.segmented .seg {
  flex: 1; text-align: center; padding: 9px 0; border-radius: 999px;
  font-size: 13.5px; font-weight: 700; color: var(--ink-60);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.segmented .seg.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }

/* "Ate this" check-in button */
.btn.ate { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn.ate.on { background: #2f7d4f; color: #fff; border-color: #2f7d4f; }

/* Foodie Passport */
.passport { padding: 16px; }
.pp-head { display: flex; align-items: center; gap: 13px; }
.pp-badge {
  flex: none; width: 54px; height: 54px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 28px;
  background: var(--cream); border: 1px solid var(--line);
}
.pp-level { font-family: var(--font-display, inherit); font-weight: 800; font-size: 17px; line-height: 1.1; }
.pp-progress { margin-top: 12px; }
.pp-bar { height: 9px; border-radius: 999px; background: var(--cream); overflow: hidden; }
.pp-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold, #F4B63E), #e79a2b); border-radius: 999px; }
.pp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 14px; }
@media (min-width: 460px) { .pp-grid { grid-template-columns: repeat(3, 1fr); } }
.pp-ach {
  border: 1px solid var(--line); border-radius: var(--r-input); padding: 10px 8px; text-align: center;
  background: var(--paper);
}
.pp-ach.on { border-color: #2f7d4f; background: rgba(47,125,79,.07); }
.pp-ach-emoji { font-size: 22px; line-height: 1; }
.pp-ach:not(.on) .pp-ach-emoji { filter: grayscale(1); opacity: .45; }
.pp-ach-name { font-size: 12px; font-weight: 700; margin-top: 5px; line-height: 1.15; }
.pp-ach-prog { font-size: 10.5px; color: var(--ink-60); margin-top: 3px; }
.pp-ach.on .pp-ach-prog { color: #2f7d4f; font-weight: 700; }
.pp-levels { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.pp-lvl { font-size: 20px; }
.pp-lvl:not(.on) { filter: grayscale(1); opacity: .32; }
.tab svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.tab.active { color: var(--ink); }

/* ---------- photo cards ---------- */
.photo {
  position: relative; border-radius: var(--r-card); overflow: hidden;
  aspect-ratio: 16 / 10; width: 100%;
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
}
.photo .ph-emoji { font-size: 46px; opacity: .85; }
.photo.hero { aspect-ratio: 4 / 3; }
.photo.hero .ph-emoji { font-size: 76px; }
.photo.thumb { width: 64px; min-width: 64px; aspect-ratio: 1; border-radius: var(--r-input); }
.photo.thumb .ph-emoji { font-size: 26px; }
.photo.thumb .pbadge { display: none; }
.pbadge {
  position: absolute; top: 12px; left: 12px;
  background: var(--paper); color: var(--ink); font-size: 11px; font-weight: 700;
  letter-spacing: .04em; padding: 5px 12px; border-radius: var(--r-pill); box-shadow: var(--shadow);
}
.pbadge.dark { background: rgba(33,26,22,.85); color: #fff; left: auto; right: 12px; }
.pbadge.ribbon { background: var(--ribbon); color: #fff; letter-spacing: .06em; }

.pcard { display: block; border-radius: var(--r-card); }
.pcard .photo { box-shadow: var(--shadow); transition: transform .22s ease, box-shadow .22s ease; }
.pcard:hover .photo { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.pcard-body { padding: 11px 4px 0; }
.pcard-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.pcard-title { font-family: var(--font-body); font-weight: 700; font-size: 15px; }
.rate { font-size: 13px; color: var(--ink); white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; }
.rate .count { color: var(--ink-60); font-weight: 500; }
.sub { color: var(--ink-60); font-size: 13px; margin-top: 2px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 16px; margin-top: 8px; }
.hlist { display: flex; gap: 16px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hlist::-webkit-scrollbar { display: none; }
.hlist .pcard { flex: 0 0 220px; scroll-snap-align: start; }

/* ---------- generic ---------- */
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 18px; margin-bottom: 16px;
}
.section-title {
  display: flex; align-items: baseline; justify-content: space-between;
  font-family: var(--font-display); font-size: 22px; font-weight: 600;
  letter-spacing: -.01em; margin: 30px 0 14px;
}
.section-title .see-all {
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  color: var(--ink); text-decoration: underline; text-underline-offset: 3px;
}
.divider { border: none; border-top: 1px solid var(--line); margin: 26px 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--gold); color: var(--ink); border: none; border-radius: var(--r-pill);
  padding: 13px 24px; font-weight: 700; font-size: 15px;
  box-shadow: 0 6px 16px rgba(232,156,49,.35);
  transition: transform .15s ease;
}
.btn:hover { transform: translateY(-1px); background: var(--gold); }
.btn:active { background: var(--gold-deep); transform: translateY(0); }
.btn.secondary { background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); box-shadow: none; }
.btn.ghost { background: transparent; color: var(--ink-60); border: 1.5px solid var(--line); box-shadow: none; }
.btn.ghost:hover { color: var(--ink); }
.btn.small { padding: 8px 15px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.block { width: 100%; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--paper); border: 1.5px solid var(--line); color: var(--ink-60);
  border-radius: var(--r-pill); padding: 9px 16px; font-size: 13.5px; font-weight: 600;
  transition: border-color .15s; white-space: nowrap; flex-shrink: 0;
}
.chip:hover { border-color: var(--ink-30); color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.chip-row.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.chip-row.scroll::-webkit-scrollbar { display: none; }

.pill {
  display: inline-block; font-size: 11.5px; font-weight: 600; padding: 4px 11px;
  border-radius: var(--r-pill); background: var(--cream); color: var(--ink-60); margin: 0 4px 4px 0;
}
.pill.new { background: var(--ink); color: #fff; }
.pill.soldout { background: var(--ink); color: #fff; }
.pill.diet { background: var(--cream); color: var(--ink-60); }
.pill.privacy { background: var(--cream); color: var(--ink-60); }
.muted { color: var(--ink-60); font-size: 13px; }

input[type=text], input[type=email], input[type=search], input[type=number], textarea, select {
  width: 100%; padding: 12px 15px; border: 1.5px solid var(--line); border-radius: var(--r-input);
  font: inherit; font-size: 15px; background: var(--paper); color: var(--ink);
}
input:focus, textarea:focus, select:focus { border-color: var(--ink); outline: none; }
textarea { resize: vertical; min-height: 90px; }
label.field { display: block; margin-bottom: 14px; font-size: 13px; font-weight: 700; }
label.field > input, label.field > textarea, label.field > select { margin-top: 6px; font-weight: 400; }
.row { display: flex; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }

/* ---------- explore (home) ---------- */
.greet {
  font-family: var(--font-display); font-size: 30px; font-weight: 800;
  letter-spacing: -.015em; margin: 6px 0 16px;
}
.searchpill {
  display: flex; align-items: center; gap: 12px;
  border: 1.5px solid var(--line); border-radius: var(--r-pill);
  padding: 13px 20px; font-size: 15px; font-weight: 600; color: var(--ink);
  box-shadow: var(--shadow); background: var(--paper); margin-bottom: 8px;
  transition: box-shadow .2s ease;
}
.searchpill:hover { box-shadow: var(--shadow-lift); }
.searchpill svg { width: 18px; height: 18px; stroke: var(--ketchup); fill: none; stroke-width: 2.2; }
.searchpill .muted { font-weight: 400; font-size: 12.5px; }
.notice {
  display: flex; align-items: center; gap: 12px;
  background: var(--cream); border: none; border-radius: var(--r-input);
  padding: 14px 16px; font-size: 13.5px; margin: 16px 0 4px;
}
.notice b { font-weight: 700; }

.feat-owner { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--ink-60); }
.feat-owner .av {
  font-size: 15px; background: var(--cream); border-radius: 50%;
  width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
}
.feat-owner .av img { width: 100%; height: 100%; object-fit: cover; }
.vbadge { color: var(--gold-deep); font-size: 12px; }

/* category browse tiles */
.cat-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  background: var(--cream); border: none; border-radius: var(--r-card);
  padding: 16px; text-align: left; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-ico { font-size: 26px; margin-bottom: 6px; }
.cat-name { font-weight: 700; font-size: 15px; }

/* ---------- search ---------- */
.searchbox { position: relative; margin-bottom: 8px; }
.searchbox input { border-radius: var(--r-pill); padding: 14px 20px; box-shadow: var(--shadow); }
.autocomplete {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r-input); margin-top: 8px; overflow: hidden;
  box-shadow: var(--shadow-lift);
}
.autocomplete button {
  display: flex; width: 100%; text-align: left; gap: 10px; align-items: center;
  background: none; border: none; padding: 13px 18px; font-size: 14.5px;
}
.autocomplete button:hover, .autocomplete button:focus { background: var(--cream); }

/* ---------- prontopup rating ---------- */
.pup { display: inline-flex; }
.pup-ico { width: .75em; height: 1em; display: block; }
.pup .pup-body { fill: var(--gold); }
.pup .pup-stick { fill: #8C5A2B; }
.pup.off .pup-body { fill: #E9E2D7; }
.pup.off .pup-stick { fill: #D8D0C4; }
.pups { display: inline-flex; gap: 3px; font-size: 16px; align-items: center; }
.pups.big { font-size: 26px; gap: 5px; }
.pup-input { display: flex; gap: 10px; }
.pup-input button {
  background: none; border: none; padding: 6px; font-size: 32px; line-height: 0;
  transition: transform .18s cubic-bezier(.34,1.56,.64,1);
  min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
}
.pup-input button .pup-ico { width: .75em; height: 1em; }
.pup-input button .pup-body { fill: #E9E2D7; }
.pup-input button .pup-stick { fill: #D8D0C4; }
.pup-input button.on { transform: scale(1.1); }
.pup-input button.on .pup-body { fill: var(--gold); }
.pup-input button.on .pup-stick { fill: #8C5A2B; }
.rating-line { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-variant-numeric: tabular-nums; }

/* list-rating panel: centered, cream, big friendly tap targets */
.rate-panel {
  background: var(--cream); border-radius: var(--r-card);
  padding: 20px 16px 16px; text-align: center; margin-bottom: 16px;
}
.rate-panel-label { font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.rate-panel .pup-input { justify-content: center; gap: 4px; }
.rate-panel .pup-input button { font-size: 34px; }
.rate-panel-hint { font-size: 12.5px; color: var(--ink-60); margin-top: 6px; }

/* ---------- food detail ---------- */
.detail-head { margin: 6px 0 0; }
.detail-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.015em; margin: 16px 0 8px; }
.detail-meta { color: var(--ink-60); font-size: 14.5px; line-height: 1.6; }
.detail-meta b { color: var(--ink); font-weight: 700; }
.action-row { display: flex; gap: 10px; margin: 18px 0 4px; flex-wrap: wrap; }
.gallery { display: flex; gap: 10px; overflow-x: auto; margin: 14px 0; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { width: 112px; height: 112px; object-fit: cover; border-radius: var(--r-input); flex: 0 0 auto; }

/* ---------- reviews ---------- */
.review { border-top: 1px solid var(--line); padding: 18px 0; }
.review:first-child { border-top: none; padding-top: 4px; }
.review-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.review-head .av {
  font-size: 19px; width: 40px; height: 40px; background: var(--cream); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.review-head .av img { width: 100%; height: 100%; object-fit: cover; }
.review-photos { display: flex; gap: 8px; margin: 10px 0; }
.review-photos img { width: 84px; height: 84px; object-fit: cover; border-radius: var(--r-input); }
.review-actions { display: flex; gap: 18px; margin-top: 8px; }
.review-actions button {
  background: none; border: none; color: var(--ink-60); font-size: 13px; font-weight: 600; padding: 2px 0;
}
.review-actions button:hover { color: var(--ink); }
.review-actions button.on { color: var(--ketchup); }
.vendor-reply {
  background: var(--cream); border-radius: var(--r-input); padding: 11px 14px; margin-top: 10px; font-size: 13.5px;
}
.comment { display: flex; gap: 8px; margin-top: 10px; font-size: 13.5px; }
.comment .av {
  flex: 0 0 28px; height: 28px; font-size: 14px; background: var(--cream); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.comment .av img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- map ---------- */
.map-wrap { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.map-svg { display: block; width: 100%; height: auto; touch-action: manipulation; }
.map-controls { padding: 14px 16px; border-top: 1px solid var(--line); }
.map-pin { cursor: pointer; }

/* ---------- lists ---------- */
.list-row { display: flex; align-items: center; gap: 14px; }
.list-ico {
  flex: 0 0 56px; height: 56px; border-radius: var(--r-input); background: var(--cream);
  display: flex; align-items: center; justify-content: center; font-size: 24px; overflow: hidden;
}
.food-card { display: flex; gap: 14px; align-items: center; }
.food-card h3 { font-family: var(--font-body); font-size: 15px; font-weight: 700; margin: 0 0 2px; }
.food-emoji {
  flex: 0 0 56px; height: 56px; border-radius: var(--r-input); background: var(--cream);
  display: flex; align-items: center; justify-content: center; font-size: 26px;
}

/* ---------- profile ---------- */
.profile-head { text-align: center; padding: 14px 0 4px; }
.profile-av {
  width: 88px; height: 88px; border-radius: 50%; background: var(--cream); border: 1.5px solid var(--line);
  font-size: 44px; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; overflow: hidden;
}
.profile-av img { width: 100%; height: 100%; object-fit: cover; }
.stat-row { display: flex; justify-content: center; gap: 32px; margin: 18px 0; }
.stat { text-align: center; }
.stat b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11.5px; color: var(--ink-60); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.badge-chip { background: var(--ink); color: #fff; }

/* ---------- vendor / admin ---------- */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 110px; margin: 14px 4px 4px; }
.bar { flex: 1; background: var(--gold); border-radius: 6px 6px 0 0; position: relative; min-height: 4px; }
.bar span { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--ink-60); font-weight: 600; }
.bar em { position: absolute; top: -18px; left: 0; right: 0; text-align: center; font-size: 9.5px; font-style: normal; color: var(--ink-60); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { text-align: left; padding: 9px 6px; border-bottom: 1px solid var(--line); }
.table th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-60); }

/* ---------- add to home screen nudge ---------- */
.a2hs {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 85;
  width: min(460px, 92vw); background: var(--ink); color: #fff;
  border-radius: var(--r-input); padding: 13px 14px 13px 16px;
  display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow, 0 8px 30px rgba(0,0,0,.25));
  font-size: 13px; line-height: 1.4;
}
.a2hs b { color: var(--gold, #F4B63E); }
.a2hs .a2hs-x {
  flex: none; background: rgba(255,255,255,.15); color: #fff; border: 0;
  width: 30px; height: 30px; border-radius: 50%; font-size: 15px; cursor: pointer;
}

/* ---------- toasts & modal ---------- */
.toasts { position: fixed; bottom: calc(104px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 90; width: min(420px, 90vw); display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--ink); color: #fff; padding: 13px 18px; border-radius: var(--r-input);
  box-shadow: var(--shadow-lift); font-size: 13.5px; font-weight: 600;
  display: flex; gap: 8px; align-items: center; animation: pop .2s ease-out;
}
.toast.push { background: var(--ketchup); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 80; background: rgba(33,26,22,.45);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  background: var(--paper); width: 100%; max-width: 520px; border-radius: var(--r-card) var(--r-card) 0 0;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); max-height: 86vh; overflow-y: auto;
  animation: slideup .24s ease-out;
}
@keyframes slideup { from { transform: translateY(40px); opacity: .4; } }
.modal h2 { margin: 0 0 16px; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.modal-close { float: right; background: none; border: none; font-size: 18px; color: var(--ink-60); }

/* ---------- onboarding ---------- */
.onboard { text-align: center; padding: 28px 4px; }
.onboard .big-ico { font-size: 52px; }
.onboard h1 { font-size: 28px; margin: 14px 0 6px; font-weight: 800; letter-spacing: -.015em; }
.onboard-mark { display: inline-flex; }
.avatar-pick { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0; }
.avatar-pick button {
  width: 46px; height: 46px; font-size: 24px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--paper);
}
.avatar-pick button.on { border: 2px solid var(--ink); background: var(--cream); }
.oauth-btn {
  width: 100%; margin-bottom: 9px; background: var(--paper); border: 1.5px solid var(--line);
  border-radius: var(--r-input); padding: 13px; font-weight: 700; font-size: 14.5px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.oauth-btn:hover { background: var(--cream); }

.empty { text-align: center; color: var(--ink-60); padding: 34px 10px; font-size: 14.5px; line-height: 1.6; }
.empty .big { font-size: 36px; display: block; margin-bottom: 10px; }
