.nv-aoe {
    --nv-aoe-bg: #08111b;
    --nv-aoe-panel: rgba(10, 23, 39, 0.86);
    --nv-aoe-panel-strong: rgba(12, 27, 46, 0.94);
    --nv-aoe-line: rgba(247, 210, 132, 0.24);
    --nv-aoe-gold: #f0c66f;
    --nv-aoe-ink: #e8eef8;
    --nv-aoe-muted: #b4c0d5;
    --nv-aoe-blue: #6ca6ff;
    --nv-aoe-red: #d56a5f;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(circle at top, rgba(242, 179, 86, 0.1), transparent 34%),
        linear-gradient(180deg, #09111b 0%, #0b1624 36%, #101d2f 100%);
    color: var(--nv-aoe-ink);
}

.nv-aoe__ambient {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.nv-aoe__mist,
.nv-aoe__grid {
    position: absolute;
    inset: auto;
}

.nv-aoe__mist {
    width: 48rem;
    height: 48rem;
    border-radius: 999px;
    filter: blur(38px);
    opacity: 0.24;
}

.nv-aoe__mist--one {
    top: -8rem;
    left: -10rem;
    background: rgba(119, 172, 255, 0.24);
}

.nv-aoe__mist--two {
    right: -12rem;
    top: 18rem;
    background: rgba(233, 160, 88, 0.2);
}

.nv-aoe__grid {
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 84px 84px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.55), transparent 88%);
}

.nv-aoe__shell {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 96px;
}

.nv-aoe__breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 24px;
    font-size: 0.95rem;
    color: var(--nv-aoe-muted);
}

.nv-aoe__breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--nv-aoe-ink);
    text-decoration: none;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
    transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.nv-aoe__breadcrumb a:hover,
.nv-aoe__breadcrumb a:focus-visible {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.18);
    transform: translateY(-1px);
}

.nv-aoe-hero {
    display: grid;
    gap: 22px;
    margin-bottom: 54px;
}

.nv-aoe-hero__stage,
.nv-aoe-hero__aside,
.nv-aoe-card,
.nv-aoe-plans,
.nv-aoe-memory,
.nv-aoe-finale {
    border: 1px solid var(--nv-aoe-line);
    background: linear-gradient(180deg, rgba(15, 26, 42, 0.92), rgba(10, 19, 31, 0.96));
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
}

.nv-aoe-hero__stage {
    position: relative;
    min-height: min(72vw, 780px);
    border-radius: 30px;
    overflow: hidden;
    padding: clamp(20px, 2.5vw, 32px);
}

.nv-aoe-hero__stage::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 17, 27, 0.15), rgba(8, 17, 27, 0.88));
    pointer-events: none;
    z-index: 7;
}

.nv-aoe-scene__hint {
    position: absolute;
    left: 24px;
    top: 20px;
    z-index: 10;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: rgba(9, 16, 27, 0.65);
    border: 1px solid rgba(255,255,255,0.14);
    color: var(--nv-aoe-muted);
    font-size: 0.84rem;
    max-width: min(60ch, calc(100% - 40px));
}

.nv-aoe-scene__layer {
    position: absolute;
    inset: 0;
    will-change: transform;
    transition: transform 220ms ease-out;
    transform: translate3d(0, 0, 0);
}

.nv-aoe-scene__layer img {
    position: absolute;
    max-width: none;
    user-select: none;
    pointer-events: none;
}

.nv-aoe-scene__layer--sky img {
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nv-aoe-scene__layer--red-base {
    z-index: 2;
}

.nv-aoe-scene__layer--red-base img {
    width: clamp(380px, 40vw, 620px);
    right: -2%;
    bottom: -10%;
}

.nv-aoe-scene__layer--blue-base {
    z-index: 3;
}

.nv-aoe-scene__layer--blue-base img {
    width: clamp(430px, 44vw, 700px);
    left: -24%;
    bottom: -12%;
}

.nv-aoe-scene__layer--battle {
    z-index: 4;
}

.nv-aoe-scene__layer--battle img {
    width: 620px;
    left: 24%;
    bottom: -13%;
}

.nv-aoe-scene__layer--left-archers {
    z-index: 5;
}

.nv-aoe-scene__layer--left-archers img {
    width: clamp(260px, 26vw, 410px);
    left: -3%;
    bottom: -9%;
}

.nv-aoe-scene__layer--right-archers {
    z-index: 6;
}

.nv-aoe-scene__layer--right-archers img {
    width: clamp(280px, 27vw, 430px);
    right: -5%;
    bottom: -8%;
}

.nv-aoe-hero__eyebrow,
.nv-aoe-section__heading span,
.nv-aoe-finale > span,
.nv-aoe-plan__head span,
.nv-aoe-memory span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--nv-aoe-gold);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.74rem;
    font-weight: 700;
}

