/* =====================================================================
   SHADOWSKINGS - RACE SELECTION
   BLOODLINE CHAMBER
===================================================================== */


/* =====================================================================
   ROOT PANEL
===================================================================== */

#race-selection-panel {
    position: fixed;
    inset: 0;

    width: 100%;
    height: 100%;

    overflow-y: auto;
    overflow-x: hidden;

    box-sizing: border-box;

    background:
        radial-gradient(
            circle at 50% -10%,
            rgba(108, 62, 190, 0.28) 0%,
            rgba(34, 18, 67, 0.18) 28%,
            rgba(7, 6, 14, 0.96) 68%,
            #030307 100%
        );

    color: #eee9f8;

    font-family:
        "Cinzel",
        Georgia,
        serif;

    -webkit-overflow-scrolling: touch;
}


#race-selection-panel,
#race-selection-panel * {
    box-sizing: border-box;
}


/* =====================================================================
   BACKGROUND ATMOSPHERE
===================================================================== */

#race-selection-panel::before {
    content: "";

    position: fixed;
    inset: 0;

    pointer-events: none;

    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.55),
            transparent 24%,
            transparent 76%,
            rgba(0, 0, 0, 0.55)
        ),
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent 79px,
            rgba(255, 255, 255, 0.012) 80px
        );

    z-index: 0;
}


#race-selection-panel::after {
    content: "";

    position: fixed;
    inset: 0;

    pointer-events: none;

    box-shadow:
        inset 0 0 180px rgba(0, 0, 0, 0.9);

    z-index: 0;
}


/* =====================================================================
   MAIN SHELL
===================================================================== */

.race-selection-shell {
    position: relative;

    z-index: 1;

    width: min(1760px, calc(100% - 48px));

    min-height: calc(100vh - 48px);

    margin: 24px auto;

    border:
        1px solid rgba(165, 125, 232, 0.26);

    background:
        linear-gradient(
            145deg,
            rgba(17, 13, 27, 0.97),
            rgba(7, 7, 13, 0.98)
        );

    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.75),
        0 0 45px rgba(113, 63, 190, 0.18),
        inset 0 0 80px rgba(120, 78, 190, 0.035);

    overflow: hidden;
}


/* =====================================================================
   HEADER
===================================================================== */

.race-selection-header {
    display: grid;

    grid-template-columns:
        minmax(60px, 1fr)
        auto
        minmax(60px, 1fr);

    align-items: center;

    gap: 30px;

    padding: 28px 42px 24px;

    border-bottom:
        1px solid rgba(171, 135, 225, 0.16);

    background:
        linear-gradient(
            180deg,
            rgba(52, 31, 82, 0.25),
            rgba(9, 8, 15, 0.2)
        );
}


.race-header-rule {
    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(182, 144, 237, 0.55)
        );
}


.race-header-rule:last-child {
    transform: scaleX(-1);
}


.race-header-copy {
    text-align: center;
}


.race-eyebrow {
    margin-bottom: 7px;

    color: #a984dc;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 0.42em;
}


.race-selection-title {
    margin: 0;

    color: #f2edf8;

    font-size: clamp(30px, 3vw, 48px);
    font-weight: 600;

    letter-spacing: 0.06em;

    text-shadow:
        0 0 22px rgba(159, 107, 230, 0.32);
}


.race-selection-subtitle {
    max-width: 650px;

    margin:
        9px auto 0;

    color: #a9a0b6;

    font-family:
        Georgia,
        serif;

    font-size: 14px;
    line-height: 1.55;
}


/* =====================================================================
   MAIN CHAMBER
===================================================================== */

.race-selection-chamber {
    display: grid;

    grid-template-columns:
        minmax(230px, 0.78fr)
        minmax(380px, 1.35fr)
        minmax(300px, 1fr);

    min-height: 660px;
}


/* =====================================================================
   SHARED SECTION HEADINGS
===================================================================== */

.race-section-heading {
    padding:
        22px 22px 18px;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.07);
}


