/* ==========================================================
   FROSTLOG — Design Tokens
   Aesthetic: cool slate-blue ground + warm editorial accent.
   Typography: Fraunces (display, serif) + DM Sans (body).
   ========================================================== */

:root {
  /* Frost palette — cold blues with depth */
  --frost-50:  #F4F8FB;
  --frost-100: #E3ECF2;
  --frost-200: #C8D8E3;
  --frost-300: #9FB6C7;
  --frost-400: #6E8AA0;
  --frost-500: #4A6478;
  --frost-600: #2F4658;
  --frost-700: #1B2F3F;
  --frost-800: #0E1A26;
  --frost-900: #07111A;

  /* Warm accent — anchor color, used sparingly */
  --ember-300: #F4C58A;
  --ember-400: #E8A560;
  --ember-500: #D4854A;
  --ember-600: #B4663A;

  /* Semantic */
  --bg:           var(--frost-50);
  --bg-raised:   #FFFFFF;
  --bg-sunken:   var(--frost-100);
  --ink:          var(--frost-800);
  --ink-soft:    var(--frost-500);
  --ink-faint:   var(--frost-400);
  --border:      var(--frost-200);
  --border-strong: var(--frost-300);
  --accent:      var(--ember-500);
  --accent-soft: var(--ember-300);
  --danger:      #C24B4B;
  --success:     #4F8A6E;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 2px rgba(14, 26, 38, 0.06), 0 1px 3px rgba(14, 26, 38, 0.04);
  --shadow:    0 4px 16px rgba(14, 26, 38, 0.08), 0 1px 2px rgba(14, 26, 38, 0.04);
  --shadow-lg: 0 12px 40px rgba(14, 26, 38, 0.18), 0 2px 8px rgba(14, 26, 38, 0.08);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'DM Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          var(--frost-900);
    --bg-raised:   var(--frost-800);
    --bg-sunken:   var(--frost-700);
    --ink:         var(--frost-50);
    --ink-soft:    var(--frost-200);
    --ink-faint:   var(--frost-300);
    --border:      rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow:    0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);
  }
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  overscroll-behavior-y: none;
}

body {
  /* Subtle frost grain */
  background-image:
    radial-gradient(circle at 15% 8%, rgba(159, 182, 199, 0.18) 0%, transparent 30%),
    radial-gradient(circle at 85% 92%, rgba(228, 165, 96, 0.08) 0%, transparent 35%);
  background-attachment: fixed;
}

button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 1rem; }

.hidden { display: none !important; }

/* ============== AUTH SCREEN ============== */

.auth-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--frost-700) 0%, var(--frost-900) 100%);
}

.auth-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.frost-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: drift 20s ease-in-out infinite;
}
.orb-1 { width: 380px; height: 380px; background: #4A6478; top: -100px; left: -120px; }
.orb-2 { width: 460px; height: 460px; background: #D4854A; bottom: -180px; right: -150px; opacity: 0.3; animation-delay: -7s; }
.orb-3 { width: 280px; height: 280px; background: #6E8AA0; top: 40%; left: 50%; opacity: 0.4; animation-delay: -14s; }

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(40px, -30px) scale(1.1); }
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--bg-raised);
  border-radius: var(--radius-xl);
  padding: 36px 28px 32px;
  box-shadow: var(--shadow-lg);
  z-index: 1;
}

.auth-brand {
  text-align: center;
  margin-bottom: 28px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--frost-800);
  color: var(--frost-50);
  border-radius: 16px;
  margin-bottom: 16px;
}
.brand-mark.small { width: 36px; height: 36px; border-radius: 10px; margin-bottom: 0; }
.brand-mark svg { width: 60%; height: 60%; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.2rem;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--ink);
  font-variation-settings: 'opsz' 144;
}

.brand-tag {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-style: italic;
  font-family: var(--font-display);
  font-weight: 400;
}

