/* =========================================================
   PRÉPARER L'EXPÉDITION / PREPARE THE EXPEDITION
   Header image expected: preparation.png — 2000 × 500 px (4:1)
   ========================================================= */

body.prep-modal-open {
    overflow: hidden !important;
}

#preparation-expedition-modal {
    position: fixed;
    inset: 0;
    z-index: 9700;
    display: none;
    align-items: center;
    justify-content: center;
    padding: clamp(10px, 2.2vw, 28px);
    background:
        radial-gradient(circle at 50% 8%, rgba(212, 175, 55, 0.10), transparent 34%),
        rgba(2, 3, 5, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.prep-shell {
    width: min(1120px, 96vw);
    max-height: min(92vh, 920px);
    overflow: auto;
    border: 1px solid rgba(212, 175, 55, 0.34);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(18, 18, 21, 0.98), rgba(7, 8, 10, 0.99));
    box-shadow:
        0 34px 90px rgba(0, 0, 0, 0.82),
        0 0 0 1px rgba(255, 255, 255, 0.025) inset,
        0 0 42px rgba(212, 175, 55, 0.07);
    color: #ece8df;
}

.prep-shell::-webkit-scrollbar { width: 7px; }
.prep-shell::-webkit-scrollbar-track { background: transparent; }
.prep-shell::-webkit-scrollbar-thumb { background: rgba(212, 175, 55, 0.28); border-radius: 99px; }

.prep-header {
    position: relative;
    min-height: clamp(175px, 22vw, 255px);
    overflow: hidden;
    border-radius: 17px 17px 0 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
    isolation: isolate;
}

.prep-header::before {
    content: "";
    position: absolute;
    inset: -10px;
    z-index: -3;
    background:
        linear-gradient(90deg, rgba(5, 5, 8, 0.76), rgba(5, 5, 8, 0.26) 50%, rgba(5, 5, 8, 0.72)),
        url("preparation.png") center / cover no-repeat,
        radial-gradient(circle at 38% 30%, rgba(212, 175, 55, 0.22), transparent 35%),
        linear-gradient(135deg, #17191d, #08090b 72%);
    filter: blur(3px) saturate(0.82) brightness(0.70);
    transform: scale(1.035);
}

.prep-header::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.10), rgba(5, 6, 8, 0.28) 48%, rgba(7, 8, 10, 0.96)),
        linear-gradient(90deg, rgba(0,0,0,0.62), transparent 55%, rgba(0,0,0,0.42));
}

#preparation-expedition-modal.is-nexus .prep-header::before {
    filter: blur(3px) saturate(0.70) hue-rotate(22deg) brightness(0.58);
}

#preparation-expedition-modal.is-nexus .prep-header::after {
    background:
        linear-gradient(180deg, rgba(15, 8, 28, 0.12), rgba(5, 6, 12, 0.36) 48%, rgba(7, 8, 12, 0.97)),
        radial-gradient(circle at 68% 20%, rgba(99, 67, 153, 0.20), transparent 38%);
}

.prep-header-copy {
    position: absolute;
    left: clamp(22px, 5vw, 58px);
    right: clamp(22px, 5vw, 58px);
    bottom: clamp(22px, 4vw, 42px);
    max-width: 760px;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.95);
}

.prep-header-copy small {
    display: block;
    margin-bottom: 8px;
    color: #d9c98d;
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.28em;
}

.prep-header-copy h2 {
    margin: 0;
    color: #f2ecdf;
    font-family: 'Cinzel', serif;
    font-size: clamp(1.7rem, 4.5vw, 3.2rem);
    font-weight: 500;
    letter-spacing: 0.065em;
    line-height: 1.08;
}

.prep-header-copy p {
    margin: 12px 0 0;
    color: rgba(238, 233, 222, 0.76);
    font-size: clamp(0.82rem, 1.5vw, 0.98rem);
    line-height: 1.55;
}

.prep-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background: rgba(5, 5, 7, 0.46);
    color: rgba(255, 255, 255, 0.76);
    font-size: 1.3rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: 180ms ease;
}

.prep-close:hover {
    border-color: rgba(212, 175, 55, 0.58);
    color: #f1d875;
    background: rgba(5, 5, 7, 0.72);
}

.prep-body {
    padding: clamp(16px, 3vw, 30px);
}

