:root {
  --bg: #eef6ff;
  --panel: #ffffff;
  --panel-2: #f7fbff;
  --line: #c9dcf2;
  --line-soft: #e2edf9;
  --text: #17324d;
  --muted: #68839f;
  --accent: #1677ff;
  --accent-2: #58a6ff;
  --cyan: #22a7d6;
  --green: #75d48b;
  --danger: #f36b56;
  font-family: Consolas, "Microsoft YaHei", "SimHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background:
    radial-gradient(circle at 20% -10%, rgba(22, 119, 255, 0.16), transparent 32%),
    linear-gradient(135deg, #f8fbff, #eaf4ff 68%);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

#app {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 76px;
  flex: 0 0 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 18px rgba(31, 100, 170, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  width: 35px;
  height: 35px;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid #8eb8e8;
  transform: rotate(45deg);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  background: var(--accent);
}

.brand-mark::before {
  width: 23px;
  height: 1px;
}

.brand-mark::after {
  width: 1px;
  height: 23px;
}

.brand-mark span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-2);
}

.brand-mark span:nth-child(1) { left: 4px; top: 4px; }
.brand-mark span:nth-child(2) { right: 4px; bottom: 4px; }
.brand-mark span:nth-child(3) { left: 4px; bottom: 4px; }

.brand h1,
.brand p,
.card-head h2,
.section-title h3,
.control-group h4 {
  margin: 0;
}

.brand h1 {
  font-size: 16px;
  letter-spacing: 0.16em;
  font-weight: 800;
}

.brand p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.status-strip {
  display: flex;
  align-items: stretch;
  height: 38px;
  border: 1px solid var(--line);
}

.status-strip > div {
  min-width: 108px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 15px;
  border-left: 1px solid var(--line);
}

.status-strip > div:first-child {
  min-width: 154px;
  border-left: 0;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.status-strip span {
  color: #657379;
  font-size: 8px;
  letter-spacing: 0.15em;
}

.status-strip b {
  margin-top: 2px;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 10px;
  font-weight: 600;
}

.status-strip > div:first-child b {
  margin: 0;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 12px var(--accent-2);
}

.status-dot.ready {
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}

.status-dot.error {
  background: var(--danger);
  box-shadow: 0 0 12px var(--danger);
}

.workspace {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 374px;
}

.visual-area {
  min-width: 0;
  min-height: 0;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1.54fr) minmax(300px, 0.86fr);
  gap: 14px;
}

.viewport-card {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 12px 36px rgba(34, 91, 148, 0.10);
}

.card-head {
  height: 58px;
  flex: 0 0 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid var(--line-soft);
}

.eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.card-head h2 {
  font-size: 13px;
  letter-spacing: 0.04em;
}

