/* Mobile-only presentation layer. Production business markup stays unchanged. */
@media (max-width: 820px) {
  .customer-app .mobile-only-panel { display: none !important; }
  .customer-app .mobile-editor-v1-sheet-grabber { display: none; }

  :root {
    --mobile-topbar: 48px;
    --mobile-dock: 68px;
    --editor-bg: #080d0c;
    --editor-surface: #101715;
    --editor-surface-raised: #151d1a;
    --editor-ink: #edf2ed;
    --editor-muted: #98a49d;
    --editor-line: rgba(237, 242, 237, .14);
    --editor-focus: #b8ff3d;
    --editor-selection: #28d7e5;
    --editor-canvas: #ecefed;
  }

  html:has(#editorView:not([hidden])),
  body:has(#editorView:not([hidden])) {
    overflow: hidden !important;
    background: var(--editor-bg) !important;
  }

  .customer-app .editor-shell:not([hidden]) {
    position: fixed !important;
    inset: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: 100dvh !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: var(--editor-bg) !important;
  }

  .customer-app .editor-shell > .topbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 44px !important;
    flex: 0 0 var(--mobile-topbar) !important;
    height: var(--mobile-topbar) !important;
    min-height: var(--mobile-topbar) !important;
    margin: 0 !important;
    padding: 2px 8px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--editor-line) !important;
    border-radius: 0 !important;
    background: var(--editor-bg) !important;
  }

  .customer-app .editor-shell .topbar .brand,
  .customer-app .editor-shell .top-actions #draftStatus,
  .customer-app .editor-shell .top-actions #editorTopMoreBtn,
  .customer-app .editor-shell .top-actions .editor-desktop-tutorial,
  .customer-app .editor-shell .top-actions #undoBtn,
  .customer-app .editor-shell .top-actions #redoBtn {
    display: none !important;
  }

  .customer-app .editor-shell .top-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, .92fr) minmax(0, .92fr) !important;
    align-items: center !important;
    gap: 5px !important;
    width: 100% !important;
    height: 44px !important;
    min-width: 0 !important;
  }

  .customer-app .editor-shell .top-actions #backToCatalogBtn,
  .customer-app .editor-shell .top-actions #restoreDraftBtn,
  .customer-app .editor-shell .top-actions #saveDraftBtn {
    display: grid !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    place-items: center !important;
    margin: 0 !important;
    padding: 0 7px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    grid-area: auto !important;
    order: initial !important;
  }

  .customer-app .editor-shell .top-actions #backToCatalogBtn {
    order: 1 !important;
    color: var(--editor-muted) !important;
    border-color: transparent !important;
    background: transparent !important;
  }

  .customer-app .editor-shell .top-actions #backToCatalogBtn::before { content: none !important; }

  .customer-app .editor-shell .top-actions #restoreDraftBtn {
    order: 2 !important;
    color: var(--editor-ink) !important;
    border-color: var(--editor-line) !important;
    background: rgba(255, 255, 255, .035) !important;
  }

  .customer-app .editor-shell .top-actions #saveDraftBtn {
    order: 3 !important;
    color: #071010 !important;
    border-color: var(--editor-focus) !important;
    background: var(--editor-focus) !important;
  }

  .customer-app .editor-shell .top-actions button:active { transform: scale(.98); }

  .customer-app .editor-shell > .editor-progress,
  .customer-app .editor-shell > .editor-flow-caption,
  .customer-app .studio > .toolbox-jump,
  .customer-app .studio > .product-panel,
  .customer-app .studio > .edit-panel,
  .customer-app .editor-shell .editor-mobile-dock,
  .customer-app .editor-shell .editor-action-dock,
  .customer-app .editor-shell .mobile-editor-controls,
  .customer-app .editor-shell .canvas-command-rail { display: none !important; }

  .customer-app .editor-shell .studio {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 0 calc(var(--mobile-dock) + env(safe-area-inset-bottom)) !important;
    overflow: hidden !important;
    background: var(--editor-bg) !important;
  }

  .customer-app .editor-shell .studio > .stage-panel {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 8px !important;
    overflow: hidden !important;
    background: var(--editor-bg) !important;
  }

  .customer-app .editor-shell .stage-header {
    display: grid !important;
    flex: 0 0 44px !important;
    grid-template-columns: minmax(0, 1fr) 116px !important;
    grid-template-rows: 44px !important;
    gap: 6px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .customer-app .editor-shell .stage-header > div:first-child { display: none !important; }

  .customer-app .editor-shell .stage-actions {
    position: relative !important;
    display: grid !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    width: 116px !important;
    max-width: 116px !important;
    height: 44px !important;
    min-height: 44px !important;
    gap: 2px !important;
    padding: 2px !important;
    border: 1px solid var(--editor-line) !important;
    border-radius: 7px !important;
    background: var(--editor-surface) !important;
  }

  .customer-app .editor-shell .stage-actions::before {
    content: "" !important;
    position: absolute !important;
    top: 2px !important;
    bottom: 2px !important;
    left: 2px !important;
    width: calc(50% - 3px) !important;
    border-radius: 5px !important;
    background: var(--editor-focus) !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .2) !important;
    transform: translateX(0) !important;
    transition: transform .18s cubic-bezier(.2, .8, .2, 1) !important;
  }

  .customer-app .editor-shell .stage-actions:has(#previewModeBtn.active)::before {
    transform: translateX(calc(100% + 2px)) !important;
  }

  .customer-app .editor-shell .stage-header > .stage-actions {
    min-height: 44px !important;
    height: 44px !important;
  }

  .customer-app .editor-shell .stage-actions .mode-button {
    position: relative !important;
    z-index: 1 !important;
    display: grid !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 38px !important;
    min-height: 38px !important;
    place-items: center !important;
    margin: 0 !important;
    padding: 0 4px !important;
    border: 0 !important;
    border-radius: 5px !important;
    color: var(--editor-muted) !important;
    background: transparent !important;
    font-size: 11px !important;
    line-height: 1 !important;
  }

  .customer-app .editor-shell .stage-actions .mode-button.active {
    background: transparent !important;
  }

  .customer-app .editor-shell .stage-actions #designModeBtn { color: #071010 !important; }
  .customer-app .editor-shell .stage-actions #previewModeBtn { color: var(--editor-muted) !important; }
  .customer-app .editor-shell .stage-actions:has(#previewModeBtn.active) #designModeBtn { color: var(--editor-muted) !important; }
  .customer-app .editor-shell .stage-actions:has(#previewModeBtn.active) #previewModeBtn { color: #071010 !important; }

  .customer-app .editor-shell .print-area-toolbar {
    position: static !important;
    inset: auto !important;
    display: grid !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    grid-template-columns: minmax(0, 1fr) 84px !important;
    grid-template-rows: 44px !important;
    align-items: stretch !important;
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    min-width: 0 !important;
    gap: 5px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  .customer-app .editor-shell .stage-header > .print-area-toolbar {
    min-height: 44px !important;
    height: 44px !important;
    max-height: 44px !important;
  }

  .customer-app .editor-shell .print-area-toolbar .print-area-status,
  .customer-app .editor-shell .print-area-toolbar .print-area-menu-trigger {
    min-width: 0 !important;
    min-height: 44px !important;
    height: 44px !important;
    max-width: 100% !important;
    border-radius: 7px !important;
  }

  .customer-app .editor-shell .print-area-toolbar .print-area-status {
    display: grid !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    grid-template-rows: 18px 16px !important;
    align-content: center !important;
    column-gap: 6px !important;
    padding: 4px 8px !important;
    overflow: hidden !important;
    border: 1px solid rgba(40, 215, 229, .25) !important;
    background: rgba(40, 215, 229, .055) !important;
  }

  .customer-app .editor-shell .print-area-toolbar .print-area-status span {
    grid-column: 1 !important;
    grid-row: 1 / -1 !important;
    align-self: center !important;
    color: var(--editor-selection) !important;
    font-size: 9px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .customer-app .editor-shell .print-area-toolbar .print-area-status strong,
  .customer-app .editor-shell .print-area-toolbar .print-area-status small {
    grid-column: 2 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .customer-app .editor-shell .print-area-toolbar .print-area-status strong {
    grid-row: 1 !important;
    color: var(--editor-ink) !important;
    font-size: 11px !important;
    line-height: 1 !important;
  }

  .customer-app .editor-shell .print-area-toolbar .print-area-status small {
    grid-row: 2 !important;
    margin: 0 !important;
    color: var(--editor-muted) !important;
    font-size: 8px !important;
    line-height: 1 !important;
  }

  .customer-app .editor-shell .print-area-toolbar .print-area-menu-trigger {
    display: grid !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    grid-template-columns: minmax(0, 1fr) 16px !important;
    grid-template-rows: 16px 16px !important;
    align-content: center !important;
    padding: 4px 7px !important;
    border: 1px solid var(--editor-line) !important;
    color: var(--editor-ink) !important;
    background: rgba(255, 255, 255, .035) !important;
    text-align: left !important;
  }

  .customer-app .editor-shell .print-area-toolbar .print-area-menu-trigger > span,
  .customer-app .editor-shell .print-area-toolbar .print-area-menu-trigger > strong {
    grid-column: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .customer-app .editor-shell .print-area-toolbar .print-area-menu-trigger > span {
    grid-row: 1 !important;
    color: var(--editor-muted) !important;
    font-size: 8px !important;
  }

  .customer-app .editor-shell .print-area-toolbar .print-area-menu-trigger > strong {
    grid-row: 2 !important;
    color: var(--editor-ink) !important;
    font-size: 10px !important;
  }

  .customer-app .editor-shell .print-area-toolbar .print-area-menu-trigger > i {
    grid-column: 2 !important;
    grid-row: 1 / -1 !important;
    align-self: center !important;
    color: var(--editor-selection) !important;
    font-size: 18px !important;
    font-style: normal !important;
  }

  .customer-app .editor-shell .canvas-workbar {
    display: flex !important;
    flex: 0 0 44px !important;
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 0 4px !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: flex-start !important;
  }

  .customer-app .editor-shell .canvas-workbar .canvas-position-switcher {
    display: flex !important;
    flex: 0 1 auto !important;
    gap: 2px !important;
    width: auto !important;
    max-width: 100% !important;
    height: 44px !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    overscroll-behavior-x: contain !important;
  }

  .customer-app .editor-shell .canvas-workbar .canvas-position-switcher::-webkit-scrollbar { display: none !important; }

  .customer-app .editor-shell .canvas-position-switcher .side-button {
    flex: 0 0 74px !important;
    min-width: 74px !important;
    min-height: 44px !important;
    height: 44px !important;
    padding: 0 8px !important;
    border: 1px solid var(--editor-line) !important;
    border-radius: 6px !important;
    color: var(--editor-muted) !important;
    background: rgba(255, 255, 255, .025) !important;
    font-size: 11px !important;
  }

  .customer-app .editor-shell .canvas-position-switcher .side-button.active {
    border-color: rgba(40, 215, 229, .74) !important;
    color: #071010 !important;
    background: var(--editor-selection) !important;
  }

  .customer-app .editor-shell .canvas-workbar .canvas-save-action { display: none !important; }

  .customer-app .editor-shell .canvas-onboarding:not([hidden]) {
    display: grid !important;
    position: relative !important;
    flex: 0 0 44px !important;
    grid-template-columns: minmax(0, 1fr) 112px 44px !important;
    align-items: center !important;
    column-gap: 5px !important;
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    grid-template-rows: 44px !important;
    margin: 0 0 5px !important;
    padding: 0 4px 0 9px !important;
    overflow: hidden !important;
    border: 1px solid rgba(40, 215, 229, .24) !important;
    border-radius: 7px !important;
    background: rgba(40, 215, 229, .045) !important;
  }

  .customer-app .editor-shell .canvas-onboarding-kicker,
  .customer-app .editor-shell .canvas-onboarding p { display: none !important; }

  .customer-app .editor-shell .canvas-onboarding h2 {
    min-width: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    color: var(--editor-ink) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .customer-app .editor-shell .canvas-onboarding-actions { display: block !important; min-width: 0 !important; margin: 0 !important; }

  .customer-app .editor-shell .canvas-onboarding-actions .button.primary {
    display: grid !important;
    width: 112px !important;
    min-width: 112px !important;
    height: 40px !important;
    min-height: 40px !important;
    place-items: center !important;
    margin: 0 !important;
    padding: 0 5px !important;
    border-radius: 6px !important;
    color: #071010 !important;
    background: var(--editor-focus) !important;
    font-size: 10px !important;
    white-space: nowrap !important;
  }

  .customer-app .editor-shell .canvas-onboarding .canvas-onboarding-close {
    display: grid !important;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    place-items: center !important;
    border: 0 !important;
    border-radius: 5px !important;
    color: var(--editor-muted) !important;
    background: transparent !important;
  }

  .customer-app .editor-shell .canvas-shell {
    position: relative !important;
    display: flex !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    overscroll-behavior: none !important;
    touch-action: none !important;
    border: 1px solid rgba(12, 22, 18, .2) !important;
    border-radius: 10px !important;
    background: var(--editor-canvas) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .42), 0 12px 28px rgba(0, 0, 0, .18) !important;
  }

  .customer-app .editor-shell .canvas-workspace {
    position: relative !important;
    display: flex !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .customer-app .editor-shell .canvas-shell::before,
  .customer-app .editor-shell .canvas-shell::after { display: none !important; }

  .customer-app .editor-shell #designCanvas,
  .customer-app .editor-shell #webglCanvas {
    flex: 0 0 auto !important;
    max-width: none !important;
    max-height: none !important;
    margin: auto !important;
    transform-origin: 50% 50% !important;
    touch-action: none !important;
    will-change: transform !important;
  }

  .customer-app .editor-shell .canvas-workspace > .mobile-editor-v1-colorbar {
    position: absolute !important;
    top: 7px !important;
    right: 8px !important;
    left: 8px !important;
    z-index: 31 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: auto !important;
    height: 44px !important;
    min-height: 44px !important;
    gap: 4px !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    pointer-events: none !important;
  }

  .customer-app .editor-shell .canvas-workspace > .mobile-editor-v1-colorbar[hidden] { display: none !important; }

  .customer-app .editor-shell .canvas-workspace > .mobile-editor-v1-colorbar .mobile-editor-v1-product {
    display: inline-flex !important;
    flex: 0 0 76px !important;
    width: 76px !important;
    min-width: 76px !important;
    height: 40px !important;
    min-height: 40px !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    margin: 0 !important;
    padding: 0 6px !important;
    border: 1px solid rgba(12, 22, 18, .16) !important;
    border-radius: 999px !important;
    color: #17201b !important;
    background: rgba(255, 255, 255, .72) !important;
    box-shadow: 0 3px 10px rgba(8, 18, 12, .1) !important;
    pointer-events: auto !important;
  }

  .customer-app .editor-shell .canvas-workspace > .mobile-editor-v1-colorbar .mobile-editor-v1-product strong { color: inherit !important; font-size: 11px !important; font-weight: 700 !important; white-space: nowrap !important; }
  .customer-app .editor-shell .canvas-workspace > .mobile-editor-v1-colorbar .mobile-editor-v1-product small { color: inherit !important; font-size: 17px !important; line-height: 1 !important; }

  .customer-app .editor-shell .canvas-workspace > .mobile-editor-v1-colorbar .mobile-editor-v1-color-row {
    display: flex !important;
    flex: 1 1 auto !important;
    width: 0 !important;
    min-width: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    gap: 1px !important;
    align-items: center !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    pointer-events: auto !important;
  }

  .customer-app .editor-shell .canvas-workspace > .mobile-editor-v1-colorbar .mobile-editor-v1-color-row::-webkit-scrollbar { display: none !important; }

  .customer-app .editor-shell .canvas-workspace > .mobile-editor-v1-colorbar .mobile-editor-v1-color {
    display: grid !important;
    flex: 0 0 44px !important;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    place-items: center !important;
    padding: 7px !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .customer-app .editor-shell .canvas-workspace > .mobile-editor-v1-colorbar .mobile-editor-v1-color i,
  .customer-app .editor-shell .canvas-workspace > .mobile-editor-v1-colorbar .mobile-editor-v1-color img {
    display: block !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    box-shadow: inset 0 0 0 1px rgba(18, 27, 22, .13), 0 2px 7px rgba(8, 18, 12, .15) !important;
  }

  .customer-app .editor-shell .canvas-workspace > .mobile-editor-v1-colorbar .mobile-editor-v1-color span { display: none !important; }
  .customer-app .editor-shell .canvas-workspace > .mobile-editor-v1-colorbar .mobile-editor-v1-color.active { border: 0 !important; outline: none !important; background: transparent !important; box-shadow: none !important; }
  .customer-app .editor-shell .canvas-workspace > .mobile-editor-v1-colorbar .mobile-editor-v1-color.active i,
  .customer-app .editor-shell .canvas-workspace > .mobile-editor-v1-colorbar .mobile-editor-v1-color.active img { outline: 2px solid #18201b !important; outline-offset: 2px !important; }

  .customer-app .editor-shell .canvas-history-controls {
    position: absolute !important;
    top: 55px !important;
    left: 7px !important;
    z-index: 32 !important;
    display: flex !important;
    gap: 4px !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .customer-app .editor-shell .canvas-history-controls #canvasRecenterBtn { display: none !important; }

  .customer-app .editor-shell .canvas-history-controls #undoBtn,
  .customer-app .editor-shell .canvas-history-controls #redoBtn {
    display: grid !important;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    place-items: center !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    color: #19211c !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 30px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
  }

  .customer-app .editor-shell .canvas-history-controls #undoBtn:disabled,
  .customer-app .editor-shell .canvas-history-controls #redoBtn:disabled { color: #8c9690 !important; opacity: 1 !important; }

  .customer-app .editor-shell .mobile-editor-v1-rail {
    position: absolute !important;
    top: 50% !important;
    right: 8px !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 33 !important;
    display: grid !important;
    gap: 5px !important;
    width: 48px !important;
    transform: translateY(-50%) !important;
  }

  .customer-app .editor-shell .mobile-editor-v1-rail > button {
    display: grid !important;
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
    place-items: center !important;
    gap: 1px !important;
    padding: 4px !important;
    border: 1px solid rgba(20, 31, 26, .18) !important;
    border-radius: 8px !important;
    color: #15201a !important;
    background: rgba(255, 255, 255, .84) !important;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .14) !important;
  }

  .customer-app .editor-shell .mobile-editor-v1-rail > button svg { display: block !important; width: 19px !important; height: 19px !important; fill: none !important; stroke: currentColor !important; stroke-width: 1.8 !important; stroke-linecap: round !important; stroke-linejoin: round !important; }
  .customer-app .editor-shell .mobile-editor-v1-rail > button svg * { fill: none !important; stroke: currentColor !important; }
  .customer-app .editor-shell .mobile-editor-v1-rail > button small { color: currentColor !important; font-size: 8px !important; font-weight: 700 !important; line-height: 1 !important; }
  .customer-app .editor-shell .mobile-editor-v1-rail > button[data-active="true"],
  .customer-app .editor-shell .mobile-editor-v1-rail > #mobileEditorV1ZoomBtn.is-zoomed,
  .customer-app .editor-shell .mobile-editor-v1-rail > #mobileEditorV1OrderBtn { color: #071010 !important; border-color: var(--editor-focus) !important; background: var(--editor-focus) !important; }

  .customer-app .mobile-editor-v1-dock {
    position: fixed !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 940 !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    width: 100% !important;
    height: calc(var(--mobile-dock) + env(safe-area-inset-bottom)) !important;
    min-height: calc(var(--mobile-dock) + env(safe-area-inset-bottom)) !important;
    padding: 4px 7px max(5px, env(safe-area-inset-bottom)) !important;
    border: 0 !important;
    border-top: 1px solid var(--editor-line) !important;
    background: #0b1110 !important;
    box-shadow: 0 -10px 22px rgba(0, 0, 0, .22) !important;
  }

  .customer-app .mobile-editor-v1-dock button {
    display: grid !important;
    min-width: 0 !important;
    min-height: 54px !important;
    place-items: center !important;
    gap: 3px !important;
    padding: 5px 2px !important;
    border: 0 !important;
    border-radius: 5px !important;
    color: #7f8b84 !important;
    background: transparent !important;
    font: inherit !important;
  }

  .customer-app .mobile-editor-v1-dock button span,
  .customer-app .mobile-editor-v1-dock button svg { color: currentColor !important; stroke: currentColor !important; }
  .customer-app .mobile-editor-v1-dock button span { font-size: 18px !important; line-height: 1 !important; }
  .customer-app .mobile-editor-v1-dock button svg { width: 19px !important; height: 19px !important; fill: none !important; stroke-width: 1.7 !important; stroke-linecap: round !important; stroke-linejoin: round !important; }
  .customer-app .mobile-editor-v1-dock button strong { font-size: 10px !important; line-height: 1 !important; white-space: nowrap !important; }
  .customer-app .mobile-editor-v1-dock button.active { color: var(--editor-focus) !important; background: transparent !important; box-shadow: inset 0 2px 0 var(--editor-focus) !important; }
  .customer-app .mobile-editor-v1-dock button:focus-visible { outline: 2px solid var(--editor-selection) !important; outline-offset: -2px !important; }

  .customer-app .editor-shell .mobile-editor-v1-backdrop { position: fixed !important; inset: 0 !important; z-index: 950 !important; width: 100% !important; height: 100% !important; border: 0 !important; background: rgba(0, 0, 0, .44) !important; }

  .customer-app .editor-shell .studio.mobile-editor-v1-sheet-open:not(.mobile-editor-v1-layer-sheet) > .edit-panel {
    position: fixed !important;
    right: 0 !important;
    bottom: calc(var(--mobile-dock) + env(safe-area-inset-bottom)) !important;
    left: 0 !important;
    z-index: 960 !important;
    display: block !important;
    width: 100% !important;
    height: min(46dvh, 420px) !important;
    min-height: 220px !important;
    max-height: min(46dvh, 420px) !important;
    margin: 0 !important;
    padding: 10px 12px 16px !important;
    overflow: auto !important;
    border: 1px solid var(--editor-line) !important;
    border-bottom: 0 !important;
    border-radius: 12px 12px 0 0 !important;
    background: var(--editor-surface) !important;
    box-shadow: 0 -18px 44px rgba(0, 0, 0, .34) !important;
    transition: opacity .18s ease !important;
  }

  .customer-app .editor-shell .mobile-editor-v1-sheet-grabber {
    display: block !important;
    position: sticky !important;
    top: -10px !important;
    z-index: 8 !important;
    width: calc(100% + 24px) !important;
    min-height: 44px !important;
    height: 44px !important;
    margin: -10px -12px 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid var(--editor-line) !important;
    border-radius: 12px 12px 0 0 !important;
    color: var(--editor-muted) !important;
    background: var(--editor-surface) !important;
  }

  .customer-app .editor-shell .mobile-editor-v1-sheet-grabber[hidden] { display: none !important; }

  .customer-app .editor-shell .mobile-editor-v1-sheet-handle {
    display: grid !important;
    width: 96px !important;
    height: 44px !important;
    margin: 0 auto !important;
    place-items: center !important;
    border: 0 !important;
    color: inherit !important;
    background: transparent !important;
    cursor: grab !important;
    touch-action: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
  }

  .customer-app .editor-shell .mobile-editor-v1-sheet-handle span {
    display: block !important;
    width: 54px !important;
    height: 4px !important;
    border-radius: 999px !important;
    background: currentColor !important;
    opacity: .7 !important;
    transform: scaleX(.78) !important;
    transform-origin: center !important;
    transition: transform .18s ease, opacity .18s ease !important;
  }

  .mobile-editor-v1-sheet-dragging,
  .mobile-editor-v1-sheet-dragging * { cursor: grabbing !important; }
  .mobile-editor-v1-sheet-dragging .customer-app .editor-shell .studio.mobile-editor-v1-sheet-open > .edit-panel { overflow: hidden !important; }
  .customer-app .editor-shell .mobile-editor-v1-sheet-handle:active { cursor: grabbing !important; }
  .customer-app .editor-shell .mobile-editor-v1-sheet-handle:active span,
  .customer-app .editor-shell .mobile-editor-v1-sheet-handle:focus-visible span { transform: scaleX(1) !important; opacity: 1 !important; }
  .customer-app .editor-shell .mobile-editor-v1-sheet-handle:focus-visible { outline: 2px solid var(--editor-selection) !important; outline-offset: -4px !important; border-radius: 6px !important; }

  .customer-app .editor-shell .mobile-editor-v1-sheet-collapse {
    position: absolute !important;
    top: 0 !important;
    right: 4px !important;
    display: grid !important;
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    place-items: center !important;
    border: 1px solid rgba(237, 242, 237, .16) !important;
    border-radius: 6px !important;
    color: var(--editor-ink) !important;
    background: rgba(237, 242, 237, .06) !important;
  }
  .customer-app .editor-shell .mobile-editor-v1-sheet-collapse[hidden] { display: none !important; }
  .customer-app .editor-shell .mobile-editor-v1-sheet-collapse svg { width: 18px !important; height: 18px !important; fill: none !important; stroke: currentColor !important; stroke-width: 2 !important; stroke-linecap: round !important; stroke-linejoin: round !important; }
  .customer-app .editor-shell .mobile-editor-v1-sheet-collapse:active { background: rgba(184, 255, 61, .14) !important; transform: translateY(1px) !important; }
  .customer-app .editor-shell .mobile-editor-v1-sheet-collapse:focus-visible { outline: 2px solid var(--editor-focus) !important; outline-offset: 2px !important; }

  .customer-app .editor-shell .studio.mobile-editor-v1-sheet-open:not(.mobile-editor-v1-layer-sheet) > .edit-panel > .mobile-editor-v1-sheet-grabber + .mobile-editor-v1-sources { top: 34px !important; margin-top: 0 !important; }
  .customer-app .editor-shell .studio.mobile-editor-v1-sheet-expanded:not(.mobile-editor-v1-layer-sheet) > .edit-panel {
    top: max(8px, env(safe-area-inset-top)) !important;
    bottom: calc(var(--mobile-dock) + env(safe-area-inset-bottom) + 8px) !important;
    height: auto !important;
    max-height: none !important;
    border-radius: 12px !important;
  }

  .customer-app .editor-shell .studio.mobile-editor-v1-sheet-open:not(.mobile-editor-v1-layer-sheet) > .edit-panel > .toolbox-header { display: none !important; }
  .customer-app .editor-shell .studio.mobile-editor-v1-sheet-open:not(.mobile-editor-v1-layer-sheet) > .edit-panel > section { display: none !important; }
  .customer-app .editor-shell .studio.mobile-editor-v1-sheet-open[data-active-tool="toolUpload"] > .edit-panel #toolUpload,
  .customer-app .editor-shell .studio.mobile-editor-v1-sheet-open[data-active-tool="toolAiStyle"] > .edit-panel #toolAiStyle,
  .customer-app .editor-shell .studio.mobile-editor-v1-sheet-open[data-active-tool="artworkPanel"] > .edit-panel #artworkPanel,
  .customer-app .editor-shell .studio.mobile-editor-v1-sheet-open[data-active-tool="creatorArtworkPanel"] > .edit-panel #creatorArtworkPanel,
  .customer-app .editor-shell .studio.mobile-editor-v1-sheet-open[data-active-tool="myPanel"] > .edit-panel #myPanel,
  .customer-app .editor-shell .studio.mobile-editor-v1-sheet-open[data-active-tool="toolText"] > .edit-panel #toolText,
  .customer-app .editor-shell .studio.mobile-editor-v1-sheet-open[data-active-tool="toolShape"] > .edit-panel #toolShape,
  .customer-app .editor-shell .studio.mobile-editor-v1-sheet-open[data-active-tool="templatePanel"] > .edit-panel #templatePanel,
  .customer-app .editor-shell .studio.mobile-editor-v1-sheet-open[data-active-tool="contactQrPanel"] > .edit-panel #contactQrPanel,
  .customer-app .editor-shell .studio.mobile-editor-v1-sheet-open[data-active-tool="toolOrder"] > .edit-panel #toolOrder { display: block !important; }

  .customer-app .editor-shell .studio.mobile-editor-v1-sheet-open > .edit-panel .mobile-editor-v1-sources { position: sticky !important; top: -10px !important; z-index: 6 !important; display: flex !important; gap: 3px !important; margin: -10px -12px 10px !important; padding: 10px 12px 8px !important; overflow-x: auto !important; background: var(--editor-surface) !important; }
  .customer-app .editor-shell .studio.mobile-editor-v1-sheet-open[data-active-tool="toolText"] > .edit-panel .mobile-editor-v1-sources,
  .customer-app .editor-shell .studio.mobile-editor-v1-sheet-open[data-active-tool="toolUpload"] > .edit-panel .mobile-editor-v1-sources { display: none !important; }
  .customer-app .editor-shell .mobile-editor-v1-sources button { flex: 0 0 auto !important; min-width: 64px !important; min-height: 44px !important; padding: 0 9px !important; border: 1px solid var(--editor-line) !important; border-radius: 999px !important; color: var(--editor-muted) !important; background: transparent !important; font-size: 11px !important; white-space: nowrap !important; }
  .customer-app .editor-shell .mobile-editor-v1-sources button.active,
  .customer-app .editor-shell .mobile-editor-v1-sources button[aria-current="page"] { color: #071010 !important; border-color: var(--editor-focus) !important; background: var(--editor-focus) !important; }

  .customer-app .editor-shell .studio.mobile-editor-v1-sheet-open[data-active-tool="toolUpload"] > .edit-panel #toolUpload > .ai-quick-actions,
  .customer-app .editor-shell .studio.mobile-editor-v1-sheet-open[data-active-tool="toolUpload"] > .edit-panel #toolUpload > .ai-generator-panel,
  .customer-app .editor-shell .studio.mobile-editor-v1-sheet-open[data-active-tool="toolUpload"] > .edit-panel #toolUpload > .referral-poster-entry {
    display: none !important;
  }

  .customer-app .editor-shell .studio.mobile-editor-v1-sheet-open:not(.mobile-editor-v1-ai-sheet)[data-active-tool="toolUpload"] > .edit-panel #toolUpload > h2 {
    font-size: 0 !important;
  }

  .customer-app .editor-shell .studio.mobile-editor-v1-sheet-open:not(.mobile-editor-v1-ai-sheet)[data-active-tool="toolUpload"] > .edit-panel #toolUpload > h2::after {
    content: "上传照片" !important;
    font-size: 18px !important;
  }

  .customer-app .editor-shell .studio.mobile-editor-v1-ai-sheet[data-active-tool="toolUpload"] > .edit-panel #toolUpload > h2,
  .customer-app .editor-shell .studio.mobile-editor-v1-ai-sheet[data-active-tool="toolUpload"] > .edit-panel #toolUpload > .copyright-consent-bar,
  .customer-app .editor-shell .studio.mobile-editor-v1-ai-sheet[data-active-tool="toolUpload"] > .edit-panel #toolUpload > #assetUploadBox,
  .customer-app .editor-shell .studio.mobile-editor-v1-ai-sheet[data-active-tool="toolUpload"] > .edit-panel #toolUpload > .asset-upload-status,
  .customer-app .editor-shell .studio.mobile-editor-v1-ai-sheet[data-active-tool="toolUpload"] > .edit-panel #toolUpload > .hint-line {
    display: none !important;
  }

  .customer-app .editor-shell .studio.mobile-editor-v1-ai-sheet[data-active-tool="toolUpload"] > .edit-panel #toolUpload > .ai-generator-panel {
    display: block !important;
  }

  .customer-app .editor-shell #assetUploadBox > strong {
    font-size: 0 !important;
  }

  .customer-app .editor-shell #assetUploadBox > strong::after {
    content: "上传照片" !important;
    font-size: 14px !important;
  }

  .customer-app .editor-shell #contactQrPanel .contact-qr-upload {
    display: none !important;
  }

  .customer-app .editor-shell .editor-mobile-tools,
  .customer-app .editor-shell .canvas-layer-panel { border: 1px solid var(--editor-line) !important; border-radius: 12px 12px 8px 8px !important; background: var(--editor-surface) !important; box-shadow: 0 -18px 44px rgba(0, 0, 0, .34) !important; }
  .customer-app .editor-shell .canvas-layer-panel:not(.mobile-editor-v1-layer-sheet) { display: none !important; }
  .customer-app .editor-shell .studio.mobile-editor-v1-layer-sheet > .stage-panel {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  .customer-app .editor-shell .editor-mobile-tools { right: 8px !important; bottom: calc(var(--mobile-dock) + env(safe-area-inset-bottom) + 8px) !important; left: 8px !important; max-height: min(68dvh, 560px) !important; overflow: auto !important; }
  .customer-app .editor-shell .editor-mobile-tools-head,
  .customer-app .editor-shell .canvas-layer-panel .canvas-layer-head { border-bottom: 1px solid var(--editor-line) !important; background: var(--editor-surface) !important; }
  .customer-app .editor-shell .editor-mobile-tools-head > div > span,
  .customer-app .editor-shell .section-kicker { display: none !important; }
  .customer-app .editor-shell .editor-mobile-tool-grid { gap: 0 !important; }
  .customer-app .editor-shell .editor-mobile-tool-grid button { min-height: 56px !important; border-color: var(--editor-line) !important; border-radius: 0 !important; background: transparent !important; }

  .customer-app .editor-shell .canvas-layer-panel.mobile-editor-v1-layer-sheet { position: fixed !important; top: auto !important; right: 8px !important; bottom: calc(var(--mobile-dock) + env(safe-area-inset-bottom) + 8px) !important; left: 8px !important; z-index: 960 !important; display: flex !important; flex-direction: column !important; width: auto !important; max-height: min(68dvh, 590px) !important; margin: 0 !important; padding: 0 !important; overflow: hidden !important; border-color: rgba(40, 215, 229, .34) !important; border-radius: 14px 14px 8px 8px !important; }
  .customer-app .editor-shell .canvas-layer-panel.mobile-editor-v1-layer-sheet .canvas-layer-head { flex: 0 0 auto !important; min-height: 72px !important; margin: 0 !important; padding: 10px 12px 10px 14px !important; }
  .customer-app .editor-shell .canvas-layer-panel.mobile-editor-v1-layer-sheet .canvas-layer-head > div { display: grid !important; gap: 3px !important; min-width: 0 !important; }
  .customer-app .editor-shell .canvas-layer-panel.mobile-editor-v1-layer-sheet .canvas-layer-head strong { color: var(--editor-ink) !important; font-size: 20px !important; line-height: 1.1 !important; }
  .customer-app .editor-shell .canvas-layer-panel.mobile-editor-v1-layer-sheet .canvas-layer-head span { display: block !important; color: var(--editor-muted) !important; font-size: 12px !important; line-height: 1.2 !important; }
  .customer-app .editor-shell .canvas-layer-panel.mobile-editor-v1-layer-sheet .canvas-layer-head .icon-button { width: 44px !important; min-width: 44px !important; height: 44px !important; min-height: 44px !important; }
  .customer-app .editor-shell .canvas-layer-panel.mobile-editor-v1-layer-sheet.mobile-layer-panel-minimal .canvas-layer-head > div { display: none !important; }
  .customer-app .editor-shell .canvas-layer-panel.mobile-editor-v1-layer-sheet.mobile-layer-panel-minimal .canvas-layer-head { min-height: 54px !important; padding: 5px 12px !important; justify-content: flex-end !important; }
  .customer-app .editor-shell .canvas-layer-panel.mobile-editor-v1-layer-sheet .layer-list { display: grid !important; flex: 1 1 auto !important; gap: 0 !important; max-height: none !important; padding: 8px 10px 10px !important; overflow-x: hidden !important; overflow-y: auto !important; overscroll-behavior: contain !important; }
  .customer-app .editor-shell .canvas-layer-panel .layer-row { position: relative !important; display: grid !important; grid-template-columns: 56px 28px minmax(0, 1fr) 46px 46px !important; grid-template-rows: 56px 44px !important; gap: 8px !important; width: 100% !important; min-height: 124px !important; padding: 10px 4px !important; overflow: visible !important; border: 0 !important; border-bottom: 1px solid var(--editor-line) !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; transition: border-color 160ms ease, background-color 160ms ease, opacity 160ms ease !important; touch-action: none !important; }
  .customer-app .editor-shell .canvas-layer-panel .layer-row.active { border-bottom-color: rgba(184, 255, 61, .8) !important; background: rgba(184, 255, 61, .055) !important; }
  .customer-app .editor-shell .canvas-layer-panel .layer-row.is-drop-target { border-bottom-color: var(--editor-selection) !important; background: rgba(40, 215, 229, .08) !important; box-shadow: inset 0 2px 0 var(--editor-selection) !important; }
  .customer-app .editor-shell .canvas-layer-panel .layer-row.is-dragging { z-index: 2 !important; opacity: .84 !important; box-shadow: 0 12px 32px rgba(0, 0, 0, .34) !important; will-change: transform !important; }
  .customer-app .editor-shell .canvas-layer-panel .layer-thumbnail { grid-column: 1 !important; grid-row: 1 !important; width: 56px !important; height: 56px !important; min-height: 56px !important; border-radius: 7px !important; }
  .customer-app .editor-shell .canvas-layer-panel .mobile-layer-drag-handle { display: grid !important; grid-column: 2 !important; grid-row: 1 !important; width: 28px !important; height: 56px !important; place-items: center !important; color: var(--editor-selection) !important; cursor: grab !important; touch-action: none !important; }
  .customer-app .editor-shell .canvas-layer-panel .mobile-layer-drag-handle i { display: block !important; width: 18px !important; height: 28px !important; background-image: radial-gradient(circle, currentColor 0 2px, transparent 2.4px) !important; background-position: 1px 2px !important; background-size: 8px 8px !important; }
  .customer-app .editor-shell .canvas-layer-panel .layer-row.locked .mobile-layer-drag-handle { color: var(--editor-muted) !important; cursor: not-allowed !important; opacity: .45 !important; }
  .customer-app .editor-shell .canvas-layer-panel .layer-name { grid-column: 3 !important; grid-row: 1 !important; min-width: 0 !important; min-height: 56px !important; padding: 4px 0 !important; }
  .customer-app .editor-shell .canvas-layer-panel .layer-name strong { color: var(--editor-ink) !important; font-size: 14px !important; line-height: 1.25 !important; }
  .customer-app .editor-shell .canvas-layer-panel .layer-row.active .layer-name strong { color: var(--editor-focus) !important; }
  .customer-app .editor-shell .canvas-layer-panel .layer-name small { color: var(--editor-muted) !important; font-size: 11px !important; }
  .customer-app .editor-shell .canvas-layer-panel .visibility-button,
  .customer-app .editor-shell .canvas-layer-panel .layer-lock-button { align-self: center !important; width: 46px !important; min-width: 46px !important; height: 44px !important; min-height: 44px !important; border-radius: 6px !important; }
  .customer-app .editor-shell .canvas-layer-panel .visibility-button { grid-column: 4 !important; grid-row: 1 !important; }
  .customer-app .editor-shell .canvas-layer-panel .layer-lock-button { grid-column: 5 !important; grid-row: 1 !important; }
  .customer-app .editor-shell .canvas-layer-panel .layer-row-actions { display: grid !important; grid-column: 1 / -1 !important; grid-row: 2 !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 6px !important; }
  .customer-app .editor-shell .canvas-layer-panel .layer-row-actions .mini-button { width: 100% !important; min-width: 44px !important; height: 44px !important; min-height: 44px !important; border-radius: 6px !important; color: var(--editor-ink) !important; background: rgba(255, 255, 255, .035) !important; font-size: 13px !important; }
  html.mobile-layer-dragging,
  html.mobile-layer-dragging body { overflow: hidden !important; overscroll-behavior: none !important; user-select: none !important; }
  .customer-app .editor-shell .canvas-layer-panel .layer-row-actions [data-action="up"],
  .customer-app .editor-shell .canvas-layer-panel .layer-row-actions [data-action="down"],
  .customer-app .editor-shell #layerBackBtn,
  .customer-app .editor-shell #layerFrontBtn { display: none !important; }

  .customer-app .editor-shell .mobile-template-list { display: grid !important; gap: 0 !important; }
  .customer-app .editor-shell .mobile-template-item { display: grid !important; grid-template-columns: 56px minmax(0, 1fr) 52px !important; align-items: center !important; gap: 12px !important; width: 100% !important; min-height: 72px !important; padding: 8px 2px !important; border: 0 !important; border-bottom: 1px solid var(--editor-line) !important; color: var(--editor-ink) !important; background: transparent !important; text-align: left !important; }
  .customer-app .editor-shell .mobile-template-item img,
  .customer-app .editor-shell .mobile-template-placeholder { width: 56px !important; height: 56px !important; object-fit: cover !important; border-radius: 5px !important; background: var(--editor-surface-raised) !important; }
  .customer-app .editor-shell .mobile-template-item > span:nth-child(2) { display: grid !important; gap: 5px !important; min-width: 0 !important; }
  .customer-app .editor-shell .mobile-template-item strong { overflow: hidden !important; font-size: 14px !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
  .customer-app .editor-shell .mobile-template-item small { color: var(--editor-muted) !important; font-size: 12px !important; }
  .customer-app .editor-shell .mobile-template-item em { color: var(--editor-focus) !important; font-size: 12px !important; font-style: normal !important; text-align: right !important; }
  .customer-app .editor-shell .mobile-template-empty { display: grid !important; justify-items: start !important; gap: 8px !important; padding: 14px 0 !important; color: var(--editor-ink) !important; }
  .customer-app .editor-shell .mobile-template-empty span { color: var(--editor-muted) !important; font-size: 12px !important; }
  .customer-app .editor-shell .mobile-template-empty button { min-height: 44px !important; margin-top: 5px !important; padding: 0 15px !important; border: 0 !important; border-radius: 6px !important; color: #071010 !important; background: var(--editor-focus) !important; font: inherit !important; font-size: 12px !important; }

  /* Gallery cards are image-first on phones. The image itself remains the add
     target; metadata and the duplicate text action stay out of the grid. */
  .customer-app .editor-shell #artworkLibrary {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px !important;
    align-items: start !important;
  }

  .customer-app .editor-shell #artworkLibrary .artwork-card {
    display: block !important;
    min-width: 0 !important;
    padding: 3px !important;
    border-radius: 7px !important;
    background: rgba(255, 255, 255, .035) !important;
  }

  .customer-app .editor-shell #artworkLibrary .artwork-card-copy,
  .customer-app .editor-shell #artworkLibrary .artwork-card > .button {
    display: none !important;
  }

  .customer-app .editor-shell #artworkLibrary .artwork-card-media,
  .customer-app .editor-shell #artworkLibrary .artwork-image-button {
    width: 100% !important;
    min-width: 0 !important;
  }

  .customer-app .editor-shell #artworkLibrary .artwork-image-button {
    display: block !important;
    aspect-ratio: 1 !important;
    border-radius: 5px !important;
    background: #edf0eb !important;
  }

  .customer-app .editor-shell #artworkLibrary .artwork-image-button img {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 1 !important;
    object-fit: contain !important;
  }

  .customer-app .editor-shell #artworkLibrary .artwork-availability-badges {
    top: 4px !important;
    left: 4px !important;
    gap: 2px !important;
  }

  .customer-app .editor-shell .mobile-editor-v1-owned-artworks {
    display: grid !important;
    gap: 8px !important;
    margin: 0 0 14px !important;
    padding: 0 0 14px !important;
    border-bottom: 1px solid var(--editor-line) !important;
  }

  .customer-app .editor-shell .mobile-editor-v1-owned-head {
    display: flex !important;
    align-items: baseline !important;
    justify-content: space-between !important;
    gap: 10px !important;
  }

  .customer-app .editor-shell .mobile-editor-v1-owned-head strong {
    color: var(--editor-ink) !important;
    font-size: 13px !important;
  }

  .customer-app .editor-shell .mobile-editor-v1-owned-head span {
    overflow: hidden !important;
    color: var(--editor-muted) !important;
    font-size: 10px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .customer-app .editor-shell .mobile-editor-v1-owned-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .customer-app .editor-shell .mobile-editor-v1-owned-item {
    display: grid !important;
    min-width: 0 !important;
    min-height: 44px !important;
    padding: 3px !important;
    overflow: hidden !important;
    border: 1px solid var(--editor-line) !important;
    border-radius: 7px !important;
    color: var(--editor-ink) !important;
    background: rgba(255, 255, 255, .035) !important;
    text-align: left !important;
  }

  .customer-app .editor-shell .mobile-editor-v1-owned-item img {
    width: 100% !important;
    aspect-ratio: 1 !important;
    object-fit: contain !important;
    border-radius: 5px !important;
    background: #edf0eb !important;
  }

  .customer-app .editor-shell .mobile-editor-v1-owned-item > span {
    display: grid !important;
    gap: 2px !important;
    min-width: 0 !important;
    padding: 5px 2px 3px !important;
  }

  .customer-app .editor-shell .mobile-editor-v1-owned-item strong,
  .customer-app .editor-shell .mobile-editor-v1-owned-item small {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .customer-app .editor-shell .mobile-editor-v1-owned-item strong { font-size: 10px !important; }
  .customer-app .editor-shell .mobile-editor-v1-owned-item small { color: var(--editor-muted) !important; font-size: 8px !important; }
  .customer-app .editor-shell .mobile-editor-v1-owned-item:active { border-color: var(--editor-selection) !important; transform: scale(.98) !important; }
  .customer-app .editor-shell .mobile-editor-v1-owned-item:focus-visible { outline: 2px solid var(--editor-selection) !important; outline-offset: 1px !important; }

  .customer-app .editor-shell #artworkLibrary .artwork-availability-badge {
    min-height: 18px !important;
    padding: 2px 4px !important;
    border-radius: 4px !important;
    font-size: 8px !important;
  }

  .customer-app .editor-shell #artworkLibrary .editor-library-more,
  .customer-app .editor-shell #artworkLibrary .artwork-sync-hint,
  .customer-app .editor-shell #artworkLibrary > .selected-empty {
    grid-column: 1 / -1 !important;
  }

  .customer-app .editor-shell .mobile-expansion-consent { display: flex !important; align-items: flex-start !important; gap: 10px !important; margin-bottom: 2px !important; font-size: 12px !important; line-height: 1.5 !important; }
  .customer-app .editor-shell .mobile-expansion-consent input { flex: 0 0 20px !important; width: 20px !important; height: 20px !important; margin: 0 !important; accent-color: var(--editor-focus) !important; }
  .customer-app .editor-shell #expansionCopyrightPolicyBtn { min-height: 44px !important; padding: 0 !important; }
  .customer-app .editor-shell .mobile-expansion-upload { display: grid !important; min-height: 84px !important; margin-top: 6px !important; padding: 12px !important; border: 1px dashed var(--editor-line) !important; border-radius: 6px !important; background: var(--editor-surface-raised) !important; }
  .customer-app .editor-shell .mobile-expansion-upload strong { font-size: 14px !important; }
  .customer-app .editor-shell .mobile-expansion-upload span { color: var(--editor-muted) !important; font-size: 12px !important; }

  .customer-app .editor-shell:not([hidden]) ~ .support-chat-launcher { transform: translateY(-78px) !important; }
  .customer-app .editor-shell:not([hidden]) ~ .support-chat-launcher.dragging { transform: translateY(-78px) scale(.96) !important; }
  .customer-app .editor-shell:not([hidden]):has(#mobileEditorCommandBar:not([hidden])) ~ .support-chat-launcher { display: none !important; }

  /* Beat legacy editor selectors that carry higher specificity. */
  #editorView.editor-shell:not([hidden]) > .topbar {
    flex-basis: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
  }

  #editorView .top-actions {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, .92fr) minmax(0, .92fr) !important;
    justify-content: stretch !important;
  }

  #editorView .top-actions > #backToCatalogBtn,
  #editorView .top-actions > #restoreDraftBtn,
  #editorView .top-actions > #saveDraftBtn {
    max-width: none !important;
    justify-self: stretch !important;
  }

  #editorView .stage-header {
    flex-basis: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    grid-template-columns: minmax(0, 1fr) 116px !important;
    grid-template-rows: 44px !important;
  }

  #editorView .stage-header > .print-area-toolbar,
  #editorView .stage-header > .stage-actions {
    position: static !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    align-self: stretch !important;
  }

  #editorView .stage-header > .print-area-toolbar {
    grid-template-columns: minmax(0, 1fr) 84px !important;
    grid-template-rows: 44px !important;
    order: initial !important;
  }

  #editorView .stage-header > .stage-actions {
    width: 116px !important;
    max-width: 116px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: 38px !important;
  }

  #editorView .canvas-onboarding:not([hidden]) {
    flex-basis: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    grid-template-columns: minmax(0, 1fr) 112px 44px !important;
    grid-template-rows: 44px !important;
  }

  #editorView .canvas-onboarding .canvas-onboarding-actions {
    display: grid !important;
    align-items: center !important;
    height: 44px !important;
    min-height: 44px !important;
    transform: none !important;
  }

  #editorView .canvas-onboarding .canvas-onboarding-actions > [hidden] {
    display: none !important;
  }

  #editorView .canvas-onboarding .canvas-onboarding-close {
    transform: none !important;
  }

  @media (prefers-reduced-motion: reduce) {
    .customer-app .editor-shell *,
    .customer-app .editor-shell *::before,
    .customer-app .editor-shell *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
  }
}

