@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Libre+Caslon+Display&display=swap');

/* Clube do Rei — shared identity based on the approved /principal.
   Original page grids, form behavior and editor preview geometry remain local. */
html[data-royal-theme] {
  color-scheme:dark !important;
  background:#0D0B0B !important;
  --royal-black:#0D0B0B;
  --royal-graphite:#342C2B;
  --royal-bronze:#7D6559;
  --royal-gold:#9B8577;
  --royal-champagne:#BDA493;
  --royal-ruby:#651C2A;
  --royal-paper:#E8E0DA;
  --royal-muted:#B8ADA5;
  --royal-surface:#171312;
  --royal-surface-raised:#211B19;
  --royal-border:rgba(189,164,147,.27);
  --royal-font:'DM Sans',system-ui,-apple-system,'Segoe UI',sans-serif;
  --royal-serif:'Libre Caslon Display',Georgia,serif;
  --royal-gradient:linear-gradient(165deg,#E3C8AE 0%,#BDA493 52%,#9B8577 100%);
  --royal-shadow:0 16px 42px rgba(0,0,0,.22);
  scroll-padding-top:100px;
  -webkit-text-size-adjust:100%;
}
html[data-royal-theme], html[data-royal-theme] body {
  /* Compatibility aliases for existing templates. */
  --black:var(--royal-black); --black-soft:var(--royal-surface);
  --panel:var(--royal-surface); --surface:var(--royal-surface); --surface-2:var(--royal-surface-raised);
  --white:var(--royal-paper); --text:var(--royal-paper); --muted:var(--royal-muted);
  --gold:var(--royal-champagne); --gold-light:#DFCCBC; --gold-dark:var(--royal-bronze);
  --yellow:var(--royal-champagne); --red:var(--royal-ruby); --line:var(--royal-border); --border:var(--royal-border);
  --cdr-bg:var(--royal-black); --cdr-bg-strong:var(--royal-black);
  --cdr-white:var(--royal-paper); --cdr-offwhite:var(--royal-surface); --cdr-soft:var(--royal-surface-raised);
  --cdr-surface:var(--royal-surface); --cdr-surface-soft:var(--royal-surface-raised); --cdr-surface-alt:var(--royal-surface-raised);
  --cdr-graphite:var(--royal-paper); --cdr-graphite-2:var(--royal-muted); --cdr-graphite-soft:var(--royal-muted);
  --cdr-muted:var(--royal-muted); --cdr-line:var(--royal-border);
  --cdr-gold:var(--royal-champagne); --cdr-gold-deep:var(--royal-gold); --cdr-gold-dark:var(--royal-gold);
  --cdr-red:var(--royal-ruby); --cdr-red-deep:#4C1520; --cdr-red-dark:#4C1520; --cdr-red-soft:#2C151A;
  --cdr-shadow:var(--royal-shadow); --cdr-shadow-soft:0 8px 24px #0003;
  --admin-black:var(--royal-black); --admin-panel:var(--royal-surface); --admin-panel-soft:var(--royal-surface-raised);
  --admin-line:var(--royal-border); --admin-line-soft:rgba(189,164,147,.14);
  --admin-gold:var(--royal-champagne); --admin-gold-bright:#DFCCBC; --admin-red:var(--royal-ruby); --admin-red-bright:#8F3447;
  --admin-text:var(--royal-paper); --admin-muted:var(--royal-muted);
  --rei-black:var(--royal-black); --rei-black-soft:var(--royal-surface); --rei-surface:var(--royal-surface);
  --rei-surface-raised:var(--royal-surface-raised); --rei-surface-soft:var(--royal-graphite);
  --rei-white:var(--royal-paper); --rei-text:var(--royal-paper); --rei-muted:var(--royal-muted); --rei-muted-strong:#D3C6BC;
  --rei-line:var(--royal-border); --rei-line-strong:rgba(189,164,147,.4);
  --rei-red:var(--royal-ruby); --rei-red-bright:#8F3447; --rei-red-dark:#4C1520; --rei-red-soft:#2C151A;
  --rei-gold:var(--royal-champagne); --rei-gold-light:#DFCCBC;
  --cdr-entry-black:var(--royal-black); --cdr-entry-surface:var(--royal-surface); --cdr-entry-white:var(--royal-paper);
  --cdr-entry-gold:var(--royal-champagne); --cdr-entry-red:var(--royal-ruby); --cdr-entry-muted:var(--royal-muted);
  --cdr-entry-gold-rgb:189,164,147;
}
html[data-royal-theme] body {
  color:var(--royal-paper) !important;
  background:radial-gradient(ellipse at 95% 0%,rgba(125,101,89,.14),transparent 40rem),var(--royal-black) !important;
  font-family:var(--royal-font) !important;
  font-size:15px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
html[data-royal-theme] :where(*, *::before, *::after) { box-sizing:border-box; }
html[data-royal-theme] :where(input,select,textarea,button) { font-family:var(--royal-font) !important; }
html[data-royal-theme] :where(img,video,iframe) { max-width:100%; }
html[data-royal-theme] :where(a,button,input,select,textarea):focus-visible {
  outline:2px solid #DFCCBC !important; outline-offset:4px;
}
html[data-royal-theme] ::selection { color:var(--royal-black); background:var(--royal-champagne); }
html[data-royal-theme] body :is(h1,.title,.hero-title,.cdr-page-title,.store-title,.empty-title):not(.preview-page *) {
  font-family:var(--royal-serif) !important;
  color:var(--royal-paper) !important;
  font-weight:400 !important;
  font-size:clamp(34px,4.1vw,60px) !important;
  line-height:1.08 !important;
  text-transform:none !important;
  letter-spacing:-.025em !important;
  overflow-wrap:break-word;
}
html[data-royal-theme] body :is(h2,.section-title,.cdr-section-title,.form-title):not(.preview-page *) {
  font-family:var(--royal-serif) !important;
  color:#DFCCBC !important;
  font-weight:400 !important;
  font-size:clamp(26px,2.7vw,38px) !important;
  line-height:1.15 !important;
  text-transform:none !important;
  letter-spacing:-.015em !important;
}
html[data-royal-theme] body :is(h3,h4,h5,h6):not(.preview-page *) {
  font-family:var(--royal-font) !important; color:var(--royal-paper) !important; line-height:1.3; text-transform:none;
}
html[data-royal-theme] body :is(.subtitle,.description,.help,.muted,.meta,.section-description,.section-subtitle,.section-sub,.cdr-page-subtitle,.store-description,.product-info p,.coupon-card p,.stat-desc,.kpi-detail,.footer,.cdr-meta) {
  color:var(--royal-muted) !important; line-height:1.6 !important;
}
html[data-royal-theme] body :is(h1,h2,.title,.section-title) span:not(.preview-page *) { color:var(--royal-champagne) !important; }
html[data-royal-theme] body :is(.eyebrow,.cdr-eyebrow,.kicker) {
  color:var(--royal-champagne) !important; background:transparent !important; border:0 !important;
  font-family:var(--royal-font) !important; font-size:10px !important; font-weight:600;
  text-transform:uppercase; letter-spacing:.22em; line-height:1.6;
}
html[data-royal-theme] body :is(.card,.panel,.box,.content-card,.form-card,.login-card,.register-card,.cdr-card,.cdr-panel,.form-section,.section-card,.info-box,.selected-plan-box,.address-box,.terms-box,.notice,.store-card,.product-card,.coupon-card,.partner-card,.action-card,.cdr-action-card,.cdr-tool-card,.cdr-faq-card,.cdr-step-card,.cdr-store-card,.cdr-promo-card,.stat,.kpi,.metric,.cdr-stat,.control-panel,.preview-panel,.control-section,.pap-panel,.pap-card) {
  background:linear-gradient(150deg,#1D1816,#120F0E) !important;
  color:var(--royal-paper) !important;
  border-color:var(--royal-border) !important;
  border-radius:18px;
  box-shadow:var(--royal-shadow) !important;
}
html[data-royal-theme] body :is(.stat,.kpi,.metric,.cdr-stat) { border-top:2px solid var(--royal-gold) !important; }
html[data-royal-theme] body :is(.stat-value,.kpi-value,.metric-value,.cdr-stat strong) {
  font-family:var(--royal-font) !important; color:var(--royal-champagne) !important;
  font-size:clamp(28px,3vw,42px); line-height:1.15; font-weight:600; font-variant-numeric:tabular-nums;
}
html[data-royal-theme] body :is(.stat-label,.kpi-label,.metric-label,.info-label,.detail-label) { color:var(--royal-muted) !important; }
html[data-royal-theme] body :is(.card-top,.top,.form-header,.modal-head,.drawer-header) {
  background:rgba(189,164,147,.035) !important; border-color:var(--royal-border) !important;
}
html[data-royal-theme] body :is(.card,.panel,.cdr-panel,.cdr-card) > :is(.title,h1,h2) { margin-bottom:12px; }
html[data-royal-theme] body :is(.header,.topbar,.cdr-topbar,.site-header,.editor-header,.header-container,.nav,.main-nav,.category-nav) {
  background:#0D0B0BF5 !important; color:var(--royal-paper) !important; border-color:var(--royal-border) !important;
  box-shadow:none !important;
}
html[data-royal-theme] body :is(.cdr-nav,.navigation,.main-nav,.nav,.top-actions) a:not(.btn):not(.cdr-btn):not(.header-button) {
  color:#D8CDC5 !important; font-family:var(--royal-font) !important; font-size:13px; font-weight:500; text-transform:none;
}
html[data-royal-theme] body :is(.cdr-nav,.navigation,.main-nav,.nav) a:is(.active,.is-active,.gold,[aria-current=page]) {
  color:#E3C8AE !important; border-color:var(--royal-gold) !important; background:rgba(189,164,147,.08) !important;
}
html[data-royal-theme] body img[src*='/assets/royal-system/logo.png'] {
  object-fit:contain !important; object-position:center !important;
  background:transparent !important; border:0 !important; border-radius:0 !important;
  filter:none !important; box-shadow:none !important; height:auto !important;
  max-width:100%;
}
html[data-royal-theme] body :is(.logo,.brand,.cdr-brand,.header-logo,.editor-brand) img[src*='/assets/royal-system/logo.png'] {
  width:220px !important; max-width:100%;
}
html[data-royal-theme] body :is(.cdr-footer,.footer,.page-footer,.cdr-footer-simple) {
  color:var(--royal-muted) !important; border-color:var(--royal-border) !important;
  background:transparent !important;
}
html[data-royal-theme] body label { color:#D8CDC5 !important; font-family:var(--royal-font); }
html[data-royal-theme] body :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]):not([type=hidden]):not([type=submit]):not([type=button]),select,textarea) {
  background:#0D0B0B !important; color:var(--royal-paper) !important;
  border:1px solid rgba(189,164,147,.34) !important; border-radius:11px !important;
  min-width:0; max-width:100%; min-height:46px;
  padding:11px 13px; box-shadow:none !important;
}
html[data-royal-theme] body :is(input,textarea)::placeholder { color:#958B84 !important; opacity:1; }
html[data-royal-theme] body :is(input,select,textarea):focus { border-color:var(--royal-champagne) !important; }
html[data-royal-theme] body :is(input[type=checkbox],input[type=radio],input[type=range]) { accent-color:var(--royal-champagne); }
html[data-royal-theme] body option { background:#171312; color:#E8E0DA; }
html[data-royal-theme] body :is(.btn,.button,.cdr-btn,.submit-button,.primary-button,.btn-primary,.button-primary,.action-button,.header-button,.store-button,.coupon-button,.checkout-button,.add-button,.small-button,.pap-btn,button[type=submit]):not(.product-card):not(.preview-page *) {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  min-height:44px; padding:12px 18px; border-radius:12px !important;
  border:1px solid var(--royal-champagne) !important;
  background:var(--royal-gradient) !important; color:#0D0B0B !important;
  box-shadow:inset 0 1px rgba(255,255,255,.18) !important;
  font-family:var(--royal-font) !important; font-size:13px !important;
  font-weight:700 !important; line-height:1.3; letter-spacing:.01em !important; text-transform:none !important;
  text-decoration:none; cursor:pointer;
}
html[data-royal-theme] body :is(.btn,.button,.cdr-btn,.submit-button,.primary-button,.action-button,.store-button,.coupon-button):hover:not(:disabled) { filter:brightness(1.08); }
html[data-royal-theme] body :is(.btn.ghost,.btn.secondary,.btn.outline,.cdr-btn--ghost,.cdr-btn--outline,.secondary-button,.button-secondary,.top-link,.back,.page-link) {
  background:transparent !important; border:1px solid var(--royal-gold) !important; color:#DAC2AC !important; box-shadow:none !important;
}
html[data-royal-theme] body :is(.btn-danger,.button-danger,.btn.red,.btn.danger,.btn.delete,.cdr-btn--danger,.header-button.exit,.btn.logout,.pap-btn.danger) {
  background:#651C2A !important; border-color:#8F3447 !important; color:#F6E6E8 !important;
}
html[data-royal-theme] body :is(a[href*='wa.me/'],a[href*='api.whatsapp.com/'],.cdr-wa-btn,.whatsapp-button,.btn-whatsapp,.cdr-btn--green,#finish-order) {
  background:linear-gradient(135deg,#137F43,#106634) !important; border-color:#239C59 !important; color:#fff !important;
  box-shadow:none !important;
}
html[data-royal-theme] body :is(.badge,.tag,.pill,.cdr-pill,.filter,.cdr-chip,.category-button) {
  background:rgba(189,164,147,.07) !important; border-color:var(--royal-border) !important;
  color:#D7BEA8 !important; font-family:var(--royal-font) !important; letter-spacing:.02em;
}
html[data-royal-theme] body :is(.cdr-chip,.filter,.category-button,.device-switch button,.control-tabs button):is(.active,.is-active,[aria-selected=true]) {
  background:var(--royal-gradient) !important; color:#0D0B0B !important; border-color:var(--royal-champagne) !important;
}
html[data-royal-theme] body :is(.alert,.notice,.message,.database-warning,.flash,.category-alert,.cdr-alert) {
  border-color:var(--royal-border) !important; color:var(--royal-paper) !important; background:#211B19 !important;
}
html[data-royal-theme] body :is(.error,.alert.error,.alert-danger,.flash.error,.cdr-alert--error,.badge.inactive,.tag.inactive,.pill.closed) {
  background:#30161D !important; border-color:#87394A !important; color:#F2B8C2 !important;
}
html[data-royal-theme] body :is(.success,.alert.success,.alert-success,.flash.success,.badge.approved,.tag.active,.pill.open) {
  background:#112C20 !important; border-color:#2B7652 !important; color:#A1DCBC !important;
}
html[data-royal-theme] body :is(.warning,.alert.warning,.alert-warning) { background:#302519 !important; color:#EAC696 !important; border-color:#92704B !important; }
html[data-royal-theme] body :is(.table-wrap,.table-wrapper,.table-container) { overflow-x:auto; border:1px solid var(--royal-border); border-radius:14px; -webkit-overflow-scrolling:touch; }
html[data-royal-theme] body table { border-color:var(--royal-border) !important; color:var(--royal-paper) !important; font-family:var(--royal-font); }
html[data-royal-theme] body th { background:#251E1B !important; color:#D8BEA8 !important; border-color:var(--royal-border) !important; font-size:11px; letter-spacing:.04em; }
html[data-royal-theme] body td { background:#141110 !important; color:var(--royal-paper) !important; border-color:rgba(189,164,147,.14) !important; font-size:13px; }
html[data-royal-theme] body tbody tr:hover td { background:#211B19 !important; }
html[data-royal-theme] body :is(.stat-value,.price,.cdr-price,.price-current,.product-price,.coupon-price strong,.cdr-price-box strong,.totals strong,.cart-item strong) { font-variant-numeric:tabular-nums; }
html[data-royal-theme] body :is(.product-price,.coupon-price strong,.cdr-price-box strong,.cdr-price strong,.price-current,.price-new,.promotional-price) { color:#86D4A4 !important; font-family:var(--royal-font) !important; }
html[data-royal-theme] body :is(del,.price-old,.old-price,.cdr-price-box del) { color:#BDA493 !important; }
html[data-royal-theme] body :is(.empty,.empty-state,.cdr-empty,.carousel-empty) { color:var(--royal-muted) !important; background:#151110 !important; border:1px dashed var(--royal-bronze) !important; border-radius:18px; }
html[data-royal-theme] body :is(.modal,.drawer,.cart-bar,.cart-toast,.option,.option-group,.cart-item,.totals,.payment-note,.checkout-step,.cart-review-guide) {
  background:#191514 !important; color:var(--royal-paper) !important; border-color:var(--royal-border) !important;
}
html[data-royal-theme] body :is(.overlay,.drawer-overlay) { background:rgba(0,0,0,.76) !important; }
html[data-royal-theme] body :is(.close,.quantity button,.cart-quantity button) { background:#342C2B !important; color:#E8E0DA !important; border-color:var(--royal-border) !important; }
html[data-royal-theme] body :is(.cart-fab,.cart-open) { background:var(--royal-ruby) !important; color:#fff !important; }
html[data-royal-theme] body .cart-count-badge { background:#BDA493 !important; color:#0D0B0B !important; }
html[data-royal-theme] body :is(.cdr-company-hero,.cdr-user-welcome,.cdr-business-hero,.store-hero,.hero,.cdr-hero-lite) {
  background:radial-gradient(ellipse at 90% 20%,rgba(125,101,89,.2),transparent 65%),linear-gradient(125deg,#1A1513,#0D0B0B) !important;
  border-color:var(--royal-border) !important;
}
html[data-royal-theme] body :is(.cdr-action-card__icon,.cdr-category-card,.cdr-tool-card__icon,.step-number,.cdr-step-num) { color:#D7B99E !important; border-color:var(--royal-bronze) !important; }
html[data-royal-theme] body :is(.cdr-category-card,.cdr-share-item,.cdr-instruction,.cdr-rule,.cdr-status-box) { background:#211B19 !important; border-color:var(--royal-border) !important; }
html[data-royal-theme] body :is(.cdr-promo-card__badge,.cdr-promo-card__favorite) { background:#651C2A !important; color:#fff !important; }
html[data-royal-theme] body :is(.product-image,.coupon-image,.store-logo,.cdr-company-logo,.cdr-store-logo) { border-color:var(--royal-border) !important; }
/* Operational headings stay compact, and visual editor previews retain their own styles. */
html[data-royal-kind=editor] body :is(.control-heading,.subsection-title,.preview-toolbar h2,.control-panel h2) {
  font-family:var(--royal-font) !important; font-size:16px !important; font-weight:600 !important;
}
html[data-royal-kind=editor] body :is(.editor-intro h1,.editor-header h1) { font-size:36px !important; }
html[data-royal-kind=editor] body .preview-page { color-scheme:normal; }
html[data-royal-kind=auth] body .page { max-width:660px; }
html[data-royal-kind=auth] body .logo { display:block; margin:0 auto 26px; width:max-content; max-width:100%; }
html[data-royal-kind=auth] body .logo img { width:250px !important; }
html[data-royal-kind=auth] body .title { font-size:clamp(38px,5vw,52px) !important; }
html[data-royal-kind=legal] body :is(.term-section,.privacy-section) { border-color:var(--royal-border) !important; }
html[data-royal-kind=legal] body :is(p,li) { line-height:1.8; }
html[data-royal-kind=showcase] body .category-heading h1 { font-size:clamp(30px,4vw,48px) !important; }
html[data-royal-kind=showcase] body :is(.carousel-heading,.carousel-controls) { color:var(--royal-champagne) !important; }
html[data-royal-kind=business] body .cdr-business-hero { border-radius:24px; }
html[data-royal-theme] body .cdr-business-copy h1 { max-width:16ch; }
html[data-royal-theme] body [hidden] { display:none !important; }
html[data-royal-theme] body :is(button,input,select,textarea):disabled { opacity:.55; cursor:not-allowed; }
html[data-royal-theme] body :is(.sr-only,.visually-hidden) { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }

@media (max-width:760px) {
  html[data-royal-theme] body { font-size:14px; }
  html[data-royal-theme] body :is(.page,.shell,.cdr-shell,.editor-page) { max-width:100%; }
  html[data-royal-theme] body :is(.cdr-shell,.shell) { width:calc(100% - 32px); margin-inline:auto; }
  html[data-royal-theme] body :is(.header,.cdr-topbar__inner,.topbar-inner,.editor-header) { gap:14px; flex-wrap:wrap; }
  html[data-royal-theme] body :is(.nav,.cdr-nav,.main-nav,.top-actions,.header-actions) { flex-wrap:wrap; gap:8px 12px; }
  html[data-royal-theme] body :is(.logo,.brand,.cdr-brand,.header-logo,.editor-brand) img[src*='/assets/royal-system/logo.png'] { width:190px !important; }
  html[data-royal-theme] body :is(h1,.title,.hero-title,.cdr-page-title,.store-title):not(.preview-page *) { font-size:36px !important; }
  html[data-royal-theme] body :is(h2,.section-title):not(.preview-page *) { font-size:28px !important; }
  html[data-royal-theme] body :is(.field,.form-section,.card-body,.cdr-promo-card__body,.product-info) { min-width:0; }
  html[data-royal-theme] body :is(.filters,.actions,.inline-actions,.header-actions) { flex-wrap:wrap; }
  html[data-royal-theme] body :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),select,textarea) { font-size:16px; }
  html[data-royal-theme] body :is(.cdr-promo-grid,.cdr-store-grid,.products,.partner-grid) { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
  html[data-royal-theme] body :is(.cdr-company-hero,.cdr-coupon,.cdr-business-hero) { grid-template-columns:minmax(0,1fr); }
  html[data-royal-theme] body :is(.card-top,.card-body,.form-card,.login-card) { padding:22px 18px; }
  html[data-royal-theme] body :is(.cdr-promo-card,.cdr-store-card,.product-card,.partner-card) { min-width:0; }
  html[data-royal-kind=auth] body .page { width:100%; }
}
@media (max-width:480px) {
  html[data-royal-theme] body :is(.cdr-promo-grid,.cdr-store-grid,.products,.partner-grid) { grid-template-columns:minmax(0,1fr); }
  html[data-royal-theme] body :is(.form-grid,.address-grid,.checkout-grid,.grid.two) { grid-template-columns:minmax(0,1fr); }
  html[data-royal-theme] body :is(.page,.editor-page) { min-width:0; }
  html[data-royal-theme] body :is(.logo,.brand,.cdr-brand) { max-width:100%; }
}
@media (prefers-reduced-motion:reduce) {
  html[data-royal-theme] { scroll-behavior:auto; }
  html[data-royal-theme] :where(*, *::before,*::after) { animation-duration:.01ms !important; transition-duration:.01ms !important; }
}
@media print {
  html[data-royal-theme], html[data-royal-theme] body { background:#fff !important; color:#111 !important; }
  html[data-royal-theme] body :is(.card,.panel,td,th) { background:#fff !important; color:#111 !important; box-shadow:none !important; }
}

/* Semantic exceptions: QR quiet zone and user-defined visual previews. */
html[data-royal-theme] body :is(.cdr-qr-frame,.qr-code,.qr-container canvas) { background:#fff !important; }
html[data-royal-theme] body [data-qr-state] { color:var(--royal-muted) !important; }
html[data-royal-theme] body :is(.cdr-status,.cdr-status.is-active) { background:#112C20 !important; color:#A1DCBC !important; border-color:#2B7652 !important; }
html[data-royal-theme] body .cdr-status.is-pending { background:#302519 !important; color:#EAC696 !important; }
html[data-royal-theme] body :is(button.red,a.red.btn) { background:#651C2A !important; color:#F6E6E8 !important; border-color:#8F3447 !important; }
html[data-royal-theme] body :is(button.green,.btn.green) { background:#163D29 !important; color:#B2E3C5 !important; border-color:#2B7652 !important; }
html[data-royal-kind=showcase] body {
  color:var(--text-color) !important;
  font-family:var(--body-font) !important;
  background:radial-gradient(ellipse at top right,rgba(125,101,89,.12),transparent 60%),var(--page-bg) !important;
}
html[data-royal-kind=showcase] body .category-heading h1 {
  font-family:var(--title-font) !important;
  font-size:var(--title-size-desktop) !important;
  color:var(--category-accent-2) !important;
}
html[data-royal-kind=showcase] body .brand img[src*='/assets/royal-system/logo.png'] {
  width:min(var(--logo-width-desktop),42vw) !important;
}
html[data-royal-kind=showcase] body .company-panel {
  background:var(--button-bg) !important; color:var(--button-color) !important;
}
html[data-royal-kind=editor] body .preview-page h2 span { color:inherit !important; }
@media (max-width:760px) {
  html[data-royal-kind=showcase] body .category-heading h1 { font-size:var(--title-size-mobile) !important; }
  html[data-royal-kind=showcase] body .brand img[src*='/assets/royal-system/logo.png'] { width:min(var(--logo-width-mobile),48vw) !important; }
}


/* Screen surfaces follow the page background; images and print retain their identity. */
@media screen {
  html[data-royal-theme] body { background:#0D0B0B !important; }
  html[data-royal-theme] body :is(
    .card,.panel,.box,.content-card,.form-card,.login-card,.register-card,
    .cdr-card,.cdr-panel,.form-section,.section-card,.info-box,.selected-plan-box,
    .address-box,.terms-box,.store-card,.product-card,.coupon-card,.partner-card,
    .action-card,.user-card,.company-card,.coupon-box,.dashboard-card,.metric-card,.stat-card,
    .cdr-action-card,.cdr-tool-card,.cdr-faq-card,.cdr-step-card,.cdr-store-card,.cdr-promo-card,
    .cdr-auth-wrap,.cdr-auth,.cdr-auth__intro,.cdr-auth__form,
    .store-hero,.store-hero-inner,.section,.category-block,
    .cdr-company-hero,.cdr-user-welcome,.cdr-business-hero,.hero,.cdr-hero-lite,
    .card-body,.card-top,.card-head,.form-header,.cdr-promo-card__body,
    .share-section,.share-item,.referral-section,.referral-card,.referral-share-section,
    .cdr-share-item,.cdr-instruction,.cdr-rule,.cdr-status-box,
    .modal,.modal-head,.modal-body,.drawer,.drawer-header,.cart-bar,.cart-toast,
    .option,.option-group,.cart-item,.totals,.payment-note,.checkout-step,.cart-review-guide,
    .stat,.kpi,.metric,.cdr-stat,.preview-box,.instructions-card,.live-preview-card,
    .control-panel,.control-section,.pap-panel,.pap-card
  ):not(.preview-page):not(.preview-page *) {
    background:#0D0B0B !important;
    color:var(--royal-paper) !important;
    border-color:var(--royal-border) !important;
  }
  html[data-royal-theme] body :is(.cdr-auth__intro,.cdr-auth__form)::after { background:none !important; }
  html[data-royal-theme] body :is(.cdr-auth-footer a,.cdr-auth__form .cdr-inline-row a,.share-copy) {
    color:#D7BEA8 !important;
  }
  html[data-royal-theme] body .share-copy {
    background:#0D0B0B !important; border-color:var(--royal-border) !important;
  }
  html[data-royal-theme] body :is(.preview,.cdr-coupon__poster) { background:#0D0B0B !important; }
}
