/* Classic has one light interface base. Wallpaper remains a separate layer;
   text, accents, masks, shadows and disabled states keep their own semantics. */
:root { --surface-popup:#FFFFFF; --surface-input:#F8FAFC; }
html :is(.group-box,.settings-menu,.settings-us-card,.mc-card,.mc-mbox,
  .home-date-card,.space-list,.space-empty,.note-card,.diary-entry,
  .resident-hero,.resident-card,.resident-editor,.codex-quota,.classic-editor-box,
  .classic-scheme-card,.persona-library-card,.message-detail-grid,.process-result-box,
  .voice-card,.pending-file,.icon-btn,.chat-head-actions,.chat-list-actions,
  .chat-list-search-field,.mc-filter,.mc-bar,#settings-nav,.round-btn) {
  background:var(--page-card) !important; border-color:var(--page-line) !important;
  box-shadow:0 5px 20px #0000000a;
}
html :is(.popover-card,.confirm-card,.model-picker-card,.sheet-card,
  .modal:not(#settings) .modal-card,.classic-name-card,.classic-scheme-menu,
  .codex-approval[data-pending="true"]) {
  background:var(--surface-popup) !important; border:1px solid var(--page-line) !important;
}
html :is(.floating-controls,.conversation-panel-head,#settings .sheet-head) {
  background:var(--page-bg) !important;
}
html .floating-controls::before { display:none !important; }
html #bottom-nav { background:var(--page-card) !important; border:1px solid var(--page-line) !important; }
html #bottom-nav .bottom-nav-item.is-on { background:var(--page-accent-soft) !important; }
html :is(.recent.is-on,.mc-row.on) { background:var(--page-accent-soft) !important; }
html #view-chat .composer,
html[data-settings-surface="classic-editor"] .classic-preview-composer {
  background:var(--surface-input) !important; border:1px solid var(--page-line) !important;
}
html[data-settings-surface="classic-editor"] .classic-live-preview {
  background:var(--page-bg) !important;
}
html :is(#thread .msg-user,.classic-preview-line.user) { --solid-bubble:var(--classic-user-bg); }
html :is(#thread .assistant-reply,.classic-preview-line.assistant) { --solid-bubble:var(--classic-assistant-bg); }
html :is(#thread .chat-bubble,#thread .assistant-reply .body,.classic-preview-bubble) {
  background:var(--solid-bubble,var(--page-card)) !important; border-color:var(--page-line) !important;
}
html :is(#thread .chat-bubble,#thread .assistant-reply .body,.classic-preview-bubble) > .sh { visibility:visible !important; }
html :is(.home-preview-date,.home-preview-card,.home-wallpaper-preview>i) { background:var(--page-card); }

/* Editor geometry retained from the old material stylesheet. */
/* One scrolling editor. Its sample surfaces use the live chat renderer. */
html[data-settings-surface="classic-editor"] .classic-editor-fixed { position:relative; top:auto; background:transparent; }
html[data-settings-surface="classic-editor"] .classic-editor-final .classic-live-preview {
  height:282px; margin:8px 14px 16px; background:transparent;
  box-shadow:0 0 0 1px var(--page-line); color:var(--page-text);
}
html[data-settings-surface="classic-editor"] .classic-live-preview::before,
html[data-settings-surface="classic-editor"] .classic-live-preview::after { display:none; }
html[data-settings-surface="classic-editor"] .classic-preview-head {
  display:flex; justify-content:space-between; gap:12px; height:44px; color:var(--page-text);
}
html[data-settings-surface="classic-editor"] .classic-preview-head button {
  min-height:44px; color:inherit; background:var(--page-card);
  border:1px solid var(--page-line); }
html[data-settings-surface="classic-editor"] .classic-editor-tabs {
  position:relative; top:auto; background:transparent;
}
/* The preview and options move together, so no option sits under a pinned slab. */
html[data-settings-surface="classic-editor"] .classic-editor-content { padding-top:4px; }
html[data-settings-surface="classic-editor"] .classic-preview-composer {
  position:absolute;
  grid-template-columns:36px minmax(0,1fr) 36px 36px; gap:2px; height:48px;
  border-radius:26px; padding:2px 6px; color:var(--page-text);
  background:var(--surface-input) !important;
  }
html[data-settings-surface="classic-editor"] .classic-preview-composer :is(b,span,i,em) {
  position:relative; z-index:1; display:flex; align-items:center; justify-content:center;
  height:36px; width:auto; margin:0; padding:0; color:inherit; font-style:normal;
  background:transparent; }
html[data-settings-surface="classic-editor"] .classic-preview-composer span { justify-content:flex-start; font-size:14px; opacity:.6; }
html[data-settings-surface="classic-editor"] .classic-preview-composer em { border-radius:50%; color:var(--page-bg); background:var(--page-text) !important; }
html[data-settings-surface="classic-editor"] .classic-preview-bubble.classic-prose { padding:12px 16px; border-radius:20px; }
/* Keep one native scroll container when the keyboard appears as well. */
html.keyboard-open[data-settings-surface="classic-editor"] #settings .modal-body { display:block; overflow-y:auto; }
html.keyboard-open[data-settings-surface="classic-editor"] #settings .classic-editor-final { display:block; overflow:visible; }
html.keyboard-open[data-settings-surface="classic-editor"] .classic-editor-content { overflow:visible; }
html.keyboard-open[data-settings-surface="classic-editor"] .classic-editor-final .classic-live-preview { height:var(--editor-preview-height,180px); }
@media(max-height:600px) { html[data-settings-surface="classic-editor"] .classic-editor-final .classic-live-preview { height:252px; } }

#bottom-nav { overflow:hidden; isolation:isolate; }
#bottom-nav > .bottom-nav-item { z-index:1; }
#bottom-nav .bottom-nav-item:focus-visible { outline:2px solid var(--page-text); outline-offset:-3px; }
@media(prefers-reduced-motion:reduce) { #bottom-nav .bottom-nav-item { transition:none; transform:none; } }
#thread .assistant-reply .body:not(.bub) { border-radius:20px; padding:12px 16px; }
