/*
 * Plume et le phare des Lucioles
 * Interface d'aventure 2D — styles strictement limités à cette page.
 */

body.plume-adventure {
    --pa-ink: #211b33;
    --pa-night: #15172e;
    --pa-night-soft: #252448;
    --pa-plum: #513b63;
    --pa-plum-deep: #3a2a4c;
    --pa-blue: #536a9a;
    --pa-moss: #4d664b;
    --pa-moss-light: #7d9167;
    --pa-copper: #ad6e3f;
    --pa-gold: #d4a44f;
    --pa-gold-light: #f2d98d;
    --pa-paper: #f5edda;
    --pa-paper-deep: #dfcfaf;
    --pa-cream: #fff9e9;
    --pa-error: #a94745;
    --pa-success: #3f7353;
    --pa-white: #fffdf6;
    --pa-shadow: 0 18px 48px rgba(15, 14, 31, 0.34);
    --pa-shadow-small: 0 8px 20px rgba(20, 18, 38, 0.24);
    --pa-focus: #ffe394;
    margin: 0;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    color: var(--pa-ink);
    background:
        radial-gradient(circle at 13% 5%, rgba(103, 119, 89, 0.4), transparent 28rem),
        radial-gradient(circle at 88% 0%, rgba(117, 81, 105, 0.38), transparent 30rem),
        linear-gradient(145deg, #25243d 0%, #17182d 54%, #101628 100%);
    font-family:
        'Open Sans',
        'Nunito',
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body.plume-adventure *,
body.plume-adventure *::before,
body.plume-adventure *::after {
    box-sizing: border-box;
}

body.plume-adventure [hidden] {
    display: none !important;
}

body.plume-adventure button,
body.plume-adventure a,
body.plume-adventure select,
body.plume-adventure input {
    font: inherit;
}

body.plume-adventure button,
body.plume-adventure a {
    -webkit-tap-highlight-color: transparent;
}

body.plume-adventure button {
    touch-action: manipulation;
}

body.plume-adventure img,
body.plume-adventure svg {
    display: block;
    max-width: 100%;
}

body.plume-adventure :focus-visible {
    outline: 4px solid var(--pa-focus);
    outline-offset: 3px;
    box-shadow:
        0 0 0 2px var(--pa-night),
        0 0 0 7px rgba(255, 227, 148, 0.34);
}

.plume-adventure .pa-header {
    position: relative;
    z-index: 50;
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.45rem clamp(0.8rem, 2.4vw, 2rem);
    color: var(--pa-cream);
    border-bottom: 1px solid rgba(242, 217, 141, 0.2);
    background: rgba(21, 23, 46, 0.92);
    box-shadow: 0 6px 22px rgba(11, 12, 27, 0.18);
    backdrop-filter: blur(14px);
}

.plume-adventure .pa-brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 0.7rem;
    color: inherit;
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-size: clamp(0.92rem, 1.4vw, 1.08rem);
    font-weight: 800;
    letter-spacing: 0.01em;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.plume-adventure .pa-brand::before {
    display: none;
    width: 12px;
    height: 22px;
    flex: 0 0 auto;
    border-radius: 90% 12% 90% 18%;
    background: linear-gradient(145deg, var(--pa-gold-light), var(--pa-copper));
    box-shadow: 0 0 16px rgba(242, 217, 141, 0.52);
    content: '';
    transform: rotate(29deg);
}

.plume-adventure .pa-brand > img {
    width: 38px;
    height: 42px;
    flex: 0 0 auto;
    object-fit: contain;
    filter: drop-shadow(0 3px 7px rgba(7, 9, 22, 0.38));
}

.plume-adventure .pa-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
}

.plume-adventure .pa-header-actions > a,
.plume-adventure .pa-header-actions > button {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;
    padding: 0.45rem 0.78rem;
    color: var(--pa-cream);
    border: 1px solid rgba(255, 249, 233, 0.23);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    cursor: pointer;
    text-decoration: none;
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        transform 160ms ease;
}

.plume-adventure .pa-header-actions > a:hover,
.plume-adventure .pa-header-actions > button:hover {
    border-color: rgba(242, 217, 141, 0.55);
    background: rgba(255, 249, 233, 0.14);
    transform: translateY(-1px);
}

.plume-adventure .pa-header-actions > button[aria-pressed='true'] {
    color: #241d2e;
    border-color: var(--pa-gold-light);
    background: var(--pa-gold-light);
}

.plume-adventure .pa-game {
    position: relative;
    width: 100%;
    min-height: calc(100dvh - 58px);
    isolation: isolate;
}

.plume-adventure .pa-game.is-fullscreen,
.plume-adventure .pa-game:fullscreen,
.plume-adventure .pa-game:-webkit-full-screen {
    width: 100vw;
    min-height: 100vh;
    min-height: 100dvh;
    padding: clamp(0.35rem, 1vw, 1rem);
    overflow: auto;
    color: var(--pa-cream);
    background:
        radial-gradient(circle at 50% 0%, rgba(83, 106, 154, 0.36), transparent 42%),
        var(--pa-night);
}

/* Écran-titre : l'illustration reste la vedette et le texte prend place dans une zone calme. */
.plume-adventure .pa-title {
    position: relative;
    display: grid;
    min-height: calc(100dvh - 58px);
    place-items: stretch;
    overflow: hidden;
    background: #1c2038;
}

.plume-adventure .pa-title-art {
    position: absolute;
    inset: 0;
    background-color: #28334a;
    background-image:
        linear-gradient(
            90deg,
            rgba(16, 17, 34, 0.88) 0%,
            rgba(24, 25, 47, 0.57) 37%,
            rgba(19, 22, 39, 0.08) 70%
        ),
        linear-gradient(0deg, rgba(13, 15, 28, 0.74) 0%, transparent 40%),
        var(--pa-title-image, url('../images/plume-aventure/village.webp'));
    background-position: center;
    background-size: cover;
    transform: scale(1.015);
}

.plume-adventure .pa-title-art::before,
.plume-adventure .pa-title-art::after {
    position: absolute;
    border-radius: 50%;
    content: '';
    pointer-events: none;
}

.plume-adventure .pa-title-art::before {
    top: 11%;
    right: 11%;
    width: clamp(120px, 19vw, 260px);
    aspect-ratio: 1;
    background: radial-gradient(
        circle,
        rgba(244, 214, 127, 0.2),
        rgba(225, 168, 75, 0.07) 46%,
        transparent 72%
    );
    filter: blur(2px);
    animation: pa-beacon-glow 4.6s ease-in-out infinite;
}

.plume-adventure .pa-title-art::after {
    inset: 0;
    border-radius: 0;
    background-image:
        radial-gradient(circle at 74% 28%, rgba(248, 221, 136, 0.82) 0 2px, transparent 3px),
        radial-gradient(circle at 82% 43%, rgba(248, 221, 136, 0.66) 0 1.5px, transparent 2.5px),
        radial-gradient(circle at 69% 59%, rgba(248, 221, 136, 0.7) 0 1.5px, transparent 2.5px),
        radial-gradient(circle at 89% 67%, rgba(248, 221, 136, 0.56) 0 1px, transparent 2px);
    background-size: 100% 100%;
    opacity: 0.8;
}

.plume-adventure .pa-title-plume {
    position: absolute;
    z-index: 2;
    right: clamp(1rem, 4vw, 4.5rem);
    bottom: -1.5%;
    width: min(39vw, 590px);
    max-height: 82%;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 24px 28px rgba(12, 14, 29, 0.38));
    pointer-events: none;
    user-select: none;
}

.plume-adventure .pa-title-content {
    position: relative;
    z-index: 3;
    display: flex;
    width: min(100%, 1440px);
    min-height: inherit;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    margin: 0 auto;
    padding: clamp(2rem, 8vh, 6.5rem) clamp(1.2rem, 6vw, 6rem);
    color: var(--pa-cream);
}

.plume-adventure .pa-title-content::before {
    position: absolute;
    z-index: -1;
    top: 50%;
    left: clamp(0.5rem, 3.5vw, 3rem);
    width: min(650px, calc(100% - 1rem));
    height: min(82%, 650px);
    border: 1px solid rgba(248, 228, 174, 0.18);
    border-radius: 42% 58% 48% 52% / 56% 45% 55% 44%;
    background: rgba(30, 28, 50, 0.4);
    box-shadow:
        inset 0 0 60px rgba(255, 249, 233, 0.03),
        0 18px 60px rgba(11, 12, 26, 0.2);
    content: '';
    transform: translateY(-50%);
    backdrop-filter: blur(7px);
}

