/* Existing page surfaces and colours are retained. Tablet is a usable workspace
   from 600 CSS pixels; smaller phones retain their original entry behaviour. */
.zmt-phone-tool-handoff { display:none; }
@media screen and (max-width:599px) {
  .zmt-phone-tool-handoff { display:block; }
  .zmt-phone-tool-handoff+.zmt-tablet-tool-content { display:none !important; }
}
@media screen and (min-width:600px) {
  .zfd .zfd-device-note { display:none; }
  body #zmt-markcard-root #app .zmt-markcard-settings .mx-4.w-full { width:calc(100% - 32px); }
  body #zmt-markcard-root #app .zmt-markcard-preview [class~="group/card"][style*="transform: scale("] { width:max-content; max-width:none; }
}

@media screen and (min-width:1180px) {
  body #zmt-markcard-root { height:calc(100dvh - 75px); min-height:0; }
  body #zmt-markcard-root #app .zmt-markcard-app>footer>[class~="left-1/2"] { left:50% !important; width:max-content !important; max-width:calc(100% - 48px); height:36px !important; }
}
@media screen and (min-width:1280px) {
  body #zmt-markcard-root { height:calc(100dvh - 86px); }
}
/* The fixed-height card editor has room in its footer, but the full mascot
   covered format controls and the export button on landscape workspaces. */
