﻿/* for314 Chat Classic theme — keep layout/icons, remove modern rounding/glass. */
html.for314-classic-theme,
body.for314-classic-theme{
  --for314-classic-bg:#c0c0c0;
  --for314-classic-panel:#d4d0c8;
  --for314-classic-panel-2:#ffffff;
  --for314-classic-line:#5f5f5f;
  --for314-classic-hi:#ffffff;
  --for314-classic-low:#808080;
  --for314-classic-shadow:#202020;
}

/* Classic means square and opaque; media/icons themselves stay untouched. */
.for314-classic-theme button,
.for314-classic-theme input,
.for314-classic-theme textarea,
.for314-classic-theme select,
.for314-classic-theme dialog,
.for314-classic-theme fieldset,
.for314-classic-theme [role="button"],
.for314-classic-theme [role="dialog"],
.for314-classic-theme [class*="modal"],
.for314-classic-theme [class*="popup"],
.for314-classic-theme [class*="toast"],
.for314-classic-theme [class*="panel"],
.for314-classic-theme [class*="toolbar"],
.for314-classic-theme [class*="topbar"],
.for314-classic-theme [class*="titlebar"],
.for314-classic-theme [class*="title-bar"],
.for314-classic-theme [class*="command"],
.for314-classic-theme [class*="bookmark"],
.for314-classic-theme .bar,
.for314-classic-theme .inputrow,
.for314-classic-theme .card,
.for314-classic-theme header{
  border-radius:0!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}

/* Shell / multi-room chrome. */
.for314-classic-theme #multiroomShell{
  background:var(--for314-classic-bg)!important;
}
.for314-classic-theme .tab-topbar,
.for314-classic-theme #roomTools,
.for314-classic-theme #shellStatus{
  background:var(--for314-classic-panel)!important;
  border:1px solid var(--for314-classic-shadow)!important;
  box-shadow:inset 1px 1px 0 var(--for314-classic-hi),inset -1px -1px 0 var(--for314-classic-low)!important;
}
.for314-classic-theme .room-tab-wrap,
.for314-classic-theme .room-tab,
.for314-classic-theme .room-tab-close,
.for314-classic-theme #toggleTools,
.for314-classic-theme #scrollTabsForward,
.for314-classic-theme #callRoom,
.for314-classic-theme #roomTools button,
.for314-classic-theme #newRoomId,
.for314-classic-theme .official-room-list,
.for314-classic-theme .official-room-item{
  border-radius:0!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
.for314-classic-theme .room-tab-wrap.active,
.for314-classic-theme .official-room-list,
.for314-classic-theme #newRoomId{
  box-shadow:inset 1px 1px 0 var(--for314-classic-low),inset -1px -1px 0 var(--for314-classic-hi)!important;
}

/* Main chat chrome: same dimensions/positions, classic surfaces only. */
.for314-classic-theme header.profile-compact-header,
.for314-classic-theme main .inputrow,
.for314-classic-theme .command-modal,
.for314-classic-theme .command-modal-head,
.for314-classic-theme .command-row,
.for314-classic-theme .command-item,
.for314-classic-theme .command-panel,
.for314-classic-theme .shared-popup,
.for314-classic-theme .shared-popup-head,
.for314-classic-theme .shared-popup-body,
.for314-classic-theme .modal,
.for314-classic-theme .modal-content{
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  border-radius:0!important;
}
.for314-classic-theme header.profile-compact-header,
.for314-classic-theme main .inputrow,
.for314-classic-theme .command-modal,
.for314-classic-theme .command-modal-head,
.for314-classic-theme .command-row,
.for314-classic-theme .command-item,
.for314-classic-theme .command-panel{
  background:var(--for314-classic-panel)!important;
  border-color:var(--for314-classic-line)!important;
  box-shadow:none!important;
}
.for314-classic-theme main .inputrow textarea,
.for314-classic-theme main .inputrow input,
.for314-classic-theme main .inputrow button,
.for314-classic-theme #commandBtn,
.for314-classic-theme .command-copy,
.for314-classic-theme .command-btn{
  border-radius:0!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  box-shadow:inset 1px 1px 0 var(--for314-classic-hi),inset -1px -1px 0 var(--for314-classic-low)!important;
}
.for314-classic-theme main .inputrow textarea,
.for314-classic-theme main .inputrow input{
  background:var(--for314-classic-panel-2)!important;
  box-shadow:inset 1px 1px 0 var(--for314-classic-low),inset -1px -1px 0 var(--for314-classic-hi)!important;
}

/* Disable translucent helper layers without changing layout. */
.for314-classic-theme .command-modal-backdrop,
.for314-classic-theme [class*="backdrop"]{
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}

/* Preserve avatars, photos, videos, maps and SVG/icon artwork. */
.for314-classic-theme img,
.for314-classic-theme video,
.for314-classic-theme canvas,
.for314-classic-theme svg{
  backdrop-filter:initial;
  -webkit-backdrop-filter:initial;
}


