/* Shared editorial system: normal, Halloween and Christmas. */
body:is(.theme-halloween,.theme-christmas) .app-shell .profile-cover.profile-theme-classico[style=""]::before,body:is(.theme-halloween,.theme-christmas) .app-shell .profile-cover.profile-theme-classico[style=""]::after{background:transparent!important;box-shadow:none!important}
body:is(.theme-halloween,.theme-christmas) .app-shell .profile-cover[style]:after{background:linear-gradient(0deg,#17121fdd,transparent)!important}
.hw-demo[data-edition=christmas]{background:#244143 url('/assets/christmas-companions.webp') right bottom/auto 65% no-repeat!important}
.hw-demo[data-edition=normal]{background:var(--olive,#1f2a20) url('/assets/commander-portrait.webp') right bottom/auto 65% no-repeat!important}
body:is(.theme-christmas,.theme-halloween) .hw-rail-note[data-edition=normal]{background:var(--edition-hero) url('/assets/commander-portrait.webp') 80% bottom/auto 60% no-repeat;min-height:360px;padding-bottom:230px}
body:is(.theme-christmas,.theme-halloween) .hw-rail-note[data-edition=christmas]{background:var(--edition-hero) url('/assets/christmas-companions.webp') center bottom/auto 70% no-repeat;min-height:280px;padding-bottom:150px}

body.theme-christmas{--hw-bg:#142729;--hw-panel:#20393b;--hw-chrome:#193033;--hw-text:#fff3dc;--hw-muted:#bdd2d0;--hw-lilac:#ebcd8e;--hw-coral:#ffb49b;--hw-border:#486566;--edition-hero:#244143;--edition-wash:#797044;--edition-ink:#fff0cf;--edition-surface:#304d4d}
body.theme-halloween{--hw-chrome:#21192c;--edition-hero:#291d38;--edition-wash:#735080;--edition-ink:#e4c5ff;--edition-surface:#362646}
body:is(.theme-christmas,.theme-halloween){--v11-paper:var(--hw-panel);--v11-ink:var(--hw-text);--v11-line:var(--hw-border);--v12-paper:var(--hw-panel);--v12-ink:var(--hw-text);--v12-line:var(--hw-border);--primary-ink:var(--hw-text);--secondary-ink:var(--hw-text)}
body:is(.theme-christmas) .global-search{background:var(--edition-surface)!important}
body:is(.theme-christmas) .hw-destinations>button{background:var(--hw-panel)}
body:is(.theme-christmas) .hw-destinations>button:nth-child(2){background:color-mix(in srgb,var(--hw-panel) 84%,#a05c50)}
body:is(.theme-christmas) .hw-destinations>button:nth-child(3){background:color-mix(in srgb,var(--hw-panel) 84%,#568e8b)}
body:is(.theme-christmas) #home-view>.stats-grid{background:var(--hw-chrome)!important}
body:is(.theme-christmas) :is(.hw-hero-kicker,.hw-season-year,.hw-hero-content p,.hw-destinations small,.hw-destinations em,.hw-section-heading span){color:var(--hw-muted)}
body:is(.theme-christmas) .hw-destination-icon{background:var(--edition-surface);color:var(--hw-lilac)}
body:is(.theme-christmas) .app-shell :is(.profile-bio-highlight,.dph-timeline,.profile-achievement-strip>div,.profile-info,.profile-stat,.dph-stat,.dph-card){background:var(--hw-panel)!important}
body:is(.theme-christmas) .profile-tabs button.active{background:var(--hw-lilac)!important}
body:is(.theme-christmas,.theme-halloween) :is(.modal-head,.modal-header,.modal-foot,.modal-footer){background:var(--hw-chrome)!important;color:var(--hw-text)!important;border-color:var(--hw-border)!important}
body:is(.theme-christmas,.theme-halloween) .cbhome-stage-default{box-shadow:none!important;border:0!important}
body:is(.theme-christmas) :is(.btn,.cbhome-head-actions .btn,.cbhome-canvas-actions .btn){background:var(--edition-surface)!important;color:var(--hw-text)!important;border-color:var(--hw-border)!important}
body:is(.theme-christmas) .btn.btn-primary{background:var(--hw-coral)!important;color:#301c28!important;border:0!important}
body:is(.theme-christmas,.theme-halloween) :is(.cbhome-adds button,.cbhome-free-frames button){border:0!important;border-radius:15px!important;padding:18px!important;background:var(--edition-surface)!important}
body:is(.theme-christmas,.theme-halloween) :is(.cbhome-adds b,.cbhome-free-frames b,.cbhome-collection summary){color:var(--hw-text)!important}
body:is(.theme-christmas,.theme-halloween) .app-shell>.topbar{background:var(--hw-chrome)!important}
body:is(.theme-christmas,.theme-halloween) .app-shell .main-content{padding:36px clamp(32px,3.3vw,66px) 70px!important}
body:is(.theme-christmas,.theme-halloween) .hw-home-hero{background:radial-gradient(ellipse at 92% 46%,color-mix(in srgb,var(--edition-wash) 35%,transparent),transparent 65%),var(--edition-hero)!important;min-height:430px}
body:is(.theme-christmas,.theme-halloween) .hw-hero-content{background:transparent!important;padding:42px 0 42px 40px}
body:is(.theme-christmas,.theme-halloween) .hw-hero-content h1 em{color:var(--edition-ink)}
body:is(.theme-christmas) .hw-hero-content h1{font-size:clamp(46px,3.7vw,66px);line-height:1.04}
body:is(.theme-christmas,.theme-halloween) .hw-hero-scene{background-image:var(--edition-art);inset:0 -2% 0 -25%;mask-image:linear-gradient(90deg,transparent 0%,#000 40%,#000 80%,transparent 100%),linear-gradient(0deg,transparent 0%,#000 16%,#000 84%,transparent 100%);mask-composite:intersect;background-position:70% center;background-size:contain}

body.theme-christmas .hw-hero-scene{inset:18px 20px 36px -8%;background-size:contain;background-position:center;mask-image:none}
body:is(.theme-christmas) .hw-art-caption{background:var(--hw-chrome);border-radius:20px;padding:8px 12px;bottom:14px;left:0;font-size:8px;color:var(--hw-text)}
body:is(.theme-christmas,.theme-halloween) .app-shell .profile-cover .profile-main{background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0!important;padding:12px 0!important}
body:is(.theme-christmas,.theme-halloween) .app-shell .profile-main .profile-identity{background:transparent!important;border:0!important;box-shadow:none!important;padding:16px 22px!important}
body:is(.theme-christmas,.theme-halloween) .app-shell .profile-cover{border-radius:24px!important;overflow:hidden}
body:is(.theme-christmas,.theme-halloween) .app-shell .profile-cover.profile-theme-classico[style=""]{background:radial-gradient(ellipse at 100% 0%,var(--edition-wash),transparent 75%),var(--edition-hero)!important}
body:is(.theme-christmas,.theme-halloween) .app-shell .profile-rank{background:var(--edition-surface)!important;color:var(--hw-text)!important;border:0!important;border-radius:20px!important}
body:is(.theme-christmas,.theme-halloween) :is(.side-status,.side-section-title,.side-nav,.side-account,.card-title,.card-body,.page-head,.empty){color:var(--hw-muted)!important}
body:is(.theme-christmas,.theme-halloween) .app-shell :is(.side-section-title,.profile-overline,.profile-cover-top,.profile-meta){color:var(--hw-muted)!important}
body:is(.theme-christmas,.theme-halloween) .app-shell :is(.btn-light,.btn-default,.subnav,.panel-tabs,.classroom-tabs,.classroom-school,.course-application-form,.forum-search,.mail-categories,.cbhome-navigation,.cbhome-tools,.gallery-toolbar){background:var(--hw-panel)!important;border-color:var(--hw-border)!important;color:var(--hw-text)!important}
body:is(.theme-christmas,.theme-halloween) .app-shell :is(.cbhome-navigation,.classroom-tabs,.subnav,.panel-tabs) button{background:transparent!important;color:var(--hw-muted)!important;border:0!important}
body:is(.theme-christmas,.theme-halloween) .app-shell :is(.cbhome-navigation,.classroom-tabs,.subnav,.panel-tabs) button.active{background:var(--hw-lilac)!important;color:#231d29!important;border-radius:12px!important}
body:is(.theme-christmas,.theme-halloween) .cbhome-hero{min-height:260px;border:0!important;border-radius:24px!important;overflow:hidden;background:radial-gradient(ellipse at 85% 5%,var(--edition-wash),transparent 65%),var(--edition-hero)!important}
body:is(.theme-christmas,.theme-halloween) .cbhome-hero-cover[style=""]{background:transparent!important}
body:is(.theme-christmas,.theme-halloween) .cbhome-hero-person{background:transparent!important;color:var(--hw-text)!important}
body:is(.theme-christmas,.theme-halloween) .cbhome-hero-person :is(small,span){color:var(--hw-muted)!important}
body:is(.theme-christmas,.theme-halloween) .cbhome-hero-person h2{color:var(--hw-text)!important;font-size:clamp(28px,3vw,44px);letter-spacing:-.05em}
body:is(.theme-christmas,.theme-halloween) .cbhome-navigation{padding:12px!important;margin:18px 0 28px!important;border-radius:18px!important;gap:10px!important}
body:is(.theme-christmas,.theme-halloween) .cbhome-navigation>span{color:var(--hw-muted)!important}
body:is(.theme-christmas,.theme-halloween) .cbhome-frame{background:var(--hw-chrome)!important;border:0!important;border-radius:18px!important;padding:12px!important}
body:is(.theme-christmas,.theme-halloween) .cbhome-stage-default{background:radial-gradient(ellipse at 90% 10%,var(--edition-surface),transparent 65%),var(--hw-chrome)!important}
body:is(.theme-christmas,.theme-halloween) .cbhome-stage-default .cbhome-grid{opacity:.15}
body:is(.theme-christmas,.theme-halloween) .cbhome-empty{color:var(--hw-muted)!important;background:transparent!important;text-align:center;padding:90px 25px!important;max-width:580px;margin:0 auto!important}
body:is(.theme-christmas,.theme-halloween) .cbhome-empty>span{display:grid;place-items:center;width:74px;height:74px;border-radius:25px;background:var(--edition-surface);font-size:36px;color:var(--hw-lilac);margin:0 auto 24px;transform:rotate(-8deg)}
body:is(.theme-christmas,.theme-halloween) .cbhome-empty small{font:700 10px Inter;letter-spacing:.16em;color:var(--hw-muted)}
body:is(.theme-christmas,.theme-halloween) .cbhome-empty h3{font:800 38px/1.1 Inter;letter-spacing:-.055em;color:var(--hw-text);margin:18px 0}
body:is(.theme-christmas,.theme-halloween) .cbhome-empty p{font:14px/1.8 Inter;color:var(--hw-muted)}
body:is(.theme-christmas,.theme-halloween) :is(.cbhome-adds button,.cbhome-free-frames button,.cbhome-collection details,.cbhome-collection-list button,.guestbook-row){background:var(--hw-panel)!important;color:var(--hw-text)!important;border-color:var(--hw-border)!important}
body:is(.theme-christmas,.theme-halloween) :is(.cbhome-adds small,.cbhome-tool-hint,.cbhome-collection p,.cbhome-free-frames small){color:var(--hw-muted)!important}
body.theme-christmas .app-shell:before,body.theme-christmas:before,body.theme-christmas:after{display:none!important}
body:is(.theme-christmas) .hw-login-stage{background:radial-gradient(ellipse at 100% 80%,var(--edition-wash),transparent 75%),var(--edition-hero)}
body:is(.theme-christmas) .hw-login-mini-ghost{display:none}

body.theme-christmas .hw-login-art{width:78%;right:-8%;bottom:20px;mask-image:none}
body:is(.theme-christmas) .hw-login-story{z-index:2}

body.theme-christmas .hw-login-story h1 em{color:#edce8c}
body:is(.theme-christmas) .hw-login-story{width:55%}
body:is(.theme-christmas) .hw-login-story h1{font-size:clamp(40px,3.6vw,64px);line-height:1.08}

body.theme-christmas .hw-login-access{background:#f8f0da}

body.theme-christmas .hw-login-access .btn-login{background:#8b343c!important}
body:is(.theme-christmas) .hw-login-access .btn.btn-login{color:#fff5ef!important}
@media(max-width:600px){body:is(.theme-christmas) .hw-login-stage{min-height:700px}}
@media(min-width:1600px){body:is(.theme-christmas,.theme-halloween) .hw-home-hero{min-height:480px}body:is(.theme-christmas,.theme-halloween) .hw-hero-content{padding-left:48px}}
@media(max-width:1100px){body:is(.theme-christmas,.theme-halloween) .app-shell .main-content{padding:28px 30px 60px!important}body:is(.theme-christmas) .hw-hero-content h1{font-size:50px}body:is(.theme-christmas) .hw-login-story{width:74%}body:is(.theme-christmas) .hw-login-art{max-height:65%;right:-10%;width:85%}}
@media(max-width:600px){body:is(.theme-christmas,.theme-halloween) .app-shell .main-content{padding:22px 18px 50px!important}body:is(.theme-christmas,.theme-halloween) .hw-hero-content{padding:30px 26px 0}body:is(.theme-christmas,.theme-halloween) .hw-home-hero{min-height:0}body.theme-halloween .hw-hero-scene{inset:-15px -10px 0;mask-image:linear-gradient(0deg,transparent,#000 15%,#000 70%,transparent);background-size:100% auto}body.theme-christmas .hw-hero-art{min-height:300px}body.theme-christmas .hw-hero-scene{inset:0;background-size:contain}body:is(.theme-christmas) .hw-art-caption{left:20px;right:20px}body:is(.theme-christmas) .hw-hero-content h1{font-size:48px}body:is(.theme-christmas) .hw-login-art{width:82%;right:-2%;height:300px;max-height:300px;bottom:20px}body:is(.theme-christmas) .hw-login-story{width:85%}body:is(.theme-christmas) .hw-login-story h1{font-size:36px!important}body:is(.theme-christmas,.theme-halloween) .cbhome-navigation{flex-wrap:wrap}body:is(.theme-christmas,.theme-halloween) .cbhome-navigation>span{width:100%}}

/* Halloween surface contract across all System and DPanel modules. */
body.theme-halloween{--accent-secondary-ink:#291822;--surface-raised:#33253f;--surface-inset:#1b1525;--success-ink:#b7efcf;--warning-ink:#ffdb9b}
body.theme-halloween .page-head .kicker{display:flex;align-items:center;gap:10px}
body.theme-halloween .page-head .kicker:after{content:'';width:28px;height:18px;display:inline-block;background:currentColor;opacity:.85;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 20'%3E%3Cpath d='M1 12Q4 3 11 9L13 4L16 7L19 4L21 9Q28 3 31 12Q25 10 23 17Q19 11 16 18Q13 11 9 17Q7 10 1 12Z'/%3E%3C/svg%3E") center/contain no-repeat}
body.theme-halloween :is(.notice,.home-widget-error,.communication-health>div,.runtime-entry,.startup-report,.grau-interest-entry,.admin-panel,.admin-stat,.admin-context,.panel-body .card,.course-card,.shop-item,.mail-thread,.forum-category,.forum-thread,.person-picker-results,.dropdown-menu,.notification-panel){background:var(--hw-panel)!important;color:var(--hw-text)!important;border-color:var(--hw-border)!important}
body.theme-halloween :is(.notice.warn,.notice.warning,.tag.gold){background:#493540!important;color:#ffdb9b!important;border-color:#82604e!important}
body.theme-halloween :is(.notice.error,.notice.danger,.tag.red){background:#4a2539!important;color:#ffc1cc!important;border-color:#8b5068!important}
body.theme-halloween :is(.notice.success,.tag.green){background:#243d38!important;color:#b7efcf!important;border-color:#456c5e!important}
body.theme-halloween :is(.subnav,.profile-period,.mail-tabs,.forum-tabs,.ranking-tabs,.course-tabs,.activity-subtabs,.cbhome-navigation){background:var(--surface-inset)!important;border-color:var(--hw-border)!important;border-radius:12px}
body.theme-halloween :is(.subnav,.profile-period,.mail-tabs,.forum-tabs,.ranking-tabs,.course-tabs,.activity-subtabs,.cbhome-navigation) button{background:transparent!important;color:var(--hw-muted)!important;border-color:transparent!important}
body.theme-halloween :is(.subnav,.profile-period,.mail-tabs,.forum-tabs,.ranking-tabs,.course-tabs,.activity-subtabs,.cbhome-navigation) button:is(.active,[aria-selected=true]){background:#d3b5fa!important;color:#24172f!important;border-color:transparent!important}
body.theme-halloween :is(.admin-shell,.modal,.dialog,.panel-body) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]),select,textarea){background:var(--surface-inset)!important;color:var(--hw-text)!important;border-color:#79608b!important}
body.theme-halloween :is(.modal,.dialog,.admin-context,.admin-topbar,.admin-rail,.admin-sidebar){background:var(--hw-chrome)!important;color:var(--hw-text)!important;border-color:var(--hw-border)!important}
body.theme-halloween :is(.admin-shell,.profile-grid) :is(h2,h3,h4,b,strong,dt){color:var(--hw-text)}
body.theme-halloween :is(.admin-shell,.profile-grid) :is(small,.text-muted,.muted){color:var(--hw-muted)!important}
body.theme-halloween .profile-cover.profile-theme-classico[style=""]{background:radial-gradient(circle at 88% 15%,#73508088,transparent 48%),linear-gradient(120deg,#241a32,#3b294c)!important}
body.theme-halloween .profile-cover .profile-cover-top{border-bottom:1px solid #ffffff12;padding-bottom:20px}
body.theme-halloween .profile-cover .profile-cover-top i{color:#ffbd8e;font-size:18px}
body.theme-halloween .profile-achievement-strip{background:var(--hw-panel)!important}
body.theme-halloween .profile-achievement-strip>div{background:transparent!important}
body.theme-halloween .profile-grid :is(.profile-info,.profile-stat,.subdivision-profile-card,.permission-list>div,.dph-card,.dph-stat,.dph-timeline){background:var(--hw-panel)!important;color:var(--hw-text)!important;border-color:var(--hw-border)!important}
body.theme-halloween .profile-duty-pill{background:#241e30;color:#e4d9ed}
body.theme-halloween :is(.table,.admin-table) :is(th,td){border-color:var(--hw-border)!important}
body.theme-halloween :is(.table,.admin-table) tbody tr:hover{background:#382944!important}
body.theme-halloween :is(button,a):disabled{opacity:.58;cursor:not-allowed}
body.theme-halloween .grau-interest-entry dd{color:#e2d5e9}

/* Seasonal finishing details stay inside the seasonal scope. */
body.theme-halloween .hw-rail-note{background:#342543 url('/assets/halloween-companions-cutout-v1.png') center bottom/230px auto no-repeat!important}
body.theme-halloween .main-content{padding-left:30px!important;padding-right:30px!important}
body.theme-halloween .hw-hero-content p{max-width:88%}
.cbm-album .album-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.cbm-album .album-photo{min-width:0;overflow:hidden}
.cbm-album .album-photo>button{width:100%;max-width:100%;min-width:0;padding:0;border:0;background:var(--card);color:var(--ink);text-align:left}
.cbm-album .album-photo img{display:block;width:100%;max-width:100%;object-fit:cover}
body.theme-halloween .cbm-album .album-photo>button{background:var(--hw-panel);color:var(--hw-text)}
@media(max-width:700px){body.theme-halloween .main-content{padding-left:18px!important;padding-right:18px!important}.cbm-album .album-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

body.theme-halloween .admin-shell :is(.card-body,.admin-card,.appearance-color-choice,.settings-section,.config-section){background:var(--hw-panel)!important;color:var(--hw-text)!important;border-color:var(--hw-border)!important}
body.theme-halloween .appearance-preview-body h3{color:var(--preview-ink,#1f2a20)!important}
body.theme-halloween .appearance-preview-body p{color:var(--preview-ink,#1f2a20)!important}

body.theme-halloween .appearance-color-choice output{color:var(--hw-text)!important}

@media(max-width:700px){.page-banner{flex-wrap:wrap;gap:20px!important}.page-banner .page-actions{width:100%;min-width:0}.page-banner .page-actions .btn{white-space:normal;max-width:100%;min-height:44px}}
