:root {
  --ink: #1d2523;
  --muted: #66706c;
  --paper: #f1fff8;
  --white: #ffffff;
  --line: rgba(45, 212, 191, .42);
  --mint: #ccfbf1;
  --mint-deep: #2DD4BF;
  --mint-dark: #0F766E;
  --berry: #FF6B6B;
  --berry-dark: #E85050;
  --citrus: #efb45b;
  --lavender: #d8d3ee;
  --sky: #d8e9f5;
  --charcoal: #24302d;
  --soft: #e6f8ef;
  --danger-soft: #f7e4e4;
  --shadow: 0 16px 36px rgba(29, 37, 35, .1);
}

* {
  box-sizing: border-box;
}

html {
  background: #e9fff5;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, #e7fff5 0%, #f5fff9 54%, #ffffff 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

input:disabled {
  color: #9aa39f;
  background: #eef2ef;
  cursor: not-allowed;
}

.app-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 0 0 1px rgba(45, 212, 191, .22);
}

.app {
  min-height: 100vh;
  position: relative;
  padding: 18px 16px 96px;
}

.plan-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
}

.plan-switch button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 860;
}

.plan-switch button.active {
  color: var(--white);
  background: var(--mint-dark);
  box-shadow: 0 8px 18px rgba(15, 118, 110, .16);
}

.icon-button {
  min-width: 42px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  font-size: 12px;
  font-weight: 800;
}

.page-back-button {
  position: fixed;
  z-index: 80;
  top: calc(env(safe-area-inset-top) + 14px);
  left: calc(env(safe-area-inset-left) + 16px);
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--mint-deep);
  border-radius: 999px;
  color: var(--mint-dark);
  background: rgba(241, 255, 248, .92);
  box-shadow: 0 10px 22px rgba(15, 118, 110, .14);
  backdrop-filter: blur(12px);
}

.page-back-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.screen {
  display: grid;
  gap: 14px;
}

.hero-panel {
  min-height: 232px;
  display: grid;
  align-content: end;
  gap: 14px;
  padding: 22px;
  border-radius: 8px;
  color: var(--white);
  background:
    linear-gradient(145deg, rgba(36, 48, 45, .96), rgba(15, 118, 110, .82) 58%, rgba(255, 107, 107, .78)),
    linear-gradient(45deg, #2DD4BF, #FF6B6B);
  box-shadow: var(--shadow);
}

.home-hero-panel {
  background:
    linear-gradient(90deg, rgba(49, 72, 63, .9) 0%, rgba(95, 127, 104, .7) 44%, rgba(255, 138, 122, .34) 78%, rgba(255, 255, 255, .06) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, .08), rgba(0, 0, 0, .22)),
    url("assets/home-hero-lifestyle.jpg");
  background-position: center;
  background-size: cover;
}

.hero-panel h1,
.hero-panel p {
  margin: 0;
}

.hero-panel h1 {
  font-size: 32px;
  line-height: 1.12;
  max-width: 12.8ch;
}

.hero-panel p {
  max-width: 33ch;
  color: rgba(255, 255, 255, .78);
  line-height: 1.45;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  font-weight: 820;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--citrus);
}

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

h2 {
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.14;
}

h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

.muted {
  color: var(--muted);
  line-height: 1.48;
}

.card,
.recipe-card,
.history-item,
.metric-tile,
.body-part {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 26px rgba(29, 37, 35, .045);
}

.card {
  padding: 18px;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.section-title h2,
.section-title h3,
.section-title p {
  margin-bottom: 0;
}

.button {
  width: 100%;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--white);
  background: var(--mint-dark);
  font-weight: 800;
}

.button:hover {
  background: #0b5f58;
}

.button.secondary {
  color: var(--ink);
  background: var(--white);
  border-color: var(--line);
}

.button.secondary:hover {
  background: var(--soft);
}

.button.compact {
  width: auto;
  min-height: 38px;
  padding: 0 13px;
  font-size: 13px;
}

.hero-action {
  min-height: 56px;
  font-size: 16px;
}

.task-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(45, 212, 191, .42);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #eafff6);
  box-shadow: 0 14px 30px rgba(15, 118, 110, .1);
}

.task-card h2,
.task-card p {
  margin-bottom: 0;
}

