body.home .dw-forge-hero {
    --forge-cream: #f3e9d7;
    --forge-gold: #efcf8d;
    text-align: center;
    isolation: isolate;
    position: relative;
    padding: clamp(12px, 2vw, 24px) 18px 45px;
    color: var(--forge-cream);
    --forge-world-wash: radial-gradient(ellipse at 50% 33%, #123d2ba8 0%, #0a231969 37%, transparent 71%),
        linear-gradient(0deg, #101411e8 0%, #0d191466 27%, #0b161132 69%, #090b0a37);
    background: var(--forge-world-wash), url(assets/home-world-poster.webp) center 55% / cover;
}
body.home #post-930 > .entry-content-wrap { container-type: inline-size; }
body.home #post-930 .entry-content > .dw-forge-hero {
    box-sizing: border-box;
    width: 100cqw;
    max-width: none !important;
    margin-inline: 0 !important;
    left: calc(50% - 50cqw) !important;
}
html body.home .dw-forge-hero .dw-hero-overlay-text {
    text-shadow: 0 1px 8px #09120d, 0 3px 18px #09120d;

}
.dw-forge-hero::before,
.dw-forge-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;
    inset: 6% 14% 25%;
    border: 1px solid #b894574e;
    border-radius: 50%;
}
.dw-forge-hero::before { transform: rotate(-5deg); }
.dw-forge-hero::after { transform: rotate(5deg); }
.dw-forge-hero .forge {
    width: min(100%, 590px);
    margin: 0 auto;
    position: relative;
    display: grid;
    justify-items: center;
}
.dw-forge-hero .field {
    position: absolute;
    pointer-events: none;
    inset: 4% 8% 15%;
    background: radial-gradient(ellipse at 50% 64%, #2ada9738, transparent 63%);
}
.dw-forge-hero .sigil-stage {
    position: relative;
    z-index: 1;
    width: min(100%, clamp(360px, 42vw, 535px));
    aspect-ratio: 1.39;
    display: grid;
    place-items: center;
}
.dw-forge-hero .sigil-stage canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: grab;
    touch-action: pan-y;
}
.dw-forge-hero .sigil-stage canvas:active { cursor: grabbing; }
.dw-forge-hero .sigil-poster {
    width: 55%;
    height: auto;
    filter: drop-shadow(0 0 16px #db9f5e60);
}
.dw-forge-hero .sigil-stage.has-model .sigil-poster { visibility: hidden; }
.dw-forge-hero .fusion-deck {
    display: block;
    width: min(97%, 505px);
    height: auto;
    margin-top: clamp(-59px, -6.5vw, -33px);
    filter: drop-shadow(0 11px 18px #000c);
}
/* The deck uses the renderer's existing eased power and orbit phase. */
.dw-forge-hero .fusion-deck {
    position: relative;
    aspect-ratio: 540 / 148;
    z-index: 2;
    pointer-events: none;
}
.dw-forge-hero .fusion-deck svg { display: block; width: 100%; height: 100%; }
.dw-forge-hero .deck-powered { opacity: var(--deck-power, 0); }
.dw-forge-hero .deck-traces { stroke-dasharray: 18 82; stroke-dashoffset: var(--deck-flow, 0); }
.dw-forge-hero #motion {
    position: absolute;
    inset: 32.43% 6.3% auto;
    height: 46.62%;
    min-height: 44px;
    z-index: 1;
    pointer-events: auto;
    padding: 0;
    border: 0;
    border-radius: 18px;
    background: transparent;
    cursor: pointer;
    color: #f6e2a9;
    -webkit-tap-highlight-color: transparent;
}
.dw-forge-hero #motion:focus-visible {
    outline: 2px solid #abffda;
    outline-offset: 2px;
}
.dw-forge-hero #motion span {
    position: absolute;
    top: 40.58%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 7px;
    color: #fff0c5;
    font: 750 clamp(.66rem, 1.7vw, .86rem)/1 system-ui, sans-serif;
    letter-spacing: .15em;
    text-transform: uppercase;
    text-shadow: 0 1px 2px #050b08, 0 0 8px #0a1811;
    pointer-events: none;
}
.dw-forge-hero #motion i {
    width: 6px;
    height: 6px;
    transform: rotate(45deg);
    border: 1px solid #c89b56;
    border-radius: 1px;
    background: rgb(152 255 210 / calc(.08 + .92 * var(--deck-power, 0)));
    box-shadow: 0 0 8px rgb(95 255 183 / var(--deck-power, 0));
}
@media (hover: hover) {
    .dw-forge-hero #motion:hover span { color: #fff7df; }
}
.dw-forge-hero #motion[aria-disabled="true"] { cursor: progress; }
.dw-forge-hero .controls {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    z-index: 2;
}
.dw-forge-hero [hidden] { display: none !important; }
.dw-forge-hero .controls button {
    background: #13241b;
    border: 1px solid #6e957a;
    border-radius: 999px;
    color: var(--forge-cream);
    cursor: pointer;
    min-height: 44px;
    padding: 8px 15px;
    font: 500 .83rem/1.25 system-ui, sans-serif;
}
.dw-forge-hero .controls button:hover:not(:disabled) { background: #244135; color: #d4ffe8; }
.dw-forge-hero :focus-visible { outline: 2px solid #99ffd4; outline-offset: 4px; }
.dw-forge-hero .instruction, .dw-forge-hero .status { font-size: .75rem; color: #c0cfbf; }
.dw-forge-hero .status { margin: 5px 0 0; }
html body.home .dw-forge-hero .dw-hero-overlay-text {
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    background: none !important;
    width: auto !important;
    max-width: 1100px;
    margin: 12px auto 0;
    padding: 0 !important;
}
html body.home .dw-forge-hero .dw-hero-overlay-text h1 {
    color: var(--forge-gold);
    font: 400 clamp(2.55rem, 6.5vw, 5.7rem)/1.06 var(--dw-serif, Georgia, serif);
    letter-spacing: normal;
    text-transform: none;
    margin: 0 0 8px;
}
html body.home .dw-forge-hero .dw-hero-overlay-text .dw-hero-tagline {
    color: #ffedce;
    font: italic clamp(1.06rem, 2.1vw, 1.5rem)/1.45 Georgia, serif;
    width: auto !important;
    max-width: 980px !important;
    margin: 0 auto 6px;
}
html body.home .dw-forge-hero .dw-hero-overlay-text .dw-hero-tagline + .dw-hero-tagline {
    font: 400 clamp(.92rem, 1.7vw, 1.05rem)/1.55 system-ui, sans-serif;
}
html body.home .dw-forge-hero .dw-hero-actions { margin: 14px auto 0; }

@media (min-width: 960px) and (max-height: 860px) {
    .dw-forge-hero .sigil-stage { width: min(100%, clamp(345px, calc(100svh - 345px), 535px)); }
    .dw-forge-hero .fusion-deck { width: min(97%, clamp(335px, calc(100svh - 352px), 505px)); }
    body.home .dw-forge-hero { padding-top: 12px; }
}

@media (max-width: 780px) {
    html body.home .dw-forge-hero .dw-hero-overlay-text h1 {
        font-size: clamp(1.8rem, 8vw, 3.5rem) !important;
        line-height: 1.08 !important;
        overflow-wrap: normal;
    }
    html body.home .dw-forge-hero .dw-hero-actions { gap: 8px; }
    html body.home .dw-forge-hero .dw-hero-actions a {
        min-height: 44px;
        padding-block: 8px;
    }
}
@media (min-width: 621px) and (max-width: 780px) {
    .dw-forge-hero .sigil-stage { width: min(100%, 325px); }
    .dw-forge-hero .fusion-deck { width: min(97%, 425px); }
}

@media (max-width: 360px) {
    .dw-forge-hero .sigil-stage { width: min(100%, 235px); }
}

@media (max-width: 620px) {
    body.home .dw-forge-hero { background-position: center; padding-bottom: 32px; }
    .dw-forge-hero .instruction { display: none; }
    .dw-forge-hero .dw-hero-actions .dw-enter-ww { max-width: 100%; padding-inline: 19px; }
    .dw-forge-hero .dw-enter-mark { max-width: 63%; }
}

/* The retained poster is the first paint. Only decoded candlelight replaces it. */
.dw-forge-hero .forge-ambient {
    position: absolute;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transition: opacity 650ms ease-out;
}
.dw-forge-hero .forge-ambient.is-visible { opacity: 1; }
.dw-forge-hero .forge-ambient video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 55%;
}
.dw-forge-hero .forge-ambient::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--forge-world-wash);
}
@media (max-width: 620px) {
    .dw-forge-hero .forge-ambient video { object-position: center; }
}
@media (prefers-reduced-motion: reduce) {
    .dw-forge-hero .forge-ambient { display: none; }
}

