@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root {
  color: #eff7f4;
  background: #071412;
  font-family: 'Noto Sans SC', 'Manrope', sans-serif;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
html,
body,
#__nuxt {
  height: 100%;
}
html,
body {
  overflow: hidden;
}
body {
  min-width: 320px;
  margin: 0;
  background: #071412;
}
button {
  font: inherit;
}
.app-shell {
  display: flex;
  height: 100%;
  height: 100dvh;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  background: radial-gradient(circle at 72% 19%, #123b35 0, transparent 33%), #071412;
}
.home-shell {
  min-height: 100%;
  overflow: hidden;
  background: radial-gradient(circle at 72% 19%, #123b35 0, transparent 33%), #071412;
}
.home-content {
  width: min(620px, calc(100% - 68px));
  margin: 0 auto;
  padding: 16vh 0 0;
}
.home-eyebrow {
  margin: 0 0 16px;
  color: #77b9aa;
  font: 500 10px 'DM Mono';
  letter-spacing: 0.14em;
}
.home-content h1 {
  max-width: 560px;
  margin: 0 0 60px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.home-description {
  max-width: 500px;
  margin: 22px 0 38px;
  color: #9ab6b0;
  font-size: 14px;
  line-height: 1.8;
}
.reconstruction-form {
  display: grid;
  gap: 10px;
}
.reconstruction-form label {
  color: #c3ddd7;
  font-size: 12px;
}
.reconstruction-input-row {
  display: flex;
  gap: 10px;
}
.reconstruction-input-row input {
  min-width: 0;
  flex: 1;
  height: 48px;
  padding: 0 15px;
  color: #eff7f4;
  font: inherit;
  background: rgba(143, 222, 205, 0.08);
  border: 1px solid rgba(188, 243, 229, 0.2);
  border-radius: 8px;
  outline: none;
}
.reconstruction-input-row input:focus {
  border-color: #79cdbd;
  box-shadow: 0 0 0 3px rgba(121, 205, 189, 0.14);
}
.reconstruction-input-row button,
.model-request-state button {
  height: 48px;
  padding: 0 21px;
  color: #061412;
  font-weight: 600;
  cursor: pointer;
  background: #9ee1d3;
  border: 0;
  border-radius: 8px;
}
.reconstruction-input-row button:hover,
.model-request-state button:hover {
  background: #c2f0e6;
}
.model-request-actions {
  display: flex;
  gap: 8px;
}
.model-request-actions .secondary {
  color: #c3ddd7;
  background: rgba(143, 222, 205, 0.08);
  border: 1px solid rgba(188, 243, 229, 0.2);
}
.model-request-actions .secondary:hover {
  color: #eff7f4;
  background: rgba(143, 222, 205, 0.16);
}
.model-request-state {
  display: flex;
  height: calc(100% - 72px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: #c3ddd7;
  text-align: center;
}
.model-request-state strong {
  font-size: 16px;
}
.model-request-state p {
  max-width: 460px;
  margin: 0;
  color: #9ab6b0;
  font-size: 12px;
}
.topbar {
  height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 34px;
  border-bottom: 1px solid rgba(178, 237, 223, 0.14);
  background: rgba(4, 15, 13, 0.66);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}
.brand-mark {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  color: #061412;
  font: 500 18px 'DM Mono';
  background: #9ee1d3;
  border-radius: 9px 3px 9px 3px;
}
.brand-name,
.brand-subtitle {
  margin: 0;
  letter-spacing: 0.12em;
}
.brand-name {
  font: 700 13px 'Manrope';
}
.brand-subtitle {
  margin-top: 2px;
  color: #82a49e;
  font: 400 9px 'DM Mono';
}
.connection-status {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #9fbab4;
  font-size: 12px;
}
.connection-status span {
  width: 7px;
  height: 7px;
  background: #75dfad;
  border-radius: 50%;
  box-shadow: 0 0 12px #75dfad;
}
.viewer-layout {
  position: relative;
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) 320px;
  min-height: 0;
  overflow: hidden;
  transition: grid-template-columns 180ms ease;
}
.viewer-layout.is-panel-collapsed {
  grid-template-columns: minmax(0, 1fr) 0;
}
.viewer-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.model-heading {
  position: absolute;
  z-index: 2;
  top: 32px;
  left: 34px;
  pointer-events: none;
}
.model-heading p {
  margin: 0 0 9px;
  color: #77b9aa;
  font: 500 10px 'DM Mono';
  letter-spacing: 0.12em;
}
.model-heading span {
  display: block;
  margin-top: 7px;
  color: #9ab6b0;
  font-size: 13px;
}
.model-heading-subject {
  display: flex;
  align-items: center;
  gap: 9px;
}
.model-heading-subject span {
  margin-top: 7px;
}
.model-sync-button {
  min-width: 48px;
  height: 28px;
  margin-top: 7px;
  padding: 0 10px;
  color: #9ab6b0;
  cursor: default;
  background: rgba(143, 222, 205, 0.08);
  border: 1px solid rgba(188, 243, 229, 0.14);
  border-radius: 6px;
  font-size: 11px;
  pointer-events: auto;
}
.model-sync-button.is-dirty {
  color: #061412;
  cursor: pointer;
  background: #9ee1d3;
  border-color: #9ee1d3;
  box-shadow: 0 0 18px rgba(158, 225, 211, 0.34);
}
.model-sync-button.is-dirty:hover:not(:disabled) {
  background: #c2f0e6;
  border-color: #c2f0e6;
}
.model-sync-button:disabled {
  opacity: 0.5;
}
.model-sync-status {
  display: block;
  margin-top: 7px;
  color: #9ab6b0;
  font-size: 10px;
}
.model-sync-status.is-dirty {
  color: #ffd59a;
}
.model-sync-status.is-error {
  color: #f0b89d;
}
.model-sync-progress {
  display: grid;
  gap: 12px;
}
.model-sync-progress-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.model-sync-progress-heading strong {
  color: #eff7f4;
  font-size: 13px;
  font-weight: 600;
}
.model-sync-progress-heading span {
  color: #9ee1d3;
  font: 500 11px 'DM Mono';
}
.model-sync-progress-track {
  position: relative;
  height: 8px;
  overflow: hidden;
  background: rgba(143, 222, 205, 0.1);
  border-radius: 999px;
}
.model-sync-progress-track > span {
  display: block;
  height: 100%;
  background: #9ee1d3;
  border-radius: inherit;
  transition: width 180ms ease-out;
}
.model-sync-progress-track.is-indeterminate > span {
  width: 42%;
  animation: sync-progress-indeterminate 1.2s ease-in-out infinite;
}
.model-sync-warning,
.model-sync-result {
  margin: 0;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.6;
  border-radius: 7px;
}
.model-sync-warning {
  color: #ffd59a;
  background: rgba(194, 126, 46, 0.12);
  border: 1px solid rgba(255, 213, 154, 0.22);
}
.model-sync-result.is-success {
  color: #b9eadf;
  background: rgba(23, 125, 112, 0.16);
}
.model-sync-result.is-error {
  color: #f0b89d;
  background: rgba(176, 78, 65, 0.12);
}
.model-viewer {
  position: absolute;
  inset: 0;
}
.model-viewer canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.gesture-hint {
  position: absolute;
  z-index: 2;
  top: 32px;
  right: 20px;
  color: #9eb7b1;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0.58;
  pointer-events: none;
}
.gesture-hint-touch {
  display: none;
}
.panel-collapse-toggle {
  position: absolute;
  z-index: 4;
  top: 50%;
  right: 308px;
  display: grid;
  width: 24px;
  height: 42px;
  padding: 0;
  place-items: center;
  color: #9ee1d3;
  cursor: pointer;
  background: rgba(6, 23, 20, 0.9);
  border: 1px solid rgba(188, 243, 229, 0.18);
  border-radius: 7px 0 0 7px;
  box-shadow: -4px 0 12px rgba(1, 9, 7, 0.24);
  transform: translateY(-50%);
  backdrop-filter: blur(6px);
  transition:
    right 180ms ease,
    color 150ms ease,
    background 150ms ease,
    border-color 150ms ease;
}
.panel-collapse-toggle:hover,
.panel-collapse-toggle:focus-visible {
  color: #eff7f4;
  background: rgba(18, 59, 53, 0.96);
  border-color: rgba(188, 243, 229, 0.34);
  outline: none;
}
.panel-collapse-toggle:focus-visible {
  box-shadow:
    0 0 0 2px rgba(158, 225, 211, 0.22),
    -4px 0 12px rgba(1, 9, 7, 0.24);
}
.panel-collapse-toggle svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  transition: transform 180ms ease;
}
.is-panel-collapsed .panel-collapse-toggle {
  right: 12px;
  border-radius: 7px;
}
.is-panel-collapsed .panel-collapse-toggle svg {
  transform: rotate(180deg);
}
.anatomy-panel {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  flex-direction: column;
  padding: 28px 16px;
  overflow: hidden;
  border-left: 1px solid rgba(178, 237, 223, 0.14);
  background: rgba(6, 23, 20, 0.78);
  opacity: 1;
  transition:
    padding 180ms ease,
    border-color 180ms ease,
    opacity 120ms ease;
}
.is-panel-collapsed .anatomy-panel {
  padding-right: 0;
  padding-left: 0;
  border-width: 0;
  border-color: transparent;
  opacity: 0;
  pointer-events: none;
}
.panel-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin: 0 0 18px;
  padding: 3px;
  background: rgba(143, 222, 205, 0.06);
  border: 1px solid rgba(188, 243, 229, 0.12);
  border-radius: 8px;
}
.panel-tabs button {
  min-height: 32px;
  color: #8fa9a3;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 12px;
}
.panel-tabs button:hover,
.panel-tabs button.is-active {
  color: #eff7f4;
  background: rgba(143, 222, 205, 0.14);
}
.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 8px 19px;
  border-bottom: 1px solid rgba(178, 237, 223, 0.12);
}
.panel-title p {
  margin: 0 0 5px;
  color: #77b9aa;
  font: 500 10px 'DM Mono';
  letter-spacing: 0.12em;
}
.panel-title h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}
.panel-title > span {
  color: #92aaa5;
  font: 12px 'DM Mono';
}
.model-list {
  min-height: 0;
  flex: 1;
  padding-top: 10px;
  overflow: auto;
}
.model-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  align-items: center;
  padding: 11px 9px;
  color: #c4d5d1;
  background: transparent;
  border-radius: 8px;
}
.model-item:hover {
  color: #fff;
  background: rgba(143, 222, 205, 0.11);
}
.model-color-indicator {
  width: 16px;
  height: 16px;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
}
.model-item-content {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.model-item-heading {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}
.model-item-heading > span {
  overflow: hidden;
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.model-item-heading small {
  color: #7f9d96;
  font: 10px 'DM Mono';
}
.model-display-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  align-items: center;
  padding: 3px;
  background: rgba(143, 222, 205, 0.055);
  border: 1px solid rgba(188, 243, 229, 0.1);
  border-radius: 6px;
}
.model-display-control button {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  padding: 0 4px;
  color: #7f9d96;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-size: 10px;
}
.model-display-control button:hover {
  color: #eff7f4;
  background: rgba(143, 222, 205, 0.1);
}
.model-display-control button.is-active {
  color: #071412;
  background: #9ee1d3;
  font-weight: 600;
}
.viewpoint-panel {
  min-height: 0;
  flex: 1;
  overflow: auto;
}
.viewpoint-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 0 8px 17px;
  border-bottom: 1px solid rgba(178, 237, 223, 0.12);
}
.viewpoint-toolbar p {
  margin: 0 0 5px;
  color: #77b9aa;
  font: 500 10px 'DM Mono';
  letter-spacing: 0.12em;
}
.viewpoint-toolbar strong {
  font-size: 17px;
  font-weight: 600;
}
.viewpoint-toolbar > .viewpoint-add {
  min-height: 36px;
  padding: 0 11px;
  font-size: 11px;
}
.viewpoint-actions {
  display: flex;
  gap: 5px;
}
.viewpoint-toolbar-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: stretch;
}
.viewpoint-actions button,
.viewpoint-row-actions button,
.viewpoint-editor-actions button,
.viewpoint-toolbar > button,
.viewpoint-toolbar-actions button,
.viewpoint-detail-toolbar button,
.viewpoint-detail-heading button,
.viewpoint-name-editor button,
.viewpoint-editor-tabs button,
.camera-state-heading button,
.camera-state-actions button {
  min-height: 27px;
  padding: 0 7px;
  color: #a7c9c1;
  cursor: pointer;
  background: rgba(143, 222, 205, 0.08);
  border: 1px solid rgba(188, 243, 229, 0.13);
  border-radius: 5px;
  font-size: 10px;
}
.viewpoint-actions button:hover,
.viewpoint-row-actions button:hover,
.viewpoint-editor-actions button:hover,
.viewpoint-toolbar > button:hover,
.viewpoint-toolbar-actions button:hover,
.viewpoint-detail-toolbar button:hover,
.viewpoint-detail-heading button:hover,
.viewpoint-name-editor button:hover,
.viewpoint-editor-tabs button:hover,
.camera-state-heading button:hover,
.camera-state-actions button:hover:not(:disabled) {
  color: #eff7f4;
  background: #177d70;
}
.viewpoint-actions button:disabled {
  cursor: default;
  opacity: 0.35;
}
.viewpoint-play {
  color: #9ee1d3 !important;
}
.viewpoint-stop {
  color: #f0b89d !important;
}
.viewpoint-add {
  color: #eff7f4 !important;
  background: rgba(23, 125, 112, 0.58) !important;
}
.viewpoint-export {
  color: #ffd59a !important;
  background: rgba(194, 126, 46, 0.2) !important;
  border-color: rgba(255, 213, 154, 0.3) !important;
}
.viewpoint-export:hover:not(:disabled) {
  color: #fff4df !important;
  background: #b66b24 !important;
}
.viewpoint-export:disabled {
  cursor: default;
  opacity: 0.35;
}
.viewpoint-list {
  display: grid;
  gap: 7px;
  padding-top: 12px;
}
.viewpoint-item {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 62px;
  align-items: center;
  padding: 9px;
  cursor: pointer;
  background: rgba(143, 222, 205, 0.035);
  border: 1px solid transparent;
  border-radius: 8px;
}
.viewpoint-item:hover,
.viewpoint-item:focus-visible {
  background: rgba(143, 222, 205, 0.09);
  border-color: rgba(158, 225, 211, 0.26);
  outline: none;
}
.viewpoint-item.is-active {
  background: rgba(23, 125, 112, 0.2);
  border-color: rgba(158, 225, 211, 0.44);
  box-shadow: inset 3px 0 #9ee1d3;
}
.viewpoint-item.is-highlighted {
  background: rgba(143, 222, 205, 0.14);
  border-color: rgba(158, 225, 211, 0.55);
  box-shadow: inset 3px 0 rgba(158, 225, 211, 0.72);
}
.viewpoint-item.is-playing {
  background: rgba(23, 125, 112, 0.16);
  border-color: rgba(158, 225, 211, 0.42);
}
.viewpoint-main {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 8px;
  width: 100%;
  align-items: start;
  padding: 0;
  color: #c4d5d1;
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: 0;
}
.viewpoint-index {
  padding-top: 2px;
  color: #77b9aa;
  font: 500 10px 'DM Mono';
}
.viewpoint-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.viewpoint-copy strong {
  overflow: hidden;
  color: #eff7f4;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.viewpoint-copy small {
  overflow: hidden;
  color: #7f9d96;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.viewpoint-status {
  color: #9ee1d3;
  font-size: 10px;
}
.viewpoint-row-actions {
  display: flex;
  gap: 5px;
  justify-content: flex-end;
  margin-top: 0;
}
.viewpoint-row-actions button {
  min-height: 32px;
  padding: 0 8px;
  color: #78958f;
  background: rgba(143, 222, 205, 0.05);
  border-color: rgba(188, 243, 229, 0.08);
}
.viewpoint-row-actions button.is-danger {
  color: #dba99f;
}
.viewpoint-toolbar button,
.viewpoint-detail-toolbar button,
.viewpoint-detail-heading button,
.viewpoint-name-editor button,
.viewpoint-editor-tabs button,
.camera-state-heading button,
.camera-state-actions button {
  white-space: nowrap;
}
.viewpoint-editor {
  display: grid;
  gap: 9px;
  margin-top: 10px;
  padding: 10px;
  background: rgba(4, 18, 16, 0.56);
  border: 1px solid rgba(188, 243, 229, 0.12);
  border-radius: 7px;
}
.viewpoint-editor label {
  display: grid;
  gap: 5px;
  color: #9fbab4;
  font-size: 10px;
}
.viewpoint-editor input[type='text'],
.viewpoint-editor input[type='number'],
.viewpoint-editor input[type='color'] {
  width: 100%;
  min-height: 27px;
  padding: 4px 7px;
  color: #eff7f4;
  background: rgba(143, 222, 205, 0.07);
  border: 1px solid rgba(188, 243, 229, 0.14);
  border-radius: 4px;
  font-size: 11px;
}
.viewpoint-editor input:disabled {
  cursor: default;
  opacity: 0.4;
}
.viewpoint-coordinate-grid {
  display: grid;
  grid-template-columns: 55px repeat(3, 1fr);
  gap: 5px;
  align-items: center;
}
.viewpoint-coordinate-grid span {
  color: #9fbab4;
  font-size: 10px;
}
.viewpoint-hold-toggle {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
}
.viewpoint-hold-toggle input {
  accent-color: #177d70;
}
.viewpoint-editor-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.viewpoint-form-error {
  margin: 0;
  color: #f0b89d;
  font-size: 10px;
}
.viewpoint-empty {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 60px 10px;
  color: #bcd8d1;
  text-align: center;
}
.viewpoint-empty small {
  color: #7f9d96;
  font-size: 10px;
}
.viewpoint-empty.is-compact {
  padding: 32px 10px;
}
.viewpoint-detail-toolbar,
.viewpoint-detail-heading,
.camera-state-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.viewpoint-detail-toolbar {
  padding: 0 8px 14px;
  border-bottom: 1px solid rgba(178, 237, 223, 0.12);
}
.viewpoint-back {
  color: #9ee1d3 !important;
  background: transparent !important;
  border-color: transparent !important;
}
.viewpoint-detail-heading {
  align-items: flex-end;
  padding: 17px 8px 10px;
}
.viewpoint-detail-heading p {
  margin: 0 0 5px;
  color: #77b9aa;
  font: 500 9px 'DM Mono';
}
.viewpoint-detail-heading h2 {
  margin: 0;
  color: #eff7f4;
  font-size: 17px;
}
.viewpoint-name-editor {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 5px;
  padding: 5px 8px 10px;
}
.viewpoint-name-editor input {
  min-width: 0;
  padding: 5px 7px;
  color: #eff7f4;
  background: rgba(143, 222, 205, 0.07);
  border: 1px solid rgba(188, 243, 229, 0.14);
  border-radius: 4px;
  font-size: 11px;
}
.viewpoint-editor-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin: 4px 8px 12px;
  padding: 3px;
  background: rgba(143, 222, 205, 0.06);
  border: 1px solid rgba(188, 243, 229, 0.12);
  border-radius: 8px;
}
.viewpoint-editor-tabs button {
  color: #8fa9a3;
  background: transparent;
  border-color: transparent;
}
.viewpoint-editor-tabs button.is-active {
  color: #eff7f4;
  background: rgba(143, 222, 205, 0.14);
}
.model-action-list {
  display: grid;
  gap: 4px;
  max-height: 190px;
  margin: 0 8px 4px;
  overflow: auto;
}
.model-action-list button {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 6px;
  width: 100%;
  align-items: center;
  min-height: 31px;
  padding: 4px 7px;
  color: #9fbab4;
  text-align: left;
  cursor: pointer;
  background: rgba(143, 222, 205, 0.025);
  border: 1px solid transparent;
  border-radius: 6px;
}
.model-action-list button:hover,
.model-action-list button.is-active {
  color: #eff7f4;
  background: rgba(143, 222, 205, 0.1);
  border-color: rgba(158, 225, 211, 0.24);
}
.model-action-list strong {
  overflow: hidden;
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.model-action-list small {
  color: #7f9d96;
  font-size: 9px;
}
.viewpoint-loop-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 4px 8px 14px;
  color: #9fbab4;
  font-size: 11px;
}
.viewpoint-loop-toggle input {
  accent-color: #177d70;
}
.camera-state-heading {
  padding: 12px 8px 9px;
  border-top: 1px solid rgba(178, 237, 223, 0.12);
}
.model-state-heading {
  margin-top: 8px;
}
.camera-state-heading > div {
  display: grid;
  gap: 3px;
}
.camera-state-heading span {
  color: #eff7f4;
  font-size: 13px;
  font-weight: 600;
}
.camera-state-heading small {
  color: #7f9d96;
  font-size: 10px;
}
.camera-state-list {
  display: grid;
  gap: 7px;
  max-height: calc(100vh - 330px);
  padding-top: 4px;
  overflow: auto;
}
.model-state-list {
  max-height: max(180px, calc(100vh - 610px));
}
.camera-state-item {
  padding: 9px;
  background: rgba(143, 222, 205, 0.035);
  border: 1px solid rgba(188, 243, 229, 0.08);
  border-radius: 8px;
}
.camera-state-summary {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
}
.camera-state-summary > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.camera-state-summary strong {
  color: #d9ebe6;
  font-size: 11px;
  font-weight: 500;
}
.camera-state-summary small {
  overflow: hidden;
  color: #7f9d96;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.model-state-summary {
  grid-template-columns: 24px 12px 1fr;
  align-items: start;
}
.model-state-summary > i {
  width: 10px;
  height: 10px;
  margin-top: 3px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
}
.model-color-editor {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 6px;
}
.viewpoint-editor .model-color-editor input[type='color'] {
  min-height: 29px;
  padding: 2px;
}
.camera-state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
  margin-top: 8px;
}
.camera-state-actions button {
  min-height: 22px;
  padding: 0 6px;
  color: #78958f;
  background: transparent;
  border-color: transparent;
}
.camera-state-actions button:disabled {
  cursor: default;
  opacity: 0.28;
}
.viewer-actions {
  position: absolute;
  z-index: 3;
  right: 20px;
  bottom: 20px;
  display: flex;
  gap: 6px;
  padding: 6px;
  background: rgba(4, 20, 17, 0.78);
  border: 1px solid rgba(188, 243, 229, 0.18);
  border-radius: 11px;
  backdrop-filter: blur(12px);
}
.viewer-actions button {
  width: 32px;
  height: 32px;
  color: #e7f6f1;
  cursor: pointer;
  background: rgba(160, 230, 216, 0.1);
  border: 1px solid rgba(188, 243, 229, 0.16);
  border-radius: 7px;
  font-size: 18px;
}
.viewer-actions button:hover {
  background: #177d70;
}
.viewer-reset-control {
  position: relative;
  display: flex;
}
.viewer-reset-menu {
  position: absolute;
  right: 0;
  bottom: 40px;
  display: grid;
  gap: 4px;
  width: 142px;
  padding: 6px;
  background: rgba(4, 20, 17, 0.94);
  border: 1px solid rgba(188, 243, 229, 0.2);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
}
.viewer-actions .viewer-reset-menu button {
  display: flex;
  width: 100%;
  height: 30px;
  align-items: center;
  justify-content: flex-start;
  padding: 0 10px;
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
}
.viewer-view-actions {
  position: absolute;
  z-index: 3;
  bottom: 22px;
  left: 24px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 10px;
}
.viewer-view-actions button {
  min-width: 124px;
  height: 46px;
  padding: 0 18px;
  color: #061412;
  cursor: pointer;
  background: #9ee1d3;
  border: 0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}
