/* Creator studio strip v7. Opt-in navigation glass; opaque editing surfaces.
   Reads the current ShowWeld theme and joins its existing refinement layer.
   Installed after the qualified v6 viewport stylesheet. */
@layer sw-studio-refinement {
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip {
    --strip-surface: var(--sw-layer-default, var(--surface-primary, rgb(var(--os-surface, 26 34 49))));
    --strip-raised: var(--sw-layer-raised, var(--surface-secondary, rgb(var(--os-surface, 32 43 57))));
    --strip-ink: var(--sw-studio-ink, var(--text-primary, rgb(var(--os-text, 235 241 255))));
    --strip-muted: var(--sw-studio-muted, var(--text-secondary, rgb(var(--os-muted, 159 177 201))));
    --strip-line: var(--sw-border-muted-color, var(--sw-studio-line, rgb(var(--os-border, 115 131 157))));
    --strip-accent: var(--accent-primary, rgb(var(--os-accent, 118 144 255)));
    display: flex !important;
    position: relative !important;
    z-index: 40 !important;
    flex: 0 0 auto !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    height: auto !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 6px 8px !important;
    box-sizing: border-box !important;
    border: 1px solid color-mix(in srgb, var(--strip-line) 40%, transparent) !important;
    border-radius: 12px !important;
    color: var(--strip-ink) !important;
    background: var(--strip-surface) !important;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 17%), 0 4px 14px rgb(0 0 0 / 8%) !important;
    overflow: visible !important;
  }
  @supports (backdrop-filter: blur(20px)) {
    #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip {
      background: color-mix(in srgb, var(--strip-surface) 81%, transparent) !important;
      backdrop-filter: blur(20px) saturate(170%) !important;
      -webkit-backdrop-filter: blur(20px) saturate(170%) !important;
    }
  }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip:has(.sw-studio-strip-menu[open]) { z-index: 140 !important; }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip__context {
    display: flex !important;
    align-items: center !important;
    flex: 0 1 252px !important;
    min-width: 155px !important;
    gap: 8px !important;
    padding: 0 !important;
  }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip__identity {
    flex: 0 0 auto !important;
    margin: 0 2px 0 0 !important;
    padding: 0 !important;
    color: var(--strip-ink) !important;
    font-size: 13px !important;
    line-height: 1.15 !important;
    font-weight: 700 !important;
    letter-spacing: -.01em !important;
    white-space: nowrap !important;
  }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip__field {
    display: block !important;
    position: relative !important;
    flex: 1 1 160px !important;
    min-width: 70px !important;
    width: 160px !important;
    max-width: 220px !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip__field > span {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
  }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip__field select {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 7px 25px 7px 10px !important;
    text-overflow: ellipsis !important;
    background-color: color-mix(in srgb, var(--strip-raised) 84%, transparent) !important;
  }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip :is(button,select,input,summary) {
    box-sizing: border-box !important;
    min-height: 36px !important;
    height: auto !important;
    border: 1px solid color-mix(in srgb, var(--strip-line) 55%, transparent) !important;
    border-radius: 8px !important;
    padding: 7px 10px !important;
    color: var(--strip-ink) !important;
    background: var(--strip-raised) !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 550 !important;
    line-height: 1.15 !important;
    text-transform: none !important;
    white-space: nowrap !important;
    box-shadow: none !important;
  }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip :is(button,summary) { cursor: pointer !important; }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip :is(button,select,input,summary):focus-visible {
    outline: 2px solid var(--strip-accent) !important;
    outline-offset: 2px !important;
  }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip :is(button,select,input):disabled { opacity: .48 !important; cursor: not-allowed !important; }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip button:not(:disabled):hover,
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip summary:hover {
    background: color-mix(in srgb, var(--strip-raised) 85%, var(--strip-accent)) !important;
  }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip__navigation {
    display: flex !important;
    flex: 1 1 0 !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    min-width: 68px !important;
    min-height: 36px !important;
    max-height: 42px !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 3px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: thin !important;
    overscroll-behavior: contain !important;
    scroll-padding-inline: 4px !important;
  }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip__navigation > button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    width: auto !important;
    gap: 5px !important;
    margin: 0 !important;
    padding: 7px 10px !important;
    border-color: transparent !important;
    color: var(--strip-muted) !important;
    background: transparent !important;
  }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip__navigation > button:is([aria-selected="true"],[aria-pressed="true"]) {
    color: var(--strip-ink) !important;
    border-color: color-mix(in srgb, var(--strip-accent) 42%, transparent) !important;
    background: color-mix(in srgb, var(--strip-raised) 86%, var(--strip-accent)) !important;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 9%) !important;
  }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip__navigation svg { width: 15px !important; height: 15px !important; flex-shrink: 0 !important; }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip__actions {
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    flex-wrap: nowrap !important;
    min-width: 0 !important;
    gap: 6px !important;
    margin-left: auto !important;
    padding: 0 !important;
  }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip__actions > :is(button,details) { flex-shrink: 0 !important; }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip .sw-studio-strip__save {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    min-width: 58px !important;
    border-color: color-mix(in srgb, var(--strip-accent) 54%, transparent) !important;
    background: color-mix(in srgb, var(--strip-raised) 78%, var(--strip-accent)) !important;
    font-weight: 650 !important;
  }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip__status {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    min-width: 0 !important;
    max-width: 140px !important;
    margin: 0 3px 0 0 !important;
    color: var(--strip-muted) !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip__status-dot { width: 6px !important; height: 6px !important; flex: 0 0 6px !important; border-radius: 50% !important; background: var(--strip-accent) !important; }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip__status[data-save-state="saved"] .sw-studio-strip__status-dot { background: var(--success, #71b8a5) !important; }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip__status[data-save-state="error"] .sw-studio-strip__status-dot { background: var(--danger, #f28f98) !important; }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip-menu { position: static !important; margin: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip-menu > summary { display: flex !important; align-items: center !important; justify-content: center !important; gap: 5px !important; list-style: none !important; max-width: 180px !important; }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip-menu > summary::-webkit-details-marker { display: none !important; }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip-menu:not([open]) > .sw-studio-strip-menu__body { display: none !important; }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip-menu__body {
    position: absolute !important;
    z-index: 150 !important;
    top: calc(100% + 6px) !important;
    right: 4px !important;
    left: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
    width: min(340px, calc(100% - 8px)) !important;
    max-width: calc(100% - 8px) !important;
    max-height: min(64dvh, 620px) !important;
    box-sizing: border-box !important;
    padding: 12px !important;
    margin: 0 !important;
    border: 1px solid var(--strip-line) !important;
    border-radius: 12px !important;
    color: var(--strip-ink) !important;
    background: var(--strip-surface) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: var(--sw-shadow-overlay, 0 12px 36px rgb(0 0 0 / 28%)) !important;
    overflow: auto !important;
    overscroll-behavior: contain !important;
  }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip-menu__body > div { display: flex !important; flex-direction: column !important; gap: 7px !important; min-width: 0 !important; padding: 0 !important; }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip-menu__body button { flex: 0 0 auto !important; justify-content: flex-start !important; text-align: left !important; width: 100% !important; white-space: normal !important; }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip-menu__body :is(input,select) { width: 100% !important; max-width: 100% !important; min-width: 0 !important; }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip-menu__body :is(.prism-field,.sw-visual-field) { display: grid !important; gap: 5px !important; margin: 0 !important; }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip-menu__body :is(small,.sw-studio-strip-menu__meta) { color: var(--strip-muted) !important; font-size: 12px !important; line-height: 1.4 !important; margin: 0 !important; overflow-wrap: anywhere !important; }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip-menu__title { font-size: 13px !important; line-height: 1.3 !important; margin: 0 !important; }
  #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip-menu__body hr { width: 100% !important; border: 0 !important; border-top: 1px solid var(--strip-line) !important; margin: 3px 0 !important; }

  /* The new strip replaces separate header rows; the qualified editor body
     continues to receive all remaining height. */
  #showweld-app-root#showweld-app-root#showweld-app-root #dashboard-spark:has(> .sw-studio-strip) {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
  }
  #showweld-app-root#showweld-app-root#showweld-app-root [data-dashboard-stage="visual"] .sw-visual-dashboard { gap: 0 !important; }
  #showweld-app-root#showweld-app-root#showweld-app-root #dashboard-visual > .sw-studio-strip { border-radius: 11px 11px 0 0 !important; }
  #showweld-app-root#showweld-app-root#showweld-app-root #dashboard-prism .sw-studio-strip { border-radius: 11px 11px 0 0 !important; }
  #showweld-app-root#showweld-app-root#showweld-app-root #dashboard-prism .sw-studio-strip__context { flex-basis: 420px !important; min-width: 265px !important; }
  #showweld-app-root#showweld-app-root#showweld-app-root #dashboard-prism .prism-studio-commands { justify-content: flex-start !important; }
  #showweld-app-root#showweld-app-root#showweld-app-root #dashboard-visual .sw-visual-tab-count { min-width: 17px !important; padding: 2px 4px !important; font-size: 11px !important; }

  /* Picture: one revision line, compact native format controls, and one
     shared scrollable tool slot for Direction or the selected Inspector. */
  #showweld-app-root #dashboard-visual .sw-visual-draft-bar {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    min-height: 42px !important;
    gap: 10px !important;
    padding: 4px 10px !important;
  }
  #showweld-app-root #dashboard-visual .sw-visual-draft-bar > div { display: flex !important; align-items: baseline !important; flex: 1 1 0 !important; min-width: 0 !important; gap: 10px !important; }
  #showweld-app-root #dashboard-visual .sw-visual-draft-bar strong { white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; font-size: 12px !important; }
  #showweld-app-root #dashboard-visual .sw-visual-draft-bar span { flex-shrink: 0 !important; font-size: 12px !important; }
  #showweld-app-root #dashboard-visual .sw-visual-draft-bar > button { flex: 0 0 auto !important; min-height: 34px !important; padding: 6px 10px !important; font-size: 12px !important; white-space: nowrap !important; }
  #showweld-app-root #dashboard-visual .sw-visual-native .pb-studio-project-drawer > summary { min-height: 30px !important; padding: 4px 10px !important; line-height: 1.2 !important; }
  #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-toolbar { flex-wrap: nowrap !important; min-height: 44px !important; padding: 4px 8px !important; gap: 8px !important; }
  #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-toolbar :is(button,select,summary) { min-height: 34px !important; padding: 6px 9px !important; font-size: 12px !important; line-height: 1.15 !important; white-space: nowrap !important; }
  #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-format-select { display: flex !important; align-items: center !important; gap: 6px !important; min-width: 0 !important; width: auto !important; flex: 1 1 190px !important; }
  #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-format-select select { min-width: 0 !important; max-width: 270px !important; width: 100% !important; }
  #showweld-app-root #dashboard-visual .sw-visual-native .pb-canvas-view-switch { flex: 0 0 auto !important; }
  #showweld-app-root #dashboard-visual .sw-visual-native .sw-media-view-options { flex: 0 0 auto !important; }
  #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-workspace { --picture-tools-row: 36px; }
  #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-workspace .pb-production-workspace-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    min-height: 36px !important;
    max-height: 36px !important;
    min-width: 0 !important;
    padding: 0 5px !important;
    gap: 3px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: thin !important;
    overscroll-behavior: contain !important;
  }
  #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-workspace .pb-production-workspace-tabs > button { flex: 0 0 auto !important; width: auto !important; min-width: 0 !important; min-height: 32px !important; height: 32px !important; padding: 5px 8px !important; font-size: 12px !important; line-height: 1.1 !important; white-space: nowrap !important; }
  #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-workspace .pb-production-workspace-tabs > button > span { display: none !important; }
  /* Native React emits hidden={!toolsOpen}; older native display:block rules
     outrank [hidden]. Restore that contract before sharing the grid slot. */
  #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-workspace .pb-production-inspector[hidden],
  #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-workspace[data-tools-open="false"] .pb-production-inspector { display: none !important; }
  #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-workspace[data-tools-open="true"] .pb-production-direction-dock { display: none !important; }
  #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-workspace[data-tools-open="false"] .pb-production-direction-dock { display: block !important; }
  @container creator-workspace (min-width: 680px) {
    #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-workspace .pb-production-stage-column {
      display: grid !important;
      grid-template-columns: clamp(124px, 13%, 176px) minmax(0, 1fr) clamp(250px, 28%, 340px) !important;
      grid-template-rows: var(--picture-tools-row) minmax(0, 1fr) !important;
    }
    #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-workspace .pb-production-stage { grid-column: 2 !important; grid-row: 1 / -1 !important; min-height: 0 !important; height: 100% !important; }
    #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-workspace .pb-production-sequence { grid-column: 1 !important; grid-row: 1 / -1 !important; display: flex !important; flex-direction: column !important; align-items: stretch !important; min-height: 0 !important; height: 100% !important; overflow-y: auto !important; }
    #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-workspace .pb-production-workspace-tabs { grid-column: 3 !important; grid-row: 1 !important; }
    #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-workspace :is(.pb-production-direction-dock,.pb-production-inspector) {
      grid-column: 3 !important;
      grid-row: 2 !important;
      min-height: 0 !important;
      height: 100% !important;
      max-height: 100% !important;
      overflow-y: auto !important;
      overscroll-behavior: contain !important;
    }
  }
  @container creator-workspace (min-width: 680px) and (max-width: 999px) {
    #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-workspace .pb-production-stage-column { grid-template-columns: 96px minmax(0, 1fr) 244px !important; }
  }
  #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-canvas__empty {
    display: flex !important;
    flex-direction: column !important;
    justify-content: safe center !important;
    align-items: center !important;
    gap: 8px !important;
    padding: clamp(10px, 2cqw, 22px) !important;
    overflow: auto !important;
    overscroll-behavior: contain !important;
  }
  #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-canvas__empty > * { flex-shrink: 0 !important; }
  #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-canvas__empty > svg { width: 30px !important; height: 30px !important; }
  #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-canvas__empty > strong { color: inherit !important; font-size: 13px !important; line-height: 1.3 !important; }
  #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-canvas__empty > span { color: inherit !important; font-size: 12px !important; line-height: 1.4 !important; }

  @container creator-workspace (max-width: 1000px) {
    #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip__context { flex-basis: 205px !important; }
    #showweld-app-root#showweld-app-root#showweld-app-root #dashboard-prism .sw-studio-strip__context { flex-basis: 340px !important; }
    #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip__status > span:last-child { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip-path: inset(50%) !important; }
    #showweld-app-root #dashboard-visual .sw-visual-draft-bar > div span { display: none !important; }
  }
  @container creator-workspace (max-width: 760px) {
    #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip {
      display: grid !important;
      grid-template-columns: minmax(0, 1fr) auto !important;
      grid-template-areas: "context actions" "navigation navigation" !important;
      gap: 5px 8px !important;
    }
    #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip__context { grid-area: context !important; min-width: 0 !important; }
    #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip__actions { grid-area: actions !important; }
    #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip__navigation { grid-area: navigation !important; min-width: 0 !important; }
    #showweld-app-root#showweld-app-root#showweld-app-root #dashboard-prism .sw-studio-strip { grid-template-areas: "context context" "navigation actions" !important; }
    #showweld-app-root#showweld-app-root#showweld-app-root #dashboard-prism .sw-studio-strip__context { min-width: 0 !important; }
    #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip__field { max-width: none !important; }
    #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip-menu > summary { max-width: 160px !important; }
  }
  @container creator-workspace (max-width: 460px) {
    #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip__identity { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip-path: inset(50%) !important; }
    #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip-menu > summary { max-width: 136px !important; overflow: hidden !important; text-overflow: ellipsis !important; }
    #showweld-app-root #dashboard-visual .sw-visual-draft-bar > button { max-width: 180px !important; font-size: 12px !important; }
  }

  /* Compact desktop is the default, even when the browser reports no primary
     pointer. Touch-capable or narrow screens retain 44px targets. */
  @media (max-width: 900px), (any-pointer: coarse) {
    #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip :is(button,select,input,summary) { min-height: 44px !important; }
    #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip__navigation { min-height: 44px !important; max-height: 50px !important; }
    #showweld-app-root #dashboard-visual .sw-visual-draft-bar > button,
    #showweld-app-root #dashboard-visual .sw-visual-native .pb-studio-project-drawer > summary,
    #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-toolbar :is(button,select,summary) { min-height: 44px !important; }
    #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-workspace .pb-production-workspace-tabs { min-height: 48px !important; max-height: 48px !important; }
    #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-workspace .pb-production-workspace-tabs > button { min-height: 44px !important; height: 44px !important; }
    #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-workspace { --picture-tools-row: 48px; }
  }
  @media (max-width: 760px) {
    #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip :is(select,input) { font-size: 16px !important; }
    #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-toolbar { flex-wrap: wrap !important; }
    #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-format-select { flex: 1 1 100% !important; }
    #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-format-select select { max-width: none !important; }
  }
  @media (prefers-reduced-motion: reduce) {
    #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip,
    #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  }
  @media (prefers-reduced-transparency: reduce) {
    #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip { background: var(--strip-surface) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  }
  html[data-ph-material-quality="low"] #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip { background: var(--strip-surface) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  @media (prefers-contrast: more) {
    #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip,
    #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip-menu__body { background: var(--strip-surface) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; border-width: 2px !important; }
    #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip :is(button,select,input,summary) { border-width: 2px !important; }
  }
  @media (forced-colors: active) {
    #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip,
    #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip-menu__body { background: Canvas !important; color: CanvasText !important; border-color: ButtonText !important; backdrop-filter: none !important; box-shadow: none !important; }
    #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip :is(button,select,input,summary) { border-color: ButtonText !important; color: ButtonText !important; background: ButtonFace !important; }
    #showweld-app-root#showweld-app-root#showweld-app-root .sw-studio-strip :is([aria-selected="true"],[aria-pressed="true"]) { outline: 2px solid Highlight !important; outline-offset: -2px !important; }
  }
}

