/* Shared colour and display controls. Member media and animal colours stay intact. */
html[data-mc-theme="day"]{color-scheme:light;--mc-theme-bg:#fff;--mc-theme-surface:#fff;--mc-theme-soft:#f6f3f5;--mc-theme-text:#211c22;--mc-theme-muted:#6c616b;--mc-theme-line:#e1dbe0;--mc-theme-accent:#d56d89;--mc-theme-link:#983350}
html[data-mc-theme="night"]{color-scheme:dark;--mc-theme-bg:#050507;--mc-theme-surface:#101014;--mc-theme-soft:#19171d;--mc-theme-text:#faf5f8;--mc-theme-muted:#b4a9b4;--mc-theme-line:#342c35;--mc-theme-accent:#edb1cd;--mc-theme-link:#edb1cd}
html[data-mc-theme]{--color-primary:var(--mc-theme-text);--color-accent:var(--mc-theme-link);--color-background:var(--mc-theme-bg);--color-surface:var(--mc-theme-surface);--color-text:var(--mc-theme-text);--color-muted:var(--mc-theme-muted);--color-border:var(--mc-theme-line);--color-soft:var(--mc-theme-soft);--ink:var(--mc-theme-text);--muted:var(--mc-theme-muted);--berry:var(--mc-theme-link);--berry-soft:var(--mc-theme-soft);--paper:var(--mc-theme-bg);--white:var(--mc-theme-surface);--line:var(--mc-theme-line);--blue-soft:var(--mc-theme-soft);background:var(--mc-theme-bg);color:var(--mc-theme-text)}
html[data-mc-theme] body{background-color:var(--mc-theme-bg);color:var(--mc-theme-text)}
.mc-theme-toggle{display:inline-flex;align-items:center;flex:none;gap:2px;padding:3px;border:1px solid var(--mc-theme-line);border-radius:999px;background:var(--mc-theme-surface);color:var(--mc-theme-muted);max-width:100%;white-space:nowrap;isolation:isolate}
.mc-theme-toggle button{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:74px;min-height:44px;margin:0;padding:9px 14px;border:0;border-radius:999px;background:transparent;color:var(--mc-theme-muted);font:500 12px/1.2 'DM Sans',system-ui,sans-serif;letter-spacing:0;text-transform:none;cursor:pointer}
.mc-theme-toggle button[aria-pressed="true"]{background:var(--mc-theme-soft);color:var(--mc-theme-text);box-shadow:0 1px 6px #0000000a}
.mc-theme-toggle button span{font-size:17px;line-height:1}.mc-theme-toggle button:hover{color:var(--mc-theme-text)}
.mc-theme-toggle button:focus-visible{outline:2px solid var(--mc-theme-link);outline-offset:2px}
.mc-theme-line{display:flex;align-items:center;justify-content:flex-end;flex:none;gap:12px;padding:10px 5%;background:var(--mc-theme-bg);color:var(--mc-theme-text)}
.mc-theme-conversation{padding:7px 22px;border-bottom:1px solid var(--mc-theme-line)}
.mc-original-logo{display:block;object-fit:contain;width:220px;height:auto;max-width:100%;flex:none;filter:none!important}
html[data-mc-theme] :is(.mc-brand,.site-wordmark,.cp-brand){min-width:0;flex-shrink:0}
html[data-mc-theme] :is(.mc-site-header,.site-header,.app-header,.cp-nav){gap:20px;flex-wrap:wrap;border-color:var(--mc-theme-line)}
html[data-mc-theme] .cp-brand .mc-original-logo{width:210px;height:auto}
html[data-mc-theme] .mc-brand .mc-original-logo{width:220px;height:auto}
html[data-mc-theme] .site-wordmark .mc-original-logo{width:220px;height:auto}
html[data-mc-theme] .cp-app{--cp-bg:var(--mc-theme-bg);--cp-panel:var(--mc-theme-surface);--cp-panel-2:var(--mc-theme-soft);--cp-white:var(--mc-theme-text);--cp-muted:var(--mc-theme-muted);--cp-dim:var(--mc-theme-muted);--cp-line:var(--mc-theme-line);--cp-pink:var(--mc-theme-accent);--cp-pink-light:var(--mc-theme-accent);color:var(--mc-theme-text);background:var(--mc-theme-bg)}
html[data-mc-theme] :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select){background-color:var(--mc-theme-surface);color:var(--mc-theme-text);border-color:var(--mc-theme-line)}
html[data-mc-theme] :is(input,textarea)::placeholder{color:var(--mc-theme-muted);opacity:1}
html[data-mc-theme] :is(dialog,.production-account-management){color-scheme:inherit;background:var(--mc-theme-surface);color:var(--mc-theme-text);border-color:var(--mc-theme-line)}
html[data-mc-theme] dialog::backdrop{background:#050507a8}
html[data-mc-theme] .luwa-production :is(.consent-panel,.portrait-panel,.saved-profile-panel,.account-status,.share-section,.comparison-invitation,.invitation-notice,.guest-entry,.create-profile-panel,.chat-feedback,.composer,.conversation-panel){background:var(--mc-theme-surface);color:var(--mc-theme-text);border-color:var(--mc-theme-line)}
html[data-mc-theme] .luwa-production :is(.conversation-heading,.chat-topics,.topic-choices-bar,.message-content,.fact,.email-verification,.cp-inbox-item){background:var(--mc-theme-soft);color:var(--mc-theme-text);border-color:var(--mc-theme-line)}
html[data-mc-theme] .luwa-production :is(.chat-identity p,.message-meta,.thinking,.topic-choices-bar-copy>p,.topic-choices-bar-label,.dictation-status,.tiny-note,.email-auth-status,.optional-selection){color:var(--mc-theme-muted)}
html[data-mc-theme] .luwa-production :is(.chat-icon-button,.chat-portrait-button,.topic-choices-open,.voice-consent-reset,.button.outline,.text-button){background:transparent;color:var(--mc-theme-text);border-color:var(--mc-theme-line)}
html[data-mc-theme] body[data-cupidon-screen="conversation"],html[data-mc-theme] body[data-cupidon-screen="conversation"] :is(.conversation-panel,.messages,.portrait-panel){background:var(--mc-theme-bg);color:var(--mc-theme-text)}
html[data-mc-theme] body[data-cupidon-screen="conversation"] .message.user .message-content{background:var(--mc-theme-soft);color:var(--mc-theme-text);border:1px solid var(--mc-theme-line)}
html[data-mc-theme] body[data-cupidon-screen="conversation"] .composer textarea{background:transparent;color:var(--mc-theme-text)}
html[data-mc-theme] :is(.cupidon-intro-art,.cupidon-chat-art,.luwa-avatar,.cp-character,.topic-choices-cupidon) img,html[data-mc-theme] img[data-cupidon-character]{object-fit:contain}
html[data-mc-theme] #topic-choices-dialog{background:var(--mc-theme-surface);color:var(--mc-theme-text);border-color:var(--mc-theme-line);box-shadow:0 25px 90px #0004}
html[data-mc-theme] #topic-choices-dialog :is(#topic-choices-title,.topic-choice-copy strong){color:var(--mc-theme-text)}
html[data-mc-theme] #topic-choices-dialog :is(.topic-choices-eyebrow,.topic-choices-description,.topic-choice-copy>span,.topic-choices-status,.topic-choices-back,.topic-choices-refresh){color:var(--mc-theme-muted)}
html[data-mc-theme] #topic-choices-dialog :is(.topic-choice-card,.topic-choices-notice){background:var(--mc-theme-soft);color:var(--mc-theme-text);border-color:var(--mc-theme-line)}
html[data-mc-theme] #topic-choices-dialog .topic-choice-card:has(input:checked){border-color:var(--mc-theme-link);background:var(--mc-theme-soft)}
html[data-mc-theme] #topic-choices-dialog .topic-choices-save,html[data-mc-theme] :is(.dictation-actions .dictation-start,.dictation-actions .dictation-finish,.dictation-actions .dictation-retry),html[data-mc-theme] .luwa-production :is(.button.primary,.email-verification .button-primary,.production-account-management .button-primary){background:var(--mc-theme-text);color:var(--mc-theme-bg);border-color:var(--mc-theme-text)}
html[data-mc-theme] #topic-choices-dialog .topic-choices-save:hover:not(:disabled){background:var(--mc-theme-text);color:var(--mc-theme-bg)}
html[data-mc-theme] #topic-choices-dialog .topic-choices-error{color:var(--mc-theme-link);background:var(--mc-theme-soft);border-color:var(--mc-theme-accent)}
html[data-mc-theme] .luwa-report{--lr-ink:var(--mc-theme-text);--lr-muted:var(--mc-theme-muted);--lr-berry:var(--mc-theme-link);--lr-line:var(--mc-theme-line);--lr-paper:var(--mc-theme-soft);--lr-white:var(--mc-theme-surface);color:var(--mc-theme-text)}
html[data-mc-theme] .luwa-report :is(.lr-hero,.lr-score-card,.lr-priority,.lr-coverage,.lr-proof-check,.lr-proof-missing,.lr-point,.lr-source,.lr-reassurance){background:var(--mc-theme-surface);color:var(--mc-theme-text);border-color:var(--mc-theme-line)}
html[data-mc-theme] .luwa-report :is(.lr-hero .lr-kicker,.lr-hero-intro,.lr-hero-footnote,.lr-score-label,.lr-score-description,.lr-score-number span){color:var(--mc-theme-muted)}
html[data-mc-theme] .luwa-report .lr-priority .lr-kicker{color:var(--mc-theme-link)}
@media(max-width:760px){html[data-mc-theme] :is(.mc-site-header,.site-header,.app-header,.cp-nav){gap:15px;align-items:center}html[data-mc-theme] :is(.mc-site-header,.site-header,.app-header,.cp-nav)>.mc-theme-toggle{position:static;order:5;margin-left:auto;margin-right:0;transform:none}.mc-original-logo,html[data-mc-theme] :is(.mc-brand,.site-wordmark,.cp-brand) .mc-original-logo{width:180px;max-width:48vw;height:auto}.mc-theme-toggle button{min-width:69px;padding:9px 11px}.mc-theme-conversation{justify-content:flex-end;padding:5px 16px}.mc-theme-conversation .mc-theme-toggle button{min-height:44px}.cp-app .cp-nav nav{order:6}}
@media(max-width:400px){html[data-mc-theme] :is(.mc-site-header,.site-header,.app-header,.cp-nav)>.mc-theme-toggle{flex-basis:auto}.mc-theme-toggle button{min-width:64px;padding-inline:9px}.mc-original-logo,html[data-mc-theme] :is(.mc-brand,.site-wordmark,.cp-brand) .mc-original-logo{width:162px}}
@media(prefers-reduced-motion:reduce){.mc-theme-toggle,.mc-theme-toggle *{transition:none!important}}

/* Filled account actions need their own inverse ink in both header palettes. */
html[data-mc-theme] body header.mc-site-header a.mc-space-link,html[data-mc-theme] body header.site-header .header-links a:first-child,html[data-mc-theme] body header.cp-nav button.cp-nav-account{background:var(--mc-theme-text);color:var(--mc-theme-bg);border-color:var(--mc-theme-line)}
html[data-mc-theme] body header.cp-nav button.cp-nav-account{background:var(--mc-theme-text)!important;color:var(--mc-theme-bg)!important}
/* Compatibility with earlier fixed dark surfaces and native form controls. */
html[data-mc-theme] body :is(header.mc-site-header,header.site-header,header.app-header,header.cp-nav){background:var(--mc-theme-bg);color:var(--mc-theme-text);border-color:var(--mc-theme-line)}
html[data-mc-theme] body :is(header.mc-site-header,header.site-header,header.app-header,header.cp-nav) :is(nav,nav a,nav button,.header-links,.mc-space-link,.brand-name,.mc-brand-name,.cp-nav-account,.icon-button){color:var(--mc-theme-text);border-color:var(--mc-theme-line)}
html[data-mc-theme="day"] :is(body,dialog,input,select,textarea){color-scheme:light!important}
html[data-mc-theme="night"] :is(body,dialog,input,select,textarea){color-scheme:dark!important}
html[data-mc-theme] input:is([type="checkbox"],[type="radio"]){accent-color:var(--mc-theme-link)!important}
html[data-mc-theme] .luwa-production .composer textarea{min-height:54px!important;max-height:160px;box-sizing:border-box}
html[data-mc-theme] .mc-theme-conversation{justify-content:center}
@media(max-width:760px){
 html[data-mc-theme] body :is(header.mc-site-header,header.site-header,header.app-header,header.cp-nav){display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:15px}
 html[data-mc-theme] body :is(header.mc-site-header,header.site-header,header.app-header,header.cp-nav)>.mc-theme-toggle{grid-column:1/-1;grid-row:2;justify-self:center;position:static;transform:none;margin:0 auto;order:5}
 html[data-mc-theme] body :is(header.mc-site-header,header.site-header,header.app-header,header.cp-nav)>:is(.mc-brand,.site-wordmark,.cp-brand,.brand,.brand-button){grid-column:1;grid-row:1}
 html[data-mc-theme] body :is(header.mc-site-header,header.site-header,header.app-header)>nav{grid-column:2;grid-row:1}
 html[data-mc-theme] body header.cp-nav>nav{grid-column:1/-1;grid-row:3;width:100%;justify-content:center}
 html[data-mc-theme] body header.cp-nav>.cp-nav-account{grid-column:2;grid-row:1;justify-self:end}
 html[data-mc-theme] .mc-theme-line{justify-content:center}
 /* Keep the full brand and navigation on separate lines when space is narrow. */
 html[data-mc-theme] body :is(header.mc-site-header,header.site-header)>:is(.mc-brand,.site-wordmark,.brand,.brand-button){grid-column:1/-1;max-width:100%}
 html[data-mc-theme] body :is(header.mc-site-header,header.site-header)>nav{grid-column:1/-1;grid-row:2;min-width:0;max-width:100%;flex-wrap:wrap;justify-content:flex-start;margin-inline:0}
 html[data-mc-theme] body :is(header.mc-site-header,header.site-header)>.mc-theme-toggle{grid-row:3}
}