.task-card p {
  color: var(--muted);
  line-height: 1.45;
}

.task-kicker {
  color: var(--mint-dark);
  font-size: 12px;
  font-weight: 860;
  text-transform: uppercase;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
}

.textarea {
  min-height: 92px;
  padding-top: 12px;
  resize: vertical;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid.two {
  grid-template-columns: 1fr 1fr;
}

.plan-editor {
  display: grid;
  gap: 12px;
}

.plan-day {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
}

.plan-rows,
.plan-row-wrap {
  display: grid;
  gap: 8px;
}

.plan-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.plan-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.activity-input {
  font-weight: 760;
}

.add-row-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--mint-deep);
  border-radius: 999px;
  color: var(--mint-dark);
  background: var(--mint);
  font-size: 22px;
  font-weight: 760;
  line-height: 1;
}

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

.details-summary {
  cursor: pointer;
  font-size: 17px;
  font-weight: 820;
}

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

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.activity-stat-grid {
  grid-template-columns: repeat(2, 1fr);
}

.stat,
.metric-tile {
  min-height: 82px;
  padding: 12px 10px;
}

.stat strong,
.metric-tile strong {
  display: block;
  color: var(--mint-deep);
  font-size: 22px;
  line-height: 1.1;
}

.stat span,
.metric-tile span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: #0f5f56;
  background: var(--mint);
  font-size: 12px;
  font-weight: 820;
  white-space: nowrap;
}

.pill.berry {
  color: var(--berry-dark);
  background: #f4dce3;
}

.pill.coral {
  color: #9f2e2e;
  background: #ffe0e0;
}

.pill.sky {
  color: #2d5d78;
  background: var(--sky);
}

.calendar-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 26px rgba(29, 37, 35, .045);
}

.week-plan-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 26px rgba(29, 37, 35, .045);
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.calendar-toolbar strong {
  font-size: 18px;
}

.calendar-nav {
  min-width: 38px;
  padding: 0;
}

.calendar-nav svg {
  width: 20px;
  height: 20px;
}

.calendar-nav.next svg {
  transform: rotate(180deg);
}

.calendar-weekdays,
.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.calendar-month-grid {
  grid-auto-rows: 74px;
}

.calendar-strip {
  display: grid;
  grid-auto-columns: minmax(132px, 42%);
  grid-auto-flow: column;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scroll-snap-type: x proximity;
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day,
.week-plan-day {
  position: relative;
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fafffc;
  text-align: left;
  overflow: hidden;
}

.calendar-day {
  height: 74px;
}

.week-plan-day {
  min-height: 112px;
  scroll-snap-align: start;
}

.calendar-day.today {
  border-color: rgba(45, 212, 191, .55);
  background: rgba(204, 251, 241, .38);
}

.calendar-day.selected,
.week-plan-day.selected {
  border-color: var(--mint-dark);
  box-shadow: 0 0 0 2px rgba(45, 212, 191, .22);
}

.calendar-day.empty-day {
  border-color: transparent;
  background: transparent;
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.calendar-head span,
.calendar-day p,
.week-plan-day p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.18;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-head strong {
  font-size: 12px;
  line-height: 1;
}

.week-plan-day .calendar-head {
  justify-content: space-between;
}

.week-plan-day .calendar-head span,
.week-plan-day p {
  font-size: 13px;
}

.calendar-note {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 14px;
  height: 14px;
  color: var(--mint-dark);
}

.calendar-note svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.memo-chip {
  padding: 9px 10px;
  border-radius: 8px;
  color: #5f3e20;
  background: #f8e8cc;
  font-size: 13px;
  line-height: 1.35;
}

.selected-day-card h2,
.selected-day-card p {
  margin-bottom: 0;
}

.schedule-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.schedule-item strong,
.schedule-item span {
  display: block;
}

.schedule-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.schedule-item em {
  display: block;
  margin-top: 7px;
  padding: 8px 9px;
  border-radius: 8px;
  color: #5f3e20;
  background: #f8e8cc;
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.body-part-list {
  display: grid;
  gap: 9px;
}

.body-part {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 10px;
  align-items: center;
  padding: 11px;
}

.body-part span {
  color: var(--muted);
  font-size: 12px;
}

.bar-list {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  gap: 6px;
}

.clickable-bar {
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.clickable-bar:hover .bar-label span {
  color: var(--mint-dark);
}

.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--soft);
}

.bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint-deep), var(--berry));
}