/* v608 tuning — ignore light/dark mode and keep current layout with square UI only. */
.for314-classic-theme #multiroomShell,
.for314-classic-theme .shell-main,
.for314-classic-theme .shell-stage{
  background:transparent!important;
}
.for314-classic-theme .tab-topbar,
.for314-classic-theme #roomTools,
.for314-classic-theme #shellStatus{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
.for314-classic-theme .room-tab-wrap,
.for314-classic-theme .room-tab,
.for314-classic-theme .room-tab-close,
.for314-classic-theme #toggleTools,
.for314-classic-theme #scrollTabsForward,
.for314-classic-theme #callRoom,
.for314-classic-theme #roomTools button,
.for314-classic-theme #newRoomId,
.for314-classic-theme .official-room-list,
.for314-classic-theme .official-room-item{
  background:var(--for314-classic-panel)!important;
  border:1px solid var(--for314-classic-shadow)!important;
  box-shadow:inset 1px 1px 0 var(--for314-classic-hi),inset -1px -1px 0 var(--for314-classic-low)!important;
}
.for314-classic-theme header.profile-compact-header,
.for314-classic-theme .profile-compact-head,
.for314-classic-theme .profile-compact-main,
.for314-classic-theme .profile-compact-name-row,
.for314-classic-theme .profile-compact-meta,
.for314-classic-theme .profile-compact-title,
.for314-classic-theme .profile-compact-roomline,
.for314-classic-theme .profile-compact-subtitle,
.for314-classic-theme .profile-compact-toggle,
.for314-classic-theme .profile-compact-badge{
  border-radius:0!important;
}
.for314-classic-theme .message-bubble,
.for314-classic-theme .bubble,
.for314-classic-theme .msg-bubble,
.for314-classic-theme .for314-reply-bubble,
.for314-classic-theme .wid-image-bubble,
.for314-classic-theme .youtube-bubble,
.for314-classic-theme .tradingview-bubble,
.for314-classic-theme .map-bubble,
.for314-classic-theme .button-command-bubble{
  border-radius:0!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  box-shadow:inset 1px 1px 0 rgba(255,255,255,.12), inset -1px -1px 0 rgba(0,0,0,.28)!important;
}
.for314-classic-theme .message.mine .message-bubble,
.for314-classic-theme .message.mine .bubble,
.for314-classic-theme .message.mine .msg-bubble,
.for314-classic-theme .message.mine .wid-image-bubble{
  border-radius:0!important;
}
.for314-classic-theme .inputrow,
.for314-classic-theme main .inputrow{
  background:var(--for314-classic-panel)!important;
  border:1px solid var(--for314-classic-shadow)!important;
  box-shadow:inset 1px 1px 0 var(--for314-classic-hi),inset -1px -1px 0 var(--for314-classic-low)!important;
}
.for314-classic-theme .inputrow textarea#msgInput,
.for314-classic-theme .inputrow input#msgInput,
.for314-classic-theme main .inputrow textarea,
.for314-classic-theme main .inputrow input{
  border-radius:0!important;
  background:var(--for314-classic-panel-2)!important;
  border:1px solid var(--for314-classic-shadow)!important;
  box-shadow:inset 1px 1px 0 var(--for314-classic-low), inset -1px -1px 0 var(--for314-classic-hi)!important;
}
.for314-classic-theme .inputrow button,
.for314-classic-theme .inputrow #sendBtn,
.for314-classic-theme .inputrow #commandBtn,
.for314-classic-theme .inputrow .command-btn,
.for314-classic-theme .inputrow .attach-btn,
.for314-classic-theme .inputrow .camera-btn,
.for314-classic-theme .inputrow .send-btn,
.for314-classic-theme main .inputrow button{
  border-radius:0!important;
  border:1px solid var(--for314-classic-shadow)!important;
  background:var(--for314-classic-panel)!important;
  box-shadow:inset 1px 1px 0 var(--for314-classic-hi), inset -1px -1px 0 var(--for314-classic-low)!important;
}
.for314-classic-theme .inputrow button:active,
.for314-classic-theme .inputrow #sendBtn:active,
.for314-classic-theme .inputrow #commandBtn:active,
.for314-classic-theme main .inputrow button:active{
  box-shadow:inset 1px 1px 0 var(--for314-classic-low), inset -1px -1px 0 var(--for314-classic-hi)!important;
}


/* v609 — classic header is a square title strip, not a floating glass pill. */
.for314-classic-theme header.profile-compact-header{
  padding:0!important;
  margin:0!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
.for314-classic-theme header.profile-compact-header .room{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:7px 12px!important;
  border:0!important;
  border-bottom:1px solid var(--for314-classic-shadow)!important;
  border-radius:0!important;
  background:var(--for314-classic-panel)!important;
  box-shadow:inset 0 1px 0 var(--for314-classic-hi), inset 0 -1px 0 var(--for314-classic-low)!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
.for314-classic-theme main>#roomTitleText{
  left:0!important;
  right:0!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  border-left:0!important;
  border-right:0!important;
  border-radius:0!important;
  background:var(--for314-classic-panel)!important;
  border-color:var(--for314-classic-shadow)!important;
  box-shadow:inset 0 1px 0 var(--for314-classic-hi), inset 0 -1px 0 var(--for314-classic-low)!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}


/* v609 classic composer/icon/header refinements */
.for314-classic-theme .inputrow textarea#msgInput,
.for314-classic-theme .inputrow input#msgInput,
.for314-classic-theme main .inputrow textarea,
.for314-classic-theme main .inputrow input{
  color:#000!important;
  caret-color:#000!important;
}
.for314-classic-theme .inputrow textarea#msgInput::placeholder,
.for314-classic-theme .inputrow input#msgInput::placeholder,
.for314-classic-theme main .inputrow textarea::placeholder,
.for314-classic-theme main .inputrow input::placeholder{
  color:#666!important;
  opacity:1!important;
}
.for314-classic-theme .inputrow button,
.for314-classic-theme .inputrow #sendBtn,
.for314-classic-theme .inputrow #commandBtn,
.for314-classic-theme .inputrow .command-btn,
.for314-classic-theme .inputrow .attach-btn,
.for314-classic-theme .inputrow .camera-btn,
.for314-classic-theme .inputrow .send-btn{
  color:#000!important;
  filter:none!important;
  text-shadow:none!important;
}
.for314-classic-theme .inputrow button svg,
.for314-classic-theme .inputrow #sendBtn svg,
.for314-classic-theme .inputrow #commandBtn svg,
.for314-classic-theme .inputrow .command-btn svg,
.for314-classic-theme .inputrow .attach-btn svg,
.for314-classic-theme .inputrow .camera-btn svg,
.for314-classic-theme .inputrow .send-btn svg{
  color:#000!important;
  fill:#000!important;
  stroke:#000!important;
  filter:none!important;
}
.for314-classic-theme .inputrow button::before,
.for314-classic-theme .inputrow button::after,
.for314-classic-theme .inputrow #sendBtn::before,
.for314-classic-theme .inputrow #sendBtn::after,
.for314-classic-theme .inputrow #commandBtn::before,
.for314-classic-theme .inputrow #commandBtn::after{
  color:#000!important;
  text-shadow:none!important;
  filter:none!important;
}
.for314-classic-theme .inputrow #sendBtn,
.for314-classic-theme .inputrow #commandBtn,
.for314-classic-theme .inputrow .attach-btn,
.for314-classic-theme .inputrow .camera-btn{
  background:var(--for314-classic-panel)!important;
  background-image:none!important;
}
/* Replace the floating rounded room header with a square title strip in classic mode. */
.for314-classic-theme header.profile-compact-header{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  left:0!important;
  right:0!important;
  border-radius:0!important;
  background:var(--for314-classic-panel)!important;
  border:1px solid var(--for314-classic-shadow)!important;
  box-shadow:inset 1px 1px 0 var(--for314-classic-hi), inset -1px -1px 0 var(--for314-classic-low)!important;
}


/* v614 — loop-safe independent classic theme. CSS only: no JS theme forcing. */
html.for314-classic-theme,
body.for314-classic-theme{
  --for314-classic-bg:#0d1117;
  --for314-classic-stage:#0d1117;
  --for314-classic-panel:#d4d0c8;
  --for314-classic-panel-2:#efefef;
  --for314-classic-bubble:#a9a9a9;
  --for314-classic-text:#000000;
  --for314-classic-line:#666666;
  --for314-classic-hi:#ffffff;
  --for314-classic-low:#808080;
  --for314-classic-shadow:#202020;
  color-scheme:dark;
}

/* Dark base independent from the current light/dark theme. */
.for314-classic-theme,
.for314-classic-theme body,
.for314-classic-theme #multiroomShell,
.for314-classic-theme .shell-main,
.for314-classic-theme .shell-stage,
.for314-classic-theme main,
.for314-classic-theme .chat,
.for314-classic-theme .chatlog{
  background-color:var(--for314-classic-bg)!important;
  background-image:none!important;
}

