/* ============================================================
   wishlist — Hearth. Ported from docs/mockups.html (Hearth tab).
   Tokens live in tokens.css; this file is layout + components.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; cursor: pointer; color: inherit; }
a { color: var(--accent-ink); }
h1, h2, h3, h4, p { margin: 0; }
h1:focus { outline: none; }
svg { display: block; }
img { max-width: 100%; }

/* ---------- type ---------- */
h1 { font-family: var(--font-display); font-weight: 500; font-style: italic; font-size: 36px; letter-spacing: -0.02em; line-height: 1.1; color: var(--fg-strong); text-wrap: balance; }
h2 { font-family: var(--font-display); font-weight: 500; font-size: 24px; letter-spacing: -0.015em; color: var(--fg-strong); }
h3 { font-family: var(--font-display); font-weight: 500; font-size: 18px; color: var(--fg-strong); }
.caption { font-size: 12px; color: var(--muted); }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.muted { color: var(--muted); }
.num, .item-price, .countdown { font-variant-numeric: tabular-nums; }

/* ---------- app shell ---------- */
.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.appbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 14px var(--gutter);
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
}
.appbar-inner { display: flex; align-items: center; gap: 20px; width: 100%; max-width: var(--content-max); margin: 0 auto; }
.applogo { display: flex; align-items: center; gap: 10px; color: var(--fg-strong); text-decoration: none; flex-shrink: 0; }
.applogo svg { flex-shrink: 0; }
.applogo-text { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -0.015em; }
.appnav { display: flex; gap: 4px; flex: 1; justify-content: center; min-width: 0; }
.appnav a {
  padding: 8px 14px 8px; border-radius: var(--radius-sm);
  color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px; border-bottom: 2px solid transparent;
}
.appnav a.active { color: var(--accent); border-bottom-color: var(--accent); border-radius: 0; padding-bottom: 6px; }
.appnav a:hover:not(.active) { color: var(--fg); }
.appuser { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.admin-pill {
  padding: 2px 8px; background: var(--accent-soft); color: var(--accent-ink);
  border-radius: 100px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
}
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: transparent; color: var(--muted); border: 0; text-decoration: none;
}
.icon-btn:hover { background: var(--accent-tint); color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }

/* avatar menu */
.avatar-menu { position: relative; }
.avatar-menu summary { list-style: none; cursor: pointer; display: block; border-radius: 50%; }
.avatar-menu summary::-webkit-details-marker { display: none; }
.avatar-menu .menu {
  position: absolute; right: 0; top: 40px; z-index: 40; min-width: 170px;
  background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 6px; box-shadow: var(--shadow);
}
.avatar-menu .menu a, .avatar-menu .menu button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 500; color: var(--fg); text-decoration: none; background: none; border: 0;
}
.avatar-menu .menu a:hover, .avatar-menu .menu button:hover { background: var(--accent-tint); color: var(--accent-ink); }
.avatar-menu .menu-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.avatar-menu .menu-name { padding: 6px 12px 4px; font-size: 12px; color: var(--muted); }

/* page */
.page { padding: 32px var(--gutter) 48px; max-width: var(--content-max); margin: 0 auto; width: 100%; flex: 1; }
.page-narrow { max-width: 760px; }

