/* ── Reset & Base ──────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #111418;
  --surface: #181d24;
  --surface2: #1e2530;
  --border: #2a3340;
  --accent: #4af0c4;
  --accent2: #6ab0ff;
  --danger: #ff5f6e;
  --text: #cdd7e8;
  --text-dim: #5a6a7e;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --font-ui: 'Inter', system-ui, sans-serif;
  --radius: 6px;
  --panel-w: 240px;
}

html,
body {
  width: 100%;
  height: 100%;
  background: var(--bg);
  overflow: hidden;
  font-family: var(--font-mono);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

#root {
  width: 100%;
  height: 100%;
}

/* ── Canvas ─────────────────────────────────────────────────────────── */
#canvas {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

@media (max-width: 520px) {
  :root {
    --panel-w: 200px;
  }
}
._loading_1vo9u_1 {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  z-index: 100;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

._loading_1vo9u_1::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 12px;
  animation: _pulse_1vo9u_1 1.1s ease-in-out infinite;
}

@keyframes _pulse_1vo9u_1 {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.3;
    transform: scale(0.6);
  }
}
/* ── Panel ───────────────────────────────────────────────────────────── */
._panel_4jhl3_2 {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--panel-w);
  height: 100%;
  background: rgba(17, 20, 24, 0.82);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 0;
  z-index: 20;
  transition: transform 0.25s ease;
}

/* Panel header */
._panelHeader_4jhl3_20 {
  padding: 20px 18px 14px;
  border-bottom: 1px solid var(--border);
}
._panelTitle_4jhl3_24 {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 3px;
}
._panelSubtitle_4jhl3_31 {
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

/* Stats grid */
._statsGrid_4jhl3_38 {
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}
._statItem_4jhl3_45 {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
._statLabel_4jhl3_50 {
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
}
._statValue_4jhl3_56 {
  font-size: 0.88rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
._statCells_4jhl3_61 {
  color: var(--accent);
}

/* Controls section */
._controls_4jhl3_66 {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
}

/* Slider control */
._controlGroup_4jhl3_75 {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
._controlLabel_4jhl3_80 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
}
._controlLabel_4jhl3_80 span {
  color: var(--accent2);
  font-size: 0.7rem;
  letter-spacing: 0;
  text-transform: none;
}

._controlGroup_4jhl3_75 input[type='range'] {
  -webkit-appearance: none;
  width: 100%;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
._controlGroup_4jhl3_75 input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(74, 240, 196, 0.2);
  transition: box-shadow 0.15s;
}
._controlGroup_4jhl3_75 input[type='range']::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 5px rgba(74, 240, 196, 0.25);
}
._controlGroup_4jhl3_75 input[type='range']::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
}

/* Tile-type selector */
._hexGrid_4jhl3_126 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
._hexBtn_4jhl3_131 {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface2);
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
._hexBtn_4jhl3_131:hover {
  border-color: var(--accent2);
  color: var(--accent2);
}
._hexBtnActive_4jhl3_153 {
  border-color: var(--accent);
  color: var(--accent);
}

/* Buttons */
._btnRow_4jhl3_159 {
  display: flex;
  gap: 8px;
}
._btn_4jhl3_159 {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface2);
  color: var(--text);
  cursor: pointer;
  user-select: none;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s,
    transform 0.1s;
}
._btn_4jhl3_159:hover {
  background: var(--surface);
  border-color: var(--accent2);
  color: var(--accent2);
}
._btn_4jhl3_159:active {
  transform: scale(0.96);
}
._btn_4jhl3_159:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}
._btnIcon_4jhl3_198 {
  font-size: 0.8rem;
}
._paused_4jhl3_201 {
  border-color: var(--accent);
  color: var(--accent);
}
._btnReset_4jhl3_205:hover {
  border-color: var(--danger);
  color: var(--danger);
}
@keyframes _flash-bg_4jhl3_1 {
  0% {
    background: rgba(255, 95, 110, 0.25);
  }
  100% {
    background: var(--surface2);
  }
}
._flash_4jhl3_217 {
  animation: _flash-bg_4jhl3_1 0.3s ease forwards;
}

/* Help hints */
._hints_4jhl3_222 {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: auto;
  border-top: 1px solid var(--border);
}
._hint_4jhl3_222 {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}
._hint_4jhl3_222 kbd {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  background: var(--surface2);
  color: var(--text-dim);
  white-space: nowrap;
}

/* Mobile: hidden by default */
@media (max-width: 520px) {
  ._panel_4jhl3_2 {
    transform: translateX(100%);
  }
  ._panel_4jhl3_2.open {
    transform: translateX(0);
  }
}
._toggle_2vlye_1 {
  display: none;
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 30;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

@media (max-width: 520px) {
  ._toggle_2vlye_1 {
    display: flex;
  }
}