.analysis-screen {
  padding-top: 42px;
}

.analysis-heading {
  display: grid;
  gap: 5px;
  padding: 4px 2px 2px;
}

.analysis-heading h1 {
  margin: 0;
  font-size: 29px;
  line-height: 1.08;
}

.analysis-heading p,
.analysis-heading .membership-kicker {
  margin: 0;
}

.analysis-periods {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
}

.analysis-periods button {
  min-width: 0;
  min-height: 48px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  padding: 5px 3px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 840;
}

.analysis-periods button small {
  color: var(--berry-dark);
  font-size: 9px;
}

.analysis-periods button.active {
  color: var(--white);
  background: var(--mint-dark);
}

.analysis-periods button.active small {
  color: #ffd2cf;
}

.analysis-summary-card {
  border-color: rgba(255, 107, 107, .34);
  background: #fffaf2;
}

.analysis-range {
  display: block;
  margin-bottom: 4px;
  color: var(--mint-dark);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.analysis-sentence {
  margin: 0;
  color: #34413d;
  font-size: 15px;
  font-weight: 680;
  line-height: 1.5;
}

.analysis-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.analysis-stat {
  min-height: 94px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 12px;
  border: 1px solid rgba(45, 212, 191, .24);
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
}

.analysis-stat strong {
  font-size: 24px;
  line-height: 1;
}

.analysis-stat span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
}

.analysis-stat small {
  color: var(--mint-dark);
  font-size: 10px;
  font-weight: 760;
}

.analysis-chart {
  min-height: 184px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(30px, 1fr);
  align-items: end;
  gap: 6px;
  overflow-x: auto;
  padding: 14px 2px 3px;
  border-bottom: 1px solid var(--line);
}

.analysis-column {
  height: 162px;
  min-width: 30px;
  display: grid;
  grid-template-rows: 24px 112px 20px;
  justify-items: center;
  align-items: end;
  gap: 3px;
}

.analysis-column strong {
  color: var(--muted);
  font-size: 9px;
}

.analysis-column span {
  width: min(24px, 74%);
  min-height: 3px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--berry), var(--mint-dark));
}

.analysis-column small {
  min-height: 16px;
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

.consistency-grid,
.shape-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.consistency-grid div,
.shape-summary div {
  display: grid;
  gap: 3px;
  padding: 11px;
  border-left: 3px solid var(--mint-deep);
  background: var(--soft);
}

.consistency-grid strong,
.shape-summary strong {
  font-size: 18px;
}

.consistency-grid span,
.shape-summary span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
}

.plus-boundary {
  overflow: hidden;
  border-color: rgba(255, 107, 107, .36);
  background: linear-gradient(135deg, #f4fff7 0%, #fff7e7 62%, #ffe6e3 100%);
}

.plus-boundary h2,
.plus-boundary p {
  margin: 0;
}

.plus-label {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  color: #8f2f2f;
  background: #ffd8d5;
  font-size: 10px;
  font-weight: 880;
  text-transform: uppercase;
}

.plus-feature-list {
  display: grid;
  gap: 7px;
}

.plus-feature-list span {
  padding: 9px 10px;
  border-left: 3px solid var(--citrus);
  color: #43504c;
  background: rgba(255, 255, 255, .64);
  font-size: 12px;
  font-weight: 760;
}

.shape-metric-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.shape-metric-tabs button {
  min-height: 34px;
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--white);
  font-size: 10px;
  font-weight: 820;
}

.shape-metric-tabs button.active {
  border-color: var(--mint-dark);
  color: var(--white);
  background: var(--mint-dark);
}

