/* Canonical Canva v166, pages 3–16. Local UI only; no output rendering styles. */
.context-help-btn { flex: 0 0 36px; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; font: inherit; }
.context-help-btn span { display: grid; place-items: center; width: 18px; height: 18px; border: 1.4px solid currentColor; border-radius: 50%; font-size: 13px; font-weight: 600; }
.context-help-btn:hover { color: var(--text); background: var(--card2); }
.context-help-btn:focus-visible { outline: 2px solid #8b5cf6; outline-offset: 2px; }
.context-help-popover { position: fixed; z-index: 31000; max-width: min(340px, calc(100vw - 16px)); box-sizing: border-box; padding: 14px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-panel); color: var(--text); font: 14px/1.5 "Permutrix UI Inter", Inter, system-ui, sans-serif; white-space: pre-line; box-shadow: 0 8px 24px #0005; }
.context-help-popover[hidden] { display: none; }
.guided-asset-workspace-head, .guided-color-workspace-head, .guided-transform-workspace-head, .guided-pattern-workspace-head { flex-wrap: nowrap; justify-content: space-between; align-items: center; }
.guided-asset-drawer-actions #btnToggleGuidedAssetSearch svg { width: 18px; height: 18px; }

#viewEditor.guided-studio .guided-generate-footer { justify-content: space-between; min-height: 60px; gap: 8px; padding: 10px 12px; box-sizing: border-box; }
#viewEditor.guided-studio .guided-generate-footer #workPager { flex: 0 0 auto; justify-content: flex-start; gap: 2px; }
#viewEditor.guided-studio .guided-generate-footer #workPager .btn { width: 28px; min-width: 28px; height: 36px; min-height: 36px; padding: 0; }
#viewEditor.guided-studio .guided-generate-footer #workPageNums { font-size: 12px; white-space: nowrap; }
#viewEditor.guided-studio .guided-generate-footer #workPageNums .work-page-current { width: auto; min-width: 62px; padding: 0 8px; }
#viewEditor.guided-studio .guided-generate-footer .work-page-jump-input { width: 52px; height: 36px; box-sizing: border-box; }
#viewEditor.guided-studio .guided-generate-footer .guided-export-workspace { flex: 0 1 auto; width: auto; height: auto; min-height: 0; margin: 0; background: none; overflow: visible; }
#viewEditor.guided-studio .guided-generate-footer .editor-export-drawer { width: auto; padding: 0; gap: 8px; background: none; }
#viewEditor.guided-studio #editorExportDrawer #btnBatchSave { min-width: 0; width: 164px; min-height: 36px; height: 36px; padding: 0 10px; font: 600 13px/1.15 "Permutrix UI Inter", Inter, system-ui, sans-serif; }
#viewEditor.guided-studio .col-work #tabWork { overflow: hidden; min-height: 0; }
#viewEditor.guided-studio .col-work .workGrid { flex: 1 1 0; min-height: 0; overflow-y: auto; }
#viewEditor.guided-studio.guided-main-compact[data-guided-mode="generate"] main.app-grid { grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); overflow: hidden; }
#viewEditor.guided-studio.guided-main-compact[data-guided-mode="generate"] .col-left { overflow-y: auto; }
#viewEditor.guided-studio.guided-main-compact[data-guided-mode="generate"] .col-work .workGrid { grid-template-rows: none; grid-auto-rows: 160px; align-content: start; }
.generation-share-entry { width: 36px; height: 36px; padding: 8px; border-color: var(--border); background: var(--card2); }
.generation-share-entry svg { width: 20px; height: 20px; }
.generation-share-body { justify-items: center; gap: 16px; }
.generation-share-preview { width: 100%; }
.generation-share-footer { max-width: 100%; gap: 16px; }
.generation-share-field input { height: 40px; padding: 0 12px; font: 13px "Permutrix UI Inter", Inter, system-ui, sans-serif; }
.generation-share-actions { gap: 4px; margin-bottom: -2px; margin-right: -2px; }
.generation-share-action { position: relative; width: 44px; height: 44px; padding: 13px; border: 0; border-radius: 10px; background: transparent; }
.generation-share-action::before { content: ""; position: absolute; inset: 2px; border: 1px solid var(--border, #343b48); border-radius: 8px; pointer-events: none; }
.generation-share-action svg { width: 18px; height: 18px; }
.generation-share-dialog :focus-visible { outline-color: #8b5cf6; }

.help-modal, .full-version-prompt-modal, .match-parts-modal { --primary: #8b5cf6; --accent: #8b5cf6; width: min(1060px, calc(100vw - 40px)); height: min(760px, calc(100dvh - 40px)); max-width: none; max-height: calc(100dvh - 40px); padding: 0; border: 1px solid var(--border); border-radius: 14px; color: var(--text); background: var(--bg-panel); box-sizing: border-box; font-family: "Permutrix UI Inter", Inter, system-ui, sans-serif; }
.help-modal .modal-header, .full-version-prompt-modal .modal-header, .match-parts-header { padding: 24px 36px 18px; background: transparent; flex: 0 0 auto; align-items: flex-start; }
.help-modal .modal-header h2, .full-version-prompt-modal .modal-header h2, .match-parts-header h2 { margin: 0; font-size: 26px; line-height: 1.2; }
.help-modal .modal-header p, #matchPartsSteps { margin: 10px 0 0; font-size: 14px; line-height: 1.4; color: var(--muted); }
.help-modal .modal-body, .full-version-prompt-body { flex: 1 1 0; min-height: 0; max-height: none; overflow: auto; padding: 22px 36px 28px; }
.help-modal .modal-header .btn, .match-parts-header .btn { min-width: 36px; min-height: 36px; font-size: 18px; }
.help-guide-columns, .pro-prompt-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; }
.help-modal h3 { font-size: 19px; line-height: 1.3; margin: 0 0 12px; color: var(--text); }
.help-modal p { font-size: 15px; line-height: 1.4; margin: 0 0 12px; color: var(--muted); }
.help-guide-section + .help-guide-section { margin-top: 24px; }
.help-guide-columns > .help-guide-section { margin-top: 0; }
.help-action-list { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 12px 16px; margin: 0 0 18px; font-size: 14px; line-height: 1.4; }
.help-action-list dt { font-weight: 600; }
.help-action-list dd { margin: 0; color: var(--muted); }
.help-file-tree { font: 14px/1.45 ui-monospace, monospace; white-space: pre-wrap; margin: 0 0 18px; background: none; color: var(--muted); }
.help-modal .help-muted { font-size: 13px; }
.help-save-note { padding: 16px 18px; margin-top: 20px; background: var(--bg-app); border-radius: 8px; }
.help-save-note h3 { font-size: 16px; margin-bottom: 8px; }
.help-save-note p { font-size: 14px; margin: 0; }
.help-legal-section { margin: 24px 0 8px; }
.help-legal-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 24px; }
.help-legal-actions .btn { min-height: 44px; padding: 8px 0; border: 0; background: transparent; font-size: 14px; color: var(--muted); }
.help-legal-actions .btn:not(#btnOpenAppDataReset)::after { content: " ›"; color: var(--ui-link); }
.help-legal-actions #btnOpenAppDataReset { margin-left: auto; color: var(--danger); }
.help-modal .store-refund-section { border: 0; border-top: 1px solid var(--border); border-radius: 0; background: none; padding: 22px 0 0; margin-top: 20px; }
.help-modal .store-refund-primary { min-height: 44px; max-width: 100%; font-size: 14px; }
.help-modal [hidden], .full-version-prompt-modal [hidden], .export-preview-modal [hidden] { display: none !important; }
.full-version-prompt-modal { display: flex; flex-direction: column; }
.full-version-prompt-modal .modal-header > div { flex: 1; }
.full-version-prompt-kicker { font-size: 12px; color: var(--muted); }
.product-edition-store .full-version-prompt-kicker, .product-edition-store .full-version-prompt-section.ongoing { display: none; }
#storeCurrentPlan { float: right; font-size: 13px; color: var(--muted); margin-top: -20px; }
.store-purchase-summary { font-size: 14px; margin: 0 0 14px; color: var(--muted); }
.full-version-prompt-lead { margin: 0 0 24px; font-size: 15px; line-height: 1.4; }
.full-version-prompt-section, .store-restore-section { padding: 0; margin: 0; background: none; border: 0; border-radius: 0; }
.full-version-prompt-section h3, .store-restore-section h3 { font-size: 19px; margin: 0 0 12px; }
.full-version-prompt-section ul { margin: 0; padding-left: 18px; }
.full-version-prompt-section li { margin: 12px 0; font-size: 15px; }
.store-restore-section > .btn { min-height: 40px; }
.store-restore-section #btnRefreshStoreEntitlement { display: block; margin-top: 10px; color: var(--ui-link); font-size: 13px; padding-left: 0; }
.store-entitlement-prompt-status { padding: 0; border: 0; background: none; font-size: 14px; line-height: 1.4; color: var(--muted); }
#storeOfflinePolicy { margin: 24px 0; font-size: 13px; }
.full-version-prompt-body .store-refund-section { padding: 22px 0 0; border: 0; border-top: 1px solid var(--border); background: none; border-radius: 0; }
.full-version-prompt-body .store-refund-primary { background: var(--ui-soft-bg); color: var(--ui-link); border: 1px solid var(--ui-soft-border); min-height: 46px; box-shadow: none; }
.full-version-prompt-footer { padding: 16px 36px; border-top: 1px solid var(--border); flex: 0 0 auto; gap: 12px; }
.full-version-prompt-footer #btnContinuePublicDemo { margin-right: auto; }
.full-version-prompt-footer .btn { min-height: 44px; }
.full-version-prompt-footer .primary { min-width: 164px; }
.full-version-prompt-modal .primary, .help-modal .primary, .match-parts-modal .primary { background: var(--ui-action); border-color: var(--ui-action); color: #fff; box-shadow: none; }
.full-version-prompt-modal .store-refund-primary { background: var(--ui-soft-bg); border-color: var(--ui-soft-border); color: var(--ui-link); }
.help-modal, .full-version-prompt-modal, .match-parts-modal, .export-preview-modal { --primary-hover: #7c3aed; font-weight: 400; }
.help-modal h2, .full-version-prompt-modal h2, .match-parts-modal h2, .export-preview-modal h2 { font-weight: 700; }
.help-modal h3, .full-version-prompt-modal h3 { font-weight: 600; }
.help-modal .btn.primary:hover, .full-version-prompt-modal .btn.primary:hover, .match-parts-modal .btn.primary:hover { background: var(--ui-action-hover); border-color: var(--ui-action-hover); }
.full-version-prompt-modal .btn.store-refund-primary:hover { background: color-mix(in srgb, var(--ui-link) 10%, var(--ui-soft-bg)); border-color: var(--ui-link); color: var(--ui-link); }
#storeRestoreForm input { min-height: 40px; padding: 8px 12px; box-sizing: border-box; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-app); color: var(--text); font: inherit; }
#storeRestoreForm > p { font-size: 14px; line-height: 1.4; color: var(--muted); }
.store-refund-section p { font-size: 14px; line-height: 1.4; }
.refund-support-flow { display: grid; grid-template-columns: 342px minmax(0, 1fr); gap: 24px; align-items: start; margin: 14px 0; }
.help-modal .refund-support-flow { grid-template-columns: minmax(0, 1fr) 302px; }
.refund-support-main .store-refund-primary { width: 100%; white-space: normal; }
.refund-support-main .store-refund-status { margin: 10px 0; }
.refund-support-flow .store-refund-fallback .store-refund-actions { flex-direction: column; align-items: stretch; }

.export-preview-modal { --primary: #8b5cf6; --accent: #8b5cf6; width: min(1392px, calc(100vw - 48px)); height: min(852px, calc(100dvh - 48px)); display: flex; flex-direction: column; box-sizing: border-box; font-family: "Permutrix UI Inter", Inter, system-ui, sans-serif; border-radius: 14px; }
.export-preview-back[data-export-mode="live"] .export-preview-modal { width: min(1060px, calc(100vw - 40px)); height: min(760px, calc(100dvh - 40px)); }
.export-preview-back[data-export-mode="batch"] .export-preview-modal { height: min(876px, calc(100dvh - 24px)); }
.export-preview-back[data-export-mode="batch"] .export-preview-header { padding: 14px 28px 10px; }
.export-preview-back[data-export-mode="batch"] .export-preview-layout { padding-block: 12px; }
.export-preview-back[data-export-mode="batch"] .export-preview-meta { margin-top: 6px; }
.export-preview-header { flex: 0 0 auto; padding: 22px 28px 18px; align-items: flex-start; }
.export-preview-header h2 { font-size: 26px; line-height: 1.2; }
.export-preview-meta { margin-top: 8px; font-size: 14px; }
.export-preview-layout { display: grid; grid-template-columns: minmax(0, 1fr) 348px; gap: 28px; flex: 1 1 0; min-height: 0; padding: 18px 28px; overflow: hidden; }
.export-preview-content { height: 100%; min-width: 0; }
.export-preview-settings { min-width: 0; min-height: 0; overflow: auto; }
.export-preview-single, .export-preview-multi { padding: 0; }
.export-preview-single { grid-template-rows: 36px minmax(0, 1fr); gap: 12px; }
.export-preview-single .ep-image-shell { min-height: 0; height: 100%; width: 100%; max-width: 520px; max-height: 520px; justify-self: center; }
.export-preview-single .ep-zoom-toolbar { min-height: 36px; padding: 0; gap: 8px; }
.export-preview-single .ep-zoom-corner-controls { position: static; flex-direction: row; margin-left: auto; gap: 4px; }
.export-preview-modal .btn { min-height: 36px; font-family: inherit; font-size: 14px; box-shadow: none; }
.export-preview-modal .btn.primary, .export-preview-modal .ep-zoom-btn.active { color: #fff; background: var(--ui-action); border-color: var(--ui-action); }
.export-preview-modal :focus-visible { outline: 2px solid #8b5cf6; outline-offset: 2px; }
.export-preview-spinner { grid-column: 1; grid-row: 1; justify-content: center; flex-direction: column; }
.ep-spinner-label { font-size: 15px; }
.ep-progress-text { font-size: 13px; }
.export-preview-multi { display: flex; flex-direction: column; }
.ep-multi-toolbar { flex: 0 0 auto; gap: 8px; min-height: 36px; flex-wrap: wrap; margin: 0 0 8px; }
.ep-multi-body { display: flex; flex: 1 1 0; height: auto; }
.ep-thumb-pane { width: 100%; display: flex; min-height: 0; }
.ep-thumb-grid { width: 100%; padding: 0; border: 0; border-radius: 0; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: max-content; align-items: start; }
.ep-thumb-item { width: 100%; height: 208px; min-width: 0; padding: 8px; box-sizing: border-box; grid-template-rows: minmax(0, 1fr) 18px; background: var(--bg-panel); border: 1px solid var(--border); border-radius: 8px; opacity: 1; }
.ep-thumb-item.selected { border-color: var(--border); box-shadow: none; }
.ep-thumb-item.active-detail { outline: none; border-color: #8b5cf6; box-shadow: inset 0 0 0 1px #8b5cf6; }
.ep-thumb-image { width: 100%; height: 100%; min-height: 0; background: transparent; object-fit: contain; }
.ep-thumb-label { padding: 4px 0 0; font-family: inherit; font-size: 12px; }
.ep-thumb-check { width: 18px; height: 18px; accent-color: #8b5cf6; }
#chkExportSelectAll { accent-color: #8b5cf6; }
.ep-thumb-badge:not(.pending) { display: none; }
.ep-thumb-pager { margin-left: auto; justify-content: flex-end; gap: 4px; flex-wrap: nowrap; }
.ep-page-range { order: -1; margin: 0 8px 0 0; font-family: inherit; }
.ep-page-nums { flex-wrap: nowrap; }
.ep-page-number { min-width: 28px; }
.ep-detail-view { border: 0; border-radius: 0; background: transparent; gap: 6px; padding: 0; }
.ep-detail-shell { flex: 0 0 auto; aspect-ratio: 1; width: 100%; }
.ep-detail-viewport { border: 1px solid var(--border); border-radius: 8px; box-sizing: border-box; }
.ep-detail-toolbar { display: flex; gap: 8px; padding: 0; }
.ep-detail-toolbar .ep-detail-corner-controls { position: static; flex-direction: row; margin-left: auto; gap: 4px; }
.ep-detail-info { padding: 0; color: var(--muted); font: 13px/1.4 "Permutrix UI Inter", Inter, system-ui, sans-serif; }
.export-preview-options { padding: 12px 0 0; border: 0; background: transparent; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.export-preview-options .ep-opt-field { font-size: 14px; min-width: 0; }
.export-preview-options .ep-opt-field input:not([type="checkbox"]), .export-preview-options select { width: 100%; min-width: 0; box-sizing: border-box; font-size: 14px; height: 36px; }
.export-preview-options .ep-opt-filename { grid-column: auto; }
.export-preview-options .ep-opt-toggle { display: flex; flex-direction: row; align-items: center; gap: 8px; margin: 0; }
.export-preview-options input[type="checkbox"] { accent-color: #8b5cf6; }
.ep-opt-path-row { display: flex; flex-wrap: wrap; flex-direction: row; gap: 6px; min-width: 0; padding-top: 0; }
.ep-opt-path-row label { flex-basis: 100%; font-size: 14px; }
#exportPreviewPathLabel { flex: 1; min-width: 0; overflow-wrap: anywhere; font-family: inherit; font-size: 13px; }
#btnExportPickPath { min-width: 0; font-size: 13px; padding: 4px 8px; }
.export-preview-footer { flex: 0 0 auto; padding: 14px 28px; gap: 12px; border-top: 1px solid var(--border); min-height: 68px; box-sizing: border-box; }
.export-preview-footer .btn { min-height: 40px; }
.export-preview-footer-status { flex: 1; min-width: 0; font-size: 14px; color: var(--muted); }
.export-preview-footer-status .ep-selection-count { font-family: inherit; white-space: normal; }
.export-preview-footer-status .ep-progress-wrap { width: min(360px, 100%); height: 4px; margin-top: 8px; }
.ep-progress-wrap.is-indeterminate .ep-progress-bar { width: 35% !important; animation: ep-indeterminate 1.2s ease-in-out infinite alternate; }
@keyframes ep-indeterminate { to { transform: translateX(180%); } }
.export-preview-back[data-export-alpha="opaque"] :is(.ep-image-viewport, .ep-detail-viewport, .ep-thumb-image) { background: #fff; }
.export-preview-back[data-export-alpha="transparent"] :is(.ep-image-viewport, .ep-detail-viewport, .ep-thumb-image) { background: conic-gradient(#737b8820 25%, #737b8855 0 50%, #737b8820 0 75%, #737b8855 0) 0 0 / 20px 20px; }
.export-preview-back[data-export-mode="live"] .export-preview-options { padding-top: 36px; }

.match-parts-header { align-items: center; gap: 8px; }
.match-parts-header > div:first-child { margin-right: auto; }
.match-parts-header .btn { margin-left: 0; }
.match-parts-body { flex: 1 1 0; min-height: 0; padding: 22px 36px; background: transparent; }
.match-parts-body.is-pairing { display: flex; flex-direction: column; overflow: hidden; }
.match-parts-intro { background: none; border: 0; padding: 0; color: var(--muted); font-size: 14px; line-height: 1.4; margin-bottom: 18px; flex: 0 0 auto; }
.match-parts-intro strong { display: block; color: var(--text); font-size: 18px; margin-bottom: 6px; }
.match-parts-set-row { padding: 16px; }
.match-parts-board { flex: 1 1 0; overflow: auto; min-height: 0; grid-template-columns: 32px repeat(var(--match-layer-count), minmax(200px, 1fr)); grid-auto-rows: max-content; gap: 14px 20px; align-content: start; border: 0; background: none; padding: 0 4px 12px 0; }
.match-parts-column-header, .match-parts-corner { position: sticky; top: 0; z-index: 2; background: var(--bg-panel); font-size: 14px; white-space: normal; overflow-wrap: anywhere; border: 0; justify-content: center; }
.match-parts-cell { border: 1px solid transparent; background: none; padding: 8px; height: max-content; min-height: 190px; min-width: 0; border-radius: 8px; grid-template-rows: 140px auto; overflow: visible; }
.match-parts-cell.selected { border-color: #8b5cf6; background: color-mix(in srgb, #8b5cf6 8%, transparent); }
.match-parts-cell:focus-visible { outline: 2px solid #8b5cf6; outline-offset: 1px; }
.match-parts-image.pair-preview { width: 140px; height: 140px; margin: 0 auto; background: #737b88; border: 0; border-radius: 4px; }
.match-parts-cell-name { font-size: 14px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; overflow: visible; text-overflow: clip; margin-top: 8px; }
.match-parts-row-label.complete { color: var(--muted); background: none; border: 0; }
.match-parts-status { padding: 0; border: 0; background: none; color: var(--muted); font-size: 14px; line-height: 1.4; }
.match-parts-status.warn { color: var(--warning-text); background: none; border: 0; }
.match-parts-actions { padding: 16px 36px; gap: 12px; }
.match-parts-actions .btn { min-height: 40px; }
.match-parts-layer-option { position: relative; padding: 36px 16px 16px; align-items: center; flex-direction: column; }
.match-parts-layer-option input { position: absolute; top: 12px; left: 12px; accent-color: #8b5cf6; }
.match-parts-layer-info { text-align: center; }

@media (max-width: 1180px) {
 .export-preview-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; }
 .ep-thumb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
 .refund-support-flow, .help-modal .refund-support-flow { grid-template-columns: minmax(0, 1fr); gap: 8px; }
 .help-guide-columns, .pro-prompt-columns { grid-template-columns: minmax(0, 1fr); gap: 24px; }
 .help-modal, .full-version-prompt-modal, .match-parts-modal { width: calc(100vw - 32px); }
 .help-modal .modal-body, .full-version-prompt-body, .match-parts-body { padding: 20px 24px; }
 .help-modal .modal-header, .full-version-prompt-modal .modal-header, .match-parts-header { padding: 20px 24px; }
 .ep-thumb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 #storeCurrentPlan { float: none; display: block; margin-top: 8px; }
}
@media (max-width: 740px) {
 .export-preview-layout { display: block; overflow: auto; }
 .export-preview-content { height: auto; overflow: visible; }
 .export-preview-single { height: 430px; }
 .export-preview-multi { height: 480px; }
 .export-preview-settings { overflow: visible; }
 .ep-detail-view { max-width: 348px; margin: 20px auto 0; }
 .export-preview-options { margin-top: 20px; }
 .export-preview-header, .export-preview-footer { padding-left: 18px; padding-right: 18px; }
 .match-parts-actions { padding: 12px; gap: 8px; }
 .match-parts-actions .btn { min-width: 64px; }
 .match-parts-status { font-size: 12px; }
}
