body.background-adventure-active {
    background: #83d7ff;
}

body.background-adventure-active .screen {
    z-index: 1;
}

.background-adventure {
    --world-bg-image: url("../assets/backgrounds/world-bg.png");
    --playmat-image: url("../assets/backgrounds/playmat.png");
    --adventure-stage-top: clamp(32px, 5vh, 48px);
    --player-shell-top: 52vh;
    --adventure-stage-bottom-gap: 10px;
    --adventure-road-height: clamp(112px, 26%, 168px);
    --slime-x: 29%;
    --slime-foot-bottom: 18px;
    --slime-event-gap: 150px;
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    contain: layout paint;
    background: #bceca4;
}

.background-adventure.is-paused,
.background-adventure.is-paused * {
    animation-play-state: paused !important;
}

.ba-layer,
.ba-readability,
.ba-event-layer,
.ba-character-layer,
.adventure-road-band {
    position: absolute;
    pointer-events: none;
}

.ba-layer,
.ba-readability,
.ba-event-layer,
.ba-character-layer {
    inset: 0;
}

.ba-readability {
    z-index: 80;
    background:
        linear-gradient(90deg, rgba(8, 29, 32, 0.18), transparent 20%, transparent 80%, rgba(8, 29, 32, 0.16)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(9, 31, 18, 0.18));
}

.world-bg,
.adventure-stage,
.player-side-shell {
    position: absolute;
    pointer-events: none;
}

.world-bg {
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(70, 128, 68, 0.16)),
        var(--world-bg-image) center / cover no-repeat;
}

.world-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 8%, rgba(255, 255, 220, 0.32), transparent 28%),
        linear-gradient(180deg, rgba(244, 255, 225, 0.18), rgba(27, 71, 44, 0.18));
}

.adventure-stage {
    top: var(--adventure-stage-top);
    bottom: calc(100vh - var(--player-shell-top) + var(--adventure-stage-bottom-gap));
    left: 50%;
    z-index: 2;
    width: min(1200px, calc(100vw - 48px));
    overflow: hidden;
    transform: translateX(-50%);
    border-radius: 18px 18px 12px 12px;
}

.adventure-road-band {
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 24;
    height: var(--adventure-road-height);
    overflow: hidden;
    border-radius: 0 0 12px 12px;
}

.player-side-shell {
    left: 50%;
    top: var(--player-shell-top);
    bottom: 10px;
    z-index: 5;
    width: min(1200px, calc(100vw - 48px));
    overflow: hidden;
    transform: translateX(-50%);
    border-radius: 22px;
    background: rgba(246, 255, 238, 0.28);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.20),
        0 8px 14px rgba(0, 0, 0, 0.06);
}

.player-side-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    display: none;
}

body.background-adventure-active[data-current-screen="game"] #game-screen {
    isolation: isolate;
}

body.background-adventure-active[data-current-screen="game"] #game-screen .game-container {
    position: relative;
    z-index: 10;
}

body.background-adventure-active[data-current-screen="game"] #game-screen > .menu-button-container,
body.background-adventure-active[data-current-screen="game"] #game-screen > .game-log,
body.background-adventure-active[data-current-screen="game"] #game-screen > .menu-overlay {
    z-index: 20;
}

body.background-adventure-active[data-current-screen="game"] #game-screen .opponent-area,
body.background-adventure-active[data-current-screen="game"] #game-screen .opponent-place-area .place-field,
body.background-adventure-active[data-current-screen="game"] #game-screen .graveyard {
    position: relative;
    overflow: hidden;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, 0.12) !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.28) !important;
    backdrop-filter: blur(2px) saturate(1.02);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.06),
        0 3px 8px rgba(22, 55, 30, 0.06) !important;
    color: #17351f !important;
    animation: none;
}

body.background-adventure-active[data-current-screen="game"] #game-screen .opponent-area {
    background: rgba(255, 255, 255, 0.12) !important;
    background-image: none !important;
}

