/* «Сытая неделя» — вид как у приложения из рилса: светлые полупрозрачные карточки, крупные заголовки,
   большая кнопка внизу. Акцент — фиолетовый, прогресс и галочки — зелёные. Сначала телефон. */
:root {
  --accent: #7c3aed;
  --accent-2: #a78bfa;
  --accent-soft: #f1eafe;
  --accent-grad: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
  --green: #2f9e66;
  --green-soft: #e3f4ea;
  --ink: #1d1a24;
  --muted: #7a7486;
  --line: rgba(29, 26, 36, .08);
  --card: rgba(255, 255, 255, .78);
  --card-solid: #fff;
  --bg: #f4f1f9;
  --warn: #c2410c;
  --warn-soft: #fff4e8;
  --r: 18px;
}
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  background-image: radial-gradient(900px 500px at 10% -10%, #ece4fb 0%, transparent 60%),
                    radial-gradient(800px 500px at 110% 10%, #f8ecf3 0%, transparent 55%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
}
a { color: var(--accent); }
.screen { max-width: 480px; margin: 0 auto; padding: 0 16px 120px; }
.screen.wide { max-width: 720px; }

/* верхняя полоса */
.bar { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 64px 1fr 64px; align-items: center;
       padding: 10px 0 8px; background: linear-gradient(var(--bg) 70%, transparent); }
.bar-title { text-align: center; font-weight: 800; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-back { color: var(--accent); text-decoration: none; font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 2px; }
.bar-back .chev { font-size: 22px; line-height: 1; }
.bar-round { width: 34px; height: 34px; border-radius: 50%; background: var(--card); border: 1px solid var(--line);
             display: inline-flex; align-items: center; justify-content: center; color: var(--ink); text-decoration: none; }
.bar-right { text-align: right; position: relative; }
.menu-pop { position: absolute; right: 0; top: 42px; min-width: 210px; background: var(--card-solid); border-radius: 14px;
            box-shadow: 0 12px 40px rgba(40, 20, 80, .18); padding: 6px; display: none; text-align: left; }
.menu-pop.show { display: block; }
.menu-pop a, .menu-pop button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px;
            color: var(--ink); text-decoration: none; background: none; border: 0; font-size: 15px; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--accent-soft); }
.menu-pop .sub { color: var(--muted); font-size: 12px; padding: 4px 12px 8px; }

/* карточки */
.card-g { background: var(--card); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
          border: 1px solid rgba(255, 255, 255, .9); border-radius: var(--r); box-shadow: 0 6px 24px rgba(60, 30, 120, .06); }
.pad { padding: 16px; }
.h-q { font-size: 26px; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; margin: 6px 0 8px; }
.sub-q { color: var(--muted); font-size: 15px; line-height: 1.4; margin-bottom: 16px; }
.label-up { text-transform: uppercase; letter-spacing: .06em; font-size: 12px; font-weight: 700; color: var(--muted); margin: 18px 4px 8px; }
.muted { color: var(--muted); }
.price { color: var(--accent); font-weight: 800; white-space: nowrap; }

/* прогресс мастера */
.progress7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 4px 0 8px; }
.progress7 i { height: 5px; border-radius: 3px; background: rgba(29, 26, 36, .1); }
.progress7 i.on { background: var(--green); }
.step-meta { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--muted); }

/* большая кнопка внизу */
.cta-wrap { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
            background: linear-gradient(transparent, var(--bg) 35%); }
.cta-wrap > * { max-width: 448px; margin: 0 auto; }
.btn-cta { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 0; border-radius: 30px;
           padding: 16px 20px; font-size: 17px; font-weight: 800; color: #fff; background: var(--accent-grad);
           box-shadow: 0 10px 24px rgba(124, 58, 237, .32); text-decoration: none; }
.btn-cta:hover { color: #fff; filter: brightness(1.05); }
.btn-cta:disabled { opacity: .5; }
.btn-soft { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line);
            background: var(--card); border-radius: 24px; padding: 10px 16px; font-weight: 700; color: var(--ink); text-decoration: none; }