.shape-trend {
  height: 190px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(46px, 1fr);
  gap: 8px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.shape-point {
  position: relative;
  min-width: 46px;
}

.shape-point::after {
  content: "";
  position: absolute;
  top: 18%;
  bottom: 19%;
  left: 50%;
  width: 1px;
  background: rgba(45, 212, 191, .2);
}

.shape-point > span {
  position: absolute;
  z-index: 2;
  left: 50%;
  width: 11px;
  height: 11px;
  border: 3px solid var(--white);
  border-radius: 50%;
  background: var(--berry);
  box-shadow: 0 0 0 1px var(--berry);
  transform: translate(-50%, 50%);
}

.shape-point strong,
.shape-point small {
  position: absolute;
  right: 0;
  left: 0;
  text-align: center;
}

.shape-point strong {
  top: 5px;
  font-size: 10px;
}

.shape-point small {
  bottom: 5px;
  color: var(--muted);
  font-size: 8px;
}

.completion-card {
  display: grid;
  grid-template-columns: 98px 1fr;
  gap: 14px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.completion-ring {
  --progress: 0;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--white) 0 56%, transparent 57%),
    conic-gradient(var(--berry) calc(var(--progress) * 1%), var(--soft) 0);
  box-shadow: inset 0 0 0 1px rgba(29, 37, 35, .06);
  transition: background .22s ease, transform .22s ease;
}

.completion-ring span {
  color: var(--ink);
  font-size: 18px;
  font-weight: 860;
}

.completion-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.completion-body strong,
.completion-body span {
  display: block;
}

.completion-body span {
  color: var(--muted);
  font-size: 13px;
}

.range {
  width: 100%;
  accent-color: var(--berry);
}

.mini-note-input {
  min-height: 36px;
  padding: 0 10px;
  font-size: 12px;
}

.glow-save {
  background: var(--berry);
}

.glow-save:hover {
  background: var(--berry-dark);
}

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

.quick-chip {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--white);
  font-size: 12px;
  font-weight: 820;
}

.quick-chip.active,
.quick-chip:hover {
  border-color: rgba(45, 212, 191, .55);
  background: var(--mint);
}

.history-list,
.recipe-list {
  display: grid;
  gap: 10px;
}

.history-item {
  padding: 13px;
}

.history-item strong,
.history-item span {
  display: block;
}

.history-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
}

.recipe-card {
  overflow: hidden;
}

.recipe-card.is-locked {
  border-color: rgba(255, 107, 107, .34);
  background: #fffdfd;
}

.recipe-card.is-locked .recipe-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 51, 43, .08), rgba(18, 51, 43, .28));
  pointer-events: none;
}

.home-recipe-card {
  background: linear-gradient(180deg, #ffffff, #effff8);
}

.mini-recipe-card {
  width: 100%;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: stretch;
  padding: 8px;
  border: 1px solid rgba(45, 212, 191, .42);
  border-radius: 8px;
  background: var(--white);
  text-align: left;
}

.mini-recipe-photo {
  min-height: 92px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .16) 100%),
    var(--dish-image, var(--dish-bg, linear-gradient(135deg, #2f7f6f, #efb45b)));
  background-position: center;
  background-size: cover;
}

.mini-recipe-body {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 7px;
}

.mini-recipe-body strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.15;
}

.mini-recipe-body span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.mini-pill-row {
  gap: 6px;
}

.recipe-photo {
  position: relative;
  min-height: 132px;
  display: grid;
  align-content: end;
  padding: 14px;
  color: var(--white);
  background:
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .52) 100%),
    var(--dish-image, var(--dish-bg, linear-gradient(135deg, #2f7f6f, #efb45b)));
  background-position: center;
  background-size: cover;
}

.recipe-photo strong {
  position: relative;
  z-index: 2;
  font-size: 18px;
  line-height: 1.1;
}

.recipe-plus-badge {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, .58);
  border-radius: 999px;
  color: #7d2828;
  background: rgba(255, 225, 223, .94);
  font-size: 10px;
  font-weight: 880;
  text-transform: uppercase;
}

.recipe-locked-button {
  border-color: rgba(255, 107, 107, .38);
  color: #963838;
  background: #fff2f1;
}

.recipe-access-message {
  padding: 11px 12px;
  border: 1px solid rgba(255, 107, 107, .32);
  border-left: 4px solid var(--berry);
  border-radius: 8px;
  color: #683b38;
  background: #fff4f2;
  font-size: 12px;
  font-weight: 720;
  line-height: 1.45;
}

.recipe-plus-panel {
  margin-top: 4px;
}

.recipe-plus-panel h3,
.recipe-plus-panel p {
  margin: 0;
}

.compact-boundary {
  gap: 9px;
  padding: 15px;
}

.subtle-note {
  color: var(--muted);
  font-size: 11px;
}

.recipe-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.detail-photo {
  min-height: 176px;
}

.ai-recipe {
  box-shadow: none;
}

.macro-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.macro {
  padding: 9px 6px;
  border-radius: 8px;
  background: var(--soft);
  text-align: center;
}

.macro strong {
  display: block;
  font-size: 14px;
}

.macro span {
  color: var(--muted);
  font-size: 11px;
}

.ingredients {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ingredients li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.ingredients li.seasoning-row {
  display: grid;
  align-items: flex-start;
  justify-content: stretch;
  gap: 4px;
  padding: 9px 10px;
  border-bottom: 0;
  border-radius: 8px;
  background: var(--soft);
}

.ingredients li.seasoning-row strong {
  max-width: none;
  color: var(--ink);
  font-weight: 760;
  text-align: left;
  line-height: 1.35;
}

.steps {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.48;
}

.ai-panel {
  padding: 16px;
  border: 1px solid rgba(45, 212, 191, .36);
  border-radius: 8px;
  background: linear-gradient(180deg, #effff8, #ffffff);
}

.ai-panel h3 {
  margin-bottom: 6px;
}

.recipe-category-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 0 4px;
  scrollbar-width: none;
}

.recipe-category-tabs::-webkit-scrollbar {
  display: none;
}

.recipe-category-tabs button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 860;
}

.recipe-category-tabs button.active {
  color: var(--white);
  background: var(--charcoal);
  box-shadow: 0 10px 22px rgba(36, 48, 45, .16);
}

.filter-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(45, 212, 191, .36);
  border-radius: 8px;
  background: rgba(255, 255, 255, .74);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.ingredient-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 2px;
}

