/* Loaded after component styles. Dark theme and image/skin colours remain untouched. */
html[data-theme="light"] {
  --bg:#f2f0eb;
  --surface:#ffffff;
  --surface-2:#f4f3ef;
  --text:#182322;
  --muted:#586462;
  --line:#c7ceca;
  --teal:#087879;
  --teal-bright:#006f70;
  --light-hover:#e8f1ee;
  --light-selected:#dcefeb;
  color-scheme:light;
}

/* Navigation and monochrome UI assets, never uploaded banners or player heads. */
html[data-theme="light"] .profile-discord-banner>img { filter:brightness(0); opacity:.75; }
html[data-theme="light"] :is(.portal-header__tagline,.portal-intro,.eyebrow-small) { color:var(--muted); }
html[data-theme="light"] .community-eyebrow>span { color:var(--muted); }
html[data-theme="light"] .portal-sidebar a { background:var(--surface); border-color:var(--line); color:var(--muted); }
html[data-theme="light"] .portal-sidebar a:hover,
html[data-theme="light"] .portal-sidebar a.is-active { background:var(--light-selected); border-color:#90b8b1; color:var(--text); }
html[data-theme="light"] :is(.portal-sidebar,.settings-sections,.portal-notifications,.community-eyebrow,.profile-associated-type,.profile-tag,.notification-routing,.entity-create-notice,.build-owner-option__icon,.build-owner-summary__node,.map-header>a) img,
html[data-theme="light"] :is(.portal-page,.nether-map-page) .small-button>img { filter:brightness(0); }
html[data-theme="light"] .settings-sections { background:var(--surface); border-color:var(--line); }
html[data-theme="light"] .settings-sections a { color:var(--muted); }
html[data-theme="light"] .settings-sections a:hover,
html[data-theme="light"] .settings-sections a.is-active { background:var(--light-selected); color:var(--text); border-color:#90b8b1; }
html[data-theme="light"] .entity-settings .settings-sections { background:transparent; border-color:var(--line); }
html[data-theme="light"] .entity-settings .settings-sections a { background:transparent; border-color:transparent; }
html[data-theme="light"] .entity-settings .settings-sections a:hover,
html[data-theme="light"] .entity-settings .settings-sections a.is-active { border-bottom-color:var(--teal); }

/* Directory, profile and content cards. */
html[data-theme="light"] :is(.community-card,.player-card,.public-build-card,.profile-card,.profile-community-card,.profile-associated-card,.profile-extra,.profile-facts section,.contact-grid article,.notification-card,.wiki-index>a) {
  background:var(--surface); border-color:var(--line); color:var(--text);
}
html[data-theme="light"] :is(.community-card,.player-card,.public-build-card,.profile-community-card,.profile-associated-card,.wiki-index>a):hover {
  background:var(--light-hover); border-color:#90b8b1;
}
html[data-theme="light"] :is(.community-card p,.community-card small,.public-build-card p,.public-build-empty,.profile-community-card small,.profile-associated-card small,.profile-associated-type,.profile-card__status,.profile-presence,.community-head-link,.community-member>small,.wiki-intro,.form-page>p,.message-page>p) { color:var(--muted); }
html[data-theme="light"] .player-directory-section>h2 { color:var(--muted)!important; }
html[data-theme="light"] .profile-presence.is-online { color:#257042; }
html[data-theme="light"] .profile-skin { background:var(--surface-2); border-color:var(--line); }
html[data-theme="light"] .profile-card .profile-skin { background:transparent; }
html[data-theme="light"] :is(.profile-identity,.profile-extra__content section,.profile-nickname__history,.profile-custom-page>.builder-content,.community-banner,.public-build-empty,.wiki-page>header) { border-color:var(--line); }
html[data-theme="light"] .profile-custom-page>.builder-content { background:var(--surface); }
/* Placeholder banners remain black images: their overlaid action must stay readable. */
html[data-theme="light"] .profile-add-page { border-color:var(--line); color:#fff; }
html[data-theme="light"] .profile-add-page:hover { border-color:var(--teal); color:#7ae4dd; }
html[data-theme="light"] .community-head-link a { background:var(--surface); color:var(--text); border-color:var(--line); }

/* Distinct pale role tags and readable map-line tags. */
html[data-theme="light"] .profile-tags .profile-tag { --tag-background:#dcefeb; --tag-border:#8cbeb5; color:#174740; }
html[data-theme="light"] .profile-tags .profile-tag--administrator { --tag-background:#f7e6d2; --tag-border:#d9a76e; color:#75401b; }
html[data-theme="light"] .profile-tags .profile-tag--helper { --tag-background:#dfefdf; --tag-border:#8bb991; color:#275b33; }
html[data-theme="light"] .profile-tags .profile-tag--judge { --tag-background:#eee3f5; --tag-border:#b299c7; color:#62377f; }
html[data-theme="light"] .profile-tags .profile-tag--cosmetic { background:color-mix(in srgb,var(--tag-color) 16%,white); border-color:color-mix(in srgb,var(--tag-color) 65%,#626b67); color:var(--text); }
html[data-theme="light"] .map-branch-tag { background:color-mix(in srgb,var(--branch-color,#087f80) 20%,white); border-color:color-mix(in srgb,var(--branch-color,#087f80) 70%,#6e7772); color:var(--text); }
html[data-theme="light"] :is(.map-branch-tag--community,.community-state,.public-build-card small) { background:#dcefeb; border-color:#90b8b1; color:#174740; }

/* Secondary versus primary/destructive actions. */
html[data-theme="light"] :is(.portal-page,.nether-map-page) .small-button { background:#dcefeb; border-color:#90b8b1; color:#174740; }
html[data-theme="light"] :is(.portal-page,.nether-map-page) .small-button:hover { background:#c6e5df; border-color:#568f84; color:#103e38; }
html[data-theme="light"] body .settings-save-button,
html[data-theme="light"] body .small-button.settings-save-button { background:#087c7b; border-color:#066b69; color:#fff; }
html[data-theme="light"] body .settings-save-button:hover,
html[data-theme="light"] body .small-button.settings-save-button:hover { background:#066b69; border-color:#055553; color:#fff; }
html[data-theme="light"] body .danger-button { background:#f9e2e0!important; border-color:#c37b76!important; color:#8a2d28!important; }
html[data-theme="light"] body .danger-button:hover { background:#f2cdc9!important; color:#72241f!important; }
html[data-theme="light"] .entity-blacklist-button>img,html[data-theme="light"] .entity-blacklist-warning>img{filter:brightness(.4) sepia(1) saturate(4) hue-rotate(315deg)}
html[data-theme="light"] :is(.member-settings-dialog__close,.community-members-dialog__close,.community-member-settings-trigger,.page-access-dialog__close) { background:var(--surface-2); border-color:var(--line); color:var(--text); }
html[data-theme="light"] :is(.member-settings-dialog__close,.community-members-dialog__close,.community-member-settings-trigger):hover { background:var(--light-hover); border-color:#90b8b1; }

/* Inputs, dialogs and the same flat settings surfaces. */
html[data-theme="light"] :is(.directory-search input,.portal-form input,.portal-form select,.settings-form input,.settings-form textarea,.settings-form select,.staff-filters input,.staff-filters select,.report-resolution textarea) { background:var(--surface); border-color:var(--line); color:var(--text); }
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder { color:#737c78; opacity:1; }
html[data-theme="light"] :is(.settings-form fieldset,.security-panel,.member-settings-dialog,.community-members-dialog,.page-access-dialog,.community-banner-preview,.community-connection-picker) { background:var(--surface); border-color:var(--line); color:var(--text); }
html[data-theme="light"] :is(.entity-settings,.entity-create) .settings-form fieldset,
html[data-theme="light"] .player-settings .security-panel { background:transparent; }
html[data-theme="light"] :is(.community-members-table th,.community-members-table td,.notification-preferences-table th,.notification-preferences-table td,.player-settings-choice,.entity-advanced,.page-access-grant,.security-panel article,.build-owner-summary) { border-color:var(--line); }
html[data-theme="light"] :is(.community-members-table__label,.entity-advanced>summary) { color:var(--muted); }
html[data-theme="light"] .entity-advanced>summary:hover { color:var(--text); }
html[data-theme="light"] .entity-danger>summary { color:#8a2d28; }
html[data-theme="light"] :is(.settings-unsaved-notice,.notification-security-hint.is-warning) { background:#fff3d4!important; border-color:#b89c51!important; color:#705415!important; }
html[data-theme="light"] .entity-character-count.is-at-limit { color:#805c0d; }
html[data-theme="light"] .entity-character-count.is-over-limit { color:#a92d25; }
html[data-theme="light"] .form-messages { background:#e2f1ec; color:#174740; border-color:#90b8b1; }
html[data-theme="light"] .errorlist { color:#a92d25; }

/* Creation picker and notification infographics. */
html[data-theme="light"] :is(.build-owner-option__surface,.notification-routing__source,.notification-routing__channel.is-disabled) { background:var(--surface); border-color:var(--line); }
html[data-theme="light"] .build-owner-option:hover .build-owner-option__surface { background:var(--light-hover); border-color:#90b8b1; }
html[data-theme="light"] .build-owner-option>input:checked+.build-owner-option__surface,
html[data-theme="light"] .notification-routing__channel { background:var(--light-selected); border-color:#90b8b1; }
html[data-theme="light"] .build-owner-option__icon { background:#e9efeb; }
html[data-theme="light"] .build-owner-option__check { border-color:#889b93; }
html[data-theme="light"] .build-owner-option>input:checked+.build-owner-option__surface .build-owner-option__check { box-shadow:inset 0 0 0 4px #dcefeb; }
html[data-theme="light"] .entity-create-notice { border-color:#90b8b1; background:#e4f1ed; }
html[data-theme="light"] .notification-routing__channel output { color:#17645b; }
html[data-theme="light"] .notification-routing__channel.is-disabled output { color:var(--muted); }
html[data-theme="light"] .notification-routing__branches path.is-disabled { stroke:#c0c8c2; }
html[data-theme="light"] .player-settings .player-settings-form .notification-channel-control { background:var(--surface); color:var(--text); border-color:var(--line); }
html[data-theme="light"] .player-settings .player-settings-form .notification-channel-control:hover { background:var(--light-hover); border-color:#90b8b1; }
html[data-theme="light"] .player-settings .player-settings-form .notification-channel-control:has(input:checked) { background:var(--light-selected); border-color:#639d90; }

/* Map colours share CSS tokens with the canvas renderer. Line identities stay unchanged. */
html[data-theme="light"] .nether-map-page .map-header { background:var(--surface); border-bottom:1px solid var(--line); }
html[data-theme="light"] .nether-map-page .map-header>strong { color:var(--text); }
html[data-theme="light"] .nether-map-page .map-header>a { background:var(--light-selected); color:#174740; border-color:#90b8b1; }
html[data-theme="light"] .nether-map-page .nether-map { background:#e7e3db; --map-grid:#273c321c; --map-selection:#243c35; --map-label-stroke:#e7e3db; }
html[data-theme="light"] .nether-map-page .map-marker>span { color:#20322c; }
html[data-theme="light"] .nether-map-page .map-hub { background:#075c59; border-color:#087879; box-shadow:none; }
html[data-theme="light"] .nether-map-page .map-panel { background:#fffffff5; color:var(--text); border-color:var(--line); box-shadow:0 12px 36px #263c2820; }
html[data-theme="light"] .nether-map-page .map-panel__meta .eyebrow-small { color:var(--text); }
html[data-theme="light"] .nether-map-page .map-panel .player-card { background:var(--surface-2); border-color:var(--line); color:var(--text); }
html[data-theme="light"] .nether-map-page .map-panel .player-card:hover { background:var(--light-hover); border-color:#90b8b1; }
html[data-theme="light"] .nether-map-page .map-panel__close { background:var(--surface-2); color:var(--text); border-color:var(--line); }
html[data-theme="light"] .nether-map-page .map-controls { background:#fffffff5; border-color:var(--line); }
html[data-theme="light"] .nether-map-page .map-controls :is(button,output) { color:var(--text); border-color:var(--line); }
html[data-theme="light"] .nether-map-page .map-controls button:hover { background:var(--light-selected); }
html[data-theme="light"] .community-diagram-hub { fill:#dcefeb; stroke:#526b62; }
html[data-theme="light"] .community-connection-diagram [data-marker-point] { fill:#243c35; stroke:#fff; }
html[data-theme="light"] .community-connection-diagram [data-marker-branch]:focus-visible { outline-color:var(--teal); }

/* Content and staff surfaces follow the same palette. */
html[data-theme="light"] :is(.builder-content pre,.audit-list pre) { background:var(--surface-2); color:var(--text); }
html[data-theme="light"] :is(.staff-metrics a,.audit-list>article,.review-list>article,.health-card) { background:var(--surface); color:var(--text); }
html[data-theme="light"] :is(.editor-toolbar,.toolbar-titlebar,.toolbar-ribbon,.block-fields,.history-panel) { background:var(--surface); border-color:var(--line); color:var(--text); }
html[data-theme="light"] .editor-toolbar { box-shadow:0 6px 18px #263c2818; }
html[data-theme="light"] :is(.toolbar-group-label,.editor-toolbar label,.block-fields label,.version-list li) { color:var(--muted); }
html[data-theme="light"] :is(.toolbar-group,.editor-nested-list) { border-color:var(--line); }
html[data-theme="light"] :is(.editor-toolbar input,.editor-toolbar textarea,.editor-toolbar button,.child-controls button,.child-controls select,.block-fields input,.block-fields select,.history-panel button,.editor-block-tools button) { background:var(--surface-2); color:var(--text); border-color:var(--line); }
html[data-theme="light"] :is(.editor-toolbar button,.child-controls button,.history-panel button,.editor-block-tools button):hover { background:var(--light-hover); border-color:#90b8b1; }
html[data-theme="light"] .import-button { color:var(--text)!important; }
html[data-theme="light"] :is(.editor-error,.editor-toolbar [data-status]) { color:var(--teal); }
html[data-theme="light"] .editor-toolbar .settings-save-button { background:#087c7b; color:#fff; border-color:#066b69; }

/* Landing keeps readable photo/Discord previews; ordinary cards use light surfaces. */
html[data-theme="light"] .landing .hero{--text:#f3f3f3;--muted:#c9d5d4;--teal-bright:#71e1db;color:var(--text)}
html[data-theme="light"] .landing .hero :is(.portal-notifications img,.portal-logout img){filter:none}
html[data-theme="light"] .landing .hero .portal-account__name{color:var(--text)}
html[data-theme="light"] .landing :is(.step>p,.link-cards article>p){color:var(--muted)}
html[data-theme="light"] .landing .about .highlight{color:#fff}
html[data-theme="light"] .landing .address-card{border-color:var(--line)}
html[data-theme="light"] .landing :is(.step,.info-panel,.link-cards article){background:var(--surface);border-color:var(--line)}
html[data-theme="light"] .landing :is(.step,.info-panel,.link-cards article):hover{background:var(--light-hover);border-color:#90b8b1}
html[data-theme="light"] .landing .site-footer{background:var(--surface-2);border-top:1px solid var(--line)}
html[data-theme="light"] .landing .site-footer .legal{color:var(--muted)}
html[data-theme="light"] .landing .login-demo{background:var(--surface);border-color:var(--line);color:var(--text)}
html[data-theme="light"] .landing .login-demo :is(h4,.login-demo__player strong){color:var(--text)}
html[data-theme="light"] .landing .login-demo__player{background:var(--surface-2);border-color:var(--line)}
html[data-theme="light"] .landing .login-demo :is(.login-demo__header,.login-demo__result,.login-demo__footer small){color:var(--muted)}
html[data-theme="light"] .landing .login-demo__ip>span{color:var(--muted)!important}
html[data-theme="light"] .landing .login-demo__badge{color:#765600!important;border-color:#b7a56f}
html[data-theme="light"] .landing .login-demo[data-demo-state=approved] .login-demo__badge{color:#216535!important;border-color:#75a885}
html[data-theme="light"] .landing .login-demo:is([data-demo-state=denied],[data-demo-state=blocked]) .login-demo__badge{color:#a12832!important;border-color:#c38b91}
html[data-theme="light"] .landing .demo-reset{color:var(--teal)}
html[data-theme="light"] .landing .discord-demo .demo-reset{color:#71e1db}
html[data-theme="light"] .landing .ecosystem-map-visual{background:#e7e3db}
html[data-theme="light"] .landing .ecosystem-map-visual__hub{background:#e7e3db;border-color:#8c827b}
html[data-theme="light"] .landing .ecosystem-map-visual__place{color:var(--text)}
html[data-theme="light"] .landing .ecosystem-map-visual__place>small{color:color-mix(in srgb,var(--marker-color) 65%,#182322)}
html[data-theme="light"] .landing :is(.ecosystem-projects>a,.editor-popover,.editor-block-menu){background:var(--surface);border-color:var(--line);color:var(--text)}
html[data-theme="light"] .landing .small-button>img{filter:brightness(0)}
html[data-theme="light"] .landing .hero .pixel-button>img{filter:none}
/* Decorative/UI SVGs follow their surface; photographs, heads and logos do not. */
html[data-theme="light"] .landing .small-button{background:#dcefeb;border-color:#90b8b1;color:#174740;box-shadow:none}
html[data-theme="light"] .landing .small-button:hover{background:#c6e5df;border-color:#568f84;color:#103e38}
html[data-theme="light"] .landing .hero .small-button{background:#125658;border-color:#71e1db;color:#fff}
html[data-theme="light"] .landing :is(.copy-button img,.info-links img,.link-cards .small-button>img){filter:brightness(0)}
html[data-theme="light"] .landing .hero :is(.small-button>img,.pixel-button>img,.portal-notifications img){filter:none}
html[data-theme="light"] .landing .discord-demo{--text:#182322;--muted:#586462;background:#f2f3f5;color:#313338}
html[data-theme="light"] .landing .discord-demo :is(h4,.discord-demo__author strong){color:#060607}
html[data-theme="light"] .landing .discord-demo :is(.discord-demo__description,.discord-demo__reason,.discord-demo__ip strong){color:#313338}
html[data-theme="light"] .landing .discord-demo__author small{color:#5c5e66}
html[data-theme="light"] .landing .discord-demo__ip pre{background:#e3e5e8;color:#313338}
html[data-theme="light"] .landing .discord-demo__ip code{color:#313338}
html[data-theme="light"] .landing .discord-demo .login-demo__actions{border-top-color:#c7c9ce}
html[data-theme="light"] .landing .discord-demo .demo-reset{color:#006a6b}
