/* Plain and temporary: just enough to play. The look is still open (GDD.md). */

:root {
  --bg: #f4f1ea;
  --ink: #26241f;
  --muted: #6d685c;
  --cell: #e6e0d2;
  --cell-line: #d4ccb9;
  --hill: #cfe3b5;
  --seat0: #2f6fd0;
  --seat1: #d9772b;
  --target: rgb(38 36 31 / 0.14);
  --home: #ddd6c4;
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; }
[hidden] { display: none !important; }

.screen { max-width: 960px; margin: 0 auto; padding: 24px 16px; }
h1, h2 { margin: 0 0 8px; }
h3 { margin: 24px 0 8px; font-size: 0.9rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.note { color: var(--muted); }

.buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
button, .button {
  font: inherit;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
  text-decoration: none;
}
button:disabled { opacity: 0.4; cursor: default; }
.button.quiet { background: transparent; color: var(--muted); }

.link-row { display: flex; gap: 8px; }
.link-row input { flex: 1; font: inherit; padding: 8px; border: 1px solid var(--cell-line); border-radius: 8px; }

#match { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.board-wrap { flex: 1 1 360px; max-width: min(100%, 72dvh); }
.panel { flex: 1 1 240px; }
.scores { font-size: 1.25rem; font-weight: 600; margin: 0; }
.scores .note { font-size: 1rem; font-weight: 400; }
.status { font-size: 1.1rem; }
.log { margin: 0; padding-left: 18px; color: var(--muted); }
button.small { padding: 6px 12px; font-size: 0.9rem; }
button.quiet { background: transparent; color: var(--muted); border: 1px solid var(--cell-line); }
.cp { font-size: 1.05rem; margin: 8px 0; }
.cp .pip { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); margin-left: 4px; vertical-align: -2px; }
.cp .pip.full { background: var(--ink); }
.selected { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.problem { color: #c22; min-height: 1.2em; margin: 4px 0; }
.reserve { display: flex; flex-wrap: wrap; gap: 6px; }
.reserve button { background: var(--cell); color: var(--ink); border: 2px solid transparent; padding: 6px 10px; }
.reserve button.active { border-color: var(--ink); }
.rules { margin-top: 24px; color: var(--muted); }
.rules summary { cursor: pointer; color: var(--ink); }

.seat0 { color: var(--seat0); }
.seat1 { color: var(--seat1); }

/* Board (SVG, one user unit per cell) */
#board { display: block; width: 100%; height: auto; touch-action: manipulation; user-select: none; }
#board .cell { fill: var(--cell); stroke: var(--cell-line); stroke-width: 0.03; }
#board .cell.hill { fill: var(--hill); }
#board .cell.home { fill: var(--home); }
#board .target { fill: var(--target); pointer-events: none; }
#board .order { stroke: var(--ink); stroke-width: 0.07; stroke-linecap: round; opacity: 0.7; pointer-events: none; }
#board .order-head { fill: var(--ink); opacity: 0.7; }

#board .piece { transition: transform 350ms ease, opacity 400ms ease; }
#board .piece .shape { stroke: var(--bg); stroke-width: 0.05; }
#board .piece.seat0 .shape { fill: var(--seat0); }
#board .piece.seat1 .shape { fill: var(--seat1); }
#board .piece.ghost { opacity: 0.45; pointer-events: none; }
#board .hold-ring { fill: none; stroke: var(--ink); stroke-width: 0.06; stroke-dasharray: 0.12 0.08; opacity: 0.8; pointer-events: none; }
#board .piece.mine { cursor: pointer; }
#board .piece.selected .shape { stroke: var(--ink); stroke-width: 0.08; }
#board .piece text { fill: #fff; font-size: 0.34px; font-weight: 700; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
#board .piece.gone { opacity: 0; }

#board .mark { font-size: 0.32px; font-weight: 700; text-anchor: middle; pointer-events: none; animation: rise 1.2s ease-out forwards; }
#board .mark.hit { fill: #c22; }
#board .mark.hit.hold { fill: #7a1fa2; }
#board .mark.bump { fill: var(--ink); }
@keyframes rise {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-0.4px); }
}

.cover {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  background: var(--bg);
  font-size: 1.25rem;
  text-align: center;
  padding: 24px;
}
