:root {
  --bg: #14181f;
  --panel: #1a1f28;
  --panel2: #222936;
  --line: #2a3240;
  --text: #e6eaf0;
  --muted: #8b95a7;
  --faint: #5d6678;
  --teal: #3ccfb4;
  --teal-hover: #5eddc6;
  --on-teal: #0c1d1a;
  --info: #5aa9ff;
  --warn: #f5c451;
  --crit: #ff6b6b;
  --display: Bahnschrift, "DIN Alternate", "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Mono", Consolas, ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); font: 16px/1.55 var(--body); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-hover); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.005em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1080px, 100% - 40px); margin: 0 auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

header.top { border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font: 600 1.05rem var(--display); }
.brand:hover { color: var(--text); text-decoration: none; }
.brand svg { width: 26px; height: 26px; }
header.top nav { margin-left: auto; display: flex; gap: 22px; align-items: center; }
header.top nav a { color: var(--muted); }
header.top nav a:hover { color: var(--text); text-decoration: none; }
.avatar { width: 26px; height: 26px; border-radius: 50%; vertical-align: middle; margin-right: 8px; background: var(--panel2); }

main { flex: 1; padding: 48px 0 72px; }
footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--faint); font-size: .875rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
footer a { color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); color: var(--text);
  font: 600 .95rem var(--body); cursor: pointer; }
.btn:hover { border-color: var(--faint); color: var(--text); text-decoration: none; }
.btn.primary { background: var(--teal); border-color: var(--teal); color: var(--on-teal); }
.btn.primary:hover { background: var(--teal-hover); border-color: var(--teal-hover); color: var(--on-teal); }
.btn.small { min-height: 32px; padding: 0 12px; font-size: .85rem; }
.btn:disabled { opacity: .5; cursor: default; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.stack > * + * { margin-top: 20px; }
.notice { border-left: 3px solid var(--warn); background: var(--panel); padding: 12px 16px; border-radius: 0 8px 8px 0; }
.notice.ok { border-color: var(--teal); }
.notice.err { border-color: var(--crit); }
.hidden { display: none !important; }

.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.console { background: #0f1218; border: 1px solid var(--line); border-radius: 12px; padding: 22px 22px 18px; }
.console .line { font: .82rem/1.5 var(--mono); color: var(--muted); margin-bottom: 6px; }
.console .line b { color: var(--text); font-weight: 600; }
.console .line .mib { color: var(--warn); font-weight: 600; transition: color .9s ease .3s; }
.console .item + .item { margin-top: 18px; }
.console.done .line .mib { color: var(--teal); }
.console.done .line .mib.end-info { color: var(--info); }
.console .caption { margin-top: 18px; font-size: .8rem; color: var(--faint); }

.rail { position: relative; height: 10px; border-radius: 5px; background: var(--panel2); overflow: hidden; }
.rail .ghost { position: absolute; inset: 0 auto 0 0; width: calc(var(--before) * 100%);
  background: repeating-linear-gradient(135deg, #3a4352 0 3px, transparent 3px 6px); opacity: .6; }
.rail .fill { position: absolute; inset: 0 auto 0 0; width: calc(var(--before) * 100%); background: var(--crit);
  border-radius: 5px; transition: width .9s cubic-bezier(.3,.7,.2,1) .3s, background-color .9s ease .3s; }
.rail .fill.warn { background: var(--warn); }
.rail .fill.info { background: var(--info); }
.rail .notch { position: absolute; top: -2px; bottom: -2px; left: calc(16 / 48 * 100%); width: 2px; background: var(--text); opacity: .85; }
.console.done .rail .fill { width: calc(var(--after) * 100%); background: var(--teal); }
.console.done .rail .fill.end-info { background: var(--info); }
.usage .rail .fill { background: var(--teal); transition: none; }
@media (prefers-reduced-motion: reduce) { .rail .fill, .console .line .mib { transition: none; } }

.points { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 48px; margin-top: 72px; }
.points h3 { color: var(--text); }
.points p { color: var(--muted); margin: 0; }

.plans { margin-top: 80px; }
.plan-list { border-top: 1px solid var(--line); margin-top: 20px; }
.plan { display: grid; grid-template-columns: 1.1fr 2fr 1fr 1fr auto; gap: 16px; align-items: center; padding: 20px 4px;
  border-bottom: 1px solid var(--line); }
.plan .name { font: 600 1.2rem var(--display); }
.plan .price { font: 600 1.35rem var(--display); }
.plan .price span, .plan .figure span { display: block; font: .8rem var(--body); color: var(--faint); }
.plan .figure { font: 600 1.1rem var(--display); }
.plan .blurb { color: var(--muted); font-size: .95rem; }
.plan.current { background: linear-gradient(90deg, rgba(60,207,180,.07), transparent 60%); }

table.list { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.list th { text-align: left; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.list td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.status-paid { color: var(--teal); }
.status-pending, .status-confirming { color: var(--warn); }
.status-expired { color: var(--faint); }

.pay { display: grid; grid-template-columns: 1fr 260px; gap: 32px; align-items: start; }
.qr { background: #fff; border-radius: 12px; padding: 12px; }
.qr svg { width: 100%; height: auto; display: block; }
.field { margin-bottom: 18px; }
.field label { display: block; color: var(--muted); font-size: .85rem; margin-bottom: 6px; }
.copy { display: flex; gap: 8px; align-items: stretch; }
.copy code { flex: 1; font: 1rem var(--mono); background: #0f1218; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; overflow-wrap: anywhere; }
.copy code.big { font-size: 1.4rem; color: var(--text); }
.coins { display: grid; gap: 10px; }
.field .coins label { color: var(--text); font-size: 1rem; margin: 0; }
.coins label { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.coins label:has(input:checked) { border-color: var(--teal); background: rgba(60,207,180,.06); }
.coins input { accent-color: var(--teal); }

.prose { max-width: 46em; }
.prose h2 { margin-top: 1.6em; font-size: 1.3rem; }
.prose li { margin-bottom: .4em; }

input[type=text], input[type=number], select { background: #0f1218; color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; font: inherit; }

@media (max-width: 860px) {
  .hero, .pay { grid-template-columns: 1fr; gap: 32px; }
  .points { grid-template-columns: 1fr; }
  .plan { grid-template-columns: 1fr 1fr; }
  .plan .blurb { grid-column: 1 / -1; grid-row: 2; }
  header.top nav { gap: 14px; }
}
