/* BBW Archive public appearance layer. Dark remains the default; warm light is opt-in. */
:root {
  color-scheme: dark;
  --site-accent: #d84a32;
  --site-accent-strong: #b93422;
}

html[data-theme="light"] {
  color-scheme: light;
  --site-bg: #f5efe5;
  --site-surface: #fffaf2;
  --site-surface-raised: #fffdf8;
  --site-text: #2d211c;
  --site-muted: #78685e;
  --site-line: #d9cbbd;
  --site-soft: #eee2d5;
  --account-bg: #f5efe5;
  --account-card: #fffaf2;
  --account-panel: #fffaf2;
  --account-panel-2: #fffdf8;
  --account-text: #2d211c;
  --account-muted: #78685e;
  --account-line: #d9cbbd;
}

html[data-theme="light"] body {
  background: var(--site-bg) !important;
  color: var(--site-text) !important;
}

html[data-theme="light"] body::before,
html[data-theme="light"] body::after { opacity: .12 !important; }

html[data-theme="light"] header,
html[data-theme="light"] .container,
html[data-theme="light"] .card,
html[data-theme="light"] .model-card,
html[data-theme="light"] .post-card,
html[data-theme="light"] .community-shell,
html[data-theme="light"] .community-card,
html[data-theme="light"] .comment-card,
html[data-theme="light"] .account-card,
html[data-theme="light"] .profile-hero,
html[data-theme="light"] .legal-card,
html[data-theme="light"] .contact-card,
html[data-theme="light"] .sitemap-card,
html[data-theme="light"] .error-card {
  background-color: var(--site-surface) !important;
  color: var(--site-text) !important;
  border-color: var(--site-line) !important;
  box-shadow: 0 18px 50px rgba(84, 55, 37, .10) !important;
}

html[data-theme="light"] nav,
html[data-theme="light"] .topbar,
html[data-theme="light"] .account-topbar,
html[data-theme="light"] .account-widget-menu,
html[data-theme="light"] .shared-site-footer {
  background-color: rgba(255, 250, 242, .96) !important;
  color: var(--site-text) !important;
  border-color: var(--site-line) !important;
}

html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] strong,
html[data-theme="light"] label,
html[data-theme="light"] .title,
html[data-theme="light"] .model-name { color: var(--site-text) !important; }

html[data-theme="light"] p,
html[data-theme="light"] small,
html[data-theme="light"] .muted,
html[data-theme="light"] .model-description,
html[data-theme="light"] .account-help,
html[data-theme="light"] .account-empty { color: var(--site-muted) !important; }

