:root {
  --re-bg: #f2f1ed;
  --re-grid: rgba(65, 64, 59, .065);
  --re-surface: rgba(252, 252, 250, .92);
  --re-panel: #fbfbf8;
  --re-panel-2: #f4f3ef;
  --re-ink: #20211f;
  --re-muted: #797a74;
  --re-faint: #a3a49e;
  --re-line: rgba(38, 39, 36, .11);
  --re-line-strong: rgba(38, 39, 36, .18);
  --re-accent: #e86d3b;
  --re-accent-soft: #fff0e8;
  --re-mint: #37b889;
  --re-violet: #876ce7;
  --re-yellow: #e2a92d;
  --re-blue: #4d87e7;
  --re-shadow: 0 18px 54px rgba(38, 35, 29, .08);
  --re-timeline-h: 260px;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body {
  font-family: "TikTok Sans", "Segoe UI", sans-serif;
  color: var(--re-ink);
  background: var(--re-bg);
  font-size: 13px;
}
button, input, select { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

.re-topbar {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  background: rgba(253, 253, 251, .94);
  border-bottom: 1px solid var(--re-line);
  backdrop-filter: blur(18px);
  position: relative;
  z-index: 50;
}
.re-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--re-accent);
  text-decoration: none;
  white-space: nowrap;
}
.re-back svg { display: block; flex: 0 0 auto; }
.re-product-nav {
  display: flex;
  height: 34px;
  padding: 3px;
  gap: 2px;
  background: #efeee9;
  border: 1px solid rgba(0,0,0,.045);
  border-radius: 10px;
}
.re-product-nav a {
  display: grid;
  place-items: center;
  padding: 0 13px;
  border-radius: 7px;
  color: var(--re-muted);
  font-weight: 600;
  font-size: 12px;
  text-decoration: none;
  transition: .16s ease;
}
.re-product-nav a:hover { color: var(--re-ink); }
.re-product-nav a.is-active {
  color: var(--re-ink);
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.09);
}
.re-top-actions { margin-left: auto; display: flex; align-items: center; gap: 7px; min-width: 0; }
.re-icon-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--re-line);
  border-radius: 9px;
  background: rgba(255,255,255,.72);
  cursor: pointer;
  transition: .15s ease;
}
.re-icon-btn:hover:not(:disabled) { border-color: var(--re-line-strong); background: #fff; }
.re-icon-btn:disabled { opacity: .35; cursor: default; }
.re-style-pill {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--re-muted);
  background: var(--re-panel-2);
  border: 1px solid var(--re-line);
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 11px;
}
.re-theme-switch { display: flex; padding: 3px; border-radius: 9px; background: var(--re-panel-2); }
.re-theme-switch:empty { display: none; }
.re-theme-switch button {
  height: 27px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--re-muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}
.re-theme-switch button.is-active { color: var(--re-ink); background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.re-download {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--re-accent);
  border-radius: 9px 0 0 9px;
  margin-right: -8px;
  padding: 0 13px;
  color: #fff;
  background: var(--re-accent);
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
}
.re-download:disabled { opacity: .42; cursor: default; }
.re-version { height: 34px; display: flex; border: 1px solid var(--re-line); border-radius: 0 9px 9px 0; overflow: hidden; background: #fff; }
.re-version > input { width: 62px; border: 0; outline: 0; padding: 0 8px; text-align: center; background: transparent; font-size: 11px; font-weight: 700; }
.re-version-step { width: 18px; display: grid; grid-template-rows: 1fr 1fr; border-left: 1px solid var(--re-line); }
.re-version-step button { border: 0; padding: 0; line-height: 1; font-size: 8px; color: var(--re-muted); background: transparent; cursor: pointer; }
.re-version-step button + button { border-top: 1px solid var(--re-line); }

.re-workspace {
  height: calc(100vh - 58px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  transition: height .24s cubic-bezier(.22,.8,.24,1);
}
body.timeline-open .re-workspace { height: calc(100vh - 58px - var(--re-timeline-h)); }
.re-canvas-shell { min-width: 0; min-height: 0; display: grid; grid-template-rows: 48px 1fr; }
.re-canvas-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 12px;
  background: rgba(250,250,247,.84);
  border-bottom: 1px solid var(--re-line);
  position: relative;
  z-index: 10;
}
.re-search {
  width: min(310px, 31vw);
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--re-line);
  border-radius: 9px;
  padding: 0 9px;
  background: rgba(255,255,255,.78);
}
.re-search-icon { flex: 0 0 auto; color: var(--re-faint); }
.re-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 12px; color: var(--re-ink); }
kbd {
  border: 1px solid var(--re-line);
  border-bottom-color: var(--re-line-strong);
  border-radius: 5px;
  background: #fff;
  color: var(--re-faint);
  padding: 2px 5px;
  font-size: 9px;
  font-family: inherit;
  white-space: nowrap;
}
.re-filter-tabs { display: flex; gap: 3px; }
.re-filter-tabs button {
  height: 31px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--re-muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
}
.re-filter-tabs button:hover { background: rgba(255,255,255,.64); color: var(--re-ink); }
.re-filter-tabs button.is-active { background: #fff; color: var(--re-ink); box-shadow: 0 1px 5px rgba(0,0,0,.08); }
.re-create-road-trigger {
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--re-line-strong);
  border-radius: 8px;
  color: var(--re-ink);
  background: var(--re-panel);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  transition: border-color .16s ease, color .16s ease, background-color .16s ease;
}
.re-create-road-trigger:hover { color: var(--re-accent); border-color: var(--re-accent); background: var(--re-accent-soft); }
.re-create-road-trigger:disabled { opacity: .42; cursor: default; }
.re-create-road-trigger svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.re-workspace-sync {
  min-width: 146px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 9px 0 7px;
  border: 1px solid var(--re-line);
  border-radius: 9px;
  color: var(--re-muted);
  background: rgba(255,255,255,.68);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .16s ease, background-color .16s ease, opacity .16s ease;
}
.re-workspace-sync:hover { border-color: var(--re-line-strong); background: #fff; }
.re-workspace-sync input { position: absolute; opacity: 0; pointer-events: none; }
.re-workspace-sync-toggle {
  width: 30px;
  height: 18px;
  flex: 0 0 auto;
  position: relative;
  border-radius: 99px;
  background: #cbc9c2;
  transition: background-color .18s ease;
}
.re-workspace-sync-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .18s cubic-bezier(.2,.8,.2,1);
}
.re-workspace-sync input:checked + .re-workspace-sync-toggle { background: var(--re-accent); }
.re-workspace-sync input:checked + .re-workspace-sync-toggle::after { transform: translateX(12px); }
.re-workspace-sync input:focus-visible + .re-workspace-sync-toggle {
  outline: 3px solid rgba(232,109,59,.22);
  outline-offset: 2px;
}
.re-workspace-sync-copy { min-width: 0; display: grid; gap: 1px; }
.re-workspace-sync strong { color: var(--re-ink); font-size: 10px; line-height: 1.05; }
.re-workspace-sync small { color: var(--re-faint); font-size: 8px; line-height: 1.1; }
.re-workspace-sync.is-unavailable { opacity: .48; cursor: not-allowed; }
.re-canvas-meta { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--re-muted); font-size: 11px; }
.re-canvas-meta b { color: var(--re-ink); }
.re-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--re-faint); }

.re-canvas {
  position: relative;
  overflow: hidden;
  outline: 0;
  cursor: default;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
  background: #f3f2ee;
}
.re-canvas * { -webkit-user-drag: none; }
.re-canvas.is-selecting { cursor: crosshair; }
.re-canvas.is-pan-ready { cursor: grab; }
.re-canvas.is-panning { cursor: grabbing; }
.re-grid {
  position: absolute;
  inset: -80px;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(108,104,95,.075) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(108,104,95,.075) 1px, transparent 1px),
    radial-gradient(circle, var(--re-grid) 1.1px, transparent 1.1px);
  background-size:
    var(--re-grid-column,366px) 100%,
    100% var(--re-grid-row,178px),
    var(--re-grid-fine,22px) var(--re-grid-fine,22px);
  transition: opacity .16s;
}
.re-canvas.is-moving-card .re-grid { opacity:1; }
.re-canvas.is-moving-card .re-grid {
  background-image:
    linear-gradient(to right, rgba(232,109,59,.22) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(232,109,59,.22) 1px, transparent 1px),
    radial-gradient(circle, var(--re-grid) 1.1px, transparent 1.1px);
}
/* Ctrl + перетаскивание оставляет копию: курсор «copy» отличает этот жест от
   обычного переноса, у которого оригинал уезжает вместе с плиткой. */