.plume-adventure .pa-kicker {
    margin: 0 0 0.7rem;
    color: var(--pa-gold-light);
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-size: clamp(0.72rem, 1.4vw, 0.84rem);
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.plume-adventure .pa-title h1 {
    max-width: 770px;
    margin: 0;
    color: var(--pa-white);
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-size: clamp(2.5rem, 6vw, 5.6rem);
    font-weight: 900;
    letter-spacing: -0.045em;
    line-height: 0.95;
    text-wrap: balance;
    text-shadow: 0 5px 24px rgba(10, 12, 26, 0.72);
}

.plume-adventure .pa-title h1 span {
    display: block;
    max-width: 17ch;
    margin-top: 0.15em;
    color: var(--pa-gold-light);
    font-size: 0.56em;
    letter-spacing: -0.025em;
    line-height: 1.08;
}

.plume-adventure .pa-title-description {
    max-width: 590px;
    margin: clamp(1.1rem, 2vw, 1.65rem) 0 0;
    color: rgba(255, 249, 233, 0.9);
    font-size: clamp(1rem, 1.55vw, 1.2rem);
    line-height: 1.72;
    text-shadow: 0 2px 14px rgba(10, 12, 26, 0.7);
}

.plume-adventure .pa-start-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: clamp(1.4rem, 3vw, 2.2rem);
}

