/* Only the Bacavia island owns this surface; catalog and KSRF stay independent. */
body:has(.bw-world){background:#b4edf1!important;color:#143449}
body:has(.bw-world)>.shell{max-width:none!important;width:100%!important;padding:0!important;margin:0!important}
body:has(.bw-world)>.home-bottom-nav,body:has(.bw-world)>.topbar{display:none!important}
.bw-world{--bw-ink:#12374a;--bw-teal:#007e88;--bw-gold:#f5c66b;color:var(--bw-ink);font-family:system-ui,sans-serif;isolation:isolate;background:#b4edf1;overflow:hidden}
.bw-world *{box-sizing:border-box}.bw-world [hidden]{display:none!important}
.bw-world a{text-decoration:none;color:inherit}.bw-world button,.bw-world summary{font:inherit;cursor:pointer}.bw-world button{width:auto;margin:0;text-transform:none;letter-spacing:normal}
.bw-world :is(a,button,summary,[tabindex]):focus-visible{outline:3px solid #dd7523;outline-offset:5px}
.bw-header{position:relative;z-index:4;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px max(24px,calc((100vw - 1400px)/2));background:#fffffff2;box-shadow:0 3px 20px #056f7a15}
.bw-brand{display:flex;align-items:center;gap:10px;font-size:26px;font-weight:900;letter-spacing:.04em}.bw-brand>span:first-child{font-size:44px;color:#008e9c}.bw-brand small{display:block;letter-spacing:.25em;font-size:11px;font-weight:700}.bw-greeting{font-size:15px;color:#526b78}
.bw-menu{position:relative}.bw-menu summary{list-style:none;display:flex;align-items:center;gap:8px;min-height:44px;border:1px solid #d0e4e5;border-radius:30px;padding:6px 14px;font-weight:750;font-size:14px;background:white}.bw-menu summary::-webkit-details-marker{display:none}.bw-menu summary>span{font-size:25px;color:#007e88}.bw-menu>div{position:absolute;right:0;top:calc(100% + 12px);width:205px;border:1px solid #d0e4e5;background:white;padding:8px;border-radius:18px;box-shadow:0 15px 35px #12374a25}.bw-menu a{display:block;padding:12px;font-size:15px;border-radius:10px}.bw-menu a:hover{background:#e6f7f5}
.bw-adventure{position:relative;max-width:1600px;margin:auto}.bw-intro{position:absolute;z-index:2;top:38px;left:4%;pointer-events:none}.bw-intro p{font-size:12px;letter-spacing:.18em;font-weight:850;color:#006c76;margin:0 0 8px}.bw-intro h1{font-size:clamp(27px,3vw,44px);line-height:1.08;letter-spacing:-.04em;text-transform:none;margin:0 0 15px;max-width:380px}.bw-intro>a{pointer-events:auto;font-size:14px;font-weight:750;background:#ffffffc9;border-radius:25px;padding:10px 15px;display:inline-flex;gap:18px}
.bw-intro{background:#ffffffeb;padding:18px 22px;border-radius:22px}
.bw-resume{position:absolute;z-index:3;right:3%;top:25px;width:330px;display:flex;gap:14px;padding:18px;border-radius:22px;background:#fffffff2;border:1px solid white;box-shadow:0 16px 35px #14637325;align-items:center}.bw-resume>img{width:64px;height:88px;object-fit:cover;border-radius:5px;box-shadow:3px 5px 10px #12374a20}.bw-resume>span{flex:1;min-width:0}.bw-resume small,.bw-quests small{display:block;color:#007681;font-size:11px;letter-spacing:.11em;font-weight:800}.bw-resume strong{display:block;font-size:16px;line-height:1.3;margin:5px 0}.bw-progress-label{font-size:12px;color:#526b78;display:block}.bw-resume progress{width:100%;height:6px;display:block;margin:6px 0;accent-color:#009eaa}.bw-resume b{display:flex;justify-content:space-between;align-items:center;gap:12px;color:#007881;font-size:14px;margin-top:10px}
.bw-island-scroll{overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:#54b8c4 transparent;overscroll-behavior-x:contain}.bw-island{position:relative;width:100%;min-width:760px;aspect-ratio:3/2}.bw-land{display:block;position:absolute;width:100%;height:100%;object-fit:cover;user-select:none;pointer-events:none}.bw-life{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.bw-place{position:absolute;z-index:2;display:flex;gap:9px;align-items:center;transform:translate(-50%,-50%);border:2px solid #efc171;border-radius:17px;padding:9px 15px 9px 10px;background:linear-gradient(#fffdf0,#ffe2a1);color:#163b4e!important;box-shadow:0 5px 0 #aa7747,0 10px 20px #0c414440;min-height:55px;white-space:nowrap;font-weight:850!important;font-size:16px!important;transition:filter .18s,box-shadow .18s}.bw-place>span:first-child{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;font-size:24px;color:#ffe1a0;background:#174657;border:2px solid #e4bb70}.bw-place small{display:block;font-size:11px;font-weight:600;color:#6a613c;margin-top:2px}.bw-place:hover{filter:brightness(1.06);box-shadow:0 3px 0 #aa7747,0 6px 12px #0c414440}.bw-library{left:50%;top:39%}.bw-writing{left:24%;top:59%}.bw-quiz{left:77%;top:59%}.bw-garden{left:51%;top:80%}
.bw-bird{position:absolute;left:-15%;top:15%;width:58px;height:48px;animation:bw-flight 26s linear infinite}.bw-bird i{display:block;width:100%;height:100%;background:url('bacavia-world/bird.png') 0 0/400% 100% no-repeat;animation:bw-sprite .75s steps(4) infinite}.bw-bird-two{top:30%;animation-delay:-13s;animation-duration:32s;width:42px;height:35px}.bw-bird-three{top:9%;animation-delay:-7s;animation-duration:37s;width:35px;height:29px}
.bw-water{position:absolute;border:2px solid #ffffff8a;border-radius:50%;width:8%;height:2%;animation:bw-ripple 6s ease-out infinite}.bw-water-one{left:9%;top:79%}.bw-water-two{right:7%;top:84%;animation-delay:-3s}.bw-glow{position:absolute;width:6px;height:6px;border-radius:50%;background:#fff6b0;box-shadow:0 0 15px 6px #ffe499;animation:bw-spark 4s ease-in-out infinite}.bw-glow-one{left:47%;top:35%}.bw-glow-two{left:71%;top:55%;animation-delay:-2s}
.bw-island{container-type:inline-size}.bw-bird{height:87px}.bw-bird-two{height:63px}.bw-bird-three{height:52.5px}
@keyframes bw-sprite{to{background-position:133.333333% 0}}
@keyframes bw-flight{0%{transform:translate(0,0) rotate(-4deg)}50%{transform:translate(800px,70px) rotate(3deg)}100%{transform:translate(1750px,-40px) rotate(-4deg)}}
@keyframes bw-ripple{0%{transform:scale(.4);opacity:0}20%{opacity:.65}100%{transform:scale(2.1);opacity:0}}@keyframes bw-spark{0%,100%{opacity:.1;transform:translateY(6px) scale(.5)}50%{opacity:.8;transform:translateY(-8px) scale(1)}}
.bw-world[data-paused="true"] .bw-life *,.bw-world[data-offscreen="true"] .bw-life *{animation-play-state:paused!important}
.bw-map-tools{position:relative;display:flex;justify-content:flex-end;align-items:center;gap:16px;padding:0 24px 16px;margin-top:-15px;z-index:2}.bw-swipe{display:none;font-size:12px;color:#1c5d68}.bw-motion{background:#ffffffdf;color:#21535d;border:1px solid #ffffffc9;border-radius:22px;padding:10px 15px;min-height:44px;font-size:13px!important;font-weight:700}
.bw-quests{display:flex;align-items:center;gap:16px;margin:0 3% 32px;padding:20px 24px;background:#fffffff0;border:1px solid white;border-radius:24px;box-shadow:0 15px 35px #14637315}.bw-quests>div{display:flex;gap:12px;align-items:center;margin-right:auto}.bw-quests strong{display:block;font-size:19px;margin-top:4px}.bw-compass{font-size:38px;color:#007f8b}.bw-quests>a,.bw-quests>button{display:flex;align-items:center;gap:22px;border:1px solid #c6e4e6;background:#eff9f8;padding:14px 16px;border-radius:14px;min-height:48px;font-size:14px;font-weight:750;color:#175969}.bw-quests span>small{white-space:nowrap}
.bw-dialog{border:1px solid #b9dbde;border-radius:24px;padding:24px;width:min(540px,calc(100vw - 28px));max-height:85dvh;color:#15394b;background:#fbfffe;box-shadow:0 30px 80px #042a4a40;font:16px/1.5 system-ui,sans-serif}.bw-dialog::backdrop{background:#062b466e;backdrop-filter:blur(5px)}.bw-dialog-head{display:flex;justify-content:space-between;align-items:center;gap:15px}.bw-dialog h2{font-size:23px;margin:0}.bw-dialog-head button{border:1px solid #cee4e5;border-radius:50%;width:44px;height:44px;background:#edf7f6;color:#12374a;font-size:26px}.bw-dialog p{color:#58717b;font-size:15px}.bw-activity-books>a{display:flex;align-items:center;gap:14px;padding:14px 0;border-top:1px solid #dcebec;min-height:60px}.bw-activity-books img{width:44px;height:60px;object-fit:cover;border-radius:4px}.bw-activity-books a>span:nth-child(2){flex:1}.bw-activity-books small{display:block;color:#67808b;font-size:13px}.bw-activity-books strong{font-size:15px}
body:has(.bw-world) #bacavia-books{scroll-margin-top:15px;max-width:1180px;margin:0 auto!important;padding:28px 20px 40px!important;border-radius:28px 28px 0 0;background:#fbfefd}
@media(max-width:1000px){.bw-intro{top:24px;left:3%}.bw-intro h1{font-size:28px}.bw-resume{width:290px;padding:12px}.bw-quests{flex-wrap:wrap}.bw-quests>div{width:100%}.bw-quests>a,.bw-quests>button{flex:1;justify-content:space-between}}
@media(max-width:600px){.bw-header{padding:10px 16px;gap:12px}.bw-brand{font-size:21px;gap:6px}.bw-brand>span:first-child{font-size:35px}.bw-brand small{font-size:9px}.bw-greeting{display:none}.bw-menu summary{padding:4px 11px;font-size:13px}.bw-intro{position:relative;top:auto;left:auto;padding:22px 20px 16px}.bw-intro p{font-size:11px;margin-bottom:6px}.bw-intro h1{font-size:28px;margin-bottom:0;max-width:none}.bw-intro h1 br{display:none}.bw-intro>a{display:none}.bw-resume{position:relative;right:auto;top:auto;width:calc(100% - 32px);margin:0 16px 12px;padding:13px 16px;gap:12px;border-radius:18px}.bw-resume>img{width:50px;height:69px}.bw-resume strong{font-size:15px;margin:3px 0}.bw-resume small{font-size:10px}.bw-resume b{margin-top:5px}.bw-resume progress{max-width:210px}.bw-island{min-width:740px}.bw-place{font-size:14px!important;padding:7px 10px;gap:6px;min-height:50px;border-radius:14px}.bw-place>span:first-child{width:30px;height:30px;font-size:21px}.bw-place small{font-size:10px}.bw-map-tools{justify-content:space-between;padding:6px 16px 14px;margin-top:0}.bw-swipe{display:block}.bw-motion{padding:8px 12px;font-size:12px!important}.bw-quests{margin:0 16px 24px;padding:16px;gap:10px;border-radius:19px}.bw-quests>div{gap:10px}.bw-quests strong{font-size:18px}.bw-quests>a,.bw-quests>button{flex:none;width:100%;padding:12px;font-size:14px}.bw-dialog{padding:20px}.bw-dialog h2{font-size:21px}}
@media(prefers-reduced-motion:reduce){.bw-life *{animation:none!important}.bw-place{transition:none}}

/* Responsive overview: keep every destination visible without sideways scrolling. */
.bw-adventure{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;padding:20px 24px 0}
.bw-intro{position:static;pointer-events:auto;align-self:center;padding:16px 20px}
.bw-intro h1{font-size:clamp(26px,2.4vw,34px);max-width:none;margin-bottom:12px}
.bw-intro h1 br{display:none}
.bw-resume{position:static;width:min(100%,380px);justify-self:end;margin:0;overflow-wrap:anywhere}
.bw-resume>img{flex-shrink:0}
.bw-island-scroll{grid-column:1/-1;overflow:visible}
.bw-land{border-radius:20px}
.bw-island{width:min(100%,max(480px,calc((100svh - 410px)*1.5)));min-width:0;margin:auto}
.bw-map-tools,.bw-quests{grid-column:1/-1;margin:0}
.bw-map-tools{padding:0 0 8px}
.bw-quests{margin-bottom:24px}
.bw-swipe{display:none}
@media(max-width:760px){
 .bw-adventure{grid-template-columns:minmax(0,1fr);gap:12px;padding:12px 16px 0}
 .bw-intro{padding:18px;border-radius:18px}
 .bw-intro h1{font-size:28px;margin:0;line-height:1.15}
 .bw-intro>a{display:none}
 .bw-resume{width:100%;padding:14px;justify-self:stretch}
 .bw-island{width:100%;aspect-ratio:auto;padding-top:calc(200% / 3);display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 10px}
 .bw-land,.bw-life{top:0;bottom:auto;left:0;width:100%;height:auto;aspect-ratio:3/2}
 .bw-land{object-fit:contain;border-radius:18px}
 .bw-place{position:static;transform:none;white-space:normal;min-width:0;min-height:64px;padding:9px 8px;gap:6px;font-size:13px!important;border-radius:14px;text-align:left}
 .bw-place>span:first-child{flex-shrink:0;width:28px;height:28px;font-size:19px}
 .bw-place>span:last-child{min-width:0;overflow-wrap:anywhere}
 .bw-place small{font-size:10px;line-height:1.3}
 .bw-map-tools{justify-content:flex-end;padding-top:6px}
 .bw-quests{padding:16px;gap:10px}
 .bw-quests>a,.bw-quests>button{flex:none;width:100%}
}

/* Desktop game occupies one viewport; the catalog is a separate destination. */
@media(min-width:1024px){
 html:has(.bw-world),body:has(.bw-world){height:100%;overflow:hidden!important}
 body:has(.bw-world){padding:0!important;margin:0!important}
 body:has(.bw-world)>.shell{height:100dvh;min-height:0!important;overflow:hidden}
 body:has(.bw-world) #bacavia-books,.bw-world .bw-quests{display:none!important}
 .bw-world{height:calc(100dvh - 70px);display:flex;flex-direction:column}
 .bw-header{flex:0 0 72px;min-height:0;padding:8px 24px}
 .bw-adventure{flex:1;min-height:0;position:relative;display:block;max-width:none;width:100%;padding:0;margin:0}
 .bw-island-scroll{position:absolute;inset:0;overflow:hidden}
 .bw-island{width:100%;height:100%;min-width:0;aspect-ratio:auto;margin:0}
 .bw-land{border-radius:0;object-fit:cover}
 .bw-intro{position:absolute;z-index:3;top:18px;left:24px;width:clamp(280px,29vw,420px);padding:16px 20px;background:#ffffffe8}
 .bw-intro h1{font-size:clamp(25px,2.2vw,36px);line-height:1.1}
 .bw-resume{position:absolute;top:18px;right:24px;width:clamp(280px,26vw,360px);padding:14px;z-index:3;background:#fffffff0}
 .bw-map-tools{position:absolute;right:20px;bottom:12px;margin:0;padding:0;z-index:3}
 .bw-place{max-width:260px}
}

/* Island polish: scoped here so the reader, catalog and other hosts retain their UI. */
html body.bg-game.public-catalog-route:has(.bw-world){background:#127c99!important}
html body.bg-game.public-catalog-route:has(.bw-world)>.shell{padding:0!important;max-width:none!important}
.bw-place{min-height:46px;padding:5px 13px 5px 6px;gap:9px;border-radius:24px;border-width:1px;background:#fff6df;box-shadow:0 3px 0 #b58b50,0 5px 12px #153d4929;font-size:14px!important}
.bw-place>span:first-child{width:32px;height:32px;border-width:1px;font-size:21px}
.bw-place small{display:none}
.bw-resume{background:#fff9edf5;border:1px solid #e2bf82;border-radius:18px;box-shadow:0 5px 18px #15495824}
.bw-resume progress{appearance:none;border:none;background:#ded6c6;border-radius:4px;overflow:hidden;height:5px}
.bw-resume progress::-webkit-progress-bar{background:#ded6c6}
.bw-resume progress::-webkit-progress-value{background:#008997;border-radius:4px}
.bw-resume progress::-moz-progress-bar{background:#008997;border-radius:4px}
.bw-sound{display:flex;gap:7px;align-items:center;min-height:44px;padding:9px 15px;border:1px solid #dfbd81;border-radius:24px;background:#fff9edf5;color:#164b57;font-size:12px!important;box-shadow:0 3px 12px #15495820}
.bw-sound[aria-pressed=true]{color:#007985}
/* Continuous joint motion: one woman on the existing path, one seated reader.
   Keep the seat/feet still while the reader breathes; never cycle whole poses. */
.bw-woman{position:absolute;--stride:1.8s;width:clamp(35px,4.3cqw,66px);height:clamp(31px,3.82cqw,58.7px);left:56%;top:43%;transform:translate(-50%,-100%);animation:bw-woman-route 14.4s linear infinite}
.bw-facing{display:block;width:100%;height:100%;animation:bw-woman-turn 14.4s linear infinite}
.bw-person{display:block;width:100%;height:100%;overflow:visible;filter:drop-shadow(0 2px 1px #17392b44)}
.bw-person g{transform-box:view-box}
.bw-leg-back{transform-origin:179px 244px;animation:bw-leg-back var(--stride) ease-in-out infinite}
.bw-leg-front{transform-origin:223px 246px;animation:bw-leg-front var(--stride) ease-in-out infinite}
.bw-woman-body{transform-origin:200px 263px;animation:bw-woman-rise .9s ease-in-out infinite}
.bw-arm{transform-origin:245px 146px;animation:bw-arm-swing var(--stride) ease-in-out infinite}
.bw-reader{position:absolute;left:44%;top:71%;width:clamp(35px,4.5cqw,69px);height:clamp(31px,4cqw,61.3px);transform:translate(-50%,-100%)}
.bw-reader-breath{transform-origin:190px 176px;animation:bw-reader-breathe 4.8s ease-in-out infinite}
.bw-reader-head{transform-origin:170px 79px;animation:bw-reader-attention 11s ease-in-out infinite}
@keyframes bw-woman-route{
 0%,100%{left:56%;top:43%}
 50%{left:62%;top:37%}
}
/* A short turn at each endpoint avoids a one-frame mirror pop. */
@keyframes bw-woman-turn{0%,48%{transform:scaleX(1)}50%,98%{transform:scaleX(-1)}100%{transform:scaleX(1)}}
@keyframes bw-leg-back{0%,100%{transform:rotate(-5deg)}50%{transform:rotate(-65deg) translateY(-4px)}}
@keyframes bw-leg-front{0%,100%{transform:rotate(4deg)}50%{transform:rotate(55deg) translateY(-3px)}}
@keyframes bw-woman-rise{0%,100%{transform:translateY(0) rotate(-.4deg)}50%{transform:translateY(-3px) rotate(.4deg)}}
@keyframes bw-arm-swing{0%,100%{transform:rotate(0deg)}50%{transform:rotate(18deg)}}
@keyframes bw-reader-breathe{0%,100%{transform:scaleY(1)}50%{transform:scaleY(1.012)}}
@keyframes bw-reader-attention{0%,35%,100%{transform:rotate(0)}55%,65%{transform:rotate(2.5deg)}82%{transform:rotate(-1deg)}}
/* Animate water highlights only; never resample or translate the island artwork. */
.bw-sea{position:absolute;inset:0;background:radial-gradient(ellipse 28px 1px at 20% 35%,#e0ffff66 40%,transparent 75%) 0 0/131px 43px,radial-gradient(ellipse 18px 1px at 70% 65%,#e0ffff44 40%,transparent 75%) 0 0/173px 61px;clip-path:polygon(0 0,18% 0,12% 14%,0 24%);animation:bw-sea-drift 7s ease-in-out infinite;opacity:.45;pointer-events:none}
.bw-surf{position:absolute;inset:0;width:100%;height:100%;overflow:hidden;fill:none;stroke:#f4ffff;stroke-width:2;stroke-linecap:round;pointer-events:none}
.bw-surf use{transform-box:view-box;transform-origin:50% 60%;animation:bw-shore-wash 6.5s ease-out infinite;opacity:0}
.bw-surf use:nth-of-type(2){animation-delay:-2.17s;stroke-width:1.4;stroke-dasharray:8 5 13 7}
.bw-surf use:nth-of-type(3){animation-delay:-4.33s;stroke-width:1;stroke-dasharray:4 7 19 4}
@keyframes bw-sea-drift{0%,100%{background-position:0 0,0 0;opacity:.15}50%{background-position:8px 2px,-5px 1px;opacity:.4}}
@keyframes bw-shore-wash{0%{transform:scale(1.035) translateY(9px);opacity:0}30%{opacity:.48}85%{opacity:.18}100%{transform:scale(1) translateY(0);opacity:0}}
@media(min-width:1024px){
 html body.bg-game.public-catalog-route:has(.bw-world)>.shell{height:100dvh}
 .bg-game .bw-world{height:100dvh}
 .bg-game:has(.bw-world) .bg-hud{top:22px;left:28px;right:28px}
 .bg-game:has(.bw-world) .bg-hud>*{background:#fff9edf5;border-radius:16px;padding:8px 14px;box-shadow:0 3px 10px #123b491c}
 .bg-game:has(.bw-world) .bg-brand{font-size:22px}
 .bg-game:has(.bw-world) .bg-hud-links{gap:0;padding:7px 9px}
 .bg-game:has(.bw-world) .bg-hud-links a{background:transparent;border-radius:8px;font-size:13px;padding:8px 16px}
 .bg-game:has(.bw-world) .bg-hud-links a+a{border-left:1px solid #e5d6b9}
 .bg-game:has(.bw-world) .bg-hud-links a:hover{background:#efe8d4}
 .bg-game .bw-resume{top:104px;right:28px;width:280px;padding:13px;gap:12px}
 .bw-resume>img{width:48px;height:66px}
 .bw-resume strong{font-size:13px;line-height:1.35;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
 .bw-resume small{font-size:8px}.bw-progress-label{font-size:10px}.bw-resume b{font-size:12px;margin-top:7px}
 .bg-game .bw-library{left:50%;top:34%}.bg-game .bw-writing{left:23%;top:54%}.bg-game .bw-quiz{left:77%;top:53%}.bg-game .bw-garden{left:51%;top:80%}
 .bw-map-tools{right:28px;bottom:22px}
}
@media(max-width:760px){.bw-place{min-height:48px;font-size:12px!important}.bw-place>span:first-child{width:28px;height:28px}.bw-surf{height:auto;aspect-ratio:3/2}.bw-sea{height:100%}}
