:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --panel: rgba(255, 255, 255, 0.86);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.11);
  --accent: #0a84ff;
  --accent-dark: #0068d9;
  --field: #fff3e3;
  --field-line: rgba(216, 132, 38, 0.36);
  --disabled: #ececef;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(245, 245, 247, 0.92)),
    radial-gradient(circle at 20% 0%, rgba(10, 132, 255, 0.12), transparent 34%),
    var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(1540px, calc(100% - 28px));
  margin: 0 auto;
  padding: 36px 0;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

.info-button,
.close-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(360px, 1.18fr) minmax(280px, 0.72fr) minmax(280px, 0.74fr);
  gap: 18px;
  align-items: stretch;
}

.tool-panel,
.result-card,
.graphic-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.tool-panel {
  padding: 18px;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.06);
}

.segmented.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.segmented.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.segment {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 650;
}

.segment.active {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}

.form {
  display: none;
  gap: 14px;
}

.form.active {
  display: grid;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

select,
input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
  background: var(--field);
  color: var(--text);
  padding: 0 13px;
  outline: none;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--accent);
  background: #ffffff;
  border-color: var(--line);
}

select:disabled,
input:disabled {
  border-color: var(--line);
  background: var(--disabled);
  color: var(--muted);
  cursor: not-allowed;
}

select:focus,
input:focus {
  border-color: rgba(10, 132, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.14);
}

.input-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid var(--field-line);
  border-radius: var(--radius);
  background: var(--field);
  overflow: hidden;
}

.input-unit:has(input:disabled) {
  border-color: var(--line);
  background: var(--disabled);
}

.input-unit:focus-within {
  border-color: rgba(10, 132, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.14);
}

.input-unit input {
  border: 0;
  box-shadow: none;
  background: transparent;
}

.input-unit span {
  padding: 0 13px;
  color: var(--muted);
}

.input-unit:has(input:disabled) span {
  color: #8f8f95;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 2px;
  color: var(--text);
}

.check-row span {
  color: var(--text);
}

.add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  margin-top: 4px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font-weight: 750;
}

.add-button span,
.icon-action {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
}

.add-button span {
  background: rgba(255, 255, 255, 0.2);
}

.edit-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.result-card,
.graphic-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
}

.result-topline {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-weight: 650;
  font-size: 14px;
}

.result-value {
  margin: 28px 0 24px;
  font-size: clamp(44px, 7vw, 74px);
  line-height: 0.95;
  font-weight: 760;
  letter-spacing: 0;
}

.result-value small {
  display: block;
  margin-top: 8px;
  font-size: 17px;
  color: var(--muted);
  font-weight: 700;
}

.breakdown {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.breakdown div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.breakdown div[hidden] {
  display: none;
}

.breakdown span,
.mini-note {
  color: var(--muted);
}

.mini-note {
  margin-top: 16px;
  line-height: 1.45;
  font-size: 13px;
}

.graphic-window {
  display: grid;
  place-items: center;
  min-height: 300px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 0, 0, 0.035) 1px, transparent 1px),
    #ffffff;
  background-size: 24px 24px;
  overflow: hidden;
}

.graphic-window svg {
  width: 100%;
  max-width: 380px;
  height: auto;
}

.graphic-window text {
  fill: var(--text);
  font-size: 20px;
  font-weight: 650;
}


.color-input {
  width: 100%;
  min-height: 42px;
  padding: 4px 8px;
  border-color: #f0b879;
  background: #fff3e2;
  cursor: pointer;
}

