/* savor · fridge agent
 *
 * Warm cream paper, deep green accent, cards that float rather than sit in boxes.
 * Palette, type and shapes come from the Claude Design handoff; see docs/DESIGN.md.
 *
 * The rule that shapes the whole file: urgency is never carried by colour alone. Every tier
 * pairs a colour with a distinct SHAPE, a border-rule style, and the day count in words,
 * because red and green are effectively identical under deuteranopia.
 */

:root {
  color-scheme: light;

  --paper:       #f7f5ee;
  --bar:         #f0f3eb;
  --card:        #fffcf7;
  --inner:       #ffffff;
  --wash:        #f2f5ed;

  --ink:         #17342d;
  --ink-2:       #40584f;
  --ink-3:       #779087;
  --ink-4:       #8a9a92;
  --ink-soft:    #6b8478;
  --placeholder: #93a59c;

  --green:       #18714d;
  --green-dark:  #0e4736;
  --green-mid:   #3c6a56;
  --green-tint:  #e4f2e8;
  --green-soft:  #dcefe2;
  --green-block: #daeeda;
  --green-edge:  #c6ddcd;
  --green-line:  #c9ded0;

  --line:        #e5e8df;
  --line-2:      #edf0e9;
  --line-3:      #eff0eb;

  --crit:        #c2453f;
  --crit-ink:    #b8443d;
  --crit-tint:   #fdeeec;
  --crit-edge:   rgba(194, 69, 63, .32);

  --warn:        #b3761b;
  --warn-ink:    #8f5e11;
  --warn-tint:   #fdf4e3;
  --warn-edge:   rgba(179, 118, 27, .32);

  --fine-rule:   #dde3d8;
  --fine-tint:   #eaf3ec;

  --shadow:      0 5px 22px rgba(28, 61, 48, .035);
  --shadow-lift: 0 5px 22px rgba(28, 61, 48, .05);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: clamp(16px, 3vw, 34px);
  --stripe: repeating-linear-gradient(135deg, #dfe3da 0 3px, #eef0e9 3px 6px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; background: var(--paper); }

body {
  font-family: var(--font);
  color: var(--ink);
  letter-spacing: -0.011em;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2 { margin: 0; letter-spacing: -0.03em; font-weight: 700; }

button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid rgba(24, 113, 77, .3);
  outline-offset: 3px;
}
a { color: var(--green); }
a:hover { color: var(--green-dark); }

.mono {
  font-family: var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0;
}

@keyframes arrive { from { opacity: 0; transform: translateY(-10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes leave  { to { opacity: 0; transform: translateX(14px); } }
@keyframes pulse  { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes sweep  { from { transform: translateX(-110%); } to { transform: translateX(360%); } }
@keyframes fade   { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* --- top bar --------------------------------------------------------------- */

.topbar {
  position: sticky; top: 0; z-index: 5;
  background: var(--bar);
  border-bottom: 1px solid rgba(23, 52, 45, .07);
  padding: 14px var(--gutter);
  display: flex; flex-wrap: wrap; gap: 14px;
  align-items: center; justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 28px; height: 28px; flex: none;
  display: grid; place-items: center;
  color: #fff; background: var(--green);
  border-radius: 9px 9px 9px 2px;
  font-size: 19px; font-weight: 700; line-height: 1;
  transform: rotate(-8deg);
}
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-size: 19px; font-weight: 700; letter-spacing: -0.03em; color: var(--green-dark); }
.brand-scan { font-size: 11px; color: var(--ink-3); }

.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border: 0; border-radius: 11px;
  background: transparent; color: #637a71;
  font-size: 13.5px; font-weight: 600;
}
.nav-btn:hover { color: var(--green-dark); }
.nav-btn[aria-current="page"] {
  background: #fff; color: var(--green-dark);
  box-shadow: 0 5px 18px rgba(31, 65, 48, .07);
}
.nav-badge {
  font-size: 11px; color: #5f766d; background: #e3e8e1;
  border-radius: 99px; padding: 1px 7px; font-weight: 600;
}

.topbar-right { display: flex; align-items: center; gap: 10px; }

.door-pill {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px;
  font-size: 13px; font-weight: 600; color: var(--ink-3);
  white-space: nowrap;
}
.door-dot { width: 8px; height: 8px; border-radius: 50%; background: #b9c7bd; flex: none; }
.door-pill[data-state="open"] { color: var(--green-dark); }
.door-pill[data-state="open"] .door-dot { background: var(--green); animation: pulse 1s infinite; }

.btn-soft {
  padding: 9px 15px; border: 0; border-radius: 12px;
  background: var(--green-soft); color: var(--green-dark);
  font-size: 13px; font-weight: 700; white-space: nowrap;
}
.btn-soft:hover { background: #d1e9d8; }
.link-soft { display: inline-block; text-decoration: none; }

/* --- door banner ----------------------------------------------------------- */

.scan-banner {
  position: relative; overflow: hidden;
  background: var(--green-tint);
  border-bottom: 1px solid var(--green-edge);
  padding: 16px var(--gutter);
  display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center;
}
.scan-banner .sweep {
  position: absolute; inset: 0; width: 24%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .9), transparent);
  animation: sweep 1.5s linear infinite;
  pointer-events: none;
}
.scan-title {
  position: relative; margin: 0;
  font-size: clamp(20px, 2.4vw, 26px); font-weight: 700;
  letter-spacing: -0.03em; color: var(--green-dark);
}
.scan-sub { position: relative; margin: 0; font-size: 15px; color: var(--green-mid); }
.scan-dots { position: relative; margin-left: auto; display: flex; gap: 6px; }
.scan-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--green); animation: pulse 1s infinite; }
.scan-dots i:nth-child(2) { animation-delay: .2s; }
.scan-dots i:nth-child(3) { animation-delay: .4s; }

/* --- page ------------------------------------------------------------------ */

.page {
  padding: clamp(18px, 2.6vw, 30px) var(--gutter) 80px;
  max-width: 1440px; width: 100%; margin: 0 auto;
}
.view { animation: fade .3s ease both; }

.page-head {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: flex-end; justify-content: space-between;
  margin-bottom: 22px;
}
.eyebrow { font-size: 11px; color: var(--green); margin-bottom: 8px; }
#heading { font-size: clamp(30px, 4vw, 46px); letter-spacing: -0.04em; line-height: 1; }
.subheading { font-size: 15px; color: var(--ink-3); margin: 9px 0 0; max-width: 56ch; }
.date-chip {
  font-size: 11.5px; color: #557067; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px;
  letter-spacing: 0.08em; white-space: nowrap;
}

/* --- stat band ------------------------------------------------------------- */

.stat-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: 20px;
  overflow: hidden; margin-bottom: 24px;
}
.stat { background: var(--card); padding: 22px clamp(18px, 2vw, 26px); }
.stat-num {
  margin: 0; font-size: clamp(38px, 5.2vw, 56px); font-weight: 700;
  line-height: 1; letter-spacing: -0.045em;
}
.stat-num.is-saved { color: var(--green); }
.stat-num.is-wasted { color: var(--crit-ink); }
.stat-cap { margin: 8px 0 0; font-size: 15px; color: var(--ink-3); }

/* --- layout ---------------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 24px; align-items: start;
}
.col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }

.card {
  background: var(--card);
  border: 1px solid rgba(23, 52, 45, .05);
  border-radius: 21px;
  padding: clamp(18px, 2vw, 25px);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 14px;
  min-width: 0;
}
.card-head {
  display: flex; flex-wrap: wrap; gap: 10px;
  align-items: center; justify-content: space-between;
}
.card-head h2 { font-size: 21px; }
.card-count, .card-label { font-size: 11px; color: var(--ink-4); }
.card-label { font-size: 10.5px; }

/* --- urgency shapes -------------------------------------------------------- */

.shape { display: inline-block; flex: none; }
.shape-crit {
  width: 0; height: 0;
  border-left: 9px solid transparent; border-right: 9px solid transparent;
  border-bottom: 15px solid var(--crit);
}
.shape-warn { width: 13px; height: 13px; background: var(--warn); transform: rotate(45deg); }
.shape-fine { width: 13px; height: 13px; border: 2.5px solid var(--green); border-radius: 50%; }

/* --- item rows ------------------------------------------------------------- */

.item {
  border: 1px solid var(--line-2);
  border-left: 6px solid var(--fine-rule);
  border-radius: 16px; background: var(--inner);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.item.is-arriving { animation: arrive 700ms cubic-bezier(.2, .8, .2, 1) both; }
.item[data-tier="crit"] { border-color: var(--crit-edge); border-left-color: var(--crit); }
.item[data-tier="warn"] { border-color: var(--warn-edge); border-left: 6px dashed var(--warn); }

.item-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

.icon-wrap { position: relative; flex: none; }
.icon-tile {
  width: 52px; height: 52px; border-radius: 15px;
  display: grid; place-items: center; font-size: 27px; line-height: 1;
  background: var(--fine-tint);
}
.item[data-tier="crit"] .icon-tile { background: var(--crit-tint); }
.item[data-tier="warn"] .icon-tile { background: var(--warn-tint); }

/* The real frame the camera captured. Shown only when one exists. */
.icon-photo {
  position: absolute; display: none;
  right: -6px; bottom: -6px;
  width: 24px; height: 24px; border-radius: 8px;
  border: 2px solid #fff;
  background-size: cover; background-position: center;
}
.icon-photo[data-has-photo="true"] { display: block; }

.item-main { min-width: min(100%, 150px); flex: 1; display: flex; flex-direction: column; gap: 3px; }
.item-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px; }
.item-name { font-size: 19px; font-weight: 700; letter-spacing: -0.025em; text-transform: capitalize; }
.item-cat { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-4); }
.item-meta { font-size: 13.5px; color: var(--ink-3); }

.item-right { display: flex; align-items: center; gap: 10px; flex: none; margin-left: auto; }
.item-word { font-size: 17px; font-weight: 700; letter-spacing: -0.025em; color: var(--green); }
.item[data-tier="crit"] .item-word { color: var(--crit-ink); }
.item[data-tier="warn"] .item-word { color: var(--warn-ink); }

.caret {
  width: 32px; height: 32px; flex: none;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: #557067;
  font-size: 18px; line-height: 1; display: grid; place-items: center;
}
.caret:hover { border-color: #b9c7bd; }

.item-detail {
  border-top: 1px solid var(--line-3); padding-top: 12px;
  display: flex; gap: 16px; flex-wrap: wrap;
  animation: arrive 320ms ease-out both;
}
.detail-photo {
  width: 84px; height: 62px; flex: none;
  border-radius: 11px; background: var(--stripe);
  background-size: cover; background-position: center;
  display: flex; align-items: flex-end; padding: 6px;
  font-family: var(--mono); font-size: 8.5px; color: #5f766d;
}
.detail-body { display: flex; flex-direction: column; gap: 6px; min-width: min(100%, 200px); flex: 1; }
.detail-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-4); margin: 0; }
.detail-tip { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); margin: 0; }
.detail-dates { font-family: var(--mono); font-size: 11.5px; color: var(--ink-4); margin: 0; }