/* The Dance control reads as an engraved part of the Forge. */
.dw-forge-hero .controls #spin {
    position: relative;
    isolation: isolate;
    display: inline-grid;
    grid-template-columns: 18px auto 18px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 154px;
    min-height: 44px;
    padding: 7px 17px;
    border: 1px solid #d3a865;
    border-radius: 14px 5px;
    background: radial-gradient(ellipse at 50% 125%, #2c7654, transparent 72%),
                linear-gradient(145deg, #241f14, #101a15 46%, #172d22);
    color: #ffe6a7;
    box-shadow: inset 0 0 0 2px #161a12, inset 0 0 0 3px #b8924e61,
                0 0 14px #c9a15745;
    font: 700 .92rem/1.2 system-ui, sans-serif;
    letter-spacing: .075em;
    text-shadow: 0 0 10px #eab36570;
    transition: box-shadow .28s ease, color .28s ease, border-color .28s ease, transform .2s ease;
}
.dw-forge-hero .controls #spin::before {
    content: "";
    position: absolute;
    inset: auto 28% 2px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #b5ffe0, transparent);
    box-shadow: 0 0 6px #61f8b9;
    pointer-events: none;
}
.dw-forge-hero .controls #spin svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.15;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.dw-forge-hero .controls #spin svg + span + svg { transform: scaleX(-1); }
.dw-forge-hero .controls #spin:is(:hover,:focus-visible):not(:disabled) {
    border-color: #ffe6a6;
    color: #fff4d4;
    box-shadow: inset 0 0 0 2px #1d2416, inset 0 0 0 3px #f0c76c90,
                inset 0 -6px 22px #47d69048, 0 0 19px #ffc67078, 0 0 33px #25ce8440;
}
.dw-forge-hero .controls #spin:active:not(:disabled) { transform: translateY(1px); }
.dw-forge-hero .controls #spin:disabled { opacity: .58; cursor: default; }

