:root {
  /* Soft, warm, gender-neutral mother & baby palette — calm, trustworthy, premium. */
  --bg: #faf5ef;        /* warm cream */
  --panel: #ffffff;     /* clean white cards */
  --panel-2: #f3ece3;   /* soft sand */
  --ink: #43403a;       /* warm slate text */
  --muted: #938b7f;     /* warm gray */
  --line: #ece2d6;      /* soft border */
  --accent: #6fa287;    /* sage green (primary) */
  --accent-2: #e0a08b;  /* soft terracotta / blush (secondary) */
  --green: #6fa287;     /* success = sage */
  --warn: #cf8a5c;      /* warm amber */
  --radius: 18px;
  --shadow: 0 10px 34px rgba(123, 102, 80, 0.1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 520px at 82% -8%, #f7e7df 0%, transparent 60%),
    radial-gradient(950px 480px at 0% 0%, #eef3ee 0%, transparent 55%);
  background-color: var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Nunito, Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(255, 251, 246, 0.85); backdrop-filter: blur(10px); z-index: 5;
}
.brand { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.brand span { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.badges { display: flex; gap: 10px; align-items: center; }
.badge {
  font-size: 12px; padding: 6px 12px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
  text-decoration: none;
}
.badge.ghost:hover { color: var(--accent); border-color: var(--accent); }

main { max-width: 940px; margin: 0 auto; padding: 36px 20px 60px; }

.hero h1 { font-size: 42px; line-height: 1.08; letter-spacing: -0.03em; margin: 18px 0 14px; font-weight: 800; }
.hero .hl { color: var(--accent); }
.hero .sub { color: var(--muted); font-size: 18px; max-width: 700px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); margin-top: 26px;
}

.builder-row { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.grow { flex: 1; min-width: 240px; }
.field-label { font-size: 13px; color: var(--muted); }
.field select, .field input[type="number"] {
  background: var(--bg); color: var(--ink); border: 1px solid var(--line);
  border-radius: 11px; padding: 11px 13px; font-size: 15px;
}
.field.toggle { flex-direction: row; align-items: center; gap: 10px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.range-hints { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }

.cta {
  margin-top: 20px; width: 100%; padding: 15px; font-size: 16px; font-weight: 700;
  color: #fff; background: linear-gradient(90deg, var(--accent), #7fb098);
  border: none; border-radius: 13px; cursor: pointer; transition: transform 0.05s ease, filter 0.15s;
  box-shadow: 0 6px 18px rgba(111, 162, 135, 0.3);
}
.cta:hover { filter: brightness(1.04); }
.cta:active { transform: translateY(1px); }
.cta:disabled { opacity: 0.6; cursor: wait; }

.hidden { display: none; }
.result { margin-top: 26px; }

.result-head {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.result-head h2 { margin: 0; font-size: 21px; }
.stat { text-align: right; }
.stat .big { font-size: 27px; font-weight: 800; color: var(--accent); }
.stat .small { font-size: 12px; color: var(--muted); }
.pill { font-size: 12px; padding: 5px 11px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.pill.tier { color: var(--accent); border-color: var(--accent); background: #eef5f0; }

.kit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 680px) { .kit-grid { grid-template-columns: 1fr; } .hero h1 { font-size: 31px; } }
.item {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 4px; box-shadow: 0 3px 12px rgba(123,102,80,0.05);
}
.item.optional { border-style: dashed; }
.item-img { width: 100%; height: 130px; object-fit: contain; background: #fff; border-radius: 11px; border: 1px solid var(--line); margin-bottom: 4px; }
.item .role { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); font-weight: 700; }
.item .title { font-weight: 700; display: flex; justify-content: space-between; gap: 8px; }
.item .price { color: var(--accent-2); white-space: nowrap; }
.item .merchant { font-size: 12px; color: var(--muted); }
.item .why { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.section-title { margin: 24px 0 10px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }

.cart-merchant {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 16px; border: 1px solid var(--line); border-radius: 13px; margin-bottom: 8px; background: var(--panel);
}
.cart-merchant .lines { font-size: 12px; color: var(--muted); }
.cart-merchant .ship-hint { color: var(--accent); font-size: 12px; }
.cart-total {
  display: flex; justify-content: space-between; padding: 15px 16px; font-weight: 800; font-size: 18px;
  border-top: 1px dashed var(--line); margin-top: 6px;
}

.warn {
  background: #fbf0e6; border: 1px solid #eccaa9; color: #9c6234;
  padding: 11px 15px; border-radius: 12px; margin: 8px 0; font-size: 14px;
}
.over { color: var(--warn); }

.checkout-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.checkout-btn {
  flex: 1; min-width: 220px; text-align: center; padding: 13px; border-radius: 12px;
  background: #eef5f0; border: 1px solid var(--accent); color: #3f6b56;
  text-decoration: none; font-weight: 700;
}
.checkout-btn:hover { background: var(--accent); color: #fff; }

.share-row { margin-top: 10px; }
.share-btn {
  width: 100%; padding: 12px; border-radius: 12px; cursor: pointer; font-weight: 700;
  background: transparent; border: 1px dashed var(--line); color: var(--muted);
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }

.revbar {
  margin-top: 16px; padding: 15px 18px; border-radius: 13px;
  background: #eef5f0;
  border: 1px solid rgba(111,162,135,0.4); display: flex; justify-content: space-between; align-items: center;
}
.revbar .label { color: var(--muted); font-size: 13px; }
.revbar .amount { font-size: 22px; font-weight: 800; color: var(--green); }

.business { margin-top: 40px; }
.business h2 { margin: 0 0 6px; }
.muted { color: var(--muted); }
.econ-controls { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 16px 0; }
.econ-controls label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.econ-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 680px) { .econ-out { grid-template-columns: 1fr; } .econ-controls { grid-template-columns: 1fr; } }
.econ-card { background: var(--panel); border: 1px solid var(--line); border-radius: 13px; padding: 15px; }
.econ-card .k { font-size: 12px; color: var(--muted); }
.econ-card .v { font-size: 23px; font-weight: 800; color: var(--accent); }
.econ-card.total .v { color: var(--green); }

footer { text-align: center; padding: 30px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.5); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
