/* Canonical single eyebrow above page H1. Load LAST on all tool pages. */
body.app-page .tool-page-eyebrow {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    width: fit-content !important;
    max-width: calc(100% - 12px) !important;
    min-height: 24px !important;
    margin: 0 auto 10px !important;
    padding: 6px 12px !important;
    border: 1px solid #ddd6fe !important;
    border-radius: 999px !important;
    background: #f5f3ff !important;
    color: #6d28d9 !important;
    -webkit-text-fill-color: #6d28d9 !important;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    font-style: normal !important;
    line-height: 1.15 !important;
    letter-spacing: .10em !important;
    text-decoration: none !important;
    text-transform: none !important;
    white-space: normal !important;
    text-align: center !important;
    text-shadow: none !important;
    opacity: 1 !important;
    transform: none !important;
    box-shadow: none !important;
}
body.app-page .tool-page-eyebrow::before,
body.app-page .tool-page-eyebrow::after {
    content: none !important;
    display: none !important;
}
/* Stop any legacy H1-generated eyebrow, including previously cached calculator CSS. */
body.app-page h1::before {
    content: none !important;
    display: none !important;
}
body.app-page .tool-page-eyebrow .mission-version-pill,
body.app-page .tool-page-eyebrow .enemy-date {
    display: inline-block !important;
    margin: 0 !important;
    padding: 2px 6px !important;
    border: 1px solid #e0dafa !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: #6b628b !important;
    -webkit-text-fill-color: #6b628b !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    line-height: 1.4 !important;
    letter-spacing: 0 !important;
}
@media (max-width: 760px) {
    body.app-page .tool-page-eyebrow {
        min-height: 22px !important;
        padding: 5px 10px !important;
        font-size: 9px !important;
        margin-bottom: 8px !important;
    }
}


/* Consistent header centering for five legacy hero layouts.
   Their headings may retain specialized art/status columns, but the small
   English label always spans and centers against the FULL hero width. */
body.relic-page .relic-hero,
body.package-eff-page .page-header {
    text-align: center;
}
body.relic-page .relic-hero h1,
body.package-eff-page .page-header .page-title {
    text-align: center !important;
}
body.relic-page .relic-hero > p,
body.package-eff-page .page-header .page-subtitle {
    text-align: center !important;
    max-width: 760px;
    margin-left: auto !important;
    margin-right: auto !important;
}
body.package-eff-page .page-header .package-flow {
    justify-content: center;
}

/* Vault has a text column + status card; stack them into a balanced
   central introduction without suppressing the status information. */
body.vault-page .vault-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
}
body.vault-page .vault-hero > .tool-page-eyebrow {
    margin: 0 auto 10px !important;
}

body.vault-page .vault-hero-copy {
    width: 100%;
    text-align: center;
}
body.vault-page .vault-hero-copy h1 {
    text-align: center;
}
body.vault-page .vault-hero-copy > p {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}
body.vault-page .vault-hero-badge {
    max-width: 100%;
}

/* In the enemy encyclopedia, preserve the existing right-side monster art.
   The little title now spans the complete header, not the narrow copy area. */
body.enemy-encyclopedia .enemy-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 256px;
    grid-template-areas: "eyebrow eyebrow" "copy art";
    gap: 11px 16px;
    align-items: center;
}
body.enemy-encyclopedia .enemy-intro > .tool-page-eyebrow {
    grid-area: eyebrow;
    justify-self: center;
    position: relative;
    z-index: 3;
    margin: 0 auto 10px !important;
}

body.enemy-encyclopedia .enemy-intro-copy {
    grid-area: copy;
    min-width: 0;
}
body.enemy-encyclopedia .enemy-intro-art {
    grid-area: art;
}

/* Indy keeps its character illustration and switches to a full-width
   hero title badge; individual treasure tables and unit switches stay put. */
