﻿/* Reset default margins and paddings */
body, html {
    margin: 0;
    margin-top: 50px;
    padding: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: black;
    transform: scale(0.9); /* 90% size */
    transform-origin: top center;
}

pre {
    white-space: pre-wrap; /* wraps text instead of side-scroll */
    word-wrap: break-word; /* breaks long words */
    margin: 0;
    font: inherit;
}

.content {
    padding: 10px 16px 14px;
    color: var(--muted);
    border-top: 1px solid var(--border);
    font-size: 1.5rem; /* bigger content text */
    font-family: "Times New Roman", Times, serif;
    line-height: 1.65;
}

summary .label {
    padding-left: 18px;
    display: inline-block;
    font-size: 2.25rem; /* bigger labels */
}

.systems-content details {
    border: 0 !important; /* clear any previous border shorthand */
    border-top: 2px solid #fff !important;
    border-bottom: 2px solid #fff !important;
    border-radius: 0; /* optional: keep lines straight */
    background: transparent; /* optional */
}

/* Since .content has its own top border, remove it so the outer line stands out */
.systems-content .content {
    border-top: 0;
}


.kido-content details {
    border: 0 !important; /* clear any previous border shorthand */
    border-top: 2px solid #fff !important;
    border-bottom: 2px solid #fff !important;
    border-radius: 0; /* optional: keep lines straight */
    background: transparent; /* optional */
}

/* Since .content has its own top border, remove it so the outer line stands out */
.kido-content .content {
    border-top: 0;
}

/* Wrapper for positioning */
.container {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: -30px;
    animation: fadeIn 1.5s ease-in-out;
}



    .container.top-position {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, 0);
        width: 100%;
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 20px;
        transition: transform 1s ease-out; /* Smooth movement up */
    }

/* Main container for race images */
.race-image-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

/* Base styling for images */
.race-image {
    position: absolute;
    transition: transform 0.3s ease-in-out, opacity 0.5s ease-in-out;
}



/* TYPES: Living, Soul, Sinner */
.living {
    transform: translate(-400px, 60px);
    z-index: 1;
    opacity: 50%;
}

.soul {
    transform: translate(0px, -40px);
    z-index: 4;
    opacity: 50%;
}

.sinner {
    transform: translate(400px, 10px) scaleX(-1); /* Flips horizontally */
    z-index: 1;
    opacity: 50%;
}

.living-name {
    transform: translate(-400px, 600px);
    font-size: 60px;
    font-family: 'Arrancar', sans-serif;
}

.soul-name {
    transform: translate(0px, 600px);
    font-size: 60px;
    font-family: 'Arrancar', sans-serif;
}

.sinner-name {
    transform: translate(400px, 600px);
    font-size: 60px;
    font-family: 'Arrancar', sans-serif;
}

/* Fairy - Furthest back, stays centered but shifted slightly right */
.fae {
    transform: translate(420px, -50px); /* Move right and slightly up */
    z-index: 1; /* Backmost layer */
    opacity: 50%;
}

/* Human - Frontmost, centered in the foreground */
.human {
    transform: translate(190px, 50px); /* Slightly right and down */
    z-index: 4; /* Frontmost */
    opacity: 50%;
}

/* Beast - Behind Human, slightly to the left */
.beast {
    transform: translate(-190px, 30px); /* Move slightly left and down */
    z-index: 3; /* Behind Human */
    opacity: 50%;
}

/* ModSoul - Behind Beast, offset further left and slightly up */
.mod-soul {
    transform: translate(-450px, -40px); /* Move further left and slightly up */
    z-index: 2; /* Behind Beast */
    opacity: 50%;
}

/* Make images visible after fade-in */
.race-image-container.visible {
    opacity: 1;
}

.fae-name {
    transform: translate(720px, 400px); /* Below Fairy */
    font-size: 60px;
    font-family: 'Arrancar', sans-serif;
}