.projection-stage,
.scene-stage {
  position: relative;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    #06090a;
  background-size: 30px 30px;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.projection-image,
.projection-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.projection-image {
  z-index: 0;
  inset: auto;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

.projection-stage canvas {
  z-index: 1;
}

.canvas-note {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  color: rgba(232, 238, 238, 0.63);
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 9px;
  letter-spacing: 0.04em;
}

.top-left { top: 12px; left: 12px; }
.bottom-left { bottom: 12px; left: 12px; }

.canvas-note span {
  margin-right: 8px;
}

.axis-x { color: #ff6a54; }
.axis-y { color: #72d48a; }
.axis-z { color: #5aa9ff; }

.reticle {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 2;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0.45;
}

.reticle i {
  position: absolute;
  background: white;
}

.reticle i:first-child { width: 24px; height: 1px; top: 12px; }
.reticle i:last-child { height: 24px; width: 1px; left: 12px; }

.depth-legend {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(232, 238, 238, 0.55);
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 7px;
  letter-spacing: 0.1em;
}

.depth-legend i {
  width: 76px;
  height: 4px;
  background: linear-gradient(90deg, #ff3f36, #ffc83d, #32c7d7, #5257ff);
}

.scene-key {
  position: absolute;
  z-index: 3;
  left: 12px;
  bottom: 12px;
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 9px;
}

.scene-key span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.scene-key i {
  width: 8px;
  height: 2px;
}

.key-lidar { background: var(--accent); }
.key-camera { background: var(--cyan); }

.view-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
}

.toggle input {
  position: absolute;
  opacity: 0;
}

.toggle span {
  width: 25px;
  height: 14px;
  position: relative;
  border: 1px solid #3c494e;
  border-radius: 20px;
  background: #171d20;
}

.toggle span::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: #69767b;
  transition: 0.16s ease;
}

.toggle input:checked + span {
  border-color: var(--accent);
  background: rgba(22, 119, 255, 0.16);
}

.toggle input:checked + span::after {
  left: 13px;
  background: var(--accent);
}

.icon-button,
.text-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.icon-button {
  width: 27px;
  height: 27px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.text-button {
  padding: 4px 0;
  color: #a3afb3;
  font-size: 9px;
}

.text-button:hover,
.icon-button:hover {
  color: white;
  border-color: #546168;
}

.text-button.warning { color: var(--accent); }

.control-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: var(--panel);
}

.panel-scroll {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #394449 transparent;
}

.control-section {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-title h3 {
  font-size: 13px;
}

.convention {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding: 8px 10px;
  border-left: 2px solid var(--accent);
  background: rgba(22, 119, 255, 0.07);
  color: #b5c0c3;
  font-size: 9px;
}

.convention code {
  color: var(--accent-2);
  font-size: 9px;
}

.control-group + .control-group {
  margin-top: 18px;
}

.group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.control-group h4 {
  color: #b9c3c6;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.segmented {
  display: flex;
  border: 1px solid var(--line);
}

.segmented button {
  height: 22px;
  padding: 0 7px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: #6f7c81;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 8px;
  cursor: pointer;
}

.segmented button:first-child { border-left: 0; }
.segmented button.active {
  color: white;
  background: var(--accent);
}

.parameter-row {
  display: grid;
  grid-template-columns: 28px 1fr 91px;
  align-items: center;
  gap: 8px;
  min-height: 34px;
}

.parameter-row + .parameter-row {
  margin-top: 5px;
}

.parameter-name {
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 10px;
  font-weight: 700;
}

.parameter-name.x { color: #ff6a54; }
.parameter-name.y { color: #72d48a; }
.parameter-name.z { color: #5aa9ff; }

input[type="range"] {
  width: 100%;
  height: 15px;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  background: #344047;
}

input[type="range"]::-webkit-slider-thumb {
  width: 10px;
  height: 10px;
  margin-top: -4px;
  appearance: none;
  border: 2px solid #0e1315;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.number-stepper {
  height: 29px;
  display: grid;
  grid-template-columns: 22px 1fr 22px;
  border: 1px solid #303b40;
  background: #090d0f;
}

.number-stepper button {
  padding: 0;
  border: 0;
  background: #12181b;
  color: #859297;
  cursor: pointer;
}

.number-stepper button:hover { color: white; background: #20282c; }

.number-stepper input,
.intrinsic-field input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #e8eeee;
  text-align: center;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
}

.intrinsic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.intrinsic-field,
.display-field {
  border: 1px solid #2e383d;
  background: #090d0f;
}

.intrinsic-field label,
.display-label {
  display: flex;
  justify-content: space-between;
  padding: 6px 8px 0;
  color: #718086;
  font-size: 8px;
}

.intrinsic-field input {
  height: 29px;
  padding: 0 8px;
  text-align: left;
  font-size: 10px;
}

.hint {
  margin: 10px 0 0;
  padding-left: 9px;
  border-left: 1px solid var(--accent-2);
  color: #78868b;
  font-size: 9px;
  line-height: 1.55;
}

.display-field {
  margin-top: 8px;
  padding-bottom: 8px;
}

.display-field:first-child { margin-top: 0; }
.display-field input { display: block; width: calc(100% - 16px); margin: 5px 8px 0; }
.display-label output { color: #c8d0d2; font-family: monospace; }

.matrix-label {
  margin-bottom: 8px;
  color: #748187;
  font-size: 8px;
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.matrix-grid span {
  min-width: 0;
  padding: 7px 3px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #c6d0d2;
  text-align: center;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
}

.matrix-grid span:nth-child(4n) { color: var(--accent-2); }
.matrix-grid span:nth-last-child(-n + 4) { color: #647278; }

.result-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 10px;
}

.result-summary div {
  padding: 8px;
  background: #090d0f;
  color: #78868b;
  font-size: 8px;
  line-height: 1.55;
}

.result-summary code {
  display: block;
  color: #d2d9da;
  font-size: 8px;
}

.panel-footer {
  flex: 0 0 62px;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 8px;
  align-items: center;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  background: #f8fbff;
}

.primary-button,
.secondary-button {
  height: 38px;
  border: 1px solid var(--accent);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.primary-button {
  background: var(--accent);
  color: #ffffff;
}

.primary-button:hover { background: #0f66da; }
.secondary-button { background: transparent; color: var(--accent); }
.secondary-button:hover { background: rgba(22, 119, 255, 0.08); }

.primary-button:disabled,
.secondary-button:disabled {
  border-color: #c7d8e8;
  background: #dfeaf4;
  color: #8aa0b4;
  box-shadow: none;
  cursor: not-allowed;
}

.empty-state {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 30px;
  background: rgba(6, 9, 10, 0.93);
  color: var(--danger);
  text-align: center;
  font-size: 12px;
  line-height: 1.7;
}

.empty-state[hidden] {
  display: none;
}

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 18px;
  padding: 9px 14px;
  border: 1px solid #405057;
  background: #151c1f;
  color: white;
  font-size: 10px;
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  transition: 0.2s ease;
}

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

.zoom-readout {
  min-width: 44px;
  color: var(--accent);
  text-align: right;
  font-family: Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
}

#projectionCanvas { cursor: grab; }
#projectionCanvas.is-panning { cursor: grabbing; }

/* Blue-and-white visual theme and a consistent +3px type scale. */
.brand h1 { font-size: 19px; }
.brand p { font-size: 14px; }
.status-strip span,
.eyebrow,
.segmented button,
.intrinsic-field label,
.display-label,
.matrix-label,
.matrix-grid span,
.result-summary div,
.result-summary code { font-size: 11px; }
.status-strip b,
.toggle,
.control-group h4,
.parameter-name,
.intrinsic-field input,
.primary-button,
.secondary-button,
.toast { font-size: 13px; }
.card-head h2,
.section-title h3 { font-size: 16px; }
.canvas-note,
.scene-key,
.text-button,
.convention,
.convention code,
.number-stepper input,
.intrinsic-field input,
.hint { font-size: 12px; }
.depth-legend { font-size: 10px; }
.empty-state { font-size: 15px; }

.status-strip span,
.intrinsic-field label,
.display-label,
.matrix-label { color: #68839f; }
.projection-stage,
.scene-stage { background-color: #071321; }
.toggle span { border-color: #9bb8d5; background: #e5effa; }
.toggle span::after { background: #8ba6c1; }
.text-button { color: #58738e; }
.text-button:hover,
.icon-button:hover { color: var(--accent); border-color: #79a9dd; }
.convention { color: #58738e; }
.control-group h4 { color: #4f6c88; }
.number-stepper,
.intrinsic-field,
.display-field { border-color: #c4d7ea; background: #f8fbff; }
.number-stepper button { background: #edf5fd; color: #6685a3; }
.number-stepper button:hover { color: #fff; background: var(--accent); }
.number-stepper input,
.intrinsic-field input { color: var(--text); }
.result-summary div { background: #f4f9ff; }
.toast { border-color: #9cbce0; background: #fff; color: var(--text); }

/* Luckin-inspired brand direction: crisp white, saturated blue, bold typography. */
:root {
  --bg: #edf4fb;
  --panel: #ffffff;
  --panel-2: #f5f9fd;
  --line: #d8e4f0;
  --line-soft: #e9f0f7;
  --text: #002b5c;
  --muted: #657b91;
  --accent: #0056b8;
  --accent-2: #2388e8;
  --cyan: #66c8ef;
  --green: #42bda3;
  font-family: Consolas, "Microsoft YaHei", "SimHei", sans-serif;
}

body,
button,
input,
code,
output {
  font-family: Consolas, "Microsoft YaHei", "SimHei", sans-serif;
}

body {
  background:
    radial-gradient(circle at 12% 0%, rgba(65, 154, 232, 0.18), transparent 28%),
    linear-gradient(145deg, #f8fbfe 0%, #eaf2fa 100%);
}

.topbar {
  height: 84px;
  flex-basis: 84px;
  padding: 0 28px;
  border-bottom: 3px solid var(--accent);
  box-shadow: 0 6px 24px rgba(0, 61, 128, 0.08);
}

.brand { gap: 16px; }
.brand-mark {
  width: 39px;
  height: 39px;
  border: 2px solid var(--accent);
  border-radius: 4px;
  background: var(--accent);
  box-shadow: 6px 6px 0 #d8ebff;
}
.brand-mark::before,
.brand-mark::after { background: #fff; }
.brand-mark span { background: #8ed8ff; }
.brand h1 {
  color: var(--accent);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.12em;
}
.brand p { color: #3f5e7b; font-weight: 600; letter-spacing: 0.04em; }

.status-strip {
  height: 44px;
  border-color: #c9daeb;
  border-radius: 2px;
  background: #f8fbff;
}
.status-strip > div { border-color: #dce7f2; }
.status-strip span { color: #7690a8; font-weight: 700; }
.status-strip b { color: #123f70; }
.status-dot { background: #4eaaf1; box-shadow: 0 0 0 4px rgba(78, 170, 241, 0.14); }

.visual-area { padding: 18px; gap: 18px; }
.viewport-card {
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 14px 38px rgba(10, 67, 124, 0.13);
}
.card-head {
  height: 66px;
  flex-basis: 66px;
  padding: 0 20px;
  border-bottom-color: var(--line-soft);
}
.card-head h2,
.section-title h3 { color: #002f67; font-weight: 800; letter-spacing: 0.02em; }
.eyebrow { color: var(--accent-2); letter-spacing: 0.12em; }

.projection-stage,
.scene-stage {
  background:
    linear-gradient(rgba(92, 164, 224, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 164, 224, 0.07) 1px, transparent 1px),
    #03152c;
  background-size: 32px 32px;
}
.projection-image { filter: saturate(0.78) contrast(1.08) brightness(0.98) hue-rotate(2deg); }
.canvas-note { color: rgba(224, 241, 255, 0.78); font-weight: 600; }
.depth-legend { color: rgba(224, 241, 255, 0.78); font-weight: 700; }
.depth-legend i {
  height: 6px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 6px;
  background: linear-gradient(90deg, #ff3f36, #ffc83d, #32c7d7, #5257ff);
}
.reticle { opacity: 0.68; }
.reticle i { background: #a9dcff; }
.scene-key { color: #d5eaff; font-weight: 700; }
.key-lidar { background: #55bff1; }
.key-camera { background: #3b82f6; }

.control-panel { border-left: 0; box-shadow: -10px 0 30px rgba(13, 64, 112, 0.08); }
.control-section { padding: 21px 22px; border-bottom-color: var(--line); }
.section-title { margin-bottom: 17px; }
.convention {
  border-left: 4px solid var(--accent);
  border-radius: 0 6px 6px 0;
  background: #eef6ff;
  color: #476985;
}
.segmented { overflow: hidden; border-color: #c5d8eb; border-radius: 4px; }
.segmented button { height: 27px; color: #65819b; border-color: #d4e2ef; }
.segmented button.active { background: var(--accent); color: #fff; }
.number-stepper,
.intrinsic-field,
.display-field { border-color: #d2e0ed; border-radius: 5px; background: #f8fbfe; }
.number-stepper button { background: #edf5fc; color: var(--accent); font-weight: 800; }
input[type="range"]::-webkit-slider-runnable-track { height: 3px; background: #b9d2e9; }
input[type="range"]::-webkit-slider-thumb { width: 12px; height: 12px; margin-top: -4.5px; border-color: #fff; background: var(--accent); }
.matrix-grid { overflow: hidden; border-radius: 5px; }
.matrix-grid span:nth-child(4n) { color: var(--accent); font-weight: 700; }
.result-summary div { border-radius: 5px; color: #607c96; }
.result-summary code { color: #153f68; font-weight: 600; }
.panel-footer { height: 70px; flex-basis: 70px; background: #fff; }
.primary-button,
.secondary-button { height: 42px; border-radius: 5px; letter-spacing: 0.03em; }
.primary-button { box-shadow: 0 7px 16px rgba(0, 86, 184, 0.22); }
.empty-state { background: rgba(3, 21, 44, 0.95); }

.model-note {
  top: 12px;
  right: 12px;
  left: auto;
  padding: 4px 7px;
  border: 1px solid rgba(126, 190, 244, 0.28);
  border-radius: 3px;
  background: rgba(3, 21, 44, 0.64);
  color: #b9e5ff;
}

.scene-key {
  flex-wrap: wrap;
  row-gap: 5px;
}

#frustumModelLabel {
  color: #9dccf4;
}

.camera-model-selector {
  display: grid;
  grid-template-columns: 78px 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: #607c96;
  font-size: 12px;
}

.camera-model-selector select {
  min-width: 0;
  width: 100%;
  height: 34px;
  padding: 0 30px 0 10px;
  border: 1px solid #c4d7ea;
  border-radius: 5px;
  outline: 0;
  background: #f8fbff;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.camera-model-selector select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 86, 184, 0.10);
}

.distortion-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.distortion-field {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  min-height: 34px;
  padding-left: 8px;
  border: 1px solid #c4d7ea;
  border-radius: 5px;
  background: #f8fbff;
  color: #51718f;
  font-size: 12px;
}

.distortion-field input {
  min-width: 0;
  width: 100%;
  height: 32px;
  padding: 0 7px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: right;
}

.distortion-empty {
  grid-column: 1 / -1;
  padding: 9px 10px;
  border: 1px dashed #c4d7ea;
  border-radius: 5px;
  color: #7890a7;
  text-align: center;
  font-size: 11px;
}

.camera-view-note {
  margin: 9px 0 0;
  color: #718aa2;
  font-size: 11px;
  line-height: 1.5;
}

.data-source-section {
  background: linear-gradient(135deg, #f7fbff, #eef6ff);
}

.file-field {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: #567490;
  font-size: 12px;
}

.file-field input {
  min-width: 0;
  width: 100%;
  height: 34px;
  padding: 4px;
  border: 1px solid #c4d7ea;
  border-radius: 5px;
  background: #fff;
  color: #607c96;
  font-size: 11px;
}

.file-field input::file-selector-button {
  height: 24px;
  margin-right: 7px;
  padding: 0 9px;
  border: 0;
  border-radius: 3px;
  background: #e7f2fd;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.load-data-button {
  width: 100%;
  height: 36px;
  margin-top: 10px;
  border: 1px solid var(--accent);
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.load-data-button:disabled {
  border-color: #c7d8e8;
  background: #dfeaf4;
  color: #8aa0b4;
  cursor: not-allowed;
}

@media (max-width: 1100px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 340px; }
  .visual-area { grid-template-columns: 1fr; grid-template-rows: 1.3fr 0.8fr; }
  .status-strip > div:nth-child(3) { display: none; }
}

@media (max-width: 760px) {
  html,
  body { overflow: auto; }
  #app { min-height: 100vh; height: auto; }
  .topbar { height: auto; min-height: 68px; padding: 12px; }
  .status-strip > div:not(:first-child) { display: none; }
  .workspace { display: flex; flex-direction: column; }
  .visual-area { height: 840px; grid-template-rows: 1fr 0.7fr; padding: 8px; }
  .control-panel { border-left: 0; border-top: 1px solid var(--line); }
  .panel-scroll { overflow: visible; }
  .panel-footer { position: sticky; bottom: 0; z-index: 20; }
}
