:root {
  --paper: #f3efe3;
  --ink: #1a1a1a;
  --muted: #6b6558;
  --line: #c9c0a6;
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
header {
  display: flex; align-items: baseline; gap: 1.5rem;
  padding: 0.5rem 1rem; border-bottom: 2px solid var(--ink);
}
h1 { margin: 0; font-size: 1.4rem; letter-spacing: 0.25em; text-transform: uppercase; }
h2 { font-size: 0.95rem; margin: 0 0 0.3rem; text-transform: uppercase; letter-spacing: 0.1em; }
#status { font-size: 0.95rem; }
.hint { margin-left: auto; font-size: 0.8rem; }
header button { margin: 0; }
main { display: flex; gap: 0.75rem; padding: 0.75rem; align-items: flex-start; }
#board { flex: 1 1 auto; min-width: 0; width: 100%; height: calc(100vh - 4.5rem); background: #4a3a2c; border: 1px solid #2e241b; }
#panel { flex: 0 0 300px; display: flex; flex-direction: column; gap: 0.75rem; font-size: 0.9rem; }
#panel section:empty { display: none; }
#panel section { background: #fbf8ef; border: 1px solid var(--line); padding: 0.6rem 0.7rem; }
.muted { color: var(--muted); margin: 0; }
dl { display: grid; grid-template-columns: auto 1fr; gap: 0.1rem 0.6rem; margin: 0; }
dt { color: var(--muted); }
dd { margin: 0; }
#log { margin: 0; padding-left: 1.2rem; max-height: 30vh; overflow-y: auto; font-size: 0.82rem; }
#log li { margin-bottom: 0.2rem; }
button {
  font: inherit; font-size: 0.85rem; padding: 0.25rem 0.6rem; margin: 0 0.3rem 0.3rem 0;
  background: #fbf8ef; border: 1.5px solid var(--ink); cursor: pointer;
}
button:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
button:disabled { opacity: 0.4; cursor: default; }
button.primary { background: var(--ink); color: var(--paper); }

/* SVG text */
.u-id { font: bold 11px system-ui, sans-serif; text-anchor: middle; pointer-events: none; }
.u-badge { font: bold 10px system-ui, sans-serif; text-anchor: middle; }
.cdr-label { font: bold 9px system-ui, sans-serif; }
.obj-vp { font: bold 14px Georgia, serif; }
.counter { cursor: pointer; }
#board { cursor: grab; touch-action: none; user-select: none; }
#board.panning, #board.panning .counter { cursor: grabbing; }
.hex { fill: transparent; }
.hex:hover { stroke: #000; stroke-opacity: 0.35; stroke-width: 1; }
.hex, .hl { vector-effect: non-scaling-stroke; }

/* Miniatures */
.base { fill: #848e68; stroke: #4a4733; stroke-width: 0.4; }
.base-edge { fill: #4f4a36; }
.dust { fill: #eee6cc; opacity: 0.75; pointer-events: none; }
.scenery { pointer-events: none; }

/* Highlights: told apart by outline style and value, not hue. */
.hl { pointer-events: none; fill-opacity: 0.25; }
.hl.grid { fill: none; stroke: #000; stroke-opacity: 0.22; stroke-width: 0.8; }
.hl.reach { fill: #fff; fill-opacity: 0.55; stroke: #000; stroke-width: 1; stroke-dasharray: 2 3; pointer-events: auto; cursor: pointer; }
.hl.target { fill: #000; fill-opacity: 0.25; stroke: #000; stroke-width: 3; }
.hl.zoc { fill: none; stroke: #000; stroke-width: 1.5; stroke-dasharray: 6 3; }
