body { background: radial-gradient(circle at 50% -10%, #3a1263 0, var(--bg) 55%) fixed; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  background: #12061fe6; backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { font-weight: 800; font-size: 22px; text-decoration: none;
  background: linear-gradient(180deg, #fff6c9, var(--gold) 50%, var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.who { margin-left: auto; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wrap { max-width: 920px; margin: 0 auto; padding: 16px; display: grid; gap: 16px; padding-bottom: 80px; }
.loading { color: var(--muted); padding: 40px; text-align: center; }
.crumb a { color: var(--muted); text-decoration: none; }
.card { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card h2 { margin: 0 0 12px; font-size: 19px; font-weight: 600; color: var(--gold); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.row > .input { flex: 1; min-width: 180px; }
.row.tight { gap: 8px; margin: 0; }
.input { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #0e0519; color: var(--text); outline: none; }
.input:focus { border-color: var(--gold); }
.row > .input.qty { width: 100px; min-width: 0; flex: none; }
.field { display: grid; gap: 4px; margin-bottom: 12px; }
.field > span { font-size: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }

.btn { border: 0; border-radius: 10px; padding: 10px 16px; color: var(--text); background: var(--panel-2); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.small { padding: 6px 12px; font-size: 14px; }
.btn.big { padding: 14px 28px; font-size: 18px; }
.btn.gold { background: linear-gradient(180deg, #ffe07a, var(--gold) 40%, var(--gold-2)); color: #3a1a00; font-weight: 600; box-shadow: 0 3px 0 #8a4b00; }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.danger { background: #5a1022; color: #ffd0d8; }
.btn.pulse { animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px #ffc83d55, 0 3px 0 #8a4b00; } }

.pin-list { display: grid; gap: 8px; }
.pin-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; background: #0e051966; flex-wrap: wrap; }
.pin-code { font-size: 26px; font-weight: 800; letter-spacing: 4px; color: var(--gold); font-variant-numeric: tabular-nums; }

.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.event-card { display: grid; gap: 4px; padding: 14px; border-radius: 12px; background: #0e051999; border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: .15s; }
.event-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.event-name { font-size: 18px; font-weight: 600; }

.screen-link { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.screen-link:first-of-type { border-top: 0; }
.screen-icon { font-size: 28px; width: 40px; text-align: center; }
.screen-title { font-weight: 600; }
.url { font-size: 12px; color: var(--muted); word-break: break-all; }

.sym-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.sym-row p { margin: 0 0 6px; }
.sym-preview { width: 110px; height: 110px; object-fit: contain; border-radius: 16px; padding: 8px;
  background: radial-gradient(circle, #fff 0, #e9e2f5 70%); box-shadow: 0 0 0 3px var(--gold), 0 0 24px #ffc83d66; }

.prize-list { display: grid; gap: 10px; margin-bottom: 12px; }
.prize-row { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; background: #0e051999; border: 1px solid var(--line); }
.prize-row.is-jackpot { border-color: var(--gold); box-shadow: 0 0 18px #ffc83d44; }
.prize-thumb { width: 84px; height: 84px; flex: none; border-radius: 12px; background: #fff; display: grid; place-items: center; cursor: pointer; overflow: hidden; }
.prize-thumb img { width: 100%; height: 100%; object-fit: contain; }
.prize-thumb span { color: #6d5b8c; font-size: 13px; text-align: center; white-space: pre-line; }
.prize-fields { flex: 1; min-width: 0; display: grid; gap: 6px; }
.prize-tools { display: grid; gap: 4px; }
.icon-btn { width: 32px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); }
.icon-btn.danger { color: var(--red); }
.jack-toggle { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; cursor: pointer; user-select: none; }
.jack-toggle input { display: none; }
.jack-toggle.on { background: linear-gradient(180deg, #ffe07a, var(--gold-2)); color: #3a1a00; border-color: transparent; font-weight: 600; }

.save-bar { position: sticky; bottom: 12px; z-index: 10; display: flex; justify-content: center; }

.win-list { display: grid; gap: 8px; max-height: 520px; overflow: auto; }
.win-row { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 10px; background: #0e051966; }
.win-row.is-jackpot { box-shadow: inset 0 0 0 1px var(--gold); }
.win-photo { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; }
.win-photo.none { display: grid; place-items: center; background: #ffffff10; color: var(--muted); font-size: 11px; }
.danger-zone { border-color: #5a1022; }

.modal { position: fixed; inset: 0; background: #000b; display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-align: center; display: grid; gap: 12px; justify-items: center; max-width: 360px; width: 100%; }
.modal-box h3 { margin: 0; }
.qr { width: 260px; max-width: 100%; height: auto; image-rendering: pixelated; border-radius: 8px; background: #fff; }

@media (max-width: 560px) {
  .prize-row { flex-wrap: wrap; }
  .prize-tools { grid-auto-flow: column; }
  .who { display: none; }
}
