:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #303030;
  --muted: #666666;
  --soft: #f1f1f1;
  --soft-2: #f7f7f7;
  --line: #d7d7d7;
  --line-dark: #3a3a3a;
  --red: #ed2f27;
  --blue: #0072bc;
  --yellow: #f4c400;
  --ok: #16784f;
  --error: #c43a34;
  --warning: #7a4c00;
  --warning-bg: #fff4cf;
  --upload-control-height: 78px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(32deg, transparent 0 55%, rgba(48, 48, 48, 0.055) 55.2%, transparent 55.6%),
    linear-gradient(154deg, transparent 0 62%, rgba(48, 48, 48, 0.05) 62.2%, transparent 62.6%),
    linear-gradient(17deg, transparent 0 74%, rgba(48, 48, 48, 0.04) 74.2%, transparent 74.7%),
    repeating-linear-gradient(27deg, transparent 0 46px, rgba(48, 48, 48, 0.028) 47px, transparent 49px);
  content: "";
  pointer-events: none;
}

.app-shell {
  min-height: 100vh;
  padding: 42px 0 54px;
}

.workspace {
  width: min(1230px, calc(100% - 136px));
  margin: 0 auto;
}

.intro {
  margin-bottom: 28px;
}

.title-block {
  min-width: 0;
}

.eyebrow,
h1,
h2,
h3,
p {
  margin-top: 0;
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
}

h1 {
  display: grid;
  gap: 2px;
  margin-bottom: 0;
  font-family: Impact, "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 3.15rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.98;
  text-transform: uppercase;
}

h1 span {
  color: var(--ink);
}

h1 strong {
  color: var(--red);
  font: inherit;
}

h2 {
  margin-bottom: 22px;
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: 0;
}

.work-area {
  margin-top: 22px;
  padding: 31px 0 34px;
  background: var(--soft);
  box-shadow: 0 0 0 100vmax var(--soft);
  clip-path: inset(0 -100vmax);
}

.tool-panel,
.result-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper);
}

.tool-panel {
  padding: 24px 30px;
}

.result-panel {
  padding: 27px 30px;
}

.converter {
  display: block;
}

.upload-line {
  display: grid;
  grid-template-columns: max-content minmax(260px, 1fr) max-content;
  gap: 18px;
  align-items: start;
}

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

.file-field {
  position: relative;
}

.field-label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.direction-icon {
  display: inline-flex;
  width: fit-content;
  min-height: var(--upload-control-height);
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border: 2px solid var(--red);
  border-radius: 0;
  background: var(--paper);
}

.direction-logo {
  display: block;
  width: 86px;
  height: 58px;
  object-fit: contain;
}

.direction-swap-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 2px solid var(--red);
  background: var(--paper);
  color: var(--red);
  cursor: pointer;
  font: inherit;
}

.direction-swap-button:hover {
  background: var(--red);
  color: var(--paper);
}

.direction-swap-button span {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.direction-swap-button:focus-visible,
.file-input:focus-visible + .file-upload-zone,
.primary-button:focus-visible,
.download-button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.file-upload-zone {
  display: flex;
  width: 100%;
  height: var(--upload-control-height);
  min-height: var(--upload-control-height);
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}

.file-upload-zone:hover {
  border-color: var(--red);
}

.file-upload-action {
  display: inline-grid;
  min-height: 34px;
  padding: 0 12px;
  place-items: center;
  border: 2px solid var(--red);
  color: var(--red);
  font-weight: 800;
  white-space: nowrap;
}

.file-upload-name {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 20px;
}

.upload-progress[hidden] {
  display: none;
}

.upload-progress-bar {
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 0;
  accent-color: var(--red);
}

.upload-progress-bar::-webkit-progress-bar {
  background: var(--line);
}

.upload-progress-bar::-webkit-progress-value {
  background: var(--red);
}

.upload-progress-bar::-moz-progress-bar {
  background: var(--red);
}

.upload-progress-label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.form-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  min-width: 340px;
  padding-top: calc(0.9rem * 1.45 + 10px);
}

.primary-button {
  display: inline-grid;
  height: var(--upload-control-height);
  min-height: var(--upload-control-height);
  flex: 1 1 180px;
  width: auto;
  min-width: 0;
  padding: 0 20px;
  place-items: center;
  border: 2px solid var(--red);
  border-radius: 0;
  background: var(--paper);
  color: var(--red);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.primary-button:hover {
  background: var(--red);
  color: var(--paper);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.loading-label {
  display: none;
}

.muted {
  color: var(--muted);
}

.result-ready {
  border-color: var(--red);
}

.result-error {
  border-color: var(--error);
}

.result-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.result-list div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.result-list div:last-child {
  border-bottom: 0;
}

.result-list dt {
  color: var(--muted);
  font-size: 0.9rem;
}

.result-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.result-note {
  margin: 20px 0 0;
  padding: 12px 14px;
  border: 1px solid #e5c576;
  border-radius: 0;
  background: var(--warning-bg);
  color: var(--warning);
}

#download-action {
  display: inline-flex;
  flex: 0 0 150px;
  min-width: 0;
}

.download-button {
  display: inline-grid;
  height: var(--upload-control-height);
  min-height: var(--upload-control-height);
  min-width: 150px;
  padding: 0 20px;
  place-items: center;
  border: 2px solid var(--red);
  border-radius: 0;
  background: var(--red);
  color: var(--paper);
  font-weight: 800;
  text-decoration: none;
}

#download-action .download-button {
  width: 100%;
}

