:root {
  color-scheme: dark;
  --bg: #101820;
  --panel: rgba(16, 24, 32, 0.82);
  --line: rgba(255, 255, 255, 0.24);
  --text: #f5f7f9;
  --muted: #c5ccd3;
  --blue: #35a7ff;
  --green: #39d98a;
  --red: #ff5f57;
  --yellow: #ffd166;
  --orange: #ff9f1c;
  --pink: #ff8ab3;
  --mad-blue: #64b5ff;
}

* {
  box-sizing: border-box;
  -webkit-user-select: none;
  user-select: none;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  touch-action: none;
}

button,
select,
input {
  font: inherit;
}

.app-shell {
  position: relative;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
}

.stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    #101820;
  background-size: 48px 48px;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.xray-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.xray-image,
.overlay,
.results {
  transform-origin: center center;
  will-change: transform;
}

.playground-pan {
  position: absolute;
  z-index: 6;
  top: max(8px, env(safe-area-inset-top));
  left: 50%;
  display: none;
  grid-template-columns: minmax(220px, 52vw) 36px;
  gap: 8px;
  align-items: center;
  transform: translateX(-50%);
  min-height: 42px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(16, 24, 32, 0.72);
  backdrop-filter: blur(16px);
  pointer-events: auto;
}

.playground-pan.visible {
  display: grid;
}

.playground-pan input {
  width: 100%;
  height: 30px;
  accent-color: var(--yellow);
}

.playground-pan input::-webkit-slider-thumb {
  width: 30px;
  height: 30px;
}

.playground-pan button {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  padding: 0;
}

.magnifier {
  position: absolute;
  z-index: 4;
  width: 320px;
  height: 420px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50% / 44%;
  background-repeat: no-repeat;
  background-color: rgba(16, 24, 32, 0.9);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 120ms ease;
  overflow: hidden;
}

.magnifier.yellow-line-view {
  width: 340px;
  height: 440px;
  border-radius: 50% / 44%;
}

.magnifier::after {
  content: "";
  position: absolute;
  inset: 50%;
  width: 22px;
  height: 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.82);
  border-top: 1px solid rgba(255, 255, 255, 0.82);
  transform: translate(-50%, -50%);
}

.magnifier.visible {
  opacity: 1;
  pointer-events: none;
}

.close-magnifier {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 18px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: rgba(16, 24, 32, 0.82);
  color: white;
  font-size: 22px;
  line-height: 1;
  pointer-events: auto;
}

.magnifier-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.manual-magnifier {
  position: absolute;
  z-index: 4;
  width: 340px;
  height: 440px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 50% / 44%;
  background-repeat: no-repeat;
  background-color: rgba(16, 24, 32, 0.62);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34);
  opacity: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  overflow: hidden;
}

.manual-magnifier.visible {
  opacity: 1;
}

.manual-magnifier-handle {
  position: absolute;
  z-index: 7;
  display: none;
  width: 54px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(16, 24, 32, 0.8);
  color: var(--text);
  font-size: 11px;
  pointer-events: auto;
  touch-action: none;
}

.manual-magnifier-handle.visible {
  display: block;
}

.calibration-notice {
  position: absolute;
  z-index: 7;
  top: max(58px, calc(env(safe-area-inset-top) + 48px));
  left: 50%;
  transform: translateX(-50%);
  padding: 7px 12px;
  border: 1px solid rgba(255, 209, 102, 0.62);
  border-radius: 999px;
  background: rgba(16, 24, 32, 0.84);
  color: var(--yellow);
  font-size: 13px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
  backdrop-filter: blur(14px);
}

.calibration-notice.visible {
  opacity: 1;
}

.lateral-legend {
  position: absolute;
  z-index: 4;
  top: max(54px, calc(env(safe-area-inset-top) + 42px));
  left: max(84px, calc(env(safe-area-inset-left) + 84px));
  display: none;
  width: min(430px, calc(100vw - 164px));
  transform: none;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(16, 24, 32, 0.74);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  pointer-events: none;
  backdrop-filter: blur(14px);
}

.lateral-legend.visible {
  display: grid;
  gap: 4px;
}

.lateral-legend strong {
  color: var(--text);
  font-size: 13px;
}

.empty-state {
  position: absolute;
  left: 50%;
  display: grid;
  gap: 3px;
  padding: 0;
  color: var(--muted);
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.empty-state-top {
  top: max(14px, env(safe-area-inset-top));
}

.empty-state-bottom {
  bottom: max(14px, env(safe-area-inset-bottom));
}

.empty-state strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  opacity: 0.32;
  white-space: nowrap;
}