.re-canvas.is-duplicating-card,
.re-canvas.is-duplicating-card .re-road-card.is-dragging { cursor: copy; }
.re-canvas.is-duplicating-card .re-road-card.is-dragging { opacity: .82; }
.re-canvas-content {
  position: absolute;
  left: 0;
  top: 0;
  width: 1180px;
  height: 660px;
  transform-origin: 0 0;
  will-change: transform;
}
.re-group-label {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #8c8d87;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.re-group-label::before { content: ""; width: 17px; height: 1px; background: currentColor; opacity: .45; }
.re-road-card {
  position: absolute;
  z-index: 3;
  width: 344px;
  height: 158px;
  display: grid;
  grid-template-rows: 1fr 42px;
  overflow: hidden;
  border: 1px solid rgba(48,48,44,.13);
  border-radius: 13px;
  background: rgba(253,253,251,.95);
  box-shadow: 0 7px 22px rgba(41,38,32,.055);
  cursor: grab;
  transition: border-color .18s ease, border-width .18s ease, background-color .18s ease, box-shadow .18s ease, opacity .18s ease, filter .18s ease, transform .18s ease;
}
.re-road-card::after {
  content: "";
  width: 5px;
  position: absolute;
  z-index: 6;
  top: 18px;
  bottom: 18px;
  left: 0;
  border-radius: 0 5px 5px 0;
  background: var(--re-accent);
  opacity: 0;
  transform: scaleY(.55);
  transform-origin: center;
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}
.re-road-card.is-dragging { cursor: grabbing; transition: none; box-shadow: 0 18px 42px rgba(42,35,28,.16); }
.re-road-card:hover { border-color: rgba(48,48,44,.23); box-shadow: 0 11px 28px rgba(41,38,32,.09); transform: translateY(-1px); }
.re-canvas.has-selection .re-road-card:not(.is-selected) {
  opacity: .58;
  filter: saturate(.62);
}
.re-canvas.has-selection .re-road-card:not(.is-selected):hover {
  opacity: .82;
  filter: saturate(.86);
}
.re-road-card.is-selected {
  z-index: 5;
  border-width: 3px;
  border-color: var(--re-accent);
  background: #fff8f3;
  box-shadow: inset 0 0 0 1px rgba(232,109,59,.18), 0 15px 34px rgba(72,43,25,.15);
}
.re-road-card.is-selected::after {
  opacity: 1;
  transform: scaleY(1);
}
.re-road-card.is-selected:hover {
  border-color: #df5f2b;
  box-shadow: inset 0 0 0 1px rgba(232,109,59,.24), 0 17px 38px rgba(72,43,25,.18);
  transform: translateY(-2px);
}
.re-road-card.is-selected.is-dragging {
  box-shadow: inset 0 0 0 1px rgba(232,109,59,.22), 0 20px 44px rgba(72,43,25,.2);
}
.re-card-visibility {
  position: absolute;
  z-index: 4;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
}
.re-card-mode {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--re-line);
  border-radius: 7px;
  color: var(--re-muted);
  background: rgba(253,253,251,.88);
  box-shadow: 0 1px 3px rgba(38,36,31,.06);
  cursor: pointer;
  opacity: .62;
  transition: color .14s, border-color .14s, background .14s, opacity .14s, box-shadow .14s;
}
.re-card-mode svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.re-card-mode:hover,
.re-card-mode:focus-visible,
.re-road-card.is-solo .re-card-mode[data-road-visibility="solo"],
.re-road-card.is-hidden .re-card-mode[data-road-visibility="hidden"] { opacity: 1; }
.re-card-mode:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(232,109,59,.2); }
.re-card-mode[data-road-visibility="solo"].is-active {
  color: #fff;
  border-color: var(--re-accent);
  background: var(--re-accent);
}
.re-card-highlight.is-active {
  color: #fff;
  border-color: #e32317;
  background: #e32317;
  box-shadow: 0 0 0 3px rgba(227,35,23,.13);
}
.re-card-highlight.is-partial {
  color: #d8291d;
  border-color: rgba(227,35,23,.48);
  background: rgba(227,35,23,.08);
}
.re-card-hide.is-active {
  color: #fff;
  border-color: #626761;
  background: #626761;
}
.re-road-card.is-preview-muted .re-road-swatch,
.re-road-card.is-preview-muted .re-road-copy,
.re-road-card.is-preview-muted .re-road-meta { opacity: .38; }
.re-road-card.is-preview-muted { border-style: dashed; }
.re-road-card.is-solo { border-color: rgba(232,109,59,.48); }
.re-road-card.is-selected.is-solo { border-color: var(--re-accent); }
.re-road-card.is-highlighted { box-shadow: inset 0 3px 0 #e32317, 0 7px 22px rgba(41,38,32,.055); }
.re-road-card.is-selected.is-highlighted {
  box-shadow: inset 0 3px 0 #e32317, inset 0 0 0 1px rgba(232,109,59,.18), 0 15px 34px rgba(72,43,25,.15);
}
.re-road-main { display: grid; grid-template-columns: 86px minmax(0,1fr); gap: 12px; align-items: center; padding: 14px 44px 10px 14px; }
.re-road-swatch {
  width: 82px;
  height: 58px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 8px;
  overflow: hidden;
  background: #e7e9e7;
}
.re-road-swatch::before {
  content: "";
  position: absolute;
  width: 90px;
  height: var(--road-width, 14px);
  border-radius: 99px;
  background: var(--road-color, #d2d4d4);
  box-shadow:
    0 0 0 1px var(--road-outline, rgba(38,42,48,.18)),
    0 2px 6px var(--road-shadow, rgba(30,33,38,.22));
  transform: rotate(-13deg);
}
.re-road-swatch::after {
  content: "";
  position: absolute;
  width: 90px;
  border-top: 1.5px dashed var(--mark-color, rgba(255,255,255,.9));
  transform: rotate(-13deg);
  opacity: var(--mark-opacity, 1);
}
.re-road-copy { min-width: 0; }
.re-road-copy strong {
  display: block;
  min-width: 0;
  font-size: 14px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.re-surface-badge {
  flex: 0 0 auto;
  padding: 2px 5px;
  border: 1px solid rgba(232,109,59,.3);
  border-radius: 5px;
  color: #b8521f;
  background: rgba(232,109,59,.08);
  font: 700 7px/1.2 Inter, Arial, sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.re-surface-badge.is-bridge { color: #316cab; border-color: rgba(77,135,231,.3); background: rgba(77,135,231,.08); }
.re-surface-badge.is-tunnel { color: #6d55a9; border-color: rgba(135,105,210,.3); background: rgba(135,105,210,.08); }
.re-road-copy small { display: block; color: var(--re-muted); font-size: 11px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.re-road-layer-id {
  display: block;
  margin-top: 7px;
  color: var(--re-ink);
  font: 600 10px/1.25 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.re-road-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border-top: 1px solid var(--re-line);
  background: rgba(247,247,244,.82);
}
.re-road-meta span { border: 1px solid var(--re-line); border-radius: 6px; padding: 4px 6px; color: var(--re-muted); font-size: 10px; line-height: 1; }
.re-road-meta .is-on { color: #227b5b; border-color: rgba(55,184,137,.28); background: rgba(55,184,137,.07); }
.re-road-meta .is-on.is-outline { color: #59616d; border-color: rgba(111,119,130,.3); background: rgba(111,119,130,.09); }
.re-road-meta .re-surface-meta {
  flex: 0 0 auto;
  font-weight: 700;
}
.re-road-meta .re-surface-meta.is-surface {
  color: #a9471a;
  border-color: rgba(232,109,59,.32);
  background: rgba(232,109,59,.09);
}
.re-road-meta .re-surface-meta.is-bridge {
  color: #2865a3;
  border-color: rgba(77,135,231,.32);
  background: rgba(77,135,231,.09);
}
.re-road-meta .re-surface-meta.is-tunnel {
  color: #674ca8;
  border-color: rgba(135,105,210,.32);
  background: rgba(135,105,210,.09);
}
.re-road-meta .re-layer-num { margin-left: auto; border: 0; color: var(--re-faint); font-variant-numeric: tabular-nums; }
.re-z-slot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 0 !important;
  border: 0 !important;
}
.re-z-add,
.re-group-z-add {
  height: 26px;
  min-width: 34px;
  padding: 0 8px;
  border: 1px solid var(--re-line-strong);
  border-radius: 8px;
  color: var(--re-muted);
  background: color-mix(in srgb, var(--re-panel) 88%, transparent);
  box-shadow: 0 1px 2px rgba(34,31,27,.05);
  font: 750 9px/1 ui-monospace, Consolas, monospace;
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.re-z-add:hover,.re-group-z-add:hover {
  color: var(--re-accent);
  border-color: color-mix(in srgb, var(--re-accent) 65%, transparent);
  background: var(--re-accent-soft);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--re-accent) 12%, transparent);
}
.re-z-add:focus-visible,.re-group-z-add:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--re-accent) 18%, transparent);
}
.re-z-add.is-override { border-color: rgba(138,99,184,.55); color: #7350a2; }
.re-card-z,.re-group-z {
  height: 27px;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--re-line-strong);
  border-radius: 8px;
  background: color-mix(in srgb, var(--re-panel) 94%, transparent);
  box-shadow: 0 1px 3px rgba(34,31,27,.06);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.re-card-z.is-override { border-style: dashed; border-color: rgba(138,99,184,.58); }
.re-card-z:focus-within,.re-group-z:focus-within {
  border-color: color-mix(in srgb, var(--re-accent) 72%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--re-accent) 12%, transparent);
}
.re-card-z > .re-z-label,.re-group-z > .re-z-label {
  min-width: 23px;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--re-line);
  color: var(--re-muted);
  background: var(--re-panel-2);
  font: 800 8px/1 ui-monospace,Consolas,monospace;
}
.re-card-z input,.re-group-z input {
  width: 38px;
  height: 100%;
  box-sizing: border-box;
  padding: 0 4px;
  border: 0;
  border-left: 1px solid var(--re-line);
  border-right: 1px solid var(--re-line);
  outline: 0;
  appearance: textfield;
  -moz-appearance: textfield;
  color: var(--re-ink);
  background: color-mix(in srgb, var(--re-panel-2) 56%, transparent);
  text-align: center;
  font: 750 11px/1 ui-monospace,Consolas,monospace;
  font-variant-numeric: tabular-nums;
}
.re-card-z input::-webkit-inner-spin-button,.re-card-z input::-webkit-outer-spin-button,
.re-group-z input::-webkit-inner-spin-button,.re-group-z input::-webkit-outer-spin-button {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
}
.re-card-z button,.re-group-z button {
  width: 25px;
  height: 100%;
  display: grid;
  place-items: center;
  flex: 0 0 25px;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--re-line);
  color: var(--re-muted);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: color .14s ease, background-color .14s ease;
}
.re-card-z > .re-z-step:first-of-type,.re-group-z > .re-z-step:first-of-type { border-left: 0; }
.re-card-z button:hover,.re-group-z button:hover { color:var(--re-accent); background:var(--re-accent-soft); }
.re-card-z button:focus-visible,.re-group-z button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--re-accent);
  outline-offset: -2px;
}
.re-card-z input:focus,.re-group-z input:focus {
  color:var(--re-accent);
  background: var(--re-panel);
}
.re-card-z .re-z-utility svg,.re-group-z .re-z-utility svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.re-card-z .re-z-disable:hover,.re-group-z .re-z-disable:hover {
  color: #b64030;
  background: rgba(182,64,48,.08);
}
.re-z-control [hidden] { display: none; }
.re-priority-chip {
  min-height: 20px;
  display: inline-grid;
  place-items: center;
  box-sizing: border-box;
  padding: 0 6px !important;
  border: 1px solid var(--re-line) !important;
  border-radius: 7px !important;
  background: color-mix(in srgb, var(--re-panel) 82%, transparent);
  font: 800 7px/1 ui-monospace,Consolas,monospace !important;
  letter-spacing: .025em;
  white-space: nowrap;
}
.re-priority-chip.is-top { color:#a73c22 !important; border-color:rgba(217,87,48,.3) !important; background:rgba(217,87,48,.1) !important; }
.re-priority-chip.is-mid { color:#88680f !important; border-color:rgba(181,138,34,.32) !important; background:rgba(181,138,34,.1) !important; }
.re-priority-chip.is-low { color:#326696 !important; border-color:rgba(63,127,191,.3) !important; background:rgba(63,127,191,.1) !important; }
.re-priority-chip.is-base { color:var(--re-muted) !important; }
.re-road-meta:has(.re-z-slot) .re-layer-num { margin-left: 0; }
.re-network-group {
  position: absolute;
  z-index: 1;
  box-sizing: border-box;
  border: 1.5px solid var(--group-color);
  border-radius: 14px;
  background: color-mix(in srgb, var(--group-color) 5%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--group-color) 10%, transparent);
}
.re-network-group.is-active { border-width: 2px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--group-color) 13%, transparent); }
.re-network-group.is-inferred { border-style: dashed; }
.re-network-group-head {
  position: absolute;
  left: 9px; right: 9px; top: 7px;
  height: 27px;
  display: flex; align-items: center; gap: 6px;
  cursor: grab;
}
.re-network-group-head:active { cursor: grabbing; }
.re-group-swatch {
  width: 18px; height: 18px; flex: 0 0 auto; padding: 0;
  border: 2px solid rgba(255,255,255,.86); border-radius: 5px;
  background: var(--swatch); box-shadow: 0 0 0 1px var(--swatch); cursor: pointer;
}
.re-group-color-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.re-group-name {
  width: min(230px, 35%); height: 24px; padding: 0 5px;
  border: 1px solid transparent; border-radius: 5px;
  color: var(--re-ink); background: transparent; outline: 0; font: 800 11px/1.2 inherit;
}
.re-group-name:hover,.re-group-name:focus { border-color: color-mix(in srgb, var(--group-color) 36%, transparent); background: var(--re-panel); }
.re-group-count,.re-group-origin { color: var(--re-muted); font-size: 9px; white-space: nowrap; }
.re-group-origin { padding: 3px 5px; border: 1px solid color-mix(in srgb, var(--group-color) 35%, transparent); border-radius: 5px; color: var(--group-color); }
.re-group-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  padding-left: 5px;
  border-left: 1px solid color-mix(in srgb, var(--group-color) 22%, transparent);
}
.re-group-action {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--group-color) 24%, var(--re-line));
  border-radius: 6px;
  color: var(--re-muted);
  background: color-mix(in srgb, var(--re-panel) 90%, transparent);
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.re-group-action svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.re-group-action:hover,
.re-group-action:focus-visible {
  color: var(--group-color);
  border-color: color-mix(in srgb, var(--group-color) 50%, transparent);
  background: color-mix(in srgb, var(--group-color) 9%, var(--re-panel));
}
.re-group-action:focus-visible { outline: 0; box-shadow: 0 0 0 3px color-mix(in srgb, var(--group-color) 18%, transparent); }
.re-group-action.is-active {
  color: #fff;
  border-color: var(--group-color);
  background: var(--group-color);
}
.re-group-action.is-partial {
  color: var(--group-color);
  border-style: dashed;
  border-color: color-mix(in srgb, var(--group-color) 55%, transparent);
  background: color-mix(in srgb, var(--group-color) 10%, var(--re-panel));
}
.re-group-action.re-card-highlight.is-active {
  color: #fff;
  border-color: #e32317;
  background: #e32317;
  box-shadow: none;
}
.re-group-action.re-card-highlight.is-partial { box-shadow: none; }
.re-group-action.re-card-hide.is-active {
  color: #fff;
  border-color: #626761;
  background: #626761;
}
.re-group-z-add,
.re-group-z { margin-left: 0; }
.re-group-remove {
  width: 25px; height: 25px; padding: 0; border: 1px solid transparent; border-radius: 6px;
  color: var(--re-muted); background: transparent; cursor: pointer;
}
.re-group-remove:hover { color:#b64030; border-color:rgba(182,64,48,.25); background:rgba(182,64,48,.07); }
.re-group-actions .re-group-remove {
  display: grid;
  border-color: rgba(182,64,48,.18);
}
.re-group-actions .re-group-remove:hover,
.re-group-actions .re-group-remove:focus-visible {
  color: #fff;
  border-color: #b64030;
  background: #b64030;
}
.re-group-confirm .msh-confirm-card { width: min(440px, calc(100vw - 32px)); }
.re-selection-tools {
  position: absolute;
  z-index: 28;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 40px;
  padding: 5px;
  border: 1px solid var(--re-line-strong);
  border-radius: 11px;
  background: rgba(255,255,253,.92);
  box-shadow: 0 8px 24px rgba(38,35,30,.1);
  backdrop-filter: blur(10px);
}
.re-selection-tools[hidden] { display: none; }
.re-selection-tools strong { padding: 0 8px; font-size: 11px; white-space: nowrap; }
.re-selection-tools button {
  min-height: 30px; padding: 0 9px; border: 1px solid transparent; border-radius: 7px;
  color: var(--re-muted); background: transparent; cursor: pointer; font: 700 10px/1 inherit;
}
.re-selection-tools button:hover { color: var(--re-ink); border-color: var(--re-line); background: var(--re-panel-2); }
.re-selection-tools .re-create-group { display:flex; align-items:center; gap:6px; color:#fff; background:var(--re-accent); }
.re-selection-tools .re-create-group:disabled { opacity:.38; cursor:not-allowed; }
.re-selection-tools .re-duplicate-road { display:flex; align-items:center; gap:6px; }
.re-selection-tools .re-duplicate-road:disabled { opacity:.38; cursor:not-allowed; }
.re-selection-tools svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; }
.re-marquee { position: absolute; z-index: 20; pointer-events: none; border: 1px solid rgba(232,109,59,.8); background: rgba(232,109,59,.095); }
.re-zoom-controls {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 26;
  display: grid;
  gap: 8px;
}
.re-zoom-controls button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--re-line-strong);
  border-radius: 11px;
  color: var(--re-ink);
  background: rgba(255,255,253,.92);
  box-shadow: 0 6px 18px rgba(36,34,29,.1);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}
