/*
 * Plume et le phare des Lucioles — extension de la fête des cinq mondes.
 * Cette feuille complète plume-aventure.css sans modifier ses composants historiques.
 */

body.plume-adventure {
    --pa-festival-coral: #d87561;
    --pa-festival-teal: #3d8179;
    --pa-festival-sky: #6f89b9;
    --pa-festival-violet: #82618c;
    --pa-festival-leaf: #718b57;
    --pa-river-deep: #112b3c;
    --pa-river-blue: #2d7788;
}

/* Le livre d'expédition rejoint les commandes historiques du pupitre. */
.plume-adventure .pa-dock {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
}

.plume-adventure #pa-expedition,
.plume-adventure .pa-expedition-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-paper);
    border: 1px solid rgba(242, 217, 141, 0.55);
    border-radius: 15px 11px 16px 12px;
    background:
        linear-gradient(145deg, rgba(108, 72, 91, 0.96), rgba(51, 47, 82, 0.98)),
        repeating-linear-gradient(90deg, transparent 0 14px, rgba(255, 255, 255, 0.04) 15px 16px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 3px 0 #2c283f;
    cursor: pointer;
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.plume-adventure #pa-expedition:hover,
.plume-adventure .pa-expedition-btn:hover,
.plume-adventure #pa-expedition[aria-pressed='true'],
.plume-adventure .pa-expedition-btn[aria-pressed='true'] {
    border-color: var(--pa-gold-light);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 5px 0 #2c283f,
        0 9px 18px rgba(10, 11, 26, 0.24);
    transform: translateY(-2px);
}

/* Frise des cinq mondes dans l'en-tête. */
.plume-adventure .pa-world-progress {
    display: flex;
    min-width: min(32vw, 320px);
    align-items: center;
    justify-content: center;
    gap: clamp(0.25rem, 0.8vw, 0.55rem);
    margin-inline: auto;
    padding: 0.25rem 0.55rem;
}

.plume-adventure .pa-world-step {
    position: relative;
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    place-items: center;
    color: rgba(255, 249, 233, 0.64);
    border: 1px solid rgba(242, 217, 141, 0.3);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    font-size: 0.68rem;
    font-weight: 900;
    line-height: 1;
    transition:
        color 180ms ease,
        background-color 180ms ease,
        transform 180ms ease;
}

.plume-adventure .pa-world-step:not(:last-child)::after {
    position: absolute;
    top: 50%;
    left: calc(100% + 1px);
    width: clamp(0.25rem, 0.8vw, 0.55rem);
    height: 1px;
    background: rgba(242, 217, 141, 0.26);
    content: '';
}

.plume-adventure .pa-world-step.is-current,
.plume-adventure .pa-world-step[aria-current='step'] {
    color: #271d2d;
    border-color: var(--pa-gold-light);
    background: var(--pa-gold-light);
    box-shadow: 0 0 0 4px rgba(242, 217, 141, 0.15);
    transform: scale(1.08);
}

.plume-adventure .pa-world-step.is-complete {
    color: var(--pa-cream);
    border-color: rgba(186, 221, 177, 0.7);
    background: var(--pa-success);
}

.plume-adventure .pa-world-step.is-complete::before {
    content: '\2713';
}

.plume-adventure .pa-world-step.is-complete > span {
    display: none;
}

/* Carnet de terrain : compact au repos, déplié sans couper l'action. */
.plume-adventure .pa-field-notes {
    position: absolute;
    z-index: 11;
    top: clamp(5rem, 9vw, 6.4rem);
    bottom: auto;
    left: clamp(0.65rem, 2vw, 1.35rem);
    width: min(330px, 37%);
    color: var(--pa-ink);
    border: 1px solid rgba(255, 246, 210, 0.74);
    border-radius: 13px 19px 15px 11px;
    background:
        linear-gradient(150deg, rgba(255, 249, 226, 0.97), rgba(226, 207, 165, 0.97)),
        repeating-linear-gradient(0deg, transparent 0 8px, rgba(91, 64, 48, 0.05) 9px 10px);
    box-shadow:
        0 10px 26px rgba(8, 9, 22, 0.3),
        inset 4px 0 0 rgba(173, 110, 63, 0.4);
    overflow: hidden;
    transform-origin: left bottom;
    backdrop-filter: blur(8px);
}

.plume-adventure .pa-field-notes-toggle,
.plume-adventure .pa-field-notes > [data-action='quest-toggle'] {
    display: grid;
    width: 100%;
    min-height: 48px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.4rem 0.7rem;
    padding: 0.55rem 0.65rem 0.55rem 0.85rem;
    color: inherit;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.plume-adventure .pa-field-notes-toggle::after,
.plume-adventure .pa-field-notes > [data-action='quest-toggle']::after {
    display: grid;
    width: 26px;
    height: 26px;
    grid-row: 1 / span 2;
    grid-column: 2;
    place-items: center;
    border: 1px solid rgba(81, 59, 99, 0.26);
    border-radius: 50%;
    background: rgba(81, 59, 99, 0.08);
    content: '+';
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
    transition: transform 180ms ease;
}

.plume-adventure .pa-field-notes-toggle[aria-expanded='true']::after,
.plume-adventure .pa-field-notes.is-open > [data-action='quest-toggle']::after,
.plume-adventure .pa-field-notes > [data-action='quest-toggle'][aria-expanded='true']::after {
    content: '\2212';
    transform: rotate(180deg);
}

.plume-adventure .pa-field-notes-heading {
    color: var(--pa-plum);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    line-height: 1.2;
    text-transform: uppercase;
}

.plume-adventure .pa-field-notes-title {
    display: block;
    margin-top: 0.12rem;
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-size: clamp(0.76rem, 1.25vw, 0.9rem);
    font-weight: 900;
    line-height: 1.24;
}

.plume-adventure .pa-field-notes-progress {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #6d4a37;
    font-size: 0.68rem;
    font-weight: 900;
}

.plume-adventure .pa-field-notes-progress::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--pa-copper);
    box-shadow: 0 0 0 3px rgba(173, 110, 63, 0.13);
    content: '';
}

