:root {
  --bg: #0b0f14; --bg2: #0e1420; --panel: #141b26; --panel2: #1b2432; --line: #263141;
  --text: #eaf1f8; --muted: #8797a9; --accent: #2ea043; --accent2: #238636;
  --accentglow: rgba(46,160,67,.35); --warn: #e3b341; --danger: #f85149; --chip-off: #2b3442;
  --radius: 14px; --shadow: 0 8px 30px rgba(0,0,0,.4);
}
* { box-sizing: border-box; }
body {
  margin: 0; background: radial-gradient(1200px 600px at 50% -10%, #121c2b 0%, var(--bg) 55%) fixed;
  color: var(--text); font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(11,15,20,.82); backdrop-filter: blur(10px); z-index: 10;
}
.brand { font-size: 20px; font-weight: 800; letter-spacing: .2px; }
.brand .logo { margin-right: 6px; }
.brand .bd { color: var(--accent); }
.chip { padding: 6px 13px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.chip-off { background: var(--chip-off); color: var(--muted); }
.chip-on { background: rgba(46,160,67,.16); color: #58d977; border: 1px solid var(--accent2); }
.chip-warn { background: rgba(227,179,65,.15); color: var(--warn); border: 1px solid var(--warn); }

.hero { max-width: 860px; margin: 34px auto 6px; padding: 0 20px; text-align: center; }
.hero h1 { font-size: 30px; line-height: 1.15; margin: 0 0 10px; letter-spacing: -.5px; }
.hero p { color: var(--muted); max-width: 620px; margin: 0 auto; font-size: 15.5px; }
.stepper { display: flex; justify-content: center; gap: 10px; list-style: none; padding: 0; margin: 22px 0 0; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; font-weight: 600;
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); }
.step span { width: 20px; height: 20px; border-radius: 50%; background: var(--chip-off); color: var(--muted);
  display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.step.on { color: var(--text); border-color: var(--accent2); box-shadow: 0 0 0 3px var(--accentglow); }
.step.on span { background: var(--accent2); color: #fff; }
.step.done { color: #58d977; }
.step.done span { background: var(--accent); color: #06210f; }

main { max-width: 860px; margin: 26px auto; padding: 0 20px; display: grid; gap: 20px; }
.card {
  background: linear-gradient(180deg, var(--panel), var(--bg2)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); position: relative;
}
.card.is-locked { opacity: .5; pointer-events: none; filter: saturate(.6); }
.card-h { display: flex; align-items: center; gap: 11px; margin-bottom: 8px; }
.card-h h2 { margin: 0; font-size: 17px; font-weight: 700; }
.badge { width: 26px; height: 26px; border-radius: 50%; background: var(--accent2); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; font-weight: 400; }
.hidden { display: none !important; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
label.full { margin-top: 12px; }
input {
  background: var(--panel2); border: 1px solid var(--line); color: var(--text);
  padding: 11px 12px; border-radius: 10px; font-size: 14px; outline: none; transition: .15s;
}
input:focus { border-color: var(--accent2); box-shadow: 0 0 0 3px var(--accentglow); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pick { padding: 8px 14px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line);
  cursor: pointer; user-select: none; font-size: 13px; color: var(--muted); font-weight: 600; transition: .12s; }
.pick:hover { border-color: var(--accent2); }
.pick.sel { background: rgba(46,160,67,.18); border-color: var(--accent2); color: #6ee787; }

.prefgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 18px 0 6px; }
.pref { display: flex; flex-direction: column; gap: 9px; }
.preflabel { font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; }
.seg { display: inline-flex; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; flex-wrap: wrap; }
.seg button { background: transparent; color: var(--muted); border: none; border-right: 1px solid var(--line);
  padding: 9px 13px; cursor: pointer; font-size: 13px; font-weight: 700; transition: .12s; }
.seg button:last-child { border-right: none; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--accent2); color: #fff; }

.steppernum { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; width: fit-content; }
.steppernum button { background: var(--panel2); color: var(--text); border: none; width: 40px; height: 40px; font-size: 20px; cursor: pointer; }
.steppernum button:hover { background: var(--accent2); }
.steppernum input { width: 52px; text-align: center; border: none; border-radius: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); font-weight: 800; }

.switch { flex-direction: row; align-items: center; gap: 10px; color: var(--text); font-size: 14px; cursor: pointer; margin-top: 14px; font-weight: 600; }
.switch input { width: 20px; height: 20px; accent-color: var(--accent); }

.cta { display: flex; gap: 12px; align-items: center; margin-top: 20px; flex-wrap: wrap; }
.btn { background: var(--panel2); color: var(--text); border: 1px solid var(--line);
  padding: 11px 18px; border-radius: 11px; cursor: pointer; font-size: 14px; font-weight: 700; transition: .15s; }
.btn:hover { border-color: var(--accent2); }
.btn.primary { background: linear-gradient(180deg, var(--accent), var(--accent2)); border-color: var(--accent2); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); box-shadow: 0 6px 20px var(--accentglow); }
.btn.ghost { background: transparent; }
.btn.big { padding: 13px 22px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.warn-note { margin-top: 12px; color: var(--warn); }

.status { margin-top: 14px; font-size: 14px; min-height: 20px; }
.status.err { color: var(--danger); }
.status.ok { color: #58d977; }
.status.busy { color: var(--warn); }

.paste { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.paste summary { cursor: pointer; color: var(--accent); font-size: 14px; font-weight: 600; }
.paste code { background: var(--panel2); padding: 1px 6px; border-radius: 5px; font-size: 12px; }
.paste textarea { width: 100%; margin: 10px 0; background: var(--panel2); border: 1px solid var(--line);
  color: var(--text); border-radius: 10px; padding: 11px; font: 13px monospace; resize: vertical; }

/* held seats */
.heldbox { background: rgba(46,160,67,.10); border: 1px solid var(--accent2); border-radius: 12px; padding: 16px 18px; margin: 8px 0 14px; }
.held-title { font-size: 15px; margin-bottom: 10px; }
.held-title b { color: #6ee787; }
.held-seats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.seatchip { background: var(--accent); color: #06210f; font-weight: 800; padding: 7px 14px; border-radius: 9px; font-size: 14px; }
.row { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.row input { flex: 1; min-width: 160px; font-size: 16px; letter-spacing: 3px; text-align: center; }

/* seat map */
.pickbanner { background: linear-gradient(90deg, rgba(46,160,67,.2), transparent); border: 1px solid var(--accent2); border-radius: 10px; padding: 11px 14px; margin-bottom: 12px; }
.pickbanner b { color: #6ee787; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin: 4px 0 14px; font-size: 13px; color: var(--muted); }
.legend .dot { display: inline-block; width: 13px; height: 13px; border-radius: 4px; margin-right: 5px; vertical-align: -2px; }
.dot.free { background: #17311f; border: 1px solid var(--accent2); }
.dot.taken { background: #2b3442; }
.dot.pick { background: var(--accent); }
.dot.win { background: transparent; border: 2px solid var(--warn); }
.coaches { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.coach { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 13px; }
.coach-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; gap: 8px; }
.seatgrid { display: grid; gap: 5px; }
.seat { aspect-ratio: 1/1; min-height: 30px; display: flex; align-items: center; justify-content: center;
  border-radius: 7px; font-size: 11px; font-weight: 800; color: var(--text); user-select: none; }
.seat.gap { background: transparent; }
.seat.free { background: #17311f; border: 1px solid var(--accent2); color: #6ee787; }
.seat.taken { background: #2b3442; color: var(--muted); }
.seat.pick { background: var(--accent); color: #06210f; box-shadow: 0 0 0 2px #fff2 inset; }
.seat.win { outline: 2px solid var(--warn); outline-offset: -2px; }

.foot { text-align: center; padding: 24px; }

@media (max-width: 620px) {
  .grid, .grid.two { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 24px; }
}
