@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=Inter:wght@400;500;600&display=swap");

:root {
  --bg: #0c0d10; --band: #121419; --panel: #1a1d24; --fg: #eef0f5; --muted: #9097a8; --line: #2a2e38;
  --accent: #1fb5ec; --accent-fg: #ffffff; --ok: #3cc487; --bad: #ef6a6a;
  --display: "Space Grotesk", system-ui, sans-serif; --body: "Inter", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg) center top / cover no-repeat fixed; color: var(--fg); font: 14px/1.5 var(--body); min-height: 100vh; }
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }

.banner { height: 160px; background: var(--band) center / cover no-repeat; border-bottom: 1px solid var(--line); }
.shell {
  max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px;
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px));
}
@media (max-width: 760px) { .shell { grid-template-columns: 1fr; gap: 20px; } .banner { height: 90px; } }

.side { display: flex; flex-direction: column; gap: 6px; margin-top: -60px; min-width: 0; }
@media (max-width: 760px) { .side { margin-top: -44px; } }
.avatar { width: 120px; height: 120px; border-radius: 12px; border: 3px solid var(--bg); background: var(--panel) center / cover no-repeat; }
@media (max-width: 760px) { .avatar { width: 84px; height: 84px; } }
.side h2 { font-size: 21px; margin-top: 8px; overflow-wrap: anywhere; }
.side .link { color: var(--muted); font-size: 13px; text-decoration: none; }
.side p { margin: 0; color: var(--muted); overflow-wrap: anywhere; } .side p b { color: var(--fg); }
.earn { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.about { margin-top: 10px !important; white-space: pre-line; }

.main { display: flex; flex-direction: column; gap: 16px; padding-top: 28px; min-width: 0; }
@media (max-width: 760px) { .main { padding-top: 0; } }
.eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.main h1 { font-size: 26px; margin-top: 2px; overflow-wrap: anywhere; }
.desc { margin: 6px 0 0; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.prize { width: 100%; max-height: 320px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); display: block; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; gap: 8px; }
.stats strong { display: block; font-family: var(--display); font-size: 26px; font-variant-numeric: tabular-nums; }
.stats span { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }

.enter { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.row h3 { font-size: 16px; }
.price { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; display: flex; align-items: center; gap: 6px; }
.price b { font-family: var(--display); font-size: 20px; }
.price span { color: var(--muted); font-size: 12px; }
.picon { width: 18px; height: 18px; object-fit: contain; vertical-align: -3px; }
.meta { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .3s; }
.you { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.you b { color: var(--fg); font-variant-numeric: tabular-nums; }
.buy { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.buy .cost { color: var(--muted); } .buy .cost b { color: var(--fg); }

input, select, textarea {
  font: 500 14px var(--body); color: var(--fg); background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 10px; max-width: 100%;
}
textarea { resize: vertical; min-height: 70px; width: 100%; }
input[type="number"].qty { width: 96px; text-align: center; font-size: 15px; }
input[type="color"] { padding: 2px; width: 48px; height: 38px; }

.btn {
  background: var(--accent); color: var(--accent-fg); border: 0; border-radius: 999px; padding: 10px 22px;
  font: 600 14px var(--body); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; justify-content: center;
}
.btn.push { margin-left: auto; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: var(--accent); color: var(--accent-fg); border: 0; }
.btn.ghost:hover, .btn:hover { filter: brightness(1.08); }
.btn.small { padding: 7px 14px; font-size: 13px; }
.btn.danger { background: transparent; color: var(--bad); border: 1px solid var(--bad); }
.btn.twitch { background: var(--accent); color: var(--accent-fg); }
:is(.btn, input, select, textarea, button):focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.msg { font-size: 13px; min-height: 20px; margin: 0; }
.msg.ok { color: var(--ok); } .msg.err { color: var(--bad); }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.winner { text-align: center; display: flex; flex-direction: column; gap: 4px; align-items: center; padding: 10px 0; }
.winner .n { font-family: var(--display); font-size: 30px; font-weight: 700; color: var(--accent); overflow-wrap: anywhere; }

.foot { font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.foot button { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }

.notice { max-width: 560px; margin: 60px auto; padding: 0 16px; }
.notice code { background: var(--panel); padding: 2px 6px; border-radius: 6px; }