.empty-state span {
  font-size: 12px;
  opacity: 0.28;
  white-space: nowrap;
}

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

.results {
  position: absolute;
  inset: 0;
  width: auto;
  padding: 0;
  pointer-events: none;
}

.results-left {
  left: 0;
}

.results-right {
  right: 0;
}

.result-pill {
  position: absolute;
  width: 102px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 24, 32, 0.78);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.15;
  backdrop-filter: blur(14px);
  cursor: move;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.result-pill.selected {
  border-color: rgba(229, 231, 235, 0.98);
  box-shadow:
    0 0 0 2px rgba(229, 231, 235, 0.68),
    0 8px 20px rgba(0, 0, 0, 0.34);
  background: rgba(55, 65, 81, 0.92);
}

.result-pill.selected strong {
  color: var(--text);
}

.result-pill.moda-selectable {
  border-color: rgba(250, 204, 21, 0.95);
  box-shadow:
    0 0 0 2px rgba(250, 204, 21, 0.42),
    0 0 18px rgba(250, 204, 21, 0.22);
}

.result-pill.anatomic-yellow-card {
  border-color: rgba(255, 209, 102, 0.9);
  background: rgba(16, 24, 32, 0.78);
}

.result-pill.mechanical-card {
  border-color: rgba(53, 167, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(53, 167, 255, 0.18);
}

.result-pill.anatomic-yellow-card strong,
.result-pill.anatomic-yellow-card span {
  color: var(--yellow);
}

.result-pill.dp-anatomic-normal strong {
  color: var(--orange);
}

.result-pill.dp-anatomic-out strong {
  color: var(--red);
}

.result-pill.dp-mad-pill {
  width: 78px;
  padding-inline: 6px;
}

.result-pill.dp-mad-pill strong,
.result-pill.dp-mad-pill span {
  white-space: normal;
}

.result-pill strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
  font-size: 15px;
}

.result-pill.normal strong {
  color: var(--text);
}

.result-pill.caution strong {
  color: var(--yellow);
}

.result-pill.cora-pill {
  border-color: rgba(255, 159, 28, 0.82);
  background: rgba(16, 24, 32, 0.82);
}

.result-pill.cora-pill strong,
.result-pill.cora-pill span {
  color: var(--orange);
}

.result-pill.mad-positive strong {
  color: var(--green);
}

.result-pill.mad-negative strong {
  color: var(--mad-blue);
}

.result-pill.mad-moderate strong {
  color: var(--pink);
}

.result-pill.out strong,
.result-pill.invalid strong {
  color: var(--red);
}

.side-panel {
  position: absolute;
  z-index: 5;
  top: max(10px, env(safe-area-inset-top));
  display: grid;
  gap: 10px;
  align-items: center;
  padding: 0;
  pointer-events: none;
}

.side-panel-left {
  left: max(8px, env(safe-area-inset-left));
  width: 72px;
}

.side-panel-right {
  top: calc(max(10px, env(safe-area-inset-top)) + 58px);
  right: max(8px, env(safe-area-inset-right));
  width: 82px;
}

.file-button,
.side-panel button,
.side-panel select {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
  padding: 0 8px;
  pointer-events: auto;
  backdrop-filter: blur(16px);
  font-size: 13px;
}

.mini-button {
  min-height: 38px;
}

.side-panel select {
  display: none;
  text-overflow: ellipsis;
}

.file-button {
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  font-size: 13px;
}

.image-tools {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  pointer-events: auto;
}

.image-tools.visible {
  display: grid;
}

.image-tools button {
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
  padding: 0;
  font-size: 12px;
  backdrop-filter: blur(16px);
}

.image-tools button.active {
  border-color: rgba(255, 209, 102, 0.72);
  color: var(--yellow);
}

.file-button input {
  display: none;
}

.segmented {
  display: grid;
  grid-template-rows: repeat(5, 1fr);
  min-height: 206px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  overflow: hidden;
  pointer-events: auto;
  backdrop-filter: blur(16px);
}

.segmented button {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.segmented button.active {
  background: #2d7dd2;
}

.segmented button.anatomic-active {
  background: #b33939;
}

.segmented button.lateral-active {
  background: #5d6b78;
}

#dpCoachButton.active {
  background: #5d6b78;
}

.scale-control {
  position: static;
  display: grid;
  gap: 3px;
  width: 58px;
  min-height: 42px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
  font-size: 10px;
  pointer-events: auto;
  backdrop-filter: blur(16px);
}

.top-tools {
  position: fixed;
  right: max(8px, env(safe-area-inset-right));
  top: max(8px, env(safe-area-inset-top));
  z-index: 6;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
}