.human-name {
    transform: translate(250px, 450px); /* Below Human */
    font-size: 60px;
    font-family: 'Arrancar', sans-serif;
}

.beast-name {
    transform: translate(-190px, 450px); /* Below Beast */
    font-size: 60px;
    font-family: 'Arrancar', sans-serif;
}

.mod-soul-name {
    transform: translate(-710px, 420px); /* Below ModSoul */
    font-size: 60px;
    font-family: 'Arrancar', sans-serif;
}


#subrace-clock {
    position: relative;
    width: 800px;
    height: 800px;
    left: 1%; /* â†“ moved from 50% */
    top: 250px;
    z-index: 10;
}


/* CENTER TOP */
.fullbringer {
    position: absolute;
    top: -20%;
    left: 33%;
    transform: translate(-50%, 0%);
    z-index: 3;
    opacity: 50%;
}

.fullbringer-name {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 12;
}

/* 1 o'clock */
.witch {
    position: absolute;
    top: -15%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    z-index: 4;
    opacity: 50%;
}

.witch-name {
    position: absolute;
    top: 20%;
    left: 77%;
    transform: translateX(-50%);
    z-index: 10;
}

/* 3 o'clock */
.titan {
    position: absolute;
    top: 19%;
    left: 55%;
    transform: translate(-50%, -50%) scale(0.5);
    z-index: 5;
    opacity: 50%;
}

.titan-name {
    position: absolute;
    top: 50%;
    left: 80%;
    transform: translate(-50%, 70px);
    z-index: 10;
}

/* 5 o'clock */
.shinigami {
    position: absolute;
    top: 40%;
    left: 47%;
    transform: translate(-50%, -50%) scale(0.5);
    z-index: 11;
    opacity: 50%;
}

.shinigami-name {
    position: absolute;
    top: 90%;
    left: 75%;
    transform: translateX(-50%);
    z-index: 11;
}

/* 7 o'clock */
.quincy {
    position: absolute;
    top: 40%;
    left: 25%;
    transform: translate(-50%, -50%) scale(-0.5, 0.5);
    z-index: 11;
    opacity: 50%;
}

.quincy-name {
    position: absolute;
    top: 90%;
    left: 30%;
    transform: translateX(-50%);
    z-index: 11;
}

/* 9 o'clock */
.bount {
    position: absolute;
    top: 19%;
    left: 15%;
    transform: translate(-50%, -50%) scale(0.5);
    z-index: 10;
    opacity: 50%;
}

.bount-name {
    position: absolute;
    top: 55%;
    left: 20%;
    transform: translate(-50%, 70px);
    z-index: 10;
}

/* 11 o'clock */
.hollow {
    position: absolute;
    top: -15%;
    left: 15%;
    transform: translate(-50%, -50%) scale(0.5);
    z-index: 4;
    opacity: 50%;
}

.hollow-name {
    position: absolute;
    top: 210px;
    left: 18%;
    transform: translateX(-50%);
    z-index: 4;
}



.subrace-fixed-container {
    position: fixed;
    top: 200px; /* adjust this to vertically center the circle */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    z-index: 10;
}

.race-image.subrace {
    transform: scale(0.5);
    transform-origin: center;
}
/* Hover effect - Slight scale-up */
.race-name {
    font-family: 'Arrancar', sans-serif;
    font-size: 2.5rem;
    color: white;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8), -2px -2px 5px rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    position: absolute;
    padding: 5px 10px;
    border-radius: 5px;
}

    /* Hover effect on race names */
    .race-name:hover,
    .race-name.active {
        background-color: #333;
        outline: 2px solid black;
    }

