.rr {
  --paper: #f2f0e4;
  --ink: #203e3a;
  --muted: #50635c;
  --edge: #a2b4a0;
  --hot: #b94b32;
  display: grid;
  gap: 11px;
  width: min(100%, 1180px);
  padding: clamp(8px, 2vw, 20px);
  margin-inline: auto;
  border: 1px solid var(--edge);
  border-radius: 19px;
  color: var(--ink);
  background: #e1e7d8;
  font: 15px/1.37 system-ui, sans-serif;
  text-align: start;
}
.rr, .rr *, .rr *::before, .rr *::after { box-sizing: border-box; }
.rr [hidden] { display: none !important; }
.rr h2, .rr h3, .rr p, .rr ol { margin: 0; }
.rr h2 { font-size: clamp(17px,3.5vw,27px); line-height: 1.2; }
.rr h3 { font-size: 15px; line-height: 1.22; }
.rr small, .rr-help { color: var(--muted); font-size: 12px; }
.rr button {
  min-width: 0;
  min-height: 44px;
  padding: 6px 11px;
  border: 1px solid #7d9883;
  border-radius: 8px;
  background: #f6f4e9;
  color: var(--ink);
  font: 760 13px/1.17 system-ui, sans-serif;
  overflow-wrap: break-word;
  touch-action: manipulation;
  cursor: pointer;
}
.rr button:disabled { border-color: #c3cbbd; background: #e8e9dd; color: #596761; cursor: default; }
.rr button:focus-visible { outline: 3px solid #247985; outline-offset: 2px; }
.rr button.rr-primary:not(:disabled) { background: #216457; border-color: #135549; color: #f4fff8; font-weight: 850; }
.rr-dashboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}
.rr-metric {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: var(--paper);
}
.rr-metric strong { font-size: clamp(14px,3.3vw,21px); line-height: 1.12; font-variant-numeric: tabular-nums; }
.rr-metric span { font-size: 12px; color: var(--muted); }
.rr-meter { overflow: hidden; height: 4px; border-radius: 4px; background: #c9d8c9; }
.rr-meter b { display: block; width: var(--bar,0%); height: 100%; background: #3f826b; }
.rr-metric[data-low=true] { border-color: #ac543f; }
.rr-metric[data-low=true] .rr-meter b { background: var(--hot); }
.rr-main { display: grid; grid-template-columns: minmax(0,1.85fr) minmax(245px,1fr); gap: 11px; align-items: start; }
.rr-card {
  display: grid;
  min-width: 0;
  gap: 8px;
  padding: clamp(7px,1.4vw,14px);
  border: 1px solid var(--edge);
  border-radius: 11px;
  background: var(--paper);
}
.rr-head, .rr-telemetry, .rr-actionbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px 8px;
}
.rr-actionbar button { flex: 1; }
.rr-actionbar [data-brake] { min-width: 120px; touch-action: none; user-select: none; -webkit-user-select: none; }
.rr-actionbar [data-brake][aria-pressed=true] { color: #fff7e8; border-color: #8d3e26; background: #993c26; }
.rr-board {
  position: relative;
  isolation: isolate;
  aspect-ratio: 3/2;
  max-height: min(550px,65vh);
  overflow: hidden;
  border: 1px solid #3c6256;
  border-radius: 9px;
  background: #355b53;
}
.rr-board canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline-offset: -3px;
}
.rr-board[data-active=true] canvas { touch-action: none; cursor: crosshair; }
.rr-board canvas:focus-visible { outline: 2px solid #ffda7d; }
.rr-stick {
  position: absolute;
  z-index: 1;
  inset: 0 auto auto 0;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 2px solid #fff0ac;
  border-radius: 50%;
  pointer-events: none;
  background: #16403b88;
  opacity: .83;
  transform: translate(calc(var(--x) - 50%),calc(var(--y) - 50%));
}
.rr-stick i {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff0ac;
  transform: translate(var(--dx),var(--dy));
}
.rr-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 9px;
  font-size: 11px;
  color: #3a554a;
}
.rr-legend span { display: inline-flex; align-items: center; gap: 4px; }
.rr-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--spot); }
.rr-legend .rr-rock-dot { border-radius: 2px; }
.rr-task { display: grid; min-height: 56px; gap: 3px; padding: 6px 8px; border-radius: 7px; background: #e1eadd; }
.rr-task strong { font-size: 13px; }
.rr-task [role=progressbar] { overflow: hidden; height: 5px; border-radius: 6px; background: #b9cdbd; }
.rr-task [role=progressbar] b { display: block; width: var(--bar,0%); height: 100%; background: #466f57; }
.rr-route-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }
.rr-route-list button { display: grid; width: 100%; gap: 3px; text-align: start; }
.rr-route-list button[aria-current=step] { border-color: #3b6a54; background: #dbebd9; }
.rr-route-list button small { font-size: 11px; font-weight: 500; }
.rr-storage { display: grid; gap: 5px; padding: 8px; border: 1px solid #a77355; border-radius: 9px; background: #f1dfcd; }
.rr-storage > div { display: flex; flex-wrap: wrap; gap: 5px; }
.rr-notice { min-height: 19px; color: #365449; font-size: 12px; }
@media (max-width: 760px) {
  .rr-main { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 370px) {
  .rr-metric { padding-inline: 5px; }
  .rr-legend { gap: 2px 6px; }
}
