:root {
  --bg: #121316;
  --surface: #1c1e22;
  --surface-2: #25282d;
  --border: #33373e;
  --text: #eceef1;
  --muted: #a3a9b3;
  --accent: #4aa83a;
  --accent-strong: #3a8f2c;
  --danger: #d7262c;
  --warning: #e0a526;
  --radius: 10px;
  --tap: 48px;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

input,
select {
  min-height: var(--tap);
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  width: 100%;
}

input:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: 3px solid #6cb8ff;
  outline-offset: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--tap);
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}

.btn:hover:not(:disabled) {
  filter: brightness(1.15);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent-strong);
  color: #fff;
}

.btn--danger {
  background: var(--danger);
  border-color: #a51519;
  color: #fff;
}

.btn--ghost {
  background: transparent;
}

.btn--small {
  min-height: 36px;
  padding: 0 10px;
  font-size: 14px;
}

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

.field > span {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

.error-text {
  color: #ff8a8e;
  font-size: 14px;
  min-height: 1.4em;
}

[hidden] {
  display: none !important;
}
