/* Kaggriculture arena. The subject is a farming season, so the palette is
   taken from soil and crops rather than a generic dashboard: a dark loam
   ground, wheat gold as the working accent, leaf green for the player who is
   ahead, and clay red kept for genuine failures (timeouts, crashes). */
@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=JetBrains+Mono:wght@400;500;700&display=swap");

:root {
  color-scheme: dark;

  --bg:        #12100c;
  --panel:     #1a1712;
  --panel-2:   #221d16;
  --line:      #2e281f;
  --line-soft: #241f18;

  --fg:        #ece4d6;
  --dim:       #9b8d78;
  --dimmer:    #6b6052;

  /* Wheat gold: anything the reader acts on. */
  --accent:     #e0b155;
  --accent-dim: #8a6c31;
  /* Leaf green reads as "doing well", clay red as "failed". */
  --leaf:      #7fb069;
  --clay:      #d1615d;
  --sky:       #6fa8b8;
  --plum:      #a97fb0;

  --seat0: #e0b155;
  --seat1: #6fa8b8;

  --mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: "Fraunces", Georgia, "Noto Serif TC", serif;
  --body:    ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Noto Sans TC", sans-serif;

  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.bar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 22px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.bar h1 {
  font-family: var(--display);
  font-size: 19px;
  margin: 0;
  letter-spacing: .2px;
}
.bar nav { display: flex; gap: 14px; }
.bar nav a { color: var(--dim); font-size: 13px; }
.bar nav a.on, .bar nav a:hover { color: var(--accent); text-decoration: none; }
.spacer { flex: 1; }

main { padding: 22px; max-width: 1500px; margin: 0 auto; }

.dim { color: var(--dim); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); }
.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 18px;
}
.panel > h2 {
  font-family: var(--display);
  font-size: 15px;
  margin: 0 0 4px;
}
.panel > .hint { color: var(--dim); font-size: 12px; margin: 0 0 14px; }

table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
}
th {
  color: var(--dim);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
tbody tr:hover { background: var(--panel-2); }

.tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-family: var(--mono);
  border: 1px solid var(--line);
  color: var(--dim);
}
.tag.ok      { color: var(--leaf); border-color: #33472c; background: #1a2417; }
.tag.bad     { color: var(--clay); border-color: #4d2b2a; background: #251717; }
.tag.busy    { color: var(--accent); border-color: #4a3a1c; background: #241d10; }
.tag.builtin { color: var(--sky); border-color: #2b4048; }

button, .button {
  font: inherit;
  color: var(--bg);
  background: var(--accent);
  border: 0;
  border-radius: 7px;
  padding: 7px 14px;
  cursor: pointer;
  font-weight: 600;
}
button:hover { background: #edc069; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
}
button.ghost:hover { background: #241d10; }

input, select {
  font: inherit;
  color: var(--fg);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 10px;
}
input:focus, select:focus { outline: 2px solid var(--accent-dim); }

.empty { padding: 26px; text-align: center; color: var(--dimmer); }

.grid { display: grid; gap: 18px; }
@media (min-width: 1000px) { .grid.two { grid-template-columns: 1fr 1fr; } }
