:root {
  --bg: #070b14;
  --ink: #e8f1ff;
  --muted: #8b9bb8;
  --accent: #ff2d95;
  --cyan: #22d3ee;
  --card: rgba(10, 16, 32, 0.86);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", "Avenir Next", Futura, system-ui, sans-serif;
  user-select: none;
  touch-action: none;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  cursor: none;
}

#hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

#hud-left {
  position: absolute;
  top: 18px;
  left: 20px;
}

#brand {
  font-weight: 800;
  letter-spacing: 0.28em;
  font-size: 13px;
  color: var(--cyan);
}

#coverage {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 12px #000;
}

#roster {
  margin-top: 12px;
  width: 168px;
  padding: 10px 12px 8px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  backdrop-filter: blur(8px);
}

.crew-block { margin-bottom: 8px; }
.crew-block:last-child { margin-bottom: 0; }
.crew-block.mine .crew-name { color: #ffc078; }
.crew-name {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 4px;
}
#roster ol { list-style: none; font-size: 13px; }
#roster li { padding: 2px 0; }
#roster li.you { font-weight: 700; }
#roster li.down { opacity: 0.4; }

#hud-center {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

#toast {
  margin-top: 6px;
  min-height: 1.2em;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 12px #000;
}

#board {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 210px;
  padding: 12px 14px 10px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  backdrop-filter: blur(8px);
}

.board-title {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin-bottom: 8px;
}

#board-list {
  list-style: none;
  font-size: 13px;
}

#board-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
}

#board-list .you { font-weight: 700; }

.swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

#inkbar-wrap {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
  width: min(420px, 70vw);
  text-align: center;
}

#inkbar {
  height: 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#inkbar span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  transform-origin: left;
}

#hint {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

#splash {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  background:
    radial-gradient(800px 500px at 20% 20%, rgba(255, 45, 149, 0.22), transparent 55%),
    radial-gradient(700px 500px at 80% 80%, rgba(34, 211, 238, 0.18), transparent 50%),
    var(--bg);
}

#splash.hidden { display: none; }

#results {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  background: rgba(7, 11, 20, 0.62);
  backdrop-filter: blur(6px);
}
#results.hidden { display: none; }

.results-card h1 {
  font-size: 34px;
  margin-bottom: 6px;
}
#results-score {
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin-bottom: 16px;
  letter-spacing: 0.06em;
}
#results-lots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  text-align: left;
  font-size: 13px;
  margin-bottom: 14px;
}
#results-lots span { color: var(--muted); }
#results-crews {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  text-align: left;
  font-size: 13px;
  margin-bottom: 18px;
}
#results-crews .crew-name { margin-bottom: 6px; }
#results-crews ol { list-style: none; }
#results-crews li { padding: 2px 0; }
#results-crews li.you { font-weight: 700; }
#again { margin-top: 4px; }

.splash-card {
  width: min(420px, 90vw);
  padding: 36px 32px 28px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  text-align: center;
  pointer-events: auto;
}

.kicker {
  letter-spacing: 0.32em;
  font-size: 11px;
  color: var(--cyan);
  margin-bottom: 10px;
}

h1 {
  font-size: 44px;
  letter-spacing: 0.12em;
  line-height: 1;
  margin-bottom: 10px;
}

.tag {
  color: var(--muted);
  margin-bottom: 22px;
}

label {
  display: block;
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}

input {
  width: 100%;
  margin: 8px 0 18px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: white;
  font-size: 16px;
  outline: none;
}

input:focus { border-color: var(--cyan); }

button {
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--accent), #ff6b3d);
  color: white;
  font-weight: 800;
  letter-spacing: 0.22em;
  cursor: pointer;
  font-size: 15px;
}

button:hover { filter: brightness(1.08); }

.fine {
  margin-top: 14px;
  font-size: 11px;
  color: var(--muted);
}
