@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #f3ede5;
  --paper: #faf5ee;
  --card: rgba(255, 252, 247, 0.94);
  --card-strong: #fffdf9;
  --ink: #231d19;
  --muted: #74685f;
  --line: rgba(63, 44, 27, 0.1);
  --line-strong: rgba(63, 44, 27, 0.16);
  --accent: #b86637;
  --accent-strong: #85431f;
  --accent-soft: #f1d4bf;
  --sage: #6d8772;
  --sage-soft: #e1ebe2;
  --gold: #b6893f;
  --gold-strong: #8a621f;
  --gold-soft: #f1e3c4;
  --olive: #2c3a34;
  --cream: #f7efe3;
  --warn: #8d433e;
  --warn-soft: #f6ddd9;
  --success: #2f6f56;
  --success-soft: #dcecdf;
  --shadow-soft:
    0 1px 2px rgba(35, 29, 25, 0.06),
    0 20px 40px -18px rgba(35, 29, 25, 0.22);
  --shadow-card:
    0 1px 2px rgba(35, 29, 25, 0.08),
    0 28px 56px -24px rgba(52, 31, 16, 0.2);
  --shadow-card-strong:
    0 1px 2px rgba(35, 29, 25, 0.08),
    0 40px 80px -28px rgba(48, 28, 16, 0.28);
  --radius-xl: 36px;
  --radius-lg: 26px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  font-family: "Inter", "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(212, 140, 82, 0.18), transparent 20%),
    radial-gradient(circle at 92% 8%, rgba(109, 135, 114, 0.12), transparent 16%),
    linear-gradient(180deg, #fbf7f1 0%, #f4ede4 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 999px;
  filter: blur(10px);
}

body::before {
  top: 84px;
  right: -90px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(212, 140, 82, 0.18), transparent 68%);
}

body::after {
  left: -60px;
  bottom: 120px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(88, 119, 92, 0.14), transparent 68%);
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 22px 16px 48px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 10px 2px 20px;
  backdrop-filter: blur(14px);
}

.brand-lockup {
  margin-bottom: 16px;
  padding: 20px 22px 18px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.3), transparent 28%),
    linear-gradient(180deg, rgba(255, 252, 248, 0.88), rgba(250, 243, 234, 0.82));
  box-shadow: var(--shadow-soft);
}

.brand-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.brand-status {
  padding: 8px 11px;
  border-radius: var(--radius-pill);
  background: rgba(35, 29, 25, 0.05);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
}

.brand-title {
  margin: 8px 0 8px;
  font-family: "Fraunces", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.15rem);
  line-height: 0.94;
  letter-spacing: -0.03em;
}

.brand-subtitle {
  margin: 0;
  max-width: 42ch;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.52;
}

.progress-wrap {
  padding: 14px 18px 14px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.88), rgba(248, 241, 232, 0.8));
  box-shadow: var(--shadow-soft);
}

.progress-steps {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.progress-step {
  opacity: 0.56;
  transition: color 180ms ease, opacity 180ms ease;
}

.progress-step.active,
.progress-step.done {
  opacity: 1;
}

.progress-step.active {
  color: var(--accent);
  font-weight: 800;
}

.progress-step.done {
  color: var(--accent-strong);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: var(--muted);
}

.progress-track {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: rgba(29, 25, 22, 0.08);
}

.progress-fill {
  width: 25%;
  height: 100%;
  border-radius: var(--radius-pill);
  background:
    linear-gradient(90deg, #ab5322 0%, #d58e43 55%, #efc07f 100%);
  transition: width 260ms ease;
}

.phone-frame {
  position: relative;
  padding: 12px;
  border-radius: 36px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  background:
    linear-gradient(180deg, rgba(255, 251, 246, 0.72), rgba(255, 247, 238, 0.58));
  box-shadow: var(--shadow-card);
}

#app {
  position: relative;
  min-height: 76vh;
  padding: 26px 22px 24px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.5), transparent 18%),
    linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(250, 243, 233, 0.98));
  overflow: hidden;
}

#app::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at -4% 0%, rgba(209, 132, 75, 0.08), transparent 22%),
    radial-gradient(circle at 104% 12%, rgba(95, 133, 103, 0.08), transparent 18%);
}

.step-head,
.section-block,
.footer-nav,
.dashboard,
.loading-view {
  position: relative;
  z-index: 1;
}

.step-head {
  margin-bottom: 16px;
}

.step-kicker {
  margin: 0 0 8px;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.73rem;
  font-weight: 800;
}