@media screen and (min-width:1180px) {
  body.zmt-markcard-studio-page .guide-shell[data-guide-shadow-mount]>.guide-shell__launcher {
    inset-inline-end:190px; inset-block-end:0;
    width:100px !important; min-width:100px !important; height:44px !important; min-height:44px !important;
    border-radius:10px; animation:none;
  }
  body.zmt-markcard-studio-page .guide-shell[data-guide-shadow-mount] .guide-shell__launcher-character,
  body.zmt-markcard-studio-page .guide-shell[data-guide-shadow-mount] .guide-shell__launcher-kicker,
  body.zmt-markcard-studio-page .guide-shell[data-guide-shadow-mount] .guide-shell__launcher-copy>small,
  body.zmt-markcard-studio-page .guide-shell[data-guide-shadow-mount] .guide-shell__launcher::before,
  body.zmt-markcard-studio-page .guide-shell[data-guide-shadow-mount] .guide-shell__launcher-copy::after { display:none !important; }
  body.zmt-markcard-studio-page .guide-shell[data-guide-shadow-mount] .guide-shell__launcher-copy {
    inset:0 !important; width:100% !important; min-height:44px !important; height:44px !important; padding:0 32px 0 12px !important;
    border-radius:10px !important; box-shadow:none; animation:none;
  }
  body.zmt-markcard-studio-page .guide-shell[data-guide-shadow-mount] .guide-shell__launcher-copy>strong {
    position:static; width:auto; height:auto; clip:auto; overflow:visible;
    font-family:inherit; font-size:14px; line-height:1.5;
  }
}
@media screen and (min-width:600px) and (max-width:1099px),
       screen and (min-width:600px) and (hover:none),
       screen and (min-width:600px) and (pointer:coarse) {
  .zmt-media-tool.is-desktop-ready>.zmt-media-desktop-gate { display:none !important; }
  .zmt-media-tool.is-desktop-ready>:not(.zmt-media-desktop-gate):not(.zmt-media-toast):not([hidden]) { display:block !important; }
}
@media screen and (min-width:600px) and (max-width:1439px) {
  body.zmt-unified-workbench-page { min-width:0 !important; }
  body.zmt-unified-workbench-page .zmtw-desktop-gate { display:none !important; }
  body.zmt-unified-workbench-page .zmtw-shell.zmtw-shell {
    display:grid !important; min-width:0 !important; width:100%;
    grid-template-columns:180px minmax(0,1fr);
  }
  .zmtw-shell.zmtw-shell .zmtw-workspace,.zmtw-shell.zmtw-shell .zmtw-main { min-width:0; }
  .zmtw-shell.zmtw-shell .zmtw-topbar { flex-wrap:wrap; height:auto; min-height:72px; padding:14px 18px; gap:12px; }
  .zmtw-shell.zmtw-shell .zmtw-top-actions { flex-wrap:wrap; min-width:0; }
  .zmtw-shell.zmtw-shell .zmtw-main { padding:22px 18px 40px; }
  .zmtw-shell.zmtw-shell .zmtw-profile-layout { grid-template-columns:minmax(0,1fr); }
  .zmtw-shell.zmtw-shell .zmtw-account-switcher { min-width:0; max-width:100%; }
  .zmtw-shell.zmtw-shell .zmtw-feature-capabilities { grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); }
  .zmtw-shell.zmtw-shell .zmtw-view { min-width:0; }
  .zmtw-shell.zmtw-shell .zmtw-select-wrap select { max-width:100%; }
  .zmtw-shell.zmtw-shell :is(button,input,select,textarea) { max-width:100%; }
  .zmtw-shell.zmtw-shell :is(.zmtw-profile-layout,.zmtw-benchmark-layout,.zmtw-diagnosis-layout,.zmtw-growth-layout,.zmtw-strategy-layout) { min-width:0; }
  .zmtw-shell.zmtw-shell .zmth-embedded .zmtu-workspace { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .zmtw-shell.zmtw-shell .zmtcdr-app { min-width:0; width:100%; }
  .zmtw-shell.zmtw-shell .zmtw-jq-editor { grid-template-columns:minmax(0,1fr); }
  .zmtw-shell.zmtw-shell .zmtw-jq-checkout { grid-template-columns:minmax(0,1fr) auto; border-top-width:1px; }
  .zmtw-shell.zmtw-shell .zmtw-jq-checkout-step { grid-column:1/-1; }
  .zmtw-shell.zmtw-shell .zmtvs-workbench.is-embedded { margin:0; }

  /* The matrix planner had a hard 1280px canvas with no narrow-screen layout. */
  .zmtam-app.zmtam-app { min-width:0; width:100%; grid-template-columns:150px minmax(0,1fr); }
  .zmtam-app .zmtam-main { min-width:0; padding:24px 20px; }
  .zmtam-app .zmtam-layout { grid-template-columns:minmax(0,1fr); }
  .zmtam-app .zmtam-summary { position:static; }
  .zmtam-app .zmtam-hero { grid-template-columns:minmax(0,1fr); padding:28px; }
  .zmtam-app :is(.zmtam-panel,.zmtam-hero-copy,.zmtam-editor) { min-width:0; }
  .zmtam-app .zmtam-panel { padding:24px; }
  .zmtam-app .zmtam-panel-head { grid-template-columns:44px minmax(0,1fr); gap:14px; }
  .zmtam-app .zmtam-panel-head>:is(.zmtam-button,.zmtam-export-actions) { grid-column:1/-1; margin-left:0; }
  .zmtam-app :is(.zmtam-product-bar,.zmtam-hero-actions,.zmtam-panel-actions,.zmtam-export-actions) { flex-wrap:wrap; height:auto; }
  .zmtam-app .zmtam-product-bar { min-height:76px; padding:14px 20px; }
  .zmtam-app .zmtam-product-bar>* { min-width:0; }
}

@media screen and (min-width:600px) and (max-width:1199px) {
  /* Every OPC column is visible without discovering an invisible scrollbar. */
  .opc-base-page .opc-mobile-nav { align-items:start; gap:10px; }
  .opc-base-page .opc-mobile-nav-list { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); white-space:normal; overflow:visible; gap:7px; }
  .opc-base-page .opc-mobile-nav-list>a { min-width:0; min-height:44px; justify-content:center; padding:8px 6px; }
  .opc-base-page .opc-mobile-nav-list>a>span { min-width:0; overflow-wrap:anywhere; line-height:1.5; }
  .opc-base-page .opc-mobile-nav-list>a>svg { flex:none; }
  .opc-base-page .opc-mobile-nav-toggle { min-height:44px; }

  .zfd .zfd-device-note { display:none; }
  .zmt-sop-mobile-summary { display:none !important; }
}

