:root {
  --page: #ffffff;
  --surface: #ffffff;
  --ink: #202a25;
  --muted: #637168;
  --green: #255c46;
  --line: #e3e9e5;
  --soft: #eef4f0;
}
* { box-sizing: border-box; }
* { scrollbar-width: thin; scrollbar-color: #7a8f80 #f4f7f5; }
html, dialog { scrollbar-gutter: stable; }
@supports selector(::-webkit-scrollbar) {
  @media (forced-colors: none) {
    * { scrollbar-width: auto; scrollbar-color: auto; }
    ::-webkit-scrollbar { width: 10px; height: 10px; }
    ::-webkit-scrollbar-track,
    ::-webkit-scrollbar-corner { background: #f4f7f5; border-radius: 999px; }
    ::-webkit-scrollbar-thumb { background: #7a8f80; border: 2px solid #f4f7f5; border-radius: 999px; min-height: 32px; }
    ::-webkit-scrollbar-thumb:hover { background: #536f5d; }
    ::-webkit-scrollbar-button { display: none; }
  }
}
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--page); font: 14px/1.6 'Noto Sans SC', 'Microsoft YaHei', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, select { font: inherit; }
button, summary { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: #255c4618; }
button { transition: transform 130ms cubic-bezier(.23,1,.32,1), background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease; }
button:enabled:active:not(:focus-visible) { transform: scale(.98); }
button:disabled { cursor: not-allowed; }
:is(button, a, select, summary):focus-visible { outline: 3px solid #2f7858; outline-offset: 4px; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: absolute; top: 8px; left: 8px; padding: 12px 18px; background: var(--surface); z-index: 5; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.site-header { max-width: 1120px; width: calc(100% - 64px); margin: 0 auto; height: 96px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 11px; min-height: 44px; font-size: 21px; font-weight: 700; letter-spacing: -.5px; }
.brand-mark { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: var(--green); color: white; }
.brand-mark svg { width: 23px; height: 23px; }
.preview-label { font-size: 12px; color: var(--muted); background: #edf1ef; border: 1px solid #e0e7e2; border-radius: 6px; padding: 4px 9px; }
.landing { width: min(760px, calc(100% - 44px)); margin: 40px auto 0; }
.intro { text-align: center; margin-bottom: 30px; }
h1 { margin: 0 0 12px; font-size: 38px; line-height: 1.4; letter-spacing: -1.3px; font-weight: 680; text-wrap: balance; }
.lead { color: var(--muted); font-size: 15px; margin: 0; line-height: 1.8; }
.upload-zone { border: 1px solid #dce5de; border-radius: 20px; background: var(--surface); padding: 12px; box-shadow: 0 6px 20px #233c2904; }
.upload-inner { border: 1px dashed #cbd8cf; border-radius: 12px; min-height: 350px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; }
.upload-art { width: 244px; height: 129px; overflow: visible; stroke: none; flex-shrink: 0; margin-bottom: 8px; }
.upload-zone h2 { font-size: 20px; font-weight: 600; margin: 0 0 7px; letter-spacing: -.35px; }
.upload-caption { margin: 0 0 23px; font-size: 14px; color: var(--muted); }
.primary { border: 1px solid #1d503c; color: #fff; background: var(--green); display: inline-flex; align-items: center; justify-content: center; min-height: 48px; gap: 9px; border-radius: 9px; padding: 0 23px; font-weight: 600; font-size: 14px; white-space: nowrap; box-shadow: inset 0 1px 0 #ffffff24, 0 2px 3px #173e291a; }
.primary svg { width: 18px; height: 18px; }
.upload-zone .primary { min-width: 180px; min-height: 48px; font-size: 15px; }
.primary:disabled { background: #e8edea; color: #68766d; border-color: #e0e6e2; box-shadow: none; }
.primary[aria-busy=true] { background: #eaf2ed; color: var(--green); border-color: #cbded2; }
:where(.change-file,.resume-button,.history-actions button,#viewer-close,.viewer-toolbar button) { display: inline-flex; align-items: center; justify-content: center; gap: 8px; line-height: 1.4; font-weight: 550; }
:where(.change-file,.resume-button,.history-actions button,#viewer-close,.viewer-toolbar button) svg { width: 17px; height: 17px; pointer-events: none; }
@media (prefers-reduced-motion:no-preference) {
  .action-spinner { animation: action-spin .85s linear infinite; }
}
@keyframes action-spin { to { transform: rotate(360deg); } }
.upload-bottom { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 48px; padding: 11px 11px 0; color: var(--muted); font-size: 12px; }
.upload-bottom > span { display: inline-flex; gap: 6px; align-items: center; }
.upload-bottom svg { width: 15px; height: 15px; color: #6a8372; }
.upload-zone.dragging { background: #f0f7f2; border-color: #528364; }
.upload-zone.dragging .upload-inner { background: #f0f7f2; border-color: var(--green); }
.scope-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; column-gap: 16px; row-gap: 0; padding: 9px 1px 0; }
.scope-row > p { font-size: 12px; color: var(--muted); margin: 13px 0; line-height: 1.7; }
details summary { min-height: 44px; display: flex; align-items: center; gap: 7px; list-style: none; font-size: 12px; color: var(--muted); }
details summary::-webkit-details-marker { display: none; }
details summary svg { width: 14px; height: 14px; }
.format-details { text-align: right; }
.format-details[open] { flex: 1; }
.format-details[open] summary { justify-content: flex-end; }
.format-details[open] #format-list { text-align: left; margin-top: 7px; padding: 19px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.scope-row:has(.format-details[open]) { flex-wrap: wrap; }
.scope-row:has(.format-details[open]) .format-details { flex: 1 1 100%; }
.format-row { font-size: 12px; color: var(--muted); margin-bottom: 14px; overflow-wrap: anywhere; }
.format-row:last-child { margin-bottom: 0; }
.format-row strong { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.demo-tools { margin: 17px auto 0; text-align: center; }
.demo-tools > summary { justify-content: center; font-size: 13px; gap: 8px; }
.demo-list { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; padding: 9px 0; }
.demo-list button { background: white; border: 1px solid #dbe5dd; color: #4d6656; min-height: 44px; padding: 6px 13px; font-size: 12px; border-radius: 7px; }
.site-footer { text-align: center; color: #69766e; font-size: 12px; padding: 0 22px 25px; margin-top: 37px; }
.site-footer > span { display: inline-flex; align-items: center; gap: 12px; color: #59685f; }
.site-footer i { width: 3px; height: 3px; border-radius: 50%; background: #9aaba0; }
.site-footer p { margin: 8px 0 0; font-size: 11px; }
.error { color: #a12c2c; border: 1px solid #f0caca; background: #fff3f3; font-size: 13px; padding: 13px 16px; border-radius: 9px; }
dialog { border: 1px solid #d8e1db; border-radius: 18px; background: white; color: var(--ink); padding: 0; width: min(1080px, calc(100% - 72px)); max-width: none; max-height: calc(100dvh - 64px); overflow: auto; overscroll-behavior: contain; scroll-padding: 90px 0; box-shadow: 0 25px 90px #0b25162e; }
dialog::backdrop { background: #13221966; }
.dialog-header { display: flex; gap: 13px; align-items: center; padding: 19px 25px; border-bottom: 1px solid var(--line); background: white; position: sticky; top: 0; z-index: 2; }
.file-mark { width: 42px; height: 47px; display: flex; align-items: center; justify-content: center; color: #577863; background: #edf4ef; border: 1px solid #dce9e0; border-radius: 8px; flex-shrink: 0; }
.file-mark svg { width: 23px; height: 23px; }
.dialog-file { flex: 1; min-width: 0; }
.dialog-file h2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 16px; font-weight: 600; margin: 0 0 3px; overflow-wrap: anywhere; }
.dialog-file p { font-size: 12px; color: var(--muted); margin: 0; font-variant-numeric: tabular-nums; }
.category-name { color: #426650; background: #eef5f0; border-radius: 6px; padding: 4px 9px; font-size: 11px; }
.icon-button { border: 1px solid #e0e8e3; width: 44px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: #f5f8f6; color: #526b5c; flex-shrink: 0; }
.icon-button svg { width: 19px; height: 19px; }
.dialog-error { margin: 14px 23px 0; }
.dialog-body { display: flex; flex-direction: column; }
.settings { display: flex; align-items: center; gap: 17px; padding: 15px 25px; border-bottom: 1px solid var(--line); background: white; }
.target-control { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.settings label { font-size: 13px; color: #536359; white-space: nowrap; }
.settings select { min-width: 117px; min-height: 44px; padding: 8px 31px 8px 13px; border: 1px solid #c8d7cd; border-radius: 7px; color: #254e35; background: white; font-weight: 550; font-size: 13px; }
.small-note { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.8; }
.settings .small-note { flex: 1; font-size: 12px; }
.change-file { background: white; border: 1px solid #ccd9d1; border-radius: 8px; display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 13px; font-size: 12px; color: #456451; white-space: nowrap; box-shadow: 0 1px 2px #203e2b08; }
.change-file svg { width: 16px; height: 16px; }
.workspace { background: white; padding: 22px 25px 15px; min-width: 0; }
.comparison { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, auto); gap: 20px; align-items: stretch; }
.preview-panel { display: grid; grid-template-rows: subgrid; grid-row: span 4; row-gap: 0; margin: 0; background: white; border: 1px solid #dfe7e1; border-radius: 11px; overflow: hidden; min-width: 0; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; min-height: 57px; position: relative; padding: 8px 58px 8px 17px; border-bottom: 1px solid #e9eeeb; }
.panel-heading h3 { margin: 0; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 13px; line-height: 1.5; font-weight: 550; }
.format-tag { font-size: 10px; line-height: 1.6; background: #f0f3f1; color: #5c6b62; border-radius: 4px; padding: 2px 6px; overflow-wrap: anywhere; max-width: 100%; font-weight: 500; }
.panel-heading .icon-button { position: absolute; top: 6px; right: 5px; }
.panel-heading .icon-button svg { width: 16px; height: 16px; }
.visual { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 2; min-width: 0; overflow: hidden; background: #f4f5f4; }
.visual > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.visual > img.zoomable { cursor: zoom-in; }
.visual > video { display: block; width: 100%; height: 100%; object-fit: contain; background: #202a25; }
.empty-result { flex-direction: column; gap: 15px; color: #66776b; font-size: 13px; text-align: center; background: #fafbfa; padding: 18px; }
.empty-result svg { width: 34px; height: 34px; color: #8ca293; }
#converter-dialog.processing .result-placeholder .empty-result svg { color: var(--green); }
#converter-dialog:has(#dialog-error-slot #error:not([hidden])) #status-title { color: #a12c2c; }
.file-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 15px 17px; font-variant-numeric: tabular-nums; border-top: 1px solid #e9eeeb; }
.file-meta strong { font-size: 13px; font-weight: 600; }
.file-meta span { font-size: 11px; color: var(--muted); }
.sample-chip { margin: 0 12px 12px; padding: 9px 11px; color: #2c6744; background: #edf6ef; border: 1px solid #dcecdf; font-size: 12px; border-radius: 6px; }
.preview-message { font-size: 11px; color: var(--muted); margin: 13px 1px 0; }
.generic-source { min-height: 245px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; padding: 20px; background: #fafbfa; color: #577660; text-align: center; overflow-wrap: anywhere; }
.generic-source > svg { width: 40px; height: 40px; }
.generic-source > strong { font-size: 23px; font-weight: 550; }
.generic-source > span { color: var(--muted); font-size: 12px; }
.text-preview { white-space: pre-wrap; overflow-wrap: anywhere; min-height: 245px; max-height: 300px; overflow: auto; margin: 0; padding: 20px; background: #fafbfa; color: #384e3f; font: 12px/1.9 Consolas, 'Microsoft YaHei', monospace; }
.media-source { min-height: 245px; padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #fafbfa; }
.media-source audio { width: 100%; height: 42px; }
.media-source > svg { width: 35px; height: 35px; color: #63836d; margin-bottom: 18px; }
.media-source p { font-size: 12px; color: var(--muted); }
.demo-wave { display: flex; align-items: center; justify-content: space-between; gap: 4px; width: 100%; height: 90px; margin: 8px 0 12px; }
.demo-wave i { width: 5px; height: var(--h); border-radius: 4px; background: #7da48a; }
.sample-table { border-collapse: collapse; width: 100%; font-size: 12px; }
.sample-table :is(td,th) { padding: 10px; border: 1px solid #d6e1d9; text-align: left; font-weight: 400; }
.sample-table th { color: #476951; background: #e2ede5; }
.document-sample { background: #f4f5f4; padding: 24px 43px; }
.sample-paper { background: white; padding: 21px; min-height: 205px; border: 1px solid #e0e6e1; }
.sample-paper h4 { font-size: 17px; margin: 0 0 13px; font-weight: 650; }
.sample-paper p { margin: 12px 0 0; font-size: 10px; color: var(--muted); line-height: 1.9; }
.sample-paper img { display: block; width: 100%; height: 100px; object-fit: cover; }
.font-sample { min-height: 245px; background: #fafbfa; color: #31573e; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; padding: 20px; font-size: 39px; font-weight: 600; }
.font-sample small { font-size: 12px; color: var(--muted); font-weight: 400; }
.dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 25px; border-top: 1px solid var(--line); background: white; position: sticky; bottom: 0; z-index: 2; }
.dialog-footer > span { font-size: 12px; color: #5d7264; }
.dialog-footer .primary { min-height: 44px; font-size: 13px; gap: 11px; }
.viewer { width: min(1160px, calc(100% - 48px)); }
.viewer-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 19px; border-bottom: 1px solid var(--line); }
.viewer-header h2 { font-size: 16px; margin: 0; font-weight: 600; }
.viewer-content { display: flex; align-items: center; justify-content: center; min-height: 200px; max-height: 66dvh; padding: 16px; background: #f4f5f4; }
.viewer-content img { display: block; max-width: 100%; max-height: calc(66dvh - 32px); height: auto; object-fit: contain; }
.viewer > .small-note { padding: 12px 20px; font-size: 11px; }
@media (hover:hover) and (pointer:fine) {
  .primary:enabled:hover { background: #1c4d39; border-color: #1c4d39; }
  .icon-button:hover { background: #eef4f0; color: #285d3d; }
  .change-file:hover, .demo-list button:hover { background: #edf4ef; border-color: #a9c5b1; color: #285d3d; }
  details summary:hover { color: #255c46; }
}
@media (max-width:760px) {
  .site-header { height: 79px; width: calc(100% - 40px); }
  .brand { font-size: 20px; gap: 9px; }
  .brand-mark { width: 31px; height: 31px; border-radius: 9px; }
  .preview-label { font-size: 11px; }
  .landing { width: calc(100% - 36px); margin-top: 38px; }
  .intro { margin-bottom: 25px; }
  h1 { font-size: 29px; letter-spacing: -.9px; line-height: 1.5; margin-bottom: 11px; }
  .lead { font-size: 13px; max-width: 285px; margin: auto; line-height: 1.9; text-wrap: balance; }
  .upload-zone { padding: 10px; border-radius: 16px; }
  .upload-inner { min-height: 339px; border-radius: 9px; padding: 22px 15px; }
  .upload-art { width: 227px; height: 120px; margin-bottom: 12px; }
  .upload-zone h2 { font-size: 19px; }
  .upload-caption { font-size: 12px; margin-bottom: 23px; }
  .upload-zone .primary { width: 190px; min-height: 48px; font-size: 15px; }
  .upload-bottom { padding: 10px 5px 0; gap: 8px; min-height: 46px; font-size: 11px; }
  .upload-bottom svg { width: 13px; height: 13px; }
  .upload-bottom > span { gap: 4px; }
  .scope-row { gap: 10px; padding-top: 6px; }
  .scope-row > p { font-size: 11px; margin: 15px 0; }
  .format-details summary { font-size: 11px; gap: 4px; }
  .format-details summary svg { width: 12px; height: 12px; }
  .demo-tools { margin-top: 12px; }
  .demo-tools > summary { font-size: 12px; }
  .site-footer { margin-top: 30px; font-size: 11px; padding-bottom: max(22px, env(safe-area-inset-bottom)); }
  .site-footer p { font-size: 11px; }
  dialog { width: calc(100% - 20px); max-height: calc(100dvh - 24px); border-radius: 14px; scroll-padding: 85px 0; }
  .dialog-header { padding: 13px; gap: 9px; }
  .file-mark { width: 34px; height: 39px; border-radius: 6px; }
  .file-mark svg { width: 21px; }
  .dialog-file h2 { font-size: 13px; }
  .dialog-file p { font-size: 11px; }
  .category-name { display: none; }
  .dialog-header .icon-button { margin-right: -6px; }
  .settings { padding: 12px 14px; flex-wrap: wrap; gap: 8px 12px; }
  .target-control { flex: 1; justify-content: flex-start; gap: 10px; }
  .settings label { font-size: 12px; }
  .settings select { min-width: 104px; font-size: 12px; }
  .settings .small-note { order: 3; flex-basis: 100%; font-size: 12px; }
  .change-file { font-size: 11px; padding: 0 9px; gap: 4px; }
  .change-file svg { width: 14px; }
  .workspace { padding: 13px 10px; }
  .comparison { gap: 9px; }
  .preview-panel { border-radius: 8px; }
  .panel-heading { padding: 8px 38px 8px 9px; min-height: 55px; }
  .panel-heading h3 { font-size: 12px; gap: 4px; }
  .format-tag { font-size: 9px; padding: 1px 4px; }
  .panel-heading .icon-button { right: 0; top: 5px; }
  .panel-heading .icon-button svg { width: 14px; }
  .visual { aspect-ratio: 1 / 1; }
  .empty-result { font-size: 11px; gap: 11px; padding: 12px; }
  .empty-result svg { width: 27px; height: 27px; }
  .file-meta { padding: 11px 9px; flex-direction: column; align-items: flex-start; gap: 5px; }
  .file-meta strong { font-size: 12px; }
  .file-meta span { font-size: 12px; }
  .sample-chip { font-size: 11px; margin: 0 7px 8px; padding: 7px; }
  .preview-message { font-size: 11px; margin-top: 11px; }
  .generic-source { min-height: 185px; padding: 15px; gap: 13px; }
  .generic-source > strong { font-size: 19px; }
  .generic-source > svg { width: 32px; height: 32px; }
  .generic-source > span { font-size: 10px; }
  .text-preview { min-height: 185px; max-height: 240px; padding: 13px; font-size: 10px; }
  .preview-panel.media-wide { grid-column: 1 / -1; }
  .media-wide .visual { aspect-ratio: 16 / 9; }
  .media-source { min-height: 185px; padding: 19px; }
  .media-source p { font-size: 11px; }
  .document-sample { padding: 13px 10px; }
  .sample-paper { min-height: 185px; padding: 12px; }
  .sample-paper h4 { font-size: 13px; }
  .sample-paper img { height: 73px; }
  .sample-paper p { font-size: 9px; }
  .sample-table :is(td,th) { padding: 6px; font-size: 10px; }
  .font-sample { min-height: 185px; font-size: 25px; padding: 14px; }
  .font-sample small { font-size: 10px; text-align: center; }
  .dialog-footer { padding: 12px 14px; gap: 10px; }
  .dialog-footer > span { font-size: 11px; max-width: 148px; }
  .dialog-footer .primary { font-size: 12px; gap: 8px; padding: 0 14px; }
  .viewer { width: calc(100% - 20px); }
  .viewer-header { padding: 10px 14px; }
}
@media (max-width:360px) {
  h1 { font-size: 26px; }
  .landing { margin-top: 29px; }
  .upload-bottom { flex-direction: column; justify-content: center; gap: 4px; padding-top: 11px; min-height: 57px; }
  .settings { gap: 6px; }
  .settings select { min-width: 91px; }
  .settings label { font-size: 11px; }
  .target-control { gap: 6px; }
  .change-file { padding: 0 7px; font-size: 10px; }
  .panel-heading { padding-right: 35px; padding-left: 8px; min-height: 62px; }
  .panel-heading h3 { flex-direction: column; align-items: flex-start; gap: 3px; }
  .panel-heading .icon-button { right: -2px; top: 9px; }
  .dialog-footer { align-items: stretch; flex-direction: column; gap: 8px; }
  .dialog-footer > span { text-align: center; max-width: none; }
}
@media (prefers-reduced-motion:reduce) {
  button { transition: none; }
  button:enabled:active:not(:focus-visible) { transform: none; }
}

.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0; }
.scope-row > span { margin:13px 0;font-size:12px;color:var(--muted); }
.upload-bottom > span { min-width:0; }
.upload-bottom > span:first-child { max-width:460px; }
.upload-bottom > span:last-child { flex-shrink:0; }
.resume-button { display:flex;width:fit-content;min-height:44px;padding:6px 16px;border:1px solid #cddfd3;background:#eef5f0;color:var(--green);border-radius:8px;margin:15px auto 0;font:inherit;font-size:13px;font-weight:550; }
fieldset.settings { margin:0;min-width:0;border-width:0 0 1px; }
.settings:disabled { opacity:.65; }
.preview-trigger { display:block;width:100%;aspect-ratio:3 / 2;border:0;border-radius:0;padding:0;cursor:zoom-in;overflow:hidden;background:#fff conic-gradient(#e9eeeb 25%,transparent 0 50%,#e9eeeb 0 75%,transparent 0) 0 0/16px 16px; }
.preview-trigger img { display:block;width:100%;height:100%;object-fit:contain; }
.preview-trigger:focus-visible { outline-offset:-4px; }
#preview-comparison:has(#image-preview:not([hidden])) .source-placeholder,
#preview-comparison:has(#result-preview:not([hidden])) .result-placeholder { display:none; }
.preview-metadata { display:flex;flex-direction:column;gap:4px;font-size:13px;line-height:1.8;overflow-wrap:anywhere;font-variant-numeric:tabular-nums; }
.preview-metadata strong { color:var(--ink);font-weight:600; }
.preview-metadata .metadata-divider { display:none; }
.preview-metadata > span:not(.metadata-divider) { font-size:12px; }
#size-change:empty { display:none; }
.privacy-note { font-size:11px;line-height:1.8;color:var(--muted);margin:9px 1px 0; }
.task-status { min-width:0; }
.task-status p { margin:0; }
#status-title { font-size:13px;font-weight:600;color:#365e44; }
#status-detail { font-size:11px;line-height:1.7;color:var(--muted);margin-top:3px; }
.footer-actions { margin-left:auto;display:flex;flex-shrink:0;gap:10px; }
.footer-actions:has(#download-button:not([hidden])) #convert-button { background:white;border-color:#cddbd2;color:#456451;box-shadow:0 1px 2px #203e2b08; }
body.viewer-open { overflow:hidden; }
#image-viewer { width:min(1120px,calc(100% - 32px));padding:20px; }
.viewer-header { padding:0 0 12px;border-bottom:1px solid var(--line); }
.viewer-header h2 { min-width:0;overflow-wrap:anywhere; }
#viewer-close { border:1px solid #d4e0d7;min-height:44px;padding:0 13px;background:#f5f8f6;color:#456451;border-radius:8px;flex-shrink:0; }
.viewer-toolbar { display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:15px; }
.viewer-switch { display:inline-flex;align-items:center;gap:3px;padding:3px;background:#eef3f0;border:1px solid #dce6df;border-radius:11px; }
.viewer-toolbar button { border:1px solid transparent;background:transparent;color:#596c61;border-radius:7px;min-height:44px;padding:0 14px; }
.viewer-toolbar button[aria-pressed=true] { background:white;border-color:#d6e2da;color:var(--green);box-shadow:0 1px 3px #21433112; }
.viewer-toolbar button:disabled { opacity:.5; }
.viewer-zoom-control { display:flex;align-items:center;gap:8px;margin-left:auto; }
.viewer-toolbar label { font-size:13px;color:var(--muted); }
.viewer-toolbar select { min-height:44px;padding:8px;background:white;color:var(--ink);border:1px solid #c8d7cd;border-radius:7px; }
#viewer-info { font-size:12px;line-height:1.7;min-height:21px;margin:12px 0 6px;overflow-wrap:anywhere; }
.viewer-help { font-size:11px;line-height:1.7;color:var(--muted);margin:0 0 10px; }
.viewer-stage { display:flex;height:min(62dvh,720px);overflow:auto;overscroll-behavior:contain;border:1px solid var(--line);border-radius:8px;background:#fff conic-gradient(#e9eeeb 25%,transparent 0 50%,#e9eeeb 0 75%,transparent 0) 0 0/16px 16px; }
#viewer-image { display:block;flex:none;margin:auto;max-width:100%;max-height:100%;object-fit:contain;visibility:hidden;user-select:none; }
.viewer-stage.pixel-size #viewer-image { max-width:none;max-height:none; }
.viewer-stage.can-pan { cursor:grab; }
.viewer-stage.panning,.viewer-stage.panning #viewer-image { cursor:grabbing;user-select:none; }
.viewer-stage:focus-visible { outline:3px solid #2f7858;outline-offset:2px; }
.conversion-history { margin-top:32px;border-top:1px solid var(--line);padding-top:24px; }
.history-heading h2 { margin:0;font-size:17px;font-weight:600; }
#history-count { margin-left:6px;font-size:12px;font-weight:400;color:var(--muted); }
.history-heading p { margin:6px 0 17px;font-size:12px;color:var(--muted); }
.history-list { list-style:none;margin:0;padding:0; }
.history-item { display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 20px;padding:18px 0;border-top:1px solid #edf1ee; }
.history-name { display:block;overflow-wrap:anywhere;font-size:14px;font-weight:550; }
.history-info,.history-detail { margin:5px 0 0;font-size:12px;color:var(--muted);overflow-wrap:anywhere;font-variant-numeric:tabular-nums; }
.history-state { display:inline-block;margin-right:10px;color:var(--green);font-weight:550; }
.history-item[data-state=failed] .history-state,.history-download-error { color:#a12c2c; }
.history-item[data-state=expired] .history-state,.history-item[data-state=unavailable] .history-state { color:var(--muted); }
.history-actions { display:flex;align-items:center;gap:8px; }
.history-actions button { min-height:44px;padding:0 13px;border:1px solid #d4e0d7;border-radius:8px;background:white;color:#456451;font:inherit;font-size:12px;font-weight:550;white-space:nowrap;box-shadow:0 1px 2px #203e2b08; }
.history-actions .history-download { color:var(--green);background:#eaf3ed;border-color:#ccdfd2; }
.history-actions button:disabled { opacity:.5; }
@media (hover:hover) and (pointer:fine) {
  .history-actions button:enabled:hover { background:#edf4ef;border-color:#a9c5b1; }
}
@media (max-width:760px) {
  .history-item { grid-template-columns:minmax(0,1fr);gap:12px;padding:16px 0; }
  .history-actions { justify-content:flex-end; }
  .history-heading h2 { font-size:16px; }
}
@media (hover:hover) and (pointer:fine) {
  .resume-button:hover,.viewer-toolbar button:not(:disabled):hover,#viewer-close:hover { background:#e5efe8;color:#234f35;border-color:#a9c5b1; }
  .footer-actions:has(#download-button:not([hidden])) #convert-button:enabled:hover { background:#edf4ef;border-color:#a9c5b1; }
  .viewer-toolbar button[aria-pressed=true]:hover { background:white; }
  .preview-trigger:hover { box-shadow:inset 0 0 0 2px #6c9b7e; }
}
@media (max-width:760px) {
  .scope-row > span { font-size:11px;margin-top:15px; }
  .upload-bottom > span:first-child { max-width:190px; }
  .upload-bottom > span:last-child { max-width:125px;white-space:normal; }
  .preview-trigger { aspect-ratio:1 / 1; }
  .preview-metadata { font-size:12px; }
  .file-meta { min-height:75px;justify-content:center; }
  .privacy-note { font-size:11px; }
  .dialog-footer { flex-wrap:wrap; }
  .footer-actions { gap:8px; }
  .task-status:not([hidden]) { flex:1 1 100%; }
  .task-status:not([hidden]) + .footer-actions { width:100%;margin:3px 0 0;justify-content:flex-end; }
  #image-viewer { padding:13px; }
  .viewer-toolbar { gap:8px; }
  .viewer-toolbar button { padding:0 12px; }
  .viewer-switch { width:100%; }
  .viewer-switch button { flex:1; }
  .viewer-zoom-control { width:100%;justify-content:space-between;margin-left:0; }
  .viewer-toolbar select { max-width:135px; }
  .viewer-stage { height:52dvh; }
}
@media (max-width:360px) {
  .upload-bottom > span:first-child { max-width:none; }
  .upload-bottom > span:last-child { max-width:none; }
  .footer-actions { justify-content:stretch;width:100%; }
  .footer-actions .primary { flex:1; }
}