.btn-soft:hover { border-color: var(--accent-2); color: var(--accent); }
.btn-accent { background: var(--accent-grad); color: #fff; border: 0; border-radius: 24px; font-weight: 700; padding: 10px 18px; }
.btn-accent:hover { color: #fff; filter: brightness(1.05); }

/* плитки выбора */
.tiles { display: grid; gap: 10px; }
.tiles.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tiles.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile { position: relative; background: var(--card); border: 1.5px solid rgba(255, 255, 255, .95); border-radius: 16px;
        padding: 14px 8px 12px; text-align: center; cursor: pointer; user-select: none; box-shadow: 0 3px 12px rgba(60, 30, 120, .05);
        transition: border-color .15s, background .15s; }
.tile.on { border-color: var(--accent); background: #faf7ff; }
.tile.on::after { content: "✓"; position: absolute; top: 7px; right: 8px; width: 20px; height: 20px; border-radius: 50%;
                  background: var(--accent); color: #fff; font-size: 12px; line-height: 20px; font-weight: 800; }
.tile .em { font-size: 28px; line-height: 1.1; margin-bottom: 6px; }
.tile .nm { font-weight: 700; font-size: 14px; line-height: 1.2; hyphens: auto; overflow-wrap: anywhere; }
.tile.on .nm { color: var(--accent); }
.tile .nt { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.25; }
.tile .live { font-size: 11px; font-weight: 700; color: var(--green); margin-top: 4px; }
.logo { width: 46px; height: 46px; border-radius: 50%; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center;
        color: #fff; font-weight: 900; font-size: 22px; }

/* поиск и поля */
.inp { width: 100%; border: 1px solid var(--line); background: var(--card-solid); border-radius: 14px; padding: 13px 14px; font-size: 16px; outline: none; }
.inp:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-soft); }

/* счётчик */
.counter { display: flex; align-items: center; justify-content: center; gap: 28px; margin: 10px 0; }
.cbtn { width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--accent-soft); color: var(--accent);
        font-size: 28px; font-weight: 700; line-height: 1; }
.cbtn.sm { width: 34px; height: 34px; font-size: 20px; background: transparent; border: 1.5px solid var(--line); color: var(--ink); }
.cval { font-size: 40px; font-weight: 800; color: var(--accent); min-width: 40px; text-align: center; }

/* переключатель */
.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: rgba(29, 26, 36, .14); border-radius: 30px; transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; background: #fff;
                       border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::before { transform: translateX(22px); }

/* строки с галочкой */
.rows > * + * { border-top: 1px solid var(--line); }
.row-ck { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; user-select: none; }
.row-ck .em { font-size: 20px; width: 28px; text-align: center; }
.row-ck .nm { flex: 1; font-weight: 700; }
.ck { width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid rgba(29, 26, 36, .2); display: flex; align-items: center;
      justify-content: center; color: #fff; font-size: 14px; font-weight: 900; flex: none; }
.on > .ck, .ck.on { background: var(--accent); border-color: var(--accent); }
.ck.round { border-radius: 50%; }
.ck.green.on, .on > .ck.green { background: var(--green); border-color: var(--green); }

/* бюджет */
.big-sum { text-align: center; font-size: 44px; font-weight: 900; color: var(--accent); letter-spacing: -.02em; margin-top: 4px; }
input[type=range].rng { width: 100%; accent-color: var(--accent); height: 28px; }
.warn { background: var(--warn-soft); border: 1px solid #fde0c2; border-radius: 14px; padding: 12px 14px; font-size: 14px; }
.warn b { color: var(--warn); }

/* метки */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--card-solid); border-radius: 20px; padding: 8px 13px; font-weight: 600; font-size: 14px; cursor: pointer; }
.chip::before { content: "+ "; color: var(--accent); font-weight: 800; }
.chip.on { background: var(--accent-soft); border-color: var(--accent-2); color: var(--accent); }
.chip.on::before { content: ""; }
.chip.on::after { content: " ×"; font-weight: 800; }

/* сборка */
.build-ico { width: 84px; height: 84px; border-radius: 24px; margin: 40px auto 20px; background: var(--accent-grad); display: flex;
             align-items: center; justify-content: center; font-size: 42px; box-shadow: 0 14px 30px rgba(124, 58, 237, .35);
             animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.06); } }
.bline { display: flex; gap: 12px; align-items: center; padding: 12px 4px; font-weight: 700; color: rgba(29, 26, 36, .3); transition: color .3s; }
.bline .ck { border-color: rgba(29, 26, 36, .15); }
.bline.now { color: var(--accent); }
.bline.now .ck { border-color: var(--accent); }
.bline.done { color: var(--ink); }
.bline.done .ck { background: var(--green); border-color: var(--green); }