.plume-adventure .pa-level {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0.52rem 0.82rem;
    color: var(--pa-paper);
    border: 1px solid rgba(245, 237, 218, 0.25);
    border-radius: 999px;
    background: rgba(19, 20, 39, 0.48);
    font-size: 0.86rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.plume-adventure .pa-fineprint {
    max-width: 560px;
    margin: 1rem 0 0;
    color: rgba(255, 249, 233, 0.7);
    font-size: 0.78rem;
    line-height: 1.5;
}

/* Boutons souples, inspirés des commandes de consoles 16 bits sans pastiche pixel. */
.plume-adventure .pa-button {
    display: inline-flex;
    min-width: 44px;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.15rem;
    color: var(--pa-cream);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px 18px 15px 20px;
    background: var(--pa-plum);
    box-shadow:
        0 5px 0 #30243f,
        0 9px 18px rgba(14, 13, 29, 0.25);
    cursor: pointer;
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition:
        filter 150ms ease,
        transform 150ms ease,
        box-shadow 150ms ease;
}

.plume-adventure .pa-button:hover:not(:disabled) {
    filter: brightness(1.09);
    transform: translateY(-2px);
    box-shadow:
        0 7px 0 #30243f,
        0 12px 22px rgba(14, 13, 29, 0.3);
}

.plume-adventure .pa-button:active:not(:disabled) {
    transform: translateY(3px);
    box-shadow:
        0 2px 0 #30243f,
        0 5px 10px rgba(14, 13, 29, 0.28);
}

.plume-adventure .pa-button:disabled {
    cursor: not-allowed;
    filter: grayscale(0.45);
    opacity: 0.55;
}

.plume-adventure .pa-button-primary {
    color: #261d25;
    border-color: rgba(255, 248, 216, 0.62);
    background: linear-gradient(180deg, #f2d98d 0%, #d3a04c 100%);
    box-shadow:
        0 5px 0 #8b592f,
        0 9px 22px rgba(17, 14, 28, 0.34);
}

.plume-adventure .pa-button-primary:hover:not(:disabled) {
    box-shadow:
        0 7px 0 #8b592f,
        0 13px 25px rgba(17, 14, 28, 0.38);
}

.plume-adventure .pa-button-primary:active:not(:disabled) {
    box-shadow:
        0 2px 0 #8b592f,
        0 5px 10px rgba(17, 14, 28, 0.3);
}

.plume-adventure .pa-button-quiet {
    color: var(--pa-paper);
    border-color: rgba(245, 237, 218, 0.28);
    background: rgba(32, 31, 58, 0.75);
    box-shadow:
        0 4px 0 rgba(13, 14, 30, 0.8),
        0 7px 16px rgba(12, 13, 28, 0.2);
    backdrop-filter: blur(8px);
}

/* Aire de jeu principale. */
.plume-adventure .pa-play {
    width: 100%;
    min-height: calc(100dvh - 58px);
    padding: clamp(0.35rem, 1.35vw, 1.25rem);
    background:
        radial-gradient(circle at 50% 0%, rgba(83, 106, 154, 0.28), transparent 44%),
        linear-gradient(180deg, #171a33, #101427);
}

.plume-adventure .pa-stage {
    position: relative;
    width: min(100%, 1440px);
    width: min(100%, calc(175dvh - 280px), 1440px);
    aspect-ratio: 1659 / 948;
    margin: 0 auto;
    overflow: hidden;
    border: clamp(3px, 0.42vw, 7px) solid #3b3150;
    border-radius: 31px 48px 34px 43px / 39px 30px 45px 34px;
    background: #11172b;
    box-shadow:
        0 0 0 2px rgba(225, 192, 119, 0.48),
        0 0 0 7px rgba(25, 22, 44, 0.76),
        0 24px 65px rgba(6, 8, 20, 0.56),
        inset 0 0 55px rgba(9, 11, 24, 0.28);
    isolation: isolate;
}

.plume-adventure .pa-stage::before {
    position: absolute;
    z-index: 12;
    inset: 0;
    border: 1px solid rgba(255, 247, 218, 0.17);
    border-radius: inherit;
    box-shadow: inset 0 0 24px rgba(10, 11, 24, 0.45);
    content: '';
    pointer-events: none;
}

.plume-adventure #pa-canvas,
.plume-adventure .pa-stage > canvas {
    position: absolute;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: auto;
    touch-action: none;
}

.plume-adventure .pa-scene-shade {
    position: absolute;
    z-index: 2;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(8, 10, 23, 0.46) 0%,
            transparent 18%,
            transparent 65%,
            rgba(9, 10, 22, 0.48) 100%
        ),
        linear-gradient(
            90deg,
            rgba(8, 10, 23, 0.18),
            transparent 17%,
            transparent 83%,
            rgba(8, 10, 23, 0.17)
        );
    pointer-events: none;
}

.plume-adventure .pa-hotspots {
    position: absolute;
    z-index: 7;
    inset: 0;
    pointer-events: none;
}

.plume-adventure .pa-hotspot {
    position: absolute;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    color: var(--pa-cream);
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
    transform: translate(-50%, -50%);
}

.plume-adventure .pa-hotspot-dot {
    position: relative;
    display: block;
    width: 13px;
    height: 13px;
    border: 2px solid var(--pa-cream);
    border-radius: 50%;
    background: var(--pa-gold);
    box-shadow:
        0 0 0 5px rgba(242, 217, 141, 0.18),
        0 0 19px rgba(255, 221, 121, 0.72);
    transition:
        transform 160ms ease,
        background-color 160ms ease;
}

.plume-adventure .pa-hotspot-dot::after {
    position: absolute;
    inset: -10px;
    border: 1px solid rgba(255, 237, 175, 0.68);
    border-radius: 50%;
    content: '';
    animation: pa-hotspot-pulse 2.2s ease-out infinite;
}

.plume-adventure .pa-hotspot-label {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    width: max-content;
    max-width: min(220px, 48vw);
    padding: 0.42rem 0.66rem;
    color: var(--pa-cream);
    border: 1px solid rgba(244, 222, 161, 0.4);
    border-radius: 9px 13px 10px 12px;
    background: rgba(23, 22, 43, 0.91);
    box-shadow: var(--pa-shadow-small);
    font-size: clamp(0.72rem, 1.25vw, 0.84rem);
    font-weight: 800;
    line-height: 1.25;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 7px) scale(0.96);
    transition:
        opacity 150ms ease,
        transform 150ms ease;
    backdrop-filter: blur(6px);
}

.plume-adventure .pa-hotspot:hover .pa-hotspot-dot,
.plume-adventure .pa-hotspot:focus-visible .pa-hotspot-dot,
.plume-adventure .pa-hotspot.is-near .pa-hotspot-dot,
.plume-adventure .pa-hotspot[aria-current='true'] .pa-hotspot-dot {
    background: var(--pa-cream);
    transform: scale(1.25);
}

.plume-adventure .pa-hotspot:hover .pa-hotspot-label,
.plume-adventure .pa-hotspot:focus-visible .pa-hotspot-label,
.plume-adventure .pa-hotspot.is-near .pa-hotspot-label,
.plume-adventure .pa-hotspot[aria-current='true'] .pa-hotspot-label,
.plume-adventure .pa-hotspot[data-value='npc'] .pa-hotspot-label,
.plume-adventure .pa-hotspot[data-value='task'] .pa-hotspot-label {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

.plume-adventure .pa-hotspot[data-value='exit'] .pa-hotspot-label {
    right: 0;
    left: auto;
    transform: translate(0, 7px) scale(0.96);
}

.plume-adventure .pa-hotspot[data-value='exit']:hover .pa-hotspot-label,
.plume-adventure .pa-hotspot[data-value='exit']:focus-visible .pa-hotspot-label,
.plume-adventure .pa-hotspot[data-value='exit'].is-near .pa-hotspot-label {
    transform: translate(0, 0) scale(1);
}

.plume-adventure .pa-hotspot[data-value='look'] .pa-hotspot-label,
.plume-adventure .pa-hotspot[data-value='home'] .pa-hotspot-label {
    right: auto;
    left: 0;
    transform: translate(0, 7px) scale(0.96);
}

.plume-adventure .pa-hotspot[data-value='look']:hover .pa-hotspot-label,
.plume-adventure .pa-hotspot[data-value='look']:focus-visible .pa-hotspot-label,
.plume-adventure .pa-hotspot[data-value='look'].is-near .pa-hotspot-label,
.plume-adventure .pa-hotspot[data-value='home']:hover .pa-hotspot-label,
.plume-adventure .pa-hotspot[data-value='home']:focus-visible .pa-hotspot-label,
.plume-adventure .pa-hotspot[data-value='home'].is-near .pa-hotspot-label {
    transform: translate(0, 0) scale(1);
}

.plume-adventure .pa-hotspot[data-value='secret'] .pa-hotspot-label {
    max-width: 100px;
    white-space: normal;
}

.plume-adventure .pa-location {
    position: absolute;
    z-index: 6;
    top: clamp(0.65rem, 2vw, 1.35rem);
    left: clamp(0.65rem, 2vw, 1.35rem);
    max-width: min(470px, 50%);
    padding: 0.65rem 0.86rem 0.7rem;
    color: var(--pa-cream);
    border-left: 3px solid var(--pa-gold);
    border-radius: 6px 16px 16px 8px;
    background: linear-gradient(90deg, rgba(20, 20, 41, 0.88), rgba(20, 20, 41, 0.52));
    box-shadow: 0 8px 22px rgba(8, 9, 22, 0.18);
    text-shadow: 0 2px 8px rgba(8, 9, 20, 0.76);
    backdrop-filter: blur(7px);
}

.plume-adventure .pa-location h2 {
    margin: 0;
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-size: clamp(1rem, 2.2vw, 1.42rem);
    font-weight: 900;
    line-height: 1.1;
}

.plume-adventure .pa-location p {
    margin: 0.24rem 0 0;
    color: rgba(255, 249, 233, 0.79);
    font-size: clamp(0.72rem, 1.25vw, 0.86rem);
    line-height: 1.35;
}

.plume-adventure .pa-objective {
    position: absolute;
    z-index: 6;
    right: clamp(0.65rem, 2vw, 1.35rem);
    bottom: clamp(0.65rem, 2vw, 1.35rem);
    display: flex;
    max-width: min(440px, 48%);
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.8rem;
    color: var(--pa-ink);
    border: 1px solid rgba(255, 251, 229, 0.68);
    border-radius: 16px 11px 17px 12px;
    background:
        linear-gradient(rgba(255, 251, 234, 0.93), rgba(239, 220, 178, 0.94)),
        repeating-linear-gradient(0deg, transparent 0 7px, rgba(91, 64, 48, 0.04) 8px 9px);
    box-shadow: var(--pa-shadow-small);
}

.plume-adventure .pa-objective span {
    color: var(--pa-plum);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.plume-adventure .pa-objective strong {
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-size: clamp(0.78rem, 1.3vw, 0.92rem);
    line-height: 1.3;
}

.plume-adventure .pa-scene-controls {
    position: absolute;
    z-index: 9;
    top: clamp(0.65rem, 2vw, 1.35rem);
    right: clamp(0.65rem, 2vw, 1.35rem);
    display: flex;
    gap: 0.38rem;
}

.plume-adventure .pa-scene-controls button {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    color: var(--pa-cream);
    border: 1px solid rgba(255, 249, 233, 0.27);
    border-radius: 50%;
    background: rgba(20, 20, 42, 0.72);
    box-shadow: 0 5px 14px rgba(8, 9, 22, 0.24);
    cursor: pointer;
    transition:
        background-color 150ms ease,
        transform 150ms ease;
    backdrop-filter: blur(7px);
}

.plume-adventure .pa-scene-controls button:hover {
    background: rgba(81, 59, 99, 0.92);
    transform: translateY(-1px);
}

.plume-adventure .pa-toast {
    position: absolute;
    z-index: 24;
    bottom: clamp(4.3rem, 9vw, 6.8rem);
    left: 50%;
    width: max-content;
    max-width: min(520px, calc(100% - 2rem));
    padding: 0.6rem 0.9rem;
    color: var(--pa-cream);
    border: 1px solid rgba(246, 222, 152, 0.44);
    border-radius: 999px;
    background: rgba(29, 27, 51, 0.94);
    box-shadow: var(--pa-shadow-small);
    font-size: 0.88rem;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    text-align: center;
    transform: translate(-50%, 12px);
    transition:
        opacity 180ms ease,
        transform 180ms ease;
    backdrop-filter: blur(8px);
}

.plume-adventure .pa-toast.is-visible,
.plume-adventure .pa-toast[data-visible='true'],
.plume-adventure .pa-toast:not([hidden]) {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* Commandes tactiles : révélées sur les écrans tactiles ou étroits. */
.plume-adventure .pa-touch-controls {
    position: absolute;
    z-index: 10;
    bottom: clamp(0.55rem, 1.6vw, 1.15rem);
    left: clamp(0.55rem, 1.6vw, 1.15rem);
    display: none;
    grid-template-columns: repeat(3, 44px);
    grid-template-rows: repeat(2, 44px);
    gap: 0.22rem;
    filter: drop-shadow(0 7px 12px rgba(7, 8, 20, 0.28));
}

.plume-adventure .pa-touch-controls button,
.plume-adventure .pa-interact {
    display: grid;
    min-width: 44px;
    min-height: 44px;
    place-items: center;
    padding: 0.35rem;
    color: var(--pa-cream);
    border: 1px solid rgba(255, 249, 233, 0.4);
    background: rgba(38, 35, 65, 0.83);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 3px 0 rgba(14, 14, 31, 0.84);
    cursor: pointer;
    font-weight: 900;
    user-select: none;
    backdrop-filter: blur(6px);
}

.plume-adventure .pa-touch-controls button {
    border-radius: 12px;
}

.plume-adventure .pa-touch-controls button:first-child {
    grid-column: 2;
}

.plume-adventure .pa-touch-controls button:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
}

.plume-adventure .pa-touch-controls button:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
}

.plume-adventure .pa-touch-controls button:nth-child(4) {
    grid-column: 3;
    grid-row: 2;
}

.plume-adventure .pa-touch-controls button:active,
.plume-adventure .pa-interact:active {
    transform: translateY(2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 1px 0 rgba(14, 14, 31, 0.84);
}

.plume-adventure .pa-interact {
    position: absolute;
    z-index: 10;
    right: clamp(0.7rem, 1.8vw, 1.25rem);
    bottom: clamp(0.7rem, 1.8vw, 1.25rem);
    display: none;
    min-width: 72px;
    border-radius: 999px;
    background: rgba(135, 82, 54, 0.9);
}

/* Journal et inventaire, traités comme un petit pupitre de voyage. */
.plume-adventure .pa-dock {
    position: relative;
    z-index: 15;
    display: grid;
    width: min(100%, 1180px);
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(0.55rem, 1.5vw, 1rem);
    margin: clamp(0.65rem, 1.5vw, 1rem) auto 0;
    padding: 0.55rem clamp(0.6rem, 1.5vw, 1rem);
    color: var(--pa-paper);
    border: 1px solid rgba(231, 202, 133, 0.35);
    border-radius: 18px 25px 20px 22px;
    background:
        linear-gradient(105deg, rgba(73, 54, 79, 0.95), rgba(35, 36, 66, 0.97)),
        repeating-linear-gradient(90deg, transparent 0 26px, rgba(255, 255, 255, 0.025) 27px 28px);
    box-shadow: 0 12px 30px rgba(6, 8, 20, 0.35);
}

.plume-adventure .pa-journal-btn {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.45rem 0.76rem;
    color: var(--pa-ink);
    border: 1px solid #ead3a3;
    border-radius: 11px 15px 11px 16px;
    background: var(--pa-paper);
    box-shadow: 0 3px 0 #b58257;
    cursor: pointer;
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-weight: 900;
}

.plume-adventure .pa-inventory {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: clamp(0.35rem, 1vw, 0.65rem);
}

.plume-adventure .pa-item {
    position: relative;
    display: grid;
    min-width: 58px;
    min-height: 52px;
    grid-template-rows: 25px auto;
    place-items: center;
    padding: 0.3rem 0.45rem;
    color: var(--pa-paper);
    border: 1px solid rgba(245, 237, 218, 0.26);
    border-radius: 13px 10px 14px 11px;
    background: rgba(15, 17, 35, 0.42);
    cursor: pointer;
    transition:
        border-color 150ms ease,
        background-color 150ms ease,
        transform 150ms ease;
}

.plume-adventure .pa-item:hover,
.plume-adventure .pa-item.is-selected,
.plume-adventure .pa-item[aria-pressed='true'] {
    border-color: var(--pa-gold-light);
    background: rgba(118, 83, 77, 0.66);
    transform: translateY(-2px);
}

.plume-adventure .pa-item.is-empty {
    color: rgba(245, 237, 218, 0.68);
    border-style: dashed;
    opacity: 0.78;
}

.plume-adventure .pa-item.is-found {
    border-color: rgba(242, 217, 141, 0.52);
    background: rgba(98, 67, 89, 0.72);
}

.plume-adventure .pa-item-icon {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
}

.plume-adventure .pa-item-icon img,
.plume-adventure .pa-item-icon svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.plume-adventure .pa-item-label {
    max-width: 84px;
    overflow: hidden;
    font-size: 0.64rem;
    font-weight: 800;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plume-adventure .pa-dock-hint {
    max-width: 220px;
    margin: 0;
    color: rgba(245, 237, 218, 0.72);
    font-size: 0.72rem;
    line-height: 1.3;
    text-align: right;
}

/* Dialogue de scène : court, lisible et sans zone de texte défilante. */
.plume-adventure .pa-dialogue {
    position: absolute;
    z-index: 30;
    right: clamp(0.7rem, 2.5vw, 2.1rem);
    bottom: clamp(0.7rem, 2.5vw, 2.1rem);
    left: clamp(0.7rem, 2.5vw, 2.1rem);
    display: grid;
    grid-template-columns: clamp(66px, 9vw, 112px) minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(0.65rem, 1.6vw, 1.15rem);
    min-height: 112px;
    max-height: none;
    padding: 0.78rem clamp(0.75rem, 1.6vw, 1.25rem);
    color: var(--pa-ink);
    border: 2px solid #d6b56e;
    border-radius: 21px 30px 24px 18px;
    background:
        linear-gradient(rgba(255, 250, 234, 0.97), rgba(239, 222, 188, 0.98)),
        repeating-linear-gradient(0deg, transparent 0 8px, rgba(87, 61, 49, 0.045) 9px 10px);
    box-shadow:
        0 17px 42px rgba(8, 9, 22, 0.45),
        inset 0 0 18px rgba(141, 89, 48, 0.08);
}

.plume-adventure .pa-dialogue-portrait {
    align-self: stretch;
    overflow: hidden;
    border: 2px solid #6b5373;
    border-radius: 47% 53% 42% 58% / 55% 43% 57% 45%;
    background: linear-gradient(145deg, #6f78a7, #322d55);
    box-shadow: inset 0 0 16px rgba(255, 255, 255, 0.15);
}

.plume-adventure .pa-dialogue-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.plume-adventure .pa-dialogue-copy {
    min-width: 0;
}

.plume-adventure .pa-dialogue-copy strong,
.plume-adventure #pa-speaker {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--pa-plum-deep);
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-size: clamp(0.92rem, 1.7vw, 1.15rem);
    font-weight: 900;
}

.plume-adventure .pa-dialogue-copy p,
.plume-adventure #pa-dialogue-text {
    margin: 0;
    color: #30263b;
    font-size: clamp(0.82rem, 1.45vw, 1rem);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.plume-adventure #pa-dialogue-next,
.plume-adventure .pa-dialogue-next {
    min-width: 48px;
    min-height: 48px;
    padding: 0.55rem 0.72rem;
    color: var(--pa-cream);
    border: 0;
    border-radius: 50%;
    background: var(--pa-plum);
    box-shadow: 0 4px 0 var(--pa-plum-deep);
    cursor: pointer;
    font-weight: 900;
}

.plume-adventure #pa-dialogue-skip,
.plume-adventure .pa-dialogue-skip {
    position: absolute;
    top: 0.35rem;
    right: 0.55rem;
    min-width: 44px;
    min-height: 44px;
    padding: 0.35rem;
    color: #5b4e5d;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

/* Panneaux d'énigmes et journal. */
.plume-adventure .pa-panel {
    width: min(760px, calc(100% - 1.5rem));
    max-width: none;
    max-height: min(88dvh, 850px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    color: var(--pa-ink);
    border: 2px solid #b9814e;
    border-radius: 24px 31px 25px 20px;
    background:
        linear-gradient(rgba(250, 242, 219, 0.98), rgba(231, 214, 179, 0.99)),
        repeating-linear-gradient(0deg, transparent 0 10px, rgba(81, 61, 51, 0.035) 11px 12px);
    box-shadow:
        0 28px 90px rgba(5, 7, 18, 0.62),
        inset 0 0 45px rgba(126, 85, 53, 0.08);
}

.plume-adventure .pa-panel::backdrop {
    background: rgba(11, 13, 29, 0.72);
    backdrop-filter: blur(6px) saturate(0.75);
}

.plume-adventure .pa-panel[open] {
    animation: pa-panel-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.plume-adventure .pa-panel-head {
    position: sticky;
    z-index: 4;
    top: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.6rem 1rem;
    min-height: 72px;
    padding: 0.7rem 0.8rem 0.7rem clamp(1rem, 3vw, 1.6rem);
    color: var(--pa-cream);
    border-bottom: 2px solid #a46c43;
    background:
        linear-gradient(105deg, rgba(65, 49, 79, 0.98), rgba(39, 42, 72, 0.98)),
        repeating-linear-gradient(90deg, transparent 0 34px, rgba(255, 255, 255, 0.025) 35px 36px);
}

.plume-adventure .pa-panel-head .pa-kicker {
    grid-column: 1;
    margin: 0 0 0.08rem;
    font-size: 0.65rem;
}

.plume-adventure .pa-panel-head h2 {
    grid-column: 1;
    margin: 0;
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-size: clamp(1.18rem, 3vw, 1.65rem);
    font-weight: 900;
    line-height: 1.1;
}

.plume-adventure #pa-panel-close,
.plume-adventure .pa-panel-close {
    grid-row: 1 / span 2;
    grid-column: 2;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    padding: 0;
    color: var(--pa-cream);
    border: 1px solid rgba(255, 249, 233, 0.32);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    font-size: 1.2rem;
}

.plume-adventure #pa-panel-body,
.plume-adventure .pa-panel-body {
    min-width: 0;
    max-height: calc(min(88dvh, 850px) - 72px);
    padding: clamp(1rem, 3vw, 1.7rem);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: var(--pa-copper) rgba(81, 59, 99, 0.12);
}

.plume-adventure .pa-reward {
    display: grid;
    width: 92px;
    height: 92px;
    place-items: center;
    margin: 0 auto 1rem;
    color: #2e2540;
    border: 3px solid #f5dda0;
    border-radius: 46% 54% 43% 57% / 55% 43% 57% 45%;
    background: linear-gradient(145deg, #fff1bb, #c88945);
    box-shadow:
        0 8px 0 #875337,
        0 13px 27px rgba(63, 40, 40, 0.24),
        inset 0 2px 9px rgba(255, 255, 255, 0.55);
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-size: 2.7rem;
    font-weight: 900;
}

.plume-adventure .pa-passcode {
    width: fit-content;
    min-width: min(100%, 230px);
    margin: 0.7rem auto;
    padding: 0.72rem 1.2rem;
    color: #fff9e9;
    border: 2px dashed #e8cb83;
    border-radius: 12px;
    background: #3a2a4c;
    box-shadow: 0 5px 14px rgba(34, 24, 45, 0.22);
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-size: clamp(1.15rem, 4vw, 1.55rem);
    font-weight: 900;
    letter-spacing: 0.13em;
    text-align: center;
    overflow-wrap: anywhere;
}

.plume-adventure .pa-panel .pa-fineprint {
    color: #5c5058;
    text-shadow: none;
}

.plume-adventure .pa-resume-form,
.plume-adventure #pa-resume-form {
    display: grid;
    max-width: 470px;
    gap: 0.65rem;
    margin: 1rem auto 0;
}

.plume-adventure .pa-resume-form label,
.plume-adventure #pa-resume-form label {
    color: var(--pa-plum-deep);
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-weight: 900;
}

.plume-adventure .pa-resume-form input,
.plume-adventure #pa-resume-form input,
.plume-adventure #pa-code {
    width: 100%;
    min-height: 50px;
    padding: 0.65rem 0.85rem;
    color: var(--pa-ink);
    border: 2px solid #8e735e;
    border-radius: 12px 16px 13px 15px;
    background: #fffdf5;
    box-shadow: inset 0 2px 7px rgba(63, 45, 39, 0.1);
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.plume-adventure .pa-resume-form input::placeholder,
.plume-adventure #pa-resume-form input::placeholder,
.plume-adventure #pa-code::placeholder {
    color: #756979;
    opacity: 0.82;
}

.plume-adventure .pa-panel-intro,
.plume-adventure .pa-story-card {
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    border-left: 4px solid var(--pa-copper);
    border-radius: 7px 15px 15px 8px;
    background: rgba(255, 252, 239, 0.64);
    line-height: 1.65;
}

.plume-adventure .pa-panel-intro > :first-child,
.plume-adventure .pa-story-card > :first-child {
    margin-top: 0;
}

.plume-adventure .pa-panel-intro > :last-child,
.plume-adventure .pa-story-card > :last-child {
    margin-bottom: 0;
}

.plume-adventure .pa-puzzle-board,
.plume-adventure .pa-workbench {
    position: relative;
    padding: clamp(0.85rem, 2vw, 1.25rem);
    border: 2px solid #b6875d;
    border-radius: 21px 14px 24px 16px;
    background:
        linear-gradient(rgba(112, 75, 54, 0.08), rgba(71, 58, 64, 0.04)),
        repeating-linear-gradient(
            92deg,
            rgba(255, 250, 231, 0.44) 0 28px,
            rgba(153, 110, 73, 0.08) 29px 30px
        );
    box-shadow: inset 0 3px 12px rgba(87, 54, 37, 0.13);
}

.plume-adventure .pa-counter {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    gap: 0.38rem;
    padding: 0.38rem 0.7rem;
    color: var(--pa-cream);
    border-radius: 999px;
    background: var(--pa-plum-deep);
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-weight: 900;
}

.plume-adventure .pa-pieces,
.plume-adventure .pa-slots {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    margin: 0.8rem 0;
}

.plume-adventure .pa-piece,
.plume-adventure .pa-slot,
.plume-adventure .pa-pieces > .pa-button,
.plume-adventure .pa-slots > .pa-button {
    display: grid;
    min-width: 54px;
    min-height: 54px;
    place-items: center;
    padding: 0.5rem;
    color: var(--pa-ink);
    border: 2px solid #9e7658;
    border-radius: 13px 17px 12px 16px;
    background: #fff8e5;
    box-shadow: 0 4px 0 #a26f47;
    cursor: pointer;
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-weight: 900;
    transition:
        filter 140ms ease,
        transform 140ms ease;
}

.plume-adventure .pa-piece:hover,
.plume-adventure .pa-slot:hover,
.plume-adventure .pa-pieces > .pa-button:hover,
.plume-adventure .pa-slots > .pa-button:hover {
    filter: brightness(1.05);
    transform: translateY(-2px) rotate(-1deg);
}

.plume-adventure .pa-piece[aria-pressed='true'],
.plume-adventure .pa-piece.is-selected,
.plume-adventure .pa-pieces > .pa-button[aria-pressed='true'] {
    border-color: var(--pa-plum);
    background: #e6def0;
    box-shadow: 0 4px 0 var(--pa-plum-deep);
}

.plume-adventure .pa-slot {
    border-style: dashed;
    background: rgba(255, 252, 237, 0.42);
    box-shadow: inset 0 0 0 3px rgba(106, 74, 58, 0.07);
}

.plume-adventure .pa-slots > .pa-button {
    border-style: dashed;
    background: rgba(255, 252, 237, 0.42);
    box-shadow: inset 0 0 0 3px rgba(106, 74, 58, 0.07);
}

.plume-adventure .pa-slot.is-filled,
.plume-adventure .pa-slots > [data-action='sequence-remove'] {
    border-style: solid;
    border-color: var(--pa-moss);
    background: #e4ead5;
    box-shadow: 0 4px 0 #71805e;
}

.plume-adventure .pa-puzzle-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
    margin-top: 1rem;
}

.plume-adventure .pa-feedback {
    min-height: 46px;
    margin-top: 1rem;
    padding: 0.68rem 0.82rem;
    border: 1px solid rgba(81, 59, 99, 0.2);
    border-radius: 11px 16px 12px 15px;
    background: rgba(255, 252, 239, 0.54);
    font-weight: 700;
    line-height: 1.45;
}

.plume-adventure .pa-feedback:empty {
    display: none;
}

.plume-adventure .pa-feedback.is-success {
    color: #20482f;
    border-color: #75a17f;
    background: #e1eddb;
}

.plume-adventure .pa-feedback.is-error {
    color: #6f2828;
    border-color: #c98176;
    background: #f3ded4;
}

/* Pont : les planches gardent une silhouette lisible même sans illustration. */
.plume-adventure .pa-bridge-rows {
    display: grid;
    gap: 0.7rem;
    margin: 1rem auto;
}

.plume-adventure .pa-bridge-row {
    display: grid;
    grid-template-columns: minmax(132px, auto) minmax(150px, 1fr) auto;
    min-height: 52px;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem;
    border: 1px solid transparent;
    border-radius: 17px 23px 18px 20px;
    background: rgba(72, 82, 69, 0.11);
}

.plume-adventure .pa-bridge-row.is-selected {
    border-color: #8c744f;
    background: rgba(244, 222, 165, 0.55);
    box-shadow: 0 3px 12px rgba(72, 53, 43, 0.11);
}

.plume-adventure .pa-bridge-row > .pa-button {
    min-height: 44px;
    padding: 0.5rem 0.72rem;
    font-size: 0.82rem;
}

.plume-adventure .pa-bridge-row.is-selected > .pa-button,
.plume-adventure .pa-bridge-row > .pa-button[aria-pressed='true'] {
    color: #251e2e;
    border-color: #e2c37d;
    background: #f2d98d;
    box-shadow: 0 3px 0 #9b6941;
}

.plume-adventure .pa-bridge-span {
    display: flex;
    min-width: 0;
    min-height: 50px;
    align-items: center;
    gap: 0.28rem;
    padding: 0.35rem;
    overflow: hidden;
    border-right: 4px solid #6d4d39;
    border-left: 4px solid #6d4d39;
    border-radius: 8px;
    background:
        linear-gradient(180deg, transparent 46%, rgba(92, 64, 46, 0.32) 47% 53%, transparent 54%),
        rgba(95, 126, 118, 0.12);
}

.plume-adventure .pa-bridge-row .pa-counter {
    min-width: 76px;
    justify-content: center;
    font-size: 0.78rem;
    white-space: nowrap;
}

.plume-adventure .pa-counter.is-success {
    color: #f8ffec;
    background: var(--pa-success);
    box-shadow: 0 0 0 3px rgba(63, 115, 83, 0.15);
}

.plume-adventure .pa-plank {
    display: grid;
    min-height: 44px;
    place-items: center;
    padding: 0.35rem 0.6rem;
    color: #3e271e;
    border: 2px solid #805337;
    border-radius: 9px 13px 8px 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.17), transparent 46%), #bb8250;
    box-shadow:
        inset 0 -4px 0 rgba(92, 52, 31, 0.15),
        0 3px 0 #6e462f;
    cursor: pointer;
    font-weight: 900;
}

.plume-adventure .pa-plank[data-size='1'] {
    flex: 1;
}

.plume-adventure .pa-plank[data-size='2'] {
    flex: 2;
}

.plume-adventure .pa-plank[data-size='3'] {
    flex: 3;
}

.plume-adventure .pa-plank.is-placed,
.plume-adventure .pa-plank[aria-pressed='true'] {
    border-color: #496548;
    filter: saturate(0.82);
}

/* Tuyauterie : grille stable à quatre colonnes. */
.plume-adventure .pa-pipe-labels {
    display: flex;
    width: min(100%, 480px);
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    margin: 0 auto 0.45rem;
    color: #44384d;
    font-size: 0.78rem;
}

.plume-adventure .pa-pipe-labels strong {
    color: #315e70;
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-weight: 900;
}

.plume-adventure .pa-pipe-grid {
    display: grid;
    width: min(100%, 480px);
    grid-template-columns: repeat(4, minmax(54px, 1fr));
    gap: clamp(0.35rem, 1.4vw, 0.65rem);
    margin: 1rem auto;
    padding: clamp(0.55rem, 2vw, 1rem);
    border: 2px solid #927052;
    border-radius: 17px;
    background: rgba(60, 65, 67, 0.1);
}

.plume-adventure .pa-pipe {
    display: grid;
    min-width: 0;
    aspect-ratio: 1;
    place-items: center;
    padding: 0.42rem;
    color: #69584e;
    border: 2px solid #887264;
    border-radius: 16px 12px 17px 13px;
    background: linear-gradient(145deg, #f4eddb, #bfb6a2);
    box-shadow:
        0 4px 0 #776151,
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
    cursor: pointer;
    transition:
        color 180ms ease,
        filter 180ms ease,
        transform 180ms ease;
}

.plume-adventure .pa-pipe:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
}

.plume-adventure .pa-pipe svg {
    width: 82%;
    height: 82%;
    overflow: visible;
    stroke: currentColor;
    filter: drop-shadow(0 2px 0 rgba(255, 255, 255, 0.52));
}

.plume-adventure .pa-pipe.is-flowing {
    color: #3e7282;
    border-color: #548895;
    background: linear-gradient(145deg, #edf4e9, #b8d5cc);
    box-shadow:
        0 4px 0 #4f7880,
        0 0 18px rgba(91, 168, 177, 0.26);
}

.plume-adventure .pa-pipe:disabled {
    cursor: default;
    color: #6c665d;
    border-color: #756b5f;
    background:
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.28), transparent 25%), #9b9281;
    box-shadow: inset 0 4px 9px rgba(64, 57, 51, 0.28);
    opacity: 1;
}

.plume-adventure .pa-pipe-out {
    width: min(100%, 480px);
    margin: 0.35rem auto 0;
    color: #315e70;
    font-size: 0.8rem;
    font-weight: 900;
    text-align: right;
}

.plume-adventure .pa-water-work {
    display: grid;
    max-width: 560px;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: clamp(1rem, 4vw, 2.4rem);
    margin: 0.8rem auto;
    padding: clamp(0.8rem, 2vw, 1.2rem);
    border: 2px solid rgba(82, 106, 112, 0.4);
    border-radius: 18px 25px 19px 22px;
    background: rgba(221, 235, 225, 0.43);
}

.plume-adventure .pa-water-work .pa-pieces {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    margin: 0;
}

.plume-adventure .pa-water-gauge {
    position: relative;
    width: 54px;
    height: 180px;
    margin: 1rem auto;
    overflow: hidden;
    border: 4px solid #58495e;
    border-radius: 26px 26px 18px 18px;
    background: rgba(255, 255, 255, 0.4);
    box-shadow: inset 0 4px 12px rgba(32, 28, 47, 0.15);
}

.plume-adventure .pa-water-gauge > strong {
    position: absolute;
    z-index: 3;
    right: 0;
    bottom: 0.45rem;
    left: 0;
    color: #172f3a;
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 900;
    text-align: center;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

.plume-adventure .pa-water-target {
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: 66.6667%;
    left: 0;
    min-height: 18px;
    padding: 0 0.12rem;
    color: #442b3e;
    border-top: 2px dashed #6f3d58;
    background: rgba(255, 249, 233, 0.8);
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1.45;
    text-align: center;
    white-space: nowrap;
    transform: translateY(50%);
}

.plume-adventure .pa-water-fill {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 0;
    border-radius: 12px 12px 10px 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.45), transparent 22%), #5d98a2;
    box-shadow: 0 -4px 12px rgba(103, 185, 189, 0.38);
    transition: height 420ms ease;
}