/* Lightweight: remove expensive visual effects without touching responsive geometry. */
.for314-classic-theme *,
.for314-classic-theme *::before,
.for314-classic-theme *::after{
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
.for314-classic-theme #effectLayer,
.for314-classic-theme #fireworksLayer,
.for314-classic-theme #aquaLayer,
.for314-classic-theme #cloudEffectLayer,
.for314-classic-theme #kaminariLayer{
  display:none!important;
}

/* Shell tabs/title bars: classic gray + black text; no geometry overrides. */
.for314-classic-theme .tab-topbar,
.for314-classic-theme .room-tab-wrap,
.for314-classic-theme .room-tab,
.for314-classic-theme .room-tab-close,
.for314-classic-theme #scrollTabsForward,
.for314-classic-theme #toggleTools,
.for314-classic-theme #roomTools,
.for314-classic-theme #roomTools button,
.for314-classic-theme #newRoomId,
.for314-classic-theme header.profile-compact-header,
.for314-classic-theme header.profile-compact-header .room,
.for314-classic-theme main>#roomTitleText{
  background:var(--for314-classic-panel)!important;
  background-image:none!important;
  color:var(--for314-classic-text)!important;
  border-radius:0!important;
  border-color:var(--for314-classic-line)!important;
  text-shadow:none!important;
  filter:none!important;
}
.for314-classic-theme .tab-topbar *,
.for314-classic-theme .room-tab-wrap *,
.for314-classic-theme .room-tab *,
.for314-classic-theme header.profile-compact-header *,
.for314-classic-theme main>#roomTitleText *{
  color:#000!important;
  text-shadow:none!important;
  filter:none!important;
}
.for314-classic-theme .tab-topbar svg,
.for314-classic-theme .room-tab svg,
.for314-classic-theme header.profile-compact-header svg{
  color:#000!important;
  stroke:currentColor!important;
}

/* Composer: classic square controls, preserve original mobile dimensions/positions. */
.for314-classic-theme .inputrow{
  background:var(--for314-classic-panel)!important;
  background-image:none!important;
  border-radius:0!important;
}
.for314-classic-theme .inputrow #msgInput{
  background:var(--for314-classic-panel-2)!important;
  color:#000!important;
  caret-color:#000!important;
  border-radius:0!important;
}
.for314-classic-theme .inputrow #msgInput::placeholder{color:#666!important;opacity:1!important;}
.for314-classic-theme .inputrow button,
.for314-classic-theme #imageBtn,
.for314-classic-theme #commandBtn,
.for314-classic-theme #sendBtn{
  background:var(--for314-classic-panel)!important;
  background-image:none!important;
  color:#000!important;
  border-radius:0!important;
  border-color:var(--for314-classic-line)!important;
  text-shadow:none!important;
  filter:none!important;
}
.for314-classic-theme .inputrow button svg,
.for314-classic-theme #imageBtn svg{
  color:#000!important;
  stroke:currentColor!important;
  filter:none!important;
}
.for314-classic-theme #imageBtn .for314-photo-icon{fill:none!important;}
.for314-classic-theme #imageBtn .for314-photo-icon-dot{fill:#000!important;stroke:none!important;}

/* Ordinary text bubbles only. Special/glitch/content widgets keep their own design. */
.for314-classic-theme .message-bubble:not(.for314-glitch-bubble):not(.site-security-review-bubble):not(.privacy-policy-bubble):not(.for314-dot-text-bubble):not(.slide-lock-bubble):not(.youtube-bubble):not(.room-ad-bubble):not(.room-gamead-bubble):not(.gadget-bubble):not(.map-bubble):not(.tradingview-bubble):not(.speedtest-bubble):not(.button-command-bubble){
  background:var(--for314-classic-bubble)!important;
  background-image:none!important;
  color:#000!important;
  border-radius:0!important;
  border-color:#666!important;
  box-shadow:none!important;
  text-shadow:none!important;
}
.for314-classic-theme .message-bubble:not(.for314-glitch-bubble):not(.site-security-review-bubble):not(.privacy-policy-bubble):not(.for314-dot-text-bubble):not(.slide-lock-bubble):not(.youtube-bubble):not(.room-ad-bubble):not(.room-gamead-bubble):not(.gadget-bubble):not(.map-bubble):not(.tradingview-bubble):not(.speedtest-bubble):not(.button-command-bubble) *{
  color:#000!important;
  text-shadow:none!important;
}


/* =========================================================
   v615 — classic is always dark, and iOS geometry stays native
   - No JS theme forcing / no reload / no observer.
   - local-light may remain on body, but classic colors always win.
   - Repair v609 title geometry: left:0 + translateX(-50%) shifted it off-screen.
   ========================================================= */
html.for314-classic-theme,
html.for314-classic-theme body,
body.for314-classic-theme,
body.for314-classic-theme.local-light,
html.for314-classic-theme body.local-light{
  color-scheme:dark!important;
  background:#0d1117!important;
  background-image:none!important;
}

/* Force classic surfaces even when body.local-light is still present. */
html.for314-classic-theme body.local-light header.profile-compact-header,
html.for314-classic-theme body.local-light header.profile-compact-header .room,
body.for314-classic-theme.local-light header.profile-compact-header,
body.for314-classic-theme.local-light header.profile-compact-header .room,
html.for314-classic-theme body.local-light main>#roomTitleText,
body.for314-classic-theme.local-light main>#roomTitleText,
html.for314-classic-theme body.local-light main .inputrow,
body.for314-classic-theme.local-light main .inputrow{
  background:var(--for314-classic-panel)!important;
  background-image:none!important;
  color:#000!important;
  border-color:var(--for314-classic-line)!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  text-shadow:none!important;
  filter:none!important;
}
html.for314-classic-theme body.local-light main .inputrow #msgInput,
body.for314-classic-theme.local-light main .inputrow #msgInput{
  background:var(--for314-classic-panel-2)!important;
  background-image:none!important;
  color:#000!important;
  caret-color:#000!important;
  border-radius:0!important;
}
html.for314-classic-theme body.local-light main .inputrow #imageBtn,
html.for314-classic-theme body.local-light main .inputrow #commandBtn,
html.for314-classic-theme body.local-light main .inputrow #sendBtn,
body.for314-classic-theme.local-light main .inputrow #imageBtn,
body.for314-classic-theme.local-light main .inputrow #commandBtn,
body.for314-classic-theme.local-light main .inputrow #sendBtn{
  background:var(--for314-classic-panel)!important;
  background-image:none!important;
  color:#000!important;
  border-radius:0!important;
  border-color:var(--for314-classic-line)!important;
  box-shadow:inset 1px 1px 0 var(--for314-classic-hi),inset -1px -1px 0 var(--for314-classic-low)!important;
  filter:none!important;
}

/* Repair title strip geometry without changing responsive dimensions. */
html.for314-classic-theme main>#roomTitleText,
body.for314-classic-theme main>#roomTitleText{
  left:50%!important;
  right:auto!important;
  width:min(860px,calc(100vw - 28px))!important;
  max-width:calc(100vw - 28px)!important;
  transform:translateX(-50%)!important;
  box-sizing:border-box!important;
  border-radius:0!important;
}