.viewer-view-actions button:hover {
  background: #c2f0e6;
}
.viewer-view-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}
.viewer-view-actions .viewer-view-action-secondary {
  color: #d6eee8;
  background: rgba(9, 45, 39, 0.9);
  border: 1px solid rgba(158, 225, 211, 0.3);
}
.viewer-view-actions .viewer-view-action-secondary:hover:not(:disabled) {
  color: #061412;
  background: #9ee1d3;
}
.view-dialog-backdrop {
  position: fixed;
  z-index: 20;
  top: var(--view-dialog-viewport-top, 0);
  right: 0;
  bottom: auto;
  left: 0;
  height: var(--view-dialog-viewport-height, 100dvh);
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
  background: rgba(2, 12, 10, 0.72);
  backdrop-filter: blur(7px);
  overscroll-behavior: contain;
}
.view-dialog {
  width: min(420px, 100%);
  max-height: calc(100dvh - 48px);
  padding: 22px;
  overflow-y: auto;
  color: #eff7f4;
  background: #102c27;
  border: 1px solid rgba(188, 243, 229, 0.22);
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}
.view-dialog-create {
  width: min(520px, 100%);
}
.view-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.view-dialog-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}
.view-dialog-close {
  width: 28px;
  height: 28px;
  padding: 0;
  color: #c3ddd7;
  cursor: pointer;
  background: transparent;
  border: 1px solid rgba(188, 243, 229, 0.14);
  border-radius: 6px;
  font-size: 20px;
  line-height: 1;
}
.view-dialog-close:hover {
  color: #eff7f4;
  background: rgba(143, 222, 205, 0.12);
}
.view-dialog-form {
  display: grid;
  gap: 18px;
}
.view-dialog-form label {
  display: grid;
  gap: 8px;
  color: #c3ddd7;
  font-size: 12px;
}
.view-dialog-form input[type='text'] {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  color: #eff7f4;
  font: inherit;
  background: rgba(143, 222, 205, 0.08);
  border: 1px solid rgba(188, 243, 229, 0.2);
  border-radius: 7px;
  outline: none;
}
.view-dialog-form input[type='text']:focus {
  border-color: #79cdbd;
  box-shadow: 0 0 0 3px rgba(121, 205, 189, 0.14);
}
.view-dialog-preview {
  position: relative;
  display: grid;
  width: 100%;
  height: min(220px, 28dvh);
  min-height: 150px;
  place-items: center;
  overflow: hidden;
  color: #78908a;
  background: #071412;
  border: 1px solid rgba(188, 243, 229, 0.12);
  border-radius: 7px;
  font-size: 12px;
}
.view-dialog-preview img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.view-dialog-name-field {
  min-width: 0;
}
.view-dialog-name-input {
  position: relative;
}
.view-dialog-name-input input[type='text'] {
  padding-right: 52px;
}
.view-dialog-name-count {
  position: absolute;
  top: 50%;
  right: 12px;
  color: #7f9d96;
  font-family: 'DM Mono';
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-50%);
}
.view-dialog-choice-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.view-dialog-choice-group legend {
  margin-bottom: 8px;
  color: #c3ddd7;
  font-size: 12px;
}
.view-dialog-choice-list {
  display: grid;
  max-height: min(280px, 38dvh);
  gap: 7px;
  padding: 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.view-dialog-choice {
  position: relative;
  display: grid !important;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 10px !important;
  min-height: 52px;
  align-items: center;
  padding: 9px 11px;
  color: #c3ddd7;
  cursor: pointer;
  background: rgba(143, 222, 205, 0.045);
  border: 1px solid rgba(188, 243, 229, 0.12);
  border-radius: 7px;
  transition:
    background 150ms ease,
    border-color 150ms ease;
}
.view-dialog-choice:hover {
  background: rgba(143, 222, 205, 0.09);
  border-color: rgba(188, 243, 229, 0.24);
}
.view-dialog-choice.is-selected {
  background: rgba(23, 125, 112, 0.2);
  border-color: rgba(158, 225, 211, 0.5);
}
.view-dialog-choice:focus-within {
  border-color: #79cdbd;
  box-shadow: 0 0 0 2px rgba(121, 205, 189, 0.14);
}
.view-dialog-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.view-dialog-choice-marker {
  display: grid;
  width: 14px;
  height: 14px;
  place-items: center;
  border: 1px solid rgba(188, 243, 229, 0.42);
  border-radius: 50%;
}
.view-dialog-choice.is-selected .view-dialog-choice-marker::after {
  width: 6px;
  height: 6px;
  content: '';
  background: #9ee1d3;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(158, 225, 211, 0.42);
}
.view-dialog-choice-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}
.view-dialog-choice-copy strong {
  overflow: hidden;
  color: #eff7f4;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.view-dialog-choice-copy small {
  color: #7f9d96;
  font-size: 10px;
}
.view-dialog-error {
  margin: -6px 0 0;
  color: #ff9e9e;
  font-size: 12px;
}
.view-dialog-message {
  margin: 0;
  color: #c3ddd7;
  font-size: 13px;
  line-height: 1.7;
}
.view-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.view-dialog-actions button {
  min-width: 92px;
  height: 38px;
  padding: 0 14px;
  cursor: pointer;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
}
.view-dialog-create-actions .view-dialog-primary {
  min-width: 112px;
}
.view-dialog-primary {
  color: #061412;
  background: #9ee1d3;
  border: 0;
}
.view-dialog-primary:hover:not(:disabled) {
  background: #c2f0e6;
}
.view-dialog-primary:disabled {
  color: #78908a;
  cursor: default;
  background: #18332d;
  border: 1px solid #2b5048;
}
.view-dialog-secondary {
  color: #c3ddd7;
  background: transparent;
  border: 1px solid rgba(188, 243, 229, 0.18);
}
.view-dialog-secondary:hover {
  color: #eff7f4;
  background: rgba(143, 222, 205, 0.1);
}
.view-dialog-danger {
  color: #fff;
  background: #a94f44;
  border: 0;
}
.view-dialog-danger:hover {
  background: #c15d50;
}
.view-dialog-form .view-dialog-check {
  display: flex;
  gap: 9px;
  align-items: center;
}
.view-dialog-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #177d70;
}
.loading-state,
.error-state {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: #bcd8d1;
  background: rgba(4, 18, 16, 0.76);
}
.model-loading-progress {
  display: grid;
  width: min(360px, calc(100vw - 48px));
  min-width: 0;
  gap: 10px;
}
.model-loading-progress-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.model-loading-progress-heading strong {
  color: #eff7f4;
  font-size: 14px;
  font-weight: 600;
}
.model-loading-progress-heading span {
  flex: 0 0 auto;
  color: #9ee1d3;
  font: 500 12px 'DM Mono';
}
.model-loading-progress-track {
  height: 7px;
  overflow: hidden;
  background: rgba(143, 222, 205, 0.14);
  border-radius: 999px;
}
.model-loading-progress-track > span {
  display: block;
  height: 100%;
  background: #9ee1d3;
  border-radius: inherit;
  transition: width 160ms ease-out;
}
.model-download-progress {
  display: grid;
  width: min(360px, calc(100vw - 48px));
  gap: 10px;
}
.model-download-progress-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.model-download-progress-heading strong {
  color: #eff7f4;
  font-size: 14px;
  font-weight: 600;
}
.model-download-progress-heading span {
  flex: 0 0 auto;
  color: #9ee1d3;
  font: 500 12px 'DM Mono';
}
.model-download-progress-track {
  height: 7px;
  overflow: hidden;
  background: rgba(143, 222, 205, 0.14);
  border-radius: 999px;
}
.model-download-progress-track > span {
  display: block;
  height: 100%;
  background: #9ee1d3;
  border-radius: inherit;
  transition: width 160ms ease-out;
}
.model-download-progress-track.is-indeterminate > span {
  width: 42%;
  animation: sync-progress-indeterminate 1.2s ease-in-out infinite;
}
.error-state strong {
  color: #fff;
}
.error-state span {
  color: #91aaa4;
  font-size: 12px;
}
.error-state button {
  padding: 7px 12px;
  color: #eaf8f4;
  cursor: pointer;
  background: #177d70;
  border: 0;
  border-radius: 5px;
}
.error-state-actions {
  display: flex;
  gap: 8px;
}
.error-state button.secondary {
  background: rgba(160, 230, 216, 0.12);
  border: 1px solid rgba(188, 243, 229, 0.16);
}
@keyframes sync-progress-indeterminate {
  from {
    transform: translateX(-115%);
  }
  to {
    transform: translateX(240%);
  }
}
@media (max-width: 767px) and (orientation: portrait) {
  .topbar {
    height: 56px;
    flex: 0 0 56px;
    padding: 0 14px;
  }
  .connection-status {
    font-size: 10px;
  }
  .viewer-layout {
    display: block;
    height: auto;
    flex: 1;
    overflow: hidden;
  }
  .viewer-stage {
    height: 58%;
    min-height: 0;
    transition: height 180ms ease;
  }
  .model-heading {
    top: 16px;
    left: 14px;
  }
  .anatomy-panel {
    height: 42%;
    min-height: 0;
    padding: 14px 12px max(14px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(178, 237, 223, 0.14);
    border-left: 0;
    transition:
      height 180ms ease,
      padding 180ms ease,
      border-color 180ms ease,
      opacity 120ms ease;
  }
  .panel-collapse-toggle {
    top: auto;
    right: auto;
    bottom: calc(42% - 12px);
    left: 50%;
    width: 42px;
    height: 24px;
    border-radius: 7px 7px 0 0;
    box-shadow: 0 -4px 12px rgba(1, 9, 7, 0.24);
    transform: translateX(-50%);
    transition:
      bottom 180ms ease,
      color 150ms ease,
      background 150ms ease,
      border-color 150ms ease,
      box-shadow 150ms ease;
  }
  .panel-collapse-toggle svg {
    transform: rotate(90deg);
  }
  .viewer-layout.is-panel-collapsed .viewer-stage {
    height: 100%;
  }
  .viewer-layout.is-panel-collapsed .anatomy-panel {
    height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-color: transparent;
  }
  .is-panel-collapsed .panel-collapse-toggle {
    right: auto;
    bottom: 10px;
    left: 50%;
    border-radius: 7px;
  }
  .is-panel-collapsed .panel-collapse-toggle svg {
    transform: rotate(-90deg);
  }
  .model-list {
    display: grid;
    grid-template-columns: 1fr;
    max-height: none;
    gap: 3px;
  }
  .panel-tabs {
    margin-bottom: 14px;
  }
  .viewpoint-list {
    max-height: none;
  }
  .model-item {
    grid-template-columns: 16px minmax(0, 1fr);
    padding: 8px 7px;
  }
  .model-item-content {
    grid-template-columns: minmax(86px, 0.7fr) minmax(200px, 1.3fr);
    gap: 8px;
    align-items: center;
  }
  .model-display-control button {
    min-height: 38px;
    font-size: 11px;
  }
  .gesture-hint-desktop {
    display: none;
  }
  .gesture-hint-touch {
    display: block;
  }
  .gesture-hint {
    top: auto;
    right: 12px;
    bottom: 62px;
  }
  .viewer-actions {
    right: 12px;
    bottom: 12px;
  }
  .viewpoint-toolbar {
    padding: 0 4px 12px;
  }
  .viewpoint-toolbar > .viewpoint-add {
    min-height: 42px;
  }
  .viewpoint-item {
    min-height: 64px;
  }
  .viewpoint-row-actions button {
    min-height: 40px;
  }
  .view-dialog-backdrop {
    place-items: center;
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
      max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }
  .view-dialog {
    width: min(420px, 100%);
    max-height: calc(var(--view-dialog-viewport-height, 100dvh) - 24px);
    padding: 18px;
    border: 1px solid rgba(188, 243, 229, 0.22);
    border-radius: 8px;
  }
  .view-dialog-header {
    margin-bottom: 18px;
  }
  .view-dialog-choice-list {
    max-height: min(260px, 34dvh);
  }
  .view-dialog-actions button {
    min-width: 0;
    height: 44px;
    flex: 1;
  }
  .view-dialog-create-actions .view-dialog-primary {
    min-width: 112px;
    flex: 0 0 auto;
  }
  .view-dialog-preview {
    height: min(180px, 25dvh);
    min-height: 112px;
  }
  .view-dialog-backdrop.is-keyboard-active {
    place-items: start center;
  }
  .view-dialog-backdrop.is-keyboard-active .view-dialog-create {
    max-height: calc(var(--view-dialog-viewport-height, 100dvh) - 24px);
  }
  .view-dialog-backdrop.is-keyboard-active .view-dialog-header {
    margin-bottom: 12px;
  }
  .view-dialog-backdrop.is-keyboard-active .view-dialog-form {
    gap: 12px;
  }
  .view-dialog-backdrop.is-keyboard-active .view-dialog-preview {
    height: min(112px, 22dvh);
    min-height: 80px;
  }
  .home-content {
    width: calc(100% - 32px);
    padding-top: 12vh;
  }
  .home-content h1 {
    margin-bottom: 40px;
    font-size: 32px;
  }
  .reconstruction-input-row {
    flex-direction: column;
  }
  .reconstruction-input-row button {
    width: 100%;
  }
}
@media (max-width: 1024px) and (max-height: 500px) and (orientation: landscape), (hover: none) and (pointer: coarse) {
  .gesture-hint-desktop {
    display: none;
  }
  .gesture-hint-touch {
    display: block;
  }
}
@media (max-height: 500px) {
  .topbar {
    height: 52px;
    flex: 0 0 52px;
    padding: 0 18px;
  }
  .viewer-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  .panel-collapse-toggle {
    right: 268px;
  }
  .anatomy-panel {
    padding: 12px;
  }
  .panel-tabs {
    margin-bottom: 10px;
  }
  .model-item {
    padding: 7px;
  }
  .model-display-control button {
    min-height: 30px;
  }
  .viewpoint-toolbar {
    padding-bottom: 10px;
  }
  .viewpoint-item {
    min-height: 54px;
  }
  .view-dialog-backdrop {
    padding: 10px 16px;
  }
  .view-dialog {
    width: min(520px, 100%);
    max-height: calc(100dvh - 20px);
    padding: 15px 18px;
  }
  .view-dialog-header {
    margin-bottom: 12px;
  }
  .view-dialog-form {
    gap: 12px;
  }
  .view-dialog-choice-list {
    max-height: 112px;
  }
  .view-dialog-choice {
    min-height: 44px;
    padding: 6px 10px;
  }
  .view-dialog-actions button {
    height: 34px;
  }
}

/* Viewer prototype layout */
.app-shell {
  background: #071412;
}
.topbar {
  position: relative;
  z-index: 8;
  height: 64px;
  flex: 0 0 64px;
  padding: 0 24px;
  background: #091715;
}
.brand-logo {
  display: block;
  width: 160px;
  height: auto;
  max-height: 34px;
  object-fit: contain;
}
.patient-summary {
  position: absolute;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  color: #8ea5a0;
  font-size: 14px;
  white-space: nowrap;
  transform: translateX(-50%);
}
.patient-summary strong {
  color: #edf5f2;
  font-size: 18px;
  font-weight: 600;
}
.viewer-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
  background: #06110f;
}
.viewer-layout.is-panel-collapsed {
  grid-template-columns: minmax(0, 1fr) 0;
}
.anatomy-panel {
  padding: 0;
  background: #0b1717;
  border-left-color: rgba(203, 221, 216, 0.12);
}
.is-panel-collapsed .anatomy-panel {
  padding: 0;
}
.panel-collapse-toggle {
  right: 328px;
}
.model-viewer {
  background: #071412;
}
.viewer-actions {
  right: 20px;
  bottom: 20px;
  gap: 4px;
  padding: 4px;
  background: rgba(10, 25, 24, 0.92);
  border-color: rgba(219, 232, 229, 0.16);
  border-radius: 7px;
  transition: bottom 180ms ease;
}
.viewer-stage.is-anatomy-expanded .viewer-actions {
  bottom: calc(var(--anatomy-dock-expanded-height) + 30px);
}
.viewer-actions button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  color: #94a9a4;
  background: transparent;
  border-color: transparent;
  border-radius: 5px;
}
.viewer-actions button:hover,
.viewer-actions button.is-active {
  color: #f3f7f6;
  background: #315d56;
}
.viewer-actions svg,
.new-view-button svg,
.viewpoint-icon-button svg,
.anatomy-collapse-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}
.viewer-action-icon {
  display: block;
  width: 18px;
  height: 18px;
  background: currentColor;
  mask: url('/rotate-view.png') center / contain no-repeat;
  -webkit-mask: url('/rotate-view.png') center / contain no-repeat;
}
.new-view-button svg {
  width: 26px;
  height: 26px;
  stroke-width: 2;
}
.new-view-button {
  position: absolute;
  z-index: 4;
  top: 20px;
  left: 20px;
  display: flex;
  height: 50px;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  color: #f3f7f6;
  cursor: pointer;
  background: #315d56;
  border: 1px solid #49776e;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  transition: background 150ms ease;
}
.new-view-button:hover {
  background: #40786e;
}
.anatomy-dock {
  position: absolute;
  z-index: 3;
  right: 20px;
  bottom: var(--anatomy-dock-bottom);
  left: 20px;
  height: 0;
  overflow: hidden;
  background: rgba(10, 24, 23, 0.94);
  border: 0 solid transparent;
  border-radius: 7px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition:
    height 180ms ease,
    opacity 120ms ease,
    border-color 120ms ease,
    visibility 0s linear 180ms;
}
.anatomy-dock.is-expanded {
  height: var(--anatomy-dock-expanded-height);
  border-width: 1px;
  border-color: rgba(210, 226, 222, 0.16);
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition-delay: 0s;
}
.viewer-stage {
  --anatomy-dock-expanded-height: 64px;
  --anatomy-dock-bottom: 18px;
}
.anatomy-dock-header {
  display: none;
  width: 100%;
  height: 47px;
  align-items: center;
  padding: 0 15px;
  color: #e7efed;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}
.anatomy-collapse-toggle {
  position: absolute;
  z-index: 4;
  bottom: var(--anatomy-dock-bottom);
  left: 50%;
  display: grid;
  width: 42px;
  height: 24px;
  place-items: center;
  padding: 0;
  color: #9ee1d3;
  cursor: pointer;
  background: rgba(6, 23, 20, 0.92);
  border: 1px solid rgba(188, 243, 229, 0.18);
  border-radius: 7px;
  box-shadow: 0 -4px 12px rgba(1, 9, 7, 0.24);
  transform: translateX(-50%);
  backdrop-filter: blur(6px);
  transition:
    bottom 180ms ease,
    color 150ms ease,
    background 150ms ease,
    border-color 150ms ease;
}
.anatomy-collapse-toggle:hover,
.anatomy-collapse-toggle:focus-visible {
  color: #eff7f4;
  background: rgba(18, 59, 53, 0.96);
  border-color: rgba(188, 243, 229, 0.34);
  outline: none;
}
.anatomy-collapse-toggle svg {
  transition: transform 180ms ease;
}
.viewer-stage:not(.is-anatomy-expanded) .anatomy-collapse-toggle svg {
  transform: rotate(180deg);
}
.viewer-stage.is-anatomy-expanded .anatomy-collapse-toggle {
  bottom: calc(var(--anatomy-dock-bottom) + var(--anatomy-dock-expanded-height));
  border-radius: 7px;
}
.anatomy-structure-list {
  display: flex;
  height: 100%;
  flex-wrap: nowrap;
  gap: 7px;
  max-height: none;
  align-items: center;
  padding: 8px 12px;
  overflow-x: auto;
  overflow-y: hidden;
  border-top: 0;
  scrollbar-color: #52756d #132421;
  scrollbar-width: thin;
}
.anatomy-structure-list::-webkit-scrollbar {
  height: 7px;
}
.anatomy-structure-list::-webkit-scrollbar-track {
  background: #132421;
}
.anatomy-structure-list::-webkit-scrollbar-thumb {
  background: #52756d;
  border-radius: 4px;
}
.anatomy-structure {
  display: flex;
  width: max-content;
  min-width: max-content;
  min-height: 42px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  color: #f5faf8;
  cursor: pointer;
  background: var(--structure-color);
  border: 1px solid color-mix(in srgb, var(--structure-color) 72%, #ffffff 28%);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.82);
  transition:
    background 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}
.anatomy-structure:hover {
  background: color-mix(in srgb, var(--structure-color) 86%, #ffffff 14%);
}
.anatomy-structure > span:last-child {
  min-width: max-content;
  line-height: 1.45;
  white-space: nowrap;
}
.anatomy-structure.is-visible {
  box-shadow:
    inset 0 0 18px rgba(3, 14, 12, 0.25),
    inset 0 1px rgba(255, 255, 255, 0.16);
}
.anatomy-structure.is-visible > span:last-child {
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.95),
    0 0 4px rgba(0, 0, 0, 0.62);
}
.anatomy-structure.is-translucent {
  background: color-mix(in srgb, var(--structure-color) 38%, rgba(7, 20, 18, 0.9));
  border-color: color-mix(in srgb, var(--structure-color) 60%, rgba(210, 226, 222, 0.32));
}
.anatomy-structure.is-translucent:hover {
  background: color-mix(in srgb, var(--structure-color) 48%, rgba(7, 20, 18, 0.82));
}
.anatomy-structure.is-hidden {
  color: #78908a;
  background: rgba(7, 20, 18, 0.72);
  border-color: color-mix(in srgb, var(--structure-color) 32%, #2d403c 68%);
  text-shadow: none;
}
.anatomy-structure.is-hidden:hover {
  color: #91a49f;
  background: color-mix(in srgb, var(--structure-color) 14%, rgba(7, 20, 18, 0.78));
}
.viewpoint-panel {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
}
.viewpoint-toolbar {
  min-height: 78px;
  flex: 0 0 auto;
  align-items: center;
  padding: 14px 18px;
  background: #0d1b1a;
}
.viewpoint-toolbar > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.viewpoint-toolbar p {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.viewpoint-toolbar strong {
  color: #f0f5f4;
  font-size: 16px;
}
.viewpoint-mobile-hint {
  display: none;
}
.viewpoint-toolbar > .viewpoint-save {
  min-width: 80px;
  height: 42px;
  padding: 0 18px;
  color: #8da69f;
  cursor: default;
  background: #18332d;
  border: 1px solid #2b5048;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
}
.viewpoint-toolbar > .viewpoint-save.is-dirty {
  color: #f3faf7;
  cursor: pointer;
  background: #2f8f76;
  border-color: #4fba9d;
  box-shadow: 0 0 16px rgba(47, 143, 118, 0.24);
}
.viewpoint-toolbar > .viewpoint-save.is-dirty:hover {
  background: #3aa58a;
}
.viewpoint-toolbar > .viewpoint-save:disabled {
  opacity: 1;
}
.viewpoint-list {
  display: block;
  min-height: 0;
  flex: 1;
  padding: 12px;
  overflow: auto;
}
.viewpoint-item {
  display: block;
  min-height: 0;
  margin-bottom: 8px;
  padding: 0;
  overflow: hidden;
  background: #101d1d;
  border: 1px solid #1e2c2b;
  border-radius: 6px;
}
.viewpoint-item:hover,
.viewpoint-item:focus-visible {
  background: #142322;
  border-color: #344846;
}
.viewpoint-item.is-active {
  background: #142522;
  border-color: #4e716a;
  box-shadow: inset 3px 0 #6aa396;
}
.viewpoint-item.is-highlighted {
  background: #162724;
  border-color: #577a73;
  box-shadow: inset 3px 0 #78ab9f;
}
.viewpoint-item-summary {
  display: grid;
  min-height: 68px;
  grid-template-columns: 28px minmax(0, 1fr) 34px;
  gap: 9px;
  align-items: center;
  padding: 9px 10px;
}
.viewpoint-index,
.viewpoint-copy strong,
.viewpoint-copy small {
  font-size: 12px;
}
.viewpoint-index {
  padding: 0;
  color: #718680;
  font-family: 'DM Mono';
}
.viewpoint-copy {
  gap: 5px;
}
.viewpoint-name-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}
.viewpoint-name-row strong {
  min-width: 0;
  overflow: hidden;
  color: #e5edeb;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.viewpoint-inline-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px 28px;
  gap: 4px;
}
.viewpoint-inline-editor-input {
  position: relative;
  min-width: 0;
}
.viewpoint-inline-editor input {
  width: 100%;
  min-width: 0;
  height: 28px;
  padding: 0 39px 0 7px;
  color: #eef4f2;
  background: #0b1716;
  border: 1px solid #58776f;
  border-radius: 4px;
  font-size: 12px;
  outline: none;
}
.viewpoint-inline-editor .viewpoint-inline-editor-count {
  position: absolute;
  top: 50%;
  right: 6px;
  color: #71817d;
  font-family: 'DM Mono';
  font-variant-numeric: tabular-nums;
  font-size: 9px;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-50%);
}
.viewpoint-inline-editor button {
  width: 28px;
  height: 28px;
  padding: 0;
  color: #b8c9c5;
  cursor: pointer;
  background: #1b2d2a;
  border: 1px solid #354b47;
  border-radius: 4px;
}
.viewpoint-inline-editor small {
  grid-column: 1 / -1;
  color: #d99586;
  font-size: 11px;
}
.viewpoint-copy small {
  color: #71817d;
}
.viewpoint-icon-button {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  padding: 0;
  color: #788b86;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 4px;
}
.viewpoint-icon-button:hover {
  color: #e8f0ee;
  background: rgba(255, 255, 255, 0.07);
}
.viewpoint-icon-button.is-danger {
  color: #ad756e;
}
.viewpoint-active-actions {
  display: grid;
  grid-template-columns: 1fr;
  padding: 8px 10px 10px 47px;
  border-top: 1px solid #273836;
}
.viewpoint-active-actions button {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  color: #9dafaa;
  cursor: pointer;
  background: #172624;
  border: 1px solid #2d403d;
  border-radius: 5px;
  font-size: 12px;
}
.viewpoint-active-actions button:hover {
  color: #edf4f2;
  background: #213633;
}
.viewpoint-active-actions button.is-emphasized {
  color: #1f160b !important;
  background: #e5ad61;
  border-color: #efc27e;
  font-weight: 600;
}
.viewpoint-empty {
  flex: 1;
}

@media (max-width: 767px), (max-width: 1024px) and (max-height: 500px) and (orientation: landscape) {
  .topbar {
    position: sticky;
    top: 0;
    height: calc(56px + env(safe-area-inset-top));
    flex: 0 0 calc(56px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  }
  .brand {
    gap: 8px;
  }
  .brand-logo {
    width: 96px;
    max-height: 24px;
  }
  .patient-summary {
    display: flex;
    gap: 10px;
    font-size: 10px;
    text-align: center;
  }
  .patient-summary strong {
    font-size: 13px;
  }
  .viewer-layout {
    display: block;
    height: auto;
    grid-template-columns: none;
    flex: 1;
  }
  .viewer-stage {
    --anatomy-dock-expanded-height: 112px;
    --anatomy-dock-bottom: 10px;
    height: 56%;
  }
  .anatomy-panel {
    height: 44%;
    padding: 0;
  }
  .panel-collapse-toggle {
    top: auto;
    right: auto;
    bottom: calc(44% - 12px);
    left: 50%;
    width: 42px;
    height: 24px;
    border-radius: 7px 7px 0 0;
    transform: translateX(-50%);
  }
  .panel-collapse-toggle svg {
    transform: rotate(90deg);
  }
  .viewer-layout.is-panel-collapsed .viewer-stage {
    height: 100%;
  }
  .viewer-layout.is-panel-collapsed .anatomy-panel {
    height: 0;
    padding: 0;
  }
  .is-panel-collapsed .panel-collapse-toggle {
    right: auto;
    bottom: 10px;
    left: 50%;
    border-radius: 7px;
  }
  .is-panel-collapsed .panel-collapse-toggle svg {
    transform: rotate(-90deg);
  }
  .viewer-actions {
    display: none;
  }
  .anatomy-dock {
    right: 10px;
    left: 10px;
  }
  .anatomy-dock.is-expanded {
    height: var(--anatomy-dock-expanded-height);
  }
  .anatomy-structure-list {
    max-height: calc(var(--anatomy-dock-expanded-height) - 49px);
  }
  .new-view-button {
    top: 10px;
    left: 10px;
    height: 46px;
  }
  .viewpoint-toolbar {
    min-height: 58px;
    padding: 10px 14px;
  }
  .viewpoint-list {
    padding: 8px 10px max(10px, env(safe-area-inset-bottom));
  }
  .viewpoint-item-summary {
    min-height: 58px;
  }
  .viewpoint-active-actions {
    padding-left: 47px;
  }
}

@media (max-width: 767px) and (max-height: 500px) {
  .topbar {
    height: calc(48px + env(safe-area-inset-top));
    flex-basis: calc(48px + env(safe-area-inset-top));
  }
  .viewer-stage {
    --anatomy-dock-expanded-height: 104px;
    height: 55%;
  }
  .anatomy-panel {
    height: 45%;
  }
  .panel-collapse-toggle {
    bottom: calc(45% - 12px);
  }
  .anatomy-dock {
    height: 0;
  }
  .anatomy-dock-header {
    height: 41px;
  }
  .anatomy-dock.is-expanded {
    height: var(--anatomy-dock-expanded-height);
  }
  .anatomy-structure-list {
    max-height: 78px;
    padding: 6px 10px;
  }
  .anatomy-structure {
    min-height: 34px;
    padding-top: 5px;
    padding-bottom: 5px;
  }
  .new-view-button {
    height: 42px;
  }
  .viewpoint-toolbar {
    min-height: 48px;
    padding: 7px 12px;
  }
  .viewpoint-list {
    padding: 6px 9px;
  }
  .viewpoint-item-summary {
    min-height: 50px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .viewpoint-active-actions {
    padding-top: 5px;
    padding-bottom: 6px;
  }
  .viewpoint-active-actions button {
    min-height: 30px;
  }
}

/* Mobile recommended-view strip */
.mobile-topbar-save,
.mobile-update-view-button {
  display: none;
}

@media (max-width: 767px), (max-width: 1024px) and (max-height: 500px) and (orientation: landscape) {
  .topbar {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) 66px;
    gap: 8px;
  }
  .patient-summary {
    position: static;
    min-width: 0;
    justify-content: center;
    gap: 8px;
    transform: none;
  }
  .patient-summary span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mobile-topbar-save {
    display: block;
    width: 66px;
    height: 38px;
    padding: 0;
    color: #78938c;
    background: #15322d;
    border: 1px solid #294d46;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
  }
  .mobile-topbar-save.is-dirty {
    color: #f3faf7;
    cursor: pointer;
    background: #2f8f76;
    border-color: #4fba9d;
  }
  .mobile-topbar-save:disabled {
    opacity: 1;
  }
  .viewer-layout {
    --mobile-view-strip-top: 12px;
    --mobile-view-strip-height: 94px;
    --mobile-view-actions-top: 118px;
    position: relative;
    height: auto;
  }
  .viewer-stage,
  .viewer-layout.is-panel-collapsed .viewer-stage {
    --anatomy-dock-expanded-height: 60px;
    width: 100%;
    height: 100%;
  }
  .anatomy-dock-header {
    display: none;
  }
  .anatomy-structure-list {
    height: 100%;
    gap: 6px;
    max-height: none;
    align-items: center;
    padding: 8px;
    border-top: 0;
  }
  .anatomy-structure {
    padding-right: 12px;
    padding-left: 12px;
  }
  .anatomy-panel {
    position: absolute;
    z-index: 5;
    top: var(--mobile-view-strip-top);
    right: 10px;
    left: 10px;
    width: auto;
    height: var(--mobile-view-strip-height);
    padding: 0;
    overflow: hidden;
    background: rgba(6, 24, 21, 0.94);
    border: 1px solid rgba(116, 182, 167, 0.34);
    border-radius: 7px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(10px);
    transition:
      height 180ms ease,
      border-color 120ms ease,
      opacity 120ms ease;
  }
  .viewer-layout.is-panel-collapsed .anatomy-panel {
    height: 0;
    padding: 0;
    border-color: transparent;
    opacity: 0;
  }
  .panel-collapse-toggle,
  .is-panel-collapsed .panel-collapse-toggle {
    z-index: 7;
    top: calc(var(--mobile-view-strip-top) + 6px);
    right: 20px;
    bottom: auto;
    left: auto;
    width: 38px;
    height: 32px;
    border-radius: 5px;
    transform: none;
  }
  .panel-collapse-toggle svg {
    transform: rotate(-90deg);
  }
  .is-panel-collapsed .panel-collapse-toggle svg {
    transform: rotate(90deg);
  }
  .is-panel-collapsed .panel-collapse-toggle {
    top: 16px;
    right: auto;
    left: 50%;
    border-radius: 5px;
    transform: translateX(-50%);
  }
  .viewpoint-panel {
    overflow: hidden;
  }
  .viewpoint-toolbar {
    min-height: 36px;
    padding: 0 56px 0 15px;
    background: transparent;
    border-bottom: 0;
  }
  .viewpoint-toolbar > div {
    min-width: 0;
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
  }
  .viewpoint-toolbar strong {
    font-size: 15px;
    line-height: 1.2;
  }
  .viewpoint-mobile-hint {
    display: block;
    color: #8da69f;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.2;
    white-space: nowrap;
  }
  .viewpoint-toolbar > .viewpoint-save {
    display: none;
  }
  .view-dialog-form input[type='text'] {
    font-size: 16px;
  }
  .viewpoint-list {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    gap: 6px;
    padding: 0 12px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-color: #52756d transparent;
    scrollbar-width: thin;
    touch-action: pan-x;
  }
  .viewpoint-list::-webkit-scrollbar {
    height: 4px;
  }
  .viewpoint-list::-webkit-scrollbar-thumb {
    background: #52756d;
    border-radius: 4px;
  }
  .viewpoint-item {
    position: relative;
    width: fit-content;
    min-width: 80px;
    max-width: 144px;
    height: 44px;
    min-height: 44px;
    flex: 0 0 auto;
    margin: 0;
    overflow: hidden;
    border-color: #213d38;
    border-radius: 5px;
    touch-action: pan-x;
    user-select: none;
    -webkit-user-select: none;
  }
  .viewpoint-item::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: transparent;
    content: '';
  }
  .viewpoint-item.is-active,
  .viewpoint-item.is-highlighted {
    background: #102824;
    border-color: #64a799;
    box-shadow: none;
  }
  .viewpoint-item.is-active::before,
  .viewpoint-item.is-highlighted::before {
    background: #82c7b8;
  }
  .viewpoint-item-summary {
    position: relative;
    display: grid;
    width: auto;
    height: 100%;
    min-height: 0;
    grid-template-columns: max-content max-content;
    gap: 5px;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
  }
  .viewpoint-index {
    display: block;
    padding: 0;
    color: #5b9f90;
    font-size: 11px;
  }
  .viewpoint-copy {
    position: static;
    display: block;
    min-width: 0;
  }
  .viewpoint-name-row {
    display: block;
  }
  .viewpoint-name-row strong {
    display: block;
    width: max-content;
    max-width: 8em;
    overflow: hidden;
    color: #dce9e6;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .viewpoint-icon-button,
  .viewpoint-active-actions,
  .viewpoint-inline-editor {
    display: none;
  }
  .new-view-button,
  .mobile-update-view-button {
    top: var(--mobile-view-actions-top);
    width: auto;
    min-width: 116px;
    height: 40px;
    justify-content: center;
    padding: 0 14px;
    font-size: 13px;
    transition:
      top 180ms ease,
      background 150ms ease;
  }
  .new-view-button {
    left: 10px;
  }
  .mobile-update-view-button {
    position: absolute;
    z-index: 4;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: #f4e8d6;
    cursor: pointer;
    background: rgba(27, 58, 53, 0.94);
    border: 1px solid #5a8f83;
    border-radius: 6px;
    font-weight: 600;
  }
  .mobile-update-view-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
  }
  .mobile-update-view-button span {
    width: 7px;
    height: 7px;
    background: #74d8b8;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(116, 216, 184, 0.65);
  }
  .viewer-layout.is-panel-collapsed .new-view-button,
  .viewer-layout.is-panel-collapsed .mobile-update-view-button {
    top: 16px;
  }
  .mobile-view-action-backdrop {
    display: grid;
    place-items: center;
    padding: 20px;
  }
  .mobile-view-action-dialog {
    width: min(100%, 300px);
    max-height: calc(100dvh - 40px);
    padding: 20px;
    border: 1px solid #315d54;
    border-radius: 7px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  }
  .mobile-view-action-heading {
    margin-bottom: 18px;
  }
  .mobile-view-action-heading h2 {
    margin: 0;
    color: #eff6f4;
    font-size: 18px;
  }
  .mobile-view-action-list {
    display: grid;
    gap: 8px;
  }
  .mobile-view-action-list button {
    min-height: 48px;
    padding: 0 14px;
    color: #e7efed;
    cursor: pointer;
    background: #132b27;
    border: 1px solid #294b44;
    border-radius: 5px;
    font-size: 14px;
    text-align: left;
  }
  .mobile-view-action-list button.is-danger {
    color: #e28d7c;
  }
  .mobile-view-action-form {
    display: grid;
    gap: 14px;
  }
  .mobile-view-action-form .mobile-view-action-heading {
    margin-bottom: 0;
  }
  .mobile-view-action-form .view-dialog-name-input input {
    width: 100%;
    height: 44px;
    padding: 0 54px 0 11px;
    color: #eff6f4;
    background: #0a1d1a;
    border: 1px solid #568378;
    border-radius: 5px;
    font-size: 16px;
    outline: none;
  }
}

@media (max-width: 380px) {
  .topbar {
    grid-template-columns: 88px minmax(0, 1fr) 60px;
    gap: 5px;
    padding-right: max(10px, env(safe-area-inset-right));
    padding-left: max(10px, env(safe-area-inset-left));
  }
  .brand-logo {
    width: 88px;
  }
  .patient-summary {
    gap: 5px;
    font-size: 9px;
  }
  .patient-summary strong {
    font-size: 11px;
  }
  .mobile-topbar-save {
    width: 60px;
  }
}