/* Hover effect on images */
.race-image {
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

    /* Hover effect on images and linked text */
    .race-image:hover,
    .race-image.active {
        opacity: 1;
    }


.tree-image {
    z-index: -1; /* Ensure itâ€™s above background elements */
}

.container.top-position.move-up {
    transform: translate(-50%, -50vh); /* Move upwards smoothly */
}

.container.move-up {
    animation: moveUp 1s ease-out forwards;
}

@keyframes moveUp {
    from {
        bottom: 0; /* Start at bottom */
    }

    to {
        bottom: 96%; /* Move to the top smoothly */
    }
}

.container.top-position.move-up {
    transform: translate(-50%, -50vh); /* Move upwards smoothly */
}

/* Style the image */
img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Style the Shattered Realms text */
.text {
    font-family: 'Arrancar', sans-serif;
    font-size: 10rem;
    color: white;
    margin-top: 5px;
    margin-bottom: 0px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8), -2px -2px 5px rgba(255, 255, 255, 0.5);
    animation: fadeIn 1.5s ease-in-out;
}

/* Button container */
.text-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 2px;
}

#dynamic-buttons {
    flex-wrap: wrap;
    max-width: min(1600px, 92vw);
    row-gap: 10px;
    padding-top: 8px;
}

/* Base button styling */
.button {
    text-decoration: none;
    padding: 10px 20px;
    transition: all 0.3s ease-in-out;
    border-radius: 5px;
    cursor: pointer;
}

/* Side buttons */
.side-text {
    font-family: 'Arrancar', sans-serif;
    font-size: 2rem;
    color: white;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8), -2px -2px 5px rgba(255, 255, 255, 0.5);
}

/* Center "BLEACH" button */
.center-text {
    font-family: 'FontBleach', sans-serif;
    font-size: 3rem;
    color: white;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8), -2px -2px 5px rgba(255, 255, 255, 0.5);
}

/* Dynamic buttons */
.dynamic-text {
    font-family: 'FontBleach', sans-serif;
    font-size: 2.5rem;
    color: white;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8), -2px -2px 5px rgba(255, 255, 255, 0.5);
    z-index: 100;
}

/* Hover effect: dark grey background + black outline */
.button:hover {
    background-color: #333; /* Slight dark gray */
    outline: 2px solid black;
    padding: 12px 22px; /* Slight increase for effect */
}

.text-group:hover {
    background-color: transparent; /* Prevent group-wide hover effect */
}

/* Disabled buttons */
.disabled {
    cursor: default;
    pointer-events: none;
}

/* Hidden elements */
.hidden {
    display: none;
}

.discord-button {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: -3px; /* Space below BLEACH button */
}

.discord-logo {
    width: 45px;
    height: 45px;
    filter: drop-shadow(0px 0px 2px white);
}

.talent-zone {
    position: absolute;
    width: 128px;
    height: 128px;
    background-color: rgba(255, 255, 255, 0.5); /* More visible */
    /*border: 2px solid red; Red border to track its position */
    cursor: pointer;
}


#main-buttons {
    margin-top: -20px; /* Move up by 10 pixels */
}


/* Talent Tree Container */
#tree-container {
    position: absolute;
    top: 30vh; /* â¬…ï¸ This locks it 20% down the viewport */
    left: 20vh;
    transform: translateX(-50%);
    z-index: 100;
}

/* Tree Image */
.tree-image {
    position: fixed;
    opacity: 0;
    transition: opacity 0.5s linear;
}

.talent-zone {
    position: absolute;
    width: 128px;
    height: 128px;
    background-color: rgba(255, 255, 255, 0.5); /* More visible */
    /*border: 2px solid red;  Red border to track its position */
    cursor: pointer;
}

/* Tooltip */
.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px;
    border-radius: 5px;
    white-space: pre-wrap;
    font-size: 14px;
    z-index: 5000 !important; /* Ensure it appears on top */
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    max-width: 450px;
    pointer-events: none !important; /* Ensure it doesnâ€™t interfere with hover */
    display: block !important; /* Ensure it's visible */
}


    .tooltip br {
        display: block;
        margin-bottom: 20px; /* Adjust this value */
    }

.talent-icon {
    pointer-events: auto !important;
    cursor: pointer;
    z-index: 3000 !important; /* Ensure it's above the tree box */
}