.re-zoom-controls button:hover { color: var(--re-accent); border-color: var(--re-accent); background: var(--re-accent-soft); }
.re-zoom-controls button:focus-visible { outline: 3px solid rgba(232,109,59,.22); outline-offset: 2px; }
.re-canvas-hint {
  position: absolute;
  left: 12px;
  bottom: 11px;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 7px 10px;
  border: 1px solid var(--re-line);
  border-radius: 9px;
  background: rgba(255,255,253,.86);
  color: var(--re-muted);
  backdrop-filter: blur(8px);
  font-size: 9px;
}
.re-canvas-hint span { display: flex; align-items: center; gap: 5px; }
.re-mouse { width: 10px; height: 14px; border: 1px solid currentColor; border-radius: 5px; position: relative; }
.re-mouse::after { content: ""; position: absolute; top: 1px; width: 1px; height: 4px; background: currentColor; }
.re-mouse.left::after { left: 2px; }
.re-mouse.middle::after { left: 4px; }
.re-empty { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: rgba(243,242,238,.76); backdrop-filter: blur(3px); }
.re-empty[hidden] { display: none; }
.re-empty-mark { display: flex; align-items: center; gap: 4px; margin-bottom: 18px; }
.re-empty-mark span { display: block; width: 70px; height: 8px; border-radius: 99px; background: #c8cac6; }
.re-empty-mark span:nth-child(2) { width: 42px; background: var(--re-accent); }
.re-empty h1 { margin: 0; font-size: 22px; letter-spacing: -.04em; }
.re-empty p { max-width: 420px; margin: 10px 0 18px; color: var(--re-muted); line-height: 1.55; }
.re-primary-btn { display: inline-grid; place-items: center; min-height: 38px; padding: 0 16px; border-radius: 10px; color: #fff; background: var(--re-accent); font-weight: 700; cursor: pointer; box-shadow: 0 9px 22px rgba(232,109,59,.22); }
.re-empty a { margin-top: 12px; color: var(--re-muted); font-size: 11px; }

.re-inspector {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto 1fr;
  background: var(--re-panel);
  border-left: 1px solid var(--re-line);
  position: relative;
  z-index: 30;
}
.re-inspector-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 16px 16px 10px; }
.re-eyebrow { display: block; color: var(--re-faint); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.re-inspector-head h2 { margin: 5px 0 0; font-size: 18px; letter-spacing: -.025em; }
.re-selection-summary { margin: 0 16px 10px; padding: 11px 12px; border-radius: 9px; color: var(--re-muted); background: var(--re-panel-2); font-size: 12px; line-height: 1.45; }
.re-inspector-scroll { min-height: 0; position: relative; overflow: auto; padding: 0 13px 12px; }
.re-inspector-empty-state {
  display: none;
  position: absolute;
  z-index: 3;
  inset: 44% 28px auto;
  transform: translateY(-50%);
  text-align: center;
  pointer-events: none;
}
.re-inspector-empty-state svg {
  width: 42px;
  margin-bottom: 12px;
  fill: none;
  stroke: var(--re-faint);
  stroke-width: 1.7;
}
.re-inspector-empty-state strong { display: block; font-size: 15px; }
.re-inspector-empty-state span { display: block; max-width: 260px; margin: 6px auto 0; color: var(--re-muted); font-size: 11px; line-height: 1.45; }
.re-inspector.is-empty .re-selection-summary { visibility: hidden; }
.re-inspector.is-empty .re-inspector-scroll::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(244,243,239,.66);
  backdrop-filter: grayscale(1);
}
.re-inspector.is-empty .re-inspector-empty-state { display: block; }
.re-inspector.is-empty .re-control-section { opacity: .24; filter: grayscale(1); }
.re-control-section { border-bottom: 1px solid var(--re-line); }
.re-section-title { width: 100%; height: 48px; display: flex; align-items: center; justify-content: space-between; border: 0; background: transparent; cursor: pointer; font-weight: 700; font-size: 13px; }
.re-section-title > span { display: flex; align-items: center; gap: 8px; }
.re-section-state {
  flex: 0 0 auto;
  padding: 3px 6px;
  border: 1px solid var(--re-line);
  border-radius: 5px;
  font: 800 7px/1 Inter, Arial, sans-serif;
  letter-spacing: .055em;
  white-space: nowrap;
}
.re-section-state.is-source {
  color: #68717d;
  border-color: rgba(111,119,130,.3);
  background: rgba(111,119,130,.08);
}
.re-section-state.is-changed {
  color: #b34e1c;
  border-color: rgba(232,109,59,.34);
  background: rgba(232,109,59,.1);
}
.re-section-state.is-added {
  color: #167353;
  border-color: rgba(55,184,137,.34);
  background: rgba(55,184,137,.1);
}
.re-section-title > b { color: var(--re-faint); font-size: 10px; transition: transform .16s; }
.re-section-title:not(.is-open) > b { transform: rotate(180deg); }
.re-section-title:not(.is-open) + .re-section-body { display: none; }
.re-accent-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--re-accent); box-shadow: 0 0 0 3px rgba(232,109,59,.11); }
.re-accent-dot.mint { background: var(--re-mint); box-shadow: 0 0 0 3px rgba(55,184,137,.11); }
.re-accent-dot.violet { background: var(--re-violet); box-shadow: 0 0 0 3px rgba(135,108,231,.11); }
.re-accent-dot.yellow { background: var(--re-yellow); box-shadow: 0 0 0 3px rgba(226,169,45,.12); }
.re-accent-dot.blue { background: var(--re-blue); box-shadow: 0 0 0 3px rgba(77,135,231,.11); }
.re-accent-dot.outline { background: #6f7782; box-shadow: 0 0 0 3px rgba(111,119,130,.12); }
.re-section-body { padding: 0 4px 16px; }
.re-control { margin: 3px 0 14px; }
.re-control-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 12px; font-weight: 650; }
.re-control small, .re-switch-line small { display: block; color: var(--re-faint); font-size: 11px; line-height: 1.45; margin-top: 5px; }
.re-timeline-open {
  width: 28px;
  height: 28px;
  box-sizing: border-box;
  flex: 0 0 28px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--re-line);
  border-radius: 7px;
  background: #fff;
  color: var(--re-accent);
  cursor: pointer;
  font-size: 15px;
}
.re-timeline-open:hover { border-color: var(--re-accent); background: var(--re-accent-soft); }
.re-range-row { display: grid; grid-template-columns: 1fr 58px; align-items: center; gap: 10px; }
input[type="range"] { width: 100%; accent-color: var(--re-accent); }
.re-range-row output { height: 36px; display: grid; place-items: center; border: 1px solid var(--re-line); border-radius: 8px; background: #fff; font-size: 12px; font-weight: 700; }
.re-segmented { display: grid; grid-template-columns: repeat(3,1fr); padding: 3px; border-radius: 8px; background: var(--re-panel-2); }
.re-segmented button { height: 34px; padding: 0 4px; border: 0; border-radius: 7px; background: transparent; color: var(--re-muted); font-size: 11px; cursor: pointer; }
.re-segmented button.is-active { background: #fff; color: var(--re-ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.re-segmented[data-mixed="true"] { outline: 1px dashed var(--re-accent); outline-offset: 2px; }
input.is-mixed {
  color: var(--re-muted);
  font-style: italic;
  background-image: linear-gradient(135deg, transparent 48%, rgba(232,109,59,.08) 48%, rgba(232,109,59,.08) 52%, transparent 52%);
  background-size: 8px 8px;
}
input.is-mixed::placeholder { color: var(--re-muted); opacity: 1; }
.re-switch-line { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.re-switch-line strong { font-size: 12px; }
.re-switch { flex: none; position: relative; width: 38px; height: 22px; }
.re-switch input { opacity: 0; position: absolute; }
.re-switch span { position: absolute; inset: 0; border-radius: 99px; background: #d4d4cf; cursor: pointer; transition: .18s; }
.re-switch span::after { content: ""; position: absolute; width: 18px; height: 18px; top: 2px; left: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: .18s; }
.re-switch input:checked + span { background: var(--re-accent); }
.re-switch input:checked + span::after { transform: translateX(16px); }
.re-control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.re-control-grid > label { min-width: 0; }
.re-control-grid > label > span:first-child { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--re-muted); font-size: 11px; }
.re-control-grid input[type="number"], .re-unit-input, .re-color-input {
  height: 37px;
  width: 100%;
  border: 1px solid var(--re-line);
  border-radius: 7px;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.re-control-grid input[type="number"] { padding: 0 10px; outline: 0; font-size: 12px; }
.re-inspector input[type="number"],
.re-key-editor input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}
.re-inspector input[type="number"]::-webkit-inner-spin-button,
.re-inspector input[type="number"]::-webkit-outer-spin-button,
.re-key-editor input[type="number"]::-webkit-inner-spin-button,
.re-key-editor input[type="number"]::-webkit-outer-spin-button {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
}
.re-number-control {
  width: 100%;
  height: 37px;
  display: grid;
  grid-template-columns: minmax(0,1fr) 32px 32px;
  overflow: hidden;
  border: 1px solid var(--re-line);
  border-radius: 7px;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.re-number-control > input[type="number"] {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 10px;
  border: 0;
  outline: 0;
  color: var(--re-ink);
  background: transparent;
  font: 600 12px/1 Inter, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}
.re-number-step {
  width: 32px;
  min-width: 32px;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--re-line);
  color: var(--re-muted);
  background: var(--re-panel-2);
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
}
.re-number-step:hover { color: var(--re-accent); background: var(--re-accent-soft); }
.re-number-step:focus-visible { position: relative; outline: 2px solid var(--re-accent); outline-offset: -2px; }
.re-unit-input > .re-number-control { height: 100%; border: 0; border-radius: 0; }
.re-unit-input:has(.re-number-control) { grid-template-columns: minmax(0,1fr) 24px; }
.re-unit-input { display: grid; grid-template-columns: 1fr 24px; overflow: hidden; }
.re-unit-input input { width: 100%; min-width: 0; height: 100% !important; border: 0 !important; }
.re-unit-input b { display: grid; place-items: center; border-left: 1px solid var(--re-line); color: var(--re-faint); font-size: 10px; }
.re-color-input { display: grid; grid-template-columns: 28px 1fr; overflow: hidden; }
.re-color-input input[type="color"] { width: 32px; height: 37px; padding: 3px; border: 0; border-right: 1px solid var(--re-line); background: transparent; }
.re-color-input input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
.re-color-input input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 4px; }
.re-color-input input[type="text"] {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  padding: 0 8px;
  color: var(--re-ink);
  background: transparent;
  font: 600 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-transform: uppercase;
}
.re-number-control:focus-within,
.re-unit-input:focus-within,
.re-color-input:focus-within,
.re-key-editor input:focus {
  border-color: rgba(232,109,59,.72);
  box-shadow: 0 0 0 3px rgba(232,109,59,.11);
}
.re-unit-input .re-number-control:focus-within { border-color: transparent; box-shadow: none; }
.re-number-control.is-committed,
.re-unit-input.is-committed,
.re-color-input.is-committed,
.re-key-editor input.is-committed {
  border-color: #38a779 !important;
  background-color: rgba(55,184,137,.08) !important;
  box-shadow: 0 0 0 3px rgba(55,184,137,.14) !important;
}
.re-param-reset {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--re-line);
  border-radius: 7px;
  color: var(--re-muted);
  background: var(--re-panel);
  cursor: pointer;
  font-size: 14px;
}
.re-param-reset:hover { color: var(--re-accent); border-color: var(--re-accent); background: var(--re-accent-soft); }
.re-param-reset:disabled {
  opacity: .34;
  color: var(--re-faint);
  border-color: var(--re-line);
  background: var(--re-panel);
  cursor: default;
}
.re-label-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; }
.re-label-actions .re-timeline-open,
.re-label-actions .re-param-reset { margin: 0; }
.re-timeline-open svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.re-coming { display: flex; align-items: center; gap: 8px; padding: 9px; border: 1px dashed var(--re-line-strong); border-radius: 8px; background: linear-gradient(135deg, rgba(77,135,231,.045), transparent); }
.re-coming span { border: 1px solid rgba(77,135,231,.25); border-radius: 5px; color: var(--re-blue); padding: 3px 4px; font-size: 7px; font-weight: 800; }
.re-coming p { margin: 0; color: var(--re-muted); font-size: 9px; }
.re-apply { width: 100%; height: 36px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 9px; color: #fff; background: var(--re-accent); cursor: pointer; font-size: 11px; font-weight: 700; box-shadow: 0 8px 20px rgba(232,109,59,.18); }
.re-apply span { opacity: .62; font-size: 9px; }
.re-apply:disabled { background: #c9c9c4; box-shadow: none; cursor: default; }

.road-editor-page .rm-dock { right: 440px !important; bottom: 22px !important; }
body.road-editor-page.timeline-open .rm-dock { bottom: calc(var(--re-timeline-h) + 18px) !important; }

.re-outline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.re-outline-head strong,
.re-outline-head small { display: block; }
.re-outline-head strong { font-size: 11px; }
.re-outline-head small { margin-top: 3px; color: var(--re-faint); font-size: 9px; }
.re-outline-head > button {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--re-line);
  border-radius: 9px;
  color: var(--re-accent);
  background: var(--re-panel);
  font-size: 17px;
  cursor: pointer;
}
.re-outline-list { display: grid; gap: 8px; margin-top: 10px; }
.re-outline-card {
  padding: 9px;
  border: 1px solid var(--re-line);
  border-radius: 10px;
  background: var(--re-panel-2);
}
.re-outline-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.re-outline-card-head > strong { font-size: 10px; }
.re-outline-actions { display: inline-flex; gap: 4px; }
.re-outline-actions button {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--re-line);
  border-radius: 7px;
  color: var(--re-muted);
  background: var(--re-panel);
  cursor: pointer;
}
.re-outline-actions button:hover:not(:disabled) { color: var(--re-accent); border-color: var(--re-accent); }
.re-outline-actions button:disabled { opacity: .35; cursor: default; }
.re-outline-actions svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.re-outline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.re-outline-fields > label > span:first-child { display: block; margin-bottom: 5px; color: var(--re-muted); font-size: 9px; }
.re-outline-fields .re-outline-color { grid-column: 1 / -1; }
.re-outline-empty {
  margin-top: 10px;
  padding: 12px;
  border: 1px dashed var(--re-line-strong);
  border-radius: 9px;
  color: var(--re-faint);
  font-size: 9px;
  line-height: 1.45;
  text-align: center;
}
.re-outline-empty[hidden] { display: none; }

