:root{--bg:#151515;--card:#202022;--line:#2f2f33;--text:#f2f2f3;--mute:#8b8b95;--acc:#5b8cff;--ok:#3fd1b0;--r:20px}
*{box-sizing:border-box;margin:0;-webkit-tap-highlight-color:transparent}
body{background:var(--bg);color:var(--text);font:15px/1.4 Inter,system-ui,sans-serif;min-height:100vh;padding-bottom:96px}
button,input{font:inherit;color:inherit;border:0;background:none}
button{cursor:pointer}
.logo,h1,.big{font-family:Unbounded,Inter,sans-serif;font-weight:800;letter-spacing:.01em}
#top{display:flex;justify-content:space-between;align-items:center;padding:18px 20px;border-bottom:1px solid var(--line)}
#top .logo{font-size:24px}
#top h1{font-size:20px}
.pill{border:1px solid var(--line);background:var(--card);border-radius:14px;padding:11px 16px;display:flex;gap:8px;align-items:center}
.pill svg{width:18px;height:18px;stroke:var(--acc);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
main{padding:16px 20px}
.search{display:flex;align-items:center;gap:12px;background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:0 18px;height:56px}
.search svg{width:20px;stroke:var(--mute);fill:none;stroke-width:2}
.search input{flex:1;outline:0;height:100%}
.search input::placeholder{color:#55555e}
.chips{display:flex;gap:10px;overflow-x:auto;padding:16px 0;scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chip{flex:none;border:1px solid var(--line);border-radius:999px;padding:11px 22px;color:#c9c9d0}
.chip.on{background:var(--acc);border-color:var(--acc);color:#fff;box-shadow:0 6px 22px #5b8cff55}
.sec{color:var(--mute);font-weight:600;font-size:13px;letter-spacing:.06em;margin:14px 0 10px}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--r)}
.hero{padding:22px;background:radial-gradient(circle at 80% 20%,#22346b,#171c2b 60%);border-color:#2a3558;margin-bottom:6px}
.hero .hit{display:inline-flex;gap:6px;border:1px solid #2f4a8a;background:#1b2a52;color:var(--acc);font-weight:600;font-size:13px;border-radius:999px;padding:7px 14px;margin-bottom:16px}
.hero h2{font-size:20px;font-weight:600;margin-bottom:6px}
.hero p{color:var(--mute);font-size:16px}
.hero .foot{display:flex;justify-content:space-between;align-items:flex-end;margin-top:22px}
.big{font-size:30px}
s{color:#6c6c76}
.btn{background:var(--acc);color:#fff;font-weight:600;border-radius:16px;padding:16px 26px}
.btn.full{width:100%;display:block;box-shadow:0 8px 30px #5b8cff44}
.btn:disabled{opacity:.5}
.item{display:flex;align-items:center;gap:16px;padding:16px;margin-bottom:12px}
.ico{width:60px;height:60px;border-radius:16px;display:grid;place-items:center;font-size:28px;flex:none}

.ico img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 9px;
  border-radius: inherit;
}

.item[data-info] {
  cursor: pointer;
}

.item[data-info]:active {
  transform: scale(0.99);
}

.info{flex:1;min-width:0}
.info b{display:block;font-weight:600;font-size:16px;margin-bottom:6px}
.tags{display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:13px}
.tag{background:#1f2745;color:var(--acc);border-radius:8px;padding:3px 10px;font-weight:600}
.tag.g{background:#1d2f31;color:var(--ok)}
.stock{color:var(--mute)}.stock::before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--ok);margin-right:6px}
.stock.out::before{background:#e5586e}
.pr{text-align:right;display:flex;flex-direction:column;align-items:flex-end;gap:2px}
.pr b{font-family:Unbounded,sans-serif;font-size:16px}
.pr s{font-size:13px}
.plus{width:60px;height:46px;border-radius:14px;background:var(--acc);font-size:26px;margin-top:6px;display:grid;place-items:center}
.qty{display:flex;align-items:center;gap:14px;background:#17171a;border:1px solid var(--line);border-radius:14px;padding:4px}
.qty button{width:34px;height:34px;font-size:20px}
.rm{color:#e5586e;font-size:20px;padding:6px}
.price-acc{color:var(--acc);font-family:Unbounded,sans-serif;font-weight:600}
.sum{padding:20px;margin:14px 0}
.sum div{display:flex;justify-content:space-between;padding:10px 0;color:var(--mute)}
.sum div+div{border-top:1px solid var(--line);color:var(--text);font-weight:600}
.sum .big{color:var(--acc)}
.empty{text-align:center;color:var(--mute);padding:60px 20px}
.ava{width:80px;height:80px;border-radius:24px;margin:10px auto 12px;display:grid;place-items:center;font:800 34px Unbounded;background:linear-gradient(135deg,#2f3a5f,#5b8cff);box-shadow:0 0 40px #5b8cff44}
.center{text-align:center;font-family:Unbounded;font-weight:800;font-size:20px;margin-bottom:22px}
.bal{padding:22px;margin-bottom:14px}
.bal small,.lbl{color:var(--mute);font-weight:600;font-size:12px;letter-spacing:.08em}
.bal .big{font-size:36px;margin:8px 0 18px}
.bal .big span{color:var(--mute);font-size:20px}
.row{display:flex;gap:12px}
.row input{flex:1;min-width:0;background:#26262a;border:1px solid var(--line);border-radius:14px;padding:0 16px;height:52px;outline:0;text-transform:uppercase}
.stats{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0}
.stats div{padding:18px;text-align:center}
.stats b{display:block;color:var(--acc);font-family:Unbounded;font-size:24px}
.stats span{color:var(--mute);font-weight:600;font-size:12px;letter-spacing:.08em}
.ord{display:flex;justify-content:space-between;padding:14px 16px;margin-bottom:10px;gap:10px}
.ord small{color:var(--mute);display:block}
#tabs{position:fixed;bottom:0;left:0;right:0;display:flex;gap:6px;padding:8px 10px calc(8px + env(safe-area-inset-bottom));background:#151515;border-top:1px solid var(--line)}
#tabs button{flex:1;position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 0;border-radius:18px;color:var(--mute);font-size:13px;font-weight:600}
#tabs button.on{background:#1b2336;color:var(--acc)}
#tabs svg{width:26px;height:26px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#badge{position:absolute;top:2px;left:calc(50% + 6px);background:var(--acc);color:#fff;font:600 12px Inter;border-radius:999px;min-width:20px;height:20px;display:grid;place-items:center;font-style:normal}
#sheet{position:fixed;inset:0;background:#000a;display:flex;align-items:flex-end;z-index:9}
#sheet[hidden],#toast[hidden],#badge[hidden]{display:none}
#sheet .box{width:100%;background:#1b1b1e;border-radius:26px 26px 0 0;padding:24px 20px calc(24px + env(safe-area-inset-bottom));animation:up .22s ease-out}
@keyframes up{from{transform:translateY(40px);opacity:0}}
#sheet h3{font-family:Unbounded;font-size:18px;margin-bottom:16px}
.amts{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:12px}
.amts button{border:1px solid var(--line);border-radius:12px;padding:12px 0;font-weight:600}
.amts button.on{border-color:var(--acc);background:#1b2336;color:var(--acc)}
.methods{display:grid;gap:10px;margin:16px 0}
.methods button{display:flex;justify-content:space-between;border:1px solid var(--line);border-radius:16px;padding:16px;font-weight:600;text-align:left}
.methods button.on{border-color:var(--acc);background:#1b2336}
.methods small{color:var(--mute);font-weight:400}
#toast{position:fixed;left:20px;right:20px;bottom:100px;background:#2a2a2f;border:1px solid var(--line);padding:14px 18px;border-radius:16px;z-index:10;text-align:center}
@media (prefers-reduced-motion:reduce){#sheet .box{animation:none}}

/* Карточка товара */
#sheet .box {
  position: relative;
  max-height: 88dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.detail-close {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  font-size: 18px;
}

.detail-content {
  padding-top: 18px;
}

.detail-image,
.detail-icon {
  width: 100%;
  height: 190px;
  margin-bottom: 20px;
  border-radius: 18px;
}

.detail-image {
  display: block;
  object-fit: contain;
  background: #242428;
  padding: 20px;
}

.detail-icon {
  display: grid;
  place-items: center;
  font-size: 64px;
}

.detail-title {
  margin: 18px 0 10px !important;
  padding-right: 30px;
  overflow-wrap: anywhere;
}

.detail-description {
  color: #b0b0ba;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-bottom: 24px;
}

.detail-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.detail-price {
  font-family: Unbounded, sans-serif;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}

.detail-footer .btn {
  padding: 14px 18px;
  flex-shrink: 0;
}

@media (min-width: 600px) {
  #sheet {
    align-items: center;
    justify-content: center;
    padding: 20px;
  }

  #sheet .box {
    width: min(100%, 460px);
    border-radius: 26px;
  }
}

/* Меню профиля: поддержка / FAQ / документы */
.menu{display:grid;gap:12px;margin:22px 0 8px}
.menu-item{display:flex;align-items:center;gap:20px;width:100%;padding:14px 20px 14px 14px;text-align:left;font-size:17px;font-weight:500;border-radius:24px}
.menu-item:active{transform:scale(.99)}
.menu-item .mi{width:56px;height:56px;border-radius:16px;background:#1b2336;display:grid;place-items:center;flex:none}
.menu-item .mi svg{width:26px;height:26px;stroke:var(--text);fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.menu-item .mt{flex:1;min-width:0}
.menu-item .chev{width:22px;height:22px;stroke:var(--mute);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}

/* Окно FAQ */
.faq{display:grid;gap:12px}
.faq-item{background:#242428;border:1px solid var(--line);border-radius:16px;padding:14px 16px}
.faq-item b{display:block;font-weight:600;margin-bottom:6px}
.faq-item p{color:#b0b0ba;line-height:1.6;white-space:pre-line;overflow-wrap:anywhere}

/* ====== Токены в заказе ====== */
.ord.clickable{cursor:pointer;-webkit-tap-highlight-color:transparent}
.ord.clickable:active{opacity:.8}
.ord-hint{color:var(--acc) !important;margin-top:4px}
.tokens{display:flex;flex-direction:column;gap:10px;max-height:50vh;overflow-y:auto}
.token{display:flex;align-items:center;gap:10px;background:var(--card);border:1px solid var(--line);border-radius:16px;padding:10px 10px 10px 14px}
.token code{flex:1;min-width:0;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;word-break:break-all;user-select:all;-webkit-user-select:all}
.token-copy{padding:10px 14px;font-size:13px;border-radius:12px;flex-shrink:0}

/* Окно «нет данных для повторного показа» */
#sheet.center{align-items:center;justify-content:center;padding:20px}
#sheet.center .box{width:min(100%,460px);border-radius:32px;padding:32px 24px;animation:none}
.done-box{text-align:center}
.done-ico{width:84px;height:84px;margin:0 auto 22px;border-radius:50%;border:3px solid var(--ok);background:#1f3a36;display:grid;place-items:center;box-shadow:0 0 40px #3fd1b022}
.done-ico svg{width:40px;height:40px;stroke:var(--ok);fill:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
#sheet .done-title{font-size:22px;margin-bottom:22px;overflow-wrap:anywhere}
.done-msg{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:16px 18px;margin-bottom:18px;text-align:left;line-height:1.6;color:#d6d6dc;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:14px}