:root {
  --bg: #120805;
  --sand: #f4e6d4;
  --sand-2: #efe2cd;
  --card: #fffaf3;
  --ink: #2a140c;
  --muted: #8a6a55;
  --line: rgba(42, 20, 12, .14);
  --red: #b42318;
  --red-deep: #8a1c14;
  --gold: #e6b422;
  --gold-ink: #2a140c;
  --teal: #c99614;
  --teal-ink: #2a140c;
  --ok: #2f7a45;
  --ok-bg: #e7f8ee;
  --err: #b42318;
  --shadow: 0 18px 44px rgba(18, 8, 5, .22);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body.app {
  font-family: "DM Sans", system-ui, sans-serif;
  background:
    radial-gradient(900px 420px at 50% -8%, rgba(230,180,34,.28), transparent 55%),
    linear-gradient(180deg, #120805 0%, #2a0e0a 28%, #f4e6d4 28%);
  color: var(--ink);
  padding: 16px 16px calc(92px + env(safe-area-inset-bottom));
}
body.app.admin { padding-bottom: 28px; }
a { color: var(--red-deep); text-decoration: none; }
h1 {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-weight: 400;
  font-size: 32px;
  letter-spacing: .03em;
  line-height: 1.1;
  margin: 4px 0 12px;
}
h2 { font-size: 18px; margin: 22px 0 10px; }
.muted { color: var(--muted); font-size: 14px; }
.card {
  background: var(--card);
  border: 1px solid rgba(230,180,34,.28);
  border-radius: 22px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.card strong { display: block; font-size: 18px; }
.card .muted { display: block; margin-top: 4px; }
.row { display: flex; gap: 10px; align-items: center; }
.grow { flex: 1; }
label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin: 12px 0 6px; }
input, select, textarea {
  width: 100%; min-height: 52px; border-radius: 14px; border: 1.5px solid #e4d2b4;
  background: #fff; color: var(--ink); font: inherit; padding: 10px 14px;
}
textarea { min-height: 90px; }
input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(230, 180, 34, .35);
  border-color: var(--gold);
}
.btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; border: 0; border-radius: 16px; min-height: 54px;
  font: 800 17px/1 "DM Sans", system-ui, sans-serif; cursor: pointer;
}
a.btn { color: inherit; }
.btn-gold { background: linear-gradient(180deg, #f0c94a, #c99614); color: var(--gold-ink); }
.btn-red { background: var(--red); color: #fff; }
.btn-teal { background: var(--gold); color: var(--gold-ink); }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn:disabled { opacity: .45; }
.err { color: var(--err); font-size: 14px; font-weight: 700; margin: 8px 0; }
.ok { color: var(--ok); font-size: 15px; font-weight: 800; }
.banner {
  background: var(--ok-bg); color: #145c3c; border-radius: 16px;
  padding: 12px 14px; margin-bottom: 14px; font-weight: 700;
}
.badge {
  display: inline-block; font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  font-weight: 800; padding: 4px 10px; border-radius: 999px; background: #fff1d2; color: var(--gold-ink);
}
.badge-open { background: #efe2cd; color: var(--gold-ink); }
.badge-done { background: #eee; color: #666; }
.badge-draw { background: #ffe1c2; color: #9a3b00; }
.badge-hot { background: var(--red); color: #fff; }
.price { font-size: 30px; font-weight: 800; color: var(--red-deep); }
.save { color: var(--ok); font-size: 13px; font-weight: 800; margin-top: 4px; }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr);
  background: #fffaf3; border-top: 1px solid var(--line);
  padding: 8px 8px env(safe-area-inset-bottom);
  box-shadow: 0 -8px 24px rgba(18, 8, 5, .08);
}
.nav a { text-align: center; color: var(--muted); font-size: 12px; font-weight: 800; padding: 8px 4px; border-radius: 14px; }
.nav a.on { color: var(--gold-ink); background: #f0c94a; }

.saldo-chip {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border-radius: 999px; padding: 8px 8px 8px 14px;
  box-shadow: var(--shadow); margin-bottom: 14px;
}
.saldo-chip b { font-size: 22px; }
.saldo-chip a {
  margin-left: auto; background: linear-gradient(180deg, #f0c94a, #c99614); color: var(--gold-ink);
  font-weight: 800; border-radius: 999px; padding: 10px 14px; font-size: 13px;
}

.how {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 8px 0 16px;
}
.how div {
  background: rgba(255,255,255,.72); border-radius: 16px; padding: 10px 8px; text-align: center;
  font-size: 12px; font-weight: 800; color: var(--muted);
}
.how b { display: block; color: var(--gold); font-size: 18px; margin-bottom: 2px; }

.prize {
  display: block; color: inherit; background: #fff; border-radius: 22px;
  padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.prize .top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.prize h3 { font-size: 20px; margin: 8px 0 4px; }
.prize .desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mine { font-weight: 800; color: var(--teal-ink); margin-top: 8px; }
.quick { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.quick button, .quick a {
  flex: 1; min-height: 44px; border-radius: 12px; border: 0; font: 800 14px "DM Sans", sans-serif;
  background: #fff1d2; color: var(--gold-ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.quick .go { background: linear-gradient(180deg, #f0c94a, #c99614); color: var(--gold-ink); flex: 1.4; }

.pack { position: relative; overflow: hidden; }
.pack.featured {
  border: 2px solid var(--gold);
  background: linear-gradient(180deg, #fff6d8, #fff);
}
.step { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 16px 0; }
.step button {
  width: 56px; height: 56px; border-radius: 50%; border: 0;
  background: linear-gradient(180deg, #f0c94a, #c99614); color: var(--gold-ink); font-size: 28px; font-weight: 800;
}
.step span { font-size: 40px; min-width: 52px; text-align: center; font-weight: 800; }
.topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.topbar a { font-weight: 800; font-size: 14px; }
.topbar img {
  width: 44px; height: 44px; object-fit: cover; border-radius: 50%;
  border: 2px solid rgba(230,180,34,.85); background: #fff;
}
.pix-box {
  word-break: break-all; font-size: 12px; background: #fff7ea;
  padding: 12px; border-radius: 12px; margin: 10px 0;
}
.admin-nav { display: flex; gap: 8px; overflow: auto; margin-bottom: 14px; padding-bottom: 4px; }
.admin-nav a {
  white-space: nowrap; padding: 10px 14px; border-radius: 999px;
  background: #fff; color: var(--muted); font-size: 13px; font-weight: 800;
  box-shadow: var(--shadow);
}
.admin-nav a.on { color: var(--gold-ink); background: var(--gold); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { text-align: center; }
.stat strong { font-size: 28px; }
.tiles { display: grid; gap: 12px; }
.tile {
  display: block; background: #fff; border-radius: 22px; padding: 18px; color: inherit;
  box-shadow: var(--shadow);
}
.tile b { display: block; font-size: 20px; margin-bottom: 4px; }
.tile.primary { background: linear-gradient(180deg, #f0c94a, #c99614); color: var(--gold-ink); }
details.more { margin: 14px 0; }
details.more summary { cursor: pointer; font-weight: 800; color: var(--muted); }
.check { display: flex; align-items: center; gap: 10px; margin: 12px 0; }
.check input { width: 22px; min-height: 22px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.prize-table-wrap { padding: 0; overflow: hidden; }
.prize-table { margin: 0; }
.prize-table thead th {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  background: #fff8ee;
  padding: 10px 12px;
}
.prize-table td { padding: 12px; vertical-align: top; }
.prize-table td:first-child,
.prize-table th:first-child {
  width: 44px;
  text-align: center;
  font-weight: 800;
  color: var(--red-deep);
}
.prize-table tbody tr:last-child td { border-bottom: 0; }
.prize-table tbody td:last-child { font-weight: 700; line-height: 1.35; }
.hello { font-size: 15px; font-weight: 800; color: var(--muted); }
.qr { width: min(260px, 80vw); image-rendering: pixelated; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.chips button {
  border: 0; background: #fff1d2; color: var(--gold-ink); font-weight: 800;
  border-radius: 999px; padding: 10px 14px; min-height: 42px; cursor: pointer;
}
.pack-opt {
  display: flex; gap: 12px; align-items: flex-start;
  background: #fff; border-radius: 18px; padding: 14px;
  margin-bottom: 10px; box-shadow: var(--shadow);
  border: 2px solid transparent; cursor: pointer;
}
.pack-opt.featured { border-color: var(--gold); }
.pack-opt input { width: 22px; min-height: 22px; margin-top: 6px; }
.pack-opt span { display: flex; flex-direction: column; }
.pack-opt .price { font-size: 22px; }

body.app.home {
  max-width: 480px;
  margin: 0 auto;
  padding: 28px 16px calc(28px + env(safe-area-inset-bottom));
  background:
    radial-gradient(900px 420px at 50% -8%, rgba(230,180,34,.28), transparent 55%),
    linear-gradient(180deg, #120805 0%, #2a0e0a 32%, #f4e6d4 32%);
}
.home-brand {
  text-align: center;
  margin: 0 0 20px;
  color: #fff;
}
.home-brand img {
  width: 118px; height: 118px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(230,180,34,.85);
  background: #fff;
  box-shadow: 0 12px 28px rgba(0,0,0,.32);
}
.home-brand .kicker {
  font-size: .7rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 10px 0 2px;
}
.home-brand strong {
  display: block;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-weight: 400;
  font-size: 34px;
  letter-spacing: .04em;
  line-height: 1.05;
  margin-top: 0;
}
.home-brand span {
  display: block;
  color: rgba(246, 234, 215, .78);
  font-size: 13px;
  font-weight: 700;
}
.home-card {
  position: relative;
  z-index: 2;
  background: var(--card);
  border: 1px solid rgba(230,180,34,.28);
  border-radius: 24px;
  padding: 16px 16px 18px;
  box-shadow: var(--shadow);
}
.home-card > label:first-of-type { margin-top: 0; }