/* Header is gray/black, but keep the original responsive width/position. */
html.for314-classic-theme header.profile-compact-header .room,
body.for314-classic-theme header.profile-compact-header .room{
  color:#000!important;
  background:var(--for314-classic-panel)!important;
  background-image:none!important;
  border-radius:0!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
html.for314-classic-theme header.profile-compact-header .room *,
body.for314-classic-theme header.profile-compact-header .room *{
  color:#000!important;
  text-shadow:none!important;
  filter:none!important;
}

/* Photo button must stay square on iPhone/iPad too. */
html.for314-classic-theme main .inputrow #imageBtn.image-btn,
body.for314-classic-theme main .inputrow #imageBtn.image-btn,
html.for314-classic-theme body.local-light main .inputrow #imageBtn.image-btn,
body.for314-classic-theme.local-light main .inputrow #imageBtn.image-btn{
  border-radius:0!important;
  clip-path:none!important;
  -webkit-clip-path:none!important;
}

@media(max-width:680px){
  html.for314-classic-theme main>#roomTitleText,
  body.for314-classic-theme main>#roomTitleText{
    left:50%!important;
    right:auto!important;
    width:calc(100vw - 18px)!important;
    max-width:calc(100vw - 18px)!important;
    transform:translateX(-50%)!important;
  }
  html.for314-classic-theme main .inputrow #imageBtn.image-btn,
  body.for314-classic-theme main .inputrow #imageBtn.image-btn{
    border-radius:0!important;
  }
}


/* =========================================================
   v616 — final classic polish
   - Win95-like photo button
   - ordinary bubbles use the same gray as the header
   - mobile header starts below the measured multiroom tab bar
   ========================================================= */

/* Stronger classic camera/photo button. Keep the existing responsive size. */
html.for314-classic-theme body main .inputrow #imageBtn.image-btn,
body.for314-classic-theme main .inputrow #imageBtn.image-btn,
html.for314-classic-theme body.local-light main .inputrow #imageBtn.image-btn,
body.for314-classic-theme.local-light main .inputrow #imageBtn.image-btn{
  border-radius:0!important;
  clip-path:none!important;
  -webkit-clip-path:none!important;
  background:#d4d0c8!important;
  background-image:none!important;
  border-top:2px solid #fff!important;
  border-left:2px solid #fff!important;
  border-right:2px solid #404040!important;
  border-bottom:2px solid #404040!important;
  box-shadow:inset 1px 1px 0 #dfdfdf,inset -1px -1px 0 #808080!important;
  color:#000!important;
  filter:none!important;
}
html.for314-classic-theme body main .inputrow #imageBtn.image-btn:active,
body.for314-classic-theme main .inputrow #imageBtn.image-btn:active{
  border-top-color:#404040!important;
  border-left-color:#404040!important;
  border-right-color:#fff!important;
  border-bottom-color:#fff!important;
  box-shadow:inset 1px 1px 0 #808080,inset -1px -1px 0 #dfdfdf!important;
}
html.for314-classic-theme body main .inputrow #imageBtn.image-btn .for314-photo-icon,
body.for314-classic-theme main .inputrow #imageBtn.image-btn .for314-photo-icon{
  color:#000!important;
  stroke:#000!important;
  fill:none!important;
  filter:none!important;
}
html.for314-classic-theme body main .inputrow #imageBtn.image-btn .for314-photo-icon-dot,
body.for314-classic-theme main .inputrow #imageBtn.image-btn .for314-photo-icon-dot{
  fill:#000!important;
  stroke:none!important;
}

/* Ordinary chat bubbles: same classic gray as the room/header bar, same for mine/theirs. */
html.for314-classic-theme body .message .message-bubble:not(.for314-glitch-bubble):not(.site-security-review-bubble):not(.privacy-policy-bubble):not(.for314-dot-text-bubble):not(.slide-lock-bubble):not(.youtube-bubble):not(.room-ad-bubble):not(.room-gamead-bubble):not(.gadget-bubble):not(.map-bubble):not(.tradingview-bubble):not(.speedtest-bubble):not(.button-command-bubble),
body.for314-classic-theme .message .message-bubble:not(.for314-glitch-bubble):not(.site-security-review-bubble):not(.privacy-policy-bubble):not(.for314-dot-text-bubble):not(.slide-lock-bubble):not(.youtube-bubble):not(.room-ad-bubble):not(.room-gamead-bubble):not(.gadget-bubble):not(.map-bubble):not(.tradingview-bubble):not(.speedtest-bubble):not(.button-command-bubble),
html.for314-classic-theme body .message.mine .message-bubble:not(.for314-glitch-bubble),
body.for314-classic-theme .message.mine .message-bubble:not(.for314-glitch-bubble){
  background:#d4d0c8!important;
  background-image:none!important;
  color:#000!important;
  border-radius:0!important;
  border:1px solid #666!important;
  box-shadow:inset 1px 1px 0 #fff,inset -1px -1px 0 #808080!important;
  text-shadow:none!important;
  filter:none!important;
}
html.for314-classic-theme body .message .message-bubble:not(.for314-glitch-bubble) *,
body.for314-classic-theme .message .message-bubble:not(.for314-glitch-bubble) *{
  color:#000!important;
  text-shadow:none!important;
  filter:none!important;
}

/* iOS/mobile multiroom: place the room header below the actual measured tab bar.
   The measured variable is written by tab-safe.js and includes the safe-area/notch. */
@media(max-width:680px){
  html.for314-multiroom-child.for314-classic-theme header.profile-compact-header{
    top:var(--for314-tab-safe-edge,var(--multiroom-tabbar-inset,35px))!important;
  }
  html.for314-multiroom-child.for314-classic-theme main>#roomTitleText{
    top:calc(var(--for314-tab-safe-edge,var(--multiroom-tabbar-inset,35px)) + 62px)!important;
  }
  html.for314-multiroom-child.for314-classic-theme main .chatlog{
    padding-top:calc(var(--for314-tab-safe-edge,var(--multiroom-tabbar-inset,35px)) + 113px + var(--for314-bookmark-offset,0px))!important;
    scroll-padding-top:calc(var(--for314-tab-safe-edge,var(--multiroom-tabbar-inset,35px)) + 113px + var(--for314-bookmark-offset,0px))!important;
  }
}


/* =========================================================
   v617 — shared classic modal / popup theme
   Goal: every ordinary modal uses the same header-gray surface,
   black text, square geometry and no expensive glass blur.
   Semantic state colors (notification switches etc.) may remain.
   ========================================================= */