.prep-layout {
    display: grid;
    grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.65fr);
    gap: 18px;
    align-items: stretch;
}

.prep-main-column {
    display: grid;
    gap: 18px;
}

.prep-hero-panel,
.prep-panel,
.prep-music-panel {
    border: 1px solid rgba(212, 175, 55, 0.17);
    border-radius: 13px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
        rgba(4, 5, 7, 0.68);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24), inset 0 1px rgba(255, 255, 255, 0.025);
}

.prep-hero-panel {
    position: relative;
    overflow: hidden;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.prep-hero-panel::after {
    content: "";
    position: absolute;
    inset: auto -40% -26% -40%;
    height: 55%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.09), transparent 62%);
    pointer-events: none;
}

/* Avatar carré dédié (nomduherosav.png), recadré en cercle. */
.prep-hero-portrait-wrap {
    position: relative;
    width: 184px;
    aspect-ratio: 1;
    height: auto;
    margin: 24px auto 0;
    overflow: hidden;
    border: 3px solid #d4af37;
    border-radius: 50%;
    background: #090a0d;
    box-shadow:
        0 0 0 1px rgba(72, 53, 18, 0.95),
        0 0 0 5px rgba(212, 175, 55, 0.08),
        0 14px 30px rgba(0, 0, 0, 0.48),
        0 0 22px rgba(212, 175, 55, 0.11);
}

.prep-hero-portrait-wrap::before,
.prep-hero-portrait-wrap::after,
.prep-hero-sigil {
    display: none !important;
    content: none !important;
}

.prep-hero-portrait {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    filter: none;
}

.prep-hero-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 22px;
}

.prep-hero-copy > small,
.prep-setting-title small,
.prep-nexus-record small,
.prep-music-copy small {
    color: #8f8a7e;
    font-family: 'Cinzel', serif;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.17em;
}

.prep-hero-copy h3 {
    margin: 6px 0 0;
    color: #eee7da;
    font-family: 'Cinzel', serif;
    font-size: 1.75rem;
    font-weight: 500;
    letter-spacing: 0.055em;
}

.prep-hero-title {
    margin: 5px 0 16px;
    color: #cdbb78;
    font-size: 0.77rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.prep-hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 16px;
}

.prep-hero-stats span {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 8px 9px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    color: #cfc9bd;
    font-size: 0.72rem;
    font-weight: 700;
}

.prep-hero-stats span:nth-child(5) {
    grid-column: 1 / -1;
}

.prep-hero-stats small {
    color: #8f8b82;
    font-size: 0.56rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.prep-hero-stats b {
    color: #f0e7d5;
    font-size: 0.86rem;
    line-height: 1.2;
}

.prep-hero-stats em {
    color: #74c59a;
    font-size: 0.66rem;
    font-style: normal;
}

.prep-hero-appearance {
    position: relative;
    z-index: 1;
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin: 12px 0 16px;
    overflow: hidden;
}

.prep-hero-appearance > small {
    color: #8f8a7e;
    font-family: 'Cinzel', serif;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.17em;
}

.prep-hero-appearance-frame {
    position: relative;
    width: min(72%, 210px);
    aspect-ratio: 2 / 3;
    max-height: 390px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.42);
    border-radius: 10px;
    background: #08090b;
    box-shadow:
        0 15px 30px rgba(0, 0, 0, 0.42),
        0 0 0 1px rgba(255, 255, 255, 0.025) inset,
        0 0 24px rgba(212, 175, 55, 0.08);
}

.prep-hero-appearance-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.30);
}

.prep-hero-appearance-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.prep-hero-power {
    margin: auto 0 0;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: #aaa79f;
    font-size: 0.82rem;
    line-height: 1.58;
}

.prep-panel {
    padding: 17px;
}

.prep-panel-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 13px;
}

.prep-panel-heading span,
.prep-subheading {
    color: #d8c78b;
    font-family: 'Cinzel', serif;
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.prep-panel-heading small {
    color: #77746d;
    font-size: 0.69rem;
    text-align: right;
}

.prep-setting-card {
    display: grid;
    grid-template-columns: minmax(150px, 0.58fr) minmax(0, 1.42fr);
    gap: 14px;
    align-items: center;
    padding: 13px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.022);
}

.prep-setting-card + .prep-setting-card { margin-top: 10px; }

