:root {
  --bg: #070907;
  --card: #101410;
  --card-2: #0c100c;
  --border: #242c24;
  --acid: #a6ff00;
  --acid-dim: #7ed600;
  --chalk: #f2f5ef;
  --muted: #8a9a8e;
  --danger: #ff3b6b;
  --warn: #ffd166;

  --glow: 0 0 18px rgba(166, 255, 0, .25);
  --glow-soft: 0 0 10px rgba(166, 255, 0, .18);
  --shadow: 0 12px 30px rgba(0, 0, 0, .45);

  --font-display: "Rubik Mono One", "Oswald", system-ui, sans-serif;
  --font-head: "Oswald", system-ui, sans-serif;
  --font-tag: "Caveat", cursive;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --tap: 44px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg);
  color: var(--chalk);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

::selection {
  background: rgba(166, 255, 0, .3);
}

:focus-visible {
  outline: 2px solid rgba(166, 255, 0, .85);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Дым + виньетка */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(760px 420px at 90% -10%, rgba(166, 255, 0, .09), transparent 60%),
    radial-gradient(640px 380px at -15% 25%, rgba(166, 255, 0, .05), transparent 55%),
    radial-gradient(520px 300px at 60% 110%, rgba(242, 245, 239, .04), transparent 60%),
    linear-gradient(180deg, #090c09 0%, #050705 100%);
}

/* Шум + сканлайны + царапины */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .7;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E"),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .02) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(115deg, transparent 0 46px, rgba(242, 245, 239, .015) 46px 47px);
}

/* BUGFIX: отступ снизу живёт здесь и тянется вместе с контентом */
#app {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: 14px 14px calc(112px + env(safe-area-inset-bottom));
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  text-transform: uppercase;
}

h1 {
  font-size: 14px;
  line-height: 1.25;
  letter-spacing: .02em;
}

h1::before {
  content: "♛ ";
  color: var(--acid);
}

h2 {
  font-size: 14px;
  margin: 18px 0 12px;
  letter-spacing: .02em;
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -14px -14px 14px;
  width: calc(100% + 28px);
  padding: calc(12px + env(safe-area-inset-top)) 14px 12px;
  background: linear-gradient(180deg, rgba(5, 7, 5, .97), rgba(5, 7, 5, .86));
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(166, 255, 0, .25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

.top::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--acid-dim) 0 14px, transparent 14px 24px);
  opacity: .45;
  pointer-events: none;
}

.top h1 {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.back,
.icon {
  min-width: var(--tap);
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(166, 255, 0, .4);
  background: linear-gradient(180deg, rgba(166, 255, 0, .12), rgba(166, 255, 0, .04));
  color: var(--acid);
  font-size: 18px;
  line-height: 1;
  box-shadow: var(--glow-soft);
  transition: transform .16s ease, box-shadow .16s ease;
}

.back:active,
.icon:active {
  transform: translateY(1px) scale(.97);
}

.brand {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand b {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--chalk);
  background: linear-gradient(var(--acid), var(--acid)) 0 100% / 100% 3px no-repeat;
  padding-bottom: 4px;
}

.brand b::before {
  content: "♛ ";
  color: var(--acid);
}

.logo {
  height: 34px;
  width: auto;
  border-radius: 8px;
  border: 1px solid rgba(166, 255, 0, .4);
  box-shadow: var(--glow-soft);
}

/* Поиск и поля */
.search {
  margin: 0 0 8px;
}

.search input,
#address,
#comment {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--acid);
  border-radius: 8px;
  background: var(--card-2);
  color: var(--chalk);
  font-size: 16px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .4);
  transition: border-color .18s ease, box-shadow .18s ease;
}

.search input:focus,
#address:focus,
#comment:focus {
  outline: none;
  border-color: rgba(166, 255, 0, .7);
  box-shadow: 0 0 0 3px rgba(166, 255, 0, .12), var(--glow-soft);
}

#comment {
  min-height: 96px;
  resize: vertical;
}

::placeholder {
  color: rgba(138, 154, 142, .75);
}

input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