.systems-panel {
    width: min(1100px, 80vw);
    min-height: 45vh;
    max-height: 70vh;
    background: rgba(0, 0, 0, 0.65);
    border: 2px solid #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    overflow: hidden; /* clip inner edges */
    z-index: 1500;
    transition: opacity 0.4s ease;
}

/* Tabs row */
.systems-tabs {
    display: flex;
    gap: 8px;
    padding: 8px;
    background: rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.25);
}

/* Individual tab */
.systems-tab {
    font-family: 'FontBleach', sans-serif;
    font-size: 1.2rem;
    color: white;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.35);
    border-bottom: 2px solid transparent;
    padding: 9px 16px;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

    .systems-tab:hover {
        background: rgba(255,255,255,0.08);
    }

    .systems-tab.active {
        background: rgba(255,255,255,0.12);
        border-color: white;
        border-bottom-color: transparent;
    }

/* Content area */
.systems-content {
    font-family: 'Arrancar', sans-serif;
    color: #fff;
    padding: 18px 22px 24px;
    overflow: auto;
    max-height: calc(150vh - 80px); /* keep within viewport */
    line-height: 1.35;
}

    .systems-content h2 {
        margin: 0 0 10px 0;
        font-size: 3.0rem;
        text-shadow: 2px 2px 5px rgba(0,0,0,0.8), -2px -2px 5px rgba(255,255,255,0.5);
    }

    .systems-content p, .systems-content li {
        font-size: 1.2rem;
        font-family: 'Times New Roman', Times, serif;
        line-height: 1.45;
    }

/* Make sure it layers above race images & tree box */
.systems-panel {
    width: min(1210px, 88vw); /* was 1100px / 80vw */
    min-height: 120vh; /* was 45vh */
    max-height: 150vh; /* was 70vh */
}



/*kido systems*/

.kido-panel {
    width: min(1100px, 80vw);
    min-height: 45vh;
    max-height: 70vh;
    background: rgba(0, 0, 0, 0.65);
    border: 2px solid #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    overflow: hidden; /* clip inner edges */
    z-index: 1500;
    transition: opacity 0.4s ease;
}

/* Tabs row */
.kido-tabs {
    display: flex;
    gap: 8px;
    padding: 8px;
    background: rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.25);
}

/* Individual tab */
.kido-tab {
    font-family: 'FontBleach', sans-serif;
    font-size: 1.2rem;
    color: white;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.35);
    border-bottom: 2px solid transparent;
    padding: 9px 16px;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

    .kido-tab:hover {
        background: rgba(255,255,255,0.08);
    }

    .kido-tab.active {
        background: rgba(255,255,255,0.12);
        border-color: white;
        border-bottom-color: transparent;
    }

/* Content area */
.kido-content {
    font-family: 'Arrancar', sans-serif;
    color: #fff;
    padding: 18px 22px 24px;
    overflow: auto;
    max-height: calc(150vh - 80px); /* keep within viewport */
    line-height: 1.35;
}

    .kido-content h2 {
        margin: 0 0 10px 0;
        font-size: 3.0rem;
        text-shadow: 2px 2px 5px rgba(0,0,0,0.8), -2px -2px 5px rgba(255,255,255,0.5);
    }

    .kido-content p, .kido-content li {
        font-size: 1.2rem;
        font-family: 'Times New Roman', Times, serif;
        line-height: 1.45;
    }

/* Make sure it layers above race images & tree box */
.kido-panel {
    width: min(1210px, 88vw); /* was 1100px / 80vw */
    min-height: 120vh; /* was 45vh */
    max-height: 150vh; /* was 70vh */
}




/*end kido systems*/

.lore-shelf {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-wrap: wrap; /* wrap on small screens */
    gap: 6px;
    align-items: flex-end;
    justify-content: center;
    max-width: 90vw;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 20;
}

    .lore-shelf.visible {
        opacity: 1;
    }