/* Semis : douze cases, quatre colonnes par trois rangées. */
.plume-adventure .pa-garden-beds {
    display: grid;
    gap: 0.7rem;
    margin: 0.8rem auto 1rem;
}

.plume-adventure .pa-garden-row {
    display: grid;
    grid-template-columns: minmax(88px, auto) minmax(0, 1fr) minmax(72px, auto);
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid rgba(94, 72, 46, 0.32);
    border-radius: 14px 19px 15px 17px;
    background: rgba(255, 249, 226, 0.42);
}

.plume-adventure .pa-garden-row > strong,
.plume-adventure .pa-garden-row > span {
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 900;
}

.plume-adventure .pa-garden-row > span {
    color: var(--pa-moss);
    text-align: right;
}

.plume-adventure .pa-garden-row .pa-seed-grid {
    width: 100%;
    grid-template-columns: repeat(6, minmax(44px, 1fr));
    gap: 0.3rem;
    margin: 0;
    padding: 0.42rem;
    border-width: 2px;
}

.plume-adventure .pa-seed-grid {
    display: grid;
    width: min(100%, 520px);
    grid-template-columns: repeat(4, minmax(54px, 1fr));
    gap: clamp(0.4rem, 1.5vw, 0.75rem);
    margin: 1rem auto;
    padding: clamp(0.6rem, 2vw, 1rem);
    border: 3px solid #7c5c42;
    border-radius: 19px 14px 22px 16px;
    background:
        radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.08) 0 2px, transparent 3px),
        #755438;
    box-shadow: inset 0 8px 18px rgba(52, 30, 20, 0.28);
}