/* Чипы — параллелограммы, как стрит-теги */
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 2px 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  min-height: 40px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border: none;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  background: #121712;
  color: var(--muted);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: transform .16s ease, color .16s ease, background .16s ease, filter .16s ease;
}

.chip.active {
  color: #0a0f0a;
  background: linear-gradient(180deg, #c8ff5e, var(--acid));
  filter: drop-shadow(0 0 10px rgba(166, 255, 0, .45));
}

.chip:disabled {
  opacity: .35;
  filter: none;
}

/* Sort */
.toolbar {
  margin: 2px 0 12px;
}

.toolbar select {
  width: 100%;
  min-height: 48px;
  padding: 10px 42px 10px 14px;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--chalk);
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%23A6FF00' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center / 16px 16px,
    var(--card-2);
}

.toolbar select:focus {
  outline: none;
  border-color: rgba(166, 255, 0, .7);
  box-shadow: 0 0 0 3px rgba(166, 255, 0, .12);
}

.toolbar select option {
  background: #0c100c;
  color: var(--chalk);
}

/* Сетка карточек */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: 14px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(242, 245, 239, .03), rgba(242, 245, 239, .01)), var(--card);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

/* Трафаретный уголок */
.card::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  width: 14px;
  height: 14px;
  border-top: 2px solid rgba(166, 255, 0, .55);
  border-left: 2px solid rgba(166, 255, 0, .55);
  pointer-events: none;
}

.card:hover,
.card:focus-within {
  border-color: rgba(166, 255, 0, .6);
  box-shadow: 0 0 0 1px rgba(166, 255, 0, .12), var(--glow-soft), var(--shadow);
}

.card:active {
  transform: scale(.985);
}

.card-media {
  position: relative;
  aspect-ratio: 1;
  background: #0a0d0a;
  border-bottom: 1px solid rgba(242, 245, 239, .06);
}

.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .45;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .35));
}

.thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(166, 255, 0, .12), transparent 45%),
    #0b0f0b;
  color: var(--acid);
  font-family: var(--font-display);
  font-size: 22px;
}

.cart-item .placeholder {
  font-size: 16px;
}

.heart {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 38px;
  height: 38px;
  min-width: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(242, 245, 239, .16);
  border-radius: 50%;
  background: rgba(5, 7, 5, .65);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: rgba(242, 245, 239, .75);
  font-size: 15px;
  line-height: 1;
  transition: color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.heart.active {
  color: var(--danger);
  border-color: rgba(255, 59, 107, .6);
  box-shadow: 0 0 14px rgba(255, 59, 107, .35);
}

/* Скидка — маркерный стикер */
.badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  padding: 2px 9px;
  border-radius: 6px 2px 6px 2px;
  background: linear-gradient(180deg, #c8ff5e, var(--acid));
  color: #0a0f0a;
  font-family: var(--font-tag);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  transform: rotate(-4deg);
  box-shadow: 0 0 14px rgba(166, 255, 0, .4);
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
}

.card-title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
  min-height: 35px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.price {
  color: var(--acid);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-shadow: var(--glow-soft);
}

.old {
  margin-left: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: line-through;
}

.from {
  color: var(--muted);
  font-weight: 500;
}

/* Кнопки */
.btn {
  position: relative;
  width: 100%;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(166, 255, 0, .5);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(166, 255, 0, .12), rgba(166, 255, 0, .04));
  color: var(--acid);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.btn.primary {
  background:
    repeating-linear-gradient(135deg, rgba(0, 0, 0, .16) 0 8px, transparent 8px 16px),
    linear-gradient(180deg, #c8ff5e, var(--acid) 55%, #8fe000);
  border-color: rgba(200, 255, 94, .9);
  color: #0a0f0a;
  font-weight: 700;
  box-shadow: 0 0 20px rgba(166, 255, 0, .35), 0 10px 22px rgba(0, 0, 0, .35);
}

.btn:disabled {
  opacity: .38;
  border-color: var(--border);
  background: rgba(242, 245, 239, .04);
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
}

.btn:active:not(:disabled) {
  transform: translateY(1px) scale(.99);
}

.more {
  grid-column: 1 / -1;
  min-height: 50px;
  border-style: dashed;
  border-color: rgba(166, 255, 0, .5);
}

.empty,
.loading {
  grid-column: 1 / -1;
  padding: 34px 10px;
  text-align: center;
  color: var(--muted);
  font-family: var(--font-tag);
  font-size: 21px;
  font-weight: 600;
}

@keyframes pulse {
  0%,
  100% {
    opacity: .45;
  }
  50% {
    opacity: 1;
  }
}

.loading {
  animation: pulse 1.4s ease infinite;
}

/* Карточка товара */
.detail {
  padding-bottom: 18px;
}

.detail-media {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(166, 255, 0, .25);
  border-radius: 12px;
  background: #0a0d0a;
  box-shadow: var(--shadow);
}

.detail-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .4;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .35));
}

