:root {
  --ink: #16171a;
  --ink-2: #1e2024;
  --line: #2c2f35;
  --paper: #f4f5f7;
  --cobalt: #3d6de0;
  --cobalt-dim: #2a4aa0;
  --amber: #ffc53d;
  --err: #ff6b6b;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--ink);
  color: var(--paper);
  font-family: "Inter", system-ui, sans-serif;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.wrap { width: 100%; max-width: 420px; }

.card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 22px 24px;
}

.hidden { display: none; }

.eyebrow {
  display: block;
  font-family: "Chakra Petch", monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--cobalt);
  font-weight: 600;
  margin-bottom: 6px;
}

.masthead h1 {
  font-family: "Bebas Neue", "Inter", sans-serif;
  font-size: 44px;
  letter-spacing: 0.02em;
  line-height: 1;
  margin: 0 0 22px;
  color: var(--paper);
}

.field { margin-bottom: 16px; }

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #a9adb6;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  font-size: 17px;
  color: var(--paper);
  font-family: inherit;
  appearance: none;
}

select {
  background-image: linear-gradient(45deg, transparent 50%, #a9adb6 50%), linear-gradient(135deg, #a9adb6 50%, transparent 50%);
  background-position: calc(100% - 20px) center, calc(100% - 15px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(61, 109, 224, 0.25);
}

input[type="file"] { display: none; }

.photo-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 84px;
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  color: #a9adb6;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.photo-picker.has-photo {
  border-style: solid;
  border-color: var(--cobalt);
  color: var(--paper);
}

.photo-picker img {
  max-height: 90px;
  border-radius: 6px;
  display: block;
}

.submit-btn {
  width: 100%;
  border: none;
  border-radius: 10px;
  background: var(--cobalt);
  color: #fff;
  font-family: "Chakra Petch", "Inter", sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.06em;
  padding: 15px;
  margin-top: 6px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

.submit-btn:active { transform: scale(0.98); }
.submit-btn:disabled { background: var(--cobalt-dim); cursor: wait; }

.submit-btn.ghost {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--paper);
  margin-top: 26px;
}

.error {
  color: var(--err);
  font-size: 13px;
  margin: 10px 0 0;
  min-height: 16px;
}

/* Scoreboard result view */
.scoreboard { text-align: center; }

.board {
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 18px;
  margin-top: 6px;
}

.board-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.board-label {
  font-family: "Chakra Petch", monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #7d818a;
  font-weight: 600;
}

.board-value {
  font-family: "Bebas Neue", monospace;
  font-variant-numeric: tabular-nums;
  font-size: 30px;
  color: var(--paper);
}

.board-divider {
  height: 1px;
  background: var(--line);
  margin: 16px 0;
}

.total-row .board-value.big {
  font-size: 56px;
  color: var(--amber);
  text-shadow: 0 0 18px rgba(255, 197, 61, 0.35);
}

@media (max-width: 360px) {
  .masthead h1 { font-size: 38px; }
  .total-row .board-value.big { font-size: 46px; }
}
