/* Windfall — juice. Loaded after style.css. Everything here is presentation: illustration, motion, atmosphere, feedback.
   Animations stick to transform and opacity. The prefers-reduced-motion block at the bottom switches the lot off. */

/* ===== layers outside #app ===== */
#wf-fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
#wf-fx .cl { position: absolute; left: 0; width: 200%; will-change: transform; animation: drift 320s linear infinite; }
#wf-fx .a1 { top: -4vh; height: 62vh; }
#wf-fx .a2 { top: 38vh; height: 70vh; animation-duration: 460s; animation-direction: reverse; }
@keyframes drift { to { transform: translateX(-50%); } }

body.on-start #wf-fx, body.on-start #wf-tint { display: none; }
body.no-tint-fade #wf-tint { transition: none; }

#wf-tint { position: fixed; inset: 0; z-index: 38; pointer-events: none; mix-blend-mode: multiply; background-color: transparent; box-shadow: inset 0 0 200px rgba(28, 42, 51, 0); transition: background-color 2.4s ease, box-shadow 2.4s ease; }
body[data-phase='dawn'] #wf-tint { background-color: rgba(255, 196, 150, .14); }
body[data-phase='dusk'] #wf-tint { background-color: rgba(240, 140, 100, .17); }
body[data-phase='night'] #wf-tint { background-color: rgba(120, 140, 215, .15); box-shadow: inset 0 0 240px rgba(20, 30, 80, .22); }
body[data-late='1'] #wf-tint { box-shadow: inset 0 0 220px rgba(28, 42, 51, .14); }
body[data-weather='storm'] #wf-tint { background-color: rgba(30, 44, 70, .42); animation: lightning 5s infinite; }
body[data-weather='danger'] #wf-tint { animation: dangerPulse 1.6s ease-in-out infinite; }
@keyframes lightning { 0%, 91%, 100% { filter: none; } 92% { filter: brightness(2.6); } 93% { filter: none; } 95% { filter: brightness(2); } 96% { filter: none; } }
@keyframes dangerPulse { 50% { box-shadow: inset 0 0 180px rgba(176, 42, 26, .38); } }

#wf-layer { position: fixed; inset: 0; z-index: 80; pointer-events: none; overflow: hidden; }
#wf-flash { position: fixed; inset: 0; z-index: 79; pointer-events: none; opacity: 0; }
#wf-flash.hurt { background: radial-gradient(ellipse at center, transparent 45%, rgba(176, 20, 10, .55)); animation: hurt .6s ease-out both; }
@keyframes hurt { 0% { opacity: 1; } 100% { opacity: 0; } }

