:root {
  --bg: #10141c;
  --bg-2: #171d28;
  --ink: #e8edf5;
  --muted: #9aa7b8;
  --line: #2a3444;
  --gold: #d7b15a;
  --gold-2: #f0d48a;
  --accent: #3d8bfd;
  --danger: #e35d6a;
  --ok: #5ec28a;
  --panel: #1b2330;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1200px 600px at 20% -10%, #24314a 0%, transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: "Yu Gothic UI", "Yu Gothic", "Segoe UI", sans-serif;
}

#app {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 18px 40px;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
}
h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.04em;
  font-weight: 600;
  line-height: 1.4;
}
.tag {
  margin: 4px 0 0;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--muted);
}
.pill.ok { color: var(--ok); border-color: #2e5a44; }
.pill.bad { color: var(--danger); border-color: #5a2e35; }

main {
  display: grid;
  grid-template-columns: 720px 1fr;
  gap: 18px;
  align-items: start;
}

#board-wrap {
  background: linear-gradient(180deg, #1c2432, #151b26);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px 10px 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}
#board { width: 700px; height: 640px; margin: 0 auto; }
#turn-line {
  text-align: center;
  margin: 4px 0 0;
  min-height: 1.4em;
  color: var(--gold-2);
  letter-spacing: 0.06em;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px 16px;
  margin-bottom: 12px;
}
.card h2 {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
label {
  display: block;
  margin: 8px 0;
  font-size: 13px;
  color: var(--muted);
}
select, input[type="number"] {
  display: block;
  width: 100%;
  margin-top: 5px;
  background: #121821;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.check input { width: auto; }
.row { display: flex; gap: 8px; margin-top: 10px; }
button {
  font: inherit;
  cursor: pointer;
  border-radius: 9px;
  border: 1px solid var(--line);
  padding: 9px 12px;
  color: var(--ink);
  background: #222b3a;
}
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.primary {
  background: linear-gradient(180deg, #3f8fff, #2b6fd6);
  border-color: #4b90ff;
  flex: 1;
}
button.ghost { background: transparent; flex: 1; }
button.gold {
  width: 100%;
  margin-top: 8px;
  background: linear-gradient(180deg, #e0c06a, #b8902e);
  color: #1a1408;
  border-color: #f0d48a;
  font-weight: 700;
}
.hint { color: var(--muted); font-size: 12px; line-height: 1.55; }
#you-are, #model-line { margin: 6px 0; font-size: 13px; }
#log {
  max-height: 140px;
  overflow: auto;
  padding-left: 18px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.rules {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
@media (max-width: 1100px) {
  main { grid-template-columns: 1fr; }
  #board, #board-wrap { width: 100%; }
  #board { height: 70vw; max-height: 640px; }
}