.prep-setting-card--danger {
    border-color: rgba(190, 69, 82, 0.30);
    background: linear-gradient(90deg, rgba(144, 43, 59, 0.08), rgba(255, 255, 255, 0.018));
}

.prep-setting-title strong {
    display: block;
    margin-top: 4px;
    color: #eee8dc;
    font-family: 'Cinzel', serif;
    font-size: 1.06rem;
    font-weight: 500;
}

.prep-stat-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.prep-stat-chip {
    min-width: 112px;
    padding: 7px 9px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.22);
    text-align: left;
}

.prep-stat-chip small {
    display: block;
    margin-bottom: 2px;
    color: #747169;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.prep-stat-chip strong {
    color: #d8d2c6;
    font-size: 0.73rem;
    font-weight: 700;
}

.prep-stat-chip--danger {
    border-color: rgba(190, 69, 82, 0.28);
}

.prep-stat-chip--danger strong { color: #d99398; }

.prep-rank-s-warning {
    grid-column: 1 / -1;
    margin: 0;
    padding-top: 8px;
    border-top: 1px solid rgba(190, 69, 82, 0.18);
    color: #bd8287;
    font-size: 0.70rem;
    line-height: 1.45;
}

.prep-info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.prep-info-row {
    display: grid;
    grid-template-columns: 31px 1fr;
    gap: 10px;
    align-items: start;
    min-height: 72px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.065);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.018);
}

.prep-info-icon {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(212, 175, 55, 0.22);
    border-radius: 8px;
    background: rgba(212, 175, 55, 0.06);
    color: #cdbb78;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
}

.prep-info-row strong {
    display: block;
    margin-bottom: 3px;
    color: #d7d1c6;
    font-size: 0.75rem;
}

.prep-info-row p {
    margin: 0;
    color: #85827b;
    font-size: 0.69rem;
    line-height: 1.43;
}

.prep-info-row--mystery {
    border-color: rgba(129, 96, 164, 0.20);
    background: linear-gradient(135deg, rgba(95, 67, 132, 0.07), rgba(255, 255, 255, 0.012));
}

.prep-info-row--mystery .prep-info-icon {
    border-color: rgba(161, 123, 201, 0.26);
    color: #b89aca;
    background: rgba(102, 70, 137, 0.08);
}

.prep-info-row--pontarch {
    border-color: rgba(172, 129, 72, 0.28);
    background: linear-gradient(135deg, rgba(105, 73, 35, 0.10), rgba(255, 255, 255, 0.012));
}

.prep-info-row--danger {
    border-color: rgba(177, 69, 78, 0.24);
}

.prep-info-row--danger .prep-info-icon {
    border-color: rgba(177, 69, 78, 0.26);
    color: #d38a91;
    background: rgba(177, 69, 78, 0.08);
}

.prep-subheading {
    margin: 16px 0 9px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: #8e8797;
}

.prep-empty-state {
    margin: 0;
    padding: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 9px;
    color: #77746d;
    font-size: 0.75rem;
    text-align: center;
}

.prep-nexus-record {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 12px;
    padding: 13px 15px;
    border: 1px solid rgba(111, 83, 157, 0.24);
    border-radius: 10px;
    background: linear-gradient(90deg, rgba(79, 54, 120, 0.10), rgba(255, 255, 255, 0.018));
}

.prep-nexus-record strong {
    color: #c6b1dc;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 500;
}

.prep-info-list--rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.prep-music-panel {
    position: relative;
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 12px;
    align-items: center;
    margin-top: 18px;
    padding: 13px 14px;
}

.prep-music-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(212, 175, 55, 0.22);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.11), rgba(0,0,0,0.16));
    color: #d7c47d;
    font-size: 1.2rem;
}

.prep-music-copy strong {
    display: block;
    margin: 2px 0;
    color: #dcd5c9;
    font-size: 0.82rem;
}

.prep-music-copy span {
    color: #6f6d67;
    font-size: 0.65rem;
}

.prep-mini-btn,
.prep-action-btn {
    border: 1px solid rgba(212, 175, 55, 0.27);
    border-radius: 8px;
    background: rgba(212, 175, 55, 0.045);
    color: #c9b874;
    font-family: 'Cinzel', serif;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    cursor: pointer;
    transition: 180ms ease;
}

.prep-mini-btn {
    min-height: 36px;
    padding: 0 13px;
}