@media (max-width: 380px) {
  .customer-app .editor-shell .top-actions { grid-template-columns: minmax(0, 1.08fr) minmax(0, .96fr) minmax(0, .96fr) !important; }
  .customer-app .editor-shell .top-actions #backToCatalogBtn,
  .customer-app .editor-shell .top-actions #restoreDraftBtn,
  .customer-app .editor-shell .top-actions #saveDraftBtn { padding-inline: 4px !important; font-size: 10px !important; }
  .customer-app .editor-shell .stage-header { grid-template-columns: minmax(0, 1fr) 112px !important; }
  .customer-app .editor-shell .stage-actions { width: 112px !important; max-width: 112px !important; }
  .customer-app .editor-shell .print-area-toolbar { grid-template-columns: minmax(0, 1fr) 78px !important; }
  .customer-app .editor-shell .canvas-onboarding:not([hidden]) { grid-template-columns: minmax(0, 1fr) 106px 44px !important; }
  .customer-app .editor-shell .canvas-onboarding-actions .button.primary { width: 106px !important; min-width: 106px !important; }
  .customer-app .editor-shell .mobile-editor-v1-product { flex-basis: 72px !important; width: 72px !important; min-width: 72px !important; }
  .customer-app .editor-shell .mobile-editor-v1-colorbar .mobile-editor-v1-color { flex-basis: 42px !important; width: 42px !important; min-width: 42px !important; }
}

