/* Media workspace: clear hierarchy, compact controls, quiet supporting information. */
:root{--ink:var(--text-primary);--muted:var(--text-secondary);--line:var(--border-default);--dark:var(--text-primary);--green:var(--brand-accent);--radius:20px;background:var(--bg-page);color:var(--ink);--site-width:1200px;--site-gutter:32px;--surface:var(--bg-surface);--surface-subtle:var(--bg-subtle);--surface-tint:var(--bg-page);--border-soft:var(--border-default);--brand-forest:var(--brand-primary);--brand-forest-hover:var(--brand-primary-hover);--shadow-hover:var(--shadow-card);--ease:cubic-bezier(.2,.7,.2,1);color-scheme:light;--font-sans:'Geist', system-ui, -apple-system, sans-serif;--font-mono:'Geist Mono', ui-monospace, monospace;--bg-page:#FAFAFA;--bg-surface:#FFFFFF;--bg-subtle:#F4F4F5;--bg-muted:#EFEFF1;--bg-inverse:#18181B;--fg-inverse:#FAFAFA;--border-default:#E4E4E7;--border-strong:#D4D4D8;--text-primary:#09090B;--text-secondary:#52525B;--text-muted:#71717A;--brand-primary:#115E59;--brand-primary-hover:#0F766E;--brand-primary-fg:#FAFAFA;--brand-accent:#14B8A6;--brand-tint:#F0FDFA;--brand-tint-fg:#115E59;--brand-tint-border:#99F6E4;--danger:#B91C1C;--danger-tint:#FEF2F2;--danger-border:#FECACA;--warning:#B45309;--warning-tint:#FFFBEB;--warning-border:#FDE68A;--info:#1D4ED8;--info-tint:#EFF6FF;--info-border:#BFDBFE;--radius-sm:6px;--radius-md:8px;--radius-lg:12px;--shadow-card:0 1px 2px rgba(9, 9, 11, 0.04);--shadow-pop:0 1px 2px rgba(9, 9, 11, 0.05), 0 6px 16px rgba(9, 9, 11, 0.06);--focus-ring:0 0 0 3px color-mix(in srgb, var(--brand-accent) 28%, transparent);--canvas-dot:rgba(9, 9, 11, 0.07)}
.topbar {
  background:color-mix(in srgb, var(--bg-surface) 96%, transparent);
}
.intro .eyebrow {
  font-size:10px;
  letter-spacing:1.6px;
  color:var(--text-muted)
}
.intro-path {
  display:flex;
  align-items:center;
  gap:14px;
  color:var(--text-muted);
  font-size:12px;
  white-space:nowrap
}
.intro-path span {
  display:flex;
  align-items:center;
  gap:8px
}
.intro-path b {
  font-size:10px;
  font-weight:500;
  color:var(--text-muted);
  border:1px solid var(--border-default);
  border-radius:50%;
  width:25px;
  height:25px;
  display:grid;
  place-items:center
}
.intro-path i {
  font-style:normal;
  color:var(--text-muted)
}
.files-section {
  padding:25px 26px 22px
}
.action-section {
  padding:25px 26px 0;
  border-top: 1px solid var(--border-default);
}
.section-heading h2 {
  font-size:17px;
}
.step {
  width:25px;
  height:25px;
  font-size:12px;
  border-radius:var(--radius-md);
  margin-right:10px;
  background:var(--bg-page);
  border-color:var(--border-default)
}
.section-heading>.muted {
  font-size:11px
}
.upload-icon {
  width:43px;
  height:43px;
  border-radius:var(--radius-lg);
  color:var(--brand-tint-fg);
  font-size:26px
}
.drop-copy strong {
  font-size:14px
}
.drop-copy>span {
  font-size:11px;
  line-height:1.65;
  color:var(--text-muted)
}
.choose-button {
  border-radius:var(--radius-md);
  padding:10px 14px;
  font-size:12px;
  background:var(--bg-muted);
  border-color:var(--border-default);
  color:var(--text-secondary);
  transition: background-color .15s var(--ease), transform .1s var(--ease);
}
.selection-summary {
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0
}
.selection-summary progress {
  width:66px;
  height:4px;
  margin:0;
  opacity:.7
}
.file-toolbar .text-button {
  font-size:12px
}
.text-button {
  font-size:12px;
  color:var(--text-secondary)
}
#file-list .file-row {
  border:1px solid var(--border-default);
  border-radius:var(--radius-lg);
  background:var(--bg-subtle);
  box-shadow:none;
  transition:border-color .15s,box-shadow .15s;
  overflow:hidden
}
#file-list .file-row:hover,#file-list .file-row:focus-within {
  border-color:var(--border-strong);
  box-shadow:var(--shadow-card)
}
#file-list .file-preview {
  display:grid;
  place-items:center;

  width:100%;

  background:var(--bg-page);
  border:0;
  border-radius:0;
  font-size:19px;
  color:var(--text-muted)
}
#file-list button.file-preview {
  cursor:zoom-in
}
#file-list .file-copy {
  padding:10px 11px 11px;
  background:var(--bg-surface);
  border-top:1px solid var(--border-default)
}
#file-list .file-name {
  font-size:12px;
  line-height:1.5
}
#file-list .file-row:hover .file-controls,#file-list .file-row:focus-within .file-controls {
  opacity:1
}
#file-order-hint {
  font-size:11px;
  line-height:1.65;
  margin:12px 0 0
}
.tabs {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  margin-bottom:21px
}
.mode-icon {
  font-size:21px;
  line-height:1;
  flex-shrink:0
}
.mode-copy b {
  font-size:12px;
  font-weight: 500
}
.mode-copy small {
  font-weight:400;
  line-height:1.35
}
.tab.selected small {
  color:var(--text-muted)
}
.tab:hover:not(:disabled) {
  background:color-mix(in srgb, var(--bg-surface) 70%, transparent)
}
.action-gate {

  line-height:1.7;
}
.ai-heading p {
  font-size:12px;
  line-height:1.65
}
.ai-heading .text-button {
  font-size:11px
}
.ai-context {
  border:1px solid var(--border-default);
  background:var(--bg-subtle);
  border-radius:var(--radius-md);
  padding:11px 14px;
  margin:12px 0;
  color:var(--text-secondary);
  font-size:12px
}
.ai-context summary {
  cursor:pointer;
  font-size:11px
}
.ai-context-files {
  display:flex;
  flex-wrap:wrap;
  list-style:none;
  padding:0;
  gap:7px;
  margin:12px 0
}
.ai-context-files li {
  background:var(--bg-surface);
  border:1px solid var(--border-default);
  border-radius:var(--radius-sm);
  padding:5px 8px;
  overflow-wrap:anywhere;
  font-size:11px
}
.ai-context p {
  font-size:11px;
  line-height:1.7;
  margin:10px 0 0
}
.ai-message {
  font-size:13px;
  line-height:1.8;
  padding:16px 18px;
  border:1px solid var(--border-default);
  background:var(--bg-subtle);
  border-radius:var(--radius-lg)
}
.ai-message.user {
  margin-left:45px;
  border:0;
  background:var(--bg-page);
  border-bottom-right-radius:var(--radius-sm)
}
.ai-message.assistant {
  margin-right:25px;
  border-bottom-left-radius:var(--radius-sm)
}
.ai-message strong {
  font-size:9px;
  letter-spacing:1px;
  margin-bottom:7px;
  color:var(--text-muted)
}
.ai-message.error {
  background:var(--bg-subtle);
  border-color:var(--border-default)
}
.chat-follow {
  display:block;
  border:1px solid var(--border-default);
  border-radius:var(--radius-lg);
  padding:8px 15px;
  font-size:11px;
  background:var(--bg-page);
  color:var(--text-secondary);
  box-shadow:var(--shadow-card)
}
.thinking {
  font-size:12px;
  padding:12px 0 16px;
  gap:10px;
  color:var(--text-muted)
}
.prompt-examples {
  margin:14px 0 3px
}
.prompt-examples>summary {
  font-size:11px;
  color:var(--text-muted);
  cursor:pointer;
  padding:4px 0;
  width:fit-content
}
.prompt-examples>summary span {
  font-size:10px;
  color:var(--text-muted);
  margin-left:8px
}
.prompt-examples .suggestions {
  margin:12px 0 0;
  gap:7px
}
.suggestions button,.quick-actions button {
  border-color:var(--border-default);
}
.primary {
  font-size:13px;
  padding:13px 20px;
  min-height:46px;
}
.primary:hover {
  background:var(--brand-primary);
  border-color:var(--brand-primary)
}
.secondary {
  font-size:12px;
  min-height:40px;
  color:var(--text-secondary);
  border-color:var(--border-default)
}
.submit-row>div>span {
  font-size:11px;
  line-height:1.7
}
.field-label,.parameters label {
  font-size:13px
}
.operation-hint,.parameters small {
  font-size:11px;
  line-height:1.7
}
.parameters {
  gap:18px
}
input:not([type=file]):not([type=checkbox]):not([type=radio]),select {
  border-radius:var(--radius-md);
  font-size:13px;
  min-height:45px
}
.quick-actions {
  margin-bottom:18px
}
.results-heading .eyebrow {
  letter-spacing:1.7px;
}
.results-heading h2 {
  font-size:22px;
  letter-spacing:-.7px;
  margin-top:7px;
  font-weight: 500
}
.result-filters {
  gap:3px;
  padding-bottom:13px
}
.result-filters button {
  font-size:11px;
  border-radius:var(--radius-md);
  padding:8px 10px
}
.result-filters button[aria-pressed=true] {
  background:var(--bg-muted);
  color:var(--text-secondary)
}
.panel-bulk-actions .secondary {
  font-size:11px;
  min-height:39px;
  padding:9px 10px
}
.panel-bulk-actions #download-all {
  background:var(--bg-page);
  border-color:var(--border-default);
  color:var(--brand-tint-fg)
}
.results-panel #results-summary {
  margin:15px 0 10px
}
.jobs {
  gap:12px;
  margin-top:10px
}
.job {
  border-radius:var(--radius-lg);
  padding:16px;
  border-color:var(--border-default);
  box-shadow:var(--shadow-card)
}
.job.processing {
  border-color:var(--border-default);
  animation:pulse-job 2.4s infinite;
}
.job.completed {
  border-color:var(--border-default)
}
.job.failed {
  border-color:var(--border-default)
}
.job-title {
  background:none;
  border:0;
  padding:0;
  font-size:13px;
  color:var(--text-primary);
  text-align:left;
  line-height:1.5;
  font-weight: 500;
  overflow-wrap:anywhere;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden
}
.job-title:hover {
  text-decoration:underline;
  text-underline-offset:3px
}
.job-status.completed:before {
  content:'✓';
  display:inline-grid;
  place-items:center;
  width:16px;
  height:16px;
  border-radius:50%;
  font-size:10px;
  background:var(--brand-tint);
  color:var(--brand-tint-fg)
}
.pipeline-summary-copy strong {
  font-size:11px
}
.pipeline-summary-copy small {
  font-size:10px
}
.pipeline-toggle {
  font-size:10px
}
.download {
  border:1px solid var(--border-default);
  background:var(--bg-muted);
  color:var(--brand-tint-fg);
  border-radius:var(--radius-md);
  min-height:40px;
  font-size:12px
}
.download:hover {
  background:var(--brand-tint)
}
.job-dismiss {
  min-width:33px;
  border:1px solid var(--border-default);
  background:var(--bg-surface);
  border-radius:var(--radius-md);
  font-size:11px;
  color:var(--text-muted);
  padding:7px
}
.all-results-link {
  font-size:12px;
  color:var(--brand-tint-fg);
  font-weight:500
}
.empty {
  padding:32px 12px
}
.empty strong {
  font-size:14px
}
.empty p {
  font-size:12px;
  line-height:1.7
}
.empty-symbol {
  background:var(--bg-page);
  color:var(--brand-accent);
  border-color:var(--border-default)
}
.results-intro {
  padding:32px 0 28px
}
.results-intro p {
  font-size:14px;
  color:var(--text-muted)
}
.results-metrics button {
  border-radius:var(--radius-lg);
  padding:20px 22px
}
.results-metrics button>span {
  font-size:12px
}
.results-metrics small {
  font-size:11px
}
.library-row {
  padding-top:17px;
  padding-bottom:17px
}
.library-file-copy strong {
  font-size:13px
}
.library-file-copy small {
  font-size:11px
}
.library-tabs button {
  font-size:13px
}
.library-controls select,.library-search input {
  font-size:12px
}
.file-preview-dialog {
  max-width:780px;
  padding:28px;
  border-radius:var(--radius-lg)
}
.file-preview-dialog h2 {
  font-size:21px;
  line-height:1.5;
  overflow-wrap:anywhere;
  padding-right:25px;
  margin:12px 0 5px
}
.file-preview-dialog img {
  display:block;
  max-width:100%;
  width:100%;
  height:min(52vh,480px);
  object-fit:contain;
  background:var(--bg-page);
  border:1px solid var(--border-default);
  border-radius:var(--radius-lg);
  margin:18px 0
}
.preview-footer {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:15px
}
.file-preview-dialog .primary {
  min-width:100px
}
.toast {
  border-radius:var(--radius-lg);
  padding:11px 14px 11px 16px;
  background:var(--bg-surface);
  border:1px solid var(--border-strong);
  color:var(--text-primary);
  box-shadow:var(--shadow-pop);
  font-size:13px;
  font-weight:500
}
@media(min-width:1600px){.shell{max-width:1480px}.workspace-grid{grid-template-columns:minmax(0,1fr) 380px}}
@media(max-width:1150px){.intro-path{display:none}.workspace-grid{grid-template-columns:minmax(0,1fr) 330px;gap:20px}.shell{padding:0 24px}.files-section,.action-section{padding-left:22px;padding-right:22px}.mode-icon{display:none}.tab{padding:11px 9px}.results-panel{padding:22px 17px}.result-filters button{padding:8px}.choose-button{display:none}}
@media(max-width:850px){.workspace-grid{grid-template-columns:minmax(0,1fr)}.results-panel{position:static}.intro{padding-top:27px}.header-actions{gap:10px}.mode-icon{display:block}}
@media(max-width:550px) {
  .brand {
    font-size:24px
  }
  .topbar nav {
    margin-left:auto
  }
  .topbar nav a:first-child {
    display:none
  }
  .header-actions {
    gap:7px
  }
  .connection {
    font-size:0;
    gap:0
  }
  .header-actions .icon-button {
    min-width:28px;
    min-height:30px;
    width:28px;
    font-size:14px
  }
  .counter {
    font-size:9px;
    min-width:17px;
    min-height:18px
  }
  .shell {
    padding:0 14px
  }
  .intro .eyebrow {
    font-size:9px
  }
  .intro p {
    max-width:320px;
  }
  .files-section {
    padding:20px 17px
  }
  .action-section {
    padding:21px 17px 0
  }
  .section-heading h2 {
    font-size:15px
  }
  .section-heading>.muted {
    font-size:9px;
    max-width:117px;
    line-height:1.5
  }
  .step {
    width:23px;
    height:23px;
    margin-right:7px;
    font-size:11px
  }
  .dropzone {
    gap:12px
  }
  .drop-copy strong {
    font-size:13px
  }
  .drop-copy>span {
    font-size:10px
  }
  .upload-icon {
    width:37px;
    height:37px;
    font-size:24px
  }
  .file-toolbar {
    font-size:11px
  }
  .file-toolbar .text-button {
    font-size:11px
  }
  .selection-summary {
    gap:9px
  }
  .selection-summary progress {
    width:40px
  }
  #file-list.file-list {
    gap:10px;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  #file-list .file-name {
    font-size:12px
  }
  #file-list .file-controls {
    opacity:1;
    right:5px;
    top:5px
  }
  #file-list .file-controls button {
    width:28px;
    height:29px;
  }
  #file-order-hint {
    font-size:10px
  }
  .tabs {
    margin-bottom:17px
  }
  .tab {

    padding:10px 5px;
    justify-content:center
  }
  .mode-icon {
    display:none
  }
  .mode-copy b {
    font-size:11px
  }
  .ai-heading p {
    font-size:11px
  }
  .ai-heading .text-button {
    font-size:10px
  }
  .ai-message {
    padding:13px 14px;
    font-size:12px
  }
  .ai-message.user {
    margin-left:22px
  }
  .ai-message.assistant {
    margin-right:12px
  }
  .ai-messages {
    max-height:360px
  }
  .submit-row>div {
    display:flex;
    justify-content:space-between;
    gap:12px;
    align-items:center
  }
  .submit-row>div>span {
    font-size:10px;
    margin-top:0;
    text-align:right
  }
  .primary {
    min-height:46px;
    font-size:13px
  }
  .prompt-examples>summary {
    font-size:10px
  }
  .prompt-examples>summary span {
    font-size:9px
  }
  .results-panel {
    padding:22px 17px
  }
  .results-heading h2 {
    font-size:22px
  }
  .jobs {
    grid-template-columns:1fr
  }
  .result-filters button {
    font-size:12px;
    padding:9px 12px
  }
  .panel-bulk-actions .secondary {
    font-size:12px
  }
  .job {
    padding:17px
  }
  .job-title {
    font-size:14px
  }
  .results-intro p {
    font-size:12px
  }
  .results-intro {
    padding:25px 0
  }
  .results-metrics button {
    padding:16px
  }
  .results-metrics button>span {
    font-size:10px
  }
  .results-metrics small {
    font-size:10px
  }
  .request-reply {
    font-size:12px
  }
  .file-preview-dialog {
    padding:24px 18px
  }
  .file-preview-dialog h2 {
    font-size:18px
  }
  .file-preview-dialog img {
    height:42vh
  }
  .preview-footer .secondary {
    font-size:11px
  }
  .preview-footer .primary {
    min-width:85px
  }
}
@media(hover:none){#file-list .file-controls{opacity:1}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
.file-preview-dialog img:focus{outline:0}
/* Fit the preview to its grid track so image clicks cannot hit the order controls. */
#file-list .file-row{align-items:stretch}#file-list .file-preview{height:100%;aspect-ratio:auto;min-height:0;padding:30px 12px 7px}
@media(max-width:550px){#file-list .file-preview{padding:32px 12px 8px}}
.ai-messages:focus-visible{outline:2px solid var(--border-strong);outline-offset:3px;border-radius:var(--radius-lg)}
@media(max-width:550px){.mode-copy small{line-height:1.45}}

.scenario-box {
  background:var(--bg-subtle);
  border:1px solid var(--border-default);
  border-radius:var(--radius-lg);
  padding:15px;
  margin-bottom:22px
}
.scenario-box strong,.quality-presets strong {
  font-size:12px
}
.scenario-box p,.quality-presets small {
  font-size:11px;
  color:var(--text-secondary);
  margin:6px 0 12px
}
.scenario-actions {
  display:flex;
  flex-wrap:wrap;
  gap:7px
}
.scenario-actions+.scenario-actions:not(:empty) {
  border-top:1px solid var(--border-default);
  margin-top:12px;
  padding-top:12px
}
.scenario-actions .secondary,.quality-presets .secondary {
  min-height:34px;
  padding:7px 10px;
  font-size:11px
}
.scenario-item {
  display:inline-flex;
  align-items:center;
  gap:2px
}
.template-remove {
  border:0;
  background:transparent;
  color:var(--text-secondary);
  cursor:pointer;
  font-size:18px
}
.template-actions {
  margin-top:6px
}
.quality-presets {
  grid-column:1/-1;
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px
}
.quality-presets strong,.quality-presets small {
  width:100%
}
.quality-presets small {
  margin:0
}
.scenario-plan,.plan-review {
  padding:18px;
  border:1px solid var(--border-default);
  border-radius:var(--radius-lg);
  background:var(--bg-subtle);
  margin:16px 0;
  font-size:13px;
  line-height:1.7
}
.scenario-plan ol,.plan-review ol {
  padding-left:23px
}
.plan-review li {
  margin:12px 0
}
.plan-review small {
  display:block;
  color:var(--text-secondary);
  overflow-wrap:anywhere
}
.batch-option {
  display:flex;
  align-items:flex-start;
  gap:9px;
  font-size:12px;
  line-height:1.6;
  margin-top:18px
}
.batch-option input {
  flex:0 0 auto;
  margin-top:4px
}
.batch-option+p {
  font-size:11px
}
.quality-presets button[aria-pressed=true] {
  background:var(--bg-muted);
  border-color:var(--brand-accent);
  color:var(--text-primary)
}
.storage-policy {
  line-height:1.8;
  margin:28px 0 0;
  max-width:850px
}
.preview-section {
  margin-top:22px
}
.image-comparison {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:14px
}
.image-comparison figure {
  margin:0;
  min-width:0
}
.image-comparison figcaption {
  font-size:12px;
  margin-bottom:10px;
  color:var(--text-secondary)
}
.image-comparison .result-preview {
  width:100%;
  height:260px;
  object-fit:contain;
  background:repeating-conic-gradient(var(--bg-page) 0% 25%,var(--bg-surface) 0% 50%) 50% / 16px 16px
}
.result-media {
  width:100%;
  max-height:460px
}
.pdf-navigation {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  margin:12px 0;
  font-size:12px
}
.danger {
  color:var(--danger)
}
.plan-review .detail-actions {
  flex-wrap:wrap
}
.plan-review[hidden],.scenario-plan[hidden] {
  display:none
}
@media(max-width:550px) {
  .image-comparison {
    grid-template-columns:1fr
  }
  .storage-policy {
    margin-top:20px
  }
  .scenario-plan,.plan-review {
    padding:13px
  }
}

/* Enhanced UX: Micro-interactions, File Badges, Category Filters, Synchronized Sliders */
kbd{display:inline-block;padding:2px 5px;font-size:10px;line-height:1.2;color:var(--text-primary);background:var(--bg-page);border:1px solid var(--border-default);border-radius:var(--radius-sm);box-shadow:var(--shadow-card)}
.file-icon-wrap{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:100%;height:100%}
.cat-svg{width:26px;height:26px;stroke-width:1.75}
.file-icon-ext{font-size:10px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#file-list .file-preview.type-pdf{background:var(--bg-page);color:var(--danger)}
#file-list .file-preview.type-audio{background:var(--bg-page);color:var(--info)}
#file-list .file-preview.type-video{background:var(--bg-page);color:var(--info)}
#file-list .file-preview.type-archive{background:var(--bg-subtle);color:var(--warning)}
#file-list .file-preview.type-spreadsheet{background:var(--bg-page);color:var(--brand-tint-fg)}
#file-list .file-preview.type-doc{background:var(--bg-page);color:var(--info)}
#file-list .file-preview.type-code{background:var(--bg-page);color:var(--info)}
#file-list .file-preview.type-presentation{background:var(--bg-page);color:var(--warning)}
#file-list .file-preview.type-other{background:var(--bg-page);color:var(--text-secondary)}

.tool-categories{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 14px}
.tool-cat-btn{border:1px solid var(--border-default);background:var(--bg-subtle);color:var(--text-secondary);border-radius:var(--radius-md);padding:6px 12px;font-size:11px;font-weight:500;cursor:pointer;transition:all .15s}
.tool-cat-btn:hover{background:var(--bg-page);border-color:var(--border-strong)}
.tool-cat-btn.active{font-weight:500}

.search-clear-btn{position:absolute;right:8px;top:50%;transform:translateY(-50%);border:0;background:transparent;color:var(--text-muted);font-size:17px;cursor:pointer;padding:2px 8px;border-radius:50%;line-height:1}
.search-clear-btn:hover{color:var(--text-primary)}

.slider-wrap{margin-top:6px}
.slider-wrap .param-slider{accent-color:var(--text-secondary);height:6px;border:0;border-radius:3px;background:var(--bg-muted);padding:0;min-height:0;cursor:pointer;display:block;flex:1;min-width:90px}
.slider-wrap input[type=number]{width:80px;flex:0 0 80px;text-align:center;padding:8px 10px;min-height:38px}

@keyframes pulse-job{0%,100%{box-shadow:var(--shadow-card)}50%{box-shadow:var(--shadow-card);border-color:var(--brand-accent)}}

.message-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}
.message-head strong{margin-bottom:0}
.copy-msg-btn{border:1px solid var(--border-default);background:color-mix(in srgb, var(--bg-surface) 82%, transparent);color:var(--text-secondary);font-size:10px;padding:3px 8px;border-radius:var(--radius-sm);cursor:pointer;}
.copy-msg-btn:hover{background:var(--bg-muted);border-color:var(--border-strong);color:var(--text-primary)}

.shortcuts-guide{margin:18px 0;padding:14px 16px;background:var(--bg-subtle);border:1px solid var(--border-default);border-radius:var(--radius-lg)}
.shortcuts-guide strong{display:block;font-size:12px;color:var(--text-primary);margin-bottom:8px}
.shortcuts-list{list-style:none;padding:0;margin:0;display:grid;gap:8px}
.shortcuts-list li{font-size:12px;color:var(--text-secondary)}
.shortcuts-list kbd{margin-right:2px}

.selection-summary progress.warning::-webkit-progress-value{background:var(--warning)}
.selection-summary progress.danger::-webkit-progress-value{background:var(--danger)}

.tool-cat-btn:focus-visible,.search-clear-btn:focus-visible,.copy-msg-btn:focus-visible{outline:3px solid var(--brand-primary);outline-offset:3px}
@media(prefers-reduced-motion:reduce){.job.processing{animation:none}.tool-cat-btn,.copy-msg-btn{transition:none}}

/* Batch file manager, compact view, mode cards, and live batch progress dashboard */
.batch-inspector{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin:0 0 12px;padding:10px 12px;background:var(--bg-subtle);border:1px solid var(--border-default);border-radius:var(--radius-lg)}
.batch-type-chips{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.batch-type-chip{display:inline-flex;align-items:center;border:1px solid var(--border-default);background:var(--bg-surface);color:var(--text-secondary);border-radius:var(--radius-sm);font-size:11px;padding:4px 10px}
.batch-type-chip.interactive{padding:0;overflow:hidden}
.batch-ext-keep{border:0;background:transparent;color:var(--text-secondary);font-size:11px;font-weight:600;padding:4px 8px 4px 10px;cursor:pointer;min-height:26px}
.batch-ext-keep:hover:not(:disabled){background:var(--bg-page)}
.batch-ext-remove{border:0;border-left:1px solid var(--border-default);background:transparent;color:var(--text-muted);font-size:13px;padding:4px 8px;cursor:pointer;min-height:26px;line-height:1}
.batch-ext-remove:hover:not(:disabled){background:var(--bg-muted);color:var(--danger)}
.batch-sort-bar{display:flex;flex-wrap:wrap;gap:5px;align-items:center}
.batch-tool-btn{border:1px solid var(--border-default);background:var(--bg-surface);color:var(--text-secondary);border-radius:var(--radius-md);padding:4px 9px;font-size:11px;min-height:28px;cursor:pointer;transition:background .15s,border-color .15s}
.batch-tool-btn:hover:not(:disabled){background:var(--bg-page);border-color:var(--border-strong)}
.batch-tool-btn.view-toggle{background:var(--bg-page);font-weight: 500}

#file-list.file-list.compact-list{grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:7px}
#file-list.compact-list .file-row{display:flex;flex-direction:row;align-items:center;padding:6px 10px;border-radius:var(--radius-md);min-height:44px;position:relative}
#file-list.compact-list .file-order{position:static;flex:0 0 auto;margin-right:8px}
#file-list.compact-list .file-preview{width:34px;height:34px;flex:0 0 34px;padding:4px;border-radius:var(--radius-md);margin-right:9px}
#file-list.compact-list .file-preview .cat-svg{width:16px;height:16px}
#file-list.compact-list .file-preview .file-icon-ext{font-size:8px}
#file-list.compact-list .file-copy{padding:0 64px 0 0;border:0;background:transparent;flex:1;min-width:0}
#file-list.compact-list .file-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
#file-list.compact-list .file-controls{top:50%;transform:translateY(-50%);right:6px}

.file-list-expander{display:block;width:100%;margin-top:10px;padding:9px 14px;border:1px dashed var(--border-strong);border-radius:var(--radius-md);background:var(--bg-subtle);color:var(--text-secondary);font-size:12px;font-weight: 500;text-align:center;cursor:pointer}
.file-list-expander:hover:not(:disabled){background:var(--bg-page);border-color:var(--brand-accent)}

.batch-mode-selector{margin-top:18px;padding:14px 16px;border:1px solid var(--border-default);border-radius:var(--radius-lg);background:var(--bg-subtle)}
.batch-mode-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:10px}
.batch-mode-head strong{font-size:12px;color:var(--text-primary)}
.batch-mode-head small{font-size:11px;color:var(--text-secondary)}
.batch-mode-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.batch-mode-card{display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:11px 13px;border:1px solid var(--border-default);border-radius:var(--radius-md);background:var(--bg-surface);color:var(--text-primary);text-align:left;cursor:pointer;transition:border-color .15s,background .15s,box-shadow .15s}
.batch-mode-card strong{font-size:12px;font-weight:600;color:var(--text-primary)}
.batch-mode-card small{font-size:11px;color:var(--text-secondary);line-height:1.4}
.batch-mode-card:hover:not(:disabled){border-color:var(--brand-accent);background:var(--bg-subtle)}
.batch-mode-card.active{border-color:var(--brand-primary);background:var(--bg-page);box-shadow:var(--shadow-card)}
.batch-mode-selector .batch-option{margin-top:11px}
.batch-mode-note{margin:8px 0 0;font-size:11px;line-height:1.5}

.batch-live-panel{margin-top:16px;padding:16px 18px;border:1px solid var(--border-default);border-radius:var(--radius-lg);background:var(--bg-subtle);display:grid;gap:11px}
.batch-live-panel.status-completed{border-color:var(--brand-accent);background:var(--bg-page)}
.batch-live-panel.status-failed{border-color:var(--border-strong);background:var(--bg-page)}
@media(max-width:600px){.batch-mode-cards{grid-template-columns:1fr}#file-list.file-list.compact-list{grid-template-columns:1fr}}

