:root[data-theme] {
  --portal-ink: #242424;
  --portal-muted: #595959;
  --portal-accent: #a81820;
  --portal-line: #d7d7d7;
  --portal-column: 1180px;
  --color-gold-700: var(--portal-accent);
  --color-gold-500: var(--portal-accent);
  --color-gold-200: var(--portal-line);
  --color-ink: var(--portal-ink);
  --color-muted: var(--portal-muted);
  --color-paper: #fff;
  --color-panel: #fff;
  --color-line: var(--portal-line);
  --theme-html-background: #fff;
  --theme-body-background: #fff;
  --theme-header-background: linear-gradient(#fff, #fff);
  --theme-header-image: none;
  --theme-mobile-header-image: none;
  --theme-brand-mark-background: none;
  --theme-logo-image: none;
  --theme-brand-mark-color: #fff;
  --theme-nav-color: var(--portal-ink);
  --theme-nav-active-background: var(--portal-accent);
  --theme-nav-active-color: #fff;
  --theme-home-frame-background: #fff;
  --theme-home-frame-border: var(--portal-line);
  --theme-section-border: var(--portal-line);
  --theme-modal-head-background: var(--portal-accent);
  --theme-modal-period-color: #fff;
  --theme-modal-ad-color: #fff;
  --theme-ad-section-background: #fff;
  --theme-ad-background: #fff;
  --theme-ad-hover-background: #fff;
  --theme-ad-border: var(--portal-line);
  --theme-trust-section-background: #fff;
  --theme-trust-card-background: #fff;
  --theme-trust-card-border: var(--portal-line);
  --theme-trust-muted-color: var(--portal-muted);
  --theme-register-background: #fff;
  --theme-register-border: var(--portal-line);
  --theme-footer-background: #fff;
  --theme-footer-color: var(--portal-ink);
}

body.portal-home { background: #fff; }

.portal-home .portal-content,
.portal-home .draw-sticky-wrapper,
.portal-home .site-footer {
  width: min(calc(100% - 24px), var(--portal-column));
  margin-inline: auto;
}

.portal-masthead > a {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
}
.portal-masthead__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@media (min-width: 901px) {
  .portal-masthead > a {
    max-width: 960px;
    max-height: min(400px, 60svh);
    margin-inline: auto;
    background: #2a1108;
  }
}

.portal-home .draw-sticky-wrapper {
  position: relative;
  inset: auto;
  margin-block: 12px;
  padding: 0;
  box-shadow: none;
  z-index: auto;
}
.portal-home .draw-sticky-wrapper > .site-container { width: 100%; max-width: none; }
.portal-home #main-content { width: 100%; max-width: none; padding-top: 0; margin-top: 0; }
.portal-home .portal-content { display: grid; gap: 12px; padding: 0 0 24px; }
.portal-home .post-list-v2 { width: 100%; }

.portal-live, .portal-gallery, .portal-static-page {
  background: #fff;
  color: var(--portal-ink);
  border: 1px solid var(--portal-line);
  border-radius: 12px;
}
.portal-live { overflow: hidden; }
.portal-live header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--portal-line);
}
.portal-live h2, .portal-gallery h2 { margin: 0; font-size: 17px; }
.portal-live a, .portal-gallery a { color: var(--portal-accent); }
.portal-live iframe, .portal-live__video { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.portal-live__video { background: #171717; }
.portal-live__idle {
  display: grid;
  place-content: center;
  justify-items: center;
  min-height: clamp(112px, 29vw, 210px);
  gap: 9px;
}
.portal-live__idle span {
  width: 38px;
  line-height: 38px;
  text-align: center;
  border-radius: 50%;
  border: 1px solid var(--portal-line);
  color: var(--portal-accent);
}
.portal-live__idle p, .portal-live__actions p { margin: 0; color: var(--portal-muted); font-size: 14px; }
.portal-live__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 18px; }
.portal-live__actions button, .portal-post-tip button {
  border: 0;
  border-radius: 6px;
  padding: 8px 12px;
  background: var(--portal-accent);
  color: #fff;
  cursor: pointer;
}
.portal-live__actions button:disabled { opacity: .7; cursor: wait; }

.portal-gallery {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
}
.portal-gallery p { margin: 4px 0 0; font-size: 13px; color: var(--portal-muted); }
.portal-gallery a { padding: 8px 10px; border-bottom: 1px solid var(--portal-line); white-space: nowrap; }

.portal-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--portal-line);
  margin-bottom: 14px;
}
.portal-footer-links a { color: var(--portal-accent); padding-block: 6px; }
.portal-footer-links a:hover, .portal-footer-links a:focus-visible { text-decoration: underline; }
.portal-footer-pages summary { padding-block: 6px; color: var(--portal-accent); cursor: pointer; }
.portal-footer-pages ul { margin: 4px 0 0; padding-left: 20px; }