html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select {
  background: var(--site-surface-raised) !important;
  color: var(--site-text) !important;
  border-color: #cdbdae !important;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder { color: #9b8c82 !important; }

html[data-theme="light"] input:disabled,
html[data-theme="light"] textarea:disabled,
html[data-theme="light"] select:disabled {
  background: #eee5da !important;
  color: #76685f !important;
  opacity: 1;
}

html[data-theme="light"] .control,
html[data-theme="light"] .sort-controls,
html[data-theme="light"] .pagination,
html[data-theme="light"] .modal-box,
html[data-theme="light"] .upload-rules,
html[data-theme="light"] .settings-fieldset,
html[data-theme="light"] .account-list-item,
html[data-theme="light"] .submission-item,
html[data-theme="light"] .favorite-card {
  background: var(--site-surface-raised) !important;
  color: var(--site-text) !important;
  border-color: var(--site-line) !important;
}

html[data-theme="light"] .setting-choice {
  background: var(--site-surface-raised) !important;
  color: var(--site-text) !important;
  border-color: var(--site-line) !important;
}

html[data-theme="light"] .setting-choice:has(input:checked) {
  background: #fff4ea !important;
  border-color: #d47a66 !important;
  box-shadow: 0 0 0 2px rgba(216,74,50,.10);
}

html[data-theme="light"] .setting-choice strong { color: var(--site-text) !important; }
html[data-theme="light"] .setting-choice small { color: var(--site-muted) !important; }

html[data-theme="light"] .account-widget-button {
  background: var(--site-surface-raised) !important;
  color: var(--site-text) !important;
  border-color: var(--site-line) !important;
}

html[data-theme="light"] .account-widget-links a,
html[data-theme="light"] .account-widget-links button,
html[data-theme="light"] .shared-site-footer a { color: #503b31 !important; }

html[data-theme="light"] .account-widget-links a:hover,
html[data-theme="light"] .account-widget-links button:hover,
html[data-theme="light"] .shared-site-footer a:hover { background: #f1dfd2 !important; color: var(--site-accent-strong) !important; }

/* Shared branded headers used by legal and contact pages. */
html[data-theme="light"] .topbar .brand {
  color: var(--site-text) !important;
  background: transparent !important;
}
html[data-theme="light"] .topbar .brand img {
  content: url("/images/logo-dark.png");
  width: 100px !important;
  height: auto !important;
  max-height: 50px;
}
html[data-theme="light"] .topbar .brand > span { display: none; }
html[data-theme="light"] .home-link {
  background: var(--site-surface-raised) !important;
  color: var(--site-text) !important;
  border-color: var(--site-line) !important;
}
html[data-theme="light"] .home-link:hover {
  background: var(--site-soft) !important;
  color: var(--site-accent-strong) !important;
  border-color: #c99586 !important;
}

html[data-theme="light"] .save-post-button {
  background: var(--site-surface-raised) !important;
  color: var(--site-text) !important;
  border-color: #c99586 !important;
}

html[data-theme="light"] .save-post-button.saved { background: #f7d9d0 !important; color: #8f281a !important; }
html[data-theme="light"] .download-total,
html[data-theme="light"] .tag,
html[data-theme="light"] .pill { color: #6f5b50 !important; border-color: var(--site-line) !important; background: var(--site-soft) !important; }
html[data-theme="light"] .nav-arrow { background: rgba(255,250,242,.96) !important; color: var(--site-text) !important; border-color: var(--site-line) !important; }

/* Homepage */
html[data-theme="light"] .hero h1,
html[data-theme="light"] .section h3,
html[data-theme="light"] .box h4 { color: var(--site-text) !important; }
html[data-theme="light"] .hero p,
html[data-theme="light"] .about-card p,
html[data-theme="light"] .box p,
html[data-theme="light"] .section-header p { color: var(--site-muted) !important; }
html[data-theme="light"] .about-card,
html[data-theme="light"] .box,
html[data-theme="light"] .badge,
html[data-theme="light"] .secondary-btn {
  background: var(--site-surface) !important;
  color: var(--site-text) !important;
  border-color: var(--site-line) !important;
  box-shadow: 0 16px 42px rgba(84,55,37,.09) !important;
}
html[data-theme="light"] .box-icon { background:#f1dfd2 !important; }
html[data-theme="light"] .divider { background:var(--site-line) !important; }
html[data-theme="light"] .logo,
html[data-theme="light"] .account-brand {
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
}
html[data-theme="light"] .logo img,
html[data-theme="light"] .account-brand img { content: url("/images/logo-dark.png"); }

/* Legal pages */
html[data-theme="light"] .hero:has(.updated) {
  background: var(--site-surface) !important;
  color: var(--site-text) !important;
  border-color: var(--site-line) !important;
  box-shadow: 0 18px 50px rgba(84,55,37,.10) !important;
}
html[data-theme="light"] .updated,
html[data-theme="light"] .note {
  background: #fff4ea !important;
  color: var(--site-muted) !important;
  border-color: #d8ad9f !important;
}
html[data-theme="light"] .contents a { color: var(--site-muted) !important; }
html[data-theme="light"] .contents a:hover {
  background: var(--site-soft) !important;
  color: var(--site-accent-strong) !important;
}
html[data-theme="light"] .policy section + section,
html[data-theme="light"] .data-table th,
html[data-theme="light"] .data-table td { border-color: var(--site-line) !important; }

/* Contact form */
html[data-theme="light"] .info-card ul,
html[data-theme="light"] .privacy-card p,
html[data-theme="light"] .required-note,
html[data-theme="light"] .counter,
html[data-theme="light"] .success-panel p:not(.eyebrow) { color: var(--site-muted) !important; }
html[data-theme="light"] .consent,
html[data-theme="light"] .reference-code {
  background: var(--site-soft) !important;
  color: var(--site-muted) !important;
  border-color: var(--site-line) !important;
}
html[data-theme="light"] .secondary-button {
  background: var(--site-surface-raised) !important;
  color: var(--site-text) !important;
  border-color: var(--site-line) !important;
}
html[data-theme="light"] .form-status {
  background: #fff1eb !important;
  color: #8f281a !important;
}

/* HTML sitemap */
html[data-theme="light"] .stat,
html[data-theme="light"] .link-row,
html[data-theme="light"] details,
html[data-theme="light"] .empty,
html[data-theme="light"] .xml-note {
  background: var(--site-surface) !important;
  color: var(--site-text) !important;
  border-color: var(--site-line) !important;
  box-shadow: 0 14px 36px rgba(84,55,37,.08) !important;
}
html[data-theme="light"] details .link-row { background: var(--site-surface-raised) !important; }
html[data-theme="light"] .link-row:hover { background: #fff4ea !important; border-color: #c99586 !important; }
html[data-theme="light"] .stat span,
html[data-theme="light"] .search-status,
html[data-theme="light"] .group-head p,
html[data-theme="light"] .link-path,
html[data-theme="light"] .link-meta,
html[data-theme="light"] .summary-meta,
html[data-theme="light"] .xml-note { color: var(--site-muted) !important; }
html[data-theme="light"] summary::after { background: var(--site-soft) !important; color: var(--site-accent-strong) !important; }
html[data-theme="light"] .xml-note a { color: var(--site-accent-strong) !important; }

/* Category and model galleries */
html[data-theme="light"] .model-profile,
html[data-theme="light"] .announcement,
html[data-theme="light"] .status,
html[data-theme="light"] .tile,
html[data-theme="light"] .model-card,
html[data-theme="light"] .load-more-btn,
html[data-theme="light"] .back-to-top {
  background: var(--site-surface) !important;
  color: var(--site-text) !important;
  border-color: var(--site-line) !important;
  box-shadow: 0 16px 42px rgba(84,55,37,.10) !important;
}
html[data-theme="light"] .caption { background:linear-gradient(180deg,rgba(255,250,242,.86),#fffaf2) !important;color:var(--site-text) !important; }
html[data-theme="light"] .model-description,
html[data-theme="light"] .announcement-message,
html[data-theme="light"] .load-more-hint,
html[data-theme="light"] .bottom-counter { color:var(--site-muted) !important; }
html[data-theme="light"] .circle-btn { background:#fffdf8 !important;color:#503b31 !important;border-color:var(--site-line) !important; }

/* Post and community areas */
html[data-theme="light"] .container h1,
html[data-theme="light"] .modal-box h2 { color:var(--site-text) !important; }
html[data-theme="light"] .meta,
html[data-theme="light"] .desc { color:var(--site-muted) !important; }
html[data-theme="light"] .community-panel,
html[data-theme="light"] .community-composer,
html[data-theme="light"] .community-comment,
html[data-theme="light"] .community-rules-dialog {
  background:var(--site-surface) !important;
  color:var(--site-text) !important;
  border-color:var(--site-line) !important;
  box-shadow:0 16px 42px rgba(84,55,37,.10) !important;
}
html[data-theme="light"] .community-body,
html[data-theme="light"] .community-rules-dialog ol { color:var(--site-text) !important; }
html[data-theme="light"] .community-count,
html[data-theme="light"] .community-help,
html[data-theme="light"] .community-empty,
html[data-theme="light"] .community-status,
html[data-theme="light"] .community-link-button,
html[data-theme="light"] .community-time { color:var(--site-muted) !important; }
html[data-theme="light"] .community-reaction,
html[data-theme="light"] .community-button.secondary,
html[data-theme="light"] .community-composer input,
html[data-theme="light"] .community-composer textarea,
html[data-theme="light"] .community-edit textarea { background:#fffdf8 !important;color:var(--site-text) !important;border-color:var(--site-line) !important; }

html[data-theme="light"] .account-toast { background:#fff6ed;color:var(--site-text);border-color:#c99586;box-shadow:0 20px 55px rgba(84,55,37,.18); }

@media (max-width: 760px) {
  html[data-theme="light"] .account-widget-menu {
    background: var(--site-surface-raised) !important;
    border-color: var(--site-line) !important;
  }
  html[data-theme="light"] .account-widget-sheet-head {
    background: var(--site-surface-raised) !important;
  }
  html[data-theme="light"] .account-widget-close {
    background: #eee2d5 !important;
    color: var(--site-text) !important;
  }
}

/* Warm-light component consistency fixes. */
html[data-theme="light"] .top-daily-card {
  background: #ead9cc !important;
  border-color: #c9b4a3 !important;
  box-shadow: 0 18px 42px rgba(84, 55, 37, .14) !important;
}
html[data-theme="light"] .top-daily-copy {
  background: linear-gradient(180deg, #f1e2d6, #ead9cc) !important;
}
html[data-theme="light"] .top-daily-copy strong { color: var(--site-text) !important; }
html[data-theme="light"] .top-daily-copy small,
html[data-theme="light"] .top-daily-status { color: var(--site-muted) !important; }
html[data-theme="light"] .top-daily-control,
html[data-theme="light"] .top-daily-empty,
html[data-theme="light"] .top-daily-skeleton {
  background: var(--site-surface-raised) !important;
  color: var(--site-text) !important;
  border-color: var(--site-line) !important;
}
html[data-theme="light"] .top-daily-track {
  scrollbar-color: var(--site-accent) var(--site-soft) !important;
}
html[data-theme="light"] .top-daily-track::-webkit-scrollbar-track {
  background: var(--site-soft) !important;
}

html[data-theme="light"] .box .box-link,
html[data-theme="light"] .box button {
  background: #f1dfd2 !important;
  color: #503b31 !important;
  border-color: #cfb8a7 !important;
}
html[data-theme="light"] .box .box-link:hover,
html[data-theme="light"] .box .box-link:focus-visible,
html[data-theme="light"] .box button:hover {
  background: var(--site-accent) !important;
  color: #fff !important;
  border-color: var(--site-accent) !important;
}

html[data-theme="light"] .shared-site-footer {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
html[data-theme="light"] .shared-site-footer__content {
  border-color: var(--site-line) !important;
}
html[data-theme="light"] .shared-site-footer__links {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

html[data-theme="light"] .sort-controls,
html[data-theme="light"] .sort-controls .control {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
html[data-theme="light"] #searchInput,
html[data-theme="light"] #sortSelect,
html[data-theme="light"] #pageSizeSelect,
html[data-theme="light"] .sort-controls select,
html[data-theme="light"] .page-size-control select {
  color-scheme: light !important;
  background: var(--site-surface-raised) !important;
  color: var(--site-text) !important;
  border-color: #cdbdae !important;
}
html[data-theme="light"] #searchInput::placeholder {
  color: #9b8c82 !important;
}
html[data-theme="light"] .sort-controls option,
html[data-theme="light"] .page-size-control option {
  background: var(--site-surface-raised) !important;
  color: var(--site-text) !important;
}

html[data-theme="light"] .announcement-title { color: var(--site-text) !important; }
html[data-theme="light"] .announcement-link { color: var(--site-accent-strong) !important; }
html[data-theme="light"] .announcement-close {
  background: var(--site-soft) !important;
  color: var(--site-muted) !important;
}

html[data-theme="light"] .page-wrap .notice {
  background: #f1e2d6 !important;
  color: var(--site-muted) !important;
  border-left-color: var(--site-accent) !important;
}
html[data-theme="light"] .page-wrap .notice a { color: #704236 !important; }
html[data-theme="light"] .page-wrap > a {
  color: var(--site-text) !important;
  border-color: #bfa895 !important;
  background: var(--site-surface-raised) !important;
}
html[data-theme="light"] .page-wrap li a { color: #6f5145 !important; }

html[data-theme="light"] .denial-reason {
  background: #f5e0d9 !important;
  border-left-color: #c54a37 !important;
}
html[data-theme="light"] .denial-reason strong { color: #6f2f25 !important; }
html[data-theme="light"] .denial-reason p { color: #745f55 !important; }
