/* FlatcastX Public Dark Theme Contrast Repair V2 - 2026-10-30
   Additive only; user radio stage, player canvas, mixer audio and administration remain untouched.
   Dark rules are scoped to the public lobby and its AJAX subviews. */
html[data-fx-site-theme="dark"] .page{--fx-v2-bg:#101b2b;--fx-v2-panel:#1c2c42;--fx-v2-card:#243c56;--fx-v2-field:#15263b;--fx-v2-edge:#42617f;--fx-v2-text:#e8f2ff;--fx-v2-soft:#acc7e3;--fx-v2-link:#83ccff;color:var(--fx-v2-text)}
/* Headline: align the title with its section; avoid the light-theme white text-shadow. */
html[data-fx-site-theme="dark"] .page .section-bar{border-color:#466988!important;gap:10px;min-height:48px;padding:8px 0 9px!important}
html[data-fx-site-theme="dark"] .page .section-header{border-left:4px solid #49b6ff;padding-left:12px;color:#e7f3ff!important;text-shadow:none!important;min-width:0}
html[data-fx-site-theme="dark"] .page .top-pagination{min-width:0}
html[data-fx-site-theme="dark"] .page .lang-select-form{margin-left:auto}
/* Live broadcast cards: stable count/icon background, readable SID and URLs (hover included). */
html[data-fx-site-theme="dark"] .page .stream-row,
html[data-fx-site-theme="dark"] .page .stream-row:hover{background:#243c56!important;color:#e8f2ff!important;border-color:#48698a!important;box-shadow:0 3px 11px #040c1740!important}
html[data-fx-site-theme="dark"] .page .stream-row:hover{background:#304b68!important;border-color:#6c9ec8!important}
html[data-fx-site-theme="dark"] .page .stream-side-cell,
html[data-fx-site-theme="dark"] .page .stream-row:hover .stream-side-cell{background:transparent!important;border-right-color:#55718e!important;box-shadow:none!important}
html[data-fx-site-theme="dark"] .page .stream-count,
html[data-fx-site-theme="dark"] .page .stream-count small,
html[data-fx-site-theme="dark"] .page .stream-row:hover .stream-count{color:#deecff!important;background:transparent!important;text-shadow:none!important}
html[data-fx-site-theme="dark"] .page .stream-row .room-icon,
html[data-fx-site-theme="dark"] .page .stream-row:hover .room-icon{color:#fff!important;filter:none!important;box-shadow:inset 0 1px 2px #fff4,0 2px 6px #0005!important}
html[data-fx-site-theme="dark"] .page .stream-title{color:#e6f3ff!important}
html[data-fx-site-theme="dark"] .page .stream-desc{color:#cbdcf0!important}
html[data-fx-site-theme="dark"] .page .stream-url,
html[data-fx-site-theme="dark"] .page .stream-url .fx-sid-inline,
html[data-fx-site-theme="dark"] .page .stream-url .fx-sid-inline b,
html[data-fx-site-theme="dark"] .page .stream-url .fx-stream-web-passive{color:#99d4ff!important;opacity:1!important}
html[data-fx-site-theme="dark"] .page .stream-url .fx-separator{color:#7a9fbe!important}
/* Broadcast / transfer form and the register/profile settings forms. */
html[data-fx-site-theme="dark"] .page #lobby-stream-list :is(.fx-yayinal-card,.fx-yayinal-row,.create-radio-card,.fx-inline-settings-box,.fx-profile-settings-card){background:#1e3149!important;color:#e8f2ff!important;border-color:#48698a!important;box-shadow:none!important}
html[data-fx-site-theme="dark"] .page #lobby-stream-list :is(.fx-yayinal-card,.create-radio-card,.fx-inline-settings-box) :is(h2,h3,p,label,.cr-label,.fx-label){color:#d6ebff!important;text-shadow:none!important}
html[data-fx-site-theme="dark"] .page #lobby-stream-list :is(.create-radio-card,.fx-yayinal-card) :is(input:not([type="color"]),textarea,select,.cr-input){background:#15263b!important;color:#e7f1ff!important;border-color:#53718e!important}
html[data-fx-site-theme="dark"] .page #lobby-stream-list :is(.fx-yayinal-card,.create-radio-card) :is(.error,.fx-yayinal-error){background:#503037!important;color:#ffccd1!important;border-color:#aa6673!important}
/* Current source creates a light bordered transfer card. Match its actual DOM selectors too. */
html[data-fx-site-theme="dark"] .page #lobby-stream-list :is(.fx-yayinal-form,.fx-yayinal-card) :is(.input-group,.fx-yayinal-info){color:#e7f1ff!important}
/* Announcements: remove white list and cards, preserve attached images, embeds and alert colors. */
html[data-fx-site-theme="dark"] .page .fx-duyuru-page{background:#1c2c42!important;border-color:#476788!important;box-shadow:none!important}
html[data-fx-site-theme="dark"] .page .fx-duyuru-head{background:linear-gradient(110deg,#163c61,#075f9c)!important;border-bottom-color:#ffcc00!important}
html[data-fx-site-theme="dark"] .page .fx-duyuru-head :is(h2,p),html[data-fx-site-theme="dark"] .page .fx-duyuru-summary{color:#eef8ff!important}
html[data-fx-site-theme="dark"] .page :is(.fx-duyuru-list,.fx-duyuru-pagination){background:#192b40!important;border-color:#466584!important}
html[data-fx-site-theme="dark"] .page .fx-duyuru-item{background:#263c55!important;color:#e7f1ff!important;border-color:#48698a!important;box-shadow:none!important}
html[data-fx-site-theme="dark"] .page .fx-duyuru-title,
html[data-fx-site-theme="dark"] .page .fx-duyuru-content :is(h1,h2,h3,h4){color:#b9e0ff!important}
html[data-fx-site-theme="dark"] .page .fx-duyuru-content,
html[data-fx-site-theme="dark"] .page .fx-duyuru-content :is(div,p,li,span,strong,b){color:#e7f1ff!important}
html[data-fx-site-theme="dark"] .page .fx-duyuru-date{color:#b7cbe1!important}
html[data-fx-site-theme="dark"] .page .fx-duyuru-content a{color:#91d3ff!important}
html[data-fx-site-theme="dark"] .page .fx-duyuru-content blockquote{background:#304b68!important;color:#e4f0ff!important;border-color:#51bbff!important}
html[data-fx-site-theme="dark"] .page .fx-duyuru-page-btn{background:#2a4461!important;color:#e2f2ff!important;border-color:#557695!important;box-shadow:none!important}
html[data-fx-site-theme="dark"] .page .fx-duyuru-page-btn.active{background:#f8c724!important;color:#142a43!important}
/* Support: cards, info lines and explanatory callouts. Keep action/success buttons distinct. */
html[data-fx-site-theme="dark"] .page .fx-contact-wrap{background:#16283e!important;border-color:#44688a!important}
html[data-fx-site-theme="dark"] .page .fx-contact-grid{background:#16283e!important}
html[data-fx-site-theme="dark"] .page .fx-contact-wrap :is(.fx-card,.fx-card-body,.fx-member-required){background:#213750!important;color:#e7f2ff!important;border-color:#4a6d8d!important}
html[data-fx-site-theme="dark"] .page .fx-contact-wrap .fx-card-title{background:linear-gradient(110deg,#13588a,#064574)!important;color:#eef8ff!important}
html[data-fx-site-theme="dark"] .page .fx-contact-wrap :is(.fx-label,.fx-member-required b){color:#aedcff!important}
html[data-fx-site-theme="dark"] .page .fx-contact-wrap :is(.fx-input,.fx-select,.fx-textarea,.fx-input[readonly]){background:#15263b!important;color:#e7f2ff!important;border-color:#55718e!important}
html[data-fx-site-theme="dark"] .page .fx-contact-wrap .fx-info-line{color:#e4f1ff!important;border-color:#445e79!important}
html[data-fx-site-theme="dark"] .page .fx-contact-wrap .fx-info-line :is(a,b,span){color:#b5dfff!important}
html[data-fx-site-theme="dark"] .page .fx-contact-wrap .fx-support-note{background:#4a3a21!important;color:#ffe9b5!important;border-color:#907348!important}
/* Users and settings, fixed explicit label/select contrast including nested modals. */
html[data-fx-site-theme="dark"] .page #lobby-stream-list :is(.fx-label,.cr-label,.m-label,.fx-res-field label,.fx-ms-field label){color:#b8dfff!important}
html[data-fx-site-theme="dark"] .page #lobby-stream-list :is(input:not([type="color"]),select,textarea):not([type="checkbox"]):not([type="radio"]){color:#eff7ff!important;background:#15263b!important;border-color:#527390!important}
html[data-fx-site-theme="dark"] .page #lobby-stream-list :is(input,textarea)::placeholder{color:#afc4d9!important;opacity:1!important}
/* Radio list tables: loaded later via AJAX with !important white backgrounds. */
html[data-fx-site-theme="dark"] .page #lobby-stream-list .fx-my-radios-table :is(.fx-room-data-row td,.fx-room-toolbar-row td){background:#243b55!important;color:#ecf5ff!important;border-color:#46698a!important;box-shadow:none!important}
html[data-fx-site-theme="dark"] .page #lobby-stream-list .fx-my-radios-table th{background:#1b3e60!important;color:#f0f7ff!important;border-color:#436788!important}
html[data-fx-site-theme="dark"] .page #lobby-stream-list .fx-my-radios-table tr:hover td{background:#304d6d!important}
html[data-fx-site-theme="dark"] .page #lobby-stream-list :is(.fx-room-name,.fx-room-name b,.fx-my-radios-note,.fx-mini-muted,.fx-room-action-title span){color:#dceeff!important}
html[data-fx-site-theme="dark"] .page #lobby-stream-list :is(.fx-web-link,.fx-sid-badge){color:#9dd7ff!important}
html[data-fx-site-theme="dark"] .page #lobby-stream-list :is(.fx-sid-badge,.fx-pass-toggle,.fx-room-action-title span){background:#182b42!important;border-color:#50718f!important;box-shadow:none!important}
html[data-fx-site-theme="dark"] .page #lobby-stream-list .fx-pass-toggle{color:#d9efff!important}
/* The white dropdown seen on the screenshot. Do not flatten colorful icon tiles/status pills. */
html[data-fx-site-theme="dark"] .page #lobby-stream-list .fx-radio-action-menu{background:#1e3149!important;color:#e9f3ff!important;border:1px solid #537491!important;box-shadow:0 10px 25px #050e1db3!important}
html[data-fx-site-theme="dark"] .page #lobby-stream-list .fx-radio-action-item{color:#e9f3ff!important}
html[data-fx-site-theme="dark"] .page #lobby-stream-list .fx-radio-action-item:hover{background:#304d6c!important;color:#fff!important}
html[data-fx-site-theme="dark"] .page #lobby-stream-list .fx-radio-action-separator{background:#4a6683!important}
html[data-fx-site-theme="dark"] .page #lobby-stream-list .fx-radio-action-menu .fx-room-status-wide{background:transparent!important;color:#e1f1ff!important}
/* Mixer settings overlay and all its child choices. */
html[data-fx-site-theme="dark"] .page :is(.fx-ms-shell,.fx-ms-card,.fx-ms-section,.fx-ms-mode-section,.fx-ms-protocol-box){background:#1e3149!important;color:#ecf5ff!important;border-color:#4b6988!important}
html[data-fx-site-theme="dark"] .page :is(.fx-ms-title,.fx-ms-mode-label,.fx-ms-field label,.fx-ms-mode-choice b,.fx-ms-protocol-title){color:#d7edff!important}
html[data-fx-site-theme="dark"] .page :is(.fx-ms-subtitle,.fx-ms-mode-choice small){color:#b2cbe2!important}
html[data-fx-site-theme="dark"] .page :is(.fx-ms-info,.fx-ms-mode-note){background:#263e58!important;color:#cde7ff!important;border-color:#517595!important}
html[data-fx-site-theme="dark"] .page .fx-ms-mode-choice{background:#1b3049!important;color:#e9f4ff!important;border-color:#50708f!important}
html[data-fx-site-theme="dark"] .page .fx-ms-mode-choice.is-active{background:#174c73!important;color:#fff!important;border-color:#76c7ff!important}
html[data-fx-site-theme="dark"] .page .fx-ms-mode-icon{background:#305474!important}
html[data-fx-site-theme="dark"] .page .fx-ms-close{background:#273f59!important;color:#e5f2ff!important;border-color:#537694!important}
/* Radio permissions and ban-list modal. */
html[data-fx-site-theme="dark"] .page :is(.fx-authority-box,.fx-authority-card,.fx-authority-user,.fx-rbl-card,.fx-rbl-head,.fx-rbl-list,.fx-rbl-foot,.fx-rbl-empty){background:#21364e!important;color:#e8f2ff!important;border-color:#4b6a88!important}
html[data-fx-site-theme="dark"] .page :is(.fx-authority-title,.fx-authority-name,.fx-authority-card-label,.fx-rbl-title){color:#d9ecff!important}
html[data-fx-site-theme="dark"] .page :is(.fx-authority-meta,.fx-rbl-room){color:#b3c9df!important}
html[data-fx-site-theme="dark"] .page .fx-rbl-note{background:#493920!important;color:#ffe5a6!important;border-color:#9a753c!important}
html[data-fx-site-theme="dark"] .page .fx-rbl-table :is(th,td){background:#293f56!important;color:#e9f4ff!important;border-color:#52718b!important}
/* iFrame pop-up and dynamically loaded iframe instructions/code. */
html[data-fx-site-theme="dark"] .page #modalIframe .modal-content{background:#1c3048!important;color:#eff7ff!important;border:1px solid #4c7296!important}
html[data-fx-site-theme="dark"] .page #modalIframe .modal-content h3{color:#c6e6ff!important;border-bottom-color:#4d7191!important}
html[data-fx-site-theme="dark"] .page #iframe-loader-area :is(.iframe-box,.iframe-code-box,.fx-iframe-box,.fx-iframe-card,div[style*="background:#fff"]){background:#243b55!important;color:#e9f4ff!important;border-color:#55738f!important}
html[data-fx-site-theme="dark"] .page #iframe-loader-area :is(textarea,pre,code,input){background:#15273f!important;color:#eff8ff!important;border-color:#52708b!important}
html[data-fx-site-theme="dark"] .page #iframe-loader-area :is(b,strong,p,span,label){color:#ddecff!important}
html[data-fx-site-theme="dark"] .page #modalIframe .modal-close.blue{color:#d6edff!important}
/* Generic public AJAX snippets with explicit inline pale backgrounds. Do not recolor
   semantically colored success/danger banners or custom live room artwork. */
html[data-fx-site-theme="dark"] .page #lobby-stream-list :is([style*="background:#fff"],[style*="background: #fff"],[style*="background:#f8fb"],[style*="background:#f9fc"]):not(.icon-choice):not(.fx-live-pill):not(.fx-radio-action-icon){background:#243b55!important;color:#e9f4ff!important;border-color:#4d6c8b!important}
/* Return button added at the top of non-home SPA views; keyboard and mobile safe. */
.fx-v2-back-lobby{display:inline-flex;align-items:center;gap:6px;justify-content:center;white-space:nowrap;text-decoration:none;padding:7px 11px;border:1px solid #6a9fcc;border-radius:7px;background:#236ba3;color:#fff!important;font-weight:800;font-size:12px;margin-left:auto}
.fx-v2-back-lobby:hover{background:#1689d1;color:#fff!important}
.fx-v2-back-lobby[hidden]{display:none!important}
html[data-fx-site-theme="dark"] .page .fx-v2-back-lobby{background:#244868;border-color:#668eb2;color:#eaf5ff!important}
@media(max-width:640px){.page .section-bar{flex-wrap:wrap}.fx-v2-back-lobby{margin-left:0;order:2}.page .lang-select-form{margin-left:auto}}

/* Theme editor LIGHT mode. Editor chrome only: #stage, .el and custom radio artwork
   are intentionally excluded. Dark mode remains the existing tested appearance. */
html[data-fx-site-theme="light"]:has(#app>.topbar){color-scheme:light}
html[data-fx-site-theme="light"]:has(#app>.topbar) body{background:#e9f1f8!important;color:#183852!important}
html[data-fx-site-theme="light"] #app{color:#1b3a53!important}
html[data-fx-site-theme="light"] #app>.topbar{background:#e8f3fd!important;border-bottom-color:#6bb1e2!important;color:#15446c!important}
html[data-fx-site-theme="light"] #app>.topbar .title{color:#153a5d!important}
html[data-fx-site-theme="light"] #app>.sidebar,
html[data-fx-site-theme="light"] #app>.props{background:#e6eff8!important;color:#173b5c!important;border-color:#a8c4db!important}
html[data-fx-site-theme="light"] #app .group{background:#fafdff!important;border-color:#b8ccdf!important;color:#183e5f!important}
html[data-fx-site-theme="light"] #app .group h3,
html[data-fx-site-theme="light"] #app .collapse-tab{background:#256ea5!important;color:#fff!important}
html[data-fx-site-theme="light"] #app>.stage-wrap{background:#d7e5f0!important}
html[data-fx-site-theme="light"] #app :is(.sidebar,.props) :is(label,.hint,.theme-mini-note,small){color:#335c79!important}
html[data-fx-site-theme="light"] #app :is(.sidebar,.props) :is(input:not([type="color"]),select,textarea){background:#fff!important;color:#123450!important;border-color:#94b3cc!important}
html[data-fx-site-theme="light"] #app :is(.sidebar,.props) :is(input,textarea)::placeholder{color:#657f99!important}
/* Viewer toolbar is global and uses its own accessible colors in both modes. */
/* Target the actual takeover form rendered by index.php (not a generic card). */
html[data-fx-site-theme="dark"] .page .fx-yayinal-note{background:#25445e!important;color:#d9efff!important;border-color:#51baff!important}
html[data-fx-site-theme="dark"] .page .fx-yayinal-form{background:#21364e!important;color:#e7f2ff!important;border-color:#51708d!important;box-shadow:none!important}
html[data-fx-site-theme="dark"] .page .fx-yayinal-row label{color:#d3e9ff!important}
html[data-fx-site-theme="dark"] .page .fx-yayinal-back{background:#2c4761!important;color:#e9f5ff!important;border-color:#5a7a99!important}
html[data-fx-site-theme="dark"] .page .fx-inline-settings-box{background:#1d334d!important;color:#e9f4ff!important;border-color:#50708e!important}
html[data-fx-site-theme="dark"] .page .fx-inline-settings-box h3{color:#cce7ff!important}
html[data-fx-site-theme="dark"] .page .fx-inline-settings-box :is(.m-label,label){color:#b8ddff!important}
/* The radio-actions menu is deliberately portaled into <body> when opened. */
html[data-fx-site-theme="dark"] body:has(.page) .fx-radio-action-menu,
html[data-fx-site-theme="dark"] body:has(.page) .fx-radio-action-menu-portal{background:#1e3149!important;color:#e9f3ff!important;border-color:#527290!important;box-shadow:0 12px 28px #060d1cb3!important}
html[data-fx-site-theme="dark"] body:has(.page) .fx-radio-action-menu .fx-radio-action-item{background:transparent!important;color:#deefff!important}
html[data-fx-site-theme="dark"] body:has(.page) .fx-radio-action-menu .fx-radio-action-item:hover{background:#325473!important;color:#fff!important}
html[data-fx-site-theme="dark"] body:has(.page) .fx-radio-action-menu .fx-radio-action-separator{background:#526b83!important}
html[data-fx-site-theme="dark"] body:has(.page) .fx-radio-action-menu .fx-room-status-wide{background:transparent!important;color:#e9f3ff!important}
/* Some status icons carry semantic foreground color by design; leave their colors intact. */
/* Radio entrance-password dialog (owner-facing, independent from broadcaster credentials). */
html[data-fx-site-theme="dark"] .page .fx-res-card{background:#21364e!important;color:#e9f4ff!important;border-color:#567b9b!important;box-shadow:0 22px 60px #040c1bbb!important}
html[data-fx-site-theme="dark"] .page .fx-res-head{border-color:#4a6886!important}
html[data-fx-site-theme="dark"] .page :is(.fx-res-title,.fx-res-room,.fx-res-field label){color:#d6ebff!important}
html[data-fx-site-theme="dark"] .page :is(.fx-res-toggle-row,.fx-res-note,.fx-res-info,.fx-res-current){background:#293f58!important;color:#dceeff!important;border-color:#52718d!important}
html[data-fx-site-theme="dark"] .page .fx-res-field input{background:#15283e!important;color:#eaf5ff!important;border-color:#577794!important}
/* Inline permissions view loaded under the public lobby. */
html[data-fx-site-theme="dark"] .page #lobby-stream-list .fx-room-roles-wrap{background:#21364d!important;color:#e8f3ff!important;border-color:#547593!important;box-shadow:none!important}
html[data-fx-site-theme="dark"] .page #lobby-stream-list .fx-room-roles-wrap :is(h1,.info,.muted,.online-hint){color:#d6eaff!important}
html[data-fx-site-theme="dark"] .page #lobby-stream-list .fx-room-roles-wrap :is(.info,.muted){background:#304d6a!important;border-color:#578ab4!important}
html[data-fx-site-theme="dark"] .page #lobby-stream-list .fx-room-roles-wrap :is(th,td){background:#2a405a!important;color:#e7f2ff!important;border-color:#4c6d8b!important}
/* Actual iframe list AJAX returns divs with inline #fafafa (not #fff). */
html[data-fx-site-theme="dark"] .page #iframe-loader-area > div[style*="background:#fafafa"]{background:#243b55!important;color:#e8f2ff!important;border-color:#53718c!important}
html[data-fx-site-theme="dark"] .page #iframe-loader-area > div[style*="background:#fafafa"] b,
html[data-fx-site-theme="dark"] .page #iframe-loader-area > div[style*="background:#fafafa"] span{color:#d5ebff!important}
/* Keep editor stage's saved theme separate from the site's appearance choice. */