.step-title {
  margin: 0 0 10px;
  font-family: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: clamp(1.82rem, 4.3vw, 2.6rem);
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.step-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
  font-size: 1rem;
}

.editorial-panel,
.dashboard-card,
.recommendation-card,
.toggle-card,
.visual-card,
.tag-chip,
.entry-input {
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.editorial-panel {
  padding: 18px;
  margin-bottom: 16px;
  border-radius: 28px;
  overflow: hidden;
}

.editorial-panel.trust {
  background:
    radial-gradient(circle at top right, rgba(95, 133, 103, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(247, 252, 247, 0.95), rgba(240, 247, 240, 0.95));
}

.editorial-panel.warm {
  background:
    radial-gradient(circle at top right, rgba(212, 140, 83, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(255, 247, 238, 0.98), rgba(252, 240, 230, 0.98));
}

.editorial-panel.dark {
  color: white;
  border-color: rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.16), transparent 28%),
    linear-gradient(135deg, #20352d 0%, #375845 54%, #c96e38 100%);
  box-shadow: var(--shadow-card);
}

.editorial-panel.success {
  background:
    radial-gradient(circle at top right, rgba(95, 133, 103, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(243, 250, 244, 0.98), rgba(236, 247, 238, 0.98));
}

.editorial-eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-strong);
}

.editorial-panel.dark .editorial-eyebrow,
.editorial-panel.dark .editorial-copy {
  color: rgba(255, 255, 255, 0.8);
}

.editorial-panel.dark .editorial-title {
  color: white;
}

.editorial-title {
  margin: 0 0 8px;
  font-family: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 1.6rem;
  line-height: 1.06;
}

.editorial-copy {
  margin: 0;
  line-height: 1.55;
  color: var(--muted);
}

.section-block + .section-block {
  margin-top: 18px;
}

.section-label {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 10px;
}

.section-label h3 {
  margin: 0;
  font-size: 1.04rem;
  letter-spacing: -0.01em;
}

.hint {
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.section-block {
  padding: 22px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.96), rgba(251, 244, 234, 0.92));
}

.toggle-grid,
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.toggle-card,
.visual-card,
.tag-chip,
.inline-add,
.action-btn,
.primary-btn,
.secondary-btn {
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    opacity 180ms ease;
}

.toggle-card:active,
.visual-card:active,
.tag-chip:active,
.inline-add:active,
.action-btn:active,
.primary-btn:active,
.secondary-btn:active {
  transform: scale(0.985);
}

.toggle-card {
  padding: 18px;
  cursor: pointer;
  border-radius: 24px;
  text-align: left;
}

.toggle-card:hover,
.toggle-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 28px rgba(67, 40, 21, 0.12);
}

.toggle-card.selected {
  border-color: rgba(95, 133, 103, 0.42);
  background:
    radial-gradient(circle at top right, rgba(95, 133, 103, 0.12), transparent 32%),
    linear-gradient(180deg, #fffef9 0%, var(--sage-soft) 100%);
}

.toggle-card.disabled {
  opacity: 0.56;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  background: linear-gradient(180deg, rgba(248, 243, 237, 0.96), rgba(240, 234, 228, 0.96));
}

.toggle-card.disabled .toggle-title,
.toggle-card.disabled .toggle-copy {
  color: #8b827b;
}

.toggle-pill {
  width: 18px;
  height: 18px;
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 2px solid rgba(29, 25, 22, 0.24);
}

.toggle-card.selected .toggle-pill {
  border-color: var(--success);
  background: var(--success);
}

.toggle-card.selected .toggle-pill::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: white;
}

.toggle-title {
  margin-bottom: 4px;
  font-weight: 800;
}

.toggle-copy {
  color: var(--muted);
  line-height: 1.38;
  font-size: 0.88rem;
}

.visual-card {
  position: relative;
  min-height: 168px;
  padding: 20px;
  border-radius: 26px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 16px;
  cursor: pointer;
  background: var(--card-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  text-align: left;
}

.visual-card.shape-round {
  border-radius: 30px 34px 26px 36px;
}

.visual-card.shape-soft-square {
  border-radius: 22px 28px 22px 26px;
}

.visual-card.shape-sharp {
  border-radius: 16px 30px 14px 26px;
}

.visual-card.shape-leaf {
  border-radius: 30px 18px 30px 18px;
}

.visual-card:hover,
.visual-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 20px 30px rgba(67, 40, 21, 0.14);
}

.visual-card.selected {
  border-color: rgba(95, 133, 103, 0.55);
  box-shadow: 0 0 0 1.5px rgba(95, 133, 103, 0.55), var(--shadow-soft);
}

