:root {
  color-scheme: dark;
  --bg: #14110f;
  --panel: #1e1915;
  --fg: #f1ece4;
  --muted: #a69c8f;
  --line: #3a3129;
  --gold: #e3b341;
  --accent: #c8691c;
  --ok: #6cc17a;
  --error: #f2867d;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
}
main { max-width: 38rem; margin: 0 auto; padding: max(1rem, env(safe-area-inset-top)) 1rem 3rem; }
body.admin main { max-width: 64rem; }
h1 { font-size: 1.4rem; margin: 0.4rem 0 0.8rem; color: var(--gold); }
h2 { font-size: 1.1rem; margin: 1.2rem 0 0.5rem; }
h3 { font-size: 1rem; margin: 1rem 0 0.4rem; }
p { margin: 0.4rem 0; }
.muted { color: var(--muted); }
.small, small { font-size: 0.85rem; }
.ok { color: var(--ok); }
.error { color: var(--error); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.9rem; }
.address, .secret { word-break: break-all; }
.secret { padding: 0.7rem; border: 1px dashed var(--accent); border-radius: 8px; }
input[type="text"], input[type="password"], select {
  width: 100%; font: inherit; font-size: 16px; color: var(--fg); background: var(--panel);
  border: 1px solid var(--line); border-radius: 8px; padding: 0.6rem 0.7rem; margin: 0.25rem 0;
}
button, a.button {
  display: inline-block; font: inherit; font-size: 16px; color: var(--fg); background: var(--panel);
  border: 1px solid var(--line); border-radius: 8px; padding: 0.55rem 1rem; margin: 0.25rem 0.4rem 0.25rem 0;
  min-height: 44px; text-decoration: none; cursor: pointer;
}
button.small { min-height: 32px; padding: 0.25rem 0.7rem; font-size: 14px; }
button:disabled { opacity: 0.5; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button.danger { color: var(--error); }
.row { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.row input { flex: 1 1 8rem; width: auto; }
header.top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.who { display: flex; gap: 0.6rem; align-items: center; }
#balance { color: var(--gold); }
nav.tabs { display: flex; gap: 0.3rem; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 0.8rem; }
.tab { border: none; border-bottom: 3px solid transparent; border-radius: 0; background: none; margin: 0; white-space: nowrap; }
.tab.active { border-bottom-color: var(--gold); color: var(--gold); }
.panel { padding: 0.2rem 0 1rem; }
body.admin .panel { border-top: 1px solid var(--line); }
.soon { text-align: center; padding: 3rem 0; }
.machine { display: flex; justify-content: center; gap: 0.6rem; margin: 1rem 0 0.4rem; }
.reel {
  width: 5.5rem; height: 6rem; display: flex; align-items: center; justify-content: center;
  font-size: 3rem; font-weight: 700; color: var(--gold); background: #0d0b09;
  border: 2px solid var(--gold); border-radius: 12px;
}
.reel.spinning { animation: spin 0.15s linear infinite; }
@keyframes spin { 0% { transform: translateY(-6%); opacity: 0.5; } 100% { transform: translateY(6%); opacity: 0.9; } }
.result { text-align: center; min-height: 1.5em; font-weight: 600; }
button.spin { width: 100%; font-size: 1.2rem; }
table.pay td { padding: 0.15rem 1rem 0.15rem 0; }
table.grid { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.grid th, table.grid td { text-align: left; padding: 0.3rem 0.5rem; border-bottom: 1px solid var(--line); }
.item { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.item.col { flex-direction: column; align-items: flex-start; }
.form { display: grid; gap: 0.5rem; max-width: 30rem; }
.field { display: grid; gap: 0.1rem; }
.check { display: flex; gap: 0.5rem; align-items: center; }