.download-button:hover {
  background: var(--paper);
  color: var(--red);
}

.download-disabled {
  border-color: var(--line);
  background: var(--soft-2);
  color: var(--muted);
  cursor: not-allowed;
  pointer-events: none;
}

.download-disabled:hover {
  background: var(--soft-2);
  color: var(--muted);
}

.warning-list {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #e5c576;
  border-radius: 0;
  background: var(--warning-bg);
  color: var(--warning);
}

.warning-list h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  letter-spacing: 0;
}

.warning-list ul {
  margin: 0;
  padding-left: 18px;
}

.conversion-log {
  margin-top: 24px;
}

.conversion-log h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.conversion-log-list {
  display: grid;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-bottom: 0;
  list-style: none;
}

.conversion-log-item {
  display: grid;
  grid-template-columns: 92px minmax(170px, 0.35fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.conversion-log-level {
  display: inline-grid;
  min-height: 28px;
  padding: 0 8px;
  place-items: center;
  border: 1px solid currentColor;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.log-ok .conversion-log-level {
  color: var(--ok);
}

.log-warning .conversion-log-level {
  color: var(--warning);
}

.log-error .conversion-log-level {
  color: var(--error);
}

.conversion-log-title {
  font-weight: 800;
}

.conversion-log-detail {
  min-width: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.output-tabs {
  margin-top: 24px;
}

.tab-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tab-list {
  display: flex;
  align-items: end;
  gap: 0;
}

.tab-button {
  display: inline-grid;
  min-height: 44px;
  min-width: 170px;
  place-items: center;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: var(--soft-2);
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
  text-transform: uppercase;
}

.tab-button + .tab-button {
  margin-left: -1px;
}

#output-tab-viewer:focus-visible ~ .tab-list .tab-button[for="output-tab-viewer"],
#output-tab-status:focus-visible ~ .tab-list .tab-button[for="output-tab-status"] {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

#output-tab-viewer:checked ~ .tab-list .tab-button[for="output-tab-viewer"],
#output-tab-status:checked ~ .tab-list .tab-button[for="output-tab-status"] {
  border-color: var(--red);
  background: var(--paper);
  color: var(--red);
}

.tab-panels {
  border: 1px solid var(--line);
  background: var(--paper);
}

.tab-panel {
  display: none;
}

#output-tab-viewer:checked ~ .tab-panels .viewer-tab,
#output-tab-status:checked ~ .tab-panels .status-tab {
  display: block;
}

.status-tab .result-panel {
  min-height: 260px;
  border: 0;
}

.viewer-section {
  margin-top: 0;
}

.viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
  margin-bottom: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.viewer-header h2 {
  margin: 0;
}

.viewer-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  width: 100%;
  gap: 8px 14px;
}

.viewer-model-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
}

.viewer-format-button {
  display: inline-grid;
  width: 58px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
}

.viewer-format-button:hover:not(:disabled),
.viewer-format-button.is-active {
  border-color: var(--red);
}

.viewer-format-button.is-active {
  box-shadow: inset 0 0 0 1px var(--red);
}

.viewer-format-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.viewer-format-button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.viewer-format-icon {
  display: block;
  width: 42px;
  height: 26px;
  object-fit: contain;
}

.viewer-zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.viewer-zoom-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--red);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.94);
  color: var(--red);
  font: 700 1.18rem/1 var(--font-ui);
  cursor: pointer;
  user-select: none;
}

.viewer-zoom-button:hover {
  background: var(--red);
  color: #fff;
}

.viewer-zoom-button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.viewer-zoom-button:active {
  transform: translateY(1px);
}

.viewer-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.viewer-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-size: 0.88rem;
  cursor: pointer;
  user-select: none;
}

.viewer-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--red);
}

.viewer-toggle input:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.viewer-counters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.viewer-counters span {
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.92);
}

.viewer-counters span {
  padding: 6px 10px;
}

.viewer-stage {
  position: relative;
  width: 100%;
  height: 520px;
  overflow: hidden;
  border-top: 0;
  border-bottom: 0;
  background: #f8f9f9;
  touch-action: none;
}