/* --- confirmation ---------------------------------------------------------- */

.confirm {
  background: var(--card);
  border: 1px solid var(--green-edge);
  border-left: 6px solid var(--green);
  border-radius: 21px; padding: 24px;
  display: flex; flex-wrap: wrap; gap: 20px;
  box-shadow: var(--shadow-lift);
  animation: arrive 500ms ease-out both;
}
.confirm-tile {
  width: 72px; height: 72px; flex: none;
  border-radius: 18px; background: var(--green-tint);
  display: grid; place-items: center; font-size: 38px;
}
.confirm-body { display: flex; flex-direction: column; gap: 12px; min-width: min(100%, 240px); flex: 1; }
.confirm-who {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--green);
  display: flex; align-items: center; gap: 8px; margin: 0;
}
.confirm-who::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); animation: pulse 1.4s infinite;
}
.confirm-q {
  margin: 0; font-size: clamp(20px, 2.4vw, 25px); font-weight: 700;
  line-height: 1.24; letter-spacing: -0.03em;
}
.confirm-bar { height: 6px; border-radius: 99px; background: #e0e7e0; overflow: hidden; max-width: 320px; }
.confirm-bar i { display: block; height: 100%; background: var(--green); }
.confirm-meta { margin: 0; font-size: 13.5px; color: var(--ink-soft); }
.confirm-actions { display: flex; gap: 10px; margin-top: 2px; flex-wrap: wrap; }

.btn-solid {
  padding: 12px 30px; border: 0; border-radius: 12px;
  background: var(--green); color: #fff; font-size: 15px; font-weight: 700;
}
.btn-solid:hover { background: var(--green-dark); }
.btn-outline {
  padding: 9px 16px; border: 1px solid var(--green-line); border-radius: 11px;
  background: transparent; color: var(--green); font-size: 13px; font-weight: 700;
}
.btn-outline:hover { background: var(--green-tint); }
.confirm .btn-outline { padding: 12px 30px; font-size: 15px; border-radius: 12px; }

/* --- recipes --------------------------------------------------------------- */

.recipe {
  border: 1px solid var(--line-2); border-radius: 16px;
  background: var(--inner); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.recipe-top { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.recipe-head { min-width: min(100%, 200px); flex: 1; display: flex; flex-direction: column; gap: 5px; }
.recipe-title { font-size: 19px; font-weight: 700; letter-spacing: -0.025em; }
.recipe-meta { font-size: 13.5px; color: var(--ink-3); }
.recipe-why { font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: flex; align-items: center; gap: 7px;
  border: 1px solid var(--line-2); background: var(--inner);
  border-radius: 999px; padding: 5px 12px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
}
.chip .shape-crit { border-left-width: 6px; border-right-width: 6px; border-bottom-width: 10px; }
.chip-expiring { border-color: var(--crit-edge); background: var(--crit-tint); color: var(--crit-ink); }
.chip-missing { background: var(--wash); color: var(--ink-3); }

.recipe-detail {
  border-top: 1px solid var(--line-3); padding-top: 14px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 20px; animation: arrive 320ms ease-out both;
}
.steps { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 11px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.steps span { font-family: var(--mono); font-size: 11.5px; color: var(--ink-4); padding-top: 3px; flex: none; }

.macros { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 8px; }
.macro { border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; background: var(--card); }
.macro b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -0.035em; }
.macro span { font-size: 12px; color: var(--ink-3); }

.adjust {
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px dashed #d8b878; background: #fdf6e6;
  border-radius: 12px; padding: 11px 13px; margin-top: 10px;
  font-size: 13.5px; line-height: 1.5; color: #6b5416;
}
.adjust .shape-warn { width: 11px; height: 11px; margin-top: 4px; }
.recipe-missing { font-size: 13.5px; color: var(--ink-3); margin: 0; }

.meal-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em;
              text-transform: uppercase; color: var(--ink-4); margin: 6px 0 0; }

.planning {
  border: 1px dashed #d3dbd0; border-radius: 17px;
  padding: 24px; display: flex; align-items: center; gap: 12px;
  color: var(--ink-3); font-size: 14.5px;
}
.planning i { width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: none; animation: pulse 1s infinite; }

/* --- side blocks ----------------------------------------------------------- */

.ledger-row, .agent-row, .activity-row {
  display: flex; gap: 12px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--line-3); flex-wrap: wrap;
}
.ledger-row:last-child, .agent-row:last-child, .activity-row:last-child { border-bottom: 0; }
.ledger-name { font-size: 14.5px; font-weight: 700; flex: 1; min-width: 90px; text-transform: capitalize; }
.ledger-reason { font-size: 12.5px; color: var(--ink-3); }
.ledger-amt { font-size: 14.5px; font-weight: 700; min-width: 58px; text-align: right; }
.ledger-amt.saved { color: var(--green); }
.ledger-amt.wasted { color: var(--crit-ink); }

.activity-row { align-items: baseline; font-size: 14px; border-bottom: 0; padding: 3px 0; }
.activity-row time { font-family: var(--mono); font-size: 11.5px; color: var(--ink-4); flex: none; min-width: 34px; }
.activity-row p { margin: 0; color: var(--ink-2); }

.agent-row { align-items: baseline; padding: 5px 0; }
.agent-name { font-family: var(--mono); font-size: 12px; font-weight: 700; min-width: 84px; flex: none; }
.agent-role { font-size: 13.5px; line-height: 1.45; color: var(--ink-soft); flex: 1; min-width: 150px; }

.card-household { background: var(--green-block); border-color: transparent; box-shadow: none; gap: 9px; }
.card-household .card-label { color: var(--green-mid); }
.household-line { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -0.03em; color: #284b3e; }
.household-note { margin: 0; font-size: 14px; line-height: 1.5; color: #527264; }

.muted { font-size: 14px; color: var(--ink-3); margin: 0; }

/* --- chat ------------------------------------------------------------------ */

.chat-log { display: flex; flex-direction: column; gap: 9px; max-height: 300px; overflow-y: auto; }
.bubble { font-size: 14px; line-height: 1.5; padding: 11px 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble-user { align-self: flex-end; max-width: 88%; background: var(--wash); border-radius: 15px 15px 5px 15px; }
.bubble-agent { align-self: flex-start; max-width: 94%; background: var(--green-tint); color: #1e4b3b; border-radius: 15px 15px 15px 5px; }
.bubble-agent.thinking { color: var(--ink-3); font-style: italic; }

.ran { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.ran span {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em;
  border: 1px solid var(--green-edge); border-radius: 999px;
  padding: 3px 9px; color: var(--green-mid);
}

.pill {
  border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink-3);
  padding: 6px 12px; font-size: 12.5px; font-weight: 600;
}
.pill:hover { border-color: var(--green-line); color: var(--green-dark); }
.pill[data-on="true"] { background: var(--green); color: #fff; border-color: var(--green); }

.composer { display: flex; gap: 9px; align-items: center; }
.composer input, .search-row input {
  flex: 1; min-width: 0;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 13px; font: inherit; font-size: 14px;
  color: var(--ink); background: #fff;
}
.composer input::placeholder, .search-row input::placeholder { color: var(--placeholder); }

.mic {
  width: 46px; height: 46px; flex: none;
  border-radius: 50%; border: 0;
  background: var(--green); color: #fff;
  font-size: 19px; display: grid; place-items: center;
}
.mic:hover { background: var(--green-dark); }
.mic[data-recording="true"] { background: var(--crit); animation: pulse 1s infinite; }

.hint { font-size: 10.5px; color: var(--ink-4); margin: 0; min-height: 13px; letter-spacing: 0.08em; }

/* --- inventory view -------------------------------------------------------- */

.search-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.search-row input { flex: 1 1 220px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 12px; margin: 18px 0;
}
.grid-wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 20px; align-items: start; }
/* Compact cards are one unbroken row: the 150px main-column floor and the wrap on
   .item-row together push the day-word onto a second line at grid width. */
.grid .item { flex-direction: row; align-items: center; gap: 13px; }
.grid .item-row { flex-wrap: nowrap; width: 100%; gap: 12px; }
.grid .item-main { min-width: 0; }
.grid .item-meta { overflow-wrap: anywhere; }
.grid .item-right { gap: 8px; }
.grid .icon-tile { width: 48px; height: 48px; font-size: 25px; border-radius: 14px; }
.grid .icon-photo { width: 22px; height: 22px; border-radius: 7px; }
.grid .item-name { font-size: 16.5px; letter-spacing: -0.02em; }
.grid .item-meta { font-size: 12.5px; }
.grid .item-word { font-size: 14px; }

.plan-card {
  background: var(--card); border: 1px solid rgba(23, 52, 45, .05);
  border-radius: 21px; padding: clamp(18px, 2vw, 25px);
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 13px;
}
.plan-card .recipe-title { font-size: 22px; line-height: 1.15; letter-spacing: -0.03em; }
.plan-card .macro { background: #fff; }

.key {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
  background: var(--card); border: 1px solid rgba(23, 52, 45, .05);
  border-radius: 17px; padding: 16px 20px;
}
.key-row { display: flex; align-items: center; gap: 9px; font-size: 13.5px; }

.empty-box {
  border: 1px dashed #d3dbd0; border-radius: 17px;
  padding: 48px 22px; text-align: center;
  display: flex; flex-direction: column; gap: 11px; align-items: center;
}
.empty-tile { width: 54px; height: 54px; border-radius: 15px; background: var(--wash); display: grid; place-items: center; font-size: 26px; }
.empty-box h3 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -0.03em; }
.empty-box p { margin: 0; font-size: 14.5px; color: var(--ink-3); max-width: 42ch; line-height: 1.55; }
.empty-nums { font-family: var(--mono); font-size: 11.5px; color: var(--ink-4); margin-top: 4px; }

/* --- toasts ---------------------------------------------------------------- */

.toasts {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  display: grid; gap: 8px; max-width: min(340px, calc(100vw - 40px));
}
.toast {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 13px; padding: 11px 15px; font-size: 14px;
  box-shadow: 0 12px 30px rgba(28, 61, 48, .12);
  animation: arrive 250ms ease-out both;
}
.toast[data-tone="good"] { border-color: var(--green-edge); }
.toast[data-tone="warn"] { border-color: #d8b878; }
.toast[data-tone="bad"]  { border-color: var(--crit-edge); }

/* --- narrow ---------------------------------------------------------------- */

@media (max-width: 680px) {
  .topbar { gap: 10px; }
  .nav { order: 3; width: 100%; }
  .nav-btn { flex: 1; justify-content: center; }
  .item-right { margin-left: 0; width: 100%; justify-content: space-between; }
  .mic { width: 48px; height: 48px; }
  .confirm { padding: 20px; }
  .confirm-tile { width: 56px; height: 56px; font-size: 28px; }
  .confirm .btn-solid, .confirm .btn-outline { flex: 1; text-align: center; padding: 13px 0; }
}

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