.plume-adventure .pa-seed-cell {
    position: relative;
    display: grid;
    min-width: 0;
    aspect-ratio: 1;
    place-items: center;
    padding: 0.3rem;
    color: #f7e7c2;
    border: 2px solid rgba(230, 202, 146, 0.5);
    border-radius: 50% 47% 52% 45%;
    background: #4f392a;
    box-shadow: inset 0 5px 9px rgba(28, 16, 12, 0.38);
    cursor: pointer;
    font-weight: 900;
}

.plume-adventure .pa-seed-cell.is-planted {
    color: #1f432d;
    border-color: #8ea26e;
    background: #b9c78c;
    box-shadow:
        inset 0 -5px 9px rgba(70, 94, 60, 0.19),
        0 0 14px rgba(133, 167, 92, 0.26);
}

.plume-adventure .pa-seed-cell.is-planted::after {
    width: 20px;
    height: 27px;
    border-radius: 90% 15% 88% 18%;
    background: #527048;
    content: '';
    transform: rotate(34deg);
}

/* Cartes de récit, mots et constellation. */
.plume-adventure .pa-word {
    display: inline-block;
    margin: 0.2rem;
    padding: 0.38rem 0.62rem;
    color: var(--pa-plum-deep);
    border: 1px solid #b79b6f;
    border-radius: 8px 11px 9px 12px;
    background: #fff9e8;
    box-shadow: 0 2px 0 #c09a6b;
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-weight: 900;
}