/* The production baseline keeps the print-area onboarding visible until a
   zone is configured. The V1 mobile workbench keeps that action in the native
   print-area control so the canvas remains the first visual priority. */
@media (max-width: 820px) {
  .customer-app .editor-shell.mobile-prod-v1 #canvasOnboarding { display: none !important; }
  .customer-app .editor-shell.mobile-prod-v1 .studio.mobile-prod-v1-product-sheet > .product-panel {
    position: fixed !important;
    right: 0 !important;
    bottom: calc(var(--mobile-dock) + env(safe-area-inset-bottom)) !important;
    left: 0 !important;
    z-index: 960 !important;
    display: block !important;
    width: 100% !important;
    height: min(58dvh, 540px) !important;
    min-height: 260px !important;
    max-height: min(58dvh, 540px) !important;
    margin: 0 !important;
    padding: 10px 12px 16px !important;
    overflow: auto !important;
    border: 1px solid var(--editor-line) !important;
    border-bottom: 0 !important;
    border-radius: 12px 12px 0 0 !important;
    background: var(--editor-surface) !important;
    box-shadow: 0 -18px 44px rgba(0, 0, 0, .34) !important;
  }
  .customer-app .editor-shell.mobile-prod-v1 .studio.mobile-prod-v1-product-sheet > .product-panel .toolbox-header {
    position: sticky !important;
    top: -10px !important;
    z-index: 3 !important;
    margin: -10px -12px 10px !important;
    padding: 10px 12px !important;
    border-bottom: 1px solid var(--editor-line) !important;
    background: var(--editor-surface) !important;
  }
  .customer-app .editor-shell.mobile-prod-v1 .studio.mobile-prod-v1-product-sheet > .product-panel section { display: block !important; }
  .customer-app .editor-shell.mobile-prod-v1 .mobile-editor-v1-rail > #mobileEditorV1OrderBtn {
    display: grid !important;
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
    place-items: center !important;
    padding: 0 !important;
    border: 1px solid var(--editor-focus) !important;
    border-radius: 8px !important;
    color: #071010 !important;
    background: var(--editor-focus) !important;
    font-size: 11px !important;
    font-weight: 800 !important;
  }
  .customer-app .editor-shell.mobile-prod-v1 .mobile-editor-v1-contextbar {
    position: absolute !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 34 !important;
    display: flex !important;
    gap: 2px !important;
    min-height: 58px !important;
    padding: 4px 5px !important;
    overflow-x: auto !important;
    border-top: 1px solid rgba(14, 26, 21, .16) !important;
    background: rgba(8, 13, 12, .96) !important;
    scrollbar-width: none !important;
  }
  .customer-app .editor-shell.mobile-prod-v1 .mobile-editor-v1-contextbar::-webkit-scrollbar { display: none !important; }
  .customer-app .editor-shell.mobile-prod-v1 .mobile-editor-v1-contextbar[hidden] { display: none !important; }
  .customer-app .editor-shell.mobile-prod-v1 .mobile-editor-v1-contextbar button {
    flex: 0 0 auto !important;
    min-width: 76px !important;
    min-height: 48px !important;
    padding: 4px 7px !important;
    border: 1px solid transparent !important;
    border-radius: 6px !important;
    color: var(--editor-muted) !important;
    background: transparent !important;
    font: inherit !important;
    font-size: 10px !important;
    white-space: nowrap !important;
  }
  .customer-app .editor-shell.mobile-prod-v1 .mobile-editor-v1-contextbar button:active,
  .customer-app .editor-shell.mobile-prod-v1 .mobile-editor-v1-contextbar button:focus-visible {
    color: var(--editor-ink) !important;
    border-color: rgba(40, 215, 229, .48) !important;
    background: rgba(40, 215, 229, .1) !important;
  }
}

