/* Presentation overlay: keep application state, editor geometry and image pixels intact. */
body.design-refresh:where(:not(:has(.admin-layout))),
body.design-refresh-studio {
  color-scheme: dark;
  --bg: #0d0c10;
  --surface: #17161c;
  --surface-soft: #1c1a23;
  --surface-raised: #24212c;
  --panel: #17161c;
  --panel-strong: #1c1a23;
  --border: #ffffff12;
  --border-strong: #ffffff25;
  --line: #ffffff12;
  --line-strong: #ffffff25;
  --text: #f3f0f7;
  --muted: #aaa3b6;
  --muted-strong: #ccc5d6;
  --accent: #c0a1ff;
  --accent-strong: #a781f5;
  --accent-dark: #312344;
  --accent-soft: #b48bf51c;
  --danger: #ffabb7;
  --warning: #ecc88d;
  --shadow: 0 18px 60px #00000026;
  --radius: 20px;
  background: radial-gradient(ellipse at 60% 0, #33214130, transparent 700px), var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body:is(.design-refresh,.design-refresh-studio) :is(button,input,select,textarea) { font-family: inherit; }
body:is(.design-refresh,.design-refresh-studio) :is(button,a,input,select,textarea,[tabindex]):focus-visible {
  outline: 2px solid #c9aaff; outline-offset: 4px;
}
body:is(.design-refresh,.design-refresh-studio) :is(input,select,textarea) { accent-color: var(--accent-strong); }
body:is(.design-refresh,.design-refresh-studio) :is(input,textarea)::placeholder { color: #8b829b; opacity: 1; }
body:is(.design-refresh,.design-refresh-studio) ::selection { color: #fff; background: #7451a4; }
body:is(.design-refresh,.design-refresh-studio) [hidden] { display: none !important; }

/* Platform navigation and working surfaces. */
body.design-refresh:where(:not(:has(.admin-layout))) .app-root { background: transparent; }
body.design-refresh:where(:not(:has(.admin-layout))) .app-header { background: #0d0c10ed; border-color: var(--border); backdrop-filter: blur(20px); }
body.design-refresh:where(:not(:has(.admin-layout))) .app-header__inner { width: calc(100% - 64px); gap: 28px; }
body.design-refresh:where(:not(:has(.admin-layout))) .main-nav { background: #18161e; border-color: var(--border); border-radius: 12px; padding: 4px; }
body.design-refresh:where(:not(:has(.admin-layout))) .main-nav a { color: var(--muted); padding-inline: 18px; border-radius: 8px; }
body.design-refresh:where(:not(:has(.admin-layout))) .main-nav a.active { background: #30243e; color: #e2ceff; border-color: #bc94ff24; }
body.design-refresh:where(:not(:has(.admin-layout))) .main-nav a:hover { color: var(--text); background: var(--surface-raised); }
body.design-refresh:where(:not(:has(.admin-layout))) .member-nav { gap: 22px; }
body.design-refresh:where(:not(:has(.admin-layout))) .member-nav :is(a,button) { color: var(--muted); }
body.design-refresh:where(:not(:has(.admin-layout))) .member-nav :is(a:hover,a.active) { color: var(--accent); }
body.design-refresh:where(:not(:has(.admin-layout))) .member-nav .nav-register,
body.design-refresh:where(:not(:has(.admin-layout))) .member-nav .nav-register.active { background: #b796fa; color: #20132e; border-radius: 9px; }
body.design-refresh:where(:not(:has(.admin-layout))) .member-avatar { color: #e0caff; background: #38294b; }
body.design-refresh:where(:not(:has(.admin-layout))) .page-width { width: min(1340px, calc(100% - 80px)); }
body.design-refresh:where(:not(:has(.admin-layout))) .workspace-intro { padding-block: 48px 30px; }
body.design-refresh:where(:not(:has(.admin-layout))) .workspace-intro h1 { font-size: clamp(30px,3vw,43px); letter-spacing: -.035em; }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.eyebrow,.member-eyebrow,.step-tag) { color: var(--accent); }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.upload-card,.psd-guide,.member-card,.direct-psd,.project-card,.empty-projects,.export-dialog,.member-dialog) {
  background: var(--surface); border-color: var(--border); border-radius: 20px; box-shadow: var(--shadow);
}
body.design-refresh:where(:not(:has(.admin-layout))) :is(.drop-zone,.layer-study,.member-pre,.layer-properties) { background: #111015; border-color: var(--border-strong); }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.drop-zone:hover,.drop-zone--active) { background: #221a2e; border-color: var(--accent); }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.upload-icon,.workspace-intro__format strong,.project-card__preview,.queue-status,.status-message,.selected-file img) {
  background: var(--surface-raised); border-color: var(--border); color: var(--muted-strong);
}
body.design-refresh:where(:not(:has(.admin-layout))) :is(.field input,.field select,.member-card input:not([type=checkbox]),.member-card select,.member-card textarea,.member-page>label select,.layer-properties input,.layer-properties textarea) {
  background: #100f14; color: var(--text); border-color: var(--border-strong); border-radius: 10px;
}
body.design-refresh:where(:not(:has(.admin-layout))) :is(.primary-button,.member-page .primary-button,.member-dialog .primary-button,.tour-primary) {
  color: #1c102b; background: linear-gradient(110deg,#c3a3ff,#a781f5); border-color: #c7a7ff66; border-radius: 10px; box-shadow: 0 5px 24px #8f63db17;
}
body.design-refresh:where(:not(:has(.admin-layout))) :is(.primary-button:hover:not(:disabled),.member-page .primary-button:hover:not(:disabled)) { color: #1c102b; background: #d0b6ff; border-color: #d0b6ff; }
body.design-refresh:where(:not(:has(.admin-layout))) .primary-button:disabled { color: #b2a4c5; background: #3a2c4b; border-color: #4d3c60; }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.secondary-button,.member-page button:not(.primary-button),.member-dialog button:not(.primary-button)) {
  background: var(--surface-raised); color: var(--text); border-color: var(--border-strong); border-radius: 9px;
}
body.design-refresh:where(:not(:has(.admin-layout))) .secondary-button:hover:not(:disabled) { background: #302939; }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.status-message--error,.member-error) { color: #ffc0c8; background: #321d27; border-color: #b75e724d; }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.status-message--warning,.member-note) { color: #edcea3; background: #302719; border-color: #a9813d4d; }
body.design-refresh:where(:not(:has(.admin-layout))) .member-success { color: #a9dfc8; background: #1b2c27; border-color: #47796566; }
body.design-refresh:where(:not(:has(.admin-layout))) .project-status { background: #18121fe8; border-color: #bd95ff40; }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.project-status--queued,.project-status--processing,.project-status--partial_ready) { color: var(--warning); border-color: #e6b76a44; }
body.design-refresh:where(:not(:has(.admin-layout))) .project-status--failed { color: var(--danger); border-color: #ff91a04d; }
body.design-refresh:where(:not(:has(.admin-layout))) .project-card:hover { border-color: #b99ce04d; }
body.design-refresh:where(:not(:has(.admin-layout))) .project-skeleton { background-image: linear-gradient(90deg,#18161e 20%,#2a2334 50%,#18161e 80%); }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.workbench-topbar,.tool-pane,.layers-pane,.canvas-footer) { background: var(--surface); }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.tool-button--active,.layer-row--selected) { background: var(--accent-soft); border-color: #ba92ff40; }
body.design-refresh:where(:not(:has(.admin-layout))) .export-result { background: #251c31; border-color: #a77ed942; color: var(--muted-strong); }
body.design-refresh:where(:not(:has(.admin-layout))) .direct-psd__ring { background: conic-gradient(var(--accent-strong) var(--progress),var(--surface-raised) 0); }
body.design-refresh:where(:not(:has(.admin-layout))) .direct-psd__ring::before { background: var(--surface); }
body.design-refresh:where(:not(:has(.admin-layout))) .direct-psd--running .direct-psd__orbit { border-top-color: var(--accent); }

/* Commerce creators, including formerly light surfaces. */
body.design-refresh:where(:not(:has(.admin-layout))) :is(.commerce-home,.commerce-create) { color: var(--text); background: transparent; max-width: 1400px; padding-top: 40px; }
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-hero { grid-template-columns: 1.12fr 1fr; gap: 54px; padding: 18px 0 50px; }
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-hero h1 { font-weight: 600; font-size: clamp(36px,4.2vw,58px); letter-spacing: -.045em; }
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-hero h1 em { color: #c2a2fb; }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.commerce-hero p,.commerce-module p,.commerce-note,.commerce-hint,.commerce-file small,.commerce-create-heading p,.commerce-create-heading>span,.commerce-check small,.commerce-section-title span,.commerce-number,.commerce-module footer,.commerce-assets,.commerce-pagination,.commerce-empty p,.commerce-history button span,.commerce-dimension,.commerce-review-summary small) { color: var(--muted); }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.commerce-eyebrow,.commerce-empty h3,.commerce-review-summary>strong,.commerce-review-heading>span) { color: var(--accent); }
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-cards { gap: 20px; }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.commerce-module,.commerce-panel,.commerce-history button,.commerce-steps,.commerce-style-card,.commerce-review) {
  color: var(--text); background: var(--surface); border-color: var(--border); box-shadow: none; border-radius: 18px;
}
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-module { padding: 20px; }
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-module:hover { background: #1e1a26; border-color: #b594df55; transform: translateY(-3px); box-shadow: 0 18px 34px #0002; }
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-module h2 { font-size: 19px; margin-top: 19px; }
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-module footer { border-color: var(--border); }
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-mark { background: #2c223b; color: #c5a7f9; border-radius: 13px; }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.mark-live,.mark-packaging) { background: #352731; color: #e1b7cc; }
body.design-refresh:where(:not(:has(.admin-layout))) .mark-logo { background: #242b37; color: #b8c2ee; }
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-tabs a { color: var(--muted); border: 1px solid transparent; }
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-tabs a:is([aria-current],:hover) { background: #2b2039; color: #dbc5ff; border-color: #b48bf526; }
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-panel { padding: 28px; }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.commerce-panel input:not([type=checkbox]),.commerce-panel textarea,.commerce-panel select) { background: #100f14; color: var(--text); border-color: var(--border-strong); border-radius: 10px; }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.commerce-file,.commerce-panel .commerce-check,.commerce-total,.commerce-status,.commerce-linked,.commerce-history-notice,.commerce-assets>div,.commerce-review article,.commerce-specs span,.commerce-thumbnails button,.commerce-downloads a,.commerce-quiet) {
  background: #211c2a; border-color: var(--border-strong); color: var(--muted-strong);
}
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-primary { background: linear-gradient(110deg,#ba98fa,#a17ce9); color: #21132f; border-radius: 11px; box-shadow: 0 8px 22px #8051c622; }
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-primary:hover { background: #c7a8ff; }
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-steps { border-radius: 12px; }
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-steps li { border-color: var(--border); color: var(--muted); }
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-steps li>span { border-color: var(--border-strong); }
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-steps .is-current { background: #2b2039; color: #dbc5ff; }
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-steps .is-current>span { background: #b998fa; color: #21132f; border-color: #b998fa; }
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-steps .is-done { color: #bdabcF; }
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-panel .commerce-style-card { background: #1b1822; border-color: var(--border); border-radius: 11px; }
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-panel .commerce-style-card.is-selected { background: #2a2038; border-color: #ad84ed; box-shadow: 0 0 0 1px #ad84ed44; }
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-style-card small { color: var(--muted); }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.style-check,.commerce-badge) { color: #cfb1ff; }
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-badge { background: #332443; }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.commerce-stage,.commerce-price-lines p,.commerce-review details) { border-color: var(--border); }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.commerce-review h4,.commerce-review article p,.commerce-stage figcaption span) { color: var(--muted-strong); }
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-thumbnails button[aria-pressed=true] { border-color: #b58cf9; }
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-assets button,
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-file input::file-selector-button { background: #3b2d4d; color: #e4d2ff; }
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-error { background: #321d27; color: #ffc0c8; border-color: #b75e724d; }
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-spinner { border-color: #39303f; border-top-color: #bb98fa; }

/* Detail page retains actual palette swatches, user images and generated delivery. */
body.design-refresh:where(:not(:has(.admin-layout))) .detail-design { --dd-ink: #f3f0f7; --dd-muted: #aaa3b6; --dd-green: #c0a1ff; --dd-line: #ffffff14; color-scheme: dark; color: var(--text); background: transparent; }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.detail-card,.detail-steps,.detail-plan,.detail-history button) { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: none; }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.detail-hero p,.detail-free,.detail-free small,.detail-card header p,.detail-hint,.detail-upload-name,.detail-upload small,.detail-file-types,.detail-toggle small,.detail-toggle em,.detail-form-heading>span,.detail-empty p,.detail-preview-label,.detail-plan-features,.detail-plan-features b,.detail-trial-note,.detail-history header,.detail-history-empty p,.detail-style-note,.detail-style-option>span:last-child,.detail-price-row,.detail-checkout>small,.detail-job-state,.detail-screen-list small,.detail-delivery p,.detail-delivery>small,.detail-back) { color: var(--muted); }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.detail-free strong,.detail-upload strong,.detail-empty h3,.detail-working h3,.detail-history h2,.detail-history-empty strong,.detail-style-option strong,.detail-summary b,.detail-total strong) { color: var(--text); }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.detail-card>header,.detail-form-heading,.detail-plan-features,.detail-total,.detail-screen-list li,.detail-free) { border-color: var(--border); }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.detail-beta,.detail-status) { border-color: var(--border-strong); color: var(--muted); }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.detail-section-icon,.detail-upload-icon,.detail-upload--assets .detail-upload-icon,.detail-history-icon) { background: #2b2239; color: #bfa0f5; border-color: var(--border); }
body.design-refresh:where(:not(:has(.admin-layout))) .detail-card-index { color: #61526f; }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.detail-card select,.detail-card textarea) { background: #100f14; color: var(--text); border-color: var(--border-strong); }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.detail-upload,.detail-card .detail-upload--assets,.detail-card .detail-toggle,.detail-checkout,.detail-summary>span,.detail-history-empty,.detail-style-markets,.detail-screen-list li>span,.detail-asset-names span,.detail-downloads a) { background: #211c2a; color: var(--muted-strong); border-color: var(--border-strong); }
body.design-refresh:where(:not(:has(.admin-layout))) .detail-upload:is(:hover,:focus-within) { background: #2b2039; border-color: #aa83e2; }
body.design-refresh:where(:not(:has(.admin-layout))) .detail-file-action { color: #dac4fb; background: #32243f; border-color: #a778d44d; box-shadow: none; }
body.design-refresh:where(:not(:has(.admin-layout))) .detail-toggle input { background: #51475d; }
body.design-refresh:where(:not(:has(.admin-layout))) .detail-toggle input:checked { background: #a87aea; }
body.design-refresh:where(:not(:has(.admin-layout))) .detail-card .detail-toggle.is-on { background: #2b2039; border-color: #a778d44d; }
body.design-refresh:where(:not(:has(.admin-layout))) .detail-design .primary-button { background: linear-gradient(110deg,#c3a3ff,#a781f5); color: #20122e; border-color: #c7a7ff66; box-shadow: 0 8px 22px #8051c622; }
body.design-refresh:where(:not(:has(.admin-layout))) .detail-design .primary-button:hover:not(:disabled) { background: #ceb0ff; border-color: #ceb0ff; }
body.design-refresh:where(:not(:has(.admin-layout))) .detail-steps li { color: var(--muted); }
body.design-refresh:where(:not(:has(.admin-layout))) .detail-steps li+li { border-color: var(--border); }
body.design-refresh:where(:not(:has(.admin-layout))) .detail-steps li.is-current { color: #e0caff; background: #2c213b; }
body.design-refresh:where(:not(:has(.admin-layout))) .detail-steps :is(small,b) { color: var(--muted); border-color: var(--border-strong); }
body.design-refresh:where(:not(:has(.admin-layout))) .detail-steps .is-current b { color: #21132f; background: #bc98ff; border-color: #bc98ff; }
body.design-refresh:where(:not(:has(.admin-layout))) .detail-steps .is-done { color: #c4b3da; }
body.design-refresh:where(:not(:has(.admin-layout))) .detail-steps .is-done b { color: #d3b9f7; background: #342842; }
body.design-refresh:where(:not(:has(.admin-layout))) .detail-card .detail-style-option { background: #1b1822; border-color: var(--border); }
body.design-refresh:where(:not(:has(.admin-layout))) .detail-card .detail-style-option.is-selected { background: #2b2039; border-color: #a77adf; box-shadow: 0 0 0 1px #a77adf33; }
body.design-refresh:where(:not(:has(.admin-layout))) .detail-style-option input { accent-color: #b88bfa; }
body.design-refresh:where(:not(:has(.admin-layout))) .detail-style-markets button { color: var(--muted); }
body.design-refresh:where(:not(:has(.admin-layout))) .detail-style-markets button[aria-pressed=true] { color: #e1cdff; background: #38294b; box-shadow: none; }
body.design-refresh:where(:not(:has(.admin-layout))) .detail-history button:is(:hover,.is-selected) { border-color: #a77adf; box-shadow: none; }
body.design-refresh:where(:not(:has(.admin-layout))) .detail-notes { background: #302719; color: #edcea3; border-color: #a9813d4d; }
body.design-refresh:where(:not(:has(.admin-layout))) .detail-error { background: #321d27; color: #ffc0c8; border-color: #b75e724d; }
body.design-refresh:where(:not(:has(.admin-layout))) .detail-pulse { border-color: #3b3045; border-top-color: #c09cfa; }
body.design-refresh:where(:not(:has(.admin-layout))) .detail-job-state--ready { color: #94d7b6; }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.detail-job-state--failed,.detail-job-state--needs_review) { color: #ecc198; }

/* Account, authentication and administration. */
body.design-refresh:where(:not(:has(.admin-layout))) .auth-story { background: radial-gradient(ellipse at 30% 30%,#6d438233,transparent 70%),#1a1522; }
body.design-refresh:where(:not(:has(.admin-layout))) .auth-story h2 { letter-spacing: -.05em; }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.auth-benefits,.member-list,.member-card label,.member-page summary) { color: var(--muted-strong); }
body.design-refresh:where(:not(:has(.admin-layout))) .member-grid>.member-card:nth-child(2) { border-color: #9872c24d; }
body.design-refresh:where(:not(:has(.admin-layout))) .member-table th { background: #201a29; color: var(--muted); }
body.design-refresh:where(:not(:has(.admin-layout))) .member-table tbody tr:hover { background: #241e2e; }
body.design-refresh:where(:not(:has(.admin-layout))) .admin-sidebar { background: #121015; border-color: var(--border); }
body.design-refresh:where(:not(:has(.admin-layout))) .admin-sidebar button:not(.primary-button) { background: transparent; border-color: transparent; color: var(--muted); }
body.design-refresh:where(:not(:has(.admin-layout))) .admin-sidebar button[aria-current=page] { background: #2d213c; border-color: #b994e82e; color: #dcc4ff; }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.admin-nav-mark,.admin-sidebar .member-eyebrow,.admin-metrics small) { color: #b29acb; }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.admin-selection,.admin-badge,.member-tour) { background: #251c31; color: #d7bfef; border-color: #a778d449; }
body.design-refresh:where(:not(:has(.admin-layout))) .admin-badge:before { background: #b995ee; }
body.design-refresh:where(:not(:has(.admin-layout))) .admin-savebar { background: #17161cf5; }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.tour-welcome,.tour-tooltip) { background: #211929; border-color: #75568f; color: var(--text); }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.member-tour p,.tour-welcome p,.tour-tooltip p) { color: var(--muted-strong); }
body.design-refresh:where(:not(:has(.admin-layout))) :is(.member-tour button,.tour-logo) { background: #392747; border-color: #87669e; color: #e0c7ff; }
body.design-refresh:where(:not(:has(.admin-layout))) .tour-progress i.active { background: var(--accent-strong); }
body.design-refresh:where(:not(:has(.admin-layout))) .tour-spotlight { border-color: #c8a3ff; box-shadow: 0 0 0 4px #c8a3ff22; }
body.design-refresh:where(:not(:has(.admin-layout))) .ai-studio-shell iframe,
body.design-refresh:where(:not(:has(.admin-layout))) .ai-studio-loading { background: var(--bg); }

/* Embedded studio: restrained chrome makes the artwork the focal point. */
body.design-refresh-studio .ambient { opacity: .15; }
body.design-refresh-studio .sidebar { background: #111015; border-color: var(--border); width: 218px; flex-basis: 218px; padding: 28px 15px 20px; }
body.design-refresh-studio .nav-item { color: var(--muted); border-radius: 10px; padding-block: 13px; }
body.design-refresh-studio .nav-item.active { background: #2d213c; color: #e1cdff; border-color: #b994e82e; }
body.design-refresh-studio .nav-item:hover { background: #211b2a; color: var(--text); }
body.design-refresh-studio :is(.nav-label,.section-kicker,.eyebrow) { color: #ac97c1; }
body.design-refresh-studio .new-project-button { background: #2d213c; color: #e1cdff; border-color: #b994e843; box-shadow: none; }
body.design-refresh-studio .topbar { background: #0f0d12cc; border-color: var(--border); padding-inline: 36px; }
body.design-refresh-studio .workspace { width: min(1380px,calc(100% - 72px)); padding-top: 38px; }
body.design-refresh-studio .welcome-row { align-items: center; gap: 24px; margin-bottom: 32px; }
body.design-refresh-studio .welcome-row h1 { font-size: clamp(34px,3.7vw,52px); line-height: 1.25; letter-spacing: -.05em; }
body.design-refresh-studio .welcome-row h1 em { color: #c6a4ff; }
body.design-refresh-studio :is(.welcome-copy,.gallery-subtitle,.assistant-intro,.prompt-hint,.prompt-footer,.composer-note,.control-field,.mode-button small,.upload-zone>span,.empty-gallery p) { color: var(--muted); }
body.design-refresh-studio :is(.glass-card,.composer-card,.assistant-card,.document-panel) { background: #18151e; border-color: var(--border); box-shadow: var(--shadow); border-radius: 20px; }
body.design-refresh-studio .composer-card { background: linear-gradient(135deg,#211828,#17151c 65%); padding: 28px; }
body.design-refresh-studio .assistant-card { padding: 24px; }
body.design-refresh-studio :is(.prompt-wrap,.assistant-input-wrap,.upload-zone,.empty-gallery) { background: #100e15; border-color: var(--border-strong); }
body.design-refresh-studio .prompt-wrap { border-radius: 14px; padding: 18px; }
body.design-refresh-studio .prompt-wrap:focus-within { border-color: #b78af0; box-shadow: 0 0 0 3px #a677df12; }
body.design-refresh-studio :is(.prompt-wrap textarea,.assistant-input-wrap textarea) { color: var(--text); background: transparent; }
body.design-refresh-studio :is(.control-field select,.prompt-library-button,.generate-psd-button,.assistant-suggestions button,.message-bubble,.round-button) { background: #25202e; border-color: var(--border-strong); color: var(--muted-strong); }
body.design-refresh-studio :is(.mode-button,.soft-button,.outline-button,.ghost-button,.tip-card) { background: #1d1825; border-color: var(--border); color: var(--muted-strong); }
body.design-refresh-studio .mode-button.active { background: #30223f; border-color: #b78af077; color: #e8d7ff; box-shadow: none; }
body.design-refresh-studio :is(.mode-icon,.upload-icon,.assistant-orb,.message-avatar,.psd-button-badge,.empty-orbit) { background: #342246; color: #d1adff; border-color: #c09bea33; box-shadow: none; }
body.design-refresh-studio :is(.generate-button,.primary-demo-action) { background: linear-gradient(110deg,#c3a3ff,#a781f5); color: #21132f; border-color: #c7a7ff66; box-shadow: 0 8px 24px #8051c622; }
body.design-refresh-studio :is(.generate-button:hover,.primary-demo-action:hover) { background: #cfb1ff; box-shadow: 0 8px 28px #8051c633; }
body.design-refresh-studio .generate-button kbd { color: #52366e; }
body.design-refresh-studio .assistant-input-wrap button { background: #b790ef; color: #21132f; }
body.design-refresh-studio .user-message .message-bubble { background: #30223f; border-color: #b78af040; color: #e2cef9; }
body.design-refresh-studio :is(.settings-modal,.image-viewer,.region-editor,.prompt-template-modal,.inspiration-detail-modal) { background: #19151f; border-color: var(--border-strong); }
body.design-refresh-studio :is(.prompt-template-card,.inspiration-card,.gallery-card) { background-color: #211c2a; border-color: var(--border); }
body.design-refresh-studio .gallery-section { margin-top: 42px; border-color: var(--border); }
body.design-refresh-studio .platform-notice { color: #d0bedc; background: #241b2d; border-color: var(--border); }

/* Real generation examples replace only decorative illustration containers. */
body:is(.design-refresh,.design-refresh-studio) .refresh-has-image { padding: 0; background: #151119; transform: none; overflow: hidden; isolation: isolate; }
body:is(.design-refresh,.design-refresh-studio) .refresh-has-image::before,
body:is(.design-refresh,.design-refresh-studio) .refresh-has-image::after { content: none; }
body:is(.design-refresh,.design-refresh-studio) .refresh-example { position: relative; display: block; width: 100%; height: 100%; margin: 0; padding: 0; }
body:is(.design-refresh,.design-refresh-studio) .refresh-example img { position: static; display: block; width: 100%; height: 100%; max-width: 100%; object-fit: cover; transform: none; border: 0; border-radius: inherit; }
body:is(.design-refresh,.design-refresh-studio) .refresh-example figcaption { position: absolute; inset: auto 0 0; margin: 0; padding: 26px 14px 12px; border: 0; background: linear-gradient(transparent,#110b18d9); color: #fff; text-align: left; font-size: 11px; line-height: 1.6; letter-spacing: .02em; }
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-hero-art.refresh-has-image { height: 350px; border-radius: 22px; box-shadow: 0 28px 65px #0003; }
body.design-refresh:where(:not(:has(.admin-layout))) .workflow-sketch.refresh-has-image { height: 190px; border-radius: 12px; margin-top: 18px; }
body.design-refresh:where(:not(:has(.admin-layout))) .commerce-empty .workflow-sketch.refresh-has-image { width: min(100%,380px); height: 265px; }
body.design-refresh:where(:not(:has(.admin-layout))) .style-mini.refresh-has-image { width: 54px; height: 66px; flex: 0 0 54px; border-radius: 7px; border-color: var(--border); }
body.design-refresh:where(:not(:has(.admin-layout))) .detail-preview-art.refresh-has-image { width: 100%; max-width: 350px; height: 390px; margin: 4px auto 18px; border-radius: 14px; }
body.design-refresh:where(:not(:has(.admin-layout))) .detail-preview-art .refresh-example img { object-fit: contain; }
body.design-refresh:where(:not(:has(.admin-layout))) .layer-study__scene.refresh-has-image { height: 310px; background-image: none; }
body.design-refresh:where(:not(:has(.admin-layout))) .layer-study__scene .refresh-example img { object-fit: contain; }
body.design-refresh:where(:not(:has(.admin-layout))) .auth-art.refresh-has-image { width: 100%; height: 250px; margin-top: 28px; border-radius: 16px; transform: none; }

/* Image-first template library. */
body:is(.design-refresh,.design-refresh-studio) .refresh-template-section { margin-top: 52px; padding-top: 32px; border-top: 1px solid var(--border); }
body:is(.design-refresh,.design-refresh-studio) .refresh-section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
body:is(.design-refresh,.design-refresh-studio) .refresh-eyebrow { display: block; color: #b997e5; font-size: 10px; letter-spacing: .18em; font-weight: 600; line-height: 1.7; }
body:is(.design-refresh,.design-refresh-studio) .refresh-section-head h2 { margin: 8px 0 0; color: var(--text); font-size: clamp(21px,2vw,28px); font-weight: 550; letter-spacing: -.035em; }
body:is(.design-refresh,.design-refresh-studio) .refresh-section-head p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
body:is(.design-refresh,.design-refresh-studio) .refresh-template-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; align-items: start; }
body:is(.design-refresh,.design-refresh-studio) button.refresh-template-tile { position: relative; display: block; width: 100%; min-width: 0; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; color: var(--text); background: #1c1624; cursor: pointer; text-align: left; box-shadow: none; transition: border-color .2s,transform .2s; }
body:is(.design-refresh,.design-refresh-studio) button.refresh-template-tile:hover { border-color: #bc91f078; transform: translateY(-3px); }
body:is(.design-refresh,.design-refresh-studio) .refresh-template-tile>img { position: static; display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 4/5; object-fit: cover; background: #21192a; }
body:is(.design-refresh,.design-refresh-studio) .refresh-template-tile:nth-child(3n+2)>img { aspect-ratio: 1/1; }
body:is(.design-refresh,.design-refresh-studio) .refresh-template-caption { display: grid; gap: 5px; padding: 14px 16px 16px; }
body:is(.design-refresh,.design-refresh-studio) .refresh-template-caption small { color: #bda3d9; font-size: 10px; line-height: 1.5; }
body:is(.design-refresh,.design-refresh-studio) .refresh-template-caption strong { color: #efe7f7; font-size: 13px; line-height: 1.6; font-weight: 550; letter-spacing: 0; }
body.design-refresh-studio .welcome-stats.refresh-stats-preserved { display: none; }
body.design-refresh-studio .refresh-hero-preview { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 320px; min-width: 260px; gap: 12px; padding: 0; border: 0; background: transparent; flex-shrink: 0; }
body.design-refresh-studio .refresh-hero-preview .refresh-template-tile>img { height: 170px; aspect-ratio: auto; }
body.design-refresh-studio .refresh-hero-preview .refresh-template-caption { position: absolute; inset: auto 0 0; padding: 25px 10px 9px; background: linear-gradient(transparent,#100a17dc); gap: 2px; }
body.design-refresh-studio .refresh-hero-preview .refresh-template-caption strong { font-size: 11px; color: #fff; }
body.design-refresh-studio .refresh-hero-preview .refresh-template-caption small { font-size: 9px; color: #dac7ed; }
body:is(.design-refresh,.design-refresh-studio) .refresh-image-error { display: grid; min-height: 120px; place-items: center; padding: 24px; color: var(--muted); font-size: 12px; line-height: 1.8; text-align: center; }

/* Native dialog provides focus trapping and Escape handling. */
body:is(.design-refresh,.design-refresh-studio) .refresh-dialog { width: min(1060px,calc(100vw - 48px)); max-height: calc(100dvh - 48px); padding: 0; overflow: auto; border: 1px solid #ad87d641; border-radius: 22px; color: var(--text); background: #19151f; box-shadow: 0 32px 110px #0008; }
body:is(.design-refresh,.design-refresh-studio) .refresh-dialog::backdrop { background: #07050bd1; backdrop-filter: blur(8px); }
body:is(.design-refresh,.design-refresh-studio) .refresh-dialog-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); min-height: 500px; }
body:is(.design-refresh,.design-refresh-studio) .refresh-dialog-image { display: grid; align-items: center; min-width: 0; padding: 24px; background: #100d14; }
body:is(.design-refresh,.design-refresh-studio) .refresh-dialog-image img { display: block; max-width: 100%; width: 100%; max-height: calc(100dvh - 100px); object-fit: contain; border-radius: 10px; }
body:is(.design-refresh,.design-refresh-studio) .refresh-dialog-content { min-width: 0; padding: 48px 32px 30px; }
body:is(.design-refresh,.design-refresh-studio) .refresh-dialog-content h2 { margin: 12px 0; font-size: 28px; font-weight: 550; letter-spacing: -.03em; }
body:is(.design-refresh,.design-refresh-studio) .refresh-dialog-content p { color: var(--muted); font-size: 12px; line-height: 1.9; }
body:is(.design-refresh,.design-refresh-studio) .refresh-dialog-content label { display: block; margin: 26px 0 10px; color: #d4c6e2; font-size: 12px; }
body:is(.design-refresh,.design-refresh-studio) textarea.refresh-prompt { display: block; width: 100%; min-height: 190px; resize: vertical; padding: 15px; border: 1px solid var(--border-strong); border-radius: 10px; color: #d4c9df; background: #100e15; font-family: inherit; line-height: 1.85; font-size: 12px; }
body:is(.design-refresh,.design-refresh-studio) .refresh-dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
body:is(.design-refresh,.design-refresh-studio) button.refresh-button { min-height: 42px; border: 1px solid var(--border-strong); border-radius: 9px; padding: 11px 16px; font-size: 12px; font-weight: 550; cursor: pointer; }
body:is(.design-refresh,.design-refresh-studio) button.refresh-button.primary { color: #21132f; background: #bc98fa; border-color: #bc98fa; }
body:is(.design-refresh,.design-refresh-studio) button.refresh-button.primary:hover { background: #d1b4ff; }
body:is(.design-refresh,.design-refresh-studio) button.refresh-button.secondary { color: #e0d2ed; background: #2c2239; }
body:is(.design-refresh,.design-refresh-studio) button.refresh-button.secondary:hover { background: #3a2a49; }
body:is(.design-refresh,.design-refresh-studio) .refresh-template-notice { min-height: 1.8em; margin: 12px 0 0; color: #ccb3ec; }
body:is(.design-refresh,.design-refresh-studio) .refresh-dialog-content>small { display: block; color: #9c8eac; font-size: 10px; line-height: 1.8; }
body:is(.design-refresh,.design-refresh-studio) button.refresh-modal-close { position: absolute; top: 12px; right: 12px; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; min-height: 0; border: 1px solid #ffffff24; border-radius: 50%; color: #f3eafa; background: #21182ee8; font-size: 24px; line-height: 1; cursor: pointer; }

@media (max-width:1200px) {
  body.design-refresh:where(:not(:has(.admin-layout))) .app-header__inner { width: calc(100% - 32px); gap: 18px; }
  body.design-refresh:where(:not(:has(.admin-layout))) .member-nav { gap: 14px; }
  body.design-refresh:where(:not(:has(.admin-layout))) .main-nav a { padding-inline: 12px; }
  body.design-refresh-studio .sidebar { width: 190px; flex-basis: 190px; padding-inline: 12px; }
  body.design-refresh-studio .workspace { width: calc(100% - 48px); }
  body.design-refresh-studio .refresh-hero-preview { width: 270px; min-width: 240px; }
  body.design-refresh-studio .refresh-hero-preview .refresh-template-tile>img { height: 150px; }
  body:is(.design-refresh,.design-refresh-studio) .refresh-template-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width:900px) {
  body.design-refresh:where(:not(:has(.admin-layout))) .app-header__inner { gap: 12px; }
  body.design-refresh:where(:not(:has(.admin-layout))) .member-nav { gap: 16px; }
  body.design-refresh:where(:not(:has(.admin-layout))) .page-width { width: calc(100% - 40px); }
  body.design-refresh:where(:not(:has(.admin-layout))) .commerce-hero { gap: 28px; }
  body.design-refresh:where(:not(:has(.admin-layout))) .commerce-hero-art.refresh-has-image { height: 280px; }
  body.design-refresh-studio .welcome-row { align-items: flex-start; }
  body.design-refresh-studio .refresh-hero-preview { width: 220px; min-width: 180px; gap: 8px; }
  body.design-refresh-studio .refresh-hero-preview .refresh-template-tile>img { height: 138px; }
  body.design-refresh-studio .composer-card { padding: 22px; }
  body:is(.design-refresh,.design-refresh-studio) .refresh-dialog-layout { grid-template-columns: .9fr 1fr; }
  body:is(.design-refresh,.design-refresh-studio) .refresh-dialog-content { padding: 44px 22px 24px; }
  body:is(.design-refresh,.design-refresh-studio) .refresh-dialog-content h2 { font-size: 24px; }
}
@media (max-width:760px) {
  body.design-refresh-studio .sidebar { width: 100%; flex-basis: auto; height: auto; padding: 12px 16px; }
  body.design-refresh-studio .workspace { width: 100%; padding: 24px 0 42px; }
  body.design-refresh-studio .main-content { padding: 0 18px; }
  body.design-refresh-studio .topbar { padding-inline: 0; }
  body.design-refresh-studio .welcome-row { flex-direction: column; gap: 22px; }
  body.design-refresh-studio .refresh-hero-preview { width: 100%; grid-template-columns: 1fr 1fr; }
  body.design-refresh-studio .refresh-hero-preview .refresh-template-tile>img { height: 165px; }
  body:is(.design-refresh,.design-refresh-studio) .refresh-template-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  body:is(.design-refresh,.design-refresh-studio) .refresh-section-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  body:is(.design-refresh,.design-refresh-studio) .refresh-dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); border-radius: 16px; }
  body:is(.design-refresh,.design-refresh-studio) .refresh-dialog-layout { grid-template-columns: 1fr; min-height: 0; }
  body:is(.design-refresh,.design-refresh-studio) .refresh-dialog-image { padding: 20px; }
  body:is(.design-refresh,.design-refresh-studio) .refresh-dialog-image img { max-height: 38dvh; }
  body:is(.design-refresh,.design-refresh-studio) .refresh-dialog-content { padding: 24px; }
  body:is(.design-refresh,.design-refresh-studio) textarea.refresh-prompt { min-height: 150px; }
}
@media (max-width:600px) {
  body.design-refresh:where(:not(:has(.admin-layout))) .app-header__inner { width: calc(100% - 24px); }
  body.design-refresh:where(:not(:has(.admin-layout))) .main-nav { max-width: 100%; gap: 2px; flex-wrap: wrap; }
  body.design-refresh:where(:not(:has(.admin-layout))) .main-nav a { padding-inline: 9px; font-size: 11px; }
  body.design-refresh:where(:not(:has(.admin-layout))) .member-nav { gap: 12px; }
  body.design-refresh:where(:not(:has(.admin-layout))) .page-width { width: calc(100% - 32px); }
  body.design-refresh:where(:not(:has(.admin-layout))) .workspace-intro { padding-block: 28px 22px; }
  body.design-refresh:where(:not(:has(.admin-layout))) :is(.upload-card,.psd-guide,.commerce-panel) { padding: 22px 18px; border-radius: 16px; }
  body.design-refresh:where(:not(:has(.admin-layout))) :is(.commerce-home,.commerce-create) { padding-top: 25px; }
  body.design-refresh:where(:not(:has(.admin-layout))) .commerce-hero { grid-template-columns: 1fr; gap: 20px; padding-bottom: 30px; }
  body.design-refresh:where(:not(:has(.admin-layout))) .commerce-hero h1 { font-size: 36px; }
  body.design-refresh:where(:not(:has(.admin-layout))) .commerce-hero-art.refresh-has-image { display: block; height: 260px; border-radius: 16px; }
  body.design-refresh:where(:not(:has(.admin-layout))) .style-mini.refresh-has-image { width: 42px; height: 57px; flex-basis: 42px; }
  body.design-refresh:where(:not(:has(.admin-layout))) .layer-study__scene.refresh-has-image { height: 270px; }
  body.design-refresh:where(:not(:has(.admin-layout))) .auth-art.refresh-has-image { display: none; }
  body.design-refresh-studio .welcome-row h1 { font-size: 34px; }
  body:is(.design-refresh,.design-refresh-studio) .refresh-template-section { margin-top: 36px; padding-top: 26px; }
  body:is(.design-refresh,.design-refresh-studio) .refresh-template-caption { padding: 11px; }
  body:is(.design-refresh,.design-refresh-studio) .refresh-template-caption strong { font-size: 12px; }
  body:is(.design-refresh,.design-refresh-studio) .refresh-section-head h2 { font-size: 22px; }
  body:is(.design-refresh,.design-refresh-studio) .refresh-dialog-actions { gap: 8px; }
  body:is(.design-refresh,.design-refresh-studio) button.refresh-button { flex: 1 1 150px; }
}
@media (prefers-reduced-motion: reduce) {
  body:is(.design-refresh,.design-refresh-studio) *,
  body:is(.design-refresh,.design-refresh-studio) *::before,
  body:is(.design-refresh,.design-refresh-studio) *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