.auth-tabs {
  display: flex;
  background: var(--bg-sunken);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 24px;
  position: relative;
}
.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-soft);
  transition: all 0.2s;
}
.auth-tab.active {
  background: var(--bg-raised);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.auth-form { display: none; flex-direction: column; gap: 14px; }
.auth-form.active { display: flex; }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field > span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.field input,
.field select,
.field textarea {
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg-raised);
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212, 133, 74, 0.15);
}
.field textarea { resize: vertical; min-height: 60px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.household-toggle {
  display: flex;
  background: var(--bg-sunken);
  padding: 4px;
  border-radius: 10px;
  margin: 4px 0;
}
.household-opt {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px;
  border-radius: 7px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.household-opt.active {
  background: var(--bg-raised);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.1s, background 0.15s, opacity 0.15s;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn-block { width: 100%; }
.btn-flex { flex: 1; }

.btn-primary {
  background: var(--frost-800);
  color: var(--frost-50);
}
.btn-primary:hover { background: var(--frost-700); }

.btn-ghost {
  background: var(--bg-sunken);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--border); }

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1.5px solid var(--danger);
}
.btn-danger:hover { background: var(--danger); color: white; }

.auth-error {
  margin: 4px 0 0;
  color: var(--danger);
  font-size: 0.88rem;
  text-align: center;
  min-height: 1.2em;
}

/* ============== APP SHELL ============== */

.app {
  min-height: 100vh;
  padding-bottom: 100px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 18px 16px;
  position: sticky;
  top: 0;
  background: rgba(244, 248, 251, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 10;
  border-bottom: 1px solid var(--border);
}
@media (prefers-color-scheme: dark) {
  .app-header {
    background: rgba(7, 17, 26, 0.85);
  }
}

.header-left { display: flex; align-items: center; gap: 12px; }
.header-titles { display: flex; flex-direction: column; line-height: 1; }
.header-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  margin-bottom: 4px;
}
.header-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  margin: 0;
  letter-spacing: -0.02em;
}

.header-right { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--ink);
  font-size: 1.4rem;
  transition: background 0.15s;
}
.icon-btn:hover { background: var(--bg-sunken); }
.icon-btn svg { width: 20px; height: 20px; }

.member-stack {
  display: flex;
  flex-direction: row-reverse;
}
.member-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: white;
  border: 2px solid var(--bg-raised);
  margin-left: -8px;
  text-transform: uppercase;
}

/* ============== SEARCH ============== */

.search-bar {
  position: relative;
  margin: 16px 18px 12px;
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--ink-faint);
  pointer-events: none;
}
.search-bar input {
  width: 100%;
  padding: 13px 44px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--bg-raised);
  color: var(--ink);
}
.search-bar input:focus {
  outline: none;
  border-color: var(--accent);
}
.clear-search {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-sunken);
  border: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1;
}

/* ============== FILTERS ============== */

.filters {
  padding: 0 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.filter-row::-webkit-scrollbar { display: none; }

.chip {
  padding: 7px 13px;
  border: 1.5px solid var(--border);
  background: var(--bg-raised);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s;
  cursor: pointer;
}
.chip.active {
  background: var(--frost-800);
  color: var(--frost-50);
  border-color: var(--frost-800);
}
.chip-count {
  margin-left: 5px;
  font-size: 0.72rem;
  opacity: 0.65;
}

/* ============== STATS STRIP ============== */

.stats-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 20px 18px 12px;
  margin: 4px 0 0;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 144;
}
.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  margin-top: 4px;
  font-weight: 600;
}
.stat-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
}

/* ============== ITEMS GRID ============== */

.items-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 8px 18px 24px;
}

@media (min-width: 600px) {
  .items-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .items-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 8px 32px 24px; }
}

.item-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
  position: relative;
}
.item-card:active { transform: scale(0.98); }
.item-card:hover { box-shadow: var(--shadow); }

.item-card.is-zero { opacity: 0.55; }

.item-photo {
  aspect-ratio: 1;
  background: var(--bg-sunken);
  position: relative;
  overflow: hidden;
}
.item-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.item-photo-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.8rem;
  background: linear-gradient(135deg, var(--frost-100), var(--frost-200));
}
@media (prefers-color-scheme: dark) {
  .item-photo-placeholder {
    background: linear-gradient(135deg, var(--frost-700), var(--frost-600));
    color: var(--frost-300);
  }
}

.item-qty-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(14, 26, 38, 0.9);
  color: white;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.item-location-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--frost-700);
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  max-width: calc(100% - 70px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-info {
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.item-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

.item-meta {
  font-size: 0.78rem;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
}

.item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}
.item-tag {
  font-size: 0.7rem;
  padding: 2px 7px;
  background: var(--bg-sunken);
  color: var(--ink-soft);
  border-radius: 999px;
  font-weight: 500;
}

.item-added-by {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 700;
  color: white;
  border: 2px solid var(--bg-raised);
  text-transform: uppercase;
}

/* ============== EMPTY STATE ============== */

.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--ink-soft);
}
.empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}
.empty-state h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  margin: 0 0 6px;
  color: var(--ink);
}
.empty-state p {
  margin: 0;
}