body.indy-treasure-page .indy-hero {
    display: grid;
    grid-template-columns: minmax(0,1fr) 240px;
    grid-template-areas: "eyebrow eyebrow" "copy art";
    gap: 8px 18px;
    align-items: center;
}
body.indy-treasure-page .indy-hero > .tool-page-eyebrow {
    grid-area: eyebrow;
    justify-self: center;
    margin: 0 auto 10px !important;
    position: relative;
    z-index: 2;
}
body.indy-treasure-page .indy-hero-copy {
    grid-area: copy;
    min-width: 0;
}
body.indy-treasure-page .indy-hero-portrait {
    grid-area: art;
}
@media (max-width: 850px) {
    body.indy-treasure-page .indy-hero {
        grid-template-columns: minmax(0,1fr) 205px;
    }
}
@media (max-width: 700px) {
    body.indy-treasure-page .indy-hero {
        grid-template-columns: minmax(0,1fr) 155px;
    }
}
@media (max-width: 670px) {
    body.enemy-encyclopedia .enemy-intro {
        grid-template-columns: minmax(0,1fr) 105px;
        gap: 10px 16px;
    }
}
@media (max-width: 480px) {
    body.indy-treasure-page .indy-hero {
        grid-template-columns: minmax(0,1fr);
        grid-template-areas: "eyebrow" "copy";
        gap: 7px;
    }
    body.indy-treasure-page .indy-hero-portrait {
        grid-area: auto;
    }
}
@media (max-width: 380px) {
    body.enemy-encyclopedia .enemy-intro {
        grid-template-columns: minmax(0,1fr);
        grid-template-areas: "eyebrow" "copy";
    }
    body.enemy-encyclopedia .enemy-intro-art {
        grid-area: auto;
    }
}
/* Keep source freshness visible without making the centered label oversized. */
body.enemy-encyclopedia .enemy-intro .enemy-hero-source {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    margin: 12px 0 0 !important;
    padding: 5px 9px;
    color: #e8defb;
    -webkit-text-fill-color: #e8defb;
    background: rgba(255,255,255,.11);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
    opacity: 1;
}

/* Match the exact mobile badge spacing across all five headers. */
@media (max-width: 760px) {
    body.vault-page .vault-hero > .tool-page-eyebrow,
    body.enemy-encyclopedia .enemy-intro > .tool-page-eyebrow,
    body.indy-treasure-page .indy-hero > .tool-page-eyebrow {
        margin-bottom: 8px !important;
    }
}

/* EXP and Hunt Pass: center the full title group, not just the English pill.
   Keep the XP/points summaries and calculator controls unchanged. */
body.exp-page .exp-hero-card,
body.hunt-page .hunt-hero-card {
    text-align: center;
}
body.exp-page .exp-hero-card > h1,
body.hunt-page .hunt-hero-card > h1 {
    text-align: center !important;
}
body.exp-page .exp-hero-card > p,
body.hunt-page .hunt-hero-card > p {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* Enemy/Indy: English subtitle and Korean H1 share the full-width
   centerline. Explanatory copy and original game art retain columns. */
body.enemy-encyclopedia .enemy-intro,
body.indy-treasure-page .indy-hero {
    grid-template-areas: "eyebrow eyebrow" "title title" "copy art";
}
body.enemy-encyclopedia .enemy-intro > h1,
body.indy-treasure-page .indy-hero > h1 {
    grid-area: title;
    justify-self: stretch;
    min-width: 0;
    margin: 0 0 5px !important;
    text-align: center !important;
    position: relative;
    z-index: 2;
}
@media (max-width: 480px) {
    body.indy-treasure-page .indy-hero {
        grid-template-areas: "eyebrow" "title" "copy";
    }
    body.indy-treasure-page .indy-hero > h1 {
        font-size: clamp(25px, 7.7vw, 34px) !important;
        line-height: 1.25;
    }
}
@media (max-width: 380px) {
    body.enemy-encyclopedia .enemy-intro {
        grid-template-areas: "eyebrow" "title" "copy";
    }
}
/* On narrow phones, keep the faded Indy portrait below the full-width title. */
@media (max-width: 480px) {
    body.indy-treasure-page .indy-hero-portrait {
        top: 105px;
        opacity: .18;
    }
}