.plume-adventure button.pa-word {
    min-height: 44px;
    cursor: pointer;
}

.plume-adventure .pa-word.is-selected,
.plume-adventure .pa-word[aria-pressed='true'] {
    color: var(--pa-cream);
    border-color: var(--pa-plum-deep);
    background: var(--pa-plum);
    box-shadow: 0 2px 0 #2f243d;
}

.plume-adventure .pa-star-board {
    position: relative;
    width: min(100%, 560px);
    margin: 1rem auto;
}

.plume-adventure .pa-star-grid {
    display: grid;
    width: min(100%, 560px);
    grid-template-columns: repeat(5, minmax(48px, 1fr));
    gap: clamp(0.35rem, 1.2vw, 0.62rem);
    margin: 0;
    padding: clamp(0.65rem, 2vw, 1rem);
    border: 2px solid #655b7b;
    border-radius: 21px;
    background:
        radial-gradient(circle at 16% 23%, rgba(255, 245, 198, 0.32) 0 1px, transparent 2px),
        radial-gradient(circle at 72% 68%, rgba(255, 245, 198, 0.22) 0 1px, transparent 2px),
        #252644;
    background-size:
        80px 80px,
        110px 110px,
        auto;
}

.plume-adventure .pa-constellation-lines {
    position: absolute;
    z-index: 3;
    inset: clamp(0.65rem, 2vw, 1rem);
    width: calc(100% - clamp(0.65rem, 2vw, 1rem) - clamp(0.65rem, 2vw, 1rem));
    height: calc(100% - clamp(0.65rem, 2vw, 1rem) - clamp(0.65rem, 2vw, 1rem));
    max-width: none;
    overflow: visible;
    pointer-events: none;
    filter: drop-shadow(0 0 5px rgba(255, 225, 126, 0.75));
}

.plume-adventure .pa-star-cell {
    position: relative;
    z-index: 2;
    display: grid;
    min-width: 0;
    aspect-ratio: 1;
    place-items: center;
    padding: 0.25rem;
    color: #87829d;
    border: 1px solid rgba(238, 225, 178, 0.25);
    border-radius: 50%;
    background: rgba(12, 14, 31, 0.45);
    box-shadow: inset 0 0 12px rgba(4, 5, 16, 0.5);
    cursor: pointer;
}

.plume-adventure .pa-star-cell:disabled {
    cursor: default;
    opacity: 1;
}

.plume-adventure .pa-star-cell.is-current {
    outline: 3px solid #fff4c0;
    outline-offset: -5px;
}

.plume-adventure .pa-star-cell.is-lit,
.plume-adventure .pa-star-cell[aria-pressed='true'] {
    color: #fff0ad;
    border-color: #e8cb70;
    background: #8e7343;
    box-shadow:
        0 0 20px rgba(255, 223, 117, 0.62),
        inset 0 0 11px rgba(255, 244, 191, 0.66);
}

.plume-adventure .pa-directions {
    display: grid;
    width: min(100%, 260px);
    grid-template-columns: repeat(4, minmax(44px, 1fr));
    gap: 0.45rem;
    margin: 0.8rem auto;
}

.plume-adventure .pa-directions .pa-button {
    min-height: 50px;
    padding: 0.45rem;
    font-size: 1.25rem;
}

