/* Homepage broadcast and welcome placement share the platform's foundry glass. */
.home-broadcast-slot:empty, .home-banner-slot:empty { display: none; }
body.ui-polished .home-broadcast {
  display: flex; align-items: center; gap: 8px; height: 34px;
  box-sizing: border-box; padding: 0 7px 0 10px; margin: 0 0 13px;
  color: var(--text-secondary); border: 1px solid var(--forge-line, var(--border));
  border-radius: 11px; background: var(--forge-soft, var(--accent-soft));
  box-shadow: inset 0 1px 0 var(--ui-highlight); overflow: hidden;
}
.home-broadcast-icon { flex: 0 0 17px; display: grid; place-items: center; color: var(--accent); }
.home-broadcast-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.home-broadcast-viewport {
  min-width: 0; flex: 1; overflow: hidden; height: 22px; line-height: 22px;
  font-size: 11.5px; outline-offset: -1px; border-radius: 4px;
}
.home-broadcast-track { display: flex; align-items: center; gap: 36px; width: max-content; will-change: transform; }
.home-broadcast-text, .home-broadcast-copy { display: block; flex: 0 0 auto; white-space: nowrap; width: max-content; }
.home-broadcast-copy { display: none; }
.home-broadcast-looping .home-broadcast-copy { display: block; }
.home-broadcast-viewport:focus-visible { outline: 2px solid var(--accent); }
.home-broadcast.home-broadcast-static .home-broadcast-viewport { overflow-x: auto; scrollbar-width: none; }
.home-broadcast-static .home-broadcast-viewport::-webkit-scrollbar { display: none; }
.home-ad-carousel {
  --home-ad-background: linear-gradient(116deg, #213a52, #173149 61%, #244864);
  --home-ad-glow: rgba(97, 183, 239, .18);
  --home-ad-art-opacity: .88;
  --home-ad-art-filter: saturate(.86);
  position: relative; margin: 0 0 16px; border-radius: 21px;
}
:root[data-theme="light"] .home-ad-carousel {
  --home-ad-background: linear-gradient(116deg, #fafdff, #edf5fd 61%, #dcecff);
  --home-ad-glow: rgba(116, 173, 233, .23);
  --home-ad-art-opacity: .96;
  --home-ad-art-filter: brightness(.88) saturate(1.05);
}
:root[data-color-theme="red"] .home-ad-carousel {
  --home-ad-background: linear-gradient(116deg, #3f2a39, #30212d 61%, #503345);
  --home-ad-glow: rgba(228, 142, 166, .19);
  --home-ad-art-filter: hue-rotate(120deg) saturate(.66);
}
:root[data-color-theme="green"] .home-ad-carousel {
  --home-ad-background: linear-gradient(116deg, #1d3c31, #173329 61%, #285344);
  --home-ad-glow: rgba(115, 207, 163, .18);
  --home-ad-art-filter: hue-rotate(-70deg) saturate(.72);
}
.home-ad-viewport { overflow: hidden; border-radius: inherit; touch-action: pan-y; -webkit-touch-callout: none; }
.home-ad-viewport[tabindex] { cursor: grab; outline-offset: 3px; user-select: none; -webkit-user-select: none; }
.home-ad-viewport[tabindex]:focus-visible { outline: 2px solid var(--accent); }
.home-ad-dragging .home-ad-viewport { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.home-ad-track { display: flex; align-items: stretch; width: 100%; transition: none; will-change: transform; }
.home-ad-track.home-ad-moving { transition: transform 500ms cubic-bezier(.22,.68,.25,1); }
.home-ad-dots { position: absolute; display: flex; justify-content: center; gap: 1px; bottom: 5px; left: 50%; transform: translateX(-50%); }
body.ui-polished .home-ad-dots button { min-height: 0; width: 21px; height: 18px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 5px; background: transparent; box-shadow: none; }
.home-ad-dots button span { width: 4px; height: 4px; border-radius: 4px; background: var(--accent); opacity: .28; transition: width 180ms ease, opacity 180ms ease; }
.home-ad-dots button[aria-pressed="true"] span { width: 13px; opacity: .8; }
.home-ad-dots button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
body.ui-polished .home-welcome-banner {
  position: relative; isolation: isolate; overflow: hidden; min-height: 109px;
  display: flex; align-items: center; box-sizing: border-box; padding: 19px 22px 27px;
  flex: 0 0 100%; width: 100%; margin: 0; border: 1px solid var(--forge-line, var(--border)); border-radius: 21px;
  color: var(--text); background: var(--home-ad-background, var(--forge-panel, var(--surface)));
  box-shadow: var(--forge-shadow, var(--ui-shadow));
}
.home-welcome-banner::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 87% 25%, var(--home-ad-glow), transparent 60%);
}
.home-welcome-copy { position: relative; z-index: 1; width: 67%; max-width: 650px; }
.home-welcome-copy strong { display: block; font-size: clamp(15px, 3.8vw, 19px); line-height: 1.5; font-weight: 650; letter-spacing: -.02em; overflow-wrap: anywhere; }
.home-welcome-copy p { margin: 7px 0 0; font-size: 11.5px; line-height: 1.7; color: var(--text-secondary); overflow-wrap: anywhere; }
.home-welcome-art { position: absolute; z-index: 0; right: -18px; top: 50%; width: clamp(145px, 37vw, 250px); height: auto; transform: translateY(-48%); opacity: var(--home-ad-art-opacity, .91); pointer-events: none; }
/* Recolour only bundled blue artwork. Uploaded campaign images keep their own colours. */
.home-welcome-art:is([src="/static/home-welcome-art.svg"], [src="/static/home-insights-art.svg"], [src="/static/home-community-art.svg"], [src="/static/home-official-groups-art.svg"]) { filter: var(--home-ad-art-filter); }
.home-ad-link { position: absolute; inset: 0; z-index: 2; border-radius: inherit; color: var(--accent); text-decoration: none; -webkit-user-drag: none; touch-action: pan-y; }
.home-ad-link:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.home-ad-open { position: absolute; right: 14px; bottom: 12px; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; border: 1px solid var(--forge-line, var(--border)); background: var(--forge-soft, var(--accent-soft)); }
.home-ad-open svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 700px) {
  body.ui-polished .home-broadcast { height: 36px; padding-inline: 12px 8px; }
  .home-broadcast-viewport { font-size: 12px; }
  body.ui-polished .home-welcome-banner { min-height: 122px; padding-inline: 25px; }
  .home-welcome-copy p { font-size: 12.5px; }
  .home-welcome-art { right: 16px; width: 210px; }
}
@media (max-width: 350px) {
  body.ui-polished .home-welcome-banner { padding: 17px 16px 25px; min-height: 105px; }
  .home-welcome-copy { width: 71%; }
  .home-welcome-copy strong { font-size: 14px; }
  .home-welcome-copy p { font-size: 10.5px; }
  .home-welcome-art { right: -30px; width: 141px; opacity: .75; }
}
@media (prefers-reduced-motion: reduce) {
  .home-broadcast-viewport { overflow-x: auto; scrollbar-width: none; }
  .home-ad-track.home-ad-moving, .home-ad-dots button span { transition: none; }
}
.home-welcome-banner.home-custom-banner .home-welcome-art { inset: 0; width: 100%; height: 100%; object-fit: cover; transform: none; opacity: .22; }
.home-welcome-banner.home-custom-banner .home-welcome-copy { width: 86%; }
:root[data-theme="light"] .home-welcome-banner.home-custom-banner .home-welcome-art { opacity: .19; }
body.ui-polished .home-ad-dots button, body.ui-polished .home-ad-dots button:not(:disabled):active { box-shadow: none !important; translate: none; }

/* Original pixel campaign; its palette stays independent of platform skins. */
body.ui-polished .home-welcome-banner.thunder-home-banner{background:#10172e;color:#f2eede;min-height:172px;border-color:#405174;padding:20px 22px 27px;}
.thunder-home-banner::before{background:linear-gradient(110deg,#11172e 35%,#1c3451 100%);}
.thunder-home-banner .home-welcome-copy{width:66%;}
.thunder-home-banner .thunder-ad-kicker{display:block;font:9px/1.7 var(--lingce-pixel-font,"LingcePixel"),monospace;letter-spacing:1.5px;color:#88e0da;margin-bottom:5px;}
.thunder-home-banner .home-welcome-copy strong{font-family:var(--lingce-pixel-font,"LingcePixel"),system-ui,sans-serif;font-size:24px;color:#f2d58e;line-height:1.4;letter-spacing:1px;}
.thunder-home-banner .home-welcome-copy p{white-space:pre-line;color:#b8c8e3;font-size:11px;line-height:1.8;margin:5px 0 9px;}
.thunder-home-banner .home-welcome-art{right:-26px;width:195px;opacity:1;transform:translateY(-50%);filter:none!important;}
.thunder-ad-cta{display:inline-flex;align-items:center;gap:18px;font-size:11px;color:#8ce8e0;border-bottom:1px solid #477e87;padding-bottom:3px;}
.thunder-home-banner .home-ad-open{display:none;}
@media(max-width:350px){body.ui-polished .home-welcome-banner.thunder-home-banner{padding-inline:16px;min-height:162px;}.thunder-home-banner .home-welcome-copy strong{font-size:21px;}.thunder-home-banner .home-welcome-art{width:155px;right:-25px;}.thunder-home-banner .thunder-ad-kicker{font-size:8px;letter-spacing:1px;}}
@media(min-width:700px){.thunder-home-banner .home-welcome-art{width:230px;right:18px;}.thunder-home-banner .home-welcome-copy{width:70%;}}
