/*
 * Handsfriend global theme layer.
 *
 * Ownership:
 * - theme_ui.js owns mode/persistence (auto/light/dark).
 * - design_system.css owns semantic tokens.
 * - this file is loaded after page/domain CSS and closes only remaining
 *   legacy hard-coded light-color gaps across user-facing pages.
 * - interactive state (hover/selected/enabled/disabled) belongs to the
 *   component/domain CSS and must consume design-system state tokens here,
 *   rather than being redefined as a higher-specificity dark override.
 *
 * Admin pages intentionally keep their independent admin theme system.
 */

html {
  background: var(--hf-color-page);
}

html,
body {
  color: var(--hf-color-text);
}

body {
  background-color: var(--hf-color-page);
}

/* Header-owned global theme selector. */
.hf-theme-menu {
  position: fixed;
  z-index: var(--hf-layer-popover, 5000);
  width: 152px;
  display: grid;
  gap: 4px;
  padding: 7px;
  color: var(--hf-color-text);
  background: var(--hf-color-surface-elevated);
  border: 1px solid var(--hf-color-line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(20, 37, 48, 0.16);
}

.hf-theme-menu[hidden] {
  display: none !important;
}

.hf-theme-option {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 10px;
  color: inherit;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-align: left;
}

.hf-theme-option .fa {
  width: 14px;
  color: var(--hf-color-muted);
  text-align: center;
}

.hf-theme-option.is-selected {
  color: var(--hf-color-primary-text);
  background: var(--hf-color-primary-soft);
  border-color: var(--hf-color-primary-border);
}

.hf-theme-option.is-selected .fa {
  color: var(--hf-color-primary-text);
}

#header_nav .hf-theme-toggle:hover,
#header_nav .hf-theme-toggle:focus,
#header_nav .hf-theme-toggle[aria-expanded="true"] {
  color: var(--hf-color-text-strong);
  background: var(--hf-color-surface-hover);
  outline: none;
}

@media (hover: hover) and (pointer: fine) {
  .hf-theme-option:hover,
  .hf-theme-option:focus {
    color: var(--hf-color-text-strong);
    background: var(--hf-color-surface-hover);
    outline: none;
  }

  .hf-theme-option.is-selected:hover,
  .hf-theme-option.is-selected:focus {
    color: var(--hf-control-selected-text);
    background: var(--hf-control-selected-hover-bg);
    border-color: var(--hf-control-selected-border);
  }
}

html[data-hf-theme="dark"] .hf-theme-menu {
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
}

/* Global dark page chrome + native controls. */
html[data-hf-theme="dark"],
html[data-hf-theme="dark"] body {
  color: var(--hf-color-text);
  background-color: var(--hf-color-page);
}

html[data-hf-theme="dark"] #header_nav {
  color: var(--hf-color-text);
  background: rgba(13, 20, 27, 0.98);
  border-bottom-color: var(--hf-color-line);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14);
}

html[data-hf-theme="dark"] #foot_wrap,
html[data-hf-theme="dark"] .footer_inner {
  color: var(--hf-color-muted);
  background-color: var(--hf-color-page);
}

html[data-hf-theme="dark"] :where(hr, .line) {
  border-color: var(--hf-color-line);
  background-color: var(--hf-color-line);
}

html[data-hf-theme="dark"]
  :where(
    input:not([type]),
    input[type="text"],
    input[type="search"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="url"],
    input[type="number"],
    input[type="date"],
    input[type="datetime-local"],
    input[type="month"],
    input[type="time"],
    input[type="week"],
    textarea,
    select
  ) {
  color: var(--hf-color-text-strong);
  background-color: var(--hf-color-surface-elevated);
  border-color: var(--hf-color-line-strong);
}

html[data-hf-theme="dark"] :where(input, textarea)::placeholder {
  color: var(--hf-color-muted);
  opacity: 1;
}

html[data-hf-theme="dark"]
  :where(
    input:not([type]),
    input[type="text"],
    input[type="search"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="url"],
    input[type="number"],
    input[type="date"],
    input[type="datetime-local"],
    input[type="month"],
    input[type="time"],
    input[type="week"],
    textarea,
    select,
    .form-control
  ):focus {
  border-color: var(--hf-focus-color);
  box-shadow: 0 0 0 3px var(--hf-focus-ring);
  outline: none;
}

html[data-hf-theme="dark"] :where(input, textarea, select):disabled {
  color: var(--hf-color-muted);
  background-color: var(--hf-color-surface-soft);
  border-color: var(--hf-color-line);
  opacity: 1;
}

html[data-hf-theme="dark"] select option {
  color: var(--hf-color-text-strong);
  background: var(--hf-color-surface-elevated);
}

html[data-hf-theme="dark"] ::selection {
  color: #ffffff;
  background: rgba(var(--hf-color-primary-rgb), 0.72);
}

/* Bootstrap 3 is retained by several legacy/renewal views. Override only
 * visual primitives here; Bootstrap layout/behavior remains untouched. */
html[data-hf-theme="dark"]
  :where(
    .navbar-default,
    .panel,
    .panel-default,
    .well,
    .list-group-item,
    .dropdown-menu,
    .modal-content,
    .popover,
    .thumbnail,
    .jumbotron
  ) {
  color: var(--hf-color-text);
  background-color: var(--hf-color-surface-elevated);
  border-color: var(--hf-color-line);
}

html[data-hf-theme="dark"] .panel-default > .panel-heading,
html[data-hf-theme="dark"] .modal-header,
html[data-hf-theme="dark"] .modal-footer,
html[data-hf-theme="dark"] .popover-title {
  color: var(--hf-color-text-strong);
  background-color: var(--hf-color-surface-soft);
  border-color: var(--hf-color-line);
}

html[data-hf-theme="dark"] .form-control,
html[data-hf-theme="dark"] .input-group-addon {
  color: var(--hf-color-text-strong);
  background-color: var(--hf-color-surface-elevated);
  border-color: var(--hf-color-line-strong);
  box-shadow: none;
}

html[data-hf-theme="dark"] .btn-default {
  color: var(--hf-button-secondary-text);
  background-color: var(--hf-button-secondary-bg);
  border-color: var(--hf-button-secondary-border);
}

html[data-hf-theme="dark"] .btn-default:hover,
html[data-hf-theme="dark"] .btn-default:focus,
html[data-hf-theme="dark"] .btn-default:active,
html[data-hf-theme="dark"] .btn-default.active {
  color: var(--hf-color-text-strong);
  background-color: var(--hf-button-secondary-hover-bg);
  border-color: var(--hf-color-line-strong);
}

html[data-hf-theme="dark"] .dropdown-menu > li > a {
  color: var(--hf-color-text);
}

html[data-hf-theme="dark"] .dropdown-menu > li > a:hover,
html[data-hf-theme="dark"] .dropdown-menu > li > a:focus {
  color: var(--hf-color-text-strong);
  background-color: var(--hf-color-surface-hover);
}

html[data-hf-theme="dark"] .dropdown-menu .divider {
  background-color: var(--hf-color-line);
}

html[data-hf-theme="dark"] .table,
html[data-hf-theme="dark"] .table > thead > tr > th,
html[data-hf-theme="dark"] .table > tbody > tr > th,
html[data-hf-theme="dark"] .table > tfoot > tr > th,
html[data-hf-theme="dark"] .table > thead > tr > td,
html[data-hf-theme="dark"] .table > tbody > tr > td,
html[data-hf-theme="dark"] .table > tfoot > tr > td {
  color: var(--hf-color-text);
  border-color: var(--hf-color-line);
}

html[data-hf-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) {
  background-color: var(--hf-color-surface-soft);
}

html[data-hf-theme="dark"] .table-hover > tbody > tr:hover {
  background-color: var(--hf-color-surface-hover);
}

html[data-hf-theme="dark"] .nav-tabs {
  border-bottom-color: var(--hf-color-line);
}

html[data-hf-theme="dark"] .nav-tabs > li > a {
  color: var(--hf-color-muted);
}

