/* StartPage v2 · Akena Design
   Colors are tokens on :root; dark mode redefines them (system setting, or the toggle's data-theme). */

:root {
  color-scheme: light;
  --bg: #f4f4f4;
  --surface: #ffffff;
  --surface-2: #f1f4f8;
  --surface-3: #e7ecf2;
  --border: #e3e8ef;
  --border-strong: #cdd5df;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --brand: #159531;
  --brand-strong: #0e7c3a;
  --brand-soft: #e7f5e9;
  --brand-ink: #ffffff;
  --brand-glow: rgba(31, 170, 29, 0.16);
  --star: #f59e0b;
  --danger: #dc2626;
  --danger-soft: #fdeded;
  --icon-bg: #f1f4f8;
  --arrow-bg: #e5e8ed;
  --topbar: #f4f4f4;
  --search-bg: #f7f7f7;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 24px -14px rgba(15, 23, 42, 0.16);
  --shadow-lg: 0 24px 60px -18px rgba(15, 23, 42, 0.35), 0 2px 6px rgba(15, 23, 42, 0.06);
  --ring: 0 0 0 3px rgba(21, 149, 49, 0.28);
  --backdrop: rgba(2, 6, 23, 0.5);
  --radius: 16px;
  --radius-sm: 10px;
  --top-h: 64px;
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a0f16;
    --surface: #111821;
    --surface-2: #17202b;
    --surface-3: #1e2935;
    --border: #212d3b;
    --border-strong: #2e3d50;
    --text: #e7edf4;
    --text-2: #c2ccd8;
    --muted: #8b99aa;
    --brand: #3cc75a;
    --brand-strong: #6ee38a;
    --brand-soft: rgba(60, 199, 90, 0.13);
    --brand-ink: #03140c;
    --brand-glow: rgba(60, 199, 90, 0.12);
    --star: #fbbf24;
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.12);
    --icon-bg: #e9eef4;
    --arrow-bg: #1e2935;
    --topbar: rgba(10, 15, 22, 0.8);
    --search-bg: #17202b;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 28px -16px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 24px 60px -16px rgba(0, 0, 0, 0.75), 0 2px 6px rgba(0, 0, 0, 0.4);
    --ring: 0 0 0 3px rgba(60, 199, 90, 0.32);
    --backdrop: rgba(0, 0, 0, 0.62);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0f16;
  --surface: #111821;
  --surface-2: #17202b;
  --surface-3: #1e2935;
  --border: #212d3b;
  --border-strong: #2e3d50;
  --text: #e7edf4;
  --text-2: #c2ccd8;
  --muted: #8b99aa;
  --brand: #3cc75a;
  --brand-strong: #6ee38a;
  --brand-soft: rgba(60, 199, 90, 0.13);
  --brand-ink: #03140c;
  --brand-glow: rgba(60, 199, 90, 0.12);
  --star: #fbbf24;
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.12);
  --icon-bg: #e9eef4;
  --arrow-bg: #1e2935;
  --topbar: rgba(10, 15, 22, 0.8);
  --search-bg: #17202b;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 28px -16px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 24px 60px -16px rgba(0, 0, 0, 0.75), 0 2px 6px rgba(0, 0, 0, 0.4);
  --ring: 0 0 0 3px rgba(60, 199, 90, 0.32);
  --backdrop: rgba(0, 0, 0, 0.62);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--brand-strong); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.015em; }
p { margin: 0; }
img { max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }
kbd { font: 600 12px/1 var(--font); padding: 3px 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }

.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.i.fill { fill: currentColor; stroke: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.grow { flex: 1; }
.only-sm { display: none !important; }

.page { width: 100%; max-width: 1040px; margin: 0 auto; padding: 24px 20px; flex: 1; }
.narrow { max-width: 640px; margin: 0 auto; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--topbar);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}
.topbar-in { max-width: 1040px; margin: 0 auto; height: var(--top-h); padding: 0 20px; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); flex: none; }
.brand:hover { text-decoration: none; }
.brand-logo { display: block; height: 46px; width: auto; }

.search { position: relative; flex: 1; max-width: 520px; margin: 0 auto; display: flex; align-items: center; }
.search > .i { position: absolute; left: 13px; color: var(--muted); pointer-events: none; width: 18px; height: 18px; }
.search input {
  width: 100%; height: 42px; padding: 0 44px 0 40px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--search-bg);
  font-size: 14.5px; transition: border-color .15s, background .15s, box-shadow .15s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; background: var(--surface); border-color: var(--brand); box-shadow: var(--ring); }