/* Final mobile alignment: the production baseline has older height and mode
   rules loaded before this adapter. Keep the workbench itself as the only
   viewport-filling surface and leave 3D in the canvas rail. */
@media (max-width: 820px) {
  .customer-app .editor-shell .top-actions #editorTopOrderBtn,
  .customer-app .editor-shell .toolbox-collapse { display: none !important; }

  .customer-app .editor-shell > .topbar {
    position: static !important;
    inset: auto !important;
    z-index: auto !important;
  }

  #editorView .stage-header > .stage-actions {
    position: relative !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 116px !important;
    max-width: 116px !important;
    isolation: isolate !important;
  }

  .customer-app .editor-shell .stage-actions .design-3d-switch { display: contents !important; }
  .customer-app .editor-shell .stage-actions #webglToggleBtn { display: none !important; }

  .customer-app .editor-shell .canvas-workspace {
    display: flex !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .customer-app .editor-shell .canvas-shell {
    flex: 1 1 auto !important;
    align-self: stretch !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
  }

  .customer-app .editor-shell .canvas-workspace > .mobile-editor-v1-colorbar {
    top: 8px !important;
    right: 13px !important;
    left: 18px !important;
  }

  .customer-app .editor-shell .canvas-workspace > .mobile-editor-v1-colorbar .mobile-editor-v1-product {
    flex-basis: 94px !important;
    width: 94px !important;
    min-width: 94px !important;
    background: rgba(255, 255, 255, .94) !important;
  }
}

