/* Clean, minimal look: white space, thin borders, one warm accent, one typeface. */
:root {
  --bg: #ffffff;
  --surface: #f7f7f7;
  --card: #ffffff;
  --ink: #222222;
  --muted: #6a6a6a;
  --line: #ebebeb;
  --line-strong: #dddddd;
  --accent: #e8505b;
  --accent-dark: #d13f4a;
  --accent-soft: #fff1f2;
  --success: #008a05;
  --success-soft: #edf8ee;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.12);
  --shadow-float: 0 8px 28px rgba(0, 0, 0, 0.18);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 0.4em; }
h1 { font-size: clamp(1.6rem, 3.5vw, 2rem); }
h2 { font-size: 1.375rem; }
a { color: var(--ink); text-underline-offset: 2px; }
input, textarea, select, button { font: inherit; }
input, textarea, select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:hover, textarea:hover, select:hover { border-color: #b0b0b0; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
::placeholder { color: #8a8a8a; }

.container { max-width: 1120px; margin: 0 auto; padding: 32px 24px 96px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.error { color: var(--accent-dark); min-height: 1.2em; margin: 0; font-size: 0.875rem; }
.stack { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: 0.875rem; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1000px; margin: 0 auto; padding: 14px 24px; min-height: 68px;
}
.brand { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; text-decoration: none; color: var(--accent); }
#nav { display: flex; gap: 4px; align-items: center; }
#nav a:not(.btn), #nav .link-btn {
  text-decoration: none; font-weight: 500; font-size: 0.9375rem; color: var(--ink);
  padding: 10px 12px; border-radius: 999px;
}
#nav a:not(.btn):hover, #nav .link-btn:hover { background: var(--surface); }
#nav a, #nav button { white-space: nowrap; }
#nav .btn { margin-left: 4px; }

/* notifications */
.notif { position: relative; }
#nav .notif-btn { position: relative; font-size: 1.0625rem; line-height: 1; }
.notif-count {
  position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--accent); color: #fff; font-size: 0.6875rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.notif-panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: min(340px, calc(100vw - 32px));
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-float); padding: 16px; z-index: 40;
}
.notif-panel h3 { font-size: 1rem; margin: 0 0 10px; }
.notif-panel ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 60vh; overflow-y: auto; }
.notif-panel li { display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 8px; font-size: 0.9375rem; white-space: normal; }
.notif-panel li.new { background: var(--accent-soft); }
.notif-meta { display: flex; gap: 10px; align-items: baseline; }
#nav .notif-panel a { padding: 0; font-weight: 600; color: var(--accent-dark); text-decoration: underline; }
#nav .notif-panel a:hover { background: none; }
.notif-panel time { font-size: 0.8125rem; color: var(--muted); }
.notif-panel p { margin: 0; }
#nav .notif-panel .notif-all { display: inline-block; margin-top: 12px; font-size: 0.875rem; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 20px; border: 0; border-radius: 8px;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 0.9375rem; cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: transform 0.1s, background 0.15s;
}
.btn:hover { background: var(--accent-dark); }
.btn:active { transform: scale(0.97); }
.btn-small { padding: 8px 14px; font-size: 0.875rem; }
.btn-big { padding: 14px 24px; font-size: 1rem; }
.btn-ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn-ghost:hover { background: var(--surface); }
.btn-dark { background: var(--ink); }
.btn-dark:hover { background: #000; }
.link-btn {
  background: none; border: 0; color: var(--ink); cursor: pointer; padding: 4px;
  font-weight: 500; text-decoration: underline; text-underline-offset: 2px; font-size: 0.875rem;
}
.link-btn:hover { color: #000; }
.link-btn.danger { color: var(--muted); }
.link-btn.danger:hover { color: var(--accent-dark); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }

/* landing */
.hero { text-align: center; padding: 56px 0 24px; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.5rem); font-weight: 700; letter-spacing: -0.03em; max-width: 13em; margin: 0 auto 16px; line-height: 1.1; }
.hero > p { max-width: 34em; margin: 0 auto 32px; color: var(--muted); font-size: 1.125rem; }
.hero-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 64px; text-align: left; }
.hero-steps div { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); }
.hero-steps span { font-size: 1.75rem; display: block; margin-bottom: 12px; }
.hero-steps b { font-weight: 600; }
.hero-steps p { margin: 4px 0 0; color: var(--muted); font-size: 0.9375rem; }