html.for314-classic-theme body [role="dialog"],
body.for314-classic-theme [role="dialog"],
html.for314-classic-theme body .command-modal,
body.for314-classic-theme .command-modal,
html.for314-classic-theme body .notification-rooms-modal,
body.for314-classic-theme .notification-rooms-modal,
html.for314-classic-theme body .avatar-editor,
body.for314-classic-theme .avatar-editor,
html.for314-classic-theme body .arasi-modal,
body.for314-classic-theme .arasi-modal,
html.for314-classic-theme body .qr-content-modal,
body.for314-classic-theme .qr-content-modal,
html.for314-classic-theme body .shared-popup,
body.for314-classic-theme .shared-popup,
html.for314-classic-theme body [class*="-modal"],
body.for314-classic-theme [class*="-modal"],
html.for314-classic-theme body [class*="-popup"],
body.for314-classic-theme [class*="-popup"]{
  background:#d4d0c8!important;
  background-image:none!important;
  color:#000!important;
  border-radius:0!important;
  border-color:#5f5f5f!important;
  box-shadow:inset 1px 1px 0 #fff,inset -1px -1px 0 #808080!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  text-shadow:none!important;
  filter:none!important;
}

/* Modal headers/title bars follow the same gray title-bar language. */
html.for314-classic-theme body .command-modal-head,
body.for314-classic-theme .command-modal-head,
html.for314-classic-theme body .notification-rooms-head,
body.for314-classic-theme .notification-rooms-head,
html.for314-classic-theme body .shared-popup-head,
body.for314-classic-theme .shared-popup-head,
html.for314-classic-theme body .arasi-head,
body.for314-classic-theme .arasi-head,
html.for314-classic-theme body .qr-content-head,
body.for314-classic-theme .qr-content-head,
html.for314-classic-theme body [class*="modal-head"],
body.for314-classic-theme [class*="modal-head"],
html.for314-classic-theme body [class*="modal-title"],
body.for314-classic-theme [class*="modal-title"]{
  background:#d4d0c8!important;
  background-image:none!important;
  color:#000!important;
  border-radius:0!important;
  border-color:#808080!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  text-shadow:none!important;
}

/* Text in ordinary classic dialogs is black regardless of prior light/dark theme. */
html.for314-classic-theme body [role="dialog"] :where(h1,h2,h3,h4,h5,h6,p,span,strong,label,small,div),
body.for314-classic-theme [role="dialog"] :where(h1,h2,h3,h4,h5,h6,p,span,strong,label,small,div),
html.for314-classic-theme body [class*="-modal"] :where(h1,h2,h3,h4,h5,h6,p,span,strong,label,small,div),
body.for314-classic-theme [class*="-modal"] :where(h1,h2,h3,h4,h5,h6,p,span,strong,label,small,div){
  color:#000!important;
  text-shadow:none!important;
}

