/* ==========================================================
   World / area / dungeon public pages
   Namespaces: worldhub_, worldentry_
   ========================================================== */

.worldhub_page,
.worldentry_page {
    position: relative;
    z-index: 10;
    width: min(1240px, calc(100% - 36px));
    margin: 0 auto;
    padding: 28px 0 72px;
}

.worldhub_hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    min-height: 270px;
    padding: 42px 48px;
    overflow: hidden;
    border: 1px solid rgba(255, 244, 157, 0.14);
    border-radius: 16px 16px 4px 4px;
    background:
        linear-gradient(105deg, rgba(4, 6, 15, 0.96), rgba(13, 9, 29, 0.86)),
        url('/img/bg.png') center 55% / cover no-repeat;
    background:
        linear-gradient(105deg, rgba(4, 6, 15, 0.96), rgba(13, 9, 29, 0.86)),
        image-set(url('/img/bg.webp') type('image/webp'), url('/img/bg.png') type('image/png')) center 55% / cover no-repeat;
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.38);
}

.worldhub_hero_copy {
    max-width: 730px;
}

.worldhub_eyebrow,
.worldentry_eyebrow {
    margin: 0;
    color: rgba(255, 244, 157, 0.68);
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2.3px;
}

.worldhub_title {
    margin: 12px 0 0;
    color: #fff;
    font-size: clamp(38px, 5vw, 62px);
    font-weight: 500;
    line-height: 1.18;
    letter-spacing: -0.04em;
}

.worldhub_lead {
    max-width: 690px;
    margin: 17px 0 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 16px;
    line-height: 1.85;
}

.worldhub_hero_stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(86px, 1fr));
    gap: 8px;
    flex: 0 0 auto;
}

.worldhub_hero_stats div {
    min-width: 92px;
    padding: 14px 12px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    text-align: center;
}

.worldhub_hero_stats strong,
.worldhub_hero_stats span {
    display: block;
}

.worldhub_hero_stats strong {
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 25px;
    font-weight: 500;
}

.worldhub_hero_stats span {
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.46);
    font-family: 'Orbitron', sans-serif;
    font-size: 9px;
    letter-spacing: 1px;
}

.worldhub_notice {
    margin-top: 16px;
    padding: 18px 22px;
    border: 1px solid rgba(246, 198, 105, 0.24);
    border-radius: 8px;
    color: #f2d89c;
    background: rgba(108, 69, 20, 0.18);
}

.worldhub_notice strong {
    font-size: 15px;
}

.worldhub_notice p {
    margin: 5px 0 0;
    color: rgba(255, 255, 255, 0.58);
    font-size: 14px;
}

.worldhub_catalog {
    margin-top: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.085);
    border-radius: 4px;
    background: rgba(4, 6, 14, 0.92);
}

.worldhub_tablist {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid rgba(255, 255, 255, 0.075);
    background: rgba(255, 255, 255, 0.018);
}

.worldhub_tab {
    min-width: 0;
    min-height: 64px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.065);
    color: rgba(255, 255, 255, 0.5);
    background: transparent;
    font: inherit;
    cursor: pointer;
    transition: color 160ms ease, background-color 160ms ease;
}

.worldhub_tab:last-child {
    border-right: 0;
}

.worldhub_tab span {
    font-size: 15px;
    font-weight: 600;
}

.worldhub_tab strong {
    min-width: 28px;
    min-height: 24px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.62);
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    font-weight: 500;
}

.worldhub_tab:hover {
    color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.025);
}

.worldhub_tab[aria-selected='true'] {
    color: #fff4a7;
    background: linear-gradient(180deg, rgba(255, 244, 157, 0.075), rgba(255, 244, 157, 0.015));
    box-shadow: inset 0 -2px rgba(255, 244, 157, 0.72);
}

.worldhub_tab[aria-selected='true'] strong {
    color: #fff4a7;
    border-color: rgba(255, 244, 157, 0.24);
}

.worldhub_tab:focus-visible {
    position: relative;
    z-index: 1;
    outline: 2px solid rgba(255, 244, 157, 0.75);
    outline-offset: -3px;
}

.worldhub_tabpanel {
    padding: 28px 30px 34px;
}

.worldhub_tabpanel[hidden] {
    display: none;
}

.worldhub_section_heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.worldhub_section_heading h2,
.worldentry_section_heading h2 {
    margin: 7px 0 0;
    color: #fff;
    font-size: 28px;
    font-weight: 500;
}

.worldhub_section_heading > p {
    max-width: 540px;
    margin: 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    line-height: 1.7;
    text-align: right;
}

.worldhub_card_grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
    margin-top: 18px;
}

