.tool-intro { padding: 40px 0 34px; border-bottom: 3px solid #111; background: #fef3c7; }
.tool-intro h1 { max-width: 920px; font-size: clamp(38px, 6vw, 68px); }
.tool-intro > .wrap > p:not(.eyebrow) { max-width: 760px; margin: 18px 0 0; color: #374151; font-size: 18px; line-height: 1.6; }
.privacy-badge { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 22px; padding: 10px 14px; border: 2px solid #111; background: #fff; font-size: 14px; }
.privacy-badge span { display: inline-grid; width: 22px; height: 22px; place-items: center; background: #16a34a; color: #fff; font-weight: 900; }
.workspace-band { padding: 34px 0 58px; background: #fff; }
.mode-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 3px solid #111; background: #111; gap: 3px; }
.mode-tab { min-height: 54px; border: 0; border-radius: 0; background: #fff; color: #111; padding: 10px 12px; font: inherit; font-weight: 900; cursor: pointer; }
.mode-tab:hover { background: #fef3c7; }
.mode-tab.active { background: #facc15; }
.tool-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .8fr); gap: 24px; margin-top: 24px; align-items: start; }
.input-panel, .output-panel { min-width: 0; border: 3px solid #111; padding: 24px; background: #fff; }
.input-panel { box-shadow: 7px 7px 0 #ec4899; }
.output-panel { box-shadow: 7px 7px 0 #111; }
.drop-zone { display: grid; min-height: 180px; place-items: center; align-content: center; gap: 7px; border: 3px dashed #111; background: #f8fafc; padding: 24px; text-align: center; cursor: pointer; }
.drop-zone.dragging { background: #e0f2fe; outline: 4px solid #38bdf8; outline-offset: -7px; }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop-zone strong { font-size: 19px; }
.drop-zone small { color: #6b7280; }
.drop-icon { display: grid; width: 44px; height: 44px; place-items: center; border: 3px solid #111; background: #facc15; font-size: 28px; font-weight: 900; line-height: 1; }
.file-list { display: grid; gap: 8px; margin-top: 14px; }
.file-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 11px; align-items: center; border: 2px solid #111; padding: 7px; background: #fff; }
.file-row img { display: block; width: 48px; height: 48px; object-fit: cover; background: #e5e7eb; }
.file-meta { min-width: 0; }
.file-meta strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.file-meta small { color: #6b7280; }
.remove-file { width: 34px; height: 34px; border: 2px solid #111; background: #fff; font-size: 20px; cursor: pointer; }
.remove-file:hover { background: #fee2e2; }
.settings-panel { margin-top: 22px; border-top: 3px solid #111; padding-top: 22px; }
.setting-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.setting-grid label { display: grid; gap: 7px; align-content: start; font-size: 13px; font-weight: 900; }
.setting-grid label[hidden] { display: none; }
.setting-grid input[type="number"], .setting-grid select { width: 100%; min-height: 44px; border: 2px solid #111; border-radius: 0; background: #fff; padding: 9px 10px; color: #111; font: inherit; }
.setting-grid input[type="range"] { width: 100%; accent-color: #db2777; }
.setting-grid .check-field { grid-template-columns: 20px 1fr; align-items: center; align-content: center; padding-top: 24px; }
.check-field input { width: 18px; height: 18px; accent-color: #db2777; }
.setting-note { margin: 16px 0 0; color: #4b5563; font-size: 13px; line-height: 1.55; }
.split-preview-shell { margin-top: 20px; border-top: 2px solid #111; padding-top: 18px; }
.split-preview-shell[hidden] { display: none; }
.split-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.split-preview-heading strong, .split-preview-heading small { display: block; }
.split-preview-heading small { margin-top: 3px; color: #6b7280; font-size: 12px; }
.mini-action { min-height: 36px; border: 2px solid #111; border-radius: 0; background: #fff; padding: 6px 10px; font: inherit; font-size: 12px; font-weight: 900; cursor: pointer; }
.split-preview { position: relative; max-height: 560px; overflow: auto; border: 3px solid #111; background: #e5e7eb; }
.split-preview > img { display: block; width: 100%; height: auto; }
.split-lines { position: absolute; inset: 0; pointer-events: none; }
.split-line { position: absolute; left: 0; width: 100%; height: 20px; margin-top: -10px; border: 0; border-radius: 0; background: transparent; cursor: ns-resize; pointer-events: auto; touch-action: none; }
.split-line::before { position: absolute; left: 0; right: 0; top: 8px; height: 4px; content: ''; background: #ec4899; box-shadow: 0 1px 0 #fff, 0 -1px 0 #fff; }
.split-line::after { position: absolute; right: 8px; top: 0; content: attr(data-label); border: 2px solid #111; background: #fce7f3; padding: 1px 5px; color: #111; font-size: 10px; font-weight: 900; }
.split-line:focus { outline: 3px solid #0ea5e9; outline-offset: 2px; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.primary-action, .secondary-action { min-height: 46px; border: 3px solid #111; border-radius: 0; padding: 10px 16px; font: inherit; font-weight: 900; cursor: pointer; }
.primary-action { background: #facc15; box-shadow: 4px 4px 0 #111; }
.secondary-action { background: #fff; }
.primary-action:disabled, .secondary-action:disabled { cursor: not-allowed; opacity: .45; box-shadow: none; }
.status { min-height: 22px; margin: 16px 0 0; color: #374151; font-size: 14px; font-weight: 800; }
.status.error { color: #b91c1c; }
.output-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 3px solid #111; padding-bottom: 16px; }
.output-heading .eyebrow { margin-bottom: 6px; }
.output-heading h2 { margin: 0; font-size: 25px; }
.empty-output { display: grid; min-height: 300px; place-content: center; text-align: center; color: #6b7280; }
.empty-output[hidden] { display: none; }
.empty-output strong { color: #111; font-size: 20px; }
.empty-output p { margin: 8px 0 0; }
.output-grid { display: grid; gap: 14px; margin-top: 18px; }
.output-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; border: 2px solid #111; padding: 10px; background: #fff; }
.output-card img { display: block; width: 112px; height: 112px; object-fit: contain; background: #f3f4f6; }
.output-info { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.output-info strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.output-info p { margin: 6px 0 10px; color: #6b7280; font-size: 13px; line-height: 1.45; }
.download-link { display: inline-flex; min-height: 38px; align-items: center; border: 2px solid #111; padding: 7px 11px; background: #e0f2fe; font-size: 13px; font-weight: 900; text-decoration: none; }
.compact-band { padding: 48px 0; }
.compact-band .section-heading { font-size: 32px; }
.embedded-tool { background: #fff; }
.embedded-tool .site-header, .embedded-tool .tool-intro, .embedded-tool .compact-band, .embedded-tool .site-footer, .embedded-tool .mode-tabs { display: none; }
.embedded-tool .workspace-band { padding: 0; border: 0; }
.embedded-tool .workspace-band > .wrap { width: 100%; }
.embedded-tool .tool-workspace { margin-top: 0; }
.embedded-tool .input-panel, .embedded-tool .output-panel { box-shadow: none; }
@media (max-width: 820px) {
  .mode-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-workspace { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .tool-intro { padding: 34px 0 28px; }
  .mode-tabs { grid-template-columns: 1fr; }
  .setting-grid { grid-template-columns: 1fr; }
  .setting-grid .check-field { padding-top: 0; }
  .input-panel, .output-panel { padding: 16px; }
  .output-heading { align-items: stretch; flex-direction: column; }
  .output-card { grid-template-columns: 86px minmax(0, 1fr); }
  .output-card img { width: 86px; height: 102px; }
}
