:root {
  --bg1: #1a1240;
  --bg2: #0b0820;
  --card: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.16);
  --text: #f6f3ff;
  --muted: #b3acd6;
  --accent: #ffd23f;
  --pink: #ff3d81;
  --teal: #2ee6c5;
  --danger: #ff6b81;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100vh; min-height: 100dvh;
  color: var(--text);
  font-family: -apple-system, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(255, 61, 129, 0.28), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, rgba(46, 230, 197, 0.2), transparent 60%),
    linear-gradient(160deg, var(--bg1), var(--bg2));
  background-attachment: fixed;
  display: flex; flex-direction: column; align-items: center;
  padding: 20px 16px calc(24px + env(safe-area-inset-bottom));
}
.wrap { width: 100%; max-width: 460px; }
.center { margin: auto 0; }

h1, h2 { margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 30px; font-weight: 900; line-height: 1.1; }
h2 { font-size: 22px; font-weight: 800; }
p { color: var(--muted); line-height: 1.5; margin: 8px 0 0; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent);
}

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

input[type="text"], input[type="password"], input[type="tel"] {
  width: 100%; font: inherit; font-size: 18px; color: var(--text);
  background: rgba(0, 0, 0, 0.28); border: 1.5px solid var(--line);
  border-radius: 14px; padding: 16px 16px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: #8b84b3; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255, 210, 63, 0.18); }
.field + .field { margin-top: 12px; }

.btn {
  display: block; width: 100%; border: 0; cursor: pointer; font: inherit; font-size: 18px; font-weight: 800;
  padding: 17px 18px; border-radius: 14px; color: #1a1240; text-align: center; text-decoration: none;
  background: linear-gradient(180deg, #ffe066, var(--accent));
  box-shadow: 0 6px 0 #c79a00, 0 12px 24px rgba(0, 0, 0, 0.3);
  transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #c79a00, 0 6px 12px rgba(0, 0, 0, 0.3); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.ghost {
  background: transparent; color: var(--text); border: 1.5px solid var(--line); box-shadow: none; font-weight: 700;
}
.btn.ghost:active { transform: none; background: var(--card); }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.row > .grow { flex: 2; }
.stack > * + * { margin-top: 12px; }

.err { color: var(--danger); font-size: 15px; min-height: 20px; margin: 12px 2px 0; font-weight: 600; }
.hidden { display: none !important; }

/* Spill */
.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.who { font-size: 14px; color: var(--muted); font-weight: 600; }
.bar { height: 8px; background: rgba(255, 255, 255, 0.12); border-radius: 99px; overflow: hidden; margin-bottom: 16px; }
.bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--pink), var(--accent)); transition: width .3s; }

.pic {
  position: relative; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden;
  background: linear-gradient(135deg, #2b2063, #3a1b57); border: 1px solid var(--line);
}
.pic img, .pic svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.pic .num {
  position: absolute; left: 10px; top: 10px; background: rgba(11, 8, 32, 0.8);
  border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; font-size: 13px; font-weight: 800; color: var(--accent);
}
.q-title { font-size: 24px; font-weight: 900; margin: 16px 0 2px; line-height: 1.15; }
.q-desc { margin: 0 0 14px; font-size: 15px; }
.price { position: relative; }
.price input { font-size: 34px; font-weight: 900; text-align: center; padding: 14px 70px 14px 16px; letter-spacing: .02em; }
.price span { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 800; color: var(--accent); }

.selfie {
  width: 220px; height: 220px; margin: 18px auto; border-radius: 50%; overflow: hidden;
  border: 4px solid var(--accent); box-shadow: 0 0 0 8px rgba(255, 210, 63, 0.15);
  background: rgba(0, 0, 0, 0.3); display: grid; place-items: center; font-size: 70px;
}
.selfie img { width: 100%; height: 100%; object-fit: cover; }

.review { list-style: none; padding: 0; margin: 14px 0 0; }
.review li {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer;
  padding: 13px 4px; border-bottom: 1px solid var(--line); font-size: 16px;
}
.review li b { color: var(--accent); white-space: nowrap; }
.review li.missing b { color: var(--danger); }

.check { font-size: 64px; text-align: center; }

/* Resultater */
.stage { text-align: center; }
.place {
  font-size: 15px; font-weight: 900; letter-spacing: .3em; text-transform: uppercase; color: var(--accent);
}
.place.big { font-size: 20px; color: var(--pink); }
.frame {
  position: relative; width: min(78vw, 340px); aspect-ratio: 1; margin: 18px auto; border-radius: 26px; overflow: hidden;
  border: 4px solid var(--accent); box-shadow: 0 0 60px rgba(255, 210, 63, 0.25); background: #000;
}
.frame canvas, .frame img { width: 100%; height: 100%; display: block; object-fit: cover; }
.frame.first { border-color: var(--pink); box-shadow: 0 0 80px rgba(255, 61, 129, 0.5); }
.name {
  font-size: 40px; font-weight: 900; line-height: 1.1; margin-top: 4px; opacity: 0; transform: translateY(12px);
  transition: opacity .8s, transform .8s; word-break: break-word;
}
.name.show { opacity: 1; transform: none; }
.sub { opacity: 0; transition: opacity .8s .5s; }
.sub.show { opacity: 1; }
.trophy { font-size: 56px; }
canvas.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 10; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 6px; text-align: right; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { text-align: left; }
th { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
td.win { color: var(--accent); font-weight: 800; }
.board { list-style: none; margin: 12px 0 0; padding: 0; }
.board li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.board img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.board .pos { width: 26px; font-weight: 900; color: var(--accent); }
.board .nm { flex: 1; font-weight: 700; }
.board .pc { color: var(--muted); font-size: 14px; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; font: inherit; font-size: 14px; cursor: pointer; padding: 8px; }
