:root {
  --bg: #000;
  --card: #0f0f0f;
  --card-2: #171717;
  --line: #262626;
  --text: #f2f2f2;
  --muted: #8a8a8a;
  --slime: #7cff1a;
  --slime-dark: #3fae00;
  --purple: #a62cff;
  --danger: #ff4d4d;
  --r: 18px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif; }
body { min-height: 100vh; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
img { display: block; }

.app { max-width: 560px; margin: 0 auto; padding: 0 14px 120px; }

/* шапка с лого */
.header { padding: 14px 0 6px; display: flex; justify-content: center;
  border-bottom: 1px solid var(--line); margin: 0 -14px 14px; }
.header img { height: 64px; width: auto; filter: drop-shadow(0 0 12px rgba(166, 44, 255, .35)); }

/* баннер */
.banner { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line);
  aspect-ratio: 16 / 9; background: var(--card); margin-bottom: 20px;
  box-shadow: 0 0 24px rgba(124, 255, 26, .12); }
.banner img { width: 100%; height: 100%; object-fit: cover; }

.section-title { font-size: 20px; font-weight: 800; margin: 0 2px 12px; letter-spacing: .2px; }
.section-title span { color: var(--slime); }

/* каталог */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; display: flex; flex-direction: column; }
.card .pic { aspect-ratio: 1; background: var(--card-2); position: relative; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; }
.noimg { width: 100%; height: 100%; display: grid; place-items: center; font-size: 42px; color: #333; }
.card .info { padding: 10px 10px 0; flex: 1; }
.card .name { font-weight: 700; font-size: 15px; line-height: 1.25; }
.card .price { color: var(--slime); font-weight: 800; margin-top: 4px; }
.card .actions { padding: 10px; }
.card .actions .btn { font-size: 13px; }
.card.out .pic img, .card.out .noimg { opacity: .35; }
.tag { position: absolute; left: 8px; top: 8px; padding: 4px 8px; border-radius: 8px; font-size: 12px;
  font-weight: 700; background: rgba(0, 0, 0, .75); border: 1px solid #444; color: #ddd; }

.btn { width: 100%; height: 40px; border-radius: 12px; font-weight: 700;
  background: var(--slime); color: #071200; transition: transform .1s; }
.btn:active { transform: scale(.97); }
.btn.ghost { background: var(--card-2); color: var(--text); border: 1px solid var(--line); }
.btn.big { height: 52px; font-size: 17px; border-radius: 16px; }
.btn:disabled { opacity: .5; }
.btn.soldout { background: #222; color: #888; opacity: 1; }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid rgba(255, 77, 77, .45); }
.close { position: sticky; top: 0; float: right; z-index: 2; width: 36px; height: 36px; margin: 0 0 -36px;
  border-radius: 50%; background: rgba(0, 0, 0, .7); border: 1px solid var(--line); color: #fff; font-size: 16px; }

.stepper { display: flex; align-items: center; justify-content: space-between; height: 40px;
  border-radius: 12px; background: var(--card-2); border: 1px solid var(--slime-dark); }
.stepper button { width: 40px; height: 100%; font-size: 20px; font-weight: 700; color: var(--slime); }
.stepper .q { font-weight: 800; }

/* блок помощи */
.help { padding: 28px 16px 20px; text-align: center; border-radius: var(--r);
  background: var(--card); border: 1px solid var(--line); }
.help-ico { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center;
  background: #229ed9; color: #fff; box-shadow: 0 0 20px rgba(34, 158, 217, .45); }
.help-ico svg { width: 28px; height: 28px; margin-left: -2px; }
.help-title { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.help-text { color: #bbb; line-height: 1.45; margin-bottom: 14px; }
.help-text b { color: #4fc3f7; }
.btn.tg { background: #229ed9; color: #fff; }

.warn { background: rgba(255, 196, 0, .08); border: 1px solid rgba(255, 196, 0, .35); color: #f5d77a;
  border-radius: 14px; padding: 12px; line-height: 1.45; margin: 12px 0 16px; text-align: left; }
.order-no { color: var(--slime); }

/* вкусы */
.flavors { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.flavor { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 8px 8px 14px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); }
.flavor.on { border-color: var(--slime-dark); }
.flavor .fname { font-weight: 600; }
.flavor { padding: 6px 6px 6px 12px; }
.flavor .stepper, .flavor .btn { width: 138px; height: 30px; flex-shrink: 0; font-size: 11.5px; border-radius: 9px; white-space: nowrap; padding: 0 6px; }
.flavor .stepper button { width: 30px; font-size: 17px; }
.sheet h2 { padding-right: 44px; }
.sheet > div > .stepper, .sheet > div > .btn { height: 38px; font-size: 14px; }
.sheet .btn.big { height: 44px; font-size: 15px; }
.flavor.na .fname { color: var(--muted); text-decoration: line-through; }
.sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* профиль */
.profile { display: flex; gap: 14px; align-items: center; padding: 16px; margin-bottom: 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.avatar { width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  display: grid; place-items: center; font-size: 26px; font-weight: 800; color: #071200;
  background: linear-gradient(135deg, var(--slime), var(--purple)); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.p-name { font-size: 19px; font-weight: 800; }
.p-sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.order { background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px; margin-bottom: 10px; }
.order-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.order-head b { font-size: 17px; color: var(--slime); }
.order-head span { color: var(--muted); font-size: 13px; }
.order-line { color: #ccc; font-size: 14px; line-height: 1.6; }
.order-total { display: flex; justify-content: space-between; font-weight: 800; margin: 8px 0 12px;
  padding-top: 8px; border-top: 1px solid var(--line); }
.order .btn { height: 38px; font-size: 14px; }
.order.cancelled { opacity: .6; }
.status { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 8px;
  margin-bottom: 8px; background: rgba(255, 196, 0, .1); color: #f5d77a; }
.status.off { background: rgba(255, 77, 77, .1); color: var(--danger); }

/* нижняя панель */
.navbar { position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom)); width: calc(100% - 28px); max-width: 532px;
  display: flex; gap: 8px; padding: 8px; border-radius: 999px;
  background: rgba(18, 18, 18, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); box-shadow: 0 8px 30px rgba(0, 0, 0, .6); z-index: 10; }
.navbar button { height: 48px; border-radius: 999px; display: grid; place-items: center;
  background: var(--card-2); color: var(--text); position: relative; }
.navbar .wide { flex: 1; font-weight: 800; font-size: 16px; gap: 8px;
  display: flex; align-items: center; justify-content: center; }
.navbar .sq { width: 52px; }
.navbar .active { background: var(--slime); color: #071200; }
.navbar svg { width: 24px; height: 24px; }
.badge { position: absolute; top: 2px; right: 4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: var(--purple); color: #fff; font-size: 12px; font-weight: 800;
  display: grid; place-items: center; }
.badge:empty { display: none; }

/* корзина */
.screen { display: none; }
.screen.show { display: block; }
.cart-item { display: flex; gap: 12px; align-items: center; padding: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; }
.cart-item .thumb { width: 64px; height: 64px; border-radius: 12px; overflow: hidden;
  background: var(--card-2); flex-shrink: 0; }
.cart-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item .thumb .noimg { font-size: 24px; }
.cart-item .meta { flex: 1; min-width: 0; }
.cart-item .meta .name { font-weight: 700; }
.cart-item .meta .sum { color: var(--slime); font-weight: 700; margin-top: 2px; }
.cart-item .stepper { width: 112px; height: 36px; }
.cart-item .stepper button { width: 34px; }

.total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 800;
  padding: 14px 4px; }
.total b { color: var(--slime); }
textarea { width: 100%; min-height: 70px; padding: 12px; border-radius: 14px; resize: vertical;
  background: var(--card); border: 1px solid var(--line); outline: none; margin-bottom: 12px; }
textarea:focus, input:focus { border-color: var(--slime-dark); }

.empty { text-align: center; color: var(--muted); padding: 50px 10px; }
.empty .ico { font-size: 54px; margin-bottom: 10px; }

/* модалка товара */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .75); z-index: 20;
  display: none; align-items: flex-end; justify-content: center; }
.modal.show { display: flex; }
.sheet { width: 100%; max-width: 560px; background: var(--card); border-top: 1px solid var(--line);
  border-radius: 24px 24px 0 0; padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
  max-height: 90vh; overflow: auto; animation: up .2s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet .pic { border-radius: var(--r); overflow: hidden; aspect-ratio: 1; background: var(--card-2);
  margin-bottom: 14px; }
.sheet .pic img { width: 100%; height: 100%; object-fit: cover; }
.sheet h2 { margin: 0 0 4px; font-size: 22px; }
.sheet .price { color: var(--slime); font-weight: 800; font-size: 20px; }
.sheet p { color: #bbb; line-height: 1.45; white-space: pre-wrap; }

.toast { position: fixed; left: 50%; top: 20px; transform: translateX(-50%); z-index: 30;
  background: var(--card-2); border: 1px solid var(--slime-dark); padding: 10px 16px;
  border-radius: 12px; font-weight: 600; display: none; }

/* окно подтверждения */
.dialog-wrap { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .75);
  display: flex; align-items: center; justify-content: center; padding: 16px; }
.dialog { width: 100%; max-width: 340px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 20px 16px 16px; animation: up .15s ease-out; }
.dialog-text { font-size: 17px; font-weight: 700; text-align: center; margin-bottom: 16px; line-height: 1.35; }
.dialog-actions { display: flex; gap: 8px; }
.btn.danger-fill { background: var(--danger); color: #fff; }
