/* SAO WRLD 1.2.3 — магазин в виде игрового меню Айнкрада.
   Идея: сайт — это главное меню SAO. Слева — колонка круглых кнопок (категории),
   справа — полупрозрачное окно со списком предметов, покупка — окно подтверждения ○ / ✕. */

:root {
  --sky-top: #7fb3e0;
  --sky-mid: #b9d7ef;
  --horizon: #f4dcc0;
  --window: rgba(250, 252, 255, 0.9);
  --window-solid: #fafcff;
  --window-bar: #eef2f6;
  --rule: #d6dee7;
  --ink: #26323e;
  --ink-2: #566472;
  --ink-3: #8a97a4;
  --amber: #e8a33a;      /* выделение в меню SAO */
  --amber-ink: #3a2706;
  --system: #3a8fd1;     /* системные сообщения */
  --hp: #7ac143;         /* полоса HP */
  --deny: #d9534f;
  --page: #e9eef3;
  --line-soft: #e6ebf0;
  --field: #ffffff;
  --row-hover: #fff7e9;
  --chip: #eef3f8;
  --gold-chip: #fbf1df;
  --gold-ink: #c27f17;
  --lead: #233a52;
  --cloud: rgba(255,255,255,.75);
  --orb-1: #ffffff; --orb-2: #dde4ea; --orb-ink: #6f7c88;
  --deny-chip: #f7e1e0;
  --display: "Russo One", "Golos Text", system-ui, sans-serif;
  --text: "Golos Text", "Segoe UI", system-ui, sans-serif;
  --r-window: 6px;
  --r-row: 4px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font: 16px/1.6 var(--text);
  color: var(--ink);
  background: var(--page);
  min-height: 100vh;
  display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: var(--system); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }

/* ===================== шапка ===================== */
.top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
}
.top .wrap { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none;
  font: 20px var(--display); letter-spacing: .02em; text-shadow: 0 1px 8px rgba(30,60,100,.35); }
.brand img { width: 32px; height: 32px; filter: drop-shadow(0 2px 6px rgba(30,60,100,.3)); }
.nav { margin-left: auto; display: flex; gap: 2px; }
.nav a { color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 999px;
  text-shadow: 0 1px 6px rgba(30,60,100,.4); }
.nav a:hover { background: rgba(255,255,255,.22); }
.page .top { position: static; background: linear-gradient(180deg, var(--sky-top), var(--sky-mid)); }
@media (max-width: 640px) { .nav a.hide-sm { display: none; } }