.detail-info {
  margin-top: 14px;
}

.price-lg {
  margin: 12px 0;
  color: var(--acid);
  font-family: var(--font-display);
  font-size: 20px;
  text-shadow: 0 0 22px rgba(166, 255, 0, .35);
}

.price-lg .old {
  font-family: var(--font-body);
  font-size: 15px;
}

.price-lg .badge {
  position: static;
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
  transform: rotate(-3deg);
}

.stock {
  color: var(--acid-dim);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.desc {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.option {
  margin: 14px 0;
}

.option-name {
  margin-bottom: 8px;
  color: var(--muted);
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.option-values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qty {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 16px 0;
}

.qty span {
  min-width: 34px;
  text-align: center;
  color: var(--chalk);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
}

.qty button {
  width: var(--tap);
  height: var(--tap);
  border: 1px solid rgba(166, 255, 0, .45);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(166, 255, 0, .12), rgba(166, 255, 0, .04));
  color: var(--acid);
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.detail-actions {
  display: flex;
  gap: 10px;
}

.detail-actions .btn {
  flex: 1;
}

.heart-lg {
  width: 52px;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card-2);
  color: var(--muted);
  font-size: 20px;
  transition: color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.heart-lg.active {
  color: var(--danger);
  border-color: rgba(255, 59, 107, .6);
  box-shadow: 0 0 16px rgba(255, 59, 107, .3);
}

/* Корзина */
.cart-list {
  display: block;
  padding-bottom: 4px;
}

.cart-item {
  position: relative;
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(242, 245, 239, .03), rgba(242, 245, 239, .01)), var(--card);
}

.cart-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(166, 255, 0, .7), transparent);
}

.cart-item.blocked {
  border-color: rgba(255, 59, 107, .6);
  box-shadow: 0 0 18px rgba(255, 59, 107, .15);
}

.cart-item.blocked::before {
  background: linear-gradient(180deg, var(--danger), transparent);
}

.cart-item .thumb {
  flex: none;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(242, 245, 239, .08);
  border-radius: 10px;
}

.cart-info {
  flex: 1;
  min-width: 0;
}

.cart-title {
  font-weight: 800;
  line-height: 1.25;
}

.cart-label,
.muted {
  color: var(--muted);
  font-size: 13px;
}

.cart-label {
  font-family: var(--font-mono);
  letter-spacing: .04em;
}

.reason {
  margin-top: 6px;
  color: var(--danger);
  font-family: var(--font-tag);
  font-size: 18px;
  font-weight: 600;
}

.cart-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.cart-controls button:not(.link) {
  min-width: 40px;
  height: 40px;
  border: 1px solid rgba(166, 255, 0, .4);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(166, 255, 0, .12), rgba(166, 255, 0, .04));
  color: var(--acid);
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.cart-controls span {
  min-width: 22px;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 800;
}

.link {
  width: auto;
  min-height: auto;
  padding: 0;
  border: none;
  background: none;
  color: var(--danger);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cart-total {
  margin-left: auto;
  align-self: flex-start;
  white-space: nowrap;
  color: var(--acid);
  font-family: var(--font-mono);
  font-weight: 800;
}

/* Оформление */
.checkout {
  position: relative;
  overflow: hidden;
  margin-top: 16px;
  padding: 16px 14px;
  border: 1px solid rgba(166, 255, 0, .4);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(242, 245, 239, .03), rgba(242, 245, 239, .01)), var(--card);
  box-shadow: var(--shadow), 0 0 24px rgba(166, 255, 0, .08);
}

