:root {
  --bg: #fbfbfd;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --line-soft: #e8e8ed;
  --card: #ffffff;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --ok: #0a7d33;
  --warn: #8a5a00;
  --bad: #b42318;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 28px rgba(0,0,0,.05);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; }
::selection { background: rgba(0,113,227,.15); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251,251,253,.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.nav-inner {
  max-width: 1024px; margin: 0 auto; padding: 0 22px;
  height: 52px; display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 24px; height: 24px; border-radius: 7px; background: var(--text); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 22px; flex: 1; }
.nav-links a { color: #1d1d1fcc; font-size: 13px; }
.nav-links a.on { color: var(--text); font-weight: 500; }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-link { font-size: 13px; color: var(--text); }
.nav-user { font-size: 13px; color: var(--text); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; border: 0; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 500; letter-spacing: -0.01em;
  border-radius: 980px; padding: 10px 20px; text-decoration: none;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn-ghost { background: #f5f5f7; color: var(--text); border: 1px solid transparent; }
.btn-ghost:hover { background: #ececf0; }
.btn-sm { font-size: 13px; padding: 7px 14px; }
.btn-xs { font-size: 12px; padding: 4px 10px; }
.btn-lg { font-size: 16px; padding: 13px 28px; }
.btn-block { width: 100%; }

/* ---------- layout ---------- */
.wrap { max-width: 1024px; margin: 0 auto; padding: 0 22px 80px; }
.wrap.narrow { max-width: 880px; }
.section { max-width: 1024px; margin: 0 auto; padding: 86px 22px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--accent); letter-spacing: .02em; text-transform: uppercase; margin-bottom: 10px; }
.h1 { font-size: clamp(38px, 5vw, 56px); line-height: 1.05; font-weight: 600; letter-spacing: -0.025em; }
.h1-sm { font-size: 30px; line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; }
.h2 { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; }
.h2-sm { font-size: 21px; font-weight: 600; letter-spacing: -0.015em; }
.sub { color: var(--muted); font-size: 18px; margin-top: 14px; max-width: 620px; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.link { font-size: 14px; font-weight: 500; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.page-head { padding: 64px 0 34px; }
.page-head.left { text-align: left; }
.center-page { text-align: center; padding: 120px 0; }
.center-page .btn { margin-top: 22px; }

/* ---------- hero ---------- */
.hero { position: relative; text-align: center; padding: 96px 22px 0; overflow: hidden; }
.hero-glow {
  position: absolute; inset: -160px 0 auto; height: 520px; z-index: -1;
  background: radial-gradient(60% 60% at 50% 45%, rgba(0,113,227,.10), rgba(0,113,227,0) 70%);
}
.hero h1 { margin: 12px auto 0; max-width: 820px; font-size: clamp(44px, 7vw, 78px); line-height: 1.03; font-weight: 600; letter-spacing: -0.035em; }
.hero-sub { color: var(--muted); font-size: 19px; margin: 20px auto 0; max-width: 560px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.hero-product {
  display: inline-flex; align-items: center; gap: 14px; margin-top: 56px;
  background: var(--card); border: 1px solid var(--line-soft); border-radius: 16px;
  padding: 10px 18px 10px 10px; box-shadow: var(--shadow); color: var(--text);
}
.hero-product:hover { text-decoration: none; }
.hp-cover {
  width: 56px; height: 56px; border-radius: 12px;
  background: linear-gradient(140deg, color-mix(in srgb, var(--a) 85%, #fff) 0%, var(--a) 55%, color-mix(in srgb, var(--a) 60%, #000) 100%);
}
.hp-info { display: flex; flex-direction: column; align-items: flex-start; }
.hp-badge { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); font-weight: 600; }
.hp-info strong { font-size: 14px; font-weight: 500; }
.hp-price { font-size: 13px; color: var(--muted); }

/* ---------- cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px;
}
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 620px) { .grid-3 { grid-template-columns: 1fr; } }
.feature h3 { font-size: 18px; font-weight: 600; margin: 12px 0 8px; letter-spacing: -0.01em; }
.feature p { color: var(--muted); font-size: 15px; }
.icon {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: #f5f5f7; font-size: 18px;
}

.product-card { display: block; color: var(--text); overflow: hidden; padding: 0; transition: transform .18s ease, box-shadow .18s ease; }
.product-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0,0,0,.05), 0 18px 40px rgba(0,0,0,.08); }
.cover {
  position: relative; aspect-ratio: 16/10; display: grid; place-items: end start; padding: 20px;
  background:
    radial-gradient(120% 100% at 20% 0%, rgba(255,255,255,.35), rgba(255,255,255,0) 55%),
    linear-gradient(140deg, color-mix(in srgb, var(--a) 80%, #fff) 0%, var(--a) 45%, color-mix(in srgb, var(--a) 55%, #000) 100%);
}
.cover-title { color: #fff; font-weight: 600; font-size: 20px; letter-spacing: -0.02em; text-shadow: 0 1px 2px rgba(0,0,0,.18); }
.badge {
  position: absolute; top: 14px; left: 14px; background: rgba(255,255,255,.9);
  color: #1d1d1f; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 980px;
}
.product-body { padding: 18px 20px 20px; }
.product-name { font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.product-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.product-row { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.price { font-weight: 600; font-size: 17px; }
.catalog-grid { margin-top: 10px; }
.catalog-grid.single { grid-template-columns: minmax(0, 460px); }
.trust-row { display: flex; gap: 12px; justify-content: center; color: var(--muted); font-size: 13px; margin-top: 48px; }
.empty { color: var(--muted); padding: 60px 0; text-align: center; }

/* ---------- product page ---------- */
.crumbs { display: flex; gap: 8px; font-size: 13px; color: var(--muted); padding: 26px 0 8px; }
.crumbs a { color: var(--muted); }
.product-page { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: start; padding: 24px 0 40px; }
@media (max-width: 900px) { .product-page { grid-template-columns: 1fr; gap: 28px; } .product-visual { position: static; aspect-ratio: 16/11; } .pv-title { font-size: 26px; } }
.product-visual {
  position: sticky; top: 84px; aspect-ratio: 1/1; border-radius: 24px; display: grid; place-items: center;
  background:
    radial-gradient(100% 100% at 25% 10%, rgba(255,255,255,.4), rgba(255,255,255,0) 55%),
    linear-gradient(140deg, color-mix(in srgb, var(--a) 75%, #fff) 0%, var(--a) 45%, color-mix(in srgb, var(--a) 50%, #000) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
}
.pv-title { color: #fff; font-weight: 600; font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.02em; text-align: center; padding: 0 24px; text-shadow: 0 2px 12px rgba(0,0,0,.18); }
.product-info { padding-top: 8px; }
.product-desc { color: #424245; margin-top: 16px; font-size: 16px; }
.buy-row { display: flex; align-items: center; gap: 20px; margin-top: 26px; }
.buy-price { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; }
.buy-price span { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 6px; letter-spacing: 0; }
.stock-note { color: var(--ok); font-size: 13px; margin-top: 12px; }
.features { list-style: none; padding: 0; margin: 28px 0 0; border-top: 1px solid var(--line-soft); }
.features li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.tick { color: var(--accent); font-weight: 700; }
.assurances { list-style: none; padding: 0; margin: 22px 0 0; color: var(--muted); font-size: 13px; display: grid; gap: 6px; }

/* ---------- checkout ---------- */
.checkout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 24px; align-items: start; padding: 12px 0 30px; }
@media (max-width: 860px) { .checkout { grid-template-columns: 1fr; } }
.summary { position: sticky; top: 84px; }
.sum-cover { height: 120px; border-radius: 12px; margin-bottom: 18px; background: linear-gradient(140deg, color-mix(in srgb, var(--a) 80%, #fff), var(--a) 60%, color-mix(in srgb, var(--a) 55%, #000)); }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 14px; }
.sum-row.muted { color: var(--muted); }
.sum-total { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--line-soft); font-size: 17px; font-weight: 600; }
.pay-card h2 { margin-bottom: 4px; }
.coin-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin: 18px 0 20px; }
@media (max-width: 520px) { .coin-grid { grid-template-columns: 1fr; } }
.coin {
  display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  font: inherit; color: var(--text); transition: border-color .12s ease, box-shadow .12s ease;
}
.coin:hover { border-color: #b6b6bb; }
.coin.sel { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(0,113,227,.15); }
.coin-sym { width: 26px; height: 26px; border-radius: 50%; background: #f5f5f7; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #1d1d1f; }
.coin-name { font-size: 13px; font-weight: 500; flex: 1; }
.coin-net { font-size: 11px; color: var(--muted); }

.label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
.label .opt { opacity: .7; }
.input {
  width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 14px; font: inherit; font-size: 15px; color: var(--text); outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,113,227,.12); }
.input.area { resize: vertical; min-height: 90px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.input.select { width: auto; min-width: 220px; padding: 8px 12px; }
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row .input { flex: 1; }

/* ---------- order ---------- */
.order-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 8px 0 20px; }
.chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 980px; text-transform: capitalize; }
.chip-ok { background: #e7f6ec; color: var(--ok); }
.chip-wait { background: #fff4e0; color: var(--warn); }
.chip-bad { background: #fdecec; color: var(--bad); }
.qr { display: block; width: 220px; height: 220px; margin: 18px auto; border-radius: 14px; border: 1px solid var(--line-soft); }
.status-line { display: flex; align-items: center; justify-content: center; gap: 9px; color: var(--muted); font-size: 14px; margin-top: 16px; }
.spinner { width: 15px; height: 15px; border: 2px solid #d8d8dd; border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.creds {
  background: #f5f5f7; border: 1px solid var(--line-soft); border-radius: 12px;
  padding: 16px; margin: 14px 0 10px; font-family: ui-monospace, Menlo, monospace;
  font-size: 14px; white-space: pre-wrap; word-break: break-word;
}
.order-meta { margin-top: 18px; }
.account-actions { margin-top: 22px; display: flex; gap: 10px; }
.order-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 4px; border-bottom: 1px solid var(--line-soft); color: var(--text);
}
.order-row:last-child { border-bottom: 0; }
.order-row:hover { text-decoration: none; }
.order-name { font-weight: 500; font-size: 15px; }
.order-right { display: flex; align-items: center; gap: 14px; }

/* ---------- auth ---------- */
.auth { min-height: calc(100vh - 52px); display: grid; place-items: center; padding: 48px 22px 90px; }
.auth-card { width: 100%; max-width: 420px; padding: 36px 32px; }
.auth-card .brand { justify-content: center; margin-bottom: 18px; }
.auth-card .brand-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 17px; }
.auth-card h1 { text-align: center; }
.auth-card .muted.center { margin-top: 8px; }
.auth-card form { margin-top: 22px; }
.auth-card .btn { margin-top: 22px; }
.switch { margin-top: 20px; }
.alert { background: #fdecec; color: var(--bad); border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-top: 16px; }

/* ---------- admin ---------- */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.stat { padding: 18px; }
.stat-k { font-size: 12px; color: var(--muted); }
.stat-v { font-size: 24px; font-weight: 600; margin-top: 4px; letter-spacing: -0.02em; }
#adminApp .card { margin-bottom: 20px; }
.hide { display: none !important; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.admin-row:last-child { border-bottom: 0; }
.row-gap { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.table-wrap { margin-top: 14px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 12px; }

/* ---------- faq / footer ---------- */
.faq details { border-bottom: 1px solid var(--line-soft); padding: 20px 0; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; font-weight: 500; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { color: var(--muted); margin-top: 12px; font-size: 15px; max-width: 720px; }
.footer { border-top: 1px solid var(--line-soft); margin-top: 80px; }
.footer-inner {
  max-width: 1024px; margin: 0 auto; padding: 26px 22px 40px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--muted); font-size: 12px;
}
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--muted); }
.prose p { color: #424245; margin-top: 16px; font-size: 16px; }
.prose .h1 { margin-bottom: 20px; }