.viewer-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.viewer-axes-canvas {
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: 140px;
  height: 140px;
  pointer-events: none;
}

@media (max-width: 1120px) {
  .workspace {
    width: min(100% - 36px, 760px);
  }

  .upload-line {
    grid-template-columns: 1fr;
  }

  .form-actions {
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding-top: 24px;
  }

  .workspace {
    width: calc(100% - 28px);
  }

  .eyebrow {
    font-size: 1.05rem;
  }

  h1 {
    font-size: 2.05rem;
  }

  .work-area {
    padding: 22px 0;
  }

  .tool-panel,
  .result-panel {
    padding: 21px 18px;
  }

  .direction-icon {
    min-height: 92px;
  }

  .direction-logo {
    max-width: 112px;
    height: 66px;
  }

  .form-actions {
    flex-direction: column;
    min-width: 0;
  }

  .form-actions,
  .primary-button,
  .download-button,
  #download-action {
    width: 100%;
  }

  .primary-button,
  #download-action {
    flex: 0 0 auto;
  }

  .viewer-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .viewer-toolbar {
    justify-content: flex-start;
  }

  .viewer-stage {
    height: 380px;
  }

  .tab-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .tab-button {
    min-width: 0;
    font-size: 0.86rem;
  }

  .result-list div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .conversion-log-item {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .conversion-log-level {
    width: fit-content;
  }
}

/* Full-height converter workspace. */
:root {
  --sidebar-width: 390px;
  --sidebar-rail-width: 54px;
}

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

.app-shell {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  padding: 0;
}

.application-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
  transition: grid-template-columns 180ms ease;
}

.application-layout.sidebar-is-collapsed {
  grid-template-columns: var(--sidebar-rail-width) minmax(0, 1fr);
}

.converter-sidebar {
  position: relative;
  z-index: 12;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
}

.sidebar-content {
  width: var(--sidebar-width);
  height: 100%;
  padding: 30px 28px 36px;
  overflow-x: hidden;
  overflow-y: auto;
  transition: opacity 120ms ease, visibility 120ms ease;
}

.sidebar-toggle {
  position: absolute;
  top: 16px;
  right: 10px;
  z-index: 2;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--red);
  border-radius: 0;
  background: var(--paper);
  color: var(--red);
  cursor: pointer;
  font: 700 1.55rem/1 Arial, Helvetica, sans-serif;
}

.sidebar-toggle:hover {
  background: var(--red);
  color: var(--paper);
}

.sidebar-toggle:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.sidebar-is-collapsed .sidebar-content {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.sidebar-is-collapsed .sidebar-toggle {
  right: 10px;
}

.converter-sidebar .intro {
  margin: 0 46px 28px 0;
}

.converter-sidebar .eyebrow {
  margin-bottom: 7px;
  font-size: 0.82rem;
  line-height: 1.15;
}

.converter-sidebar h1 {
  gap: 4px;
  font-size: 2rem;
  line-height: 0.98;
}

.converter-sidebar .tool-panel {
  padding: 0;
  border: 0;
  background: transparent;
}

.converter-sidebar .upload-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}

.converter-sidebar .form-row {
  min-width: 0;
}

.converter-sidebar .direction-icon {
  display: flex;
  width: 100%;
  min-height: 76px;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
}

.converter-sidebar .direction-logo {
  width: 98px;
  height: 56px;
}

.converter-sidebar .direction-swap-button {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
}

.converter-sidebar .file-upload-zone {
  height: 76px;
  min-height: 76px;
  padding: 10px;
}

.converter-sidebar .file-upload-action {
  flex: 0 0 auto;
  padding: 0 10px;
}

.converter-sidebar .form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  gap: 10px;
  padding-top: 0;
}

.converter-sidebar .primary-button,
.converter-sidebar .download-button {
  width: 100%;
  height: 58px;
  min-height: 58px;
  min-width: 0;
  padding: 0 12px;
}

.converter-sidebar #download-action {
  display: block;
  min-width: 0;
  width: 100%;
  flex: none;
}

.work-area {
  min-width: 0;
  min-height: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--soft);
  box-shadow: none;
  clip-path: none;
}

.output-tabs {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
}

.tab-list {
  position: relative;
  z-index: 3;
  min-height: 48px;
  padding-left: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 247, 247, 0.96);
}

.tab-button {
  min-width: 166px;
  min-height: 48px;
  border-top: 0;
}

.tab-panels {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 0;
}

.tab-panel,
.viewer-section,
.viewer-stage {
  width: 100%;
  height: 100%;
  min-height: 0;
}

#output-tab-viewer:checked ~ .tab-panels .viewer-tab,
#output-tab-status:checked ~ .tab-panels .status-tab {
  display: block;
}

.status-tab {
  overflow: auto;
  padding: 28px;
  background: var(--soft);
}

