:root {
  color-scheme: dark;
  --bg: #121519;
  --bg-deep: #0b0d10;
  --surface: #171a1f;
  --surface-2: #1c2025;
  --surface-3: #23282e;
  --line: #454c54;
  --line-soft: #30363d;
  --line-faint: rgba(190, 199, 207, 0.12);
  --text: #eceff1;
  --muted: #999fa6;
  --muted-dark: #6d747b;
  --hp: #c9383d;
  --sd: #d68417;
  --mp: #1686c3;
  --ag: #7951ad;
  --exp: #4fa873;
  --gold: #bca66f;
  --gold-bright: #d8c690;
  --gold-soft: rgba(188, 166, 111, 0.12);
  --neutral-accent: #9eacb7;
  --neutral-accent-bright: #c5cdd3;
  --neutral-accent-soft: rgba(158, 172, 183, 0.12);
  --danger: #d9575c;
  --success: #55ad78;
  --topbar-height: 62px;
  --hud-height: 121px;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.48);
  --gold-glow: 0 0 18px rgba(188, 166, 111, 0.08);
  --success-glow: 0 0 18px rgba(85, 173, 120, 0.18);
  --danger-glow: 0 0 18px rgba(217, 87, 92, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: var(--bg-deep);
  color: var(--text);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-weight: 300;
}

body {
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button,
a,
input {
  border-radius: 0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid #aeb4b9;
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.boot-screen,
.noscript-message {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  background:
    radial-gradient(circle at 50% 43%, rgba(255, 255, 255, 0.035), transparent 32%),
    #0b0b0b;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #555;
  background: #1c1c1c;
  color: #d7d7d7;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid #626262;
  background: #1c1c1c;
  color: #f2f2f2;
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.07em;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.button:hover:not(:disabled) {
  background: #292929;
  border-color: #858585;
  transform: translateY(-1px);
}

.button.primary {
  background: #e5e5e5;
  border-color: #e5e5e5;
  color: #111;
  font-weight: 500;
}

.button.primary:hover:not(:disabled) {
  background: #fff;
  border-color: #fff;
}

.button.danger {
  border-color: #713f41;
  color: #e8b7b8;
}

.button.ghost {
  border-color: transparent;
  background: transparent;
  color: #aab1b7;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: #9ba4ab;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field input {
  width: 100%;
  height: 42px;
  border: 1px solid #444;
  background: #111;
  padding: 0 12px;
  color: #eee;
  outline: none;
}

.field input:focus {
  border-color: #888;
}

.form-error {
  min-height: 17px;
  margin: 0;
  color: #de777a;
  font-size: 11px;
}

.eyebrow {
  color: #78838b;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.status-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(61, 157, 106, 0.5);
}

.text-button {
  padding: 0;
  border: 0;
  background: none;
  color: #bdc4ca;
  cursor: pointer;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  max-width: min(430px, calc(100vw - 32px));
  transform: translate(-50%, 16px);
  padding: 11px 15px;
  border: 1px solid #555;
  background: #171717;
  box-shadow: var(--shadow);
  color: #ddd;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  transform: translate(-50%, 0);
  opacity: 1;
}