/* Journal, carte et réglages. */
.plume-adventure .pa-journal-list {
    display: grid;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.plume-adventure .pa-journal-list li {
    position: relative;
    min-height: 48px;
    padding: 0.7rem 0.85rem 0.7rem 2.7rem;
    border: 1px solid rgba(81, 59, 99, 0.18);
    border-radius: 10px 15px 11px 14px;
    background: rgba(255, 252, 239, 0.56);
}

.plume-adventure .pa-journal-list li::before {
    position: absolute;
    top: 50%;
    left: 0.85rem;
    width: 16px;
    height: 16px;
    border: 2px solid #8f765d;
    border-radius: 50%;
    content: '';
    transform: translateY(-50%);
}

.plume-adventure .pa-journal-list li.is-done {
    color: #355440;
    border-color: rgba(69, 106, 78, 0.38);
    background: rgba(218, 233, 211, 0.68);
}

.plume-adventure .pa-journal-list li.is-done::before {
    border-color: var(--pa-success);
    background: var(--pa-success);
    box-shadow: inset 0 0 0 3px #e6efdd;
}

.plume-adventure .pa-journal-list li.is-current {
    border-color: #a77d46;
    background: #f7e7bd;
    box-shadow: 0 4px 12px rgba(100, 66, 43, 0.14);
    font-weight: 800;
}

.plume-adventure .pa-journal-list li.is-current::before {
    border-color: var(--pa-copper);
    background: var(--pa-gold-light);
    box-shadow: 0 0 0 4px rgba(212, 164, 79, 0.17);
}

.plume-adventure .pa-map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.plume-adventure .pa-map-grid button {
    position: relative;
    min-height: 92px;
    padding: 0.72rem;
    color: var(--pa-ink);
    border: 2px solid #a47c55;
    border-radius: 17px 12px 19px 14px;
    background:
        linear-gradient(rgba(248, 236, 201, 0.9), rgba(220, 198, 153, 0.92)),
        repeating-linear-gradient(45deg, transparent 0 14px, rgba(86, 61, 47, 0.04) 15px 16px);
    box-shadow: 0 4px 0 #846244;
    cursor: pointer;
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-weight: 900;
    text-align: left;
    overflow: hidden;
}

.plume-adventure .pa-map-place img {
    width: calc(100% + 1.44rem);
    height: 92px;
    margin: -0.72rem -0.72rem 0.62rem;
    object-fit: cover;
    border-bottom: 1px solid rgba(91, 64, 45, 0.3);
}

.plume-adventure .pa-map-place strong,
.plume-adventure .pa-map-place span {
    display: block;
}

.plume-adventure .pa-map-place strong {
    color: var(--pa-plum-deep);
    line-height: 1.25;
}

.plume-adventure .pa-map-place span {
    margin-top: 0.3rem;
    color: #5d5052;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.35;
}

.plume-adventure .pa-map-grid button.is-current,
.plume-adventure .pa-map-grid button[aria-current='true'] {
    border-color: var(--pa-plum);
    background: #e5d9e8;
    box-shadow:
        0 4px 0 var(--pa-plum-deep),
        0 0 0 4px rgba(81, 59, 99, 0.12);
}

.plume-adventure .pa-map-grid button.is-locked,
.plume-adventure .pa-map-grid button:disabled {
    cursor: not-allowed;
    filter: grayscale(0.8);
    opacity: 0.58;
}

.plume-adventure .pa-settings {
    display: grid;
    gap: 0.7rem;
}

.plume-adventure .pa-settings > label,
.plume-adventure .pa-settings > div {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid rgba(81, 59, 99, 0.15);
}

.plume-adventure .pa-settings input[type='checkbox'] {
    width: 24px;
    height: 24px;
    accent-color: var(--pa-plum);
}

.plume-adventure .pa-settings input[type='range'] {
    width: min(220px, 48%);
    accent-color: var(--pa-plum);
}

.plume-adventure .pa-ending {
    max-width: 620px;
    margin: 0 auto;
    padding: clamp(1rem, 4vw, 2rem);
    text-align: center;
}

.plume-adventure .pa-ending > img {
    width: min(100%, 390px);
    max-height: 42dvh;
    margin: 0 auto 0.8rem;
    object-fit: contain;
}

.plume-adventure .pa-ending .pa-kicker {
    color: var(--pa-plum-deep);
}

.plume-adventure .pa-ending h2,
.plume-adventure .pa-ending h3 {
    margin: 0 0 0.7rem;
    color: var(--pa-plum-deep);
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-size: clamp(1.7rem, 5vw, 2.7rem);
    line-height: 1.05;
    text-wrap: balance;
}

.plume-adventure .pa-ending p {
    line-height: 1.7;
}

@keyframes pa-beacon-glow {
    0%,
    100% {
        opacity: 0.55;
        transform: scale(0.94);
    }

    50% {
        opacity: 1;
        transform: scale(1.08);
    }
}

@keyframes pa-hotspot-pulse {
    0% {
        opacity: 0.8;
        transform: scale(0.62);
    }

    75%,
    100% {
        opacity: 0;
        transform: scale(1.45);
    }
}

@keyframes pa-panel-in {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.975);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (pointer: coarse), (max-width: 820px) {
    .plume-adventure .pa-touch-controls {
        display: grid;
    }

    .plume-adventure .pa-interact {
        display: grid;
    }

    .plume-adventure .pa-objective {
        right: 0.55rem;
        bottom: 4.25rem;
        max-width: 52%;
    }
}

@media (max-width: 760px) {
    .plume-adventure .pa-header {
        min-height: 54px;
        padding: 0.32rem 0.65rem;
    }

    .plume-adventure .pa-brand {
        gap: 0.48rem;
        font-size: 0.86rem;
    }

    .plume-adventure .pa-brand::before {
        width: 9px;
        height: 17px;
    }

    .plume-adventure .pa-header-actions > a,
    .plume-adventure .pa-header-actions > button {
        padding: 0.35rem 0.55rem;
    }

    .plume-adventure .pa-game,
    .plume-adventure .pa-title,
    .plume-adventure .pa-play {
        min-height: calc(100dvh - 54px);
    }

    .plume-adventure .pa-title-art {
        background-image:
            linear-gradient(
                0deg,
                rgba(15, 16, 32, 0.9) 0%,
                rgba(20, 21, 41, 0.57) 58%,
                rgba(19, 21, 39, 0.12) 100%
            ),
            var(--pa-title-image, url('../images/plume-aventure/village.webp'));
        background-position: 62% center;
    }

    .plume-adventure .pa-title-content {
        justify-content: flex-end;
        padding: 2.5rem 1.05rem 1.5rem;
    }

    .plume-adventure .pa-title-plume {
        z-index: 1;
        top: 9%;
        right: 2%;
        bottom: auto;
        width: min(47vw, 220px);
        max-height: 35dvh;
        filter: drop-shadow(0 12px 18px rgba(12, 14, 29, 0.34));
    }

    .plume-adventure .pa-title-content::before {
        top: auto;
        bottom: 0.55rem;
        left: 0.4rem;
        width: calc(100% - 0.8rem);
        height: min(64%, 540px);
        border-radius: 24px 35px 20px 28px;
        transform: none;
    }

    .plume-adventure .pa-title h1 {
        max-width: 12ch;
        font-size: clamp(2.35rem, 12vw, 4.2rem);
    }

    .plume-adventure .pa-title-description {
        max-width: 44rem;
        font-size: 0.94rem;
        line-height: 1.55;
    }

    .plume-adventure .pa-play {
        padding: 0.35rem 0.3rem 0.7rem;
    }

    .plume-adventure .pa-stage {
        --pa-mobile-rail: 108px;
        display: grid;
        width: calc(100% - 0.35rem);
        grid-template-rows: auto var(--pa-mobile-rail);
        aspect-ratio: auto;
        border-width: 3px;
        border-radius: 19px 27px 21px 25px / 24px 19px 27px 21px;
    }

    .plume-adventure .pa-stage::after {
        position: relative;
        z-index: 0;
        display: block;
        width: 100%;
        grid-row: 1;
        aspect-ratio: 1659 / 948;
        content: '';
        pointer-events: none;
    }

    .plume-adventure #pa-canvas,
    .plume-adventure .pa-stage > canvas {
        top: 0;
        bottom: auto;
        height: auto;
        aspect-ratio: 1659 / 948;
    }

    .plume-adventure .pa-scene-shade,
    .plume-adventure .pa-hotspots {
        bottom: auto;
        width: 100%;
        height: auto;
        aspect-ratio: 1659 / 948;
    }

    .plume-adventure .pa-location {
        top: 0.45rem;
        left: 0.45rem;
        max-width: 55%;
        padding: 0.45rem 0.55rem;
    }

    .plume-adventure .pa-location p {
        display: none;
    }

    .plume-adventure .pa-scene-controls {
        top: 0.4rem;
        right: 0.4rem;
    }

    .plume-adventure .pa-scene-controls button {
        width: 44px;
        height: 44px;
    }

    .plume-adventure .pa-objective {
        right: 0.45rem;
        bottom: calc(var(--pa-mobile-rail) + 0.35rem);
        max-width: 58%;
        gap: 0.35rem;
        padding: 0.36rem 0.5rem;
    }

    .plume-adventure .pa-objective span {
        display: none;
    }

    .plume-adventure .pa-objective strong {
        font-size: 0.68rem;
    }

    .plume-adventure .pa-touch-controls {
        bottom: 0.3rem;
        left: 0.4rem;
        grid-template-columns: repeat(4, 44px);
        grid-template-rows: 44px;
        gap: 0.18rem;
    }

    .plume-adventure .pa-touch-controls button {
        min-width: 44px;
        min-height: 44px;
    }

    .plume-adventure .pa-touch-controls button:first-child,
    .plume-adventure .pa-touch-controls button:nth-child(2),
    .plume-adventure .pa-touch-controls button:nth-child(3),
    .plume-adventure .pa-touch-controls button:nth-child(4) {
        grid-row: 1;
    }

    .plume-adventure .pa-touch-controls button:first-child {
        grid-column: 1;
    }

    .plume-adventure .pa-touch-controls button:nth-child(2) {
        grid-column: 2;
    }

    .plume-adventure .pa-touch-controls button:nth-child(3) {
        grid-column: 3;
    }

    .plume-adventure .pa-touch-controls button:nth-child(4) {
        grid-column: 4;
    }

    .plume-adventure .pa-interact {
        right: 0.45rem;
        bottom: 0.45rem;
        min-width: 68px;
        min-height: 44px;
    }

    .plume-adventure .pa-toast {
        bottom: 54px;
        max-width: calc(100% - 1rem);
        padding: 0.45rem 0.7rem;
        border-radius: 14px;
        font-size: 0.76rem;
        line-height: 1.3;
    }

    .plume-adventure .pa-dock {
        grid-template-columns: auto minmax(0, 1fr);
        margin-top: 0.55rem;
        border-radius: 14px 19px 15px 18px;
    }

    .plume-adventure .pa-inventory {
        justify-content: flex-start;
        overflow-x: auto;
        padding: 0.2rem 0.1rem 0.35rem;
        overscroll-behavior-inline: contain;
        scrollbar-width: thin;
    }

    .plume-adventure .pa-item {
        min-width: 56px;
        flex: 0 0 auto;
    }

    .plume-adventure .pa-dock-hint {
        display: none;
    }

    .plume-adventure .pa-dialogue {
        right: 0.35rem;
        bottom: calc(var(--pa-mobile-rail) + 0.3rem);
        left: 0.35rem;
        grid-template-columns: 54px minmax(0, 1fr);
        gap: 0.5rem;
        min-height: 84px;
        max-height: none;
        padding: 0.55rem;
        border-radius: 15px 21px 17px 13px;
    }

    .plume-adventure .pa-dialogue-portrait {
        height: 66px;
        align-self: center;
    }

    .plume-adventure #pa-dialogue-next,
    .plume-adventure .pa-dialogue-next {
        width: 100%;
        min-height: 44px;
        grid-column: 1 / -1;
        border-radius: 11px 15px 12px 14px;
    }

    .plume-adventure .pa-dialogue-copy p,
    .plume-adventure #pa-dialogue-text {
        font-size: 0.75rem;
        line-height: 1.38;
    }

    .plume-adventure #pa-dialogue-skip,
    .plume-adventure .pa-dialogue-skip {
        top: -42px;
        right: 0;
        color: var(--pa-cream);
        border-radius: 999px;
        background: rgba(25, 24, 46, 0.78);
        text-decoration: none;
    }

    .plume-adventure .pa-panel {
        width: calc(100% - 0.7rem);
        max-height: 94dvh;
        border-radius: 18px 24px 19px 16px;
    }

    .plume-adventure .pa-panel-head {
        min-height: 66px;
        padding: 0.58rem 0.55rem 0.58rem 0.9rem;
    }

    .plume-adventure #pa-panel-body,
    .plume-adventure .pa-panel-body {
        max-height: calc(94dvh - 66px);
        padding: 0.85rem;
    }

    .plume-adventure .pa-map-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .plume-adventure .pa-bridge-row {
        grid-template-columns: minmax(0, 1fr) auto;
        overflow: hidden;
    }

    .plume-adventure .pa-bridge-row > .pa-button {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .plume-adventure .pa-bridge-span {
        width: 100%;
        grid-row: 2;
        grid-column: 1 / -1;
    }

    .plume-adventure .pa-bridge-row .pa-counter {
        min-width: 68px;
        padding-inline: 0.48rem;
    }

    .plume-adventure .pa-garden-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .plume-adventure .pa-garden-row .pa-seed-grid {
        grid-row: 2;
        grid-column: 1 / -1;
    }

    .plume-adventure .pa-water-work {
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 0.65rem;
        padding: 0.6rem;
    }

    .plume-adventure .pa-water-work .pa-pieces {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .plume-adventure .pa-settings > label,
    .plume-adventure .pa-settings > div {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.45rem;
    }

    .plume-adventure .pa-settings input[type='range'] {
        width: 100%;
    }
}

@media (max-width: 430px) {
    .plume-adventure .pa-start-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .plume-adventure .pa-start-actions .pa-button {
        width: 100%;
    }

    .plume-adventure .pa-level {
        align-self: flex-start;
    }

    .plume-adventure .pa-location h2 {
        font-size: 0.88rem;
    }

    .plume-adventure .pa-scene-controls {
        gap: 0.2rem;
    }

    .plume-adventure .pa-scene-controls button {
        width: 44px;
        height: 44px;
    }

    .plume-adventure .pa-hotspot-label {
        max-width: 145px;
        font-size: 0.68rem;
    }

    .plume-adventure .pa-item-label {
        max-width: 50px;
    }

    .plume-adventure .pa-dialogue {
        grid-template-columns: 45px minmax(0, 1fr);
        min-height: 78px;
    }

    .plume-adventure .pa-dialogue-copy strong,
    .plume-adventure #pa-speaker {
        font-size: 0.8rem;
    }

    .plume-adventure .pa-dialogue-copy p,
    .plume-adventure #pa-dialogue-text {
        font-size: 0.69rem;
        line-height: 1.3;
    }

    .plume-adventure .pa-pipe-grid,
    .plume-adventure .pa-seed-grid {
        gap: 0.3rem;
        padding: 0.42rem;
    }

    .plume-adventure .pa-pipe,
    .plume-adventure .pa-seed-cell {
        min-width: 0;
    }

    .plume-adventure .pa-star-grid {
        gap: 0.25rem;
        padding: 0.45rem;
    }
}