.plume-adventure .pa-field-notes-body {
    display: none;
    padding: 0 0.85rem 0.75rem;
    border-top: 1px dashed rgba(91, 64, 48, 0.24);
}

.plume-adventure .pa-field-notes.is-open .pa-field-notes-body,
.plume-adventure .pa-field-notes-body:not([hidden]),
.plume-adventure .pa-field-notes:has([aria-expanded='true']) .pa-field-notes-body {
    display: block;
    animation: pa-field-notes-in 180ms ease-out both;
}

.plume-adventure .pa-field-notes.is-open,
.plume-adventure .pa-field-notes:has([aria-expanded='true']) {
    z-index: 27;
}

.plume-adventure .pa-field-notes-body p {
    margin: 0.55rem 0 0;
    font-size: clamp(0.69rem, 1.15vw, 0.8rem);
    line-height: 1.4;
}

.plume-adventure .pa-quest-cargo {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.55rem;
}

.plume-adventure .pa-quest-cargo-item,
.plume-adventure .pa-quest-cargo > span {
    display: inline-flex;
    min-height: 27px;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.45rem;
    color: #4b364e;
    border: 1px solid rgba(81, 59, 99, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    font-size: 0.68rem;
    font-weight: 900;
}

.plume-adventure button.pa-quest-cargo-item,
.plume-adventure .pa-quest-cargo button[data-action='quest-select'] {
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    padding: 0.35rem 0.55rem;
    color: #4b364e;
    border: 1px solid rgba(81, 59, 99, 0.27);
    border-radius: 12px 16px 13px 14px;
    background: rgba(255, 255, 255, 0.48);
    box-shadow: 0 2px 0 rgba(126, 85, 53, 0.24);
    cursor: pointer;
}

.plume-adventure button.pa-quest-cargo-item:hover,
.plume-adventure button.pa-quest-cargo-item[aria-pressed='true'],
.plume-adventure .pa-quest-cargo button[data-action='quest-select']:hover,
.plume-adventure .pa-quest-cargo button[data-action='quest-select'][aria-pressed='true'] {
    color: var(--pa-cream);
    border-color: var(--pa-plum);
    background: var(--pa-plum);
}

.plume-adventure .pa-quest-cargo-icon {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    font-size: 1rem;
    line-height: 1;
}

.plume-adventure .pa-field-notes.is-complete {
    border-color: rgba(169, 214, 171, 0.9);
    box-shadow:
        0 10px 26px rgba(8, 9, 22, 0.3),
        inset 4px 0 0 var(--pa-success);
}

/* Cartons cinématiques et restauration d'un chapitre. */
.plume-adventure .pa-scene-caption {
    position: absolute;
    z-index: 23;
    top: 50%;
    left: 50%;
    width: max-content;
    max-width: min(78%, 640px);
    padding: 0.75rem clamp(1rem, 4vw, 2.25rem);
    color: var(--pa-cream);
    border-block: 1px solid rgba(242, 217, 141, 0.5);
    background: linear-gradient(90deg, transparent, rgba(19, 18, 39, 0.9) 16% 84%, transparent);
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-size: clamp(1.1rem, 3.4vw, 2.2rem);
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1.15;
    opacity: 0;
    pointer-events: none;
    text-align: center;
    text-shadow: 0 3px 13px rgba(4, 6, 18, 0.88);
    transform: translate(-50%, calc(-50% + 14px));
    transition:
        opacity 280ms ease,
        transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.plume-adventure .pa-scene-caption > span,
.plume-adventure .pa-scene-caption > strong {
    display: block;
}

.plume-adventure .pa-scene-caption > span {
    margin-bottom: 0.18rem;
    color: var(--pa-gold-light);
    font-size: 0.46em;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.plume-adventure .pa-scene-caption > strong {
    font-size: 1em;
    font-weight: 900;
}

.plume-adventure .pa-celebration {
    position: absolute;
    z-index: 26;
    top: clamp(4.7rem, 12%, 7rem);
    left: 50%;
    display: grid;
    width: max-content;
    max-width: min(88%, 620px);
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 1rem;
    color: #291f31;
    border: 2px solid rgba(255, 245, 198, 0.9);
    border-radius: 16px 23px 18px 20px;
    background: linear-gradient(135deg, #fff5c6, #e6bc67);
    box-shadow:
        0 0 0 5px rgba(242, 217, 141, 0.14),
        0 15px 35px rgba(8, 9, 22, 0.38);
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-size: clamp(0.82rem, 1.6vw, 1rem);
    font-weight: 900;
    opacity: 0;
    pointer-events: none;
    text-align: center;
    transform: translate(-50%, -16px) scale(0.94);
}

.plume-adventure .pa-celebration.is-visible,
.plume-adventure .pa-celebration[data-visible='true'] {
    animation: pa-celebration-in 2.6s ease both;
}

/* Objets de quête : leur silhouette diffère des interactions ordinaires. */
.plume-adventure .pa-stage:has(.pa-hotspot[data-value^='world-socket-']) .pa-objective,
.plume-adventure .pa-stage:has(.pa-music-pad) .pa-objective {
    visibility: hidden;
    opacity: 0;
}

.plume-adventure .pa-hotspot.pa-collectible .pa-hotspot-dot {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    color: #4a3040;
    border-color: #fff3bd;
    border-radius: 44% 56% 48% 52% / 57% 42% 58% 43%;
    background: linear-gradient(145deg, #fff0a5, #ce8247);
    box-shadow:
        0 0 0 5px rgba(242, 217, 141, 0.17),
        0 0 22px rgba(255, 221, 121, 0.76);
    font-size: 0.72rem;
    line-height: 1;
    transform: rotate(-8deg);
}

.plume-adventure .pa-hotspot.pa-collectible .pa-hotspot-dot::before {
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(86, 55, 45, 0.36);
    border-radius: inherit;
    content: '';
}

.plume-adventure .pa-hotspot.pa-collectible:hover .pa-hotspot-dot,
.plume-adventure .pa-hotspot.pa-collectible:focus-visible .pa-hotspot-dot,
.plume-adventure .pa-hotspot.pa-collectible.is-near .pa-hotspot-dot {
    transform: rotate(4deg) scale(1.18);
}

.plume-adventure .pa-hotspot.pa-collectible.is-carried,
.plume-adventure .pa-hotspot.pa-collectible.is-collected {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -78%) scale(0.45);
    transition:
        opacity 260ms ease,
        transform 360ms ease;
}

/* Pierres musicales de la fête, colorées mais lisibles sans dépendre de la couleur. */
.plume-adventure .pa-hotspot.pa-music-pad {
    width: clamp(46px, 5.2vw, 66px);
    height: clamp(46px, 5.2vw, 66px);
    color: #fffdf6;
    border: 2px solid rgba(255, 250, 225, 0.74);
    background: var(--pa-pad-color, var(--pa-festival-coral));
    box-shadow:
        inset 0 3px 0 rgba(255, 255, 255, 0.22),
        inset 0 -5px 0 rgba(26, 20, 39, 0.18),
        0 8px 18px rgba(7, 9, 22, 0.34);
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-size: clamp(1rem, 2.2vw, 1.35rem);
    font-weight: 900;
    text-shadow: 0 2px 4px rgba(23, 17, 33, 0.52);
    transition:
        box-shadow 120ms ease,
        filter 120ms ease,
        transform 120ms ease;
}

.plume-adventure .pa-hotspot.pa-music-pad[data-note='1'] {
    --pa-pad-color: var(--pa-festival-coral);
}

.plume-adventure .pa-hotspot.pa-music-pad[data-note='2'] {
    --pa-pad-color: var(--pa-festival-teal);
}

.plume-adventure .pa-hotspot.pa-music-pad[data-note='3'] {
    --pa-pad-color: var(--pa-festival-sky);
}

.plume-adventure .pa-hotspot.pa-music-pad[data-note='4'] {
    --pa-pad-color: var(--pa-festival-violet);
}

.plume-adventure .pa-hotspot.pa-music-pad[data-note='5'] {
    --pa-pad-color: var(--pa-festival-leaf);
}

.plume-adventure .pa-hotspot.pa-music-pad .pa-hotspot-dot {
    width: auto;
    height: auto;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.plume-adventure .pa-hotspot.pa-music-pad .pa-hotspot-dot::after {
    display: none;
}

.plume-adventure .pa-hotspot.pa-music-pad:hover,
.plume-adventure .pa-hotspot.pa-music-pad:focus-visible,
.plume-adventure .pa-hotspot.pa-music-pad.is-near,
.plume-adventure .pa-hotspot.pa-music-pad.is-lit {
    filter: brightness(1.16) saturate(1.08);
    box-shadow:
        inset 0 3px 0 rgba(255, 255, 255, 0.34),
        inset 0 -3px 0 rgba(26, 20, 39, 0.12),
        0 0 0 6px rgba(255, 244, 180, 0.2),
        0 0 24px rgba(255, 226, 134, 0.68);
    transform: translate(-50%, -50%) scale(1.1);
}

/* Le journal d'expédition : une carte par monde, avec action claire. */
.plume-adventure .pa-expedition-intro {
    max-width: 62ch;
    margin: 0 0 1rem;
    color: #4d3c4f;
    line-height: 1.6;
}

.plume-adventure .pa-expedition-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.plume-adventure .pa-expedition-card {
    position: relative;
    display: grid;
    min-width: 0;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 0.65rem 0.8rem;
    padding: 0.85rem;
    border: 1px solid rgba(122, 81, 57, 0.32);
    border-radius: 16px 22px 17px 14px;
    background:
        linear-gradient(150deg, rgba(255, 251, 236, 0.9), rgba(232, 213, 177, 0.9)),
        repeating-linear-gradient(0deg, transparent 0 9px, rgba(81, 61, 51, 0.04) 10px 11px);
    box-shadow:
        inset 0 0 18px rgba(126, 85, 53, 0.06),
        0 5px 14px rgba(76, 49, 40, 0.09);
}

.plume-adventure .pa-expedition-card::after {
    position: absolute;
    top: 0.55rem;
    right: 0.65rem;
    color: rgba(81, 59, 99, 0.36);
    content: attr(data-world);
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.plume-adventure .pa-expedition-card.is-current {
    border-color: rgba(173, 110, 63, 0.72);
    box-shadow:
        inset 4px 0 0 var(--pa-copper),
        0 8px 18px rgba(76, 49, 40, 0.13);
}

.plume-adventure .pa-expedition-card.is-complete {
    border-color: rgba(63, 115, 83, 0.46);
    background: linear-gradient(150deg, rgba(241, 247, 218, 0.93), rgba(201, 221, 180, 0.9));
}

.plume-adventure .pa-expedition-card.is-locked {
    filter: grayscale(0.35);
    opacity: 0.7;
}

.plume-adventure .pa-expedition-icon,
.plume-adventure .pa-expedition-card-icon {
    display: grid;
    width: 54px;
    height: 54px;
    grid-row: 1 / span 3;
    place-items: center;
    border: 1px solid rgba(255, 250, 225, 0.72);
    border-radius: 50% 46% 52% 44%;
    background: linear-gradient(145deg, var(--pa-plum), var(--pa-night-soft));
    box-shadow: 0 5px 12px rgba(31, 25, 45, 0.22);
    color: var(--pa-gold-light);
    font-size: 1.55rem;
}

.plume-adventure .pa-expedition-card.is-complete .pa-expedition-icon,
.plume-adventure .pa-expedition-card.is-complete .pa-expedition-card-icon {
    color: var(--pa-cream);
    background: linear-gradient(145deg, #64855c, #3f7353);
}

.plume-adventure .pa-expedition-card h3,
.plume-adventure .pa-expedition-title {
    margin: 0;
    padding-right: 2.4rem;
    color: var(--pa-plum-deep);
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.2;
}

.plume-adventure .pa-expedition-card p,
.plume-adventure .pa-expedition-description {
    margin: 0;
    color: #58485a;
    font-size: 0.77rem;
    line-height: 1.45;
}

.plume-adventure .pa-expedition-progress {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.4rem;
    color: #634852;
    font-size: 0.68rem;
    font-weight: 900;
}

.plume-adventure .pa-expedition-progress-bar {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(81, 59, 99, 0.14);
    box-shadow: inset 0 1px 2px rgba(51, 37, 54, 0.18);
}

.plume-adventure .pa-expedition-progress-bar > span,
.plume-adventure .pa-expedition-progress-bar > i {
    display: block;
    width: var(--pa-progress, 0%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--pa-copper), var(--pa-gold));
}

.plume-adventure .pa-expedition-card.is-complete .pa-expedition-progress-bar > span,
.plume-adventure .pa-expedition-card.is-complete .pa-expedition-progress-bar > i {
    width: 100%;
    background: var(--pa-success);
}

.plume-adventure .pa-expedition-actions {
    display: flex;
    grid-column: 1 / -1;
    justify-content: flex-end;
    gap: 0.45rem;
    padding-top: 0.15rem;
}

.plume-adventure .pa-expedition-actions .pa-button,
.plume-adventure .pa-expedition-card > .pa-button {
    min-height: 44px;
    padding: 0.45rem 0.72rem;
    font-size: 0.76rem;
}

/* Descente de rivière : jeu autonome au-dessus de la scène. */
.plume-adventure .pa-river {
    position: fixed;
    z-index: 120;
    inset: 0;
    display: grid;
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    place-items: center;
    margin: 0;
    padding: clamp(0.35rem, 1.5vw, 1rem);
    overflow: hidden;
    color: var(--pa-cream);
    border: 0;
    background:
        radial-gradient(circle at 52% 15%, rgba(101, 172, 180, 0.26), transparent 38%),
        linear-gradient(155deg, #0f2234, #11182d 68%, #1c1730);
    isolation: isolate;
}

.plume-adventure .pa-river::backdrop {
    background: rgba(7, 10, 23, 0.92);
}

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

.plume-adventure .pa-river::before {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 12% 30%, rgba(255, 244, 187, 0.45) 0 1px, transparent 2px),
        radial-gradient(circle at 82% 22%, rgba(255, 244, 187, 0.32) 0 1.5px, transparent 2.5px),
        radial-gradient(circle at 72% 78%, rgba(255, 244, 187, 0.28) 0 1px, transparent 2px);
    background-size:
        190px 150px,
        270px 210px,
        220px 180px;
    content: '';
    opacity: 0.55;
    pointer-events: none;
}

.plume-adventure .pa-river-shell {
    position: relative;
    display: grid;
    width: min(100%, 1440px);
    max-height: calc(100dvh - clamp(0.7rem, 3vw, 2rem));
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
    border: clamp(2px, 0.35vw, 5px) solid #314f61;
    border-radius: 22px 34px 25px 30px / 29px 23px 34px 25px;
    background: #102a3a;
    box-shadow:
        0 0 0 2px rgba(220, 200, 133, 0.48),
        0 24px 70px rgba(3, 8, 17, 0.72);
}

.plume-adventure .pa-river-head {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.55rem 1rem;
    min-height: 66px;
    padding: 0.55rem clamp(0.7rem, 2vw, 1.25rem);
    border-bottom: 1px solid rgba(239, 220, 156, 0.28);
    background: linear-gradient(100deg, rgba(21, 43, 56, 0.98), rgba(42, 35, 65, 0.98));
    box-shadow: 0 5px 16px rgba(5, 11, 22, 0.24);
}

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

.plume-adventure .pa-river-title small {
    display: block;
    margin-top: 0.15rem;
    color: rgba(255, 249, 233, 0.68);
    font-family: 'Open Sans', sans-serif;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.plume-adventure .pa-river-stats {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.plume-adventure .pa-river-stat {
    display: grid;
    min-width: 72px;
    min-height: 42px;
    place-items: center;
    padding: 0.3rem 0.55rem;
    border: 1px solid rgba(255, 249, 233, 0.2);
    border-radius: 11px 15px 12px 14px;
    background: rgba(7, 18, 31, 0.38);
    font-size: 0.75rem;
    font-weight: 900;
    line-height: 1.12;
    text-align: center;
}

.plume-adventure .pa-river-stat::before {
    display: block;
    color: rgba(255, 249, 233, 0.62);
    content: attr(data-label);
    font-size: 0.55rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.plume-adventure .pa-river-stat[data-river-stat='cargo'] {
    color: var(--pa-gold-light);
}

.plume-adventure .pa-river-head [data-river-action='exit'],
.plume-adventure .pa-river-close {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    color: var(--pa-cream);
    border: 1px solid rgba(255, 249, 233, 0.3);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    font-size: 1.05rem;
}

.plume-adventure .pa-river-canvas-wrap,
.plume-adventure .pa-river-shell > .pa-river-canvas {
    position: relative;
    min-height: 0;
}

.plume-adventure .pa-river-canvas {
    display: block;
    width: 100%;
    max-height: calc(100dvh - 150px);
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: linear-gradient(180deg, #80b6bb 0%, #5c9298 45%, #2d6f7d 46%, #183f58 100%);
    touch-action: none;
}

.plume-adventure .pa-river-objective {
    position: absolute;
    z-index: 4;
    top: 78px;
    left: clamp(0.8rem, 2.5vw, 1.8rem);
    max-width: min(390px, 58%);
    padding: 0.45rem 0.7rem;
    border: 1px solid rgba(255, 246, 210, 0.55);
    border-radius: 9px 15px 11px 13px;
    background: rgba(13, 31, 45, 0.78);
    box-shadow: 0 7px 18px rgba(3, 9, 17, 0.24);
    font-size: clamp(0.72rem, 1.25vw, 0.86rem);
    font-weight: 800;
    line-height: 1.35;
    pointer-events: none;
    backdrop-filter: blur(7px);
}

.plume-adventure .pa-river-feedback {
    position: absolute;
    z-index: 5;
    top: 50%;
    left: 50%;
    width: max-content;
    max-width: min(82%, 620px);
    padding: 0.65rem 1rem;
    border: 1px solid rgba(255, 246, 210, 0.54);
    border-radius: 999px;
    background: rgba(17, 31, 48, 0.9);
    box-shadow: 0 12px 30px rgba(4, 9, 18, 0.32);
    font-weight: 900;
    opacity: 0;
    pointer-events: none;
    text-align: center;
    transform: translate(-50%, calc(-50% + 10px));
    transition:
        opacity 180ms ease,
        transform 180ms ease;
}

.plume-adventure .pa-river-feedback.is-visible,
.plume-adventure .pa-river-feedback:not(:empty) {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.plume-adventure .pa-river-help {
    position: absolute;
    z-index: 4;
    right: clamp(0.8rem, 2.5vw, 1.8rem);
    bottom: 86px;
    max-width: 280px;
    margin: 0;
    padding: 0.4rem 0.65rem;
    color: rgba(255, 249, 233, 0.8);
    border-radius: 10px;
    background: rgba(8, 22, 34, 0.66);
    font-size: 0.68rem;
    line-height: 1.35;
    pointer-events: none;
    text-align: right;
}

.plume-adventure .pa-river-controls {
    position: relative;
    z-index: 4;
    display: flex;
    min-height: 66px;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem;
    border-top: 1px solid rgba(239, 220, 156, 0.25);
    background: linear-gradient(100deg, rgba(20, 42, 55, 0.98), rgba(38, 34, 62, 0.98));
}

.plume-adventure .pa-river-controls button {
    display: inline-flex;
    min-width: 54px;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.45rem 0.8rem;
    color: var(--pa-cream);
    border: 1px solid rgba(255, 249, 233, 0.34);
    border-radius: 13px 17px 14px 15px;
    background: rgba(57, 72, 90, 0.82);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.13),
        0 3px 0 rgba(5, 13, 24, 0.8);
    cursor: pointer;
    font-weight: 900;
    user-select: none;
    touch-action: manipulation;
}

.plume-adventure .pa-river-controls button:hover,
.plume-adventure .pa-river-controls button:focus-visible,
.plume-adventure .pa-river-controls button[aria-pressed='true'] {
    border-color: var(--pa-gold-light);
    background: rgba(93, 73, 100, 0.96);
}

.plume-adventure .pa-river-controls button:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 rgba(5, 13, 24, 0.8);
}

.plume-adventure .pa-river-controls [data-river-action='left'],
.plume-adventure .pa-river-controls [data-river-action='right'] {
    min-width: 78px;
    background: rgba(35, 104, 117, 0.92);
    font-size: 1.1rem;
}

.plume-adventure .pa-river-controls [data-river-action='advance'] {
    display: none;
    border-color: rgba(255, 246, 197, 0.7);
    background: linear-gradient(180deg, #c89443, #98603a);
}

.plume-adventure .pa-river-controls .pa-river-close {
    width: 50px;
    min-width: 50px;
    padding: 0;
    border-radius: 50%;
    font-size: 0;
}

.plume-adventure .pa-river-controls .pa-river-close::before {
    content: '\2715';
    font-size: 1rem;
}

.plume-adventure .pa-river.is-paced .pa-river-controls [data-river-action='advance'] {
    display: inline-flex;
}

.plume-adventure .pa-river.is-paused .pa-river-canvas {
    filter: saturate(0.62) brightness(0.78);
}

.plume-adventure .pa-river.is-paused .pa-river-shell::after {
    position: absolute;
    z-index: 3;
    top: 50%;
    left: 50%;
    padding: 0.6rem 1rem;
    border: 1px solid rgba(255, 246, 210, 0.56);
    border-radius: 999px;
    background: rgba(12, 24, 39, 0.9);
    content: 'Pause';
    font-family: 'Nunito', 'Open Sans', sans-serif;
    font-size: 1.05rem;
    font-weight: 900;
    transform: translate(-50%, -50%);
}

.plume-adventure .pa-river.is-complete .pa-river-shell {
    border-color: #d6b96e;
    box-shadow:
        0 0 0 5px rgba(242, 217, 141, 0.13),
        0 24px 70px rgba(3, 8, 17, 0.72);
}

@keyframes pa-field-notes-in {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

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

@keyframes pa-celebration-in {
    0% {
        opacity: 0;
        transform: translate(-50%, -16px) scale(0.94);
    }

    14%,
    82% {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -8px) scale(0.98);
    }
}

@media (max-width: 980px) {
    .plume-adventure .pa-world-progress {
        min-width: 0;
        gap: 0.25rem;
    }

    .plume-adventure .pa-world-step {
        width: 25px;
        height: 25px;
    }

    .plume-adventure .pa-world-step:not(:last-child)::after {
        width: 0.25rem;
    }

    .plume-adventure .pa-river-stat {
        min-width: 62px;
    }
}

@media (pointer: coarse), (max-width: 820px) {
    .plume-adventure .pa-field-notes {
        top: 6rem;
        bottom: auto;
        width: min(300px, 42%);
    }

    .plume-adventure .pa-field-notes-toggle,
    .plume-adventure .pa-field-notes > [data-action='quest-toggle'] {
        min-height: 44px;
    }

    .plume-adventure .pa-river-controls button {
        min-width: 58px;
        min-height: 52px;
    }
}

@media (max-width: 760px) {
    /* Keep every object on the scene reachable: information gets its own rows. */
    .plume-adventure .pa-stage {
        grid-template-rows: auto auto auto var(--pa-mobile-rail);
    }

    .plume-adventure .pa-stage .pa-objective {
        position: relative;
        inset: auto;
        grid-row: 2;
        justify-self: stretch;
        max-width: none;
        margin: 0.35rem 0.45rem 0;
        visibility: visible;
        opacity: 1;
    }

    .plume-adventure .pa-header .pa-world-progress {
        display: none;
    }

    .plume-adventure .pa-world-step {
        width: 22px;
        height: 22px;
        font-size: 0.58rem;
    }

    .plume-adventure .pa-field-notes {
        position: relative;
        inset: auto;
        grid-row: 3;
        margin: 0.35rem 0.45rem;
        width: auto;
        max-width: none;
        border-radius: 10px 14px 11px 9px;
    }

    .plume-adventure .pa-field-notes-toggle,
    .plume-adventure .pa-field-notes > [data-action='quest-toggle'] {
        min-height: 44px;
        padding: 0.32rem 0.4rem 0.32rem 0.55rem;
    }

    .plume-adventure .pa-field-notes-toggle::after,
    .plume-adventure .pa-field-notes > [data-action='quest-toggle']::after {
        width: 24px;
        height: 24px;
    }

    .plume-adventure .pa-field-notes-heading,
    .plume-adventure .pa-field-notes-progress {
        display: none;
    }

    .plume-adventure .pa-field-notes-title {
        margin: 0;
        font-size: 0.64rem;
    }

    .plume-adventure .pa-field-notes-body {
        position: relative;
        z-index: 40;
        bottom: auto;
        left: 0;
        width: auto;
        padding: 0.65rem 0.75rem;
        border: 1px solid rgba(255, 246, 210, 0.74);
        border-radius: 13px 18px 15px 12px;
        background: linear-gradient(150deg, #fff9e2, #e2cfa5);
        box-shadow: 0 14px 36px rgba(7, 8, 20, 0.44);
    }

    .plume-adventure .pa-field-notes.is-open,
    .plume-adventure .pa-field-notes:has([aria-expanded='true']) {
        overflow: visible;
    }

    .plume-adventure .pa-scene-caption {
        max-width: 88%;
        padding: 0.6rem 1rem;
        font-size: clamp(1rem, 5vw, 1.45rem);
    }

    .plume-adventure .pa-celebration {
        top: 3.7rem;
        padding: 0.55rem 0.7rem;
    }

    .plume-adventure .pa-hotspot.pa-music-pad {
        width: 46px;
        height: 46px;
        font-size: 0.92rem;
    }

    .plume-adventure .pa-interact {
        max-width: calc(100% - 205px);
        white-space: normal;
        font-size: 0.7rem;
        line-height: 1.2;
    }

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

    .plume-adventure #pa-expedition,
    .plume-adventure .pa-expedition-btn {
        width: 44px;
        padding: 0.35rem;
        overflow: hidden;
        font-size: 0;
    }

    .plume-adventure #pa-expedition::before,
    .plume-adventure .pa-expedition-btn::before {
        content: '\2736';
        font-size: 1.1rem;
    }

    .plume-adventure .pa-expedition-grid {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .plume-adventure .pa-expedition-card {
        grid-template-columns: 46px minmax(0, 1fr);
        padding: 0.7rem;
    }

    .plume-adventure .pa-expedition-icon,
    .plume-adventure .pa-expedition-card-icon {
        width: 46px;
        height: 46px;
        font-size: 1.3rem;
    }

    .plume-adventure .pa-river {
        padding: 0;
    }

    .plume-adventure .pa-river-shell {
        width: 100%;
        max-height: 100dvh;
        min-height: 100dvh;
        border: 0;
        border-radius: 0;
    }

    .plume-adventure .pa-river-head {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.4rem;
        min-height: 58px;
        padding: 0.38rem 0.5rem;
    }

    .plume-adventure .pa-river-title {
        font-size: 0.92rem;
    }

    .plume-adventure .pa-river-title small {
        display: none;
    }

    .plume-adventure .pa-river-stats {
        position: absolute;
        z-index: 2;
        top: 64px;
        right: 0.4rem;
        gap: 0.25rem;
    }

    .plume-adventure .pa-river-stat {
        min-width: 52px;
        min-height: 38px;
        padding: 0.22rem 0.35rem;
        background: rgba(8, 25, 38, 0.8);
        font-size: 0.68rem;
    }

    .plume-adventure .pa-river-head [data-river-action='exit'],
    .plume-adventure .pa-river-close {
        grid-column: 2;
    }

    .plume-adventure .pa-river-canvas {
        width: 100%;
        height: 100%;
        max-height: none;
        align-self: stretch;
        aspect-ratio: auto;
        object-fit: fill;
    }

    .plume-adventure .pa-river-objective {
        top: 64px;
        left: 0.4rem;
        max-width: 48%;
        padding: 0.32rem 0.45rem;
        font-size: 0.66rem;
    }

    .plume-adventure .pa-river-feedback {
        top: 136px;
        right: 0.45rem;
        left: 0.45rem;
        width: auto;
        max-width: none;
        padding: 0.42rem 0.6rem;
        border-radius: 11px 15px 12px 13px;
        font-size: 0.7rem;
        line-height: 1.35;
        text-align: left;
        transform: translateY(6px);
    }

    .plume-adventure .pa-river-feedback.is-visible,
    .plume-adventure .pa-river-feedback:not(:empty) {
        transform: translateY(0);
    }

    .plume-adventure .pa-river-help {
        display: none;
    }

    .plume-adventure .pa-river-controls {
        min-height: 72px;
        gap: 0.32rem;
        padding: 0.45rem;
    }

    .plume-adventure .pa-river-controls button {
        min-width: 48px;
        min-height: 52px;
        padding: 0.35rem 0.48rem;
        font-size: 0.72rem;
    }

    .plume-adventure .pa-river-controls [data-river-action='left'],
    .plume-adventure .pa-river-controls [data-river-action='right'] {
        min-width: 64px;
        font-size: 1rem;
    }
}

@media (max-width: 430px) {
    .plume-adventure .pa-field-notes {
        max-width: 42%;
    }

    .plume-adventure .pa-field-notes-title {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .plume-adventure .pa-expedition-card p,
    .plume-adventure .pa-expedition-description {
        font-size: 0.72rem;
    }

    .plume-adventure .pa-river-stats .pa-river-stat[data-river-stat='stage'] {
        display: none;
    }

    .plume-adventure .pa-river-controls {
        justify-content: space-between;
        gap: 0.2rem;
    }

    .plume-adventure .pa-river-controls button {
        min-width: 44px;
        min-height: 48px;
        padding-inline: 0.34rem;
    }

    .plume-adventure .pa-river-controls [data-river-action='left'],
    .plume-adventure .pa-river-controls [data-river-action='right'] {
        min-width: 58px;
    }
}

@media (max-height: 560px) and (orientation: landscape) {
    .plume-adventure .pa-field-notes {
        top: 90px;
        bottom: auto;
        width: min(220px, 35%);
        max-width: 35%;
    }

    .plume-adventure .pa-field-notes-toggle,
    .plume-adventure .pa-field-notes > [data-action='quest-toggle'] {
        min-height: 44px;
        padding: 0.35rem 0.45rem 0.35rem 0.6rem;
    }

    .plume-adventure .pa-field-notes-heading,
    .plume-adventure .pa-field-notes-progress {
        display: none;
    }

    .plume-adventure .pa-field-notes-title {
        margin: 0;
        overflow: hidden;
        font-size: 0.68rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .plume-adventure .pa-field-notes-body {
        position: absolute;
        top: 0;
        bottom: auto;
        left: calc(100% + 0.4rem);
        width: min(320px, 52vw);
        padding: 0.55rem 0.65rem;
        border: 1px solid rgba(255, 246, 210, 0.74);
        border-radius: 12px 16px 13px 11px;
        background: linear-gradient(150deg, #fff9e2, #e2cfa5);
        box-shadow: 0 12px 30px rgba(7, 8, 20, 0.4);
    }

    .plume-adventure .pa-field-notes.is-open,
    .plume-adventure .pa-field-notes:has([aria-expanded='true']) {
        overflow: visible;
    }

    .plume-adventure .pa-dock #pa-expedition,
    .plume-adventure .pa-dock .pa-expedition-btn {
        width: 52px;
        min-width: 52px;
        min-height: 44px;
        padding: 0.32rem;
        font-size: 0;
    }

    .plume-adventure .pa-dock {
        grid-template-columns: 1fr;
    }

    .plume-adventure .pa-dock #pa-expedition::before,
    .plume-adventure .pa-dock .pa-expedition-btn::before {
        content: '\2736';
        font-size: 1.1rem;
    }

    .plume-adventure .pa-river {
        padding: 0;
    }

    .plume-adventure .pa-river-shell {
        width: 100%;
        max-height: 100dvh;
        grid-template-columns: minmax(0, 1fr) 92px;
        grid-template-rows: 52px minmax(0, 1fr);
        border: 0;
        border-radius: 0;
    }

    .plume-adventure .pa-river-head {
        min-height: 52px;
        grid-column: 1 / -1;
        padding-block: 0.25rem;
    }

    .plume-adventure .pa-river-title {
        font-size: 0.88rem;
    }

    .plume-adventure .pa-river-canvas-wrap,
    .plume-adventure .pa-river-shell > .pa-river-canvas {
        grid-row: 2;
        grid-column: 1;
    }

    .plume-adventure .pa-river-canvas {
        width: 100%;
        height: 100%;
        max-height: calc(100dvh - 52px);
    }

    .plume-adventure .pa-river-controls {
        min-height: 0;
        grid-row: 2;
        grid-column: 2;
        flex-direction: column;
        padding: 0.3rem;
        overflow-y: auto;
    }

    .plume-adventure .pa-river-controls button,
    .plume-adventure .pa-river-controls [data-river-action='left'],
    .plume-adventure .pa-river-controls [data-river-action='right'] {
        width: 100%;
        min-width: 44px;
        min-height: 44px;
        padding: 0.3rem;
    }

    .plume-adventure .pa-river-objective {
        top: 58px;
        max-width: 42%;
    }

    .plume-adventure .pa-river-feedback {
        top: 108px;
        right: 98px;
        left: 0.4rem;
        padding-block: 0.32rem;
        font-size: 0.66rem;
    }

    .plume-adventure .pa-river-help {
        display: none;
    }
}

@media (prefers-contrast: more) {
    .plume-adventure .pa-field-notes,
    .plume-adventure .pa-expedition-card {
        border-width: 3px;
        background: var(--pa-cream);
    }

    .plume-adventure .pa-hotspot.pa-music-pad,
    .plume-adventure .pa-river-controls button {
        border-width: 3px;
    }

    .plume-adventure .pa-river-head,
    .plume-adventure .pa-river-controls,
    .plume-adventure .pa-river-objective,
    .plume-adventure .pa-river-feedback {
        background: #101c2d;
    }
}

@media (prefers-reduced-motion: reduce) {
    .plume-adventure .pa-celebration.is-visible,
    .plume-adventure .pa-celebration[data-visible='true'] {
        opacity: 1;
        animation: none;
        transform: translate(-50%, 0);
    }
}