/* each book + caption */
.lore-book-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lore-book {
    height: 420px; /* tweak as you like */
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,0.6));
    opacity: 0.5;
    transition: opacity 200ms ease, transform 200ms ease;
    cursor: pointer;
    pointer-events: auto;
}

    .lore-book:hover {
        opacity: 1;
        transform: translateY(-4px);
    }

.lore-book-caption {
    margin-top: 8px;
    font-family: 'Arrancar', sans-serif;
    font-size: 1.6rem;
    color: white;
    text-shadow: 2px 2px 5px rgba(0,0,0,.8), -2px -2px 5px rgba(255,255,255,.5);
}

#lore-panel {
    margin-top: 22px;
}

    #lore-panel .systems-content .kido-content {
        min-height: 240px;
    }

.map-page {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: min(1800px, 96vw);
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 40px;
    overflow: visible;
    z-index: 1700;
    pointer-events: none;
}

.map-page-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    pointer-events: none;
}

.map-page-title {
    margin: 0;
    font-family: 'Arrancar', sans-serif;
    font-size: clamp(2.8rem, 4vw, 4.4rem);
    color: white;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.8), -2px -2px 5px rgba(255,255,255,0.5);
}

.map-page-subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-family: "Times New Roman", Times, serif;
    font-size: clamp(1rem, 1.2vw, 1.3rem);
    letter-spacing: 0.04em;
}

.map-realm-tabs {
    margin-top: 8px;
    justify-content: center;
    flex-wrap: wrap;
    background: transparent;
    border-bottom: 0;
    padding: 0;
    pointer-events: auto;
}

.map-realm-tab {
    font-family: 'Arrancar', sans-serif;
    font-size: 1.15rem;
    pointer-events: auto;
}

.map-stage {
    position: relative;
    width: 100%;
    height: clamp(460px, 50vh, 620px);
    background:
        radial-gradient(circle at top, rgba(255,255,255,0.08), transparent 55%),
        rgba(8, 8, 8, 0.75);
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    pointer-events: auto;
}

.map-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), transparent 20%, transparent 80%, rgba(255,255,255,0.03));
    pointer-events: none;
}

.map-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.map-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
    font-family: 'Arrancar', sans-serif;
    font-size: clamp(1.6rem, 2vw, 2.2rem);
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 2px 2px 5px rgba(0,0,0,0.8);
    pointer-events: none;
}

.map-loading.hidden {
    display: none;
}

.map-zone-label {
    position: absolute;
    left: 0;
    top: 0;
    transform: translate(-50%, -50%);
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(0, 0, 0, 0.72);
    color: white;
    font-family: 'Arrancar', sans-serif;
    font-size: clamp(1.4rem, 2vw, 2rem);
    letter-spacing: 0.04em;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.75);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 160ms ease, transform 160ms ease;
    pointer-events: none;
    z-index: 2;
}

.map-zone-label.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.02);
}

.map-info-panel {
    min-height: 520px;
    padding: 24px 28px;
    background: rgba(0, 0, 0, 0.65);
    border: 2px solid #fff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: white;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto;
    margin-top: 10px;
}

.map-info-kicker {
    margin: 0 0 8px 0;
    font-family: 'Arrancar', sans-serif;
    font-size: 1.35rem;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.72);
}

.map-info-title {
    margin: 0 0 12px 0;
    font-family: 'Arrancar', sans-serif;
    font-size: clamp(2.2rem, 3vw, 3rem);
    text-shadow: 2px 2px 5px rgba(0,0,0,0.8), -2px -2px 5px rgba(255,255,255,0.35);
}

.map-info-copy {
    margin: 0 0 14px 0;
    font-family: "Times New Roman", Times, serif;
    font-size: 1.25rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.86);
}

.map-info-note {
    margin: 0;
    font-family: "Times New Roman", Times, serif;
    font-size: 1rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.64);
    letter-spacing: 0.03em;
}

.map-info-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding-right: 8px;
}

.map-info-tabs {
    flex-wrap: wrap;
    margin: 4px 0 16px;
    background: transparent;
    border-bottom: 0;
    padding: 0;
}