.visual-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--icon-bg, var(--accent-soft));
  color: var(--icon-fg, var(--accent-strong));
}

.visual-card-icon .card-icon-svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.visual-card-check {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--success);
  color: white;
  font-size: 0.68rem;
  font-weight: 900;
}

.visual-card.selected .visual-card-check {
  display: flex;
}

.card-body {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
}

.card-tag {
  display: inline-flex;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.card-title {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.15;
}

.card-copy {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.pattern-grid .visual-card {
  min-height: 152px;
}

.mood-grid .visual-card {
  min-height: 140px;
}

.visual-card[data-tag="protein"] {
  --icon-bg: var(--accent-soft);
  --icon-fg: var(--accent-strong);
}

.visual-card[data-tag="base"] {
  --icon-bg: var(--gold-soft);
  --icon-fg: var(--gold-strong);
}

.visual-card[data-tag="mood"] {
  --icon-bg: var(--sage-soft);
  --icon-fg: var(--sage);
}

.flavor-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.flavor-grid .visual-card {
  min-height: 196px;
}

.flavor-grid .visual-card.tone-sweet {
  --icon-bg: #f6dde1;
  --icon-fg: #b04a63;
}

.flavor-grid .visual-card.tone-salty {
  --icon-bg: #dde1ea;
  --icon-fg: #4f5b73;
}

.flavor-grid .visual-card.tone-sour {
  --icon-bg: #eef0c9;
  --icon-fg: #6b7a1f;
}

.flavor-grid .visual-card.tone-bitter {
  --icon-bg: #e4dcd3;
  --icon-fg: #4a3826;
}

.flavor-grid .visual-card.tone-umami {
  --icon-bg: #ecd9c9;
  --icon-fg: #7a4321;
}

.flavor-grid .visual-card.tone-rich {
  --icon-bg: #f1e3c4;
  --icon-fg: #8a5f1f;
}

.flavor-grid .visual-card.tone-spicy {
  --icon-bg: #fbdbd0;
  --icon-fg: #a3341c;
}

.flavor-grid .visual-card.tone-aromatic {
  --icon-bg: #dcecdf;
  --icon-fg: #2f6f4c;
}

.note-card {
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 251, 245, 0.98), rgba(250, 243, 234, 0.98));
}

.note-card h3,
.dashboard-card h3,
.recommendation-card h3 {
  margin: 0 0 8px;
}

.error-state {
  border: 1px solid rgba(185, 28, 28, 0.35);
  background: linear-gradient(180deg, rgba(254, 242, 242, 0.98), rgba(254, 226, 226, 0.9));
}

.error-state .step-copy {
  margin-bottom: 14px;
}

.chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice-chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-chip {
  min-height: 50px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.choice-chip.selected {
  border-color: rgba(95, 133, 103, 0.34);
  background: linear-gradient(180deg, #fcfff9, var(--sage-soft));
  color: var(--success);
}

.choice-chip.disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
  filter: grayscale(0.12);
}

.fast-track-panel {
  margin-bottom: 14px;
}

.fast-track-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(95, 133, 103, 0.22);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(247, 252, 247, 0.98), rgba(240, 247, 240, 0.98));
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.fast-track-btn.selected {
  border-color: rgba(47, 125, 90, 0.38);
  background: linear-gradient(180deg, #f6fff8, var(--success-soft));
}

.fast-track-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(47, 125, 90, 0.12);
  color: var(--success);
  font-weight: 900;
}

.fast-track-content {
  display: grid;
  gap: 4px;
}

.fast-track-copy {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.compact-guardrail-flow {
  display: grid;
  gap: 14px;
  transition: opacity 180ms ease, transform 180ms ease;
}

.compact-guardrail-flow.dimmed {
  opacity: 0.42;
  pointer-events: none;
  transform: scale(0.99);
}

.compact-block {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 250, 242, 0.82);
  box-shadow: var(--shadow-soft);
}

.section-label.compact {
  align-items: center;
  margin-bottom: 12px;
}

.accordion-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 2px 0;
  border: none;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.accordion-meta {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.accordion-panel {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.inline-entry.compact {
  margin-bottom: 0;
}

.compact-note {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(29, 25, 22, 0.04);
}

.inline-entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 12px;
}

.entry-input {
  min-height: 52px;
  padding: 0 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink);
}

.entry-input:focus {
  outline: 2px solid rgba(196, 104, 47, 0.22);
  border-color: rgba(196, 104, 47, 0.38);
}

