/* Flat, opaque chrome. Layout, native focus, media and motion keep their owners. */
:root,html[data-ghost-theme][data-theme]{
  --ethereal-panel:#fff;--ethereal-strong:#fff;--ethereal-soft:#e8e8e6;
  --ethereal-shadow:none;--ethereal-control-fill:#212121;
  --opaque-panel:#fff;--opaque-field:#efefed;--opaque-secondary:#e8e8e6;
}
html[data-ghost-theme][data-theme='dark'],html[data-theme='dark']{
  --ethereal-panel:#212121;--ethereal-strong:#212121;--ethereal-soft:#2b2b2b;
  --opaque-panel:#212121;--opaque-field:#2b2b2b;--opaque-secondary:#2b2b2b;
}
html[data-social-theme][data-social-mode] :is(.ghost-social,.social-dialog,.social-call-root,.social-call-bar,.social-call-incoming,.social-gif-picker){
  --social-panel:var(--opaque-panel);--social-raised:var(--opaque-panel);
  --social-soft:var(--opaque-secondary);--social-shadow:none;--social-card-shadow:none;
}

/* No interface surface samples or refracts the page behind it. This does not
   touch filter, SVG strokes or the separate neutral metal background canvas. */
html body:is(.ethereal-app,.ethereal-home),
html body:is(.ethereal-app,.ethereal-home) *,
html body:is(.ethereal-app,.ethereal-home) *::before,
html body:is(.ethereal-app,.ethereal-home) *::after,
html body:is(.ethereal-app,.ethereal-home) dialog::backdrop{
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
}