/* ============== FAB ============== */

.fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none;
  box-shadow: 0 8px 24px rgba(212, 133, 74, 0.4), 0 2px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: transform 0.15s;
}
.fab:hover { transform: scale(1.05); }
.fab:active { transform: scale(0.95); }
.fab svg { width: 26px; height: 26px; }

/* ============== MODALS ============== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
}
.modal.open { display: block; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 17, 26, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fade-in 0.2s ease-out;
}

.modal-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-raised);
  border-radius: 24px 24px 0 0;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  animation: slide-up 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.2);
}

@media (min-width: 700px) {
  .modal-sheet {
    max-width: 540px;
    margin: 0 auto;
    bottom: 24px;
    left: 24px;
    right: 24px;
    border-radius: 24px;
    max-height: calc(100vh - 48px);
  }
}

.modal-handle {
  width: 36px;
  height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
  margin: 8px auto 0;
  flex-shrink: 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 4px;
  flex-shrink: 0;
}
.modal-header h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  margin: 0;
  letter-spacing: -0.01em;
}

.modal-body {
  padding: 12px 20px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  position: sticky;
  bottom: 0;
  background: var(--bg-raised);
  padding-top: 8px;
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* ============== ITEM FORM ============== */

.photo-upload {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  background: var(--bg-sunken);
  overflow: hidden;
  cursor: pointer;
  border: 1.5px dashed var(--border-strong);
  transition: border-color 0.15s;
}
.photo-upload:hover { border-color: var(--accent); }

.photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  gap: 8px;
}
.photo-placeholder svg { width: 32px; height: 32px; }
.photo-placeholder span { font-size: 0.85rem; font-weight: 500; }

.photo-preview {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.photo-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(14, 26, 38, 0.85);
  color: white;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
}

.qty-input {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-raised);
}
.qty-input input {
  flex: 1;
  border: none;
  text-align: center;
  padding: 10px 4px;
  background: transparent;
  color: var(--ink);
  -moz-appearance: textfield;
}
.qty-input input::-webkit-outer-spin-button,
.qty-input input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}
.qty-btn {
  width: 38px; height: 42px;
  background: var(--bg-sunken);
  border: none;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
}
.qty-btn:hover { background: var(--border); }

.tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag-picker .chip {
  font-size: 0.8rem;
  padding: 6px 12px;
  cursor: pointer;
}
.tag-picker .chip.selected {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ============== SETTINGS ============== */

.settings-block {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.settings-block:last-child { border-bottom: none; }
.settings-block h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.settings-help {
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.invite-code {
  background: var(--bg-sunken);
  border: 1.5px dashed var(--border-strong);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 0.2em;
  color: var(--ink);
  cursor: pointer;
  user-select: all;
}

.members-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.member-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
}
.member-row .member-avatar {
  width: 36px; height: 36px;
  margin-left: 0;
  font-size: 0.92rem;
  border: none;
}
.member-name { font-weight: 600; color: var(--ink); }
.member-meta { font-size: 0.78rem; color: var(--ink-soft); }
.member-you {
  margin-left: auto;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
}

.chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.chips-list .chip {
  cursor: default;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chip-remove {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.5;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  margin-left: 2px;
  cursor: pointer;
}
.chip-remove:hover { opacity: 1; }

.add-row {
  display: flex;
  gap: 8px;
}
.add-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg-raised);
  color: var(--ink);
}
.add-row input:focus {
  outline: none;
  border-color: var(--accent);
}

/* ============== TOASTS ============== */

.toast-container {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  z-index: 100;
  pointer-events: none;
}
.toast {
  background: var(--frost-800);
  color: var(--frost-50);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.25s ease-out, toast-out 0.25s ease-in 2.5s forwards;
}
.toast.error {
  background: var(--danger);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(20px); }
}

/* Adjustment buttons in card on hover/long-press */
.item-adjust {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: flex;
  gap: 4px;
}
.item-adjust button {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}
@media (prefers-color-scheme: dark) {
  .item-adjust button {
    background: rgba(14, 26, 38, 0.95);
    color: var(--frost-50);
  }
}