.inline-add {
  min-width: 88px;
  border: 1px solid rgba(29, 25, 22, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff7ef, #f4e6d8);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.tag-chip {
  padding: 11px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.86);
  cursor: pointer;
}

.tag-chip.selected {
  border-color: rgba(95, 133, 103, 0.34);
  background: linear-gradient(180deg, #f8fff9, var(--sage-soft));
  color: var(--success);
}

.tag-chip.selected.danger {
  border-color: rgba(139, 58, 56, 0.28);
  background: linear-gradient(180deg, #fff4f3, var(--warn-soft));
  color: var(--warn);
}

.swipe-status {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  justify-content: center;
}

.swipe-stage {
  display: grid;
  gap: 16px;
}

.swipe-stage-info,
.swipe-stage-deck {
  min-width: 0;
}

.swipe-stage-info .editorial-panel {
  margin-bottom: 12px;
}

.swipe-stat {
  padding: 9px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(29, 25, 22, 0.06);
  background: rgba(255, 252, 247, 0.86);
  color: var(--muted);
  font-size: 0.84rem;
  box-shadow: var(--shadow-soft);
}

.swipe-stat strong {
  color: var(--ink);
}

.swipe-wrap {
  display: grid;
  gap: 14px;
  justify-items: center;
}

.swipe-stack {
  position: relative;
  width: min(100%, 430px);
  aspect-ratio: 9 / 16;
  min-height: 620px;
  max-height: 78vh;
}

.swipe-backdrop {
  position: absolute;
  inset: 16px 16px -10px;
  border-radius: 36px;
  background:
    radial-gradient(circle at top left, rgba(246, 198, 132, 0.28), transparent 34%),
    linear-gradient(180deg, rgba(201, 107, 50, 0.08), rgba(95, 133, 103, 0.12));
  filter: blur(8px);
  opacity: 0.92;
}

.swipe-card {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 38px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.22), transparent 22%),
    linear-gradient(180deg, rgba(255, 252, 247, 0.98), rgba(249, 242, 232, 0.98));
  border: 1px solid rgba(29, 25, 22, 0.08);
  box-shadow: var(--shadow-card-strong);
  touch-action: none;
  user-select: none;
  transition: transform 220ms ease, opacity 220ms ease;
}

.swipe-sheen {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.22), transparent 24%, transparent 68%, rgba(255, 255, 255, 0.08));
  mix-blend-mode: screen;
}

.swipe-feedback {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms linear;
}

.swipe-feedback.like {
  background: linear-gradient(135deg, rgba(47, 125, 90, 0.56), rgba(47, 125, 90, 0.12) 46%, transparent 76%);
}

.swipe-feedback.dislike {
  background: linear-gradient(225deg, rgba(139, 58, 56, 0.56), rgba(139, 58, 56, 0.12) 46%, transparent 76%);
}

.swipe-card.exiting {
  opacity: 0;
}

.swipe-card.drag-like {
  box-shadow: 0 34px 64px rgba(47, 125, 90, 0.2);
}

.swipe-card.drag-dislike {
  box-shadow: 0 34px 64px rgba(139, 58, 56, 0.2);
}

.swipe-media {
  position: relative;
  height: 44%;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 236, 215, 0.44), transparent 28%),
    radial-gradient(circle at 82% 16%, rgba(255, 226, 194, 0.24), transparent 18%),
    radial-gradient(circle at 50% 118%, rgba(255, 201, 148, 0.22), transparent 30%),
    linear-gradient(145deg, #d69267 0%, #a85a2d 48%, #6f3218 100%);
}

.swipe-image-noise {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.2), transparent 16%),
    radial-gradient(circle at 80% 15%, rgba(255, 255, 255, 0.12), transparent 18%),
    radial-gradient(circle at 50% 78%, rgba(51, 27, 15, 0.2), transparent 28%),
    linear-gradient(180deg, rgba(18, 15, 12, 0.02), rgba(18, 15, 12, 0.08) 42%, rgba(18, 15, 12, 0.76) 100%);
}

.swipe-icon-motif {
  position: absolute;
  right: 22px;
  top: 22px;
  z-index: 2;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.18);
  color: white;
  backdrop-filter: blur(10px);
}

