:root {
  --g: #0E9F6E; --g2: #0B7F58; --gl: #E7F7EF; --ink: #111827; --mute: #6B7280;
  --bg: #F6F7F4; --card: #fff; --line: #E5E7EB; --gold: #F5B301; --goldl: #FFF6D6;
  --red: #DC2626; --r: 20px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 20px; line-height: 1.3; color: var(--ink); background: var(--bg);
  max-width: 560px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; }
a { color: var(--g2); }
.top { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 10px 14px 0; }
.brand { font-weight: 800; font-size: 24px; display: flex; align-items: center; gap: 8px; }
.logo { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--g); color: #fff; font-size: 22px; }
.badge { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: var(--ink); color: #fff; padding: 4px 8px; border-radius: 999px; }
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 6px; }
.roles button { background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 8px 4px; font-size: 26px; display: flex; flex-direction: column; align-items: center; font-weight: 700; }
.roles button span { font-size: 15px; }
.roles button.on { border-color: var(--g); background: var(--gl); }
.demo-strip { text-align: center; font-size: 13px; font-weight: 700; color: #7C5800; background: var(--goldl); border-radius: 10px; padding: 4px; margin-bottom: 6px; }
main { flex: 1; padding: 8px 14px 120px; }
.foot { text-align: center; font-size: 13px; color: var(--mute); padding: 10px 0 90px; }

h1 { font-size: 34px; line-height: 1.1; margin: 10px 0 14px; }
h2 { font-size: 24px; margin: 18px 0 10px; }
.sub { color: var(--mute); font-size: 18px; margin: -6px 0 14px; }
.center { text-align: center; }
.card { background: var(--card); border-radius: var(--r); padding: 16px; border: 2px solid var(--line); margin-bottom: 12px; }

.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 68px; border-radius: var(--r); font-size: 24px; font-weight: 800; padding: 12px 18px; margin: 10px 0; background: var(--card); border: 2px solid var(--line); text-decoration: none; color: var(--ink); }
.btn.go { background: var(--g); color: #fff; border-color: var(--g); box-shadow: 0 6px 0 var(--g2); }
.btn.go:active { transform: translateY(3px); box-shadow: 0 3px 0 var(--g2); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #3B2A00; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 54px; font-size: 20px; }
.btn[disabled] { opacity: .45; box-shadow: none; }
.sticky { position: fixed; left: 50%; transform: translateX(-50%); bottom: 34px; width: min(532px, calc(100% - 28px)); z-index: 4; margin: 0; }
.sticky:active { transform: translateX(-50%) translateY(3px); }
.back { background: none; font-size: 20px; font-weight: 700; color: var(--mute); padding: 8px 0; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.item { background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: 14px 10px; text-align: center; position: relative; }
.item.in { border-color: var(--g); background: var(--gl); }
.item .e { font-size: 54px; line-height: 1.1; }
.item .n { font-weight: 800; font-size: 20px; }
.item .p { color: var(--mute); font-size: 18px; }
.item .q { position: absolute; top: 8px; right: 8px; background: var(--g); color: #fff; font-weight: 800; border-radius: 999px; min-width: 34px; height: 34px; display: grid; place-items: center; font-size: 18px; }
.item .minus { position: absolute; top: 8px; left: 8px; width: 34px; height: 34px; border-radius: 999px; background: #fff; border: 2px solid var(--line); font-weight: 900; font-size: 20px; line-height: 1; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; }
.row + .row { border-top: 1px solid var(--line); }
.row.total { font-weight: 900; font-size: 24px; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button { width: 46px; height: 46px; border-radius: 14px; background: var(--bg); border: 2px solid var(--line); font-size: 24px; font-weight: 900; }
.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pick button { background: var(--card); border: 3px solid var(--line); border-radius: var(--r); padding: 16px 6px; font-size: 22px; font-weight: 800; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pick button .e { font-size: 44px; }
.pick button.on { border-color: var(--g); background: var(--gl); }
.note { background: var(--gl); color: var(--g2); font-weight: 700; border-radius: 16px; padding: 12px 14px; font-size: 18px; margin: 12px 0; }
.note.warn { background: #FEF2F2; color: #991B1B; }
.note.gold { background: var(--goldl); color: #6B4E00; }

.status { text-align: center; padding: 18px 10px; }
.status .big { font-size: 96px; line-height: 1; }
.status .word { font-size: 36px; font-weight: 900; margin-top: 8px; }
.steps { display: flex; gap: 6px; justify-content: center; margin: 14px 0 4px; }
.steps i { width: 44px; height: 10px; border-radius: 999px; background: var(--line); }
.steps i.on { background: var(--g); }
.lock { display: flex; gap: 14px; align-items: center; background: #F3F4F6; border: 2px dashed #D1D5DB; border-radius: var(--r); padding: 16px; font-weight: 800; font-size: 20px; color: #4B5563; }
.lock .e { font-size: 40px; }

.pin { font-size: 88px; font-weight: 900; letter-spacing: .12em; text-align: center; font-variant-numeric: tabular-nums; margin: 6px 0; }
.qr { width: 220px; height: 220px; margin: 0 auto; background: #fff; border-radius: 16px; padding: 8px; border: 2px solid var(--line); }
.qr svg { width: 100%; height: 100%; display: block; }

.tips { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tips button { background: var(--card); border: 3px solid var(--line); border-radius: var(--r); padding: 16px 6px; display: flex; flex-direction: column; align-items: center; }
.tips button b { font-size: 34px; }
.tips button small { color: var(--mute); font-size: 16px; font-weight: 700; }
.tips button .pts { color: #8A6400; font-size: 14px; font-weight: 800; }
.tips button.on { border-color: var(--g); background: var(--gl); }
.custom { display: flex; margin-bottom: 4px; gap: 10px; align-items: center; }
.custom input { flex: 1; min-width: 0; width: 0; min-height: 64px; border-radius: var(--r); border: 2px solid var(--line); font: inherit; font-size: 28px; font-weight: 800; padding: 0 16px; }

.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.pad button { min-height: 72px; border-radius: var(--r); background: var(--card); border: 2px solid var(--line); font-size: 32px; font-weight: 800; }
.pad button.ok { background: var(--g); color: #fff; border-color: var(--g); }
.boxes { display: flex; gap: 10px; justify-content: center; margin: 10px 0; }
.boxes span { width: 64px; height: 80px; border-radius: 16px; border: 3px solid var(--line); background: #fff; display: grid; place-items: center; font-size: 44px; font-weight: 900; }
.boxes span.f { border-color: var(--g); }
.shake { animation: sh .35s; }
@keyframes sh { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

.ocard { background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 12px; }
.ocard .hd { display: flex; justify-content: space-between; align-items: center; font-weight: 900; font-size: 22px; }
.tag { font-size: 14px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: #F3F4F6; }
.tag.d { background: #E0F2FE; color: #075985; }
.tag.p { background: #FCE7F3; color: #9D174D; }
.ocard .its { color: var(--mute); font-size: 18px; margin: 6px 0; }
.money { font-size: 40px; font-weight: 900; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 12px; }
.tabs button { min-height: 52px; border-radius: 14px; background: var(--card); border: 2px solid var(--line); font-weight: 800; font-size: 19px; }
.tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.big-num { font-size: 64px; font-weight: 900; text-align: center; }

.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--goldl); color: #6B4E00; border-radius: 999px; padding: 6px 12px; font-weight: 800; font-size: 17px; text-decoration: none; }
.bar { height: 16px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--gold); }
.nopurchase { font-weight: 900; font-size: 18px; text-align: center; background: #fff; border: 2px solid var(--ink); border-radius: 14px; padding: 10px; margin: 12px 0; }
.prize { display: flex; align-items: center; gap: 14px; }
.prize .e { font-size: 44px; }
.ex { font-size: 12px; font-weight: 900; text-transform: uppercase; background: #F3F4F6; color: #374151; border-radius: 999px; padding: 2px 8px; }
.field { display: block; margin: 12px 0; font-weight: 800; }
.field input[type=text] { display: block; width: 100%; min-height: 60px; margin-top: 6px; border-radius: 16px; border: 2px solid var(--line); font: inherit; padding: 0 14px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 700; font-size: 18px; }
.check input { width: 30px; height: 30px; flex: none; accent-color: var(--g); }
.rules { font-size: 17px; }
.rules h3 { margin: 16px 0 4px; font-size: 19px; }
.lawyer { background: var(--red); color: #fff; font-weight: 900; text-align: center; border-radius: 14px; padding: 10px; }
.banner { display: flex; align-items: center; gap: 12px; background: var(--card); border: 2px solid var(--g); border-radius: var(--r); padding: 12px 14px; width: 100%; text-align: left; margin-bottom: 10px; font-weight: 800; }
.banner .e { font-size: 34px; }
.banner small { display: block; color: var(--mute); font-weight: 700; font-size: 15px; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 112px; width: min(532px, calc(100% - 28px)); background: var(--ink); color: #fff; border-radius: 18px; padding: 10px 10px 10px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; z-index: 10; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.toast[hidden] { display: none; }
.toast button { background: #fff; color: var(--ink); border-radius: 14px; min-height: 52px; padding: 0 18px; font-weight: 900; font-size: 20px; }
.err { color: var(--red); font-weight: 800; text-align: center; min-height: 26px; }