.nv-aoe-hero__actions,
.nv-aoe-finale__actions,
.nv-aoe-section__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.nv-aoe-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.85rem 1.25rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
    text-decoration: none;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
    cursor: pointer;
}

.nv-aoe-btn:hover,
.nv-aoe-btn:focus-visible {
    transform: translateY(-2px);
}

.nv-aoe-btn--primary {
    background: linear-gradient(135deg, #f0cb7b, #d7904b);
    color: #251307;
    box-shadow: 0 14px 32px rgba(208, 140, 64, 0.28);
}

.nv-aoe-btn--ghost {
    background: rgba(255,255,255,0.035);
    color: var(--nv-aoe-ink);
    border-color: rgba(255,255,255,0.14);
}

.nv-aoe-hero__markers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.nv-aoe-hero__markers span,
.nv-aoe-plan__badges span {
    display: inline-flex;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--nv-aoe-ink);
    font-size: 0.84rem;
}

.nv-aoe-section {
    margin-top: 66px;
}

.nv-aoe-section__heading {
    max-width: 780px;
    margin-bottom: 24px;
}

.nv-aoe-section__heading h2,
.nv-aoe-finale h2 {
    margin: 12px 0 14px;
    font-size: clamp(2rem, 3vw, 3.2rem);
    line-height: 1.05;
    color: #fff4d9;
}

.nv-aoe-section__heading p,
.nv-aoe-finale p {
    margin: 0;
    color: var(--nv-aoe-muted);
    line-height: 1.8;
    font-size: 1.02rem;
}

.nv-aoe-features {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.nv-aoe-card {
    border-radius: 22px;
    padding: 22px;
}

.nv-aoe-card h3 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 1.18rem;
}

.nv-aoe-card p {
    margin: 0;
    line-height: 1.72;
    color: var(--nv-aoe-muted);
}

.nv-aoe-plans {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 18px;
    border-radius: 28px;
    padding: 20px;
}

.nv-aoe-plans__tabs {
    display: grid;
    gap: 12px;
}

.nv-aoe-plans__tab {
    appearance: none;
    width: 100%;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    background: rgba(255,255,255,0.03);
    color: var(--nv-aoe-ink);
    padding: 16px 18px;
    text-align: left;
    cursor: pointer;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.nv-aoe-plans__tab strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 8px;
}

.nv-aoe-plans__tab span {
    display: block;
    color: var(--nv-aoe-muted);
    line-height: 1.55;
    font-size: 0.92rem;
}

.nv-aoe-plans__tab.is-active,
.nv-aoe-plans__tab:hover,
.nv-aoe-plans__tab:focus-visible {
    background: linear-gradient(180deg, rgba(108, 166, 255, 0.14), rgba(255,255,255,0.03));
    border-color: rgba(240, 198, 111, 0.32);
    transform: translateY(-1px);
}

.nv-aoe-plans__panels {
    min-width: 0;
}

.nv-aoe-plan {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(12, 28, 48, 0.9), rgba(11, 21, 36, 0.98));
    border: 1px solid rgba(255,255,255,0.08);
    padding: 24px;
}

.nv-aoe-plan__head h3 {
    margin: 12px 0 10px;
    font-size: 1.9rem;
    color: #fff;
}

.nv-aoe-plan__head p {
    margin: 0;
    line-height: 1.75;
    color: var(--nv-aoe-muted);
}

.nv-aoe-plan__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nv-aoe-plan__bars {
    display: grid;
    gap: 14px;
}

.nv-aoe-plan__bar {
    display: grid;
    gap: 8px;
}

.nv-aoe-plan__bar label {
    color: var(--nv-aoe-ink);
    font-weight: 700;
    font-size: 0.94rem;
}

.nv-aoe-plan__bar i {
    position: relative;
    display: block;
    height: 14px;
    width: 100%;
    max-width: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #6ca6ff, #f0c66f);
    box-shadow: 0 6px 16px rgba(91, 146, 255, 0.18);
}

