:root {
  --bg: #fbf6ef;
  --surface: #ffffff;
  --surface-2: #f5ece0;
  --ink: #2b2118;
  --muted: #7a6b5d;
  --line: #eadfce;
  --accent: #e4572e;
  --accent-ink: #ffffff;
  --accent-soft: #fde8e0;
  --danger: #b3261e;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(43, 33, 24, .06), 0 8px 24px rgba(43, 33, 24, .08);
  --header-h: 60px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1511;
    --surface: #251e18;
    --surface-2: #2f261f;
    --ink: #f4ebe0;
    --muted: #a99a8b;
    --line: #3a3027;
    --accent: #f0714a;
    --accent-ink: #1a1511;
    --accent-soft: #3d2519;
    --danger: #f2b8b5;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.boot { padding: 4rem 1rem; text-align: center; color: var(--muted); }
.icon { display: inline-flex; line-height: 0; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.topbar .left, .topbar .right { display: flex; align-items: center; gap: 6px; }
.topbar .right { justify-content: flex-end; }
.brand {
  font: 600 1.55rem/1 var(--serif);
  letter-spacing: -.01em;
  text-decoration: none;
  color: var(--ink);
}
.brand span { color: var(--accent); }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid transparent; border-radius: 12px;
  background: transparent; text-decoration: none;
  transition: background .15s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.boxed { border-color: var(--line); }

.subbar {
  position: sticky; top: var(--header-h); z-index: 20;
  padding: 10px 16px;
  text-align: center; font-weight: 600; font-size: .95rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.subbar .site { color: var(--muted); font-weight: 500; }

/* ---------- sidebar ---------- */
.scrim {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(20, 14, 9, .45);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 50;
  width: min(280px, 82vw);
  display: flex; flex-direction: column;
  padding: 16px 12px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(-102%);
  transition: transform .22s ease;
}
.nav-open .sidebar { transform: none; }
.nav-open .scrim { opacity: 1; pointer-events: auto; }
.sidebar .side-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 12px; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  text-decoration: none; font-weight: 500;
}
.sidebar nav a:hover { background: var(--surface-2); }
.sidebar nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.sidebar .side-foot { margin-top: auto; padding: 12px 4px 0; border-top: 1px solid var(--line); }
.sidebar .who { font-size: .85rem; color: var(--muted); padding: 0 10px 10px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- layout ---------- */
main { max-width: 1120px; margin: 0 auto; padding: 20px 16px 64px; }

.search {
  display: flex; align-items: center; gap: 10px;
  max-width: 560px; margin: 4px auto 22px;
  padding: 0 18px; height: 48px;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 999px;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; outline: 0; background: transparent;
  font-size: 1rem;
}
.search input::-webkit-search-cancel-button { cursor: pointer; }
.page-title { font: 600 1.6rem/1.2 var(--serif); margin-bottom: 4px; text-align: center; }
.count { color: var(--muted); font-size: .9rem; text-align: center; margin-bottom: 18px; min-height: 1.4em; }

/* ---------- recipe cards ---------- */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (max-width: 700px) { .grid { gap: 10px; } main { padding-inline: 10px; } }
@media (max-width: 460px) { .grid { grid-template-columns: repeat(2, 1fr); } }

.card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-link { display: flex; flex-direction: column; flex: 1; text-decoration: none; }
.card-img { aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-size: 2.6rem;
  background: linear-gradient(135deg, var(--accent-soft), var(--surface-2));
}
.card-body { padding: 10px 12px 12px; display: grid; gap: 2px; }
.card-title {
  font: 600 1rem/1.25 var(--serif);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-site { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav {
  position: absolute; top: 8px; right: 8px;
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: #6b5a4b;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}
.fav[aria-pressed="true"] { color: var(--accent); }
.fav[aria-pressed="true"] svg { fill: currentColor; }
@media (max-width: 700px) {
  .card-body { padding: 8px 8px 10px; }
  .card-title { font-size: .85rem; }
  .card-site { font-size: .7rem; }
  .placeholder { font-size: 1.8rem; }
  .fav { width: 30px; height: 30px; top: 5px; right: 5px; }
}

.empty { text-align: center; padding: 56px 16px; color: var(--muted); max-width: 460px; margin: 0 auto; }
.empty h2 { font: 600 1.4rem var(--serif); color: var(--ink); margin-bottom: 8px; }
.empty .big { font-size: 3rem; margin-bottom: 8px; }

/* ---------- category tiles ---------- */
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.tile {
  display: grid; gap: 4px; justify-items: center; text-align: center;
  padding: 22px 12px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .15s, box-shadow .15s;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tile .emoji { font-size: 2.4rem; }
.tile b { font: 600 1.05rem var(--serif); }
.tile small { color: var(--muted); }

/* ---------- reader ---------- */
.reader { max-width: 900px; margin: 0 auto; }
.reader-hero {
  border-radius: 24px; overflow: hidden; box-shadow: var(--shadow);
  aspect-ratio: 16 / 9; background: var(--surface-2);
}
.reader-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reader-hero .placeholder { font-size: 5rem; }
.reader h1 { font: 600 clamp(1.8rem, 5vw, 2.8rem)/1.15 var(--serif); margin: 26px 0 6px; letter-spacing: -.01em; }
.reader .from { color: var(--muted); margin-bottom: 16px; }
.reader .from a { color: var(--accent); font-weight: 600; text-decoration: none; }
.reader .from a:hover { text-decoration: underline; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
  display: inline-flex; gap: 6px; align-items: center;
  padding: 5px 12px; border-radius: 999px; font-size: .85rem;
  background: var(--surface-2); border: 1px solid var(--line);
}
.chip.cat { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 600; text-decoration: none; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 10px 18px; min-height: 44px;
  border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); font-weight: 600; text-decoration: none;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); background: var(--accent); }
.btn.danger { color: var(--danger); }
.btn[disabled] { opacity: .6; cursor: default; }
.desc { font: 1.1rem/1.65 var(--serif); color: var(--ink); margin-bottom: 28px; padding-left: 16px; border-left: 4px solid var(--accent-soft); }
.panels { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .panels { grid-template-columns: 5fr 7fr; align-items: start; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.panel h2 { font: 600 1.3rem var(--serif); margin-bottom: 14px; }
.ingredients { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.ingredients label { display: flex; gap: 12px; align-items: flex-start; padding: 8px 4px; cursor: pointer; border-bottom: 1px dashed var(--line); }
.ingredients li:last-child label { border-bottom: 0; }
.ingredients input { margin-top: .35em; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.ingredients input:checked + span { text-decoration: line-through; color: var(--muted); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; counter-increment: step; line-height: 1.6; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700;
}
.notice { background: var(--accent-soft); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 22px; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 32px 28px; box-shadow: var(--shadow); }
.auth-card .brand { display: block; text-align: center; font-size: 2.2rem; margin-bottom: 4px; }
.auth-card .tag { text-align: center; color: var(--muted); margin-bottom: 22px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.tabs button { border: 0; background: transparent; padding: 9px; border-radius: 9px; font-weight: 600; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: .85rem; font-weight: 600; color: var(--muted); }
.field input, .field select {
  width: 100%; height: 46px; padding: 0 14px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
}
.field input:focus, .field select:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.error { color: var(--danger); font-size: .9rem; margin-bottom: 12px; min-height: 1.3em; }
.auth-card .btn { width: 100%; }

/* ---------- account ---------- */
.account { max-width: 640px; margin: 0 auto; display: grid; gap: 18px; }
.profile { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.profile .who-info { flex: 1; min-width: 160px; }
.avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font: 600 1.8rem var(--serif); flex: none; }
.profile h2 { font: 600 1.4rem var(--serif); }
.profile p { color: var(--muted); overflow-wrap: anywhere; }
.steps-help { padding-left: 1.2em; margin: 8px 0 0; display: grid; gap: 6px; }
code { background: var(--surface-2); padding: 2px 8px; border-radius: 6px; font-size: .9em; overflow-wrap: anywhere; }

dialog { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--ink); padding: 24px; width: min(420px, calc(100vw - 32px)); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(20, 14, 9, .5); }
dialog h2 { font: 600 1.3rem var(--serif); margin-bottom: 16px; }
dialog .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

#toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 100;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg);
  padding: 12px 20px; border-radius: 999px; font-weight: 500;
  transition: opacity .2s, transform .2s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

.skeleton { border-radius: 24px; aspect-ratio: 16 / 9; background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

.muted-note { color: var(--muted); font-size: .92rem; }
.steps-help li { line-height: 1.7; }

/* ---------- account: save-from-anywhere ---------- */
.account .panel > h2 { margin-bottom: 14px; }
.account .tabs { margin-bottom: 16px; }
.account .steps { margin: 18px 0; gap: 14px; }
.center { text-align: center; }
.cta { margin: 14px 0; }
.btn.small { min-height: 30px; padding: 2px 12px; font-size: .85rem; border-radius: 8px; }
kbd { font: 600 .8em var(--sans); padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--surface-2); }
.bm-drop { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin: 16px 0 4px; padding: 18px; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--bg); }
.bm-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; min-height: 44px;
  border-radius: 999px; background: var(--surface); color: var(--ink); border: 2px solid var(--accent);
  font-weight: 700; text-decoration: none; cursor: grab; box-shadow: var(--shadow); user-select: none;
}
.bm-btn[aria-disabled="true"] { opacity: .6; }
.bm-btn:active { cursor: grabbing; }
details.more { margin-top: 6px; }
details.more summary { cursor: pointer; color: var(--muted); font-size: .92rem; }
details.more p { margin: 10px 0; }

/* ---------- save window ---------- */
.save-card { display: grid; gap: 14px; }
.save-card .brand, .save-card .tag { margin-bottom: 0; }
.save-card .brand { margin-bottom: 4px; }
.save-card .field, .save-card .error { margin-bottom: 0; }
.save-card .notice { margin: 0; font-size: .95rem; }
.save-card .btn { width: 100%; }
.big-emoji { text-align: center; font-size: 3rem; }
.done { text-align: center; font: 600 1.5rem var(--serif); }
.preview { display: flex; gap: 12px; align-items: center; padding: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.thumb { flex: none; width: 76px; height: 76px; border-radius: 10px; background: var(--accent-soft); overflow: hidden; display: grid; place-items: center; font-size: 30px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview .t { font: 600 1rem/1.25 var(--serif); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.preview .s { font-size: .82rem; color: var(--muted); }
.preview > div:last-child { min-width: 0; }
.found { font-size: .82rem; margin-top: 2px; color: #1e7a46; }
.found.warn { color: var(--muted); }
@media (prefers-color-scheme: dark) { .found { color: #6fd39a; } }
.field label .badge { margin-left: 8px; font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }

.tabs.three { grid-template-columns: repeat(3, 1fr); }
.link-form { display: flex; gap: 8px; margin-top: 8px; }
.link-form input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.link-form input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.link-form .btn { width: auto; }
.mini-h { font: 600 1rem var(--serif); margin: 18px 0 0; }

/* ---------- custom categories ---------- */
.cat-actions { text-align: center; margin-bottom: 18px; }
.tile-wrap { position: relative; display: grid; }
.tile-wrap .tile { height: 100%; }
.tile-edit { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--muted); }
.tile-edit:hover { color: var(--ink); }
.cat-dialog { width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
.emoji-current { font-size: 1.4rem; margin-left: 6px; vertical-align: middle; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 2px; max-height: 176px; overflow: auto; padding: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.emoji-opt { height: 40px; font-size: 1.35rem; line-height: 1; border: 2px solid transparent; border-radius: 10px; background: transparent; }
.emoji-opt:hover { background: var(--surface-2); }
.emoji-opt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- family ---------- */
.bell { position: relative; }
.bell-count { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 700 .7rem/18px var(--sans); text-align: center; }
.family-head { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.family-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.family-sort { display: flex; justify-content: center; margin-bottom: 8px; }
.sort-control { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); }
.sort-control select { height: 38px; padding: 0 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: -8px auto 12px; max-width: 760px; }
.fchip { padding: 5px 12px; font-size: .82rem; line-height: 1.3; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.fchip:hover { background: var(--surface-2); }
.fchip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.votes { display: flex; border-top: 1px solid var(--line); }
.vote { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 4px 8px; border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: .9rem; }
.vote + .vote { border-left: 1px solid var(--line); }
.vote:hover { background: var(--surface-2); color: var(--ink); }
.vote[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
.vote[aria-pressed="true"] svg { fill: currentColor; }
.actions .votes { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.actions .vote { min-height: 42px; padding: 4px 16px; }
@media (max-width: 700px) { .vote { min-height: 36px; font-size: .8rem; gap: 4px; } }

.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 10px; }
.inline-form .btn { width: auto; min-height: 46px; }
.invite-list { display: grid; gap: 10px; margin-top: 8px; }
.invite { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.invite-actions { display: flex; gap: 8px; }
.notif-dialog { width: min(480px, calc(100vw - 32px)); }
.member-list { display: grid; gap: 12px; margin: 8px 0; }
.member { display: flex; gap: 12px; align-items: flex-start; padding: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.avatar.sm { width: 40px; height: 40px; font-size: 1.1rem; }
.member-info { flex: 1; min-width: 200px; display: grid; gap: 4px; }
.member-info small { color: var(--muted); overflow-wrap: anywhere; }
.member-name { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag { padding: 1px 8px; font-size: .72rem; font-weight: 700; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.tag.admin { background: var(--accent-soft); color: var(--accent); }
.perms { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 2px; }
.perm { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; cursor: pointer; }
.perm input { width: 18px; height: 18px; accent-color: var(--accent); }
.member-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.pending { margin-top: 14px; }
.pending-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); overflow-wrap: anywhere; }
.pick-list { display: grid; gap: 6px; max-height: 260px; overflow: auto; margin: 10px 0; }
.pick { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; }
.pick-emoji { font-size: 1.5rem; }
.pick-text { flex: 1; min-width: 0; display: grid; }
.pick-text b, .pick-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-text small { color: var(--muted); }
dialog input[type="search"] { width: 100%; height: 42px; padding: 0 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.members { max-width: 720px; margin: 0 auto; display: grid; gap: 18px; }

/* ---------- statistics ---------- */
.stats { max-width: 900px; margin: 0 auto; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat-tile { display: grid; gap: 2px; padding: 16px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.stat-tile b { font: 700 1.9rem/1.1 var(--serif); color: var(--accent); }
.stat-tile span { font-size: .82rem; color: var(--muted); }
.stats-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.stats-head h2 { margin: 0; }
.table-wrap { overflow-x: auto; }
.stats-table { width: 100%; border-collapse: collapse; font-size: .95rem; white-space: nowrap; }
.stats-table th, .stats-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.stats-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.stats-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.stats-table td .tag { margin-left: 6px; }