@media (max-width: 380px) {
  .customer-app .editor-shell .canvas-workspace > .mobile-editor-v1-colorbar {
    right: 9px !important;
    left: 13px !important;
  }

  .customer-app .editor-shell .canvas-workspace > .mobile-editor-v1-colorbar .mobile-editor-v1-product {
    flex-basis: 88px !important;
    width: 88px !important;
    min-width: 88px !important;
  }
}

/* Fixed-24 mobile-only cleanup: the canvas is a quiet product stage and the
   gallery header keeps its content-first layout. Production controls remain in
   the DOM so desktop behavior and existing event bindings are untouched. */
@media (max-width: 820px) {
  .customer-app .editor-shell .canvas-shell {
    background: var(--editor-canvas) !important;
    background-image: none !important;
  }

  /* WebGL's production shader includes a stage grid. Keep the clean 2D
     canvas as the mobile default; the existing 3D control opts back in. */
  .customer-app .editor-shell .studio:not(.mobile-editor-v1-webgl-visible) #webglCanvas {
    display: none !important;
  }

  .customer-app .editor-shell .studio.mobile-editor-v1-webgl-visible #webglCanvas:not([hidden]) {
    display: block !important;
  }

  .customer-app .editor-shell #webglCanvas[hidden] {
    display: none !important;
  }

  .customer-app .editor-shell #artworkPanel .artwork-panel-actions,
  .customer-app .editor-shell #artworkPanel #toggleArtworkBtn,
  .customer-app .editor-shell #artworkPanel #refreshArtworkBtn {
    display: none !important;
  }
}