.race-section-kicker {
    display: block;

    margin-bottom: 5px;

    color: #80669e;

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 0.28em;
}


.race-section-heading h2,
.race-military-heading h2 {
    margin: 0;

    color: #e7deef;

    font-size: 18px;
    font-weight: 500;

    letter-spacing: 0.07em;
}


/* =====================================================================
   LEFT - BLOODLINE BROWSER
===================================================================== */

.race-browser {
    display: flex;

    flex-direction: column;

    min-width: 0;

    border-right:
        1px solid rgba(160, 122, 214, 0.14);

    background:
        linear-gradient(
            180deg,
            rgba(13, 11, 21, 0.98),
            rgba(8, 8, 13, 0.98)
        );
}


/* =====================================================================
   SEARCH
===================================================================== */

.race-search-wrapper {
    padding:
        16px 18px 12px;
}


.race-search {
    width: 100%;

    border:
        1px solid rgba(150, 112, 202, 0.28);

    border-radius: 4px;

    outline: none;

    padding:
        11px 13px;

    background:
        rgba(0, 0, 0, 0.28);

    color: #ddd5e8;

    font-family:
        Georgia,
        serif;

    font-size: 13px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


.race-search::placeholder {
    color: #71697b;
}


.race-search:focus {
    border-color:
        rgba(170, 126, 232, 0.68);

    background:
        rgba(18, 11, 28, 0.65);

    box-shadow:
        0 0 18px rgba(126, 75, 194, 0.14);
}


/* =====================================================================
   BLOODLINE LIST
===================================================================== */

.race-list {
    flex: 1;

    min-height: 0;

    max-height: 520px;

    overflow-y: auto;

    padding:
        5px 10px 12px;

    scrollbar-width: thin;
    scrollbar-color:
        rgba(137, 96, 190, 0.6)
        rgba(0, 0, 0, 0.2);
}


.race-list::-webkit-scrollbar {
    width: 6px;
}


.race-list::-webkit-scrollbar-track {
    background:
        rgba(0, 0, 0, 0.2);
}


.race-list::-webkit-scrollbar-thumb {
    border-radius: 10px;

    background:
        rgba(137, 96, 190, 0.55);
}


.race-nav-entry {
    position: relative;

    width: 100%;

    margin-bottom: 4px;

    border: 1px solid transparent;
    border-radius: 3px;

    padding:
        11px 12px 10px 16px;

    background:
        transparent;

    color: #9d95a7;

    text-align: left;

    font-family:
        "Cinzel",
        Georgia,
        serif;

    font-size: 12px;

    letter-spacing: 0.055em;

    cursor: pointer;

    transition:
        color 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease,
        padding-left 0.18s ease;
}


.race-nav-entry::before {
    content: "";

    position: absolute;

    left: 4px;
    top: 50%;

    width: 3px;
    height: 0;

    transform:
        translateY(-50%);

    background:
        #a779dc;

    box-shadow:
        0 0 10px rgba(167, 121, 220, 0.8);

    transition:
        height 0.18s ease;
}


.race-nav-entry:hover {
    padding-left: 20px;

    color: #ddd5e6;

    background:
        rgba(127, 84, 179, 0.08);
}


.race-nav-entry.active {
    padding-left: 20px;

    border-color:
        rgba(154, 111, 211, 0.24);

    background:
        linear-gradient(
            90deg,
            rgba(123, 75, 181, 0.2),
            rgba(85, 54, 125, 0.05)
        );

    color: #f0e9f7;
}


.race-nav-entry.active::before {
    height: 65%;
}


.race-loading,
.race-empty {
    padding: 35px 16px;

    color: #81788a;

    text-align: center;

    font-family:
        Georgia,
        serif;

    font-size: 13px;
}


/* =====================================================================
   COUNT
===================================================================== */

.race-browser-count {
    padding:
        13px 18px;

    border-top:
        1px solid rgba(255, 255, 255, 0.06);

    color: #796f83;

    font-size: 10px;

    letter-spacing: 0.12em;

    text-align: center;
}


#race-visible-count {
    color: #b99bd8;
}