.worldhub_card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.085);
    border-radius: 8px;
    color: inherit;
    background: rgba(255, 255, 255, 0.025);
    text-decoration: none;
    transition: transform 170ms ease, border-color 170ms ease, background-color 170ms ease;
}

.worldhub_card:hover {
    border-color: rgba(255, 244, 157, 0.3);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-3px);
}

.worldhub_card_visual {
    position: relative;
    min-height: 136px;
    padding: 12px;
    background-position: center;
    background-size: cover;
    isolation: isolate;
}

.worldhub_card_visual::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(2, 3, 10, 0.04), rgba(2, 3, 10, 0.86));
    content: '';
}

.worldhub_card_visual_empty {
    background:
        radial-gradient(circle at 60% 40%, rgba(197, 156, 255, 0.21), transparent 34%),
        linear-gradient(135deg, rgba(20, 16, 39, 0.95), rgba(5, 7, 17, 0.98));
}

.worldhub_card_type,
.worldhub_card_featured {
    display: inline-flex;
    min-height: 24px;
    padding: 0 8px;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.86);
    background: rgba(3, 4, 12, 0.72);
    font-family: 'Orbitron', sans-serif;
    font-size: 9px;
    letter-spacing: 0.8px;
}

.worldhub_card_featured {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #fff4a7;
    border-color: rgba(255, 244, 157, 0.3);
}

.worldhub_card_body {
    padding: 14px 15px 16px;
}

.worldhub_card_location {
    margin: 0;
    overflow: hidden;
    color: rgba(216, 188, 255, 0.72);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.worldhub_card h3 {
    margin: 6px 0 0;
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.4;
}

.worldhub_card_subtitle {
    margin: 4px 0 0;
    overflow: hidden;
    color: rgba(255, 244, 157, 0.62);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.worldhub_card_summary {
    display: -webkit-box;
    min-height: 44px;
    margin: 9px 0 0;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.57);
    font-size: 13px;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.worldhub_card_meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.49);
    font-size: 11px;
}

.worldhub_card_meta span {
    min-width: 0;
}

.worldhub_card_meta span:last-child {
    color: rgba(255, 244, 157, 0.72);
    text-align: right;
}

.worldhub_empty_panel {
    margin-top: 18px;
    padding: 34px 24px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.018);
    text-align: center;
}

.worldhub_empty_title {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
    font-weight: 500;
}

.worldhub_empty_text {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.46);
    font-size: 14px;
}

.worldentry_preview_notice {
    margin-bottom: 14px;
    padding: 12px 16px;
    border: 1px solid rgba(246, 198, 105, 0.3);
    border-radius: 7px;
    color: #f1d28d;
    background: rgba(103, 64, 18, 0.2);
    font-size: 14px;
    text-align: center;
}

.worldentry_article {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px 14px 4px 4px;
    background: rgba(4, 6, 14, 0.94);
}

.worldentry_hero {
    position: relative;
    min-height: 410px;
    display: flex;
    align-items: flex-end;
    background-image: var(--worldentry-hero-image);
    background-position: center;
    background-size: cover;
    isolation: isolate;
}

.worldentry_hero_without_image {
    background:
        radial-gradient(circle at 75% 25%, rgba(177, 125, 235, 0.22), transparent 35%),
        linear-gradient(125deg, rgba(10, 12, 27, 0.98), rgba(23, 14, 45, 0.94));
}

.worldentry_hero_overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(3, 4, 12, 0.08), rgba(3, 4, 12, 0.95));
}

.worldentry_hero_inner {
    width: 100%;
    max-width: 940px;
    padding: 44px 52px 48px;
}

.worldentry_breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.worldentry_breadcrumb a {
    color: rgba(255, 244, 157, 0.78);
    text-decoration: none;
}

.worldentry_title {
    margin: 11px 0 0;
    color: #fff;
    font-size: clamp(38px, 5vw, 66px);
    font-weight: 500;
    line-height: 1.18;
    letter-spacing: -0.04em;
    text-shadow: 0 10px 34px rgba(0, 0, 0, 0.42);
}

.worldentry_subtitle {
    margin: 10px 0 0;
    color: rgba(255, 244, 157, 0.74);
    font-size: 17px;
}

.worldentry_summary {
    max-width: 760px;
    margin: 17px 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    line-height: 1.85;
}

.worldentry_layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 32px;
    padding: 38px 42px 46px;
}

.worldentry_content {
    min-width: 0;
    color: rgba(255, 255, 255, 0.76);
}

.worldentry_paragraph,
.worldentry_list,
.worldentry_quote,
.worldentry_info_text {
    font-size: 15px;
    line-height: 1.95;
}

.worldentry_paragraph {
    margin: 0 0 20px;
}