@media screen and (min-width:600px) and (max-width:1179px) {
  .zmtw-shell.zmtw-shell .zmtw-mode-row { grid-template-columns:minmax(0,1fr) auto; }
  .zmtw-shell.zmtw-shell .zmtw-mode-note { grid-column:1/-1; white-space:normal; }
  /* Show the original workspaces, not their phone handoff cards. [hidden] still
     controls real membership gates, dialogs, results and inactive panels. */
  :is(.zmt-dn-handwriting,.zmt-dn-markcard,.zmt-ic-desktop-notice,.zmt-im-desktop-notice,
      .zmt-ie-desktop-notice,.zmt-icrop-viewport-notice,.zmtip-desktop-required,
      .zmtkm-mobile-note,.zmt-lg-viewport-notice,.zmtopc-desktop-gate,
      .zmt-image-app>.zmt-desktop-notice) { display:none !important; }
  .zmt-dn-handwriting~#zmt-handwriting-app { display:block !important; }
  .zmt-dn-markcard~:is(.zmt-markcard-gate,.zmt-markcard-root):not([hidden]) { display:block !important; }
  :is(.zmt-image-cleanup,.zmt-image-matting,.zmt-image-enhance,.zmt-image-crop,
      .zmt-image-compress,.zmt-image-watermark,.zmt-link-growth,.zmtkm-shell):not([hidden]) { display:block !important; width:calc(100% - 32px); min-width:0; margin:24px auto 40px; }
  .zmt-ic .zmt-ic-app:not([hidden]) { display:block !important; }
  .zmtopc-shell[data-access="member"] .zmtopc-app:not([hidden]) { display:block !important; }
  .zmtopc-shell.zmtopc-shell[data-access="member"] .zmtopc-desktop-gate { display:none !important; }
  .zmtopc-shell .zmtopc-app { min-width:0; }
  .zmtip-shell>.zmtip-hero:not([hidden]) { display:grid !important; }
  .zmtip-shell>.zmtip-app:not([hidden]) { display:grid !important; }
  .zmtip-shell>.zmtip-gate:not([hidden]) { display:block !important; }
  .zmtip-shell>.zmtip-dialog[open],.zmtip-shell>.zmtip-project-drawer.is-open { display:block !important; }
  .zmtip-shell>.zmtip-toast:not([hidden]) { display:block !important; }
  .zmtip-shell.zmtip-shell { min-width:0; width:100%; padding:20px 16px; }
  .zmtip-shell .zmtip-hero { grid-template-columns:minmax(0,1fr); max-height:none; padding:28px; }
  .zmtip-shell .zmtip-hero-copy { flex-wrap:wrap; }
  .zmtip-shell .zmtip-app { grid-template-columns:minmax(0,1fr); }
  .zmtip-shell .zmtip-interview-layout { grid-template-columns:minmax(0,1fr); }
  .zmtip-shell .zmtip-hero-map { min-width:0; }
  .zmtip-shell .zmtip-phase-tabs { flex-wrap:wrap; }
  .zmtip-shell .zmtip-phase-tabs button { min-height:44px; }

  :is(.zmt-image-cleanup,.zmt-image-matting,.zmt-image-enhance,.zmt-image-crop,
      .zmt-image-compress,.zmt-image-watermark,.zmt-ic,.zmt-link-growth) * { min-width:0; }
  :is(.zmt-image-cleanup,.zmt-image-matting,.zmt-image-enhance,.zmt-image-crop,
      .zmt-image-compress,.zmt-image-watermark,.zmt-ic,.zmt-link-growth) :is(button,input,select,textarea) { max-width:100%; }
  .zmt-image-cleanup .zmt-ic-hero,.zmt-image-compress .zmt-ic-hero,
  .zmt-image-matting .zmt-im-hero,.zmt-image-enhance .zmt-ie-hero,
  .zmt-image-crop .zmt-icrop-hero,.zmt-image-watermark .zmt-iw-hero,
  .zmt-link-growth .zmt-lg-hero { grid-template-columns:minmax(0,1fr); gap:24px; padding:28px; }
  .zmt-image-cleanup .zmt-ic-workspace,.zmt-image-matting .zmt-im-workspace,
  .zmt-image-enhance .zmt-ie-layout,.zmt-image-crop .zmt-icrop-layout,
  .zmt-image-compress .zmt-ic-workspace,.zmt-image-watermark .zmt-iw-workspace,
  .zmt-link-growth .zmt-lg-qr-layout,.zmt-link-growth .zmt-lg-link-layout { grid-template-columns:minmax(0,1fr); gap:20px; }
  .zmt-image-matting .zmt-im-benefits { grid-template-columns:repeat(3,minmax(0,1fr)); }
  :is(.zmt-ie-service,.zmt-im-service,.zmt-ic-service,.zmt-icrop-service) { min-width:0; }
  .zmt-link-growth .zmt-lg-qr-preview { min-width:0; }
  .zmt-link-growth :is(.zmt-lg-downloads,.zmt-lg-preview-actions,.zmt-lg-button-row) { display:flex; flex-wrap:wrap; }
  .zmt-link-growth .zmt-lg-preview-stage { min-height:420px; }
  .zmt-image-crop .zmt-icrop-presets { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .zmt-image-crop .zmt-icrop-results-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .zmt-image-enhance .zmt-ie-dropzone { min-height:380px; }
  .zmt-image-cleanup .zmt-ic-canvas-stage { min-height:380px; }
  .zmt-ic .zmt-ic-workspace { grid-template-columns:220px minmax(0,1fr); min-height:0; }
  .zmt-ic .zmt-ic-canvas-area { min-width:0; }
  .zmt-ic .zmt-ic-side-pane:not(.zmt-ic-layout-pane) { grid-column:1/-1; }
  .zmt-ic .zmt-ic-canvas-shell { width:100%; min-width:0; }

  body.zmt-unified-workbench-page .zmtw-shell.zmtw-shell { grid-template-columns:minmax(0,1fr); }
  .zmtw-shell.zmtw-shell .zmtw-workspace { grid-column:1; }
  .zmtw-shell.zmtw-shell .zmtw-mobile-nav-toggle { min-width:44px; min-height:44px; }

  .zmt-image-app.zmt-image-app { display:block; min-height:0; padding:20px 16px; }
  .zmt-image-app .zmt-image-shell { display:block !important; min-width:0; }
  .zmt-image-app .zmt-image-layout { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .zmt-image-app .zmt-result-panel { grid-column:1/-1; }
  .zmt-image-app .zmt-panel { min-width:0; }
  .zmt-image-app :is(.zmt-header,.zmt-header-tools,.zmt-header-actions) { flex-wrap:wrap; height:auto; }
  .zmt-image-app .zmt-preview-stage { min-height:380px; }

  body.zmt-markcard-studio-page { overflow:auto !important; }
  #zmt-markcard-root,body #zmt-markcard-root #app,body #zmt-markcard-root #app .zmt-markcard-app { min-width:0 !important; height:auto !important; min-height:calc(100dvh - 74px); overflow:visible !important; }
  body #zmt-markcard-root #app .zmt-markcard-workspace { grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important; grid-template-rows:auto auto !important; overflow:visible !important; height:auto !important; }
  body #zmt-markcard-root #app .zmt-markcard-editor { min-height:520px; height:520px !important; }
  body #zmt-markcard-root #app .zmt-markcard-preview { min-height:620px; height:620px !important; }
  body #zmt-markcard-root #app .zmt-markcard-settings { grid-column:1/-1; min-height:400px; }
  body #zmt-markcard-root #app .zmt-markcard-app>header { flex-wrap:wrap; height:auto; min-height:64px; padding-block:12px; gap:10px; }
  body #zmt-markcard-root #app .zmt-markcard-loading { min-width:0; }

  .zmt-handwriting-page #zmt-handwriting-app .hw-workspace { min-width:0; height:auto; overflow:visible; }
  .zmt-handwriting-page #zmt-handwriting-app .hw-desktop-only { display:none !important; }
  .zmt-handwriting-page #zmt-handwriting-app .hw-editor-pane,
  .zmt-handwriting-page #zmt-handwriting-app .hw-preview-pane,
  .zmt-handwriting-page #zmt-handwriting-app .hw-settings-pane { display:flex !important; min-width:0; }
  .zmt-handwriting-page #zmt-handwriting-app .hw-grid { grid-template-columns:240px minmax(0,1fr) 240px; }
  .zmt-handwriting-page #zmt-handwriting-app :is(.hw-editor-pane,.hw-preview-pane,.hw-settings-pane) { width:auto; }
  .zmt-handwriting-page #zmt-handwriting-app .hw-preview-pane { min-height:650px; }
  .zmt-handwriting-page #zmt-handwriting-app .hw-paper-center { min-width:0; width:100%; padding:24px 12px; }
  .zmt-handwriting-page #zmt-handwriting-app .hw-tool-header { flex-wrap:wrap; }

  .zmtkm-shell .zmtkm-workspace { grid-template-columns:minmax(0,1fr); }
  .zmtkm-shell .zmtkm-workspace .zmtkm-toolbar { flex-wrap:wrap; gap:10px; }
  .zmtkm-shell .zmtkm-demo-badge { margin-left:0; white-space:normal; }
  .zmtkm-shell .zmtkm-tabs { flex-wrap:wrap; gap:8px; }
  .zmtkm-shell .zmtkm-tabs button { min-height:44px; }
  .zmtkm-shell :is(.zmtkm-intelligence-body,.zmtkm-console,.zmtkm-command-row,.zmtkm-quote) { grid-template-columns:minmax(0,1fr); }
  .zmtkm-shell .zmtkm-intelligence-hero { padding:28px; }
  .zmtkm-shell .zmtkm-table-wrap { overflow-x:auto; }
  .zmtkm-shell :is(.zmtkm-form-grid,.zmtkm-filter-grid) { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .zmt-media-tool.zmt-media-tool { min-width:0; width:calc(100% - 32px); }
  .zmt-media-tool :is(.zmt-media-hero,.zmt-media-source-grid,.zmt-media-result-grid) { grid-template-columns:minmax(0,1fr); }
  .zmt-media-tool :is(.zmt-media-hero-actions,.zmt-media-input-actions,.zmt-media-result-actions) { flex-wrap:wrap; }
}

@media screen and (min-width:600px) and (max-width:1179px) {
  body #zmt-markcard-root #app .zmt-markcard-workspace>.zmt-markcard-editor { height:520px !important; min-height:520px !important; }
  body #zmt-markcard-root #app .zmt-markcard-workspace>.zmt-markcard-preview { height:620px !important; min-height:620px !important; }
  body #zmt-markcard-root #app .zmt-markcard-workspace>.zmt-markcard-settings { height:auto !important; min-height:400px !important; }
  body #zmt-markcard-root #app .zmt-markcard-settings .mx-4.w-full { width:calc(100% - 32px); }
}

@media screen and (min-width:600px) and (max-width:1179px) {
  body #zmt-markcard-root #app .zmt-markcard-app .zmt-markcard-workspace>.zmt-markcard-editor { height:520px !important; min-height:520px !important; }
  body #zmt-markcard-root #app .zmt-markcard-app .zmt-markcard-workspace>.zmt-markcard-preview { height:620px !important; min-height:620px !important; }
  body #zmt-markcard-root #app .zmt-markcard-app .zmt-markcard-workspace>.zmt-markcard-settings { height:auto !important; min-height:400px !important; }
  body #zmt-markcard-root #app .zmt-markcard-app>footer { height:auto; min-height:52px; flex-wrap:wrap; gap:12px; padding-block:12px; }
  body #zmt-markcard-root #app .zmt-markcard-app>footer>[class~="left-1/2"] { position:static !important; transform:none !important; translate:none !important; flex-wrap:wrap; height:auto !important; max-width:100%; }
}

/* Replace decorative selected-edge bars on the workbench tools being adapted. */
.zmtw-shell.zmtw-shell .zmtcdr-head { border-top-width:1px; }
.zmtw-shell.zmtw-shell .zmtcdr-view-tabs button.is-active { box-shadow:none; }
.zmtw-shell.zmtw-shell .zmth-embedded .zmtu-boundary { border-left-width:0; }

@media screen and (min-width:600px) and (max-width:959px) {
  .zmt-sop-root .metadata-strip { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .zmt-sop-root .metadata-strip>label { min-width:0; width:100%; }
  .zmt-sop-root .metadata-strip input { min-width:0; max-width:100%; width:100%; }
  .zmtw-shell.zmtw-shell .zmth-embedded .zmtu-workspace { grid-template-columns:minmax(0,1fr); }
  .zmtw-shell.zmtw-shell .zmth-embedded .zmtu-result-shell { position:static; min-width:0; }
  .zmtw-shell.zmtw-shell .zmtcdr-head { min-width:0; flex-wrap:wrap; gap:16px; padding:24px; }
  .zmtw-shell.zmtw-shell .zmtcdr-builder { padding:20px; }
  .zmtw-shell.zmtw-shell .zmtcdr-action-bar { flex-wrap:wrap; margin:24px -20px -20px; padding:18px 20px; }
  .zmtw-shell.zmtw-shell :is(.zmtcdr-source-switch,.zmtcdr-purpose-switch) { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .zmtw-shell.zmtw-shell .zmtcdr-result-layout { grid-template-columns:minmax(0,1fr); }
  .zmtw-shell.zmtw-shell .zmtw-xhs-view .zmtxhs-embedded-meta { grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; }
  .zmtw-shell.zmtw-shell .zmtw-xhs-view .zmtxhs-embedded-meta>span { min-width:0; }
  .zmtw-shell.zmtw-shell .zmtw-xhs-view .zmtxhs-embedded-status { min-width:0 !important; }
  .zmtw-shell.zmtw-shell .zmtw-topbar { display:flex; }
  .zmtw-shell.zmtw-shell .zmtw-topbar>* { max-width:100%; }
  .zmtw-shell.zmtw-shell .zmtw-profile-grid { grid-template-columns:1fr; }
  .zmtam-app.zmtam-app { grid-template-columns:minmax(0,1fr); grid-template-rows:auto auto auto; }
  .zmtam-app .zmtam-product-bar { grid-column:1; }
  .zmtam-app .zmtam-sidebar { position:static; grid-row:2; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; width:auto; height:auto; padding:16px; }
  .zmtam-app .zmtam-main { grid-column:1; grid-row:3; }
  .zmtam-app :is(.zmtam-field-grid,.zmtam-outcomes,.zmtam-mode-list) { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .zmtam-app :is(.zmtam-platform-grid,.zmtam-team-grid) { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .opc-base-page .opc-mobile-nav-list { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .zmt-image-app .zmt-image-layout { grid-template-columns:minmax(0,1fr); }
  .zmt-image-app .zmt-result-panel { grid-column:auto; }
  .zmt-ic .zmt-ic-workspace { grid-template-columns:minmax(0,1fr); }
  .zmt-ic .zmt-ic-side-pane:not(.zmt-ic-layout-pane) { grid-column:auto; }
  .zmt-ic .zmt-ic-layout-gallery { grid-template-columns:repeat(3,minmax(0,1fr)); max-height:300px; }
  body #zmt-markcard-root #app .zmt-markcard-workspace { grid-template-columns:minmax(0,1fr) !important; }
  body #zmt-markcard-root #app .zmt-markcard-settings { grid-column:auto; }
  .zmt-handwriting-page #zmt-handwriting-app .hw-grid { grid-template-columns:minmax(0,1fr); display:grid; }
  .zmt-handwriting-page #zmt-handwriting-app :is(.hw-editor-pane,.hw-preview-pane,.hw-settings-pane) { width:auto; }
  .zmt-handwriting-page #zmt-handwriting-app .hw-editor-pane,
  .zmt-handwriting-page #zmt-handwriting-app .hw-settings-pane { min-height:400px; }
}
