@charset "UTF-8";
:root {
  --ink: #0f1a3d;
  --muted: #586894;
  --paper: #eef1ff;
  --card: #ffffff;
  --line: #dbe2ff;
  --blue: #3a5bff;
  --blue-hover: #5573ff;
  --green: #0a8f5a;
  --coral: #e0364a;
  --grad: linear-gradient(135deg, #2c47d6 0%, #4b6bff 52%, #7b6dff 100%);
  --shadow: 0 14px 38px rgba(44,71,214,0.14);
  --head-bg: #16224d;
  --node-bg: #3a5bff;
  --foot-bg: #0c1433;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Oswald", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.55;
}

main { width: min(720px, 100% - 32px); margin-inline: auto; }
main.wide { width: min(1100px, 100% - 32px); }
main.full { width: auto; max-width: none; margin: 0; }
.wrap { width: min(1120px, 100%); margin-inline: auto; padding-inline: 24px; position: relative; }

.top { width: min(720px, 100% - 32px); margin: 14px auto 0; padding: 10px 14px 10px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--grad); border-radius: 22px; box-shadow: 0 14px 34px rgba(44,71,214,0.28); }
.top .brand, .top .word, .top .top-nav a { color: #ffffff; }
.top .theme-btn { border-color: rgba(255,255,255,0.4); color: #ffffff; margin-left: 14px; }
.nav a, .top-nav a { white-space: nowrap; }
.top-nav a { text-decoration: none; font-weight: 700; font-size: 15px; margin-left: 20px; }
.top-nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.foot { width: min(720px, 100% - 32px); margin-inline: auto; padding: 34px 0 40px; color: var(--muted); font-size: 14px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand svg { display: block; flex: none; }
.word { font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1; letter-spacing: .02em; text-transform: uppercase; }

h1 { font-size: clamp(28px, 5vw, 38px); line-height: 1.12; letter-spacing: -0.02em; font-weight: 800; margin: 18px 0 12px; }
h2, .h2 { font-size: 26px; letter-spacing: -0.01em; font-weight: 800; margin: 0 0 14px; line-height: 1.2; }
p { margin: 0 0 12px; max-width: 62ch; }
a { color: var(--blue); }
.muted, .hint { color: var(--muted); }
.hint { font-size: 14px; margin-top: 8px; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* ── плавающая шапка (главная) ─────────────────────── */
.pillbar { position: sticky; top: 12px; z-index: 40; width: min(1120px, 100% - 32px); margin: 14px auto 0; padding: 10px 14px 10px 18px; display: flex; align-items: center; gap: 14px; background: var(--grad); border-radius: 22px; box-shadow: 0 14px 34px rgba(44,71,214,0.32); }
.pillbar .brand, .pillbar .word { color: #ffffff; }
.pnav { display: flex; gap: 4px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; }
.pnav::-webkit-scrollbar { display: none; }
.pnav a { padding: 9px 15px; border-radius: 12px; color: rgba(255,255,255,0.9); font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; transition: background .15s ease; }
.pnav a:hover, .pnav a.on { background: rgba(255,255,255,0.2); color: #ffffff; }
.pbar-r { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.pbtn { padding: 10px 20px; border-radius: 12px; background: #ffffff; color: #2c47d6; font-weight: 800; font-size: 15px; text-decoration: none; white-space: nowrap; }
.pbtn:hover { background: #eef1ff; color: #2c47d6; }
.pillbar .theme-btn { margin: 0; border-color: rgba(255,255,255,0.4); color: #ffffff; }
.pillbar .theme-btn:hover { background: rgba(255,255,255,0.2); }

/* ── главный баннер ─────────────────────── */
.hx { position: relative; overflow: hidden; width: min(1120px, 100% - 32px); margin: 18px auto 0; border-radius: 34px; background: var(--grad); color: #ffffff; box-shadow: 0 30px 70px rgba(44,71,214,0.3); }
.hx::before { content: ""; position: absolute; right: -120px; top: -140px; width: 460px; height: 460px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.24), rgba(255,255,255,0) 70%); }
.hx::after { content: ""; position: absolute; left: -70px; bottom: -90px; width: 300px; height: 300px; border-radius: 64px; transform: rotate(18deg); background: rgba(255,255,255,0.07); }
.hx-in { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; padding: 54px 56px; }
.hx-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.3); font-weight: 700; font-size: 14px; }
.hx h1 { margin: 18px 0 14px; font-size: clamp(34px, 4.6vw, 56px); line-height: 1.06; font-weight: 800; letter-spacing: -0.03em; color: #ffffff; }
.hx-lead { margin: 0 0 22px; font-size: 18px; color: rgba(255,255,255,0.9); max-width: 46ch; }
.hx-badges { list-style: none; margin: 0 0 30px; padding: 0; display: grid; gap: 10px; }
.hx-badges li { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.tick { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,0.22); color: #ffffff; }
.hx-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hbtn { display: inline-flex; align-items: center; justify-content: center; padding: 16px 28px; border-radius: 16px; background: #ffffff; color: #2c47d6; font-weight: 800; font-size: 17px; text-decoration: none; box-shadow: 0 12px 28px rgba(8,20,90,0.35); transition: transform .15s ease, box-shadow .15s ease; }
.hbtn:hover { transform: translateY(-2px); color: #2c47d6; box-shadow: 0 16px 34px rgba(8,20,90,0.45); }
.hbtn.ghost { background: rgba(255,255,255,0.14); color: #ffffff; border: 2px solid rgba(255,255,255,0.42); box-shadow: none; }
.hbtn.ghost:hover { background: rgba(255,255,255,0.24); color: #ffffff; }
.hx-art { position: relative; }
.hx-card { border-radius: 28px; overflow: hidden; border: 4px solid rgba(255,255,255,0.38); box-shadow: 0 30px 60px rgba(6,14,70,0.45); background: #c9d3db; transform: rotate(1.2deg); }
.hx-card img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; object-position: 82% 14%; }
.hx-float { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 16px; background: rgba(255,255,255,0.94); color: #0f1a3d; font-weight: 800; font-size: 14px; box-shadow: 0 14px 30px rgba(6,14,70,0.35); animation: floaty 5s ease-in-out infinite; }
.hx-float svg { color: #3a5bff; }
.hx-float.f1 { left: -22px; bottom: 34px; }
.hx-float.f2 { right: -16px; top: 26px; animation-delay: 1.8s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* ── кнопки ─────────────────────── */
.btn, .cta {
  display: inline-block; font-family: var(--font); font-weight: 800; font-size: 18px; line-height: 1.2;
  color: #ffffff; background: var(--grad); border: 0; border-radius: 16px; padding: 16px 30px; min-height: 54px;
  cursor: pointer; text-decoration: none; box-shadow: 0 10px 24px rgba(58,91,255,0.35);
  transition: transform .12s ease, box-shadow .2s ease, filter .15s ease;
}
.btn:hover, .cta:hover:not(:disabled) { filter: brightness(1.08); color: #ffffff; box-shadow: 0 14px 30px rgba(58,91,255,0.45); }
.btn:active:not(:disabled), .cta:active:not(:disabled) { transform: translateY(2px); }
.btn:disabled, .cta:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); box-shadow: none; }
.btn.ghost:hover { background: var(--card); color: var(--ink); filter: none; box-shadow: none; }
.btn.small { padding: 8px 14px; font-size: 15px; min-height: 0; border-radius: 11px; box-shadow: none; }

/* ── выбор пака ─────────────────────── */
.picker { padding-top: 84px; scroll-margin-top: 90px; }
.bricks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; margin-top: 26px; }
.brick {
  position: relative; display: flex; flex-direction: column; padding: 0; text-align: left; border: 0; border-radius: 24px;
  background: var(--card); color: var(--ink); font-family: var(--font); cursor: pointer; overflow: hidden; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.brick:hover { transform: translateY(-6px); box-shadow: 0 24px 48px rgba(44,71,214,0.24); }
.brick[aria-pressed="true"] { outline: 3px solid var(--blue); outline-offset: 3px; box-shadow: 0 24px 48px rgba(58,91,255,0.36); }
.thumb { position: relative; display: block; height: 150px; background: linear-gradient(135deg, #e3eaff, #c9d6ff); }
.brick:nth-child(5n+2) .thumb { background: linear-gradient(135deg, #ffe6ee, #ffc9da); }
.brick:nth-child(5n+3) .thumb { background: linear-gradient(135deg, #dcf8ec, #b6efd6); }
.brick:nth-child(5n+4) .thumb { background: linear-gradient(135deg, #ece3ff, #d3c3fb); }
.brick:nth-child(5n+5) .thumb { background: linear-gradient(135deg, #fff3d6, #ffe19c); }
.brick[aria-pressed="true"] .thumb::after { content: "✓"; position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: #ffffff; display: grid; place-items: center; font-weight: 800; font-size: 16px; box-shadow: 0 6px 14px rgba(58,91,255,0.5); }
.pile { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding-left: 30px; }
.pile .coin { position: relative; display: block; flex: none; width: 56px; height: 56px; margin-left: -30px; filter: drop-shadow(0 6px 6px rgba(15,26,61,0.3)); }
.pile .coin:nth-child(2) { top: -9px; }
.pile .coin:nth-child(3) { top: -18px; }
.pile .coin:nth-child(4) { top: -27px; }
.pile .coin:nth-child(5) { top: -36px; }
.meta { display: block; padding: 14px 18px 18px; }
.name { display: block; font-weight: 800; font-size: 19px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.price { display: block; margin-top: 6px; font-weight: 800; font-size: 21px; color: var(--blue); }

.buy-panel { display: grid; grid-template-columns: 1fr 1.25fr; gap: 24px; align-items: center; margin-top: 26px; padding: 26px 30px; background: var(--card); border-radius: 28px; box-shadow: var(--shadow); }
.custom label { display: block; font-weight: 800; margin-bottom: 10px; }
.custom input { max-width: 340px; }

input[type="number"], input[type="text"], input[type="password"], input[type="email"], input[type="tel"], input[inputmode], select {
  width: 100%; font-family: var(--font); font-size: 18px; font-weight: 700; color: var(--ink);
  background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 13px 16px;
}
input:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(58,91,255,0.2); }
input::placeholder { color: #8c99bd; font-weight: 500; }
select { width: auto; font-size: 16px; padding: 8px 12px; }

.summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 18px 22px; background: var(--paper); border-radius: 20px; }
.summary-label { display: block; color: var(--muted); font-size: 14px; font-weight: 600; }
.summary strong { font-size: 40px; line-height: 1.05; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

.form-err { color: var(--coral); min-height: 1.5em; margin-top: 12px; font-weight: 700; }

/* ── «как это работает», гарантии, о нас ─────────────────────── */
.how { padding: 100px 0 20px; scroll-margin-top: 90px; }
.guar { padding: 90px 0 20px; scroll-margin-top: 90px; }
.about { padding: 90px 0 40px; scroll-margin-top: 90px; }
.about p { max-width: 70ch; }
.section-lead { color: var(--muted); max-width: 70ch; margin: 0; }
.how-steps { display: flex; flex-wrap: wrap; gap: 36px 0; margin-top: 36px; }
.how-step { position: relative; flex: 1 1 260px; padding-right: 30px; }
.how-step:not(:last-child)::after { content: ""; position: absolute; top: 28px; left: 84px; right: 20px; border-top: 3px dotted #b9c6f2; }
.how-node { width: 58px; height: 58px; border-radius: 18px; background: var(--grad); color: #ffffff; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 28px; box-shadow: 0 12px 24px rgba(58,91,255,0.35); }
.how-step h3 { margin: 20px 0 6px; font-size: 19px; font-weight: 800; }
.how-step p { margin: 0; color: var(--muted); max-width: 300px; font-size: 16px; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
.fact { background: var(--card); border-radius: 24px; padding: 26px 28px 28px; box-shadow: var(--shadow); }
.fact .ico { display: inline-grid; place-items: center; width: 48px; height: 48px; margin-bottom: 14px; border-radius: 15px; background: linear-gradient(135deg, #e6ebff, #d3dcff); color: var(--blue); }
.fact h3 { margin: 0 0 8px; font-size: 19px; font-weight: 800; }
.fact p { margin: 0; color: var(--muted); font-size: 16px; max-width: none; }

.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin: 60px 0 100px; padding: 38px 44px; border-radius: 30px; background: var(--grad); color: #ffffff; box-shadow: 0 24px 56px rgba(44,71,214,0.3); }
.cta-band h2 { margin: 0 0 6px; color: #ffffff; font-size: 28px; }
.cta-band p { margin: 0; color: rgba(255,255,255,0.9); }

.site-foot { background: var(--foot-bg); color: #b3bdd8; padding: 36px 0 44px; font-size: 14px; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.foot-brand { font-family: var(--display); font-weight: 700; color: #ffffff; font-size: 22px; letter-spacing: .02em; text-transform: uppercase; }

/* ── страница заказа ─────────────────────── */
.order { margin-top: 24px; background: var(--card); border-radius: 28px; padding: 28px; box-shadow: var(--shadow); }
.order.wide { overflow: hidden; }
.order h1 { margin-top: 4px; }

.steps { list-style: none; counter-reset: s; display: flex; gap: 8px; padding: 0; margin: 0 0 22px; flex-wrap: wrap; }
.steps li { counter-increment: s; display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 700; font-size: 15px; }
.steps li::before {
  content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px;
  background: var(--paper); border: 2px solid var(--line); font-size: 13px;
}
.steps li:not(:last-child)::after { content: ""; width: 22px; height: 2px; background: var(--line); margin-left: 4px; }
.steps li.now { color: var(--ink); }
.steps li.now::before { background: var(--blue); border-color: var(--blue); color: #ffffff; }
.steps li.done::before { background: var(--green); border-color: var(--green); color: #ffffff; content: "✓"; }

.field { margin: 0 0 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--muted); margin: -4px 0 18px; }
.check input { width: auto; }

.notice { border-left: 5px solid var(--blue); background: var(--paper); padding: 12px 16px; border-radius: 8px; margin: 0 0 18px; }
.notice.bad { border-color: var(--coral); }
.notice.good { border-color: var(--green); }

.spinner { width: 34px; height: 34px; border-radius: 10px; background: var(--blue); animation: flip 1.1s ease-in-out infinite; margin: 6px 0 16px; }
@keyframes flip { 0% { transform: rotate(0); } 50% { transform: rotate(180deg) scale(0.8); } 100% { transform: rotate(360deg); } }

.games { display: grid; gap: 8px; margin: 0 0 16px; padding: 0; border: 0; }
.games label { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px; cursor: pointer; }
.games input { width: 20px; height: 20px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── админка ─────────────────────── */
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.admin-head h1 { margin: 8px 0; }
.who { font-weight: 700; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 20px; border-bottom: 2px solid var(--line); }
.tab { font: inherit; font-weight: 700; color: var(--muted); background: none; border: 0; cursor: pointer; padding: 10px 14px; margin-bottom: -2px; border-bottom: 3px solid transparent; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--blue); }
.filter { margin-bottom: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--paper); border-radius: 12px; padding: 12px 16px; }
.stat-label { display: block; color: var(--muted); font-size: 14px; }
.stat strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.stat.alert { background: var(--coral); }
.stat.alert .stat-label, .stat.alert strong { color: #ffffff; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--paper); border: 2px solid var(--line); white-space: nowrap; }
.badge.good { border-color: var(--green); color: var(--green); }
.badge.bad { border-color: var(--coral); color: var(--coral); }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td.msg { white-space: normal; min-width: 200px; max-width: 320px; color: var(--muted); }
td input[type="text"] { width: 130px; padding: 8px 10px; font-size: 15px; }
tr.newrow td { padding-top: 14px; }
td.row { display: flex; gap: 8px; }
.info { margin-top: 26px; padding-top: 18px; border-top: 2px solid var(--line); color: var(--muted); }
code { background: var(--paper); padding: 2px 6px; border-radius: 6px; font-size: 0.92em; word-break: break-all; }

td.neg { color: var(--coral); font-weight: 700; }
.stat-sub { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.fin-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; font-size: 14px; }
.fin-h { margin: 28px 0 10px; font-size: 20px; }
.fin-form { max-width: 420px; margin-top: 14px; }

/* ── адаптив ─────────────────────── */
@media (max-width: 900px) {
  .hx-in { grid-template-columns: 1fr; gap: 28px; padding: 36px 28px 40px; }
  .hx-art { max-width: 460px; margin: 0 auto; width: 100%; }
  .bricks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .buy-panel { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .pillbar { flex-wrap: wrap; row-gap: 6px; padding: 10px 12px; top: 8px; }
  .pillbar .brand { margin-right: auto; }
  .pillbar .brand svg { width: 32px; height: 32px; }
  .pillbar .word { font-size: 21px; }
  .pillbar { gap: 8px; }
  .pillbar .theme-btn { width: 34px; height: 34px; }
  .pbtn { padding: 8px 12px; font-size: 14px; }
  .chat-fab .lbl-long { display: none; }
  .chat-fab .lbl-short { display: inline; }
  .pbar-r { order: 2; }
  .pnav { order: 3; width: 100%; margin: 0; padding-bottom: 2px; }
  .pnav a { padding: 8px 12px; font-size: 14px; }
  .pbtn { padding: 8px 14px; }
  .hx { border-radius: 26px; }
  .hx-in { padding: 28px 20px 32px; }
  .hx-float { font-size: 12px; padding: 8px 12px; }
  .hx-float.f1 { left: 8px; bottom: 14px; }
  .hx-float.f2 { right: 8px; top: 12px; }
  .bricks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .brick:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .thumb { height: 128px; }
  .pile .coin { width: 48px; height: 48px; margin-left: -26px; }
  .pile { padding-left: 26px; }
  .summary strong { font-size: 32px; }
  .buy-panel { padding: 20px 18px; }
  .picker { padding-top: 56px; }
  .how { padding: 70px 0 20px; }
  .guar { padding: 60px 0 20px; }
  .about { padding: 60px 0 30px; }
  .facts { grid-template-columns: 1fr; gap: 14px; margin-top: 28px; }
  .cta-band { padding: 28px 22px; margin: 40px 0 60px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* ── личный кабинет ─────────────────────── */
.acc { max-width: 920px; margin-inline: auto; }
.claim { display: flex; gap: 10px; flex-wrap: wrap; max-width: 560px; }
.claim input { flex: 1 1 260px; width: auto; }
.acc-pass { margin-top: 28px; border-top: 2px solid var(--line); padding-top: 16px; }
.acc-pass summary { cursor: pointer; font-weight: 700; margin-bottom: 14px; }
.acc-pass form { max-width: 380px; }

/* ── онлайн-чат для посетителей ─────────────────────── */
.chat-fab { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; align-items: center; gap: 10px; padding: 14px 20px; border: 0; border-radius: 999px; background: var(--grad); color: #ffffff; font-family: var(--font); font-weight: 800; font-size: 16px; cursor: pointer; box-shadow: 0 8px 24px rgba(51,95,255,0.35); transition: background .15s ease, transform .12s ease; }
.chat-fab:hover { background: var(--blue-hover); }
.chat-fab[hidden], .chat-n[hidden] { display: none; }
@media (min-width: 761px) { .chat-fab .lbl-short { display: none; } }
.chat-n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--coral); color: #ffffff; font-size: 13px; line-height: 22px; text-align: center; }
.chat-panel { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: min(370px, calc(100vw - 24px)); height: min(540px, calc(100vh - 40px)); display: none; flex-direction: column; background: var(--card); border: 2px solid var(--line); border-radius: 18px; box-shadow: 0 18px 50px rgba(16,28,38,0.28); overflow: hidden; }
.chat-panel.open { display: flex; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; background: var(--head-bg); color: #ffffff; }
.chat-head strong { display: block; font-size: 17px; }
.chat-status { display: flex; align-items: center; gap: 7px; margin-top: 2px; font-size: 13px; color: #b3bdc6; }
.chat-status::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #8a96a1; }
.chat-status.on::before { background: #35d17c; }
.chat-x { border: 0; background: none; color: #ffffff; font-size: 28px; line-height: 1; cursor: pointer; padding: 0 4px; }
.chat-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--paper); }
.msg { max-width: 84%; padding: 9px 13px; border-radius: 14px; font-size: 15px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg time { display: block; margin-top: 3px; font-size: 11px; opacity: .7; }
.msg.visitor { align-self: flex-end; background: var(--blue); color: #ffffff; border-bottom-right-radius: 4px; }
.msg.admin { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.sys { align-self: center; max-width: 94%; background: none; color: var(--muted); font-size: 13px; text-align: center; padding: 4px 6px; }
.chat-err { margin: 0; padding: 0 14px; min-height: 0; color: var(--coral); font-weight: 700; font-size: 13px; }
.chat-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: var(--card); }
.chat-form textarea { flex: 1; resize: none; height: 44px; max-height: 110px; font-family: var(--font); font-size: 15px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; color: var(--ink); }
.chat-form textarea:focus { outline: none; border-color: var(--blue); }

/* ── чат и клиенты в админке ─────────────────────── */
.chat-admin { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.thread-list { border: 2px solid var(--line); border-radius: 14px; background: var(--card); max-height: 560px; overflow-y: auto; }
.thread { display: block; width: 100%; text-align: left; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; cursor: pointer; color: var(--ink); }
.thread:last-child { border-bottom: 0; }
.thread.sel { background: var(--paper); }
.thread .tt { display: flex; justify-content: space-between; gap: 8px; font-weight: 800; }
.thread .pv { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread .meta2 { color: var(--muted); font-size: 12px; margin-top: 2px; }
.unread-n { background: var(--coral); color: #ffffff; border-radius: 999px; padding: 0 8px; font-size: 12px; line-height: 20px; }
.conv { display: flex; flex-direction: column; border: 2px solid var(--line); border-radius: 14px; background: var(--card); min-height: 420px; }
.conv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.conv-head .sub2 { color: var(--muted); font-size: 14px; }
.conv-body { flex: 1; overflow-y: auto; max-height: 420px; min-height: 260px; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--paper); }
.conv .msg.visitor { align-self: flex-start; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; border-bottom-right-radius: 14px; }
.conv .msg.admin { align-self: flex-end; background: var(--blue); color: #ffffff; border: 0; border-bottom-right-radius: 4px; border-bottom-left-radius: 14px; }
.conv-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.conv-form textarea { flex: 1; resize: vertical; min-height: 44px; max-height: 140px; font-family: var(--font); font-size: 15px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; }
.pad { padding: 14px; }
.temp-pass { font-family: ui-monospace, Consolas, monospace; font-size: 18px; user-select: all; background: var(--card); padding: 2px 8px; border-radius: 6px; }

@media (max-width: 760px) {
  .chat-admin { grid-template-columns: 1fr; }
  .chat-panel { right: 0; bottom: 0; width: 100vw; height: 82vh; border-radius: 18px 18px 0 0; }
  .chat-fab { right: 12px; bottom: 12px; padding: 12px 16px; font-size: 15px; }
  .top-nav a { margin-left: 14px; }
}

/* выравнивание шапки и подвала по ширине содержимого */
body[data-page="admin"] .top, body[data-page="admin"] .foot { width: min(1100px, 100% - 32px); }
body[data-page="account"] .top, body[data-page="account"] .foot { width: min(920px, 100% - 32px); }
.conv .form-err { min-height: 0; margin: 0; padding: 0 14px; }

.resume { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 0 0 26px; padding: 14px 18px; background: var(--card); border: 2px solid var(--blue); border-radius: 14px; font-weight: 700; }

/* ── отзывы ─────────────────────── */
.reviews { padding: 90px 0 30px; scroll-margin-top: 20px; }
.stars { position: relative; display: inline-block; font-size: 20px; line-height: 1; letter-spacing: 3px; color: #c3ccd4; white-space: nowrap; }
.stars::before { content: "★★★★★"; }
.stars::after { content: ""; position: absolute; left: 0; top: 0; color: #f5a800; overflow: hidden; white-space: nowrap; }
.stars.s1::after { content: "★"; }
.stars.s2::after { content: "★★"; }
.stars.s3::after { content: "★★★"; }
.stars.s4::after { content: "★★★★"; }
.stars.s5::after { content: "★★★★★"; }
.rev-sum { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.rev-avg { font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1; }
.rev-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 26px; }
.rev { background: var(--card); border-radius: 24px; padding: 22px 26px; box-shadow: var(--shadow); }
.rev-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rev-date { color: var(--muted); font-size: 14px; }
.rev-text { margin: 12px 0 14px; overflow-wrap: anywhere; white-space: pre-wrap; max-width: none; }
.rev-name { font-weight: 700; font-size: 15px; }
.rev-ok { display: inline-block; margin-left: 6px; color: var(--green); font-weight: 600; font-size: 13px; }
.rev-reply { margin-top: 12px; padding: 10px 14px; background: var(--paper); border-radius: 10px; font-size: 15px; overflow-wrap: anywhere; }
.review-form { margin-top: 26px; padding-top: 20px; border-top: 2px solid var(--line); max-width: 560px; }
.star-row { display: flex; gap: 6px; margin: 0 0 16px; }
.star-btn { font-size: 34px; line-height: 1; padding: 2px 4px; border: 0; background: none; color: #c3ccd4; cursor: pointer; }
.star-btn.on { color: #f5a800; }
.review-form textarea { width: 100%; font-family: var(--font); font-size: 16px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; color: var(--ink); resize: vertical; }
.review-form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(51,95,255,0.25); }
.rev-admin { background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; }
.rev-admin.hidden { opacity: .65; }
.rev-admin .rev-top { justify-content: flex-start; gap: 14px; }
.rev-admin textarea { width: 100%; font-family: var(--font); font-size: 15px; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px; margin-bottom: 10px; }
@media (max-width: 760px) {
  .rev-grid { grid-template-columns: 1fr; }
  .reviews { padding: 60px 0 20px; }
}

/* ── лента выдач и счётчики ─────────────────────── */
.feed { padding: 80px 0 0; scroll-margin-top: 20px; }
.pstats { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; }
.pstats > div { flex: 1 1 180px; background: var(--card); border-radius: 20px; padding: 16px 20px; box-shadow: var(--shadow); }
.pstats strong { display: block; font-family: var(--display); font-size: 32px; line-height: 1.1; }
.pstats span { color: var(--muted); font-size: 14px; }
.feed-row { display: flex; gap: 12px; overflow-x: auto; padding: 18px 2px 8px; scrollbar-width: thin; }
.feed-card { flex: none; width: 150px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 10px; background: var(--card); border-radius: 20px; text-align: center; box-shadow: var(--shadow); }
.feed-card strong { margin-top: 6px; font-size: 16px; }
.feed-who { color: var(--muted); font-size: 14px; }
.feed-when { color: var(--muted); font-size: 12px; }

.foot-text p { margin: 0 0 4px; max-width: 62ch; }
.foot-text p:last-child { margin: 0; }

/* ── переключатель темы ─────────────────────── */
.theme-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; margin-left: 18px; padding: 0; border: 2px solid rgba(120,135,150,0.45); border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; vertical-align: middle; transition: background .15s ease; }
.theme-btn:hover { background: rgba(120,135,150,0.18); }

/* ── тёмная тема (только публичные страницы) ── */
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e8edff; --muted: #9aaad6; --paper: #0a0f22; --card: #121a36; --line: #25305a;
  --green: #3be0a3; --blue: #7c93ff; --blue-hover: #9aaeff; --coral: #ff7a85;
  --head-bg: #1a2550; --foot-bg: #060a18; --shadow: 0 14px 38px rgba(0,0,0,0.45);
}
html[data-theme="dark"] .thumb { background: linear-gradient(135deg, #1d2d63, #2a3f86); }
html[data-theme="dark"] .brick:nth-child(5n+2) .thumb { background: linear-gradient(135deg, #4a2147, #6b2f63); }
html[data-theme="dark"] .brick:nth-child(5n+3) .thumb { background: linear-gradient(135deg, #14463a, #1c6552); }
html[data-theme="dark"] .brick:nth-child(5n+4) .thumb { background: linear-gradient(135deg, #34286b, #4a3a96); }
html[data-theme="dark"] .brick:nth-child(5n+5) .thumb { background: linear-gradient(135deg, #5a4313, #80601a); }
html[data-theme="dark"] .brick:hover { box-shadow: 0 24px 48px rgba(0,0,0,0.6); }
html[data-theme="dark"] .summary { background: #0d1530; }
html[data-theme="dark"] .fact .ico { background: linear-gradient(135deg, #1d2b60, #2a3b7e); color: #9db0ff; }
html[data-theme="dark"] .how-step:not(:last-child)::after { border-top-color: #2e3d70; }
html[data-theme="dark"] .stars::before { color: #34466a; }
html[data-theme="dark"] .rev-reply, html[data-theme="dark"] .notice { background: #0d1530; }
html[data-theme="dark"] .msg.admin { background: var(--card); color: var(--ink); }
html[data-theme="dark"] .chat-form textarea, html[data-theme="dark"] .review-form textarea { background: var(--card); color: var(--ink); }
html[data-theme="dark"] .btn.ghost { color: var(--ink); }
html[data-theme="dark"] .steps li::before { background: #0d1530; }
html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder { color: #6f82a6; }
html[data-theme="dark"] .price { color: #9db0ff; }