/* Ordinary cards/rows inside dialogs use a simple gray surface. */
html.for314-classic-theme body [role="dialog"] :where(.card,[class*="-card"],[class*="-row"],[class*="-item"],[class*="-panel"],[class*="-body"],[class*="-list"]),
body.for314-classic-theme [role="dialog"] :where(.card,[class*="-card"],[class*="-row"],[class*="-item"],[class*="-panel"],[class*="-body"],[class*="-list"]){
  background:#d4d0c8!important;
  background-image:none!important;
  color:#000!important;
  border-radius:0!important;
  border-color:#808080!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}

/* Inputs stay bright/legible; buttons get classic raised gray. */
html.for314-classic-theme body [role="dialog"] :where(input,textarea,select),
body.for314-classic-theme [role="dialog"] :where(input,textarea,select),
html.for314-classic-theme body [class*="-modal"] :where(input,textarea,select),
body.for314-classic-theme [class*="-modal"] :where(input,textarea,select){
  background:#fff!important;
  background-image:none!important;
  color:#000!important;
  caret-color:#000!important;
  border-radius:0!important;
  border:1px solid #404040!important;
  box-shadow:inset 1px 1px 0 #808080,inset -1px -1px 0 #fff!important;
}
html.for314-classic-theme body [role="dialog"] :where(input,textarea)::placeholder,
body.for314-classic-theme [role="dialog"] :where(input,textarea)::placeholder{
  color:#666!important;
  opacity:1!important;
}
html.for314-classic-theme body [role="dialog"] button:not(.header-notification-switch):not([role="switch"]),
body.for314-classic-theme [role="dialog"] button:not(.header-notification-switch):not([role="switch"]),
html.for314-classic-theme body [class*="-modal"] button:not(.header-notification-switch):not([role="switch"]),
body.for314-classic-theme [class*="-modal"] button:not(.header-notification-switch):not([role="switch"]){
  background:#d4d0c8!important;
  background-image:none!important;
  color:#000!important;
  border-radius:0!important;
  border-top:2px solid #fff!important;
  border-left:2px solid #fff!important;
  border-right:2px solid #404040!important;
  border-bottom:2px solid #404040!important;
  box-shadow:inset 1px 1px 0 #dfdfdf,inset -1px -1px 0 #808080!important;
  text-shadow:none!important;
  filter:none!important;
}

/* Classic overlays are cheap: no glass blur. */
html.for314-classic-theme body :where([class*="backdrop"],[class*="overlay"]),
body.for314-classic-theme :where([class*="backdrop"],[class*="overlay"]){
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}


/* =========================================================
   v618 — strict classic palette override
   - ignore room/personal composer colors while classic is active
   - ordinary bubbles use the classic header gray
   - command list + media/image attachment flows use the same palette
   ========================================================= */
html.for314-classic-theme,
html.for314-classic-theme body,
body.for314-classic-theme{
  --for314-room-accent:#d4d0c8!important;
  --for314-room-accent-rgb:212,208,200!important;
  --for314-room-send-fg:#000!important;
  --for314-composer-bg:#d4d0c8!important;
  --for314-composer-fg:#000!important;
  --for314-composer-border:#404040!important;
}

/* Composer: room color / personal bar color never wins in classic mode. */
html.for314-classic-theme body main .inputrow,
body.for314-classic-theme main .inputrow{
  background:#d4d0c8!important;
  background-image:none!important;
  border:1px solid #404040!important;
  border-radius:0!important;
  box-shadow:inset 1px 1px 0 #fff,inset -1px -1px 0 #808080!important;
  filter:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
html.for314-classic-theme body main .inputrow #msgInput,
body.for314-classic-theme main .inputrow #msgInput{
  background:#fff!important;
  background-image:none!important;
  color:#000!important;
  caret-color:#000!important;
  border:1px solid #404040!important;
  border-radius:0!important;
  box-shadow:inset 1px 1px 0 #808080,inset -1px -1px 0 #fff!important;
}
html.for314-classic-theme body main .inputrow #msgInput::placeholder,
body.for314-classic-theme main .inputrow #msgInput::placeholder{
  color:#666!important;
  opacity:1!important;
}
html.for314-classic-theme body main .inputrow :is(#imageBtn,#commandBtn,#sendBtn,button),
body.for314-classic-theme main .inputrow :is(#imageBtn,#commandBtn,#sendBtn,button){
  background:#d4d0c8!important;
  background-image:none!important;
  color:#000!important;
  border-radius:0!important;
  border-top:2px solid #fff!important;
  border-left:2px solid #fff!important;
  border-right:2px solid #404040!important;
  border-bottom:2px solid #404040!important;
  box-shadow:inset 1px 1px 0 #dfdfdf,inset -1px -1px 0 #808080!important;
  text-shadow:none!important;
  filter:none!important;
}
html.for314-classic-theme body main .inputrow :is(#imageBtn,#commandBtn,#sendBtn,button) *,
body.for314-classic-theme main .inputrow :is(#imageBtn,#commandBtn,#sendBtn,button) *{
  color:#000!important;
  text-shadow:none!important;
  filter:none!important;
}

/* Pending image attachment tray: classic from end to end. */
html.for314-classic-theme body main .inputrow .paste-image-tray,
body.for314-classic-theme main .inputrow .paste-image-tray,
html.for314-classic-theme body .paste-image-chip,
body.for314-classic-theme .paste-image-chip{
  background:#d4d0c8!important;
  background-image:none!important;
  color:#000!important;
  border-radius:0!important;
  border-color:#606060!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
html.for314-classic-theme body :is(.paste-image-tray-head,.paste-image-number,.paste-image-clear,.paste-image-remove),
body.for314-classic-theme :is(.paste-image-tray-head,.paste-image-number,.paste-image-clear,.paste-image-remove){
  color:#000!important;
  text-shadow:none!important;
}

/* Ordinary message bubbles: same palette for sent/received. Special-effect bubbles are excluded. */
html.for314-classic-theme body .message .message-bubble:not(.for314-glitch-bubble):not(.site-security-review-bubble):not(.privacy-policy-bubble):not(.for314-dot-text-bubble):not(.slide-lock-bubble):not(.youtube-bubble):not(.room-ad-bubble):not(.room-gamead-bubble):not(.gadget-bubble):not(.map-bubble):not(.tradingview-bubble):not(.speedtest-bubble):not(.button-command-bubble),
body.for314-classic-theme .message .message-bubble:not(.for314-glitch-bubble):not(.site-security-review-bubble):not(.privacy-policy-bubble):not(.for314-dot-text-bubble):not(.slide-lock-bubble):not(.youtube-bubble):not(.room-ad-bubble):not(.room-gamead-bubble):not(.gadget-bubble):not(.map-bubble):not(.tradingview-bubble):not(.speedtest-bubble):not(.button-command-bubble),
html.for314-classic-theme body .image-message-bubble,
body.for314-classic-theme .image-message-bubble,
html.for314-classic-theme body .video-message-bubble,
body.for314-classic-theme .video-message-bubble{
  background:#d4d0c8!important;
  background-image:none!important;
  color:#000!important;
  border-radius:0!important;
  border:1px solid #606060!important;
  box-shadow:inset 1px 1px 0 #fff,inset -1px -1px 0 #808080!important;
  text-shadow:none!important;
  filter:none!important;
}
html.for314-classic-theme body .message .message-bubble:not(.for314-glitch-bubble) *,
body.for314-classic-theme .message .message-bubble:not(.for314-glitch-bubble) *{
  color:#000!important;
  text-shadow:none!important;
  filter:none!important;
}

/* Command list: explicitly override its dark modern panel/card theme. */
html.for314-classic-theme body #commandModalBackdrop .command-modal,
body.for314-classic-theme #commandModalBackdrop .command-modal,
html.for314-classic-theme body #commandModalBackdrop .command-modal-head,
body.for314-classic-theme #commandModalBackdrop .command-modal-head,
html.for314-classic-theme body #commandModalBackdrop .command-modal-list,
body.for314-classic-theme #commandModalBackdrop .command-modal-list,
html.for314-classic-theme body #commandModalBackdrop :is(.command-row,.command-item,.command-panel,[class*="command-category"],[class*="command-section"]),
body.for314-classic-theme #commandModalBackdrop :is(.command-row,.command-item,.command-panel,[class*="command-category"],[class*="command-section"]){
  background:#d4d0c8!important;
  background-image:none!important;
  color:#000!important;
  border-radius:0!important;
  border-color:#707070!important;
  box-shadow:none!important;
  text-shadow:none!important;
  filter:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
html.for314-classic-theme body #commandModalBackdrop *,
body.for314-classic-theme #commandModalBackdrop *{
  color:#000!important;
  text-shadow:none!important;
  filter:none!important;
}
html.for314-classic-theme body #commandModalBackdrop button,
body.for314-classic-theme #commandModalBackdrop button{
  background:#d4d0c8!important;
  background-image:none!important;
  color:#000!important;
  border-radius:0!important;
  border-top:2px solid #fff!important;
  border-left:2px solid #fff!important;
  border-right:2px solid #404040!important;
  border-bottom:2px solid #404040!important;
  box-shadow:inset 1px 1px 0 #dfdfdf,inset -1px -1px 0 #808080!important;
}
html.for314-classic-theme body #commandModalBackdrop input,
body.for314-classic-theme #commandModalBackdrop input{
  background:#fff!important;
  color:#000!important;
  border-radius:0!important;
  border:1px solid #404040!important;
}