.nv-aoe-plan__bar {
    position: relative;
}

.nv-aoe-plan__bar::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
}

.nv-aoe-plan__bar i {
    position: relative;
    z-index: 1;
}

.nv-aoe-memories {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.nv-aoe-memory {
    border-radius: 20px;
    padding: 20px;
    transform: rotate(var(--rotation));
}

.nv-aoe-memory p {
    margin: 14px 0 18px;
    color: var(--nv-aoe-ink);
    line-height: 1.78;
}

.nv-aoe-memory strong {
    color: var(--nv-aoe-muted);
    font-size: 0.9rem;
}

.nv-aoe-finale {
    margin-top: 66px;
    border-radius: 28px;
    padding: clamp(28px, 4vw, 42px);
    text-align: center;
}

.nv-aoe-finale small {
    display: block;
    margin-top: 24px;
    color: var(--nv-aoe-muted);
    font-size: 0.92rem;
}

[data-aoe-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 550ms ease, transform 550ms ease;
}

[data-aoe-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1100px) {
    .nv-aoe-features,
    .nv-aoe-memories {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nv-aoe-plans {
        grid-template-columns: 1fr;
    }

    .nv-aoe-scene__layer--blue-base img {
        width: clamp(360px, 48vw, 560px);
        left: 0%;
    }

    .nv-aoe-scene__layer--red-base img {
        width: clamp(330px, 44vw, 530px);
        right: -3%;
    }
}

@media (max-width: 760px) {
    .nv-aoe__shell {
        width: min(100% - 20px, 1220px);
        padding-top: 18px;
        padding-bottom: 72px;
    }

    .nv-aoe-hero__stage {
        min-height: 600px;
        border-radius: 24px;
    }

    .nv-aoe-scene__hint {
        left: 14px;
        right: 14px;
        max-width: none;
        font-size: 0.78rem;
    }

    .nv-aoe-hero__copy {
        left: 18px;
        right: 18px;
        max-width: none;
    }

    .nv-aoe-hero__copy h1 {
        font-size: 2.5rem;
    }

    .nv-aoe-scene__layer--blue-base img {
        width: 410px;
        left: -40px;
        bottom: 28%;
    }

    .nv-aoe-scene__layer--red-base img {
        width: 360px;
        right: -70px;
        bottom: 24%;
    }

    .nv-aoe-scene__layer--battle img {
        width: 540px;
        left: 50%;
        transform: translateX(-50%);
        bottom: 13%;
    }

    .nv-aoe-scene__layer--left-archers img {
        width: 260px;
        left: -38px;
        bottom: 4%;
    }

    .nv-aoe-scene__layer--right-archers img {
        width: 300px;
        right: -78px;
        bottom: 3%;
    }

    .nv-aoe-features,
    .nv-aoe-memories {
        grid-template-columns: 1fr;
    }

    .nv-aoe-card,
    .nv-aoe-finale,
    .nv-aoe-hero__aside,
    .nv-aoe-plans {
        border-radius: 20px;
    }

    .nv-aoe-memory {
        transform: none;
    }
}


/* Construction minigame */
.nv-aoe-buildgame {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 360px);
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--nv-aoe-line);
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(14, 28, 46, 0.94), rgba(9, 19, 32, 0.98));
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.04);
}

.nv-aoe-buildgame__stage {
    position: relative;
    overflow: hidden;
    min-width: 0;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.1);
    background: #152b35;
}

.nv-aoe-buildgame__canvas {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 12 / 7;
    cursor: crosshair;
    touch-action: manipulation;
}

.nv-aoe-buildgame__loading {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(7, 15, 24, 0.78);
    color: var(--nv-aoe-muted);
    text-align: center;
    backdrop-filter: blur(8px);
}

.nv-aoe-buildgame__loading[hidden] {
    display: none;
}

.nv-aoe-buildgame__panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(34, 54, 78, 0.72), rgba(12, 25, 42, 0.94));
}

.nv-aoe-buildgame__counter,
.nv-aoe-buildgame__clicks,
.nv-aoe-buildgame__progress-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.nv-aoe-buildgame__counter {
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.09);
}

.nv-aoe-buildgame__counter span,
.nv-aoe-buildgame__clicks span,
.nv-aoe-buildgame__progress-row span {
    color: var(--nv-aoe-muted);
    font-size: 0.9rem;
}

.nv-aoe-buildgame__counter strong {
    color: var(--nv-aoe-gold);
    font-size: 1.05rem;
    letter-spacing: 0.08em;
}