.checkout::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: repeating-linear-gradient(45deg, rgba(166, 255, 0, .6) 0 8px, transparent 8px 16px);
  opacity: .5;
}

.checkout h2 {
  margin-top: 4px;
}

.field {
  margin: 14px 0;
}

.field > label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.radios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.radios label {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(242, 245, 239, .02);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.radios input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  display: grid;
  place-items: center;
  border: 2px solid rgba(138, 154, 142, .8);
  border-radius: 5px;
  background: transparent;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.radios input:checked {
  border-color: var(--acid);
  background: var(--acid);
  box-shadow: 0 0 12px rgba(166, 255, 0, .4);
}

.radios input:checked::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: #0a0f0a;
}

@supports selector(:has(*)) {
  .radios label:has(input:checked) {
    border-color: rgba(166, 255, 0, .65);
    background: rgba(166, 255, 0, .08);
    box-shadow: var(--glow-soft);
  }
}

.pickup,
.pay-details {
  padding: 12px;
  border: 1px dashed rgba(166, 255, 0, .45);
  border-radius: 8px;
  background: rgba(166, 255, 0, .05);
  color: var(--acid-dim);
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.checkout-total {
  margin: 16px 0;
  font-size: 16px;
}

.checkout-total b {
  color: var(--acid);
  font-family: var(--font-display);
  font-size: 17px;
  text-shadow: 0 0 14px rgba(166, 255, 0, .3);
}

#submit-order {
  min-height: 52px;
  font-size: 14px;
}

.checkout .reason {
  margin-top: 10px;
}

/* Профиль */
.profile-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(242, 245, 239, .03), rgba(242, 245, 239, .01)), var(--card);
}

.profile-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(166, 255, 0, .7), transparent);
}

.avatar {
  flex: none;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(180deg, #c8ff5e, var(--acid));
  color: #0a0f0a;
  font-family: var(--font-display);
  font-size: 20px;
  transform: rotate(-4deg);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--acid-dim), 0 0 18px rgba(166, 255, 0, .3);
}

.name {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.vip {
  display: inline-block;
  margin-left: 6px;
  padding: 3px 7px;
  border-radius: 4px 2px 4px 2px;
  background: linear-gradient(180deg, #ffe59a, var(--warn));
  color: #221700;
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  transform: rotate(3deg);
  box-shadow: 0 0 12px rgba(255, 209, 102, .3);
}

.profile-actions {
  display: flex;
  gap: 10px;
  margin: 14px 0;
}

.profile-actions .btn,
.profile-actions a.btn {
  flex: 1;
  min-height: 48px;
  text-decoration: none;
}

/* Заказы */
.orders {
  padding-bottom: 12px;
}

.order {
  position: relative;
  margin-bottom: 12px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(242, 245, 239, .03), rgba(242, 245, 239, .01)), var(--card);
}

.order::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(166, 255, 0, .7), transparent);
}

.order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.order-head b {
  font-family: var(--font-mono);
  letter-spacing: .04em;
}

.status {
  color: var(--acid-dim);
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.status.canceled {
  color: var(--danger);
}

.order-items {
  display: grid;
  gap: 5px;
  margin: 10px 0;
  font-size: 14px;
  color: var(--chalk);
}

.order-items div {
  padding-left: 10px;
  border-left: 2px solid rgba(166, 255, 0, .3);
}

.order-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.order-foot b {
  color: var(--acid);
  font-family: var(--font-mono);
}

/* Таббар */
#tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  gap: 6px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(5, 7, 5, .92), rgba(5, 7, 5, .97));
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-top: 1px solid rgba(166, 255, 0, .3);
  box-shadow: 0 -12px 28px rgba(0, 0, 0, .4);
}

#tabbar button {
  position: relative;
  flex: 1;
  min-height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: none;
  border-radius: 12px;
  background: none;
  color: var(--muted);
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

