:root {
  color-scheme: light;
  --bg: #eef1f0;
  --surface: #ffffff;
  --surface-muted: #f7f8f8;
  --line: #dce2e0;
  --line-strong: #c4ceca;
  --text: #18201d;
  --muted: #6d7773;
  --green: #167252;
  --green-dark: #0f563d;
  --green-soft: #e5f3ed;
  --blue: #315fba;
  --blue-soft: #e8eefb;
  --amber: #c98118;
  --amber-soft: #fff1cf;
  --danger: #b44949;
  --danger-soft: #f9e8e1;
  --shadow: 0 14px 38px rgba(25, 37, 32, .12);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 320px; min-height: 100%; }
body { background: var(--bg); color: var(--text); line-height: 1.45; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, [role="slider"]:focus-visible { outline: 3px solid rgba(49, 95, 186, .28); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; }

/* Standalone Studio shell */
.studio-page { overflow: hidden; }
.app-shell { height: 100vh; display: grid; grid-template-rows: 58px minmax(0, 1fr); }
.studio-topbar {
  display: grid;
  grid-template-columns: minmax(250px, 330px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 0 16px 0 20px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 20;
}
.studio-brand { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 15px; font-weight: 700; }
.brand-mark { width: 24px; height: 24px; flex: 0 0 auto; border: 7px solid var(--green); border-right-color: var(--blue); border-radius: 50%; transform: rotate(-22deg); }
.brand-name { white-space: nowrap; }
.mode-tab { height: 28px; display: inline-flex; align-items: center; padding: 0 10px; color: var(--green); background: #fff; border: 1px solid #d7dfdc; border-radius: 5px; box-shadow: 0 1px 4px rgba(25, 37, 32, .08); font-size: 10px; font-weight: 650; white-space: nowrap; }
.topbar-file-meta { min-width: 0; display: grid; grid-template-columns: auto minmax(0, auto) minmax(0, 1fr); align-items: center; gap: 7px; }
.topbar-file-meta strong { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.topbar-file-meta > span:last-child { min-width: 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.file-kind { color: var(--green); font-size: 8px; font-weight: 750; text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.topbar-limit { color: var(--muted); font-size: 9px; white-space: nowrap; }
.topbar-link { color: var(--muted); font-size: 10px; font-weight: 600; text-decoration: none; }
.topbar-link:hover { color: var(--green); }
.icon-text-button, .icon-button { color: #43504b; background: #fff; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; }
.icon-text-button { height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; font-size: 10px; font-weight: 700; }
.icon-button { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; }
.icon-button.small { width: 32px; height: 32px; }
.icon-button:hover, .icon-text-button:hover { background: var(--surface-muted); border-color: var(--line-strong); }
.icon-button svg, .icon-text-button svg, .result-button svg, .upload-mark svg, .compare-knob svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.workspace { min-height: 0; height: 100%; display: grid; grid-template-columns: 286px minmax(0, 1fr); }
#studio { min-height: 0; }
.asset-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); }
.panel-heading { height: 58px; flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 9px 14px; border-bottom: 1px solid var(--line); }
.panel-heading > div { min-width: 0; display: grid; gap: 2px; }
.panel-heading strong { font-size: 12px; }
.panel-heading span { color: var(--muted); font-size: 9px; }
.asset-panel-footer { margin-top: auto; display: grid; gap: 5px; padding: 12px 14px; color: var(--muted); border-top: 1px solid var(--line); font-size: 9px; line-height: 1.4; }
.asset-panel-footer a { color: var(--blue); text-decoration: none; }
.empty-file-list { margin: auto 20px; display: grid; justify-items: center; gap: 7px; color: var(--muted); text-align: center; font-size: 10px; }
.empty-file-list strong { color: var(--text); font-size: 11px; }
.empty-file-icon { width: 34px; height: 34px; display: grid; place-items: center; color: var(--green); background: var(--green-soft); border: 1px solid #bddccd; border-radius: 8px; font-size: 23px; font-weight: 300; }
.thumbnail-list { min-height: 0; overflow-y: auto; padding: 10px; display: grid; align-content: start; gap: 5px; scrollbar-width: thin; }
.variant-list { display: grid; gap: 5px; }
.thumbnail-item {
  width: 100%; height: 82px; display: grid; grid-template-columns: 66px minmax(0, 1fr); align-items: center; gap: 10px; padding: 7px;
  color: inherit; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 7px; cursor: pointer; transition: background .16s ease, border-color .16s ease;
}
.thumbnail-item:hover { background: var(--surface-muted); }
.thumbnail-item.active, .thumbnail-item[aria-pressed="true"] { background: #f0f6f3; border-color: #bcd5ca; }
.thumb-image { width: 66px; height: 66px; display: block; object-fit: cover; background: #e2e7e5; border-radius: 5px; }
.thumb-copy { min-width: 0; min-height: 60px; display: flex; flex-direction: column; align-items: flex-start; }
.thumb-name { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 650; }
.thumb-time { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }
.thumb-badges { min-height: 18px; margin-top: auto; display: flex; align-items: center; gap: 4px; }
.thumb-badge { min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 4px; color: var(--blue); background: var(--blue-soft); border: 1px solid #c7d5ef; border-radius: 4px; font-size: 8px; font-weight: 800; }
.thumb-badge.original { color: var(--green); background: var(--green-soft); border-color: #bddccd; }
.delete-link { padding: 0; color: var(--danger); background: transparent; border: 0; text-align: left; font-size: 9px; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; cursor: pointer; }
.delete-link:disabled { opacity: .5; cursor: default; }
.delete-status { color: var(--muted); font-size: 9px; }

.editor { min-width: 0; min-height: 0; position: relative; display: grid; grid-template-rows: minmax(0, 1fr); }
.viewer {
  min-width: 0; min-height: 0; overflow: hidden; position: relative; display: grid; place-items: center; padding: 18px 18px 92px;
  background-color: #dfe4e2;
  background-image: linear-gradient(45deg, rgba(255,255,255,.25) 25%, transparent 25%), linear-gradient(-45deg, rgba(255,255,255,.25) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(255,255,255,.25) 75%), linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.25) 75%);
  background-size: 18px 18px; background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}
.upload-viewer { padding-bottom: 110px; }
.upload-editor { min-height: 0; }
.drop-zone { width: min(480px, calc(100% - 36px)); min-height: 220px; display: grid; place-items: center; align-content: center; gap: 7px; padding: 26px; color: var(--muted); text-align: center; background: rgba(255,255,255,.8); border: 1px dashed #aab7b2; border-radius: 12px; box-shadow: 0 10px 34px rgba(25,37,32,.07); cursor: pointer; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.drop-zone:hover, .drop-zone.is-dragging { background: #fff; border-color: var(--green); transform: translateY(-1px); }
.drop-zone strong { color: var(--text); font-size: 16px; }
.drop-zone > span:not(.upload-mark) { font-size: 10px; }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-mark { width: 42px; height: 42px; display: grid; place-items: center; color: var(--green); background: var(--green-soft); border: 1px solid #bddccd; border-radius: 10px; }
.upload-mark svg { width: 22px; height: 22px; }
.upload-status { position: absolute; bottom: 86px; left: 50%; transform: translateX(-50%); margin: 0; padding: 7px 10px; color: #fff; background: rgba(20,29,26,.88); border-radius: 6px; font-size: 10px; }
.upload-dock { width: min(560px, calc(100% - 28px)); position: absolute; z-index: 8; left: 50%; bottom: 12px; transform: translateX(-50%); display: grid; gap: 2px; padding: 10px 14px; color: var(--muted); background: rgba(255,255,255,.96); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 8px 26px rgba(25,37,32,.16); backdrop-filter: blur(12px); text-align: center; font-size: 9px; }
.upload-dock strong { color: var(--text); font-size: 11px; }

.stage-view { width: 100%; height: 100%; min-height: 0; display: grid; place-items: center; position: relative; }
.image-stage { position: relative; max-width: 100%; max-height: 100%; overflow: hidden; background: #d8dddb; box-shadow: var(--shadow); transform-origin: center center; will-change: transform; }
.base-image, .processed-image { display: block; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: fill; user-select: none; pointer-events: none; }
.compare-frame { touch-action: none; cursor: ew-resize; }
.processed-layer { position: absolute; inset: 0; width: 50%; overflow: hidden; pointer-events: none; contain: paint; will-change: width; }
.processed-image { position: absolute; inset: 0; width: var(--compare-image-width, 100%); max-width: none; }
.compare-handle { position: absolute; z-index: 4; top: 0; bottom: 0; left: 50%; width: 1px; color: var(--text); background: rgba(255,255,255,.98); box-shadow: 0 0 0 1px rgba(23,32,29,.16); cursor: ew-resize; }
.compare-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 28px; transform: translateX(-50%); }
.compare-knob { position: absolute; top: 50%; left: 50%; width: 30px; height: 30px; display: grid; place-items: center; color: var(--text); background: #fff; border: 1px solid rgba(24,32,29,.18); border-radius: 50%; box-shadow: 0 3px 10px rgba(0,0,0,.2); transform: translate(-50%, -50%); }
.compare-knob svg { width: 14px; height: 14px; }
.compare-label { position: absolute; z-index: 3; top: 12px; padding: 5px 8px; color: #fff; background: rgba(16,24,21,.68); border-radius: 4px; font-size: 9px; font-weight: 650; pointer-events: none; }
.before-label { left: 12px; }
.after-label { right: 12px; }
.always-visible { opacity: 1; }
.floating-meta { position: absolute; z-index: 6; left: 18px; bottom: 100px; max-width: calc(100% - 36px); padding: 6px 8px; color: rgba(255,255,255,.92); background: rgba(16,24,21,.68); border-radius: 5px; font-size: 9px; pointer-events: none; }
.floating-tools { position: absolute; z-index: 7; right: 18px; top: 18px; display: flex; align-items: center; gap: 7px; padding: 6px 7px; color: var(--muted); background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 5px 18px rgba(25,37,32,.12); font-size: 9px; }
.floating-tools input { width: 92px; accent-color: var(--green); }
.result-actions { position: absolute; z-index: 7; left: 18px; top: 18px; display: flex; gap: 6px; }
.result-button { min-height: 32px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 9px; color: #43504b; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 7px; font-size: 9px; font-weight: 700; text-decoration: none; cursor: pointer; box-shadow: 0 5px 18px rgba(25,37,32,.10); }
.result-button.primary { color: #fff; background: var(--green); border-color: var(--green); }
.result-button svg { width: 13px; height: 13px; }

.processing-stage { width: min(720px, calc(100% - 44px)); height: min(65vh, 520px); position: relative; overflow: hidden; color: #fff; background: rgba(12,19,17,.66); border-radius: 8px; box-shadow: var(--shadow); }
.scan-frame { position: absolute; inset: 12px; border: 1px solid rgba(255,255,255,.55); overflow: hidden; }
.scan-frame span { position: absolute; left: 0; right: 0; height: 2px; background: #fff; box-shadow: 0 0 16px 3px rgba(108,220,175,.8); animation: scan 2.1s ease-in-out infinite alternate; }
.processing-copy { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 7px; text-align: center; }
.processing-copy h2 { margin: 2px 0 0; font-size: 16px; }
.processing-copy p { margin: 0; max-width: 420px; color: rgba(255,255,255,.78); font-size: 10px; }
.spinner { width: 24px; height: 24px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }

.action-dock { width: max-content; max-width: calc(100% - 28px); min-height: 62px; position: absolute; z-index: 8; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; align-items: flex-end; gap: 8px; padding: 7px 9px; background: rgba(255,255,255,.97); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 8px 26px rgba(25,37,32,.16); backdrop-filter: blur(12px); }
.standard-action-group, .ai-action-group, .scale-group { display: grid; gap: 3px; align-content: end; }
.dock-label { color: var(--muted); font-size: 8px; font-weight: 750; text-transform: uppercase; white-space: nowrap; }
.method-list { display: flex; gap: 4px; }
.method-button { min-width: 86px; height: 34px; display: grid; place-items: center; padding: 0 9px; color: #244c85; background: var(--blue-soft); border: 1px solid #c4d3f0; border-radius: 7px; font-size: 9px; font-weight: 700; cursor: pointer; position: relative; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.method-button strong { font: inherit; white-space: nowrap; }
.method-button > span { display: none; }
.method-button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(49,95,186,.13); }
.method-button[aria-pressed="true"] { box-shadow: inset 0 0 0 1px currentColor, 0 4px 12px rgba(25,37,32,.10); }
.method-button[data-method="upscale"] { min-width: 104px; color: #fff; background: var(--green); border-color: var(--green); }
.method-button[data-method="upscale"]:hover:not(:disabled) { background: var(--green-dark); box-shadow: 0 5px 16px rgba(22,114,82,.23); }
.ai-methods { display: grid; grid-template-columns: repeat(2, 78px); gap: 3px; }
.ai-methods .method-button { min-width: 0; width: 78px; height: 25px; padding: 0 5px; color: #69470d; background: var(--amber-soft); border-color: #e5c57c; font-size: 8px; }
.ai-methods .method-button[data-method="ai_upscale_safe"] { color: #345f4e; background: #e9f5ef; border-color: #bddbcd; }
.ai-methods .method-button[data-method="ai_upscale_detail"] { color: #5c4c88; background: #f0ecfa; border-color: #d2c8eb; }
.ai-methods .method-button[data-method="ai_upscale_restore"] { color: #7b3e2f; background: var(--danger-soft); border-color: #dfbbae; }
.method-button:disabled { opacity: .45; cursor: not-allowed; }
.method-button[data-tooltip]::after { content: attr(data-tooltip); width: 220px; position: absolute; z-index: 40; bottom: calc(100% + 8px); left: 0; padding: 8px 9px; color: #fff; background: rgba(20,29,26,.96); border: 1px solid rgba(255,255,255,.12); border-radius: 6px; box-shadow: 0 7px 20px rgba(17,28,24,.24); font-size: 9px; font-weight: 500; line-height: 1.35; text-align: left; white-space: normal; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(4px); transition: opacity .14s ease, transform .14s ease, visibility .14s ease; }
.method-button[data-tooltip]:hover::after, .method-button[data-tooltip]:focus-visible::after { opacity: 1; visibility: visible; transform: translateY(0); }
.scale-options { min-width: 82px; height: 34px; display: flex; gap: 3px; align-items: center; }
.scale-select { width: 82px; height: 34px; padding: 0 24px 0 8px; color: #5e470f; background: #fff8e6; border: 1px solid #dfca92; border-radius: 7px; font-size: 9px; font-weight: 700; cursor: pointer; }
.fixed-scale { width: 82px; height: 34px; display: grid; place-items: center; color: var(--muted); background: var(--surface-muted); border: 1px solid var(--line); border-radius: 7px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.process-button { min-width: 70px; height: 34px; padding: 0 12px; color: #fff; background: var(--green); border: 1px solid var(--green); border-radius: 7px; font-size: 10px; font-weight: 750; cursor: pointer; }
.process-button:hover:not(:disabled) { background: var(--green-dark); }
.process-button:disabled { opacity: .48; cursor: default; }
.dock-note { max-width: 150px; margin: 0 0 3px; color: var(--muted); font-size: 8px; line-height: 1.25; }
.method-warning { max-width: 180px; margin-bottom: 2px; padding: 5px 7px; color: #755116; background: #fff8e6; border: 1px solid #ead49d; border-radius: 6px; font-size: 8px; line-height: 1.25; }

.toast { position: fixed; z-index: 60; left: 50%; bottom: 90px; max-width: min(560px, calc(100vw - 28px)); padding: 9px 12px; color: #fff; background: rgba(20,29,26,.94); border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.2); font-size: 10px; transform: translateX(-50%); }
.error-toast { background: rgba(126,43,43,.96); }

@keyframes scan { from { top: 0; } to { top: calc(100% - 2px); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Public information pages */
.site-header, .site-footer, .content-page main { width: min(920px, calc(100% - 32px)); margin: auto; }
.site-header { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.site-header nav, .site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-header a, .site-footer a { color: inherit; text-decoration: none; }
.site-header .brand { font-weight: 800; }
.site-footer { display: flex; justify-content: space-between; gap: 18px; padding: 28px 0 48px; color: var(--muted); border-top: 1px solid var(--line); font-size: 11px; }
.content-page { overflow-y: auto; }
.prose { width: min(760px, 100%); padding: 55px 0 80px; }
.prose .eyebrow { color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.prose h1 { margin: .2em 0 .7em; font-size: clamp(2.2rem, 7vw, 4.3rem); line-height: .98; letter-spacing: -.045em; }
.prose h2 { margin-top: 32px; font-size: 18px; }
.prose p { color: #59645f; }

@media (max-width: 980px) {
  .studio-topbar { grid-template-columns: minmax(210px, 1fr) auto; gap: 8px; }
  .topbar-file-meta { display: none; }
  .topbar-limit { display: none; }
  .action-dock { width: calc(100% - 20px); max-width: none; }
  .dock-note, .method-warning { display: none; }
}

@media (max-width: 760px) {
  .studio-page { overflow-y: auto; }
  .app-shell { width: 100%; min-height: 100vh; height: auto; grid-template-rows: 54px auto; }
  .studio-topbar { position: sticky; top: 0; grid-template-columns: minmax(0,1fr) auto; height: 54px; padding: 0 9px 0 12px; }
  .brand-name { display: none; }
  .studio-brand { gap: 7px; }
  .topbar-link { display: none; }
  .icon-text-button span { display: none; }
  .icon-text-button { width: 34px; padding: 0; justify-content: center; }
  .workspace { width: 100%; height: auto; grid-template-columns: minmax(0,1fr); grid-template-rows: 132px minmax(590px, calc(100vh - 186px)); }
  .asset-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .panel-heading { height: 38px; padding: 4px 10px; }
  .panel-heading > div { display: flex; align-items: center; gap: 6px; }
  .panel-heading span { display: none; }
  .asset-panel-footer { display: none; }
  .empty-file-list { margin: auto; grid-template-columns: auto auto; justify-content: center; align-items: center; text-align: left; }
  .empty-file-list > span:last-child { display: none; }
  .empty-file-icon { width: 30px; height: 30px; grid-row: 1 / span 2; }
  .thumbnail-list { display: flex; overflow-x: auto; overflow-y: hidden; padding: 7px 9px; }
  .variant-list { display: flex; gap: 5px; }
  .thumbnail-item { width: 76px; min-width: 76px; height: 82px; display: grid; grid-template-columns: 1fr; grid-template-rows: 57px 11px; gap: 3px; padding: 4px; position: relative; }
  .thumb-image { width: 66px; height: 57px; }
  .thumb-copy { min-height: 0; display: block; }
  .thumb-name { display: block; font-size: 8px; }
  .thumb-time { display: none; }
  .thumb-badges { position: absolute; right: 2px; bottom: 18px; min-height: 0; }
  .thumb-badge { min-width: 14px; height: 14px; padding: 0 2px; font-size: 7px; }
  .editor { min-height: 590px; }
  .viewer { min-height: 590px; padding: 10px 10px 174px; }
  .upload-workspace { grid-template-rows: 82px minmax(520px, calc(100vh - 136px)); }
  .upload-workspace .asset-panel { min-height: 82px; }
  .upload-workspace .panel-heading { display: none; }
  .upload-viewer { min-height: 520px; padding-bottom: 112px; }
  .drop-zone { width: calc(100% - 22px); min-height: 190px; }
  .floating-meta { left: 10px; bottom: 180px; max-width: calc(100% - 20px); }
  .floating-tools { right: 10px; top: 10px; }
  .result-actions { left: 10px; top: 10px; }
  .result-button { padding: 0 7px; }
  .action-dock { min-height: 154px; bottom: 8px; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.35fr) 72px; grid-template-areas: "standard ai scale" "standard ai run"; align-items: end; gap: 5px 7px; padding: 7px 8px; }
  .standard-action-group { grid-area: standard; }
  .ai-action-group { grid-area: ai; }
  .scale-group { grid-area: scale; }
  .process-button { grid-area: run; width: 72px; min-width: 0; }
  .standard-methods { display: grid; gap: 4px; }
  .method-button, .method-button[data-method="upscale"] { width: 100%; min-width: 0; }
  .ai-methods { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ai-methods .method-button { width: 100%; min-width: 0; }
  .scale-options, .scale-select, .fixed-scale { width: 72px; min-width: 0; }
  .dock-note, .method-warning { display: none; }
  .processing-stage { width: calc(100% - 22px); height: 380px; }
  .site-footer { flex-direction: column; }
}

@media (max-width: 430px) {
  .mode-tab { padding: 0 7px; }
  .studio-brand .brand-mark { width: 22px; height: 22px; border-width: 6px; }
  .action-dock { grid-template-columns: minmax(0,.88fr) minmax(0,1.4fr) 62px; gap: 4px 5px; }
  .process-button, .scale-options, .scale-select, .fixed-scale { width: 62px; }
  .method-button { padding: 0 5px; font-size: 8px; }
  .ai-methods .method-button { font-size: 7.5px; }
  .floating-tools label { display: none; }
  .floating-tools input { width: 72px; }
  .result-actions #redo-replace-button { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