.re-onboarding {
  position: fixed;
  inset: 58px 0 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(49,45,39,.38);
  backdrop-filter: blur(3px) saturate(.7);
}
.re-onboarding[hidden] { display: none; }
.re-onboarding-card {
  position: relative;
  width: min(570px, calc(100vw - 32px));
  padding: 30px;
  border: 1px solid var(--re-line-strong);
  border-radius: 18px;
  color: var(--re-ink);
  background: #fcfcfa;
  box-shadow: 0 30px 80px rgba(38,35,29,.24);
  text-align: center;
}
.re-onboarding-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--re-line);
  border-radius: 10px;
  color: var(--re-muted);
  background: var(--re-panel-2);
  cursor: pointer;
  font-size: 20px;
}
.re-onboarding-card .re-eyebrow { color: var(--re-faint); }
.re-onboarding-card h2 { margin: 7px 0 8px; font-size: 23px; letter-spacing: -.035em; }
.re-onboarding-card > p { max-width: 400px; margin: 0 auto; color: var(--re-muted); line-height: 1.5; }
.re-pan-demo {
  width: 122px;
  height: 122px;
  position: relative;
  display: grid;
  place-items: center;
  margin: 0 auto 22px;
}
.re-pan-demo > svg { width: 43px; fill: none; stroke: var(--re-ink); stroke-width: 2; }
.re-pan-demo .re-mouse-wheel { fill: var(--re-accent); stroke: none; }
.re-pan-arrow { position: absolute; color: var(--re-accent); font-size: 24px; font-weight: 400; }
.re-pan-arrow.up { top: -4px; }
.re-pan-arrow.right { right: 2px; }
.re-pan-arrow.down { bottom: -4px; }
.re-pan-arrow.left { left: 2px; }
.re-onboarding-actions {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 8px;
  margin: 24px 0;
}
.re-onboarding-actions > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--re-line);
  border-radius: 11px;
  background: var(--re-panel-2);
  text-align: left;
}
.re-onboarding-actions svg { width: 23px; flex: 0 0 auto; fill: none; stroke: #f08a5d; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.re-onboarding-actions span { min-width: 0; }
.re-onboarding-actions strong, .re-onboarding-actions small { display: block; }
.re-onboarding-actions strong { font-size: 12px; }
.re-onboarding-actions small { margin-top: 3px; color: var(--re-muted); font-size: 9px; white-space: nowrap; }
.re-onboarding-primary { min-height: 42px; padding: 0 18px; border: 0; border-radius: 10px; color: #fff; background: var(--re-accent); cursor: pointer; font-weight: 700; }

html[data-app-theme="dark"] .re-canvas { background: var(--re-bg); }
html[data-app-theme="dark"] .re-road-card { background: rgba(22,27,39,.96); border-color: var(--re-line-strong); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
html[data-app-theme="dark"] .re-canvas.has-selection .re-road-card:not(.is-selected) {
  opacity: .5;
  filter: saturate(.56);
}
html[data-app-theme="dark"] .re-canvas.has-selection .re-road-card:not(.is-selected):hover {
  opacity: .78;
  filter: saturate(.82);
}
html[data-app-theme="dark"] .re-road-card.is-selected {
  border-color: #ff8350;
  background: #211c1a;
  box-shadow: inset 0 0 0 1px rgba(255,131,80,.2), 0 16px 36px rgba(0,0,0,.34);
}
html[data-app-theme="dark"] .re-road-card.is-selected:hover {
  border-color: #ff956a;
  box-shadow: inset 0 0 0 1px rgba(255,149,106,.26), 0 18px 40px rgba(0,0,0,.4);
}
html[data-app-theme="dark"] .re-road-card.is-selected.is-highlighted {
  box-shadow: inset 0 3px 0 #ff3a2d, inset 0 0 0 1px rgba(255,131,80,.2), 0 16px 36px rgba(0,0,0,.34);
}
html[data-app-theme="dark"] .re-card-mode {
  color: #aeb5c0;
  border-color: rgba(255,255,255,.14);
  background: rgba(28,34,47,.92);
  box-shadow: 0 1px 4px rgba(0,0,0,.24);
}
html[data-app-theme="dark"] .re-card-mode[data-road-visibility="solo"].is-active {
  color: #fff;
  border-color: var(--re-accent);
  background: var(--re-accent);
}
html[data-app-theme="dark"] .re-card-highlight.is-active {
  color: #fff;
  border-color: #ff3a2d;
  background: #d9271b;
  box-shadow: 0 0 0 3px rgba(255,58,45,.17);
}
html[data-app-theme="dark"] .re-card-highlight.is-partial {
  color: #ff746a;
  border-color: rgba(255,78,66,.48);
  background: rgba(255,58,45,.12);
}
html[data-app-theme="dark"] .re-card-hide.is-active {
  color: #fff;
  border-color: #717986;
  background: #59616d;
}
html[data-app-theme="dark"] .re-road-meta { background: var(--re-panel-2); }
html[data-app-theme="dark"] .re-workspace-sync {
  border-color: var(--re-line);
  background: rgba(27,32,44,.78);
}
html[data-app-theme="dark"] .re-workspace-sync:hover { background: #202635; }
html[data-app-theme="dark"] .re-workspace-sync-toggle { background: #555d6b; }
html[data-app-theme="dark"] .re-canvas-hint,
html[data-app-theme="dark"] .re-zoom-controls button,
html[data-app-theme="dark"] .re-selection-tools,
html[data-app-theme="dark"] .re-card-z,
html[data-app-theme="dark"] .re-group-z,
html[data-app-theme="dark"] .re-timeline-open,
html[data-app-theme="dark"] .re-number-control,
html[data-app-theme="dark"] .re-control-grid input[type="number"],
html[data-app-theme="dark"] .re-unit-input,
html[data-app-theme="dark"] .re-color-input,
html[data-app-theme="dark"] .re-range-row output,
html[data-app-theme="dark"] .re-number-step { background: var(--re-panel); }
html[data-app-theme="dark"] .re-road-meta { border-color: var(--re-line); }
html[data-app-theme="dark"] .re-surface-badge { color: #ffb58e; }
html[data-app-theme="dark"] .re-surface-badge.is-bridge { color: #8dbdff; }
html[data-app-theme="dark"] .re-surface-badge.is-tunnel { color: #c2a9ff; }
html[data-app-theme="dark"] .re-road-meta .re-surface-meta.is-surface { color: #ffae83; background: rgba(232,109,59,.15); }
html[data-app-theme="dark"] .re-road-meta .re-surface-meta.is-bridge { color: #91c0ff; background: rgba(77,135,231,.15); }
html[data-app-theme="dark"] .re-road-meta .re-surface-meta.is-tunnel { color: #c5adff; background: rgba(135,105,210,.15); }
html[data-app-theme="dark"] .re-section-state.is-source { color: #b5beca; background: rgba(145,156,171,.14); }
html[data-app-theme="dark"] .re-section-state.is-changed { color: #ffad82; background: rgba(232,109,59,.16); }
html[data-app-theme="dark"] .re-section-state.is-added { color: #79deb9; background: rgba(55,184,137,.16); }
html[data-app-theme="dark"] .re-inspector.is-empty .re-inspector-scroll::after { background: rgba(22,27,39,.72); }
html[data-app-theme="dark"] .re-onboarding { background: rgba(8,10,14,.74); }
html[data-app-theme="dark"] .re-onboarding-card {
  color: #f4f5f7;
  border-color: rgba(255,255,255,.12);
  background: #171b23;
  box-shadow: 0 30px 80px rgba(0,0,0,.42);
}
html[data-app-theme="dark"] .re-onboarding-close {
  color: #aeb3bd;
  border-color: rgba(255,255,255,.13);
  background: rgba(255,255,255,.045);
}
html[data-app-theme="dark"] .re-onboarding-card .re-eyebrow { color: #858c99; }
html[data-app-theme="dark"] .re-onboarding-card > p { color: #aeb3bd; }
html[data-app-theme="dark"] .re-pan-demo > svg { stroke: #f3f4f6; }
html[data-app-theme="dark"] .re-onboarding-actions > div {
  border-color: rgba(255,255,255,.09);
  background: rgba(255,255,255,.035);
}
html[data-app-theme="dark"] .re-onboarding-actions small { color: #8e95a2; }
html[data-app-theme="dark"] .re-group-name:hover,
html[data-app-theme="dark"] .re-group-name:focus { background: var(--re-panel-2); }

/* Бумажный белый остался в вводных полях, значковых кнопках и «выбранных»
   пилюлях — на тёмном они светились заплатками. Выбранное на тёмной теме
   показываем не белизной, а подсветкой поверхности и цветом текста. */
html[data-app-theme="dark"] .re-icon-btn,
html[data-app-theme="dark"] .re-search,
html[data-app-theme="dark"] .re-version,
html[data-app-theme="dark"] .re-key-editor input,
html[data-app-theme="dark"] .re-timeline-head-actions select,
html[data-app-theme="dark"] .re-timeline-head-actions > button:not(.re-icon-btn),
html[data-app-theme="dark"] kbd {
  color: var(--re-ink);
  border-color: var(--re-line);
  background: var(--re-panel-2);
}

html[data-app-theme="dark"] .re-icon-btn:hover:not(:disabled) { background: var(--re-panel); }
html[data-app-theme="dark"] kbd { color: var(--re-faint); }
html[data-app-theme="dark"] .re-timeline-head-actions > button:not(.re-icon-btn) { color: var(--re-accent); }

html[data-app-theme="dark"] .re-product-nav a.is-active,
html[data-app-theme="dark"] .re-theme-switch button.is-active,
html[data-app-theme="dark"] .re-filter-tabs button.is-active,
html[data-app-theme="dark"] .re-segmented button.is-active {
  color: var(--re-ink);
  background: var(--re-panel);
  box-shadow: inset 0 0 0 1px var(--re-line-strong);
}

html[data-app-theme="dark"] .re-filter-tabs button:hover { background: rgba(255,255,255,.06); }
html[data-app-theme="dark"] .re-key.is-selected { background: var(--re-panel); }
html[data-app-theme="dark"] .re-timeline { background: var(--re-panel); }

.re-timeline {
  height: var(--re-timeline-h);
  position: fixed;
  z-index: 80;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-rows: 54px 1fr;
  border-top: 1px solid var(--re-line-strong);
  background: #f8f8f5;
  box-shadow: 0 -18px 45px rgba(33,31,28,.12);
  animation: re-timeline-in .24s cubic-bezier(.22,.8,.24,1);
}
.re-timeline[hidden] { display: none; }
@keyframes re-timeline-in { from { transform: translateY(100%); } to { transform: none; } }
.re-timeline-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px 7px 16px; border-bottom: 1px solid var(--re-line); }
.re-timeline-head h3 { margin: 3px 0 0; font-size: 13px; }
.re-timeline-head-actions { display: flex; align-items: center; gap: 8px; }
.re-timeline-head-actions label { color: var(--re-muted); font-size: 9px; }
.re-timeline-head-actions select, .re-timeline-head-actions > button:not(.re-icon-btn) { height: 30px; border: 1px solid var(--re-line); border-radius: 8px; background: #fff; padding: 0 9px; font-size: 10px; cursor: pointer; }
.re-timeline-head-actions > button:not(.re-icon-btn) { color: var(--re-accent); font-weight: 700; }
.re-timeline-body { min-height: 0; display: grid; grid-template-columns: 158px 1fr 170px; }
.re-track-labels { padding-top: 31px; border-right: 1px solid var(--re-line); }
.re-track-labels > div { height: 55px; display: grid; grid-template-columns: 14px 1fr; grid-template-rows: auto auto; align-content: center; padding: 0 12px; }
.re-track-color { width: 6px; height: 6px; grid-row: 1/3; align-self: center; border-radius: 2px; background: var(--re-accent); }
.re-track-color.ghost { background: #b7b8b3; }
.re-track-labels strong { font-size: 9px; }
.re-track-labels small { color: var(--re-faint); font-size: 8px; margin-top: 2px; }
.re-timeline-stage { position: relative; overflow: hidden; cursor: ew-resize; touch-action: none; background-image: linear-gradient(to bottom, transparent 54px, var(--re-line) 55px, transparent 56px, transparent 109px, var(--re-line) 110px); }
.re-timeline-stage:focus-visible { outline: 2px solid rgba(232,109,59,.5); outline-offset: -2px; }
.re-timeline-visual { position: absolute; inset: 28px 0 0; width: 100%; height: 112px; overflow: visible; pointer-events: none; }
.re-timeline-value-line { fill: none; stroke: var(--re-accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.re-timeline-draft-line {
  fill: none;
  stroke: var(--re-accent);
  stroke-width: 2;
  stroke-dasharray: 8 6;
  opacity: .9;
  vector-effect: non-scaling-stroke;
}
.re-timeline-preview-line { stroke: var(--re-ink); stroke-linecap: round; }
.re-timeline-preview-draft { stroke: var(--re-accent); opacity: .48; }
/* Отметки расставлены по доле от 0..24 — той же, по которой стоят маркер и
   ключи. Равные колонки грида давали свою шкалу, и отметка расходилась с
   маркером тем сильнее, чем правее. */
.re-ruler { position: relative; height: 28px; border-bottom: 1px solid var(--re-line); }
.re-ruler span { position: absolute; top: 0; height: 28px; color: var(--re-faint); padding: 7px 0 0 5px; border-left: 1px solid var(--re-line); font-size: 8px; }
/* Последняя отметка стоит на самом краю — подпись уводим внутрь. */
.re-ruler span:last-child { padding: 7px 5px 0 0; border-left: 0; border-right: 1px solid var(--re-line); transform: translateX(-100%); }
.re-ruler span::after { content: ""; position: absolute; left: 0; top: 28px; bottom: -140px; width: 1px; background: rgba(45,45,42,.045); }
.re-ruler span:last-child::after { left: auto; right: 0; }
.re-track { position: absolute; left: 0; right: 0; top: 28px; height: 55px; }
.re-track::before { display: none; }
.re-key { width: 12px; height: 12px; position: absolute; top: 21px; transform: translateX(-50%) rotate(45deg); border: 2px solid #fff; border-radius: 2px; background: var(--re-accent); box-shadow: 0 0 0 1px var(--re-accent), 0 2px 5px rgba(0,0,0,.18); cursor: ew-resize; }
.re-key.is-selected { width: 15px; height: 15px; top: 19px; background: #fff; border-color: var(--re-accent); box-shadow: 0 0 0 2px rgba(232,109,59,.18); }
.re-key.re-key-draft {
  width: 15px;
  height: 15px;
  top: 19px;
  border: 2px dashed var(--re-accent);
  background: var(--re-accent-soft);
  box-shadow: 0 0 0 3px rgba(232,109,59,.1);
  pointer-events: none;
}
.re-key::after { content: attr(data-value); position: absolute; left: 7px; top: -18px; transform: rotate(-45deg); color: var(--re-muted); font-size: 8px; white-space: nowrap; }
.re-playhead { position: absolute; top: 0; bottom: 0; left: 66.66%; width: 1px; background: rgba(232,109,59,.68); pointer-events: none; }
.re-playhead::before { content: ""; position: absolute; top: 32px; left: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--re-accent); }
.re-playhead b { position: absolute; top: 4px; left: 11px; color: var(--re-accent); font-size: 8px; white-space: nowrap; }
.re-playhead-handle {
  width: 20px;
  height: 17px;
  position: absolute;
  top: 16px;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transform: translateX(-50%);
  border: 1px solid rgba(187,74,31,.55);
  border-radius: 6px 6px 4px 4px;
  color: #fff;
  background: var(--re-accent);
  box-shadow: 0 3px 8px rgba(160,67,31,.22);
}
.re-playhead-handle::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 7px;
  height: 7px;
  transform: translateX(-50%) rotate(45deg);
  border-right: 1px solid rgba(187,74,31,.55);
  border-bottom: 1px solid rgba(187,74,31,.55);
  background: var(--re-accent);
}
.re-playhead-handle i { width: 1px; height: 7px; position: relative; z-index: 1; border-radius: 2px; background: rgba(255,255,255,.72); }
.re-timeline-open.is-active { border-color: var(--re-accent); color: #fff; background: var(--re-accent); }
.re-timeline-head-actions #reAddKey.is-pending {
  border-color: var(--re-accent);
  color: #fff;
  background: var(--re-accent);
  box-shadow: 0 0 0 3px rgba(232,109,59,.14);
}
.re-key-editor { padding: 13px 12px; border-left: 1px solid var(--re-line); }
.re-key-editor > span { display: block; margin-bottom: 8px; color: var(--re-faint); font-size: 8px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.re-key-editor label { display: grid; grid-template-columns: 55px 1fr; align-items: center; margin-bottom: 7px; color: var(--re-muted); font-size: 9px; }
.re-key-editor input {
  width: 100%;
  height: 29px;
  border: 1px solid var(--re-line);
  border-radius: 7px;
  padding: 0 8px;
  outline: 0;
  color: var(--re-ink);
  background: #fff;
  font: 600 10px/1 Inter, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.re-key-editor button { border: 0; background: transparent; color: #c55446; padding: 4px 0; font-size: 9px; cursor: pointer; }
.re-key-editor button:disabled { color: var(--re-faint); cursor: default; opacity: .55; }

/* Создание и дублирование дорожного слоя */
.re-road-modal {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(30, 29, 26, .48);
  backdrop-filter: blur(5px) saturate(.72);
}
.re-road-modal[hidden] { display: none; }
.re-road-modal-card {
  width: min(940px, calc(100vw - 32px));
  max-height: min(860px, calc(100vh - 32px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--re-line-strong);
  border-radius: 17px;
  color: var(--re-ink);
  background: var(--re-panel);
  box-shadow: 0 32px 90px rgba(29, 27, 23, .27);
}
.re-road-modal-head {
  min-height: 96px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 22px 16px;
}
.re-road-modal-head h2 { margin: 5px 0 4px; font-size: 22px; letter-spacing: -.035em; }
.re-road-modal-head p { margin: 0; color: var(--re-muted); font-size: 11px; }
.re-road-modal-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--re-line);
  border-radius: 10px;
  color: var(--re-muted);
  background: var(--re-panel-2);
  cursor: pointer;
  font-size: 20px;
}
.re-road-modal-close:hover { color: var(--re-ink); border-color: var(--re-line-strong); }
.re-road-modal-tabs {
  display: flex;
  gap: 3px;
  padding: 0 22px 10px;
  border-bottom: 1px solid var(--re-line);
}
.re-road-modal-tabs button {
  min-width: 108px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  color: var(--re-muted);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}
.re-road-modal-tabs button:hover { color: var(--re-ink); background: var(--re-panel-2); }
.re-road-modal-tabs button.is-active {
  color: var(--re-ink);
  background: var(--re-panel-2);
  box-shadow: inset 0 0 0 1px var(--re-line);
}
.re-road-modal-body { min-height: 0; overflow: auto; scrollbar-width: thin; }
.re-road-visual-panel { display: grid; gap: 10px; padding: 16px 22px 22px; }
.re-road-visual-panel[hidden] { display: none; }
.re-road-batch-note {
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--re-accent) 38%, var(--re-line));
  border-radius: 10px;
  color: var(--re-muted);
  background: var(--re-accent-soft);
  font-size: 10px;
  line-height: 1.45;
}
.re-road-batch-note[hidden] { display: none; }
.re-road-batch-note strong { color: var(--re-ink); }
.re-road-form-section {
  padding: 14px;
  border: 1px solid var(--re-line);
  border-radius: 12px;
  background: var(--re-panel-2);
}
.re-road-form-section-head {
  min-height: 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.re-road-form-section-head strong,
.re-road-form-section-head small { display: block; }
.re-road-form-section-head strong { font-size: 12px; }
.re-road-form-section-head small { margin-top: 3px; color: var(--re-faint); font-size: 9px; line-height: 1.4; }
.re-road-form-section-head code {
  max-width: 45%;
  overflow: hidden;
  padding: 5px 7px;
  border: 1px solid var(--re-line);
  border-radius: 6px;
  color: var(--re-muted);
  background: var(--re-panel);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.re-road-form-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 10px;
}
.re-road-field {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: var(--re-muted);
  font-size: 9px;
  font-weight: 700;
}
.re-road-field-wide { min-width: 0; }
.re-road-field > small { color: var(--re-faint); font-size: 8px; font-weight: 500; }
.re-road-field > input,
.re-road-field > select,
.re-road-unit-input,
.re-road-color-input {
  width: 100%;
  min-width: 0;
  height: 36px;
  border: 1px solid var(--re-line);
  border-radius: 8px;
  outline: 0;
  color: var(--re-ink);
  background: var(--re-panel);
}
.re-road-field > input,
.re-road-field > select { padding: 0 9px; font-size: 11px; font-weight: 600; }
.re-road-field > input:focus,
.re-road-field > select:focus,
.re-road-unit-input:focus-within,
.re-road-color-input:focus-within,
.re-road-code-panel textarea:focus,
.re-road-order-select:focus,
.re-road-filter-builder input:focus,
.re-road-filter-builder select:focus {
  border-color: rgba(232,109,59,.75);
  box-shadow: 0 0 0 3px rgba(232,109,59,.11);
}
.re-road-geometry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.re-road-icon-options {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}
.re-road-icon-options legend {
  grid-column: 1 / -1;
  margin-bottom: 5px;
  color: var(--re-muted);
  font-size: 9px;
  font-weight: 700;
}
.re-road-icon-options button {
  min-width: 0;
  min-height: 60px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 7px 5px 5px;
  border: 1px solid var(--re-line);
  border-radius: 9px;
  color: var(--re-muted);
  background: var(--re-panel);
  cursor: pointer;
  font-size: 8px;
  font-weight: 700;
}
.re-road-icon-options button:hover { color: var(--re-ink); border-color: var(--re-line-strong); }
.re-road-icon-options button.is-active {
  color: var(--re-accent);
  border-color: var(--re-accent);
  background: var(--re-accent-soft);
  box-shadow: 0 0 0 2px rgba(232,109,59,.08);
}
.re-road-icon-options svg { width: 100%; max-width: 72px; height: 28px; overflow: visible; }
.re-road-icon-options svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 8;
  stroke-linecap: butt;
  stroke-linejoin: miter;
}
.re-road-icon-options svg path.round,
.re-road-icon-options svg path.join-round { stroke-linecap: round; stroke-linejoin: round; }
.re-road-icon-options svg path.join-round { stroke-width: 8.5; }
.re-road-icon-options svg path.square { stroke-linecap: square; }
.re-road-icon-options svg path.bevel { stroke-linejoin: bevel; }
.re-road-icon-options svg path.guide { opacity: .38; stroke-width: 1; stroke-dasharray: 2 2; }
.re-road-auto-width,
.re-road-add-key,
.re-road-filter-add {
  min-height: 32px;
  border: 1px solid var(--re-line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--re-accent);
  background: var(--re-panel);
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}
.re-road-auto-width:hover,
.re-road-add-key:hover,
.re-road-filter-add:hover { border-color: var(--re-accent); background: var(--re-accent-soft); }
.re-road-width-head { display: grid; grid-template-columns: 210px 180px auto; align-items: end; justify-content: space-between; gap: 12px; }
.re-road-unit-input { display: flex; align-items: center; overflow: hidden; }
.re-road-unit-input input { min-width: 0; flex: 1; height: 100%; border: 0; outline: 0; padding: 0 9px; color: inherit; background: transparent; font-size: 11px; font-weight: 700; }
.re-road-unit-input b { padding: 0 9px; color: var(--re-faint); font-size: 9px; }
.re-road-width-timeline {
  position: relative;
  height: 82px;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--re-line);
  border-radius: 10px;
  background: var(--re-panel);
}
.re-road-width-ruler { position: absolute; inset: 0 10px auto; height: 29px; border-bottom: 1px solid var(--re-line); }
.re-road-width-ruler span {
  position: absolute;
  top: 0;
  height: 29px;
  padding: 8px 0 0 5px;
  border-left: 1px solid var(--re-line);
  color: var(--re-faint);
  font-size: 8px;
  transform: translateX(-1px);
}
.re-road-width-ruler span:last-child { padding-left: 0; border-left: 0; border-right: 1px solid var(--re-line); transform: translateX(-100%); }
.re-road-width-track { position: absolute; inset: 29px 10px 0; }
.re-road-width-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 25px;
  height: 2px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--re-accent) 36%, var(--re-line));
}
.re-road-width-key {
  width: 15px;
  height: 15px;
  position: absolute;
  top: 19px;
  border: 2px solid var(--re-panel);
  border-radius: 3px;
  color: transparent;
  background: var(--re-accent);
  box-shadow: 0 0 0 1px var(--re-accent), 0 2px 6px rgba(0,0,0,.16);
  cursor: ew-resize;
  transform: translateX(-50%) rotate(45deg);
}
.re-road-width-key.is-active { width: 18px; height: 18px; top: 17px; box-shadow: 0 0 0 2px var(--re-accent), 0 3px 8px rgba(0,0,0,.2); }
.re-road-width-key small {
  position: absolute;
  left: 50%;
  top: 19px;
  color: var(--re-muted);
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
  transform: translateX(-50%) rotate(-45deg);
}
.re-road-width-key-editor {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--re-faint);
  font-size: 9px;
}
.re-road-width-key-editor label { display: flex; align-items: center; gap: 5px; color: var(--re-muted); font-weight: 700; }
.re-road-width-key-editor input {
  width: 82px;
  height: 31px;
  border: 1px solid var(--re-line);
  border-radius: 7px;
  outline: 0;
  padding: 0 8px;
  color: var(--re-ink);
  background: var(--re-panel);
  font-size: 10px;
  font-weight: 700;
}
.re-road-width-key-editor button {
  min-height: 31px;
  border: 1px solid rgba(197,84,70,.25);
  border-radius: 7px;
  padding: 0 9px;
  color: #b94b3e;
  background: rgba(197,84,70,.06);
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}
.re-road-width-key-editor button:disabled { opacity: .4; cursor: default; }
.re-road-color-order { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.re-road-color-presets { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.re-road-color-preset {
  width: 32px;
  height: 32px;
  position: relative;
  border: 2px solid var(--re-panel);
  border-radius: 9px;
  background: var(--preset);
  box-shadow: 0 0 0 1px var(--re-line-strong);
  cursor: pointer;
}
.re-road-color-preset:hover { transform: translateY(-1px); }
.re-road-color-preset.is-active { box-shadow: 0 0 0 2px var(--re-accent), 0 0 0 4px rgba(232,109,59,.11); }
.re-road-color-input { max-width: 260px; display: flex; align-items: center; overflow: hidden; }
.re-road-color-input input[type="color"] { width: 40px; height: 100%; padding: 4px; border: 0; border-right: 1px solid var(--re-line); background: transparent; cursor: pointer; }
.re-road-color-input input[type="text"] { min-width: 0; flex: 1; height: 100%; border: 0; outline: 0; padding: 0 9px; color: inherit; background: transparent; font: 700 10px/1 ui-monospace, Consolas, monospace; }

.re-road-filter-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.re-road-filter-head label { display: flex; align-items: center; gap: 7px; color: var(--re-muted); font-size: 9px; font-weight: 700; }
.re-road-filter-head select,
.re-road-filter-row input,
.re-road-filter-row select,
.re-road-filter-tags input {
  height: 32px;
  min-width: 0;
  border: 1px solid var(--re-line);
  border-radius: 7px;
  outline: 0;
  padding: 0 8px;
  color: var(--re-ink);
  background: var(--re-panel);
  font-size: 10px;
  font-weight: 600;
}
.re-road-filter-list { display: grid; gap: 6px; }
.re-road-filter-row {
  position: relative;
  display: grid;
  grid-template-columns: 132px minmax(110px, .8fr) minmax(160px, 1.5fr) 32px;
  gap: 6px;
  align-items: start;
  padding: 6px;
  border: 1px solid var(--re-line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--re-panel) 72%, transparent);
}
.re-road-filter-row.is-tags { grid-template-columns: 132px minmax(110px, .8fr) minmax(160px, 1.5fr) 32px; }
.re-road-filter-tags {
  min-height: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--re-line);
  border-radius: 7px;
  background: var(--re-panel);
}
.re-road-filter-tags input { min-width: 88px; flex: 1; height: 24px; border: 0; padding: 0 4px; background: transparent; box-shadow: none !important; }
.re-road-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 22px;
  padding: 0 3px 0 7px;
  border-radius: 6px;
  color: var(--re-ink);
  background: var(--re-panel-2);
  font-size: 9px;
  font-weight: 700;
}
.re-road-filter-tag button,
.re-road-filter-delete {
  border: 0;
  color: var(--re-faint);
  background: transparent;
  cursor: pointer;
  font-size: 15px;
}
.re-road-filter-tag button { width: 20px; height: 20px; padding: 0; }
.re-road-filter-delete { width: 32px; height: 32px; }
.re-road-filter-delete:hover,
.re-road-filter-tag button:hover { color: #b94b3e; }
.re-road-key-combobox { position: relative; min-width: 0; }
.re-road-key-combobox > input { width: 100%; padding-right: 28px; }
.re-road-key-toggle {
  width: 28px;
  height: 30px;
  position: absolute;
  top: 1px;
  right: 1px;
  border: 0;
  border-radius: 6px;
  color: var(--re-muted);
  background: transparent;
  cursor: pointer;
}
.re-road-key-toggle::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px, 1px);
}
.re-road-key-toggle:hover { color: var(--re-accent); background: var(--re-accent-soft); }
.re-road-key-menu {
  position: absolute;
  z-index: 4;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  max-height: 210px;
  overflow: auto;
  padding: 5px;
  border: 1px solid var(--re-line-strong);
  border-radius: 10px;
  background: var(--re-panel);
  box-shadow: 0 14px 34px rgba(31, 29, 25, .18);
}
.re-road-key-menu[hidden] { display: none; }
.re-road-key-option {
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  border: 0;
  border-radius: 7px;
  padding: 6px 9px;
  color: var(--re-muted);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 650;
  text-align: left;
}
.re-road-key-option:hover,
.re-road-key-option.is-active {
  color: var(--re-ink);
  background: var(--re-accent-soft);
}
.re-road-order-control { display: grid; gap: 9px; }
.re-road-order-select {
  width: 100%;
  height: 36px;
  border: 1px solid var(--re-line);
  border-radius: 8px;
  outline: 0;
  padding: 0 9px;
  color: var(--re-ink);
  background: var(--re-panel);
  font-size: 10px;
  font-weight: 650;
}
.re-road-order-preview {
  min-height: 58px;
  display: grid;
  grid-template-columns: 1fr 24px 1fr;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border: 1px dashed var(--re-line-strong);
  border-radius: 9px;
  color: var(--re-muted);
  background: color-mix(in srgb, var(--re-panel) 58%, transparent);
  font-size: 8px;
  text-align: center;
}
.re-road-order-preview strong { display: block; margin-top: 3px; color: var(--re-ink); font-size: 9px; }
.re-road-order-preview svg { width: 24px; fill: none; stroke: var(--re-accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.re-road-code-panel { height: 100%; min-height: 460px; display: grid; grid-template-rows: auto minmax(360px, 1fr) auto; gap: 8px; padding: 16px 22px 22px; }
.re-road-code-panel[hidden] { display: none; }
.re-road-code-panel > label { color: var(--re-muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.re-road-code-editor {
  min-height: 360px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--re-line);
  border-radius: 11px;
  background: var(--re-panel-2);
}
.re-road-code-editor pre,
.re-road-code-panel textarea {
  width: 100%;
  height: 100%;
  min-height: 360px;
  margin: 0;
  padding: 14px;
  font: 11px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace;
  tab-size: 2;
  white-space: pre;
  overflow: auto;
}
.re-road-code-editor pre {
  position: absolute;
  inset: 0;
  color: var(--re-ink);
  pointer-events: none;
  scrollbar-width: none;
}
.re-road-code-editor pre::-webkit-scrollbar { display: none; }
.re-road-code-panel textarea {
  position: relative;
  resize: none;
  border: 0;
  outline: 0;
  color: transparent;
  caret-color: var(--re-ink);
  background: transparent;
  -webkit-text-fill-color: transparent;
}
.re-road-code-panel textarea::selection {
  color: transparent;
  background: color-mix(in srgb, var(--re-accent) 28%, transparent);
}
.re-json-key { color: #8b5cf6; }
.re-json-string { color: #0f8a68; }
.re-json-number { color: #d05f18; }
.re-json-boolean { color: #2474c7; font-weight: 650; }
.re-json-null { color: #9b647c; font-style: italic; }
.re-json-punctuation { color: var(--re-faint); }
.re-road-code-status { display: flex; justify-content: space-between; gap: 14px; color: var(--re-faint); }
.re-road-code-status strong { color: #b94b3e; font-size: 9px; }
.re-road-code-status strong.is-valid { color: var(--re-mint); }
.re-road-modal-footer {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 22px;
  border-top: 1px solid var(--re-line);
  background: color-mix(in srgb, var(--re-panel) 94%, transparent);
}
.re-road-modal-footer > span { margin-right: auto; color: #b94b3e; font-size: 9px; }
.re-road-secondary,
.re-road-primary {
  min-height: 38px;
  border-radius: 9px;
  padding: 0 15px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}
.re-road-secondary { border: 1px solid var(--re-line); color: var(--re-muted); background: var(--re-panel-2); }
.re-road-primary { border: 1px solid var(--re-accent); color: #fff; background: var(--re-accent); box-shadow: 0 8px 20px rgba(232,109,59,.18); }
.re-road-primary:disabled { opacity: .45; cursor: default; box-shadow: none; }

html[data-app-theme="dark"] .re-create-road-trigger,
html[data-app-theme="dark"] .re-road-modal-card,
html[data-app-theme="dark"] .re-road-modal-close,
html[data-app-theme="dark"] .re-road-form-section,
html[data-app-theme="dark"] .re-road-field > input,
html[data-app-theme="dark"] .re-road-field > select,
html[data-app-theme="dark"] .re-road-unit-input,
html[data-app-theme="dark"] .re-road-color-input,
html[data-app-theme="dark"] .re-road-icon-options button,
html[data-app-theme="dark"] .re-road-auto-width,
html[data-app-theme="dark"] .re-road-add-key,
html[data-app-theme="dark"] .re-road-filter-add,
html[data-app-theme="dark"] .re-road-width-timeline,
html[data-app-theme="dark"] .re-road-width-key-editor input,
html[data-app-theme="dark"] .re-road-filter-head select,
html[data-app-theme="dark"] .re-road-filter-row input,
html[data-app-theme="dark"] .re-road-filter-row select,
html[data-app-theme="dark"] .re-road-filter-tags,
html[data-app-theme="dark"] .re-road-order-select,
html[data-app-theme="dark"] .re-road-code-editor {
  color: var(--re-ink);
  border-color: var(--re-line);
  background: var(--re-panel-2);
}
html[data-app-theme="dark"] .re-road-modal { background: rgba(5,7,11,.78); }
html[data-app-theme="dark"] .re-road-modal-card { background: var(--re-panel); box-shadow: 0 32px 90px rgba(0,0,0,.54); }
html[data-app-theme="dark"] .re-road-form-section { background: rgba(255,255,255,.025); }
html[data-app-theme="dark"] .re-road-icon-options button.is-active,
html[data-app-theme="dark"] .re-create-road-trigger:hover { background: rgba(232,109,59,.13); }
html[data-app-theme="dark"] .re-road-width-key { border-color: var(--re-panel); }
html[data-app-theme="dark"] .re-road-filter-row,
html[data-app-theme="dark"] .re-road-order-preview { background: rgba(255,255,255,.02); }
html[data-app-theme="dark"] .re-road-filter-tag { background: var(--re-panel); }
html[data-app-theme="dark"] .re-road-key-menu { box-shadow: 0 18px 42px rgba(0,0,0,.46); }
html[data-app-theme="dark"] .re-json-key { color: #c792ea; }
html[data-app-theme="dark"] .re-json-string { color: #addb67; }
html[data-app-theme="dark"] .re-json-number { color: #f78c6c; }
html[data-app-theme="dark"] .re-json-boolean { color: #82aaff; }
html[data-app-theme="dark"] .re-json-null { color: #f07178; }

.re-road-modal .msh-select { width: 100%; color: var(--re-ink); }
.re-road-modal .msh-select-button {
  min-height: 32px;
  border-color: var(--re-line);
  border-radius: 7px;
  color: var(--re-ink);
  background: var(--re-panel);
  font-size: 10px;
}
.re-road-modal .msh-select.is-open .msh-select-button {
  border-color: var(--re-accent);
  box-shadow: 0 0 0 3px rgba(232,109,59,.12);
}
.road-editor-page .msh-select-menu {
  border-color: var(--re-line-strong);
  border-radius: 10px;
  background: var(--re-panel);
  box-shadow: 0 16px 38px rgba(31,29,25,.2);
}
.road-editor-page .msh-select-option {
  min-height: 32px;
  border-radius: 7px;
  color: var(--re-muted);
  font-size: 10px;
}
.road-editor-page .msh-select-option:hover,
.road-editor-page .msh-select-option.is-active,
.road-editor-page .msh-select-option.is-selected {
  color: var(--re-ink);
  background: var(--re-accent-soft);
}
.road-editor-page .msh-select-option.is-selected { color: var(--re-accent); }
html[data-app-theme="dark"] .road-editor-page .msh-select-menu {
  box-shadow: 0 18px 46px rgba(0,0,0,.5);
}

/* Геометрия: общая прозрачность, палитра полотна и источник внешней тени */
.re-control-label-actions{display:inline-flex;align-items:center;gap:6px}
.re-opacity-details-toggle{
  width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;
  border:1px solid var(--re-line);border-radius:8px;background:var(--re-panel);
  color:var(--re-muted);cursor:pointer;transition:border-color .18s,color .18s,background .18s
}
.re-opacity-details-toggle:hover,.re-opacity-details-toggle[aria-expanded="true"]{
  border-color:var(--re-accent);color:var(--re-accent);background:var(--re-accent-soft)
}
.re-opacity-details-toggle svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.35;stroke-linecap:round}
.re-opacity-details-toggle svg circle{fill:var(--re-panel);stroke:currentColor}
.re-opacity-details{
  margin-top:12px;padding:12px;border:1px solid var(--re-line);border-radius:12px;
  background:var(--re-panel-2)
}
.re-opacity-details[hidden]{display:none}
.re-opacity-details-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.re-opacity-details-head strong{font-size:11px}
.re-opacity-details-head span{font-size:9px;color:var(--re-muted)}
.re-opacity-details label{
  display:grid;grid-template-columns:minmax(110px,1fr) minmax(110px,1.4fr) 42px;
  align-items:center;gap:10px;min-height:34px;font-size:10px;color:var(--re-muted)
}
.re-opacity-details input[type="range"]{width:100%;accent-color:var(--re-accent)}
.re-opacity-details output{
  font:700 10px/1.2 var(--re-mono);text-align:right;color:var(--re-ink);font-variant-numeric:tabular-nums
}
.re-road-color-control{border-top:1px solid var(--re-line);padding-top:14px}
.re-road-palette{display:flex;flex-wrap:wrap;gap:7px;margin:10px 0}
.re-road-palette[hidden]{display:none}
.re-road-palette button{
  width:28px;height:28px;border:2px solid var(--re-panel);border-radius:9px;background:var(--swatch);
  box-shadow:0 0 0 1px var(--re-line);cursor:pointer;transition:transform .16s,border-color .16s,box-shadow .16s
}
.re-road-palette button:hover{transform:translateY(-1px);box-shadow:0 0 0 2px rgba(232,109,59,.35)}
.re-road-palette button.is-active{border-color:var(--re-accent);box-shadow:0 0 0 1px var(--re-accent)}
.re-road-color-custom{display:flex;align-items:center;justify-content:space-between;gap:12px}
.re-road-color-custom>span:first-child{font-size:10px;color:var(--re-muted)}
.re-road-color-custom .re-color-input{width:min(190px,62%)}
.re-shadow-source{
  display:flex;flex-direction:column;gap:10px;margin:2px 0 14px;padding:12px;
  border:1px solid var(--re-line);border-radius:12px;background:var(--re-panel-2)
}
.re-shadow-source>div:first-child{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.re-shadow-source strong{font-size:11px}
.re-shadow-source small{font-size:9px;color:var(--re-muted);text-align:right}
.re-shadow-source-controls{display:grid;grid-template-columns:minmax(180px,1fr) minmax(130px,.8fr);gap:8px;align-items:center}
.re-shadow-source .re-segmented{margin:0;grid-template-columns:repeat(2,1fr)}
.re-shadow-source .re-segmented button:disabled{opacity:.38;cursor:not-allowed}
.re-shadow-source select{width:100%;height:38px}
.re-shadow-source .msh-select{min-width:0;width:100%}
.re-shadow-source .msh-select-button{height:38px}

.re-toast { position: fixed; z-index: 120; left: 50%; bottom: 20px; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; padding: 9px 13px; border-radius: 9px; color: #fff; background: #262724; box-shadow: 0 12px 30px rgba(0,0,0,.18); font-size: 10px; transition: .2s ease; }
.re-toast.is-showing { opacity: 1; transform: translate(-50%,0); }
body.timeline-open .re-toast { bottom: calc(var(--re-timeline-h) + 18px); }

@media (prefers-reduced-motion: reduce) {
  .re-road-card,
  .re-road-card::after,
  .re-road-color-preset {
    transition: none;
  }
}

@media (max-width: 1180px) {
  .re-workspace { grid-template-columns: minmax(0,1fr) 380px; }
  .road-editor-page .rm-dock { right: 400px !important; }
  .re-style-pill { display: none; }
  .re-filter-tabs button { padding: 0 6px; }
  .re-workspace-sync { min-width: 46px; width: 46px; justify-content: center; padding: 0; }
  .re-workspace-sync-copy { display: none; }
}
@media (max-width: 1100px) {
  .re-opacity-details label{grid-template-columns:1fr 1.2fr 40px}
  .re-shadow-source-controls{grid-template-columns:1fr}
}
@media (max-width: 900px) {
  .re-product-nav a:first-child, .re-canvas-meta, .re-theme-switch { display: none; }
  .re-topbar { gap: 8px; padding: 0 10px; }
  .re-workspace { grid-template-columns: minmax(0,1fr) 300px; }
  .road-editor-page .rm-dock { right: 320px !important; }
  .re-search { width: 220px; }
  .re-download { padding: 0 9px; font-size: 0; }
  .re-download span { font-size: 14px; }
  .re-create-road-trigger { width: 32px; justify-content: center; padding: 0; font-size: 0; }
  .re-road-form-grid { grid-template-columns: 1fr 1fr; }
  .re-road-field-wide { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .re-onboarding-actions { grid-template-columns: 1fr; }
  .re-onboarding-actions small { white-space: normal; }
  .re-road-modal { padding: 8px; }
  .re-road-modal-card { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .re-road-modal-head,
  .re-road-modal-footer { padding-left: 14px; padding-right: 14px; }
  .re-road-modal-tabs,
  .re-road-visual-panel,
  .re-road-code-panel { padding-left: 14px; padding-right: 14px; }
  .re-road-form-grid,
  .re-road-geometry-grid,
  .re-road-color-order { grid-template-columns: 1fr; }
  .re-road-width-head { grid-template-columns: 1fr 1fr; }
  .re-road-width-head .re-road-add-key { grid-column: 1 / -1; }
  .re-road-filter-row,
  .re-road-filter-row.is-tags { grid-template-columns: 1fr 1fr 32px; }
  .re-road-filter-row > :nth-child(3) { grid-column: 1 / 3; }
  .re-road-filter-row > :last-child { grid-column: 3; grid-row: 1; }
}