.worldentry_heading {
    margin: 42px 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 244, 157, 0.17);
    color: #fff;
    font-size: 27px;
    font-weight: 500;
}

.worldentry_heading_small {
    margin: 30px 0 13px;
    color: #fff;
    font-size: 21px;
    font-weight: 500;
}

.worldentry_list {
    margin: 0 0 22px;
    padding-left: 22px;
}

.worldentry_list li + li {
    margin-top: 7px;
}

.worldentry_quote {
    margin: 22px 0;
    padding: 15px 18px;
    border-left: 3px solid rgba(255, 244, 157, 0.55);
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 244, 157, 0.045);
}

.worldentry_empty_text {
    color: rgba(255, 255, 255, 0.48);
    font-size: 15px;
}

.worldentry_sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.worldentry_info_panel {
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.085);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
}

.worldentry_info_title {
    margin: 0 0 14px;
    color: rgba(255, 244, 157, 0.78);
    font-size: 15px;
    font-weight: 600;
}

.worldentry_info_list {
    margin: 0;
}

.worldentry_info_list div {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.worldentry_info_list div:first-child {
    border-top: 0;
}

.worldentry_info_list dt,
.worldentry_info_list dd {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
}

.worldentry_info_list dt {
    color: rgba(255, 255, 255, 0.4);
}

.worldentry_info_list dd {
    color: rgba(255, 255, 255, 0.78);
}

.worldentry_info_list a {
    color: #fff3a0;
    text-decoration: none;
}

.worldentry_info_text {
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
}

.worldentry_gallery,
.worldentry_related {
    margin-top: 44px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.worldentry_gallery_grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.worldentry_gallery_item {
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.worldentry_gallery_item img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.worldentry_gallery_item figcaption {
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.52);
    font-size: 12px;
}

.worldentry_related {
    margin: 0 42px 44px;
}

.worldentry_related_grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
    margin-top: 20px;
}

.worldentry_related_card {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: inherit;
    background: rgba(255, 255, 255, 0.025);
    text-decoration: none;
    transition: border-color 160ms ease, transform 160ms ease;
}

.worldentry_related_card:hover {
    border-color: rgba(255, 244, 157, 0.3);
    transform: translateY(-2px);
}

.worldentry_related_card span {
    color: rgba(216, 188, 255, 0.68);
    font-size: 11px;
}

.worldentry_related_card strong {
    display: block;
    margin-top: 7px;
    color: #fff;
    font-size: 17px;
    font-weight: 500;
}

.worldentry_related_card p {
    display: -webkit-box;
    margin: 8px 0 0;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}


@media (max-width: 1120px) {
    .worldhub_hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .worldhub_hero_stats {
        width: 100%;
    }
}

@media (max-width: 980px) {
    .worldhub_card_grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .worldentry_layout {
        grid-template-columns: 1fr;
    }

    .worldentry_sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .worldhub_page,
    .worldentry_page {
        width: min(100% - 20px, 1240px);
        padding-top: 12px;
    }

    .worldhub_hero {
        min-height: 0;
        align-items: flex-start;
        flex-direction: column;
        padding: 34px 28px;
    }

    .worldhub_hero_stats {
        width: 100%;
    }

    .worldhub_tab {
        min-height: 58px;
        padding: 0 12px;
    }

    .worldhub_tab span {
        font-size: 14px;
    }

    .worldhub_tabpanel {
        padding: 24px;
    }

    .worldhub_card_grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .worldhub_section_heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .worldentry_hero {
        min-height: 360px;
    }

    .worldentry_hero_inner {
        padding: 34px 26px 38px;
    }

    .worldentry_layout {
        padding: 30px 24px 38px;
    }

    .worldentry_related {
        margin: 0 24px 36px;
    }

    .worldentry_related_grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .worldhub_title,
    .worldentry_title {
        font-size: 36px;
    }

    .worldhub_lead,
    .worldentry_summary {
        font-size: 15px;
    }

    .worldhub_tablist {
        grid-template-columns: 1fr;
    }

    .worldhub_tab {
        min-height: 50px;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        justify-content: space-between;
    }

    .worldhub_tab:last-child {
        border-bottom: 0;
    }

    .worldhub_section_heading > p {
        text-align: left;
    }

    .worldhub_card_grid,
    .worldentry_gallery_grid,
    .worldentry_sidebar {
        grid-template-columns: 1fr;
    }

    .worldhub_card_visual {
        min-height: 168px;
    }

    .worldentry_info_list div {
        grid-template-columns: 82px minmax(0, 1fr);
    }
}

/* Phase 1-8 performance: large catalogs render as they approach the viewport. */
.worldhub_card {
    content-visibility: auto;
    contain-intrinsic-size: auto 340px;
}