.auth { max-width: 420px; margin: 48px auto; display: flex; flex-direction: column; gap: 16px; padding: 32px; }
.auth h2 { text-align: center; margin-bottom: 8px; }
.auth .btn { width: 100%; }
.auth .muted { text-align: center; margin: 0; font-size: 0.9375rem; }

/* dashboard */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin: 0; }
.title-block { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.for-btn { align-self: flex-start; padding: 0; color: var(--muted); font-size: 0.875rem; text-decoration: none; }
.for-btn u { text-underline-offset: 2px; }
.new-list input + input { margin-top: -2px; }
.editable { border-radius: 8px; padding: 2px 8px; margin-left: -8px !important; outline: none; }
.editable:hover, .editable:focus { background: var(--surface); }
.list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.list-card {
  text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 6px; min-height: 140px;
  transition: box-shadow 0.2s, border-color 0.2s;
}
a.list-card:hover, .my-list-card:hover { box-shadow: var(--shadow-hover); border-color: transparent; }
/* My lists: the whole card opens the list (stretched link); Delete/Leave sit above it. */
.my-list-card { position: relative; }
.list-card-link { color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.list-card-link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.list-card-actions { position: relative; z-index: 1; display: flex; justify-content: flex-end; margin-top: 12px; }
.list-card-actions .link-btn { padding: 4px 6px; }
.list-card h3 { margin: 0; font-size: 1.0625rem; }
.list-card p { margin: 0; }
.new-list { border: 1px dashed var(--line-strong); background: transparent; }
.saved-card { position: relative; display: grid; }
.saved-card .list-card { padding-right: 44px; }
.saved-card .eyebrow { margin: 0; }
.remove-saved {
  position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 999px;
  font-size: 1.25rem; line-height: 1; color: var(--muted); text-decoration: none;
}
.remove-saved:hover { background: var(--surface); color: var(--ink); }
.new-list h3 { color: var(--muted); }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px;
  font-size: 0.8125rem; font-weight: 500; background: var(--surface); color: var(--ink);
  margin-top: 8px; align-self: flex-start;
}
.badge.purchased { background: var(--success-soft); color: var(--success); }
.badge.reserved { background: var(--accent-soft); color: var(--accent-dark); }
.pulse { background: var(--accent); color: #fff; }

.callout { background: var(--surface); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 20px; font-weight: 500; }

/* list page: the list is the main column; counts and gift activity sit in a sidebar */
.list-layout.with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.list-main { min-width: 0; }
.list-sidebar { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 16px; }
.list-sidebar .callout { margin: 0; }
.list-sidebar .share-nudge { flex-direction: column; align-items: stretch; gap: 10px; }
.list-sidebar .share-nudge span { min-width: 0; font-size: 0.9375rem; }
.news-pill { display: none; }
.head-actions { display: flex; align-items: center; gap: 8px; }

/* gift activity panel (in the sidebar) */
.activity-panel {
  background: var(--surface); border-radius: var(--radius-lg); padding: 20px;
  display: flex; flex-direction: column; gap: 18px;
}
.activity-panel.has-news { background: var(--accent-soft); box-shadow: inset 0 0 0 1px #ffd2d6; }
.activity-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.activity-stats div { display: flex; flex-direction: column; }
.activity-stats b { font-size: 1.375rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.activity-stats span { font-size: 0.8125rem; color: var(--muted); }
.activity-feed h3 { font-size: 1rem; margin-bottom: 8px; }
.activity-feed ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.activity-feed li { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; font-size: 0.875rem; }
.activity-feed li.new { font-weight: 600; }
.activity-feed li.new > span::before { content: '✨ '; }
.activity-feed q { font-style: italic; color: var(--muted); }
.activity-feed time { font-size: 0.8125rem; color: var(--muted); }
.activity-feed .muted { margin: 0; font-size: 0.9375rem; }
.surprise-note { margin: 0; padding-top: 16px; border-top: 1px solid var(--line-strong); font-size: 0.8125rem; color: var(--muted); }

/* add bar */
.add-bar { margin-bottom: 32px; display: flex; flex-direction: column; gap: 14px; border-radius: var(--radius-lg); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.05); }
.add-row { display: flex; gap: 8px; }
.add-row input { font-size: 1rem; }
.priority-picker { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.priority-picker label { flex-direction: row; cursor: pointer; }
.picker-label { font-weight: 600; font-size: 0.9375rem; margin-right: 8px; }
.more-toggle { align-self: flex-start; padding: 0; }
.add-links { display: flex; gap: 20px; flex-wrap: wrap; }
.hero-sub { margin-top: 12px; }
.add-links .link-btn { padding: 0; }
#quick-form textarea { resize: vertical; min-height: 160px; line-height: 1.5; }
.item.loading .thumb { animation: pulse-soft 1.2s ease-in-out infinite; }
@keyframes pulse-soft { 50% { opacity: 0.4; } }
.priority-picker input { position: absolute; opacity: 0; width: 1px; }
.priority-picker label span {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 0.875rem;
  font-weight: 500; background: #fff; transition: border-color 0.15s, background 0.15s;
}
.priority-picker label:hover span { border-color: var(--ink); }
.priority-picker input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.priority-picker input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.more-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.more-fields input[name='notes'] { grid-column: 1 / -1; }
#unfurl-status { margin: 0; }
#unfurl-status:empty { display: none; }

/* items */
.group-head { font-size: 1.125rem; margin: 32px 0 12px; }
.items { display: flex; flex-direction: column; gap: 12px; }
.item {
  display: grid; grid-template-columns: 80px 1fr auto; gap: 16px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px 12px 12px;
  transition: opacity 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.item:hover { box-shadow: var(--shadow-hover); border-color: transparent; }
.item.taken { opacity: 0.5; }
.item.taken:hover { box-shadow: none; border-color: var(--line); }
.item.mine { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.thumb { width: 80px; height: 80px; border-radius: 8px; object-fit: cover; background: var(--surface); }
.thumb.placeholder { display: grid; place-items: center; font-size: 2rem; }
.item-body { min-width: 0; }
.item-body h3 { font-size: 1rem; font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.meta { margin: 4px 0 0; font-size: 0.875rem; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.meta b { color: var(--ink); font-weight: 600; }
.meta a { color: var(--muted); }
.notes { margin: 4px 0 0; font-size: 0.875rem; color: var(--muted); }
.item-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.priority-select { width: auto; padding: 8px 32px 8px 12px; font-size: 0.8125rem; border-radius: 999px; }

/* drag to re-rank */
.drag-tip { margin: 0 0 4px; }
.drop-zone { border-radius: var(--radius-lg); padding: 2px 8px 10px; margin: 0 -8px; transition: background 0.15s, box-shadow 0.15s; }
.drop-zone .group-head { margin-top: 24px; }
.drop-hint { display: none; margin: 0; padding: 18px; border: 1px dashed var(--line-strong); border-radius: var(--radius); text-align: center; color: var(--muted); font-size: 0.875rem; }
.drop-zone:has(.items:empty) .drop-hint { display: block; }
.is-dragging .drop-hint { display: block; }
.is-dragging .drop-zone:has(.items:not(:empty)) .drop-hint { display: none; }
.drop-zone.drop-over { background: var(--surface); box-shadow: inset 0 0 0 2px var(--ink); }
.drop-zone.drop-over .drop-hint { border-color: var(--ink); color: var(--ink); }
.item.draggable { grid-template-columns: 20px 80px 1fr auto; }
.drag-handle {
  background: none; border: 0; padding: 8px 0; color: #b0b0b0; font-size: 1.1rem; line-height: 1;
  cursor: grab; touch-action: none; align-self: stretch;
}
.drag-handle:hover { color: var(--ink); }
.item.draggable { cursor: grab; }
.item.draggable :is(a, button:not(.drag-handle), select) { cursor: pointer; }
.item.dragging { opacity: 0.3; }
.drag-ghost {
  position: fixed; top: 0; left: 0; z-index: 80; pointer-events: none; margin: 0;
  box-shadow: var(--shadow-float); border-color: transparent; opacity: 0.97;
}
.is-dragging, .is-dragging * { cursor: grabbing !important; user-select: none; }

/* suggestions */
.suggestions { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }

.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.section-head h2 { margin: 0; }
.suggest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.suggest {
  display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.suggest:hover { box-shadow: var(--shadow-hover); border-color: transparent; }
.suggest > div { flex: 1; min-width: 0; }
.suggest b { display: block; font-size: 0.9375rem; font-weight: 600; }
.suggest small { color: var(--muted); font-size: 0.8125rem; }
.suggest-emoji { font-size: 1.5rem; width: 44px; height: 44px; display: grid; place-items: center; background: var(--surface); border-radius: 8px; flex-shrink: 0; }

/* guest */
.cta-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface); padding: 12px 16px; border-radius: var(--radius); margin-bottom: 28px; font-size: 0.9375rem;
}
.cta-banner span { flex: 1; min-width: 200px; }
.guest-head { margin-bottom: 24px; }
.eyebrow { font-size: 0.875rem; font-weight: 500; color: var(--muted); margin: 0 0 4px; }
.progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 16px 0 8px; }
.progress div { height: 100%; background: var(--accent); border-radius: inherit; transition: width 0.6s; }
.my-gifts { margin-bottom: 8px; padding: 16px 20px; background: var(--surface); border: 0; }
.my-gifts ul { margin: 8px 0 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }

/* co-managing & deleting lists */
.managed-with { display: block; }
.managers { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.managers li { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.managers li span:first-child { font-weight: 600; }
.managers .remove-member { margin-left: auto; }
.list-footer { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); text-align: center; }
.btn-danger { background: #c0392b; }
.btn-danger:hover { background: #a93226; }
.join h2 { line-height: 1.3; }
.invite-preview-label { margin: 8px 0 6px; font-weight: 600; font-size: 0.9375rem; }
.invite-preview { margin: 0 0 12px; padding: 12px 14px; background: var(--surface); border-radius: 12px; white-space: pre-wrap;
  font-size: 0.875rem; line-height: 1.45; max-height: 180px; overflow: auto; }

/* experiences: chip in toward something to do */
.kind-tag { display: inline-block; vertical-align: 2px; margin-left: 6px; padding: 2px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-dark); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.02em; }
.item.experience .item-body { display: flex; flex-direction: column; gap: 4px; }
.fund-progress { height: 8px; margin: 6px 0 2px; max-width: 360px; }
.fund-text { margin: 0; }
.contributors { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 0.875rem; }
.contributors q { color: var(--muted); font-style: italic; margin-left: 4px; }
.contributors.big { font-size: 1rem; gap: 10px; margin: 8px 0 20px; }
.contributors.big q { display: block; margin: 2px 0 0; }
.amount-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.amount-pick { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; font-weight: 600; cursor: pointer; }
.amount-pick:hover { border-color: var(--ink); }
.amount-pick.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* growth: swap lists & share nudges */
.cta-banner b { font-weight: 600; }
.cta-banner.done { background: var(--success-soft); color: var(--success); }
.share-nudge { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.share-nudge span { flex: 1; min-width: 220px; }
.auth-sub { text-align: center; margin: -8px 0 0; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
label.check input { width: auto; accent-color: var(--ink); }
.email-toggle { margin-top: 10px; color: var(--ink); }
.inline-share { padding: 0; font-size: inherit; }

/* usage (admin) */
.usage-intro { margin: -8px 0 20px; }
.usage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.usage-chart { margin: 0; padding: 18px 18px 12px; display: flex; flex-direction: column; gap: 10px; }
.usage-chart figcaption { display: flex; flex-direction: column; gap: 2px; }
.usage-label { font-size: 0.875rem; color: var(--muted); font-weight: 500; }
.usage-now { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.usage-delta { font-size: 0.8125rem; color: var(--muted); }
.usage-delta.up { color: var(--success); }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 72px; border-bottom: 1px solid var(--line-strong); }
.bar-slot { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; }
.bar { width: 70%; max-width: 22px; background: var(--accent); opacity: 0.55; border-radius: 4px 4px 0 0; }
.bar.current { opacity: 1; }
.bar-slot:hover .bar { opacity: 1; }
.bar-slot:hover::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 5;
  background: var(--ink); color: #fff; font-size: 0.75rem; padding: 4px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none;
}
.bars-axis { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); }
.usage-table-toggle { margin: 12px 0 0; }
.usage-section { margin-top: 40px; }
.usage-section h2 { margin-bottom: 4px; }
.usage-section h2 .muted { font-weight: 500; font-size: 1rem; }
.usage-section > p { margin: 0 0 12px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.usage-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.usage-table th, .usage-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
.usage-table td:first-child { white-space: normal; min-width: 140px; }
.usage-table th { font-weight: 600; color: var(--muted); font-size: 0.8125rem; background: var(--surface); }
.usage-table tr:last-child td { border-bottom: 0; }
.usage-table.steps td:not(:first-child), .usage-table.steps th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.usage-table td { font-variant-numeric: tabular-nums; }

/* admin & account recovery */
.forgot-link { align-self: center; }
.admin-tool { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; background: var(--surface); border: 0; }
.admin-tool p { margin: 4px 0 0; }
.growth-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.growth-stats div { display: flex; flex-direction: column; }
.growth-stats b { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.growth-stats span { font-size: 0.8125rem; color: var(--muted); }
.table-scroll { overflow-x: auto; }
.source-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; white-space: nowrap; }
.source-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 0.8125rem; }
.source-table th, .source-table td { padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); }
.source-table tr:last-child td { border-bottom: none; }
#reset-result:empty, #test-email-result:empty { display: none; }
.reset-link { margin-top: 8px; font-size: 0.8125rem; }

/* feedback */
.feedback-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 16px; font-weight: 600; font-size: 0.875rem; cursor: pointer; box-shadow: var(--shadow-hover);
  transition: box-shadow 0.2s, transform 0.1s;
}
.feedback-fab:hover { box-shadow: var(--shadow-float); }
.feedback-fab:active { transform: scale(0.97); }
.feedback.done { opacity: 0.5; }
.feedback-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.feedback-head .badge { margin: 0; }
.feedback-head .link-btn { margin-left: auto; }
.feedback-msg { white-space: pre-wrap; margin: 12px 0; }
.feedback pre { background: var(--surface); padding: 12px; border-radius: 8px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
.feedback details p { margin: 4px 0; overflow-wrap: anywhere; }

/* modal & toasts */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); display: grid; place-items: center;
  padding: 16px; z-index: 50; animation: fade 0.2s;
}
.modal {
  position: relative; background: #fff; border-radius: var(--radius-lg); padding: 32px 24px 24px;
  width: 100%; max-width: 460px; box-shadow: var(--shadow-float); animation: rise 0.25s ease-out;
}
.modal h2 { padding-right: 32px; }
.modal p { margin-top: 0; }
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%;
  background: none; border: 0; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--ink);
}
.modal-close:hover { background: var(--surface); }
.share-row { display: flex; gap: 8px; margin-bottom: 14px; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.share-hint { margin: 14px 0 0; }
.offline-share { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.offline-share h3 { margin: 0 0 4px; font-size: 1rem; }
#print-root { display: none; }
@media print {
  body > :not(#print-root) { display: none !important; }
  #print-root { display: block; color: #000; font-size: 13pt; }
  #print-root h1 { margin: 0 0 12px; }
  #print-root h2 { margin: 20px 0 6px; font-size: 14pt; border-bottom: 1px solid #999; }
  #print-root ul { margin: 0; padding-left: 20px; }
  #print-root li { margin: 8px 0; break-inside: avoid; }
  #print-root .print-store { color: #555; font-size: 11pt; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
@keyframes pop { from { transform: scale(0.94); opacity: 0; } }

#toast-root { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 8px; font-weight: 500; font-size: 0.9375rem; box-shadow: var(--shadow-float); animation: pop 0.2s; transition: opacity 0.4s; text-align: center; }
.toast.out { opacity: 0; }

.confetti { position: fixed; top: -40px; z-index: 70; pointer-events: none; animation: fall 2.6s ease-in forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }

.empty { text-align: center; padding: 56px 16px; }
.empty.small { padding: 32px 16px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty.small p { margin: 0; }

/* narrower screens: sidebar content drops below the list; a pill at the top points to new activity */
@media (max-width: 900px) {
  .list-layout.with-sidebar { display: block; }
  .list-sidebar { position: static; margin-top: 40px; }
  .news-pill {
    display: inline-flex; align-items: center; padding: 8px 12px; border-radius: 999px; font-size: 0.875rem; font-weight: 600;
    background: var(--accent-soft); color: var(--accent-dark); text-decoration: none;
  }
}

@media (max-width: 600px) {
  .container { padding: 24px 16px 96px; }
  .topbar-inner { padding: 10px 16px; min-height: 60px; }
  #nav { gap: 0; }
  #nav a:not(.btn), #nav .link-btn { padding: 8px 7px; font-size: 0.875rem; }
  .brand { white-space: nowrap; font-size: 1.125rem; }
  .topbar-inner { gap: 8px; }
  #nav .nav-text { display: none; }
  .notif-panel { position: fixed; top: 64px; left: 16px; right: 16px; width: auto; }
  .card { padding: 20px; }
  .activity-stats { grid-template-columns: repeat(4, 1fr); }
  .item, .item.draggable { padding: 12px; }
  .item { grid-template-columns: 64px 1fr; }
  .item.draggable { grid-template-columns: 20px 64px 1fr; }
  .thumb { width: 64px; height: 64px; }
  .item-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .item-actions .btn { flex: 1; }
  .more-fields { grid-template-columns: 1fr; }
}

/* the smallest phones: the gift icon alone stands in for the name, so the menu fits */
@media (max-width: 370px) {
  .brand-word { display: none; }
}

/* admins have two extra menu icons (usage, feedback): on phones the gift icon stands in for the name */
@media (max-width: 480px) {
  .topbar-inner:has(#nav a[href="/admin/usage"]) .brand-word { display: none; }
}

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

/* What's new */
.whats-new { max-width: 640px; margin: 0 auto; }
.release { margin-top: 32px; }
.release h2 { font-size: 1rem; color: var(--muted); }
.release ul { list-style: none; margin: 0; padding: 0; }
.release li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.release li p { margin: 2px 0 0; color: var(--muted); }
.release-emoji { font-size: 1.4rem; line-height: 1.2; }
.site-foot { text-align: center; padding: 0 24px 32px; font-size: 0.9rem; }
.site-foot a { color: var(--muted); }
