@font-face {
  font-family: Inter;
  src: url("fonts/InterVariable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0a0a;
  --card: #171717;
  --line: #26262b;
  --text: #ededed;
  --muted: #a0a0a0;
  --purple: #9c83bc;
  --purple2: #bba1db;
  --pink: #e07bb5;
  --pink2: #e3a9cf;
  --danger: #f0a0a0;
  --ok: #9fd4b3;
  --input: #111113;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; margin: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100%;
}

body {
  background-image:
    radial-gradient(900px 400px at 10% -10%, rgba(156, 131, 188, 0.16), transparent 55%),
    radial-gradient(700px 360px at 100% 0%, rgba(224, 123, 181, 0.1), transparent 50%);
}

.page {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 36px 0 48px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.brand { display: flex; align-items: center; gap: 10px; }

.mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #0a0a0a;
  background: linear-gradient(135deg, var(--purple2), var(--pink));
}

.word {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #d8d8d8;
}

.tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--purple2);
  border: 1px solid #3b3d43;
  border-radius: 999px;
  padding: 5px 12px;
}

h1 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 8px;
}

h1 span {
  background: linear-gradient(90deg, var(--purple2), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  color: var(--muted);
  font-size: 15px;
  max-width: 46rem;
  margin-bottom: 20px;
}

.disclaimer {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px 16px;
  margin-bottom: 20px;
}

.disclaimer:before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--purple), var(--pink));
}

.disclaimer h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 4px 0 6px;
}

.disclaimer p {
  color: var(--muted);
  font-size: 13.5px;
  max-width: 70rem;
}

.disclaimer strong { color: var(--text); font-weight: 650; }

.ack {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  font-size: 13.5px;
  cursor: pointer;
}

.ack input {
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  flex: 0 0 18px;
  border-radius: 5px;
  border: 1px solid #4a4554;
  background: var(--input);
  cursor: pointer;
}

.ack input:checked {
  background: linear-gradient(135deg, var(--purple2), var(--pink));
  border-color: transparent;
  background-image:
    linear-gradient(135deg, var(--purple2), var(--pink));
  box-shadow: inset 0 0 0 3px transparent;
}

.ack input:checked::after {
  content: "";
  display: block;
  width: 10px;
  height: 6px;
  margin: 4px auto 0;
  border: 2px solid #0a0a0a;
  border-top: 0;
  border-right: 0;
  transform: rotate(-45deg);
}

.ack input:focus-visible {
  outline: 2px solid var(--purple2);
  outline-offset: 2px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.75fr);
  gap: 16px;
  align-items: start;
}

.panel {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 20px 18px;
}

.panel:before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  opacity: 0.8;
}

.panel h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple2);
  margin-bottom: 14px;
}

.field { margin-bottom: 16px; }

label, .label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.row { display: flex; gap: 10px; }

input[type="text"], select {
  width: 100%;
  height: 44px;
  border: 1px solid #2e2e34;
  background: var(--input);
  color: var(--text);
  border-radius: 10px;
  padding: 0 12px;
  font: inherit;
}

input[type="text"]:focus, select:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(156, 131, 188, 0.25);
}

.row input { flex: 1; }
.row .btn { flex: 0 0 auto; white-space: nowrap; }

.hint { color: #7d7d82; font-size: 12px; margin-top: 6px; }
.error { color: var(--danger); font-size: 12.5px; min-height: 0; margin-top: 6px; }
.error:empty { display: none; }

.event-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.money-grid {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 10px;
}

.btn {
  height: 44px;
  border: 0;
  border-radius: 10px;
  padding: 0 16px;
  font: inherit;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease, filter 0.15s ease;
}

.btn:hover:not(:disabled) { filter: brightness(1.06); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { cursor: not-allowed; opacity: 0.55; }

.btn-primary {
  color: #0a0a0a;
  background: linear-gradient(90deg, var(--purple2), var(--pink2));
}

.btn-event, .btn-burst, .btn-ghost {
  background: #1f1b26;
  color: var(--text);
  border: 1px solid #3a3147;
}

.btn-event { width: 100%; }
.btn-purchase { border-color: #5a3d55; }

.btn-burst {
  width: 100%;
  height: 46px;
  border-color: #4a3a62;
  background: linear-gradient(180deg, #241c2d, #1a1620);
  color: var(--purple2);
}

.burst-block { margin-top: 4px; }

.burst-note {
  margin-top: 8px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--pink);
}

.status {
  margin-top: 12px;
  font-size: 13px;
  min-height: 1.2em;
}
.status[data-kind="ok"] { color: var(--ok); }
.status[data-kind="warn"] { color: #efc38a; }

.log-panel { min-height: 420px; }
.log {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.log-empty {
  color: #6e6e73;
  font-size: 13.5px;
  padding: 18px 0;
}

.log-item {
  background: #121214;
  border: 1px solid #2a2a30;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
}

.log-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.log-item time { color: #7a7a80; font-size: 12px; }
.log-item p { color: var(--muted); margin-top: 4px; font-size: 12.5px; }
.log-ok { border-left: 3px solid var(--purple); }
.log-info { border-left: 3px solid var(--pink); }

.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.64);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 20;
}

.modal-card {
  width: min(440px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.modal-card h2 { font-size: 18px; margin-bottom: 8px; }
.modal-card p { color: var(--muted); font-size: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

@media (max-width: 860px) {
  .page { width: min(1120px, calc(100% - 32px)); padding-top: 24px; }
  h1 { font-size: 28px; }
  .layout, .row, .event-grid, .money-grid { grid-template-columns: 1fr; }
  .row { flex-direction: column; }
}