/* Photo / video chooser. */
html.for314-classic-theme body .media-choice-sheet,
body.for314-classic-theme .media-choice-sheet,
html.for314-classic-theme body .media-choice-actions,
body.for314-classic-theme .media-choice-actions{
  background:#d4d0c8!important;
  background-image:none!important;
  color:#000!important;
  border-radius:0!important;
  border-color:#606060!important;
  box-shadow:inset 1px 1px 0 #fff,inset -1px -1px 0 #808080!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
html.for314-classic-theme body :is(.media-choice-title,.media-choice-sub),
body.for314-classic-theme :is(.media-choice-title,.media-choice-sub){
  color:#000!important;
  text-shadow:none!important;
}
html.for314-classic-theme body .media-choice-btn,
body.for314-classic-theme .media-choice-btn{
  background:#d4d0c8!important;
  background-image:none!important;
  color:#000!important;
  border-radius:0!important;
  border-top:2px solid #fff!important;
  border-left:2px solid #fff!important;
  border-right:2px solid #404040!important;
  border-bottom:2px solid #404040!important;
  box-shadow:inset 1px 1px 0 #dfdfdf,inset -1px -1px 0 #808080!important;
}

/* Image/video posting-rules confirmation dialog. */
html.for314-classic-theme body .moderation-confirm-card,
body.for314-classic-theme .moderation-confirm-card,
html.for314-classic-theme body :is(.moderation-confirm-title,.moderation-confirm-text,.moderation-confirm-note,.moderation-confirm-actions),
body.for314-classic-theme :is(.moderation-confirm-title,.moderation-confirm-text,.moderation-confirm-note,.moderation-confirm-actions){
  background:#d4d0c8!important;
  background-image:none!important;
  color:#000!important;
  border-radius:0!important;
  border-color:#606060!important;
  box-shadow:none!important;
  text-shadow:none!important;
  filter:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
html.for314-classic-theme body .moderation-confirm-actions button,
body.for314-classic-theme .moderation-confirm-actions button,
html.for314-classic-theme body .moderation-confirm-actions .moderation-confirm-ok.upload-ok,
body.for314-classic-theme .moderation-confirm-actions .moderation-confirm-ok.upload-ok{
  background:#d4d0c8!important;
  background-image:none!important;
  color:#000!important;
  border-radius:0!important;
  border-top:2px solid #fff!important;
  border-left:2px solid #fff!important;
  border-right:2px solid #404040!important;
  border-bottom:2px solid #404040!important;
  box-shadow:inset 1px 1px 0 #dfdfdf,inset -1px -1px 0 #808080!important;
}


/* =========================================================
   v620 — safe three-theme presentation: light / dark / classic
   Classic ignores normal theme/color modes; wallpaper is preserved.
   ========================================================= */
html.for314-classic-theme,
html.for314-classic-theme body,
body.for314-classic-theme{
  color-scheme:dark!important;
  --for314-classic-bg:#0d1117!important;
  --for314-classic-stage:#0d1117!important;
  --for314-classic-panel:#d4d0c8!important;
  --for314-classic-panel-2:#ffffff!important;
  --for314-classic-line:#606060!important;
  --for314-classic-hi:#ffffff!important;
  --for314-classic-low:#808080!important;
  --for314-classic-shadow:#202020!important;
  --for314-room-accent:#d4d0c8!important;
  --for314-room-accent-rgb:212,208,200!important;
  --for314-room-send-fg:#000!important;
  --for314-composer-bg:#d4d0c8!important;
  --for314-composer-fg:#000!important;
  --for314-message-text-color:#000!important;
}

/* Keep wallpaper, but classic owns every ordinary UI surface above it. */
html.for314-classic-theme body,
body.for314-classic-theme{
  color:#000;
}
html.for314-classic-theme body :where(header,.inputrow,[role="dialog"],[class*="modal"],[class*="popup"],[class*="sheet"],[class*="panel"],[class*="bookmark"],[class*="command"]),
body.for314-classic-theme :where(header,.inputrow,[role="dialog"],[class*="modal"],[class*="popup"],[class*="sheet"],[class*="panel"],[class*="bookmark"],[class*="command"]){
  --for314-message-text-color:#000!important;
}

/* Ordinary chat is always classic, regardless of room color, sender side, rtxt, etc. */
html.for314-classic-theme body :where(.message-bubble,.msg-bubble,.bubble,.for314-reply-bubble):not(.for314-glitch-bubble):not(.site-security-review-bubble):not(.privacy-policy-bubble):not(.for314-dot-text-bubble):not(.slide-lock-bubble):not(.youtube-bubble):not(.room-ad-bubble):not(.room-gamead-bubble):not(.gadget-bubble):not(.map-bubble):not(.tradingview-bubble):not(.speedtest-bubble):not(.button-command-bubble),
body.for314-classic-theme :where(.message-bubble,.msg-bubble,.bubble,.for314-reply-bubble):not(.for314-glitch-bubble):not(.site-security-review-bubble):not(.privacy-policy-bubble):not(.for314-dot-text-bubble):not(.slide-lock-bubble):not(.youtube-bubble):not(.room-ad-bubble):not(.room-gamead-bubble):not(.gadget-bubble):not(.map-bubble):not(.tradingview-bubble):not(.speedtest-bubble):not(.button-command-bubble),
html.for314-classic-theme body :where(.image-message-bubble,.video-message-bubble),
body.for314-classic-theme :where(.image-message-bubble,.video-message-bubble){
  background:#d4d0c8!important;
  background-image:none!important;
  color:#000!important;
  border-radius:0!important;
  border:1px solid #606060!important;
  box-shadow:inset 1px 1px 0 #fff,inset -1px -1px 0 #808080!important;
  text-shadow:none!important;
  filter:none!important;
  animation:none!important;
}
html.for314-classic-theme body :where(.message-bubble,.msg-bubble,.bubble,.for314-reply-bubble,.image-message-bubble,.video-message-bubble):not(.for314-glitch-bubble) *,
body.for314-classic-theme :where(.message-bubble,.msg-bubble,.bubble,.for314-reply-bubble,.image-message-bubble,.video-message-bubble):not(.for314-glitch-bubble) *{
  color:#000!important;
  -webkit-text-fill-color:#000!important;
  text-shadow:none!important;
  background-image:none!important;
  filter:none!important;
  animation:none!important;
}

/* Metadata / names / timestamps are black in classic too. */
html.for314-classic-theme body :where(.message-meta,.message-name,.message-time,.reply-preview,.reply-name,.reply-quote),
body.for314-classic-theme :where(.message-meta,.message-name,.message-time,.reply-preview,.reply-name,.reply-quote){
  color:#000!important;
  -webkit-text-fill-color:#000!important;
  text-shadow:none!important;
  filter:none!important;
}

/* Disable rtxt/rainbow/personal text visual modes while classic is active without deleting saved settings. */
html.for314-classic-theme body :where([class*="rtxt"],[class*="rainbow"],[class*="personal-color"],[class*="personal-rainbow"]),
body.for314-classic-theme :where([class*="rtxt"],[class*="rainbow"],[class*="personal-color"],[class*="personal-rainbow"]){
  color:#000!important;
  -webkit-text-fill-color:#000!important;
  background-image:none!important;
  text-shadow:none!important;
  filter:none!important;
  animation:none!important;
}

/* Classic composer is absolute: room/bar colors cannot leak in. */
html.for314-classic-theme body main .inputrow,
body.for314-classic-theme main .inputrow{
  background:#d4d0c8!important;
  background-image:none!important;
  border-color:#404040!important;
  box-shadow:inset 1px 1px 0 #fff,inset -1px -1px 0 #808080!important;
}
html.for314-classic-theme body main .inputrow #msgInput,
body.for314-classic-theme main .inputrow #msgInput{
  background:#fff!important;
  background-image:none!important;
  color:#000!important;
  -webkit-text-fill-color:#000!important;
  caret-color:#000!important;
}
html.for314-classic-theme body main .inputrow :where(button,#imageBtn,#commandBtn,#sendBtn),
body.for314-classic-theme main .inputrow :where(button,#imageBtn,#commandBtn,#sendBtn){
  background:#d4d0c8!important;
  background-image:none!important;
  color:#000!important;
  border-radius:0!important;
  text-shadow:none!important;
  filter:none!important;
}

/* Generic modal text is black; semantic status switches may keep their colors. */
html.for314-classic-theme body :where([role="dialog"],[class*="modal"],[class*="popup"],[class*="sheet"],[class*="bookmark"],[class*="command"]) :where(h1,h2,h3,h4,p,span,strong,label,small,div),
body.for314-classic-theme :where([role="dialog"],[class*="modal"],[class*="popup"],[class*="sheet"],[class*="bookmark"],[class*="command"]) :where(h1,h2,h3,h4,p,span,strong,label,small,div){
  color:#000!important;
  -webkit-text-fill-color:#000!important;
  text-shadow:none!important;
}

/* =========================================================
   v621 — strict classic bubble override
   - classic wins over bubblecolor/textcolor/room color
   - sent and received text bubbles use the same classic gray
   - reply quote areas inside bubbles also use classic gray
   - ordinary bubble text and metadata are black
   ========================================================= */
html.for314-classic-theme,
html.for314-classic-theme body,
body.for314-classic-theme{
  --for314-classic-bubble-flat:#d4d0c8!important;
  --for314-classic-bubble-edge:#606060!important;
  --for314-chat-bubble-color:#d4d0c8!important;
  --for314-chat-text-color:#000!important;
}

/* Even when bubblecolor/textcolor modes are active, classic stays in control. */
html.for314-classic-theme.for314-bubblecolor-active body .chatlog .message-bubble:not(.for314-glitch-bubble):not(.site-security-review-bubble):not(.privacy-policy-bubble):not(.for314-dot-text-bubble):not(.slide-lock-bubble):not(.youtube-bubble):not(.room-ad-bubble):not(.room-gamead-bubble):not(.gadget-bubble):not(.map-bubble):not(.tradingview-bubble):not(.speedtest-bubble):not(.button-command-bubble),
html.for314-classic-theme.for314-textcolor-active body .chatlog .message-bubble:not(.for314-glitch-bubble):not(.site-security-review-bubble):not(.privacy-policy-bubble):not(.for314-dot-text-bubble):not(.slide-lock-bubble):not(.youtube-bubble):not(.room-ad-bubble):not(.room-gamead-bubble):not(.gadget-bubble):not(.map-bubble):not(.tradingview-bubble):not(.speedtest-bubble):not(.button-command-bubble),
html.for314-classic-theme body .chatlog .message-bubble:not(.for314-glitch-bubble):not(.site-security-review-bubble):not(.privacy-policy-bubble):not(.for314-dot-text-bubble):not(.slide-lock-bubble):not(.youtube-bubble):not(.room-ad-bubble):not(.room-gamead-bubble):not(.gadget-bubble):not(.map-bubble):not(.tradingview-bubble):not(.speedtest-bubble):not(.button-command-bubble),
body.for314-classic-theme .chatlog .message-bubble:not(.for314-glitch-bubble):not(.site-security-review-bubble):not(.privacy-policy-bubble):not(.for314-dot-text-bubble):not(.slide-lock-bubble):not(.youtube-bubble):not(.room-ad-bubble):not(.room-gamead-bubble):not(.gadget-bubble):not(.map-bubble):not(.tradingview-bubble):not(.speedtest-bubble):not(.button-command-bubble),
html.for314-classic-theme body .chatlog .msg-bubble,
body.for314-classic-theme .chatlog .msg-bubble,
html.for314-classic-theme body .chatlog .bubble,
body.for314-classic-theme .chatlog .bubble,
html.for314-classic-theme body .chatlog .for314-reply-bubble,
body.for314-classic-theme .chatlog .for314-reply-bubble,
html.for314-classic-theme body .chatlog .message.mine .message-bubble,
body.for314-classic-theme .chatlog .message.mine .message-bubble,
html.for314-classic-theme body .chatlog .message:not(.mine) .message-bubble,
body.for314-classic-theme .chatlog .message:not(.mine) .message-bubble{
  background:#d4d0c8!important;
  background-color:#d4d0c8!important;
  background-image:none!important;
  color:#000!important;
  -webkit-text-fill-color:#000!important;
  border:1px solid #606060!important;
  border-radius:0!important;
  box-shadow:inset 1px 1px 0 #fff,inset -1px -1px 0 #808080!important;
  text-shadow:none!important;
  filter:none!important;
  animation:none!important;
}

/* Inside ordinary bubbles, kill per-room / rainbow / rtxt paint. */
html.for314-classic-theme body .chatlog .message-bubble:not(.for314-glitch-bubble):not(.site-security-review-bubble):not(.privacy-policy-bubble):not(.for314-dot-text-bubble):not(.slide-lock-bubble):not(.youtube-bubble):not(.room-ad-bubble):not(.room-gamead-bubble):not(.gadget-bubble):not(.map-bubble):not(.tradingview-bubble):not(.speedtest-bubble):not(.button-command-bubble) *,
body.for314-classic-theme .chatlog .message-bubble:not(.for314-glitch-bubble):not(.site-security-review-bubble):not(.privacy-policy-bubble):not(.for314-dot-text-bubble):not(.slide-lock-bubble):not(.youtube-bubble):not(.room-ad-bubble):not(.room-gamead-bubble):not(.gadget-bubble):not(.map-bubble):not(.tradingview-bubble):not(.speedtest-bubble):not(.button-command-bubble) *,
html.for314-classic-theme body .chatlog .msg-bubble *,
body.for314-classic-theme .chatlog .msg-bubble *,
html.for314-classic-theme body .chatlog .bubble *,
body.for314-classic-theme .chatlog .bubble *,
html.for314-classic-theme body .chatlog .for314-reply-bubble *,
body.for314-classic-theme .chatlog .for314-reply-bubble *{
  color:#000!important;
  -webkit-text-fill-color:#000!important;
  background-image:none!important;
  text-shadow:none!important;
  filter:none!important;
  animation:none!important;
}

/* Reply quote block inside reply bubbles should also be classic, not dark/blue. */
html.for314-classic-theme body .chatlog :is(.for314-reply-quote-card,.reply-preview,.reply-quote,.reply-card),
body.for314-classic-theme .chatlog :is(.for314-reply-quote-card,.reply-preview,.reply-quote,.reply-card){
  background:#d4d0c8!important;
  background-color:#d4d0c8!important;
  background-image:none!important;
  color:#000!important;
  -webkit-text-fill-color:#000!important;
  border:1px solid #8a8a8a!important;
  border-left:4px solid #606060!important;
  border-radius:0!important;
  box-shadow:none!important;
  text-shadow:none!important;
  filter:none!important;
}
html.for314-classic-theme body .chatlog :is(.for314-reply-quote-card,.reply-preview,.reply-quote,.reply-card) *,
body.for314-classic-theme .chatlog :is(.for314-reply-quote-card,.reply-preview,.reply-quote,.reply-card) *,
html.for314-classic-theme body .chatlog :is(.for314-reply-quote-name,.for314-reply-quote-text,.for314-reply-body,.reply-name,.reply-quote-text),
body.for314-classic-theme .chatlog :is(.for314-reply-quote-name,.for314-reply-quote-text,.for314-reply-body,.reply-name,.reply-quote-text){
  color:#000!important;
  -webkit-text-fill-color:#000!important;
  text-shadow:none!important;
  filter:none!important;
}

/* Meta text around ordinary messages stays black in classic mode. */
html.for314-classic-theme body .chatlog :is(.message-meta,.message-meta *, .message-name,.message-name *, .message-time,.message-time *, .muted),
body.for314-classic-theme .chatlog :is(.message-meta,.message-meta *, .message-name,.message-name *, .message-time,.message-time *, .muted){
  color:#000!important;
  -webkit-text-fill-color:#000!important;
  text-shadow:none!important;
  filter:none!important;
}