/* V8 narrow Picture workspace correction.
   Generic native creator rules reserve a large fixed bottom dock and collapse
   the editing deck. The dashboard has its own navigation and needs one local
   content scroller below its project, revision and format controls. */
@layer sw-studio-refinement {
  @container creator-workspace (max-width: 679px) {
    #showweld-app-root #dashboard-visual .sw-visual-native [data-showweld-studio][data-cockpit-active-route="canvas"] .visual-cockpit-layout {
      display: flex !important;
      flex-direction: column !important;
      flex: 1 1 0 !important;
      height: 0 !important;
      min-height: 0 !important;
      max-height: none !important;
      padding: 0 !important;
      padding-block-end: 0 !important;
      scroll-padding-block-end: 0 !important;
      gap: 0 !important;
      overflow: hidden !important;
    }
    #showweld-app-root #dashboard-visual .sw-visual-native [data-showweld-studio][data-cockpit-active-route="canvas"] :is(#visual-stories-stage,.pb-studio-stage,.pb-production-workspace) {
      display: flex !important;
      flex-direction: column !important;
      flex: 1 1 0 !important;
      height: 0 !important;
      min-height: 0 !important;
      max-height: none !important;
      gap: 0 !important;
      padding: 0 !important;
      padding-block-end: 0 !important;
      scroll-padding-block-end: 0 !important;
      overflow: hidden !important;
    }
    #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-workspace .pb-production-workspace__body {
      display: block !important;
      flex: 1 1 0 !important;
      height: 0 !important;
      min-height: 0 !important;
      max-height: none !important;
      overflow-x: hidden !important;
      overflow-y: auto !important;
      overscroll-behavior: contain !important;
      scroll-padding-block: 8px !important;
      scrollbar-gutter: auto !important;
      -webkit-overflow-scrolling: touch;
    }
    #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-workspace .pb-production-stage-column {
      display: flex !important;
      flex-direction: column !important;
      flex: 0 0 auto !important;
      height: auto !important;
      min-height: 100% !important;
      max-height: none !important;
      overflow: visible !important;
    }
    #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-workspace .pb-production-stage {
      display: flex !important;
      flex-direction: column !important;
      flex: 0 0 auto !important;
      height: clamp(250px, 36dvh, 340px) !important;
      min-height: 250px !important;
      max-height: none !important;
      overflow: hidden !important;
    }
    #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-workspace .sw-studio-editing-deck {
      display: flex !important;
      flex-direction: column !important;
      flex: 0 0 auto !important;
      height: auto !important;
      min-height: 0 !important;
      max-height: none !important;
      overflow: visible !important;
    }
    #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-workspace .pb-production-sequence {
      display: flex !important;
      flex-direction: column !important;
      align-items: stretch !important;
      flex: 0 0 auto !important;
      height: auto !important;
      min-height: 0 !important;
      max-height: none !important;
      padding: 8px !important;
      overflow: hidden !important;
    }
    #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-workspace .pb-production-sequence__rail {
      display: flex !important;
      flex-direction: row !important;
      flex-wrap: nowrap !important;
      min-width: 0 !important;
      max-height: 114px !important;
      overflow-x: auto !important;
      overflow-y: hidden !important;
      overscroll-behavior: contain !important;
    }
    #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-workspace .pb-production-sequence__rail > button { flex: 0 0 132px !important; min-width: 132px !important; }
    #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-workspace .pb-production-workspace-tabs {
      position: sticky !important;
      top: 0 !important;
      z-index: 12 !important;
      flex: 0 0 auto !important;
      background: var(--sw-layer-default, var(--sw-studio-surface, var(--surface-primary))) !important;
    }
    #showweld-app-root #dashboard-visual .sw-visual-native .pb-production-workspace :is(.pb-production-direction-dock,.pb-production-inspector) {
      position: static !important;
      flex: 0 0 auto !important;
      height: auto !important;
      min-height: 0 !important;
      max-height: none !important;
      overflow: visible !important;
      scroll-margin-top: 56px !important;
    }
  }
}

/* V8h1 Prism preset labels. Keep the existing two-column grid; stack each
   card's title and description within its full available width. */
@layer sw-studio-refinement {
  #showweld-app-root #dashboard-prism .prism-content-presets > button {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 0 !important;
    text-align: left !important;
  }
  #showweld-app-root #dashboard-prism .prism-content-presets > button > :is(strong,small) {
    width: 100% !important;
    min-width: 0 !important;
    white-space: normal !important;
    text-align: left !important;
  }
}