.race-count-divider {
    margin:
        0 4px;

    opacity: 0.4;
}


.race-count-label {
    margin-left: 6px;
}


/* =====================================================================
   CENTER SHOWCASE
===================================================================== */

.race-showcase {
    position: relative;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    min-width: 0;

    padding:
        30px 32px 24px;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 50% 38%,
            rgba(95, 53, 145, 0.17),
            transparent 44%
        ),
        linear-gradient(
            180deg,
            rgba(14, 11, 23, 0.94),
            rgba(6, 6, 11, 0.98)
        );
}


.race-showcase-atmosphere {
    position: absolute;

    width: 500px;
    height: 500px;

    top: 48%;
    left: 50%;

    transform:
        translate(-50%, -50%);

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(129, 76, 192, 0.12),
            rgba(62, 33, 93, 0.04) 46%,
            transparent 70%
        );

    filter: blur(10px);

    pointer-events: none;
}


/* =====================================================================
   PORTRAIT STAGE
===================================================================== */

.race-portrait-stage {
    position: relative;

    z-index: 1;

    width: min(100%, 430px);
}


.race-selected-portrait-frame {
    position: relative;

    width: 100%;

    aspect-ratio: 0.78;

    max-height: 470px;

    overflow: hidden;

    border:
        1px solid rgba(180, 144, 225, 0.42);

    background:
        #050509;

    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.7),
        0 0 35px rgba(118, 68, 180, 0.2),
        inset 0 0 30px rgba(0, 0, 0, 0.7);
}


.race-selected-portrait-frame::before,
.race-selected-portrait-frame::after {
    content: "";

    position: absolute;

    z-index: 5;

    width: 36px;
    height: 36px;

    pointer-events: none;
}


.race-selected-portrait-frame::before {
    left: 8px;
    top: 8px;

    border-left:
        1px solid rgba(216, 188, 246, 0.65);

    border-top:
        1px solid rgba(216, 188, 246, 0.65);
}


.race-selected-portrait-frame::after {
    right: 8px;
    bottom: 8px;

    border-right:
        1px solid rgba(216, 188, 246, 0.65);

    border-bottom:
        1px solid rgba(216, 188, 246, 0.65);
}


.race-portrait-glow {
    position: absolute;

    inset: -30px;

    z-index: 0;

    background:
        radial-gradient(
            circle,
            rgba(139, 79, 202, 0.3),
            transparent 66%
        );

    pointer-events: none;
}


.race-selected-portrait {
    position: relative;

    z-index: 1;

    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center top;

    opacity: 0;

    transform:
        scale(1.025);

    transition:
        opacity 0.28s ease,
        transform 0.5s ease;
}


.race-selected-portrait.loaded {
    opacity: 1;

    transform:
        scale(1);
}


.race-portrait-vignette {
    position: absolute;

    inset: 0;

    z-index: 2;

    pointer-events: none;

    background:
        linear-gradient(
            180deg,
            transparent 52%,
            rgba(4, 4, 8, 0.82) 100%
        ),
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.25),
            transparent 15%,
            transparent 85%,
            rgba(0, 0, 0, 0.25)
        );
}


.race-portrait-ornament {
    display: flex;

    align-items: center;

    justify-content: center;

    height: 16px;
}


.race-portrait-ornament::before,
.race-portrait-ornament::after {
    content: "";

    width: 80px;
    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(170, 128, 222, 0.5)
        );
}


.race-portrait-ornament::after {
    transform:
        scaleX(-1);
}


.race-portrait-ornament span {
    width: 6px;
    height: 6px;

    margin:
        0 9px;

    border:
        1px solid rgba(189, 151, 234, 0.65);

    transform:
        rotate(45deg);
}


/* =====================================================================
   SELECTED IDENTITY
===================================================================== */

.race-selected-identity {
    position: relative;

    z-index: 2;

    width: 100%;

    margin-top: 12px;

    text-align: center;
}


.race-selected-index {
    color: #7d668f;

    font-size: 9px;

    letter-spacing: 0.3em;
}