#tabbar button:active {
  transform: scale(.96);
}

#tabbar button.active {
  color: var(--acid);
  background: linear-gradient(180deg, rgba(166, 255, 0, .12), rgba(166, 255, 0, .04));
  text-shadow: 0 0 12px rgba(166, 255, 0, .5);
}

#tabbar button.active::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%) skewX(-18deg);
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background: var(--acid);
  box-shadow: 0 0 10px rgba(166, 255, 0, .8);
}

.tab-ico {
  height: 22px;
  display: grid;
  place-items: center;
}

.tab-ico svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#tabbar button.active .tab-ico svg {
  filter: drop-shadow(0 0 8px rgba(166, 255, 0, .5));
}

.tab-label {
  font-family: var(--font-head);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}

#cart-badge {
  position: absolute;
  top: 5px;
  left: calc(50% + 6px);
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff7396, var(--danger));
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(255, 59, 107, .45);
}

/* Тост */
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(98px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(8px);
  z-index: 80;
  max-width: calc(100vw - 28px);
  padding: 12px 16px;
  border: 1px solid rgba(166, 255, 0, .55);
  border-left: 4px solid var(--acid);
  border-radius: 10px;
  background: rgba(7, 10, 7, .94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--chalk);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  box-shadow: 0 0 20px rgba(166, 255, 0, .15), 0 16px 30px rgba(0, 0, 0, .4);
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#toast.error {
  border-color: rgba(255, 59, 107, .75);
  border-left-color: var(--danger);
  box-shadow: 0 0 20px rgba(255, 59, 107, .2), 0 16px 30px rgba(0, 0, 0, .4);
}

#toast.success {
  border-color: rgba(166, 255, 0, .8);
  box-shadow: 0 0 20px rgba(166, 255, 0, .25), 0 16px 30px rgba(0, 0, 0, .4);
}

/* Fatal */
.fatal {
  padding: 48px 18px;
  text-align: center;
}

.fatal h2 {
  color: var(--danger);
}

.fatal h2::before {
  content: "";
}

.fatal p {
  margin: 10px 0 0;
}