.swipe-icon-motif .card-icon-svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.swipe-caption {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.caption-pill {
  padding: 8px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.78rem;
  backdrop-filter: blur(8px);
}

.swipe-like,
.swipe-dislike {
  position: absolute;
  top: 18px;
  z-index: 3;
  opacity: 0;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.swipe-like {
  right: 18px;
  color: white;
  background: rgba(47, 125, 90, 0.94);
  transform: rotate(-8deg);
}

.swipe-dislike {
  left: 18px;
  color: white;
  background: rgba(139, 58, 56, 0.92);
  transform: rotate(8deg);
}

.swipe-body {
  padding: 16px 18px 18px;
  display: grid;
  align-content: start;
  grid-template-rows: auto auto auto 1fr;
  gap: 0;
  height: 56%;
}

.swipe-title {
  margin: 6px 0 10px;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: clamp(1.72rem, 4.4vw, 2.34rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-wrap: balance;
  max-width: none;
}

.meal-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 14px;
}

.meal-fact {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(32, 25, 19, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 18px rgba(62, 38, 20, 0.06);
}

.meal-fact--allergen {
  grid-column: 1 / -1;
}

.meal-fact-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meal-fact strong {
  display: block;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.22;
  white-space: normal;
  overflow-wrap: break-word;
}

.meal-fact--diet.veg {
  border-color: rgba(47, 111, 86, 0.22);
  background: linear-gradient(180deg, rgba(246, 255, 248, 0.94), rgba(220, 236, 223, 0.86));
}

.meal-fact--diet.veg strong {
  color: var(--success);
}

.meal-fact--diet.egg {
  border-color: rgba(187, 106, 52, 0.24);
  background: linear-gradient(180deg, rgba(255, 248, 235, 0.94), rgba(241, 207, 179, 0.72));
}

.meal-fact--diet.nonveg {
  border-color: rgba(127, 57, 28, 0.24);
  background: linear-gradient(180deg, rgba(255, 244, 236, 0.94), rgba(241, 207, 179, 0.82));
}

.meal-fact--diet.nonveg strong {
  color: var(--accent-strong);
}

.meal-fact--diet.unknown,
.meal-fact--allergen {
  background: rgba(255, 250, 242, 0.82);
}

.swipe-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.36;
  font-size: 0.94rem;
  max-height: 4.1em;
  overflow: hidden;
}

.swipe-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: min(100%, 430px);
}

.action-btn,
.primary-btn,
.secondary-btn {
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.action-btn:hover,
.primary-btn:hover,
.secondary-btn:hover,
.inline-add:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 24px rgba(67, 40, 21, 0.12);
}

.action-btn {
  min-height: 64px;
  padding: 16px 20px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: var(--shadow-soft);
}

.action-btn.dislike {
  color: #8f4439;
  background: linear-gradient(180deg, rgba(255, 241, 239, 0.98), rgba(247, 221, 217, 0.98));
}

.action-btn.like {
  color: #2d6f55;
  background: linear-gradient(180deg, rgba(241, 251, 245, 0.98), rgba(217, 235, 224, 0.98));
}

.stack-count {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
  text-align: center;
}

.footer-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding: 14px;
  border: 1px solid rgba(58, 39, 24, 0.08);
  border-radius: 28px;
  background: rgba(255, 251, 245, 0.9);
}

.reset-nav {
  margin-top: 14px;
}

/* Swipe deck (Step 3) is a self-contained, single-screen interaction -- the whole point of
   swipe-to-decide breaks if the "Pass"/"Love it" buttons are off-screen below the fold and
   the user has to scroll to reach them, then scroll back up for the next card. Everything
   below is scoped to .app-shell.swipe-mode, a class app.js toggles only while step === 2, so
   every other step keeps its normal, unconstrained scrolling layout untouched. */
.app-shell.swipe-mode {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: 10px;
  overflow: hidden;
}

.app-shell.swipe-mode .topbar {
  padding: 6px 2px 8px;
  flex: 0 0 auto;
}

.app-shell.swipe-mode .brand-lockup {
  margin-bottom: 8px;
  padding: 10px 16px 8px;
}

.app-shell.swipe-mode .brand-subtitle {
  display: none;
}

.app-shell.swipe-mode .brand-title {
  display: none;
}

.app-shell.swipe-mode .progress-wrap {
  padding: 8px 16px;
}

.app-shell.swipe-mode .phone-frame {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
}

.app-shell.swipe-mode #app {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Not critical mid-swipe, and the topbar's own progress bar already says where the user is. */
.app-shell.swipe-mode #app > .api-status-banner {
  display: none;
}

/* The step-head's title/copy repeats what the editorial panel below says in different
   words -- keep only the compact kicker line here and cut the editorial panel entirely
   (below) rather than show the same "why you're swiping" explanation twice. */