.race-selected-name {
    margin:
        5px 0 4px;

    color: #f2eaf8;

    font-size: clamp(25px, 2.2vw, 38px);
    font-weight: 500;

    letter-spacing: 0.055em;

    text-shadow:
        0 0 20px rgba(153, 101, 212, 0.3);
}


.race-selected-tagline {
    min-height: 22px;

    color: #aaa0b3;

    font-family:
        Georgia,
        serif;

    font-size: 13px;
    font-style: italic;

    line-height: 1.5;
}


/* =====================================================================
   PREVIOUS / NEXT
===================================================================== */

.race-cycle-controls {
    position: relative;

    z-index: 2;

    display: grid;

    grid-template-columns:
        1fr auto 1fr;

    align-items: center;

    gap: 14px;

    width: min(100%, 430px);

    margin-top: 18px;
}


.race-cycle-btn {
    border:
        1px solid rgba(139, 104, 183, 0.25);

    border-radius: 3px;

    padding:
        9px 12px;

    background:
        rgba(21, 16, 29, 0.7);

    color: #95899f;

    font-family:
        "Cinzel",
        Georgia,
        serif;

    font-size: 10px;

    letter-spacing: 0.08em;

    cursor: pointer;

    transition:
        color 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease;
}


.race-cycle-btn:hover {
    border-color:
        rgba(171, 127, 225, 0.5);

    background:
        rgba(83, 51, 119, 0.18);

    color: #e2d8eb;
}


#race-prev {
    text-align: left;
}


#race-next {
    text-align: right;
}


.race-cycle-symbol {
    margin:
        0 5px;

    color: #b78ddd;
}


.race-cycle-marker {
    color: #766b7e;

    font-size: 10px;

    letter-spacing: 0.08em;
}


#race-current-number {
    color: #c2a6dd;
}


.race-cycle-slash {
    margin:
        0 3px;

    opacity: 0.45;
}


/* =====================================================================
   RIGHT DOSSIER
===================================================================== */

.race-dossier {
    display: flex;

    flex-direction: column;

    min-width: 0;

    border-left:
        1px solid rgba(160, 122, 214, 0.14);

    background:
        linear-gradient(
            180deg,
            rgba(12, 10, 19, 0.98),
            rgba(7, 7, 12, 0.98)
        );
}


.race-dossier-scroll {
    flex: 1;

    max-height: 575px;

    overflow-y: auto;

    padding:
        8px 22px 22px;

    scrollbar-width: thin;

    scrollbar-color:
        rgba(137, 96, 190, 0.5)
        rgba(0, 0, 0, 0.2);
}


.race-dossier-section {
    padding:
        18px 0;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.06);
}


.race-dossier-section:last-child {
    border-bottom: 0;
}


.race-dossier-title {
    margin-bottom: 10px;

    color: #bd9ddb;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 0.18em;

    text-transform: uppercase;
}


.race-description {
    margin: 0;

    color: #b3aab9;

    font-family:
        Georgia,
        serif;

    font-size: 13px;
    line-height: 1.72;
}


/* =====================================================================
   ABILITIES / TRAITS
===================================================================== */

.race-feature-list {
    display: flex;

    flex-direction: column;

    gap: 7px;
}


.race-feature-entry {
    position: relative;

    padding:
        8px 9px 8px 17px;

    border:
        1px solid rgba(148, 110, 193, 0.12);

    background:
        rgba(74, 45, 105, 0.07);

    color: #bdb3c5;

    font-family:
        Georgia,
        serif;

    font-size: 12px;
    line-height: 1.45;
}


.race-feature-entry::before {
    content: "";

    position: absolute;

    left: 7px;
    top: 13px;

    width: 3px;
    height: 3px;

    transform:
        rotate(45deg);

    background:
        #a577ce;

    box-shadow:
        0 0 6px rgba(165, 119, 206, 0.5);
}


.race-feature-empty {
    color: #746b7c;

    font-family:
        Georgia,
        serif;

    font-size: 12px;
    font-style: italic;
}