.prep-mini-btn:hover,
.prep-action-btn:hover {
    border-color: rgba(212, 175, 55, 0.56);
    background: rgba(212, 175, 55, 0.09);
    color: #ead891;
    transform: translateY(-1px);
}

.prep-music-picker {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: center;
    padding-top: 11px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.prep-music-picker[hidden] { display: none !important; }

.prep-music-picker label {
    color: #77746d;
    font-size: 0.68rem;
}

.prep-music-picker select {
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 0 34px 0 11px;
    border: 1px solid rgba(212, 175, 55, 0.20);
    border-radius: 7px;
    background: #111216;
    color: #d6d0c4;
    font-size: 0.72rem;
}

.prep-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 clamp(16px, 3vw, 30px) clamp(18px, 3vw, 28px);
}

.prep-action-btn {
    min-height: 44px;
    padding: 0 19px;
}

.prep-action-btn--primary {
    min-width: 235px;
    border-color: rgba(212, 175, 55, 0.55);
    background:
        linear-gradient(180deg, rgba(212, 175, 55, 0.19), rgba(212, 175, 55, 0.08));
    color: #eee1a5;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

#preparation-expedition-modal.is-nexus .prep-action-btn--primary {
    border-color: rgba(139, 106, 185, 0.56);
    background: linear-gradient(180deg, rgba(105, 75, 153, 0.22), rgba(80, 53, 125, 0.09));
    color: #d6c2eb;
}

@media (max-width: 860px) {
    .prep-hero-appearance {
        display: none;
    }

    #preparation-expedition-modal {
        align-items: flex-start;
        padding: 8px;
    }

    .prep-shell {
        width: 100%;
        max-height: calc(100dvh - 16px);
        border-radius: 14px;
    }

    .prep-layout {
        grid-template-columns: 1fr;
    }

    .prep-hero-panel {
        display: grid;
        grid-template-columns: 165px 1fr;
        min-height: 205px;
        align-items: center;
    }

    .prep-hero-portrait-wrap {
        width: 126px;
        height: 126px;
        min-height: 0;
        margin: 18px auto;
    }

    .prep-hero-copy {
        padding: 18px;
    }

    .prep-hero-power {
        margin-top: 8px;
    }
}

@media (max-width: 620px) {
    .prep-header {
        min-height: 176px;
    }

    .prep-header-copy {
        left: 18px;
        right: 18px;
        bottom: 20px;
    }

    .prep-header-copy p {
        max-width: calc(100% - 8px);
    }

    .prep-body {
        padding: 12px;
    }

    .prep-hero-panel {
        grid-template-columns: 118px 1fr;
        min-height: 190px;
    }

    .prep-hero-portrait-wrap {
        width: 94px;
        height: 94px;
        min-height: 0;
        margin: 14px auto;
        border-width: 2px;
        box-shadow:
            0 0 0 1px rgba(72, 53, 18, 0.95),
            0 0 0 4px rgba(212, 175, 55, 0.07),
            0 10px 22px rgba(0, 0, 0, 0.42);
    }

    .prep-hero-copy {
        padding: 15px;
    }

    .prep-hero-copy h3 {
        font-size: 1.35rem;
    }

    .prep-hero-title {
        margin-bottom: 10px;
        font-size: 0.66rem;
    }

    .prep-hero-power {
        font-size: 0.72rem;
    }

    .prep-hero-stats span:nth-child(n + 3) {
        grid-column: 1 / -1;
    }

    .prep-hero-stats b {
        white-space: nowrap;
    }

    .prep-setting-card {
        grid-template-columns: 1fr;
    }

    .prep-stat-grid {
        justify-content: flex-start;
    }

    .prep-stat-chip {
        flex: 1 1 112px;
    }

    .prep-info-list,
    .prep-info-list--rules {
        grid-template-columns: 1fr;
    }

    .prep-panel-heading {
        display: block;
    }

    .prep-panel-heading small {
        display: block;
        margin-top: 5px;
        text-align: left;
    }

    .prep-music-panel {
        grid-template-columns: 38px 1fr auto;
    }

    .prep-music-picker {
        grid-template-columns: 1fr;
    }

    .prep-actions {
        display: grid;
        grid-template-columns: 0.8fr 1.4fr;
        gap: 8px;
        padding: 0 12px 14px;
    }

    .prep-action-btn,
    .prep-action-btn--primary {
        min-width: 0;
        width: 100%;
        padding: 0 10px;
        font-size: 0.60rem;
    }
}

