/*
 * DreamFlow responsive layout correction, 2026-10-28.
 * CSS-only overrides for the desktop canvas toolbar and template overview filters.
 * Loaded after the existing application CSS. No app logic or interactions are changed.
 */

@media screen and (min-width: 901px) and (max-width: 1600px) {
  html.web-shell .workspace-topbar--single-row {
    box-sizing: border-box !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: clamp(3px, .35vw, 7px) !important;
    padding-left: clamp(4px, .55vw, 10px) !important;
    padding-right: clamp(4px, .55vw, 10px) !important;
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
  }

  html.web-shell .workspace-title-area--single-row {
    flex: 0 1 clamp(185px, 18vw, 270px) !important;
    min-width: 145px !important;
    max-width: 270px !important;
    gap: 6px !important;
  }

  html.web-shell .workspace-title-area--single-row .workspace-brand-icon {
    flex: 0 0 28px !important;
    width: 28px !important;
    height: 28px !important;
    object-fit: contain !important;
  }

  html.web-shell .workspace-title-area--single-row .back-button {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    white-space: nowrap !important;
  }

  html.web-shell .workspace-title-area--single-row .workspace-project-title-field {
    flex: 1 1 64px !important;
    min-width: 36px !important;
    max-width: 100px !important;
  }

  html.web-shell .workspace-single-actions {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: clamp(2px, .3vw, 5px) !important;
  }

  html.web-shell .workspace-single-actions > button {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    max-width: clamp(36px, 7.5vw, 112px) !important;
    padding-left: clamp(4px, .5vw, 8px) !important;
    padding-right: clamp(4px, .5vw, 8px) !important;
    font-size: clamp(10px, .78vw, 12px) !important;
    white-space: nowrap !important;
  }

  html.web-shell .workspace-single-actions > .workspace-points-static {
    flex: 0 1 84px !important;
    width: 84px !important;
    min-width: 66px !important;
    max-width: 84px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  html.web-shell .workspace-single-actions .workspace-points-static__label {
    font-size: 10px !important;
  }

  html.web-shell .workspace-single-actions .workspace-points-static__value {
    max-width: 100% !important;
    font-size: 11px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  html.web-shell .workspace-single-actions > .workspace-account-button {
    max-width: 94px !important;
  }

  html.web-shell .workspace-single-actions > .workspace-model-market-entry {
    max-width: 105px !important;
  }

  html.web-shell .workspace-single-actions > .workspace-asset-library-entry {
    max-width: 82px !important;
  }

  html.web-shell .workspace-single-actions > .workspace-theme-icon {
    flex: 0 0 34px !important;
    width: 34px !important;
    min-width: 34px !important;
  }

  html.web-shell .df-toolbar-enhance {
    flex: 0 1 clamp(190px, 19vw, 285px) !important;
    width: clamp(190px, 19vw, 285px) !important;
    min-width: 0 !important;
    max-width: 285px !important;
  }

  html.web-shell .df-toolbar-enhance button {
    min-width: 0 !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    font-size: clamp(10px, .78vw, 12px) !important;
  }

  html.web-shell .df-global-director-launcher {
    flex: 0 1 clamp(220px, 18vw, 300px) !important;
    width: clamp(220px, 18vw, 300px) !important;
    min-width: 0 !important;
    max-width: 300px !important;
  }

  html.web-shell .df-global-director-launcher__main {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    padding-left: clamp(6px, .7vw, 12px) !important;
    padding-right: clamp(6px, .7vw, 12px) !important;
  }

  html.web-shell .df-global-director-launcher__main > b {
    min-width: 0 !important;
    max-width: clamp(105px, 10vw, 165px) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html.web-shell .df-global-director-launcher__arrow {
    flex: 0 0 30px !important;
    width: 30px !important;
    min-width: 30px !important;
  }

  html.web-shell .template-center--overview[data-v280-typography="cinematic-luxury"] .template-overview__discover[data-v286-discover="industry-compact"] {
    box-sizing: border-box !important;
    width: min(555px, calc(100vw - 32px)) !important;
    max-width: calc(100vw - 32px) !important;
    grid-template-columns: minmax(190px, 205px) minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  html.web-shell .template-center--overview[data-v280-typography="cinematic-luxury"] .template-overview__discover[data-v286-discover="industry-compact"] .template-overview__industry-select--v284 {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: 74px minmax(0, 1fr) 16px !important;
    column-gap: 5px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  html.web-shell .template-center--overview[data-v280-typography="cinematic-luxury"] .template-overview__discover[data-v286-discover="industry-compact"] .template-overview__industry-label {
    min-width: 0 !important;
    font-size: 10px !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
  }

  html.web-shell .template-center--overview[data-v280-typography="cinematic-luxury"] .template-overview__discover[data-v286-discover="industry-compact"] .template-overview__industry-value {
    box-sizing: border-box !important;
    min-width: 0 !important;
    padding-left: 7px !important;
    font-size: 10.5px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html.web-shell .template-center--overview[data-v280-typography="cinematic-luxury"] .template-overview__discover[data-v286-discover="industry-compact"] .template-overview__industry-caret {
    min-width: 0 !important;
    font-size: 12px !important;
    text-align: center !important;
  }

  html.web-shell .template-center--overview[data-v280-typography="cinematic-luxury"] .template-overview__discover[data-v286-discover="industry-compact"] .template-overview__search-field {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  html.web-shell .template-center--overview[data-v280-typography="cinematic-luxury"] .template-overview__discover[data-v286-discover="industry-compact"] .template-overview__search-field input {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
  }
}

@media screen and (min-width: 901px) and (max-width: 1366px) {
  html.web-shell .workspace-title-area--single-row {
    flex-basis: 190px !important;
    min-width: 138px !important;
    gap: 4px !important;
  }

  html.web-shell .workspace-title-area--single-row .back-button {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  html.web-shell .workspace-title-area--single-row .workspace-project-title-field {
    max-width: 66px !important;
    min-width: 28px !important;
  }

  html.web-shell .workspace-single-actions {
    gap: 3px !important;
  }

  html.web-shell .workspace-single-actions > button {
    padding-left: 5px !important;
    padding-right: 5px !important;
    font-size: 10.5px !important;
  }

  html.web-shell .workspace-single-actions > .workspace-points-static {
    flex-basis: 72px !important;
    width: 72px !important;
    min-width: 64px !important;
    max-width: 72px !important;
  }

  html.web-shell .workspace-single-actions > .workspace-account-button {
    max-width: 84px !important;
  }

  html.web-shell .workspace-single-actions > .workspace-model-market-entry {
    max-width: 94px !important;
  }

  html.web-shell .workspace-single-actions > .workspace-asset-library-entry {
    max-width: 74px !important;
  }

  html.web-shell .df-toolbar-enhance {
    flex-basis: 220px !important;
    width: 220px !important;
    max-width: 220px !important;
  }

  html.web-shell .df-toolbar-enhance button {
    padding-left: 5px !important;
    padding-right: 5px !important;
    font-size: 10.5px !important;
  }

  html.web-shell .df-global-director-launcher {
    flex-basis: 215px !important;
    width: 215px !important;
    max-width: 215px !important;
  }

  html.web-shell .df-global-director-launcher__main {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  html.web-shell .df-global-director-launcher__main > b {
    max-width: 118px !important;
  }

  html.web-shell .template-center--overview[data-v280-typography="cinematic-luxury"] .template-overview__discover[data-v286-discover="industry-compact"] {
    right: 16px !important;
    width: min(520px, calc(100vw - 32px)) !important;
    max-width: calc(100vw - 32px) !important;
    grid-template-columns: minmax(168px, .72fr) minmax(0, 1.28fr) !important;
    gap: 8px !important;
  }

  html.web-shell .template-center--overview[data-v280-typography="cinematic-luxury"] .template-overview__discover[data-v286-discover="industry-compact"] .template-overview__industry-select--v284 {
    grid-template-columns: 62px minmax(0, 1fr) 14px !important;
    column-gap: 4px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  html.web-shell .template-center--overview[data-v280-typography="cinematic-luxury"] .template-overview__discover[data-v286-discover="industry-compact"] .template-overview__industry-label {
    font-size: 10px !important;
  }

  html.web-shell .template-center--overview[data-v280-typography="cinematic-luxury"] .template-overview__discover[data-v286-discover="industry-compact"] .template-overview__industry-value {
    padding-left: 5px !important;
    font-size: 10px !important;
  }

  html.web-shell .template-center--overview[data-v280-typography="cinematic-luxury"] .template-overview__discover[data-v286-discover="industry-compact"] .template-overview__industry-caret {
    font-size: 11px !important;
  }

  html.web-shell .template-center--overview[data-v280-typography="cinematic-luxury"] .template-overview__discover[data-v286-discover="industry-compact"] .template-overview__search-field {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}

@media screen and (min-width: 901px) and (max-width: 1180px) {
  html.web-shell .workspace-title-area--single-row {
    flex-basis: 142px !important;
    min-width: 112px !important;
  }

  html.web-shell .workspace-title-area--single-row .workspace-brand-icon {
    flex-basis: 24px !important;
    width: 24px !important;
    height: 24px !important;
  }

  html.web-shell .workspace-title-area--single-row .back-button {
    padding-left: 4px !important;
    padding-right: 4px !important;
    font-size: 10px !important;
  }

  html.web-shell .workspace-title-area--single-row .workspace-project-title-field {
    max-width: 42px !important;
    min-width: 22px !important;
  }

  html.web-shell .workspace-single-actions > button {
    padding-left: 4px !important;
    padding-right: 4px !important;
    font-size: 10px !important;
  }

  html.web-shell .workspace-single-actions > .workspace-points-static {
    flex-basis: 62px !important;
    width: 62px !important;
    min-width: 58px !important;
    max-width: 62px !important;
  }

  html.web-shell .workspace-single-actions > .workspace-account-button {
    max-width: 70px !important;
  }

  html.web-shell .workspace-single-actions > .workspace-model-market-entry {
    max-width: 76px !important;
  }

  html.web-shell .workspace-single-actions > .workspace-asset-library-entry {
    max-width: 62px !important;
  }

  html.web-shell .df-toolbar-enhance {
    flex-basis: 155px !important;
    width: 155px !important;
    max-width: 155px !important;
  }

  html.web-shell .df-global-director-launcher {
    flex-basis: 165px !important;
    width: 165px !important;
    max-width: 165px !important;
  }

  html.web-shell .df-global-director-launcher__main > b {
    max-width: 80px !important;
  }

  html.web-shell .template-center--overview[data-v280-typography="cinematic-luxury"] .template-overview__discover[data-v286-discover="industry-compact"] {
    width: min(480px, calc(100vw - 32px)) !important;
    grid-template-columns: minmax(154px, .72fr) minmax(0, 1.28fr) !important;
  }

  html.web-shell .template-center--overview[data-v280-typography="cinematic-luxury"] .template-overview__discover[data-v286-discover="industry-compact"] .template-overview__industry-select--v284 {
    grid-template-columns: 56px minmax(0, 1fr) 14px !important;
    column-gap: 3px !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
  }

  html.web-shell .template-center--overview[data-v280-typography="cinematic-luxury"] .template-overview__discover[data-v286-discover="industry-compact"] .template-overview__industry-label {
    font-size: 9.5px !important;
  }
}