/* Working panels are mode-aware opaque planes; layout-only wrappers stay bare. */
html body:is(.ethereal-app,.ethereal-home) :is(
  .topbar,.home-header,.search,.mobile-navigation,#reader-control-panel,
  .reader-space-panel,.post-card,.profile-card,.profile-header,.follow-row,.empty-state,
  .pawchive-creator-card,.pawchive-profile,#notice,
  .social-app-rail,.social-sidebar,.social-main,.social-header,#social-dm-header,.stage-header,
  .social-card,.social-profile-card,.social-profile-editor,.stage-room-card,
  .social-call-bar,.social-call-incoming,.social-gif-picker,.social-status-menu,.social-account-menu,
  .ghost-select-menu,.ghost-date-panel,.search-suggestions,.notification-center,
  .nc-preference-card,.nc-preference-link,.social-theme-card,.social-liquid-control,
  dialog:not(:where(#vertical-dialog,#gallery-dialog,.social-media-dialog,.social-screen-dialog))
){
  background-color:var(--opaque-panel)!important;background-image:none!important;
  border:0!important;box-shadow:none!important;
}
html body.ethereal-app .reader-space::details-content{
  background-color:var(--opaque-panel)!important;background-image:none!important;
  border:0!important;box-shadow:none!important;
}
html body.ethereal-app #search-form.search{background-color:var(--opaque-field)!important}
/* Fine field edges are intentional affordances in the current opaque style. */
html body.ethereal-app #search-form.search{border:1px solid var(--ethereal-line)!important}
html body.ethereal-app :is(#reader-navigation-bar,.reader-pages-footer) .reader-page-jump input{border:1px solid var(--ethereal-line)}
html body:is(.ethereal-app,.ethereal-home) :is(.topbar,.home-header){border-radius:16px}
html body:is(.ethereal-app,.ethereal-home) :is(.ghost-select-trigger,.ghost-date-field,.social-input,.social-textarea,.social-select){
  background-color:var(--opaque-field)!important;border:0!important;box-shadow:none!important;
}

/* Selected controls supply --opaque-tint/image/ink through the existing theme
   owner. Unselected pills use the charcoal of the supplied Enter reference. */
html body:is(.ethereal-app,.ethereal-home) :is(
  .primary-button,.secondary-button,.follow-button,.donation-button,.icon-button,
  .platform-icon-button,.account-button,.theme-toggle,.adult-lock-button,.reader-space-summary,.source-explore-summary,
  .ghost-select-trigger,.layout-toggle button,.reader-mode-toggle>button,
  .reader-page-navigation button,#reader-size-reset,
  .vertical-mode button,.vertical-icon-button,.vertical-youtube-controls,.vertical-entry,.vertical-restore-controls,
  .sidebar .nav-item,.sidebar .source-choice,.mobile-more-dialog .source-choice,.mobile-nav-button,.mobile-more-link,
  .social-button,.social-icon-button,.social-rail-button,.social-theme-mode>button,
  .nc-icon-button,.nc-pill,.sc-icon-button,.sc-secondary,.sc-primary,.button
):not(:where(.danger,.is-danger,.danger-button,[data-danger],[data-destructive],[data-social-action*='delete'],[data-social-action*='block'],[data-social-action*='remove'],[data-social-action*='hangup'],[data-cinema-action='stop'],[data-privacy-action^='confirm-'],#confirm-clear-history)){
  background-color:var(--opaque-tint,#212121)!important;
  background-image:var(--opaque-image,none)!important;
  color:var(--opaque-ink,#fff)!important;
  border:0!important;box-shadow:none!important;text-shadow:none!important;
}
html body.ethereal-app :is(.layout-toggle,.reader-mode-toggle,.vertical-mode,.social-theme-mode,.ai-filter){
  background:#212121!important;color:#fff!important;border:0!important;box-shadow:none!important;
}
html body:is(.ethereal-app,.ethereal-home) :is(button,.button,.reader-space-summary,.source-explore-summary):hover:not(:disabled):not([aria-disabled='true']):not(:where(.active,.is-active,.selected,.liked,.is-saved,[aria-pressed='true'],[aria-checked='true'],[aria-selected='true'],[aria-current],[aria-expanded='true'])){--opaque-tint:#2b2b2b}
html body.ethereal-app :is(.secondary-button,.social-button,.platform-icon-button,.sidebar .nav-item,.sidebar .source-choice) :is(small,.count,.social-settings-theme-current,.source-label,.source-badge){color:inherit!important}

/* Remove decorative rims without erasing focus or semantic presence marks. */
html body:is(.ethereal-app,.ethereal-home) :is(button,.button,.social-theme-preview,.social-theme-selected,.ghost-select-option,.suggestion-option,.social-thread,.social-channel){box-shadow:none!important;text-shadow:none!important}
html body:is(.ethereal-app,.ethereal-home) :is(button,.button,.social-theme-preview,.social-theme-selected){border:0!important}
html body.ethereal-app .social-theme-card[aria-pressed='true']:not(:focus-visible){outline:none!important}
html body.ethereal-app :is(.ghost-select-option,.suggestion-option,.social-thread,.social-channel):not([aria-selected='true']):not(.active):hover{background-color:var(--opaque-secondary)}

/* Media menus stay on their established dark plane, with sharp media pixels. */
html body.ethereal-app :is(.ghost-player-menu,.ghost-player-scrub-preview,.vertical-settings-popover,.vertical-volume-popover,.sc-dock,.cinema-portal){
  background-color:var(--ethereal-media,#111315)!important;background-image:none!important;
  border:0!important;box-shadow:none!important;
}
html body.ethereal-app .sc-dock{background-color:var(--opaque-panel)!important}

@media(forced-colors:active){
  html body:is(.ethereal-app,.ethereal-home) :is(button,.button,summary,input,select,textarea,dialog,.ghost-select-menu,.ghost-date-panel,.social-sidebar,.social-main,.post-card,.social-theme-card){
    color:CanvasText!important;background-color:Canvas!important;background-image:none!important;
    border:1px solid CanvasText!important;box-shadow:none!important;
  }
  html body:is(.ethereal-app,.ethereal-home) :is([aria-pressed='true'],[aria-checked='true'],[aria-selected='true'],.nav-item.active,.source-choice.active){
    color:HighlightText!important;background-color:Highlight!important;
  }
}