.nv-aoe-buildgame__panel h3 {
    margin: 20px 0 10px;
    color: #fff4d9;
    font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.nv-aoe-buildgame__hint {
    margin: 0 0 22px;
    color: var(--nv-aoe-muted);
    line-height: 1.68;
}

.nv-aoe-buildgame__progress-row strong,
.nv-aoe-buildgame__clicks strong {
    color: var(--nv-aoe-ink);
    font-variant-numeric: tabular-nums;
}

.nv-aoe-buildgame__progress {
    position: relative;
    height: 14px;
    margin: 10px 0 18px;
    overflow: hidden;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(0, 0, 0, 0.3);
}

.nv-aoe-buildgame__progress > i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background:
        linear-gradient(90deg, #6ca6ff 0%, #b7c8df 48%, #f0c66f 100%);
    box-shadow:
        0 0 16px rgba(108, 166, 255, 0.34),
        inset 0 1px 0 rgba(255,255,255,0.34);
    transition: width 160ms ease;
}

.nv-aoe-buildgame__status {
    min-height: 72px;
    margin: 22px 0 18px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(240, 198, 111, 0.14);
    background: rgba(240, 198, 111, 0.05);
    color: #e6edf8;
    line-height: 1.55;
}

.nv-aoe-buildgame__panel .nv-aoe-btn {
    width: 100%;
    margin-top: auto;
}

.nv-aoe-buildgame__panel .nv-aoe-btn.is-ready {
    border-color: rgba(240, 198, 111, 0.36);
    background: rgba(240, 198, 111, 0.08);
}

@media (max-width: 940px) {
    .nv-aoe-buildgame {
        grid-template-columns: 1fr;
    }

    .nv-aoe-buildgame__panel {
        min-height: auto;
    }

    .nv-aoe-buildgame__panel .nv-aoe-btn {
        margin-top: 8px;
    }
}

@media (max-width: 620px) {
    .nv-aoe-buildgame {
        padding: 12px;
        border-radius: 20px;
    }

    .nv-aoe-buildgame__stage,
    .nv-aoe-buildgame__panel {
        border-radius: 16px;
    }

    .nv-aoe-buildgame__panel {
        padding: 16px;
    }

    .nv-aoe-buildgame__canvas {
        aspect-ratio: 1 / 1;
    }
}


/* Hero split layout: diorama separate from copy */
.nv-aoe-hero__content {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
    gap: 24px;
    align-items: stretch;
    padding: clamp(24px, 3vw, 34px);
    border: 1px solid var(--nv-aoe-line);
    border-radius: 26px;
    background:
        linear-gradient(180deg, rgba(15, 26, 42, 0.92), rgba(10, 19, 31, 0.96));
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.24);
}

.nv-aoe-hero__copy {
    position: static;
    max-width: 720px;
}

.nv-aoe-hero__copy h1 {
    margin: 14px 0 12px;
    font-size: clamp(2.7rem, 5vw, 4.8rem);
    line-height: 0.96;
    letter-spacing: -0.04em;
    color: #fff4d9;
}

.nv-aoe-hero__tagline {
    margin: 0;
    font-size: clamp(1.04rem, 1.45vw, 1.2rem);
    line-height: 1.72;
    color: #eef4ff;
}

.nv-aoe-hero__description {
    margin: 14px 0 0;
    color: var(--nv-aoe-muted);
    line-height: 1.78;
}

.nv-aoe-hero__side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    padding-left: 22px;
    border-left: 1px solid rgba(255,255,255,0.08);
}

.nv-aoe-hero__side .nv-aoe-hero__actions {
    margin-top: 0;
    justify-content: flex-start;
}

.nv-aoe-hero__markers {
    margin-top: 0;
}

@media (max-width: 900px) {
    .nv-aoe-hero__content {
        grid-template-columns: 1fr;
    }

    .nv-aoe-hero__side {
        padding-left: 0;
        padding-top: 20px;
        border-left: 0;
        border-top: 1px solid rgba(255,255,255,0.08);
    }
}

@media (max-width: 760px) {
    .nv-aoe-hero__copy {
        left: auto;
        right: auto;
        max-width: none;
    }

    .nv-aoe-hero__copy h1 {
        font-size: 2.5rem;
    }

    .nv-aoe-hero__content {
        padding: 20px;
        border-radius: 20px;
    }
}