.app-shell.swipe-mode #app > .step-head {
  flex: 0 0 auto;
  margin-bottom: 4px;
}

.app-shell.swipe-mode #app > .step-head .step-title,
.app-shell.swipe-mode #app > .step-head .step-copy {
  display: none;
}

.app-shell.swipe-mode .swipe-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-shell.swipe-mode .swipe-stage-info .editorial-panel {
  display: none;
}

/* Redundant -- the card itself already says "Card 1 of 8", and the row under the card
   already says "8 cards left". A third counter here was just eating vertical space. */
.app-shell.swipe-mode .swipe-status {
  display: none;
}

.app-shell.swipe-mode .swipe-stage-info {
  flex: 0 0 auto;
}

.app-shell.swipe-mode .swipe-stage-deck {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
}

.app-shell.swipe-mode .swipe-wrap {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* The real fix: drop the fixed min-height that forced this tall regardless of what room was
   actually left, and let it flex to fill whatever space remains after the chrome above --
   width still caps at a sensible card size, height now comes from the flex parent instead
   of a hardcoded 620px floor. */
.app-shell.swipe-mode .swipe-stack {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  width: min(100%, 430px);
  aspect-ratio: auto;
  margin: 0 auto;
}

.app-shell.swipe-mode .swipe-actions {
  flex: 0 0 auto;
}

.app-shell.swipe-mode .action-btn {
  min-height: 48px;
  padding: 12px 18px;
}

.app-shell.swipe-mode #app > .footer-nav {
  flex: 0 0 auto;
  margin-top: 10px;
  padding: 10px 14px;
}

/* Safety net, not the primary fix -- on a very short viewport the card's own content
   (title + facts + description) could still outgrow a shrunk card. Scrolling INSIDE the
   card is fine; scrolling the whole page to find the buttons is what was actually broken. */
/* The image is decorative (a generic icon + cuisine tags, no real photo) -- the actual
   useful information (name, type, protein, allergens, description) lives in the body, so
   give it less of the card's limited height rather than splitting close to evenly. */
.app-shell.swipe-mode .swipe-media {
  height: 30%;
}

.app-shell.swipe-mode .swipe-body {
  height: 70%;
  overflow-y: auto;
}

.app-shell.swipe-mode .swipe-title {
  font-size: clamp(1.3rem, 5vw, 1.8rem);
  margin: 4px 0 6px;
}

.app-shell.swipe-mode .meal-facts {
  margin: 8px 0 8px;
}