.ingredient-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 2px;
}

.ingredient-more {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}

.ingredient-more .details-summary {
  order: 2;
  min-height: 42px;
  display: flex;
  align-items: center;
  color: var(--mint-dark);
  font-size: 13px;
}

.ingredient-more .ingredient-grid {
  order: 1;
}

.ingredient-more[open] .details-summary {
  display: none;
}

.recipe-filter-card > .field > label,
.recipe-filter-card .form-grid .field > label {
  color: #4f5d58;
  font-size: 15px;
  font-weight: 860;
}

.ingredient-action-row {
  position: sticky;
  z-index: 12;
  bottom: calc(82px + env(safe-area-inset-bottom));
  order: 3;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
}

.ingredient-action-button,
.filter-submit-button {
  width: auto;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--mint-deep);
  border-radius: 8px;
  color: var(--mint-dark);
  background: rgba(241, 255, 248, .94);
  font-size: 13px;
  font-weight: 820;
  box-shadow: 0 10px 20px rgba(15, 118, 110, .15);
  backdrop-filter: blur(12px);
}

.filter-submit-button {
  justify-self: start;
  box-shadow: none;
}

.ingredient-more:not([open]) .ingredient-action-row {
  display: none;
}

.check-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.check-pill input {
  width: 16px;
  height: 16px;
  accent-color: var(--mint-deep);
  flex: 0 0 auto;
}

.inline-extra {
  padding-top: 3px;
}

.extra-summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(45, 212, 191, .38);
  border-radius: 8px;
  color: var(--mint-dark);
  background: rgba(204, 251, 241, .38);
}

.extra-panel {
  padding-top: 12px;
}

.recipe-search-launch {
  position: sticky;
  z-index: 9;
  top: max(10px, env(safe-area-inset-top));
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  border: 1px solid rgba(45, 212, 191, .44);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, .96);
  text-align: left;
  font-size: 14px;
  font-weight: 760;
  box-shadow: 0 12px 24px rgba(15, 118, 110, .1);
  backdrop-filter: blur(14px);
}

.search-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.search-icon svg {
  width: 26px;
  height: 26px;
}

.recipe-search-screen {
  min-height: calc(100vh - 118px);
  align-content: start;
}

.recipe-search-panel {
  padding: 12px;
  border: 1px solid rgba(45, 212, 191, .42);
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 12px 26px rgba(15, 118, 110, .08);
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 8px;
}

.search-row .input {
  background: var(--white);
}

.search-button {
  min-height: 48px;
}

.recipe-search-panel .recipe-filter-card {
  padding: 0;
  background: transparent;
}