/* ===== toasts ===== */
#wf-toasts { position: fixed; right: 18px; bottom: 18px; z-index: 95; display: grid; gap: .5rem; justify-items: end; pointer-events: none; width: min(300px, 94vw); }
@media (max-width: 1100px) { #wf-toasts { right: auto; left: 50%; bottom: auto; top: 84px; transform: translateX(-50%); width: min(520px, 94vw); justify-items: center; } }
.toast { background: var(--paper-3); border: 1.5px solid var(--ink); border-left: 6px solid var(--good); padding: .6rem 1rem; box-shadow: 4px 4px 0 rgba(28, 42, 51, .3); font-weight: 500; font-size: .98rem; max-width: 100%; animation: toastIn .35s cubic-bezier(.2, 1.2, .4, 1) both; }
.toast.no { border-left-color: var(--stamp); background: #fbeee6; }
.toast.out { animation: toastOut .4s ease-in both; }
@keyframes toastIn { from { opacity: 0; transform: translateX(16px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(10px); } }
.juice-on .flash { display: none; }

/* ===== floating deltas, stamps, particles ===== */
.wf-float { position: fixed; transform: translate(-50%, 0); font: 700 1.5rem var(--mono); text-shadow: 0 2px 0 rgba(247, 241, 224, .9), 0 0 12px rgba(247, 241, 224, .9); animation: floatUp 1.6s cubic-bezier(.2, .7, .3, 1) both; white-space: nowrap; }
.wf-float.up { color: var(--good); } .wf-float.down { color: var(--bad); }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, 8px) scale(.8); } 12% { opacity: 1; transform: translate(-50%, -6px) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -72px) scale(1); } }
.wf-stamp { position: fixed; z-index: 2; transform: translate(-50%, -50%) rotate(var(--rot, -6deg)); padding: .3rem .9rem .35rem; border: 3px solid currentColor; border-radius: 4px; text-align: center; font: 800 1.5rem/1 var(--display); letter-spacing: .1em; text-transform: uppercase; filter: url(#wfRough); mix-blend-mode: multiply; animation: stampIn 1.3s both; pointer-events: none; opacity: .92; }
.wf-stamp::after { content: ''; position: absolute; inset: 3px; border: 1px solid currentColor; border-radius: 2px; opacity: .7; }
.wf-stamp small { display: block; margin-top: .25rem; font: 600 .68rem var(--mono); letter-spacing: .14em; }
.wf-stamp.t-stamp { color: var(--stamp); } .wf-stamp.t-sea { color: var(--sea); } .wf-stamp.t-brass { color: #7d5614; }
@keyframes stampIn {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--rot)) scale(2.6); }
  10% { opacity: .95; transform: translate(-50%, -50%) rotate(var(--rot)) scale(.9); }
  16% { transform: translate(-50%, -50%) rotate(var(--rot)) scale(1.04); }
  22% { transform: translate(-50%, -50%) rotate(var(--rot)) scale(1); }
  72% { opacity: .92; } 100% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--rot)) scale(1); }
}
.wf-coin, .wf-conf { position: fixed; display: block; pointer-events: none; will-change: transform; }
.wf-coin { border-radius: 50%; border: 1.5px solid rgba(60, 40, 10, .5); box-shadow: inset -2px -2px 0 rgba(0, 0, 0, .15); }
.wf-conf { border-radius: 1px; }

.shake { animation: shake .5s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes shake { 10%, 90% { transform: translate3d(-2px, 0, 0); } 20%, 80% { transform: translate3d(5px, 2px, 0) rotate(.15deg); } 30%, 50%, 70% { transform: translate3d(-9px, -2px, 0) rotate(-.25deg); } 40%, 60% { transform: translate3d(9px, 2px, 0) rotate(.25deg); } }
.nope { animation: nope .38s both; }
@keyframes nope { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

/* ===== buttons and focus ===== */
.btn, .tab, .choice, .in { -webkit-tap-highlight-color: transparent; }
.btn:focus-visible, .tab:focus-visible, .choice:focus-visible, .port:focus-visible { outline: 2.5px solid var(--sea); outline-offset: 2px; }
.btn.primary { position: relative; overflow: hidden; }
.btn.primary::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .35) 50%, transparent 60%); transform: translateX(-120%); }
.btn.primary:hover:not(:disabled)::after { transform: translateX(120%); transition: transform .6s; }
.btn:active:not(:disabled) { transition-duration: .03s; }
.choice:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.choice b { display: block; }
.card { transition: transform .2s, box-shadow .2s; }
.page .card:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 rgba(28, 42, 51, .2); }
.ledger tr { transition: background-color .15s; }

/* ===== header, tabs, gauges ===== */

