/* AniTokyo Halloween. All seasonal styles are scoped to this template class. */
body.halloween-theme {
  --hw-night: #130f20;
  --hw-surface: #fffaf3;
  --hw-surface-alt: #f6edf2;
  --hw-ink: #433349;
  --hw-muted: #77667f;
  --hw-link: #84451c;
  --hw-line: #e8d8dd;
  --hw-orange: #c26117;
  --hw-glow: #ffad57;
  --hw-purple: #78519d;
  --hw-empty: #cfc1ce;
  margin: 0;
  color: var(--hw-ink);
  background: var(--hw-night) url('../images/halloween/header-night.jpg') no-repeat center top / max(1440px, 100vw) auto;
  overflow-x: clip;
}
body.halloween-theme.dark {
  --hw-surface: #241c2e;
  --hw-surface-alt: #2e233a;
  --hw-ink: #ede4f2;
  --hw-muted: #c1b1ca;
  --hw-link: #ffb66d;
  --hw-line: #48364f;
  --hw-orange: #ffab57;
  --hw-purple: #c1a3e4;
  --hw-empty: #68566f;
  background-color: var(--hw-night);
  color: var(--hw-ink);
}
.halloween-theme a { color: var(--hw-link); }
.halloween-theme a:hover { color: var(--hw-purple); }
.halloween-theme :is(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--hw-orange) !important;
  outline-offset: 3px !important;
}
.halloween-theme ::selection { background: #74408d; color: #fff; }
.halloween-theme .header { position: relative; }
.halloween-theme :is(.content, .sidebar-left, .sidebar-right, .logo-box, .releases-box, .footer-left, .footer-design) {
  background-color: var(--hw-surface);
}
.halloween-theme .content {
  box-shadow: 0 0 0 1px #a15a3b55, 0 16px 60px #0006;
  border-top: 1px solid #eeaa6a66;
}
.halloween-theme .main { border-color: var(--hw-line); }
.halloween-theme .story .story-content { color: var(--hw-ink); }
.halloween-theme .story-meta {
  background: var(--hw-surface-alt);
  border-color: var(--hw-line);
  box-shadow: 0 1px 2px #351b3512;
}
.halloween-theme .story .meta-item { color: var(--hw-muted); border-color: var(--hw-line); }
.halloween-theme :is(.story .meta-item b, .story .meta-item a, .story-title a, .section-header .icon), .halloween-theme .story .meta-item::before { color: var(--hw-link); }
.halloween-theme .story-title { color: var(--hw-link); }
.halloween-theme :is(.story-title a:hover, .release-episode) { color: var(--hw-purple); }
.halloween-theme .story-title::before {
  content: ''; display: inline-block; width: 18px; height: 18px; margin-right: 7px;
  background: var(--hw-orange); border: 0; border-radius: 0; box-shadow: none; vertical-align: -4px;
  -webkit-mask: url('../images/halloween/bat.svg') center / contain no-repeat;
  mask: url('../images/halloween/bat.svg') center / contain no-repeat;
}
.halloween-theme :is(.section-header, .sidebar-right .sidebar-block-header) {
  border-color: var(--hw-line); border-bottom-color: var(--hw-orange);
  box-shadow: none; position: relative;
}
.halloween-theme .sidebar-right .sidebar-block-header::after {
  content: ''; position: absolute; right: 0; top: 0; width: 43px; height: 43px;
  background: url('../images/halloween/web.svg') center / contain no-repeat;
  transform: rotate(90deg); pointer-events: none; opacity: .65;
}
.halloween-theme :is(.sidebar-right .sidebar-block-header h2, .sidebar-right .header-icon), .halloween-theme .sidebar-left .header-icon::after { color: var(--hw-link); }
.halloween-theme .sidebar-left .sidebar-block-header { border-color: var(--hw-line); }
.halloween-theme .sidebar-left .sidebar-block-header::before, .halloween-theme .sidebar-left .sidebar-block-header::after { background: #794b83; border-color: var(--hw-line); }
.halloween-theme :is(.sidebar-left .sidebar-block-header h2, .sidebar-left .header-icon) { color: #fff2e3; }
.halloween-theme .sidebar-left .header-icon:after { content: ''; width: 23px; height: 23px; top: -1px; background: var(--hw-orange); -webkit-mask: url('../images/halloween/pumpkin-mask.svg') center / contain no-repeat; mask: url('../images/halloween/pumpkin-mask.svg') center / contain no-repeat; }
.halloween-theme .sidebar-menu .nav-link { color: var(--hw-link); border-radius: 4px; }
.halloween-theme .sidebar-menu .nav-link:hover { background: #794b83; color: #fff; }
.halloween-theme .sidebar-menu .nav-link::before { background: var(--hw-orange); border-radius: 50%; width: 4px; height: 4px; }
.halloween-theme .topnews .rate, .halloween-theme .story-rating-data b {
  background: #784789; color: #fff7ed; border-radius: 4px;
}
.halloween-theme .topnews li { border-color: var(--hw-line); }
.halloween-theme .topnews li a, .halloween-theme .section-header :is(h1, h2, h3), .halloween-theme .section-header a { color: var(--hw-link); }
.halloween-theme .section-header .sect-title, .halloween-theme .sorter { color: var(--hw-link); }
.halloween-theme .sidebar-right .sidebar-block-header { background: var(--hw-surface-alt); }
.halloween-theme .section-header :is(select, button), .halloween-theme .section-header .sorter { background: var(--hw-surface); color: var(--hw-link); border-color: var(--hw-line); }
.halloween-theme .story-info .fundub-more { color: var(--hw-purple); }
.halloween-theme .sidebar-block-content .r_footer, .halloween-theme .sidebar-block-content .r_content { background-color: var(--hw-surface); color: var(--hw-muted); }
.halloween-theme .lastcomm { background: var(--hw-surface); border-color: var(--hw-line); }
.halloween-theme .lastcomm .rcols { color: var(--hw-link); }
.halloween-theme .lastcomm .rcols a { color: var(--hw-muted); }
.halloween-theme .lastcomm:hover { background: #794b83; }
.halloween-theme .lastcomm:hover .rcols, .halloween-theme .lastcomm:hover .rcols a { color: #fff4e8; }
.halloween-theme .all-coments { background: var(--hw-surface-alt); color: var(--hw-link); }
.halloween-theme .all-coments:hover { background: #794b83; color: #fff; }
.halloween-theme .scroll-buttons { background: var(--hw-surface-alt); color: var(--hw-purple); border-color: var(--hw-line); }
.halloween-theme .scroll-buttons > div:hover { background: #794b83; color: #fff; }
.halloween-theme .lc_area, .halloween-theme .lc_chat_list .lc_chat_li { background-color: var(--hw-surface); color: var(--hw-ink); }
.halloween-theme .lc_chat_list .lc_chat_li:nth-child(2n) { background-color: var(--hw-surface-alt); }
.halloween-theme .lc_chat_list .lc_chat_li .lc_chat_li_text { color: var(--hw-ink); }
.halloween-theme .story-left .story-poster { border-radius: 5px 5px 0 0; box-shadow: 0 0 0 1px #b6815240; }
.halloween-theme .story-left .story-poster a:hover::before { background: #27103355; }
.halloween-theme .story-left .story-poster a:hover::after { color: #ffd7a5; }
.halloween-theme .story-footer :is(a, a:hover), .halloween-theme .search-button, .halloween-theme .login-submit {
  background: linear-gradient(135deg, #f8a64d, #c65d22); color: #231322;
  border-color: #b96a3b; text-shadow: none; font-weight: 600;
}
.halloween-theme .story-footer a { box-shadow: 0 0 0 3px var(--hw-surface-alt); }
.halloween-theme .story-footer a:hover { background: #ffbd71; box-shadow: 0 0 16px #f3903b40; }
.halloween-theme .story-footer::before, .halloween-theme .story-footer::after { border-color: var(--hw-line); }
.halloween-theme :is(.story-trailler, .story-trailler a) { background: #734080; color: #fff6eb; }
.halloween-theme .bm-select-box { background-color: #744786; }
.halloween-theme .bm-selected:hover { background-color: #8a5296; }
.halloween-theme .bm-selected.in-bm { background-color: #477660; }
.halloween-theme .bm-items { background: var(--hw-surface); border-color: var(--hw-line); color: var(--hw-ink); }
.halloween-theme .bm-name:hover, .halloween-theme .bm-link:hover { background: var(--hw-surface-alt); }
.halloween-theme .navi_link :is(a, span), .halloween-theme :is(.n_back, .n_next) {
  background: var(--hw-surface-alt); color: var(--hw-ink); border-color: var(--hw-line); text-shadow: none; box-shadow: 0 1px 3px #22102220;
}
.halloween-theme .navi_link :is(a:hover, span:not(.nav_ext)) { background: #794b83; color: #fff; }
.halloween-theme :is(.player-header, .comment-header, .title_quote) { background: var(--hw-surface-alt); color: var(--hw-ink); border-color: var(--hw-line); }
.halloween-theme :is(.comment-content, .quote, .comment-token, .comments-form) { background-color: var(--hw-surface); color: var(--hw-ink); border-color: var(--hw-line); }
.halloween-theme :is(.comment-meta, .comment-date) { color: var(--hw-muted); }
.halloween-theme .player-btn { border-color: var(--hw-line); background: var(--hw-surface-alt); color: var(--hw-link); }
.halloween-theme .player-btn:hover { background: #794b83; color: #fff; }
.halloween-theme .footer { background: var(--hw-surface); border-top-color: var(--hw-orange); color: var(--hw-ink); }
.halloween-theme .footer-menu .nav-link { color: var(--hw-link); }
.halloween-theme .footer-menu .nav-item::after { color: var(--hw-purple); }
.halloween-theme .footer-copyright { background: #1f172b; color: #d6c8df; }
.halloween-theme .footer-copyright::after { border-top-color: #1f172b; }
.halloween-theme .footer-left::after { border-top-color: var(--hw-surface); }

/* Pumpkin ratings: preserve DLE's reversed list, links and fractional fill. */
.halloween-theme .rating li i { width: 20px; height: 23px; margin: 0 2px; font-size: 0; color: var(--hw-empty); vertical-align: middle; }
.halloween-theme .rating li i::before,
.halloween-theme .unit-rating li:has(+ .active) .unit-star::after {
  content: ''; display: block; width: 20px; height: 23px; background: currentColor;
  -webkit-mask: url('../images/halloween/pumpkin-mask.svg') left center / 20px 23px no-repeat;
  mask: url('../images/halloween/pumpkin-mask.svg') left center / 20px 23px no-repeat;
}
.halloween-theme .unit-rating li.active i, .halloween-theme .unit-rating li.active ~ li i { color: var(--hw-orange); }
.halloween-theme .unit-rating li:has(+ .active) .unit-star::after { position: absolute; left: 0; top: 0; width: var(--rating-before-width, 0%); color: var(--hw-orange); }
.halloween-theme .unit-rating:has(a:hover) li i { color: var(--hw-empty); }
.halloween-theme .unit-rating:has(a:hover) .unit-star::after { display: none; }
.halloween-theme .unit-rating li:hover a i, .halloween-theme .unit-rating li:hover ~ li a i { color: #ed941e !important; filter: drop-shadow(0 0 3px #ffab573d); }
.halloween-theme .rating .rating-data { font-size: 12px; margin-top: 3px; color: var(--hw-muted); }
.halloween-theme .rating .rating-rate-num { color: var(--hw-link); }
.halloween-theme .mb-rating-list, .halloween-theme .mb-rating-list li.current-rating { background-size: 15.6px 18px; background-position: left top; }
.halloween-theme .mb-rating-list { background-image: url('../images/halloween/pumpkin-empty.svg'); }
.halloween-theme .mb-rating-list li.current-rating { background-image: url('../images/halloween/pumpkin-full.svg'); }
.halloween-theme .icon-star::before { content: ''; display: inline-block; width: 1em; height: 1em; background: currentColor; -webkit-mask: url('../images/halloween/pumpkin-mask.svg') center / contain no-repeat; mask: url('../images/halloween/pumpkin-mask.svg') center / contain no-repeat; }

/* Purely decorative layers never intercept navigation or form controls. */
.halloween-theme .hw-header-decor { position: absolute; inset: 0; pointer-events: none; }
.halloween-theme .hw-season { display: none; }
.halloween-theme .hw-bat { display: none; position: absolute; width: 35px; height: 24px; background: url('../images/halloween/bat.svg') center / contain no-repeat; }
.halloween-theme .hw-hanging-spider { position: absolute; right: 12px; top: 0; width: 29px; height: 38px; z-index: 5; background: url('../images/halloween/spider.svg') bottom / 29px 29px no-repeat; }
.halloween-theme .hw-hanging-spider::before { content: ''; position: absolute; width: 1px; height: 12px; left: 14px; background: #a88be8; }
.halloween-theme .poster-meta .meta-text { color: #fff; }

@media (min-width: 1201px) {
  .halloween-theme .header { margin-top: 310px; }
  .halloween-theme .topside::before, .halloween-theme .topside::after { content: none; }
  .halloween-theme .logo-box::after { border-bottom-color: var(--hw-surface); border-left-color: var(--hw-surface); }
  .halloween-theme .topside-right::before { border-top-color: var(--hw-surface); }
  .halloween-theme .soc-share .triangle-1, .halloween-theme .soc-share::after { border-right-color: var(--hw-surface); }
  .halloween-theme .soc-share::before { border-bottom-color: #8d568c; }
  .halloween-theme .soc-share .triangle-2 { border-top-color: #4b2d5a; }
  .halloween-theme .soc-icons li { background: #794b83; }
  .halloween-theme .soc-link { color: #fff; }
  .halloween-theme .search-panel { background: #201629; }
  .halloween-theme .search-panel .triangle { border-bottom-color: #8d568c; }
  .halloween-theme .search-input { border-bottom-color: #ba804e; color: #fff4e7; }
  .halloween-theme .search-input::placeholder { color: #ded0e5; }
  .halloween-theme .multisearch-button { background: #744786; color: #fff; }
  .halloween-theme .multisearch-button::before { background: #744786; }
  .halloween-theme .search-button { background: none; }
  .halloween-theme .search-button::before { background: linear-gradient(135deg, #f8a64d, #c65d22); }
  .halloween-theme .search-button:hover::before { background: #ffbd71; }
  .halloween-theme .search-panel::after { border-left-color: #201629; border-bottom-color: #201629; }
  .halloween-theme .search-panel .icon-search { color: #ffad57; }
  .halloween-theme .calendar-link { background: #794b83; color: #fff6eb; }
  .halloween-theme .calendar-link:hover { background: #9a5d8d; }
  .halloween-theme .releases-box { border-right-color: var(--hw-surface); }
  .halloween-theme .releases-menu { background: #754781; }
  .halloween-theme .releases-menu::before { border-bottom-color: #201629; }
  .halloween-theme .releases-menu::after { border-top-color: #42234c; }
  .halloween-theme .releases-nav::before { background: var(--hw-surface); }
  .halloween-theme .releases-nav > li { box-shadow: 1px 0 0 #5b3564, 2px 0 0 #98699e; }
  .halloween-theme .releases-menu li span:hover, .halloween-theme .releases-menu li.active span { background: #59305f; }
  .halloween-theme .dark-theme-button { background: #794b83; }
  .halloween-theme .dark-theme-button::after { border-left-color: #794b83; }
  .halloween-theme .dark-theme-button .icon { color: #ffcd8c; animation: none; }
  .halloween-theme .header-menu .navbar-nav { background: linear-gradient(#33223e, #21182c); }
  .halloween-theme .header-menu .nav-link { color: #fff0df; box-shadow: 1px 0 0 #1a1024, 2px 0 0 #4c3458; }
  .halloween-theme .header-menu .nav-link:hover { background: #744786; box-shadow: inset 0 -3px #ffad57; }
  .halloween-theme .header-menu .nav-sub-item ul { background: #2b1d36; }
  .halloween-theme .header-menu .nav-sub-item ul li:hover { background: #744786; }
  .halloween-theme .hw-season {
    position: absolute; left: 50%; top: -70px; transform: translateX(-50%); display: flex;
    align-items: center; gap: 9px; padding: 9px 15px; white-space: nowrap; border: 1px solid #dc9b5f70;
    border-radius: 20px; background: #21132cd9; color: #ffd5a2; font-weight: 600; font-size: 12px;
    letter-spacing: 2px; box-shadow: 0 0 30px #df863518;
  }
  .halloween-theme .hw-season-date { padding-left: 9px; border-left: 1px solid #c2936780; font-size: 10px; letter-spacing: 1px; color: #d8c3df; }
  .halloween-theme .hw-season-pumpkin { width: 20px; height: 20px; background: #ffa74a; -webkit-mask: url('../images/halloween/pumpkin-mask.svg') center / contain no-repeat; mask: url('../images/halloween/pumpkin-mask.svg') center / contain no-repeat; }
  .halloween-theme .hw-bat { display: block; }
  .halloween-theme .hw-bat-one { top: -118px; left: 43%; transform: rotate(-12deg); animation: hw-drift 9s ease-in-out infinite; }
  .halloween-theme .hw-bat-two { top: -198px; right: 31%; width: 23px; opacity: .6; transform: rotate(15deg); animation: hw-drift 12s ease-in-out infinite reverse; }
  .halloween-theme .hw-hanging-spider { top: -3px; right: 27px; height: 54px; }
  .halloween-theme .hw-hanging-spider::before { height: 28px; }
}

.halloween-theme .login-panel { background: #24182f; }
.halloween-theme .login-panel::after { border-top-color: #160f20; }
.halloween-theme :is(.login-header, .login-content) { border-color: #53365c; }
.halloween-theme .login-header, .halloween-theme .login-panel .label { color: #ffc588; }
.halloween-theme .login-panel .label { background: #1b1324; }
.halloween-theme .login-panel a { color: #f0d4ee; }
.halloween-theme .login-nav .nav-link:hover { background: #4d2e5d; color: #ffca8a; }
.halloween-theme .login-panel .label-text { color: #ffc588; }
.halloween-theme .login-panel .login-submit { color: #28152a; }

@media (max-width: 1200px) {
  body.halloween-theme { background-image: radial-gradient(ellipse at 50% 0, #42244d, #130f20 550px); background-size: auto; }
  .halloween-theme .topside { background: var(--hw-surface); box-shadow: inset 0 2px #a16b57; }
  .halloween-theme .header-menu { background: #281c33; color: #fff; }
  .halloween-theme .header-menu a { color: #ffddae; }
  .halloween-theme .header-menu .nav-link:hover { background: #794b83; color: #fff; }
  .halloween-theme .search-panel { background: var(--hw-surface); }
  .halloween-theme .show-search-btn::before, .halloween-theme .mobile-dark-theme-button::after, .halloween-theme .notification-btn::before { color: var(--hw-link); }
  .halloween-theme .show_login { background: #794b83; color: #fff; }
  .halloween-theme .sidebars-mobile-btns { background: #794b83; }
  .halloween-theme .sidebars-mobile-btns a { background: #794b83; color: #fff4df; border-color: #a37cab; }
  .halloween-theme .hw-hanging-spider { display: none; }
  .halloween-theme .logo-box { position: relative; }
  .halloween-theme .topside::after { content: ''; position: absolute; left: 193px; top: 14px; width: 18px; height: 22px; pointer-events: none; background: var(--hw-orange); -webkit-mask: url('../images/halloween/pumpkin-mask.svg') center / contain no-repeat; mask: url('../images/halloween/pumpkin-mask.svg') center / contain no-repeat; }
  .halloween-theme .search-panel .search-input { color: var(--hw-ink); border-color: var(--hw-line); }
}
@media (max-width: 576px) {
  .halloween-theme .story-meta-info { gap: 5px 0; }
  .halloween-theme .story .meta-item { padding-inline: 7px; }
  .halloween-theme .story-info .voice { width: auto !important; max-width: calc(100% - 20px); box-sizing: border-box; }
  .halloween-theme .story-info .voice li { max-width: 100%; overflow-wrap: anywhere; }
  .halloween-theme .story-info .fundub-more { width: auto !important; max-width: calc(100% - 20px); box-sizing: border-box; }
  .halloween-theme .navi_link { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding-inline: 8px; box-sizing: border-box; }
  .halloween-theme .sidebar-right .sidebar-block-header::after { width: 32px; height: 32px; }
  .halloween-theme .footer-left, .halloween-theme .footer-right { max-width: 100%; }
}
@media (max-width: 380px) {
  .halloween-theme .topside::after { display: none; }
}
@keyframes hw-drift { 50% { translate: 0 -7px; } }
@media (prefers-reduced-motion: reduce) {
  .halloween-theme .hw-bat { animation: none; }
  .halloween-theme :is(a, button) { transition: none; }
}


/* Stage 2: seasonal identity, inner pages and native DLE dialogs. */
.halloween-theme .hw-logo { display: block; }
.halloween-theme .logo-box .logo { height: auto; }
.halloween-theme .footer-logo { height: auto; }
.halloween-theme :is(.btn, .bbcodes, .ui-button, .bm_search_bt) {
  background: #794b83; color: #fff4e5; border: 1px solid #92649c;
  border-radius: 7px; text-shadow: none; box-shadow: 0 2px 4px #27132c18;
}
.halloween-theme :is(.btn, .bbcodes, .ui-button, .bm_search_bt):hover { background: #925a98; color: #fff; }
.halloween-theme :is(.btn, .bbcodes, .ui-button, .bm_search_bt):disabled { opacity: .5; cursor: default; }
.halloween-theme :is(.multisearch, .searchtable, .bm_search_form, .ui-dialog, .shedule) :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=reset]), select, textarea) {
  color: var(--hw-ink); background-color: var(--hw-surface); border: 1px solid var(--hw-line);
  border-radius: 5px; box-shadow: inset 0 1px 2px #32113208; min-height: 30px; box-sizing: border-box;
}
.halloween-theme :is(.multisearch, .bm_search_form, .ui-dialog) input::placeholder { color: var(--hw-muted); opacity: 1; }
.halloween-theme :is(.multi-label, .bm_search_item_title) { color: var(--hw-muted); font-weight: 600; }
.halloween-theme .multisearch { padding: 10px 12px 14px; border: 1px solid var(--hw-line); border-radius: 8px; background: var(--hw-surface-alt); }
.halloween-theme .multi-group { padding: 3px 0; }
.halloween-theme .multisearch .bbcodes:first-of-type { background: linear-gradient(135deg, #f8a64d, #c65d22); border-color: #b96a3b; color: #28152a; }
.halloween-theme .chosen-container .chosen-choices,
.halloween-theme .chosen-container .chosen-single,
.halloween-theme .chosen-container .chosen-drop {
  background: var(--hw-surface); color: var(--hw-ink); border-color: var(--hw-line); box-shadow: none; border-radius: 5px;
}
.halloween-theme .chosen-container .chosen-choices { min-height: 30px; padding-block: 2px; box-sizing: border-box; }
.halloween-theme .chosen-container .chosen-single { height: 30px; line-height: 28px; }
.halloween-theme .chosen-container .chosen-results { color: var(--hw-ink); }
.halloween-theme .chosen-container .chosen-results li.highlighted { background: #794b83; color: #fff; }
.halloween-theme .chosen-container .chosen-results li.no-results { background: var(--hw-surface-alt); color: var(--hw-muted); }
.halloween-theme .chosen-container .chosen-choices li.search-choice { background: #794b83; color: #fff1dd; border-color: #92649c; box-shadow: none; border-radius: 4px; }
.halloween-theme .chosen-container .chosen-choices li.search-field input[type=text] { color: var(--hw-muted); background: transparent !important; border: 0; min-height: 24px; box-shadow: none; }
.halloween-theme .chosen-container-active .chosen-choices { border-color: var(--hw-orange); }
.halloween-theme .chosen-container-single .chosen-search input[type=text] { color: var(--hw-ink); background-color: var(--hw-surface-alt); }
.halloween-theme .chosen-container .chosen-results li.disabled-result { color: var(--hw-muted); opacity: .6; }
.halloween-theme .sorter form { background: var(--hw-surface); border: 1px solid var(--hw-line); color: var(--hw-ink); }
.halloween-theme .sorter li:hover { background: var(--hw-surface-alt); }
.halloween-theme :is(.show-more, .hide-more, .bm_search_open) { color: var(--hw-purple); }

/* Calendar: moon day markers and quiet poster frames. */
.halloween-theme .shedule .timezoneselect { padding: 6px 8px; }
.halloween-theme .shedule .clendar-btns { gap: 12px; flex-wrap: wrap; }
.halloween-theme .shedule .chart-heading {
  color: var(--hw-ink); background: var(--hw-surface-alt); border: 1px solid var(--hw-line);
  border-left: 3px solid var(--hw-orange); border-radius: 5px; padding: 9px 12px; margin-block: 22px 10px;
}
.halloween-theme .shedule .chart-heading::before { content: ''; display: inline-block; width: 20px; height: 20px; margin-right: 8px; vertical-align: -4px; background: url('../images/halloween/moon.svg') center / contain no-repeat; }
.halloween-theme .shedule .anime-item { padding: 6px; }
.halloween-theme .shedule .anime-item h3 { height: 36px; line-height: 17px; margin-bottom: 5px; overflow: hidden; }
.halloween-theme .shedule .anime-item h3 a { color: var(--hw-link); }
.halloween-theme .shedule .anime-item-body { border: 1px solid var(--hw-line); border-radius: 6px; overflow: hidden; background: var(--hw-surface-alt); }
.halloween-theme .shedule .poster-container { width: 100%; float: none; border: 0; margin: 0; }
.halloween-theme .shedule .poster-container a { display: block; }
.halloween-theme .shedule .poster-container img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; display: block; }
.halloween-theme .shedule .episode-countdown { top: auto; bottom: 0; background: #27182ee8; color: #ffe4bd; font-size: 11px; padding: 7px 3px; box-sizing: border-box; }
.halloween-theme .hc_body .item .item-box { background: var(--hw-surface-alt); color: var(--hw-ink); border: 1px solid var(--hw-line); border-radius: 6px; }
.halloween-theme .hc_body .item.month { border-color: var(--hw-line); border-bottom-color: var(--hw-orange); color: var(--hw-link); box-shadow: none; }
.halloween-theme .hc-years a { background: #794b83; color: #fff1dd; border-color: #92649c; }

/* Public profiles: avatar halo, moon headers and clear statistics. */
.halloween-theme .profile { color: var(--hw-ink); }
.halloween-theme .profile .title { position: relative; min-height: 28px; height: auto; line-height: 28px; background: #744481; color: #fff2df; border-radius: 5px; overflow: hidden; }
.halloween-theme .profile .title::after { content: ''; position: absolute; right: 4px; top: 0; width: 30px; height: 28px; background: url('../images/halloween/web.svg') center / contain no-repeat; transform: rotate(90deg); opacity: .65; pointer-events: none; }
.halloween-theme .profile .title span, .halloween-theme .profile .title a { color: #fff2df; }
.halloween-theme .profile .userR > .title:first-child { border-left: 3px solid var(--hw-orange); }
.halloween-theme #page_avatar { border: 2px solid #976193; border-radius: 12px; padding: 4px; box-shadow: 0 0 0 4px var(--hw-surface-alt); background: var(--hw-surface); }
.halloween-theme #page_avatar img { max-width: 100%; display: block; margin-inline: auto; }
.halloween-theme .profile .obbut li { background: var(--hw-surface-alt); border-color: var(--hw-line); border-radius: 4px; height: auto; min-height: 25px; margin-bottom: 4px; }
.halloween-theme .profile .obbut a { display: block; color: var(--hw-link); }
.halloween-theme .profile .obbut a:hover { color: var(--hw-purple); }
.halloween-theme .profile .status { color: var(--hw-muted); border-color: var(--hw-line); }
.halloween-theme .profile .list a { color: var(--hw-link); }
.halloween-theme .profile .item { color: var(--hw-muted); }
.halloween-theme .profile .bookmarks { background: var(--hw-surface-alt); border: 1px solid var(--hw-line); border-radius: 6px; gap: 3px; padding: 3px; }
.halloween-theme .profile .bookmarks li { float: none; box-sizing: border-box; flex: 1 1 80px; width: auto; padding: 12px 3px; }
.halloween-theme .profile .bookmarks li h2 { color: var(--hw-purple); margin-top: 3px; }
.halloween-theme .profile .bookmarks a { color: var(--hw-link); }
.halloween-theme .profile .bookmarks-stat { border-color: var(--hw-line); border-radius: 4px; overflow: hidden; }
.halloween-theme .profile .bookmarks-stat li:first-child { border-color: var(--hw-line); }
.halloween-theme .profile .bookmarks-stat span { color: var(--hw-muted); background: var(--hw-surface-alt); border-color: var(--hw-line); }
.halloween-theme .laba_rang h2 { color: var(--hw-purple); }
.halloween-theme .profile .textw, .halloween-theme .profile .Review { color: var(--hw-ink); background: var(--hw-surface-alt); border-color: var(--hw-line); }
.halloween-theme .profile .Review .maintext { color: var(--hw-ink); }
.halloween-theme .profile .vkbuttw { background: #794b83; border-color: #92649c; color: #fff4df; }
.halloween-theme .profile .vkbuttw :is(a, span) { color: #fff4df; }
.halloween-theme .profile :is(.title_spoiler, .text_spoiler, .pagination) { color: var(--hw-ink); background: var(--hw-surface); border-color: var(--hw-line); }
.halloween-theme .profile .pagination a { color: var(--hw-link); background: var(--hw-surface-alt); border-color: var(--hw-line); }

/* Bookmarks: category tabs and small pumpkin ratings use the same theme. */
.halloween-theme .bm-list .bm-header { background: #744481; color: #fff2df; border-radius: 5px 5px 0 0; }
.halloween-theme .bm-list .bm-header a { color: #fff2df; }
.halloween-theme .bm-list .bm-list-item { border-color: var(--hw-line); color: var(--hw-ink); }
.halloween-theme .bm-list .bm-list-item:first-child { background: var(--hw-surface-alt); border-color: var(--hw-line); }
.halloween-theme .bm-list .bm-list-item:not(:first-child):hover { background: var(--hw-surface-alt); }
.halloween-theme .bm-list .nav-tabs { border-color: var(--hw-line); gap: 4px; padding-bottom: 5px; }
.halloween-theme .bm-list .nav-tabs .nav-link { color: var(--hw-link); background: var(--hw-surface-alt); border-color: var(--hw-line); border-radius: 5px; }
.halloween-theme .bm-list .nav-tabs .nav-link.active { background: #794b83; color: #fff4e3; border-color: #92649c; }
.halloween-theme .bm-list .nav-tabs .nav-link:hover { color: #fff4e3; background: #794b83; }
.halloween-theme .bm_search_form { background: var(--hw-surface-alt); border: 1px solid var(--hw-line); border-radius: 6px; padding: 10px; }
.halloween-theme .bm_search_item_title { margin-bottom: 5px; }

/* Actual jQuery UI windows used by DLE, including the AJAX profile card. */
.halloween-theme .ui-dialog { background: var(--hw-surface); color: var(--hw-ink); border: 1px solid #9e6a94; border-radius: 10px; box-shadow: 0 12px 70px #09030c80; max-width: calc(100vw - 24px); box-sizing: border-box; }
.halloween-theme .ui-dialog-titlebar { background: #38213f; color: #ffe2b5; padding: 15px 48px 15px 18px; border-bottom: 2px solid #bc7a49; }
.halloween-theme .ui-dialog-titlebar::after { content: ''; position: absolute; right: 48px; top: 0; width: 48px; height: 45px; background: url('../images/halloween/web.svg') center / contain no-repeat; transform: rotate(90deg); pointer-events: none; }
.halloween-theme .ui-dialog-content { background: var(--hw-surface); color: var(--hw-ink); border: 0; padding-top: 16px; }
.halloween-theme .ui-dialog label, .halloween-theme .userinfo .clgrey { color: var(--hw-muted); }
.halloween-theme .ui-dialog .userinfo a { color: var(--hw-link); }
.halloween-theme .ui-dialog .ui-dialog-buttonpane { background: var(--hw-surface-alt); border-top: 1px solid var(--hw-line); padding: 12px; }
.halloween-theme .ui-dialog-titlebar-close { background: transparent; border-radius: 5px; box-shadow: none; padding: 0; color: #ffe2b5; }
.halloween-theme .ui-dialog-titlebar-close .ui-icon { display: none; }
.halloween-theme .ui-dialog-titlebar-close::before { content: '\00d7'; font: 26px/30px Arial,sans-serif; }
.halloween-theme .ui-dialog-titlebar-close:hover { background: #744481; }
.halloween-theme .ui-widget-overlay { background: #130a1c; opacity: .7; }
.halloween-theme .userinfo .vatar { background: var(--hw-surface-alt); border-color: #976193; border-radius: 7px; }
.halloween-theme .userinfo .rcol li { overflow-wrap: anywhere; }
.halloween-theme .userinfo .status_on { background: #346c52; }
.halloween-theme .userinfo .status_off { background: #65556d; }

/* Loading and small recurring controls. */
.halloween-theme #loading-layer { background: #2f1e3c; }
.halloween-theme #loading-layer::before { background: #f49a40; }
.halloween-theme .inf_stat li { background: var(--hw-surface-alt); color: var(--hw-muted); border-color: var(--hw-line); }
.halloween-theme .inf_stat li span, .halloween-theme .statistic .tit { background: #794b83; color: #fff2df; }

@media (min-width: 1201px) {
  .halloween-theme .logo-box .logo { top: 0; right: -5px; width: 300px; }
}
@media (max-width: 1200px) {
  .halloween-theme .logo-box .logo { top: 0; right: 0; width: 130px; height: 50px; object-fit: contain; }
}
@media (max-width: 768px) {
  .halloween-theme .multisearch .multi-group { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-bottom: 7px; }
  .halloween-theme .multisearch .multi-label { flex: 0 0 100%; width: 100%; }
  .halloween-theme .multisearch input[type=text] { max-width: 100%; }
  .halloween-theme .multisearch .chosen-container { max-width: 100%; }
  .halloween-theme .multisearch .chosen-container.chosen-container-multi { max-width: 100%; }
}
@media (max-width: 576px) {
  .halloween-theme .profile .list li { overflow-wrap: anywhere; }
  .halloween-theme .profile .item { width: 124px; }
  .halloween-theme .profile .bookmarks li { flex-basis: 28%; }
  .halloween-theme .bm-list .bm-tabs { flex-direction: row !important; flex-wrap: wrap; }
  .halloween-theme .bm-list .bm-tabs .nav-link { flex: 1 1 28%; padding: 7px; text-align: center; }
  .halloween-theme .bm-list .bm_search_form { flex-wrap: wrap; gap: 8px; }
  .halloween-theme .bm-list .bm_search_item { width: 100%; }
  .halloween-theme .ui-dialog-title { font-size: 14px; }
  .halloween-theme .dle-popup-userprofile .ui-dialog-content { max-height: 65vh; overflow-y: auto; padding: 12px; }
  .halloween-theme .ui-dialog-content .userinfo { display: grid; grid-template-columns: 78px minmax(0,1fr); gap: 10px; padding: 0; }
  .halloween-theme .userinfo .l_con { margin: 0; width: auto; padding: 0; }
  .halloween-theme .userinfo .r_con { width: auto; min-width: 0; }
  .halloween-theme .userinfo .vatar { width: 68px; padding: 3px; }
  .halloween-theme .userinfo .vatar img { max-width: 68px; }
  .halloween-theme .userinfo :is(.status_on, .status_off) { width: auto; height: auto; padding: 5px; font-size: 11px; }
  .halloween-theme .userinfo .clgrey { display: block; }
}
@media (max-width: 380px) {
  .halloween-theme .multisearch { padding-inline: 8px; }
  .halloween-theme .shedule .clendar-btns .btn { padding-inline: 10px; font-size: 11px; }
}

/* Keep floated legacy jQuery UI titles from narrowing the following content. */
.halloween-theme .ui-dialog-titlebar { display: flex; align-items: center; min-height: 50px; box-sizing: border-box; }
.halloween-theme .ui-dialog-title { float: none; line-height: 20px; min-width: 0; padding-right: 5px; }
.halloween-theme .ui-dialog-content { clear: both; box-sizing: border-box; }
.halloween-theme .profile .userL { flex: 0 0 185px; max-width: 100%; }
.halloween-theme #page_avatar img { height: auto; }
@media (max-width: 576px) {
  .halloween-theme .profile .userL { flex-basis: auto; }
  .halloween-theme .ui-dialog-content .userinfo > .clr { display: none; }
}

@media (max-width: 576px) { .halloween-theme .dle-popup-userprofile .ui-dialog-content { height: auto !important; } }

@media (max-width: 576px) { .halloween-theme .dle-popup-userprofile { max-height: calc(100svh - 24px) !important; } }

/* The profile's Google chart follows the theme without changing its data. */
.halloween-theme #piechart svg > rect:first-child { fill: var(--hw-surface); }
.halloween-theme #piechart text[fill="#222222"], .halloween-theme #piechart text[fill="#000000"] { fill: var(--hw-ink); }
.halloween-theme #piechart path[stroke="#ffffff"] { stroke: var(--hw-surface); }
.halloween-theme #piechart svg rect[fill="white"], .halloween-theme #piechart svg rect[fill="#ffffff"], .halloween-theme #piechart svg rect[fill="#fff"] { fill: var(--hw-surface); }

/* Stage 3: player surroundings, comments, service forms and messages. */
.halloween-theme .story-player { border: 1px solid var(--hw-line); border-radius: 8px; padding: 9px; background: var(--hw-surface-alt); margin-block: 14px; }
.halloween-theme .player-header { background: transparent; border: 0; }
.halloween-theme .player-title { color: var(--hw-link); line-height: 1.5; margin-bottom: 12px; }
.halloween-theme .player-title::before { content: ''; width: 19px; height: 19px; display: inline-block; vertical-align: -3px; margin-right: 6px; background: var(--hw-orange); -webkit-mask: url('../images/halloween/lantern.svg') center / contain no-repeat; mask: url('../images/halloween/lantern.svg') center / contain no-repeat; }
.halloween-theme .player-text { color: var(--hw-muted); line-height: 1.6; }
.halloween-theme .player-buttons { gap: 8px; flex-wrap: wrap; margin-block: 12px; }
.halloween-theme .player-btn { height: auto; min-height: 36px; line-height: 1.35; padding: 9px 12px; border: 1px solid var(--hw-line); border-radius: 6px; background: var(--hw-surface); color: var(--hw-link); }
.halloween-theme .CvComplaintBtn { color: #a84839; }
.halloween-theme.dark .CvComplaintBtn { color: #ffb3a0; }
.halloween-theme .CvLigthBtn::before { content: '' !important; width: 17px; height: 18px; display: inline-block; vertical-align: -4px; margin-right: 6px; background: currentColor; -webkit-mask: url('../images/halloween/lantern.svg') center / contain no-repeat; mask: url('../images/halloween/lantern.svg') center / contain no-repeat; }
.halloween-theme .player-btn:hover { background: #794b83; color: #fff4e3; }
.halloween-theme .player-btn:disabled { opacity: .55; cursor: default; }
.halloween-theme .story-player .RalodePlayer .RlItem,
.halloween-theme .story-player .RalodePlayer .buttonLR { color: #f1dceb; background: #49304f; border-color: #36213d; }
.halloween-theme .story-player .RalodePlayer .RlItem:not(.serie-active):hover,
.halloween-theme .story-player .RalodePlayer .buttonLR:hover { background: #734580; color: #fff3de; }
.halloween-theme .story-player .RalodePlayer .RlItem.serie-active { color: #241329; background: #f2a354; box-shadow: inset 0 -2px #b76731; }
.halloween-theme .story-player .RalodePlayer .rl-dropdown,
.halloween-theme .story-player .RalodePlayer .rl-overflow { background: #35213e; color: #f6deee; border-color: #795080; }
.halloween-theme .story-player .RalodePlayer .rl-dropdown-item { color: #f6deee; background: #35213e; border-color: #795080; }
.halloween-theme .story-player .RalodePlayer .rl-dropdown-item:hover,
.halloween-theme .story-player .RalodePlayer .rl-dropdown-item.active { color: #ffcf94; background: #58315e; }
.halloween-theme .story-player .playerCode { background-color: #110d19; }
.halloween-theme .story-player .rl-fake-player { box-shadow: inset 0 0 0 1px #dc96594d; }
.halloween-theme .story-player .rl-button-play { background: url('../images/halloween/pumpkin-play.svg') center / contain no-repeat; filter: drop-shadow(0 0 9px #ff9c43a0); }
.halloween-theme .CvSubscribe.active { background: #386849; color: #fff4de; }
.halloween-theme .screenshots-title { color: var(--hw-link); }
.halloween-theme .chronology .active .chr-link { color: var(--hw-purple); }
.halloween-theme .related-poster { border-radius: 5px; overflow: hidden; }
.halloween-theme .related-header .header-title { color: var(--hw-link); line-height: 1.5; }

/* Separate comment cards; thematic details remain outside the written text. */
.halloween-theme .comment { margin: 10px; padding: 9px; border: 1px solid var(--hw-line); border-radius: 8px; background: var(--hw-surface); }
.halloween-theme .comment-header { margin-top: 0; background: var(--hw-surface-alt); border: 1px solid var(--hw-line); border-radius: 5px; box-shadow: none; }
.halloween-theme .comment-info .info-item { color: var(--hw-muted); }
.halloween-theme .comment-info b, .halloween-theme .comment-info .info-item a { color: var(--hw-link); }
.halloween-theme .comment-info .info-item.mass::before { width: 13px; height: 15px; top: 8px; left: 7px; background: var(--hw-purple); border: 0; border-radius: 0; box-shadow: none; -webkit-mask: url('../images/halloween/ghost.svg') center / contain no-repeat; mask: url('../images/halloween/ghost.svg') center / contain no-repeat; pointer-events: none; }
.halloween-theme .comment-info .info-item.mass:has(input)::before { display: none; }
.halloween-theme .comment-avatar { border: 1px solid #a378a0; border-radius: 7px; box-shadow: none; padding: 4px; background: var(--hw-surface-alt); }
.halloween-theme .comment-avatar .avatar { width: 80px; height: 80px; object-fit: cover; display: block; border-radius: 3px; }
.halloween-theme .comment-token, .halloween-theme .comment-group { border-color: var(--hw-line); background: var(--hw-surface-alt); }
.halloween-theme .comment-group .group-icon { color: var(--hw-purple); }
.halloween-theme .comment-group .user-group-1::before { color: #cf4c45; }
.halloween-theme .comment-group .user-group-2::before { color: #418755; }
.halloween-theme .comment-group .user-group-6::before { color: var(--hw-orange); }
.halloween-theme .comment-text { color: var(--hw-ink); line-height: 1.65; overflow-wrap: anywhere; }
.halloween-theme .comment-text img:not(.emoji) { max-width: 100%; height: auto; }
.halloween-theme .comment-user-rating .icon { color: var(--hw-orange); }
.halloween-theme .comment-user-rating { color: var(--hw-muted); }
.halloween-theme .comment-user-rating-rate { color: var(--hw-link); }
.halloween-theme .comment-moder .moder-item a { border-color: var(--hw-line); background: var(--hw-surface); box-shadow: none; }
.halloween-theme .comment-moder .moder-item a:hover { background: var(--hw-surface-alt); }
.halloween-theme .comment-footer { gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; border-top: 1px solid var(--hw-line); }
.halloween-theme .comment-answers { font-size: 11px; padding-top: 7px; }
.halloween-theme .comment-answers a { color: var(--hw-purple); }
.halloween-theme .comment-rating { padding-top: 3px; }
.halloween-theme .comm-plus::before, .halloween-theme .comm-minus::before { color: var(--hw-muted); }
.halloween-theme .comm-plus:hover::before { color: #68ad75; }
.halloween-theme .comm-minus:hover::before { color: #dc7b6b; }
.halloween-theme .comm-green { color: #38754a; }
.halloween-theme.dark .comm-green { color: #9ad1a3; }
.halloween-theme .comm-red { color: #b4433e; }
.halloween-theme.dark .comm-red { color: #ffa397; }
.halloween-theme .comm-gray { color: var(--hw-muted); }
.halloween-theme .comment .title_spoiler,
.halloween-theme .comment .text_spoiler,
.halloween-theme .comment .title_quote,
.halloween-theme .comment .quote,
.halloween-theme .comment .scriptcode { background: var(--hw-surface-alt); color: var(--hw-ink); border-color: var(--hw-line); }
.halloween-theme .comment .title_spoiler { border-left: 3px solid var(--hw-purple); border-radius: 4px; padding: 9px 11px; }
.halloween-theme .comment .title_spoiler a { color: var(--hw-link); }
.halloween-theme .comment .quote { border-left-color: var(--hw-orange); }
.halloween-theme #comm_set_sort select { background: var(--hw-surface); color: var(--hw-ink); border-color: var(--hw-line); border-radius: 5px; }
.halloween-theme .comm-answers-box { margin-left: 50px; border-left: 2px solid var(--hw-line); }
.halloween-theme .comm-answer-box { background: var(--hw-surface-alt); border: 1px solid var(--hw-line); border-radius: 7px; padding: 10px; }
.halloween-theme .comments-form { border: 1px solid var(--hw-line); border-radius: 8px; margin: 10px; background: var(--hw-surface-alt); }
.halloween-theme .comments-rules { color: var(--hw-muted); line-height: 1.7; }
.halloween-theme .comments-rules b { color: var(--hw-link); }
.halloween-theme .comments-form :is(input:not([type=hidden]),textarea), .halloween-theme .comm-answer-editor textarea { background: var(--hw-surface); color: var(--hw-ink); border-color: var(--hw-line); border-radius: 5px; }
.halloween-theme .comments-form textarea { padding: 9px; line-height: 1.6; }
.halloween-theme .comments-form .bb-pane { background: var(--hw-surface-alt); border-color: var(--hw-line); }

/* Reusable service forms: the original actions and input names are retained. */
.halloween-theme .hw-service-form { margin: 6px 0; padding: 14px; border: 1px solid var(--hw-line); border-radius: 8px; background: var(--hw-surface-alt); box-sizing: border-box; }
.halloween-theme .hw-service-form .tablestatic { width: 100%; border-collapse: separate; border-spacing: 0 9px; table-layout: fixed; color: var(--hw-ink); }
.halloween-theme .hw-service-form .tablestatic td { padding: 4px 6px; overflow-wrap: anywhere; vertical-align: top; }
.halloween-theme .hw-service-form .staticTd1 { width: 27%; min-width: 0; color: var(--hw-muted); }
.halloween-theme .hw-service-form .tablestatic td[colspan] { width: auto; }
.halloween-theme .hw-service-form :is(label,.staticTd1) { line-height: 1.55; }
.halloween-theme .hw-service-form :is(input:not([type=hidden]):not([type=button]):not([type=submit]):not([type=checkbox]):not([type=radio]),select,textarea) { max-width: 100%; width: 100%; min-height: 34px; border: 1px solid var(--hw-line); border-radius: 5px; background: var(--hw-surface); color: var(--hw-ink); padding: 7px 9px; box-sizing: border-box; }
.halloween-theme .hw-service-form textarea { height: auto; min-height: 150px; line-height: 1.6; }
.halloween-theme .hw-service-form .g-recaptcha-response { display: none; }
.halloween-theme .hw-service-form :is(.rstar,.impot) { color: var(--hw-orange); }
.halloween-theme .commSbmFl { border: 1px solid #b16d3f; background: linear-gradient(135deg,#f7a851,#c56d2c); color: #291629; border-radius: 6px; padding: 10px 20px; min-height: 38px; font-weight: 600; cursor: pointer; box-shadow: 0 2px 4px #27132c18; }
.halloween-theme .commSbmFl:hover { background: #ffbc72; }
.halloween-theme .hw-registration .bbcodes { margin-block: 5px; }
.halloween-theme :is(.hw-service-form input,.hw-service-form select,.hw-service-form textarea):focus { border-color: var(--hw-orange); }
.halloween-theme .hw-service-form input:-webkit-autofill { -webkit-text-fill-color: var(--hw-ink); box-shadow: 0 0 0 1000px var(--hw-surface) inset; }
.halloween-theme .hw-service-form .g-recaptcha { max-width: 100%; }
.halloween-theme .error-msg { position: relative; color: var(--hw-ink); background: var(--hw-surface-alt); border: 1px solid var(--hw-line); border-left: 3px solid var(--hw-orange); border-radius: 7px; line-height: 1.65; padding: 16px 16px 16px 47px; margin: 10px; }
.halloween-theme .error-msg::before { content: ''; position: absolute; left: 13px; top: 16px; width: 23px; height: 25px; background: var(--hw-purple); -webkit-mask: url('../images/halloween/ghost.svg') center / contain no-repeat; mask: url('../images/halloween/ghost.svg') center / contain no-repeat; pointer-events: none; }
.halloween-theme .error-title { color: var(--hw-link); }
.halloween-theme .error-msg a { color: var(--hw-link); text-decoration: underline; }
.halloween-theme .login-panel .login-header::before { color: #ffb773; }
.halloween-theme .login-panel .login-input { caret-color: #ffc38b; }

@media (max-width: 576px) {
  .halloween-theme .story-player { margin-inline: 0; padding: 6px; }
  .halloween-theme .player-title { font-size: 13px; }
  .halloween-theme .player-buttons .player-btn { flex: 1 1 43%; font-size: 12px; padding: 8px; }
  .halloween-theme .player-buttons .CvComplaintBtn { flex-basis: 100%; }
  .halloween-theme .comment { margin: 8px 4px; padding: 7px; }
  .halloween-theme .comment-content { flex-direction: row; gap: 8px; }
  .halloween-theme .comment-left { flex: 0 0 60px; width: 60px; }
  .halloween-theme .comment-avatar { width: 58px; height: 58px; padding: 3px; box-sizing: border-box; }
  .halloween-theme .comment-avatar .avatar { width: 50px; height: 50px; }
  .halloween-theme .comment-right { min-width: 0; padding-left: 0; }
  .halloween-theme .comment-group .group-icon { font-size: 8px; }
  .halloween-theme .comment-repa .repa-dn, .halloween-theme .comment-repa .repa-up { width: 16px; background-size: 16px; background-position: center; margin-inline: 1px; }
  .halloween-theme .comment-header { flex-wrap: wrap; }
  .halloween-theme .comment-info { gap: 4px; margin-block: 6px; }
  .halloween-theme .comment-info .info-item.mass { width: 12px; }
  .halloween-theme .comment-info .info-item.mass::before { top: 6px; }
  .halloween-theme .comment-info .info-item { font-size: 11px; padding-inline: 3px; }
  .halloween-theme .comment-text { font-size: 12px; }
  .halloween-theme .comment .title_spoiler { padding: 6px; }
  .halloween-theme .comm-answers-box { margin-left: 14px; }
  .halloween-theme .comm-answer-box { margin-inline: 4px; }
  .halloween-theme .comm-answer-editor { margin-left: 0; }
  .halloween-theme .comm-answer-avatar { display: none; }
  .halloween-theme .hw-service-form { padding: 10px; }
  .halloween-theme .hw-service-form .tablestatic,
  .halloween-theme .hw-service-form .tablestatic tbody,
  .halloween-theme .hw-service-form .tablestatic tr,
  .halloween-theme .hw-service-form .tablestatic td { display: block; width: 100% !important; box-sizing: border-box; }
  .halloween-theme .hw-service-form .tablestatic { border-spacing: 0; }
  .halloween-theme .hw-service-form .tablestatic td { padding: 4px 0; }
  .halloween-theme .hw-service-form .tablestatic tr { margin-bottom: 9px; }
  .halloween-theme .hw-service-form .tablestatic td br { display: none; }
  .halloween-theme .hw-service-form .staticTd1 { font-weight: 600; }
  .halloween-theme .hw-service-form .commSbmFl { width: 100%; }
  .halloween-theme .error-msg { margin-inline: 4px; }
}
@media (max-width: 350px) {
  .halloween-theme .hw-service-form { padding: 5px; border: 0; }
  .halloween-theme .hw-service-form .g-recaptcha { transform: scale(.88); transform-origin: left top; margin-bottom: -8px; }
  .halloween-theme .comment .comment-content { flex-direction: column; }
  .halloween-theme .comment-left { width: auto; flex-basis: auto; display: flex; gap: 7px; align-items: center; }
  .halloween-theme .comment-token { margin-top: 0; min-width: 65px; }
}

/* Keep the native exit control recognizable in both player viewing modes. */
.halloween-theme .story-player .vc-close { background: #321f3d; color: #ffce91; border: 1px solid #9b6c81; border-radius: 6px; box-sizing: border-box; }
.halloween-theme .story-player .vc-close::after { content: '\00d7'; font: 30px/36px Arial,sans-serif; width: 36px; }
.halloween-theme #registration .section-content { line-height: 1.7; color: var(--hw-ink); }

/* Stage 4: finish recurring UI and keep the seasonal shell lightweight. */
@media (min-width: 1201px) {
  .halloween-theme .topside::before, .halloween-theme .topside::after { background-image: none; }
}
.halloween-theme #searchsuggestions { background: var(--hw-surface); color: var(--hw-ink); border: 1px solid #a4759d; border-radius: 8px; box-shadow: 0 12px 35px #160a2380; overflow: hidden; }
.halloween-theme #searchsuggestions > a, .halloween-theme #searchsuggestions div.notfound { padding: 12px; border-bottom: 1px solid var(--hw-line); }
.halloween-theme #searchsuggestions a { color: var(--hw-link); }
.halloween-theme #searchsuggestions a:hover, .halloween-theme #searchsuggestions a:focus-visible { background: var(--hw-surface-alt); }
.halloween-theme #searchsuggestions .searchheading { display: flow-root; }
.halloween-theme #searchsuggestions .poster { width: 54px; max-width: 54px; }
.halloween-theme #searchsuggestions .poster img { display: block; border-radius: 4px; aspect-ratio: 2/3; object-fit: cover; }
.halloween-theme #searchsuggestions .rus-title { font-size: 14px; color: var(--hw-link); }
.halloween-theme #searchsuggestions .eng-title, .halloween-theme #searchsuggestions .info { font-size: 12px; color: var(--hw-muted); }
.halloween-theme #searchsuggestions .seperator a { color: var(--hw-purple); border-top: 1px solid var(--hw-line); }
.halloween-theme #searchsuggestions .notfound::before { content: ''; display: inline-block; width: 19px; height: 21px; vertical-align: -5px; margin-right: 7px; background: var(--hw-purple); -webkit-mask: url('../images/halloween/ghost.svg') center / contain no-repeat; mask: url('../images/halloween/ghost.svg') center / contain no-repeat; }

.halloween-theme :is(.notification-menu,.notification-item) { background: var(--hw-surface); color: var(--hw-ink); border-color: var(--hw-line); }
.halloween-theme .notification-menu { border-radius: 8px; box-shadow: 0 12px 35px #160a2360; max-width: calc(100vw - 24px); }
.halloween-theme .notification-header { color: var(--hw-link); border-color: var(--hw-line); }
.halloween-theme .notification-tabs, .halloween-theme .notification-footer { border-color: var(--hw-line); background: var(--hw-surface-alt); }
.halloween-theme .notification-tab { color: var(--hw-muted); border-radius: 4px; }
.halloween-theme .notification-tab.active { background: #794b83; color: #fff2df; }
.halloween-theme .notification-tab:not(.active):hover { color: var(--hw-link); }
.halloween-theme .notification-item { position: relative; }
.halloween-theme .notification-item.unread { background: var(--hw-surface-alt); border-left: 3px solid var(--hw-orange); }
.halloween-theme .notification-item.unread::after { content: ''; width: 15px; height: 17px; background: var(--hw-orange); -webkit-mask: url('../images/halloween/pumpkin-mask.svg') center / contain no-repeat; mask: url('../images/halloween/pumpkin-mask.svg') center / contain no-repeat; }
.halloween-theme .notification-item:hover, .halloween-theme .notification-item.unread:hover { background: var(--hw-surface-alt); }
.halloween-theme .notification-user-name { color: var(--hw-link); }
.halloween-theme .notification-date, .halloween-theme .notification-empty { color: var(--hw-muted); }
.halloween-theme .notification-like { color: #418156; }
.halloween-theme .notification-dislike { color: #b24843; }
.halloween-theme.dark .notification-like { color: #9ad1a3; }
.halloween-theme.dark .notification-dislike { color: #ffa397; }
.halloween-theme .notification-item-body { min-width: 0; overflow-wrap: anywhere; }
.halloween-theme .notification-controls { z-index: 1; }
.halloween-theme .notification-item:focus-within .notification-controls { display: block; }
.halloween-theme .notification-delete { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 4px; border: 1px solid var(--hw-line); border-radius: 5px; background: var(--hw-surface); color: var(--hw-muted); cursor: pointer; }
.halloween-theme .notification-delete:hover { background: #794b83; color: #fff2df; }
.halloween-theme .notification-image { border-color: var(--hw-line); border-radius: 5px; }
.halloween-theme .notification-empty::before { content: ''; display: inline-block; vertical-align: -8px; width: 25px; height: 28px; margin-right: 8px; background: var(--hw-purple); -webkit-mask: url('../images/halloween/ghost.svg') center / contain no-repeat; mask: url('../images/halloween/ghost.svg') center / contain no-repeat; }

.halloween-theme .online-users__hintbox, .halloween-theme .sticky_tooltip { color: var(--hw-ink); background: var(--hw-surface); border: 1px solid #9f749d; box-shadow: 0 5px 24px #160a2340; }
.halloween-theme .online-users__hintbox-name, .halloween-theme .laba_tip_h b { color: var(--hw-link); }
.halloween-theme .online-users__hintbox strong, .halloween-theme .laba_tip_h, .halloween-theme .laba_tip_c { color: var(--hw-muted); border-color: var(--hw-line); }
.halloween-theme .online-users__more { background: var(--hw-surface-alt); color: var(--hw-link); border: 1px solid var(--hw-line); border-radius: 5px; }
.halloween-theme .online-users__more:hover { background: #794b83; color: #fff2df; }
.halloween-theme .online-users__dot { background: var(--hw-purple); }
.halloween-theme .new-feature-tooltip, .halloween-theme .new-feature-tooltip::after { background: #72447f; color: #fff2df; }
.halloween-theme .new-feature-tooltip-close { background: #4f2b5d; color: #fff2df; }
.halloween-theme .new-feature-tooltip-close:hover { background: #8c5d97; }
.halloween-theme .r_title_eng { color: var(--hw-muted); }
.halloween-theme .r_rate .icon { color: var(--hw-orange); }
.halloween-theme .scroll-buttons { right: 16px; bottom: 18px; border-color: var(--hw-line); }
.halloween-theme .scroll-buttons > div:first-child { border-color: var(--hw-line); }
.halloween-theme .scroll-buttons [role=button]:focus-visible { outline: 2px solid var(--hw-orange); outline-offset: 3px; }

/* A stable footer, including readable alternatives when remote badges fail. */
.halloween-theme .footer { position: relative; display: grid; grid-template-columns: 270px minmax(0,1fr); align-items: center; gap: 16px; padding: 18px; box-sizing: border-box; background: var(--hw-surface-alt); }
.halloween-theme .footer-left { width: auto; height: auto; background: transparent; }
.halloween-theme .footer-left::after, .halloween-theme .footer-copyright::after { content: none; }
.halloween-theme .footer-logo { width: 250px; height: auto; display: block; max-width: 100%; margin: 0 auto; }
.halloween-theme .footer-right { min-width: 0; }
.halloween-theme .footer-top { display: flex; gap: 12px; align-items: center; }
.halloween-theme .footer-copyright { color: var(--hw-muted); background: transparent; padding: 0; line-height: 1.65; font-size: 11px; }
.halloween-theme .footer-design { flex: 0 0 125px; width: 125px; height: auto; background: transparent; }
.halloween-theme .hw-footer-mark { display: inline-flex; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid var(--hw-line); border-radius: 20px; color: var(--hw-purple); font-size: 10px; letter-spacing: 1px; }
.halloween-theme .hw-footer-mark::before { content: ''; width: 20px; height: 16px; display: block; background: var(--hw-purple); -webkit-mask: url('../images/halloween/bat.svg') center / contain no-repeat; mask: url('../images/halloween/bat.svg') center / contain no-repeat; }
.halloween-theme .footer-bottom { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 7px 0 0; align-items: center; }
.halloween-theme .footer-nav { flex: 1 1 350px; }
.halloween-theme .footer-menu { display: flex; flex-wrap: wrap; line-height: 26px; }
.halloween-theme .footer-menu .nav-link { color: var(--hw-link); }
.halloween-theme .footer-counters { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; align-items: center; }
.halloween-theme .footer-counter img[hidden] { display: none; }
.halloween-theme .hw-counter-fallback { display: inline-block; padding: 4px 7px; border: 1px solid var(--hw-line); border-radius: 4px; color: var(--hw-muted); font-size: 10px; }

@media (max-width: 1200px) {
  .halloween-theme .scroll-buttons { display: none !important; }
  .halloween-theme .footer { display: block; text-align: center; padding: 18px 12px; }
  .halloween-theme .footer-left { display: block; margin-bottom: 12px; }
  .halloween-theme .footer-logo { width: 190px; }
  .halloween-theme .footer-top { display: none; }
  .halloween-theme .footer-bottom { justify-content: center; }
  .halloween-theme .footer-nav { flex-basis: 100%; }
  .halloween-theme .footer-menu { justify-content: center; gap: 2px 4px; }
  .halloween-theme .footer-menu .nav-item { padding: 0; }
  .halloween-theme .footer-menu .nav-link { display: inline-block; padding: 3px 5px; }
  .halloween-theme .footer-counters { justify-content: center; }
}
@media (max-width: 576px) {
  .halloween-theme #searchsuggestions { max-width: 100vw; box-sizing: border-box; }
  .halloween-theme #searchsuggestions .rus-title { font-size: 13px; }
  .halloween-theme .notification-item { padding: 14px 12px; }
  .halloween-theme .notification-item-left { flex: 0 0 50px; }
  .halloween-theme .notification-menu .notification-container { max-height: 55vh; }
  .halloween-theme .notification-controls { display: block; top: 5px; right: 5px; }
  .halloween-theme .notification-item-body { padding-right: 24px; margin-right: 0; }
  .halloween-theme .notification-item.unread::after { display: none; }
  .halloween-theme .notification-tabs { padding: 7px 10px; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .halloween-theme .hw-bat, .halloween-theme .online-users__dot, .halloween-theme .login-nav .notice.unread::before { animation: none; }
  .halloween-theme .online-users__hintbox { transition: none; }
}

@media (min-width: 1201px) { .halloween-theme .container { width: calc(100% - 104px); } }

.halloween-theme .notification-item-left:not(:has(.notification-image-box)) { display: none; }
@media (max-width: 576px) { .halloween-theme .notification-delete { width: 32px; height: 32px; } .halloween-theme .notification-item-body { padding-right: 32px; } }


/* Stage 5: visible Halloween creatures and a cemetery ornament strip. */
.halloween-theme .hw-page-cobwebs { position: absolute; inset: 0 0 auto; height: 180px; pointer-events: none; user-select: none; z-index: 1; }
.halloween-theme .hw-cobweb { position: absolute; width: 180px; height: 180px; top: 0; background: url('../images/halloween/web-corner.svg') center / contain no-repeat; opacity: .72; pointer-events: none; }
.halloween-theme .hw-cobweb-left { left: 0; }
.halloween-theme .hw-cobweb-right { right: 0; transform: rotate(90deg); }
.halloween-theme .hw-haunt-scene {
  position: relative; height: 132px; overflow: hidden; isolation: isolate;
  background: radial-gradient(ellipse at 50% 100%, #70402e66, transparent 62%), linear-gradient(#251631,#171020);
  border-top: 1px solid #795080; border-bottom: 1px solid #8d5e70;
  pointer-events: none; user-select: none;
}
.halloween-theme .hw-scene-art { position: absolute; bottom: 0; width: 335px; height: 132px; object-fit: contain; z-index: 2; }
.halloween-theme .hw-scene-zombie { left: 12px; }
.halloween-theme .hw-scene-spirits { right: 12px; }
.halloween-theme .hw-scene-graves { position: absolute; inset: auto 16% 0; height: 100px; background: url('../images/halloween/cemetery.svg') center bottom / 450px 100px repeat-x; opacity: .8; z-index: 0; }
.halloween-theme .hw-scene-web { position: absolute; top: 0; width: 112px; height: 112px; background: url('../images/halloween/web-corner.svg') center / contain no-repeat; opacity: .7; z-index: 3; }
.halloween-theme .hw-scene-web-left { left: 0; }
.halloween-theme .hw-scene-web-right { right: 0; transform: rotate(90deg); }
.halloween-theme .hw-scene-ghost { position: absolute; top: 7px; width: 40px; height: 51px; background: #f7e9d0; -webkit-mask: url('../images/halloween/ghost.svg') center / contain no-repeat; mask: url('../images/halloween/ghost.svg') center / contain no-repeat; filter: drop-shadow(0 0 7px #dfc7ef66); z-index: 1; animation: hw-spirit-float 8s ease-in-out infinite; }
.halloween-theme .hw-scene-ghost-one { left: calc(50% - 92px); transform: rotate(-10deg); }
.halloween-theme .hw-scene-ghost-two { right: calc(50% - 96px); top: 17px; width: 31px; height: 42px; transform: rotate(12deg); animation-delay: -3s; }
.halloween-theme .hw-scene-pumpkin { position: absolute; bottom: 4px; width: 66px; height: 67px; background: #f79532; -webkit-mask: url('../images/halloween/pumpkin-mask.svg') center / contain no-repeat; mask: url('../images/halloween/pumpkin-mask.svg') center / contain no-repeat; filter: drop-shadow(0 0 13px #ff8b365e); z-index: 1; }
.halloween-theme .hw-scene-pumpkin-one { left: calc(50% - 77px); transform: rotate(-8deg); }
.halloween-theme .hw-scene-pumpkin-two { right: calc(50% - 77px); width: 55px; height: 59px; transform: rotate(9deg); }
.halloween-theme .hw-scene-spider { position: absolute; width: 27px; height: 48px; top: 0; left: calc(50% - 12px); background: url('../images/halloween/spider.svg') center bottom / 27px 27px no-repeat; z-index: 2; }
.halloween-theme .hw-scene-spider::before { content: ''; position: absolute; left: 13px; top: 0; width: 1px; height: 25px; background: #ba93cf; }
.halloween-theme .footer > .hw-haunt-scene { grid-column: 1 / -1; margin: -18px -18px 0; border-top: 0; }
.halloween-theme .sidebar-menu .nav-link::before { width: 10px; height: 12px; top: 2px; left: -10px; border-radius: 0; background: var(--hw-purple); -webkit-mask: url('../images/halloween/ghost.svg') center / contain no-repeat; mask: url('../images/halloween/ghost.svg') center / contain no-repeat; }
.halloween-theme .sidebar-menu li:nth-child(3n+1) .nav-link::before { background: var(--hw-orange); -webkit-mask-image: url('../images/halloween/pumpkin-mask.svg'); mask-image: url('../images/halloween/pumpkin-mask.svg'); }
.halloween-theme .sidebar-menu li:nth-child(3n) .nav-link::before { -webkit-mask-image: url('../images/halloween/cross.svg'); mask-image: url('../images/halloween/cross.svg'); }
.halloween-theme .sidebar-menu .nav-link:hover::before { background: #ffe7bb; }
.halloween-theme .section-header .icon-header::before { content: ''; display: inline-block; width: 1em; height: 1em; background: currentColor; -webkit-mask: url('../images/halloween/cross.svg') center / contain no-repeat; mask: url('../images/halloween/cross.svg') center / contain no-repeat; }
.halloween-theme .sidebar-right .sidebar-block-header::after { width: 59px; height: 45px; background-image: url('../images/halloween/web-corner.svg'); opacity: .55; }
@media (min-width: 1600px) {
  .halloween-theme .hw-scene-art { width: 370px; }
}
@media (max-width: 1200px) {
  .halloween-theme .hw-cobweb { display: none; }
  .halloween-theme .hw-haunt-scene { height: 112px; }
  .halloween-theme .hw-scene-art { width: 32%; height: 110px; }
  .halloween-theme .hw-scene-zombie { left: 0; }
  .halloween-theme .hw-scene-spirits { right: 0; }
  .halloween-theme .footer > .hw-haunt-scene { margin: -18px -12px 16px; }
}
@media (max-width: 576px) {
  .halloween-theme .hw-haunt-scene { height: 102px; }
  .halloween-theme .hw-scene-art { width: 49%; height: 100px; }
  .halloween-theme .hw-scene-graves { inset-inline: 0; height: 75px; background-size: 340px 75px; opacity: .65; }
  .halloween-theme .hw-scene-web { width: 64px; height: 64px; opacity: .6; }
  .halloween-theme .hw-scene-ghost-one { left: calc(50% - 13px); top: 7px; width: 27px; height: 36px; }
  .halloween-theme .hw-scene-ghost-two, .halloween-theme .hw-scene-pumpkin-two, .halloween-theme .hw-scene-spider { display: none; }
  .halloween-theme .hw-scene-pumpkin-one { width: 38px; height: 40px; left: calc(50% - 19px); bottom: 6px; }
}
@keyframes hw-spirit-float { 50% { translate: 0 -5px; } }
@media (prefers-reduced-motion: reduce) {
  .halloween-theme .hw-scene-ghost { animation: none; }
}


/* Calendar day tabs share the desktop navigation row, above its background. */
@media (min-width: 1201px) {
  .halloween-theme .releases-menu { z-index: 4; }
  .halloween-theme .header:has(.releases-nav > li) .header-menu .navbar-nav {
    padding-right: 310px;
    box-sizing: border-box;
    flex-wrap: wrap;
  }
  .halloween-theme .releases-nav li.sp_menu_active { background: #59305f; }
}

@media (min-width: 1201px) { .halloween-theme .header:has(.releases-item) .hw-hanging-spider { top: -74px; } }


/* A decorative skull with cursor-following eyes, contained inside the art strip. */
.halloween-theme .hw-watch-skull { position: absolute; left: 50%; bottom: 4px; width: 136px; height: 114px; transform: translateX(-50%); z-index: 4; overflow: visible; pointer-events: none; filter: drop-shadow(0 0 12px #e6934b35); }
.halloween-theme .hw-skull-pupil { will-change: transform; }
.halloween-theme .hw-haunt-scene:has(.hw-watch-skull) .hw-scene-spider { left: calc(50% + 112px); }
.halloween-theme .hw-haunt-scene:has(.hw-watch-skull) .hw-scene-pumpkin-one { left: calc(50% - 123px); }
.halloween-theme .hw-haunt-scene:has(.hw-watch-skull) .hw-scene-pumpkin-two { right: calc(50% - 119px); }
@media (max-width: 1200px) {
  .halloween-theme .hw-watch-skull { width: 112px; height: 94px; }
}
@media (max-width: 576px) {
  .halloween-theme .hw-watch-skull { width: 90px; height: 76px; bottom: 8px; }
  .halloween-theme .hw-haunt-scene:has(.hw-watch-skull) .hw-scene-ghost-one { display: none; }
  .halloween-theme .hw-haunt-scene:has(.hw-watch-skull) .hw-scene-pumpkin-one { left: calc(50% - 74px); width: 32px; height: 34px; }
}
@media (prefers-reduced-motion: reduce), (any-pointer: coarse) {
  .halloween-theme .hw-skull-pupil { will-change: auto; }
}
