/* Native theme bridge. Classic deliberately receives no overrides. */
html[data-theme]:not([data-theme="classic"]),
html[data-theme]:not([data-theme="classic"]) body {
  color-scheme:var(--theme-scheme);
  --bg:var(--theme-page);--text:var(--theme-text);--muted:var(--theme-muted);
  --line:var(--theme-border);--line-hi:var(--theme-border-strong);
  --accent:var(--theme-accent);--cyan:var(--theme-accent);--blue:var(--theme-accent);
  --cyan-ink:var(--theme-on-accent);--panel:var(--theme-surface);--soft:var(--theme-soft);
  --glass:var(--theme-surface);--glass-flat:var(--theme-surface);
  --paper:var(--theme-surface);--paper-ink:var(--theme-text);--paper-rule:var(--theme-border);
  --display:var(--theme-heading);--lift:0 5px 18px #00000008;
  background:var(--theme-page);color:var(--theme-text);
}
html[data-theme]:not([data-theme="classic"]) :is(h1,h2,h3,h4,strong,b) {color:var(--theme-text)}
html[data-theme]:not([data-theme="classic"]) :is(h1,h2) {font-family:var(--theme-heading)}
html[data-theme]:not([data-theme="classic"]) :is(p,.lede,.form-note,.page-intro,.admin-lede,.secure-caption,.table-hint,.eyebrow,.welcome-kicker,.record-ref,.invoice-brand span,.invoice-notes p,.workspace-footer,.client-foot,.admin-foot) {color:var(--theme-muted)}
html[data-theme]:not([data-theme="classic"]) :is(small,dt,time,.cell-secondary,.ticket-detail-list dd,.detail-list dd,.portal-meta dd,.invoice-addresses dd,.service-list-info small,.service-tile-meta,.service-hero-facts small,.recent-ticket-list small,.conversation-reply p,.checkout-steps,.summary-cycle,.back-link) {color:var(--theme-muted)}
html[data-theme]:not([data-theme="classic"]) :is(a,.service-links a,.ticket-detail-list a,.operations-link,.card-title>a) {color:var(--theme-accent)}
html[data-theme]:not([data-theme="classic"]) a:hover {color:var(--theme-accent-hover)}
html[data-theme]:not([data-theme="classic"]) :focus-visible {outline:3px solid var(--theme-focus);outline-offset:3px}
html[data-theme]:not([data-theme="classic"]) :is(.portal-card,.admin-card,.svc-card,.plan,.plan-card,.feature-card,.feature,.faq-item,.knowledge-card,.kb-card,.article-card,.step-card,.price-card,.auth-card,.cfg-card,.config-card,.summary-card,.review-card,.suite-composer,.catalog-card,.server-card,.game-card,.voice-card,.service-tile,.invoice-paper,.conversation-card,.new-ticket,.order-card,.stat-card,.metric-card,.stat,.stats>a,.stats>div,.metric,.metrics>div) {
  background:var(--theme-surface);border-color:var(--theme-border);color:var(--theme-text);
  border-radius:var(--theme-radius);box-shadow:0 4px 16px #00000006;
}
html[data-theme]:not([data-theme="classic"]) :is(.portal-card:hover,.svc-card:hover,.plan-card:hover,.service-tile:hover,.game-card:hover) {border-color:var(--theme-border-strong)}
html[data-theme]:not([data-theme="classic"]) :is(.workspace-stage,.admin-main,.auth-main,.auth-main-inner,.public-body main) {background:var(--theme-page);color:var(--theme-text)}
html[data-theme]:not([data-theme="classic"]) :is(.workspace-bar,.admin-savebar,.portal-table-wrap,.form-section,.invoice-heading,.invoice-addresses,.invoice-notes,.conversation-heading,.conversation-reply,.card-title,.catalog-group,.tabs,.server-filters,.table-tools,.payment-card-actions) {background:var(--theme-surface);border-color:var(--theme-border)}
html[data-theme]:not([data-theme="classic"]) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),textarea,select,.cart-code-form input,.cart-line-actions select) {
  background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-border-strong);
  border-radius:var(--theme-radius);color-scheme:var(--theme-scheme);
}
html[data-theme]:not([data-theme="classic"]) :is(input,textarea)::placeholder {color:var(--theme-muted);opacity:1}
html[data-theme]:not([data-theme="classic"]) :is(input[type="checkbox"],input[type="radio"],input[type="range"]) {accent-color:var(--theme-accent)}
html[data-theme]:not([data-theme="classic"]) :is(label,legend,.form-grid label,.portal-form label,.admin-form label) {color:var(--theme-text)}
html[data-theme]:not([data-theme="classic"]) :is(fieldset,details,.configuration-details,.configuration-grid>div,.toggle-row,.detail-list>div,.portal-meta>div,.credit-payment-option,.promotion-products .check,.ols-fields,.egg-picker,.egg-summary,.suite-items td,.suite-totals>div,.related-records>a,.recent-ticket-list>a,.due-invoices>a,.service-list-item,.attention-list>a,.invoice-lines td) {border-color:var(--theme-border)}
html[data-theme]:not([data-theme="classic"]) :is(code,pre,.pill,.chip,.tag,.badge,.avatar,.service-symbol,.attention-icon,.assist-icon,.checkout-explanation>span,.empty-icon,.welcome-illustration,.configuration-details,.soft-note,.empty-state,.operations-card,.help-card,.table-filter,.suite-items tfoot,.suite-live-total,.suite-doc-meta,.egg-summary,.egg-picker-note) {
  background:var(--theme-soft);color:var(--theme-text);border-color:var(--theme-border);
}
html[data-theme]:not([data-theme="classic"]) :is(.avatar,.service-symbol,.attention-icon,.assist-icon,.empty-icon,.checkout-explanation>span) {color:var(--theme-accent)}
html[data-theme]:not([data-theme="classic"]) .btn {
  background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-border-strong);
  box-shadow:none;border-radius:var(--theme-radius);
}
html[data-theme]:not([data-theme="classic"]) .btn:hover {background:var(--theme-soft);color:var(--theme-text);border-color:var(--theme-accent)}
html[data-theme]:not([data-theme="classic"]) .btn.primary {
  background:var(--theme-accent);color:var(--theme-on-accent);border-color:var(--theme-accent);box-shadow:none;
}
html[data-theme]:not([data-theme="classic"]) .btn.primary:hover {background:var(--theme-accent-hover);border-color:var(--theme-accent-hover);color:var(--theme-on-accent)}
html[data-theme]:not([data-theme="classic"]) :is(.portal-table,.invoice-lines,.suite-items) {color:var(--theme-text);border-color:var(--theme-border)}
html[data-theme]:not([data-theme="classic"]) :is(.portal-table th,.invoice-lines th,.suite-items th,thead) {background:var(--theme-soft);color:var(--theme-muted);border-color:var(--theme-border)}
html[data-theme]:not([data-theme="classic"]) :is(.portal-table td,.invoice-lines td,.suite-items td,tbody tr) {background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-border)}
html[data-theme]:not([data-theme="classic"]) :is(.portal-table tr:hover td,.responsive-table tr:hover td) {background:var(--theme-soft)}
html[data-theme]:not([data-theme="classic"]) :is(.cell-main,.service-list-info strong,.invoice-lines td strong,.invoice-calculation dd,.invoice-total,.summary-total strong,.welcome-panel h2,.record-heading h2,.conversation-heading h2,.service-hero-top h2) {color:var(--theme-text)}
html[data-theme]:not([data-theme="classic"]) :is(.summary-total,.invoice-grand-total,.conversation-messages,.invoice-calculation,.service-hero-facts,.service-progress,.reply-actions,.welcome-panel,.payment-card) {background:var(--theme-surface);border-color:var(--theme-border);color:var(--theme-text)}
html[data-theme]:not([data-theme="classic"]) :is(.portal-message p,.portal-message.staff p,.message-bubble) {background:var(--theme-soft);color:var(--theme-text);border-color:var(--theme-border)}
html[data-theme]:not([data-theme="classic"]) :is(.portal-message header,.portal-message time,.conversation-messages time,.ticket-detail-list dt,.invoice-addresses dt,.invoice-type .eyebrow) {color:var(--theme-muted)}
html[data-theme]:not([data-theme="classic"]) :is(.tabs a[aria-current="page"],.connection-tabs a[aria-current="page"],.billing-tabs a[aria-current="page"],.checkout-steps .active) {background:var(--theme-soft);color:var(--theme-accent);border-color:var(--theme-accent)}
html[data-theme]:not([data-theme="classic"]) :is(.admin-nav,.auth-story,.nav,.foot,.site-footer,.public-footer,.footer,.footer-cta) {
  --text:var(--theme-nav-text);--muted:var(--theme-nav-muted);--line:var(--theme-nav-line);
  background:var(--theme-nav);color:var(--theme-nav-text);border-color:var(--theme-nav-line);
}
html[data-theme]:not([data-theme="classic"]) :is(.admin-nav,.auth-story,.nav,.foot,.site-footer,.public-footer,.footer) :is(a,p,span,small,li,.nav-heading,.nav-person,.sidebar-assist p,.auth-story-footer) {color:var(--theme-nav-muted)}
html[data-theme]:not([data-theme="classic"]) :is(.admin-nav,.auth-story,.nav,.foot,.site-footer,.public-footer,.footer) :is(h1,h2,h3,strong,.brand span,.auth-wordmark,.admin-brand span,.nav-person>span) {color:var(--theme-nav-text)}
html[data-theme]:not([data-theme="classic"]) :is(.nav-group a:hover,.nav-group a[aria-current="page"],.admin-nav .btn,.sidebar-assist,.nav-person .avatar) {background:var(--theme-nav-active);color:var(--theme-nav-text);border-color:var(--theme-nav-line)}
/* Public menu items use an underline; sidebar tiles must not become square menu blocks. */
html[data-theme]:not([data-theme="classic"]) .nav .links {background:var(--theme-nav);border-color:var(--theme-nav-line)}
html[data-theme]:not([data-theme="classic"]) .nav .links>a:not(.btn):not(.client-link) {background:transparent;color:var(--theme-nav-muted);border-color:transparent}
html[data-theme]:not([data-theme="classic"]) .nav .links>a:not(.btn):not(.client-link):hover {background:transparent;color:var(--theme-nav-text);border-bottom-color:var(--theme-nav-muted)}
html[data-theme]:not([data-theme="classic"]) .nav .links>a:not(.btn):not(.client-link)[aria-current="page"] {background:transparent;color:var(--theme-nav-text);border-bottom-color:var(--theme-nav-text)}
/* The original client link uses important color/border declarations. Override only those. */
html[data-theme]:not([data-theme="classic"]) .nav .links>.client-link {background:transparent;color:var(--theme-nav-text)!important;border-color:var(--theme-nav-line)!important}
html[data-theme]:not([data-theme="classic"]) .nav .links>.client-link:hover {background:var(--theme-nav-active)}
html[data-theme]:not([data-theme="classic"]) .nav .btn.primary {background:var(--theme-accent);color:var(--theme-on-accent);border-color:var(--theme-accent)}
html[data-theme]:not([data-theme="classic"]) .nav .btn.primary:hover {background:var(--theme-accent-hover);color:var(--theme-on-accent);border-color:var(--theme-accent-hover)}
html[data-theme]:not([data-theme="classic"]) .nav .btn.primary :is(span,.icon) {background:transparent;color:var(--theme-on-accent)}
html[data-theme]:not([data-theme="classic"]) :is(.nav,.admin-nav,.auth-story,.foot) :focus-visible {outline-color:var(--theme-nav-text)}
html[data-theme]:not([data-theme="classic"]) .foot a:hover {color:var(--theme-nav-text)}
html[data-theme]:not([data-theme="classic"]) :is(.admin-brand,.admin-nav-bottom,.nav-person,.nav-group,.sidebar-assist,.auth-benefits li) {border-color:var(--theme-nav-line)}
html[data-theme]:not([data-theme="classic"]) :is(.nav .menu,.nav-close,.admin-nav .workspace-menu,.auth-story .icon,.auth-benefits .icon,.sidebar-assist .icon) {color:var(--theme-nav-text);background:transparent}
html[data-theme]:not([data-theme="classic"]) .nav .menu {background:var(--theme-nav-active);border-color:var(--theme-nav-line)}
/* Ordinary bands and client service cards are content surfaces, not dark heroes. */
html[data-theme]:not([data-theme="classic"]) :is(.hero-panel,.hero-system,.hero-card,.hero-server,.server-window,.server-preview,.hero-console,.dark-band,.cta,.hosting-overview,.capacity-strip) {
  background:var(--theme-hero);color:var(--theme-hero-text);border-color:var(--theme-nav-line);border-radius:var(--theme-radius);
}
html[data-theme]:not([data-theme="classic"]) :is(.hero-panel,.hero-system,.hero-card,.hero-server,.server-window,.server-preview,.hero-console,.dark-band,.cta,.hosting-overview,.capacity-strip) :is(h1,h2,h3,strong,b) {color:var(--theme-hero-text)}
html[data-theme]:not([data-theme="classic"]) :is(.hero-panel,.hero-system,.hero-card,.hero-server,.server-window,.server-preview,.hero-console,.dark-band,.cta,.hosting-overview,.capacity-strip) :is(p,span,small,dt,dd,.lede) {color:var(--theme-hero-muted)}
html[data-theme]:not([data-theme="classic"]) .portal-status {background:var(--theme-soft);color:var(--theme-muted);border-color:var(--theme-border)}
html[data-theme]:not([data-theme="classic"]) :is(.portal-status.paid,.portal-status.active,.portal-status.completed,.portal-status.accepted,.portal-status.done,.admin-alert.success,.payment-confirmation) {background:#e4f3eb;color:#1b6143;border-color:#a8d2ba}
html[data-theme]:not([data-theme="classic"]) :is(.portal-status.unpaid,.portal-status.pending,.portal-status.review,.portal-status.held,.portal-status.awaiting_payment,.admin-alert.warning,.sandbox-label) {background:#fff1d7;color:#785210;border-color:#dfc797}
html[data-theme]:not([data-theme="classic"]) :is(.portal-status.failed,.portal-status.cancelled,.portal-status.disabled,.portal-status.void,.portal-status.revoked,.admin-alert.error,.btn.danger) {background:#fce8e8;color:#972c34;border-color:#dfb2b6}
html[data-theme]:is([data-theme="midnight"],[data-theme="halloween"],[data-theme="aurora"]) :is(.portal-status.paid,.portal-status.active,.portal-status.completed,.portal-status.accepted,.portal-status.done,.admin-alert.success,.payment-confirmation) {background:#17382b;color:#a8e9bf;border-color:#3d7559}
html[data-theme]:is([data-theme="midnight"],[data-theme="halloween"],[data-theme="aurora"]) :is(.portal-status.unpaid,.portal-status.pending,.portal-status.review,.portal-status.held,.portal-status.awaiting_payment,.admin-alert.warning,.sandbox-label) {background:#3a2e1d;color:#f4d39a;border-color:#836841}
html[data-theme]:is([data-theme="midnight"],[data-theme="halloween"],[data-theme="aurora"]) :is(.portal-status.failed,.portal-status.cancelled,.portal-status.disabled,.portal-status.void,.portal-status.revoked,.admin-alert.error,.btn.danger) {background:#3b2029;color:#ffc1c6;border-color:#87505c}
html[data-theme]:not([data-theme="classic"]) .admin-alert :is(p,strong,span,small) {color:inherit}
html[data-theme]:not([data-theme="classic"]) .admin-alert a {color:inherit;text-decoration:underline}
html[data-theme="studio"] :is(.public-body h1,.public-body h2,.admin-top h1,.auth-main h1,.auth-story h2) {letter-spacing:-.025em;font-weight:600}
html[data-theme]:not([data-theme="classic"]):is([data-theme="evergreen"],[data-theme="midnight"],[data-theme="halloween"]) :is(.portal-card,.admin-card,.svc-card,.service-tile,.stat-card,.invoice-paper) {box-shadow:none}
html[data-theme]:is([data-theme="midnight"],[data-theme="halloween"],[data-theme="aurora"]) .nav-shade {background:#00000085}

/* Public hosting cards, dashboard illustrations and native connection screens. */
html[data-theme]:not([data-theme="classic"]) :is(.svc,.feat,.step,.gtile,.row,.principles>div,.choice-body,.gmini,.setup-summary,.workspace-preview,.preview-float,.stats-grid,.value-strip,.band.white,.customer-metrics,.kb-article,.admin-stat,.portal-stat,.tier-editor>div,.portal-pagination) {background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-border);border-radius:var(--theme-radius);box-shadow:none}
html[data-theme]:not([data-theme="classic"]) :is(.svc h3,.svc-price strong,.row h3,.gmini strong,.gtile h3,.choice-body strong,.step-block>h2,.setup-summary-heading h2,.preview-content>h2,.preview-service strong,.preview-float strong,.value strong,.stat strong,.admin-stat strong,.portal-stat strong,.customer-metrics strong,.offer-total,.portal-card .offer-total,.egg-picker h3,.egg-game-settings h3,.egg-plan-resources h3,.tier-editor strong,.payment-clear strong,.access-pending h3,.service-progress strong) {color:var(--theme-text)}
html[data-theme]:not([data-theme="classic"]) :is(.svc>p,.svc-price,.row p,.gmini small,.preview-content>p,.preview-service small,.preview-float small,.value small,.admin-stat small,.portal-stat>span:last-child,.customer-metrics small,.customer-metrics strong span,.offer-total small,.kb-article-meta,.kb-result-meta,.egg-runtime span,.egg-image-ref,.suite-billing-address,.setup-facts span,.setup-price-note,.setup-preview-label,.setup-help,.setup-ref,.payment-clear p,.access-pending p,.readiness-list small,.service-progress li) {color:var(--theme-muted)}
html[data-theme]:not([data-theme="classic"]) :is(.svc.pick,.choice input:checked+.choice-body,.preview-top,.preview-service,.preview-tiles>div,.preview-note,.svc-flag,.ico,.value>.icon,.band.soft,.kb-aside,.request-offer,.stat-symbol,.count-badge,.badge,.egg-notice,.egg-runtime,.suite-total-preview,.suite-one-time-note,.suite-secret code,.setup-product,.setup-facts,.client-announcement,.payment-clear>span,.help-symbol,.checkout-steps li>span,.service-progress li span,.readiness-icon) {background:var(--theme-soft);color:var(--theme-text);border-color:var(--theme-border)}
html[data-theme]:not([data-theme="classic"]) .choice input:checked+.choice-body {border-color:var(--theme-accent)}
html[data-theme]:not([data-theme="classic"]) :is(.choice input:checked+.choice-body strong,.preview-service .ico,.preview-tiles .icon,.preview-float .icon,.stat-symbol,.svc-flag,.setup-price,.setup-live,.setup-copy-status,.checkout-steps li[aria-current]) {color:var(--theme-accent)}
html[data-theme]:not([data-theme="classic"]) :is(.preview-top>span,.preview-tiles span,.preview-note,.kb-aside p,.kb-read,.request-steps,.egg-notice p,.egg-runtime p,.suite-total-preview span,.suite-one-time-note p) {color:var(--theme-muted)}
html[data-theme]:not([data-theme="classic"]) :is(.home-hero,.preview-rail,.setup-editor,.setup-toolbar,.setup-editor-footer) {background:var(--theme-hero);color:var(--theme-hero-text);border-color:var(--theme-nav-line)}
html[data-theme]:not([data-theme="classic"]) .home-hero::before {border-color:var(--theme-nav-line);box-shadow:none;opacity:.5}
html[data-theme="summer"]:not([data-theme="classic"]) .home-hero::before {border-width:2px;border-style:double}
html[data-theme="halloween"]:not([data-theme="classic"]) .home-hero::before {border-color:var(--theme-accent);border-style:dashed;opacity:.2}
html[data-theme="winter"]:not([data-theme="classic"]) .home-hero::before {border-radius:28px;transform:rotate(25deg)}
html[data-theme="easter"]:not([data-theme="classic"]) .home-hero::before {border-radius:48% 62% 42% 54%}
html[data-theme]:not([data-theme="classic"]) .home-hero :is(h1,h2,h3,h4,strong,b,.grad) {color:var(--theme-hero-text)}
html[data-theme]:not([data-theme="classic"]) .home-hero :is(p,span,small,.lede,.eyebrow,.checks) {color:var(--theme-hero-muted)}
html[data-theme]:not([data-theme="classic"]) .home-hero .workspace-preview :is(h1,h2,h3,strong,b) {color:var(--theme-text)}
html[data-theme]:not([data-theme="classic"]) .home-hero .workspace-preview :is(p,span,small) {color:var(--theme-muted)}
html[data-theme]:not([data-theme="classic"]) .home-hero .btn.primary :is(span,.icon) {color:var(--theme-on-accent)}
html[data-theme]:not([data-theme="classic"]) .home-hero .btn:not(.primary) {background:var(--theme-nav-active);color:var(--theme-nav-text);border-color:var(--theme-nav-line)}
html[data-theme]:not([data-theme="classic"]) .setup-editor :is(pre,code) {background:transparent;color:var(--theme-hero-text);border:0}
html[data-theme]:not([data-theme="classic"]) :is(.setup-copy,.setup-retry,.setup-quote-link) {background:var(--theme-nav-active);color:var(--theme-nav-text);border-color:var(--theme-nav-line)}
html[data-theme]:not([data-theme="classic"]) :is(.portal-form,.admin-form,.form-grid) :is(.check>span,.check-label,.toggle-label,.field-required) {color:var(--theme-text)}
html[data-theme]:not([data-theme="classic"]) .setup-editor .setup-comment {color:var(--theme-hero-muted)}
html[data-theme]:not([data-theme="classic"]) .home-hero .hero-caption {color:var(--theme-hero-muted)}
html[data-theme]:not([data-theme="classic"]) :is(.gart,.game-artwork) :is(h1,h2,h3,strong,span,p) {color:var(--theme-hero-text)}
html[data-theme]:not([data-theme="classic"]) .foot h4 {color:var(--theme-nav-text)}
html[data-theme]:not([data-theme="classic"]) :is(.suite-proration-result,.suite-hook-record,.preview-service,.stats-grid,.value-strip,.kb-article,.request-steps,.setup-summary,.setup-product,.setup-facts) {border-color:var(--theme-border)}
html[data-theme]:not([data-theme="classic"]) :is(.portal-status.open,.portal-status.staff_reply,.portal-status.customer_reply,.portal-status.scheduled,.portal-status.provisioning) {background:var(--theme-soft);color:var(--theme-accent);border-color:var(--theme-border)}
html[data-theme]:not([data-theme="classic"]) :is(.portal-status.refunded,.portal-status.closed,.portal-status.reversed) {background:var(--theme-soft);color:var(--theme-text);border-color:var(--theme-border)}
html[data-theme]:not([data-theme="classic"]) :is(.client-announcement.maintenance,.operations-public-notice,.access-pending>span) {background:#fff1d7;color:#785210;border-color:#dfc797}
html[data-theme]:is([data-theme="midnight"],[data-theme="halloween"],[data-theme="aurora"]) :is(.client-announcement.maintenance,.operations-public-notice,.access-pending>span) {background:#3a2e1d;color:#f4d39a;border-color:#836841}
html[data-theme]:not([data-theme="classic"]) :is(.client-announcement,.operations-public-notice) :is(p,strong,span) {color:inherit}
html[data-theme]:not([data-theme="classic"]) :is(.launch-progress,.progress-track) {background:var(--theme-soft)}
html[data-theme]:not([data-theme="classic"]) .launch-progress::-webkit-progress-bar {background:var(--theme-soft)}
html[data-theme]:not([data-theme="classic"]) .launch-progress::-webkit-progress-value,
html[data-theme]:not([data-theme="classic"]) .progress-track>span {background:var(--theme-accent)}
html[data-theme]:not([data-theme="classic"]) .launch-progress::-moz-progress-bar {background:var(--theme-accent)}
html[data-theme]:not([data-theme="classic"]) .switch {background:var(--theme-border-strong)}
html[data-theme]:not([data-theme="classic"]) input:checked+.switch {background:var(--theme-accent)}

/* Appearance controls exist only on the owner theme page. */
.appearance-form {display:grid;gap:24px}
.appearance-intro {display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:20px}
.appearance-intro p {max-width:62ch;margin:8px 0 0}
.theme-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.theme-card {display:flex;flex-direction:column;border:1px solid var(--line,#e1e8f1);border-radius:12px;background:var(--panel,#fff);padding:12px;min-width:0;position:relative}
.theme-card.is-selected {border-color:var(--accent,#2169df);outline:2px solid var(--accent,#2169df);outline-offset:2px}
.theme-select {display:flex;align-items:center;gap:8px;font-weight:700;cursor:pointer;margin:16px 2px 6px}
.theme-select input {width:16px;height:16px;flex:0 0 16px}
.theme-card .theme-description {font-size:.78rem;line-height:1.65;margin:6px 2px 12px;flex:1}
.theme-card .theme-tone {font-size:.67rem;margin:0 2px;color:var(--muted,#5f7087)}
.theme-card .theme-preview-link {font-size:.76rem;margin:0 2px;text-decoration:underline;text-underline-offset:3px}
.theme-picker>.visually-hidden {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.theme-thumbnail {height:147px;border:1px solid var(--theme-border);border-radius:8px;overflow:hidden;background:var(--theme-page);display:grid;grid-template-columns:30px 1fr;pointer-events:none}
.theme-thumbnail-nav {background:var(--theme-nav);padding:14px 7px;display:grid;align-content:start;gap:9px}
.theme-thumbnail-nav i {height:4px;background:var(--theme-nav-muted);opacity:.8;border-radius:2px}
.theme-thumbnail-nav i:first-child {height:11px;width:11px;border-radius:3px;background:var(--theme-accent);opacity:1;margin:0 0 7px}
.theme-thumbnail-main {padding:13px;display:grid;align-content:start;gap:9px}
.theme-thumbnail-title {height:7px;background:var(--theme-text);width:60%;border-radius:2px}
.theme-thumbnail-subtitle {height:3px;background:var(--theme-muted);width:79%;border-radius:2px}
.theme-thumbnail-stats {display:grid;grid-template-columns:repeat(3,1fr);gap:5px;margin:4px 0}
.theme-thumbnail-stats i {height:25px;background:var(--theme-surface);border:1px solid var(--theme-border);border-radius:3px}
.theme-thumbnail-row {height:7px;background:var(--theme-surface);border:1px solid var(--theme-border);border-radius:2px}
.theme-thumbnail-button {height:10px;width:41%;background:var(--theme-accent);border-radius:3px;margin-top:2px}
.appearance-actions {display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.appearance-current {display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}
.appearance-current span {padding:6px 10px;border:1px solid var(--line,#e1e8f1);border-radius:7px;font-size:.75rem}
.theme-preview-status {padding:14px 16px;background:var(--panel,#fff);border:1px solid var(--line,#e1e8f1);border-radius:9px;font-size:.83rem}
.theme-preview-status strong {display:block;margin-bottom:5px}
.theme-showcase-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.theme-showcase {border:1px solid var(--line,#e1e8f1);border-radius:10px;overflow:hidden;background:var(--panel,#fff)}
.theme-showcase-heading {padding:14px 16px;border-bottom:1px solid var(--line,#e1e8f1);display:flex;justify-content:space-between;gap:12px;align-items:center}
.theme-showcase-heading h3 {font:700 .75rem var(--sans);margin:0}
.theme-showcase-heading span {font-size:.62rem;color:var(--muted)}
.theme-showcase-nav {padding:14px 16px;background:#0d1b2e;color:#eaf2fc;font-size:.72rem;display:flex;align-items:center;gap:8px}
.theme-showcase-nav img {width:23px;height:23px;border-radius:4px}
.theme-showcase-nav span {color:inherit}
.theme-showcase-content {padding:18px;background:var(--bg,#f8fafc);min-height:290px}
.theme-showcase-content h2 {font-size:1.1rem;line-height:1.4;margin:5px 0 10px}
.theme-showcase-content p {font-size:.75rem;line-height:1.7;margin:0 0 15px}
.theme-showcase-content .portal-card {padding:13px!important;margin:13px 0 0;box-shadow:none}
.theme-showcase-content .portal-card h3 {font-size:.75rem;margin:0 0 8px}
.theme-showcase-content .preview-meta {display:flex;justify-content:space-between;gap:8px;font-size:.72rem;align-items:center}
.theme-showcase-content .preview-metric {font-size:1.6rem;font-weight:700;margin:0 0 5px;color:var(--text)}
.theme-showcase-content .btn {font-size:.66rem;min-height:31px;padding:7px 12px}
.theme-showcase-content .preview-table {margin-top:14px;width:100%;font-size:.66rem;border-collapse:collapse}
.preview-table th,.preview-table td {text-align:left;padding:10px 4px;border-bottom:1px solid var(--line,#e1e8f1)}
.preview-table th {font-weight:500;color:var(--muted)}
html[data-theme]:not([data-theme="classic"]) .theme-showcase-nav {background:var(--theme-nav);color:var(--theme-nav-text)}
html[data-theme]:not([data-theme="classic"]) .theme-showcase-nav span {color:var(--theme-nav-text)}
html[data-theme]:not([data-theme="classic"]) :is(.theme-card,.theme-showcase,.theme-showcase-heading,.theme-preview-status) {background:var(--theme-surface);border-color:var(--theme-border)}
html[data-theme]:not([data-theme="classic"]) .theme-card.is-selected {border-color:var(--theme-accent)}
html[data-theme]:not([data-theme="classic"]) .theme-showcase-content {background:var(--theme-page)}
html[data-theme]:not([data-theme="classic"]) .preview-table :is(th,td) {border-color:var(--theme-border)}
@media(max-width:1200px){.theme-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.theme-showcase-grid{grid-template-columns:1fr}.theme-showcase-content{min-height:0}.theme-thumbnail{height:165px}}
@media(max-width:600px){.theme-grid{grid-template-columns:1fr}.appearance-intro{display:block}.appearance-actions>.btn{width:100%}.appearance-current{gap:6px}.theme-card{padding:14px}.theme-thumbnail{height:160px}}
@media(prefers-reduced-motion:reduce){.theme-card,.theme-card *{transition:none!important}}
@media print{
  html[data-theme]:not([data-theme="classic"]),html[data-theme]:not([data-theme="classic"]) body {
    color-scheme:light!important;--theme-page:#fff;--theme-surface:#fff;--theme-soft:#f3f3f3;--theme-raised:#fff;
    --theme-text:#222;--theme-muted:#555;--theme-border:#ddd;--theme-border-strong:#aaa;
    --bg:#fff;--text:#222;--muted:#555;--paper:#fff;--paper-ink:#222;background:#fff!important;color:#222!important;
  }
  html[data-theme]:not([data-theme="classic"]) .invoice-paper {background:#fff!important;color:#222!important;border:0!important;box-shadow:none!important}
  html[data-theme]:not([data-theme="classic"]) .invoice-paper * {color:#222!important}
  html[data-theme]:not([data-theme="classic"]) .invoice-lines th {background:#f3f3f3!important}
  .appearance-form,.theme-preview-status,.theme-showcase-grid {display:none!important}
}

.theme-picker{border:0!important;padding:0;margin:0;min-width:0}.theme-picker>.theme-grid{margin:0}.theme-showcase-content .btn:disabled{opacity:.85;cursor:default}
