:root {
  --bg: #1a0b2e; --bg2: #2a1246; --card: #241540; --line: #3d2563;
  --text: #fdf6ff; --muted: #c9b8e3; --orange: #ff8c1a; --orange2: #ffb347;
  --green: #7bd36b; --red: #ff6b6b;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text); line-height: 1.5;
  background: radial-gradient(1200px 600px at 50% -10%, #4a1d6e 0%, var(--bg) 55%) fixed, var(--bg);
  min-height: 100vh;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; }
.hero { text-align: center; padding: 16px 0 24px; }
.hero-emoji { font-size: 52px; line-height: 1; }
.kicker { margin: 10px 0 2px; color: var(--orange2); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; }
h1 { margin: 0; font-size: clamp(30px, 6vw, 44px); line-height: 1.1; color: #fff; text-shadow: 0 2px 0 #000a; }
.lead { color: var(--muted); max-width: 560px; margin: 14px auto 0; font-size: 17px; }
.count { display: inline-block; margin-top: 14px; padding: 6px 14px; border-radius: 999px; background: #0007; color: var(--orange2); font-weight: 600; font-size: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: 0 10px 40px #0006; margin-bottom: 18px; }
h2 { margin: 0; font-size: 20px; }
.fields { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin-bottom: 18px; }
@media (max-width: 520px) { .fields { grid-template-columns: 1fr; } }
label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; color: var(--muted); }
input[type=text], input[type=password] {
  font: inherit; font-size: 17px; color: var(--text); background: #0006; border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; width: 100%;
}
input:focus { outline: 2px solid var(--orange); outline-offset: 1px; border-color: var(--orange); }
.picks-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.picked { color: var(--orange2); font-weight: 700; font-size: 14px; }
.options { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.opt {
  position: relative; display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
  font: inherit; color: var(--text); background: #0005; border: 2px solid var(--line); border-radius: 14px;
  padding: 14px 44px 14px 14px; cursor: pointer; transition: transform .08s, border-color .15s, background .15s;
}
.opt:hover { border-color: var(--orange2); transform: translateY(-1px); }
.opt.on { border-color: var(--orange); background: #ff8c1a22; }
.opt-emoji { font-size: 22px; line-height: 1; white-space: nowrap; }
.opt-label { font-weight: 700; font-size: 16px; }
.badge {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--orange); color: #1a0b2e; font-weight: 800; font-size: 14px;
  opacity: 0; transition: opacity .15s;
}
.opt.on .badge { opacity: 1; }
.btn {
  display: block; width: 100%; margin-top: 18px; font: inherit; font-weight: 800; font-size: 18px;
  color: #1a0b2e; background: linear-gradient(180deg, var(--orange2), var(--orange)); border: 0;
  border-radius: 14px; padding: 15px; cursor: pointer; box-shadow: 0 6px 0 #a3500a;
}
.btn:active { transform: translateY(3px); box-shadow: 0 3px 0 #a3500a; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.btn.secondary { background: #0007; color: var(--text); box-shadow: none; border: 1px solid var(--line); }
.btn.danger { background: #ff6b6b; box-shadow: 0 6px 0 #8f2a2a; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; font-size: 15px; }
.saved { background: #7bd36b22; border: 1px solid #7bd36b66; }
.error { color: var(--red); font-weight: 600; margin: 12px 0 0; }
.results-note p { color: var(--muted); margin: 8px 0 14px; }
.bar-row { display: grid; grid-template-columns: minmax(150px, 1fr) 2fr 36px; gap: 10px; align-items: center; padding: 6px 0; }
.bar-label { font-weight: 600; font-size: 15px; }
.bar { height: 14px; background: #0006; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--orange2), var(--orange)); border-radius: 999px; min-width: 2px; }
.top .bar-fill { background: linear-gradient(90deg, #b6f3a8, var(--green)); }
.bar-num { text-align: right; font-weight: 800; }
@media (max-width: 520px) { .bar-row { grid-template-columns: 1fr 50px 28px; } .bar-label { font-size: 14px; } }
.foot { text-align: center; color: var(--muted); font-size: 13px; margin-top: 20px; }
.foot a { color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row .btn { margin-top: 0; width: auto; padding: 10px 16px; font-size: 15px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.pill.on { background: #7bd36b33; color: var(--green); }
.pill.off { background: #ff6b6b33; color: var(--red); }
.small { font-size: 13px; color: var(--muted); }
.x { background: none; border: 0; color: var(--red); cursor: pointer; font: inherit; font-weight: 700; padding: 2px 6px; }