body.background-adventure-active[data-current-screen="game"] #game-screen .opponent-place-area .place-field {
    background: rgba(255, 255, 255, 0.10) !important;
    background-image: none !important;
}

body.background-adventure-active[data-current-screen="game"] #game-screen .graveyard {
    background: rgba(255, 255, 255, 0.12) !important;
    background-image: none !important;
}

body.background-adventure-active[data-current-screen="game"] #game-screen .opponent-area::before,
body.background-adventure-active[data-current-screen="game"] #game-screen .opponent-place-area .place-field::before,
body.background-adventure-active[data-current-screen="game"] #game-screen .graveyard::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    border-radius: inherit;
    background: transparent !important;
    background-image: none !important;
}

body.background-adventure-active[data-current-screen="game"] #game-screen .opponent-area > *,
body.background-adventure-active[data-current-screen="game"] #game-screen .opponent-place-area .place-field > *,
body.background-adventure-active[data-current-screen="game"] #game-screen .graveyard > * {
    position: relative;
    z-index: 1;
}

body.background-adventure-active[data-current-screen="game"] #game-screen .player-area,
body.background-adventure-active[data-current-screen="game"] #game-screen .player-place-area .place-field {
    position: relative;
    background: rgba(255, 255, 255, 0.14) !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.28) !important;
    backdrop-filter: blur(2px) saturate(1.02);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.06),
        0 3px 8px rgba(0, 0, 0, 0.06) !important;
}

body.background-adventure-active[data-current-screen="game"] #game-screen .player-area {
    background: rgba(255, 255, 255, 0.18) !important;
    background-image: none !important;
}

body.background-adventure-active[data-current-screen="game"] #game-screen .player-place-area .place-field {
    background: rgba(255, 255, 255, 0.14) !important;
    background-image: none !important;
}

body.background-adventure-active[data-current-screen="game"] #game-screen .center-status-pill,
body.background-adventure-active[data-current-screen="game"] #game-screen .place-count-display,
body.background-adventure-active[data-current-screen="game"] #game-screen .place-rule-gauge,
body.background-adventure-active[data-current-screen="game"] #game-screen .place-score-panel {
    background: rgba(255, 255, 255, 0.12) !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.30) !important;
    backdrop-filter: blur(2px) saturate(1.02);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.06),
        0 3px 7px rgba(18, 48, 24, 0.05) !important;
}

body.background-adventure-active[data-current-screen="game"] #game-screen .opponent-area h3,
body.background-adventure-active[data-current-screen="game"] #game-screen .opponent-place-area h3,
body.background-adventure-active[data-current-screen="game"] #game-screen .graveyard h3 {
    color: #17351f;
}

body.background-adventure-active[data-current-screen="game"] #game-screen .place-field-cards::before {
    content: "プレイス";
    top: 8px;
    left: 10px;
    transform: none;
    color: rgba(23, 53, 31, 0.42);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    z-index: 0;
}

body.background-adventure-active[data-current-screen="game"] #game-screen .graveyard-cards::before {
    content: "墓地";
    top: 6px;
    left: 8px;
    transform: none;
    color: rgba(23, 53, 31, 0.42);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    z-index: 0;
}

.ba-layer {
    --ba-duration: 60s;
    z-index: var(--ba-z, 1);
}

.ba-track {
    position: absolute;
    left: 0;
    bottom: 0;
    display: flex;
    width: max-content;
    height: 100%;
    will-change: transform;
    animation: baScroll var(--ba-duration) linear infinite;
}

.ba-segment {
    position: relative;
    flex: 0 0 100vw;
    width: 100vw;
    height: 100%;
}

.ba-sky {
    --ba-z: 1;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.34) 0 4%, transparent 10%),
        linear-gradient(180deg, rgba(92, 195, 255, 0.35), rgba(215, 248, 255, 0.16));
}

.ba-cloud-track {
    position: absolute;
    inset: 0;
    will-change: transform;
    animation: baScroll 118s linear infinite;
}