.route-color-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--dot-color);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95), 0 0 0 3px rgba(0, 0, 0, 0.12);
  vertical-align: -1px;
}
.route-card {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.route-header {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.route-header-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.route-header h2 {
  margin: 0;
  font-size: 28px;
}

.route-toolbar {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.route-action-group {
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: stretch;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
}

.route-action-group-label {
  color: #42464d;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

.route-actions {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}

.route-config-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.route-add-button {
  min-height: 40px;
  margin-top: 0;
  padding: 0 14px 0 10px;
  white-space: nowrap;
}

.route-add-button span {
  width: 24px;
  height: 24px;
  font-size: 21px;
}

.route-edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 0;
  flex-wrap: wrap;
}

.route-edit-actions .text-action {
  min-height: 40px;
}

.icon-action {
  position: relative;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.icon-action.danger {
  border-color: #ff453a;
  background: #ff453a;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(255, 69, 58, 0.22);
}

.icon-action.danger::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 50%;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  transform: translateY(-50%);
}

.text-action {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font-weight: 750;
}

.text-action.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.text-action.danger-soft {
  border-color: rgba(255, 69, 58, 0.34);
  color: #b42318;
}

.text-action.toggle {
  min-width: 118px;
}

.text-action.toggle.active {
  border-color: rgba(10, 132, 255, 0.7);
  background: rgba(10, 132, 255, 0.12);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(10, 132, 255, 0.18);
}

.text-action.connector-action.active {
  border-color: #f4762d;
  background: rgba(244, 118, 45, 0.14);
  color: #b84712;
}

.text-action.anchor-action.active {
  border-color: #55b7e6;
  background: rgba(85, 183, 230, 0.16);
  color: #116d91;
}

.icon-action:disabled,
.text-action:disabled {
  background: var(--disabled);
  color: var(--muted);
  cursor: not-allowed;
  border-color: var(--line);
  box-shadow: none;
}

.route-total {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 168px;
  min-height: 76px;
  padding: 10px 14px;
  border: 1px solid rgba(52, 199, 89, 0.46);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(52, 199, 89, 0.18), rgba(52, 199, 89, 0.08));
  box-shadow: inset 0 0 0 1px rgba(52, 199, 89, 0.12);
}

.route-total span {
  color: #247a39;
  font-size: 14px;
  font-weight: 800;
}

.route-total strong {
  color: #0b3518;
  font-size: 24px;
  line-height: 1.05;
}

.route-grid-control {
  display: grid;
  gap: 3px;
  min-width: 110px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.route-grid-control select {
  min-height: 40px;
  padding: 0 10px;
}

.support-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(10, 132, 255, 0.28);
  border-radius: var(--radius);
  background: rgba(10, 132, 255, 0.07);
}

.support-panel[hidden] {
  display: none;
}

.support-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.support-panel-head div:first-child {
  display: grid;
  gap: 4px;
}

.support-panel-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.support-actions,
.support-controls {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.support-controls label {
  min-width: 190px;
}

.support-controls select {
  min-height: 40px;
}

.route-planning-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  align-items: stretch;
}

.route-window {
  position: relative;
  min-height: 720px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #d9dee7;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.route-window svg {
  width: 100%;
  height: 720px;
  display: block;
  user-select: none;
  touch-action: none;
  cursor: grab;
}

.architecture-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 720px;
  padding: 16px;
  border: 4px solid var(--accent);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.78);
}

.architecture-panel[hidden] {
  display: none;
}

.route-planning-area:has(.architecture-panel[hidden]) {
  grid-template-columns: minmax(0, 1fr);
}

.architecture-panel-head,
.architecture-group {
  display: grid;
  gap: 10px;
}

.architecture-panel-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.architecture-group {
  padding-top: 12px;
  border-top: 1px solid rgba(10, 132, 255, 0.22);
}

.architecture-group label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.architecture-group select {
  min-height: 40px;
  width: 100%;
}

.route-tools[hidden] {
  display: none;
}

.route-window svg:active {
  cursor: grabbing;
}


