:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  background: #06121d;
  color: #f5f7fa;
  --muted: #a5b7c8;
  --line: #29445c;
  --blue: #77c5ff;
  --gold: #ffb627;
}
* { box-sizing: border-box; }
body { margin: 0; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1120px;
  margin: auto;
  padding: 15px 24px;
  border-bottom: 1px solid #1b3043;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.05em;
  text-decoration: none;
}
.brand span span { color: var(--blue); }
.crest { width: 44px; height: 44px; object-fit: contain; }
.ranking-link {
  padding: 11px 12px;
  color: var(--blue);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
}
.shell { max-width: 960px; margin: auto; padding: clamp(28px, 5vw, 64px) 24px; }
.intro { margin-bottom: 25px; }
.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
h1 { margin: 0; font-size: clamp(32px, 5vw, 52px); line-height: 1.03; letter-spacing: -.055em; }
h2 { margin: 0 0 18px; font-size: 21px; letter-spacing: -.025em; }
.muted { color: var(--muted); line-height: 1.55; }
.panels { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 16px; }
.panel, .entry { background: #0c1d2c; border: 1px solid var(--line); border-radius: 17px; padding: clamp(17px, 3vw, 26px); }
fieldset { display: grid; gap: 17px; margin: 0; padding: 0; border: 0; min-width: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label { display: grid; gap: 8px; font-size: 14px; font-weight: 700; }
input, select, button { min-height: 45px; font: inherit; }
input, select {
  width: 100%;
  padding: 10px 12px;
  color: inherit;
  background: #071625;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 16px;
}
button {
  padding: 10px 16px;
  color: #101721;
  background: var(--gold);
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.message { min-height: 1.4em; margin: 12px 0 0; color: #a9ebc5; font-size: 14px; line-height: 1.4; }
.message[data-error] { color: #ffc0b2; }
.summary > p { margin-top: -7px; }
.scores { margin: 0; font-variant-numeric: tabular-nums; }
.scores div { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid #243d52; }
.scores dt { color: var(--muted); }
.scores dd { margin: 0; font-weight: 800; }
.scores .total dt, .scores .total dd { color: var(--gold); font-weight: 800; }
.entry { width: min(460px, calc(100% - 32px)); margin: clamp(30px, 12vh, 110px) auto; }
.entry .crest { margin-bottom: 13px; }
.entry h1 { font-size: clamp(30px, 6vw, 42px); }
.entry .ranking-link { display: inline-block; margin-top: 6px; }
.entry .enter-button { margin-top: 12px; width: 100%; }
.logout { min-height: 38px; color: var(--blue); background: #10283c; border: 1px solid var(--line); }
.point-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.point-actions label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  background: #071625;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.point-actions label:has(:checked) { border-color: var(--blue); }
.point-actions input { width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: var(--blue); }
.score-preview { margin: -6px 0 0; font-size: 14px; }
.score-preview:empty { display: none; }
.score-preview[data-error] { color: #ffc0b2; }
button[data-remove] { background: #ffc0b2; }
@media (max-width: 650px) {
  .panels { grid-template-columns: 1fr; }
  .topbar, .shell { padding-inline: 16px; }
  .ranking-link { font-size: 14px; }
}
