/* Home and guild selection share the illustrated dashboard assets and DEV theme.
   All decoration is CSS-only, with no hit targets or generated UI text. */
html:root[data-theme][data-season-theme] :is(body.public-home,body.zoryx-dashboard-home) {
  --bg:var(--festive-bg);--surface:var(--festive-panel);--surface-raised:var(--festive-panel-alt);
  --text:var(--festive-ink);--muted:var(--festive-soft);--line:var(--festive-line);
  --z-bg:var(--festive-bg);--z-panel:var(--festive-panel);--z-panel-strong:var(--festive-panel-alt);
  --z-text:var(--festive-ink);--z-muted:var(--festive-soft);--z-line:var(--festive-outline);
  --z-line-strong:var(--festive-accent);--z-purple:var(--festive-accent);--z-blue:var(--festive-second);
  color:var(--festive-ink);
  background:linear-gradient(180deg,transparent 650px,var(--festive-bg) 1050px),
    var(--festive-hero) center top / 100% 1050px no-repeat,var(--festive-bg) !important;
}
html:root[data-theme][data-season-theme] body.zoryx-dashboard-home::before,
html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .dashboard-shell::before,
html:root[data-theme][data-season-theme] body.public-home .hero::before {content:none !important;}
html:root[data-theme][data-season-theme] body.public-home .hero {
  padding-top:80px;padding-bottom:80px;gap:48px;
}
html:root[data-theme][data-season-theme] body.public-home .hero-copy {
  padding:30px 26px;border-radius:16px;
  background:linear-gradient(130deg,color-mix(in srgb,var(--festive-bg) 94%,transparent),color-mix(in srgb,var(--festive-bg) 72%,transparent));
  border:1px solid color-mix(in srgb,var(--festive-line) 48%,transparent);
  box-shadow:0 12px 50px #0004;
}
html:root[data-theme][data-season-theme] body.public-home .site-header,
html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .dashboard-topbar {
  background:color-mix(in srgb,var(--festive-bg) 92%,transparent) !important;
  border-bottom:1px solid var(--festive-line) !important;backdrop-filter:blur(12px);
}
html:root[data-theme][data-season-theme] body.public-home .site-header::after,
html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .dashboard-topbar::after {content:none;}
html:root[data-theme][data-season-theme] body.public-home :is(.desktop-nav a,.desktop-nav a .icon,.language-switch select,.hero-benefits,.hero-benefits .icon,.feature-number,.product-preview figcaption,.prefix-note,.footer-top p,.footer-top nav,.footer-bottom,.strip-inner > p,.strip-inner > div > span,.strip-inner i,.floating-ticket small,.premium-panel p:not(.eyebrow),.premium-panel small,.premium-caption) {
  color:var(--festive-soft);
}
html:root[data-theme][data-season-theme] body.public-home :is(.button-secondary,.button-premium,.language-switch select,.mobile-nav summary,.server-avatar,.preview-dots i) {
  background:var(--festive-panel-alt);border-color:var(--festive-line);color:var(--festive-ink) !important;
}
html:root[data-theme][data-season-theme] body.public-home :is(.button-secondary,.button-premium,.header-login):hover {
  background:var(--festive-panel) !important;border-color:var(--festive-accent-light);
}
html:root[data-theme][data-season-theme] body.public-home :is(.header-login .icon,.text-link:hover,.premium-star,.faq-list summary .icon) {color:var(--festive-accent-light) !important;}
html:root[data-theme][data-season-theme] body.public-home :is(.server-showcase,.showcase-server,.server-avatar,.mobile-nav nav,.mobile-nav nav a + a) {border-color:var(--festive-outline);}
html:root[data-theme][data-season-theme] body.public-home .server-showcase {background:color-mix(in srgb,var(--festive-bg) 86%,transparent);}
html:root[data-theme][data-season-theme] body.public-home :is(.preview-frame,.feature-card,.command-panel,.premium-panel),
html:root[data-theme][data-season-theme] body.zoryx-dashboard-home :is(.guild-grid-card,.metric-pill) {
  position:relative;isolation:isolate;overflow:hidden;
  background:linear-gradient(140deg,var(--festive-panel),var(--festive-panel-alt)) !important;
  border:1px solid var(--festive-outline) !important;
  box-shadow:0 10px 30px #0004 !important;
}
html:root[data-theme][data-season-theme] body.public-home :is(.preview-frame,.feature-card,.command-panel,.premium-panel)::after,
html:root[data-theme][data-season-theme] body.zoryx-dashboard-home :is(.guild-grid-card,.metric-pill)::after {
  content:"";display:block !important;position:absolute;inset:0;z-index:2;pointer-events:none;
  width:auto;height:auto;background:none;border:solid transparent;border-width:28px 30px 40px;
  border-image-source:var(--season-frame);border-image-slice:var(--season-frame-slice);border-image-repeat:repeat;
}
html:root[data-theme][data-season-theme] body.public-home :is(.preview-frame,.feature-card,.command-panel,.premium-panel) > *,
html:root[data-theme][data-season-theme] body.zoryx-dashboard-home :is(.guild-grid-card,.metric-pill) > * {position:relative;z-index:3;}
html:root[data-theme][data-season-theme] body.public-home .feature-card {padding:30px 28px 42px;}
html:root[data-theme][data-season-theme] body.public-home .preview-frame {padding:10px;}
html:root[data-theme][data-season-theme] body.public-home .preview-frame::before {content:none;}
html:root[data-theme][data-season-theme] body.public-home .command-panel {padding:10px 10px 22px;}
html:root[data-theme][data-season-theme] body.public-home .premium-panel {padding:48px 54px 60px;}
html:root[data-theme][data-season-theme] body.public-home .premium-orbit {position:absolute;border-color:var(--festive-line);}
html:root[data-theme][data-season-theme] body.public-home .premium-gem {box-shadow:13px 15px 0 var(--festive-panel-alt);color:var(--festive-bg);}
html:root[data-theme][data-season-theme] body.public-home .preview-metrics strong {color:var(--festive-ink);}
html:root[data-theme][data-season-theme] body.public-home :is(.preview-main,.preview-titlebar,.preview-footer) {background:transparent !important;}
html:root[data-theme="dark"][data-season-theme="christmas"] body.public-home .preview-sidebar {background:#042619 !important;}
html:root[data-theme][data-season-theme="christmas"] body.public-home .feature-card:nth-child(even),
html:root[data-theme][data-season-theme="christmas"] body.zoryx-dashboard-home .guild-grid-card:nth-child(even) {background:linear-gradient(140deg,#04291b,#02180f) !important;}
html:root[data-theme][data-season-theme="christmas"] body.public-home .feature-card:nth-child(odd),
html:root[data-theme][data-season-theme="christmas"] body.zoryx-dashboard-home .guild-grid-card:nth-child(odd) {background:linear-gradient(140deg,#500506,#2b0205) !important;}
html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .dashboard-shell {padding-top:60px;}
html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .welcome-row {
  min-height:200px;padding:26px 28px;align-items:center;
  border:1px solid var(--festive-outline);border-radius:16px;
  background:linear-gradient(110deg,color-mix(in srgb,var(--festive-bg) 96%,transparent),color-mix(in srgb,var(--festive-bg) 65%,transparent));
}
html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .workspace {
  background:color-mix(in srgb,var(--festive-panel) 97%,transparent) !important;
  border:1px solid var(--festive-outline) !important;box-shadow:0 18px 60px #0005;
}
html:root[data-theme][data-season-theme] body.zoryx-dashboard-home :is(.workspace-toolbar,.search-box,.topbar-link,#empty-state) {border-color:var(--festive-outline);}
html:root[data-theme][data-season-theme] body.zoryx-dashboard-home :is(.eyebrow,.workspace-heading h2,.guild-card-meta,.dashboard-footnote,.search-box i,.search-box input::placeholder,.topbar-link,.filter-btn) {color:var(--festive-soft) !important;}
html:root[data-theme][data-season-theme] body.zoryx-dashboard-home :is(#language-select,#loading-overlay > div,.profile-chip .profile-avatar,.guild-card-avatar-fallback) {
  background:var(--festive-panel-alt) !important;border-color:var(--festive-outline);color:var(--festive-ink);
}
html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .search-box:focus-within {border-color:var(--festive-accent);box-shadow:0 0 0 3px var(--festive-shine);}
html:root[data-theme][data-season-theme] body.zoryx-dashboard-home :is(.filter-btn.active,.filter-btn:hover,.topbar-link:hover) {
  color:var(--festive-ink) !important;background:var(--festive-panel-alt) !important;border-color:var(--festive-accent) !important;
}
html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .guild-card-inner {padding:24px 22px 30px;}
html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .metric-pill {padding:16px 18px 20px;}
html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .metric-pill::after {border-width:14px 16px 18px;}
html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .guild-grid-card:hover {border-color:var(--festive-accent-light) !important;box-shadow:0 0 18px var(--festive-shadow) !important;}
html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .guild-card-action .btn-outline {background:var(--festive-panel-alt);border-color:var(--festive-line);color:var(--festive-ink);}
@media(max-width:1000px) {
  html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .welcome-row {align-items:stretch;}
  html:root[data-theme][data-season-theme] body.public-home .hero {gap:32px;}
}
@media(max-width:680px) {
  html:root[data-theme][data-season-theme] :is(body.public-home,body.zoryx-dashboard-home) {background-size:auto,auto 850px,auto !important;background-position:center top,65% top,center !important;}
  html:root[data-theme][data-season-theme] body.public-home .hero {padding-top:32px;padding-bottom:40px;}
  html:root[data-theme][data-season-theme] body.public-home .hero-copy {padding:24px 20px;}
  html:root[data-theme][data-season-theme] body.public-home .hero h1 {font-size:clamp(34px,9vw,48px);}
  html:root[data-theme][data-season-theme] body.public-home .premium-panel {padding:30px 26px 44px;}
  html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .dashboard-shell {padding-top:28px;}
  html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .welcome-row {min-height:0;padding:22px 16px;gap:22px;}
  html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .metric-pill {padding:12px 9px 16px;}
  html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .guild-card-inner {padding:22px 18px 28px;gap:8px;}
  html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .topbar-actions {gap:6px;}
}
@media(prefers-reduced-motion:reduce) {
  html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .guild-grid-card:hover {transform:none;}
}
@media print {
  html:root[data-theme][data-season-theme] :is(body.public-home,body.zoryx-dashboard-home) {background:none !important;}
  html:root[data-theme][data-season-theme] body.public-home :is(.preview-frame,.feature-card,.command-panel,.premium-panel)::after,
  html:root[data-theme][data-season-theme] body.zoryx-dashboard-home :is(.guild-grid-card,.metric-pill)::after {display:none !important;}
}

/* Shared ornaments continue through the public and server-selection pages. */
html:root[data-theme][data-season-theme] body.public-home .feature-card,
html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .guild-grid-card {
  background-image:linear-gradient(110deg,var(--festive-panel) 35%,transparent),var(--season-detail) !important;
  background-position:center,right bottom !important;background-size:auto,180px auto !important;background-repeat:no-repeat !important;
}
html:root[data-theme][data-season-theme] body.public-home .feature-card:nth-child(even),
html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .guild-grid-card:nth-child(even) {background-size:auto,130px auto !important;}
html:root[data-theme][data-season-theme="christmas"] body.public-home .site-header::after,
html:root[data-theme][data-season-theme="christmas"] body.zoryx-dashboard-home .dashboard-topbar::after {
  content:"";position:absolute;left:0;right:0;bottom:-19px;height:30px;
  background:url('/img/themes/christmas-garland.webp') center / auto 100px repeat-x;pointer-events:none;
}

/* QA: keep controls and long server names readable at narrow widths. */
html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .guild-card-action .btn-primary {
  background:var(--festive-panel-alt) !important;border:1px solid var(--festive-accent) !important;color:var(--festive-ink) !important;
}
html:root[data-theme][data-season-theme] body.public-home :is(.hero-description,.section-description,.feature-card p,.faq-list p) {
  line-height:1.65;overflow-wrap:break-word;
}
@media(max-width:680px) {
  html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .guild-card-inner {grid-template-columns:50px minmax(0,1fr);}
  html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .guild-card-media {grid-column:1;grid-row:1;}
  html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .guild-card-copy {grid-column:2;grid-row:1;}
  html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .guild-card-title {white-space:normal;overflow-wrap:anywhere;line-height:1.35;}
  html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .guild-card-topline {grid-column:1 / -1;grid-row:2;justify-self:start;align-self:center;}
  html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .guild-card-action {grid-column:2;grid-row:2;}
  html:root[data-theme][data-season-theme] body.zoryx-dashboard-home .guild-card-action .btn {height:36px;min-height:36px;}
}

/* A viewport layer keeps the landscape visible on long pages, including mobile
   browsers that ignore background-attachment:fixed. It cannot intercept input. */
@media screen {
  html:root[data-theme][data-season-theme] body:has(.drawer),
  html:root[data-theme][data-season-theme] body.public-home,
  html:root[data-theme][data-season-theme] body.zoryx-dashboard-home {
    isolation:isolate;background:var(--festive-bg) !important;
  }
  html:root[data-theme][data-season-theme] body:has(.drawer)::before,
  html:root[data-theme][data-season-theme] body.public-home::before,
  html:root[data-theme][data-season-theme] body.zoryx-dashboard-home::before {
    content:"" !important;display:block !important;position:fixed;inset:0;
    width:auto;height:auto;z-index:-1;pointer-events:none;opacity:1;
    background:var(--festive-hero) center top / cover no-repeat !important;
    mask-image:none;filter:none;transform:none;
  }
  html:root[data-theme][data-season-theme] body:has(.drawer) .drawer-content {
    background:transparent !important;
  }
}
@media screen and (max-width:767px) {
  html:root[data-theme][data-season-theme] body:has(.drawer)::before,
  html:root[data-theme][data-season-theme] body.public-home::before,
  html:root[data-theme][data-season-theme] body.zoryx-dashboard-home::before {
    background-position:85% top !important;
  }
}

@media screen {
  html:root[data-theme][data-season-theme] body.public-home :is(.site-footer,.workflow-section,.brand-strip) {
    background:color-mix(in srgb,var(--festive-bg) 65%,transparent) !important;
  }
}

/* Clean panel edges remain consistent at every card size. */
html:root[data-theme][data-season-theme] body:has(.drawer) .drawer-content main .card:not(.zoryx-no-season-snow)::after,
html:root[data-theme][data-season-theme] body.public-home :is(.preview-frame,.feature-card,.command-panel,.premium-panel)::after,
html:root[data-theme][data-season-theme] body.zoryx-dashboard-home :is(.guild-grid-card,.metric-pill)::after {
  content:none !important;display:none !important;
}
html:root[data-theme][data-season-theme] body:has(.drawer) .drawer-content main .card,
html:root[data-theme][data-season-theme] body.public-home :is(.preview-frame,.feature-card,.command-panel,.premium-panel),
html:root[data-theme][data-season-theme] body.zoryx-dashboard-home :is(.guild-grid-card,.metric-pill) {
  border:1px solid color-mix(in srgb,var(--festive-accent) 32%,var(--festive-panel)) !important;
  border-radius:14px !important;
  box-shadow:0 8px 24px #0003,inset 0 1px 0 #ffffff05 !important;
}

/* Dedicated Halloween ornaments replace the repeated sidebar landscape. */
html:root[data-theme][data-season-theme="halloween"] body:has(.drawer) .drawer-side > div.menu {
  background:linear-gradient(180deg,#160e20,#0b0910 45%,#180c16) !important;
}
html:root[data-theme][data-season-theme="halloween"] body:has(.drawer) .drawer-side > div.menu > :first-child {
  min-height:175px;padding-top:22px;
}
html:root[data-theme][data-season-theme="halloween"] body:has(.drawer) .drawer-side > div.menu > :first-child::before {
  background:url('/img/themes/halloween-header-creatures.webp') center top / 100% auto no-repeat;
  mask-image:none;opacity:1;
}
html:root[data-theme][data-season-theme="halloween"] body:has(.drawer) .drawer-content > main::after,
html:root[data-theme][data-season-theme="halloween"] body.public-home main::after,
html:root[data-theme][data-season-theme="halloween"] body.zoryx-dashboard-home .dashboard-shell::after {
  content:"";display:block;position:relative;inset:auto;width:90px;height:135px;
  margin:24px 24px 0 auto;background:url('/img/themes/halloween-skeleton.webp') center / contain no-repeat;
  pointer-events:none;opacity:.85;border:0;transform:none;
}
html:root[data-theme][data-season-theme="halloween"] body.public-home .site-header::after,
html:root[data-theme][data-season-theme="halloween"] body.zoryx-dashboard-home .dashboard-topbar::after {
  content:"";position:absolute;left:0;top:0;width:130px;height:85px;
  background:url('/img/themes/halloween-header-creatures.webp') left top / contain no-repeat;
  pointer-events:none;opacity:.8;
}
@media(max-width:767px) {
  html:root[data-theme][data-season-theme="halloween"] body.public-home .site-header::after,
  html:root[data-theme][data-season-theme="halloween"] body.zoryx-dashboard-home .dashboard-topbar::after {display:none;}
}

/* Premium illustrations are backgrounds, never additional layout rows. */
html:root[data-theme][data-season-theme] body:has(.drawer) .drawer-content main .premium-plan-card .premium-plan-content {
  padding:56px 24px 28px;height:auto;flex:1;
}
html:root[data-theme][data-season-theme] body:has(.drawer) .drawer-content main .premium-plan-card .premium-plan-content > p {flex-grow:0;}
html:root[data-theme][data-season-theme] body:has(.drawer) .drawer-content main .premium-plan-card .premium-recommended-badge {
  position:absolute;top:16px;right:20px;left:auto;z-index:4;max-width:calc(100% - 40px);
}
html:root[data-theme][data-season-theme] body:has(.drawer) .drawer-content main .premium-plan-card .premium-plan-bg {
  position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:center;opacity:.12;z-index:0;
}
html:root[data-theme][data-season-theme] body:has(.drawer) .drawer-content main .premium-plan-card .premium-plan-overlay {
  position:absolute;inset:0;z-index:1;background:linear-gradient(180deg,transparent, var(--festive-panel));
}

/* Christmas sidebar: reserve the header artwork for the top edge, not account text. */
html:root[data-theme][data-season-theme="christmas"] body:has(.drawer) .drawer-side > div.menu {
  background:linear-gradient(180deg,#062b1c,#031b13 45%,#082219) !important;
}
html:root[data-theme][data-season-theme="christmas"] body:has(.drawer) .drawer-side > div.menu > :first-child {
  min-height:190px;padding-top:30px;padding-bottom:20px;box-shadow:none;
}
html:root[data-theme][data-season-theme="christmas"] body:has(.drawer) .drawer-side > div.menu > :first-child::before {
  inset:0 0 auto;height:30px;
  background:url('/img/themes/christmas-garland.webp') center / auto 110px no-repeat;
  mask-image:none;opacity:1;
}