/* Surface harmony: keep the mobile sheet readable without a separate black
   frame. The gallery remains image-first; only its surrounding materials are
   softened. */
@media (max-width: 820px) {
  .customer-app .editor-shell .mobile-editor-v1-backdrop {
    background: rgba(5, 8, 8, .32) !important;
  }

  .customer-app .editor-shell .studio.mobile-editor-v1-sheet-open:not(.mobile-editor-v1-layer-sheet) > .edit-panel {
    border-color: rgba(237, 242, 237, .09) !important;
    background: #111a17 !important;
    box-shadow: 0 -12px 32px rgba(0, 0, 0, .24) !important;
  }

  .customer-app .editor-shell .mobile-editor-v1-sheet-grabber,
  .customer-app .editor-shell .studio.mobile-editor-v1-sheet-open > .edit-panel .mobile-editor-v1-sources {
    background: transparent !important;
    border-color: rgba(237, 242, 237, .07) !important;
  }

  .customer-app .editor-shell .studio.mobile-editor-v1-sheet-open > .edit-panel .mobile-editor-v1-sources {
    box-shadow: none !important;
    position: relative !important;
    top: auto !important;
    z-index: auto !important;
    margin-top: 0 !important;
  }

  .customer-app .editor-shell .artwork-category-filter {
    position: relative !important;
    top: auto !important;
    z-index: auto !important;
    flex-wrap: nowrap !important;
    margin: 8px 0 !important;
    padding: 6px 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-top: 1px solid rgba(237, 242, 237, .06) !important;
    border-bottom: 1px solid rgba(237, 242, 237, .06) !important;
  }

  .customer-app .editor-shell .artwork-filter-chip {
    border-color: rgba(237, 242, 237, .09) !important;
    background: rgba(237, 242, 237, .035) !important;
    font-size: 11px !important;
    line-height: 1 !important;
  }

  .customer-app .editor-shell .artwork-filter-chip .artwork-category-state {
    display: inline-flex !important;
    max-width: 100% !important;
    overflow: hidden !important;
    color: var(--editor-muted) !important;
    font-size: 8px !important;
    line-height: 1 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .customer-app .editor-shell #artworkLibrary .artwork-availability-badge.is-time {
    border-color: rgba(237, 242, 237, .18) !important;
    color: var(--editor-ink) !important;
    background: rgba(8, 13, 12, .9) !important;
    font-size: 8px !important;
    font-weight: 800 !important;
  }

  .customer-app .editor-shell #artworkLibrary .artwork-card,
  .customer-app .editor-shell .mobile-editor-v1-owned-item {
    border-color: rgba(237, 242, 237, .08) !important;
    background: rgba(237, 242, 237, .035) !important;
  }
}