.crest { display: block; width: 2.6rem; height: auto; filter: drop-shadow(1px 2px 0 rgba(28, 42, 51, .25)); flex: none; }
.crest.sm { width: 2.1rem; } .crest.lg { width: 4.4rem; }
.h2 { position: relative; padding-right: 5.4rem; }
.h2 > .crest { position: absolute; right: 0; top: -.2rem; animation: crestIn .6s .1s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes crestIn { from { opacity: 0; transform: scale(.4) rotate(-20deg); } }

@keyframes bumpUp { 0% { color: #b8f5b0; transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes bumpDown { 0% { color: #ff9c85; transform: scale(1.12); } 100% { transform: scale(1); } }
.days { overflow: visible; } .days i { transition: width .9s cubic-bezier(.2, .8, .2, 1); background: linear-gradient(90deg, var(--brass), var(--stamp)); }
.dship { position: absolute; bottom: 4px; width: 38px; transform: translateX(-100%); transition: left .9s cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
.dship .shipart { width: 100%; animation: bob 3s ease-in-out infinite; }

@keyframes pop { from { transform: scale(0); } }
.page.enter { animation: pageTurn .42s cubic-bezier(.2, .8, .2, 1) both; transform-origin: 0 50%; }
@keyframes pageTurn { from { opacity: 0; transform: perspective(1400px) rotateY(-7deg) translateX(18px); } }

.meter { overflow: hidden; background: var(--paper-2); }
.meter i { transition: width .8s cubic-bezier(.2, .8, .2, 1), background-color .4s; background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, .18) 0 5px, transparent 5px 10px); }
.gauge.shrink .meter i { box-shadow: inset 0 0 0 2px rgba(194, 55, 31, .55); animation: pulseBar .6s; }
.gauge.grow .meter i { animation: glowBar .7s; }
.gauge.low .meter i { animation: lowPulse 1.2s ease-in-out infinite; }
@keyframes lowPulse { 50% { opacity: .55; } } @keyframes pulseBar { 50% { filter: brightness(1.6); } } @keyframes glowBar { 50% { filter: brightness(1.35) saturate(1.3); } }

/* ===== icons ===== */
.gi { width: 1.35em; height: 1.35em; vertical-align: -.32em; margin-right: .4em; flex: none; transition: transform .2s; }

.manifest .gi { width: 1.15em; height: 1.15em; margin-right: .35em; vertical-align: -.22em; }
.shipart { display: block; width: 100%; height: auto; overflow: visible; }
.shipart.row { width: 78px; margin-bottom: .25rem; } .shipart.bn { width: min(340px, 72vw); margin: 0 auto .6rem; animation: bob 3s ease-in-out infinite; }
.prop { transform-box: fill-box; transform-origin: center; animation: prop .16s linear infinite; }
@keyframes prop { 50% { transform: scaleY(.16); } }
.flag { transform-box: fill-box; transform-origin: left center; animation: flutter 1.1s ease-in-out infinite; }
@keyframes flutter { 50% { transform: scaleX(.78) skewY(-7deg); } }
@keyframes bob { 50% { transform: translateY(-3px); } }
.ship-art { position: relative; margin: -.15rem -.2rem .6rem; padding: .7rem .7rem .2rem; background: linear-gradient(#bcd6d4, #e9e3c8 85%); border: 1px solid var(--rule); overflow: hidden; }
.ship-art .shipart { animation: bob 3.4s ease-in-out infinite; max-width: 240px; margin: 0 auto; }
.ship-art .puff { position: absolute; left: 38%; top: 44%; width: 10px; height: 10px; border-radius: 50%; background: rgba(40, 40, 40, .5); opacity: 0; }
.ship-art.smoking .puff { animation: smoke 2.2s ease-out infinite; } .ship-art.smoking .p2 { animation-delay: .7s; left: 44%; } .ship-art.smoking .p3 { animation-delay: 1.4s; left: 33%; }
@keyframes smoke { 0% { opacity: .7; transform: translate(0, 0) scale(.6); } 100% { opacity: 0; transform: translate(-26px, -34px) scale(2.6); } }

/* ===== sky chart ===== */
.map { background: #dfe8e0; }
.cmap { will-change: transform; } .c-far { animation: mapDrift 90s linear infinite alternate; } .c-near { animation: mapDrift 55s linear infinite alternate-reverse; }
@keyframes mapDrift { from { transform: translateX(-5px); } to { transform: translateX(7px); } }
.isle-bob { animation: isleBob 5s ease-in-out infinite alternate; }
@keyframes isleBob { to { transform: translateY(-.7px); } }
.isle-bob .shad { animation: shadow 5s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes shadow { to { opacity: .05; transform: scale(.85); } }
.port .dot { fill: var(--brass); stroke: var(--ink); stroke-width: .35; }
.port:hover .dot { fill: var(--stamp); }
.port.here .dot { fill: var(--sea); } .port.sel .dot { fill: var(--stamp); }
.port .pn, .port .pt { paint-order: stroke; stroke: rgba(247, 241, 224, .92); stroke-linejoin: round; } .port .pn { stroke-width: 1.3px; } .port .pt { stroke-width: 1px; }
.route.on { stroke-width: .7; filter: drop-shadow(0 0 .5px rgba(194, 55, 31, .6)); }
.shipmark { animation: bob 3s ease-in-out infinite; pointer-events: none; }
.shipmark .prop { animation-duration: .2s; }
.port .ring { stroke: var(--stamp); }

/* ===== modals with an illustration on top ===== */
.modal { overflow: hidden; }
.modal-art { margin: -1.8rem -2rem 1.2rem; aspect-ratio: 400 / 150; border-bottom: 2px solid var(--ink); position: relative; overflow: hidden; background: #cfe2dc; }
.modal-art .scene { display: block; width: 100%; height: 100%; }
.modal.pirates, .modal.storm { box-shadow: 10px 10px 0 rgba(120, 20, 10, .35); }
.scene .hero { animation: bob 3.2s ease-in-out infinite; } .scene .hero.fast { animation: heroFast 1.6s ease-in-out infinite; }
@keyframes heroFast { 50% { transform: translateX(10px); } }
.scene .pr-ship { animation: bob 2.6s ease-in-out infinite; }
.scene .flash { animation: muzzle 2.2s infinite; transform-box: fill-box; transform-origin: center; opacity: 0; }
@keyframes muzzle { 0%, 55%, 100% { opacity: 0; transform: scale(.4); } 58% { opacity: 1; transform: scale(1.5); } 66% { opacity: 0; transform: scale(1.1); } }
.scene .smk { animation: smkUp 2.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.scene .s2 { animation-delay: .5s; } .scene .s3 { animation-delay: 1s; } .scene .s4 { animation-delay: 1.5s; }
@keyframes smkUp { 0% { opacity: 0; transform: translate(0, 4px) scale(.5); } 20% { opacity: .65; } 100% { opacity: 0; transform: translate(-14px, -22px) scale(1.7); } }
.scene .stormcloud { animation: stormShift 6s ease-in-out infinite alternate; }
@keyframes stormShift { to { transform: translateX(-10px); } }
.scene .bolt { animation: bolt 2.8s infinite; } @keyframes bolt { 0%, 38%, 56%, 100% { opacity: 0; } 40% { opacity: 1; } 44% { opacity: .15; } 47% { opacity: 1; } 52% { opacity: 0; } }
.scene .rain { animation: rain .55s linear infinite; } @keyframes rain { from { transform: translate(6px, -20px); opacity: 0; } 30% { opacity: .8; } to { transform: translate(-6px, 28px); opacity: 0; } }
.scene .windlines path { animation: windSlide 1.2s linear infinite; } @keyframes windSlide { from { transform: translateX(60px); opacity: 0; } 30% { opacity: 1; } to { transform: translateX(-120px); opacity: 0; } }
.scene .flare { stroke-dashoffset: 0; animation: flareDash 1s linear infinite; } @keyframes flareDash { to { stroke-dashoffset: -14; } }
.flare-burst { animation: burst 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; } @keyframes burst { 50% { transform: scale(1.35); opacity: .75; } }
.scene .sparks { animation: sparks .5s steps(2) infinite; } @keyframes sparks { 50% { opacity: 0; } }
.scene .peek { animation: peek 2.6s ease-in-out infinite; } @keyframes peek { 50% { transform: translateY(5px) rotate(2deg); } }
.scene .stampmark { transform-box: fill-box; transform-origin: center; animation: sceneStamp 3.2s infinite; } @keyframes sceneStamp { 0%, 8% { opacity: 0; transform: scale(2.2) rotate(-14deg); } 14%, 88% { opacity: 1; transform: scale(1) rotate(-14deg); } 100% { opacity: 0; } }
.scene .fall { animation: fallOff 2.2s ease-in infinite; } .scene .f2 { animation-delay: .5s; } .scene .f3 { animation-delay: 1s; } @keyframes fallOff { from { transform: translateY(-8px); opacity: 1; } to { transform: translateY(70px); opacity: 0; } }
.scene .drip { animation: drip 1.6s ease-in infinite; } @keyframes drip { 50% { opacity: .4; } }

/* ===== start screen ===== */
body.on-start { background: #22304a; }
.start { position: relative; z-index: 1; overflow: hidden; place-items: center start; padding: 2rem clamp(1rem, 7vw, 6rem); }
.startscene { position: absolute; inset: 0; z-index: 0; background: linear-gradient(#202c47 0%, #4a4a78 28%, #b0587a 55%, #ef9a62 78%, #f8cf8a 100%); overflow: hidden; }
.startscene .sun { position: absolute; left: 62%; top: 52%; width: 36vmin; height: 36vmin; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, #fff3c4 0, #ffd37a 32%, rgba(255, 190, 110, .55) 52%, rgba(255, 190, 110, 0) 72%); animation: sunPulse 8s ease-in-out infinite; }
@keyframes sunPulse { 50% { transform: translate(-50%, -50%) scale(1.06); opacity: .88; } }
.startscene .isles { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; }
.startscene .cl { position: absolute; left: 0; bottom: 0; width: 200%; height: 55%; animation: drift 130s linear infinite; }
.startscene .c3 { height: 62%; animation-duration: 260s; } .startscene .c2 { height: 52%; animation-duration: 170s; } .startscene .c1 { height: 38%; animation-duration: 95s; }
.startscene .bigship { position: absolute; right: 4%; top: 12%; width: min(60vw, 800px); animation: shipFloat 7s ease-in-out infinite; filter: drop-shadow(0 30px 24px rgba(30, 20, 50, .4)); }
@keyframes shipFloat { 0%, 100% { transform: translate(0, 0) rotate(-1.2deg); } 50% { transform: translate(-10px, -16px) rotate(1deg); } }
.startscene .smallship { position: absolute; width: 150px; opacity: .55; filter: blur(.4px); }
.startscene .s1 { top: 30%; left: -200px; animation: cross 70s linear infinite; } .startscene .s2 { top: 44%; left: -260px; width: 110px; opacity: .4; animation: cross 110s -40s linear infinite; }
@keyframes cross { to { transform: translateX(calc(100vw + 480px)); } }
.start-card { position: relative; z-index: 2; max-width: 600px; padding: 2.2rem 2.4rem 2rem; background: rgba(247, 241, 224, .95); border: 2px solid var(--ink); box-shadow: 10px 10px 0 rgba(15, 20, 35, .4); }
.start-card::before { content: ''; position: absolute; inset: 6px; border: 1px solid var(--brass); pointer-events: none; opacity: .7; }
.start-card .logo { text-shadow: 3px 3px 0 rgba(168, 121, 42, .25); }
.start-card .logo span { display: inline-block; animation: wob 6s ease-in-out infinite; transform-origin: 20% 80%; } @keyframes wob { 50% { transform: rotate(-2deg) translateY(-2px); } }
.start .lede { font-size: 1.18rem; }
.hs { border-top-color: var(--brass); }

/* ===== end screen ===== */
.end-art { display: grid; place-items: center; margin: -.6rem 0 .4rem; } .medal { width: 120px; height: auto; animation: medalIn .9s cubic-bezier(.2, 1.4, .4, 1) .15s both; filter: drop-shadow(2px 4px 0 rgba(28, 42, 51, .25)); }
@keyframes medalIn { from { opacity: 0; transform: translateY(-50px) rotate(-30deg) scale(.4); } }
.modal.end { text-align: center; } .modal.end .ledger { text-align: left; } .modal.end .choices { justify-items: center; }
.modal.end.win { border-color: var(--brass); box-shadow: 0 0 0 4px var(--paper-3), 0 0 0 6px var(--brass), 10px 10px 0 rgba(0, 0, 0, .35); }
.modal.end.ruin { background: #ddd3c0; filter: saturate(.6); } .modal.end.ruin h2 { color: var(--ink-2); }
.modal.end h2 { animation: stampTitle .7s .4s cubic-bezier(.2, 1.3, .4, 1) both; } @keyframes stampTitle { from { opacity: 0; transform: scale(2) rotate(-4deg); } }

/* ===== banner ===== */
.banner { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(18, 28, 34, .5); animation: fade .3s both; cursor: pointer; padding: 1rem; }
.banner.out { animation: fadeOut .4s both; } @keyframes fadeOut { to { opacity: 0; } }
.bn-card { max-width: min(540px, 94vw); background: var(--paper-3); border: 2px solid var(--ink); padding: 1.8rem 2.4rem 1.6rem; text-align: center; box-shadow: 10px 10px 0 rgba(0, 0, 0, .35), inset 0 0 0 5px var(--paper-3), inset 0 0 0 6px var(--brass); animation: drop .55s cubic-bezier(.2, 1.3, .4, 1) both; }
.bn-card h2 { font: 900 clamp(2rem, 6vw, 3.2rem)/1 var(--display); letter-spacing: -.03em; margin: .2rem 0 .5rem; } .bn-card p { margin: .2rem 0; }

/* ===== sound control ===== */
kbd { font: 600 .7rem var(--mono); border: 1px solid currentColor; border-radius: 3px; padding: 0 .3rem; opacity: .8; }

/* ===== intro choreography ===== */
 @keyframes topIn { from { opacity: 0; transform: translateY(-100%); } }
 @keyframes tabIn { from { opacity: 0; transform: translateX(-22px); } }

.intro .page { animation: rise .8s .25s both; }
  @keyframes sideIn { from { opacity: 0; transform: translateX(30px); } }

/* ===== the voyage ===== */
.vy { position: fixed; inset: 0; z-index: 100; overflow: hidden; background: #16222a; cursor: pointer; animation: vyIn .4s both; }
.vy.leaving { animation: vyOut .32s both; } @keyframes vyIn { from { opacity: 0; } } @keyframes vyOut { to { opacity: 0; } }
.vy-bg { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; }
.vy-bg.b-dawn { background: linear-gradient(#56649a 0%, #d98e9a 52%, #fbd59c 100%); } .vy-bg.b-day { background: linear-gradient(#4f93b3 0%, #a6d0d8 55%, #f1e7c8 100%); }
.vy-bg.b-dusk { background: linear-gradient(#2a3664 0%, #b0507a 52%, #f2a05a 100%); } .vy-bg.b-night { background: linear-gradient(#0c1330 0%, #263262 55%, #54447a 100%); } .vy-bg.b-storm { background: linear-gradient(#141b21 0%, #33414a 55%, #55666b 100%); }
.vy[data-tone='dawn'] .b-dawn, .vy[data-tone='day'] .b-day, .vy[data-tone='dusk'] .b-dusk, .vy[data-tone='night'] .b-night, .vy[data-tone='storm'] .b-storm { opacity: 1; }
.vy-stars { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s; background-image: radial-gradient(1.6px 1.6px at 12% 18%, #fff, transparent), radial-gradient(1.2px 1.2px at 30% 40%, #fff, transparent), radial-gradient(1.8px 1.8px at 52% 14%, #fff, transparent), radial-gradient(1.2px 1.2px at 70% 34%, #fff, transparent), radial-gradient(1.6px 1.6px at 88% 12%, #fff, transparent), radial-gradient(1.2px 1.2px at 40% 8%, #fff, transparent), radial-gradient(1.2px 1.2px at 80% 52%, #fff, transparent); background-size: 100% 70%; background-repeat: no-repeat; }
.vy[data-tone='night'] .vy-stars { opacity: .9; }
.vy-sky { position: absolute; inset: 0; }
.vy-sun { position: absolute; left: 72%; top: 16%; width: 15vmin; height: 15vmin; border-radius: 50%; transform: translate(-50%, -50%); transition: left 1.6s, top 1.6s, background 1.6s, box-shadow 1.6s, opacity 1.6s; background: radial-gradient(circle, #fffbe0 0, #ffe9a0 45%, rgba(255, 230, 150, 0) 72%); box-shadow: 0 0 90px 36px rgba(255, 234, 160, .45); }
.vy[data-tone='dawn'] .vy-sun { left: 80%; top: 56%; background: radial-gradient(circle, #fff0c0 0, #ffb878 50%, rgba(255, 170, 110, 0) 72%); box-shadow: 0 0 90px 36px rgba(255, 170, 110, .4); }
.vy[data-tone='dusk'] .vy-sun { left: 24%; top: 58%; background: radial-gradient(circle, #ffe0a0 0, #ff8a50 50%, rgba(255, 110, 70, 0) 72%); box-shadow: 0 0 100px 40px rgba(255, 120, 70, .4); }
.vy[data-tone='night'] .vy-sun { left: 22%; top: 20%; width: 9vmin; height: 9vmin; background: radial-gradient(circle, #f4f6ff 0, #cfd8f5 55%, rgba(200, 215, 255, 0) 72%); box-shadow: 0 0 60px 20px rgba(190, 205, 255, .25); }
.vy[data-tone='storm'] .vy-sun { opacity: 0; }
.vy-sky .cl { position: absolute; left: 0; width: 200%; will-change: transform; animation: drift linear infinite; transition: filter 1.4s; }
.vy-sky .c3 { bottom: 28%; height: 34%; animation-duration: 56s; } .vy-sky .c2 { bottom: 8%; height: 42%; animation-duration: 24s; } .vy-sky .c1 { bottom: -6%; height: 44%; animation-duration: 9s; }
.vy[data-tone='dusk'] .cl { filter: sepia(.6) saturate(1.6) hue-rotate(-18deg) brightness(.85); } .vy[data-tone='dawn'] .cl { filter: sepia(.4) saturate(1.5) hue-rotate(-14deg) brightness(.95); }
.vy[data-tone='night'] .cl { filter: brightness(.38) saturate(.8) hue-rotate(190deg); } .vy[data-tone='storm'] .cl { filter: brightness(.38) saturate(.4); }
.vy-ship { position: absolute; left: 50%; top: 38%; width: min(52vw, 560px); transform: translate(-50%, -50%); animation: fly 2.8s ease-in-out infinite; filter: drop-shadow(0 26px 18px rgba(10, 18, 30, .3)); }
@keyframes fly { 0%, 100% { transform: translate(-50%, -50%) rotate(-1.1deg); } 50% { transform: translate(-50%, calc(-50% - 14px)) rotate(1.1deg); } }
.vy-rain { position: absolute; inset: 0; opacity: 0; transition: opacity 1s; background-image: repeating-linear-gradient(105deg, transparent 0 18px, rgba(220, 235, 245, .35) 18px 19px); background-size: 160px 160px; animation: rainFall .35s linear infinite; }
@keyframes rainFall { to { background-position: -60px 160px; } }
.vy-bolt { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.vy.enc-storm .vy-rain { opacity: 1; } .vy.enc-storm .vy-bolt { animation: boltFlash 2.2s infinite; } .vy.enc-storm .vy-ship { animation-duration: 1.1s; }
@keyframes boltFlash { 0%, 100% { opacity: 0; } 6% { opacity: .85; } 10% { opacity: .1; } 15% { opacity: .6; } 24% { opacity: 0; } }
.vy-actor { position: absolute; right: -45%; top: 34%; width: min(36vw, 420px); transition: right 2s cubic-bezier(.2, .8, .3, 1); animation: bob 2.4s ease-in-out infinite; filter: drop-shadow(0 18px 14px rgba(10, 18, 30, .3)); }
.vy-actor .actor { width: 100%; display: block; overflow: visible; }
.vy[class*='enc-'] .vy-actor { right: 6%; }
.vy.enc-pirates::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 45%, rgba(150, 20, 10, .42)); animation: dangerFlash 1s ease-in-out infinite; }
@keyframes dangerFlash { 50% { opacity: .35; } }
.vy-hud { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.3rem 1.8rem; color: #fff; text-shadow: 0 1px 10px rgba(0, 0, 0, .4); }
.vy-hud .eyebrow { color: #ffd9a0; }
.vy-title h2 { font: 800 clamp(1.7rem, 4.6vw, 3.1rem)/1 var(--display); letter-spacing: -.03em; } .vy-title h2 i { font-weight: 400; opacity: .7; }
.vy-day { text-align: center; padding: .35rem 1.1rem .45rem; border: 2px solid rgba(255, 255, 255, .7); border-radius: 3px; background: rgba(20, 32, 42, .5); margin-left: auto; }
.vy-day span { display: block; font: 600 .66rem var(--mono); letter-spacing: .18em; text-transform: uppercase; opacity: .8; } .vy-day b { display: block; font: 600 2.4rem/1.05 var(--mono); }
 
.vy-day b.tk { animation: dayTick .35s ease-out; }
@keyframes dayTick { 0% { transform: translateY(-8px) scale(1.25); color: #ffe08a; } 100% { transform: none; } }
.vy-skip { margin-left: 0; text-shadow: none; color: #fff; border-color: rgba(255, 255, 255, .6); background: rgba(20, 32, 42, .45); } .vy-skip:hover:not(:disabled) { background: rgba(20, 32, 42, .7); }
.vy-skip kbd { margin-left: .4rem; }
.vy-track { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 1rem; padding: 2.6rem 1.8rem 1.4rem; color: #fff; background: linear-gradient(transparent, rgba(14, 24, 32, .72)); }
.vy-end { display: grid; justify-items: center; gap: .3rem; width: 5.4rem; text-align: center; font: 600 .66rem var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.vy-line { position: relative; flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .28); }
.vy-line .fill { position: absolute; inset: 0; border-radius: 3px; background: linear-gradient(90deg, var(--brass), var(--stamp)); transform-origin: left; transform: scaleX(0); }
.vy-line .mark { position: absolute; top: -32px; left: 0; width: 64px; margin-left: -32px; } .vy-line .mark .shipart { width: 100%; }
.vy-arrive { position: absolute; inset: 0; display: grid; place-items: end center; padding-bottom: 14vh; opacity: 0; pointer-events: none; background: rgba(14, 24, 32, .5); transition: opacity .5s; text-align: center; color: #fff; }
.vy.arriving .vy-arrive { opacity: 1; } .vy-arrive h2 { font: 900 clamp(2.4rem, 8vw, 5rem)/1 var(--display); letter-spacing: -.04em; text-shadow: 0 4px 24px rgba(0, 0, 0, .5); } .vy-arrive p { margin: .3rem 0; font-style: italic; opacity: .9; }
.vy-arrive .crest.lg { margin: 0 auto .8rem; width: 6rem; } .vy.arriving .vy-arrive .crest { animation: crestIn .7s cubic-bezier(.2, 1.4, .4, 1) both; } .vy-arrive .eyebrow { color: #ffd9a0; }

/* ===== small screens ===== */
@media (max-width: 700px) {
  .modal-art { margin: -1.3rem -1.3rem 1rem; }
  .start { padding: 1rem; place-items: end center; } .start-card { padding: 1.4rem 1.3rem; max-width: 100%; margin-top: 30vh; }
  .startscene .bigship { width: 92vw; right: -6%; top: 3%; } .startscene .sun { left: 60%; top: 30%; }
  .h2 { padding-right: 4rem; } .crest.lg { width: 3.2rem; }
  .vy-hud { padding: 1rem 1rem; flex-wrap: wrap; } .vy-title { flex: 1 1 100%; } .vy-day { margin-left: 0; } .vy-ship { width: 82vw; top: 40%; } .vy-actor { width: 56vw; top: 46%; } .vy-track { padding: 2rem 1rem 1rem; gap: .5rem; } .vy-end { width: 4rem; }
  .wf-stamp { font-size: 1.4rem; } .bn-card { padding: 1.3rem 1.2rem; } .toast { font-size: .92rem; }
  .shipart.row { width: 70px; }
}
@media (max-width: 1100px) { .ship-art .shipart { max-width: 200px; } }

/* ===== reduced motion: stop everything decorative ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  #wf-fx { display: none; }
  .wf-float, .wf-stamp, .wf-coin, .wf-conf { display: none; }
}