.right-lock-button {
  width: 42px;
  min-height: 42px;
  border: 1px solid rgba(57, 217, 138, 0.55);
  border-radius: 8px;
  background: rgba(57, 217, 138, 0.3);
  color: var(--green);
  pointer-events: auto;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.1;
  backdrop-filter: blur(16px);
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
  transform-origin: center;
}

.right-lock-button.unlocked {
  animation: lockOpen 220ms ease;
}

.right-lock-button.locked {
  border-color: rgba(255, 95, 87, 0.68);
  background: rgba(255, 95, 87, 0.28);
  color: var(--red);
  animation: lockClose 220ms ease;
}

.right-lock-button.pulse {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 14px rgba(255, 255, 255, 0.12);
}

.side-panel .right-lock-button {
  width: 100%;
  min-height: 36px;
  font-size: 13px;
}

@keyframes lockOpen {
  0% { transform: scale(0.92) rotate(-10deg); }
  60% { transform: scale(1.05) rotate(4deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes lockClose {
  0% { transform: scale(0.92) rotate(10deg); }
  60% { transform: scale(1.06) rotate(-4deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.scale-control.calibrated {
  border-color: rgba(57, 217, 138, 0.62);
  box-shadow: 0 0 0 1px rgba(57, 217, 138, 0.18);
}

.scale-control.hidden {
  display: none;
}

.scale-control input {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.26);
  color: white;
  padding: 2px 3px;
  text-align: center;
}

.report-button {
  position: absolute;
  z-index: 6;
  right: max(8px, env(safe-area-inset-right));
  bottom: max(10px, env(safe-area-inset-bottom));
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 0 12px;
  backdrop-filter: blur(16px);
}

.report-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 48px));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(16, 24, 32, 0.96);
  color: white;
  padding: 12px;
}

.report-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.report-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.report-header button,
.report-actions button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  color: white;
  padding: 7px 10px;
}

#closeReport {
  background: #b33939;
}

.report-content {
  max-height: calc(100vh - 150px);
  overflow: auto;
  font-size: 13px;
}

.report-content h3 {
  margin: 14px 0 7px;
  font-size: 15px;
}

.report-content p {
  margin: 4px 0;
  color: var(--muted);
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
}

.report-table th,
.report-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 7px 5px;
  text-align: left;
}

.report-table th {
  color: var(--muted);
  font-weight: 600;
}

.report-value.normal,
.report-value.mad-positive {
  color: var(--green);
  font-weight: 700;
}

.report-value.mad-negative {
  color: var(--mad-blue);
  font-weight: 700;
}

.report-value.mad-moderate {
  color: var(--pink);
  font-weight: 700;
}

.report-value.caution {
  color: var(--yellow);
  font-weight: 700;
}

.report-value.out,
.report-value.invalid {
  color: var(--red);
  font-weight: 700;
}

@media print {
  body,
  .app-shell,
  .report-dialog,
  .report-content {
    background: white !important;
    color: #111827 !important;
  }

  .stage,
  .side-panel,
  .report-button,
  .report-header,
  .report-dialog::backdrop {
    display: none !important;
  }

  .report-dialog {
    position: static;
    width: auto;
    max-height: none;
    border: 0;
    border-radius: 0;
    padding: 0;
  }

  .report-content {
    max-height: none;
    overflow: visible;
    font-size: 12px;
  }

  .report-table th,
  .report-table td {
    border-bottom-color: #d1d5db;
  }

  .report-content h3,
  .report-table th,
  .report-content p {
    color: #111827 !important;
  }
}

.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.patient-form {
  display: grid;
  gap: 10px;
}

.patient-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
}

.patient-form input {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  padding: 0 10px;
}

.patient-form select {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  padding: 0 10px;
}

.patient-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.patient-form button {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #2d7dd2;
  color: white;
}

.patient-actions button {
  background: rgba(255, 255, 255, 0.09);
}

.case-status {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.lateral-controls {
  position: absolute;
  z-index: 6;
  top: max(54px, calc(env(safe-area-inset-top) + 42px));
  right: max(136px, calc(env(safe-area-inset-right) + 136px));
  display: none;
  grid-template-columns: repeat(2, minmax(68px, 1fr));
  gap: 5px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(16, 24, 32, 0.74);
  pointer-events: auto;
  backdrop-filter: blur(14px);
}

.lateral-controls.visible {
  display: grid;
}

.lateral-controls button {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 0 7px;
  font-size: 12px;
}

.lateral-controls button.active {
  border-color: rgba(255, 159, 28, 0.82);
  color: var(--orange);
  box-shadow: 0 0 0 1px rgba(255, 159, 28, 0.22);
}

.deformity-controls {
  position: absolute;
  z-index: 6;
  top: max(8px, calc(env(safe-area-inset-top) + 8px));
  right: max(74px, calc(env(safe-area-inset-right) + 74px));
  display: none;
  grid-template-columns: repeat(2, minmax(68px, 1fr));
  gap: 5px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(16, 24, 32, 0.74);
  pointer-events: auto;
  backdrop-filter: blur(14px);
}

.deformity-controls.visible {
  display: grid;
}

.deformity-controls button {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 0 7px;
  font-size: 12px;
}

.deformity-controls button.active {
  border-color: rgba(255, 209, 102, 0.9);
  color: var(--yellow);
  box-shadow: 0 0 0 1px rgba(255, 209, 102, 0.22);
}

#deformityCoraCotasButton {
  display: none;
}

