:root {
  color-scheme: dark;
  --piano: #1c1c1c;
  --vasca: #2a2a2a;
  --voce: #ececec;
  --muta: #8a8a8a;
  --faint: #666;
  --ink: #ececec;
  --muted: #8a8a8a;
  --bg: #1c1c1c;
  --green-dim: #7abf72;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; }
header {
  position: sticky;
  top: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 22px 28px;
  background: transparent;
}
header::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 108px;
  pointer-events: none;
  z-index: -1;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgb(28 28 28);
  mask-image: linear-gradient(to bottom, #000, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.23em;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.brand em { font-style: normal; font-weight: 500; color: var(--muta); }
.mark-sq { width: 0.7em; height: 0.7em; background: var(--ink); display: inline-block; }
.head-tools { display: flex; align-items: center; gap: 18px; }
.head-nav {
  display: flex;
  gap: 1.15em;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
}
.head-nav a { text-decoration: none; }
.head-nav a:hover,
.head-nav a.is-on { color: var(--ink); }
.auth-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.nick-chip {
  min-width: 0;
  max-width: 18ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--muted);
}
.btn-out {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 4px 0;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
}
.btn-out:hover { color: var(--ink); }
.dash-shell {
  display: grid;
  grid-template-columns: 8.25rem minmax(0, 1fr);
  column-gap: 3.5rem;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 28px 96px;
  flex: 1;
}
.dash-side {
  position: sticky;
  top: 88px;
  align-self: start;
}
.dash-side .kicker { margin: 0 0 12px; }
.dash-side a {
  display: block;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  padding: 5px 0;
}
.dash-side a:hover,
.dash-side a.is-on { color: var(--ink); }
.kicker {
  margin: 0 0 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
h1 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.7rem, 3.4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.15;
}
.lede {
  margin: 0 0 2rem;
  font-size: 1.05rem;
  color: var(--muted);
}
h2 {
  margin: 2.1rem 0 0.55rem;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}
main p { margin: 0 0 0.85rem; color: #b8b8b8; font-size: 0.98rem; }
main code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86em;
}
main p a { color: var(--ink); text-decoration: none; }
main p a:hover { text-decoration: underline; }
.sku-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0 0 1.8rem;
}
.sku {
  background: var(--vasca);
  border-radius: 16px;
  padding: 22px 22px 20px;
}
.sku h2 { margin: 0 0 6px; font-size: 1.25rem; }
.sku .price {
  margin: 0 0 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  color: var(--muted);
}
.sku p { margin: 0; font-size: 0.92rem; }
.spec {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0 0;
  border-top: 1px solid #2f2f2f;
}
.spec li {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 12px;
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid #2f2f2f;
  font-size: 0.9rem;
  color: #b8b8b8;
}
.spec span { color: var(--faint); }
.spec strong { color: var(--ink); font-weight: 600; }
.spec a { color: var(--ink); text-decoration: none; }
.spec a:hover { text-decoration: underline; }
.gate {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 28px;
  color: var(--muted);
}
.gate p { margin: 0 0 16px; }
.gate a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  font-weight: 600;
}
.gate a:hover { color: #fff; }
.card {
  border: 0;
  border-radius: 16px;
  background: var(--vasca);
  padding: 22px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.card-title {
  margin: 0 0 14px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.balance-big {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.balance-sub { font-size: 0.78rem; color: var(--muted); margin: 8px 0 0; }
.topup-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 0;
  background: var(--piano);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 550;
  cursor: pointer;
}
.chip:hover { background: color-mix(in srgb, var(--piano) 70%, var(--voce)); }
.chip.is-on { background: var(--voce); color: var(--piano); }
.topup-custom { display: none; align-items: center; gap: 8px; margin-top: 10px; }
.topup-custom.is-on { display: flex; }
.topup-custom label { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.topup-custom input {
  width: 8.5rem;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--piano);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.topup-custom input:focus { outline: 1px solid var(--voce); }
.topup-hint { font-size: 0.72rem; color: var(--faint); margin: 8px 0 0; }
.topup-legal {
  margin: 10px 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--faint);
}
.topup-legal a { color: var(--ink); }
.gift-slim { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid #2f2f2f; }
.gift-row { display: flex; gap: 8px; align-items: center; }
.gift-lab {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.gift-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 8px;
  padding: 6px 10px;
  background: var(--piano);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 550;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}
.gift-row input:focus { outline: 1px solid var(--voce); }
.gift-go {
  flex-shrink: 0;
  border: 0;
  background: none;
  color: var(--ink);
  padding: 0;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.gift-go:hover { text-decoration: underline; }
.gift-go:disabled { opacity: 0.45; cursor: default; text-decoration: none; }
.gift-slim .msg { margin-top: 6px; min-height: 0; font-size: 0.72rem; }
.gift-hint {
  margin: 10px 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--faint);
}
.gift-hint a { color: var(--ink); }
.legal-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--muted);
  cursor: pointer;
}
.legal-check input { margin-top: 2px; flex-shrink: 0; }
.legal-check a { color: var(--ink); }
.btn-primary {
  width: 100%;
  margin-top: 14px;
  border: 0;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  padding: 11px;
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
}
.btn-primary:hover { background: #fff; }
.btn-primary:disabled { opacity: 0.45; cursor: default; }
.usage-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 0.4rem;
}
.usage-stat { min-width: 0; background: var(--piano); border-radius: 12px; padding: 14px; }
.usage-label {
  display: block;
  color: var(--faint);
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 7px;
}
.usage-value {
  display: block;
  color: var(--ink);
  font-size: clamp(1.05rem, 2.5vw, 1.4rem);
  font-weight: 680;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.usage-sub { display: block; color: var(--muted); font-size: 0.72rem; margin-top: 4px; }
.usage-note { color: var(--faint); font-size: 0.75rem; margin: 14px 0 0; }
.usage-note a { color: var(--ink); text-decoration: none; }
.usage-note a:hover { text-decoration: underline; }
.calls-wrap { margin-top: 0.4rem; overflow-x: auto; }
.calls {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.calls th {
  text-align: left;
  color: var(--faint);
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 10px 16px 10px 0;
  border-bottom: 1px solid #2f2f2f;
}
.calls td {
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid #2f2f2f;
  color: #b8b8b8;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.calls th:last-child,
.calls td:last-child { text-align: right; padding-right: 0; }
.calls-empty { color: var(--faint); font-size: 0.92rem; margin: 0.4rem 0 0; }
.calls-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.calls-pager[hidden] { display: none !important; }
.calls-pager button {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  padding: 0 2px;
}
.calls-pager button:hover:enabled { color: #fff; }
.calls-pager button:disabled { color: var(--faint); cursor: default; }
.key-open,
.key-copy,
.key-form-actions button[type="submit"] {
  border: 0;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.86rem;
  font-weight: 650;
  cursor: pointer;
}
.key-open { margin: 0 0 1.2rem; }
.key-open:hover,
.key-copy:hover,
.key-form-actions button[type="submit"]:hover { background: #fff; }
.key-open:disabled,
.key-form-actions button:disabled { opacity: 0.45; cursor: default; }
.key-form {
  background: var(--vasca);
  border-radius: 16px;
  padding: 20px 22px;
  margin: 0 0 1.2rem;
  max-width: 22rem;
}
.key-form[hidden] { display: none !important; }
.key-field { display: block; }
.key-field span {
  display: block;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.key-field input {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 11px 12px;
  background: var(--piano);
  color: var(--ink);
  font-size: 0.95rem;
}
.key-field input:focus { outline: 1px solid color-mix(in srgb, var(--voce) 45%, transparent); }
.key-form-actions { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.key-cancel {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}
.key-cancel:hover { color: var(--ink); }
.key-once {
  background: var(--vasca);
  border-radius: 16px;
  padding: 18px 20px;
  margin: 0 0 1.4rem;
}
.key-once p { margin: 0 0 10px; font-size: 0.88rem; color: var(--muted); }
.key-once code {
  display: block;
  margin: 0 0 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.keys { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.keys th {
  text-align: left;
  color: var(--faint);
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 10px 16px 10px 0;
  border-bottom: 1px solid #2f2f2f;
}
.keys td {
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid #2f2f2f;
  color: #b8b8b8;
  white-space: nowrap;
}
.keys td.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  color: var(--ink);
}
.keys .btn-revoke {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
}
.keys .btn-revoke:hover { color: #e8a0a0; }
.keys-empty { color: var(--faint); font-size: 0.92rem; margin: 0.4rem 0 0; }
.msg { font-size: 0.8rem; margin-top: 10px; color: var(--muted); min-height: 1.2em; }
.msg.err { color: #e8a0a0; }
.msg.ok { color: var(--green-dim); }
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 22px 28px 40px;
  font-size: 0.875rem;
  color: var(--muted);
}
.imprint { display: block; max-width: 22rem; font-size: 0.75rem; line-height: 1.4; color: var(--faint); }
.foot-links { display: flex; gap: 1.25em; flex-wrap: wrap; }
.foot-discord { display: inline-flex; align-items: center; line-height: 0; }
.foot-discord svg { display: block; width: 1.15em; height: 1.15em; }
footer a, footer button {
  text-decoration: none;
  color: inherit;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  padding: 0;
}
footer a:hover, footer button:hover { color: var(--ink); }
@media (max-width: 860px) {
  .dash-shell {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 28px;
  }
  .dash-side {
    position: static;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 16px;
  }
  .dash-side .kicker { margin: 0; }
  .usage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sku-grid { grid-template-columns: 1fr; }
  .spec li { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 640px) {
  header, .dash-shell, footer, .gate { padding-left: 20px; padding-right: 20px; }
  .nick-chip { max-width: 10ch; }
}
