dialog.export-workspace[open] {
  width: min(1280px, calc(100vw - 32px));
  max-width: none;
  height: min(880px, calc(100dvh - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  gap: 0;
  overflow: hidden;
  border-radius: 16px;
}
.export-workspace button,
.export-workspace input {
  min-height: 44px;
}
.export-workspace button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.export-workspace button svg {
  width: 22px;
  height: 22px;
  flex: none;
}
.export-workspace button[aria-pressed="true"] {
  background: #e8edf9;
  color: #344681;
  border-color: #9da9cc;
}
.export-workspace .export-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border, #dbe2e8);
  flex: none;
}
.export-header button {
  width: 44px;
  padding: 8px;
  background: transparent;
  border: 0;
}
.export-body {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}
.export-pages {
  overflow: auto;
  padding: 12px;
  background: #f3f6f8;
  border-right: 1px solid var(--border, #dbe2e8);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.export-page {
  min-width: 0;
  flex: none;
}
.export-page > button {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 6px;
  padding: 8px;
  background: white;
}
.export-page > button[aria-current="page"] {
  border-color: var(--accent, #5f6fb2);
  box-shadow: 0 0 0 1px var(--accent, #5f6fb2);
}
.export-page > button span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.3;
  max-width: 100%;
}
.export-page canvas {
  width: 72px;
  height: 96px;
  object-fit: contain;
}
.export-page-moves {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}
.export-page-moves button {
  flex: 1;
  padding: 8px;
}
.export-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  padding: 12px;
  gap: 8px;
  overflow: auto;
}
.export-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  flex: none;
}
.export-tools > button {
  padding: 8px;
  min-width: 44px;
}

.export-tool-hint {
  font-size: 13px;
  color: var(--muted, #667583);
  margin: 0;
  flex: none;
}
.export-viewport {
  min-height: 150px;
  flex: 1;
  overflow: auto;
  background: #e6ebef;
  border-radius: 8px;
  display: flex;
  align-items: safe center;
  justify-content: safe center;
  padding: 16px;
}
.export-surface {
  position: relative;
  flex: none;
  line-height: 0;
  box-shadow: 0 2px 12px #17243220;
}
.export-workspace .editor-canvas {
  display: block;
  max-width: none;
  max-height: none;
  margin: 0;
  touch-action: none;
  cursor: crosshair;
  border: 0;
  border-radius: 0;
}
.export-selection {
  position: absolute;
  pointer-events: none;
  background: #000;
  border: 1px solid white;
  box-sizing: border-box;
}
.export-selection.crop {
  background: #5f6fb233;
  border: 2px dashed #354c99;
}
.export-selection[hidden] {
  display: none;
}
.export-utility {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: none;
}
.export-utility button {
  padding: 8px;
  min-width: 44px;
}
.export-utility output {
  font-size: 13px;
  min-width: 40px;
  color: var(--muted, #667583);
}

.export-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid var(--border, #dbe2e8);
  flex: none;
}
.export-footer > span {
  font-size: 12px;
  color: var(--muted, #667583);
}
.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
@media (max-width: 700px) {
  dialog.export-workspace[open] {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
  .export-workspace .export-header {
    padding: 8px 12px;
  }
  .export-body {
    display: flex;
    flex-direction: column;
  }
  .export-pages {
    flex-direction: row;
    flex: none;
    max-height: 115px;
    border-right: 0;
    border-bottom: 1px solid var(--border, #dbe2e8);
    padding: 8px;
    gap: 8px;
  }
  .export-page {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .export-page > button {
    width: 78px;
    padding: 4px;
  }
  .export-page canvas {
    width: 30px;
    height: 40px;
  }
  .export-page > button span {
    font-size: 11px;
    -webkit-line-clamp: 1;
  }
  .export-page-moves {
    flex-direction: column;
    gap: 0;
    margin: 0;
  }
  .export-page-moves button {
    min-height: 44px;
    min-width: 44px;
    padding: 4px;
  }
  .export-main {
    padding: 8px;
    flex: 1;
    gap: 4px;
  }
  .export-tools {
    gap: 12px;
  }

  .export-viewport {
    padding: 8px;
    min-height: 100px;
  }
  .export-footer {
    padding: 8px 12px;
    gap: 4px;
  }
  .export-actions {
    width: 100%;
  }
  .export-actions button {
    flex: 1;
    font-size: 12px;
    padding: 8px;
  }
  .export-footer > span {
    font-size: 11px;
  }
  .export-utility {
    gap: 4px;
  }
  .export-utility button {
    font-size: 12px;
  }
}
@media (max-height: 550px) and (min-width: 600px) {
  .export-workspace .export-header {
    padding: 4px 12px;
  }
  .export-footer {
    padding: 6px 12px;
  }
  .export-tool-hint {
    display: none;
  }
  .export-main {
    gap: 2px;
    padding: 6px;
  }
  .export-body {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
  }
  .export-pages {
    flex-direction: column;
    max-height: none;
  }
  .export-page > button {
    width: 100%;
  }
}
.export-workspace .export-header {
  flex-wrap: nowrap;
  min-height: 60px;
}
.export-header h2 {
  min-width: 0;
}
.export-header .office-dialog-actions {
  flex: none;
}

.export-more {
  position: relative;
  flex: none;
}
.export-more summary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 9px;
}
.export-more summary::-webkit-details-marker {
  display: none;
}
.export-more > button {
  position: absolute;
  bottom: 52px;
  right: 0;
  min-width: 210px;
  background: white;
  box-shadow: 0 4px 20px #17243222;
  z-index: 4;
}

.export-color-menu {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(320px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  box-sizing: border-box;
  padding: 16px;
  border: 1px solid var(--border, #dbe2e8);
  border-radius: 12px;
  background: white;
  color: var(--ink, #172432);
  box-shadow: 0 8px 32px #17243233;
}
.export-color-menu:popover-open {
  display: grid;
  gap: 12px;
}
.export-color-field {
  display: grid;
  gap: 4px;
  font-size: 14px;
  margin: 0;
}
.export-color-field input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0;
}
.export-workspace .editor-canvas:focus-visible {
  outline: 3px solid #5f6fb2;
  outline-offset: 3px;
}
.export-footer {
  justify-content: flex-end;
}
