@font-face {
    font-family: "Marianne";
    src: url("/dsfr/fonts/Marianne-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Marianne";
    src: url("/dsfr/fonts/Marianne-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --p302-bg: #0f1020;
    --p302-surface: #17192d;
    --p302-surface-2: #20233b;
    --p302-border: rgba(255, 255, 255, .11);
    --p302-text: #f5f5fe;
    --p302-muted: #b5b7cf;
    --p302-blue: #6a6af4;
    --p302-blue-soft: #8b8bf7;
    --p302-green: #4ecb8d;
    --p302-danger: #ff7b7b;
    --p302-shadow: 0 24px 64px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--p302-bg); }
body.p302-body {
    margin: 0;
    min-height: 100vh;
    color: var(--p302-text);
    background:
        radial-gradient(circle at 12% 12%, rgba(106, 106, 244, .14), transparent 32rem),
        radial-gradient(circle at 88% 85%, rgba(78, 203, 141, .08), transparent 28rem),
        var(--p302-bg);
    font-family: "Marianne", Arial, sans-serif;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.p302-hidden { display: none !important; }

.p302-topbar {
    min-height: 62px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--p302-border);
    background: rgba(15, 16, 32, .86);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 80;
}
.p302-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: .92rem;
    font-weight: 700;
    letter-spacing: .02em;
}
.p302-brand__nexus { letter-spacing: .14em; }
.p302-brand__sep { color: #777a9b; font-weight: 400; }
.p302-topbar__actions { display: flex; gap: 10px; }
.p302-link-button {
    border: 0;
    background: transparent;
    color: var(--p302-muted);
    padding: 9px 11px;
    border-radius: 8px;
}
.p302-link-button:hover, .p302-link-button:focus-visible { color: #fff; background: rgba(255,255,255,.07); }

.p302-home {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
    padding: 72px 0 64px;
}
.p302-home__intro { max-width: 760px; margin-bottom: 42px; }
.p302-kicker, .p302-panel__eyebrow, .p302-center-card__eyebrow {
    margin: 0 0 8px;
    color: #a7a7ff;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.p302-home h1 {
    margin: 0;
    font-size: clamp(3rem, 8vw, 6.6rem);
    line-height: .92;
    letter-spacing: -.055em;
}
.p302-home h1 span { color: var(--p302-blue-soft); }
.p302-home__lead {
    margin: 22px 0 0;
    max-width: 680px;
    color: var(--p302-muted);
    font-size: clamp(1.02rem, 2vw, 1.25rem);
    line-height: 1.6;
}
.p302-home__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr);
    gap: 22px;
    align-items: start;
}
.p302-panel {
    border: 1px solid var(--p302-border);
    background: rgba(23, 25, 45, .88);
    border-radius: 20px;
    padding: 26px;
    box-shadow: var(--p302-shadow);
}
.p302-panel--primary { background: linear-gradient(145deg, rgba(31,34,61,.98), rgba(23,25,45,.96)); }
.p302-panel__heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 22px; }
.p302-panel__heading h2 { margin: 0; font-size: 1.45rem; }
.p302-panel__badge {
    white-space: nowrap;
    border: 1px solid rgba(106,106,244,.42);
    color: #c9c9ff;
    background: rgba(106,106,244,.12);
    border-radius: 999px;
    padding: 6px 9px;
    font-size: .72rem;
    font-weight: 700;
}
.p302-form { display: grid; gap: 16px; }
.p302-form__split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.p302-field { display: grid; gap: 6px; }
.p302-field > span { font-size: .88rem; font-weight: 700; }
.p302-field small { color: var(--p302-muted); font-size: .72rem; line-height: 1.35; min-height: 2em; }
.p302-field input, .p302-field select {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 10px;
    background: #111326;
    color: #fff;
    padding: 0 12px;
    outline: none;
}
.p302-field input:focus, .p302-field select:focus { border-color: var(--p302-blue-soft); box-shadow: 0 0 0 3px rgba(106,106,244,.18); }
.p302-settings {
    margin: 4px 0 0;
    padding: 16px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 14px;
    background: rgba(9,10,22,.24);
}
.p302-settings legend { padding: 0 7px; color: #d9d9ef; font-size: .82rem; font-weight: 700; }
.p302-switch-row {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 10px 2px;
    border-bottom: 1px solid rgba(255,255,255,.055);
}
.p302-switch-row:last-child { border-bottom: 0; }
.p302-switch-row input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--p302-blue); }
.p302-switch-row span { display: grid; gap: 3px; }
.p302-switch-row strong { font-size: .82rem; }
.p302-switch-row small { color: var(--p302-muted); font-size: .72rem; line-height: 1.35; }
.p302-switch-row--compact { padding-bottom: 2px; }
.p302-button {
    min-height: 44px;
    border-radius: 10px;
    border: 1px solid transparent;
    padding: 0 16px;
    font-weight: 700;
    transition: transform .15s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
}
.p302-button:hover:not(:disabled) { transform: translateY(-1px); }
.p302-button:disabled { cursor: not-allowed; opacity: .45; }
.p302-button--primary { background: var(--p302-blue); color: #fff; }
.p302-button--primary:hover:not(:disabled) { background: #7c7cf6; }
.p302-button--secondary { color: #ececff; background: rgba(255,255,255,.055); border-color: rgba(255,255,255,.14); }
.p302-button--danger { color: #fff; background: #b83a45; }
.p302-button--small { min-height: 36px; padding: 0 12px; font-size: .78rem; }
.p302-form--join { gap: 14px; }
.p302-join-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.p302-mini-rules { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--p302-border); }
.p302-mini-rules h3 { margin: 0 0 8px; font-size: .95rem; }
.p302-mini-rules p { margin: 0; color: var(--p302-muted); font-size: .82rem; line-height: 1.55; }

.p302-game { padding: 18px 18px 30px; }
.p302-gamebar {
    width: min(1550px, 100%);
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.p302-gamebar__label { color: var(--p302-muted); font-size: .72rem; margin-right: 6px; }
.p302-gamebar strong { letter-spacing: .12em; }
.p302-role { margin-left: 10px; color: #c7c8dc; font-size: .72rem; border: 1px solid var(--p302-border); border-radius: 999px; padding: 4px 8px; }
.p302-gamebar__buttons { display: flex; gap: 8px; }
.p302-layout {
    width: min(1550px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 220px minmax(760px, 1fr) 250px;
    gap: 14px;
    align-items: start;
}
.p302-sidebar {
    border: 1px solid var(--p302-border);
    background: rgba(23,25,45,.88);
    border-radius: 14px;
    padding: 14px;
    min-height: 220px;
}
.p302-sidebar__title {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: #dedff1;
    font-weight: 700;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 12px;
}
.p302-sidebar__title--journal { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--p302-border); }
.p302-players { display: grid; gap: 8px; }
.p302-player {
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 9px;
    align-items: center;
    padding: 9px;
    border-radius: 10px;
    background: rgba(255,255,255,.04);
    border: 1px solid transparent;
}
.p302-player--turn { border-color: rgba(106,106,244,.55); background: rgba(106,106,244,.10); }
.p302-player--bankrupt { opacity: .45; filter: grayscale(.8); }
.p302-player__token, .p302-token, .p302-turn-dot {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--token-color, #6a6af4);
    color: #fff;
    border: 2px solid rgba(255,255,255,.86);
    box-shadow: 0 4px 10px rgba(0,0,0,.26);
    font-size: .68rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.p302-player__name { font-size: .78rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p302-player__meta { display: flex; flex-wrap: wrap; gap: 5px 8px; margin-top: 2px; color: var(--p302-muted); font-size: .66rem; }
.p302-player__meta strong { color: #fff; }
.p302-pot { margin-top: 14px; border-radius: 10px; padding: 11px; background: rgba(78,203,141,.08); border: 1px solid rgba(78,203,141,.25); }
.p302-pot span { display: block; color: #bdebd5; font-size: .67rem; }
.p302-pot strong { display: block; margin-top: 3px; font-size: 1rem; }

.p302-chat {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--p302-border);
}
.p302-chat__title {
    margin-bottom: 8px;
    color: #dedff1;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.p302-chat__messages {
    height: 168px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    overflow-y: auto;
    padding: 2px 2px 8px;
    scrollbar-width: thin;
}
.p302-chat__message {
    display: grid;
    gap: 2px;
    padding: 7px 8px;
    border-radius: 8px;
    background: rgba(255,255,255,.045);
    transition: opacity 15s ease;
}
.p302-chat__message strong {
    color: var(--chat-color, #c7c7ff);
    font-size: .64rem;
    line-height: 1.2;
}
.p302-chat__message span {
    color: #e7e8f5;
    font-size: .68rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.p302-chat__message--fading { opacity: .18; }
.p302-chat__form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 6px;
    margin-top: 7px;
}
.p302-chat__form input {
    min-width: 0;
    height: 34px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    background: #111326;
    color: #fff;
    padding: 0 9px;
    font-size: .68rem;
    outline: none;
}
.p302-chat__form input:focus { border-color: var(--p302-blue-soft); }
.p302-chat__form input:disabled { opacity: .55; cursor: not-allowed; }
.p302-chat__form button {
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: var(--p302-blue);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
}
.p302-chat__form button:hover { background: #7c7cf6; }

.p302-board-wrap { overflow: auto; border-radius: 16px; box-shadow: var(--p302-shadow); }
.p302-board {
    position: relative;
    display: grid;
    grid-template-columns: 1.18fr repeat(9, 1fr) 1.18fr;
    grid-template-rows: 1.18fr repeat(9, 1fr) 1.18fr;
    width: min(100%, 1050px);
    min-width: 900px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    border: 2px solid rgba(255,255,255,.12);
    border-radius: 14px;
    overflow: hidden;
    background: #10111f;
}
.p302-cell {
    position: relative;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    overflow: hidden;
    background: linear-gradient(155deg, #242741, #1c1e35);
    border: 1px solid rgba(255,255,255,.085);
    color: #fff;
}
.p302-cell--corner { background: linear-gradient(145deg, #292846, #23213d); }
.p302-cell--special { background: linear-gradient(150deg, #262843, #20223a); }
.p302-cell--bercy { background: linear-gradient(150deg, #3a2a20, #2b2231); }
.p302-cell--controle { background: linear-gradient(150deg, #43243d, #28223c); }
.p302-cell--taxe { background: linear-gradient(150deg, #333044, #24243a); }
.p302-cell--transport { background: linear-gradient(150deg, #274252, #222a3e); }
.p302-cell--service { background: linear-gradient(150deg, #155468, #20324b); }
.p302-cell__band { height: 12px; flex: 0 0 auto; background: var(--group-color); }
.p302-cell__body {
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 3px;
    padding: 5px 4px;
}
.p302-cell__icon {
    min-height: 26px;
    display: grid;
    place-items: center;
    font-size: clamp(1rem, 1.8vw, 1.65rem);
    line-height: 1;
    opacity: 1;
}
.p302-cell--special .p302-cell__body { gap: 4px; }
.p302-cell--special .p302-cell__name { font-size: clamp(.48rem, .7vw, .7rem); }
.p302-picto {
    display: inline-grid;
    place-items: center;
    line-height: 1;
    font-size: 1.3em;
    filter: drop-shadow(0 3px 4px rgba(0,0,0,.25));
}
svg.p302-picto { width: 34px; height: 26px; }
.p302-picto--plane { font-size: 1.55em; transform: rotate(-5deg); }
.p302-picto--dog { font-size: 1.42em; }
.p302-picto--truck { color: #f8f8ff; }
.p302-picto--question {
    width: 1.35em;
    height: 1.35em;
    border-radius: 50%;
    background: rgba(240,183,211,.12);
    color: #ff9fcb;
    font-weight: 700;
}
.p302-cell__name {
    font-weight: 700;
    font-size: clamp(.52rem, .77vw, .78rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
}
.p302-cell__price { color: #d0d1e3; font-size: clamp(.5rem, .7vw, .68rem); }
.p302-discipline-corner {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(106,106,244,.08) 0 49%, transparent 49%),
        linear-gradient(145deg, #292846, #23213d);
}
.p302-discipline-corner::after {
    content: "";
    position: absolute;
    left: 11%;
    bottom: 10%;
    width: 61%;
    height: 58%;
    border: 2px solid rgba(255,255,255,.22);
    border-radius: 8px;
    background: rgba(12,13,28,.5);
    transform: rotate(-1deg);
    pointer-events: none;
}
.p302-discipline-corner__passage {
    position: absolute;
    z-index: 2;
    top: 5px;
    right: 5px;
    width: 56%;
    min-height: 38%;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    text-align: right;
}
.p302-discipline-corner__passage > span {
    max-width: 74px;
    color: #d5d6ea;
    font-size: clamp(.43rem, .63vw, .62rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: .03em;
}
.p302-discipline-corner__cap {
    position: absolute;
    z-index: 3;
    left: 9%;
    bottom: 7%;
    width: 61%;
    height: 58%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5px;
}
.p302-discipline-corner__cap-badge {
    font-size: clamp(.75rem, 1.2vw, 1.15rem);
    font-weight: 700;
    letter-spacing: .08em;
    color: #ffb4bd;
}
.p302-discipline-corner__cap small {
    margin-top: 2px;
    color: #e8d8dc;
    font-size: clamp(.38rem, .55vw, .53rem);
    font-weight: 700;
    line-height: 1.05;
}
.p302-cell__owner {
    position: absolute;
    inset: auto 4px 4px 4px;
    height: 5px;
    border-radius: 999px;
    background: var(--owner-color, transparent);
    box-shadow: 0 0 0 1px rgba(0,0,0,.25);
}
.p302-cell--mortgaged::after {
    content: "HYP.";
    position: absolute;
    top: 15px;
    right: 3px;
    padding: 2px 3px;
    border-radius: 4px;
    color: #ffd7d7;
    background: rgba(123,27,37,.9);
    font-size: .45rem;
    font-weight: 700;
}
.p302-cell__level {
    position: absolute;
    top: 15px;
    left: 3px;
    display: flex;
    gap: 1px;
}
.p302-cell__level span { width: 4px; height: 8px; border-radius: 1px; background: #65d79f; }
.p302-cell__level span:last-child:nth-child(5) { background: #f2c84b; width: 7px; }
.p302-cell__tokens {
    position: absolute;
    z-index: 8;
    left: 3px;
    right: 3px;
    bottom: 11px;
    min-height: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1px;
    flex-wrap: wrap;
    pointer-events: none;
}
.p302-cell[data-type="discipline"] .p302-cell__tokens {
    min-height: 18px;
    left: auto;
    right: auto;
    bottom: auto;
    gap: 1px;
}
.p302-cell[data-type="discipline"] .p302-cell__tokens--passage {
    top: 24px;
    right: 4px;
    width: 50%;
    justify-content: flex-end;
}
.p302-cell[data-type="discipline"] .p302-cell__tokens--discipline {
    left: 8%;
    bottom: 8%;
    width: 62%;
}
.p302-cell[data-type="discipline"] .p302-token {
    width: 17px;
    height: 17px;
    font-size: .43rem;
}
.p302-token { width: 19px; height: 19px; font-size: .48rem; border-width: 1.5px; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.p302-token--hop { animation: p302-hop .17s ease-out; }
@keyframes p302-hop {
    0% { transform: translateY(0) scale(1); }
    45% { transform: translateY(-9px) scale(1.08); }
    100% { transform: translateY(0) scale(1); }
}

.p302-board-center {
    grid-column: 2 / 11;
    grid-row: 2 / 11;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 7%;
    background:
        linear-gradient(rgba(16,17,31,.94), rgba(16,17,31,.94)),
        repeating-linear-gradient(45deg, rgba(255,255,255,.02), rgba(255,255,255,.02) 1px, transparent 1px, transparent 9px);
}
.p302-center-brand { text-align: center; opacity: .38; position: absolute; top: 8%; left: 8%; right: 8%; }
.p302-center-brand span { font-size: .62rem; font-weight: 700; letter-spacing: .18em; color: #aeb0d4; }
.p302-center-brand h2 { margin: 4px 0 0; font-size: clamp(1.5rem, 3vw, 3.2rem); line-height: 1; letter-spacing: -.04em; }
.p302-center-brand p { margin: 8px 0 0; color: var(--p302-muted); font-size: .68rem; }
.p302-center-card, .p302-turn-panel {
    position: relative;
    z-index: 4;
    width: min(430px, 90%);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 16px;
    padding: 20px;
    background: rgba(25,27,48,.94);
    box-shadow: 0 16px 50px rgba(0,0,0,.28);
    text-align: center;
}
.p302-center-card h3 { margin: 4px 0 8px; font-size: 1.1rem; }
.p302-center-card p:last-child { margin: 0; color: var(--p302-muted); font-size: .78rem; line-height: 1.45; }
.p302-turn-panel { text-align: left; width: min(460px, 92%); }
.p302-turn-head { display: flex; align-items: center; gap: 10px; }
.p302-turn-dot { width: 30px; height: 30px; flex: 0 0 auto; }
.p302-turn-head small { display: block; color: var(--p302-muted); font-size: .65rem; }
.p302-turn-head strong { display: block; margin-top: 1px; font-size: .96rem; }
.p302-dice { display: flex; justify-content: center; gap: 10px; margin: 18px 0 16px; }
.p302-die {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #141524;
    background: #f5f5fa;
    box-shadow: inset 0 -4px 0 rgba(0,0,0,.08), 0 8px 22px rgba(0,0,0,.24);
    font-size: 1.55rem;
    font-weight: 700;
}
.p302-main-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.p302-main-actions .p302-button:only-child { grid-column: 1 / -1; }
.p302-turn-status { min-height: 1.2em; margin: 11px 0 0; color: var(--p302-muted); font-size: .7rem; text-align: center; }

.p302-portfolio { display: grid; gap: 8px; max-height: 44vh; overflow: auto; padding-right: 2px; }
.p302-empty { color: var(--p302-muted); font-size: .75rem; line-height: 1.45; margin: 0; }
.p302-asset { border: 1px solid rgba(255,255,255,.09); border-radius: 10px; padding: 9px; background: rgba(255,255,255,.035); }
.p302-asset__top { display: flex; align-items: flex-start; gap: 7px; }
.p302-asset__band { width: 7px; min-height: 30px; border-radius: 3px; flex: 0 0 auto; background: var(--asset-color, #555a78); }
.p302-asset__name { font-size: .71rem; line-height: 1.2; font-weight: 700; }
.p302-asset__meta { margin-top: 3px; color: var(--p302-muted); font-size: .62rem; }
.p302-asset__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 8px; }
.p302-asset__actions button { min-height: 28px; border-radius: 7px; border: 1px solid rgba(255,255,255,.11); background: rgba(255,255,255,.05); color: #e7e8f5; font-size: .58rem; padding: 0 5px; }
.p302-asset__actions button:hover:not(:disabled) { background: rgba(255,255,255,.10); }
.p302-asset__actions button:disabled { opacity: .35; cursor: not-allowed; }
.p302-journal { display: flex; flex-direction: column-reverse; gap: 7px; max-height: 35vh; overflow: auto; }
.p302-journal p { margin: 0; padding-bottom: 7px; border-bottom: 1px solid rgba(255,255,255,.05); color: var(--p302-muted); font-size: .65rem; line-height: 1.35; }

.p302-dialog {
    width: min(560px, calc(100% - 28px));
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 18px;
    background: #1c1e35;
    color: #fff;
    box-shadow: 0 30px 90px rgba(0,0,0,.55);
    padding: 0;
}
.p302-dialog::backdrop { background: rgba(4,5,14,.75); backdrop-filter: blur(3px); }
.p302-dialog form { padding: 24px; }
.p302-card-dialog { text-align: center; }
.p302-card-kind { margin: 0 auto 18px; width: fit-content; border-radius: 999px; padding: 6px 11px; background: rgba(106,106,244,.16); color: #c7c7ff; font-size: .7rem; font-weight: 700; letter-spacing: .12em; }
.p302-card-dialog[data-kind="controle"] .p302-card-kind { background: rgba(214,107,160,.15); color: #f0b7d3; }
.p302-card-text { margin: 0; font-size: 1rem; line-height: 1.6; }
.p302-card-effect { margin: 20px 0; padding: 11px; border-radius: 10px; background: rgba(255,255,255,.055); font-weight: 700; color: #e9e9fb; }
.p302-dialog__header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.p302-dialog__header h2 { margin: 0; font-size: 1.35rem; }
.p302-dialog__close { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--p302-border); background: transparent; color: #fff; font-size: 1.4rem; }
.p302-rules-copy { margin: 20px 0; max-height: 58vh; overflow: auto; padding-right: 5px; }
.p302-rules-copy p { color: #d0d1e2; font-size: .82rem; line-height: 1.55; }

.p302-toast {
    position: fixed;
    z-index: 200;
    left: 50%;
    top: 78px;
    transform: translate(-50%, -12px);
    max-width: min(520px, calc(100% - 32px));
    padding: 10px 14px;
    border-radius: 10px;
    background: #f5f5fe;
    color: #15162a;
    font-size: .78rem;
    font-weight: 700;
    box-shadow: 0 12px 30px rgba(0,0,0,.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}
.p302-toast--show { opacity: 1; transform: translate(-50%, 0); }
.p302-toast--error { background: #ffe9e9; color: #6e1b23; }

@media (max-width: 1240px) {
    .p302-layout { grid-template-columns: 190px minmax(720px, 1fr); }
    .p302-sidebar--actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    .p302-sidebar__title--journal { margin: 0; padding: 0; border: 0; }
    .p302-portfolio, .p302-journal { max-height: 260px; }
}
@media (max-width: 900px) {
    .p302-home__grid { grid-template-columns: 1fr; }
    .p302-layout { display: block; }
    .p302-sidebar--players { margin-bottom: 12px; }
    .p302-sidebar--actions { margin-top: 12px; display: block; }
    .p302-sidebar__title--journal { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--p302-border); }
    .p302-players { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .p302-board { width: 900px; }
}
@media (max-width: 620px) {
    .p302-topbar { padding: 0 14px; }
    .p302-brand__sep, .p302-brand > span:last-child { display: none; }
    .p302-home { width: min(100% - 24px, 1180px); padding-top: 44px; }
    .p302-panel { padding: 18px; }
    .p302-form__split { grid-template-columns: 1fr; }
    .p302-join-actions { grid-template-columns: 1fr; }
    .p302-game { padding-inline: 10px; }
    .p302-gamebar { align-items: flex-start; }
    .p302-gamebar__buttons { flex-direction: column; }
    .p302-players { grid-template-columns: 1fr; }
}

/* NEXUS 0.12.59 — alignement visuel Programme 302 sur l'identité NEXUS / Échecs */
:root {
    --nexus-green: #00875a;
    --nexus-green-dark: #005f43;
    --nexus-green-soft: #e9f7f0;
    --nexus-green-soft-2: #f6fcf9;
    --nexus-green-border: #55b98d;

    --p302-bg: #f5f6f7;
    --p302-surface: #ffffff;
    --p302-surface-2: #f7f9f8;
    --p302-border: #d9dedb;
    --p302-text: #161616;
    --p302-muted: #666b68;
    --p302-blue: var(--nexus-green);
    --p302-blue-soft: var(--nexus-green-soft);
    --p302-green: var(--nexus-green);
    --p302-danger: #ce0500;
    --p302-shadow: 0 10px 28px rgba(0, 0, 0, .07);
}

html { background: var(--p302-bg); color-scheme: light; }
body.p302-body {
    color: var(--p302-text);
    background:
        linear-gradient(180deg, var(--nexus-green-soft-2) 0, #f5f6f7 22rem, #f5f6f7 100%);
}

.p302-topbar {
    border-bottom: 1px solid #ddd;
    background: rgba(255,255,255,.95);
    box-shadow: 0 2px 14px rgba(0,0,0,.05);
    backdrop-filter: blur(12px);
}
.p302-brand { color: #161616; }
.p302-brand__nexus { color: var(--nexus-green-dark); }
.p302-brand__sep { color: #9b9f9d; }
.p302-link-button { color: #555; }
.p302-link-button:hover, .p302-link-button:focus-visible {
    color: var(--nexus-green-dark);
    background: var(--nexus-green-soft);
}

.p302-kicker, .p302-panel__eyebrow, .p302-center-card__eyebrow { color: var(--nexus-green-dark); }
.p302-home h1 { color: #161616; }
.p302-home h1 span { color: var(--nexus-green); }
.p302-home__lead { color: #606662; }

.p302-panel,
.p302-sidebar,
.p302-center-card,
.p302-turn-panel {
    background: #fff;
    border-color: #d8ddda;
    box-shadow: var(--p302-shadow);
}
.p302-panel { border-radius: 16px; }
.p302-panel--primary {
    background: linear-gradient(145deg, #fff 0%, var(--nexus-green-soft-2) 100%);
    border-left: 4px solid var(--nexus-green);
}
.p302-panel__badge,
.p302-role {
    border-color: var(--nexus-green-border);
    color: var(--nexus-green-dark);
    background: var(--nexus-green-soft);
}
.p302-settings {
    border-color: #dfe3e0;
    background: #fafbfa;
}
.p302-settings legend { color: #363a38; }
.p302-switch-row { border-bottom-color: #ecefed; }
.p302-switch-row input { accent-color: var(--nexus-green); }
.p302-switch-row small, .p302-field small { color: #6c716e; }
.p302-field input, .p302-field select {
    border-color: #c7cdca;
    background: #fff;
    color: #161616;
}
.p302-field input:focus, .p302-field select:focus {
    border-color: var(--nexus-green);
    box-shadow: 0 0 0 3px rgba(0,135,90,.13);
}

.p302-button--primary { background: var(--nexus-green); color: #fff; }
.p302-button--primary:hover:not(:disabled) { background: var(--nexus-green-dark); }
.p302-button--secondary {
    color: var(--nexus-green-dark);
    background: #fff;
    border-color: var(--nexus-green-border);
}
.p302-button--secondary:hover:not(:disabled) { background: var(--nexus-green-soft); }

.p302-gamebar__label, .p302-player__meta, .p302-empty, .p302-asset__meta,
.p302-turn-head small, .p302-turn-status, .p302-center-card p:last-child,
.p302-center-brand p, .p302-mini-rules p { color: #686e6a; }
.p302-gamebar strong { color: var(--nexus-green-dark); }
.p302-sidebar__title, .p302-chat__title { color: #343835; }

.p302-player {
    background: #f8faf9;
    border-color: #edf0ee;
}
.p302-player--turn {
    border-color: var(--nexus-green-border);
    background: var(--nexus-green-soft);
}
.p302-player__meta strong { color: #161616; }
.p302-pot {
    background: var(--nexus-green-soft);
    border-color: var(--nexus-green-border);
}
.p302-pot span { color: var(--nexus-green-dark); }

.p302-chat { border-top-color: #e4e7e5; }
.p302-chat__message { background: #f6f8f7; border: 1px solid #ebeeec; }
.p302-chat__message strong { color: var(--chat-color, var(--nexus-green-dark)); }
.p302-chat__message span { color: #303432; }
.p302-chat__form input {
    border-color: #cbd0cd;
    background: #fff;
    color: #161616;
}
.p302-chat__form input:focus { border-color: var(--nexus-green); box-shadow: 0 0 0 2px rgba(0,135,90,.11); }
.p302-chat__form button { background: var(--nexus-green); }
.p302-chat__form button:hover { background: var(--nexus-green-dark); }

.p302-board-wrap {
    border: 1px solid #d6dbd8;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(0,0,0,.08);
}
.p302-board {
    border-color: #c5ccc8;
    background: #eef4f0;
}
.p302-cell {
    background: linear-gradient(155deg, #ffffff, #f4f7f5);
    border-color: #d8ddda;
    color: #161616;
}
.p302-cell--corner { background: linear-gradient(145deg, #f7faf8, #edf4f0); }
.p302-cell--special { background: linear-gradient(150deg, #fbfcfb, #eef4f1); }
.p302-cell--bercy { background: linear-gradient(150deg, #fff8e9, #f7f0dc); }
.p302-cell--controle { background: linear-gradient(150deg, #fff1f6, #f7e7ee); }
.p302-cell--taxe { background: linear-gradient(150deg, #f6f6f6, #eceeed); }
.p302-cell--transport { background: linear-gradient(150deg, #eef8f3, #e1f1e9); }
.p302-cell--service { background: linear-gradient(150deg, #edf8f2, #dcefe5); }
.p302-cell__name { color: #202321; }
.p302-cell__price { color: #59605c; font-weight: 700; }
.p302-picto { filter: drop-shadow(0 2px 2px rgba(0,0,0,.10)); }
.p302-picto--question { background: rgba(185,55,117,.09); color: #b93775; }
.p302-picto--truck { color: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); }

.p302-discipline-corner {
    background:
        linear-gradient(135deg, rgba(0,135,90,.08) 0 49%, transparent 49%),
        linear-gradient(145deg, #f8faf9, #edf4f0);
}
.p302-discipline-corner::after {
    border-color: rgba(0,95,67,.28);
    background: rgba(255,255,255,.76);
}
.p302-discipline-corner__passage > span { color: #4c5550; }
.p302-discipline-corner__cap-badge { color: #9c1c2a; }
.p302-discipline-corner__cap small { color: #6c4b4f; }
.p302-cell__level span { background: var(--nexus-green); }

.p302-board-center {
    background:
        linear-gradient(rgba(247,250,248,.96), rgba(247,250,248,.96)),
        repeating-linear-gradient(45deg, rgba(0,135,90,.035), rgba(0,135,90,.035) 1px, transparent 1px, transparent 10px);
}
.p302-center-brand { opacity: .72; }
.p302-center-brand span { color: var(--nexus-green-dark); }
.p302-center-brand h2 { color: var(--nexus-green); }
.p302-center-card, .p302-turn-panel {
    border-color: #d7ddda;
    background: rgba(255,255,255,.96);
    box-shadow: 0 12px 34px rgba(0,0,0,.08);
}
.p302-die {
    color: var(--nexus-green-dark);
    background: #fff;
    border: 1px solid #cfd7d2;
    box-shadow: inset 0 -4px 0 rgba(0,135,90,.08), 0 7px 18px rgba(0,0,0,.10);
}

.p302-asset {
    border-color: #e0e4e2;
    background: #fafbfa;
}
.p302-asset__actions button {
    border-color: #d1d6d3;
    background: #fff;
    color: #303532;
}
.p302-asset__actions button:hover:not(:disabled) { background: var(--nexus-green-soft); border-color: var(--nexus-green-border); }
.p302-journal p { border-bottom-color: #ecefed; color: #696f6b; }

.p302-dialog {
    border-color: #d4dad6;
    background: #fff;
    color: #161616;
    box-shadow: 0 24px 70px rgba(0,0,0,.22);
}
.p302-dialog::backdrop { background: rgba(20,26,23,.42); }
.p302-card-kind { background: var(--nexus-green-soft); color: var(--nexus-green-dark); }
.p302-card-dialog[data-kind="controle"] .p302-card-kind { background: #fbeaf2; color: #9f2c62; }
.p302-card-effect { background: #f5f7f6; color: #2c302e; }
.p302-dialog__close { border-color: #d4dad6; color: #333; }
.p302-rules-copy p { color: #555c58; }

.p302-toast {
    background: #fff;
    color: #161616;
    border: 1px solid #d4dad6;
    box-shadow: 0 10px 28px rgba(0,0,0,.16);
}
.p302-toast--error { background: #fef4f4; color: #9c1c1c; border-color: #f3b7b7; }

/* ========================================================================== */
/* 0.12.59 — Harmonisation visuelle avec NEXUS / module échecs                */
/* ========================================================================== */
:root {
    --p302-bg: #f5f7f6;
    --p302-surface: #ffffff;
    --p302-surface-2: #f6fcf9;
    --p302-border: rgba(0, 0, 0, .10);
    --p302-text: #1b1b1b;
    --p302-muted: #666f6b;
    --p302-blue: #00875a;
    --p302-blue-soft: #e9f7f0;
    --p302-green: #00875a;
    --p302-danger: #c9191e;
    --p302-shadow: 0 10px 26px rgba(0, 97, 65, .08);
}

html { background: var(--p302-bg); }
body.p302-body {
    color: var(--p302-text);
    background:
        linear-gradient(180deg, #f8fbf9 0, #f3f6f4 100%),
        radial-gradient(circle at 12% 12%, rgba(0, 135, 90, .07), transparent 24rem),
        radial-gradient(circle at 88% 85%, rgba(0, 135, 90, .05), transparent 20rem);
}

.p302-topbar {
    border-bottom: 1px solid #dcdcdc;
    background: rgba(255,255,255,.96);
    box-shadow: 0 2px 14px rgba(0,0,0,.05);
    backdrop-filter: blur(10px);
}
.p302-brand { color: #161616; }
.p302-brand__nexus {
    display: inline-flex;
    align-items: center;
    gap: .02em;
    letter-spacing: .14em;
}
.p302-brand__x { color: var(--p302-blue); }
.p302-brand__sep { color: #8a8a8a; }
.p302-link-button { color: #4f4f4f; }
.p302-link-button:hover, .p302-link-button:focus-visible {
    color: var(--p302-blue);
    background: var(--p302-blue-soft);
}

.p302-home__intro { max-width: 860px; }
.p302-kicker, .p302-panel__eyebrow, .p302-center-card__eyebrow {
    color: var(--p302-blue);
}
.p302-home h1 {
    color: #161616;
    letter-spacing: -.045em;
}
.p302-home h1 span { color: var(--p302-blue); }
.p302-home__lead { color: #4f4f4f; }

.p302-panel,
.p302-sidebar,
.p302-center-card,
.p302-turn-panel,
.p302-dialog {
    background: #fff;
    color: var(--p302-text);
    border-color: #dcdcdc;
    box-shadow: var(--p302-shadow);
}
.p302-panel {
    border-radius: 18px;
}
.p302-panel--primary {
    background: linear-gradient(180deg, #ffffff 0, #fbfdfb 100%);
    border-left: 4px solid var(--p302-blue);
}
.p302-panel__heading h2,
.p302-mini-rules h3,
.p302-dialog__header h2,
.p302-center-card h3,
.p302-turn-head strong,
.p302-sidebar__title,
.p302-chat__title,
.p302-player__name,
.p302-asset__name,
.p302-center-brand h2 {
    color: #161616;
}
.p302-panel__badge {
    border-color: #b7e1ce;
    color: var(--p302-blue);
    background: var(--p302-blue-soft);
}
.p302-field small,
.p302-mini-rules p,
.p302-empty,
.p302-center-card p:last-child,
.p302-turn-head small,
.p302-turn-status,
.p302-rules-copy p,
.p302-player__meta,
.p302-asset__meta,
.p302-journal p,
.p302-gamebar__label,
.p302-role,
.p302-pot span { color: var(--p302-muted); }

.p302-field input, .p302-field select,
.p302-chat__form input {
    background: #fff;
    color: #161616;
    border-color: #d0d0d0;
}
.p302-field input:focus, .p302-field select:focus,
.p302-chat__form input:focus {
    border-color: var(--p302-blue);
    box-shadow: 0 0 0 3px rgba(0, 135, 90, .13);
}
.p302-settings {
    background: #fbfcfb;
    border-color: #e1e1e1;
}
.p302-switch-row {
    border-bottom-color: rgba(0,0,0,.06);
}
.p302-switch-row input { accent-color: var(--p302-blue); }

.p302-button--primary {
    background: var(--p302-blue);
    color: #fff;
}
.p302-button--primary:hover:not(:disabled) { background: #006b49; }
.p302-button--secondary {
    color: var(--p302-blue);
    background: var(--p302-blue-soft);
    border-color: #b7e1ce;
}
.p302-button--secondary:hover:not(:disabled) {
    background: #ddf1e6;
}

.p302-gamebar strong { color: #161616; }
.p302-role {
    border-color: #dcdcdc;
    background: #fff;
}
.p302-player {
    background: #fff;
    border-color: #ebebeb;
}
.p302-player--turn {
    border-color: #55b98d;
    background: var(--p302-blue-soft);
}
.p302-pot {
    background: var(--p302-blue-soft);
    border-color: #b7e1ce;
}
.p302-pot strong { color: var(--p302-blue); }
.p302-chat {
    border-top-color: #ececec;
}
.p302-chat__message {
    background: #f7f8f7;
    border: 1px solid #ececec;
}
.p302-chat__message span { color: #2e2e2e; }
.p302-chat__form button { background: var(--p302-blue); }
.p302-chat__form button:hover { background: #006b49; }

.p302-board-wrap {
    border-radius: 18px;
    background: #fff;
    border: 1px solid #dcdcdc;
    padding: 10px;
    box-shadow: var(--p302-shadow);
}
.p302-board {
    border-color: #d5ddd8;
    background: #eaf3ee;
}
.p302-cell {
    color: #1f1f1f;
    background: linear-gradient(180deg, #ffffff 0, #f7faf8 100%);
    border-color: rgba(0,0,0,.08);
}
.p302-cell--corner { background: linear-gradient(180deg, #f8faf9 0, #edf4ef 100%); }
.p302-cell--special { background: linear-gradient(180deg, #f7faf8 0, #eef5f1 100%); }
.p302-cell--bercy { background: linear-gradient(180deg, #f8fbf3 0, #eef7ea 100%); }
.p302-cell--controle { background: linear-gradient(180deg, #fcf7fb 0, #f3eaf2 100%); }
.p302-cell--taxe { background: linear-gradient(180deg, #f8f8f9 0, #edeef0 100%); }
.p302-cell--transport { background: linear-gradient(180deg, #f4fafb 0, #e9f1f4 100%); }
.p302-cell--service { background: linear-gradient(180deg, #eef8f7 0, #e3f1ee 100%); }
.p302-cell__icon {
    min-height: 30px;
    font-size: clamp(1.15rem, 2vw, 1.95rem);
}
.p302-cell__name {
    color: #1f1f1f;
    font-size: clamp(.52rem, .8vw, .82rem);
}
.p302-cell__price { color: #5f675f; }
svg.p302-picto { width: 38px; height: 30px; }
.p302-picto { filter: drop-shadow(0 2px 3px rgba(0,0,0,.16)); }
.p302-picto--plane { font-size: 1.7em; }
.p302-picto--dog { font-size: 1.55em; }
.p302-picto--truck { color: #f7f7f7; }
.p302-picto--question {
    background: rgba(201, 62, 141, .10);
    color: #b03677;
}

.p302-discipline-corner {
    background:
        linear-gradient(135deg, rgba(0,135,90,.08) 0 49%, transparent 49%),
        linear-gradient(180deg, #f8faf9 0, #edf4ef 100%);
}
.p302-discipline-corner::after {
    border-color: rgba(0,0,0,.18);
    background: rgba(255,255,255,.66);
}
.p302-discipline-corner__passage > span { color: #5a605d; }
.p302-discipline-corner__cap-badge { color: #a62d4f; }
.p302-discipline-corner__cap small { color: #5f575b; }
.p302-cell--mortgaged::after {
    background: rgba(173, 31, 50, .92);
    color: #fff3f3;
}

.p302-token,
.p302-turn-dot,
.p302-player__token {
    border-color: rgba(255,255,255,.96);
    box-shadow: 0 4px 10px rgba(0,0,0,.18);
}

.p302-board-center {
    background:
        radial-gradient(circle at 50% 20%, rgba(0,135,90,.12), transparent 34%),
        linear-gradient(180deg, #fbfcfb 0, #f3f7f4 100%);
}
.p302-center-brand {
    background: #fff;
    border: 1px solid #dcdcdc;
    box-shadow: 0 8px 22px rgba(0, 97, 65, .07);
}
.p302-center-brand span {
    background: var(--p302-blue-soft);
    color: var(--p302-blue);
}
.p302-center-brand h2 { color: var(--p302-blue); }
.p302-center-brand p { color: #5d655f; }
.p302-center-card, .p302-turn-panel {
    border-color: #dcdcdc;
    background: rgba(255,255,255,.96);
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
}
.p302-die {
    color: #144734;
    background: #fff;
    border: 1px solid #dcdcdc;
    box-shadow: inset 0 -4px 0 rgba(0,0,0,.04), 0 8px 18px rgba(0,0,0,.08);
}

.p302-asset {
    border-color: #e4e4e4;
    background: #fbfcfb;
}
.p302-asset__actions button {
    border-color: #d6d6d6;
    background: #fff;
    color: #1f1f1f;
}
.p302-asset__actions button:hover:not(:disabled) {
    background: var(--p302-blue-soft);
    border-color: #b7e1ce;
    color: var(--p302-blue);
}
.p302-journal p {
    border-bottom-color: rgba(0,0,0,.06);
}

.p302-dialog::backdrop { background: rgba(8, 18, 13, .36); }
.p302-card-kind {
    background: var(--p302-blue-soft);
    color: var(--p302-blue);
}
.p302-card-dialog[data-kind="controle"] .p302-card-kind {
    background: rgba(176, 54, 119, .11);
    color: #a62d4f;
}
.p302-card-effect {
    background: #f7f8f7;
    color: #1f1f1f;
}
.p302-dialog__close {
    border-color: #dcdcdc;
    color: #444;
}
.p302-dialog__close:hover {
    background: #f6f6f6;
}

.p302-toast {
    background: #fff;
    color: #161616;
    border: 1px solid #dcdcdc;
    box-shadow: 0 12px 30px rgba(0,0,0,.12);
}
.p302-toast--error {
    background: #fff5f5;
    color: #8f1d22;
    border-color: #f0c0c0;
}

@media (max-width: 620px) {
    .p302-topbar {
        min-height: 56px;
    }
}

/* ========================================================================== */
/* 0.12.60 — Interface de partie inspirée du plateau, cohérente avec NEXUS    */
/* ========================================================================== */

.p302-game {
    background: linear-gradient(180deg, #f7faf8 0, #f1f5f3 100%);
}

.p302-gamebar {
    width: min(1680px, 100%);
    padding: 8px 12px;
    border: 1px solid #dce3df;
    border-radius: 12px;
    background: rgba(255,255,255,.94);
    box-shadow: 0 4px 18px rgba(0, 70, 45, .055);
}

.p302-layout {
    width: min(1680px, 100%);
    grid-template-columns: 220px minmax(820px, 1fr) 270px;
    gap: 12px;
}

.p302-sidebar {
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(0, 70, 45, .07);
}

.p302-sidebar--chat {
    position: sticky;
    top: 78px;
    display: flex;
    flex-direction: column;
    min-height: 620px;
    height: min(78vh, 920px);
}

.p302-sidebar--actions {
    position: sticky;
    top: 78px;
    max-height: calc(100vh - 96px);
    overflow: auto;
}

.p302-sidebar__title {
    margin-bottom: 10px;
    color: #303532;
    font-size: .72rem;
    letter-spacing: .07em;
}

.p302-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00a95f;
    box-shadow: 0 0 0 4px #d9f7e8;
}

.p302-chat {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.p302-chat__messages {
    flex: 1;
    height: auto;
    min-height: 260px;
    padding: 3px 1px 10px;
}

.p302-chat__message {
    border-radius: 9px;
    padding: 8px 9px;
    background: #f5f8f6;
    border: 1px solid #e6ece8;
}

.p302-chat__message strong {
    font-size: .64rem;
}

.p302-chat__message span {
    color: #2f3431;
    font-size: .68rem;
}

.p302-chat__form {
    margin-top: auto;
    grid-template-columns: minmax(0, 1fr) 38px;
}

.p302-chat__form input,
.p302-chat__form button {
    height: 38px;
}

.p302-chat__form button {
    background: #00875a;
    cursor: pointer;
}

.p302-board-wrap {
    padding: 0;
    border-radius: 14px;
    overflow: auto;
    background: #0c1713;
    border-color: #cfd9d3;
    box-shadow: 0 14px 36px rgba(0, 60, 40, .12);
}

.p302-board {
    width: min(100%, 1120px);
    min-width: 920px;
    border-radius: 12px;
    border: 1px solid #283b33;
    background: #0d1b16;
}

.p302-cell {
    color: #f5faf7;
    background: linear-gradient(180deg, #1e2d27 0, #16231e 100%);
    border-color: rgba(255,255,255,.085);
}

.p302-cell--corner {
    background: linear-gradient(145deg, #20352d, #15251f);
}

.p302-cell--special {
    background: linear-gradient(160deg, #21322b, #17251f);
}

.p302-cell--bercy {
    background: linear-gradient(160deg, #3c3420, #26271d);
}

.p302-cell--controle {
    background: linear-gradient(160deg, #35283a, #211f2c);
}

.p302-cell--taxe {
    background: linear-gradient(160deg, #2f3130, #202724);
}

.p302-cell--transport {
    background: linear-gradient(160deg, #24414a, #19302f);
}

.p302-cell--service {
    background: linear-gradient(160deg, #175663, #153d3a);
}

.p302-cell__band {
    height: 10px;
    box-shadow: 0 2px 7px rgba(0,0,0,.2);
}

.p302-cell__name {
    color: #f6faf8;
    font-size: clamp(.52rem, .74vw, .76rem);
    text-shadow: 0 1px 2px rgba(0,0,0,.32);
}

.p302-cell__price {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    padding: 2px 6px;
    border-radius: 6px;
    color: #b8f1d6;
    background: rgba(0,135,90,.24);
    font-weight: 800;
}

.p302-cell__icon {
    min-height: 34px;
    font-size: clamp(1.2rem, 2.2vw, 2rem);
}

.p302-picto--plane { font-size: 1.85em; }
.p302-picto--dog { font-size: 1.72em; }
svg.p302-picto { width: 46px; height: 34px; }
.p302-picto--truck { color: #fff; }
.p302-picto--question {
    width: 1.45em;
    height: 1.45em;
    background: rgba(202,127,224,.14);
    color: #d7a7ef;
}

.p302-cell__owner {
    height: 6px;
    left: 5px;
    right: 5px;
    bottom: 4px;
}

.p302-cell__level {
    top: 13px;
    left: 4px;
}

.p302-cell__level span {
    width: 5px;
    height: 9px;
    background: #45d19a;
}

.p302-cell__level span:last-child:nth-child(5) {
    width: 9px;
    background: #f3c94e;
}

.p302-discipline-corner {
    background:
        linear-gradient(135deg, rgba(206,5,0,.16) 0 49%, transparent 49%),
        linear-gradient(145deg, #26312d, #17251f);
}

.p302-discipline-corner::after {
    border-color: rgba(255,255,255,.28);
    background: rgba(17,26,22,.72);
}

.p302-discipline-corner__passage > span { color: #f0f5f2; }
.p302-discipline-corner__cap-badge { color: #ff9a9e; }
.p302-discipline-corner__cap small { color: #ffd4d5; }

.p302-board-center {
    padding: 5.5% 7%;
    justify-content: flex-start;
    background:
        radial-gradient(circle at 50% 16%, rgba(0,135,90,.24), transparent 28%),
        radial-gradient(circle at 50% 70%, rgba(0,75,50,.15), transparent 42%),
        linear-gradient(180deg, #0f201a 0, #0b1713 100%);
    color: #f6fbf8;
}

.p302-center-brand {
    top: 4.8%;
    left: auto;
    right: 5.5%;
    width: auto;
    opacity: .2;
    border: 0;
    background: transparent;
    box-shadow: none;
    text-align: right;
}

.p302-center-brand span {
    padding: 0;
    background: transparent;
    color: #9cd9bd;
}

.p302-center-brand h2 {
    color: #79cda7;
    font-size: clamp(1rem, 1.8vw, 1.8rem);
}

.p302-center-card {
    margin: auto;
    color: #161616;
}

.p302-turn-panel {
    z-index: 4;
    width: min(650px, 88%);
    margin-top: 5%;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #f7fbf9;
}

.p302-turn-head {
    justify-content: center;
    margin-bottom: 4px;
    color: #d9eee4;
}

.p302-turn-head small { color: #a8c9ba; }
.p302-turn-head strong { color: #fff; }

.p302-turn-dot {
    width: 32px;
    height: 32px;
}

.p302-dice {
    gap: 16px;
    margin: 12px 0 18px;
    min-height: 78px;
    align-items: center;
}

.p302-die {
    width: 72px;
    height: 72px;
    border-radius: 17px;
    color: #10231b;
    background: linear-gradient(145deg, #fff, #edf5f1);
    border: 1px solid rgba(255,255,255,.65);
    box-shadow: inset -4px -6px 10px rgba(0,0,0,.08), 0 13px 26px rgba(0,0,0,.3);
    font-size: 2.2rem;
}

.p302-dice--rolling .p302-die:first-child { animation: p302-die-roll-a .5s ease; }
.p302-dice--rolling .p302-die:last-child { animation: p302-die-roll-b .5s ease; }

@keyframes p302-die-roll-a {
    0% { transform: translateY(0) rotate(0); }
    35% { transform: translateY(-18px) rotate(110deg) scale(1.06); }
    70% { transform: translateY(-5px) rotate(220deg); }
    100% { transform: translateY(0) rotate(360deg); }
}

@keyframes p302-die-roll-b {
    0% { transform: translateY(0) rotate(0); }
    40% { transform: translateY(-15px) rotate(-120deg) scale(1.08); }
    75% { transform: translateY(-3px) rotate(-230deg); }
    100% { transform: translateY(0) rotate(-360deg); }
}

.p302-main-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 auto;
}

.p302-main-actions .p302-button {
    min-width: 160px;
    min-height: 46px;
    border-radius: 10px;
    padding: 0 18px;
}

.p302-main-actions .p302-button--primary {
    background: #00875a;
    box-shadow: 0 8px 20px rgba(0,135,90,.25);
}

.p302-main-actions .p302-button--secondary {
    color: #eef9f4;
    background: rgba(255,255,255,.055);
    border-color: rgba(255,255,255,.34);
}

.p302-main-actions .p302-button--secondary:hover:not(:disabled) {
    color: #fff;
    background: rgba(255,255,255,.11);
}

.p302-turn-status {
    margin: 10px auto 0;
    max-width: 560px;
    min-height: 1.4em;
    color: #a9c4b8;
    font-size: .72rem;
}

.p302-auction-entry {
    display: grid;
    grid-template-columns: 120px auto;
    gap: 8px;
}

.p302-auction-entry input {
    min-width: 0;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 9px;
    background: rgba(255,255,255,.08);
    color: #fff;
    padding: 0 10px;
}

.p302-inline-card {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    width: min(560px, 100%);
    margin: 0 auto 14px;
    padding: 14px 16px;
    border: 1px solid rgba(126,208,170,.38);
    border-radius: 12px;
    background: rgba(255,255,255,.07);
    box-shadow: 0 10px 26px rgba(0,0,0,.18);
    text-align: left;
}

.p302-inline-card[data-kind="controle"] {
    border-color: rgba(203,144,224,.42);
    background: rgba(108,68,123,.16);
}

.p302-inline-card__icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: rgba(0,135,90,.22);
    color: #8de0b9;
    font-size: 2rem;
    font-weight: 800;
}

.p302-inline-card[data-kind="controle"] .p302-inline-card__icon {
    background: rgba(166,85,193,.18);
    color: #d7a7ef;
}

.p302-inline-card strong {
    display: block;
    color: #fff;
    font-size: .78rem;
    letter-spacing: .08em;
}

.p302-inline-card p {
    margin: 5px 0 3px;
    color: #d9e7e0;
    font-size: .72rem;
    line-height: 1.45;
}

.p302-inline-card b {
    color: #83ddb4;
    font-size: .75rem;
}

.p302-center-journal {
    z-index: 3;
    width: min(650px, 88%);
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: none;
    overflow: visible;
    text-align: center;
}

.p302-center-journal .p302-journal__entry {
    margin: 0;
    padding: 0;
    border: 0;
    color: #d8e7df;
    font-size: .7rem;
    line-height: 1.35;
    transition: opacity .2s ease;
}

.p302-center-journal .p302-journal__entry:nth-child(1) { opacity: 1; font-weight: 700; }
.p302-center-journal .p302-journal__entry:nth-child(2) { opacity: .82; }
.p302-center-journal .p302-journal__entry:nth-child(3) { opacity: .66; }
.p302-center-journal .p302-journal__entry:nth-child(4) { opacity: .50; }
.p302-center-journal .p302-journal__entry:nth-child(5) { opacity: .36; }

.p302-side-actions {
    display: grid;
    gap: 8px;
    margin: 14px 0 16px;
    padding-top: 13px;
    border-top: 1px solid #e7ece9;
}

.p302-side-actions .p302-button {
    width: 100%;
    min-height: 40px;
}

.p302-side-actions .p302-button--danger {
    color: #b4232a;
    background: #fff5f5;
    border: 1px solid #efb8bb;
}

.p302-side-actions .p302-button--danger:hover:not(:disabled) {
    background: #ffe9ea;
}

.p302-trade-button {
    position: relative;
}

.p302-trade-badge {
    display: inline-grid;
    place-items: center;
    min-width: 19px;
    height: 19px;
    margin-left: 5px;
    padding: 0 5px;
    border-radius: 999px;
    background: #00875a;
    color: #fff;
    font-size: .62rem;
}

.p302-sidebar__title--portfolio {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.p302-portfolio {
    display: grid;
    gap: 10px;
    max-height: none;
    overflow: visible;
}

.p302-portfolio-list {
    display: grid;
    gap: 5px;
    max-height: 180px;
    overflow: auto;
    padding-right: 2px;
}

.p302-portfolio-item {
    position: relative;
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 5px 7px;
    border: 1px solid #e0e7e3;
    border-radius: 8px;
    background: #fff;
    color: #202421;
    text-align: left;
    cursor: pointer;
}

.p302-portfolio-item:hover,
.p302-portfolio-item.is-selected {
    border-color: #75bea0;
    background: #f0faf5;
}

.p302-portfolio-item__dot {
    width: 8px;
    height: 22px;
    border-radius: 4px;
    background: var(--asset-color, #00875a);
}

.p302-portfolio-item > span:nth-child(2) {
    overflow: hidden;
    color: #252a27;
    font-size: .66rem;
    font-weight: 700;
    line-height: 1.2;
}

.p302-portfolio-item small {
    color: #6a716d;
    font-size: .56rem;
    white-space: nowrap;
}

.p302-asset-detail {
    overflow: hidden;
    border: 1px solid #dce4df;
    border-radius: 11px;
    background: #fff;
}

.p302-asset-detail__header {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 10px;
    border-top: 4px solid var(--asset-color, #00875a);
    background: #f8fbf9;
}

.p302-asset-detail__icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    font-size: 1.25rem;
}

.p302-asset-detail__icon svg { width: 34px; height: 27px; }
.p302-asset-detail__header strong { display: block; color: #1d211f; font-size: .72rem; }
.p302-asset-detail__header small { display: block; margin-top: 2px; color: #68706b; font-size: .58rem; }

.p302-rent-table {
    border-top: 1px solid #e7ece9;
}

.p302-rent-table__title {
    padding: 7px 9px 5px;
    color: #39403c;
    font-size: .62rem;
    font-weight: 800;
}

.p302-rent-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 9px;
    border-top: 1px solid #f0f2f1;
    color: #606762;
    font-size: .59rem;
}

.p302-rent-row strong { color: #242a26; }
.p302-rent-row.is-current { background: #edf8f2; color: #006b49; }
.p302-rent-row.is-current strong { color: #006b49; }

.p302-asset-costs {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 9px;
    border-top: 1px solid #e7ece9;
    color: #6a716d;
    font-size: .58rem;
}

.p302-asset-costs span { display: grid; gap: 2px; }
.p302-asset-costs strong { color: #222824; }

.p302-asset-controls {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 6px;
    align-items: stretch;
    padding: 8px 9px;
    border-top: 1px solid #e7ece9;
}

.p302-asset-controls:empty { display: none; }

.p302-asset-icon-button {
    min-height: 38px !important;
    border-color: #9acfb7 !important;
    color: #00744e !important;
    background: #effaf5 !important;
    font-size: 1rem !important;
    font-weight: 900;
}

.p302-asset-level {
    display: grid;
    place-items: center;
    border: 1px solid #e2e8e4;
    border-radius: 7px;
    background: #fafcfb;
    text-align: center;
}

.p302-asset-level small { color: #757c78; font-size: .52rem; }
.p302-asset-level strong { color: #28302b; font-size: .64rem; }

.p302-asset-secondary {
    display: grid;
    gap: 6px;
    padding: 8px 9px 10px;
    border-top: 1px solid #e7ece9;
}

.p302-asset-secondary button {
    min-height: 32px;
    border: 1px solid #d9e0dc;
    border-radius: 7px;
    background: #fff;
    color: #343a36;
    font-size: .58rem;
    cursor: pointer;
}

.p302-asset-secondary button:disabled { opacity: .38; cursor: not-allowed; }
.p302-asset-secondary .p302-asset-sell { color: #b4232a; border-color: #efc0c3; background: #fff7f7; }

.p302-trade-dialog {
    width: min(760px, calc(100% - 28px));
}

.p302-trade-dialog form { padding: 22px; }

.p302-trade-incoming {
    display: grid;
    gap: 8px;
    margin: 14px 0;
    padding: 10px;
    border: 1px solid #b7e1ce;
    border-radius: 10px;
    background: #f0faf5;
}

.p302-trade-offer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.p302-trade-offer strong { color: #1f2823; font-size: .76rem; }
.p302-trade-offer p { margin: 3px 0 0; color: #5c655f; font-size: .66rem; line-height: 1.35; }
.p302-trade-offer__actions { display: flex; gap: 6px; }
.p302-trade-offer__actions .p302-button { min-height: 34px; padding: 0 10px; font-size: .64rem; }

.p302-trade-compose {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.p302-trade-money-grid,
.p302-trade-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.p302-trade-columns > section {
    min-width: 0;
    padding: 10px;
    border: 1px solid #e0e6e2;
    border-radius: 10px;
    background: #fafcfb;
}

.p302-trade-columns h3 {
    margin: 0 0 8px;
    color: #303632;
    font-size: .72rem;
}

.p302-trade-assets {
    display: grid;
    gap: 6px;
    max-height: 220px;
    overflow: auto;
}

.p302-trade-asset {
    display: grid;
    grid-template-columns: auto 7px minmax(0, 1fr) auto;
    gap: 7px;
    align-items: center;
    min-height: 36px;
    padding: 6px 7px;
    border: 1px solid #e3e8e5;
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
}

.p302-trade-asset input { accent-color: #00875a; }
.p302-trade-asset__dot { width: 7px; height: 24px; border-radius: 4px; background: var(--asset-color, #00875a); }
.p302-trade-asset span:nth-of-type(2) { color: #272d29; font-size: .64rem; font-weight: 700; }
.p302-trade-asset small { color: #65706a; font-size: .58rem; }
.p302-trade-submit { width: 100%; }

@media (max-width: 1380px) {
    .p302-layout {
        grid-template-columns: 190px minmax(760px, 1fr) 235px;
    }
    .p302-sidebar { padding: 10px; }
}

@media (max-width: 1120px) {
    .p302-layout {
        grid-template-columns: minmax(760px, 1fr) 250px;
    }
    .p302-sidebar--chat {
        position: static;
        grid-column: 1 / -1;
        grid-row: 2;
        height: auto;
        min-height: 220px;
    }
    .p302-chat__messages { min-height: 130px; max-height: 220px; }
    .p302-sidebar--actions { grid-column: 2; grid-row: 1; }
    .p302-board-wrap { grid-column: 1; grid-row: 1; }
}

@media (max-width: 900px) {
    .p302-layout { display: block; }
    .p302-board-wrap, .p302-sidebar--chat, .p302-sidebar--actions { margin-bottom: 12px; }
    .p302-sidebar--actions { position: static; max-height: none; }
    .p302-trade-money-grid, .p302-trade-columns { grid-template-columns: 1fr; }
    .p302-trade-offer { grid-template-columns: 1fr; }
}

/* 0.12.60 — les cartes restent intégrées au plateau et lisibles même lorsqu'elles sont longues. */
.p302-inline-card__body {
    max-height: 180px;
    overflow: auto;
    scrollbar-width: thin;
}

/* ========================================================================== */
/* 0.12.61 — retour visuel au style 0.12.59 + plateau adaptatif               */
/* ========================================================================== */

.p302-form-note {
    margin: 0;
    padding: 10px 12px;
    border-left: 3px solid #00875a;
    background: #f3faf6;
    color: #4f5953;
    font-size: .78rem;
    line-height: 1.45;
}

/* Le jeu tient dans la fenêtre sur un écran de bureau ; les panneaux défilent
   localement si nécessaire au lieu de faire défiler toute la page. */
@media (min-width: 1121px) and (min-height: 700px) {
    .p302-game:not(.p302-hidden) {
        height: calc(100vh - 62px);
        overflow: hidden;
        padding: 12px 14px 14px;
        background: linear-gradient(180deg, #f8fbf9 0, #f3f6f4 100%);
    }

    .p302-gamebar {
        width: min(1680px, 100%);
        min-height: 44px;
        margin: 0 auto 10px;
        padding: 6px 10px;
        background: #fff;
        border: 1px solid #dcdcdc;
        border-radius: 12px;
        box-shadow: 0 4px 16px rgba(0, 70, 45, .055);
    }

    .p302-layout {
        width: min(1680px, 100%);
        height: calc(100% - 54px);
        margin: 0 auto;
        grid-template-columns: clamp(188px, 14vw, 220px) minmax(0, 1fr) clamp(230px, 18vw, 270px);
        gap: 12px;
        align-items: stretch;
    }

    .p302-sidebar {
        position: static;
        height: 100%;
        min-height: 0;
        max-height: none;
        overflow: auto;
    }

    .p302-sidebar--chat {
        min-height: 0;
        height: 100%;
    }

    .p302-sidebar--actions {
        max-height: none;
    }

    .p302-board-wrap {
        height: 100%;
        min-height: 0;
        overflow: hidden;
        display: grid;
        place-items: center;
    }

    .p302-board {
        width: min(100%, calc(100vh - 150px));
        min-width: 0;
        height: auto;
        max-height: 100%;
    }
}

/* Palette et matériaux identiques à l'esprit 0.12.59. */
.p302-game {
    color: #161616;
}

.p302-sidebar,
.p302-gamebar {
    background: #fff;
    border-color: #dcdcdc;
    box-shadow: 0 8px 24px rgba(0, 97, 65, .07);
}

.p302-sidebar__title {
    color: #343835;
}

.p302-board-wrap {
    padding: 8px;
    border: 1px solid #d6dbd8;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
}

.p302-board {
    border: 1px solid #c5ccc8;
    border-radius: 13px;
    background: #eef4f0;
}

.p302-cell {
    color: #1f1f1f;
    background: linear-gradient(180deg, #ffffff 0, #f6faf7 100%);
    border-color: #d8ddda;
    text-shadow: none;
}

.p302-cell--corner {
    background: linear-gradient(180deg, #f8faf9 0, #edf4f0 100%);
}

.p302-cell--special {
    background: linear-gradient(180deg, #fbfcfb 0, #eef4f1 100%);
}

.p302-cell--bercy {
    background: linear-gradient(180deg, #fff8e9 0, #f7f0dc 100%);
}

.p302-cell--controle {
    background: linear-gradient(180deg, #fff1f6 0, #f7e7ee 100%);
}

.p302-cell--taxe {
    background: linear-gradient(180deg, #f7f7f7 0, #eceeed 100%);
}

.p302-cell--transport {
    background: linear-gradient(180deg, #eef8f3 0, #e1f1e9 100%);
}

.p302-cell--service {
    background: linear-gradient(180deg, #edf8f2 0, #dcefe5 100%);
}

.p302-cell__name {
    color: #202321;
    text-shadow: none;
}

.p302-cell__price {
    min-height: 0;
    padding: 0;
    color: #59605c;
    background: transparent;
    font-weight: 700;
}

.p302-picto {
    filter: drop-shadow(0 2px 2px rgba(0,0,0,.10));
}

.p302-picto--question {
    background: rgba(185,55,117,.09);
    color: #b93775;
}

.p302-discipline-corner {
    background:
        linear-gradient(135deg, rgba(0,135,90,.08) 0 49%, transparent 49%),
        linear-gradient(180deg, #f8faf9 0, #edf4f0 100%);
}

.p302-discipline-corner::after {
    border-color: rgba(0,95,67,.28);
    background: rgba(255,255,255,.76);
}

.p302-discipline-corner__passage > span { color: #4c5550; }
.p302-discipline-corner__cap-badge { color: #9c1c2a; }
.p302-discipline-corner__cap small { color: #6c4b4f; }

/* La couleur du propriétaire encadre toute la case : plus de petit tiret ambigu. */
.p302-cell__owner {
    display: none !important;
}

.p302-cell--owned {
    z-index: 1;
    box-shadow: inset 0 0 0 3px var(--owner-color, transparent);
}

.p302-board-center {
    color: #161616;
    background:
        radial-gradient(circle at 50% 18%, rgba(0,135,90,.08), transparent 31%),
        linear-gradient(180deg, #fbfcfb 0, #f3f7f4 100%);
}

.p302-center-brand {
    opacity: .64;
    color: #161616;
}

.p302-center-brand span {
    color: #006b49;
    background: transparent;
}

.p302-center-brand h2 {
    color: #00875a;
}

.p302-turn-panel {
    color: #161616;
}

.p302-turn-head {
    color: #303632;
}

.p302-turn-head small,
.p302-turn-status {
    color: #68706b;
}

.p302-turn-head strong {
    color: #161616;
}

.p302-die {
    color: #144734;
    background: #fff;
    border: 1px solid #cfd7d2;
    box-shadow: inset 0 -4px 0 rgba(0,135,90,.06), 0 7px 18px rgba(0,0,0,.10);
}

.p302-main-actions .p302-button--secondary {
    color: #006b49;
    background: #fff;
    border-color: #9acfb7;
}

.p302-main-actions .p302-button--secondary:hover:not(:disabled) {
    color: #005f43;
    background: #e9f7f0;
}

.p302-inline-card {
    color: #161616;
    border-color: #b7e1ce;
    background: rgba(255,255,255,.96);
    box-shadow: 0 10px 24px rgba(0,0,0,.08);
}

.p302-inline-card[data-kind="controle"] {
    border-color: #dfbad0;
    background: #fff8fb;
}

.p302-inline-card strong { color: #1d2b24; }
.p302-inline-card p { color: #4e5953; }
.p302-inline-card b { color: #006b49; }

.p302-inline-card__icon {
    background: #e9f7f0;
    color: #00875a;
}

.p302-inline-card[data-kind="controle"] .p302-inline-card__icon {
    background: #f7e7ef;
    color: #a62d69;
}

.p302-center-journal .p302-journal__entry {
    color: #4f5953;
}

.p302-center-journal .p302-journal__entry:nth-child(1) { color: #26302b; }

/* Joueurs et pions plus faciles à repérer. */
.p302-player {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    background: #f8faf9;
    border-color: #edf0ee;
}

.p302-player--turn {
    border-color: #55b98d;
    background: #e9f7f0;
}

.p302-player__token,
.p302-turn-dot {
    width: 34px;
    height: 34px;
    font-size: .76rem;
    border-width: 2px;
}

.p302-player__content {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.p302-player__name {
    font-size: .84rem;
    line-height: 1.15;
}

.p302-player__money {
    margin-top: 3px;
    color: #161616;
    font-size: 1.02rem;
    line-height: 1.1;
}

.p302-player__meta {
    margin-top: 4px;
    color: #686e6a;
    font-size: .65rem;
}

.p302-cell__tokens {
    bottom: 8px;
    min-height: 30px;
    gap: 2px;
}

.p302-token {
    width: 27px;
    height: 27px;
    font-size: .58rem;
    border-width: 2px;
    box-shadow: 0 3px 8px rgba(0,0,0,.28);
}

.p302-cell[data-type="discipline"] .p302-token {
    width: 22px;
    height: 22px;
    font-size: .48rem;
}

/* Portefeuille : aucune fiche ouverte par défaut, re-clic = fermeture. */
.p302-asset-detail--empty {
    display: grid;
    place-items: center;
    min-height: 86px;
    padding: 12px;
    text-align: center;
}

.p302-portfolio-item.is-selected {
    border-color: #75bea0;
    background: #f0faf5;
    box-shadow: inset 0 0 0 1px #75bea0;
}

/* Salon d'identité ouvert après création / saisie du code. */
.p302-identity-dialog {
    width: min(520px, calc(100% - 28px));
}

.p302-identity-dialog form {
    display: grid;
    gap: 16px;
}

.p302-identity-room {
    margin: 0;
    color: #5f6863;
}

.p302-identity-room strong {
    color: #006b49;
    letter-spacing: .12em;
}

.p302-identity-presence {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 10px;
    border: 1px solid #e1e6e3;
    border-radius: 10px;
    background: #f8faf9;
    color: #68706b;
    font-size: .72rem;
}

.p302-identity-person {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 7px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e0e5e2;
    color: #303632;
}

.p302-identity-person i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--person-color);
}

.p302-color-fieldset {
    margin: 0;
    padding: 12px;
    border: 1px solid #dfe4e1;
    border-radius: 12px;
}

.p302-color-fieldset legend {
    padding: 0 6px;
    font-size: .84rem;
    font-weight: 700;
}

.p302-color-fieldset small {
    display: block;
    margin-bottom: 10px;
    color: #69716d;
    font-size: .7rem;
}

.p302-color-picker {
    display: grid;
    grid-template-columns: repeat(5, 38px);
    gap: 10px;
}

.p302-color-swatch {
    width: 38px;
    height: 38px;
    border: 2px solid rgba(0,0,0,.12);
    border-radius: 50%;
    background: var(--swatch-color);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.86);
    transition: transform .12s ease, opacity .12s ease, outline-color .12s ease;
}

.p302-color-swatch:hover:not(:disabled) { transform: scale(1.06); }
.p302-color-swatch.is-selected { outline: 3px solid rgba(0,135,90,.28); outline-offset: 2px; }
.p302-color-swatch:disabled {
    cursor: not-allowed;
    opacity: .22;
    filter: grayscale(.8);
}

.p302-identity-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

/* Écran de clôture. */
.p302-center-card--finished {
    width: min(620px, 96%);
    max-height: 96%;
    overflow: auto;
    text-align: left;
}

.p302-center-card--finished > h3,
.p302-center-card--finished > p {
    text-align: left;
}

.p302-end-report {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.p302-end-chart,
.p302-end-podium,
.p302-end-ranking {
    padding: 10px;
    border: 1px solid #e0e5e2;
    border-radius: 12px;
    background: #fbfcfb;
}

.p302-end-chart__head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 6px;
}

.p302-end-chart__head strong,
.p302-end-section__title {
    color: #202622;
    font-size: .78rem;
    font-weight: 800;
}

.p302-end-chart__head small {
    color: #6b736f;
    font-size: .62rem;
}

.p302-chart {
    display: block;
    width: 100%;
    height: auto;
}

.p302-chart__grid { stroke: #e7ece9; stroke-width: 1; }
.p302-chart__axis { stroke: #98a49d; stroke-width: 1.2; }
.p302-chart__label { fill: #6b746f; font-size: 10px; }

.p302-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-top: 6px;
}

.p302-chart-legend span,
.p302-end-ranking__list li > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #4d5651;
    font-size: .64rem;
}

.p302-chart-legend i,
.p302-end-ranking__list i {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-radius: 50%;
}

.p302-podium {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    align-items: end;
    margin-top: 8px;
}

.p302-podium__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70px;
    padding: 8px 5px;
    border-radius: 9px;
    background: #f3f7f5;
    text-align: center;
}

.p302-podium__step--1 { min-height: 92px; background: #e9f7f0; }
.p302-podium__step--2 { min-height: 80px; }
.p302-podium__step--3 { min-height: 73px; }

.p302-podium__badge {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    margin-bottom: 3px;
    border-radius: 50%;
    background: var(--podium-color);
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
}

.p302-podium__step strong { color: #222824; font-size: .68rem; }
.p302-podium__step small { color: #606963; font-size: .6rem; }

.p302-end-ranking__list {
    margin: 7px 0 0;
    padding-left: 22px;
}

.p302-end-ranking__list li {
    padding: 4px 0;
    color: #3e4742;
    font-size: .64rem;
}

.p302-end-ranking__list li strong {
    float: right;
    color: #202622;
}

@media (max-width: 1120px), (max-height: 699px) {
    .p302-game {
        height: auto;
        overflow: visible;
    }

    .p302-board {
        width: min(100%, 820px);
        min-width: 760px;
    }
}

@media (max-width: 620px) {
    .p302-identity-actions { grid-template-columns: 1fr; }
    .p302-color-picker { grid-template-columns: repeat(5, 34px); }
    .p302-color-swatch { width: 34px; height: 34px; }
    .p302-podium { grid-template-columns: 1fr; }
}

@media (min-width: 1121px) and (min-height: 700px) {
    .p302-players { gap: 5px; }
    .p302-player { padding: 7px 8px; grid-template-columns: 34px minmax(0, 1fr); }
    .p302-player__token { width: 31px; height: 31px; font-size: .7rem; }
    .p302-player__name { font-size: .78rem; }
    .p302-player__money { font-size: .94rem; }
    .p302-player__meta { margin-top: 2px; }
}

/* ========================================================================== */
/* 0.12.64 — lisibilité / équilibre : NEXUS clair autour, plateau sombre vert  */
/* ========================================================================== */
:root {
    --p302-bg: #f4f7f5;
    --p302-surface: #ffffff;
    --p302-surface-2: #f7faf8;
    --p302-border: #d8dfdb;
    --p302-text: #161616;
    --p302-muted: #66706a;
    --p302-blue: #00875a;
    --p302-blue-soft: #e6f5ed;
    --p302-green: #00875a;
    --p302-danger: #c83d45;
    --p302-shadow: 0 10px 28px rgba(0, 72, 47, .08);
}

html { background: #f4f7f5; color-scheme: light; }
body.p302-body {
    color: #161616;
    background: linear-gradient(180deg, #eef6f1 0, #f6f7f7 25rem, #f6f7f7 100%);
}

/* Accueil et dialogues : retour à une lecture claire type NEXUS. */
.p302-topbar {
    color: #161616;
    border-bottom: 1px solid #d9dfdc;
    background: rgba(255,255,255,.97);
    box-shadow: 0 2px 14px rgba(0,0,0,.05);
}
.p302-brand { color: #161616; }
.p302-brand__nexus, .p302-brand__x { color: #006b49; }
.p302-brand__sep { color: #9ba19e; }
.p302-link-button { color: #4f5752; }
.p302-link-button:hover, .p302-link-button:focus-visible {
    color: #006b49;
    background: #e9f7f0;
}
.p302-home h1, .p302-panel h2, .p302-mini-rules h3 { color: #161616; }
.p302-home h1 span, .p302-kicker, .p302-panel__eyebrow, .p302-center-card__eyebrow { color: #00875a; }
.p302-home__lead, .p302-mini-rules p { color: #5f6863; }
.p302-panel, .p302-dialog {
    color: #161616;
    border-color: #d8dfdb;
    background: #fff;
    box-shadow: var(--p302-shadow);
}
.p302-panel--primary {
    background: linear-gradient(145deg, #fff 0%, #f2faf6 100%);
    border-left: 4px solid #00875a;
}
.p302-panel__badge, .p302-role {
    color: #006b49;
    border-color: #a7d8c1;
    background: #eaf7f0;
}
.p302-form-note {
    color: #46504a;
    border-left-color: #00875a;
    background: #f2faf6;
}
.p302-field > span, .p302-settings strong { color: #252a27; }
.p302-field small, .p302-switch-row small { color: #68716c; }
.p302-field input, .p302-field select {
    color: #161616;
    border-color: #cbd2ce;
    background: #fff;
}
.p302-field input:focus, .p302-field select:focus {
    border-color: #00875a;
    box-shadow: 0 0 0 3px rgba(0,135,90,.13);
}

/* Les règles de gestion restent alignées, sans effet de texte qui flotte. */
.p302-settings {
    display: grid;
    gap: 0;
    margin: 4px 0 0;
    padding: 14px 16px 10px;
    border: 1px solid #dfe5e1;
    border-radius: 14px;
    background: #fafcfb;
}
.p302-settings legend {
    padding: 0 7px;
    color: #303632;
    font-size: .84rem;
    font-weight: 700;
}
.p302-switch-row {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    min-height: 54px;
    padding: 10px 2px;
    border-bottom: 1px solid #e9eeeb;
}
.p302-switch-row:last-child { border-bottom: 0; }
.p302-switch-row input {
    width: 17px;
    height: 17px;
    margin: 2px 0 0;
    accent-color: #00875a;
}
.p302-switch-row > span { display: grid; gap: 3px; min-width: 0; }
.p302-switch-row strong { font-size: .82rem; line-height: 1.25; }
.p302-switch-row small { min-height: 0; font-size: .71rem; line-height: 1.35; }

.p302-button--primary { color: #fff; background: #00875a; }
.p302-button--primary:hover:not(:disabled) { background: #006b49; }
.p302-button--secondary { color: #006b49; background: #fff; border-color: #9dcfb7; }
.p302-button--secondary:hover:not(:disabled) { background: #eaf7f0; }
.p302-rules-copy p { color: #525b56; }
.p302-dialog__close { color: #333; border-color: #d3dad6; }
.p302-dialog::backdrop { background: rgba(12, 25, 18, .45); }

/* Zone de jeu : le chrome reste NEXUS, le plateau devient sombre et lisible. */
.p302-game:not(.p302-hidden) {
    color: #161616;
    background: linear-gradient(180deg, #edf4f0 0, #f5f7f6 100%);
}
.p302-gamebar {
    color: #161616;
    background: #fff;
    border: 1px solid #d9dfdc;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,72,47,.055);
    padding: 6px 10px;
}
.p302-gamebar__label { color: #69736d; }
.p302-gamebar strong { color: #005f43; }

.p302-layout {
    width: min(1680px, 100%);
    grid-template-columns: clamp(188px, 13vw, 218px) minmax(0, 1fr) clamp(232px, 17vw, 272px);
    gap: 12px;
    align-items: stretch;
}

.p302-sidebar {
    color: #eef8f2;
    border: 1px solid rgba(137,201,167,.19);
    background: linear-gradient(180deg, #123326 0%, #0d271d 100%);
    box-shadow: 0 12px 30px rgba(0,50,32,.16);
}
.p302-sidebar__title, .p302-chat__title { color: #f3faf6; }
.p302-sidebar .p302-empty, .p302-sidebar .p302-asset__meta { color: #a8beb2; }
.p302-live-dot { background: #38c987; box-shadow: 0 0 0 3px rgba(56,201,135,.14); }

.p302-player {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 9px;
    padding: 9px;
    color: #edf7f1;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.055);
}
.p302-player--turn { border-color: rgba(70,202,139,.62); background: rgba(0,135,90,.18); }
.p302-player__name { color: #fff; }
.p302-player__money { color: #dff6e9; font-size: 1rem; }
.p302-player__meta { color: #9fb5aa; }
.p302-player__token, .p302-turn-dot { width: 34px; height: 34px; font-size: .74rem; }

.p302-chat { border-top-color: rgba(255,255,255,.08); }
.p302-chat__message { background: rgba(255,255,255,.045); border-color: rgba(255,255,255,.06); }
.p302-chat__message strong { color: var(--chat-color, #8fe0b8); }
.p302-chat__message span { color: #e5f0ea; }
.p302-chat__form input {
    color: #f4faf6;
    background: #091d14;
    border-color: rgba(166,214,189,.18);
}
.p302-chat__form input::placeholder { color: #81968b; }
.p302-chat__form input:focus { border-color: #28ae75; box-shadow: 0 0 0 2px rgba(40,174,117,.15); }
.p302-chat__form button { background: #00875a; }

.p302-side-actions { border-top-color: rgba(255,255,255,.08); }
.p302-sidebar .p302-button--secondary {
    color: #d9f4e6;
    background: rgba(255,255,255,.035);
    border-color: rgba(111,199,154,.26);
}
.p302-sidebar .p302-button--secondary:hover:not(:disabled) { background: rgba(0,135,90,.17); }
.p302-sidebar .p302-button--danger {
    color: #ffd9dc;
    background: rgba(151,45,53,.27);
    border-color: rgba(231,112,120,.36);
}
.p302-sidebar .p302-button--danger:hover:not(:disabled) { background: rgba(174,49,58,.38); }

.p302-portfolio-item,
.p302-asset-detail,
.p302-asset,
.p302-trade-offer {
    color: #edf7f1;
    background: rgba(255,255,255,.04);
    border-color: rgba(255,255,255,.07);
}
.p302-portfolio-item small, .p302-asset-detail .p302-empty { color: #a6bbb0; }
.p302-portfolio-item.is-selected {
    border-color: rgba(71,196,134,.58);
    background: rgba(0,135,90,.17);
    box-shadow: inset 0 0 0 1px rgba(71,196,134,.28);
}
.p302-asset__actions button {
    color: #eaf5ef;
    background: rgba(255,255,255,.045);
    border-color: rgba(255,255,255,.09);
}
.p302-asset__actions button:hover:not(:disabled) { background: rgba(0,135,90,.18); }

/* Plateau : proportions plus généreuses sur les côtés et contenu indépendant du prix. */
.p302-board-wrap {
    padding: 8px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #cfd8d3;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(0,0,0,.09);
}
.p302-board {
    grid-template-columns: 1.42fr repeat(9, 1fr) 1.42fr;
    grid-template-rows: 1.42fr repeat(9, 1fr) 1.42fr;
    width: min(100%, calc(100dvh - 148px), 960px);
    min-width: 650px;
    aspect-ratio: 1 / 1;
    color: #f6fbf8;
    border: 1px solid #28483a;
    border-radius: 15px;
    background: #091610;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.025);
}
.p302-cell {
    color: #f5faf7;
    border: 1px solid rgba(220,239,229,.10);
    background: linear-gradient(180deg, #294338 0%, #20362d 100%);
    text-shadow: 0 1px 1px rgba(0,0,0,.38);
}
.p302-cell--corner { background: linear-gradient(180deg, #263f34, #1c3128); }
.p302-cell--special { background: linear-gradient(180deg, #2b463a, #21382e); }
.p302-cell--bercy { background: linear-gradient(180deg, #514a2d, #383721); }
.p302-cell--controle { background: linear-gradient(180deg, #56343d, #3a2b30); }
.p302-cell--taxe { background: linear-gradient(180deg, #41463f, #30362f); }
.p302-cell--transport { background: linear-gradient(180deg, #31594e, #25443c); }
.p302-cell--service { background: linear-gradient(180deg, #17624e, #164637); }

/* Le groupe devient un repère discret : pas de barre qui mange le texte. */
.p302-cell__band {
    position: absolute;
    z-index: 6;
    width: 10px;
    height: 10px;
    border: 2px solid rgba(255,255,255,.58);
    border-radius: 50%;
    background: var(--group-color);
    box-shadow: 0 2px 4px rgba(0,0,0,.24);
}
.p302-cell[data-side="top"] .p302-cell__band { top: 6px; left: 6px; }
.p302-cell[data-side="bottom"] .p302-cell__band { bottom: 6px; left: 6px; }
.p302-cell[data-side="left"] .p302-cell__band { left: 6px; bottom: 6px; }
.p302-cell[data-side="right"] .p302-cell__band { right: 6px; top: 6px; }

.p302-cell__body {
    position: absolute;
    inset: 12px 6px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0;
    text-align: center;
}
.p302-cell__name {
    max-width: 100%;
    color: #f7fbf9;
    font-size: clamp(.52rem, .72vw, .74rem);
    font-weight: 700;
    line-height: 1.06;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: auto;
}
.p302-cell--special .p302-cell__name { font-size: clamp(.50rem, .68vw, .70rem); }
.p302-cell__icon {
    min-height: 20px;
    color: #f6faf8;
    font-size: clamp(.88rem, 1.28vw, 1.18rem);
    line-height: 1;
}
.p302-picto { filter: drop-shadow(0 2px 3px rgba(0,0,0,.36)); }
svg.p302-picto { width: 28px; height: 22px; }
.p302-picto--plane { font-size: 1.25em; }
.p302-picto--dog { font-size: 1.18em; }
.p302-picto--truck {
    color: #f7fbf9;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.9)) drop-shadow(0 0 4px rgba(255,255,255,.16));
}
.p302-picto--question { color: #ff9fc0; background: rgba(255,135,177,.10); }

/* Le prix a sa propre zone et ne peut plus se superposer au repère de groupe. */
.p302-cell__price {
    position: absolute;
    z-index: 7;
    min-height: 0;
    padding: 3px 5px;
    color: #f3f7f5;
    background: rgba(4,18,12,.52);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 6px;
    font-size: clamp(.45rem, .60vw, .59rem);
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    text-shadow: none;
}
.p302-cell[data-side="top"] .p302-cell__price { top: 5px; right: 5px; }
.p302-cell[data-side="bottom"] .p302-cell__price { bottom: 5px; right: 5px; }
.p302-cell[data-side="left"] .p302-cell__price {
    left: 2px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
}
.p302-cell[data-side="right"] .p302-cell__price {
    right: 2px;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
}

/* Les côtés suivent réellement le sens de lecture du plateau. */
.p302-cell[data-side="left"] .p302-cell__body,
.p302-cell[data-side="right"] .p302-cell__body {
    inset: 50% auto auto 50%;
    width: clamp(58px, 5.4vw, 74px);
    height: auto;
    min-height: 46px;
    padding: 2px;
    transform-origin: center;
}
.p302-cell[data-side="left"] .p302-cell__body { transform: translate(-50%, -50%) rotate(-90deg); }
.p302-cell[data-side="right"] .p302-cell__body { transform: translate(-50%, -50%) rotate(90deg); }
.p302-cell[data-side="left"] .p302-cell__name,
.p302-cell[data-side="right"] .p302-cell__name {
    font-size: clamp(.50rem, .62vw, .64rem);
    line-height: 1.03;
}
.p302-cell[data-side="left"] .p302-cell__icon,
.p302-cell[data-side="right"] .p302-cell__icon { min-height: 16px; font-size: .98rem; }

/* Pions sur le bord intérieur de la case, jamais sur le prix. */
.p302-cell__tokens {
    position: absolute;
    z-index: 9;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 22px;
    min-height: 22px;
    pointer-events: none;
}
.p302-cell[data-side="top"] .p302-cell__tokens { left: 4px; right: 4px; bottom: 3px; }
.p302-cell[data-side="bottom"] .p302-cell__tokens { left: 4px; right: 4px; top: 3px; bottom: auto; }
.p302-cell[data-side="left"] .p302-cell__tokens {
    top: 4px; bottom: 4px; right: 3px; left: auto;
    width: 23px; flex-direction: column;
}
.p302-cell[data-side="right"] .p302-cell__tokens {
    top: 4px; bottom: 4px; left: 3px; right: auto;
    width: 23px; flex-direction: column;
}
.p302-token {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    color: #fff;
    font-size: .49rem;
    border: 2px solid rgba(255,255,255,.88);
    box-shadow: 0 3px 7px rgba(0,0,0,.38);
}
.p302-cell[data-type="discipline"] .p302-token { width: 18px; height: 18px; font-size: .40rem; }

.p302-cell__owner { display: none !important; }
.p302-cell--owned {
    z-index: 1;
    box-shadow: inset 0 0 0 3px var(--owner-color, transparent);
}
.p302-cell--owned::before {
    content: "";
    position: absolute;
    z-index: 8;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--owner-color, transparent);
    box-shadow: 0 0 0 2px rgba(255,255,255,.45);
}
.p302-cell[data-side="top"].p302-cell--owned::before { left: 7px; bottom: 7px; }
.p302-cell[data-side="bottom"].p302-cell--owned::before { left: 7px; top: 7px; }
.p302-cell[data-side="left"].p302-cell--owned::before { right: 7px; bottom: 7px; }
.p302-cell[data-side="right"].p302-cell--owned::before { left: 7px; top: 7px; }

.p302-cell__level { z-index: 8; }
.p302-cell__level span { background: #5bd49a; }

.p302-discipline-corner {
    color: #f5faf7;
    background:
        linear-gradient(135deg, rgba(0,135,90,.13) 0 49%, transparent 49%),
        linear-gradient(180deg, #263f34, #1c3128);
}
.p302-discipline-corner::after { border-color: rgba(151,214,182,.30); background: rgba(4,18,12,.50); }
.p302-discipline-corner__passage > span { color: #d5e5dc; }
.p302-discipline-corner__cap-badge { color: #ff9aa3; }
.p302-discipline-corner__cap small { color: #e1c2c6; }

/* Centre : contraste explicite, aucun texte noir sur fond noir. */
.p302-board-center {
    color: #f2f8f4;
    background:
        radial-gradient(circle at 50% 16%, rgba(0,135,90,.16), transparent 30%),
        linear-gradient(180deg, #0c2118 0%, #081710 100%);
}
.p302-center-brand { opacity: .42; }
.p302-center-brand span { color: #7bd3a8; }
.p302-center-brand h2 { color: #46b982; }
.p302-center-card,
.p302-turn-panel {
    color: #f4faf6;
    border: 1px solid rgba(141,204,172,.20);
    background: rgba(16,43,31,.92);
    box-shadow: 0 14px 38px rgba(0,0,0,.25);
}
.p302-center-card h3, .p302-turn-panel h3 { color: #fff; }
.p302-center-card__eyebrow { color: #4fd095; }
.p302-center-card p,
.p302-center-card p:last-child,
.p302-turn-head,
.p302-turn-head small,
.p302-turn-status { color: #bed0c6; }
.p302-turn-head strong { color: #fff; }
.p302-die {
    color: #075b3c;
    background: #f8fcf9;
    border: 1px solid #c9ded2;
    box-shadow: inset 0 -4px 0 rgba(0,135,90,.09), 0 8px 20px rgba(0,0,0,.25);
}
.p302-main-actions .p302-button--secondary {
    color: #dff6e9;
    background: rgba(255,255,255,.05);
    border-color: rgba(103,202,152,.35);
}
.p302-main-actions .p302-button--secondary:hover:not(:disabled) { background: rgba(0,135,90,.20); }
.p302-center-journal .p302-journal__entry { color: #93a99e; }
.p302-center-journal .p302-journal__entry:nth-child(1) { color: #eef6f2; }
.p302-center-journal .p302-journal__entry:nth-child(2) { color: #c7d7cf; }
.p302-inline-card {
    color: #eef7f2;
    border-color: rgba(83,188,137,.31);
    background: rgba(20,54,39,.97);
}
.p302-inline-card strong { color: #fff; }
.p302-inline-card p { color: #c8d7cf; }
.p302-inline-card b { color: #72dfac; }
.p302-inline-card__icon { color: #7de0b1; background: rgba(0,135,90,.18); }

/* Fin de partie : lisible dans le centre sombre. */
.p302-center-card--finished { color: #f2f8f4; }
.p302-end-chart, .p302-end-podium, .p302-end-ranking {
    border-color: rgba(255,255,255,.09);
    background: rgba(255,255,255,.04);
}
.p302-end-chart__head strong, .p302-end-section__title,
.p302-podium__step strong, .p302-end-ranking__list li strong { color: #f0f7f3; }
.p302-end-chart__head small, .p302-podium__step small,
.p302-chart-legend span, .p302-end-ranking__list li > span { color: #a9bbb1; }
.p302-chart__grid { stroke: rgba(255,255,255,.08); }
.p302-chart__axis { stroke: rgba(255,255,255,.24); }
.p302-chart__label { fill: #9fb1a7; }
.p302-podium__step { background: rgba(255,255,255,.04); }
.p302-podium__step--1 { background: rgba(0,135,90,.18); }

/* Desktop : la page ne scrolle pas ; le plateau se cale sur la hauteur disponible. */
@media (min-width: 1121px) and (min-height: 680px) {
    .p302-game:not(.p302-hidden) {
        height: calc(100dvh - 62px);
        overflow: hidden;
        padding: 10px 12px 12px;
    }
    .p302-gamebar { width: min(1680px, 100%); min-height: 42px; margin: 0 auto 9px; }
    .p302-layout { height: calc(100% - 51px); }
    .p302-sidebar { height: 100%; min-height: 0; max-height: none; overflow: auto; }
    .p302-board-wrap { height: 100%; min-height: 0; }
    .p302-board { width: min(100%, calc(100dvh - 137px), 960px); max-height: 100%; }
}

@media (max-width: 1320px) {
    .p302-layout { grid-template-columns: 184px minmax(0, 1fr) 220px; }
    .p302-board { min-width: 600px; }
    .p302-cell__name { font-size: clamp(.48rem, .68vw, .68rem); }
}

@media (max-width: 1120px), (max-height: 679px) {
    .p302-game { height: auto; overflow: visible; }
    .p302-layout { grid-template-columns: 1fr; }
    .p302-sidebar { max-height: none; }
    .p302-board-wrap { overflow: auto; }
    .p302-board { width: min(100%, 820px); min-width: 720px; }
}

@media (max-width: 760px) {
    .p302-board { min-width: 680px; }
}

/* ========================================================================== */
/* 0.12.65 — interface de partie 100 % NEXUS clair / plateau élargi          */
/* ========================================================================== */

body.p302-body {
    color: #161616;
    background: #f5f7f6;
}

.p302-topbar {
    color: #161616;
    background: rgba(255,255,255,.98);
    border-bottom: 1px solid #d9dfdc;
    box-shadow: 0 2px 12px rgba(0, 70, 45, .05);
}
.p302-brand, .p302-link-button { color: #252525; }
.p302-brand__nexus, .p302-brand__x { color: #00875a; }
.p302-link-button:hover, .p302-link-button:focus-visible {
    color: #006b49;
    background: #e9f7f0;
}

.p302-game {
    color: #161616;
    background: linear-gradient(180deg, #f8faf9 0%, #f2f6f4 100%);
}

.p302-gamebar {
    color: #161616;
    background: #fff;
    border: 1px solid #dce3df;
    box-shadow: 0 5px 18px rgba(0, 86, 58, .06);
}
.p302-gamebar__label { color: #646b67; }
.p302-gamebar strong { color: #161616; }
.p302-role {
    color: #006b49;
    background: #edf8f2;
    border-color: #b9dfcc;
}

.p302-layout {
    width: min(1720px, 100%);
    grid-template-columns: 210px minmax(0, 1fr) 248px;
    gap: 12px;
    align-items: stretch;
}

.p302-sidebar,
.p302-sidebar--chat,
.p302-sidebar--actions {
    color: #161616;
    background: #fff;
    border: 1px solid #dce3df;
    box-shadow: 0 7px 22px rgba(0, 86, 58, .06);
}
.p302-sidebar__title {
    color: #2b312e;
    border-color: #e5e9e7;
}
.p302-live-dot {
    background: #00a95f;
    box-shadow: 0 0 0 3px #dff5e9;
}
.p302-players { background: transparent; }
.p302-player {
    color: #161616;
    background: #fbfcfb;
    border: 1px solid #e2e8e5;
}
.p302-player--turn {
    background: #eaf7f0;
    border-color: #59b58c;
}
.p302-player__name { color: #171717; }
.p302-player__money { color: #006b49; }
.p302-player__meta, .p302-sidebar .p302-empty, .p302-sidebar .p302-asset__meta { color: #68716c; }
.p302-pot {
    color: #161616;
    background: #eef8f3;
    border-color: #c7e3d4;
}
.p302-pot span { color: #5f6964; }
.p302-pot strong { color: #006b49; }

.p302-chat { border-color: #e5e9e7; }
.p302-chat__messages { color: #1f2321; }
.p302-chat__message {
    color: #1f2321;
    background: #f7f9f8;
    border: 1px solid #e5e9e7;
}
.p302-chat__message strong { color: var(--chat-color, #006b49); }
.p302-chat__message span { color: #303633; }
.p302-chat__form input {
    color: #161616;
    background: #fff;
    border-color: #cfd7d3;
}
.p302-chat__form input::placeholder { color: #7a817d; }
.p302-chat__form input:focus {
    border-color: #00875a;
    box-shadow: 0 0 0 3px rgba(0,135,90,.12);
}
.p302-chat__form button {
    color: #fff;
    background: #00875a;
}
.p302-chat__form button:hover { background: #006b49; }

.p302-side-actions { border-top-color: #e4e9e6; }
.p302-sidebar .p302-button--secondary,
.p302-main-actions .p302-button--secondary {
    color: #006b49;
    background: #edf8f2;
    border-color: #bddfcd;
}
.p302-sidebar .p302-button--secondary:hover:not(:disabled),
.p302-main-actions .p302-button--secondary:hover:not(:disabled) {
    color: #005b3e;
    background: #dff2e8;
}
.p302-sidebar .p302-button--danger {
    color: #a31c23;
    background: #fff6f6;
    border-color: #e9b9bb;
}
.p302-sidebar .p302-button--danger:hover:not(:disabled) { background: #fde8e9; }

.p302-portfolio-item,
.p302-asset-detail,
.p302-asset,
.p302-trade-offer {
    color: #1b1f1d;
    background: #fff;
    border-color: #dfe5e2;
}
.p302-portfolio-item:hover,
.p302-portfolio-item.is-selected {
    color: #161616;
    background: #eef8f3;
    border-color: #99cfb5;
}
.p302-portfolio-item small, .p302-asset-detail .p302-empty { color: #68716c; }
.p302-asset-detail__header strong, .p302-asset-costs strong, .p302-asset-level strong { color: #1d2420; }
.p302-asset-detail__header small, .p302-asset-level small { color: #69716d; }
.p302-asset__actions button,
.p302-asset-icon-button,
.p302-asset-secondary button {
    color: #1d2420;
    background: #fff;
    border-color: #cfd8d3;
}
.p302-asset__actions button:hover:not(:disabled),
.p302-asset-icon-button:hover:not(:disabled),
.p302-asset-secondary button:hover:not(:disabled) {
    color: #006b49;
    background: #eaf7f0;
    border-color: #92c9ad;
}

/* Le plateau devient un grand rectangle clair : plus d'espace horizontal pour les libellés. */
.p302-board-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 8px;
    background: #fff;
    border: 1px solid #dce3df;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 86, 58, .07);
}
.p302-board {
    width: min(100%, 1120px);
    min-width: 0;
    aspect-ratio: 1.46 / 1;
    grid-template-columns: 1.38fr repeat(9, minmax(0, 1fr)) 1.38fr;
    grid-template-rows: 1.08fr repeat(9, minmax(0, 1fr)) 1.08fr;
    color: #161616;
    background: #eef5f1;
    border: 1px solid #bdccc4;
    border-radius: 14px;
    box-shadow: none;
}

.p302-cell,
.p302-cell--corner,
.p302-cell--special,
.p302-cell--bercy,
.p302-cell--controle,
.p302-cell--taxe,
.p302-cell--transport,
.p302-cell--service {
    color: #161616;
    background: #fff;
    border: 1px solid #d7dfdb;
}
.p302-cell--corner { background: #f3f7f5; }
.p302-cell--bercy { background: #fffaf0; }
.p302-cell--controle { background: #fff6fa; }
.p302-cell--taxe { background: #f7f7f7; }
.p302-cell--transport { background: #f2f8fa; }
.p302-cell--service { background: #eef9f5; }

/* Barre de série pleine largeur, comme un plateau classique. */
.p302-cell__band {
    position: absolute !important;
    z-index: 5;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    width: 100% !important;
    height: 8px !important;
    border-radius: 0 !important;
    background: var(--group-color);
    box-shadow: none;
}

/* Même logique de lecture pour les quatre côtés : aucun texte tourné. */
.p302-cell__body,
.p302-cell[data-side="left"] .p302-cell__body,
.p302-cell[data-side="right"] .p302-cell__body,
.p302-cell[data-side="top"] .p302-cell__body,
.p302-cell[data-side="bottom"] .p302-cell__body {
    position: absolute;
    inset: 11px 5px 27px;
    width: auto;
    height: auto;
    min-height: 0;
    padding: 2px 3px;
    transform: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-align: center;
    overflow: hidden;
}
.p302-cell__name,
.p302-cell--special .p302-cell__name,
.p302-cell[data-side="left"] .p302-cell__name,
.p302-cell[data-side="right"] .p302-cell__name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    max-width: 100%;
    overflow: hidden;
    color: #171a18;
    font-size: clamp(.60rem, .72vw, .76rem);
    font-weight: 700;
    line-height: 1.08;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: auto;
    text-shadow: none;
}
.p302-cell__icon,
.p302-cell[data-side="left"] .p302-cell__icon,
.p302-cell[data-side="right"] .p302-cell__icon {
    min-height: 18px;
    color: #24302a;
    font-size: clamp(.9rem, 1.18vw, 1.12rem);
}
.p302-picto { filter: none; }
.p302-picto--truck {
    color: #52655b;
    filter: none;
}
.p302-picto--question {
    color: #b43271;
    background: #fdeaf3;
}

/* Prix toujours en bas, plus gros, et dans une zone qui ne reçoit jamais le pion. */
.p302-cell__price,
.p302-cell[data-side="top"] .p302-cell__price,
.p302-cell[data-side="bottom"] .p302-cell__price,
.p302-cell[data-side="left"] .p302-cell__price,
.p302-cell[data-side="right"] .p302-cell__price {
    position: absolute;
    z-index: 7;
    left: 50%;
    right: auto;
    top: auto;
    bottom: 4px;
    transform: translateX(-50%);
    min-width: 48px;
    padding: 3px 7px;
    border: 0;
    border-radius: 6px;
    color: #25302b;
    background: #e8eeeb;
    font-size: clamp(.58rem, .70vw, .72rem);
    font-weight: 800;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

/* Les pions restent visibles mais ne masquent ni le nom ni le prix. */
.p302-cell__tokens,
.p302-cell[data-side="top"] .p302-cell__tokens,
.p302-cell[data-side="bottom"] .p302-cell__tokens,
.p302-cell[data-side="left"] .p302-cell__tokens,
.p302-cell[data-side="right"] .p302-cell__tokens {
    position: absolute;
    z-index: 10;
    top: auto;
    right: 3px;
    bottom: 27px;
    left: auto;
    width: auto;
    min-width: 18px;
    min-height: 18px;
    flex-direction: row;
    justify-content: flex-end;
    gap: 1px;
    transform: none;
}
.p302-token {
    width: 20px;
    height: 20px;
    color: #fff;
    font-size: .46rem;
    border: 2px solid #fff;
    box-shadow: 0 2px 7px rgba(0,0,0,.24);
}
.p302-cell[data-type="discipline"] .p302-token { width: 18px; height: 18px; }

.p302-cell__owner { display: none !important; }
.p302-cell--owned {
    box-shadow: inset 0 0 0 3px var(--owner-color, transparent);
}
.p302-cell--owned::before {
    width: 8px;
    height: 8px;
    top: 12px !important;
    right: 5px !important;
    bottom: auto !important;
    left: auto !important;
    background: var(--owner-color, transparent);
    box-shadow: 0 0 0 2px #fff;
}

.p302-cell__level {
    top: 12px;
    left: 4px;
}
.p302-cell__level span { background: #00875a; }

.p302-discipline-corner {
    color: #161616;
    background: linear-gradient(135deg, #f4f8f6 0 49%, #ffffff 49%);
}
.p302-discipline-corner::after {
    border-color: #cbd6d0;
    background: #eef6f2;
}
.p302-discipline-corner__passage > span { color: #404743; }
.p302-discipline-corner__cap-badge { color: #b42543; }
.p302-discipline-corner__cap small { color: #555d59; }

/* Centre intégralement clair : jamais de blanc sur blanc ou de noir sur noir. */
.p302-board-center {
    color: #161616;
    background:
        radial-gradient(circle at 50% 15%, rgba(0,135,90,.08), transparent 32%),
        linear-gradient(180deg, #fbfdfc 0%, #f1f7f4 100%);
}
.p302-center-brand { opacity: .32; }
.p302-center-brand span { color: #00875a; }
.p302-center-brand h2 { color: #00875a; }
.p302-center-card,
.p302-turn-panel {
    color: #161616;
    background: rgba(255,255,255,.97);
    border: 1px solid #d4dfd9;
    box-shadow: 0 10px 28px rgba(0, 80, 54, .09);
}
.p302-center-card h3,
.p302-turn-panel h3,
.p302-turn-head strong { color: #161616; }
.p302-center-card__eyebrow { color: #00875a; }
.p302-center-card p,
.p302-center-card p:last-child,
.p302-turn-head,
.p302-turn-head small,
.p302-turn-status { color: #555e59; }
.p302-die {
    color: #075b3c;
    background: #fff;
    border: 1px solid #ccd8d2;
    box-shadow: inset 0 -4px 0 rgba(0,135,90,.07), 0 8px 18px rgba(0,0,0,.08);
}
.p302-center-journal .p302-journal__entry,
.p302-center-journal .p302-journal__entry:nth-child(1),
.p302-center-journal .p302-journal__entry:nth-child(2) { color: #3f4743; }
.p302-center-journal .p302-journal__entry:nth-child(n+4) { color: #909792; }

.p302-inline-card,
.p302-inline-card[data-kind="controle"] {
    color: #161616;
    background: #fff;
    border: 1px solid #d4dfd9;
    box-shadow: 0 8px 22px rgba(0, 75, 50, .08);
}
.p302-inline-card strong { color: #1b211e; }
.p302-inline-card p { color: #404844; }
.p302-inline-card b { color: #006b49; }
.p302-inline-card__icon {
    color: #006b49;
    background: #e8f5ee;
}
.p302-inline-card[data-kind="controle"] .p302-inline-card__icon {
    color: #a52d68;
    background: #fdeaf3;
}

.p302-center-card--finished,
.p302-end-chart,
.p302-end-podium,
.p302-end-ranking {
    color: #161616;
    background: #fff;
    border-color: #dce3df;
}
.p302-end-chart__head strong,
.p302-end-section__title,
.p302-podium__step strong,
.p302-end-ranking__list li strong { color: #161616; }
.p302-end-chart__head small,
.p302-podium__step small,
.p302-chart-legend span,
.p302-end-ranking__list li > span { color: #656e69; }
.p302-chart__grid { stroke: #dce3df; }
.p302-chart__axis { stroke: #8e9993; }
.p302-chart__label { fill: #5f6863; }
.p302-podium__step { background: #f5f8f6; }
.p302-podium__step--1 { background: #e8f6ef; }

/* Les formulaires de règles restent alignés et aérés. */
.p302-settings {
    display: grid;
    gap: 0;
    color: #161616;
    background: #fbfcfb;
    border-color: #dfe5e2;
}
.p302-switch-row {
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 10px 2px;
    border-bottom-color: #e8ecea;
}
.p302-switch-row strong { color: #202522; }
.p302-switch-row small { color: #646d68; }

/* Desktop : pas de scroll de page, le plateau exploite largeur ET hauteur. */
@media (min-width: 1181px) and (min-height: 700px) {
    .p302-game:not(.p302-hidden) {
        height: calc(100dvh - 62px);
        overflow: hidden;
        padding: 10px 12px 12px;
    }
    .p302-gamebar {
        width: min(1720px, 100%);
        min-height: 42px;
        margin: 0 auto 9px;
    }
    .p302-layout { height: calc(100% - 51px); }
    .p302-sidebar { height: 100%; max-height: none; min-height: 0; overflow: auto; }
    .p302-board-wrap { height: 100%; min-height: 0; }
    .p302-board {
        width: min(100%, calc((100dvh - 145px) * 1.46), 1120px);
        max-height: 100%;
    }
}

@media (max-width: 1380px) {
    .p302-layout { grid-template-columns: 185px minmax(0, 1fr) 220px; }
    .p302-cell__name,
    .p302-cell--special .p302-cell__name,
    .p302-cell[data-side="left"] .p302-cell__name,
    .p302-cell[data-side="right"] .p302-cell__name { font-size: .60rem; }
    .p302-cell__price,
    .p302-cell[data-side="left"] .p302-cell__price,
    .p302-cell[data-side="right"] .p302-cell__price { font-size: .58rem; }
}

@media (max-width: 1180px), (max-height: 699px) {
    .p302-game { height: auto; overflow: visible; }
    .p302-layout { grid-template-columns: 1fr; }
    .p302-sidebar { height: auto; max-height: none; }
    .p302-board-wrap { overflow: auto; }
    .p302-board { width: min(1100px, 100%); min-width: 900px; }
}

@media (max-width: 760px) {
    .p302-board { min-width: 820px; }
}

/* ========================================================================== */
/* 0.12.66 — lisibilité du plateau + inspecteur de case                       */
/* ========================================================================== */

.p302-board {
    aspect-ratio: 1.18 / 1 !important;
    grid-template-columns: 1.15fr repeat(9, minmax(0, 1fr)) 1.15fr !important;
    grid-template-rows: 1.15fr repeat(9, minmax(0, 1fr)) 1.15fr !important;
}

.p302-cell {
    overflow: hidden;
    cursor: pointer;
    outline: none;
}
.p302-cell:focus-visible {
    z-index: 12;
    box-shadow: inset 0 0 0 3px #00875a, 0 0 0 2px #fff;
}

.p302-cell__band {
    position: absolute;
    z-index: 3;
    top: 0;
    right: 0;
    left: 0;
    height: 7px !important;
    background: var(--group-color) !important;
}

.p302-cell__body,
.p302-cell[data-side="left"] .p302-cell__body,
.p302-cell[data-side="right"] .p302-cell__body,
.p302-cell[data-side="top"] .p302-cell__body,
.p302-cell[data-side="bottom"] .p302-cell__body {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    min-width: 0;
    min-height: 0;
    padding: 11px 5px 24px !important;
    text-align: center !important;
}

.p302-cell__name,
.p302-cell--special .p302-cell__name,
.p302-cell[data-side="left"] .p302-cell__name,
.p302-cell[data-side="right"] .p302-cell__name,
.p302-cell[data-side="top"] .p302-cell__name,
.p302-cell[data-side="bottom"] .p302-cell__name {
    display: block !important;
    max-width: 100%;
    overflow: visible !important;
    color: #161b18 !important;
    font-size: clamp(.58rem, .72vw, .75rem) !important;
    font-weight: 700;
    line-height: 1.06 !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    white-space: normal;
}

.p302-cell__icon,
.p302-cell[data-side="left"] .p302-cell__icon,
.p302-cell[data-side="right"] .p302-cell__icon {
    min-height: 16px !important;
    font-size: clamp(.82rem, 1.05vw, 1.05rem) !important;
}

.p302-cell__price,
.p302-cell[data-side="left"] .p302-cell__price,
.p302-cell[data-side="right"] .p302-cell__price,
.p302-cell[data-side="top"] .p302-cell__price,
.p302-cell[data-side="bottom"] .p302-cell__price {
    position: absolute !important;
    z-index: 8;
    top: auto !important;
    right: auto !important;
    bottom: 4px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    min-width: 46px;
    padding: 3px 7px !important;
    border-radius: 6px;
    color: #202823 !important;
    background: #e7eeea !important;
    font-size: clamp(.61rem, .72vw, .74rem) !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    white-space: nowrap;
}

.p302-cell__tokens,
.p302-cell[data-side="left"] .p302-cell__tokens,
.p302-cell[data-side="right"] .p302-cell__tokens,
.p302-cell[data-side="top"] .p302-cell__tokens,
.p302-cell[data-side="bottom"] .p302-cell__tokens {
    position: absolute !important;
    z-index: 10;
    top: auto !important;
    right: 3px !important;
    bottom: 25px !important;
    left: auto !important;
    width: auto !important;
    min-width: 18px;
    min-height: 18px;
    transform: none !important;
    flex-direction: row !important;
    justify-content: flex-end !important;
    gap: 1px;
}

.p302-token {
    width: 19px !important;
    height: 19px !important;
    font-size: .44rem !important;
}

.p302-cell__level {
    position: absolute !important;
    z-index: 9;
    top: 11px !important;
    left: 5px !important;
    width: 23px;
    height: 23px;
    display: grid !important;
    place-items: center;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 999px;
    color: #fff;
    background: #00875a;
    box-shadow: 0 2px 7px rgba(0,0,0,.18);
    font-size: .68rem;
    font-weight: 800;
    line-height: 1;
}
.p302-cell__level.p302-hidden { display: none !important; }
.p302-cell__level span { display: none !important; }

.p302-cell--owned {
    box-shadow: inset 0 0 0 3px var(--owner-color, transparent) !important;
}
.p302-cell--owned::before {
    content: "";
    position: absolute;
    z-index: 9;
    top: 11px !important;
    right: 5px !important;
    bottom: auto !important;
    left: auto !important;
    width: 9px !important;
    height: 9px !important;
    border-radius: 50%;
    background: var(--owner-color, transparent) !important;
    box-shadow: 0 0 0 2px #fff !important;
}

.p302-picto--truck {
    color: #2e4b3e !important;
}

/* Carte de détail non bloquante : une case reste consultable sans quitter le plateau. */
.p302-case-inspector {
    position: absolute;
    z-index: 25;
    right: 16px;
    bottom: 16px;
    width: min(320px, 42%);
    max-height: 66%;
    overflow: auto;
    border: 1px solid #cfdad4;
    border-radius: 14px;
    background: rgba(255,255,255,.985);
    box-shadow: 0 16px 42px rgba(0, 71, 48, .16);
    color: #161b18;
}
.p302-case-inspector__close {
    position: absolute;
    z-index: 3;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #eef4f1;
    color: #344039;
    font-size: 1.1rem;
}
.p302-case-card { position: relative; padding: 18px 15px 15px; }
.p302-case-card__band {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 7px;
    background: var(--case-color);
}
.p302-case-card__header {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    padding-right: 28px;
}
.p302-case-card__icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #eef5f1;
    color: #244637;
    font-size: 1.25rem;
}
.p302-case-card__header small {
    display: block;
    color: #69736e;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.p302-case-card__header h3 {
    margin: 2px 0 0;
    color: #151a17;
    font-size: .95rem;
    line-height: 1.15;
}
.p302-case-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.p302-case-card__owner,
.p302-case-card__status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 7px;
    border-radius: 999px;
    background: #eef4f1;
    color: #35423b;
    font-size: .68rem;
    font-weight: 700;
}
.p302-case-card__owner i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--owner);
}
.p302-case-card__owner--free { color: #006b49; background: #e5f5ed; }
.p302-case-card__description {
    margin: 10px 0;
    color: #4b5751;
    font-size: .72rem;
    line-height: 1.42;
}
.p302-case-card__facts { display: grid; gap: 7px; }
.p302-case-fact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #f5f8f6;
}
.p302-case-fact small { color: #65706a; font-size: .65rem; }
.p302-case-fact strong { color: #1e2823; font-size: .74rem; }
.p302-case-fact--main { background: #e8f5ee; }
.p302-case-fact--main strong { color: #006b49; font-size: .82rem; }
.p302-case-rent-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
}
.p302-case-rent-grid .p302-case-fact {
    display: grid;
    gap: 2px;
    align-content: center;
}
.p302-case-rent-grid .p302-case-fact.is-current {
    outline: 2px solid var(--case-color);
    background: #fff;
}
.p302-case-rent-grid--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.p302-case-card__manage { width: 100%; margin-top: 10px; }

@media (min-width: 1181px) and (min-height: 700px) {
    .p302-board {
        width: min(100%, calc((100dvh - 145px) * 1.18), 1180px) !important;
        max-height: 100%;
    }
}

@media (max-width: 1380px) {
    .p302-cell__name,
    .p302-cell--special .p302-cell__name,
    .p302-cell[data-side="left"] .p302-cell__name,
    .p302-cell[data-side="right"] .p302-cell__name {
        font-size: .58rem !important;
    }
    .p302-case-inspector { width: min(300px, 45%); }
}

@media (max-width: 1180px), (max-height: 699px) {
    .p302-board {
        width: min(1050px, 100%) !important;
        min-width: 860px !important;
    }
    .p302-case-inspector { width: min(310px, 44%); }
}

/* ========================================================================== */
/* 0.12.69 — gestion depuis la case, respiration des cases spéciales          */
/* ========================================================================== */

/* Sur BERCY / Contrôle, le pictogramme garde son espace et le libellé descend. */
.p302-cell--bercy .p302-cell__body,
.p302-cell--controle .p302-cell__body {
    justify-content: flex-start !important;
    padding-top: 14px !important;
}
.p302-cell--bercy .p302-cell__icon,
.p302-cell--controle .p302-cell__icon {
    min-height: 20px !important;
    flex: 0 0 20px;
}
.p302-cell--bercy .p302-cell__name,
.p302-cell--controle .p302-cell__name {
    margin-top: 4px;
}

/* La fiche de case devient le point principal de consultation et de gestion. */
.p302-case-inspector {
    width: min(370px, 48%);
    max-height: 78%;
}
.p302-case-card__management-title {
    margin: 0 0 9px;
    color: #1b2420;
    font-size: .76rem;
    font-weight: 800;
}
.p302-asset-detail--inspector {
    margin-top: 12px;
    padding: 11px 0 0;
    border: 0;
    border-top: 1px solid #dfe8e3;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.p302-asset-detail--inspector .p302-asset-costs {
    margin-top: 0;
}
.p302-asset-detail--inspector .p302-asset-controls {
    margin-top: 9px;
}
.p302-asset-detail--inspector .p302-asset-secondary {
    margin-top: 9px;
}
.p302-asset-detail--inspector .p302-asset-secondary button,
.p302-asset-detail--inspector .p302-asset-icon-button {
    min-height: 34px;
}

/* Le volet de droite reste un inventaire lisible ; la gestion se fait sur la fiche. */
.p302-portfolio-list--compact {
    gap: 7px;
}
.p302-portfolio-hint {
    margin: 10px 2px 0;
    color: #68736d;
    font-size: .67rem;
    line-height: 1.4;
}

@media (max-width: 1380px) {
    .p302-case-inspector { width: min(350px, 50%); }
}