.route-sheet-hint {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 2;
  max-width: min(520px, calc(100% - 32px));
  padding: 7px 10px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  color: rgba(29, 29, 31, 0.62);
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.route-zoom-controls {
  position: absolute;
  right: 14px;
  top: 50%;
  display: grid;
  gap: 8px;
  width: 58px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
  z-index: 2;
}

.zoom-button,
.zoom-reset {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font-weight: 850;
}

.zoom-button {
  font-size: 22px;
  line-height: 1;
}

.zoom-reset {
  min-height: 30px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.zoom-button:disabled,
.zoom-reset:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.zoom-scale {
  display: grid;
  place-items: center;
  min-height: 30px;
  border-radius: 6px;
  background: rgba(10, 132, 255, 0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
}

.route-empty {
  fill: var(--muted);
  font-size: 18px;
  font-weight: 700;
}

.route-page {
  fill: #ffffff;
  stroke: #0f172a;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 12px 22px rgba(15, 23, 42, 0.18));
}

.architecture-item {
  cursor: grab;
}

.architecture-item:active {
  cursor: grabbing;
}

.architecture-wall rect,
.architecture-steel rect,
.architecture-steel path {
  vector-effect: non-scaling-stroke;
}

.architecture-label {
  fill: #1d1d1f;
  font-size: 10px;
  font-weight: 800;
  paint-order: stroke;
  stroke: #ffffff;
  stroke-width: 3px;
  pointer-events: none;
}

.route-grid {
  stroke: rgba(15, 23, 42, 0.1);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.route-sheet-margin {
  fill: none;
  stroke: #6b7280;
  stroke-width: 1;
  stroke-dasharray: 10 8;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.route-item {
  cursor: grab;
}

.route-item:active,
.support-item:active {
  cursor: grabbing;
}

.support-item {
  cursor: grab;
}


.route-centerline,
.graphic-window .centerline {
  stroke: #111827;
  stroke-width: 1;
  stroke-dasharray: 8 4 2 4;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.graphic-window .centerline {
  stroke-width: 1.25;
}

.route-selected-ring,
.support-selected-ring {
  stroke: var(--accent);
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 8px rgba(10, 132, 255, 0.55));
  pointer-events: none;
}

.support-point {
  cursor: grab;
}

.route-label-layer text,
.route-measure-layer text {
  fill: var(--text);
  font-weight: 750;
  pointer-events: none;
}

.route-label-layer,
.route-measure-layer {
  pointer-events: none;
}

.route-label,
.support-label,
.architecture-label {
  paint-order: stroke;
  stroke: #ffffff;
  stroke-width: 3px;
  stroke-linejoin: round;
}

.route-label-bg,
.route-measure-text-bg {
  fill: rgba(255, 255, 255, 0.88);
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 1;
  pointer-events: none;
}

.route-label-entry.compact .route-label-bg {
  fill: rgba(255, 255, 255, 0.94);
}

.route-measure line {
  stroke: #1d1d1f;
  stroke-width: 1;
}

.route-measure text {
  fill: #1d1d1f;
  font-size: 13px;
  font-weight: 800;
}

.route-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  overflow-x: auto;
}

.route-list-header,
.route-list-item {
  display: grid;
  grid-template-columns: minmax(90px, 0.7fr) minmax(240px, 1.8fr) minmax(130px, 0.9fr) minmax(160px, 1.1fr) minmax(110px, 0.8fr) minmax(120px, 0.9fr);
  gap: 12px;
  align-items: center;
  min-width: 900px;
}

.support-list-title {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 6px;
  padding: 12px 12px 2px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-weight: 800;
}

.support-list-title strong {
  white-space: nowrap;
}

.support-list-header,
.support-list-item {
  display: grid;
  grid-template-columns: minmax(200px, 1.4fr) minmax(100px, 0.7fr) minmax(110px, 0.7fr) minmax(120px, 0.8fr) minmax(110px, 0.7fr);
  gap: 12px;
  align-items: center;
  min-width: 760px;
}

.support-list-header {
  padding: 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.route-list-header {
  padding: 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.route-storage {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 2fr);
  gap: 12px;
  align-items: start;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.route-name-control {
  grid-row: 1 / span 2;
  min-width: 0;
}

.storage-group {
  display: grid;
  grid-template-columns: minmax(110px, auto) minmax(180px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.storage-group select,
.route-name-control input {
  min-height: 40px;
  padding: 0 10px;
}

.storage-status {
  grid-column: 1 / -1;
  min-height: 18px;
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.backup-group {
  grid-column: 2;
  grid-template-columns: auto auto minmax(0, 1fr);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.file-input {
  display: none;
}

@media print {
  @page {
    size: A4 landscape;
    margin: 12mm;
  }

  body.print-route {
    background: #ffffff;
  }

  body.print-route .hero,
  body.print-route .workspace,
  body.print-route .source-panel,
  body.print-route .support-panel,
  body.print-route .route-storage,
  body.print-route .route-zoom-controls,
  body.print-route .route-toolbar,
  body.print-route .route-actions .icon-action,
  body.print-route .route-actions .text-action {
    display: none !important;
  }

  body.print-route .shell {
    width: 100%;
    padding: 0;
  }

  body.print-route .route-card {
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: #ffffff;
  }

  body.print-route .route-header {
    margin-bottom: 6mm;
    border-bottom: 1px solid #d2d2d7;
    padding-bottom: 4mm;
  }

  body.print-route .route-header h2 {
    margin: 0 0 2mm;
    font-size: 18pt;
  }

  body.print-route .route-header p {
    margin: 0;
    font-size: 9pt;
  }

  body.print-route .route-total {
    border: 1px solid #d2d2d7;
  }

  body.print-route .route-window {
    min-height: auto;
    border: 1px solid #d2d2d7;
    border-radius: 5px;
    box-shadow: none;
    break-inside: avoid;
  }

  body.print-route .route-window svg {
    height: 125mm;
  }

  body.print-route .route-list {
    display: grid !important;
    gap: 2.5mm;
    margin-top: 5mm;
    overflow: visible;
  }

  body.print-route .route-list-header,
  body.print-route .route-list-item {
    grid-template-columns: 22mm 54mm 28mm 36mm 24mm 26mm;
    gap: 3mm;
    min-width: 0;
  }

  body.print-route .support-list-header,
  body.print-route .support-list-item {
    grid-template-columns: 52mm 27mm 30mm 32mm 24mm;
    gap: 3mm;
    min-width: 0;
  }

  body.print-route .route-list-header,
  body.print-route .support-list-header {
    padding: 0 2mm;
    font-size: 7.5pt;
  }

  body.print-route .route-list-item,
  body.print-route .support-list-item {
    padding: 2.5mm;
    border: 1px solid #d2d2d7;
    border-radius: 4px;
    background: #ffffff;
    box-shadow: none;
    break-inside: avoid;
    color: #1d1d1f;
    cursor: default;
    font-size: 8pt;
  }

  body.print-route .support-list-title {
    margin-top: 3mm;
    padding: 3mm 2mm 1mm;
    font-size: 9pt;
    break-after: avoid;
  }
}

.route-list-item {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.support-list-item {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f9fbff;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.route-list-item.selected,
.support-list-item.selected {
  border-color: var(--accent);
  border-width: 2px;
  background: rgba(10, 132, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.16);
}

.route-list-item span,
.support-list-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-list-item strong,
.support-list-item strong {
  white-space: nowrap;
}

.source-panel {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: flex-end;
  background: rgba(0, 0, 0, 0.24);
  padding: 18px;
  z-index: 10;
}

.source-panel.open {
  display: flex;
}

.source-card {
  width: min(520px, 100%);
  height: 100%;
  overflow: auto;
  padding: 22px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.source-card h2 {
  margin: 0 52px 20px 0;
  font-size: 28px;
}

.source-card h3 {
  margin: 22px 0 8px;
  font-size: 16px;
}

.source-card p,
.source-card li {
  color: var(--muted);
  line-height: 1.5;
}

.source-card ul {
  padding-left: 18px;
}

.close-button {
  position: sticky;
  top: 0;
  float: right;
}


.source-groups {
  display: grid;
  gap: 12px;
}

.source-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
  overflow: hidden;
}

.source-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  list-style: none;
}

.source-group summary::-webkit-details-marker {
  display: none;
}

.source-group summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(10, 132, 255, 0.12);
  color: var(--accent);
  font-weight: 900;
}

.source-group[open] summary::before {
  content: "-";
}

.source-group summary span {
  flex: 1;
}

.source-group summary strong {
  min-width: 28px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.source-group .source-list {
  padding: 0 12px 12px;
}
.source-list {
  display: grid;
  gap: 10px;
}

.source-list a {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  background: #ffffff;
}

.source-list span {
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 820px) {
  .shell {
    width: min(100% - 24px, 1120px);
    padding: 24px 0;
  }

  .workspace,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .result-card {
    min-height: 330px;
  }

  .source-panel {
    padding: 10px;
  }

  .edit-actions,
  .route-storage,
  .storage-group,
  .route-planning-area,
  .route-header-main,
  .route-toolbar,
  .route-action-group,
  .route-actions,
  .support-panel-head,
  .support-actions,
  .support-controls {
    grid-template-columns: 1fr;
    display: grid;
  }

  .route-window,
  .route-window svg,
  .architecture-panel {
    min-height: 520px;
    height: 520px;
  }

  .support-controls label {
    min-width: 0;
  }
}

.busbar-manual-fields[hidden] {
  display: none;
}
