:root {
  color-scheme: light;
  --bg: #f2fafa;
  --card: #ffffff;
  --ink: #143238;
  --muted: #5c7579;
  --line: #d3e6e8;
  --turquoise: #0c7f8a;
  --turquoise-2: #149aab;
  --soft: #dff4f6;
  --good: #1c7a52;
  --good-bg: #e5f6ee;
  --warn: #8a5a12;
  --warn-bg: #fff4e4;
  --shadow: 0 10px 30px rgba(18, 60, 66, 0.08);
  --radius: 18px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #071416;
  --card: #10262b;
  --ink: #e7f6f7;
  --muted: #93b0b3;
  --line: #1d3c42;
  --turquoise: #7eefe4;
  --turquoise-2: #7eefe4;
  --soft: #14383d;
  --good: #8ee0b8;
  --good-bg: #12362a;
  --warn: #f0c27a;
  --warn-bg: #3a2c14;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100dvh;
  font-family: Outfit, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 10% -10%, #c9eef1 0%, transparent 55%),
    radial-gradient(700px 420px at 110% 0%, #d7f3ef 0%, transparent 50%),
    #dfecee;
}
:root[data-theme="dark"] body { background: #050d0e; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--turquoise-2); outline-offset: 2px; }
.phone {
  width: min(440px, 100%);
  height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
}
.app { flex: 1; display: flex; flex-direction: column; min-height: 0; }
header.app-head {
  padding: 18px 18px 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  font-family: Fraunces, Georgia, serif;
  font-size: 28px;
  line-height: 1;
  font-weight: 650;
  letter-spacing: -0.03em;
}
.brand span { color: var(--turquoise-2); }
.sub { margin-top: 4px; color: var(--muted); font-size: 13px; }
.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.icon-btn svg { width: 20px; height: 20px; }
.screens { flex: 1; overflow: auto; padding: 4px 16px 18px; min-height: 0; }
h2 {
  font-family: Fraunces, Georgia, serif;
  font-size: 26px;
  font-weight: 560;
  margin: 6px 0 4px;
  letter-spacing: -0.03em;
}
.lede { color: var(--muted); margin: 0 0 12px; font-size: 14px; line-height: 1.4; }
.row-chips { display: flex; gap: 8px; overflow: auto; padding-bottom: 4px; }
.chip {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 11px;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 600;
}
button.chip { font-weight: 700; }
.chip.on { background: var(--soft); border-color: transparent; color: var(--turquoise); }
.chip.ghost { color: var(--muted); font-weight: 500; }
.meal {
  width: 100%;
  text-align: left;
  border: 0;
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px;
  margin-top: 10px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 10px;
  align-items: center;
}
.day {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 700;
  line-height: 1.05;
}
.day small { display: block; font-weight: 600; font-size: 11px; opacity: 0.9; }
.meal h3 { margin: 0; font-size: 15.5px; line-height: 1.25; font-weight: 650; }
.meta { margin-top: 3px; color: var(--muted); font-size: 12.5px; }
.price { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; }
.section-label {
  margin: 16px 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.search { display: flex; gap: 8px; margin: 8px 0 12px; }
.search input {
  flex: 1;
  min-width: 0;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 12px;
  outline: none;
}
.search input:focus, .search select:focus { border-color: var(--turquoise-2); }
.search select {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 12px 10px;
}
.week-generate { width: 100%; margin: 4px 0 12px; }
.week-actions { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 8px; }
.week-actions .week-generate { margin: 0; }
.week-block { margin: 6px 0 8px; }
.week-block > h3 {
  font-family: Fraunces, Georgia, serif;
  font-size: 20px;
  font-weight: 560;
  margin: 14px 0 4px;
  letter-spacing: -0.02em;
}
.week-block.on > h3 { color: var(--turquoise); }
.day-again { display: block; width: 100%; text-align: right; margin: 0 0 6px; padding: 0 2px 4px; }
.primary, .secondary, .text-btn {
  border-radius: 14px;
  border: 0;
  padding: 12px 14px;
  font-weight: 700;
}
.primary { background: var(--turquoise-2); color: white; }
:root[data-theme="dark"] .primary { color: #062126; }
.secondary { background: var(--soft); color: var(--turquoise); }
.text-btn { background: transparent; color: var(--turquoise); padding: 8px 0; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px;
  margin-top: 8px;
  box-shadow: var(--shadow);
}
.line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.line:first-child { border-top: 0; padding-top: 0; }
.line b { font-weight: 650; }
.hint, .fine { color: var(--muted); font-size: 12.5px; line-height: 1.35; margin-top: 2px; }
.warnbox {
  background: var(--warn-bg);
  color: var(--warn);
  border-radius: 12px;
  padding: 8px 10px;
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.35;
}
.pills { display: flex; gap: 8px; overflow: auto; padding-bottom: 8px; }
.pills button {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 8px 12px;
  font-weight: 650;
  font-size: 13px;
  white-space: nowrap;
}
.pills button.on { background: var(--turquoise-2); color: white; border-color: transparent; }
:root[data-theme="dark"] .pills button.on { color: #062126; }
.store {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px;
  margin-top: 8px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
}
.store.best { border-color: var(--turquoise-2); }
.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--good-bg);
  color: var(--good);
}
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.city { background: var(--soft); color: var(--turquoise); margin-right: 6px; }
.totalbar {
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: 10px 16px 8px;
}
.totalbar strong {
  font-family: Fraunces, Georgia, serif;
  font-size: 28px;
  font-weight: 560;
  letter-spacing: -0.03em;
}
.totalbar .split { display: flex; justify-content: space-between; align-items: end; gap: 10px; }
nav {
  margin: 0 10px 10px;
  height: 64px;
  background: var(--bg);
  border-radius: 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
}
nav button {
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
}
nav button.on { color: var(--turquoise); }
nav svg { width: 20px; height: 20px; }
.sheet-back {
  position: absolute;
  inset: 0;
  background: rgba(8, 24, 27, 0.46);
  display: grid;
  align-items: end;
  z-index: 2;
}
.sheet {
  background: var(--bg);
  border-radius: 24px 24px 0 0;
  padding: 12px 16px 24px;
  max-height: 82%;
  overflow: auto;
}
.grab { width: 42px; height: 4px; border-radius: 99px; background: var(--line); margin: 4px auto 10px; }
.hidden { display: none !important; }
.notice { margin-top: 8px; font-size: 13.5px; color: var(--turquoise); line-height: 1.4; }
@media (min-width: 760px) {
  body { display: grid; place-items: center; }
  .phone {
    height: min(920px, calc(100dvh - 32px));
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(16, 48, 52, 0.16);
  }
}
@media (max-width: 759px) {
  body { background: var(--bg); }
  .phone { width: 100%; }
}