.prep-hero-upgrades {
    margin: -7px 0 12px;
    color: #6fa98a;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.035em;
}

.prep-setting-card--nexus {
    margin-bottom: 10px;
    border-color: rgba(111, 83, 157, 0.22);
    background: linear-gradient(90deg, rgba(79, 54, 120, 0.08), rgba(255, 255, 255, 0.018));
}

/* =========================================================
   PRÉPARATION — RÉGLAGE RAPIDE DU CADRAN D’HOSTILITÉ
   ========================================================= */
.prep-setting-title--action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.prep-hostility-summary {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.prep-hostility-mainline {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.prep-hostility-mainline strong {
    margin-top: 0;
    line-height: 1;
}

.prep-hostility-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: transform 160ms ease, opacity 160ms ease, filter 160ms ease;
}

.prep-hostility-edit-btn:hover,
.prep-hostility-edit-btn:focus-visible {
    transform: translateY(-1px);
    opacity: 0.9;
    filter: brightness(1.12);
    outline: none;
}

.prep-hostility-edit-btn:active {
    transform: translateY(0);
    opacity: 1;
}

.prep-hostility-edit-btn__icon {
    display: inline-flex;
    width: 21px;
    height: 21px;
}

.prep-hostility-edit-btn__icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.prep-hostility-edit-btn__icon svg g,
.prep-hostility-edit-btn__icon svg path,
.prep-hostility-edit-btn__icon svg circle {
    stroke: #ffffff !important;
}

.prep-hostility-picker {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(212, 175, 55, 0.18);
}

.prep-hostility-picker__head {
    display: block;
    margin-bottom: 12px;
}

.prep-hostility-picker__head span {
    display: block;
    color: #dfc66d;
    font-family: "Cinzel", serif;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
}

.prep-hostility-levels {
    display: grid;
    grid-template-columns: repeat(6, minmax(44px, 1fr));
    gap: 8px;
}

.prep-hostility-level {
    min-height: 44px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 9px;
    background: rgba(5, 6, 9, 0.72);
    color: rgba(235, 229, 211, 0.76);
    font-family: "Cinzel", serif;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.prep-hostility-level:hover:not(:disabled),
.prep-hostility-level:focus-visible:not(:disabled) {
    border-color: rgba(235, 198, 92, 0.72);
    background: rgba(212, 175, 55, 0.09);
    color: #f0d57a;
    transform: translateY(-1px);
    outline: none;
}

.prep-hostility-level.is-selected {
    border-color: #d9b64d;
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.22), rgba(108, 77, 20, 0.12));
    color: #ffe594;
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.12), 0 8px 18px rgba(0, 0, 0, 0.24);
}

.prep-hostility-level.is-locked {
    opacity: 0.38;
    cursor: not-allowed;
    filter: grayscale(0.8);
}

.prep-hostility-save-status {
    min-height: 1.1em;
    margin: 9px 0 0;
    font-size: 0.72rem;
    text-align: right;
}

.prep-hostility-save-status.is-saving { color: rgba(231, 214, 160, 0.72); }
.prep-hostility-save-status.is-success { color: #6fcea0; }
.prep-hostility-save-status.is-error { color: #e58b83; }

@media (max-width: 620px) {
    .prep-setting-title--action {
        align-items: flex-start;
    }

    .prep-hostility-summary {
        gap: 8px;
    }

    .prep-hostility-mainline {
        gap: 10px;
    }

    .prep-hostility-edit-btn {
        width: 32px;
        height: 32px;
    }

    .prep-hostility-edit-btn__icon {
        width: 20px;
        height: 20px;
    }


    .prep-hostility-levels {
        grid-template-columns: repeat(3, 1fr);
    }

    .prep-hostility-level {
        min-height: 40px;
    }
}

/* ========================================================================== */
/* MOBILE — PRÉPARATION SANS CADRE EXTÉRIEUR                                 */
/* ========================================================================== */

@media (max-width: 860px) {
    #preparation-expedition-modal {
        padding: 0;
    }

    .prep-shell {
        width: 100%;
        max-height: 100dvh;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .prep-header {
        border-radius: 0;
    }

    .prep-actions {
        padding-right: 12px;
        padding-bottom: max(14px, env(safe-area-inset-bottom));
        padding-left: 12px;
    }
}