html[data-hf-theme="dark"] .nav-tabs > li.active > a,
html[data-hf-theme="dark"] .nav-tabs > li.active > a:hover,
html[data-hf-theme="dark"] .nav-tabs > li.active > a:focus {
  color: var(--hf-color-text-strong);
  background-color: var(--hf-color-surface-elevated);
  border-color: var(--hf-color-line);
  border-bottom-color: var(--hf-color-surface-elevated);
}

/* Shared app layers. Domain CSS still owns geometry and semantic state. */
html[data-hf-theme="dark"] .hf-modal-dialog {
  color: var(--hf-color-text);
  background: var(--hf-color-surface-elevated);
  border-color: var(--hf-color-line);
}

html[data-hf-theme="dark"] .hf-modal-header,
html[data-hf-theme="dark"] .hf-modal-footer {
  border-color: var(--hf-color-line);
}

html[data-hf-theme="dark"] .hf-modal-close {
  color: var(--hf-color-muted);
}

html[data-hf-theme="dark"] .hf-modal-close:hover,
html[data-hf-theme="dark"] .hf-modal-close:focus {
  color: var(--hf-color-text-strong);
  background: var(--hf-color-surface-hover);
}

html[data-hf-theme="dark"] .mypage-notification-panel {
  color: var(--hf-color-text);
  background: var(--hf-color-surface-elevated);
  border-color: var(--hf-color-line);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34);
}

html[data-hf-theme="dark"] .mypage-notification-panel-head,
html[data-hf-theme="dark"] .mypage-notification-item {
  border-color: var(--hf-color-line);
}

html[data-hf-theme="dark"] .mypage-notification-item:hover,
html[data-hf-theme="dark"] .mypage-notification-item:focus {
  background: var(--hf-color-surface-hover);
}

html[data-hf-theme="dark"] .hf-mobile-bottom-nav {
  color: var(--hf-color-text);
  background: rgba(13, 20, 27, 0.98) !important;
  border-top-color: var(--hf-color-line) !important;
}

/* Site-owned wrappers around third-party ads can follow the theme. The ad or
 * iframe creative itself is external content and is intentionally untouched. */
html[data-hf-theme="dark"]
  :where(
    .mootoon-affiliate-inline,
    .community-feed-ad-slot,
    .mobon-banner,
    .site-ad-guide-shell
  ) {
  border-color: var(--hf-color-line);
}

/* Minimal pages that do not render the global shell still receive a complete
 * readable dark surface through the shared theme layer. */
html[data-hf-theme="dark"] body > :where(main, article, section, div) {
  border-color: var(--hf-color-line);
}

@media (max-width: 768px) {
  html[data-hf-theme="dark"] #header_nav .mypage-notification-badge {
    border-color: var(--hf-color-page);
  }
}

/* Remaining browser/Bootstrap primitives that otherwise keep light defaults. */
html[data-hf-theme="dark"] {
  scrollbar-color: var(--hf-color-line-strong) var(--hf-color-page);
}

html[data-hf-theme="dark"] :where(input[type="checkbox"], input[type="radio"]) {
  accent-color: var(--hf-color-primary);
}

html[data-hf-theme="dark"] :where(pre, code, kbd, samp) {
  border-color: var(--hf-color-line);
}

html[data-hf-theme="dark"] pre {
  color: var(--hf-color-text);
  background: var(--hf-color-surface-soft);
  border-color: var(--hf-color-line);
}

html[data-hf-theme="dark"] code {
  color: #f1a8c1;
  background: var(--hf-color-surface-soft);
}

html[data-hf-theme="dark"] blockquote {
  color: var(--hf-color-muted);
  border-left-color: var(--hf-color-line-strong);
}

html[data-hf-theme="dark"] :where(.text-muted, .help-block) {
  color: var(--hf-color-muted) !important;
}

html[data-hf-theme="dark"] .close {
  color: var(--hf-color-text-strong);
  text-shadow: none;
  opacity: 0.72;
}

html[data-hf-theme="dark"] .breadcrumb,
html[data-hf-theme="dark"] .pagination > li > a,
html[data-hf-theme="dark"] .pagination > li > span {
  color: var(--hf-color-text);
  background: var(--hf-color-surface-elevated);
  border-color: var(--hf-color-line);
}

html[data-hf-theme="dark"] .pagination > .active > a,
html[data-hf-theme="dark"] .pagination > .active > span,
html[data-hf-theme="dark"] .pagination > .active > a:hover,
html[data-hf-theme="dark"] .pagination > .active > span:hover {
  color: #ffffff;
  background: var(--hf-color-primary);
  border-color: var(--hf-color-primary);
}

html[data-hf-theme="dark"] .alert-success {
  color: #9fdfbc;
  background: var(--hf-color-success-soft);
  border-color: #28513d;
}

html[data-hf-theme="dark"] .alert-info {
  color: #9eddf4;
  background: var(--hf-color-primary-soft);
  border-color: var(--hf-color-primary-border);
}

html[data-hf-theme="dark"] .alert-warning {
  color: #f0cf8a;
  background: var(--hf-color-warning-soft);
  border-color: #5d4a28;
}

html[data-hf-theme="dark"] .alert-danger {
  color: #f3b1b5;
  background: var(--hf-color-danger-soft);
  border-color: #603139;
}

html[data-hf-theme="dark"] input:-webkit-autofill,
html[data-hf-theme="dark"] input:-webkit-autofill:hover,
html[data-hf-theme="dark"] input:-webkit-autofill:focus,
html[data-hf-theme="dark"] textarea:-webkit-autofill,
html[data-hf-theme="dark"] select:-webkit-autofill {
  -webkit-text-fill-color: var(--hf-color-text-strong);
  -webkit-box-shadow: 0 0 0 1000px var(--hf-color-surface-elevated) inset;
  caret-color: var(--hf-color-text-strong);
}

/* Lightbox is a bundled user-facing viewer, not an external iframe. */
html[data-hf-theme="dark"] .lightbox .lb-image {
  border-color: var(--hf-color-line-strong);
}

html[data-hf-theme="dark"] .lb-outerContainer {
  background-color: var(--hf-color-surface-elevated);
}

html[data-hf-theme="dark"] .lb-data {
  color: var(--hf-color-text);
}

html[data-hf-theme="dark"] .lb-data .lb-number {
  color: var(--hf-color-muted);
}