/* ---------- avatar ---------- */
.avatar {
  width: 48px; height: 48px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: white; font-weight: 600; font-size: 17px; flex-shrink: 0; overflow: hidden;
  background-size: cover; background-position: center; text-decoration: none; user-select: none;
}
.avatar-xs { width: 24px; height: 24px; font-size: 10px; }
.avatar-sm { width: 32px; height: 32px; font-size: 13px; }
.avatar-lg { width: 56px; height: 56px; font-size: 22px; }
.avatar-xl { width: 96px; height: 96px; font-size: 36px; }
.av-1 { background-image: linear-gradient(135deg, #3B6AC9, #6B91E6); }
.av-2 { background-image: linear-gradient(135deg, #D4679B, #E58BB1); }
.av-3 { background-image: linear-gradient(135deg, #4B7A4D, #6B9A5D); }
.av-4 { background-image: linear-gradient(135deg, #8C58B0, #A978C8); }
.av-5 { background-image: linear-gradient(135deg, #C97845, #DB9065); }
.av-6 { background-image: linear-gradient(135deg, #B0455E, #CB6E85); }
.av-7 { background-image: linear-gradient(135deg, #4EAEC3, #76C8D6); }
.av-8 { background-image: linear-gradient(135deg, #D4A14C, #E6BC7A); }
.avatar.has-photo { color: transparent; }

/* ---------- hero ---------- */
.hero { margin-bottom: 28px; }
.hero-top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 20px;
}
.hero-top.hero-plain { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.hero-person { display: flex; align-items: center; gap: 16px; }
.hero-eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 6px; }
.hero-eyebrow a { color: var(--muted); text-decoration: none; }
.hero-eyebrow a:hover { color: var(--accent); }
.hero h1 { margin: 0 0 6px; }
.hero p { color: var(--muted); font-size: 15px; }
.hero-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- countdown chip ---------- */
.countdown {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px;
  background: var(--accent-soft); color: var(--accent-ink); border-radius: 100px; font-size: 13px; font-weight: 500; white-space: nowrap;
}
.countdown-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.countdown-today { background: var(--good-soft); color: var(--good); }
.countdown-today .countdown-dot { background: var(--good); }

/* ---------- event banner ---------- */
.event-banner {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  background: linear-gradient(135deg, var(--accent-tint), var(--accent-soft));
  border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 20px; position: relative;
}
.event-banner-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: var(--accent); flex-shrink: 0; }
.event-banner-icon svg { width: 28px; height: 28px; }
.event-banner-text { flex: 1; min-width: 0; }
.event-banner-text strong { color: var(--fg-strong); font-weight: 600; display: block; font-size: 15px; }
.event-banner-text small { color: var(--muted); font-size: 13px; }
.event-banner-close { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; }
.event-banner-close svg { width: 14px; height: 14px; }
.event-banner-good { background: linear-gradient(135deg, var(--good-soft), var(--accent-tint)); }
.event-banner-good .event-banner-icon { color: var(--good); }

/* ---------- family grid ---------- */
.family-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 24px; }
.person-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
  cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s;
  display: flex; flex-direction: column; gap: 12px; min-width: 0; text-align: left; color: inherit; text-decoration: none;
}
.person-card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-1px); }
.person-card-top { display: flex; align-items: center; gap: 12px; }
.person-info { min-width: 0; flex: 1; }
.person-name { font-family: var(--font-display); font-weight: 500; font-size: 18px; letter-spacing: -0.01em; color: var(--fg-strong); }
.person-role { color: var(--muted); font-size: 12.5px; }
.person-event { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.person-event-days { font-weight: 600; color: var(--fg-strong); }
.person-event-days strong { font-family: var(--font-display); font-weight: 500; font-style: italic; font-size: 20px; color: var(--accent); }
.person-event-days span { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.person-event-label { font-size: 12px; color: var(--muted); text-align: right; }
.person-items-count { font-size: 12.5px; color: var(--muted); }
.person-items-count.empty { color: var(--subtle); font-style: italic; }
.person-card.is-you { border-style: dashed; }

/* ---------- toolbar + chips ---------- */
.toolbar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 16px; flex-wrap: wrap; }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 6px 12px; border-radius: 100px; font-size: 13px; background: transparent; color: var(--muted); border: 1px solid var(--border);
}
.chip:hover:not(.active) { color: var(--fg); border-color: var(--border-strong); }
.chip.active { background: var(--fg-strong); color: var(--surface); border-color: var(--fg-strong); }
.chip-count { font-weight: 500; margin-left: 4px; opacity: .7; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px;
  border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 500; border: 1px solid transparent;
  background: transparent; color: var(--fg); text-decoration: none; white-space: nowrap; line-height: 1.3;
}
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-ghost:hover:not(:disabled) { background: var(--surface); border-color: var(--border-strong); }
.btn-good { background: var(--good); color: #fff; border-color: var(--good); }
.btn-good:hover:not(:disabled) { filter: brightness(1.08); }
.btn-danger { color: var(--warn); border-color: var(--border); }
.btn-danger:hover:not(:disabled) { background: var(--accent-tint); border-color: var(--warn); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }
.btn-lg { padding: 11px 18px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { padding: 6px; width: 32px; height: 32px; }
.btn svg { width: 14px; height: 14px; }
.btn-link { background: none; border: 0; padding: 0; color: var(--accent-ink); font: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- items list ---------- */
.items { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.item {
  display: grid; grid-template-columns: 56px 1fr 160px 110px 140px; gap: 16px; padding: 14px 16px;
  align-items: center; border-bottom: 1px solid var(--border); min-width: 0;
}
.item:last-child { border-bottom: 0; }
.item-img {
  width: 56px; height: 56px; border-radius: var(--radius-sm); background: var(--accent-tint);
  display: flex; align-items: center; justify-content: center; color: var(--accent); overflow: hidden; flex-shrink: 0;
}
.item-img img { width: 100%; height: 100%; object-fit: cover; }
.item-img svg { width: 24px; height: 24px; opacity: .6; }
.item-main { min-width: 0; }
.item-name {
  font-family: var(--font-display); font-weight: 500; font-size: 16.5px; letter-spacing: -0.01em; color: var(--fg-strong);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.item-details {
  font-size: 13px; color: var(--muted); margin: 2px 0 0; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line;
}
.item-details.expanded { display: block; -webkit-line-clamp: unset; }
.item-details-toggle { font-size: 12px; color: var(--accent-ink); background: none; border: 0; padding: 0; margin-top: 2px; }
.item-store { font-size: 13px; color: var(--fg); min-width: 0; overflow-wrap: anywhere; }
.item-store-link { color: var(--muted); text-decoration: none; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.item-store-link:hover { color: var(--accent); }
.item-price { font-size: 14px; color: var(--fg-strong); font-weight: 500; }
.item-price.empty { color: var(--subtle); font-weight: 400; }
.item-action { display: flex; justify-content: flex-end; gap: 6px; align-items: center; flex-wrap: wrap; }
.item-meta { display: none; }

/* status pills */
.status {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 100px;
  font-family: var(--font-body); font-size: 11.5px; font-weight: 500; letter-spacing: .01em; white-space: nowrap;
}
.status svg { width: 10px; height: 10px; }
.status-standing { background: var(--accent-soft); color: var(--accent-ink); }
.status-purchased { background: var(--good-soft); color: var(--good); }
.status-group { background: var(--accent-soft); color: var(--accent-ink); }
.status-muted { background: var(--accent-tint); color: var(--muted); }

.item.purchased { background: color-mix(in oklab, var(--good-soft), transparent 50%); }
.item.purchased .item-name { text-decoration: line-through; text-decoration-color: var(--subtle); color: var(--muted); }

.purchaser {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 4px 4px; background: var(--good-soft); color: var(--good);
  border-radius: 100px; font-size: 11.5px; font-weight: 500; white-space: nowrap;
}
.chip-in { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; background: var(--good-soft); border-radius: 100px; }
.chip-in-avatars { display: flex; }
.chip-in-avatars > * { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--good-soft); font-size: 9px; margin-left: -6px; }
.chip-in-avatars > *:first-child { margin-left: 0; }
.chip-in-label { font-size: 11.5px; color: var(--good); font-weight: 500; }

/* composer (dashed add box) */
.composer {
  background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius);
  padding: 24px; text-align: center; margin-top: 14px; color: var(--muted);
}
.composer .btn { margin-top: 10px; }

/* summary strip */
.summary-strip { display: flex; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; flex-wrap: wrap; }
.summary-stat { display: flex; flex-direction: column; gap: 2px; }
.summary-stat-value { font-family: var(--font-display); font-size: 24px; font-weight: 500; color: var(--fg-strong); line-height: 1; letter-spacing: -0.02em; }
.summary-stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* archive groups */
.archive-group { margin-bottom: 24px; }
.archive-group-header { display: flex; align-items: baseline; gap: 12px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--border); }
.archive-group-header small { color: var(--muted); font-size: 13px; }

/* empty state */
.empty-state { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty-state h3 { margin-bottom: 6px; }

/* ---------- cards + forms ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card + .card { margin-top: 14px; }
.card h2 { font-size: 20px; margin-bottom: 4px; }
.card-sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.field { margin-bottom: 14px; }
.field label, .field-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=date], .field input[type=url], .field input[type=number],
.field select, .field textarea, .input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--fg); font: inherit; font-size: 14px;
}
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.field textarea { min-height: 90px; resize: vertical; }
.field-hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.field-row { display: flex; gap: 12px; }
.field-row > * { flex: 1; }
.check { display: flex; align-items: center; gap: 9px; font-size: 14px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.form-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.status-message { padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 14px; }
.status-message.success { background: var(--good-soft); color: var(--good); }
.status-message.error { background: var(--accent-soft); color: var(--warn); }
.validation-message { color: var(--warn); font-size: 12px; margin-top: 4px; }
.invalid { border-color: var(--warn) !important; }

/* switch toggle */
.switch { position: relative; width: 38px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--border-strong); border-radius: 100px; transition: background .15s; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: transform .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::before { transform: translateX(16px); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.switch-row:last-child { border-bottom: 0; }
.switch-row-text strong { display: block; font-weight: 500; color: var(--fg-strong); }
.switch-row-text small { color: var(--muted); font-size: 12.5px; }

/* ---------- auth pages ---------- */
.auth-shell { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px var(--gutter); }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 28px; box-shadow: var(--shadow); }
.auth-card .applogo { justify-content: center; margin-bottom: 18px; }
.auth-card .applogo-text { font-size: 24px; }
.auth-card h1 { font-size: 28px; text-align: center; margin-bottom: 4px; }
.auth-sub { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.auth-foot { text-align: center; margin-top: 16px; font-size: 13px; }
.auth-foot a { color: var(--accent-ink); text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }
.auth-note { text-align: center; font-size: 12px; color: var(--subtle); margin-top: 18px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: var(--fg-strong); color: var(--surface); padding: 10px 16px; border-radius: 100px; font-size: 13.5px;
  box-shadow: var(--shadow); z-index: 90; white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis;
}
.toast.error { background: var(--warn); color: #fff; }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(21, 17, 13, .45); z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; box-shadow: var(--shadow); padding: 22px; }
.modal h2 { margin-bottom: 14px; }

/* ---------- mobile tab bar ---------- */
.mobile-tabs {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 8px 0 calc(10px + env(safe-area-inset-bottom, 0px));
  grid-template-columns: repeat(4, 1fr); gap: 2px;
}
.mobile-tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px;
  color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 500;
}
.mobile-tab svg { width: 20px; height: 20px; }
.mobile-tab.active { color: var(--accent); }

/* ---------- mobile layout ---------- */
.hide-mobile { }
.show-mobile { display: none !important; }
@media (max-width: 719.98px) {
  .hide-mobile { display: none !important; }
  .show-mobile { display: initial !important; }
  .appnav { display: none; }
  .appbar { padding: 12px var(--gutter); padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
  .page { padding: 24px var(--gutter) calc(96px + env(safe-area-inset-bottom, 0px)); }
  .hero h1, h1 { font-size: 28px; }
  .family-grid { grid-template-columns: 1fr; }
  .mobile-tabs { display: grid; }
  .grid2 { grid-template-columns: 1fr; }
  .item {
    grid-template-columns: 48px 1fr;
    grid-template-areas: "img main" "meta meta" "action action";
    gap: 10px 12px; padding: 14px;
  }
  .item-img { grid-area: img; width: 48px; height: 48px; }
  .item-main { grid-area: main; }
  .item-action { grid-area: action; justify-content: flex-end; }
  .item-action .btn { min-height: 36px; }
  .item-store, .item-price { display: none; }
  .item-meta { grid-area: meta; display: flex; gap: 10px; font-size: 12px; color: var(--muted); align-items: center; flex-wrap: wrap; }
  .item-meta-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--subtle); }
  .item-meta a { color: var(--muted); }
  .summary-strip { gap: 18px; }
  .summary-stat-value { font-size: 20px; }
}

/* ---------- print ---------- */
@media print {
  .appbar, .mobile-tabs, .toolbar-row, .item-action, .status, .event-banner, .countdown, .hero-actions, .composer, #blazor-error-ui { display: none !important; }
  body { background: #fff; color: #000; }
  .items, .item { border-color: #ccc; }
  .item { grid-template-columns: 1fr 160px 110px; }
  .item-img { display: none; }
  .item.purchased { background: none; }
  .item.purchased .item-name { text-decoration: none; color: #000; }
  .item-details { display: block; -webkit-line-clamp: unset; }
  .item-store-link::after { content: " " attr(href); font-size: 10px; color: #666; }
}

/* ---------- misc ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
#blazor-error-ui {
  background: var(--surface-raised); color: var(--fg); border-top: 2px solid var(--warn);
  bottom: 0; left: 0; right: 0; box-shadow: var(--shadow); display: none;
  padding: 12px var(--gutter); position: fixed; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 12px; top: 10px; }

/* ---------- composer modal + link preview ---------- */
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.preview-box {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: -6px 0 14px;
  background: var(--accent-tint); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.preview-box img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; background: #fff; }
.preview-text { flex: 1; min-width: 0; }
.preview-text strong { display: block; font-size: 13.5px; color: var(--fg-strong); }
.preview-text small { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-actions { display: flex; gap: 6px; flex-shrink: 0; }
.image-pick { display: flex; align-items: center; gap: 14px; }
.item-img.has-image { background: var(--surface); border: 1px solid var(--border); }
.avatar-file { font-size: 12px; color: var(--muted); max-width: 100%; }
.item-details { cursor: pointer; }
@media (max-width: 719.98px) {
  .preview-box { flex-wrap: wrap; }
  .preview-actions { width: 100%; justify-content: flex-end; }
}

/* ---------- admin tables + logs ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 760px; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 500; padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.row-inactive td { opacity: .55; }
.person-cell { display: flex; align-items: center; gap: 10px; }
.person-cell strong { display: block; color: var(--fg-strong); font-weight: 500; }
.person-cell small { color: var(--muted); font-size: 12px; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.row-menu summary { width: 32px; height: 32px; }
.row-menu .menu { top: 36px; }
.input-sm { padding: 6px 8px; font-size: 13px; width: auto; }

.log-filters { margin-bottom: 14px; display: flex; flex-direction: column; gap: 10px; }
.log-filters-row { display: flex; gap: 8px; flex-wrap: wrap; }
.log-row { display: grid; grid-template-columns: 150px 110px 1fr 90px; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); cursor: pointer; font-size: 13px; }
.log-row:last-child { border-bottom: 0; }
.log-row:hover { background: var(--accent-tint); margin: 0 -16px; padding: 8px 16px; }
.log-time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.log-cat { justify-self: start; }
.log-msg { min-width: 0; overflow-wrap: anywhere; }
.log-user { color: var(--muted); font-size: 12px; text-align: right; }
.log-warn .log-msg { color: var(--warn); }
.log-error .log-msg { color: var(--warn); font-weight: 500; }
.log-detail { font-size: 11.5px; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; margin: 0 0 8px; color: var(--muted); }
@media (max-width: 719.98px) {
  .log-row { grid-template-columns: 1fr auto; grid-template-areas: "time cat" "msg msg" "user user"; }
  .log-time { grid-area: time; } .log-cat { grid-area: cat; } .log-msg { grid-area: msg; } .log-user { grid-area: user; text-align: left; }
}

/* ---------- Secret Santa ---------- */
.santa-card {
  display: flex; align-items: center; gap: 22px; padding: 24px; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--accent-tint), var(--good-soft)); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 20px;
}
.santa-card-compact { padding: 18px 20px; gap: 16px; }
.santa-card-avatar { flex-shrink: 0; }
.santa-card-text { flex: 1; min-width: 200px; }
.santa-card-text h2 { font-size: 28px; margin: 2px 0 4px; }
.santa-card-compact .santa-card-text h2 { font-size: 22px; }
.santa-card-text p { color: var(--muted); }
.participants { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.participant { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.participant-child { opacity: .6; }
.past-draw { padding: 8px 0; border-bottom: 1px solid var(--border); }
.past-draw:last-child { border-bottom: 0; }
.past-draw summary { cursor: pointer; }

/* ---------- seasonal ---------- */
.snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .25; z-index: 25; }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
.birthday-page {
  min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 32px var(--gutter); background: radial-gradient(ellipse at top, var(--accent-tint), var(--bg) 60%);
}
.birthday-inner { position: relative; z-index: 6; max-width: 640px; width: 100%; }
.birthday-scene { position: relative; height: 260px; margin: 0 auto 8px; max-width: 360px; }
.birthday-avatar { position: absolute; left: 50%; top: 40px; transform: translateX(-50%); z-index: 2; }
.birthday-avatar .avatar { box-shadow: 0 0 0 6px var(--surface), 0 0 0 9px var(--accent), var(--shadow); }
.cake { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 240px; z-index: 1; }
.balloon { position: absolute; width: 54px; animation: float 4s ease-in-out infinite; }
.balloon-1 { left: 6%; top: 10px; }
.balloon-2 { right: 8%; top: 0; animation-delay: -1.3s; }
.balloon-3 { left: 20%; top: 110px; width: 40px; animation-delay: -2.6s; }
.flame { transform-origin: center; animation: flicker 1.1s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes flicker { 0%, 100% { transform: scaleY(1); opacity: 1; } 50% { transform: scaleY(.85); opacity: .85; } }
.birthday-title { font-size: clamp(36px, 8vw, 72px); font-style: italic; margin: 6px 0 10px; }
.birthday-sub { color: var(--muted); font-size: 16px; margin-bottom: 22px; }
