/* Shared interface language. Artwork and lettering keep their chosen fonts. */
body {
  --ui-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --ui-bg: #111216;
  --ui-surface: #1a1c23;
  --ui-card: #22252e;
  --ui-field: #14171e;
  --ui-hover: #2a303c;
  --ui-line: #ffffff1c;
  --ui-text: #edf0f7;
  --ui-muted: #91939d;
  --ui-info: #777982;
  --ui-choice: #c4ccd9;
  --ui-accent: #1769e8;
  --ui-selected: #1b2c46;
  --ui-focus: #55d2e0;
  --ui-switch-off: #677386;
  --bg: var(--ui-bg);
  --panel: var(--ui-surface);
  --card: var(--ui-card);
  --line: var(--ui-line);
  --text: var(--ui-text);
  --muted: var(--ui-muted);
  --blue: var(--ui-accent);
  --select: var(--ui-selected);
  font-family: var(--ui-font);
  color: var(--ui-text);
  background: var(--ui-bg);
  -webkit-tap-highlight-color: #6ba7ff24;
}
body.studio-light {
  --ui-bg: #edf0f5;
  --ui-surface: #f8f9fc;
  --ui-card: #ffffff;
  --ui-field: #ffffff;
  --ui-hover: #e9eef7;
  --ui-line: #1c304025;
  --ui-text: #172434;
  --ui-muted: #52647a;
  --ui-info: #747984;
  --ui-choice: #35465b;
  --ui-selected: #e7effd;
  --ui-focus: #1769e8;
  --ui-switch-off: #778291;
  --ui-canvas: #e2e7ef;
  --ui-danger: #b42318;
  --ui-warning: #835615;
  --ui-disabled-bg: #e1e6ee;
  --ui-disabled-text: #596576;
  --cyan: var(--ui-accent);
  --danger: var(--ui-danger);
  --mobile-sheet-surface: var(--ui-surface);
  color-scheme: light;
}
body:not(.studio-light) { color-scheme: dark; --mobile-sheet-surface: var(--ui-surface); }
body button, body .info-popover { font-family: var(--ui-font); }
body :is(h1,h2,h3,h4,.section-label,.hint-label,.text-line-label) { font-family: var(--ui-font); letter-spacing: normal; }
body :is(.studio-commandbar,.topbar,.tools-panel,.inspector,.editor-footer) { background: var(--ui-surface); }
body .product-heading h1 { font-family: var(--ui-font); font-size: 17px; line-height: 1.3; font-weight: 650; letter-spacing: .01em; }
body .product-heading p { color: var(--ui-muted); font-size: 12px; }
body :is(.tools-panel,.inspector) :is(label,.helper,.config-summary,.selected-name) { color: var(--ui-muted); }
body .primary:not(:disabled),body .studio .mobile-confirm-bar > button.primary:not(:disabled),body #template-dialog .mobile-confirm-bar > button.primary:not(:disabled) {
  background: var(--ui-accent); border-color: var(--ui-accent); color: #fff;
  font-weight: 600; box-shadow: none;
}
body .primary:not(:disabled):is(:hover,:active),body .studio .mobile-confirm-bar > button.primary:not(:disabled):is(:hover,:active),body #template-dialog .mobile-confirm-bar > button.primary:not(:disabled):is(:hover,:active) { background: #125acb; border-color: #125acb; color: #fff; }
body button:disabled { opacity: .5; }
body :is(button,a,input,textarea,select,[tabindex]):focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 2px; }
body .quiet { color: #8fbaff; }
body.studio-light .quiet { color: #185db9; }
body .quiet:hover { background: var(--ui-hover); }
body .switch-finish { background: var(--ui-card); border-color: var(--ui-line); color: var(--ui-text); }
body .switch-finish:hover { background: var(--ui-hover); }
body .studio .tool-rail button.active { background: var(--ui-accent); color: #fff; }
body .price-toggle strong { color: #559cff; }
body .tool-method-state { color: var(--ui-muted); font-size: 10px; font-weight: 400; }
body .tool-method-current .tool-method-state { color: var(--ui-choice); }
body .sidebar-heading > div:first-child { flex: 1 1 auto; min-width: 0; }
body .sidebar-heading #panel-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; color: var(--ui-choice); }
body .sidebar-heading > .embroidery-method-note { flex: 0 0 auto; min-height: 32px; height: 32px; padding: 0; margin: 0; border: 0; gap: 1px; }
body .sidebar-heading > .embroidery-method-note > span:not(.info-tip) { display: none; }
body .sidebar-heading > .embroidery-method-note strong { max-width: 68px; overflow: hidden; text-overflow: ellipsis; font-size: 10px; line-height: 1.25; font-weight: 400; color: var(--ui-muted); }
body .studio .tools-panel .config-section,
body .studio .tools-panel .finish-toggle-row,
body .reference-text-line,
body .reference-text-colors { border: 1px solid var(--ui-line); border-radius: 9px; background: var(--ui-card); box-shadow: none; }
body .studio .tools-panel .config-section.is-open,
body .reference-text-line[open] { border-color: #618bc4; background: var(--ui-card); }
body .studio .tools-panel .config-heading { padding: 0 10px; gap: 4px; border-radius: inherit; }
body .studio .tools-panel .config-heading:has(.config-toggle:hover),
body .studio .tools-panel .config-heading:focus-within { background: var(--ui-hover); }
body .studio .tools-panel button.config-toggle { padding: 5px 0; gap: 8px; border-radius: inherit; }
body .studio .tools-panel button.config-toggle:is(:hover,:active) { background: transparent; }
body .studio .tools-panel .section-label { color: var(--ui-text); font-size: 13px; font-weight: 600; line-height: 1.3; }
body .studio .tools-panel .config-summary { color: var(--ui-muted); font-size: 12px; font-weight: 400; }
body .studio .tools-panel .section-number,
body .text-line-number { color: var(--ui-muted); background: transparent; border-color: #8794aa70; font-size: 11px; font-weight: 500; }
body .studio .tools-panel .config-section.is-open .section-number { color: var(--ui-choice); border-color: #748296; }
body.studio-light .studio .tools-panel .config-section.is-open .section-number { color: #175fbf; }
body .studio .tools-panel .config-body { padding: 8px 10px 10px; }
body .studio .tools-panel #config-color > .label-row { display: none; }
body .studio .tools-panel :is(.towel-size-options,.orientation-options) { gap: 6px; }
body .studio .tools-panel :is(.towel-size-options,.orientation-options) button,
body .studio .tools-panel .segmented > button { color: var(--ui-muted); background: var(--ui-field); border-color: var(--ui-line); font-size: 12px; font-weight: 400; border-radius: 7px; }
body .studio .tools-panel .towel-size-options button strong { font-size: 12px; font-weight: 400; }
body .studio .tools-panel .towel-size-options button span { color: var(--ui-muted); font-size: 11px; font-weight: 400; }
body .studio .tools-panel :is(.towel-size-options,.orientation-options) button[aria-pressed="true"],
body .studio .tools-panel .segmented > button.active { color: var(--ui-choice); background: var(--ui-selected); border-color: #647e9f; box-shadow: inset 0 0 0 1px #647e9f25; }
body .studio .tools-panel #embroidery-source [data-source] { color: var(--ui-muted); font-size: 12px; font-weight: 400; background: var(--ui-field); border-color: var(--ui-line); }
body .studio .tools-panel #embroidery-source [data-source][aria-pressed="true"] { color: var(--ui-choice); background: var(--ui-selected); border-color: #647e9f; }
body .studio .tools-panel .finish-toggle-row { padding: 5px 10px; min-height: 52px; margin-bottom: 6px; gap: 10px; }
body .studio .tools-panel .finish-toggle-row strong { color: var(--ui-text); font-size: 13px; font-weight: 600; line-height: 1.3; gap: 4px; }
body .studio .tools-panel .finish-toggle-row > div > span:not(#mirror-summary) { display: none; }
body .studio .tools-panel .finish-toggle-row #mirror-summary { font-size: 11px; font-weight: 400; color: var(--ui-muted); margin-top: 1px; line-height: 1.25; }
body .studio .tools-panel .finish-toggle-row small { color: var(--ui-muted); background: #8999b012; font-size: 10px; font-weight: 400; padding: 2px 5px; }
body .switch-control { position: relative; width: 44px !important; height: 44px !important; flex: 0 0 44px; }
body .switch-control::before { content: ''; position: absolute; left: 5px; top: 12px; width: 34px; height: 20px; border-radius: 12px; background: var(--ui-switch-off); pointer-events: none; }
body .switch-control:has(input:checked)::before { background: var(--ui-accent); }
body .switch-control input { inset: 0 !important; width: 44px !important; min-width: 44px !important; max-width: 44px !important; height: 44px !important; min-height: 44px !important; max-height: 44px !important; background: transparent !important; }
body .switch-control input:checked { background: transparent !important; }
body .switch-control > span { width: 16px; height: 16px; top: 14px; left: 7px; background: #fff; box-shadow: 0 1px 2px #0002; }
body .switch-control input:checked + span { transform: translateX(14px); }
body .switch-control:has(input:focus-visible) { outline: 2px solid var(--ui-focus); outline-offset: 2px; border-radius: 7px; }
body .switch-control input:focus-visible { outline: none !important; }
body .studio .tools-panel .price-row { margin-top: 8px; }
body .studio .tools-panel .price-row strong { font-size: 20px; font-variant-numeric: tabular-nums; }
body .info-tip { --info-hit-size: 44px; --info-icon-size: 16px; }
body .info-tip > .info-trigger { color: var(--ui-info); font-size: 11px; font-weight: 400; }
body .info-tip > .info-trigger:is(:hover,[aria-expanded="true"]) { color: var(--ui-choice); background: var(--ui-hover); }
body .info-tip > .info-trigger:focus-visible { color: var(--ui-text); outline-color: var(--ui-focus); }
body .info-popover { background: var(--ui-card); color: var(--ui-text); border-color: #7c8da470; font-size: 12px; line-height: 1.5; box-shadow: 0 6px 24px #0004; }
body .reference-text-intro { color: var(--ui-muted); font-size: 11px; font-weight: 400; }
body .reference-text-line > summary strong { color: var(--ui-text); font-size: 13px; font-weight: 600; }
body .text-line-summary,body .text-line-count,body .reference-text-count { color: var(--ui-muted); font-size: 11px; font-weight: 400; }
body .text-line-content .text-line-label { color: var(--ui-muted); font-size: 11px !important; font-weight: 400; text-transform: none; letter-spacing: normal; }
body .reference-text-colors > summary { color: var(--ui-choice); font-size: 11px; font-weight: 400; text-transform: none; letter-spacing: normal; }
body .reference-line-color-name { color: var(--ui-muted); font-size: 11px; font-weight: 400; }
body .reference-font-preview > summary { color: var(--ui-muted); font-size: 11px; font-weight: 400; }
body #template-dialog { background: var(--ui-surface); color: var(--ui-text); }
body #template-dialog h2 { color: var(--ui-text); font-size: 18px; font-weight: 600; letter-spacing: normal; }
body #template-dialog label { color: var(--ui-text); font-size: 13px; font-weight: 600; }
body #template-help,body #template-thread-name { color: var(--ui-muted); font-size: 11px; font-weight: 400; line-height: 1.4; }
body #template-error { color: #ffb4a9; font-size: 12px; line-height: 1.4; margin: 6px 0; overflow-wrap: anywhere; }
body #template-error { margin: 0; }
body #template-error:not(:empty) { margin: 6px 0; }
body .warning { color: #edcb94; font-size: 12px; line-height: 1.4; }
body.studio-light .warning { color: #835615; }
body .studio .upload-workflow :is(.up-intro h2,.up-section h3) { font-size: 13px; font-weight: 600; color: var(--ui-text); }
body .studio .upload-workflow .up-pick { border-color: #8497b16b; background: var(--ui-field); border-radius: 9px; }
body .studio .upload-workflow .up-pick > span { color: #a9c7f0; }
body .studio .upload-workflow .up-pick strong { font-size: 14px; color: var(--ui-text); }
body .studio .upload-workflow .up-pick small { color: var(--ui-muted); font-size: 11px; font-weight: 400; }
body .studio .upload-workflow :is(.up-background-hint,.up-color-summary,.up-apply-hint,.up-filename) { color: var(--ui-muted); font-size: 11px; font-weight: 400; }
body .studio .upload-workflow .up-choice { background: var(--ui-field); border-color: var(--ui-line); box-shadow: none; }
body .studio .upload-workflow .up-choice[aria-pressed="true"] { background: var(--ui-selected); border-color: #6395db; }
body .studio .upload-workflow .up-change { color: var(--ui-muted); font-size: 11px; font-weight: 400; }
body .studio .upload-workflow .up-message:not(.is-error) { color: var(--ui-muted); }
body .studio .upload-workflow .up-message.is-error { color: #ffb4a9; }
body .embroidery-method-note { background: transparent; border-color: var(--ui-line); }
body .embroidery-method-note strong { color: var(--ui-choice); font-size: 11px; font-weight: 400; }
body.studio-light .embroidery-method-note strong { color: #175fbf; }
body .embroidery-method-note > span:not(.info-tip) { color: var(--ui-muted); font-size: 11px; font-weight: 400; }
body .studio .tools-panel .template-category-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; max-height: none; height: auto; overflow: visible; }
body .studio .tools-panel .template-category-chips button { width: auto; min-height: 28px; padding: 4px 9px; font-size: 11px; font-weight: 400; line-height: 1.3; color: var(--ui-muted); background: var(--ui-card); border-color: var(--ui-line); }
body .studio .tools-panel .template-category-chips button[aria-pressed="true"] { background: var(--ui-selected); border-color: #647e9f; color: var(--ui-choice); }
body .preview-zoom-tools { background: #171c26ed; border-color: #8494aa70; border-radius: 8px; box-shadow: none; }
body .preview-zoom-tools button { color: #eaf0fa; font-weight: 500; }
body .preview-zoom-tools button:hover { background: #ffffff10; }
#template-preview-status {
  position: absolute; z-index: 15; top: 8px; left: 50%; transform: translateX(-50%);
  max-width: calc(100% - 24px); width: max-content; margin: 0; padding: 7px 10px;
  border: 1px solid #8193ad70; border-radius: 8px; background: #1b2432f2; color: #edf0f7;
  font: 500 12px/1.35 var(--ui-font); text-align: center; overflow-wrap: anywhere; pointer-events: none;
}
#template-preview-status[data-kind="error"] { border-color: #e5a093; color: #ffd5ce; }
#template-preview-status[hidden] { display: none !important; }
/* Theme the interface surfaces as pairs. Fabric swatches, uploaded pixels and
   selected artwork fonts/colors remain owned by their preview renderers. */
body.studio-light :is(.topbar,.studio-commandbar,.studio .tool-rail,.studio .tools-panel,.studio .inspector,.studio .editor-footer,.studio .canvas-toolbar) { background: var(--ui-surface); color: var(--ui-text); border-color: var(--ui-line); }
body.studio-light .studio #design-inspector.inspector { background: var(--ui-surface); color: var(--ui-text); }
body.studio-light .brand-navigation a,body.studio-light .brand-navigation button,body.studio-light .topbar .brand,body.studio-light .topbar .close { color: var(--ui-text); }
body.studio-light :is(.brand-actions > a,.brand-actions > button) { background: var(--ui-card); border-color: var(--ui-line); color: var(--ui-choice); }
body.studio-light :is(.brand-navigation a,.brand-navigation button,.brand-actions > a,.brand-actions > button):hover { color: var(--ui-text); background: var(--ui-hover); }
body.studio-light .studio .tool-rail :is(button,.rail-import) { color: var(--ui-muted); background: transparent; }
body.studio-light .studio .tool-rail :is(button,.rail-import):hover { color: var(--ui-text); background: var(--ui-hover); }
body.studio-light .studio .tool-rail button.active { color: #fff; background: var(--ui-accent); }
body.studio-light .studio .tool-rail button.active .tool-method-state { color: #fff; }
body.studio-light .command-actions :is(#save-design,#start-tour,#switch-finish) { color: var(--ui-choice); background: var(--ui-card); border: 1px solid var(--ui-line); }
body.studio-light .command-actions :is(#save-design,#start-tour,#switch-finish):hover { color: var(--ui-text); background: var(--ui-hover); }
body.studio-light .command-actions :is(#toggle-theme,.mobile-more) { color: var(--ui-muted); background: transparent; }
body.studio-light .command-actions #top-review:not(:disabled) { background: var(--ui-accent); color: #fff; }
body.studio-light .command-actions #top-review:not(:disabled):hover { background: #125acb; }
body.studio-light .command-actions #top-review:disabled { color: var(--ui-disabled-text); background: var(--ui-disabled-bg); border-color: #aeb9c8; opacity: 1; }
body.studio-light :is(.studio-navigation,.mobile-more-menu) { background: var(--ui-card); border-color: var(--ui-line); color: var(--ui-text); box-shadow: 0 12px 32px #24355226; }
body.studio-light .studio-navigation a,body.studio-light .studio-navigation button,body.studio-light .command-actions .mobile-more-menu > * { color: var(--ui-choice); background: transparent; }
body.studio-light .studio-navigation a:is(:hover,:focus-visible),body.studio-light .studio-navigation button:is(:hover,:focus-visible),body.studio-light .command-actions .mobile-more-menu > :is(:hover,:focus-visible) { color: var(--ui-text); background: var(--ui-hover); }
body.studio-light #mobile-more-menu #close-studio,body.studio-light #mobile-more-menu #close-studio > span { color: var(--ui-text); }
body.studio-light .studio #sidebar #collapse-panel,body.studio-light .studio #sidebar #collapse-panel > span,body.studio-light .studio #sidebar #collapse-panel .desktop-panel-close::after,
body.studio-light .studio #design-inspector #close-details,body.studio-light .studio #design-inspector #close-details > span { color: var(--ui-muted); }
body.studio-light .studio .canvas-panel,body.studio-light .canvas-surround { background: var(--ui-canvas); }
body.studio-light .studio .canvas-toolbar :is(.quiet,.color-trigger,#rotate-towel) { color: var(--ui-muted); background: transparent; }
body.studio-light .studio .canvas-toolbar :is(.quiet,.color-trigger,#rotate-towel):hover { color: var(--ui-text); background: var(--ui-hover); }
body.studio-light .studio .canvas-toolbar :is(#pan-canvas,#toggle-guides)[aria-pressed="true"] { color: #185db8; background: var(--ui-selected); }
body.studio-light .studio .canvas-toolbar #toggle-details[aria-expanded="true"] { color: #185db8; background: var(--ui-selected); }
body.studio-light .studio .canvas-toolbar .color-trigger > span:last-child { color: var(--ui-muted); }
body.studio-light :is(.canvas-zoom,.preview-zoom-tools) { background: var(--ui-card); color: var(--ui-muted); border-color: #8b97a8; }
body.studio-light :is(.canvas-zoom,.preview-zoom-tools) button { color: var(--ui-choice); background: transparent; }
body.studio-light :is(.canvas-zoom,.preview-zoom-tools) button:hover { color: var(--ui-text); background: var(--ui-hover); }
body.studio-light .studio .canvas-zoom #zoom-reset { color: #185db8; }
body.studio-light :is(.canvas-specs,.view-thumbnail) { color: var(--ui-choice); background: var(--ui-card); border-color: #74869f; }
body.studio-light .view-thumbnail:hover { background: var(--ui-hover); }
body.studio-light .thumbnail-towel { border-color: #65768c; }
body.studio-light :is(.config-note,.info-card) { color: var(--ui-choice); background: var(--ui-card); border-color: var(--ui-line); }
body.studio-light .studio .tools-panel .segmented { background: var(--ui-bg); }
body.studio-light :is(.config-note,.info-card) :is(p,small),body.studio-light .canvas-dimensions { color: var(--ui-muted); }
body.studio-light .studio .tools-panel #towel-colors .color-swatch { background: var(--ui-card); border-color: transparent; }
body.studio-light .studio .tools-panel #towel-colors .color-swatch.active { background: var(--ui-selected); border-color: var(--ui-accent); }
body.studio-light .studio .tools-panel #towel-colors .color-name { color: var(--ui-muted); }
body.studio-light .studio .tools-panel .color-sample,body.studio-light .color-tile > .color-sample { border-color: #65768c88; }
body.studio-light :is(#canvas-color-dot,#selection-color-dot,.up-detected-color,.up-thread-pair > span:not(.up-thread-arrow),.reference-line-color-dot) { border-color: #65768c88; }
body.studio-light .studio .tools-panel .swatches button.swatch:not(.color-swatch)::before { border-color: #65768c88; }
body.studio-light :is(.price-toggle,.price-details) { background: var(--ui-card); color: var(--ui-choice); border-color: #8b97a8; }
body.studio-light .price-toggle strong { color: #185db8; }
body.studio-light .price-details p { color: var(--ui-muted); }
body.studio-light .editor-footer .hide-price { color: #185db8; }
body.studio-light :is(.selection-toolbar,.selection-colors-panel) { color: var(--ui-text); background: var(--ui-card); border-color: #8b97a8; box-shadow: 0 8px 24px #24355226; }
body.studio-light .selection-toolbar > span:first-child { color: var(--ui-muted); }
body.studio-light :is(#selection-delete,.danger) { color: var(--ui-danger); border-color: #b4231840; }
body.studio-light :is(.tools-panel,.inspector,.selection-toolbar,.selection-colors-panel,dialog,.review-page) :is(input:not([type="checkbox"]):not([type="color"]):not([type="file"]):not([type="range"]):not([type="hidden"]),select,textarea) { color: var(--ui-text); background: var(--ui-field); border-color: #aeb9c8; }
body.studio-light :is(.tools-panel,.inspector,.review-page,dialog) input[type="checkbox"] { accent-color: var(--ui-accent); }
body.studio-light :is(.inspector,.review-page) .button-grid > :is(button,a),body.studio-light :is(.font-card,.layout-card) { color: var(--ui-choice); background: var(--ui-card); border-color: var(--ui-line); }
body.studio-light :is(.inspector,.review-page) .button-grid > :is(button,a):hover,body.studio-light :is(.font-card,.layout-card):hover { color: var(--ui-text); background: var(--ui-hover); }
body.studio-light :is(.font-card.active,.layout-card.active,.layers button.active) { color: #185db8; background: var(--ui-selected); border-color: #647e9f; }
body.studio-light .layers button { color: var(--ui-choice); }
body.studio-light .layers button:hover { color: var(--ui-text); background: var(--ui-hover); }
body.studio-light .reference-text-line.is-unavailable { background: var(--ui-bg); }
body.studio-light :is(.reference-text-line.is-unavailable > summary,.text-line-summary,.text-line-count,.reference-line-color-name) { color: var(--ui-muted); }
body.studio-light #template-error,body.studio-light .studio .upload-workflow .up-message.is-error,body.studio-light .towel-order-status.is-error { color: var(--ui-danger); }
body.studio-light .studio .upload-workflow :is(.up-pick > span,.up-reduce) { color: #185db8; }
body.studio-light .studio .upload-workflow .up-reduce { background: var(--ui-selected); border-color: #647e9f; }
body.studio-light .studio .upload-workflow .up-reduction { background: #fff8eb; border-color: #a579315c; }
body.studio-light .studio .upload-workflow :is(.up-reduction-warning,.up-processing-warnings:not([hidden])) { color: var(--ui-warning); }
body.studio-light :is(.review-page,.review-summary,.export-card) { color: var(--ui-text); }
body.studio-light .review-art { background: var(--ui-canvas); }
body.studio-light .export-card { background: var(--ui-card); border-color: var(--ui-line); }
body.studio-light .towel-order { color: var(--ui-text); background: var(--ui-card); border-color: #8b97a8; }
body.studio-light :is(.towel-order-approval,.towel-order-status) { color: var(--ui-muted); }
body.studio-light .towel-order-return { color: #185db8; }
body.studio-light dialog:not(.studio-tour) { color: var(--ui-text); background: var(--ui-surface); border-color: #8b97a8; }
body.studio-light .dialog-close { color: var(--ui-muted); }
body.studio-light .color-tile { background: var(--ui-card); color: var(--ui-choice); border-color: var(--ui-line); }
body.studio-light .color-tile.active { color: var(--ui-text); background: var(--ui-selected); border-color: var(--ui-accent); }
body.studio-light .template-preview-stage { border-color: #8b97a8; }
body.studio-light .studio-tour-card { color: var(--ui-text); background: var(--ui-card); border-color: #8b97a8; box-shadow: 0 16px 40px #24355238; }
body.studio-light .studio-tour-card h2 { color: var(--ui-text); }
body.studio-light .studio-tour-card p,body.studio-light :is(.studio-tour-counter,.studio-tour-close,.studio-tour-skip) { color: var(--ui-muted); }
body.studio-light .studio-tour-back { color: var(--ui-choice); border-color: #8b97a8 !important; }
body.studio-light .studio-tour :is(.studio-tour-close,.studio-tour-back,.studio-tour-skip):hover { color: var(--ui-text); background: var(--ui-hover); }
body.studio-light .studio-tour-progress { background: #d7dfea; }
body.studio-light .studio-tour-progress > span { background: var(--ui-accent); }
body.studio-light .studio-tour .studio-tour-next:not(:disabled):is(:hover,:focus,:active),body.studio-light .studio-tour .studio-tour-next:not(:disabled) { background: var(--ui-accent); color: #fff; }
body.studio-light .studio-tour .studio-tour-next:focus-visible { outline-color: var(--ui-focus); }
body.studio-light .info-popover { color: var(--ui-text); background: var(--ui-card); border-color: #8b97a8; box-shadow: 0 8px 24px #24355226; }
body.studio-light #toast { color: var(--ui-text); background: var(--ui-card); border-color: #74869f; box-shadow: 0 8px 24px #24355226; }
body.studio-light #template-preview-status { color: var(--ui-choice); background: #fffffff2; border-color: #8b97a8; }
body.studio-light #template-preview-status[data-kind="error"] { color: var(--ui-danger); border-color: #b4231880; }
body.studio-light .bleed-warning { color: var(--ui-danger); background: #fff0ee; border-color: #c2483e; }
body.studio-light :is(.command-actions,.editor-footer,.inspector,.review-page,dialog,.tools-panel) button:disabled { color: var(--ui-disabled-text); background: var(--ui-disabled-bg); border-color: #aeb9c8; opacity: 1; }
body.studio-light :is(.tools-panel,.inspector,.review-page,dialog) :is(input,textarea,select):disabled { color: var(--ui-disabled-text); background-color: var(--ui-disabled-bg); opacity: 1; }
body.studio-light .switch-control input:disabled { background: transparent !important; }
body.studio-light .switch-control:has(input:disabled)::before { background: #a6afbb; }
@media (max-width:700px), (max-height:500px) and (pointer:coarse) {
  body .studio-commandbar .product-heading h1 { font-size: 12px; font-weight: 650; }
  body .studio .tools-panel .config-section { margin-bottom: 6px; }
  body .studio .tools-panel .config-heading { min-height: 44px; }
  body .studio .tools-panel button.config-toggle { height: 44px; min-height: 44px; padding: 3px 0; }
  body .studio .tools-panel .section-label { font-size: 13px; }
  body .studio .tools-panel .config-summary { font-size: 11px; }
  body .info-tip { --info-icon-size: 14px; }
  body .info-tip > .info-trigger { font-size: 10px; }
  body .studio .tools-panel .section-number { width: 19px; height: 19px; flex-basis: 19px; font-size: 10px; }
  body .studio .tools-panel .towel-size-options button { min-height: 52px; padding: 5px 4px; gap: 2px; }
  body .studio .tools-panel :is(.orientation-options,.segmented) > button { min-height: 44px; height: 44px; padding: 6px; font-size: 12px; }
  body .studio .tools-panel .orientation-icon.portrait { width: 13px; height: 19px; }
  body .studio .tools-panel .orientation-icon.landscape { width: 19px; height: 13px; }
  body .studio .tools-panel .quantity-control > button { min-width: 44px; width: 44px; min-height: 44px; height: 44px; }
  body .studio .tools-panel .quantity-control input { height: 44px; min-height: 44px; font-size: 16px; }
  body .studio .tools-panel .tool-content input:not([type="checkbox"]):not([type="color"]):not([type="file"]):not([type="range"]),
  body .studio .tools-panel .tool-content textarea,
  body .studio .tools-panel .tool-content select { font-size: 16px; line-height: 1.3; }
  body .studio .tools-panel :is(.template-search,#template-search) { min-height: 44px; padding: 9px 10px; background: var(--ui-field); }
  body .studio .tools-panel .template-category-chips button { min-height: 32px; padding: 6px 9px; }
  body .studio .tools-panel .template-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
  body .studio .tools-panel .template-card { border-radius: 7px; border-color: transparent; }
  body .studio .tools-panel .template-card:hover,body .studio .tools-panel .template-card:focus-visible { border-color: #80a9e3; }
  body.panel-sizing-ready.panel-sizing-mobile.mobile-split-open #design.studio > #sidebar.tools-panel,
  body.panel-sizing-ready.panel-sizing-mobile.mobile-split-open #design.studio > #design-inspector.inspector { grid-template-rows: 24px 44px minmax(0,1fr) auto; border-radius: 14px 14px 0 0; }
  body.panel-sizing-ready.panel-sizing-mobile.mobile-split-open:is([data-tool="text"],[data-tool="upload"],.mobile-template-editing) #design.studio > #sidebar { grid-template-rows: 24px 44px minmax(0,1fr); }
  body.panel-sizing-ready.panel-sizing-mobile.mobile-split-open #design.studio > :is(#sidebar,#design-inspector) > .panel-sheet-grab { min-height: 24px; height: 24px; flex-basis: 24px; background: var(--ui-surface); }
  body.panel-sizing-ready.panel-sizing-mobile.mobile-split-open #design.studio > :is(#sidebar,#design-inspector) > :is(.sidebar-heading,.panel-heading) { height: 44px; min-height: 44px; padding: 0 12px; background: var(--ui-surface); }
  body.mobile-split-open .sidebar-heading #panel-title { font-size: 16px; line-height: 1.3; font-weight: 400; color: var(--ui-choice); }
  body.mobile-split-open .sidebar-heading > div:first-child { flex: 1 1 auto; min-width: 0; }
  body.mobile-split-open .sidebar-heading #panel-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.mobile-split-open .sidebar-heading > .embroidery-method-note { flex: 0 0 auto; gap: 1px; min-height: 44px; height: 44px; padding: 0; border: 0; margin: 0; }
  body.mobile-split-open .sidebar-heading > .embroidery-method-note > span:not(.info-tip) { display: none; }
  body.mobile-split-open .sidebar-heading > .embroidery-method-note strong { max-width: 86px; overflow: hidden; text-overflow: ellipsis; font-size: 10px; line-height: 1.25; font-weight: 400; color: var(--ui-muted); }
  body.mobile-split-open .sidebar-heading #collapse-panel,
  body.mobile-split-open .panel-heading #close-details { height: 44px !important; min-height: 44px !important; width: 44px !important; min-width: 44px !important; color: var(--ui-muted); }
  body.mobile-split-open #design .mobile-confirm-bar { background: var(--ui-surface); padding-left: max(12px,env(safe-area-inset-left)); padding-right: max(12px,env(safe-area-inset-right)); }
  body.mobile-split-open #design .mobile-confirm-bar > button { border-radius: 7px; font-size: 14px; letter-spacing: normal; }
  body.mobile-split-open #design .mobile-confirm-bar > #update-text:not([hidden]) { color: #fff; background: var(--ui-accent); border-color: var(--ui-accent); font-weight: 600; }
  body .studio #tool-text .mobile-text-fields,body.mobile-split-open #sidebar .mobile-upload-fields { padding: 8px 12px; }
  body .reference-text-line > summary { min-height: 44px; padding: 6px 10px; }
  body .text-line-content { padding: 0 10px 10px; gap: 6px; }
  body .studio #tool-text .text-line-content input:not([type="color"]),
  body .studio #tool-text .text-line-content textarea,
  body .studio #tool-text .text-line-content select { min-height: 44px; height: 44px; padding: 8px 9px; background: var(--ui-field); color: var(--ui-text); border-color: var(--ui-line); }
  body .reference-text-colors > summary { min-height: 44px; padding: 7px 9px; }
  body .reference-font-preview > summary { min-height: 36px; padding: 8px 0; }
  body .reference-text-count { font-size: 11px; }
  body.mobile-template-editing #template-dialog .template-dialog-content { padding: 8px 12px !important; }
  body.mobile-template-editing #template-dialog h2 { display: none; }
  body.mobile-template-editing #template-dialog .dialog-close { display: none; }
  body.mobile-template-editing #template-dialog label { margin: 8px 0 6px; font-size: 13px; }
  body.mobile-template-editing #template-dialog #template-text { min-height: 44px; height: 44px; padding: 8px 10px; color: var(--ui-text); background: var(--ui-field); border-color: var(--ui-line); font-size: 16px; }
  body.mobile-template-editing #template-help { margin: 4px 0 10px; font-size: 11px; color: var(--ui-muted); }
  body .studio .tools-panel .swatches button.swatch:not(.color-swatch),
  body #template-dialog .swatches button.swatch { flex: 0 0 44px; width: 44px; min-width: 44px; max-width: 44px; height: 44px; min-height: 44px; max-height: 44px; padding: 0; transform: none; }
  body .studio .tools-panel .swatches button.swatch:not(.color-swatch)::before { width: 28px; height: 28px; }
  body #template-dialog .swatches,
  body .reference-line-colors .swatches { display: grid; grid-template-columns: repeat(5,minmax(44px,1fr)); justify-items: center; gap: 4px; padding: 0; margin: 4px 0 8px; }
  body .studio .tools-panel .swatches button.swatch[aria-pressed="true"]::after { border-color: #8bb8ff; }
  body #template-dialog .swatch[aria-pressed="true"] { outline-color: #8bb8ff; border-color: #8bb8ff; }
  body .studio .upload-workflow .up-choice { min-height: 44px; padding: 8px; }
  body .studio .upload-workflow .up-choice strong { font-size: 12px; font-weight: 400; }
  body .studio .upload-workflow .up-change { min-height: 44px; padding: 8px 0; }
  body .studio .upload-workflow :is(.up-thread-row,.up-reduction) select { min-height: 44px !important; font-size: 16px !important; padding: 8px !important; }
  body .embroidery-method-note[hidden] { display: none !important; }
  #template-preview-status { top: 6px; padding: 5px 8px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  body :is(button,input,select,textarea,.switch-control > span) { transition: none; }
}
