:root {
  --bg: #050607;
  --bg2: #0b0e12;
  --card: rgba(14, 18, 24, .86);
  --line: rgba(200, 255, 61, .16);
  --text: #f4f7f2;
  --muted: #8b9488;
  --lime: #c8ff3d;
  --accent: #c8ff3d;
  --cyan: #3dffd4;
  --hot: #ff3d7a;
  --gold: #ffe566;
  --ink: #071008;
  --safe: env(safe-area-inset-bottom, 0px);
  --tab: calc(62px + var(--safe));
  --radius: 18px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; min-height: 100%;
  color: var(--text);
  background:
    radial-gradient(900px 420px at 110% -10%, #163018 0%, transparent 55%),
    radial-gradient(700px 380px at -20% 110%, #0a2a28 0%, transparent 50%),
    linear-gradient(180deg, #080a0c 0%, var(--bg) 40%);
  font-family: "Bahnschrift", "Segoe UI Variable", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: .01em;
}
body::before {
  content: "";
  pointer-events: none;
  position: fixed; inset: 0;
  background:
    linear-gradient(rgba(200,255,61,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,255,61,.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at 50% 20%, #000 20%, transparent 75%);
  z-index: 0;
}
#app, .toast { position: relative; z-index: 1; }
button, input { font: inherit; color: inherit; }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab) + 22px); transform: translateX(-50%);
  background: var(--lime); color: var(--ink); padding: 10px 16px; border-radius: 999px;
  z-index: 80; font-weight: 750; font-size: 13px; box-shadow: 0 0 28px #c8ff3d55;
}
.gate {
  min-height: 100dvh; padding: calc(28px + env(safe-area-inset-top)) 20px calc(28px + var(--safe));
  display: flex; flex-direction: column; justify-content: center; max-width: 560px; margin: 0 auto;
}
.mark {
  width: 42px; height: 42px; border: 1px solid var(--lime);
  clip-path: polygon(12% 0, 100% 0, 100% 88%, 88% 100%, 0 100%, 0 12%);
  display: grid; place-items: center; color: var(--lime); font-weight: 800; font-size: 13px;
  box-shadow: inset 0 0 18px #c8ff3d33;
}
.kicker { color: var(--lime); letter-spacing: .28em; font-size: 10px; font-weight: 700; margin: 14px 0 8px; }
.gate h1 { margin: 0 0 10px; font-size: clamp(30px, 8vw, 40px); font-weight: 750; line-height: 1.1; }
.sub { color: var(--muted); line-height: 1.6; margin: 0 0 22px; }
.pads {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 8px 0 16px;
  max-height: 42vh; overflow: auto;
}
.pads button, .num {
  min-height: 50px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); backdrop-filter: blur(10px);
}
.pads button.on {
  background: var(--lime); color: var(--ink); border-color: var(--lime); font-weight: 800;
  box-shadow: 0 0 18px #c8ff3d55;
}
.manual { display: flex; gap: 8px; }
.manual input, .search input, .page input {
  flex: 1; min-height: 50px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--card); padding: 0 14px; backdrop-filter: blur(10px);
}
.btn {
  min-height: 52px; border: 0; border-radius: 14px; width: 100%;
  background: var(--lime); color: var(--ink); font-weight: 800;
  box-shadow: 0 0 24px #c8ff3d33;
}
.btn:active { transform: scale(.98); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn.danger { background: #2a1018; color: var(--hot); width: auto; min-height: 40px; padding: 0 12px; box-shadow: none; }
.err { color: var(--hot); min-height: 18px; font-size: 13px; }
.head {
  position: sticky; top: 0; z-index: 12;
  padding: calc(12px + env(safe-area-inset-top)) 16px 8px;
  background: rgba(5,6,7,.82); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.head h2 { margin: 0; font-size: 20px; letter-spacing: .04em; }
.head p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.head a { color: var(--cyan); }
.cats { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px 6px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex: 0 0 auto; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--muted); padding: 9px 14px; font-size: 13px;
}
.cat.on { color: var(--ink); border-color: var(--lime); background: var(--lime); font-weight: 750; }
.search { padding: 0 16px 8px; }
.search input { width: 100%; }
.grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
  padding: 6px 16px calc(var(--tab) + 78px);
}
.prod {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  backdrop-filter: blur(12px);
}
.shot { position: relative; aspect-ratio: 1; background: #0a0d10; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot img.gone { display: none; }
.ph {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
  font-size: 42px; font-weight: 800; color: var(--lime); background: linear-gradient(160deg, #10160f, #0a0d10);
}
.shot img.gone + .ph, .shot .ph.only { display: flex; }
.prod .meta { padding: 10px 11px 12px; }
.prod h3 { margin: 0; font-size: 14px; line-height: 1.3; min-height: 2.5em; font-weight: 650; }
.price { color: var(--gold); font-weight: 800; letter-spacing: .02em; }
.stock { color: var(--muted); font-size: 11px; }
.step { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.step button, .qty button {
  width: 36px; height: 36px; border-radius: 11px; border: 1px solid var(--line); background: #11161c;
}
.step button[data-p], .qty button[data-p] { background: var(--lime); color: var(--ink); border-color: var(--lime); font-weight: 800; }
.cartbar {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--tab) + 10px);
  background: rgba(12, 16, 12, .94); border: 1px solid #c8ff3d66; border-radius: 18px;
  padding: 10px 12px; display: flex; align-items: center; gap: 10px; z-index: 20;
  box-shadow: 0 12px 40px #000a, 0 0 24px #c8ff3d22;
}
.cartbar .btn { width: auto; min-height: 44px; padding: 0 18px; }
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--tab);
  padding-bottom: var(--safe); display: grid; grid-template-columns: 1fr 1fr 1fr;
  background: rgba(6,8,8,.96); border-top: 1px solid var(--line); z-index: 25;
}
.tabs button { background: 0; border: 0; color: var(--muted); font-size: 11px; display: flex; flex-direction: column; gap: 3px; align-items: center; justify-content: center; position: relative; }
.tabs button.on { color: var(--lime); }
.tabs .dot {
  min-width: 18px; height: 18px; border-radius: 999px; background: var(--lime); color: var(--ink);
  font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center;
  position: absolute; top: 6px; margin-left: 18px;
}
.page { padding: 12px 16px calc(var(--tab) + 16px); }
.item { display: flex; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px; margin-bottom: 8px; align-items: center; }
.item img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; }
.qty { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.payrow { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 10px 0; }
.payrow button {
  min-height: 48px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--muted);
}
.payrow button.on { background: var(--lime); color: var(--ink); border-color: var(--lime); font-weight: 800; }
.payimg { width: min(100%, 260px); display: block; margin: 8px auto; border-radius: 16px; }
.note { background: rgba(61,255,212,.08); border: 1px solid rgba(61,255,212,.28); color: #d7fff4; border-radius: 14px; padding: 12px; font-size: 13px; line-height: 1.45; }
.empty { text-align: center; color: var(--muted); padding: 40px 12px; }
.total { font-size: 22px; font-weight: 800; color: var(--lime); }
@media (min-width: 720px) {
  .grid { grid-template-columns: repeat(4, minmax(0,1fr)); max-width: 1080px; margin: 0 auto; }
  .head, .cats, .search, .page, .gate { max-width: 1080px; margin-left: auto; margin-right: auto; }
  .pads { grid-template-columns: repeat(8, 1fr); }
}
@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(5, minmax(0,1fr)); }
}