.map-info-tab {
    font-family: 'Arrancar', sans-serif;
    font-size: 1.05rem;
}

.map-info-sections {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.map-info-section {
    border-top: 2px solid rgba(255, 255, 255, 0.8);
    border-bottom: 2px solid rgba(255, 255, 255, 0.8);
}

.map-info-summary {
    cursor: pointer;
    list-style: none;
    padding: 10px 0;
    font-family: 'Arrancar', sans-serif;
    font-size: 1.6rem;
    color: white;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.75);
}

.map-info-summary::-webkit-details-marker {
    display: none;
}

.map-info-summary::before {
    content: "+";
    display: inline-block;
    width: 22px;
}

.map-info-section[open] .map-info-summary::before {
    content: "-";
}

.map-info-block {
    margin: 0 0 14px 0;
    font-family: "Times New Roman", Times, serif;
    font-size: 1.05rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.86);
}

.map-info-block:last-child {
    margin-bottom: 0;
}

.map-info-label {
    display: block;
    margin-bottom: 4px;
    font-family: 'Arrancar', sans-serif;
    font-size: 1.15rem;
    letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.68);
}

.map-info-list {
    margin: 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: rgba(255, 255, 255, 0.86);
    font-family: "Times New Roman", Times, serif;
    font-size: 1.05rem;
    line-height: 1.5;
}

.map-info-empty {
    margin: 0;
    font-family: "Times New Roman", Times, serif;
    font-size: 1.15rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
}

.faction-selection-screen,
.faction-detail-page {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: min(1780px, 96vw);
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-bottom: 48px;
    overflow: visible;
    z-index: 1700;
}

.faction-selection-header,
.faction-detail-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.faction-selection-header {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.faction-selection-title,
.faction-detail-title {
    margin: 0;
    font-family: 'Arrancar', sans-serif;
    font-size: clamp(2.8rem, 4vw, 4.4rem);
    color: white;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.8), -2px -2px 5px rgba(255,255,255,0.5);
}

.faction-selection-subtitle,
.faction-detail-subtitle {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-family: "Times New Roman", Times, serif;
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    letter-spacing: 0.03em;
}

.faction-detail-kicker,
.faction-panel-kicker {
    margin: 0 0 8px;
    font-family: 'Arrancar', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.66);
}

.faction-selection-wheel {
    position: relative;
    width: min(980px, 100%);
    height: 760px;
    margin: 20px auto 0;
}

.faction-selector-button {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 230px;
    border: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    color: white;
    transition: transform 0.22s ease, filter 0.22s ease, opacity 0.22s ease;
}

.faction-selector-button:hover {
    transform: translate(-50%, -50%) scale(1.05);
}

.faction-selector-image,
.faction-selector-fallback {
    width: 190px;
    height: 190px;
    border: 0;
    background: transparent;
    object-fit: contain;
    padding: 0;
    opacity: 0.62;
    transition: opacity 0.22s ease, transform 0.22s ease, filter 0.22s ease;
    filter: drop-shadow(0 10px 24px rgba(0,0,0,0.4));
}

.faction-selector-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Arrancar', sans-serif;
    font-size: 3rem;
    letter-spacing: 0.08em;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.72), -2px -2px 5px rgba(255,255,255,0.3);
}

.faction-selector-fallback.hidden {
    display: none;
}

.faction-selector-label {
    max-width: 220px;
    text-align: center;
    font-family: 'Arrancar', sans-serif;
    font-size: 1.35rem;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.94);
    text-shadow: 2px 2px 5px rgba(0,0,0,0.72);
    transition: opacity 0.22s ease, transform 0.22s ease, background 0.22s ease;
    opacity: 0.85;
    padding: 4px 10px;
    border-radius: 8px;
}

.faction-selector-button:hover .faction-selector-image,
.faction-selector-button:hover .faction-selector-fallback {
    opacity: 1;
    transform: scale(1.05);
    filter: drop-shadow(0 0 26px rgba(255, 238, 173, 0.3));
}