.app-shell.swipe-mode .swipe-copy {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.reset-btn {
  min-width: 140px;
}

.smart-default-card {
  margin-bottom: 18px;
  background:
    linear-gradient(180deg, rgba(246, 255, 248, 0.98), rgba(236, 247, 238, 0.98));
}

.primary-btn,
.secondary-btn {
  min-height: 56px;
  padding: 0 24px;
  font-weight: 800;
}

.primary-btn {
  flex: 1;
  color: white;
  background: linear-gradient(90deg, #9f5529 0%, #b86637 48%, #d59a61 100%);
  box-shadow: 0 18px 30px -14px rgba(127, 57, 28, 0.32);
}

.primary-btn:disabled {
  opacity: 0.42;
  transform: none;
  box-shadow: none;
  cursor: not-allowed;
}

.secondary-btn {
  min-width: 104px;
  color: var(--ink);
  background: rgba(35, 29, 25, 0.05);
}

.loading-view {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.loading-rings {
  display: flex;
  gap: 12px;
}

.loading-rings span {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--accent);
  animation: pulse 1.2s infinite ease-in-out;
}

.loading-rings span:nth-child(2) {
  animation-delay: 0.18s;
}

.loading-rings span:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes pulse {
  0%,
  80%,
  100% {
    transform: scale(0.7);
    opacity: 0.35;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.skeleton-row {
  height: 18px;
  border-radius: var(--radius-pill);
  background:
    linear-gradient(90deg, rgba(29, 25, 22, 0.06), rgba(29, 25, 22, 0.14), rgba(29, 25, 22, 0.06));
  background-size: 200% 100%;
  animation: shimmer 1.8s infinite linear;
}

.skeleton-row.short {
  width: 56%;
}

.skeleton-row.mid {
  width: 82%;
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

.dashboard {
  display: grid;
  gap: 16px;
}

.hero-panel {
  padding: 22px;
  border-radius: 30px;
  color: white;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(135deg, #182821 0%, #314d3f 46%, #b76031 100%);
  box-shadow: var(--shadow-card);
}

.hero-title {
  margin: 6px 0 10px;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 2.08rem;
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.hero-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.48;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.hero-badge {
  padding: 8px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.82rem;
}

.hero-cta {
  display: inline-block;
  margin-top: 16px;
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}

.hero-cta:hover {
  background: rgba(255, 255, 255, 0.2);
}

.dashboard-grid {
  display: grid;
  gap: 16px;
}

.dashboard-card {
  padding: 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.22), transparent 28%),
    linear-gradient(180deg, rgba(255, 252, 247, 0.98), rgba(250, 243, 233, 0.98));
}

.restaurant-picker-card {
  display: grid;
  gap: 14px;
}

.login-card {
  display: grid;
  gap: 14px;
}

.login-nav {
  margin-top: 4px;
}

.login-error-card {
  background: linear-gradient(180deg, rgba(255, 245, 244, 0.98), rgba(251, 235, 232, 0.98));
}

.voice-feedback-card {
  display: grid;
  gap: 14px;
}

.voice-feedback-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.voice-status {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: var(--radius-pill);
  background: rgba(29, 25, 22, 0.06);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.voice-status.recording {
  background: rgba(141, 67, 62, 0.12);
  color: var(--warn);
}

.voice-status.complete {
  background: var(--success-soft);
  color: var(--success);
}

.voice-feedback-btn {
  width: 100%;
}

.voice-feedback-btn.recording {
  background: linear-gradient(90deg, #8d433e, #bb6a34 58%, #d59859 100%);
}

.voice-transcript {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
}

.voice-feedback-input {
  width: 100%;
  min-height: 132px;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(29, 25, 22, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  resize: vertical;
  outline: none;
}

.voice-feedback-input:focus {
  border-color: rgba(196, 104, 47, 0.38);
  box-shadow: 0 0 0 3px rgba(196, 104, 47, 0.12);
}

.voice-feedback-input[readonly] {
  background: rgba(249, 245, 238, 0.94);
  color: var(--muted);
}

.voice-feedback-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.voice-transcript p,
.voice-error {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.voice-error {
  color: var(--warn);
  font-weight: 700;
}

.restaurant-search-shell {
  position: relative;
}

.restaurant-search-input {
  width: 100%;
  padding: 0 16px;
}

.restaurant-results-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.restaurant-results-grid {
  display: grid;
  gap: 10px;
}

.restaurant-result-card {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card-strong);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.restaurant-result-card:hover,
.restaurant-result-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(196, 104, 47, 0.34);
  box-shadow: var(--shadow-card);
}

.restaurant-result-card.selected {
  border-color: rgba(47, 125, 90, 0.34);
  background: linear-gradient(180deg, #fbfff9, rgba(233, 245, 233, 0.98));
}

.restaurant-result-thumb {
  position: relative;
  display: grid;
  place-items: center;
}

.restaurant-result-icon {
  flex-shrink: 0;
  width: 58px;
  height: 58px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.9), transparent 42%),
    linear-gradient(180deg, rgba(252, 238, 220, 0.98), rgba(241, 214, 184, 0.92));
  color: var(--accent-strong);
  box-shadow: 0 14px 22px rgba(112, 66, 31, 0.12);
}

.restaurant-branch-pill {
  position: absolute;
  bottom: -7px;
  padding: 4px 8px;
  border: 1px solid rgba(29, 25, 22, 0.08);
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.96);
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.restaurant-result-icon .card-icon-svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.restaurant-result-info {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.restaurant-result-kicker {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.restaurant-result-price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--gold-strong);
  background: rgba(187, 106, 52, 0.1);
  font-size: 0.88rem;
  font-weight: 800;
}

.restaurant-result-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.restaurant-result-cuisine {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
}

.restaurant-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.restaurant-result-meta span {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(29, 25, 22, 0.05);
}

.restaurant-result-badge {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(47, 125, 90, 0.12);
  color: var(--success);
  font-size: 0.78rem;
  font-weight: 800;
}

.restaurant-result-side {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.restaurant-result-arrow {
  color: rgba(29, 25, 22, 0.34);
  font-size: 1rem;
  font-weight: 800;
}

.restaurant-selected-banner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(247, 252, 247, 0.98), rgba(239, 247, 240, 0.98));
  border: 1px solid rgba(95, 133, 103, 0.22);
}

.restaurant-selected-kicker {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.restaurant-selected-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

.restaurant-clear-btn {
  min-width: 86px;
  padding: 10px 14px;
  border: 1px solid rgba(29, 25, 22, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.restaurant-empty-state {
  display: grid;
  gap: 4px;
  padding: 18px 16px;
  border: 1px dashed var(--line);
  border-radius: 20px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
}

@media (max-width: 640px) {
  .restaurant-result-card {
    grid-template-columns: auto 1fr;
  }

  .restaurant-result-side {
    grid-column: 2;
    justify-items: start;
    grid-auto-flow: column;
    align-items: center;
  }
}

.api-status-banner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(29, 25, 22, 0.08);
  background: rgba(255, 251, 246, 0.92);
}

.api-status-banner h3 {
  margin: 0 0 4px;
  font-size: 0.94rem;
}

.api-status-banner p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.api-status-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: #d28a22;
  box-shadow: 0 0 0 4px rgba(210, 138, 34, 0.12);
}

.api-status-banner.online {
  border-color: rgba(47, 125, 90, 0.18);
  background: linear-gradient(180deg, rgba(246, 252, 248, 0.96), rgba(239, 247, 241, 0.96));
}

.api-status-banner.online .api-status-dot {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(47, 125, 90, 0.14);
}

.api-status-banner.offline {
  border-color: rgba(210, 138, 34, 0.22);
  background: linear-gradient(180deg, rgba(255, 248, 236, 0.96), rgba(255, 243, 225, 0.96));
}

.mini-list,
.safe-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-pill {
  padding: 9px 11px;
  border-radius: var(--radius-pill);
  background: rgba(29, 25, 22, 0.05);
  font-size: 0.83rem;
}

.recommendation-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.22), transparent 28%),
    linear-gradient(180deg, rgba(255, 251, 245, 0.98), rgba(248, 241, 231, 0.98));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.recommendation-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(187, 106, 52, 0.9), rgba(88, 119, 92, 0.9));
}

.recommendation-card + .recommendation-card {
  margin-top: 12px;
}

.avoid-card {
  background: linear-gradient(180deg, rgba(255, 249, 248, 0.98), rgba(250, 240, 238, 0.98));
}

.avoid-card::before {
  background: linear-gradient(180deg, rgba(141, 67, 62, 0.9), rgba(196, 104, 47, 0.7));
}

.recommendation-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.reco-kicker {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.reco-title {
  margin: 6px 0;
  font-size: 1.08rem;
  font-weight: 800;
}

.reco-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.56;
}

.score-badge {
  min-width: 90px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(47, 125, 90, 0.1);
  color: var(--success);
  font-weight: 900;
  text-align: center;
}

.score-badge.warn {
  background: rgba(139, 58, 56, 0.1);
  color: var(--warn);
}

.score-badge.tier {
  padding: 10px 12px;
  font-size: 0.76rem;
  line-height: 1.1;
}

.safe-pill {
  padding: 9px 11px;
  border-radius: var(--radius-pill);
  background: var(--success-soft);
  color: var(--success);
  font-size: 0.84rem;
}

.hidden {
  display: none;
}

@media (min-width: 720px) {
  .app-shell {
    width: min(100%, 1180px);
  }

  .progress-steps {
    display: flex;
  }

  .phone-frame {
    padding: 18px;
  }

  #app {
    padding: 28px 24px 26px;
  }

  .toggle-grid,
  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .flavor-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .brand-lockup {
    margin-bottom: 12px;
  }

  .phone-frame {
    padding: 14px;
  }

  #app {
    padding: 22px 22px 20px;
  }

  .step-head {
    margin-bottom: 12px;
  }

  .swipe-stage {
    grid-template-columns: minmax(0, 1.08fr) minmax(400px, 460px);
    align-items: start;
    gap: 20px;
  }

  .swipe-stage-deck {
    position: sticky;
    top: 24px;
  }

  .swipe-stage-info .editorial-panel {
    padding: 16px 18px;
  }

  .swipe-stage-info .editorial-title {
    font-size: 1.38rem;
  }

  .swipe-stage-info .editorial-copy {
    font-size: 0.94rem;
  }

  .swipe-status {
    justify-content: flex-start;
    margin-bottom: 0;
  }

  .swipe-stack {
    width: min(100%, 460px);
    min-height: 600px;
    max-height: 68vh;
  }

  .swipe-actions {
    width: min(100%, 460px);
  }
}

@media (max-width: 400px) {
  .toggle-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .swipe-stack {
    width: 100%;
    min-height: 560px;
  }

  .swipe-title {
    font-size: 1.62rem;
  }

  .swipe-actions {
    grid-template-columns: 1fr;
  }

  .stack-count {
    order: -1;
  }
}