.ba-cloud {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--w);
    height: calc(var(--w) * 0.25);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow:
        calc(var(--w) * 0.16) calc(var(--w) * -0.10) 0 calc(var(--w) * 0.06) rgba(255, 255, 255, 0.72),
        calc(var(--w) * 0.42) calc(var(--w) * -0.18) 0 calc(var(--w) * 0.14) rgba(255, 255, 255, 0.80),
        calc(var(--w) * 0.72) calc(var(--w) * -0.08) 0 calc(var(--w) * 0.08) rgba(255, 255, 255, 0.70);
    opacity: var(--o, 0.62);
    filter: blur(0.2px);
}

.ba-far {
    --ba-z: 8;
    --ba-duration: 165s;
    top: 18%;
    bottom: 28%;
    opacity: 0.82;
}

.ba-far .ba-segment {
    background:
        radial-gradient(ellipse at 18% 87%, rgba(133, 177, 205, 0.50) 0 27%, transparent 28%),
        radial-gradient(ellipse at 52% 90%, rgba(120, 165, 194, 0.45) 0 34%, transparent 35%),
        radial-gradient(ellipse at 88% 88%, rgba(151, 188, 210, 0.44) 0 28%, transparent 29%),
        linear-gradient(146deg, transparent 0 25%, rgba(113, 151, 192, 0.46) 25.5% 38%, transparent 38.5%),
        linear-gradient(158deg, transparent 0 50%, rgba(99, 139, 182, 0.40) 50.5% 62%, transparent 62.5%);
}

.ba-far .ba-segment::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4%;
    height: 38%;
    background:
        radial-gradient(ellipse at 16% 100%, rgba(108, 177, 101, 0.28) 0 34%, transparent 35%),
        radial-gradient(ellipse at 56% 100%, rgba(126, 192, 111, 0.24) 0 42%, transparent 43%),
        radial-gradient(ellipse at 94% 100%, rgba(95, 166, 101, 0.25) 0 35%, transparent 36%);
}

.ba-castle {
    position: absolute;
    right: 13%;
    bottom: 19%;
    width: 132px;
    height: 100px;
    opacity: 0.58;
    filter: blur(0.25px);
}

.ba-castle::before,
.ba-castle::after {
    content: "";
    position: absolute;
    bottom: 0;
    background: rgba(232, 242, 247, 0.78);
    border: 1px solid rgba(85, 124, 158, 0.25);
}

.ba-castle::before {
    left: 20px;
    width: 88px;
    height: 56px;
    border-radius: 8px 8px 0 0;
    box-shadow:
        18px -34px 0 -10px rgba(232, 242, 247, 0.82),
        48px -44px 0 -8px rgba(232, 242, 247, 0.82);
}

.ba-castle::after {
    left: 8px;
    width: 24px;
    height: 76px;
    border-radius: 7px 7px 0 0;
    box-shadow:
        84px 0 0 rgba(232, 242, 247, 0.78),
        21px -31px 0 -8px rgba(111, 140, 206, 0.68),
        104px -31px 0 -8px rgba(111, 140, 206, 0.68);
}

.ba-mid {
    --ba-z: 14;
    --ba-duration: 92s;
    top: 35%;
    bottom: 34%;
}

.ba-mid .ba-segment {
    background:
        radial-gradient(ellipse at 16% 100%, rgba(92, 178, 82, 0.54) 0 33%, transparent 34%),
        radial-gradient(ellipse at 48% 104%, rgba(118, 205, 91, 0.58) 0 43%, transparent 44%),
        radial-gradient(ellipse at 82% 100%, rgba(73, 158, 83, 0.48) 0 34%, transparent 35%),
        linear-gradient(180deg, transparent 0 54%, rgba(126, 212, 95, 0.26) 100%);
}

.ba-tree {
    position: absolute;
    left: var(--x);
    bottom: var(--b, 8%);
    width: 38px;
    height: 82px;
    opacity: 0.66;
}

.ba-tree::before {
    content: "";
    position: absolute;
    left: 15px;
    bottom: 0;
    width: 8px;
    height: 38px;
    border-radius: 8px;
    background: rgba(105, 89, 45, 0.72);
}