/* =====================================================================
   RESOURCES
===================================================================== */

.race-resource-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 7px;
}


.race-resource-entry {
    padding:
        9px 10px;

    border:
        1px solid rgba(149, 111, 194, 0.13);

    background:
        rgba(0, 0, 0, 0.18);
}


.race-resource-name {
    display: block;

    margin-bottom: 3px;

    color: #7e7486;

    font-size: 8px;

    letter-spacing: 0.13em;

    text-transform: uppercase;
}


.race-resource-value {
    color: #d4c7df;

    font-family:
        Georgia,
        serif;

    font-size: 14px;
}


/* =====================================================================
   MILITARY DOCTRINE
===================================================================== */

.race-military-section {
    padding:
        22px 28px 26px;

    border-top:
        1px solid rgba(162, 122, 214, 0.14);

    border-bottom:
        1px solid rgba(162, 122, 214, 0.14);

    background:
        linear-gradient(
            180deg,
            rgba(14, 11, 21, 0.96),
            rgba(8, 7, 12, 0.98)
        );
}


.race-military-heading {
    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 16px;
}


.race-troop-count {
    color: #766b7f;

    font-size: 9px;

    letter-spacing: 0.16em;
}


.race-troop-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 10px;
}


.race-troop-entry {
    position: relative;

    min-height: 98px;

    padding:
        14px;

    overflow: hidden;

    border:
        1px solid rgba(151, 111, 201, 0.16);

    background:
        linear-gradient(
            145deg,
            rgba(44, 28, 61, 0.18),
            rgba(8, 8, 13, 0.55)
        );
}


.race-troop-entry::after {
    content: "";

    position: absolute;

    right: -25px;
    bottom: -25px;

    width: 70px;
    height: 70px;

    border:
        1px solid rgba(161, 119, 210, 0.08);

    transform:
        rotate(45deg);
}


.race-troop-tier {
    margin-bottom: 7px;

    color: #796887;

    font-size: 8px;

    letter-spacing: 0.16em;

    text-transform: uppercase;
}


.race-troop-name {
    margin-bottom: 6px;

    color: #d9cee3;

    font-size: 13px;

    letter-spacing: 0.04em;
}


.race-troop-description {
    color: #8e8495;

    font-family:
        Georgia,
        serif;

    font-size: 11px;
    line-height: 1.45;
}


.race-troop-empty {
    grid-column:
        1 / -1;

    padding: 20px;

    border:
        1px solid rgba(255, 255, 255, 0.05);

    color: #716978;

    font-family:
        Georgia,
        serif;

    text-align: center;
}


/* =====================================================================
   FOOTER
===================================================================== */

.race-selection-footer {
    display: grid;

    grid-template-columns:
        1fr auto 1fr;

    align-items: center;

    gap: 25px;

    padding:
        22px 28px 26px;

    background:
        rgba(5, 5, 9, 0.98);
}


.race-back-btn {
    justify-self: start;

    min-width: 110px;

    border:
        1px solid rgba(139, 109, 172, 0.26);

    border-radius: 3px;

    padding:
        11px 18px;

    background:
        rgba(20, 17, 25, 0.85);

    color: #94899e;

    font-family:
        "Cinzel",
        Georgia,
        serif;

    font-size: 11px;

    letter-spacing: 0.09em;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        color 0.2s ease,
        background 0.2s ease;
}


.race-back-btn:hover {
    border-color:
        rgba(177, 135, 220, 0.5);

    background:
        rgba(54, 36, 70, 0.4);

    color: #ded5e6;
}


.race-commit-area {
    text-align: center;
}


.race-selection-status {
    min-height: 17px;

    margin-bottom: 9px;

    color: #7f7587;

    font-family:
        Georgia,
        serif;

    font-size: 11px;
}


.race-selection-status.error {
    color: #c98787;
}


.race-selection-status.success {
    color: #9fc5a2;
}


/* =====================================================================
   CLAIM BUTTON
===================================================================== */

