﻿@layer for314-basic {
/* Windows 7 Basic-inspired solid surfaces. Image customizations and classic keep priority. */
html.for314-basic-mode :is(*,*::before,*::after){-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
html.for314-basic-mode:not(.for314-classic-theme) body:not(.local-light){--basic-face:#263d5c;--basic-raised:#34577f;--basic-input:#1c304a;--basic-edge:#7292b4;--basic-text:#f7faff}
html.for314-basic-mode:not(.for314-classic-theme) body.local-light{--basic-face:#d6e4f3;--basic-raised:#b7cee7;--basic-input:#fff;--basic-edge:#7396bc;--basic-text:#13283d}
html.for314-basic-mode:not(.for314-classic-theme) body :is(.tab-topbar,#roomTitleText,.direct-chat-card,.direct-chat-profile-card,.for314-account-panel,.for314-vote-panel,.pimg-panel):not(.for314-header-photo-target):not(.for314-header-color-target){background:var(--basic-face)!important;color:var(--basic-text)!important;border-color:var(--basic-edge)!important;box-shadow:0 2px 5px #0003!important}
html.for314-basic-mode:not(.for314-classic-theme) body:not(.for314-bar-image):not(.for314-local-bar-color):not(.for314-rtxt-mode):not(.for314-rtxt2-mode) .inputrow{background:var(--basic-face)!important}
html.for314-basic-mode:not(.for314-classic-theme) body :is(.room-tab-wrap,.room-tab,.for314-reply-quote-card):not(.for314-header-photo-target){background:var(--basic-raised)!important;border-color:var(--basic-edge)!important;color:var(--basic-text)!important}
html.for314-basic-mode:not(.for314-classic-theme) body:not(.for314-local-bar-color):not(.for314-bar-image) #msgInput,
html.for314-basic-mode:not(.for314-classic-theme) body .command-search-input{background:var(--basic-input)!important;color:var(--basic-text)!important;border-color:var(--basic-edge)!important}
html.for314-basic-mode:not(.for314-classic-theme) body:not(.for314-local-bar-color):not(.for314-bar-image) .inputrow :is(#imageBtn,#commandBtn){background:var(--basic-raised)!important;border-color:var(--basic-edge)!important;color:var(--basic-text)!important}

html.for314-basic-mode:not(.for314-classic-theme) body .message-bubble:not([style*="background"]){background:var(--basic-bubble-bg)!important;color:var(--basic-bubble-text)!important;border:1px solid var(--basic-bubble-edge)!important}
html.for314-basic-mode:not(.for314-classic-theme) body .message.mine .message-bubble:not([style*="background"]){background:#5077a3!important;color:#fff!important}

/* The outer header is layout only; the inner room and title are the painted bars. */
html.for314-basic-mode:not(.for314-classic-theme) body header.profile-compact-header{background:transparent!important;background-image:none!important;border:0!important;box-shadow:none!important}
html.for314-basic-mode:not(.for314-classic-theme) body header.profile-compact-header .room:not(.for314-header-photo-target):not(.for314-header-color-target){background:var(--basic-face)!important;color:var(--basic-text)!important;border:1px solid var(--basic-edge)!important;box-shadow:inset 0 1px 0 #ffffff59,0 2px 4px #0003!important}
html.for314-basic-mode:not(.for314-classic-theme) body header.profile-compact-header .room:not(.for314-header-photo-target):not(.for314-header-color-target)::before{background:none!important}
html.for314-basic-mode:not(.for314-classic-theme) body header.profile-compact-header .header-room-line{background:transparent!important;box-shadow:none!important}
/* Opaque Basic-style tint for both headercolor targets, preserving text contrast. */
html.for314-basic-mode:not(.for314-classic-theme) body:not(.local-light) :is(header > .room,#roomTitleText,main > p.muted).for314-header-color-target{background:linear-gradient(rgba(8,18,32,.70),rgba(8,18,32,.70)),rgb(var(--for314-header-color-rgb))!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border:1px solid rgb(var(--for314-header-color-rgb))!important;box-shadow:inset 0 1px 0 #ffffff66,0 2px 4px #0004!important}
html.for314-basic-mode:not(.for314-classic-theme) body.local-light :is(header > .room,#roomTitleText,main > p.muted).for314-header-color-target{background:linear-gradient(rgba(255,255,255,.72),rgba(255,255,255,.72)),rgb(var(--for314-header-color-rgb))!important;color:#13283d!important;-webkit-text-fill-color:#13283d!important;border:1px solid rgb(var(--for314-header-color-rgb))!important;box-shadow:inset 0 1px 0 #fff,0 2px 4px #0003!important}
html.for314-basic-mode:not(.for314-classic-theme) body :is(header > .room,#roomTitleText,main > p.muted).for314-header-color-target::before{background:none!important}

/* Opaque, high-contrast profile surfaces, keeping the current rounded layout. */
html.for314-basic-mode:not(.for314-classic-theme) body:not(.local-light){--basic-panel:#182b43;--basic-panel-inner:#263c58;--basic-muted:#e1eaf5;--basic-button:#3a6088}
html.for314-basic-mode:not(.for314-classic-theme) body.local-light{--basic-panel:#f8fbff;--basic-panel-inner:#e6f0fa;--basic-muted:#304a63;--basic-button:#c7ddf1}
html.for314-basic-mode:not(.for314-classic-theme) body :is(.avatar-editor,.direct-chat-card,.direct-chat-profile-card){background:var(--basic-panel)!important;color:var(--basic-text)!important;border:1px solid var(--basic-edge)!important;box-shadow:0 5px 18px #0005!important}
html.for314-basic-mode:not(.for314-classic-theme) body :is(.avatar-editor-body,.direct-chat-profile-section){background:var(--basic-panel-inner)!important;color:var(--basic-text)!important;border:1px solid var(--basic-edge)!important;border-radius:12px!important}
html.for314-basic-mode:not(.for314-classic-theme) body :is(.avatar-editor-title,.avatar-editor-copy strong,.avatar-editor-field-label,.avatar-editor-notification-hint,.avatar-editor-copy small,.direct-chat-profile-name,.direct-chat-profile-section-title,.direct-chat-profile-bio,.direct-chat-note){color:var(--basic-muted)!important;-webkit-text-fill-color:var(--basic-muted)!important;text-shadow:none!important}
html.for314-basic-mode:not(.for314-classic-theme) body :is(.avatar-editor-field-row input,.direct-chat-profile-editor-bio,.direct-chat-profile-editor input){background:var(--basic-input)!important;color:var(--basic-text)!important;-webkit-text-fill-color:var(--basic-text)!important;border:1px solid var(--basic-edge)!important}
html.for314-basic-mode:not(.for314-classic-theme) body :is(.avatar-editor-close,.avatar-editor-actions button:not(#avatarChooseBtn),.avatar-editor-field-row button:not(#saveNameBtn)){background:var(--basic-button)!important;color:var(--basic-text)!important;-webkit-text-fill-color:var(--basic-text)!important;border:1px solid var(--basic-edge)!important}

/* Solid cards: removing blur must not leave translucent panels over the chat. */
html.for314-basic-mode:not(.for314-classic-theme) body :is(
  #roomTools,.command-modal,.open-room-password-card,.open-room-hub-modal,
  .media-choice-sheet,.for314-bookmark-modal,.voice-call-modal,.voice-callnow-modal,
  .for314-live-camera-modal,.video-editor-panel,.notification-rooms-modal,
  .cf-room-auth-modal,.message-translation-card,.moderation-confirm-card,
  .native-like-alert-dialog,.room-font-modal,.confirm-choice-modal,.other-room-modal,
  .for314-notification-mode-modal,.site-security-modal,.stamp-modal
){background:var(--basic-panel)!important;color:var(--basic-text)!important;border:1px solid var(--basic-edge)!important;box-shadow:0 6px 20px #0005!important}
html.for314-basic-mode:not(.for314-classic-theme) body :is(
  .command-modal-head,.command-search-wrap,.command-category-nav,
  .for314-bookmark-modal-head,.voice-call-top
){background:var(--basic-panel)!important;color:var(--basic-text)!important;border-color:var(--basic-edge)!important}
html.for314-basic-mode:not(.for314-classic-theme) body :is(
  .command-row,.media-choice-btn,.voice-call-user,.voice-call-card,
  .official-room-list
){background:var(--basic-panel-inner)!important;color:var(--basic-text)!important;border-color:var(--basic-edge)!important}
html.for314-basic-mode:not(.for314-classic-theme) body :is(
  #roomToolsTitle,#roomTools small,.official-room-picker-head,.official-room-item,
  .command-modal-title,.command-code,.command-desc,.command-category,
  .open-room-password-title,.open-room-password-message,.open-room-password-label,
  .media-choice-title,.media-choice-btn,.media-choice-sub,
  .voice-call-title,.voice-call-countdown,.voice-call-user,.voice-call-user-state
){color:var(--basic-text)!important;-webkit-text-fill-color:var(--basic-text)!important;text-shadow:none!important}
html.for314-basic-mode:not(.for314-classic-theme) body :is(#newRoomId,.open-room-password-input){background:var(--basic-input)!important;color:var(--basic-text)!important;-webkit-text-fill-color:var(--basic-text)!important;border:1px solid var(--basic-edge)!important}
html.for314-basic-mode:not(.for314-classic-theme) body :is(
  #roomTools button,.command-copy,.command-modal-close,.command-category-jump,
  .voice-call-x,.voice-call-minimize,.voice-call-control:not(.leave):not(.is-off),
  .open-room-password-back,.open-room-password-send
){background:var(--basic-button)!important;color:var(--basic-text)!important;-webkit-text-fill-color:var(--basic-text)!important;border-color:var(--basic-edge)!important}
html.for314-basic-mode:not(.for314-classic-theme) body .command-category-jump.is-active{outline:2px solid var(--basic-edge)!important;outline-offset:-2px!important}
/* Camera video is never painted over. Preserve the red leave and off-state cues. */
html.for314-basic-mode:not(.for314-classic-theme) body .voice-meet-tile{background:#15263c!important;border-color:var(--basic-edge)!important}
html.for314-basic-mode:not(.for314-classic-theme) body .voice-meet-tile-footer{background:#142235!important;color:#fff!important}
html.for314-basic-mode:not(.for314-classic-theme) body .voice-meet-camera-off{color:#f5f8fc!important}
html.for314-basic-mode:not(.for314-classic-theme) body .voice-call-control.leave{background:#b62842!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
html.for314-basic-mode:not(.for314-classic-theme) body .voice-call-control.is-off:not(.leave){background:#62404d!important;color:#fff!important;-webkit-text-fill-color:#fff!important}

/* A custom bar colour stays opaque and carries through to the field and buttons. */
html.for314-basic-mode:not(.for314-classic-theme) body.for314-local-bar-color:not(.local-light) .inputrow{
 background:linear-gradient(rgba(12,18,28,.72),rgba(12,18,28,.72)),rgb(var(--for314-room-accent-rgb))!important;
 border:1px solid rgb(var(--for314-room-accent-rgb))!important;box-shadow:0 2px 5px #0003!important}
html.for314-basic-mode:not(.for314-classic-theme) body.local-light.for314-local-bar-color .inputrow{
 background:linear-gradient(rgba(255,255,255,.70),rgba(255,255,255,.70)),rgb(var(--for314-room-accent-rgb))!important;
 border:1px solid rgb(var(--for314-room-accent-rgb))!important;box-shadow:0 2px 5px #0003!important}
html.for314-basic-mode:not(.for314-classic-theme) body.for314-local-bar-color:not(.local-light) .inputrow :is(#msgInput,#imageBtn,#commandBtn){
 background:linear-gradient(rgba(12,18,28,.55),rgba(12,18,28,.55)),rgb(var(--for314-room-accent-rgb))!important;
 border:1px solid rgb(var(--for314-room-accent-rgb))!important;color:#fff!important;-webkit-text-fill-color:#fff!important;box-shadow:none!important}
html.for314-basic-mode:not(.for314-classic-theme) body.local-light.for314-local-bar-color .inputrow :is(#msgInput,#imageBtn,#commandBtn){
 background:linear-gradient(rgba(255,255,255,.80),rgba(255,255,255,.80)),rgb(var(--for314-room-accent-rgb))!important;
 border:1px solid rgb(var(--for314-room-accent-rgb))!important;color:#17283d!important;-webkit-text-fill-color:#17283d!important;box-shadow:none!important}
html.for314-basic-mode:not(.for314-classic-theme) body.for314-local-bar-color .inputrow #sendBtn{
 background:var(--for314-room-accent)!important;border:1px solid rgb(var(--for314-room-accent-rgb))!important;
 color:var(--for314-room-send-fg)!important;-webkit-text-fill-color:var(--for314-room-send-fg)!important;box-shadow:none!important}
html.for314-basic-mode:not(.for314-classic-theme) body.for314-local-bar-color .inputrow #sendBtn::after{color:var(--for314-room-send-fg)!important;-webkit-text-fill-color:var(--for314-room-send-fg)!important}
html.for314-basic-mode:not(.for314-classic-theme) body.for314-local-bar-color .inputrow::before,
html.for314-basic-mode:not(.for314-classic-theme) body.for314-local-bar-color .inputrow::after,
html.for314-basic-mode:not(.for314-classic-theme) body.for314-local-bar-color .inputrow #sendBtn::before{background:none!important}

/* Default received messages use dark text on the pale Basic bubble. */
html.for314-basic-mode:not(.for314-classic-theme) body .message:not(.mine) .message-bubble:not([style*="background"]):not([data-for314-textcolor="1"]):not(.for314-dot-text-bubble):not(.site-security-review-bubble):not(.privacy-policy-bubble){
 color:var(--basic-bubble-text)!important;-webkit-text-fill-color:var(--basic-bubble-text)!important;text-shadow:none!important}
html.for314-basic-mode:not(.for314-classic-theme) body .message:not(.mine) .message-bubble:not([style*="background"]):not([data-for314-textcolor="1"]):not(.for314-dot-text-bubble):not(.site-security-review-bubble):not(.privacy-policy-bubble) :is(.for314-reply-body:not(.for314-dot-text-bubble),.message-collapsible-text):not([data-for314-textcolor="1"]){
 color:var(--basic-bubble-text)!important;-webkit-text-fill-color:var(--basic-bubble-text)!important;text-shadow:none!important}

/* Light Basic quote cards use dark text on their pale blue surface. */
html.for314-basic-mode:not(.for314-classic-theme) body.local-light .message-bubble:not([data-for314-textcolor="1"]) .for314-reply-quote-card :is(.for314-reply-quote-name,.for314-reply-quote-name-text,.for314-reply-quote-text,.for314-reply-svg-icon):not([data-for314-textcolor="1"]){color:#15283d!important;-webkit-text-fill-color:#15283d!important;text-shadow:none!important}


/* v709: theme-aware received bubbles, including AI's nested Markdown renderer. */
html.for314-basic-mode:not(.for314-classic-theme) body{--basic-bubble-bg:#292e36;--basic-bubble-text:#f4f6fa;--basic-bubble-edge:#596575}
html.for314-basic-mode:not(.for314-classic-theme) body.local-light{--basic-bubble-bg:#d9e2ed;--basic-bubble-text:#142032;--basic-bubble-edge:#8ca4be}
html.for314-basic-mode:not(.for314-classic-theme) body .message:not(.mine) .message-bubble.for314-ai-markdown-bubble:not([style*="background"]):not([data-for314-textcolor="1"]):not(.for314-dot-text-bubble) :is(.for314-ai-markdown-body,.site-security-markdown,p,h3,h4,ul,ol,li,strong,blockquote):not([data-for314-textcolor="1"]){
 color:var(--basic-bubble-text)!important;-webkit-text-fill-color:var(--basic-bubble-text)!important;text-shadow:none!important}


/* v710: light Markdown text, including AI replies whose marker is on the inner body.
   Keep pre/code styling independent: dark code surfaces require their white text. */
html.for314-basic-mode:not(.for314-classic-theme) body.local-light .message-bubble:not([style*="background"]):not([data-for314-textcolor="1"]):not(.for314-dot-text-bubble) :is(.site-security-markdown,.site-security-markdown p,.site-security-markdown h3,.site-security-markdown h4,.site-security-markdown ul,.site-security-markdown ol,.site-security-markdown li,.site-security-markdown strong,.site-security-markdown blockquote,.for314-ai-markdown-body,.for314-ai-markdown-bubble .message-more-toggle):not([data-for314-textcolor="1"]){
 color:#142032!important;-webkit-text-fill-color:#142032!important;text-shadow:none!important}
html.for314-basic-mode:not(.for314-classic-theme) body.local-light .message-bubble:not([style*="background"]):not([data-for314-textcolor="1"]) .site-security-markdown a{
 color:#174f91!important;-webkit-text-fill-color:#174f91!important;text-shadow:none!important;text-decoration:underline!important}

}