/* блюда */
.dish { display: flex; gap: 12px; align-items: center; padding: 12px; text-decoration: none; color: var(--ink); }
.thumb { width: 64px; height: 64px; border-radius: 14px; flex: none; object-fit: cover; background: linear-gradient(135deg, #f3ecff, #ffeef5);
         display: flex; align-items: center; justify-content: center; font-size: 32px; }
.dish .nm { font-weight: 800; line-height: 1.2; }
.dish .meta { font-size: 12px; color: var(--muted); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 2px 10px; }
.dish .meta span { white-space: nowrap; }
.dish .pr { margin-left: auto; text-align: right; }
.dish .pr small { display: block; color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.sec-h { display: flex; align-items: center; gap: 8px; font-weight: 800; margin: 18px 4px 8px; }

/* карточка блюда */
.hero { position: relative; margin: 0 -16px; height: 270px; background: linear-gradient(135deg, #efe6ff, #ffe9f1); overflow: hidden;
        display: flex; align-items: center; justify-content: center; font-size: 120px; }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero .x { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .85);
           display: flex; align-items: center; justify-content: center; text-decoration: none; color: var(--ink); font-size: 18px; }
.hero .bk { position: absolute; top: 12px; left: 12px; padding: 6px 12px; border-radius: 18px; background: rgba(255, 255, 255, .85);
            text-decoration: none; color: var(--accent); font-weight: 700; font-size: 14px; }
.kicker { text-transform: uppercase; letter-spacing: .06em; font-weight: 800; font-size: 12px; color: var(--accent); margin-top: 16px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.pill { background: var(--card-solid); border: 1px solid var(--line); border-radius: 18px; padding: 6px 12px; font-size: 13px; font-weight: 700; }
.kbju { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0 4px; }
.kbju div { border-radius: 14px; padding: 10px 4px; text-align: center; }
.kbju b { display: block; font-size: 17px; }
.kbju small { font-size: 11px; color: var(--muted); }
.k1 { background: #fde8ec; } .k1 b { color: #d6455d; }
.k2 { background: #e5efff; } .k2 b { color: #3a6fd8; }
.k3 { background: #fff1dc; } .k3 b { color: #d4861b; }
.k4 { background: #e3f4ea; } .k4 b { color: #2f9e66; }
.ing { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.ing .em { font-size: 20px; width: 26px; text-align: center; }
.ing .nm { flex: 1; }
.ing .q { color: var(--muted); font-size: 14px; white-space: nowrap; }
.stepn { display: flex; gap: 12px; padding: 12px 16px; line-height: 1.4; }
.stepn i { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-style: normal;
           font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; margin-top: 1px; }

/* список покупок */
.shop-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; cursor: pointer; user-select: none; }
.shop-row .em { width: 36px; height: 36px; border-radius: 10px; background: #f6f2fc; display: flex; align-items: center; justify-content: center; font-size: 20px; flex: none; }
.shop-row .nm { flex: 1; font-weight: 700; line-height: 1.2; }
.shop-row .nm small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; margin-top: 2px; }
.shop-row.on .nm { text-decoration: line-through; color: var(--muted); }
.shop-row.on .price { color: var(--muted); }

/* неделя */
.day-card { display: block; text-decoration: none; color: var(--ink); padding: 14px 16px; }
.day-card .hd { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.day-card .hd b { font-size: 17px; }
.day-card .ln { display: flex; gap: 8px; font-size: 14px; padding: 2px 0; color: #3b3645; }
.day-card .ln span:first-child { width: 22px; text-align: center; }
.meter { height: 8px; background: rgba(29, 26, 36, .08); border-radius: 6px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--green); border-radius: 6px; }
.meter.over i { background: var(--warn); }
.daynav { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.daynav a { flex: none; padding: 8px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line);
            text-decoration: none; color: var(--ink); font-weight: 700; font-size: 14px; }
.daynav a.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* лендинг */
.land-h { font-size: 34px; line-height: 1.08; font-weight: 900; letter-spacing: -.02em; margin: 24px 0 12px; }
.land-h em { font-style: normal; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.feat { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; }
.feat .em { font-size: 24px; }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stats div { background: var(--card); border: 1px solid rgba(255, 255, 255, .9); border-radius: 16px; padding: 12px 14px; }
.stats b { display: block; font-size: 26px; font-weight: 900; color: var(--accent); line-height: 1.1; }
.stats span { font-size: 13px; color: var(--muted); }

/* формы входа и служебные страницы */
.alert { border-radius: 14px; }
.form-control { border-radius: 12px; padding: 11px 13px; }
.table { --bs-table-bg: transparent; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 24px 0 8px; }