.faction-selector-button:hover .faction-selector-label {
    opacity: 1;
    transform: translateY(-2px);
    background: rgba(51, 51, 51, 0.65);
    outline: 2px solid black;
}

.faction-change-button {
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    color: white;
    font-family: 'Arrancar', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.05em;
    padding: 12px 18px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.faction-change-button:hover {
    background: rgba(255,255,255,0.14);
    transform: translateY(-1px);
}

.faction-detail-top {
    display: grid;
    grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1.1fr);
    gap: 18px;
}

.faction-column-panel,
.faction-bottom-panel {
    background: rgba(0, 0, 0, 0.66);
    border: 2px solid #fff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    overflow: hidden;
}

.faction-column-panel {
    min-height: 720px;
}

.faction-panel-scroll,
.faction-bottom-body {
    min-height: 0;
    max-height: 100%;
    overflow: auto;
    padding: 22px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faction-panel-title,
.faction-bottom-title {
    margin: 0;
    font-family: 'Arrancar', sans-serif;
    font-size: clamp(2rem, 2.6vw, 2.8rem);
    color: white;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.75);
}

.faction-panel-subtitle,
.faction-panel-copy,
.faction-section-copy,
.faction-empty,
.faction-trait-value,
.faction-note-panel p,
.faction-talent-copy,
.faction-bottom-card p {
    margin: 0;
    font-family: "Times New Roman", Times, serif;
    font-size: 1.05rem;
    line-height: 1.55;
    color: rgba(255,255,255,0.88);
}

.faction-portrait,
.faction-emblem-frame {
    position: relative;
    min-height: 340px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.16);
    background:
        radial-gradient(circle at top, rgba(255,255,255,0.1), transparent 52%),
        rgba(10, 10, 10, 0.9);
}

.faction-portrait-image,
.faction-emblem-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.faction-emblem-image {
    object-fit: contain;
    padding: 30px;
}

.faction-portrait-fallback,
.faction-emblem-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    padding: 18px;
}

.faction-portrait-fallback.hidden,
.faction-emblem-fallback.hidden {
    display: none;
}

.faction-portrait-kicker {
    font-family: 'Arrancar', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.62);
}

.faction-portrait-fallback strong,
.faction-emblem-fallback strong {
    font-family: 'Arrancar', sans-serif;
    font-size: 3.4rem;
    color: white;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.7);
}

