dialog.tr-dialog.wide {
  width: min(94rem, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  max-height: 94dvh;
  overflow: hidden;
}
dialog.tr-dialog[open] {
  display: flex;
  flex-direction: column;
}
.tr-dialog .dialog-header {
  flex: 0 0 auto;
}
.tr-dialog .dialog-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
}
.tr-shell {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.tr-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(21rem, 0.9fr);
  grid-template-rows: minmax(0, 1fr);
  height: min(73dvh, 51rem);
  min-height: 0;
}
.tr-editor {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(1rem, 2vw, 1.65rem);
}
.tr-columns > [data-ref-slot] {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid #cad5d7;
  background: #eaf0f1;
}
.tr-reference {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  height: 100%;
  padding: 1rem;
  min-width: 0;
  overflow-y: auto;
}
.tr-head,
.tr-navigation,
.tr-bottom,
.tr-zoom,
.tr-switch,
.tr-head h3 {
  display: flex;
  align-items: center;
}
.tr-head,
.tr-bottom {
  justify-content: space-between;
  gap: 0.5rem;
}
.tr-head h3 {
  margin: 0;
  gap: 0.45rem;
  color: #163849;
  text-transform: uppercase;
  font-size: 1rem;
}
.tr-head > [data-reference='unit'],
.tr-identity,
.tr-zoom output {
  color: #304f5c;
  font-size: 0.875rem;
}
.tr-identity {
  font-weight: 650;
  overflow-wrap: anywhere;
}
.tr-document select,
.tr-navigation select {
  width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
}
.tr-navigation {
  gap: 0.4rem;
  min-width: 0;
}
.tr-navigation select,
.tr-jump input,
.tr-icon {
  border: 1px solid #9bb0b7;
  border-radius: 3px;
  background: #fff;
  color: #153c4f;
}
.tr-navigation select,
.tr-jump input {
  min-height: 2.6rem;
  padding: 0.4rem 0.6rem;
}
.tr-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  min-width: 2.65rem;
  padding: 0;
  font-size: 1.2rem;
  line-height: 1;
}
.tr-icon:disabled {
  cursor: default;
  color: #54666d;
  background: #edf1f1;
  opacity: 0.65;
}
.tr-icon:enabled:hover {
  color: #005973;
  background: #e7f6f9;
}
.tr-reference :focus-visible,
.tr-switch button:focus-visible {
  outline: 3px solid #0089a7;
  outline-offset: 2px;
}
.tr-jump {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.5rem;
}
.tr-jump input {
  width: 7ch;
}
.tr-stage {
  position: relative;
  isolation: isolate;
  flex: 1 1 16rem;
  min-height: min(11rem, 27dvh);
  min-width: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border: 1px solid #acbec3;
  border-radius: 3px;
  background: #d7dfe0;
  touch-action: pan-x pan-y pinch-zoom;
}
.tr-message {
  padding: 1rem;
  line-height: 1.55;
  font-size: 0.95rem;
  color: #294b58;
}
.tr-retry {
  margin: 0 1rem 1rem;
}
.tr-paper {
  position: relative;
  background: #fff;
  min-width: 100%;
  line-height: 0;
}
.tr-paper[data-zoom='1'] {
  width: 150%;
}
.tr-paper[data-zoom='2'] {
  width: 200%;
}
.tr-paper[data-zoom='3'] {
  width: 300%;
}
.tr-paper[data-zoom='4'] {
  width: 400%;
}
.tr-paper canvas {
  display: block;
  width: 100%;
  height: auto;
}
.tr-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.tr-overlay .bm-overlay {
  pointer-events: none;
}
.tr-zoom {
  gap: 0.35rem;
}
.tr-zoom output {
  text-align: center;
  min-width: 3.6rem;
  font-variant-numeric: tabular-nums;
}
.tr-bottom {
  flex-wrap: wrap;
}
.tr-bottom > .btn {
  min-height: 2.6rem;
}
.tr-shell [hidden],
.tr-switch {
  display: none !important;
}
.tr-editor .form-footer {
  flex-wrap: wrap;
}
@media (max-width: 850px) {
  dialog.tr-dialog.wide {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
  .tr-dialog .dialog-body,
  .tr-shell,
  .tr-columns {
    flex: 1;
  }
  .tr-columns {
    display: flex;
    flex-direction: column;
    height: auto;
  }
  .tr-columns > [data-ref-slot],
  .tr-editor {
    flex: 1;
    border: 0;
    min-height: 0;
  }
  .tr-switch {
    display: flex !important;
    gap: 0.25rem;
    padding: 0.45rem max(0.75rem, env(safe-area-inset-left));
    border-bottom: 1px solid #c5d2d5;
    background: #f1f3ef;
  }
  .tr-switch button {
    flex: 1;
    border: 1px solid transparent;
    border-radius: 3px;
    background: transparent;
    color: #274c5b;
    min-height: 2.75rem;
    font-weight: 700;
    text-transform: uppercase;
  }
  .tr-switch button[aria-pressed='true'] {
    color: #fff;
    background: #123d50;
  }
  .tr-shell[data-pane='takeoff'] [data-ref-slot],
  .tr-shell[data-pane='drawing'] .tr-editor {
    display: none;
  }
  .tr-editor,
  .tr-reference {
    padding: 0.85rem max(0.85rem, env(safe-area-inset-right)) max(0.85rem, env(safe-area-inset-bottom))
      max(0.85rem, env(safe-area-inset-left));
  }
  .tr-icon,
  .tr-bottom > .btn {
    min-height: 2.75rem;
  }
  .tr-icon {
    min-width: 2.75rem;
  }
}
