:root {
  color-scheme: light;
  --aubergine: #310a1e;
  --aubergine-soft: #4a1730;
  --muted: #7a2b4a;
  --light: #a0567a;
  --cream: #f5e7c6;
  --paper: #fbf7f0;
  --surface: #fffdf7;
  --surface-warm: #fff4d6;
  --border: #edd5e4;
  --border-strong: #e0c0d5;
  --magenta: #de55c1;
  --pink: #fe94e8;
  --amber: #fbb622;
  --success: #2e7d32;
  --danger: #c62828;
  --shadow: 0 18px 48px rgba(49, 10, 30, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--cream);
}

body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 10% 0%, rgba(254, 148, 232, 0.24), transparent 30%),
    radial-gradient(circle at 94% 4%, rgba(251, 182, 34, 0.22), transparent 32%),
    linear-gradient(180deg, var(--paper) 0%, var(--cream) 100%);
  color: var(--aubergine);
  font-family: "Season Sans TRIAL", "Season Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
textarea {
  font: inherit;
}

button {
  min-height: 42px;
  border: 1px solid var(--aubergine);
  border-radius: 999px;
  background: var(--aubergine);
  color: var(--surface);
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
  box-shadow: 0 8px 20px rgba(49, 10, 30, 0.12);
}

button:hover {
  background: var(--aubergine-soft);
  border-color: var(--aubergine-soft);
  box-shadow: 0 10px 24px rgba(49, 10, 30, 0.16);
}

button:active {
  transform: translateY(1px) scale(0.99);
}

button:focus-visible {
  outline: 3px solid rgba(222, 85, 193, 0.32);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

button.secondary {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--aubergine);
}

button.secondary:hover {
  background: #f2ad19;
  border-color: #f2ad19;
}

button.ghost {
  background: rgba(255, 253, 247, 0.62);
  color: var(--muted);
  border-color: var(--border-strong);
  box-shadow: none;
}

button.ghost:hover {
  background: var(--surface);
  color: var(--aubergine);
}

.shell {
  width: min(1260px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 34px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: start;
  margin-bottom: 20px;
}

.title-block {
  max-width: 760px;
}

.brand-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.brand-mark {
  font-family: "Erica One", "Cooper Black", Georgia, serif;
  font-size: 25px;
  line-height: 1;
  color: var(--aubergine);
}

.brand-pill,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.78);
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 720px;
  font-family: "Erica One", "Cooper Black", Georgia, serif;
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0;
  color: var(--aubergine);
}

h2 {
  font-size: 20px;
  line-height: 1.25;
}

h3 {
  font-size: 23px;
  line-height: 1.18;
  color: var(--aubergine);
}

.eyebrow {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  margin-bottom: 8px;
}

.intro {
  max-width: 670px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
  margin-top: 12px;
}

.actions,
.vote-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.segmented {
  display: inline-flex;
  min-height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 253, 247, 0.78);
}

.segment {
  min-width: 78px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.segment:hover,
.segment.active {
  background: var(--aubergine);
  color: var(--surface);
}

.eval-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.eval-tab {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  border-color: var(--border);
  border-radius: 20px;
  background: rgba(255, 253, 247, 0.74);
  color: var(--muted);
  box-shadow: 0 10px 24px rgba(49, 10, 30, 0.06);
}

.eval-tab:hover,
.eval-tab.active {
  background: var(--aubergine);
  border-color: var(--aubergine);
  color: var(--surface);
}

.eval-tab span,
.eval-tab strong {
  overflow-wrap: anywhere;
}

.session-panel {
  display: grid;
  grid-template-columns: minmax(190px, 280px) 1fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 253, 247, 0.72);
  box-shadow: 0 10px 24px rgba(49, 10, 30, 0.06);
}

.session-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 0 11px;
  font-size: 13px;
  font-weight: 850;
}

.stat-pill.active {
  background: var(--surface-warm);
  color: var(--aubergine);
  border-color: var(--amber);
}

