:root {
  --navy: #14213d;
  --navy-2: #1f3160;
  --gold: #c9a227;
  --gold-2: #e8c75a;
  --paper: #faf7f0;
  --card: #ffffff;
  --ink: #1b1f2a;
  --muted: #5d6475;
  --line: #e4ddcc;
  --good: #1e7d4f;
  --good-bg: #e5f4ec;
  --bad: #b3261e;
  --bad-bg: #fbe9e7;
  --radius: 14px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--navy-2); }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
small, .muted { color: var(--muted); }

.top {
  background: var(--navy);
  color: #fff;
  padding: 14px 16px;
  border-bottom: 3px solid var(--gold);
}
.top .brand { font-family: Georgia, serif; font-size: 1.1rem; letter-spacing: .02em; }
.top .brand b { color: var(--gold-2); font-weight: normal; }
.top .sub { font-size: .8rem; opacity: .8; }

.wrap { max-width: 560px; margin: 0 auto; padding: 16px; }
.wrap.wide { max-width: 1200px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}

.demo-banner {
  background: #fff6d6;
  border-bottom: 1px solid #ecd98a;
  color: #6b5200;
  font-size: .8rem;
  padding: 6px 16px;
  text-align: center;
}

label { display: block; font-weight: 600; font-size: .9rem; margin: 10px 0 4px; }
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=password], select, textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 11px 12px;
  border: 1px solid #cfc7b3;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: normal; margin: 12px 0; }
.check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--navy); }

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: 12px;
  padding: 13px 18px;
  background: var(--navy);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn:hover { background: var(--navy-2); }
.btn.gold { background: var(--gold); color: var(--navy); }
.btn.gold:hover { background: var(--gold-2); }
.btn.ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }
.btn.danger { background: var(--bad); }
.btn.block { display: block; width: 100%; }
.btn.small { padding: 8px 12px; font-size: .85rem; border-radius: 9px; }
.btn[disabled] { opacity: .5; cursor: default; }

.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1 1 0; }
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chip {
  font: inherit; font-weight: 700; font-size: 1.05rem;
  padding: 14px 6px; border-radius: 12px; border: 1.5px solid var(--navy);
  background: #fff; color: var(--navy); cursor: pointer;
}
.chip.on { background: var(--navy); color: #fff; }

.msg { border-radius: 10px; padding: 10px 12px; margin: 10px 0; font-weight: 600; }
.msg.ok { background: var(--good-bg); color: var(--good); }
.msg.err { background: var(--bad-bg); color: var(--bad); }
.hidden { display: none !important; }

.big-money { font-family: Georgia, serif; font-size: 2rem; color: var(--navy); }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.tag.win { background: var(--good-bg); color: var(--good); }
.tag.lose { background: var(--bad-bg); color: var(--bad); }
.tag.plain { background: #eee8d8; color: #5a4c22; }

.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .r { text-align: right; white-space: nowrap; }

.item-link { display: block; text-decoration: none; color: inherit; }
.item-link:hover .card { border-color: var(--gold); }

table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
td.num, th.num { text-align: right; white-space: nowrap; }
.scroll-x { overflow-x: auto; }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.stat { font-family: Georgia, serif; font-size: 1.6rem; color: var(--navy); }
.stat-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

.qrbox { background: #fff; padding: 10px; border-radius: 10px; display: inline-block; line-height: 0; }

@media print {
  .no-print, .top, .demo-banner { display: none !important; }
  body { background: #fff; }
}
