/* CROWNFIRE — a fire-dispatch situation display: bone type on scorched paper-black,
   one ember accent, no neon. */
:root {
  --black: #0c0a0d;
  --char: #16131a;
  --line: #2c2630;
  --bone: #e8e0d3;
  --muted: #8b8073;
  --ember: #ff8c2b;
  --water: #7ec8f5;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--black);
  color: var(--bone);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background: radial-gradient(120% 90% at 50% 40%, transparent 45%, rgba(0, 0, 0, 0.6) 100%);
}

.shell {
  display: flex;
  gap: 22px;
  align-items: stretch;
  min-height: 100%;
  padding: 22px;
}

/* ---------- left rail ---------- */

.rail {
  width: 232px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 22px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: linear-gradient(180deg, #131017, #0e0c11);
  padding: 20px 18px;
}

.wordmark {
  line-height: 0.86;
  letter-spacing: -0.03em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.wordmark b,
.wordmark span {
  display: block;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
  font-size: 40px;
  font-stretch: condensed;
}

.wordmark span {
  color: var(--ember);
}

.wordmark i {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

.label {
  margin: 0 0 6px;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.label b {
  color: var(--ember);
  font-weight: 600;
}

.value {
  margin: 0;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.value.big {
  font-size: 34px;
  letter-spacing: -0.02em;
}

.meter {
  height: 10px;
  border: 1px solid var(--line);
  background: #0a080c;
  overflow: hidden;
}

.meter i {
  display: block;
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, #b3410f, var(--ember) 70%, #ffd58a);
  transition: width 0.12s linear;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.stat-grid .value {
  font-size: 16px;
}

.legend {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.9;
}

.legend p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.swatch {
  width: 11px;
  height: 11px;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.swatch.grass { background: #4a5326; }
.swatch.brush { background: #33461f; }
.swatch.pine { background: #1b3423; }
.swatch.town { background: #8d8578; }
.swatch.wet { background: #3f6d8f; }

.hint {
  margin: auto 0 0;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ember);
}

.text-button {
  align-self: flex-start;
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.2em;
  padding: 7px 12px;
  cursor: pointer;
}

.text-button:hover {
  color: var(--bone);
  border-color: var(--muted);
}

/* ---------- stage ---------- */

.stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

canvas {
  width: 100%;
  max-width: min(100%, calc((100vh - 44px) * 1.6));
  height: auto;
  display: block;
  border: 1px solid var(--line);
  background: var(--black);
  cursor: crosshair;
  touch-action: none;
}

.banner {
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translate(-50%, -8px);
  margin: 0;
  padding: 8px 18px;
  border: 1px solid rgba(255, 140, 43, 0.5);
  background: rgba(20, 10, 4, 0.82);
  color: var(--ember);
  font-size: 12px;
  letter-spacing: 0.26em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.banner.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- curtains ---------- */

.curtain {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 6, 9, 0.86);
  backdrop-filter: blur(3px);
  padding: 20px;
}

.curtain.visible {
  display: flex;
}

.panel {
  width: min(560px, 100%);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #16121a, #0d0b10);
  padding: 30px 32px 26px;
}

.kicker {
  margin: 0 0 14px;
  font-size: 10px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--muted);
}

.panel h1,
.panel h2 {
  margin: 0 0 14px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
  font-stretch: condensed;
  font-size: clamp(38px, 6vw, 58px);
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.panel h1 br + * {
  color: var(--ember);
}

.thesis {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
}

.rules {
  margin: 0 0 24px;
  padding-left: 18px;
  font-size: 12.5px;
  line-height: 1.85;
  color: #cfc6b8;
}

.rules b {
  color: var(--ember);
  font-weight: 600;
}

.big-button {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  border: 1px solid var(--ember);
  background: rgba(255, 140, 43, 0.09);
  color: var(--ember);
  font: inherit;
  padding: 14px 22px;
  cursor: pointer;
  letter-spacing: 0.2em;
  font-size: 13px;
}

.big-button:hover {
  background: rgba(255, 140, 43, 0.2);
}

.big-button i {
  font-style: normal;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.14em;
}

.best-line {
  margin: 18px 0 0;
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--muted);
}

.best-line b {
  color: var(--bone);
}

.stats-line {
  margin: 0 0 22px;
  font-size: 12px;
  line-height: 1.8;
  color: #cfc6b8;
}

@media (max-width: 900px) {
  .shell {
    flex-direction: column;
    padding: 12px;
    gap: 12px;
  }

  .rail {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 20px;
    padding: 12px 14px;
  }

  .wordmark {
    border: none;
    padding: 0;
  }

  .wordmark b,
  .wordmark span {
    display: inline;
    font-size: 22px;
  }

  .wordmark i,
  .legend {
    display: none;
  }

  .readout {
    min-width: 120px;
  }

  .hint {
    margin: 0;
  }

  canvas {
    max-width: 100%;
  }
}