.race-claim-btn {
    position: relative;

    min-width: 300px;

    border:
        1px solid rgba(190, 148, 232, 0.58);

    border-radius: 3px;

    padding:
        10px 34px 12px;

    overflow: hidden;

    background:
        linear-gradient(
            180deg,
            rgba(104, 62, 148, 0.7),
            rgba(55, 33, 79, 0.85)
        );

    color: #f0e8f7;

    font-family:
        "Cinzel",
        Georgia,
        serif;

    cursor: pointer;

    box-shadow:
        0 0 20px rgba(130, 78, 185, 0.15),
        inset 0 1px rgba(255, 255, 255, 0.08);

    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}


.race-claim-btn::before {
    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            100deg,
            transparent 30%,
            rgba(255, 255, 255, 0.07) 50%,
            transparent 70%
        );

    transform:
        translateX(-120%);

    transition:
        transform 0.5s ease;
}


.race-claim-btn:hover:not(:disabled) {
    transform:
        translateY(-2px);

    border-color:
        rgba(217, 181, 249, 0.9);

    background:
        linear-gradient(
            180deg,
            rgba(127, 76, 177, 0.85),
            rgba(66, 39, 94, 0.95)
        );

    box-shadow:
        0 0 28px rgba(142, 85, 200, 0.3),
        inset 0 1px rgba(255, 255, 255, 0.1);
}


.race-claim-btn:hover:not(:disabled)::before {
    transform:
        translateX(120%);
}


.race-claim-btn:disabled {
    border-color:
        rgba(120, 105, 132, 0.16);

    background:
        rgba(30, 26, 34, 0.6);

    color: #625b67;

    cursor: default;

    box-shadow: none;
}


.race-claim-small {
    display: block;

    margin-bottom: 3px;

    font-size: 7px;

    letter-spacing: 0.28em;

    opacity: 0.65;
}


.race-claim-main {
    display: block;

    font-size: 14px;

    letter-spacing: 0.1em;
}


/* =====================================================================
   CONFIRMATION OVERLAY
===================================================================== */

.race-confirm-overlay {
    position: fixed;

    inset: 0;

    z-index: 99999;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 20px;

    background:
        rgba(2, 2, 5, 0.88);

    backdrop-filter:
        blur(8px);

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
}


.race-confirm-overlay.open {
    opacity: 1;

    visibility: visible;

    pointer-events: auto;
}


.race-confirm-dialog {
    width: min(480px, 100%);

    padding:
        34px;

    border:
        1px solid rgba(184, 141, 229, 0.42);

    background:
        linear-gradient(
            145deg,
            rgba(27, 19, 36, 0.99),
            rgba(8, 7, 12, 0.99)
        );

    box-shadow:
        0 35px 100px rgba(0, 0, 0, 0.85),
        0 0 40px rgba(128, 73, 184, 0.2);

    text-align: center;
}


.race-confirm-kicker {
    margin-bottom: 9px;

    color: #9c78bd;

    font-size: 9px;

    letter-spacing: 0.32em;
}


.race-confirm-dialog h2 {
    margin:
        0 0 12px;

    color: #eee6f5;

    font-size: 25px;

    font-weight: 500;
}


.race-confirm-dialog p {
    margin:
        0 auto 26px;

    max-width: 360px;

    color: #a69dac;

    font-family:
        Georgia,
        serif;

    font-size: 13px;
    line-height: 1.6;
}


.race-confirm-actions {
    display: flex;

    justify-content: center;

    gap: 12px;
}


.race-confirm-cancel,
.race-confirm-accept {
    min-width: 145px;

    border-radius: 3px;

    padding:
        11px 16px;

    font-family:
        "Cinzel",
        Georgia,
        serif;

    font-size: 10px;

    letter-spacing: 0.08em;

    cursor: pointer;
}


.race-confirm-cancel {
    border:
        1px solid rgba(139, 116, 156, 0.3);

    background:
        rgba(20, 18, 24, 0.9);

    color: #9d939f;
}


.race-confirm-accept {
    border:
        1px solid rgba(191, 149, 232, 0.62);

    background:
        linear-gradient(
            180deg,
            rgba(108, 64, 150, 0.9),
            rgba(61, 36, 86, 0.95)
        );

    color: #eee5f5;
}