/* ===================== первый экран: небо и Айнкрад ===================== */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 55%, var(--horizon) 100%);
  padding: 120px 0 0;
  min-height: 620px;
}
.hero .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr 1fr; align-items: end; gap: 24px; }
.hero-copy { padding-bottom: 120px; }
.hero h1 {
  font: clamp(40px, 7vw, 76px)/0.98 var(--display);
  color: #fff; margin: 0 0 18px;
  text-shadow: 0 2px 0 rgba(40,80,130,.25), 0 10px 40px rgba(40,80,130,.35);
}
.hero p.lead { color: var(--lead); font-size: 19px; max-width: 30ch; margin: 0 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.castle { position: relative; align-self: center; justify-self: center; width: min(460px, 100%); }
.castle { animation: rise 1.4s cubic-bezier(.2,.7,.2,1) both; }
.castle svg { width: 100%; height: auto; display: block; animation: float 9s ease-in-out 1.4s infinite; }
@keyframes rise { from { transform: translateY(70px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.cloud { position: absolute; z-index: 1; background: var(--cloud); border-radius: 999px; filter: blur(2px); }
.cloud::before, .cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.c1 { width: 260px; height: 46px; left: -40px; bottom: 120px; }
.c1::before { width: 110px; height: 90px; left: 40px; top: -48px; }
.c1::after { width: 80px; height: 70px; left: 130px; top: -32px; }
.c2 { width: 340px; height: 56px; right: -60px; bottom: 60px; opacity: .85; }
.c2::before { width: 140px; height: 110px; left: 70px; top: -62px; }
.c2::after { width: 100px; height: 80px; left: 190px; top: -40px; }
.c3 { width: 180px; height: 30px; right: 6%; top: 120px; opacity: .55; }
@media (prefers-reduced-motion: reduce) { .castle, .castle svg { animation: none; } }
@media (max-width: 820px) {
  .hero { padding-top: 92px; min-height: 0; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 0; }
  .castle { width: 260px; margin: 8px auto 40px; }
}

/* IP — как строка статуса игрока */
.status {
  display: inline-grid; grid-template-columns: auto auto; align-items: center; gap: 4px 14px;
  background: var(--window); border-radius: var(--r-window); padding: 10px 10px 10px 16px;
  box-shadow: 0 12px 30px -14px rgba(30,60,100,.5);
}
.status .name { font: 15px var(--display); }
.status .hpbar { grid-column: 1; height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; width: 190px; }
.status .hpbar i { display: block; height: 100%; width: 100%; background: var(--hp); }
.status .ip { grid-column: 1; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.status button { grid-row: 1 / span 3; grid-column: 2; }

/* ===================== кнопки ===================== */
.btn {
  appearance: none; cursor: pointer; border: 0; text-decoration: none; white-space: nowrap;
  font: 600 15px/1 var(--text); padding: 12px 18px; border-radius: 999px;
  background: var(--amber); color: var(--amber-ink);
  box-shadow: 0 2px 0 #c7852a;
  transition: transform .1s, filter .1s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 #c7852a; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.light { background: rgba(255,255,255,.9); color: var(--ink); box-shadow: 0 2px 0 rgba(0,0,0,.08); }
.btn.small { padding: 9px 14px; font-size: 14px; }

/* ===================== главное меню магазина ===================== */
.shop { position: relative; z-index: 3; padding-bottom: 64px;
  background: linear-gradient(180deg, var(--horizon) 0, var(--page) 360px); }
.shop .menu-layout { margin-top: -60px; }
.menu-layout { display: grid; grid-template-columns: 96px 1fr; gap: 22px; align-items: start; }

.ring {
  position: sticky; top: 20px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding-top: 8px;
}
.ring button {
  width: 64px; height: 64px; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--orb-rim, rgba(255,255,255,.9));
  background: radial-gradient(circle at 35% 30%, var(--orb-1), var(--orb-2) 70%);
  color: var(--orb-ink); display: grid; place-items: center;
  box-shadow: 0 6px 16px -6px rgba(30,60,100,.45);
  transition: transform .15s, background .15s, color .15s;
  position: relative;
}
.ring button svg { width: 28px; height: 28px; }
.ring button[aria-pressed="true"] {
  background: radial-gradient(circle at 35% 30%, #ffd690, var(--amber) 75%);
  color: #fff; transform: scale(1.08);
}
.ring button span {   /* подпись появляется справа, как в SAO */
  position: absolute; left: 74px; top: 50%; transform: translateY(-50%);
  background: var(--window-solid); color: var(--ink); font-weight: 600; font-size: 14px;
  padding: 4px 10px; border-radius: var(--r-row); white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .15s;
  box-shadow: 0 4px 12px -6px rgba(30,60,100,.4);
}
.ring button:hover span, .ring button:focus-visible span { opacity: 1; }
.ring button[aria-pressed="true"] span { opacity: 0; }

/* окно */
.window {
  background: var(--window); backdrop-filter: blur(10px);
  border-radius: var(--r-window);
  box-shadow: 0 1px 0 #fff inset, 0 24px 60px -30px rgba(30,60,100,.55), 0 0 0 1px rgba(160,180,200,.35);
  overflow: hidden;
}
.window-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px; background: var(--window-bar); border-bottom: 1px solid var(--rule);
}
.window-bar h2 { margin: 0; font: 22px var(--display); }
.window-bar p { margin: 0; color: var(--ink-3); font-size: 14px; }

/* строки предметов */
.items { list-style: none; margin: 0; padding: 8px; }
.item {
  display: grid; grid-template-columns: 52px 1fr auto auto; gap: 16px; align-items: center;
  padding: 12px 12px; border-radius: var(--r-row);
}
.item + .item { border-top: 1px solid var(--line-soft); }
.item:hover { background: var(--row-hover); }
.item .ico {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--chip); color: var(--system);
}
.item .ico svg { width: 26px; height: 26px; }
.item[data-cat="titles"] .ico, .item[data-cat="col"] .ico { background: var(--gold-chip); color: var(--gold-ink); }
.item[style*="--tint"] .ico { color: var(--tint); background: color-mix(in srgb, var(--tint) 15%, var(--window-solid)); }
.item h3 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; }
.item p { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; max-width: 52ch; }
.item .tag { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: 600; color: #8a5a0c; background: #fbe9c8; padding: 1px 8px; border-radius: 999px; vertical-align: 2px; }
.price { font: 22px var(--display); white-space: nowrap; }
.price small { font: 600 15px var(--text); color: var(--ink-3); }
.empty { padding: 28px; color: var(--ink-3); text-align: center; }

@media (max-width: 760px) {
  .shop .menu-layout { margin-top: 0; }
  .menu-layout { grid-template-columns: 1fr; gap: 14px; }
  .ring { position: static; flex-direction: row; justify-content: center; padding: 0; }
  .ring button { width: 56px; height: 56px; }
  .ring button span { display: none; }
  .item { grid-template-columns: 44px 1fr auto; grid-template-areas: "ico text text" "ico price btn"; gap: 8px 12px; padding: 14px 8px; }
  .item .ico { grid-area: ico; width: 44px; height: 44px; align-self: start; }
  .item > div:not(.ico) { grid-area: text; }
  .item .price { grid-area: price; align-self: center; }
  .item .btn { grid-area: btn; }
  .window-bar { flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 16px; }
  .c3 { display: none; }
  .castle { width: 220px; margin: 0 auto 28px; }
}

/* ===================== как это работает и вопросы ===================== */
.below { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 22px; }
@media (max-width: 860px) { .below { grid-template-columns: 1fr; } }
.steps { list-style: none; margin: 0; padding: 18px 20px 20px; counter-reset: s; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 12px; }
.steps li::before {
  content: counter(s); width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font: 15px var(--display);
  background: var(--system); color: #fff;
}
.steps b { display: block; }
.steps span { color: var(--ink-2); font-size: 15px; }
.faq { padding: 6px 8px 10px; }
.faq details { border-bottom: 1px solid var(--line-soft); }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; list-style: none; padding: 13px 12px; font-weight: 600; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 20px/1 var(--display); color: var(--ink-3); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 12px 14px; color: var(--ink-2); font-size: 15px; }

/* ===================== окно подтверждения покупки ===================== */
dialog {
  border: 0; padding: 0; width: min(430px, calc(100vw - 24px));
  background: transparent; color: var(--ink); overflow: visible;
}
dialog::backdrop { background: rgba(30, 50, 75, .45); backdrop-filter: blur(4px); }
dialog[open] .window { animation: pop .18s ease-out; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { dialog[open] .window { animation: none; } }
.confirm-head { padding: 20px 22px 14px; text-align: center; border-bottom: 1px solid var(--rule); background: var(--window-bar); }
.confirm-head .ico { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; background: var(--chip); color: var(--system); }
.confirm-head .ico svg { width: 32px; height: 32px; }
.confirm-head h3 { margin: 0; font: 20px var(--display); }
.confirm-head p { margin: 4px 0 0; color: var(--ink-2); }
form.buyform { padding: 18px 22px 22px; display: grid; gap: 14px; background: var(--window-solid); }
label.f { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
label.f input {
  font: 500 16px var(--text); color: var(--ink);
  padding: 12px 14px; border-radius: var(--r-row); border: 1px solid var(--rule); background: var(--field);
}
label.f input:focus { outline: 0; border-color: var(--system); box-shadow: 0 0 0 3px rgba(58,143,209,.2); }
label.f input[aria-invalid="true"] { border-color: var(--deny); }
.hint { font-size: 13px; font-weight: 400; color: var(--ink-3); }
.check { display: grid; grid-template-columns: 20px 1fr; gap: 10px; font-size: 14px; color: var(--ink-2); }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--system); }
.err { margin: 0; color: var(--deny); font-size: 14px; min-height: 1.3em; }
.choice { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.yes, .no {
  appearance: none; border: 0; cursor: pointer; font: 600 16px var(--text);
  border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.yes { background: var(--system); color: #fff; padding: 13px 18px; box-shadow: 0 2px 0 #2a6ea3; }
.yes::before { content: ""; width: 14px; height: 14px; border: 2.5px solid currentColor; border-radius: 50%; }
.yes:disabled { opacity: .65; cursor: progress; }
.no { width: 48px; height: 48px; background: var(--deny-chip); color: var(--deny); font-size: 22px; }
.pay-note { margin: 0; text-align: center; font-size: 13px; color: var(--ink-3); }

/* ===================== текстовые страницы ===================== */
.page main { padding: 32px 0 56px; }
.doc { padding: clamp(20px, 4vw, 44px); max-width: 860px; margin: 0 auto; }
.doc h1 { margin: 0 0 8px; font: clamp(26px, 4vw, 36px)/1.15 var(--display); }
.doc h2 { font-size: 19px; margin: 30px 0 8px; }
.doc p, .doc li { color: var(--ink-2); max-width: 72ch; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 12px 0; }
.doc th, .doc td { border-bottom: 1px solid var(--rule); text-align: left; padding: 9px 6px; vertical-align: top; }
.doc th { color: var(--ink-3); font-weight: 600; }
.doc td:last-child, .doc th:last-child { text-align: right; white-space: nowrap; }
.req { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; font-size: 16px; }
.req dt { color: var(--ink-3); }
.req dd { margin: 0; font-weight: 600; }
.result { text-align: center; }
.result .seal { width: 84px; height: 84px; border-radius: 50%; margin: 4px auto 16px; display: grid; place-items: center; font: 40px var(--display); color: #fff; }
.seal.ok { background: var(--hp); }
.seal.wait { background: var(--system); }
.seal.bad { background: var(--deny); }
.result .req { max-width: 360px; margin: 24px auto; text-align: left; }

/* ===================== подвал ===================== */
footer { background: #26323e; color: #b7c2cd; font-size: 14px; }
footer .wrap { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; padding-top: 28px; padding-bottom: 28px; }
footer b { color: #fff; }
footer p { margin: 0 0 6px; }
footer a { color: #d9e3ec; }
footer .links { display: grid; gap: 6px; justify-items: end; align-content: start; }
@media (max-width: 720px) { footer .wrap { grid-template-columns: 1fr; } footer .links { justify-items: start; } }

/* ===================== 1.2.0: статус, витрина, ночь ===================== */
.status[data-state="online"] .name::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; background: var(--hp); vertical-align: 2px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--hp) 25%, transparent); }
.status .hpbar i { transition: width .8s ease; }
.status[data-state="offline"] .hpbar i { width: 0 !important; }

.items { display: flex; flex-direction: column; }
.item.featured { order: -1; margin-bottom: 6px; border: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--amber) 16%, var(--window-solid)), var(--window-solid) 70%);
  box-shadow: inset 4px 0 0 var(--amber); }
.item.featured + .item { border-top: 0; }
.item.featured h3 { font-size: 19px; }
.item.featured .ico { width: 60px; height: 60px; }

/* ночная тема: тот же Айнкрад, но под звёздами */
@media (prefers-color-scheme: dark) {
  :root {
    --sky-top: #0e1a33; --sky-mid: #1d2f52; --horizon: #3a3a5c;
    --window: rgba(27, 38, 52, .92); --window-solid: #1b2634; --window-bar: #222f3f;
    --rule: #33445a; --line-soft: #2a394b; --page: #131c27;
    --ink: #e7eef5; --ink-2: #b3c1cf; --ink-3: #7f90a2;
    --field: #142030; --row-hover: #2a2f2a; --chip: #24364b;
    --gold-chip: #3a3020; --gold-ink: #f0b85a; --lead: #c8d6e6;
    --cloud: rgba(170,185,215,.18);
    --orb-1: #3a4a5e; --orb-2: #223042; --orb-ink: #b3c1cf; --orb-rim: #4a5d74;
    --deny-chip: #3d2426; --system: #4ea3e6;
    --castle-top: #9fb2c4; --castle-top2: #6f8499; --castle-edge1: #263649; --castle-edge2: #4a6079;
    --castle-col1: #3c5068; --castle-col2: #566d86; --castle-rock: #1d2b3c; --halo: #9db6ff;
  }
  .hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image:
      radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%),
      radial-gradient(1px 1px at 28% 8%, #fff 50%, transparent 51%),
      radial-gradient(1.5px 1.5px at 42% 30%, #dfe8ff 50%, transparent 51%),
      radial-gradient(1px 1px at 63% 12%, #fff 50%, transparent 51%),
      radial-gradient(2px 2px at 78% 24%, #fff 50%, transparent 51%),
      radial-gradient(1px 1px at 88% 9%, #dfe8ff 50%, transparent 51%),
      radial-gradient(1px 1px at 55% 44%, #fff 50%, transparent 51%),
      radial-gradient(1.5px 1.5px at 6% 40%, #fff 50%, transparent 51%),
      radial-gradient(1px 1px at 34% 52%, #dfe8ff 50%, transparent 51%),
      radial-gradient(1px 1px at 95% 46%, #fff 50%, transparent 51%);
    opacity: .8; }
  .item.featured { background: linear-gradient(90deg, color-mix(in srgb, var(--amber) 18%, var(--window-solid)), var(--window-solid) 70%); }
  .item .tag { color: #f6cf8a; background: #4a3a1e; }
  footer { background: #0d141c; }
}

/* 1.2.4: подписи кнопок меню поверх окна, без рамки фокуса после клика мышью */
.ring { z-index: 6; }
.ring button:focus:not(:focus-visible) { outline: none; }
.ring button:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }
.ring button span { z-index: 7; }

/* ===================== 1.3.0: автодонат ===================== */
:root {
  --r-common: #8a97a4; --r-rare: #3a8fd1; --r-epic: #8b5cf6; --r-legendary: #e8a33a;
  --card: var(--window-solid);
}

/* --- полоса игрока, как HP-бар в левом верхнем углу SAO --- */
.playerbar-wrap { position: relative; z-index: 4; margin-top: -34px; }
.playerbar {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 14px;
  max-width: 560px; padding: 10px 16px 10px 10px;
  background: var(--window); backdrop-filter: blur(10px);
  border-radius: 999px 18px 18px 999px;
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 18px 40px -22px rgba(20,40,70,.6), 0 0 0 1px rgba(160,180,200,.35);
}
.playerbar .head { width: 52px; height: 52px; border-radius: 50%; image-rendering: pixelated; background: var(--chip);
  border: 3px solid var(--window-solid); box-shadow: 0 0 0 2px var(--amber); grid-row: span 2; object-fit: cover; }
.pb-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.pb-row { display: flex; gap: 8px; margin-top: 4px; }
.pb-row input { flex: 1; min-width: 0; font: 600 16px var(--text); color: var(--ink); background: var(--field);
  border: 1px solid var(--rule); border-radius: 999px; padding: 8px 14px; }
.pb-row input:focus { outline: 0; border-color: var(--system); box-shadow: 0 0 0 3px rgba(58,143,209,.2); }
.pb-player { display: none; }
.pb-top { display: flex; align-items: baseline; gap: 10px; }
.pb-top b { font: 20px var(--display); }
.pb-lv { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.pb-hp { height: 8px; border-radius: 4px; background: var(--line-soft); margin: 6px 0 2px; overflow: hidden; }
.pb-hp i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #8bd34f, var(--hp)); }
.pb-change { background: none; border: 0; padding: 0; font: 600 13px var(--text); color: var(--system); cursor: pointer; }
.pb-hint { grid-column: 3; grid-row: 1 / span 2; margin: 0; font-size: 13px; color: var(--ink-3); max-width: 15ch; line-height: 1.35; display: none; }
.playerbar[data-state="set"] .pb-form { display: none; }
.playerbar[data-state="set"] .pb-player, .playerbar[data-state="set"] .pb-hint { display: block; }
.playerbar[data-state="set"] { animation: hpfill .5s ease-out; }
@keyframes hpfill { from { box-shadow: 0 0 0 3px var(--amber); } }
@media (prefers-reduced-motion: reduce) { .playerbar[data-state="set"] { animation: none; } }
@media (max-width: 560px) {
  .playerbar-wrap { margin-top: -10px; }
  .playerbar { border-radius: 18px; grid-template-columns: auto 1fr; }
  .pb-hint { display: none !important; }
}

/* --- лента недавних покупок --- */
.recent { margin-top: 18px; overflow: hidden; }
.recent-track { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 6px;
  mask-image: linear-gradient(90deg, #000 85%, transparent); }
.recent-track::-webkit-scrollbar { display: none; }
.sale { flex: none; display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px;
  background: var(--window); box-shadow: 0 0 0 1px rgba(160,180,200,.3); font-size: 14px; white-space: nowrap; }
.sale img { width: 28px; height: 28px; border-radius: 50%; image-rendering: pixelated; background: var(--chip); }
.sale b { font-weight: 700; }
.sale span { color: var(--ink-2); }
.sale time { color: var(--ink-3); font-size: 12px; }

/* --- заголовок раздела --- */
.shop { padding-top: 26px; }
.shop .menu-layout { margin-top: 0; }
.shop-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; margin: 6px 0 14px; }
.shop-head h2 { margin: 0; font: 28px var(--display); }
.shop-head p { margin: 0; color: var(--ink-3); font-size: 14px; }

/* --- карточки-предметы инвентаря SAO --- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card {
  --rc: var(--r-common);
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border-radius: 14px; overflow: hidden;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--rc) 35%, var(--rule)), 0 18px 40px -28px rgba(20,40,70,.55);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 0 0 1.5px var(--rc), 0 24px 50px -26px color-mix(in srgb, var(--rc) 60%, transparent); }
@media (prefers-reduced-motion: reduce) { .card, .card:hover { transition: none; transform: none; } }
.card.r-rare { --rc: var(--r-rare); }
.card.r-epic { --rc: var(--r-epic); }
.card.r-legendary { --rc: var(--r-legendary); }
.card .art {
  position: relative; height: 128px; display: grid; place-items: center;
  background:
    radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--rc) 30%, transparent), transparent 62%),
    linear-gradient(180deg, color-mix(in srgb, var(--rc) 14%, var(--card)), var(--card));
  border-bottom: 1px solid var(--line-soft);
}
/* ромбовидная рамка предмета, как иконки инвентаря SAO */
.gem {
  width: 70px; height: 70px; display: grid; place-items: center; transform: rotate(45deg); border-radius: 14px;
  background: linear-gradient(135deg, var(--card), color-mix(in srgb, var(--rc) 18%, var(--card)));
  box-shadow: 0 0 0 2px var(--rc), 0 0 22px -2px color-mix(in srgb, var(--rc) 70%, transparent);
  color: var(--tint, var(--rc));
}
.gem svg { width: 34px; height: 34px; transform: rotate(-45deg); }
.badge { position: absolute; top: 10px; right: 10px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: var(--amber); color: var(--amber-ink); }
.card .body { padding: 14px 16px 6px; flex: 1; }
.rar { font-size: 12px; font-weight: 700; color: var(--rc); }
.card.r-common .rar { color: var(--ink-3); }
.card h3 { margin: 2px 0 4px; font-size: 17px; line-height: 1.25; }
.card p { margin: 0; color: var(--ink-2); font-size: 14px; }
.card .foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px 16px; }
.card .price { font: 24px var(--display); }

/* главная карточка — во всю ширину */
.card.featured { grid-column: 1 / -1; display: grid; grid-template-columns: 220px 1fr auto; align-items: center; }
.card.featured .art { height: 100%; min-height: 150px; border-bottom: 0; border-right: 1px solid var(--line-soft); }
.card.featured .gem { width: 88px; height: 88px; }
.card.featured .gem svg { width: 42px; height: 42px; }
.card.featured .body { padding: 18px 20px; }
.card.featured h3 { font: 26px var(--display); }
.card.featured .foot { flex-direction: column; align-items: flex-end; padding: 18px 22px; }
.card.featured .price { font-size: 30px; }
.card.featured .badge { left: 10px; right: auto; }
@media (max-width: 760px) {
  .card.featured { display: flex; }
  .card.featured .art { border-right: 0; border-bottom: 1px solid var(--line-soft); min-height: 128px; }
  .card.featured .foot { flex-direction: row; align-items: center; padding: 10px 16px 16px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card .art { height: 100px; }
  .gem { width: 54px; height: 54px; border-radius: 11px; }
  .gem svg { width: 26px; height: 26px; }
  .card .body { padding: 10px 12px 4px; }
  .card h3 { font-size: 15px; }
  .card p { font-size: 13px; }
  .card .foot { padding: 8px 12px 12px; flex-wrap: wrap; }
  .card .price { font-size: 20px; }
}
@media (max-width: 380px) { .cards { grid-template-columns: 1fr; } }

/* --- окно оплаты --- */
.nickfield { display: flex; align-items: center; gap: 10px; border: 1px solid var(--rule); border-radius: var(--r-row); background: var(--field); padding-left: 8px; }
.nickfield img { width: 28px; height: 28px; border-radius: 4px; image-rendering: pixelated; }
.nickfield input { border: 0 !important; flex: 1; min-width: 0; background: transparent !important; }
.nickfield:focus-within { border-color: var(--system); box-shadow: 0 0 0 3px rgba(58,143,209,.2); }
label.f .nickfield input:focus { box-shadow: none; }
.promo label { font-size: 14px; font-weight: 600; }
.promo-row { display: flex; gap: 8px; margin-top: 6px; }
.promo-row input { flex: 1; min-width: 0; font: 600 15px var(--text); letter-spacing: .04em; color: var(--ink); padding: 10px 12px;
  border: 1px solid var(--rule); border-radius: var(--r-row); background: var(--field); text-transform: uppercase; }
.promo-row input:focus { outline: 0; border-color: var(--system); }
.promo .hint.ok { color: var(--hp); font-weight: 600; }
.promo .hint.bad { color: var(--deny); }
.confirm-head s { color: var(--ink-3); }
@media (prefers-color-scheme: dark) {
  .card { --card: #1b2634; }
  .playerbar .head { border-color: #1b2634; }
}
/* сплошной переход неба: герой → игрок → лента → магазин */
.playerbar-wrap { background: linear-gradient(180deg, transparent 34px, var(--horizon) 34px); }
.recent { margin-top: 0; padding-top: 18px; background: var(--horizon); }
.card.featured { order: -1; }
@media (max-width: 560px) { .playerbar-wrap { background: linear-gradient(180deg, transparent 10px, var(--horizon) 10px); } }
.pb-form { min-width: 0; }

/* ===================== 1.3.0: аккаунт, вход, терминал, чек, админка ===================== */
.nav { align-items: center; }
.nav-me { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.18); }
.nav-me img { width: 22px; height: 22px; border-radius: 4px; image-rendering: pixelated; }
.nav-login { background: var(--amber); color: var(--amber-ink) !important; text-shadow: none !important; }
.nav-login:hover { background: var(--amber) !important; filter: brightness(1.05); }
.nav-admin { color: #ffd690 !important; }
.pb-ok { font-size: 13px; font-weight: 600; color: var(--hp); }
.playerbar a.pb-change { text-decoration: none; }

/* --- окно входа --- */
.lg-head { width: 64px; height: 64px; border-radius: 12px; image-rendering: pixelated; margin: 0 auto 10px; display: block; box-shadow: 0 0 0 3px var(--amber); }
.lg-body { padding: 18px 22px 22px; background: var(--window-solid); display: grid; gap: 12px; }
.lg-steps { margin: 0; padding-left: 20px; color: var(--ink-2); display: grid; gap: 4px; }
.lg-code {
  appearance: none; border: 0; cursor: pointer; width: 100%;
  font: 30px/1 var(--display); letter-spacing: .06em; color: var(--ink);
  padding: 16px; border-radius: 10px; background: var(--chip);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--system) 50%, transparent);
}
.lg-code span { color: var(--system); }
.lg-code:hover { box-shadow: inset 0 0 0 2px var(--system); }
.lg-wait { margin: 0; color: var(--ink-3); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.lg-wait.ok { color: var(--hp); font-weight: 600; }
.lg-wait.bad { color: var(--deny); }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--rule); border-top-color: var(--system); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.lg-body .choice { grid-template-columns: 1fr auto; }

/* --- анимация оплаты: карта к терминалу --- */
.payanim { padding: 22px 22px 26px; background: var(--window-solid); text-align: center; }
.stage { position: relative; height: 250px; }
.pos {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-30%);
  width: 150px; height: 230px; border-radius: 22px 22px 26px 26px;
  background: linear-gradient(180deg, #3a4656, #232c38); box-shadow: 0 18px 30px -16px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.15);
  padding: 14px 14px 0;
}
.pos-screen { height: 78px; border-radius: 10px; background: #0f1a24; color: #bfe3ff; display: grid; place-content: center; gap: 4px;
  font-size: 12px; box-shadow: inset 0 0 0 2px #0a1118; transition: background .3s, color .3s; }
.pos-screen b { font: 20px var(--display); color: #fff; }
.pos-nfc { height: 34px; display: flex; justify-content: center; align-items: center; gap: 4px; margin: 6px 0; }
.pos-nfc i { width: 10px; height: 18px; border: 2px solid #7f93a8; border-left: 0; border-radius: 0 12px 12px 0; opacity: .5; }
.pos-nfc i:nth-child(2) { height: 24px; } .pos-nfc i:nth-child(3) { height: 30px; }
.pos-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pos-keys i { height: 14px; border-radius: 4px; background: #4a5768; box-shadow: inset 0 -2px 0 rgba(0,0,0,.3); }
.pos-keys i:nth-child(10) { background: #c9534f; } .pos-keys i:nth-child(12) { background: #4caf50; }
.paycard {
  position: absolute; left: 50%; top: 0; width: 176px; height: 110px; border-radius: 12px; padding: 12px 14px;
  display: grid; grid-template-rows: auto 1fr auto auto; text-align: left; color: #fff;
  background: radial-gradient(circle at 85% 15%, rgba(255,255,255,.35), transparent 40%), linear-gradient(135deg, #2f6fd8, #6cc4ff 55%, #e8a33a);
  box-shadow: 0 16px 30px -12px rgba(20,40,80,.6);
  transform: translate(-150%, 30px) rotate(-14deg); opacity: 0;
}
.pc-logo { display: flex; align-items: center; gap: 6px; font: 13px var(--display); letter-spacing: .04em; }
.pc-chip { width: 30px; height: 22px; border-radius: 5px; margin-top: 8px; background: linear-gradient(135deg, #f6d38a, #c9963a); box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }
.pc-num { font-size: 13px; letter-spacing: .08em; opacity: .95; }
.pc-name { font-size: 11px; font-weight: 700; letter-spacing: .12em; opacity: .9; }
.payanim-note { margin: 16px 0 0; color: var(--ink-2); }
.payanim.run .paycard { animation: tap 1.5s cubic-bezier(.3,.7,.3,1) forwards; }
.payanim.run .pos-nfc i { animation: nfc .5s ease-out .75s 2 both; }
.payanim.done .pos-screen { background: #10301f; color: #b8f5c8; }
@keyframes tap {
  0%   { transform: translate(-150%, 30px) rotate(-14deg); opacity: 0; }
  25%  { opacity: 1; }
  55%  { transform: translate(-28%, 96px) rotate(-4deg); }
  65%  { transform: translate(-28%, 104px) rotate(-4deg); }
  80%  { transform: translate(-28%, 98px) rotate(-4deg); }
  100% { transform: translate(-28%, 100px) rotate(-4deg); opacity: 1; }
}
@keyframes nfc { 0% { opacity: .3; border-color: #7f93a8; } 50% { opacity: 1; border-color: #6cc4ff; } 100% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) {
  .payanim.run .paycard { animation: none; transform: translate(-28%, 100px) rotate(-4deg); opacity: 1; }
  .payanim.run .pos-nfc i { animation: none; }
}

/* --- печать чека --- */
.receipt-scene { display: grid; justify-items: center; padding: 36px 0 56px; }
.printer {
  width: min(380px, 100%); position: relative; z-index: 2;
  background: linear-gradient(180deg, #3a4656, #232c38); border-radius: 18px 18px 8px 8px; padding: 14px 18px 18px;
  box-shadow: 0 20px 40px -20px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.15);
}
.printer-top { display: flex; align-items: center; gap: 10px; color: #bfcad6; font-size: 13px; font-weight: 600; }
.printer-led { width: 10px; height: 10px; border-radius: 50%; background: var(--hp); box-shadow: 0 0 10px var(--hp); animation: blink 1s steps(2) 3; }
@keyframes blink { 50% { opacity: .3; } }
.printer-slot { height: 8px; margin-top: 14px; border-radius: 4px; background: #0b1016; box-shadow: inset 0 2px 3px rgba(0,0,0,.8); }
.receipt {
  width: min(330px, calc(100% - 50px)); margin-top: -12px; position: relative; z-index: 1;
  overflow: hidden; clip-path: inset(0 0 100% 0);
  animation: print 2.6s steps(26) .4s forwards;
  filter: drop-shadow(0 14px 20px rgba(20,40,70,.25));
}
@keyframes print { to { clip-path: inset(0 0 0 0); } }
.rc-in {
  background: #fdfcf8; color: #2a2a2a; padding: 26px 22px 18px; font-size: 14px;
  --zz: radial-gradient(circle at 8px 0, transparent 7px, #fdfcf8 7.5px);
  mask: linear-gradient(#000, #000) top / 100% calc(100% - 8px) no-repeat, radial-gradient(circle at 8px 100%, transparent 6px, #000 6.5px) bottom / 16px 9px repeat-x;
  font-variant-numeric: tabular-nums;
}
.rc-head { display: grid; justify-items: center; gap: 2px; padding-bottom: 12px; border-bottom: 1.5px dashed #c9c4b8; }
.rc-head b { font: 18px var(--display); letter-spacing: .04em; }
.rc-head span { font-size: 12px; color: #77736a; }
.rc-lines { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 12px 0; }
.rc-lines dt { color: #77736a; } .rc-lines dd { margin: 0; text-align: right; font-weight: 600; }
.rc-item, .rc-promo, .rc-total { display: flex; justify-content: space-between; gap: 10px; }
.rc-item { padding: 10px 0; border-top: 1.5px dashed #c9c4b8; font-weight: 600; }
.rc-promo { color: #77736a; padding-bottom: 8px; }
.rc-total { padding: 10px 0; border-top: 1.5px dashed #c9c4b8; border-bottom: 1.5px dashed #c9c4b8; font-size: 18px; }
.rc-total b { font: 22px var(--display); }
.rc-stamp {
  margin: 16px auto 8px; width: max-content; padding: 6px 14px; transform: rotate(-6deg);
  border: 2.5px solid #3a8fd1; color: #3a8fd1; border-radius: 6px; font: 16px var(--display); letter-spacing: .06em; text-transform: uppercase;
  opacity: 0; animation: stamp .35s cubic-bezier(.2,1.6,.4,1) 3.1s forwards;
}
.rc-stamp.ok { border-color: #2e9b62; color: #2e9b62; }
@keyframes stamp { from { opacity: 0; transform: rotate(-6deg) scale(1.8); } to { opacity: .9; transform: rotate(-6deg) scale(1); } }
.rc-note { margin: 8px 0 0; text-align: center; color: #4d4a44; font-size: 13px; }
.rc-fine { margin: 8px 0 0; text-align: center; color: #8c877c; font-size: 11px; }
.rc-barcode { height: 34px; margin: 14px auto 6px; width: 80%;
  background: repeating-linear-gradient(90deg, #2a2a2a 0 2px, transparent 2px 4px, #2a2a2a 4px 5px, transparent 5px 8px, #2a2a2a 8px 11px, transparent 11px 12px); }
.receipt-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 26px; opacity: 0; animation: fadein .4s ease 3.3s forwards; }
@keyframes fadein { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .receipt { animation: none; clip-path: none; }
  .rc-stamp, .receipt-actions { animation: none; opacity: 1; }
  .printer-led { animation: none; }
}

/* --- профиль --- */
.profile { margin: 32px 0 20px; }
.profile-card { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; padding: 22px; }
.profile-head { width: 96px; height: 96px; border-radius: 16px; image-rendering: pixelated; box-shadow: 0 0 0 3px var(--amber); background: var(--chip); }
.profile h1 { margin: 0; font: 32px var(--display); }
.profile .pb-hp { max-width: 320px; }
.profile-sub { margin: 6px 0 0; color: var(--ink-2); }
.history { margin-bottom: 56px; }
.hist { list-style: none; margin: 0; padding: 6px 10px; }
.hist li { display: grid; grid-template-columns: 1fr auto auto auto; gap: 14px; align-items: center; padding: 12px 8px; border-top: 1px solid var(--line-soft); }
.hist li:first-child { border-top: 0; }
.hist li div { display: grid; }
.hist li span { color: var(--ink-3); font-size: 13px; }
.hist .hist-sum { color: var(--ink); font-weight: 700; font-size: 15px; }
.hist-receipt { font-size: 14px; font-weight: 600; }
.st { display: inline-block; font-size: 12px !important; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--chip); color: var(--ink-2) !important; white-space: nowrap; }
.st-ok { background: color-mix(in srgb, var(--hp) 18%, transparent); color: var(--hp) !important; }
.st-wait { background: color-mix(in srgb, var(--system) 15%, transparent); color: var(--system) !important; }
.st-bad { background: var(--deny-chip); color: var(--deny) !important; }
@media (max-width: 640px) {
  .profile-card { grid-template-columns: auto 1fr; }
  .profile-out { grid-column: 1 / -1; }
  .profile-head { width: 72px; height: 72px; }
  .hist li { grid-template-columns: 1fr auto; }
}

/* --- админка --- */
.admin { padding: 30px 16px 60px; display: grid; gap: 18px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-head h1 { margin: 0; font: 30px var(--display); }
.toast { margin: 0; padding: 12px 16px; border-radius: 10px; background: color-mix(in srgb, var(--system) 14%, var(--window-solid)); font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi { padding: 16px 18px; display: grid; gap: 2px; }
.kpi span { color: var(--ink-3); font-size: 13px; font-weight: 600; }
.kpi b { font: 26px var(--display); }
.kpi small { color: var(--ink-3); }
@media (max-width: 760px) { .kpis { grid-template-columns: 1fr 1fr; } }
.admin-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 18px; }
@media (max-width: 860px) { .admin-grid { grid-template-columns: 1fr; } }
.admin-form { padding: 16px 20px 20px; display: grid; gap: 12px; }
.admin-form.row { grid-template-columns: 1.4fr .8fr 1fr auto; align-items: end; }
@media (max-width: 640px) { .admin-form.row { grid-template-columns: 1fr 1fr; } }
.admin-form select, .admin-form input:not([type=hidden]) { font: 500 15px var(--text); color: var(--ink); padding: 10px 12px; border-radius: var(--r-row); border: 1px solid var(--rule); background: var(--field); width: 100%; }
.promo-list { list-style: none; margin: 0; padding: 8px 20px 0; }
.promo-list li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.promo-list li span { color: var(--ink-2); flex: 1; font-size: 14px; }
.promo-list form { margin: 0; }
.no.small-x { width: 30px; height: 30px; font-size: 14px; }
.search { display: flex; gap: 8px; }
.search input { font: 500 14px var(--text); padding: 8px 12px; border-radius: 999px; border: 1px solid var(--rule); background: var(--field); color: var(--ink); width: 180px; }
.table-scroll { overflow-x: auto; }
table.orders { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 680px; }
.orders th, .orders td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.orders th { color: var(--ink-3); font-weight: 600; font-size: 13px; }
.orders small { color: var(--ink-3); }
.orders form { margin: 0; }
.admin-gate { text-align: center; max-width: 460px; margin: 48px auto; }
.gate-ico { width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; font-size: 34px;
  background: radial-gradient(circle at 35% 30%, #ffd690, var(--amber) 75%); color: #fff; }
.gate-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 12px; }
.gate-form input { font: 600 18px var(--text); letter-spacing: .1em; padding: 12px 14px; border-radius: 999px; border: 1px solid var(--rule); background: var(--field); color: var(--ink); text-align: center; }
.gate-form .yes::before { display: none; }
.lg-code[data-copied]::after { content: "скопировано"; display: block; margin-top: 6px; font: 600 12px var(--text); letter-spacing: 0; color: var(--hp); }
.btn.light { background: var(--chip); color: var(--ink); box-shadow: 0 2px 0 color-mix(in srgb, var(--ink) 12%, transparent); }
html, body { overflow-x: clip; }

/* ===================== 1.4.0: админка, баланс, пополнение ===================== */
.admin-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-head-actions form { margin: 0; }
.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-tabs a { font-weight: 600; font-size: 14px; padding: 6px 14px; border-radius: 999px; background: var(--chip); color: var(--ink-2); text-decoration: none; }
.admin-tabs a:hover { color: var(--ink); }
.admin-grid.inner { padding: 4px 0 8px; gap: 0; }
.admin .window { scroll-margin-top: 16px; }
.window-bar p { color: var(--ink-3); font-size: 14px; margin: 0; }

/* график выручки: один ряд, один цвет, подсказка при наведении */
.bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; align-items: end; height: 190px; margin: 0; padding: 22px 20px 8px;
  background-image: linear-gradient(var(--line-soft) 1px, transparent 1px); background-size: 100% 25%; background-position: 0 22px; }
.bar-col { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; outline: none; }
.bar { display: block; min-height: 2px; background: var(--amber); border-radius: 4px 4px 0 0; transition: filter .15s; }
.bar-x { font-size: 11px; color: var(--ink-3); text-align: center; margin-top: 6px; font-variant-numeric: tabular-nums; }
.bar-col:nth-child(even) .bar-x { visibility: hidden; }
.bar-tip { position: absolute; bottom: calc(100% - 10px); left: 50%; transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  background: var(--window-solid); color: var(--ink); font-size: 12px; padding: 4px 8px; border-radius: 6px; opacity: 0; transition: opacity .12s;
  box-shadow: 0 6px 18px -8px rgba(0,0,0,.5), 0 0 0 1px var(--rule); z-index: 2; }
.bar-col:hover .bar-tip, .bar-col:focus .bar-tip { opacity: 1; }
.bar-col:hover .bar, .bar-col:focus .bar { filter: brightness(1.12); }
.bars-table { padding: 0 20px 14px; }
.bars-table summary { cursor: pointer; color: var(--ink-3); font-size: 13px; }
table.orders.mini { min-width: 0; max-width: 420px; }
@media (max-width: 640px) { .bars { gap: 3px; padding: 22px 10px 8px; } .bar-x { font-size: 9px; } }

/* состояние */
.health { list-style: none; margin: 0; padding: 8px 20px 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 18px; }
.health li { display: grid; grid-template-columns: 12px 1fr; column-gap: 10px; padding: 8px 0; }
.health li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; grid-row: span 2; background: var(--ink-3); }
.health li.ok::before { background: var(--hp); }
.health li.bad::before { background: var(--deny); }
.health li.warn::before { background: var(--amber); }
.health b { font-size: 14px; }
.health span { color: var(--ink-2); font-size: 13px; }
.health-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 20px 16px; border-top: 1px solid var(--line-soft); margin: 0; color: var(--ink-2); font-size: 14px; }

/* редактор товаров */
.prod-list { padding: 4px 12px 12px; }
.prod { border-bottom: 1px solid var(--line-soft); }
.prod:last-child { border-bottom: 0; }
.prod summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; padding: 12px 8px; }
.prod summary::-webkit-details-marker { display: none; }
.prod summary span { color: var(--ink-2); font-size: 14px; white-space: nowrap; }
.prod.is-hidden summary b { color: var(--ink-3); text-decoration: line-through; }
.prod-form { grid-template-columns: 1.6fr .7fr 1fr; padding: 4px 8px 16px; }
.prod-form .wide { grid-column: 1 / -1; }
.prod-form .check { align-self: center; }
.prod-form code { font-size: 12px; }
@media (max-width: 640px) { .prod-form { grid-template-columns: 1fr 1fr; } }
.warn-row td { color: var(--deny); }

/* баланс в полосе игрока */
.pb-wallet { grid-column: 3; grid-row: 1 / span 2; display: grid; justify-items: end; gap: 2px; padding-left: 14px; border-left: 1px solid var(--line-soft); }
.pb-bal-label { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.pb-bal { font: 22px var(--display); line-height: 1; }
.pb-wallet .btn { margin-top: 4px; }
.playerbar:has(.pb-wallet) { max-width: 640px; }
@media (max-width: 560px) {
  .pb-wallet { grid-column: 1 / -1; grid-row: auto; grid-template-columns: auto 1fr auto; align-items: center; justify-items: start;
    border-left: 0; border-top: 1px solid var(--line-soft); padding: 8px 0 0; margin-top: 4px; column-gap: 10px; }
}

/* способ оплаты */
.paymethod { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.paymethod legend { font-size: 14px; font-weight: 600; margin-bottom: 6px; padding: 0; }
.pm { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--rule); background: var(--field); cursor: pointer; }
.pm:has(input:checked) { border-color: var(--system); box-shadow: 0 0 0 2px color-mix(in srgb, var(--system) 25%, transparent); }
.pm:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.pm input { width: 18px; height: 18px; accent-color: var(--system); margin: 0; }
.pm b { display: block; font-size: 15px; }
.pm small { color: var(--ink-3); font-size: 13px; }

/* пополнение */
.tp-ico { font: 30px var(--display) !important; color: var(--amber) !important; }
.tp-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tp-chip { appearance: none; cursor: pointer; font: 600 15px var(--text); color: var(--ink); padding: 10px 6px; border-radius: 10px;
  border: 1px solid var(--rule); background: var(--field); font-variant-numeric: tabular-nums; }
.tp-chip[aria-pressed="true"] { border-color: var(--amber); background: color-mix(in srgb, var(--amber) 16%, var(--field)); }
.tp-tiers { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tp-tiers li { font-size: 13px; color: var(--ink-3); padding: 3px 10px; border-radius: 999px; background: var(--chip); }
.tp-tiers li.on { color: var(--amber-ink); background: var(--amber); }
.tp-tiers li.on b { color: inherit; }
.tp-sum { margin: 0; font-size: 15px; }
.tp-sum b { font: 20px var(--display); }
.tp-sum span { color: var(--hp); font-weight: 600; font-size: 14px; }

/* профиль: кошелёк */
.profile-card { grid-template-columns: auto 1fr auto auto; }
.profile-wallet { display: grid; justify-items: end; gap: 2px; padding: 0 8px; }
.profile-wallet span { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.profile-wallet b { font: 28px var(--display); }
.hist-sum.plus { color: var(--hp) !important; }
@media (max-width: 640px) { .profile-card { grid-template-columns: auto 1fr; } .profile-wallet { grid-column: 1 / -1; justify-items: start; grid-template-columns: auto auto 1fr; align-items: center; column-gap: 12px; padding: 0; } }
.brand { white-space: nowrap; }
@media (max-width: 560px) {
  .nav-shop { display: none; }
  .nav-me .me-name { display: none; }
  .nav a { padding: 8px 10px; }
}