.ba-tree::after {
    content: "";
    position: absolute;
    left: -1px;
    bottom: 25px;
    width: 40px;
    height: 45px;
    border-radius: 52% 48% 42% 45%;
    background:
        radial-gradient(circle at 35% 28%, rgba(192, 242, 106, 0.62), transparent 28%),
        rgba(62, 146, 72, 0.76);
}

.ba-road {
    --ba-z: 1;
    --ba-duration: 34s;
    inset: 0;
}

.adventure-road-band .ba-road {
    inset: 0;
}

.ba-road .ba-segment {
    overflow: hidden;
    background:
        radial-gradient(ellipse at 15% 8%, rgba(139, 217, 95, 0.70) 0 20%, transparent 21%),
        radial-gradient(ellipse at 55% 12%, rgba(104, 194, 82, 0.68) 0 28%, transparent 29%),
        radial-gradient(ellipse at 93% 9%, rgba(126, 206, 91, 0.68) 0 24%, transparent 25%),
        linear-gradient(180deg, transparent 0 8%, #78c85c 13%, #4eab4f 100%);
}

.ba-road .ba-segment::before {
    content: "";
    position: absolute;
    left: -6%;
    right: -6%;
    bottom: -2%;
    height: 100%;
    clip-path: polygon(0 24%, 14% 16%, 31% 18%, 46% 27%, 62% 34%, 78% 29%, 100% 21%, 100% 100%, 0 100%);
    background:
        radial-gradient(ellipse at 26% 36%, rgba(255, 235, 172, 0.54) 0 10%, transparent 11%),
        linear-gradient(180deg, #d9b46e 0%, #b98549 57%, #8e653b 100%);
    box-shadow:
        inset 0 12px 0 rgba(255, 233, 155, 0.20),
        inset 0 -10px 0 rgba(104, 68, 42, 0.17);
}

.ba-road .ba-segment::after {
    content: "";
    position: absolute;
    left: -4%;
    right: -4%;
    bottom: 70%;
    height: 18%;
    background:
        radial-gradient(ellipse at 18% 100%, rgba(228, 255, 154, 0.35) 0 24%, transparent 25%),
        radial-gradient(ellipse at 58% 100%, rgba(219, 252, 139, 0.32) 0 28%, transparent 29%),
        radial-gradient(ellipse at 92% 100%, rgba(231, 255, 152, 0.30) 0 22%, transparent 23%);
}

.ba-path-mark {
    position: absolute;
    left: var(--x);
    bottom: var(--b);
    z-index: 2;
    width: var(--w);
    height: calc(var(--w) * 0.34);
    border-radius: 999px;
    background: rgba(119, 84, 48, 0.24);
    transform: rotate(var(--r, -8deg));
}

.ba-foreground {
    --ba-z: 42;
    --ba-duration: 21s;
    top: auto;
    bottom: 0;
    height: var(--adventure-road-height);
}

.ba-foreground .ba-segment {
    background:
        radial-gradient(ellipse at 10% 100%, rgba(48, 138, 55, 0.38) 0 13%, transparent 14%),
        radial-gradient(ellipse at 48% 100%, rgba(59, 154, 60, 0.28) 0 12%, transparent 13%),
        radial-gradient(ellipse at 84% 100%, rgba(46, 127, 55, 0.32) 0 15%, transparent 16%);
}

.ba-object {
    position: absolute;
    left: var(--x);
    bottom: var(--b);
    opacity: 0.74;
}

.ba-flower {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, #ffea73 0 18%, transparent 19%),
        radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.92) 0 16%, transparent 17%),
        radial-gradient(circle at 88% 50%, rgba(255, 255, 255, 0.92) 0 16%, transparent 17%),
        radial-gradient(circle at 50% 88%, rgba(255, 255, 255, 0.92) 0 16%, transparent 17%),
        radial-gradient(circle at 12% 50%, rgba(255, 255, 255, 0.92) 0 16%, transparent 17%);
}