.status-tab .result-panel {
  width: min(980px, 100%);
  min-height: 0;
  margin: 0 auto;
  border: 1px solid var(--line);
}

.viewer-section {
  position: relative;
  overflow: hidden;
}

.viewer-header {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 8;
  display: block;
  width: 190px;
  max-height: calc(100% - 28px);
  min-height: 0;
  margin: 0;
  padding: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(48, 48, 48, 0.1);
}

.viewer-toolbar {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: flex-start;
  width: 100%;
  gap: 12px;
}

.viewer-model-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  gap: 8px;
  margin: 0;
}

.viewer-format-button {
  width: 100%;
}

.viewer-zoom-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  gap: 8px;
}

.viewer-zoom-button {
  width: 100%;
  height: 36px;
}

.viewer-stage-zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 9;
  grid-template-columns: 42px 42px;
  width: auto;
  gap: 8px;
}

.viewer-stage-zoom .viewer-zoom-button {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.96);
}

.viewer-options,
.viewer-counters {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  flex-wrap: nowrap;
  width: 100%;
  gap: 7px;
}

.viewer-toggle {
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  background: var(--paper);
}

.viewer-counters span {
  width: 100%;
  padding: 6px 8px;
  background: var(--soft-2);
}

.viewer-counter-button {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--soft-2);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.viewer-counter-button:hover:not(:disabled) {
  border-color: var(--red);
  color: var(--red);
}

.viewer-counter-button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.viewer-counter-button:disabled {
  cursor: default;
}

.viewer-data-dialog {
  position: absolute;
  inset: 24px;
  z-index: 20;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  border: 1px solid var(--line-dark);
  background: var(--paper);
  box-shadow: 0 0 0 100vmax rgba(48, 48, 48, 0.22), 0 14px 34px rgba(48, 48, 48, 0.16);
}

.viewer-data-dialog[hidden] {
  display: none;
}

.viewer-data-dialog-header {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 12px 10px 18px;
  border-bottom: 1px solid var(--line);
}

.viewer-data-dialog-header h2 {
  margin: 0;
  font-size: 1.05rem;
  text-transform: uppercase;
}

.viewer-data-dialog-close {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--red);
  border-radius: 0;
  background: var(--red);
  color: var(--paper);
  cursor: pointer;
  font: 400 1.55rem/1 Arial, Helvetica, sans-serif;
}

.viewer-data-dialog-close:hover {
  background: var(--paper);
  color: var(--red);
}

.viewer-data-dialog-close:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.viewer-data-dialog-body {
  min-width: 0;
  min-height: 0;
  flex: 1;
  overflow: auto;
}

.viewer-data-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.viewer-data-table th,
.viewer-data-table td {
  padding: 9px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.viewer-data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--soft);
  color: var(--ink);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.viewer-data-table th:first-child,
.viewer-data-table td:first-child {
  width: 64px;
  text-align: center;
}

.viewer-data-table th:nth-child(2) {
  width: 30%;
}

.viewer-data-table tbody tr:hover {
  background: #fff8f7;
}

.viewer-data-empty {
  margin: 0;
  padding: 24px;
  color: var(--muted);
}

.viewer-stage {
  overflow: hidden;
  border: 0;
}

@media (max-width: 820px) {
  .application-layout,
  .application-layout.sidebar-is-collapsed {
    grid-template-columns: minmax(0, 1fr);
  }

  .converter-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(var(--sidebar-width), calc(100vw - 46px));
    box-shadow: 10px 0 30px rgba(48, 48, 48, 0.13);
    transition: transform 180ms ease;
  }

  .application-layout.sidebar-is-collapsed .converter-sidebar {
    transform: translateX(calc(-100% + var(--sidebar-rail-width)));
  }

  .sidebar-content {
    width: min(var(--sidebar-width), calc(100vw - 46px));
  }

  .work-area {
    grid-column: 1;
  }

  .viewer-header {
    top: 10px;
    right: 10px;
    width: 178px;
    max-height: calc(100% - 20px);
  }

  .viewer-stage-zoom {
    right: 10px;
    bottom: 10px;
  }

  .viewer-data-dialog {
    inset: 10px;
  }
}

@media (max-width: 520px) {
  :root {
    --sidebar-width: 340px;
  }

  .sidebar-content {
    padding: 22px 20px 28px;
  }

  .converter-sidebar .intro {
    margin-right: 42px;
  }

  .converter-sidebar h1 {
    font-size: 1.72rem;
  }

  .converter-sidebar .direction-logo {
    width: 82px;
    height: 50px;
  }

  .converter-sidebar .form-actions {
    grid-template-columns: 1fr;
  }

  .tab-button {
    min-width: 0;
  }

  .status-tab {
    padding: 14px;
  }

  .viewer-header {
    width: 164px;
    padding: 9px;
  }
}