.faction-leader-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faction-trait-list,
.faction-info-section,
.faction-bottom-card,
.faction-talent-card,
.faction-note-panel {
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 18px;
    background: rgba(255,255,255,0.03);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.faction-trait-row {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.faction-trait-row:last-child {
    border-bottom: 0;
}

.faction-trait-label,
.faction-section-title,
.faction-talent-name,
.faction-bottom-card h4,
.faction-note-panel summary {
    display: block;
    margin: 0 0 6px 0;
    font-family: 'Arrancar', sans-serif;
    font-size: 1.12rem;
    letter-spacing: 0.04em;
    color: rgba(255,255,255,0.92);
}

.faction-info-section,
.faction-bottom-card {
    padding: 16px;
}

.faction-note-panel {
    padding: 0;
}

.faction-note-panel summary {
    cursor: pointer;
    list-style: none;
    padding: 14px 16px 0;
}

.faction-note-panel p {
    padding: 0 16px 16px;
}

.faction-note-panel summary::-webkit-details-marker {
    display: none;
}

.faction-talent-list,
.faction-bottom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.faction-talent-card {
    padding: 16px;
}

.faction-talent-meta {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-family: "Times New Roman", Times, serif;
    font-size: 0.98rem;
    color: rgba(255,255,255,0.7);
}

.faction-bottom-header {
    padding: 20px 24px 0;
}

.faction-bottom-tabs {
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 24px 0;
    padding: 0;
    background: transparent;
    border-bottom: 0;
}

.faction-bottom-tab {
    font-family: 'Arrancar', sans-serif;
    font-size: 1rem;
    background: transparent;
}

.faction-empty {
    color: rgba(255,255,255,0.72);
}

@media (max-width: 980px) {
    .map-page {
        width: 96vw;
        display: flex;
        flex-direction: column;
        gap: 12px;
        overflow: visible;
    }

    .map-stage {
        height: clamp(360px, 48vh, 560px);
    }

    .map-info-panel {
        padding: 18px 20px;
        min-height: 360px;
    }

    .map-zone-label {
        font-size: clamp(1rem, 3.6vw, 1.35rem);
        padding: 8px 12px;
    }

    .faction-selection-screen,
    .faction-detail-page {
        width: 96vw;
    }

    .faction-selection-header,
    .faction-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .faction-selection-wheel {
        height: auto;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 12px;
        margin-top: 18px;
    }

    .faction-selector-button {
        position: relative;
        left: auto !important;
        top: auto !important;
        transform: none;
        width: 100%;
    }

    .faction-selector-button:hover {
        transform: scale(1.02);
    }

    .faction-detail-top {
        grid-template-columns: 1fr;
    }

    .faction-column-panel {
        min-height: 560px;
    }

    .faction-portrait,
    .faction-emblem-frame {
        min-height: 260px;
    }
}

/* Import Arrancar and Bleach fonts */
@font-face {
    font-family: 'Arrancar';
    src: url('Arrancar.ttf') format('truetype');
}

@font-face {
    font-family: 'FontBleach';
    src: url('FontBleach.ttf') format('truetype');
}

/* Fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade-out animation */
@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* Drift-Up animation */
@keyframes driftUp {
    from {
        transform: translate(-50%, 0); /* Start in place */
        opacity: 1;
    }

    to {
        transform: translate(-50%, -30px); /* Move to top */
        opacity: 1;
    }
}



#selection-layout {
    position: fixed;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: 700px 260px 700px;
    align-items: start;
    gap: 40px;
    pointer-events: none;
}

.selection-column {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.name-column {
    justify-content: flex-start;
}

    .name-column .race-name {
        font-size: 48px;
        margin-top: 0;
        white-space: nowrap;
    }

.image-column img {
    max-height: 1400px;
    width: auto;
    object-fit: contain;
}



/* =========================================================
   Selection Panel (Races / Types / Subraces)
   Goal:
   - Keep the panel where it was before (centered)
   - Fix the 'tiny inner scrollbox' by using flex + a proper scroll region
   ========================================================= */

.selection-panel.systems-panel {
    /* do NOT pin to viewport edges (that was causing it to jump upward) */
    position: relative;
    width: min(1210px, 88vw);
    top: 55vh;
    min-height: 45vh;
    max-height: 70vh;
    z-index: 1600;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* keep the rounded corners clean */
    pointer-events: auto;
}

    .selection-panel.systems-panel .systems-tabs {
        flex: 0 0 auto;
    }

    .selection-panel.systems-panel .systems-content {
        flex: 1 1 auto;
        min-height: 0; /* CRITICAL: lets the scroll area size correctly */
        overflow: auto;
        max-height: none;
    }

body.has-selection-panel {
    padding-bottom: 0;
}

/* Hollow -> Arrancar toggle (beside the name on the Hollow page) */
.name-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 18px;
    pointer-events: auto;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 78px;
    height: 40px;
    pointer-events: auto;
}

    .toggle-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    transition: 0.2s;
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}

    .toggle-slider:before {
        position: absolute;
        content: "";
        height: 30px;
        width: 30px;
        left: 5px;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(255, 255, 255, 0.88);
        border-radius: 50%;
        transition: 0.2s;
    }

.toggle-switch input:checked + .toggle-slider {
    background: rgba(255, 255, 255, 0.28);
}

    .toggle-switch input:checked + .toggle-slider:before {
        transform: translate(36px, -50%);
    }