.search .kbd { position: absolute; right: 12px; pointer-events: none; }
.search input:focus ~ .kbd { display: none; }
.search-big { max-width: none; margin: 16px 0 0; }
.search-big input { height: 52px; font-size: 16px; border-radius: 14px; background: var(--surface); }

.top-actions { display: flex; align-items: center; gap: 6px; flex: none; }
/* Wide screens: the logo fills a 230px column (less 10px each side, matching the profile column);
   the search box is at most 384px wide, centered between the logo and the icons. */
@media (min-width: 861px) {
  :root { --top-h: 72px; }
  .topbar-in { display: grid; grid-template-columns: 230px minmax(0, 1fr) auto; column-gap: 16px; }
  .brand { width: 210px; margin: 0 10px; justify-content: center; gap: 11px; }
  .brand-logo { height: 52px; }
  .search { width: 100%; max-width: 384px; margin: 0 auto; }
}
.iconbtn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 11px; border: 0; background: transparent; color: var(--text-2);
  transition: background .15s, color .15s; flex: none; list-style: none;
}
.iconbtn:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.iconbtn.is-active { color: var(--brand); background: var(--brand-soft); }
.iconbtn::-webkit-details-marker { display: none; }
.badge, .stats .badge {
  position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--danger); color: #fff; font: 700 11px/18px var(--font); text-align: center; font-style: normal;
  box-shadow: 0 0 0 2px var(--surface);
}
.avatar-btn { list-style: none; cursor: pointer; display: inline-flex; padding: 3px; border-radius: 50%; }
.avatar-btn::-webkit-details-marker { display: none; }
.avatar-btn:hover .av { box-shadow: 0 0 0 2px var(--brand-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 11px; border: 1px solid transparent;
  font: 650 14px/1 var(--font); white-space: nowrap; text-decoration: none !important;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn .i { width: 18px; height: 18px; }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 6px 14px -8px rgba(21, 149, 49, .8); }
.btn-add { box-shadow: none; }
.btn-primary:hover { background: var(--brand-strong); color: var(--brand-ink); }
.btn-soft { background: var(--brand-soft); color: var(--brand-strong); }
.btn-soft:hover { background: var(--brand); color: var(--brand-ink); }
.btn-ghost { background: var(--surface); color: var(--text-2); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger, .btn-ghost.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; gap: 6px; }
.btn-sm .i { width: 16px; height: 16px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 13px; }
.btn-block { width: 100%; }
.btn.is-disabled, .btn:disabled { opacity: .45; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.is-following:hover { background: var(--danger-soft); color: var(--danger); }

/* ---------- Layout ---------- */
.layout {
  display: grid; column-gap: 28px; row-gap: 0; align-items: start;
  grid-template-columns: 230px minmax(0, 1fr);
  grid-template-areas: "profile install" "profile main";
  /* The install row stays as tall as its bar (none when hidden); a taller profile card stretches only the list row */
  grid-template-rows: auto 1fr;
}
.col-profile { grid-area: profile; position: sticky; top: calc(var(--top-h) + 20px); display: grid; gap: 16px; }
.col-profile .card + .card { margin-top: 0; }
.col-main { grid-area: main; min-width: 0; }
.install-bar { grid-area: install; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 16px; }
.card-title { font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.page-head { margin-bottom: 18px; }
.page-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.page-head p { color: var(--muted); margin-top: 4px; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 750; margin: 26px 0 10px; color: var(--text-2); }
.section-title small { color: var(--muted); font-weight: 600; }
.section-title .i { color: var(--brand); width: 18px; height: 18px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; font-size: 14px; margin-bottom: 12px; }
.back-link .i { width: 18px; height: 18px; }

/* ---------- Avatars ---------- */
.av {
  position: relative; display: inline-grid; place-items: center; flex: none;
  border-radius: 50%; overflow: hidden; background: var(--brand-soft); color: var(--brand-strong); font-weight: 800;
}
.av::before { content: attr(data-i); }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.av-sm { width: 32px; height: 32px; font-size: 13px; }
.av-md { width: 42px; height: 42px; font-size: 16px; }
.av-xl { width: 92px; height: 92px; font-size: 34px; box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--border); }

/* ---------- Profile ---------- */
.profile { padding: 20px 18px; }
.profile-top { display: flex; flex-direction: column; gap: 14px; }
.profile-top > .av { align-self: center; }
.profile-name { font-size: 21px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.profile-user { color: var(--muted); font-weight: 600; font-size: 14px; }
.profile-loc, .profile-url { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.profile-loc .i, .profile-url .i { width: 16px; height: 16px; }
.profile-url { color: var(--brand-strong); font-weight: 600; }
.profile-bio { margin-top: 12px; font-size: 13px; color: var(--text-2); }
.profile-actions { margin-top: 16px; }
.stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; column-gap: 8px; margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; }
.stats a { position: relative; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; color: var(--text); padding-right: 2px; }
.stats a:hover { text-decoration: none; }
.stats a:hover span { color: var(--brand-strong); }
.stats b { font-size: 18px; font-weight: 800; }
.stats span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.stats .badge { top: -6px; right: auto; left: 40px; }
.lk-lock { display: inline-flex; color: var(--muted); }
.lk-lock .i { width: 15px; height: 15px; }

/* ---------- Install bar ---------- */
.install-bar {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 12px 12px 12px 14px;
  border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
  background: linear-gradient(110deg, var(--brand-soft), var(--surface) 85%);
  box-shadow: var(--shadow-sm);
  animation: drop .35s ease-out;
}
.install-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, #1faa1d, #0b8145); color: #fff; flex: none; }
.install-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.install-txt b { font-size: 14.5px; }
.install-txt span { font-size: 13px; color: var(--muted); }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Tabs ---------- */
.tabs { margin-bottom: 18px; }
.tabs-in {
  display: flex; gap: 4px; padding: 4px; border-radius: 13px; background: var(--surface); border: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.tabs-in::-webkit-scrollbar { display: none; }
/* A page's own sub-tabs (Discover: Newest / Popular / People) sit on the right */
.tabs-sub { display: flex; justify-content: flex-end; }
.tabs-sub .tabs-in { max-width: 100%; }
.tab {
  display: inline-flex; align-items: center; gap: 7px; flex: none; height: 38px; padding: 0 14px; border-radius: 10px;
  color: var(--muted); font-weight: 650; font-size: 14px; transition: background .15s, color .15s;
}
.tab .i { width: 17px; height: 17px; }
.tab:hover { color: var(--text); text-decoration: none; background: color-mix(in srgb, var(--surface) 60%, transparent); }
.tab.is-active { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--brand); }
.tab.is-active .i { color: var(--brand); }

/* ---------- List head ---------- */
.list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.list-head h2 { font-size: 21px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.list-head p { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.list-tools { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); font-weight: 600; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); flex: none; }
.seg button, .seg a {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; min-width: 36px; padding: 0 10px;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 650; font-size: 13px;
}
.seg button .i, .seg a .i { width: 17px; height: 17px; }
.seg a:hover { text-decoration: none; color: var(--text); }
.seg [aria-pressed="true"], .seg [aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }

/* ---------- Bookmarks ---------- */
.links { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.lk { position: relative; display: flex; align-items: center; gap: 13px; padding: 9px 14px; border-top: 1px solid var(--border); transition: background .12s; }
.lk:first-child { border-top: 0; border-radius: var(--radius) var(--radius) 0 0; }
.lk:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.lk:only-child { border-radius: var(--radius); }
.lk:hover { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.lk-ico {
  position: relative; display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 11px;
  background: var(--icon-bg); border: 1px solid var(--border); overflow: hidden; text-decoration: none !important;
}
.lk-ico img { width: 22px; height: 22px; border-radius: 4px; }
.lk-ico.is-custom img { width: 100%; height: 100%; border-radius: 0; object-fit: cover; }
.lk-ico.no-img { background: var(--brand-soft); border-color: transparent; }
.lk-ico.no-img::after { content: attr(data-i); font-weight: 800; font-size: 17px; color: var(--brand-strong); }
.lk-ico-lg { width: 72px; height: 72px; border-radius: 18px; }
.lk-ico-lg img { width: 36px; height: 36px; }
.lk-body { flex: 1; min-width: 0; }
.lk-name { display: block; color: var(--text); font-weight: 700; font-size: 15px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Titles look the same whether hovered or already visited */
.lk-name:hover, .lk-name:visited { color: var(--text); text-decoration: none; }
/* The whole tile opens the link; the buttons and names on it stay clickable above it */
.lk-name::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.lk-grip, .lk-act, .lk-meta a { position: relative; z-index: 1; }
.lk-meta { display: flex; align-items: center; margin-top: 1px; font-size: 12.5px; color: var(--muted); font-weight: 550; white-space: nowrap; min-width: 0; }
.lk-meta > * { flex: none; }
.lk-meta > * + *::before { content: "\00b7"; margin: 0 7px; color: var(--border-strong); }
.lk-meta a { color: var(--text-2); font-weight: 650; }
.lk-url { display: inline-flex; align-items: center; gap: 4px; flex: 0 1 auto !important; min-width: 0; }
.lk-url-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lk-url .lk-lock .i { width: 13px; height: 13px; }
.lk:not(.is-private) .lk-url .lk-lock { display: none; }
.lk-act { display: flex; align-items: center; gap: 0; flex: none; margin-right: -6px; }
.lk-act .iconbtn { width: 32px; }
.lk-act .btn-sm { margin-right: 6px; }
.star { color: var(--border-strong); }
.star:hover { color: var(--star); }
.star.on { color: var(--star); }
.star.on .i { fill: currentColor; }
.lk-grip { display: grid; place-items: center; width: 22px; height: 40px; margin: 0 -6px 0 -8px; border: 0; background: none; color: var(--border-strong); cursor: grab; touch-action: none; }
.lk-grip:hover { color: var(--muted); }
.lk-grip .i { width: 18px; height: 18px; }
.sortable-ghost { opacity: .35; }
.sortable-chosen { background: var(--surface-2); }
.sortable-drag { box-shadow: var(--shadow-lg); border-radius: 12px; }

.pill { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; margin-right: 6px; }
.pill .i { width: 15px; height: 15px; }
.pill-saved, .pill-mine { color: var(--brand-strong); background: var(--brand-soft); }
.pill-new { color: #fff; background: var(--danger); height: 22px; font-size: 11px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-size: 12.5px; font-weight: 650;
}
.chip:hover { background: var(--brand-soft); border-color: transparent; color: var(--brand-strong); text-decoration: none; }
button.chip.is-on { background: var(--brand); color: var(--brand-ink); border-color: transparent; }
.chips-pick { margin-top: 8px; max-height: 68px; overflow: auto; }
.chips-lg { margin-bottom: 8px; }
.chips-lg .chip { height: 32px; font-size: 14px; padding: 0 14px; }

.pager { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin: 16px 0 0; }
.pager-pos { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.list-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 16px 0 0; }
.list-foot .pager { margin: 0 0 0 auto; }
.page-arrow {
  display: none; position: fixed; top: 50%; z-index: 20; width: 56px; height: 150px; margin-top: -75px;
  place-items: center; border-radius: 14px; background: var(--arrow-bg); border: 1px solid var(--border); color: #fff;
  transition: background .15s, border-color .15s;
}
/* Barely there until hovered: a white arrow with a faint outline on a light grey tab */
.page-arrow svg { width: 30px; height: 30px; fill: currentColor; filter: drop-shadow(0 0 1px rgba(15, 23, 42, 0.28)); }
.page-arrow:hover, .page-arrow:focus-visible { background: var(--brand); border-color: var(--brand); color: #fff; }
.page-arrow:hover svg, .page-arrow:focus-visible svg { filter: none; }
.page-arrow:focus-visible { box-shadow: var(--ring); border-radius: 14px; }
.page-prev { left: calc(50% - 500px - 76px); }
.page-next { right: calc(50% - 500px - 76px); }
@media (min-width: 1180px) {
  .page-arrow { display: grid; }
}

/* ---------- Menus ---------- */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 220px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
  animation: pop .14s ease-out; transform-origin: top right;
}
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(-4px); } to { opacity: 1; transform: none; } }
.menu-pop a, .menu-pop button {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 11px; border: 0; border-radius: 9px;
  background: none; color: var(--text); font-size: 14px; font-weight: 600; text-align: left; text-decoration: none !important;
}
.menu-pop a:hover, .menu-pop button:hover { background: var(--surface-2); }
.menu-pop .i { width: 18px; height: 18px; color: var(--muted); }
.menu-pop .danger, .menu-pop .danger .i { color: var(--danger); }
.menu-pop form { margin: 0; border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; }
.menu-who { display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.menu-who span { display: flex; flex-direction: column; min-width: 0; }
.menu-who small { color: var(--muted); font-size: 12.5px; }

/* ---------- People ---------- */
.people { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.people > li { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-top: 1px solid var(--border); }
.people > li:first-child { border-top: 0; }
.person { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: var(--text); }
.person:hover { text-decoration: none; }
.person:hover b { color: var(--brand-strong); }
.person > span { display: flex; flex-direction: column; min-width: 0; }
.person b { font-size: 15px; display: inline-flex; align-items: center; gap: 4px; }
.person b .i { width: 14px; height: 14px; color: var(--muted); }
.person small { color: var(--muted); font-size: 13px; font-weight: 600; }
.person em { font-style: normal; color: var(--text-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-act { display: flex; align-items: center; gap: 8px; flex: none; }
.person-count { font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* ---------- Left-column cards ---------- */
.side-card { padding: 18px; }
.side-card h3 { font-size: 15px; font-weight: 800; margin-bottom: 6px; }
.side-card p { font-size: 13.5px; color: var(--muted); }
.join-card { text-align: center; display: grid; gap: 10px; justify-items: center; }
.join-card .btn { margin-top: 2px; }
.bookmarklet {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 14px; border-radius: 999px;
  background: var(--surface-2); border: 1.5px dashed var(--brand); color: var(--text); font-weight: 700; font-size: 13.5px; cursor: grab;
}
.bookmarklet:hover { text-decoration: none; background: var(--brand-soft); }
.pitch-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 12px; }
.pitch-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--text-2); }
.pitch-list .i { color: var(--brand); margin-top: 1px; }

/* ---------- Tags ---------- */
.tag-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tag-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s, box-shadow .15s; }
.tag-card:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); box-shadow: var(--shadow); transform: translateY(-1px); }
.tag-link { display: flex; flex-direction: column; padding: 16px; color: var(--text); height: 100%; }
.tag-link:hover { text-decoration: none; }
.tag-peek { display: flex; gap: 6px; margin-bottom: 14px; padding-right: 30px; overflow: hidden; }
.tag-peek .lk-ico { width: 32px; height: 32px; border-radius: 9px; }
.tag-peek .lk-ico img { width: 18px; height: 18px; }
.tag-title { font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.tag-count { font-size: 13px; color: var(--muted); font-weight: 600; }
.tag-card .menu { position: absolute; top: 10px; right: 8px; }
.inline-form { display: flex; gap: 8px; margin-bottom: 16px; }
.inline-form .field { flex: 1; }

/* ---------- Forms ---------- */
.form-row { margin-bottom: 16px; }
.label { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 13.5px; font-weight: 700; margin-bottom: 6px; color: var(--text-2); }
.opt { font-weight: 550; color: var(--muted); font-size: 12.5px; }
.label-link { font-weight: 650; font-size: 13px; }
.field {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-size: 15px; font-weight: 500;
  transition: border-color .15s, box-shadow .15s;
}
textarea.field { height: auto; padding: 11px 14px; resize: vertical; line-height: 1.45; }
.field::placeholder { color: var(--muted); opacity: .8; }
.field:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.field.is-bad { border-color: var(--danger); }
.field[readonly] { background: var(--surface-2); color: var(--text-2); }
.field-num { width: 100px; }
.field-wrap { position: relative; }
.field-wrap .field { padding-right: 70px; }
.field-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--brand-strong); font-weight: 700; font-size: 13px; }
.field-btn:hover { background: var(--brand-soft); }
.field-prefix { display: flex; align-items: stretch; border: 1px solid var(--border-strong); border-radius: 11px; overflow: hidden; background: var(--surface-2); }
.field-prefix span { display: flex; align-items: center; padding: 0 4px 0 12px; color: var(--muted); font-size: 13.5px; white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.field-prefix .field { border: 0; border-radius: 0; }
.field-prefix:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.field-prefix .field:focus { box-shadow: none; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.hint a { font-weight: 700; }
.form-error { background: var(--danger-soft); color: var(--danger); padding: 11px 14px; border-radius: 11px; font-size: 14px; font-weight: 650; margin-bottom: 16px; }
.form-error a { color: inherit; text-decoration: underline; }
.form-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.check { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; margin: 4px 0 18px; color: var(--text-2); cursor: pointer; }
.check input, .choice input { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; flex: none; }
.switches { display: grid; gap: 4px; margin-top: 6px; }
.switch { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui { position: relative; flex: none; width: 42px; height: 25px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border-strong); transition: background .18s, border-color .18s; margin-top: 1px; }
.switch-ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .18s; }
.switch input:checked + .switch-ui { background: var(--brand); border-color: var(--brand); }
.switch input:checked + .switch-ui::after { transform: translateX(17px); }
.switch input:focus-visible + .switch-ui { box-shadow: var(--ring); }
.switch > span:last-child { display: flex; flex-direction: column; font-size: 14.5px; }
.switch small { color: var(--muted); font-size: 13px; font-weight: 500; }
.fav-pos { display: flex; align-items: center; gap: 10px; margin: -2px 0 6px 54px; }
.fav-pos .label { margin: 0; }
.fav-pos .hint { margin: 0; }
.choice { border: 0; padding: 0; margin: 0 0 18px; }
.choice legend { font-size: 13.5px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; padding: 0; }
.choice label { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px; cursor: pointer; transition: border-color .15s, background .15s; }
.choice label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.choice label > span { display: flex; flex-direction: column; font-size: 14.5px; }
.choice small { color: var(--muted); font-size: 13px; font-weight: 500; }
.choice input { margin-top: 2px; }
.copy-row { display: flex; gap: 8px; margin: 8px 0 14px; }
.copy-row .field { height: 42px; font-size: 14px; }
.copy-row .btn { height: 42px; }
.file-btn { cursor: pointer; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.spinner { position: absolute; right: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--brand); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.note { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 11px; font-size: 14px; font-weight: 650; margin: 10px 0; }
.note-ok { background: var(--brand-soft); color: var(--brand-strong); }

/* ---------- Dialogs ---------- */
dialog.sheet {
  border: 0; padding: 0; width: min(560px, calc(100vw - 32px)); max-height: min(90vh, 860px);
  border-radius: 22px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg);
}
dialog.sheet[open] { display: flex; flex-direction: column; animation: rise .2s ease-out; }
dialog.sheet::backdrop { background: var(--backdrop); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sheet-sm { width: min(460px, calc(100vw - 32px)); }
.sheet > form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 18px 8px 22px; }
.sheet-head h2 { font-size: 19px; font-weight: 800; }
.sheet-body { padding: 8px 22px 10px; overflow-y: auto; min-height: 0; }
.sheet-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 20px; border-top: 1px solid var(--border); }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.steps { margin: 4px 0 0; padding-left: 22px; display: grid; gap: 12px; font-size: 14.5px; color: var(--text-2); }
.steps .i { width: 17px; height: 17px; vertical-align: -3px; color: var(--brand); }

/* ---------- Feedback ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 100;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 650; font-size: 14px;
  box-shadow: var(--shadow-lg); transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--danger); color: #fff; }
.empty { text-align: center; padding: 48px 20px; }
.card.empty { padding: 48px 28px; }
.empty-ico { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: var(--brand-soft); color: var(--brand); margin-bottom: 14px; }
.empty-ico .i { width: 28px; height: 28px; }
.empty-ico.ok { background: var(--brand); color: var(--brand-ink); }
.empty h1, .empty h3 { font-size: 19px; font-weight: 800; }
.empty p { color: var(--muted); max-width: 440px; margin: 8px auto 18px; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---------- Floating add button ---------- */
.fab {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 45;
  width: 58px; height: 58px; border-radius: 18px; border: 0; color: #fff;
  background: linear-gradient(135deg, #1faa1d, #0b8145); box-shadow: 0 12px 28px -10px rgba(11, 129, 69, .8), 0 2px 6px rgba(0,0,0,.15);
  align-items: center; justify-content: center;
}
.fab .i { width: 26px; height: 26px; stroke-width: 2.4; }

/* ---------- Landing ---------- */
.landing .page { padding-top: 0; }
.hero { position: relative; text-align: center; padding: 64px 12px 48px; margin: 0 -20px 28px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 120%; z-index: -1;
  background: radial-gradient(ellipse at 50% 30%, var(--brand-glow), transparent 62%);
}
/* Size comes from the width attribute in index.asp; phones shrink it to fit */
.hero-logo { height: auto; max-width: 100%; margin-bottom: 22px; }
.hero h1 { font-size: clamp(28px, 4.6vw, 48px); font-weight: 800; letter-spacing: -0.035em; max-width: 780px; margin: 0 auto; }
.hero p { color: var(--muted); font-size: 17px; max-width: 620px; margin: 14px auto 0; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }
.hero .hero-stats { font-size: 13.5px; margin-top: 18px; font-weight: 600; }
.auth-card-side h3 { font-size: 17px; font-weight: 800; margin-bottom: 14px; }
.auth-card-side { padding: 20px; }
.auth-card-side .field { height: 42px; }
.feature-card .pitch-list { gap: 10px; }

/* ---------- Auth ---------- */
.auth .page { display: flex; }
.auth-wrap { flex: 1; display: grid; place-items: center; padding: 24px 0; }
.auth-card { width: 100%; max-width: 430px; padding: 30px; }
.auth-card h1 { font-size: 25px; font-weight: 800; letter-spacing: -0.025em; }
.auth-card > .muted { margin: 6px 0 22px; }
.auth-logo { display: block; height: 44px; width: auto; margin-bottom: 18px; }
.auth-alt { text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }
.auth-alt a { font-weight: 700; }
.auth-card .empty-ico { margin-bottom: 16px; }
.auth-split { grid-template-columns: minmax(0, 1fr) 430px; gap: 56px; max-width: 1000px; margin: 0 auto; width: 100%; place-items: center stretch; }
.auth-pitch img { height: 54px; width: auto; }
.auth-pitch h2 { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; margin: 22px 0 8px; max-width: 460px; }
.auth-pitch .pitch-list { gap: 16px; margin-top: 22px; }
.auth-pitch .pitch-list li { font-size: 15px; }

/* ---------- Settings ---------- */
.settings { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; align-items: start; max-width: 1000px; margin: 0 auto; }
.settings-nav { position: sticky; top: calc(var(--top-h) + 20px); display: grid; gap: 2px; }
.settings-nav h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 14px 10px; }
.settings-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px; color: var(--text-2); font-weight: 650; font-size: 14.5px; }
.settings-nav a:hover { background: var(--surface-2); text-decoration: none; }
.settings-nav a[aria-current] { background: var(--surface); color: var(--brand-strong); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.settings-nav a .i { width: 18px; height: 18px; }
.settings-nav .settings-back { margin-top: 12px; color: var(--muted); font-size: 13.5px; }
.settings-body .card > .muted { margin-bottom: 18px; }
.photo-edit { display: flex; align-items: center; gap: 20px; margin-bottom: 22px; }
.photo-edit .hint { margin-top: 8px; }
.seg-theme button { height: 40px; padding: 0 16px; font-size: 14px; }

/* ---------- Edit / add ---------- */
.edit-top { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.icon-edit { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.card .card-title + .muted.small { margin-top: 2px; }
.add-form .card-title { margin-bottom: 18px; }
.popup .page { padding: 16px; }
.popup-brand { display: flex; margin-bottom: 12px; }
.popup-brand img { height: 36px; width: auto; }
.done-card { text-align: center; padding: 40px 24px; }
.done-card h1 { font-size: 21px; font-weight: 800; }
.done-card p { color: var(--muted); margin: 6px 0 20px; }
.done-card .btn { margin: 0 4px; }

/* ---------- Get Started ---------- */
.welcome { padding: 26px; }
.welcome-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.welcome-head h2 { font-size: 23px; font-weight: 800; letter-spacing: -0.025em; }
.checklist { list-style: none; margin: 12px 0 0; padding: 0; }
.checklist > li { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--border); }
.checklist > li > div { flex: 1; min-width: 0; }
.checklist b { font-size: 15.5px; }
.checklist p { color: var(--muted); font-size: 14px; margin: 3px 0 10px; }
.checklist p .i { width: 16px; height: 16px; vertical-align: -3px; color: var(--star); }
.check-dot { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border-strong); color: transparent; margin-top: 1px; }
.check-dot .i { width: 16px; height: 16px; stroke-width: 3; }
.checklist .done .check-dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.checklist .done b { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1.5px; }

/* ---------- Help ---------- */
.prose h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; }
.card.prose { padding: 28px 32px; }
.card.prose > :last-child { margin-bottom: 0; }
.prose .lead { font-size: 17px; color: var(--muted); margin: 8px 0 8px; }
.prose h2 { font-size: 19px; font-weight: 800; margin: 30px 0 10px; }
.prose ul { padding-left: 20px; color: var(--text-2); display: grid; gap: 8px; }
.prose p { color: var(--text-2); margin-bottom: 10px; }
.prose .i { width: 17px; height: 17px; vertical-align: -3px; }
.faq dt { display: flex; align-items: center; gap: 8px; font-weight: 750; margin-top: 14px; }
.faq dt .i { color: var(--brand); width: 19px; height: 19px; }
.faq dd { margin: 4px 0 0 27px; color: var(--text-2); }
.faq-keys { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; align-items: center; }
.faq-keys dt, .faq-keys dd { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  :root { --top-h: 58px; }
  .page { padding: 16px 16px 96px; }
  .layout { display: flex; flex-direction: column; align-items: stretch; }
  .col-profile { display: contents; }
  .col-profile > .card { margin-bottom: 16px; }
  /* Your own card is hidden on phones (name is in the header menu, Edit profile in Settings);
     other people's stays for their name and the Follow button */
  .col-profile > .profile.is-owner { display: none; }
  .profile { padding: 16px; }
  .profile-top { flex-direction: row; align-items: center; }
  .av-xl { width: 68px; height: 68px; font-size: 26px; }
  .profile-name { font-size: 19px; }
  .profile-actions { margin-top: 12px; }
  .stats { margin-top: 12px; padding-top: 12px; }
  .tabs-main { position: sticky; top: calc(var(--top-h) + env(safe-area-inset-top)); z-index: 30; margin: 0 -16px 14px; padding: 8px 16px; background: var(--bg); }
  .settings { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .settings-nav { position: static; display: flex; overflow-x: auto; gap: 6px; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; }
  .settings-nav::-webkit-scrollbar { display: none; }
  .settings-nav h1 { display: none; }
  .settings-nav a { flex: none; background: var(--surface-2); padding: 8px 12px; font-size: 14px; }
  .settings-nav .settings-back { margin: 0; }
  .auth-split { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .auth-pitch { display: none; }
  .hero { padding: 40px 8px 32px; margin: 0 -16px 20px; }
  .hero-logo { max-width: 72%; }
}

@media (max-width: 720px) {
  .only-sm { display: inline-flex !important; }
  .hide-sm { display: none !important; }
  .topbar-in { padding: 0 10px 0 14px; gap: 6px; }
  .brand { margin-right: auto; }
  .brand-logo { height: 44px; }
  .top-actions { gap: 0; }
  .top-actions .btn { height: 36px; padding: 0 12px; font-size: 13.5px; }
  .search { display: none; position: absolute; left: 10px; right: 10px; top: calc(var(--top-h) + env(safe-area-inset-top) + 6px); max-width: none; }
  .search-open .search { display: flex; }
  .search-open .search input { box-shadow: var(--shadow-lg); background: var(--surface); }
  .search .kbd { display: none; }
  .search-big { display: flex; position: static; }
  .lk { padding: 11px 12px; gap: 12px; }
  /* Shared lists: the address gets its own line, who saved it and when wrap below */
  .lk-meta { flex-wrap: wrap; }
  .lk-url { flex-basis: 100% !important; }
  .lk-url + *::before { content: none; }
  .lk-ico { width: 38px; height: 38px; }
  .lk-act .btn-sm span { display: none; }
  .lk-act .btn-sm { width: 34px; padding: 0; margin-right: 4px; }
  .pill span { display: none; }
  .pill { padding: 0 8px; }
  .profile.is-owner .profile-bio, .profile.is-owner .profile-url, .profile.is-owner .profile-actions { display: none; }
  .profile.is-owner .av-xl { width: 54px; height: 54px; font-size: 21px; }
  .profile.is-owner .profile-loc { display: none; }
  .list-head h2 { font-size: 19px; }
  .menu-link .menu-pop {
    position: fixed; left: 10px; right: 10px; top: auto; bottom: calc(10px + env(safe-area-inset-bottom)); min-width: 0;
    padding: 8px; border-radius: 20px; transform-origin: bottom center; animation: rise .18s ease-out;
  }
  .menu-link[open]::before { content: ""; position: fixed; inset: 0; z-index: 55; background: var(--backdrop); }
  /* The account menu drops down from the avatar. (A bottom sheet can't work here: the top bar's
     blur effect makes fixed-position menus inside it line up with the bar, off the top of the screen.) */
  .menu-user .menu-pop { top: calc(100% + 8px); right: -4px; width: min(300px, calc(100vw - 20px)); padding: 8px; border-radius: 18px; }
  .menu-pop a, .menu-pop button { padding: 13px 12px; font-size: 15px; }
  dialog.sheet { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 22px 22px 0 0; max-height: 94vh; padding-bottom: env(safe-area-inset-bottom); }
  dialog.sheet[open] { animation: slideup .22s ease-out; }
  .sheet-foot .btn { flex: 1; }
  .people > li { flex-wrap: wrap; padding: 12px; }
  .person-act { margin-left: 54px; }
  .person-act:empty { display: none; }
  .install-bar { gap: 10px; padding: 10px; }
  .install-ico { width: 38px; height: 38px; }
  .install-txt span { display: none; }
  .form-foot .btn { flex: 1; }
  .form-foot .grow { display: none; }
  .card { padding: 18px; }
  .card.prose { padding: 20px; }
  .prose h1 { font-size: 26px; }
  .auth-card { padding: 22px; border-radius: 20px; }
  .tag-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .fav-pos { margin-left: 0; }
  .hero-cta .btn { flex: 1 1 100%; }
  .welcome { padding: 18px; }
}
@keyframes slideup { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }

@media (max-width: 420px) {
  .hide-xs { display: none !important; }
  .brand-logo { height: 44px; }
  .iconbtn { width: 38px; }
}

@media (hover: none) {
  .hide-touch { display: none !important; }
  .lk:hover { background: none; }
  .tag-card:hover { transform: none; }
}

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

/* Older browsers without color-mix(): plain fallbacks */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  .install-bar { border-color: var(--border); }
  .lk:hover { background: var(--surface-2); }
  .tag-card:hover { border-color: var(--brand); }
}