/* Auto-audited dark overrides from css/common.css */
html[data-hf-theme="dark"] #header_nav {
  background: rgba(17, 24, 32, 0.98);
}
html[data-hf-theme="dark"] .line {
  background-color: #151f28;
}
@media (max-width: 768px) {
  html[data-hf-theme="dark"] #header_nav .mypage-notification-badge {
    border: 2px solid #2a3944;
  }
  html[data-hf-theme="dark"]
    body.hf-mobile-bottom-nav-enabled
    .hf-mobile-bottom-nav:not([hidden]) {
    background: rgba(17, 24, 32, 0.98);
  }
}
/* Auto-audited dark overrides from css/banner.css */
html[data-hf-theme="dark"] .hf-install-banner {
  color: #f1f6f8;
  background-color: var(--hf-color-primary-soft, #17404f);
  border-bottom: 1px solid var(--hf-color-primary-border, #2a6e84);
}
html[data-hf-theme="dark"] .hf-install-banner-content strong {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .hf-install-banner-content span {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .hf-install-banner-content span strong {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .hf-install-banner-close {
  color: #c7d4da;
}
html[data-hf-theme="dark"] .hf-install-banner-close:hover,
html[data-hf-theme="dark"] .hf-install-banner-close:focus {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .hf-ios-guide {
  border-top: 1px solid var(--hf-color-primary-border, #2a6e84);
  background-color: #111820;
}
html[data-hf-theme="dark"] .hf-ios-guide-step {
  background-color: var(--hf-color-primary-soft, #17404f);
  border: 1px solid var(--hf-color-primary-border, #2a6e84);
}
html[data-hf-theme="dark"] .hf-ios-guide-icon {
  color: var(--hf-button-primary-bg, #7fc1db);
  background-color: #111820;
  border: 1px solid #246e89;
}
html[data-hf-theme="dark"] .hf-ios-guide-text strong {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .hf-ios-guide-text small {
  color: #e2ebef;
}

/* Auto-audited dark overrides from css/start_entry.css */
html[data-hf-theme="dark"] {
  --stage8-warm: #4f3317;
  --stage8-warm-line: #49351d;
}
html[data-hf-theme="dark"] .stage8-entry-page {
  background: #111820;
}
html[data-hf-theme="dark"] .stage8-eyebrow {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .stage8-chat-main-heading h1 {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .stage8-service-card,
html[data-hf-theme="dark"] .stage8-service-card.is-primary,
html[data-hf-theme="dark"] .stage8-service-card.is-warm,
html[data-hf-theme="dark"] .stage8-service-card.is-muted {
  background: var(--hf-card-bg);
  border-color: var(--hf-color-line);
}
html[data-hf-theme="dark"] .stage8-service-card:hover {
  border-color: var(--stage8-blue-dark);
}
html[data-hf-theme="dark"] .stage8-service-icon {
  background: #111820;
}
html[data-hf-theme="dark"] .stage8-service-live-status {
  color: #dce8ed;
  background: rgba(var(--hf-color-primary-rgb), 0.11);
  border-color: rgba(var(--hf-color-primary-rgb), 0.2);
}
html[data-hf-theme="dark"] .stage8-service-arrow {
  color: #e2ebef;
}
@media (min-width: 769px) {
  html[data-hf-theme="dark"] body.stage8-random-page .stage8-random-back {
    color: #f1f6f8;
  }
  html[data-hf-theme="dark"] .stage8-profile-link {
    color: #f1f6f8;
  }
  html[data-hf-theme="dark"] .stage8-profile-link {
    background: rgba(17, 24, 32, 0.9);
    border: 1px solid rgba(52, 72, 84, 0.95);
  }
  html[data-hf-theme="dark"] body.stage8-random-page .stage8-random-title {
    color: #f1f6f8;
  }
  html[data-hf-theme="dark"] .stage8-random-title small {
    color: #e2ebef;
  }
  html[data-hf-theme="dark"] body.stage8-random-page .stage8-random-side-card {
    background: rgba(17, 24, 32, 0.96);
    border: 1px solid rgba(52, 72, 84, 0.95);
  }
  html[data-hf-theme="dark"]
    body.stage8-random-page
    .stage8-random-side-card
    > p {
    color: #e2ebef;
  }
  html[data-hf-theme="dark"] .stage8-command-guide {
    border-top: 1px solid #2a3944;
  }
  html[data-hf-theme="dark"] .stage8-command-guide kbd {
    color: #f1f6f8;
    background: #151f28;
    border: 1px solid #344854;
  }
  html[data-hf-theme="dark"] .stage8-command-guide small {
    color: #e2ebef;
  }
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-profile-summary {
  color: #c7d4da;
}
html[data-hf-theme="dark"] body.stage8-random-page .official_message_wrap {
  color: #e2ebef;
  background: #151f28;
}
html[data-hf-theme="dark"] body.stage8-random-page .random-chat-connected-text {
  color: #e2ebef;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-action-options
  strong {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] body.stage8-random-page .stage8-random-ended-ad {
  background: #111820;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-ended-ad
  > span {
  color: #c7d4da;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-ended-ad
  strong {
  color: #e2ebef;
}
html[data-hf-theme="dark"] body.stage8-random-page .stage8-random-ended-block {
  color: #c7d4da;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-ended-ad-slot:empty::before {
  color: #c7d4da;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-back.text-button {
  color: #e2ebef;
}
html[data-hf-theme="dark"] body.stage8-random-page .stage8-random-typing-text {
  color: #e2ebef;
  background: #111820;
}
html[data-hf-theme="dark"] body.stage8-random-page .stage8-eyebrow.eyebrow {
  color: #e2ebef;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-block-button.chat-block-button {
  color: #e2ebef;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-ended-back.ended-back-link {
  color: #e2ebef;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-ended-secondary.secondary-button {
  color: #f1f6f8;
  background: #111820;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-ended-hint.ended-recent-hint {
  color: #c7d4da !important;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-action-options.mobile-chat-action-options
  button {
  background: #111820;
}
html[data-hf-theme="dark"] body.stage8-random-page {
  background: #111820;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-side-card.chat-side-card {
  background: rgba(17, 24, 32, 0.97);
}
html[data-hf-theme="dark"]
  body.stage8-random-page.stage8-random-is-ended
  .stage8-random-notice.chat-notice {
  color: #e2ebef;
  background: #17434f;
  border-color: #247089;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-notice.chat-notice.stage8-random-notice-info {
  color: #e2ebef;
  background: #17414f;
  border-color: #247089;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-notice.chat-notice.stage8-random-notice-positive {
  color: #89d2b1;
  border-color: #387553;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-notice.chat-notice.stage8-random-notice-negative {
  color: #d28989;
  border-color: #852929;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-notice
  .stage8-random-notice-countdown {
  color: #e27979;
}
html[data-hf-theme="dark"] body.stage8-random-page .stage8-random-state-icon {
  color: #e2ebef;
  background: #111820;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-state
  .stage8-eyebrow {
  color: #e2ebef;
}
html[data-hf-theme="dark"] body.stage8-random-page .stage8-random-state p {
  color: #e2ebef;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-connected-message {
  color: #e2ebef !important;
  background: #151f28 !important;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-side-state
  .stage8-eyebrow.eyebrow {
  color: #e2ebef;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-side-state
  > p {
  color: #e2ebef;
}
html[data-hf-theme="dark"] body.stage8-random-page .stage8-random-profile-grid {
  background: #111820;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-profile-grid
  span {
  color: #c7d4da;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-simple-info-list
  > div {
  color: #e2ebef;
}
html[data-hf-theme="dark"] body.stage8-random-page .stage8-mini-dot {
  background: #1d2a35;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-command-guide.command-guide
  > .stage8-command-card {
  background: #111820;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-command-guide.command-guide
  kbd {
  color: #f1f6f8;
  background: #111820;
  border: 1px solid #344854;
}
html[data-hf-theme="dark"] body.stage8-random-page .stage8-command-card small {
  color: #c7d4da;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-ended-icon.state-icon {
  color: #89d2a9;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-ended-main
  > p {
  color: #e2ebef;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-ended-main
  .stage8-random-ended-meta {
  color: #c7d4da;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-ended-ad-zone {
  background: #172129;
  border-color: #31434e;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-ended-ad-slot.ended-inline-ad {
  background: transparent;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-ended-feedback.rating-block,
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-recent-chat-card {
  background: transparent;
}

html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-ended-protection-link {
  color: #e2ebef;
}
html[data-hf-theme="dark"]
  body.stage8-random-page
  .stage8-random-ended-protection-link:disabled {
  color: #c7d4da;
}
@media (max-width: 768px) {
  html[data-hf-theme="dark"]
    body.stage8-random-page.stage8-random-is-connected
    .stage8-random-composer-action.stage8-random-end-action.stage8-random-end-confirming {
    color: var(--hf-color-danger) !important;
    background: var(--hf-color-danger-soft) !important;
    border-color: var(--hf-color-danger) !important;
  }
}

/* Dark overrides for random-chat base plus isolated historical chat selectors. */
html[data-hf-theme="dark"] body:not(.stage8-random-page) #chat_wrap {
  background-color: #111820;
  border-left: 1px solid #344854;
  border-right: 1px solid #344854;
}
html[data-hf-theme="dark"] body:not(.stage8-random-page) #chat_input_wrap {
  background-color: #111820;
  border: 1px solid #344854;
}
html[data-hf-theme="dark"] #chat_settings_btn,
html[data-hf-theme="dark"] #custom_chat_member_panel_toggle {
  color: #73c9e8;
  background-color: rgba(17, 24, 32, 0.65);
}
html[data-hf-theme="dark"] #chat_settings_btn:hover,
html[data-hf-theme="dark"] #custom_chat_member_panel_toggle:hover {
  color: #73c9e8;
  background-color: #111820;
}
html[data-hf-theme="dark"] #chat_settings_panel {
  color: #f1f6f8;
  background-color: rgba(23, 62, 79, 0.98);
}
html[data-hf-theme="dark"] body:not(.stage8-random-page) #send_btn {
  background: #111820;
}
html[data-hf-theme="dark"] body:not(.stage8-random-page) #send_picture_btn {
  background: #111820;
  border: 1px solid #344854;
}
html[data-hf-theme="dark"] #chat_entering_check {
  color: #e2ebef;
  background-color: #111820;
  border: 1px solid #344854;
}
html[data-hf-theme="dark"] #h_thinking_box {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .start_items {
  background: #111820;
  border: 1px solid #2a3944;
}
html[data-hf-theme="dark"] .start_items_title {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .start_items_content {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .chat_status {
  background: #243842;
  border: 1px solid #2a3944;
}
html[data-hf-theme="dark"] .chat_status_dot {
  background-color: #1b4b2e;
}
html[data-hf-theme="dark"] .custom_chat_room {
  background-color: #111820;
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .custom_chat_current_members {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .official_message_wrap {
  background-color: #111820;
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .random-chat-quality-notice {
  color: #e8c573;
  background-color: #4f3c17;
  border-color: #896b24;
}
html[data-hf-theme="dark"] .random-chat-milestone-notice {
  color: #77c7e4;
  background-color: #173b4f;
  border-color: #246e89;
}
html[data-hf-theme="dark"] .random-chat-positive-self-notice {
  background-color: #1e4831;
  color: #89d2a8;
}
html[data-hf-theme="dark"] .random-chat-block-modal-step h2 {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .random-chat-block-modal-step .hf-modal-header > p {
  color: #e2ebef;
}
@media (hover: hover) and (pointer: fine) {
}
html[data-hf-theme="dark"] .custom_chat_policy_notice {
  color: #e8af73;
  background-color: #4f3b17;
  border: 1px solid #896524;
}
html[data-hf-theme="dark"] .msg_nickname_wrap {
  color: #e2ebef;
}
@media (max-width: 768px) {
  html[data-hf-theme="dark"] body:not(.stage8-random-page) #start_body_wrap {
    background-color: #111820;
  }
  html[data-hf-theme="dark"] body:not(.stage8-random-page) #chat_wrap {
    background-color: #111820;
  }
  html[data-hf-theme="dark"] body:not(.stage8-random-page) #chat_input_wrap {
    background-color: #111820;
    border: 1px solid #344854;
  }
  html[data-hf-theme="dark"] #mini_searching_wrap {
    border: 1px solid #246e89;
  }
}
@media (min-width: 769px) and (max-width: 1919px) {
  html[data-hf-theme="dark"] .start_items:hover {
    background: #233343;
  }
}
html[data-hf-theme="dark"] .minor-safety-notice {
  color: #e2ebef;
  background-color: #111820;
  border: 1px solid #2a3944;
}
html[data-hf-theme="dark"] .minor-safety-notice i {
  color: #e4ba77;
}
html[data-hf-theme="dark"] #custom_chat_member_panel {
  color: #f1f6f8;
  background-color: rgba(23, 64, 79, 0.75);
}
html[data-hf-theme="dark"] #custom_chat_member_panel:focus-within,
html[data-hf-theme="dark"] #custom_chat_member_panel.is-open {
  background-color: rgba(23, 64, 79, 0.98);
}
@media (hover: hover) and (pointer: fine) {
  html[data-hf-theme="dark"] #custom_chat_member_panel:hover {
    background-color: rgba(23, 64, 79, 0.95);
  }
}
html[data-hf-theme="dark"] #custom_chat_member_panel_title {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] #custom_chat_my_role {
  color: #73cae8;
}
html[data-hf-theme="dark"] #custom_chat_member_list {
  background-color: rgba(23, 62, 79, 0.98);
}
html[data-hf-theme="dark"] .custom_chat_member_name {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .custom_chat_owner_badge {
  color: #73cbe8;
  background-color: #111820;
}
html[data-hf-theme="dark"] .custom_chat_me_badge {
  color: #e2ebef;
  background-color: #111820;
}
html[data-hf-theme="dark"] .custom_chat_kick_btn {
  color: #d58786;
  background-color: rgba(17, 24, 32, 0.8);
}
@media (hover: hover) and (pointer: fine) {
  html[data-hf-theme="dark"] .custom_chat_kick_btn:hover {
    color: #da8280;
  }
}
@media (max-width: 768px) {
  html[data-hf-theme="dark"] #custom_chat_member_panel {
    background-color: rgba(23, 64, 79, 0.92);
  }
  html[data-hf-theme="dark"] #custom_chat_member_panel.is-open,
  html[data-hf-theme="dark"] #custom_chat_member_panel:focus-within {
    background-color: rgba(23, 64, 79, 0.98);
  }
}
html[data-hf-theme="dark"] .custom_chat_tip_icon {
  color: #73c8e8;
}
html[data-hf-theme="dark"] .custom_chat_tip_content strong {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .custom_chat_tip_content p {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .custom_chat_initial_members {
  color: #f1f6f8;
  background-color: rgba(23, 64, 79, 0.75);
}
html[data-hf-theme="dark"] .custom_chat_initial_members_body {
  background-color: rgba(17, 24, 32, 0.92);
}
html[data-hf-theme="dark"] .custom_chat_initial_member_row {
  color: #f1f6f8;
}
html[data-hf-theme="dark"]
  .custom_chat_initial_member_row
  + .custom_chat_initial_member_row {
  border-top: 1px solid #2a3944;
}
html[data-hf-theme="dark"] .custom_chat_initial_member_name > i {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] #custom_chat_refresh .fa-check {
  color: #7eddac;
}
html[data-hf-theme="dark"] #custom_chat_refresh_status {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .custom_chat_room_meta {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .custom_chat_room_owner {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .custom_chat_room_meta_separator {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .custom_chat_member_duration {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .custom_chat_member_room_title {
  border-bottom: 1px solid #2a3944;
}
html[data-hf-theme="dark"] .custom_chat_member_room_name {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .custom_chat_loading_message {
  background: rgba(17, 24, 32, 0.92);
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .custom_chat_loading_message span {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .custom_chat_admin_delete_btn {
  border: 1px solid #892424;
}
html[data-hf-theme="dark"] .room-profile-heading {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .room-profile-description {
  color: #e2ebef;
}
html[data-hf-theme="dark"] #room_profile_nickname {
  color: #f1f6f8;
  background: #111820;
  border: 1px solid #344854;
}
html[data-hf-theme="dark"] #room_profile_nickname:disabled {
  color: #e2ebef;
  background: #151f28;
}
html[data-hf-theme="dark"] .room-profile-color {
  border: 3px solid #2a3944;
}
html[data-hf-theme="dark"] .room-profile-secondary {
  color: #e2ebef;
  background: #111820;
  border: 1px solid #344854;
}
html[data-hf-theme="dark"] .room-profile-fixed-status {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .room-profile-fixed-status.is-error {
  color: #d68585;
}

/* Muted categorical accents shared by community and room discovery.
 * Dark surfaces should carry only a small hue shift; text keeps category identity. */
html[data-hf-theme="dark"] {
  --hf-topic-cyan-text: #7faebe;
  --hf-topic-cyan-bg: #1a2932;
  --hf-topic-green-text: #89ae94;
  --hf-topic-green-bg: #19241e;
  --hf-topic-pink-text: #bd909f;
  --hf-topic-pink-bg: #261e22;
  --hf-topic-purple-text: #a097bb;
  --hf-topic-purple-bg: #211f29;
  --hf-topic-amber-text: #b99a73;
  --hf-topic-amber-bg: #272219;
}

/* Auto-audited dark overrides from css/room_chat.css */
html[data-hf-theme="dark"] .room-chat-page {
  background: var(--hf-color-page);
}
html[data-hf-theme="dark"] .room-eyebrow {
  color: var(--hf-color-muted);
}
html[data-hf-theme="dark"] .room-text-button {
  color: var(--hf-color-text);
}
html[data-hf-theme="dark"] .room-refresh-button.is-refreshing {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .room-refresh-button.is-complete {
  color: #89d2ae;
}
html[data-hf-theme="dark"] .room-filter-pills button {
  color: var(--hf-color-muted);
  background: var(--hf-color-surface);
}
html[data-hf-theme="dark"] .room-filter-pills button.is-active {
  color: var(--hf-color-primary-text);
  background: var(--hf-color-primary-soft);
  border-color: var(--hf-color-primary-border);
}
@media (hover: hover) and (pointer: fine) {
  html[data-hf-theme="dark"] .room-filter-pills button:hover {
    color: var(--hf-color-primary-text);
    background: var(--hf-color-primary-soft);
    border-color: var(--hf-color-primary-border);
  }
}
html[data-hf-theme="dark"] .room-guide-card {
  background: var(--hf-color-surface-elevated);
  border: 1px solid var(--hf-color-line);
}
html[data-hf-theme="dark"] .room-guide-card h2 {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .room-guide-card section {
  border-top: 1px solid var(--hf-color-line);
}
html[data-hf-theme="dark"] .room-guide-card section strong {
  color: var(--hf-color-text);
}
html[data-hf-theme="dark"] .room-guide-card section p {
  color: var(--hf-color-muted);
}
html[data-hf-theme="dark"] .room-list-surface {
  background: var(--hf-color-surface);
  border-color: var(--hf-color-line);
}
html[data-hf-theme="dark"] .room-card {
  background: var(--hf-color-surface);
  border-bottom: 1px solid var(--hf-color-line);
}
@media (min-width: 769px) {
  html[data-hf-theme="dark"] .room-card:last-child {
    border-bottom: 0;
  }
}
html[data-hf-theme="dark"] .room-list-entry {
  background: var(--hf-color-surface);
}
html[data-hf-theme="dark"] .room-list-entry:not([disabled]):hover,
html[data-hf-theme="dark"] .room-list-entry:not([disabled]):focus-visible {
  background: var(--hf-color-surface-elevated);
}
html[data-hf-theme="dark"] .room-topic-chip {
  color: var(--hf-topic-cyan-text);
  background: var(--hf-topic-cyan-bg);
}
html[data-hf-theme="dark"] .room-topic-chip[data-room-topic="수다"] {
  color: var(--hf-topic-cyan-text);
  background: var(--hf-topic-cyan-bg);
}
html[data-hf-theme="dark"] .room-topic-chip[data-room-topic="고민"] {
  color: var(--hf-topic-green-text);
  background: var(--hf-topic-green-bg);
}
html[data-hf-theme="dark"] .room-topic-chip[data-room-topic="연애·썸"] {
  color: var(--hf-topic-pink-text);
  background: var(--hf-topic-pink-bg);
}
html[data-hf-theme="dark"] .room-topic-chip[data-room-topic="취미"] {
  color: var(--hf-topic-purple-text);
  background: var(--hf-topic-purple-bg);
}
html[data-hf-theme="dark"] .room-topic-chip[data-room-topic="친구 찾기"] {
  color: var(--hf-topic-amber-text);
  background: var(--hf-topic-amber-bg);
}
html[data-hf-theme="dark"] .room-row-title {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .room-row-meta {
  color: var(--hf-color-muted);
}
html[data-hf-theme="dark"] .room-row-meta b {
  color: var(--hf-color-muted-light);
}
html[data-hf-theme="dark"] .room-row-meta em {
  color: var(--hf-color-muted-light);
}
html[data-hf-theme="dark"] .room-row-capacity strong {
  color: #8fb9c8;
  background: #17252c;
  border: 1px solid #29414b;
}
html[data-hf-theme="dark"] .room-row-capacity small {
  color: var(--hf-color-muted-light);
}
html[data-hf-theme="dark"] .room-row-chevron {
  color: var(--hf-color-muted-light);
}
html[data-hf-theme="dark"] .room-card.is-full .room-row-capacity strong {
  color: #e0a0a6;
  background: #2b1f23;
  border-color: #5a343d;
}
html[data-hf-theme="dark"] .room-card.is-full .room-row-capacity small,
html[data-hf-theme="dark"] .room-card.is-full .room-row-chevron {
  color: #c9858d;
}
html[data-hf-theme="dark"] .room-card.is-full .room-row-capacity small {
  font-weight: 700;
}
html[data-hf-theme="dark"] .room-message-nickname {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .room-system-message {
  color: #e2ebef;
  background: #151f28;
}
html[data-hf-theme="dark"] .room-participant-item:hover {
  background: #263640;
}
html[data-hf-theme="dark"] .room-participant-item.is-me {
  background: #173e4f;
}
html[data-hf-theme="dark"] .room-role-chip {
  color: #84bdd7;
  background: #173d4f;
}
html[data-hf-theme="dark"] .room-poll-card {
  background: #4f3c17;
  border: 1px solid #896b24;
}
html[data-hf-theme="dark"] .room-poll-option {
  color: #e2ebef;
  background: #111820;
  border: 1px solid #866b28;
}
html[data-hf-theme="dark"] .room-poll-option.is-selected {
  background: #4f4017;
}
html[data-hf-theme="dark"] .room-poll-card.is-result {
  background: #17394f;
  border-color: #246889;
}
html[data-hf-theme="dark"] .room-poll-result-option {
  color: #e2ebef;
  background: #111820;
  border: 1px solid #356379;
}
html[data-hf-theme="dark"] .room-poll-result-option b {
  color: #86bcd5;
}
html[data-hf-theme="dark"] .room-poll-result-option.is-selected {
  border-color: #246b89;
}
html[data-hf-theme="dark"] .room-poll-card small {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .room-modal-dialog h2,
html[data-hf-theme="dark"] .room-action-sheet h2 {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .room-full-input,
html[data-hf-theme="dark"] .room-modal textarea,
html[data-hf-theme="dark"] .room-poll-option-inputs input {
  border: 1px solid #344854;
}
html[data-hf-theme="dark"] .room-create-select-field > span:first-child {
  color: var(--hf-color-text, #f1f6f8);
}
html[data-hf-theme="dark"] .room-select-control select {
  color: var(--hf-color-text, #f1f6f8);
  background: var(--hf-color-surface, #111820);
  border: 1px solid var(--hf-color-line-strong, #344854);
}
html[data-hf-theme="dark"] .room-select-control select:focus {
  border-color: var(--hf-color-primary-border, #2a6e84);
}
html[data-hf-theme="dark"] .room-select-control .fa {
  color: var(--hf-color-muted, #e2ebef);
}
html[data-hf-theme="dark"] .room-field-message {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .room-field-message.is-error {
  color: #da8181;
}
html[data-hf-theme="dark"] .room-field-message.is-success {
  color: #82d9b3;
}
html[data-hf-theme="dark"] .room-profile-modal .room-primary-button:disabled {
  color: #c7d4da;
  border-color: #2a3944;
}
html[data-hf-theme="dark"] .room-action-sheet button {
  background: #111820;
}
html[data-hf-theme="dark"] .room-action-sheet .room-action-danger {
  color: #d88383;
}
html[data-hf-theme="dark"] .room-poll-option-row button {
  color: #e2ebef;
  background: #111820;
  border: 1px solid #344854;
}
/* Auto-audited dark overrides from css/h_chat.css */
html[data-hf-theme="dark"] .h-chat-back-link {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .h-chat-title-group strong {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .h-chat-security {
  background: #4f3917;
  border: 1px solid #896224;
}
html[data-hf-theme="dark"] .h-chat-security strong {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .h-chat-security span {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .h-chat-bubble-content a {
  color: #73cbe8;
}
html[data-hf-theme="dark"] .h-chat-eyebrow {
  color: #7cc6df;
}
html[data-hf-theme="dark"] .h-chat-info-heading strong {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .h-chat-learning-item {
  color: #e2ebef;
  border-top: 1px solid #2a3944;
}
html[data-hf-theme="dark"] .h-chat-learning-item strong {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .h-chat-learning-empty {
  color: #c7d4da;
}
@media (max-width: 768px) {
  html[data-hf-theme="dark"] .h-chat-topline {
    background: rgba(27, 59, 75, 0.98);
    border-bottom: 1px solid #2a3944;
  }
}

/* Auto-audited dark overrides from css/comunity.css */
html[data-hf-theme="dark"] {
  --community-warm: #292219;
  --community-warm-line: #493b2d;
}
html[data-hf-theme="dark"] .community-page {
  background: var(--hf-color-page);
}
html[data-hf-theme="dark"] .community-page-header h1 {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .community-eyebrow {
  color: var(--hf-color-muted);
}
html[data-hf-theme="dark"] .community_scope_tab {
  color: var(--hf-color-muted);
}
html[data-hf-theme="dark"] .community_scope_tab.active {
  color: var(--hf-color-primary-text);
  background: var(--hf-color-primary-soft);
}
html[data-hf-theme="dark"] #community_notification_button {
  color: var(--hf-color-text);
  background: var(--hf-color-primary-soft);
}
html[data-hf-theme="dark"] #community_notification_button.enabled {
  border-color: var(--hf-color-primary-border);
}
html[data-hf-theme="dark"] #community_notification_button.denied {
  color: #c7d4da;
  background: #151f28;
}
html[data-hf-theme="dark"] .community_topic_filter,
html[data-hf-theme="dark"] .post_topic_option {
  color: var(--hf-color-muted);
  background: var(--hf-color-surface);
}
html[data-hf-theme="dark"] .community_topic_filter.active {
  color: var(--hf-color-primary-text);
  background: var(--hf-color-primary-soft);
  border-color: var(--hf-color-primary-border);
  font-weight: 800;
}

html[data-hf-theme="dark"] .post_topic_option.active {
  border-color: var(--hf-color-primary-border);
}

@media (hover: hover) and (pointer: fine) {
  html[data-hf-theme="dark"] .community_topic_filter:hover {
    color: var(--hf-color-primary-text);
    background: var(--hf-color-primary-soft);
    border-color: var(--hf-color-primary-border);
  }
}
html[data-hf-theme="dark"] .community-post-list {
  background: #111820;
  border-color: #2a3944;
}
html[data-hf-theme="dark"] .community_post {
  background: #111820;
  border-bottom-color: #2a3944;
}
html[data-hf-theme="dark"] .community_post:hover {
  background: #141c26;
}
html[data-hf-theme="dark"] .community_post.notice_post {
  background: #14212a;
}
html[data-hf-theme="dark"] .post_header {
  color: var(--hf-color-muted);
}
html[data-hf-theme="dark"] .post_author {
  color: var(--hf-color-text-strong);
}
html[data-hf-theme="dark"] .post_date {
  color: var(--hf-color-muted);
}
html[data-hf-theme="dark"] .post_ip,
html[data-hf-theme="dark"] .comment_ip,
html[data-hf-theme="dark"] .comment_date {
  color: var(--hf-color-muted-light);
}
html[data-hf-theme="dark"] .post_meta_separator {
  color: #9aabb5;
}
html[data-hf-theme="dark"] .post_topic_badge.free {
  color: var(--hf-topic-cyan-text);
  background: var(--hf-topic-cyan-bg);
}
html[data-hf-theme="dark"] .post_topic_badge.concern {
  color: var(--hf-topic-purple-text);
  background: var(--hf-topic-purple-bg);
}
html[data-hf-theme="dark"] .post_topic_badge.love {
  color: var(--hf-topic-pink-text);
  background: var(--hf-topic-pink-bg);
}
html[data-hf-theme="dark"] .post_topic_badge.hobby {
  color: var(--hf-topic-green-text);
  background: var(--hf-topic-green-bg);
}
html[data-hf-theme="dark"] .post_topic_badge.find_person {
  color: var(--hf-topic-amber-text);
  background: var(--hf-topic-amber-bg);
}
html[data-hf-theme="dark"] .post_more_button {
  color: #c7d4da;
}
html[data-hf-theme="dark"] .post_more_button:focus,
html[data-hf-theme="dark"] .post_more_button[aria-expanded="true"] {
  color: #f1f6f8;
  background: #151f28;
}
@media (hover: hover) and (pointer: fine) {
  html[data-hf-theme="dark"] .post_more_button:hover {
    color: #f1f6f8;
    background: #151f28;
  }
}
html[data-hf-theme="dark"] .post_more_menu {
  background: #262f3a;
  border: 1px solid #2a3944;
}
html[data-hf-theme="dark"] .post_more_action {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .post_more_action:focus:not(:disabled) {
  background: #151f28;
}
@media (hover: hover) and (pointer: fine) {
  html[data-hf-theme="dark"] .post_more_action:hover:not(:disabled) {
    background: #151f28;
  }
}
html[data-hf-theme="dark"] .post_more_delete_action:hover:not(:disabled),
html[data-hf-theme="dark"] .post_more_delete_action:focus:not(:disabled),
html[data-hf-theme="dark"] .post_more_report_action:hover:not(:disabled),
html[data-hf-theme="dark"] .post_more_report_action:focus:not(:disabled) {
  color: #d58691;
  background: #4f1720;
}
html[data-hf-theme="dark"] .post_more_action:disabled,
html[data-hf-theme="dark"] .post_more_action.reported {
  color: #c7d4da;
}
html[data-hf-theme="dark"] .hot_badge {
  color: #ed929f;
  background: #2f1e24;
  border-color: #73414b;
}
html[data-hf-theme="dark"] .post_content {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .reported_post_content {
  color: #b4826d;
  background: #34261c;
}
html[data-hf-theme="dark"] .post_action_btn {
  color: var(--hf-color-muted);
}
html[data-hf-theme="dark"]
  .post_action_btn:hover:not(.disabled):not(.reported):not(
    .community_note_btn
  ) {
  color: #f1f6f8;
  background: var(--hf-color-primary-soft);
}
html[data-hf-theme="dark"] .like_btn:hover:not(.disabled),
html[data-hf-theme="dark"] .like_btn.active {
  color: #e57687;
}
html[data-hf-theme="dark"] .like_btn.active i {
  color: #e57687;
}
html[data-hf-theme="dark"] .community_note_btn {
  color: var(--hf-color-muted);
}
html[data-hf-theme="dark"] .community_note_btn:hover {
  background: var(--hf-color-primary-soft);
}
html[data-hf-theme="dark"] .community-list-state,
html[data-hf-theme="dark"] #post_loading,
html[data-hf-theme="dark"] #post_empty,
html[data-hf-theme="dark"] #post_end {
  color: #c7d4da;
  border-color: var(--community-line);
}
html[data-hf-theme="dark"] .post_topic_select_label,
html[data-hf-theme="dark"] .community-input-label {
  color: #e2ebef;
}
html[data-hf-theme="dark"] #post_nickname,
html[data-hf-theme="dark"] #post_delete_password,
html[data-hf-theme="dark"] #post_content,
html[data-hf-theme="dark"] #community_note_content {
  background: #111820;
  border: 1px solid #344854;
}
html[data-hf-theme="dark"] #post_nickname:focus,
html[data-hf-theme="dark"] #post_delete_password:focus,
html[data-hf-theme="dark"] #post_content:focus,
html[data-hf-theme="dark"] #community_note_content:focus {
  border-color: #246c89;
}
html[data-hf-theme="dark"] #post_count {
  color: #c7d4da;
}
html[data-hf-theme="dark"] .community-write-note-toggle {
  color: #e2ebef;
}
/* Auto-audited dark overrides from css/faq.css */
html[data-hf-theme="dark"] body {
  background-color: #111820;
}
html[data-hf-theme="dark"] #faq_wrap {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] #faq_header h1 {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] #faq_header p {
  color: #e2ebef;
}
html[data-hf-theme="dark"] #faq_category_nav a {
  color: #e2ebef;
  background-color: #111820;
  border: 1px solid #344854;
}
html[data-hf-theme="dark"] .faq_section h2 {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .faq_item {
  border-bottom: 1px solid #2a3944;
}
html[data-hf-theme="dark"] .faq_answer .faq_label {
  color: #c7d4da;
}
html[data-hf-theme="dark"] .faq_question h3 {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .faq_content {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .faq_content strong {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .faq_content li {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .faq_contact {
  background-color: #1b3b4b;
}
html[data-hf-theme="dark"] #faq_bottom {
  background-color: #111820;
}
html[data-hf-theme="dark"] #faq_bottom p {
  color: #f1f6f8;
}

/* Auto-audited dark overrides from css/pps.css */
html[data-hf-theme="dark"] #privacy_policy_statement_wrap {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .privacy-header {
  background: linear-gradient(
    135deg,
    var(--hf-color-primary-soft) 0%,
    #111820 72%
  );
}
html[data-hf-theme="dark"] .privacy-header h1 {
  color: #89bbd2;
}
html[data-hf-theme="dark"] .privacy-summary {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .privacy-dates dt {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .privacy-dates dd {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .privacy-notice,
html[data-hf-theme="dark"] .privacy-toc {
  background: #111820;
}
html[data-hf-theme="dark"] .privacy-notice h2 {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .privacy-toc strong {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .privacy-content {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .privacy-section h2 {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .privacy-section h3 {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .privacy-table-wrap {
  border: 1px solid #2a3944;
  background: #111820;
}
html[data-hf-theme="dark"] .privacy-table {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .privacy-table th,
html[data-hf-theme="dark"] .privacy-table td {
  border-bottom: 1px solid #2a3944;
}
html[data-hf-theme="dark"] .privacy-table thead th {
  color: #f1f6f8;
  background: #193f4d;
}
html[data-hf-theme="dark"] .privacy-table tbody th {
  color: #f1f6f8;
  background: #223944;
}
html[data-hf-theme="dark"] .privacy-callout.warning {
  border: 1px solid #896c24;
  background: #4f3c17;
}
html[data-hf-theme="dark"] .privacy-callout strong {
  color: #e1bf79;
}
html[data-hf-theme="dark"] .privacy-contact-card {
  border: 1px solid #3b6273;
  background: #233b43;
}
html[data-hf-theme="dark"] .privacy-contact-card dt {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .privacy-contact-card dd {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .privacy-history {
  background: #111820;
}

/* Auto-audited dark overrides from css/mypage.css */
html[data-hf-theme="dark"] .mypage-page {
  background: #111820;
}
html[data-hf-theme="dark"] .mypage-sidebar a {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .mypage-sidebar a:hover,
html[data-hf-theme="dark"] .mypage-sidebar a:focus {
  background: #111820;
}
html[data-hf-theme="dark"] .mypage-sidebar a.is-active {
  color: #f1f6f8;
  background: var(--hf-color-primary-soft);
}
html[data-hf-theme="dark"] .mypage-panel-heading h2 {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .mypage-surface {
  background: #111820;
}
html[data-hf-theme="dark"] .mypage-section-heading h3 {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .mypage-section-heading span {
  color: #c7d4da;
}
html[data-hf-theme="dark"] .mypage-profile-summary-copy > strong {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .mypage-profile-summary-copy > strong.is-empty {
  color: #c7d4da;
}
html[data-hf-theme="dark"] .mypage-profile-summary-divider {
  background: #151f28;
}
html[data-hf-theme="dark"] .mypage-daily-reward-button.is-complete {
  border-color: #327c57;
}
html[data-hf-theme="dark"] .mypage-setting-copy strong {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .mypage-point-summary {
  background: linear-gradient(135deg, #173c4f, #10243b 70%);
  border-color: #2f677f;
}
html[data-hf-theme="dark"] .mypage-point-balance-block strong {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .mypage-point-mission-list {
  background: #111820;
}
html[data-hf-theme="dark"] .mypage-point-mission-row {
  border-bottom-color: #2a3944;
}
html[data-hf-theme="dark"] .mypage-point-mission-copy strong {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .mypage-point-mission-copy small,
html[data-hf-theme="dark"] .mypage-point-mission-status {
  color: #c7d4da;
}
html[data-hf-theme="dark"] .mypage-point-mission-status.is-earned {
  color: var(--mypage-green);
}
html[data-hf-theme="dark"] .mypage-ledger-list {
  background: #111820;
}
html[data-hf-theme="dark"] .mypage-ledger-row {
  border-bottom: 1px solid #2a3944;
}
html[data-hf-theme="dark"] .mypage-ledger-copy strong {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .mypage-ledger-time {
  color: #c7d4da;
}
html[data-hf-theme="dark"] .mypage-empty-ledger {
  color: #c7d4da;
}
html[data-hf-theme="dark"] .mypage-info-description {
  color: #f1f6f8;
  background: #1a384c;
  border: 1px solid #246289;
}
@media (max-width: 768px) {
  html[data-hf-theme="dark"] .mypage-page {
    background: #111820;
  }
  html[data-hf-theme="dark"] .mypage-root-page {
    background: #151f28;
  }
  html[data-hf-theme="dark"] .mypage-mobile-backlink {
    color: #e2ebef !important;
  }
  html[data-hf-theme="dark"] .mypage-mobile-backlink .fa {
    color: #e2ebef;
  }
  html[data-hf-theme="dark"] .mypage-root-page .mypage-nav-secondary-group {
    background: #111820;
    border: 1px solid #2a3944;
  }
  html[data-hf-theme="dark"] .mypage-root-page .mypage-nav-secondary-group > a {
    color: #f1f6f8;
    background: #111820;
    border-color: #2a3944;
  }
  html[data-hf-theme="dark"]
    .mypage-root-page
    .mypage-nav-secondary-group
    > a:hover,
  html[data-hf-theme="dark"]
    .mypage-root-page
    .mypage-nav-secondary-group
    > a:focus,
  html[data-hf-theme="dark"]
    .mypage-root-page
    .mypage-nav-secondary-group
    > a.is-active {
    color: #f1f6f8;
    background: #263340;
  }
  html[data-hf-theme="dark"] .mypage-root-page .mypage-nav-icon-tile {
    color: #73b8e8;
  }
  html[data-hf-theme="dark"] .mypage-root-page .mypage-nav-icon-tile .fa {
    color: #73b8e8;
  }
  html[data-hf-theme="dark"] .mypage-root-page .mypage-nav-label {
    color: #f1f6f8;
  }
  html[data-hf-theme="dark"] .mypage-root-page .mypage-sidebar b {
    color: #e2ebef;
  }
  html[data-hf-theme="dark"] .mypage-root-page .mypage-nav-chevron {
    color: #e2ebef;
  }
  html[data-hf-theme="dark"] .community-post-list {
    background: #111820;
    border-top: 1px solid #2a3944;
    border-bottom: 1px solid #2a3944;
  }
}
html[data-hf-theme="dark"] .mypage-point-help-button {
  color: #e2ebef;
  background: #151f28;
  border: 1px solid #344854;
}
html[data-hf-theme="dark"] .mypage-point-help-button:hover,
html[data-hf-theme="dark"] .mypage-point-help-button:focus {
  background: #17404f;
  border-color: #246e89;
}
html[data-hf-theme="dark"] .mypage-point-help-tooltip {
  color: #e2ebef;
  background: #111820;
  border: 1px solid #344854;
}
html[data-hf-theme="dark"] .mypage-point-help-tooltip strong {
  color: #f1f6f8;
}

/* Auto-audited dark overrides from css/mypage_recent_chats.css */
html[data-hf-theme="dark"] .mypage-recent-item {
  background: #111820;
}
html[data-hf-theme="dark"] .mypage-recent-trigger {
  background: #111820;
}
html[data-hf-theme="dark"] .mypage-recent-trigger:hover,
html[data-hf-theme="dark"] .mypage-recent-trigger:focus {
  background: #263340;
}
html[data-hf-theme="dark"] .mypage-recent-trigger-copy > strong {
  color: #f1f6f8;
}
html[data-hf-theme="dark"]
  .mypage-recent-trigger-copy
  > small
  > span[aria-hidden="true"] {
  color: #9aabb5;
}
html[data-hf-theme="dark"] .mypage-recent-trigger > .fa {
  color: #c7d4da;
}
html[data-hf-theme="dark"] .mypage-recent-body {
  background: #111820;
}
html[data-hf-theme="dark"] .mypage-recent-history p.is-peer {
  color: #f1f6f8;
  background: #111820;
}
html[data-hf-theme="dark"] .mypage-recent-no-messages {
  color: #c7d4da;
}
html[data-hf-theme="dark"] .mypage-recent-footer {
  border-top: 1px solid #2a3944;
}
html[data-hf-theme="dark"] .mypage-recent-context > span {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .mypage-recent-context > span.is-warning {
  color: #d28989;
}
html[data-hf-theme="dark"] .mypage-recent-context > span.is-muted {
  color: #c7d4da;
}
html[data-hf-theme="dark"] .mypage-note-button {
  color: #f1f6f8;
  background: #111820;
  border: 1px solid #344854;
}
html[data-hf-theme="dark"] .mypage-note-button:hover,
html[data-hf-theme="dark"] .mypage-note-button:focus {
  border-color: #247189;
}
html[data-hf-theme="dark"] .mypage-note-button.is-room {
  border-color: #277087;
}
html[data-hf-theme="dark"] .mypage-note-button.is-room:hover,
html[data-hf-theme="dark"] .mypage-note-button.is-room:focus {
  border-color: #277386;
}
html[data-hf-theme="dark"] .mypage-note-button.is-disabled,
html[data-hf-theme="dark"] .mypage-note-button:disabled {
  color: #c7d4da;
  border-color: #2a3944;
}
html[data-hf-theme="dark"] .mypage-recent-empty {
  background: #263340;
}
html[data-hf-theme="dark"] .mypage-recent-empty > strong {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .mypage-note-dialog h2 {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .mypage-note-dialog .hf-modal-body > label {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] #mypage_note_content {
  color: #f1f6f8;
  background: #111820;
  border: 1px solid #344854;
}
html[data-hf-theme="dark"] #mypage_note_content:focus {
  border-color: #247089;
}
html[data-hf-theme="dark"] #mypage_note_error {
  color: #d28989;
}
html[data-hf-theme="dark"] .mypage-note-field-meta > b {
  color: #c7d4da;
}
html[data-hf-theme="dark"] .mypage-note-cancel {
  color: #e2ebef;
  background: #111820;
  border: 1px solid #344854;
}

/* Auto-audited dark overrides from css/mypage_conversation.css */
html[data-hf-theme="dark"] .mypage-conversation-detail-main {
  background-color: #151f28;
}
html[data-hf-theme="dark"] .mypage-conversation-page-head {
  background: rgba(17, 24, 32, 0.96);
  border: 1px solid rgba(52, 72, 84, 0.96);
}
html[data-hf-theme="dark"] .mypage-conversation-back {
  color: #e2ebef !important;
}
html[data-hf-theme="dark"] .mypage-conversation-back:hover {
  color: #f1f6f8 !important;
  background: #17212b;
}
html[data-hf-theme="dark"] .mypage-conversation-partner strong {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .mypage-conversation-shell {
  background: #111820;
}
html[data-hf-theme="dark"] .mypage-conversation-message-area {
  background: #111820;
}
html[data-hf-theme="dark"] .mypage-conversation-date-divider span {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .mypage-conversation-meta {
  color: #c7d4da;
}
html[data-hf-theme="dark"] .mypage-conversation-meta time {
  color: #c7d4da;
}
html[data-hf-theme="dark"] .mypage-conversation-unread-indicator {
  color: #88bed3;
}
html[data-hf-theme="dark"] .mypage-conversation-empty > span,
html[data-hf-theme="dark"] .mypage-conversation-closed-notice > span {
  background: rgba(17, 24, 32, 0.86);
}
html[data-hf-theme="dark"] .mypage-conversation-closed-notice > span {
  color: #c7d4da;
  background: #151f28;
}
html[data-hf-theme="dark"] .mypage-conversation-empty strong,
html[data-hf-theme="dark"] .mypage-conversation-closed-notice strong {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .mypage-conversation-composer {
  background: #111820;
  border-top: 1px solid #2a3944;
}
html[data-hf-theme="dark"] .mypage-conversation-composer textarea {
  color: #f1f6f8;
  background: #111820;
  border: 1px solid #344854;
}
html[data-hf-theme="dark"] .mypage-conversation-composer textarea:focus {
  background: #111820;
}
html[data-hf-theme="dark"] .mypage-conversation-tombstone {
  background: rgba(17, 24, 32, 0.97);
}
html[data-hf-theme="dark"] .mypage-conversation-tombstone > span {
  color: #c7d4da;
  background: #151f28;
}
html[data-hf-theme="dark"] .mypage-conversation-tombstone strong {
  color: #f1f6f8;
}
@media (max-width: 768px) {
  html[data-hf-theme="dark"]
    body.hf-chat-page
    .mypage-conversation-detail-main.hf-chat-stage[data-hf-chat-stage] {
    background-color: #243942;
  }
  html[data-hf-theme="dark"] .mypage-conversation-page-head {
    background: #111820;
    border-bottom: 1px solid #2a3944;
  }
}

/* Auto-audited dark overrides from css/mypage_realtime.css */
html[data-hf-theme="dark"] .mypage-notification-badge {
  border: 2px solid #2a3944;
}
html[data-hf-theme="dark"] .mypage-notification-panel {
  background: #111820;
}
html[data-hf-theme="dark"] .mypage-notification-item {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .mypage-notification-status-dot {
  background: #1d2a35;
}
html[data-hf-theme="dark"] .mypage-notification-item-copy strong {
  color: #f1f6f8;
}
html[data-hf-theme="dark"] .mypage-notification-item-copy small {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .mypage-notification-item-meta {
  color: #c7d4da;
}
html[data-hf-theme="dark"] .mypage-notification-item-meta span::after {
  background: #1d2a35;
}
html[data-hf-theme="dark"] .mypage-notification-empty {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .mypage-realtime-toast {
  color: #f1f6f8;
  background: #111820;
  border: 1px solid #366677;
}
html[data-hf-theme="dark"] .mypage-realtime-toast-icon {
  color: #73d0e8;
  background: #18414e;
}
html[data-hf-theme="dark"] .mypage-realtime-toast-copy small {
  color: #e2ebef;
}
html[data-hf-theme="dark"] .mypage-realtime-toast-close {
  color: #c7d4da;
}
html[data-hf-theme="dark"] .mypage-realtime-toast-close:hover,
html[data-hf-theme="dark"] .mypage-realtime-toast-close:focus {
  color: #e2ebef;
  background: #151f28;
}

/* Auto-audited dark overrides from css/site-ads.css */
html[data-hf-theme="dark"] .mootoon-affiliate-inline {
  background-color: #111820;
}
html[data-hf-theme="dark"] .community-feed-ad-slot {
  border-bottom: 1px solid #2a3944;
}
html[data-hf-theme="dark"] .mobon-banner,
html[data-hf-theme="dark"] .site-ad-slot--chat-sidebar,
html[data-hf-theme="dark"] .site-ad-guide-shell {
  background: #151f28;
  border-color: #344854;
}
html[data-hf-theme="dark"] .site-ad-guide-shell {
  border-color: #2a3944;
}

/* Shared desktop chat back action: keep dark-mode color/hover identical across
 * random / room / H / persistent conversation. */
@media (min-width: 769px) {
  html[data-hf-theme="dark"]
    body.hf-chat-page
    .hf-chat-stage[data-hf-chat-stage]
    .hf-chat-mobile-appbar-back {
    color: #e2ebef !important;
    background: transparent !important;
  }

  html[data-hf-theme="dark"]
    body.hf-chat-page
    .hf-chat-stage[data-hf-chat-stage]
    .hf-chat-mobile-appbar-back:hover,
  html[data-hf-theme="dark"]
    body.hf-chat-page
    .hf-chat-stage[data-hf-chat-stage]
    .hf-chat-mobile-appbar-back:focus {
    color: #f1f6f8 !important;
    background: transparent !important;
  }
}
