/* Shared workspace primitives. Mobile <=640px retains its existing layout;
   tablet 641–1279px and desktop >=1280px have separate compositions.
   has-tablet-workspace is the legacy-layout opt-out, not device detection. */
/* These wrappers preserve the existing mobile/desktop flex composition. */
.tpx-settings-grid,.tpx-settings-primary,.tpx-format-details,.tpx-workbench {display:contents;}
.tpx-format-details > summary {display:none;}
.tpx-settings-primary > *,.tpx-settings-grid > .tpx-secondary-settings {flex-shrink:0;}
@media (min-width:641px) {
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) {overflow-x:visible;}
  .tpx-page.has-tablet-workspace::before,
  .tpx-page.has-tablet-workspace::after {display:none;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-shell {
    width:calc(100% - 48px);max-width:1240px;min-width:0;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor {
    width:calc(100% - 48px);max-width:1240px;margin-inline:auto;
    padding:8px 0 0;container-type:inline-size;container-name:tablet-workspace;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-grid {
    width:100%;max-width:none;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-grid {
    grid-template-columns:minmax(0,1fr);gap:12px;align-items:start;
    grid-template-areas:"intro" "workbench";grid-template-rows:none;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-grid > :is(.tpx-intro-card,.tpx-workspace,.tpx-settings) {align-self:start;min-width:0;max-width:100%;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-grid > .tpx-intro-card {grid-area:intro;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-workbench {
    display:grid;grid-area:workbench;grid-template-columns:minmax(0,1fr);
    grid-template-areas:"upload" "settings";gap:12px;align-items:start;min-width:0;
    padding:12px;border:1px solid #e8e2da;border-radius:20px;
    background:rgba(255,255,255,.94);box-shadow:0 10px 26px rgba(60,52,42,.055);
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-workbench > :is(.tpx-workspace,.tpx-settings) {
    min-width:0;max-width:100%;height:auto;min-height:0;align-self:start;
    padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-workbench > .tpx-workspace {grid-area:upload;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-workbench > .tpx-settings {grid-area:settings;padding-top:12px;border-top:1px solid #e7e9e2;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-workbench > .tpx-settings::before {display:none;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-intro-card {
    display:grid;grid-template-columns:minmax(0,1fr) 176px;align-items:center;
    gap:12px 24px;padding:0 4px 14px;height:auto;min-height:0;border:0;border-bottom:1px solid #e4e8df;background:none;box-shadow:none;
    grid-template-rows:auto;justify-content:start;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-intro-copy h1 {
    max-width:42ch;margin:4px 0 7px;font-size:clamp(27px,2.4vw,32px);line-height:1.12;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-intro-copy > p {max-width:72ch;font-size:14px;line-height:1.45;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-intro-copy > .tpx-privacy-line {margin-top:5px;font-size:13px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-intro-card .tpx-rattie-art {
    position:static;display:block;width:176px;height:auto;max-height:132px;
    min-height:0;flex:none;object-fit:contain;object-position:center;margin:0;align-self:center;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-intro-copy h1 br {display:none;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-workspace,
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-settings {
    height:auto;min-height:0;max-height:none;align-self:start;overflow:visible;
    padding:12px;border-radius:18px;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-workbench > .tpx-workspace {width:100%;max-width:none;justify-self:start;}
  /* Compact application dropzone: icon/title, actions, then helper rows. */
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-dropzone {
    display:grid;grid-template-columns:36px minmax(0,1fr);align-items:center;
    height:auto;min-height:0;flex:none;padding:12px;gap:4px 10px;
    border-radius:13px;text-align:left;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-upload-icon {
    grid-column:1;grid-row:1;width:36px;height:36px;margin:0;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-dropzone h2 {
    grid-column:2;grid-row:1;margin:0;font-size:20px;line-height:1.2;
  }
  /* Redundant with the adjacent Select images action; no capability is hidden. */
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-dropzone > p:not(.tpx-folder-help) {display:none;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-picker-actions {
    grid-column:1/-1;grid-row:2;display:flex;flex-direction:row;flex-wrap:wrap;gap:8px;
    margin:3px 0 0;width:100%;min-width:0;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-select {
    min-height:44px;height:44px;flex:1;min-width:132px;max-width:220px;width:auto;font-size:14px;margin:0;border-radius:11px;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-folder-select {
    flex:none;height:44px;min-height:44px;padding-inline:10px;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-format-details {
    display:block;grid-column:1/-1;grid-row:3;min-width:0;width:100%;
  }
  .tpx-page.has-tablet-workspace .tpx-format-details > summary {
    display:list-item;min-height:44px;padding:12px 0;color:#496352;font-size:12px;font-weight:650;cursor:pointer;
  }
  .tpx-page.has-tablet-workspace .tpx-format-details > summary:focus-visible {outline:3px solid #237943;outline-offset:3px;border-radius:5px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-support {
    margin:0 0 6px;gap:3px;font-size:12px;line-height:1.4;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-paste-hint {
    grid-column:1/-1;grid-row:4;margin:0;font-size:12px;line-height:1.4;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-folder-help {
    grid-column:1/-1;grid-row:5;margin:0;font-size:12px;line-height:1.4;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tp-preview-wrap:has(.tp-preview-strip:empty) {margin:0;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tp-preview-strip {min-height:0;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));}
  /* Mode parameters and output/options share one compact settings surface. */
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-settings {padding:14px 16px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-settings .tpx-settings-head {gap:12px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-settings h2 {font-size:17px;white-space:normal;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-settings .tpx-reset {min-height:44px;padding:8px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-settings-grid {
    display:grid;grid-template-columns:minmax(0,1fr);gap:10px;align-items:start;
    margin-top:4px;min-width:0;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-settings-primary {display:block;min-width:0;container-type:inline-size;container-name:compression-mode;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-mode {margin:0;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-mode-tabs {
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:min(100%,248px);gap:4px;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-mode-tabs span {
    height:auto;min-height:44px;padding:6px 9px;font-size:12px;line-height:1.2;border-radius:9px;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-mode-panel {margin-top:6px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-mode-note {padding:5px 8px;font-size:12px;line-height:1.4;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-secondary-settings {
    display:grid;grid-template-columns:minmax(0,1fr);gap:8px;
    margin:0;padding:8px 0 0;border-top:1px solid #e7e9e2;min-width:0;
    container-type:inline-size;container-name:output-options;
  }
  /* Output is a compact row, not a mostly empty vertical form column. */
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-output-control {
    display:grid;grid-template-columns:auto minmax(120px,160px) minmax(0,1fr);
    gap:6px 12px;align-items:center;margin:0;min-width:0;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-output-select {
    width:100%;max-width:180px;height:44px;margin:0;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-output-control .tpx-help {margin:0;max-width:42ch;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-option-list {
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 20px;
    align-items:start;margin:0;border:0;padding:0;min-width:0;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-option-row {
    min-height:44px;padding:4px 0;gap:12px;border:0;border-bottom:1px solid #eee9e2;align-items:center;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-option-row strong {display:block;font-size:13px;line-height:1.3;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-option-row p {display:block;font-size:12px;line-height:1.35;margin:3px 0 0;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-option-row:has(#manualResize) {grid-column:1;grid-row:1;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-option-row:has(#smartResize) {grid-column:2;grid-row:1;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-option-row:has(#removeMetadata) {grid-column:1/-1;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-resize-panel {grid-column:1/-1;grid-row:2;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-metadata-options {grid-column:1/-1;grid-row:auto;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-compress {
    width:min(100%,220px);height:44px;min-height:44px;margin-top:10px;align-self:flex-end;border-radius:12px;font-size:14px;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-settings :is(select,input[type="text"]) {max-width:100%;min-width:0;min-height:44px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-presets,
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-multiple-outputs {max-width:100%;min-width:0;}
  .tpx-page.has-tablet-workspace .tpx-paid-illustration {grid-column:2;grid-row:1;margin:0;padding:0;border:0;place-items:center;}
  .tpx-page.has-tablet-workspace .tpx-paid-illustration img {width:164px;height:auto;max-height:148px;object-fit:contain;}
  .tpx-page.has-tablet-workspace .tpx-paid-highlights {margin-top:8px;}
  .tpx-page.has-tablet-workspace .tpx-paid-trust {grid-column:1/-1;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-pro-card {margin-block:24px;padding:20px;gap:16px;border-radius:20px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-pro-card-hero {grid-template-columns:96px minmax(0,1fr);gap:20px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-pro-card-visual {width:96px;max-width:100%;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-pro-card-visual img {width:100%;height:auto;object-fit:contain;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-pro-card h2 {margin:5px 0 8px;font-size:clamp(23px,2.8vw,29px);max-width:30ch;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-pro-card p {font-size:14px;line-height:1.5;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-pro-benefits {grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-pro-benefits li {padding:12px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-pro-card-action {padding-top:14px;gap:16px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-features {margin-block:24px;container-type:inline-size;container-name:information-cards;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-features-heading {gap:20px;margin-bottom:16px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-features-heading h2 {font-size:28px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-features-heading > p {font-size:14px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-feature-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:stretch;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-feature-card {grid-template-columns:72px minmax(0,1fr);gap:12px;padding:16px;border-radius:18px;min-height:0;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-feature-card:last-child {grid-column:auto;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-feature-art {width:72px;height:auto;max-height:96px;object-fit:contain;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-feature-copy h3 {font-size:22px;margin:5px 0 8px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-feature-copy p {font-size:14px;line-height:1.45;margin-bottom:10px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-feature-copy a,
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-feature-footnote {font-size:13px;}
}
/* Landscape introduction is a shallow tool header, not a marketing card.
   Its height follows the text; artwork no longer sets a 132px floor. */
@media (min-width:641px) and (max-width:1279px) and (orientation:landscape) {
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-intro-card {
    grid-template-columns:minmax(0,1fr) 112px;gap:10px 18px;padding:0 2px 8px;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-intro-copy h1 {
    margin:3px 0 4px;font-size:clamp(24px,2.2vw,28px);line-height:1.1;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-intro-copy > p {font-size:13px;line-height:1.35;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-intro-copy > .tpx-privacy-line {font-size:12px;margin-top:3px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-intro-card .tpx-rattie-art {width:112px;max-height:84px;height:auto;}
  .tpx-page.has-tablet-workspace .tpx-paid-illustration img {width:112px;max-height:96px;height:auto;}
}
/* The former 928px threshold stacked both panels on intermediate landscape
   windows. At 840px of real content, 36/64 leaves ~295px upload and ~525px
   settings: each component can still fit its controls and descriptions. */
@container tablet-workspace (min-width:840px) {
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-workbench {
    grid-template-columns:var(--workspace-columns,minmax(0,36fr) minmax(0,64fr));
    grid-template-areas:"upload settings";gap:20px;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-workbench > .tpx-settings {
    padding-top:0;border-top:0;padding-inline-start:16px;border-inline-start:1px solid #e7e9e2;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-output-variant {grid-template-columns:repeat(2,minmax(0,1fr));}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-output-variant > strong {grid-column:1/-1;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-output-variant button {justify-self:end;}
}
@container output-options (max-width:519px) {
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-option-list {grid-template-columns:minmax(0,1fr);}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-option-row:has(input),
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-resize-panel {grid-column:1;grid-row:auto;}
}
@container output-options (max-width:399px) {
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-output-control {grid-template-columns:auto minmax(0,180px);}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-output-control .tpx-help {grid-column:1/-1;}
}
@container compression-mode (min-width:400px) {
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-mode-tabs {grid-template-columns:repeat(4,minmax(0,1fr));width:min(100%,400px);}
}

/* Every card keeps one track. No third-card span at any adaptive width. */
@container information-cards (min-width:840px) {
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-feature-grid {grid-template-columns:repeat(3,minmax(0,1fr));}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-feature-card {grid-template-columns:60px minmax(0,1fr);gap:12px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-feature-art {width:60px;max-height:84px;}
}

/* Output is real functionality in the shorter upload column, never filler.
   JS moves the same field only when the container uses two columns. */
@media (min-width:641px) {
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .has-workspace-output .tpx-workspace > .tpx-output-control {
    grid-template-columns:auto minmax(0,180px);justify-content:start;
    margin-top:12px;padding-top:12px;border-top:1px solid #e7e9e2;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .has-workspace-output .tpx-workspace .tpx-output-control .tpx-help {grid-column:1/-1;max-width:48ch;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .has-workspace-output .tpx-secondary-settings {padding-top:0;border-top:0;}
}
/* Only the empty state changes. Populated tables keep all existing rules. */
.tpx-page:not(.tpx-tool-page) .history:has(.empty-history) .history-table thead {display:none;}
.tpx-page:not(.tpx-tool-page) .history:has(.empty-history) .history-table,
.tpx-page:not(.tpx-tool-page) .history:has(.empty-history) .history-table tbody,
.tpx-page:not(.tpx-tool-page) .history:has(.empty-history) .history-table tr {display:block;width:100%;min-width:0;margin:0;padding:0;border:0;}
.tpx-page:not(.tpx-tool-page) .history:has(.empty-history) .empty-history {
  display:flex;align-items:center;flex-wrap:wrap;gap:6px;max-width:none;
  padding:8px 0!important;border:0;text-align:left!important;font-size:12px;line-height:1.4;
}
.tpx-page:not(.tpx-tool-page) .history:has(.empty-history) .empty-history br {display:none;}
.tpx-page:not(.tpx-tool-page) .history:has(.empty-history) .history-rattie {width:24px;height:24px;margin:0 2px 0 0;}
.tpx-page:not(.tpx-tool-page) .history:has(.empty-history) .history-head {align-items:center;}
.tpx-page:not(.tpx-tool-page) .history:has(.empty-history) .history-head h3 {font-size:18px;}
.tpx-page:not(.tpx-tool-page) .history:has(.empty-history) .history-note {margin-top:3px;max-width:none;}
.tpx-page:not(.tpx-tool-page) .tpx-results:has(#results:empty) .history:has(.empty-history) {padding-top:12px;}

/* Desktop has its own content budget. Do not inherit tablet proportions or
   landscape typography merely because a laptop screen is wider than tall. */
@media (min-width:1280px) {
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) {
    --workspace-columns:minmax(0,44fr) minmax(0,56fr);
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) :is(.tpx-shell:not(.tpx-home-grid),.tpx-home-compressor) {
    width:calc(100% - 64px);max-width:1440px;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-grid {gap:20px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-workbench {padding:24px;gap:28px;border-radius:24px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-workbench > .tpx-settings {padding-inline-start:24px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-dropzone {padding:20px;gap:10px 12px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-dropzone h2 {font-size:23px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-select {font-size:15px;max-width:240px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-settings h2 {font-size:20px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-settings-grid {gap:16px;margin-top:8px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-mode-tabs {width:100%;max-width:520px;gap:6px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-mode-tabs span {font-size:14px;padding:8px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-mode-note {font-size:13px;padding:8px 10px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-option-row {padding-block:8px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-option-row strong {font-size:14px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-option-row p {font-size:13px;line-height:1.45;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-compress {font-size:15px;margin-top:16px;}
}

/* Desktop composition: introduction | upload/output | settings.
   1200px of container space provides ~255 / 348 / 557px before card padding.
   Smaller containers retain the approved tablet composition above. */
@media (min-width:1280px) {
 @container tablet-workspace (min-width:1200px) {
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-grid {
    grid-template-columns:minmax(0,22fr) minmax(0,30fr) minmax(0,48fr);
    grid-template-areas:"intro upload settings";gap:20px;align-items:stretch;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-workbench {display:contents;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-grid > .tpx-intro-card,
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-workbench > :is(.tpx-workspace,.tpx-settings) {
    padding:20px;border:1px solid #e8e2da;border-radius:20px;
    background:rgba(255,255,255,.94);box-shadow:0 10px 26px rgba(60,52,42,.055);
    height:auto;min-height:0;align-self:stretch;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-grid > .tpx-intro-card {
    display:flex;flex-direction:column;gap:20px;align-items:flex-start;justify-content:space-between;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-intro-copy h1 {
    font-size:clamp(26px,2.1vw,32px);line-height:1.12;max-width:18ch;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-intro-card .tpx-rattie-art {
    width:min(100%,220px);max-height:220px;height:auto;align-self:center;
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-dropzone {
    padding:16px;gap:10px;flex:1;align-content:space-evenly;grid-template-columns:28px minmax(0,1fr);
  }
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-upload-icon {width:28px;height:28px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-dropzone h2 {font-size:20px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-select {flex:0 1 auto;width:auto;max-width:100%;padding-inline:16px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-option-list {grid-template-columns:minmax(0,1fr);gap:4px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-home-grid .tpx-option-row:has(:is(#manualResize,#smartResize,#removeMetadata)) {grid-column:1;grid-row:auto;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-mode-tabs {max-width:100%;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-settings-grid {gap:10px;margin-top:4px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-option-row {padding-block:5px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-mode-note {padding:6px 10px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-compress {margin-top:8px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-pro-discovery {margin-top:4px;}
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-workspace > .tpx-output-control {flex:none;}

  /* Expanded controls grow naturally without stretching the two other cards. */
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-grid:has(:is(#qualityPanel,#targetPanel,#advancedSmartPanel,#manualResizePanel,#advancedMetadataOptions):not([hidden]),.tpx-pro-discovery[open]) > .tpx-intro-card,
  .tpx-page.has-tablet-workspace:not(.tpx-tool-page) .tpx-home-compressor .tpx-home-grid:has(:is(#qualityPanel,#targetPanel,#advancedSmartPanel,#manualResizePanel,#advancedMetadataOptions):not([hidden]),.tpx-pro-discovery[open]) .tpx-workbench > :is(.tpx-workspace,.tpx-settings) {align-self:start;}
 }
}