.stat-pill strong {
  color: inherit;
}

.status-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 253, 247, 0.72);
  box-shadow: 0 10px 24px rgba(49, 10, 30, 0.06);
}

#progressText {
  display: block;
  color: var(--muted);
  font-weight: 850;
  font-size: 13px;
  margin-bottom: 7px;
}

.progress-track {
  height: 9px;
  background: #f1d7e8;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--magenta), var(--amber));
  transition: width 180ms ease;
}

.profile-panel {
  display: grid;
  grid-template-columns: minmax(190px, 280px) 1fr;
  gap: 18px;
  align-items: start;
  border: 1px solid var(--border);
  background: rgba(255, 253, 247, 0.8);
  border-radius: 24px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 10px 26px rgba(49, 10, 30, 0.06);
}

.profile-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-warm);
  color: var(--aubergine);
  font-weight: 800;
  font-size: 13px;
  line-height: 1.2;
  padding: 8px 11px;
}

.compare-surface {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.recipe-panel,
.empty-state {
  background: rgba(255, 253, 247, 0.92);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.recipe-panel {
  padding: 19px;
}

.empty-state {
  min-height: 260px;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 8px;
  color: var(--muted);
  padding: 28px;
}

.empty-state h2 {
  color: var(--aubergine);
}

.label-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.recipe-letter {
  min-width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--aubergine);
  color: var(--surface);
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(49, 10, 30, 0.16);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin: 16px 0;
}

.meta-item {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 244, 214, 0.58);
  padding: 10px;
  min-height: 66px;
}

.meta-label {
  display: block;
  color: var(--light);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.meta-value {
  display: block;
  color: var(--aubergine);
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.section {
  border-top: 1px solid var(--border);
  padding-top: 15px;
  margin-top: 15px;
}

.section h4 {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--light);
  font-weight: 900;
}

.artifact-summary {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.4;
  margin-top: 8px;
}

.artifact-brief {
  background: rgba(255, 244, 214, 0.46);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 15px;
}

.ingredient-list,
.step-list,
.note-list {
  margin: 0;
  padding-left: 19px;
}

.ingredient-list li,
.step-list li,
.note-list li {
  margin-bottom: 8px;
  line-height: 1.45;
}

.nutrition-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nutrition-chip {
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--surface);
  color: var(--aubergine);
  font-weight: 850;
  font-size: 13px;
  line-height: 1.2;
}

.flag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.flag {
  border-radius: 999px;
  background: rgba(254, 148, 232, 0.26);
  color: var(--muted);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.vote-controls {
  position: sticky;
  bottom: 0;
  padding: 16px 0 0;
  background: linear-gradient(to top, var(--cream) 76%, rgba(245, 231, 198, 0));
  margin-top: 16px;
}

.vote-controls button {
  min-width: 118px;
}

.swipe-panel {
  min-height: 420px;
  display: grid;
  align-content: center;
  gap: 12px;
}

.swipe-panel p {
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 940px) {
  .topbar,
  .status-row,
  .session-panel {
    grid-template-columns: 1fr;
  }

  .eval-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .actions,
  .vote-controls {
    justify-content: stretch;
  }

  .actions button,
  .vote-controls button,
  .segmented {
    flex: 1 1 140px;
  }

  .compare-surface {
    grid-template-columns: 1fr;
  }

  .profile-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 20px, 1260px);
    padding-top: 18px;
  }

  h1 {
    font-size: 38px;
  }

  .intro {
    font-size: 15px;
  }

  .actions button,
  .vote-controls button {
    flex-basis: 100%;
  }

  .segmented {
    width: 100%;
  }

  .segment {
    flex: 1;
  }

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

  .recipe-panel,
  .profile-panel,
  .status-row,
  .session-panel,
  .empty-state {
    border-radius: 20px;
  }

  .eval-nav {
    grid-template-columns: 1fr;
  }

  .eval-tab {
    min-height: 50px;
  }
}