.portal-static-page { width: min(calc(100% - 24px), 740px); margin: 18px auto; padding: clamp(16px, 4vw, 30px); }
.portal-static-page h1, .portal-static-page h2 { color: var(--portal-accent); }
.portal-static-page__body { white-space: pre-wrap; line-height: 1.8; overflow-wrap: anywhere; }
.portal-post-tip form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.portal-post-tip input { width: 90px; }
.portal-draw-history { list-style: none; margin: 0; padding: 0; }
.portal-draw-history li { padding: 12px 0; border-top: 1px solid var(--portal-line); }
.portal-draw-history time { color: var(--portal-muted); margin-left: 9px; font-size: 12px; }
.portal-draw-history p { margin: 6px 0 0; font-variant-numeric: tabular-nums; }
.portal-draw-history__special { color: var(--portal-accent); }

.desktop-header, .mobile-header { background-color: #fff; }
.mobile-bottom-nav { background: #fff; border-top-color: var(--portal-line); }
.mobile-bottom-nav__item { color: var(--portal-muted); }
.mobile-bottom-nav__item.is-active { color: var(--portal-accent); background: #fff; }
.site-footer h2, .site-footer__mobile strong { color: var(--portal-ink); }

.home-announcement-bar {
  color: var(--portal-ink);
  background: #fff;
  border: 1px solid var(--portal-line);
}
.home-announcement-bar__label { color: #fff; background: var(--portal-accent); }
.home-announcement-bar__track span { text-shadow: none; }

.draw-result, .draw-result__head, .draw-result__ball--pending,
.home-post-modal__meta, .home-post-modal__unlock, .home-post-modal__unlock-action,
.home-post-modal__section, .home-post-modal__history span,
.material-detail-page, .material-detail-panel, .material-detail-hero,
.material-detail-info dl > div, .material-detail-row,
.auth-panel, .auth-field input,
.info-shell, .info-section, .info-lead, .recharge-form input, .recharge-history, .recharge-history__row,
.service-chat-form, .service-login-required, .service-qr img, .service-chat-form input, .service-chat-form textarea,
.service-message, .gallery-sync-meta, .gallery-image-card, .gallery-period-tab,
.user-center-shell, .user-summary-item, .user-menu button, .user-empty-box,
.tools-hero, .home-ai-entry, .tools-entry-card, .tools-toolbar, .tools-toolbar select,
.picker-section, .random-panel, .random-result, .analysis-section, .analysis-card, .analysis-empty,
.random-form-grid select, .random-form-grid input, .random-shortcuts button, .set-mode button,
.status-list li, .notice-list li {
  border-color: var(--portal-line);
}

.draw-result__numbers--pending, .draw-result__ball--pending,
.home-post-modal__card, .home-post-modal__meta, .home-post-modal__unlock, .home-post-modal__unlock-action,
.material-detail-page, .material-related-list a,
.auth-panel, .info-shell, .info-lead, .service-chat-form, .service-login-required, .service-message--admin,
.service-qr img, .gallery-sync-meta, .user-center-shell, .user-summary-item, .user-menu button,
body.post-card-body, .post-card-main, .post-card-page, .post-card-topbar,
.tools-hero, .home-ai-entry, .tools-disclaimer, .analysis-sample-note, .compact-metrics span,
.status-list li, .notice-list li {
  background: #fff;
}
.draw-result__ball--pending { color: var(--portal-muted); }

.auth-titlebar, .info-titlebar, .user-center-heading, .material-detail-hero,
.auth-submit, .auth-submit:hover, .auth-submit:focus-visible,
.user-menu button:hover, .user-menu button:focus-visible,
.home-trust-point > span, .home-register-callout__gift, .home-register-callout a, .capsule-ad__action {
  background: var(--portal-accent);
  border-color: var(--portal-accent);
  color: #fff;
  box-shadow: none;
}

.auth-titlebar span, .info-titlebar span, .user-center-heading span,
.material-detail-titlebar, .material-detail-titlebar strong { color: #fff; }
.home-register-callout strong { color: var(--portal-accent); }
.home-register-callout small { color: var(--portal-muted); }
.material-related-list a { border-color: var(--portal-line); }
.toast { background: #262626; color: #fff; }
.toast button { color: #fff; }

body.lottery-tool-body .ai-picker-tabs,
body.lottery-tool-body .analysis-tabs,
body.lottery-tool-body .picker-result-panel,
body.lottery-tool-body .condition-chip:not(.is-active) {
  background: #fff;
  border-color: var(--portal-line);
}
body.lottery-tool-body .number-ball.is-selected {
  background: #fff;
  outline-color: var(--portal-accent);
}
.tools-disclaimer, .analysis-sample-note, .analysis-section th, .analysis-section td { border-color: var(--portal-line); }
.compact-metrics span { border: 1px solid var(--portal-line); }
body .notice-center__hero, body .notice-center__manual, body .notice-center__instructions dl div { background: #fff; }

@media (max-width: 650px) {
  .portal-home .portal-content { gap: 10px; }
}