.ba-rock {
    width: 30px;
    height: 18px;
    border-radius: 50% 48% 38% 42%;
    background: linear-gradient(145deg, #d9dccd, #8f9a80);
    box-shadow: inset -4px -4px 5px rgba(42, 55, 42, 0.18);
}

.ba-sign {
    width: 44px;
    height: 42px;
}

.ba-sign::before {
    content: "";
    position: absolute;
    left: 19px;
    bottom: 0;
    width: 6px;
    height: 29px;
    border-radius: 4px;
    background: #85623c;
}

.ba-sign::after {
    content: "!";
    position: absolute;
    left: 0;
    top: 0;
    display: grid;
    place-items: center;
    width: 44px;
    height: 20px;
    border-radius: 5px;
    color: #5c3518;
    background: linear-gradient(180deg, #edc77a, #c9843a);
    box-shadow: 0 3px 0 rgba(89, 56, 30, 0.18);
    font-weight: 900;
}

.ba-character-layer {
    z-index: 60;
}

.ba-slime-wrap {
    position: absolute;
    left: var(--slime-x);
    bottom: var(--slime-foot-bottom);
    width: clamp(74px, 8.6vw, 112px);
    height: clamp(62px, 7vw, 92px);
    transform: translateX(-50%);
    will-change: transform;
    animation: baSlimeHop 0.92s ease-in-out infinite;
}

.ba-slime-shadow {
    position: absolute;
    left: 10%;
    right: 10%;
    bottom: -6%;
    height: 18%;
    border-radius: 999px;
    background: rgba(30, 73, 29, 0.28);
    filter: blur(3px);
    animation: baSlimeShadow 0.92s ease-in-out infinite;
}

.ba-slime {
    position: absolute;
    inset: 5% 0 0;
    border-radius: 48% 52% 42% 44% / 58% 58% 38% 38%;
    background:
        radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.88) 0 9%, transparent 10%),
        radial-gradient(circle at 42% 34%, rgba(255, 255, 180, 0.50) 0 16%, transparent 24%),
        linear-gradient(145deg, #e2ff7d, #9df04f 40%, #51ba45 76%, #2d8134);
    border: 2px solid rgba(28, 92, 34, 0.54);
    box-shadow:
        inset -9px -10px 14px rgba(38, 105, 37, 0.28),
        inset 7px 8px 12px rgba(255, 255, 180, 0.42),
        0 10px 16px rgba(23, 80, 27, 0.20);
    will-change: transform;
    animation: baSlimeSquish 0.92s ease-in-out infinite;
}

.ba-slime::before,
.ba-slime::after {
    content: "";
    position: absolute;
    top: 47%;
    width: 12%;
    height: 21%;
    border-radius: 50%;
    background:
        radial-gradient(circle at 44% 24%, #fff 0 18%, transparent 19%),
        #102c25;
}

.ba-slime::before {
    left: 29%;
}

.ba-slime::after {
    right: 29%;
}

.ba-slime-mouth {
    position: absolute;
    left: 43%;
    top: 64%;
    width: 15%;
    height: 10%;
    border-radius: 22% 22% 60% 60%;
    background: #843244;
    box-shadow: inset 0 -3px 0 rgba(255, 130, 144, 0.76);
}

.ba-event-layer {
    z-index: 70;
}

.ba-event {
    position: absolute;
    left: calc(var(--slime-x) + var(--slime-event-gap));
    bottom: var(--slime-foot-bottom);
    width: 112px;
    height: 92px;
    opacity: 0;
    transform: translate3d(0, 0, 0);
    will-change: transform, opacity;
}

.ba-event.is-entering {
    opacity: 1;
    animation: baEventApproach 3.7s cubic-bezier(.22, .9, .25, 1) forwards;
}

.ba-event.is-leaving {
    animation: baEventLeave 1.3s ease-in forwards;
}

.ba-event-label {
    position: absolute;
    left: 50%;
    top: -30px;
    min-width: 96px;
    padding: 5px 8px;
    border-radius: 999px;
    color: #36501e;
    background: rgba(255, 255, 234, 0.88);
    box-shadow: 0 4px 10px rgba(24, 64, 26, 0.14);
    font-size: 12px;
    font-weight: 900;
    text-align: center;
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
}

.ba-event.has-label .ba-event-label {
    animation: baBubbleIn 280ms ease forwards;
}

.ba-treasure-box {
    position: absolute;
    left: 19px;
    bottom: 0;
    width: 70px;
    height: 52px;
    border-radius: 8px 8px 10px 10px;
    background:
        linear-gradient(180deg, #bd7434 0 45%, #81481f 46% 100%);
    border: 3px solid #5f3319;
    box-shadow: inset 0 4px 0 rgba(255, 209, 101, 0.26), 0 10px 12px rgba(30, 62, 24, 0.18);
}

.ba-treasure-box::before {
    content: "";
    position: absolute;
    left: -3px;
    right: -3px;
    top: -14px;
    height: 24px;
    border-radius: 10px 10px 4px 4px;
    background: linear-gradient(180deg, #f2b44d, #aa6428);
    border: 3px solid #5f3319;
    transform-origin: left bottom;
}

.ba-treasure-box::after {
    content: "";
    position: absolute;
    left: 28px;
    top: 19px;
    width: 14px;
    height: 16px;
    border-radius: 4px;
    background: #f4d36a;
}

.ba-event.is-shaking .ba-treasure-box {
    animation: baShake 120ms linear 8;
}

.ba-event.is-opened .ba-treasure-box::before {
    transform: rotate(-48deg);
}

.ba-event.is-success .ba-event-spark {
    opacity: 1;
    transform: scale(1);
}

.ba-event-spark {
    position: absolute;
    left: 50%;
    bottom: 35px;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(255, 251, 181, 0.88) 0 10%, rgba(255, 226, 86, 0.32) 24%, transparent 58%);
    opacity: 0;
    transform: scale(0.3);
    transition: opacity 220ms ease, transform 320ms ease;
    translate: -50% 0;
}

.ba-monster-body {
    position: absolute;
    left: 25px;
    bottom: 0;
    width: 62px;
    height: 50px;
    border-radius: 48% 52% 42% 42%;
    background:
        radial-gradient(circle at 34% 32%, #fff 0 6%, transparent 7%),
        radial-gradient(circle at 66% 32%, #fff 0 6%, transparent 7%),
        linear-gradient(160deg, #b898ff, #6d4ed0);
    border: 2px solid rgba(58, 42, 121, 0.72);
    box-shadow: 0 10px 12px rgba(35, 43, 50, 0.16);
}

.ba-monster-body::before,
.ba-monster-body::after {
    content: "";
    position: absolute;
    top: -14px;
    width: 18px;
    height: 20px;
    border-radius: 60% 60% 20% 20%;
    background: #6d4ed0;
}

.ba-monster-body::before {
    left: 6px;
    transform: rotate(-22deg);
}

.ba-monster-body::after {
    right: 6px;
    transform: rotate(22deg);
}

.ba-event.is-impact .ba-monster-body {
    animation: baMonsterHit 520ms ease forwards;
}

.ba-merchant-stand {
    position: absolute;
    left: 5px;
    bottom: 0;
    width: 96px;
    height: 72px;
}

.ba-merchant-stand::before {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 0;
    height: 40px;
    border-radius: 8px 8px 4px 4px;
    background: linear-gradient(180deg, #d99f54, #8d5f35);
    box-shadow: inset 0 5px 0 rgba(255, 230, 140, 0.22);
}

.ba-merchant-stand::after {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    width: 96px;
    height: 26px;
    border-radius: 8px 8px 3px 3px;
    background:
        repeating-linear-gradient(90deg, #fff1a4 0 16px, #df604e 17px 32px);
    border: 2px solid rgba(95, 52, 31, 0.45);
}

.ba-ambient {
    position: absolute;
    right: -70px;
    top: var(--top, 24%);
    width: var(--size, 22px);
    height: var(--size, 22px);
    opacity: 0;
    will-change: transform, opacity;
    animation: baAmbientFloat var(--duration, 5s) linear forwards;
}

.ba-ambient-bird::before,
.ba-ambient-bird::after {
    content: "";
    position: absolute;
    top: 8px;
    width: 16px;
    height: 7px;
    border-top: 3px solid rgba(48, 75, 90, 0.58);
    border-radius: 50%;
}

.ba-ambient-bird::before {
    left: 0;
    transform: rotate(-18deg);
}

.ba-ambient-bird::after {
    right: 0;
    transform: rotate(18deg);
}

.ba-ambient-petal {
    border-radius: 80% 20% 80% 20%;
    background: rgba(255, 233, 235, 0.70);
}

.ba-ambient-sparkle {
    border-radius: 50%;
    background: rgba(255, 247, 155, 0.84);
    box-shadow: 0 0 14px rgba(255, 233, 88, 0.72);
}

@keyframes baScroll {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-50%, 0, 0); }
}

@keyframes baPanelDrift {
    from { background-position: 0% 0%; }
    to { background-position: 100% 0%; }
}

@keyframes baSlimeHop {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    42% { transform: translateX(-50%) translateY(-10px); }
    62% { transform: translateX(-50%) translateY(-5px); }
}

@keyframes baSlimeSquish {
    0%, 100% { transform: scaleX(1.08) scaleY(0.92); }
    36% { transform: scaleX(0.96) scaleY(1.08); }
    64% { transform: scaleX(1.02) scaleY(0.98); }
}

@keyframes baSlimeShadow {
    0%, 100% { transform: scaleX(1.16); opacity: 0.30; }
    42% { transform: scaleX(0.74); opacity: 0.15; }
}

@keyframes baEventApproach {
    0% { transform: translate3d(82vw, 0, 0); opacity: 0; }
    10% { opacity: 1; }
    100% { transform: translate3d(0, 0, 0); opacity: 1; }
}

@keyframes baEventLeave {
    from { transform: translate3d(0, 0, 0); opacity: 1; }
    to { transform: translate3d(-72vw, 0, 0); opacity: 0; }
}

@keyframes baShake {
    0%, 100% { transform: translateX(0) rotate(0); }
    25% { transform: translateX(-2px) rotate(-2deg); }
    75% { transform: translateX(2px) rotate(2deg); }
}

@keyframes baBubbleIn {
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes baMonsterHit {
    0% { transform: translateX(0) rotate(0); opacity: 1; }
    48% { transform: translateX(18px) rotate(8deg); opacity: 1; }
    100% { transform: translateX(40px) rotate(28deg) scale(0.72); opacity: 0; }
}

@keyframes baAmbientFloat {
    0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
    12% { opacity: 0.78; }
    88% { opacity: 0.62; }
    100% { transform: translate3d(calc(-100vw - 120px), var(--dy, -24px), 0) rotate(160deg); opacity: 0; }
}

@media (max-width: 760px) {
    .background-adventure {
        --slime-x: 30%;
        --slime-foot-bottom: 14px;
        --slime-event-gap: 126px;
    }

    .adventure-stage {
        width: calc(100vw - 24px);
        bottom: calc(100vh - var(--player-shell-top) + var(--adventure-stage-bottom-gap));
    }

    .player-side-shell {
        width: calc(100vw - 24px);
        border-radius: 16px;
    }

    .ba-slime-wrap {
        width: clamp(68px, 12vw, 90px);
        height: clamp(56px, 10vw, 74px);
    }

    .ba-event {
        bottom: var(--slime-foot-bottom);
    }

    .ba-castle {
        transform: scale(0.78);
        transform-origin: right bottom;
    }
}

@media (prefers-reduced-motion: reduce) {
    .background-adventure *,
    .background-adventure *::before,
    .background-adventure *::after {
        animation: none !important;
        transition: none !important;
    }
}
