/* AstralWorld reading room: the same typography and materials as the main page.
   Existing illustrations, article markup, translations and wiki behaviour stay intact. */
body.aw-redesign.wiki-redesign {
    --header-h: 104px;
    --font-display: 'Oswald', sans-serif;
    --bg-primary: #0b0a10;
    --bg-secondary: #100f16;
    --bg-card: #15131b;
    --text-primary: #f3eef2;
    --text-secondary: #c8becb;
    --text-muted: #9c92a2;
    --accent: #dcb1ca;
    --accent-light: #f0cbdf;
    --accent-rgb: 220, 177, 202;
    --border: rgba(229, 204, 222, .12);
    --radius: 6px;
    --radius-lg: 8px;
    --shadow: 0 16px 44px #05040940;
    font-family: 'Onest', 'Manrope', sans-serif;
    font-size: 15px;
    color: var(--text-primary);
    background: var(--bg-primary);
}
body.wiki-redesign .wiki { padding-top: var(--header-h); }
body.wiki-redesign .wiki__sidebar {
    width: 292px;
    top: var(--header-h);
    height: calc(100dvh - var(--header-h));
    background: #100f16;
    border-right: 1px solid var(--border);
    scrollbar-width: thin;
    scrollbar-color: #65515f #100f16;
}
body.wiki-redesign .wiki__menu { padding: 24px 16px 32px; gap: 3px; }
body.wiki-redesign .wiki__menu-item,
body.wiki-redesign .wiki__menu-item:hover,
body.wiki-redesign .wiki__menu-item.active,
body.wiki-redesign .wiki__menu-item.active:hover {
    position: relative;
    isolation: isolate;
    display: flex;
    justify-content: flex-start;
    text-align: left;
    height: auto;
    min-height: 66px;
    flex: 0 0 auto;
    padding: 13px 17px 13px 48px;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: #d3c9d5 !important;
    text-shadow: none;
    filter: none;
    transform: none;
    transition: color .22s ease;
}
/* Quiet navigation uses the existing generated material, beneath live labels. */
body.wiki-redesign .wiki__menu-item::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: url('../img/immersive/action-panel-v6.png') center / 100% 160% no-repeat;
    opacity: 0;
    transform: none;
    filter: brightness(.22) saturate(.22);
    transition: opacity .22s ease, filter .22s ease;
    pointer-events: none;
}
body.wiki-redesign .wiki__menu-item::after { content: none; }
body.wiki-redesign .wiki__menu-item:hover::before { opacity: 1; }
body.wiki-redesign .wiki__menu-item.active::before { opacity: 1; filter: brightness(.31) saturate(.3); }
body.wiki-redesign .wiki__menu-item:hover,
body.wiki-redesign .wiki__menu-item.active { color: #fff1fa !important; }
body.wiki-redesign .wiki__menu-item > i,
body.wiki-redesign .wiki__menu-item:hover > i,
body.wiki-redesign .wiki__menu-item.active > i {
    left: 15px;
    width: 21px;
    height: 24px;
    font-size: 15px;
    color: #978699;
    background: none;
    box-shadow: none;
    animation: none;
    transform: translateY(-50%);
}
body.wiki-redesign .wiki__menu-item.active > i { color: var(--accent-light); }
body.wiki-redesign .wiki__menu-item .wiki__menu-title,
body.wiki-redesign .wiki__menu-item.active .wiki__menu-title {
    font-family: 'Onest', 'Manrope', sans-serif;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    text-wrap: initial;
    color: inherit;
    text-shadow: none;
}
body.wiki-redesign .wiki__menu-sub,
body.wiki-redesign .wiki__menu-item.active .wiki__menu-sub {
    display: block;
    font-size: 10px;
    line-height: 1.5;
    margin-top: 4px;
    color: #928596;
}
body.wiki-redesign .wiki__menu-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
body.wiki-redesign .wiki__content {
    margin-left: 292px;
    padding: 62px clamp(30px, 4.2vw, 74px) 100px;
    background-size: 100% 100%, 100% auto;
    background-repeat: no-repeat;
    background-attachment: scroll;
}
body.wiki-redesign .wiki__section { max-width: 1140px; margin-bottom: 20px; }
body.wiki-redesign .wiki__page-title {
    margin: 0;
    font-family: 'Oswald', sans-serif;
    font-size: clamp(42px, 4.7vw, 72px);
    line-height: 1.12;
    letter-spacing: -.025em;
    font-weight: 500;
    text-transform: uppercase;
    color: #f6eff5;
}
body.wiki-redesign .wiki__divider { width: 64px; height: 2px; border-radius: 0; background: var(--accent); margin: 26px 0 34px; }
body.wiki-redesign .wiki__hero-image { margin-bottom: 32px; }
body.wiki-redesign .wiki__hero-image img { border-color: var(--border); border-radius: 8px; }
body.wiki-redesign .wiki__block {
    background: #15131bf0;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: clamp(24px, 3vw, 40px);
    margin-bottom: 22px;
    box-shadow: none;
    transition: none;
}
body.wiki-redesign .wiki__block:hover { border-color: var(--border); }
body.wiki-redesign .wiki__block-header {
    gap: 14px;
    margin-bottom: 25px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}
body.wiki-redesign .wiki__block-header > i { font-size: 19px; color: var(--accent); }
body.wiki-redesign .wiki__block-header h2 {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(26px, 2.5vw, 36px);
    line-height: 1.25;
    font-weight: 500;
    letter-spacing: -.01em;
    color: #f3edf4;
}
body.wiki-redesign .wiki__sub-block-header h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 26px;
    line-height: 1.3;
    font-weight: 500;
    letter-spacing: -.01em;
}
body.wiki-redesign :is(.wiki__concept-lead, .wiki__text) { font-size: 15px; line-height: 1.85; color: var(--text-secondary); }
body.wiki-redesign :is(.wiki__concept-card, .wiki__concept-overview-item, .wiki__concept-highlight, .wiki__info-item, .wiki__phase, .wiki-item, .wiki-wep, .wiki__feature-group) {
    background: #1a1720;
    border-color: var(--border);
    border-radius: 6px;
    box-shadow: none;
}
body.wiki-redesign :is(.wiki__concept-card, .wiki__info-item, .wiki-item):hover { background: #1c1923; border-color: #e5ccde26; }
body.wiki-redesign :is(.wiki__concept-card > div > strong, .wiki__concept-overview-item > div > strong, .wiki__concept-highlight > div > strong, .wiki-item strong) {
    color: #ece0eb;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 600;
}
body.wiki-redesign :is(.wiki__concept-card span, .wiki__concept-overview-item span, .wiki__concept-highlight p, .wiki-item span:not(.wiki-skill__tag), .wiki__phase p) {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.75;
}
body.wiki-redesign :is(.wiki__concept-card > i, .wiki__concept-overview-item > i, .wiki__concept-highlight > i, .wiki__diamond) { border-radius: 4px; background: #dcb1ca10; color: #e6bfd6; box-shadow: none; }
body.wiki-redesign :is(.wiki__phase-tag, .wiki__group-title) { font-family: 'Unbounded', sans-serif; font-size: 9px; font-weight: 500; letter-spacing: .04em; color: #dcb1ca; }
body.wiki-redesign .wiki__h3 { font-family: 'Onest', 'Manrope', sans-serif; font-size: 17px; line-height: 1.5; font-weight: 600; }
body.wiki-redesign .wiki-table-wrap { border: 1px solid var(--border); border-radius: 6px; overflow-x: auto; scrollbar-color: #65515f #100f16; }
body.wiki-redesign .wiki-table { font-family: 'Onest', 'Manrope', sans-serif; }
body.wiki-redesign .wiki-table :is(th, td) { border-color: var(--border); line-height: 1.65; }
body.wiki-redesign .wiki-table th { background: #231d2a; color: #ead5e6; font-size: 11px; letter-spacing: .025em; }
body.wiki-redesign .wiki-table td { font-size: 13px; }
body.wiki-redesign .wiki-table tbody tr:hover { background: #dcb1ca07; }
body.wiki-redesign .wiki__rates-table { border-color: var(--border); border-radius: 6px; box-shadow: none; }
body.wiki-redesign .wiki__rate-row { border-color: var(--border); }
body.wiki-redesign .wiki__rate-row--head { background: #231d2a; }
body.wiki-redesign .wiki__rate-value { font-family: 'Unbounded', sans-serif; font-size: 13px; letter-spacing: -.035em; color: #e6bfd6; }
body.wiki-redesign .wiki-note { border-color: #dcb1ca35; background: #dcb1ca08; border-radius: 6px; box-shadow: none; }
body.wiki-redesign .wiki__stage-tab {
    position: relative;
    isolation: isolate;
    border: 0;
    border-radius: 0;
    padding: 20px 18px;
    background: none;
    box-shadow: none;
    transition: color .2s ease;
}
body.wiki-redesign .wiki__stage-tab::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: url('../img/immersive/action-panel-v6.png') center / 100% 160% no-repeat;
    filter: brightness(.25) saturate(.3);
    transition: filter .2s ease;
    pointer-events: none;
}
body.wiki-redesign .wiki__stage-tab:hover,
body.wiki-redesign .wiki__stage-tab.is-active { background: none; box-shadow: none; }
body.wiki-redesign .wiki__stage-tab:hover::before { filter: brightness(.33) saturate(.4); }
body.wiki-redesign .wiki__stage-tab.is-active::before { filter: brightness(.43) saturate(.45); }
body.wiki-redesign .wiki__stage-tab strong { font-family: 'Onest', 'Manrope', sans-serif; font-size: 13px; font-weight: 600; }
body.wiki-redesign .wiki-skill__levels summary { color: #e2bfd6; border-color: var(--border); font-family: 'Onest', 'Manrope', sans-serif; }
body.wiki-redesign .wiki-wep__more summary { font-family: 'Onest', 'Manrope', sans-serif; font-size: 13px; }
body.wiki-redesign .wiki__concept-card :is(.wiki__card-shot, .wiki__shot-toggle) {
    color: #ead6e4;
    font-family: 'Onest', 'Manrope', sans-serif;
    box-shadow: none;
}
body.wiki-redesign .wiki__lightbox { background: #08060dec; backdrop-filter: blur(6px); }
body.wiki-redesign .wiki__lightbox img { border-color: #e5ccde26; border-radius: 6px; box-shadow: 0 28px 100px #0009; }
body.wiki-redesign .footer { margin-left: 292px; padding-inline: clamp(30px, 4.2vw, 74px); background: #09080d; border-top: 1px solid var(--border); }
body.wiki-redesign .footer::before { content: none; }
body.wiki-redesign .footer__links a { font-family: 'Onest', 'Manrope', sans-serif; color: #b6a8bb; }
@media (max-width: 1279px) {
    body.aw-redesign.wiki-redesign { --header-h: 88px; }
    body.wiki-redesign .wiki__content { padding-inline: 28px; padding-top: 42px; }
    body.wiki-redesign .wiki__sidebar { width: 262px; }
    body.wiki-redesign .wiki__content, body.wiki-redesign .footer { margin-left: 262px; }
    body.wiki-redesign .wiki__menu { padding-inline: 11px; }
}
@media (max-width: 1100px) {
    body.wiki-redesign .wiki__sidebar { display: none; }
    body.wiki-redesign .wiki__content, body.wiki-redesign .footer { margin-left: 0; }
    body.wiki-redesign .wiki__content { padding: 32px 24px 70px; }
    body.wiki-redesign .wiki__mobile-nav { display: block; margin-bottom: 30px; }
    body.wiki-redesign .wiki__mobile-nav select {
        min-height: 54px;
        padding: 14px 46px 14px 17px;
        font-family: 'Onest', 'Manrope', sans-serif;
        font-size: 13px;
        font-weight: 500;
        border: 1px solid #e5ccde28;
        border-radius: 6px;
        color: #eaddE9;
        background: #19151f;
        outline-offset: 4px;
    }
    body.wiki-redesign .wiki__mobile-nav { position: relative; }
    body.wiki-redesign .wiki__mobile-nav::after {
        content: '';
        position: absolute;
        right: 19px;
        top: 21px;
        width: 8px;
        height: 8px;
        border-right: 1px solid #dcb1ca;
        border-bottom: 1px solid #dcb1ca;
        transform: rotate(45deg);
        pointer-events: none;
    }
}
@media (max-width: 699px) {
    body.aw-redesign.wiki-redesign { --header-h: 82px; }
    body.wiki-redesign .wiki__content { padding: 25px 16px 56px; }
    body.wiki-redesign .wiki__mobile-nav { margin-bottom: 29px; }
    body.wiki-redesign .wiki__page-title { font-size: clamp(35px, 9vw, 52px); }
    body.wiki-redesign .wiki__divider { margin: 20px 0 26px; }
    body.wiki-redesign .wiki__block { padding: 22px 19px; margin-bottom: 17px; }
    body.wiki-redesign .wiki__block-header { gap: 12px; margin-bottom: 21px; padding-bottom: 15px; }
    body.wiki-redesign .wiki__block-header h2 { font-size: 25px; }
    body.wiki-redesign .wiki__sub-block-header h3 { font-size: 23px; }
    body.wiki-redesign :is(.wiki__concept-lead, .wiki__text) { font-size: 14px; line-height: 1.8; }
    body.wiki-redesign .wiki__block--banner { padding-top: 0; }
    body.wiki-redesign .wiki__block--banner > .wiki__hero-image--banner { margin: 0 -19px 22px; }
    body.wiki-redesign .footer { padding-inline: 20px; }
    body.wiki-redesign .wiki__concept-split__shot { top: calc(var(--header-h) + 16px); }
    body.wiki-redesign .wiki__lightbox img { max-width: calc(100vw - 24px); }
}
@media (min-width: 700px) {
    body.wiki-redesign .wiki__block--banner { padding-top: 0; }
    body.wiki-redesign .wiki__block--banner > .wiki__hero-image--banner { margin: 0 calc(-1 * clamp(24px, 3vw, 40px)) 28px; }
}
@media (prefers-reduced-motion: reduce) {
    body.wiki-redesign :is(.wiki__section, .wiki__menu-item, .wiki__menu-item::before, .wiki__stage-tab, .wiki__stage-tab::before) { animation: none; transition: none; }
}
/* Inner grids may shrink independently of long game labels. */
body.wiki-redesign :is(.wiki__concept-grid, .wiki-item-grid, .wiki__concept-pair, .wiki__info-list) > * { min-width: 0; }
body.wiki-redesign :is(.wiki-wep__skill-head, .wiki-wep__skill-head strong) { min-width: 0; }
@media (max-width: 520px) {
    body.wiki-redesign .wiki__concept-card--shot {
        display: grid;
        grid-template-columns: 30px minmax(0, 1fr);
        align-items: start;
        gap: 10px 12px;
    }
    body.wiki-redesign .wiki__concept-card--shot > i { grid-column: 1; grid-row: 1; }
    body.wiki-redesign .wiki__concept-card--shot > div { grid-column: 2; grid-row: 1; }
    body.wiki-redesign .wiki__concept-card--shot > .wiki__card-shot { grid-column: 2; grid-row: 2; justify-self: start; max-width: 100%; min-width: 0; white-space: normal; }
}
/* Screenshot actions use the same generated matte panel as the download actions. */
body.wiki-redesign .wiki__concept-card .wiki__card-shot {
    position: relative;
    isolation: isolate;
    overflow: visible;
    flex-direction: row;
    gap: 8px;
    height: 42px;
    min-width: 110px;
    padding: 10px 14px;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: #f3e8f0;
    animation: none;
    font-family: 'Unbounded', sans-serif;
    transition: none;
}
body.wiki-redesign .wiki__concept-card .wiki__card-shot::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    background: url('../img/immersive/action-panel-v6.png') center / 100% 160% no-repeat;
    filter: brightness(.25) saturate(.3);
    animation: none;
    transition: filter .22s ease;
    pointer-events: none;
}
body.wiki-redesign .wiki__concept-card .wiki__card-shot:hover { transform: none; box-shadow: none; background: none; }
body.wiki-redesign .wiki__concept-card .wiki__card-shot:hover::before { filter: brightness(.36) saturate(.4); }
body.wiki-redesign .wiki__concept-card .wiki__card-shot span { font-size: 9px; line-height: 1.4; font-weight: 500; letter-spacing: -.02em; color: inherit; }
body.wiki-redesign .wiki__concept-card .wiki__card-shot i { font-size: 12px; color: inherit; }
body.wiki-redesign .wiki__card-shot:focus-visible { outline: 2px solid #dcb1ca; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { body.wiki-redesign .wiki__concept-card .wiki__card-shot::before { transition: none; } }

/* Skill metadata stays distinct from descriptions and never uses pale text on a pale fill. */
body.aw-redesign.wiki-redesign .wiki-skill__tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    padding: 5px 9px;
    border: 1px solid #514553;
    border-radius: 3px;
    background: #28212b;
    color: #eadce7;
    font-family: 'Onest', 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0;
    text-transform: none;
    white-space: normal;
    overflow-wrap: normal;
    text-align: center;
    box-shadow: none;
}
body.wiki-redesign .wiki-skill__tag.wiki-skill__tag--passive,
body.wiki-redesign .wiki-skill__tag.wiki-skill__tag--safe {
    background: #24212b;
    border-color: #514959;
    color: #e4deed;
}
body.wiki-redesign .wiki-skill__tag.wiki-skill__tag--active {
    background: #33212e;
    border-color: #78546a;
    color: #f7d6e7;
}
body.wiki-redesign .wiki-skill__tag:is(.wiki-skill__tag--passive, .wiki-skill__tag--active)::before {
    content: '';
    width: 4px;
    height: 4px;
    flex: 0 0 4px;
    border-radius: 50%;
    background: currentColor;
    opacity: .85;
}

@media (max-width: 699px) {
    body.wiki-redesign :is(.wiki-item-grid--skills, .wiki-item-grid:has(> .wiki-skill)) {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Bonus-code action shares the approved matte raster surface and clean corner. */
body.aw-redesign.wiki-redesign .bonus-code .bonus-copy {
    --aw-button-cut: 10px;
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 206px;
    max-width: 100%;
    min-height: 48px;
    padding: 14px 22px;
    border: 0;
    border-radius: 0;
    background: none;
    color: #f3e8f0 !important;
    font: 600 10px/1.5 'Unbounded', sans-serif;
    letter-spacing: -.025em;
    text-transform: none;
    text-shadow: none;
    box-shadow: none;
    filter: none;
    transform: none;
    animation: none;
    overflow: visible;
    transition: color .22s ease;
}
body.aw-redesign.wiki-redesign .bonus-code .bonus-copy::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    width: auto;
    height: auto;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: url('../img/immersive/action-panel-v6.png') center / 120% 200% no-repeat;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--aw-button-cut)), calc(100% - var(--aw-button-cut)) 100%, 0 100%);
    filter: brightness(.25) saturate(.3);
    opacity: 1;
    transform: none;
    box-shadow: none;
    animation: none;
    transition: filter .22s ease;
    pointer-events: none;
}
body.aw-redesign.wiki-redesign .bonus-code .bonus-copy::after { content: none; }
body.aw-redesign.wiki-redesign .bonus-code .bonus-copy:hover {
    background: none;
    color: #fff1fa !important;
    filter: none;
    transform: none;
    box-shadow: none;
}
body.aw-redesign.wiki-redesign .bonus-code .bonus-copy:hover::before,
body.aw-redesign.wiki-redesign .bonus-code .bonus-copy:focus-visible::before {
    filter: brightness(.36) saturate(.4);
}
body.aw-redesign.wiki-redesign .bonus-code .bonus-copy:focus-visible {
    outline: 2px solid #dcb1ca;
    outline-offset: 4px;
}
body.aw-redesign.wiki-redesign .bonus-code .bonus-copy:active::before { filter: brightness(.3) saturate(.3); }
@media (max-width: 600px) {
    body.aw-redesign.wiki-redesign .bonus-code .bonus-copy { width: 100%; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
    body.aw-redesign.wiki-redesign .bonus-code .bonus-copy,
    body.aw-redesign.wiki-redesign .bonus-code .bonus-copy::before { transition: none; }
}