.dpcoach-panel {
  position: absolute;
  z-index: 7;
  top: 8px;
  left: 84px;
  display: none;
  grid-template-columns: 36px minmax(210px, 250px);
  gap: 8px;
  align-items: start;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(16, 24, 32, 0.82);
  backdrop-filter: blur(16px);
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
}

.dpcoach-panel.visible {
  display: grid;
}

.dpcoach-panel:active {
  cursor: grabbing;
}

.dpcoach-steps {
  display: grid;
  gap: 6px;
}

.dpcoach-step {
  width: 36px;
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-weight: 700;
}

.dpcoach-step.active {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.22);
}

.dpcoach-step.step-green { color: var(--green); }
.dpcoach-step.step-lilac { color: #c084fc; }
.dpcoach-step.step-blue { color: var(--blue); }
.dpcoach-step.step-orange { color: var(--yellow); }
.dpcoach-step.step-red { color: #ff5d5d; }
.dpcoach-step.hidden { display: none; }

.dpcoach-info {
  position: relative;
  min-height: 188px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 10px;
}

.dpcoach-panel.collapsed {
  grid-template-columns: 36px 32px;
}

.dpcoach-panel.collapsed .dpcoach-info {
  min-height: 32px;
  padding: 4px;
}

.dpcoach-panel.collapsed .dpcoach-info strong,
.dpcoach-panel.collapsed .dpcoach-info h3,
.dpcoach-panel.collapsed .dpcoach-text {
  display: none;
}

.dpcoach-collapse {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  min-height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 0;
  font-size: 16px;
  line-height: 1;
}

.dpcoach-info strong {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

.dpcoach-info h3 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--text);
}

.dpcoach-text {
  font-size: 12px;
  line-height: 1.28;
  color: rgba(255, 255, 255, 0.92);
}

.dpcoach-text p {
  margin: 0 0 6px;
}

.marker-line {
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.base-line {
  stroke: var(--blue);
}

.secondary-line {
  stroke: var(--yellow);
}

.yellow-line-hit {
  stroke: transparent;
  stroke-width: 28;
  stroke-linecap: round;
  pointer-events: stroke;
}

.axis-line {
  stroke: rgba(255, 255, 255, 0.84);
  stroke-dasharray: 10 8;
}

.calibration-line {
  stroke: #c084fc;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.calibration-stale {
  stroke: #ef4444;
  stroke-dasharray: 8 7;
}

.angle-arc {
  fill: none;
  stroke: rgba(57, 217, 138, 0.95);
  stroke-width: 3;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.point {
  stroke: white;
  stroke-width: 1.75;
  cursor: grab;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.45));
}

.point:active {
  cursor: grabbing;
}

.point-blue {
  fill: var(--blue);
}

.point-green {
  fill: var(--green);
}

.point-orange {
  fill: var(--orange);
}

.point.point-alert {
  animation: point-alert-blink 0.8s steps(1, end) infinite;
}

.point.point-caution {
  fill: var(--yellow);
  stroke: var(--yellow);
}

@keyframes point-alert-blink {
  0%,
  49% {
    fill: var(--green);
    stroke: white;
  }
  50%,
  100% {
    fill: var(--red);
    stroke: var(--red);
  }
}

.point-yellow {
  fill: var(--yellow);
}

.point-red {
  fill: var(--red);
}

.point.cora-point {
  fill: var(--orange);
}

.point-white {
  fill: white;
}

.point-purple {
  fill: #c084fc;
}

.label {
  fill: white;
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.75);
  stroke-width: 4px;
  font-size: 14px;
  font-weight: 700;
  pointer-events: none;
}

@media (orientation: landscape) {
  .app-shell::after {
    content: "Usar en vertical";
    position: absolute;
    z-index: 20;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(16, 24, 32, 0.84);
    color: white;
    font-size: 14px;
    backdrop-filter: blur(14px);
    pointer-events: none;
  }
}
