.story-sequence { --travel: 540svh; }
.story-stage { display: grid; grid-template-rows: auto 1fr; align-items: center; padding-block: clamp(.85rem, 3vh, 1.6rem) clamp(1rem, 3.5vh, 2rem); overflow: clip; color: #fff; background: #311054; }
.motion .story-stage { clip-path: inset(0 calc(10vw * (1 - var(--story-open, 1))) 0 round calc(2rem * (1 - var(--story-open, 1)))); }
.story-stage .story-art { position: absolute; z-index: -2; right: 0; top: 50%; width: max(58vw, 100svh); aspect-ratio: 1; transform: translateY(-50%) scale(calc(1 + var(--progress) * .1)); transform-origin: 60% center; mask-image: linear-gradient(90deg, transparent, black 26%); opacity: 0; transition: opacity .58s cubic-bezier(.22,1,.36,1); }
.story-stage[data-picture="violet"] [data-story-photo="violet"],
.story-stage[data-picture="marina"] [data-story-photo="marina"],
.story-stage[data-picture="orange"] [data-story-photo="orange"] { opacity: .91; }
.story-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #221038 0%, #2a124bed 24%, #2f0a5166 68%, #240c4660), linear-gradient(#1c092d7a, transparent 34%, transparent 62%, #1c092db0); }
.story-progress { display: none; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .45rem; margin-bottom: .75rem; }
.motion .story-progress { display: grid; }
.story-progress span { height: 3px; border-radius: 99px; overflow: hidden; background: #ffffff55; }
.story-progress i { display: block; height: 100%; background: #fff; transform-origin: left center; transform: scaleX(0); }
.story-context { margin-left: auto; color: #f8efff; font-size: .83rem; text-align: right; }
.story-body { display: grid; padding-block: clamp(.85rem, 3vh, 2rem); gap: clamp(1.35rem, 4vh, 2rem); }
.chapter { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(1.3rem, 5vw, 5rem); align-items: center; }
.chapter[hidden] { display: none; }
.chapter-copy h2 { max-width: 12ch; font-size: clamp(2.58rem, 6.45vw, 6rem); }
.chapter-copy p { line-height: 1.47; max-width: 36ch; margin-top: clamp(.56rem, 2vh, 1rem); color: #fcf6ff; font-size: clamp(.91rem, 1.7vw, 1.19rem); }
.motion .chapter-copy { transform: translateY(calc(18px * (1 - clamp(0, var(--chapter-progress, 1) * 5, 1)))); }

.scene-shell { --icon-color: #6034a2; position: relative; display: grid; align-content: start; gap: clamp(.38rem, 1.25vh, .74rem); justify-self: center; width: min(100%, 385px); min-width: 0; border-radius: 1.42rem; padding: clamp(.72rem, 2.2vw, 1.15rem); color: #261738; background: linear-gradient(145deg, #fff, #f7f0ff 68%, #eee1ff); box-shadow: 0 22px 70px #150a3599, inset 0 1px 2px #fff; font-size: clamp(.79rem, 1.5vw, .95rem); }
.motion .scene-shell { transform: translateY(calc(24px * (1 - clamp(0, var(--chapter-progress, 1) * 5, 1)))) scale(calc(.965 + .035 * clamp(0, var(--chapter-progress, 1) * 5, 1))); }
.scene-shell svg, .earnings-card svg { display: inline-block; flex: 0 0 auto; width: 1.06rem; height: 1.06rem; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.scene-heading { display: flex; align-items: center; gap: .52rem; margin-bottom: .14rem; font-size: clamp(.91rem, 1.7vw, 1.14rem); }
.scene-heading .avatar { width: 1.92rem; }
.scene-search .scene-heading .avatar { margin-left: auto; }
.scene-shell small { display: block; color: #624c71; font-size: .76rem; line-height: 1.3; margin-top: .12rem; }
.scene-query { display: flex; align-items: center; gap: .4rem; min-height: 33px; padding: .35rem .55rem; border: 1px solid #e2d5eb; border-radius: .52rem; background: #fff9; }
.scene-query svg { color: var(--icon-color); }
.scene-query > span { color: #6a5079; }
.scene-query > strong { color: #48247c; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.scene-search .scene-query > strong { margin-left: auto; }
.scene-filters, .scene-specs { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.scene-filters > span, .scene-specs > span, .scene-mini-label { padding: .24rem .48rem; border-radius: 99px; font-size: .76rem; background: #eadffa; color: #502c82; font-weight: 700; }
.scene-mini-label { margin-left: auto; }
.scene-campaigns { display: grid; gap: .2rem; }
.scene-campaign, .scene-delivery { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; align-items: center; gap: .62rem; border: 1px solid #e7dcef; padding: .27rem .48rem .27rem .3rem; border-radius: .72rem; background: #fff9; }
.scene-campaign[data-selected] { border-color: #8352c6; background: #f2e5ff; box-shadow: 0 0 0 2px #ba90f26b; }
.scene-campaign .photo, .scene-delivery .photo { aspect-ratio: 1; border-radius: .5rem; }
.scene-campaign > span { color: #57308b; font-size: 1.3rem; }
.motion .other-campaign { opacity: calc(1 - .76 * clamp(0, (var(--chapter-progress, 1) - .3) * 4, 1)); transform: translateY(calc(5px * clamp(0, (var(--chapter-progress, 1) - .3) * 4, 1))); }
.scene-brief-photo, .scene-published-photo { position: relative; overflow: clip; border-radius: .75rem; }
.scene-brief-photo { height: clamp(65px, 16vh, 144px); }
.scene-published-photo { height: clamp(100px, 27vh, 255px); }
.scene-brief-photo .photo, .scene-published-photo .photo { position: absolute; width: 100%; aspect-ratio: 1; top: 50%; transform: translateY(-47%); }
.scene-published-photo > span { position: absolute; top: .4rem; right: .45rem; padding: .22rem .45rem; border-radius: 2rem; font-size: .73rem; color: #fff; background: #2b143ad1; }
.published-story { display: grid; align-content: end; gap: .24rem; position: absolute; width: 74px; min-height: 91px; right: .42rem; bottom: .42rem; padding: .23rem; border: 1px solid #fff9; border-radius: .61rem; overflow: clip; background: #2b143ade; text-align: center; isolation: isolate; }
.published-story > .photo { z-index: -1; top: 0; left: 50%; height: 100%; width: auto; transform: translateX(-50%); }
.published-story::before { content: ''; align-self: start; position: absolute; top: .3rem; inset-inline: .28rem; height: 2px; background: #fff; border-radius: 2px; }
.published-story > strong { color: #fff; background: #25123ed9; border-radius: .38rem; padding: .25rem .12rem; font-size: .68rem; }
.scene-action { display: flex; justify-content: center; align-items: center; gap: .38rem; min-height: 32px; text-align: center; border-radius: .62rem; padding: .35rem .55rem; background: #4d2391; color: #fff; font-weight: 750; }
.scene-confirm { background: #dcf5e9; color: #0a533b; }
[data-action-before] { display: none; }
.motion .chapter:not([data-action-done]) [data-action-before] { display: flex; }
.motion .chapter:not([data-action-done]) [data-action-after] { display: none; }
.scene-canvases { display: grid; grid-template-columns: 1.2fr .72fr; align-items: center; gap: .5rem; }
.scene-draft { overflow: clip; position: relative; border-radius: .75rem; background: #dbbdf5; }
.scene-draft .photo { aspect-ratio: 1; }
.scene-draft > span, .scene-draft b { position: absolute; border-radius: 99px; line-height: 1.1; padding: .24rem .35rem; font-size: .72rem; left: .3rem; top: .3rem; color: #fff; background: #211332c4; }
.scene-draft-story { aspect-ratio: 3/4; }
.scene-draft-story .photo { position: absolute; height: 100%; aspect-ratio: 1; left: 50%; transform: translateX(-50%); }
.scene-draft b { top: auto; bottom: .32rem; color: #532f82; background: #ffeffc; }
.scene-caption > strong { white-space: nowrap; }
.scene-post-meta { line-height: 1.25; font-size: .8rem; }
.scene-post-meta > span { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .28rem; }
.scene-post-meta > span > svg:last-child { margin-left: auto; }
.scene-post-meta > strong { color: #523092; }
.scene-link-label { font-size: .76rem; font-weight: 750; }
.scene-story-sent { display: flex; align-items: center; gap: .3rem; color: #235747; font-weight: 700; font-size: .78rem; }
.scene-checklist { list-style: none; display: grid; gap: .46rem; margin: 0 0 .2rem; padding: 0; }
.scene-checklist li { display: flex; align-items: center; gap: .42rem; background: #fff9; border: 1px solid #e5d8ef; border-radius: .57rem; padding: .34rem .38rem; }
.scene-checklist li > span { flex: 0 0 22px; display: grid; place-items: center; height: 22px; border-radius: 50%; color: #0b5a41; background: #ddf2e7; }
.scene-checklist svg { width: .8rem; height: .8rem; }
.motion [data-reveal] { --scene-reveal: clamp(0, (var(--chapter-progress, 1) - var(--at, 0)) * 5.6, 1); opacity: var(--scene-reveal); transform: translateY(calc(6px * (1 - var(--scene-reveal)))); }
.scene-cursor { display: none; }
.motion .scene-cursor { display: block; z-index: 1; position: absolute; left: var(--cursor-x); top: var(--cursor-y); width: 18px; height: 23px; pointer-events: none; transform: translate(calc((1 - var(--cursor-travel, 1)) * 72px),calc((1 - var(--cursor-travel, 1)) * 55px)); opacity: clamp(0, (var(--chapter-progress, 1) - .07) * 8, 1); }
.scene-cursor::before, .scene-cursor::after { content: ''; position: absolute; inset: 0; clip-path: polygon(8% 0, 100% 60%, 60% 65%, 78% 95%, 57% 100%, 39% 70%, 8% 93%); background: #2b144a; }
.scene-cursor::after { background: #fff; transform: scale(.79); transform-origin: 46% 50%; }
.scene-cursor i { position: absolute; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #9a54ff; inset: -10px auto auto -10px; opacity: var(--cursor-tap, 0); transform: scale(calc(1 + var(--cursor-tap, 0) * .45)); }

.earnings-sequence { --travel: 516svh; --credit-arrival: 1; --credit-signal: 0; }
.earnings-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(1.3rem, 5vw, 5.5rem); align-items: center; }
.earnings-copy h2 { font-size: clamp(2.65rem, 6.1vw, 5.8rem); }
.earnings-copy > p:not(.section-label) { max-width: 37ch; }
.earnings-moments { display: none; }
.motion .earnings-moments { display: grid; margin-top: 1.05rem; min-height: 57px; }
.earnings-moment { display: grid; grid-template-columns: 38px minmax(0, auto) 26px; justify-self: start; align-items: center; gap: .5rem; border-radius: .9rem; padding: .36rem .49rem .36rem .38rem; color: #3c2059; font-size: clamp(.75rem,1.6vw,.9rem); }
.earnings-moment[hidden], .earnings-grid > [hidden], .bank-notification[hidden] { display: none; }
.motion .earnings-moment { transform: translateY(calc(9px * (1 - var(--credit-arrival)))); opacity: calc(.73 + .27 * var(--credit-arrival)); }
.earnings-moment small { display: block; margin-top: .15rem; color: #5d4970; font-size: .74rem; }
.moment-icon, .moment-signal { display: grid; place-items: center; border-radius: .55rem; width: 100%; aspect-ratio: 1; color: #5830a0; background-color: #e8d8fa; }
.moment-story { position: relative; }
.moment-story::after { content: ''; position: absolute; inset: .25rem .22rem auto; height: 2px; background: #fff; border-radius: 6px; }
.moment-signal { position: relative; color: #165f43; background: #d9f2e6; border-radius: 50%; }
.moment-signal::after { content: ''; position: absolute; inset: -2px; border: 2px solid #6a3fb480; border-radius: 50%; opacity: var(--credit-signal); transform: scale(calc(1 + .35 * var(--credit-signal))); }
.earnings-moment svg { width: 1rem; height: 1rem; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.earnings-card { width: min(100%, 510px); justify-self: center; padding: clamp(.65rem, 2vw, 1.35rem); border-radius: 1.5rem; color: #221333; background: linear-gradient(148deg, #fffefc, #f4ebff 70%, #ffdfe8); }
.earnings-head { display: flex; justify-content: space-between; align-items: center; gap: .7rem; }
.earnings-head .identity { font-size: clamp(.81rem,1.5vw,.98rem); }
.earnings-head small { display: block; color: #665175; font-size: .76rem; margin-top: .13rem; }
.earnings-current, .earn-icon { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .68rem; color: #5e2da5; background: #ebddfc; }
.earnings-current { background: #683ab2; color: #fff; flex: 0 0 auto; }
.motion .earnings-current { transform: scale(calc(.86 + .14 * var(--credit-arrival))); }
.earnings-total { display: grid; gap: .15rem; margin-block: .65rem; padding: .6rem .65rem; border: 1px solid #e4d4ef; border-radius: .82rem; background: #ffffffad; }
.earnings-total > span { font-size: .78rem; color: #5d4773; }
.earnings-total > strong { font-size: clamp(1.95rem, 5vw, 4rem); letter-spacing: -.062em; font-variant-numeric: tabular-nums; color: #402472; line-height: 1; }
.ledger-total { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.ledger-total > strong { grid-row: 2; grid-column: 1; }
.ledger-total .ledger-withdraw { grid-row: 1 / 3; grid-column: 2; padding: .4rem .65rem; border-radius: 99px; background: #55299c; color: #fff; font-weight: 750; }
.earnings-items { list-style: none; display: grid; gap: .33rem; padding: 0; margin: 0; }
.earnings-items li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .42rem; padding: .34rem; border: 1px solid #e7daef; border-radius: .73rem; background: #fffafe; font-size: clamp(.77rem, 1.55vw, .96rem); }
.earnings-items small { display: block; line-height: 1.28; margin-top: .08rem; font-size: .72rem; color: #644e73; }
.earnings-items b { color: #4a237d; white-space: nowrap; }
.motion .earnings-items li[data-phase="next"] { background: #f6eefb; opacity: .78; }
.motion .earnings-items li[data-phase="current"] { transform: translateX(calc(6px * var(--credit-arrival))); border-color: #9a70cc; background: #f6ebff; }
.motion .earnings-items li[data-phase="current"] .earn-icon { transform: scale(calc(.88 + .12 * var(--credit-arrival))); background: #d9bff4; }
.motion .earnings-items li[data-phase="current"] b { transform: scale(calc(1 + .05 * var(--credit-signal))); }

.withdrawal-card { grid-column: 2; position: relative; overflow: clip; min-width: 0; --bank-reveal: 1; }
.withdrawal-card .cashout-total { margin-top: 1.35rem; }
.withdrawal-destination { display: grid; align-items: center; grid-template-columns: auto 1fr auto; gap: .52rem; padding: .48rem; border-radius: .8rem; border: 1px solid #e4d4ef; background: #fffb; color: #392455; font-size: .93rem; }
.withdrawal-destination small { display: block; margin-top: .12rem; color: #624e72; font-size: .77rem; }
.withdrawal-verified { color: #17604a; }
.withdrawal-action { position: relative; overflow: clip; margin-top: .65rem; min-height: 42px; font-size: .91rem; }
.motion .withdrawal-action:not([data-confirmed]) { background: #4e2491; color: white; }
.motion .withdrawal-action:not([data-complete]) svg { display: none; }
.motion .withdrawal-action[data-confirmed]:not([data-complete]) { background: #eadcf9; color: #45246f; }
.motion .withdrawal-action[data-confirmed]:not([data-complete])::after { content: ''; position: absolute; inset: auto 0 0; height: 3px; background: #9e67df; transform-origin: left; transform: scaleX(clamp(0, (var(--withdraw-progress, 1) - .47) * 1.65, .88)); }
.motion .withdraw-pointer { --chapter-progress: var(--withdraw-progress, 1); --cursor-travel: var(--withdraw-travel, 1); --cursor-tap: var(--withdraw-tap, 0); left: 64%; top: auto; bottom: 1.25rem; opacity: clamp(0, (.73 - var(--withdraw-progress, 1)) * 8, 1); }
.bank-notification { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: start; gap: .55rem; padding: .65rem .7rem; border-radius: .94rem; background: linear-gradient(145deg,#fffefc,#f1edfe); font-size: .92rem; }
.motion .bank-notification { position: absolute; z-index: 2; top: .42rem; inset-inline: .42rem; transform: translateY(calc(-122% * (1 - var(--bank-reveal)))); opacity: clamp(0, var(--bank-reveal) * 4, 1); }
.earnings-sequence .bank-notification-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: .68rem; background: #d9f5e8; color: #0c5b3e; }
.bank-notification-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .15rem; margin-bottom: .15rem; color: #5b476f; font-size: .73rem; }
.bank-notification strong { display: block; color: #211631; }
.bank-notification p { margin-top: .16rem; color: #39294b; line-height: 1.28; font-size: .82rem; }
:root:not(.motion) .bank-notification { margin-top: .65rem; }

@media (max-width: 760px) {
  .story-stage .story-art { right: -29%; width: max(88vw, 79svh); }
  .chapter-copy h2 { font-size: clamp(2rem, 6.25vw, 4.35rem); }
}
@media (max-width: 580px) {
  .story-stage .story-art { right: -28%; width: max(98vw, 83svh); }
  .story-shade { background: linear-gradient(0deg,#240c46 6%,#240c46aa 46%,#26094982 78%,#240c4688), linear-gradient(90deg,#230f48ae,transparent 85%); }
  .story-body { padding-block: .7rem; }
  .chapter, .earnings-grid { grid-template-columns: 1fr; gap: .65rem; }
  .chapter-copy h2 { max-width: 16ch; font-size: clamp(2rem,8.5vw,3.5rem); }
  .chapter-copy > p { max-width: 38ch; }
  .scene-shell { width: min(100%, 318px); }
  .scene-published-photo { height: min(157px, 24vh); }
  .scene-canvases { width: min(100%, 238px); margin-inline: auto; }
  .scene-checklist { gap: .33rem; }
  .earnings-copy h2 { font-size: clamp(2rem, 8.7vw, 3.8rem); }
  .earnings-copy .section-label { margin-bottom: .42rem; }
  .earnings-copy > p:not(.section-label) { margin-top: .48rem; font-size: .9rem; }
  .withdrawal-card { grid-column: auto; }
}

@media (max-width: 580px) and (max-height: 680px) {
  .story-stage { padding-block: .6rem .65rem; }
  .story-body { padding-block: .42rem; }
  .scene-published-photo { height: clamp(88px, 19vh, 122px); }
  .earnings-stage { padding-block: .65rem; }
  .earnings-grid { gap: .45rem; }
  .earnings-copy h2 { font-size: clamp(1.73rem, 7.7vw, 2rem); }
  .earnings-copy > p:not(.section-label) { line-height: 1.37; }
  .earnings-card { padding: .48rem .55rem; }
  .earnings-head .avatar, .earnings-current, .earn-icon { width: 1.62rem; height: 1.62rem; }
  .earnings-total { margin-block: .36rem; padding: .4rem .55rem; }
  .earnings-total > strong { font-size: 1.72rem; }
  .earnings-items { gap: .23rem; }
  .earnings-items li { padding: .23rem .32rem; }
  .motion .earnings-moments { display: none; }
  .motion .withdraw-pointer { bottom: .63rem; }
}

@media (prefers-reduced-motion: reduce) {
  .story-stage .story-art { transform: translateY(-50%); }
}