/* Keep the original draw and light sweep; the two crack layers breathe after they resolve. */
@media (prefers-reduced-motion: no-preference) {
    body.home .dw-kintsugi-unified.dw-note-playing .dw-note-seam {
        animation: dwNoteDraw 1.85s .42s ease-out both,
                   dwNoteCrackBreath 3.9s 2.3s ease-in-out infinite;
    }
    body.home .dw-kintsugi-unified.dw-note-playing .dw-note-branches {
        animation: dwNoteDraw 1.4s 1.2s ease-out both,
                   dwNoteBranchBreath 3.9s 2.6s ease-in-out infinite;
    }
}
@keyframes dwNoteCrackBreath {
    0%, 100% { filter: drop-shadow(0 0 2px #ffc466d6) drop-shadow(0 0 4px #e2a64e25); }
    48% { filter: drop-shadow(0 0 3.5px #fff0ba) drop-shadow(0 0 8px #e2a64ec0); }
}
@keyframes dwNoteBranchBreath {
    0%, 100% { opacity: .68; filter: drop-shadow(0 0 1px #ffc46645); }
    48% { opacity: 1; filter: drop-shadow(0 0 3px #ffd28d); }
}
@media (prefers-reduced-motion: reduce) {
    .dw-forge-hero .controls #spin { transition: none; }
    .dw-forge-hero .controls #spin:active:not(:disabled) { transform: none; }
}

/* Fit the existing stage and all three actions in short desktop windows. */
@media (min-width: 960px) and (max-height: 890px) {
  body.home .dw-forge-hero .sigil-stage {
    width: min(100%, clamp(295px, calc(100svh - 420px), 475px));
  }

  body.home .dw-forge-hero .fusion-deck {
    width: min(97%, clamp(305px, calc(100svh - 390px), 475px));
  }

  html body.home .dw-forge-hero .dw-hero-overlay-text {
    margin-block-start: 8px;
  }

  html body.home .dw-forge-hero .dw-hero-overlay-text h1 {
    font-size: clamp(2.2rem, 4.4vw, 4.65rem);
  }

  html body.home .dw-forge-hero .dw-hero-overlay-text .dw-hero-tagline {
    max-width: min(100%, 900px) !important;
    line-height: 1.26;
  }

  html body.home .dw-forge-hero .dw-hero-actions {
    margin-block-start: 12px;
  }
}

body.home .dw-forge-hero .dw-hero-actions .dw-enter-ww:not(.dw-enter-go) {
  background-color: #191a12d9;
  box-shadow: 0 0 21px #e9c77a70, inset 0 0 15px #f7d88424;
}

body.home .dw-forge-hero .dw-hero-actions .dw-enter-ww:not(.dw-enter-go):is(:hover, :focus-visible) {
  box-shadow: 0 0 22px #ffda8db0, 0 0 42px #ffda8d48, inset 0 0 20px #ffe6ab48;
}

@media (prefers-reduced-motion: no-preference) {
  body.home .dw-forge-hero .dw-enter-ww:not(.dw-enter-go) .dw-enter-star {
    animation: dwPortalTwinkle 3.8s ease-in-out infinite;
  }

  body.home .dw-forge-hero .dw-enter-ww:not(.dw-enter-go) .dw-enter-star.s2 {
    animation-delay: -1.8s;
  }

  body.home .dw-forge-hero .dw-enter-ww:not(.dw-enter-go):is(:hover, :focus-visible) .dw-enter-star {
    animation-duration: 1.35s;
  }
}

@keyframes dwPortalTwinkle {
  0%, 100% { opacity: .48; scale: .85; }
  38% { opacity: 1; scale: 1.35; filter: drop-shadow(0 0 4px #fff2bf); }
  57% { opacity: .68; scale: 1; }
}

/* Give the wordmark and the one-row desktop menu more room on Home. */
@media (min-width: 1440px) {
  body.home #masthead .site-main-header-inner-wrap:has(#site-navigation .dw-nav-profile) {
    width: min(1280px, calc(100vw - 80px));
    max-width: none;
    margin-inline: auto;
  }
}