/* Final mobile gallery refinement: make source navigation read as one quiet
   tab row instead of a stack of pill controls. The hit area stays 44px. */
@media (max-width: 820px) {
  .customer-app .editor-shell .studio.mobile-editor-v1-sheet-open > .edit-panel .mobile-editor-v1-sources {
    display: flex !important;
    align-items: stretch !important;
    gap: 0 !important;
    margin: 0 -12px 12px !important;
    padding: 0 12px !important;
    border-top: 0 !important;
    border-bottom: 1px solid rgba(237, 242, 237, .1) !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  .customer-app .editor-shell .mobile-editor-v1-sources button {
    flex: 0 0 auto !important;
    min-width: 64px !important;
    min-height: 44px !important;
    height: 44px !important;
    padding: 0 8px !important;
    border: 0 !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    color: #8e9a93 !important;
    background: transparent !important;
    font-size: 11px !important;
    font-weight: 650 !important;
    letter-spacing: 0 !important;
  }

  .customer-app .editor-shell .mobile-editor-v1-sources button.active,
  .customer-app .editor-shell .mobile-editor-v1-sources button[aria-current="page"] {
    color: var(--editor-ink) !important;
    border-bottom-color: var(--editor-focus) !important;
    background: transparent !important;
  }

  .customer-app .editor-shell .mobile-editor-v1-sources button:active,
  .customer-app .editor-shell .mobile-editor-v1-sources button:focus-visible {
    color: var(--editor-ink) !important;
    background: rgba(237, 242, 237, .05) !important;
    outline: none !important;
  }

  .customer-app .editor-shell .studio.mobile-editor-v1-sheet-open > .edit-panel .artwork-category-filter {
    margin: 0 0 12px !important;
    padding: 0 0 6px !important;
    border-top: 0 !important;
    border-bottom: 1px solid rgba(237, 242, 237, .08) !important;
  }

  .customer-app .editor-shell .artwork-filter-chip {
    min-height: 38px !important;
    padding: 5px 10px !important;
    border: 0 !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  .customer-app .editor-shell .artwork-filter-chip.active {
    border-bottom-color: var(--editor-selection) !important;
    background: transparent !important;
  }

  .customer-app .editor-shell .artwork-filter-chip .artwork-category-state {
    color: #aab5ae !important;
    font-size: 8px !important;
    font-weight: 600 !important;
  }

  .customer-app .editor-shell .artwork-filter-chip .artwork-category-state.is-time,
  .customer-app .editor-shell .artwork-filter-chip .mobile-editor-v1-category-countdown {
    display: block !important;
    margin-top: 3px !important;
    line-height: 1 !important;
  }
}