/* Адаптив / motion */
@media (max-width: 380px) {
  .grid {
    gap: 10px;
  }

  .price-lg {
    font-size: 17px;
  }

  .brand b {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ========== PATCH v2: читаемость и приглушённый неон ========== */
:root {
  --acid-text: #c9f79b; /* мягкая кислота для текста на тёмном */
}

/* Вторичные кнопки («В корзину», «Избранное», «Поддержка» и т.д.):
   текст мягче, начертание тоньше, рамка спокойнее */
.btn {
  color: var(--acid-text);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .08em;
  border-color: rgba(166, 255, 0, .35);
  background: linear-gradient(180deg, rgba(166, 255, 0, .08), rgba(166, 255, 0, .03));
}

/* Primary: градиент спокойнее, полосы бледнее, свечение меньше,
   буквы тоньше — чёрный текст на кислоте читается чисто */
.btn.primary {
  color: #081008;
  font-weight: 600;
  letter-spacing: .08em;
  background:
    repeating-linear-gradient(135deg, rgba(0, 0, 0, .10) 0 10px, transparent 10px 20px),
    linear-gradient(180deg, #bdf27e, var(--acid) 60%, #93d900);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35), 0 0 12px rgba(166, 255, 0, .22);
}

.btn:disabled {
  color: var(--muted);
}

/* +/−, стрелка назад, сердечко-кнопки: без ядовитого свечения */
.qty button,
.cart-controls button:not(.link),
.back,
.icon {
  color: var(--acid-text);
  border-color: rgba(166, 255, 0, .3);
  background: linear-gradient(180deg, rgba(166, 255, 0, .08), rgba(166, 255, 0, .03));
  box-shadow: none;
}

/* Чипы: тоньше и спокойнее */
.chip {
  font-weight: 500;
  letter-spacing: .08em;
}

.chip.active {
  color: #0a0f0a;
  background: linear-gradient(180deg, #bdf27e, var(--acid));
  filter: drop-shadow(0 0 6px rgba(166, 255, 0, .35));
}

/* «Показать ещё» */
.more {
  border-color: rgba(166, 255, 0, .35);
  color: var(--acid-text);
}

/* Цены без неонового ореола — резче и читабельнее */
.price {
  text-shadow: none;
}

.price-lg {
  text-shadow: 0 0 14px rgba(166, 255, 0, .22);
}

/* Таббар: активная вкладка мягче */
#tabbar button.active {
  color: var(--acid-text);
  text-shadow: 0 0 8px rgba(166, 255, 0, .3);
}

#tabbar button.active::after {
  box-shadow: 0 0 6px rgba(166, 255, 0, .6);
}

/* Мелкие подписи: убираем лишний жир */
.tab-label {
  font-weight: 500;
}

.option-name,
.field > label {
  font-weight: 500;
  letter-spacing: .14em;
}

.stock,
.status {
  font-weight: 500;
}

.link {
  font-weight: 500;
  letter-spacing: .08em;
}

/* ========== PATCH v3: длинный ряд категорий ========== */
.chips {
  scroll-snap-type: x proximity;
}

.chip {
  scroll-snap-align: center;
}

/* ===== PATCH v4: телефон + обязательные поля ===== */
#phone{width:100%;min-height:50px;padding:12px 14px;border:1px solid var(--border);border-left:3px solid var(--acid);border-radius:8px;background:var(--card-2);color:var(--chalk);font-size:16px;box-shadow:inset 0 2px 8px rgba(0,0,0,.4);transition:border-color .18s ease,box-shadow .18s ease}
#phone:focus{outline:none;border-color:rgba(166,255,0,.7);box-shadow:0 0 0 3px rgba(166,255,0,.12),var(--glow-soft)}
.req{margin-left:4px;color:var(--danger);font-family:var(--font-body);font-weight:700;letter-spacing:0}
.required-note{margin:10px 0 0;color:var(--muted);font-size:12px}
.required-note .req{margin:0 4px 0 0}

/* ===== Телефон: поле, ошибка, обязательные поля ===== */
#phone{width:100%;min-height:50px;padding:12px 14px;border:1px solid var(--border);border-left:3px solid var(--acid);border-radius:8px;background:var(--card-2);color:var(--chalk);font-family:var(--font-mono);font-size:16px;letter-spacing:.04em;box-shadow:inset 0 2px 8px rgba(0,0,0,.4);transition:border-color .18s ease,box-shadow .18s ease}
#phone:focus{outline:none;border-color:rgba(166,255,0,.7);box-shadow:0 0 0 3px rgba(166,255,0,.12),var(--glow-soft)}
#phone.invalid{border-color:rgba(255,59,107,.75);border-left-color:var(--danger);box-shadow:0 0 0 3px rgba(255,59,107,.12)}
#phone.invalid:focus{border-color:var(--danger);box-shadow:0 0 0 3px rgba(255,59,107,.18)}
.field-error{margin-top:7px;color:var(--danger);font-family:var(--font-head);font-size:11.5px;font-weight:600;letter-spacing:.1em;text-transform:uppercase}
.req{margin-left:4px;color:var(--danger);font-family:var(--font-body);font-weight:700;letter-spacing:0}
.required-note{margin:10px 0 0;color:var(--muted);font-size:12px}
.required-note .req{margin:0 4px 0 0}

/* ===== Карта для перевода ===== */
.pay-card{padding:12px;border:1px dashed rgba(166,255,0,.45);border-radius:8px;background:rgba(166,255,0,.05)}
.pay-card-label{margin-bottom:8px;color:var(--muted);font-family:var(--font-head);font-size:11px;font-weight:500;letter-spacing:.14em;text-transform:uppercase}
.pay-card-number{color:var(--acid);font-family:var(--font-mono);font-size:17px;font-weight:800;letter-spacing:.06em;word-break:break-word}
.pay-card-meta{margin-top:4px;color:var(--acid-dim);font-family:var(--font-body);font-size:13px}
.pay-card .btn{margin-top:10px;min-height:42px}
.pay-card.compact{margin:10px 0}
.pay-card.compact .pay-card-number{font-size:15px}