.shape-diary {
  display: grid;
  gap: 10px;
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(100%, 430px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  padding: 10px 10px max(10px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--mint-deep);
  background: rgba(232, 255, 244, .96);
  backdrop-filter: blur(18px);
}

.tab {
  min-height: 50px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 820;
}

.tab span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  font-size: 11px;
}

.tab svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab.active {
  color: var(--ink);
  background: rgba(204, 251, 241, .8);
}

.primary-tab {
  min-height: 62px;
  margin-top: -18px;
  border: 1px solid rgba(255, 107, 107, .34);
  color: var(--white);
  background: var(--berry);
  box-shadow: 0 12px 24px rgba(255, 107, 107, .3);
}

.primary-tab span {
  width: 30px;
  height: 30px;
  color: var(--berry);
  background: var(--white);
  font-size: 20px;
  line-height: 1;
}

.primary-tab.active {
  color: var(--white);
  background: var(--berry-dark);
}

.expectation strong,
.expectation span {
  display: block;
}

.expectation span {
  margin-top: 5px;
}

.unlock-box {
  display: grid;
  gap: 8px;
}

.serving-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px;
  border-radius: 8px;
  background: var(--soft);
}

.serving-control span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 820;
}

.celebration-screen {
  min-height: calc(100vh - 120px);
  align-content: center;
}

.celebration-card {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 28px 20px;
  border-radius: 8px;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff, #fff3f3);
  box-shadow: 0 20px 44px rgba(255, 107, 107, .18);
  text-align: center;
}

.celebration-card h1,
.celebration-card p {
  margin-bottom: 0;
}

.celebration-card p {
  color: var(--muted);
  line-height: 1.45;
}

.celebration-ring {
  width: 136px;
  height: 136px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #ffffff 0 55%, transparent 56%),
    conic-gradient(var(--berry) 0 100%);
  animation: glow-pop .72s ease both;
  box-shadow: 0 0 0 12px rgba(255, 107, 107, .1), 0 18px 38px rgba(255, 107, 107, .25);
}

.celebration-ring span {
  color: var(--berry-dark);
  font-size: 25px;
  font-weight: 900;
}

.streak-pop {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 999px;
  color: #075e54;
  background: var(--mint);
  font-weight: 900;
  animation: streak-bounce .75s ease both .15s;
}

@keyframes glow-pop {
  0% {
    transform: scale(.72);
    opacity: .2;
  }
  70% {
    transform: scale(1.06);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

@keyframes streak-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  45% {
    transform: translateY(-8px);
  }
}

.empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, .72);
  line-height: 1.5;
}

.subtle-note {
  padding: 12px;
  border-radius: 8px;
  color: #4f5d58;
  background: var(--soft);
  font-size: 13px;
  line-height: 1.45;
}

.auth-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  border-radius: 10px;
  background: var(--soft);
}

.auth-mode-tab {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
}

.auth-mode-tab.active {
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(30, 58, 50, .08);
}

.auth-message {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  color: #9c3e3e;
  background: #fff0ee;
  font-size: 13px;
  line-height: 1.45;
}

.auth-message.is-hidden {
  display: none;
}

.text-button {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 10px;
  padding: 0;
  border: 0;
  color: var(--accent-dark);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.app-membership-card {
  border-color: rgba(255, 107, 107, 0.38);
  background: #fff8e9;
}

.app-membership-card .section-title,
.cloud-sync-card .section-title {
  align-items: flex-start;
}

.membership-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.membership-status {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--white);
  font-size: 11px;
  font-weight: 850;
}

.membership-status.is-plus {
  border-color: rgba(255, 107, 107, 0.28);
  color: #a73535;
  background: #ffe1df;
}

.membership-web-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 14px;
  padding: 0 16px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.status-pill {
  flex: 0 0 auto;
  max-width: 45%;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--accent-dark);
  background: var(--soft);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-align: right;
}

@media (max-width: 360px) {
  .app {
    padding-right: 12px;
    padding-left: 12px;
  }

  .hero-panel h1 {
    font-size: 31px;
  }

  .optional-grid,
  .form-grid.two,
  .metric-grid,
  .plan-row,
  .plan-metrics-row,
  .completion-card,
  .ingredient-grid {
    grid-template-columns: 1fr;
  }

  .completion-ring {
    margin: 0 auto;
  }
}