@media (max-width: 340px) {
    .plume-adventure .pa-garden-row .pa-seed-grid {
        grid-template-columns: repeat(3, minmax(44px, 1fr));
    }
}

@media (max-height: 560px) and (orientation: landscape) {
    .plume-adventure .pa-header {
        min-height: 48px;
    }

    .plume-adventure .pa-game,
    .plume-adventure .pa-title,
    .plume-adventure .pa-play {
        min-height: calc(100dvh - 48px);
    }

    .plume-adventure .pa-title-content {
        padding-block: 1.1rem;
    }

    .plume-adventure .pa-title-description {
        max-width: 62%;
        margin-top: 0.65rem;
        font-size: 0.86rem;
        line-height: 1.45;
    }

    .plume-adventure .pa-start-actions {
        margin-top: 0.75rem;
    }

    .plume-adventure .pa-fineprint {
        display: none;
    }

    .plume-adventure .pa-play {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 0.55rem;
    }

    .plume-adventure .pa-stage {
        width: 100%;
        width: min(100%, calc(177.7778dvh - 110px));
        margin: 0;
        justify-self: center;
    }

    .plume-adventure .pa-dock {
        width: 74px;
        max-height: calc(100dvh - 62px);
        grid-template-columns: 1fr;
        margin: 0;
        overflow-y: auto;
    }

    .plume-adventure .pa-inventory {
        flex-direction: column;
        overflow: visible;
    }

    .plume-adventure .pa-dock-hint,
    .plume-adventure .pa-item-label {
        display: none;
    }
}

@media (prefers-contrast: more) {
    .plume-adventure .pa-location,
    .plume-adventure .pa-scene-controls button,
    .plume-adventure .pa-hotspot-label {
        background: #15152d;
    }

    .plume-adventure .pa-objective,
    .plume-adventure .pa-dialogue,
    .plume-adventure .pa-panel {
        background: var(--pa-cream);
    }

    .plume-adventure .pa-button,
    .plume-adventure .pa-piece,
    .plume-adventure .pa-slot,
    .plume-adventure .pa-pipe,
    .plume-adventure .pa-seed-cell,
    .plume-adventure .pa-star-cell {
        border-width: 3px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .plume-adventure *,
    .plume-adventure *::before,
    .plume-adventure *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}


@media print {
    .plume-adventure .pa-family-reference {
        display: none !important;
    }
}