.race-confirm-accept:disabled,
.race-confirm-cancel:disabled {
    opacity: 0.45;

    cursor: default;
}


/* =====================================================================
   SELECTION LOCK
===================================================================== */

#race-selection-panel.race-saving .race-browser,
#race-selection-panel.race-saving .race-cycle-controls,
#race-selection-panel.race-saving .race-claim-btn,
#race-selection-panel.race-saving .race-back-btn {
    pointer-events: none;
}


/* =====================================================================
   TABLET
===================================================================== */

@media (max-width: 1180px) {

    .race-selection-shell {
        width:
            min(100% - 24px, 1200px);

        margin:
            12px auto;
    }


    .race-selection-chamber {
        grid-template-columns:
            220px
            minmax(340px, 1fr);
    }


    .race-dossier {
        grid-column:
            1 / -1;

        border-left: 0;

        border-top:
            1px solid rgba(160, 122, 214, 0.14);
    }


    .race-dossier-scroll {
        display: grid;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap:
            0 24px;

        max-height: none;
    }


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


/* =====================================================================
   MOBILE
===================================================================== */

@media (max-width: 760px) {

    #race-selection-panel {
        position: fixed;
    }


    .race-selection-shell {
        width: 100%;

        min-height: 100%;

        margin: 0;

        border-left: 0;
        border-right: 0;
    }


    .race-selection-header {
        grid-template-columns:
            1fr;

        gap: 8px;

        padding:
            22px 18px 18px;
    }


    .race-header-rule {
        display: none;
    }


    .race-selection-title {
        font-size: 29px;
    }


    .race-selection-subtitle {
        font-size: 12px;
    }


    .race-selection-chamber {
        display: flex;

        flex-direction: column;
    }


    .race-showcase {
        order: 1;

        padding:
            22px 18px 20px;
    }


    .race-browser {
        order: 2;

        border-right: 0;

        border-top:
            1px solid rgba(160, 122, 214, 0.14);
    }


    .race-dossier {
        order: 3;
    }


    .race-selected-portrait-frame {
        max-height: none;
    }


    .race-portrait-stage {
        width:
            min(100%, 390px);
    }


    .race-list {
        display: grid;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 5px;

        max-height: 310px;

        padding:
            6px 12px 14px;
    }


    .race-nav-entry {
        margin: 0;

        padding:
            10px;

        border:
            1px solid rgba(140, 107, 177, 0.12);

        background:
            rgba(0, 0, 0, 0.12);

        text-align: center;
    }


    .race-nav-entry:hover,
    .race-nav-entry.active {
        padding-left: 10px;
    }


    .race-nav-entry::before {
        display: none;
    }


    .race-dossier-scroll {
        display: block;

        padding:
            6px 18px 20px;
    }


    .race-military-section {
        padding:
            20px 16px 22px;
    }


    .race-troop-grid {
        grid-template-columns:
            1fr;
    }


    .race-selection-footer {
        grid-template-columns:
            1fr;

        gap: 14px;

        padding:
            20px 16px 28px;
    }


    .race-back-btn {
        order: 2;

        justify-self: stretch;
    }


    .race-commit-area {
        order: 1;
    }


    .race-footer-spacer {
        display: none;
    }


    .race-claim-btn {
        width: 100%;

        min-width: 0;
    }


    .race-confirm-actions {
        flex-direction: column;
    }


    .race-confirm-cancel,
    .race-confirm-accept {
        width: 100%;
    }
}


/* =====================================================================
   SMALL PHONES
===================================================================== */

@media (max-width: 430px) {

    .race-list {
        grid-template-columns:
            1fr;
    }


    .race-cycle-controls {
        gap: 7px;
    }


    .race-cycle-btn {
        padding:
            9px 7px;

        font-size: 9px;
    }


    .race-resource-grid {
        grid-template-columns:
            1fr;
    }


    .race-selected-name {
        font-size: 25px;
    }
}