:root {
  --bg: #07050d;
  --bg2: #0d0a18;
  --card: #110d1f;
  --edge: #2a2342;
  --gold: #d6b670;
  --gold2: #f0d79a;
  --ink: #7132f5;
  --ink2: #a57bff;
  --mint: #5cf2c0;
  --pink: #ff5c8a;
  --text: #f4f0fc;
  --muted: #968eaa;
  --r: 18px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 90vh;
  background: radial-gradient(60% 60% at 70% 30%, rgba(113, 50, 245, 0.28), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold2); }
img { max-width: 100%; display: block; }
.wrap { width: min(1180px, 100% - 32px); margin: 0 auto; }
h1, h2, h3 { line-height: 1.08; margin: 0 0 14px; letter-spacing: -0.01em; }
h1 { font-size: clamp(40px, 6.6vw, 84px); font-weight: 800; }
h2 { font-size: clamp(30px, 4.2vw, 50px); font-weight: 800; }
h3 { font-size: 20px; font-weight: 700; }
p { margin: 0 0 14px; color: #cfc8de; }
.tag { font-size: 13px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 14px; }
.muted { color: var(--muted); }
.gold { color: var(--gold); }
.violet { color: var(--ink2); }
.mint { color: var(--mint); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ---------- header ---------- */
header.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 5, 13, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--edge);
}
header.top .wrap { display: flex; align-items: center; gap: 22px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0.14em; color: var(--text); }
.brand img { width: 34px; height: 34px; border-radius: 50%; }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a { color: var(--muted); padding: 8px 12px; border-radius: 10px; font-size: 15px; font-weight: 500; }
.nav a:hover, .nav a.on { color: var(--text); background: #1a1430; }
.spacer { flex: 1; }
.inkbadge { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); letter-spacing: 0.16em; text-transform: uppercase; }
.inkbadge img { width: 26px; height: 26px; border-radius: 50%; }
.burger { display: none; background: none; border: 1px solid var(--edge); color: var(--text); border-radius: 10px; width: 42px; height: 38px; font-size: 18px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 12px; border: 1px solid var(--gold);
  background: var(--gold); color: #140f05; font-weight: 700; font-size: 15px; cursor: pointer;
  transition: transform 0.15s, background 0.15s;
  font-family: inherit;
}
.btn:hover { background: var(--gold2); color: #140f05; transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--gold); }
.btn.ghost:hover { background: #1c1608; }
.btn.violet { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.violet:hover { background: #8550ff; }
.btn.small { padding: 9px 14px; font-size: 14px; border-radius: 10px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---------- sections ---------- */
section { padding: 84px 0; }
section.tight { padding: 48px 0; }
.hero { padding: 72px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero p.lead { font-size: 20px; color: #d9d2ea; max-width: 560px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 8px; }
.hero-art { position: relative; aspect-ratio: 1; }
.hero-art img { position: absolute; border-radius: 22px; border: 1px solid var(--edge); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.hero-art .a { width: 70%; left: 0; top: 0; z-index: 2; }
.hero-art .b { width: 52%; right: 0; bottom: 4%; z-index: 3; border-color: var(--gold); }
.hero-art .c { width: 40%; right: 6%; top: 2%; opacity: 0.55; z-index: 1; }

.cdbox { display: inline-flex; flex-direction: column; gap: 8px; margin-top: 18px; padding: 16px 20px; border: 1px solid var(--edge); border-radius: 16px; background: var(--card); }
.cdbox small { color: var(--muted); letter-spacing: 0.18em; text-transform: uppercase; font-size: 11px; }
.cd { display: inline-flex; align-items: baseline; gap: 2px; margin-right: 12px; }
.cd b { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cd i { font-style: normal; color: var(--muted); font-size: 14px; }

.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g5 { grid-template-columns: repeat(5, 1fr); }
.card { background: var(--card); border: 1px solid var(--edge); border-radius: var(--r); padding: 24px; position: relative; }
.card.goldline::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--gold); border-radius: var(--r) var(--r) 0 0; }
.card .num { font-size: 13px; color: var(--gold); letter-spacing: 0.2em; font-weight: 700; margin-bottom: 10px; }
.stat b { display: block; font-size: 34px; font-weight: 800; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 14px; }

.gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.gallery figure { margin: 0; background: var(--card); border: 1px solid var(--edge); border-radius: 14px; overflow: hidden; }
.gallery figcaption { padding: 8px 10px; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; }

.split { display: flex; height: 18px; border-radius: 9px; overflow: hidden; margin: 18px 0; }
.split div { height: 100%; }
.legend { display: grid; gap: 10px; }
.legend div { display: flex; align-items: center; gap: 12px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

.stocks { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.stocks div { border: 1px solid var(--edge); border-radius: 12px; padding: 14px; background: var(--bg2); text-align: center; font-weight: 800; letter-spacing: 0.08em; }
.stocks div small { display: block; color: var(--muted); font-weight: 500; letter-spacing: 0; font-size: 12px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--edge); font-size: 15px; }
th { color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; }

.timeline { display: grid; gap: 0; }
.timeline .step { display: grid; grid-template-columns: 64px 1fr; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--edge); }
.timeline .step .n { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); display: grid; place-items: center; font-weight: 800; }

.gold11 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.gold11 .card { display: grid; grid-template-columns: 180px 1fr; gap: 18px; align-items: center; border-color: #6e5a32; }
.gold11 img { border-radius: 14px; }

/* ---------- forms + app panels ---------- */
.panel { background: var(--card); border: 1px solid var(--edge); border-radius: var(--r); padding: 26px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px; letter-spacing: 0.04em; }
input, textarea, select {
  width: 100%; background: var(--bg2); border: 1px solid var(--edge); color: var(--text);
  border-radius: 12px; padding: 13px 14px; font: inherit; outline: none;
}
input:focus, textarea:focus { border-color: var(--ink2); }
.row { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; margin-bottom: 14px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--edge); font-size: 15px; }
.kv span:first-child { color: var(--muted); }
.result { margin-top: 18px; padding: 22px; border-radius: 16px; border: 1px solid var(--edge); background: var(--bg2); display: none; }
.result.show { display: block; }
.result.gtd { border-color: var(--gold); }
.result.wl { border-color: var(--ink2); }
.result.no { border-color: var(--pink); }
.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; }
.pill.gtd { background: #2c2310; color: var(--gold); }
.pill.wl { background: #1d1440; color: var(--ink2); }
.pill.no { background: #3a1222; color: var(--pink); }
.pill.live { background: #0f2e25; color: var(--mint); }
.notice { border: 1px dashed var(--edge); border-radius: 14px; padding: 16px 18px; color: var(--muted); font-size: 14px; }
.machines { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.machine { border: 1px solid var(--edge); border-radius: 14px; padding: 10px; background: var(--bg2); cursor: pointer; }
.machine.sel { border-color: var(--gold); }
.machine.hw { border-color: var(--mint); }
.machine img { border-radius: 10px; aspect-ratio: 1; object-fit: cover; background: #000; }
.machine div { font-size: 13px; margin-top: 8px; display: flex; justify-content: space-between; }

details { border-bottom: 1px solid var(--edge); padding: 18px 0; }
summary { cursor: pointer; font-weight: 700; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::after { content: "+"; color: var(--gold); font-size: 22px; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { margin-top: 12px; }

footer { border-top: 1px solid var(--edge); padding: 40px 0 60px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; justify-content: space-between; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); background: #1a1430; border: 1px solid var(--edge); padding: 14px 20px; border-radius: 14px; max-width: min(560px, 92vw); z-index: 99; transition: transform 0.25s; font-size: 15px; }
#toast.show { transform: translate(-50%, 0); }
#toast.good { border-color: var(--mint); }
#toast.bad { border-color: var(--pink); }

/* ---------- mobile ---------- */
@media (max-width: 940px) {
  .hero .wrap, .g2, .gold11 { grid-template-columns: 1fr; }
  .g3, .g4, .g5 { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .stocks { grid-template-columns: repeat(2, 1fr); }
  .nav, .inkbadge span { display: none; }
  .burger { display: block; }
  body.menu .nav { display: flex; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: var(--bg); padding: 12px 16px 18px; border-bottom: 1px solid var(--edge); margin: 0; }
  .row { grid-template-columns: 1fr; }
  .gold11 .card { grid-template-columns: 110px 1fr; }
  section { padding: 60px 0; }
}
@media (max-width: 520px) {
  .g3, .g4 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .cd b { font-size: 24px; }
  header.top .btn.small { padding: 8px 10px; font-size: 13px; }
}
