/* Smart888-only finish: readable DOM labels and joints matched to the painted sleeves. */
#v-map svg.bobo[data-smart-skin] .smart-bobo-native{display:none}
/* All three carriers breathe in phase, so neither sleeve detaches from its arm. */
#v-map svg.bobo[data-smart-skin] .torso{animation:none}
#v-map svg.bobo[data-smart-skin] .smart-body-join45{animation:smart-breathe48 2.6s ease-in-out infinite}
@keyframes smart-breathe48{0%,100%{transform:translateY(-7px)}50%{transform:translateY(-8.5px)}}
@media(prefers-reduced-motion:reduce){#v-map svg.bobo[data-smart-skin] .smart-body-join45{animation:none}}
.smart-polish-part{pointer-events:none;user-select:none}
#v-map svg.bobo[data-smart-skin] .sprout{stroke:#785025;stroke-width:2.6}
#v-map svg.bobo[data-smart-skin] .browL,#v-map svg.bobo[data-smart-skin] .browR{stroke:#79502f;stroke-width:3.5}
#v-map svg.bobo[data-smart-skin] .eyes>ellipse:not(.lidL):not(.lidR){stroke:#714c33;stroke-width:2.5}
#v-map svg.bobo[data-smart-skin] .lidL,#v-map svg.bobo[data-smart-skin] .lidR{fill:#ffd0ac;stroke:#714c33;stroke-width:2.5}
#world .isle{--smart-tint:#ffd6ad;--smart-edge:#a76840}
#world .isle[data-s=ms]{--smart-tint:#ffe6a0;--smart-edge:#a67b35}
#world .isle[data-s=en]{--smart-tint:#bfe9fa;--smart-edge:#4b88a9}
#world .isle[data-s=sc]{--smart-tint:#c8ecb5;--smart-edge:#5b9450}
#world .isle[data-s=ma]{--smart-tint:#e4d4ff;--smart-edge:#8e70b1}
#world .iname{background:linear-gradient(165deg,#fff9eb -35%,var(--smart-tint) 60%);border-color:#533e2d;border-radius:18px;box-shadow:inset 0 3px 0 #fff9,inset 0 -4px 0 #9a60351c,0 5px 0 var(--smart-edge),0 7px 8px #175f7629;text-shadow:0 1px 0 #fff8}
#world .isub{border:1px solid #fff9;background:#fff9e9ed;border-radius:999px;box-shadow:0 2px 3px #155f6e25;padding:1px 8px}
#world .istars{background:linear-gradient(#fff1a5,#ffd34a);border-color:#785426;box-shadow:inset 0 2px 0 #fff9,0 2px 0 #bc8b39}
body[data-view=map] .hud .pill,body[data-view=map] .hud button,body[data-view=map] #v-map>.docks button{box-shadow:inset 0 2px 0 #fff9,0 4px 0 #75513b,0 7px 9px #155f6e20}
body[data-view=map] .hud button:active,body[data-view=map] #v-map>.docks button:active{box-shadow:inset 0 2px 0 #fff9,0 1px 0 #75513b}
#world .smart-lantern,#world .smart-kite,#world .smart-telescope,#world .smart-letter,#world .smart-beads{filter:drop-shadow(1px 3px 1px #59422e30)}
#world .smart-bubble{fill:#e7c1ff;stroke:#a57ac9}
#shelf .library[data-smart-subject]{border-radius:25px;background:linear-gradient(145deg,#fffdf3,var(--topic-paper,#fff9e9))!important;box-shadow:inset 0 3px 0 #fff,0 7px 0 #654b38,0 18px 45px #153e5140}
#shelf .library[data-smart-subject] .library-header,#shelf .library[data-smart-subject] .lib-top{background:linear-gradient(130deg,#fff8e9,var(--topic-accent,#ffe4ab));box-shadow:inset 0 3px 0 #fff9,0 4px 6px #6b553016}
#shelf .library[data-smart-subject] .library-heading{min-height:118px;background:linear-gradient(115deg,#fffdf4ee,#fff7d333)}
#shelf .smart-shelf-island{width:170px;height:104px;object-fit:contain;flex:none;filter:drop-shadow(0 3px 1px #79573425);display:none}
#shelf .smart-shelf-art-ready>.smart-shelf-island{display:block}
#shelf .smart-shelf-art-ready>.course-art{display:none}
#shelf .library[data-smart-subject] .library-cover{border-color:#674d35;border-radius:12px 24px 24px 12px;box-shadow:inset 4px 4px 0 #fff7,inset -5px -5px 0 #765d2b19,6px 7px 0 #bba17a,9px 10px 12px #624b2920;background:linear-gradient(135deg,#fff7 0,transparent 45%),var(--cover)}
#shelf .library[data-smart-subject] .lib-row,#shelf .library[data-smart-subject] .library-chapter{border-color:#674d35;border-radius:18px;box-shadow:inset 0 3px 0 #fff9,0 4px 0 #c1a77c,0 6px 9px #70532610}
#shelf .library[data-smart-subject] .lib-row.next{border-color:#e5772c;box-shadow:inset 0 3px 0 #fff9,0 4px 0 #d17b35,0 0 0 4px #ffd8a8}
#shelf .library[data-smart-subject] .lib-no,#shelf .library[data-smart-subject] .library-number{background:linear-gradient(145deg,#fff4bd,#ffd47b);box-shadow:inset 0 2px 0 #fff9}
#shelf .library[data-smart-subject] button:focus-visible,#world .isle:focus-visible .iname{outline:3px solid #214a82;outline-offset:4px}
@media(max-width:650px){#shelf .smart-shelf-island{width:95px;height:70px}#shelf .library[data-smart-subject] .library-heading{min-height:86px}#world .iname{border-radius:15px}}

#v-map svg.bobo[data-smart-skin] .bp-star path{stroke:#785132;stroke-width:2.5}
#shelf .smart-shelf-art-ready>.smart-shelf-badge{width:58px;height:48px;margin:-4px 0;display:block}
@media(max-width:650px){#shelf .smart-shelf-art-ready>.smart-shelf-badge{width:44px;height:40px;margin:-2px 0}}
/* Real touch reaches the original poke handler. */
#world #mapBobo{pointer-events:auto;cursor:pointer;border-radius:20px;touch-action:manipulation}
#world #mapBobo:focus-visible{outline:3px solid #214a82;outline-offset:3px}
body:not([data-view=map]) #mapBobo *,body.smart888-hidden #mapBobo *,body:has(#shelf:not([hidden])) #mapBobo *,body:has(#acct:not([hidden])) #mapBobo *{animation-play-state:paused!important}
/* Compact when the available height shrinks, including the on-screen keyboard. */
body.smart888-short #shelf .library[data-smart-subject] .library-header{padding:4px 10px;gap:8px;min-height:54px}
body.smart888-short #shelf .library[data-smart-subject] .library-header>span{font-size:16px}
body.smart888-short #shelf .library[data-smart-subject] .lib-top{gap:5px;padding:5px 10px 0}
body.smart888-short #shelf .library[data-smart-subject] .lib-title{flex-wrap:nowrap;gap:8px;min-width:0;min-height:34px}
body.smart888-short #shelf .library[data-smart-subject] .lib-title h3{font-size:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
body.smart888-short #shelf .library[data-smart-subject] .smart-shelf-badge{width:40px;height:34px;flex:none}
body.smart888-short #shelf .library[data-smart-subject] .lib-prog{font-size:12px;flex:none;gap:4px}
body.smart888-short #shelf .library[data-smart-subject] .lib-bookbar{width:64px}
body.smart888-short #shelf .library[data-smart-subject] .lib-water-key{display:none}
body.smart888-short #shelf .library[data-smart-subject] .lib-tools{flex-wrap:nowrap;gap:8px}
body.smart888-short #shelf .library[data-smart-subject] .lib-search{flex:1 1 auto;min-width:0;padding:2px 8px}
body.smart888-short #shelf .library[data-smart-subject] .lib-search-input{min-height:44px;font-size:16px}
body.smart888-short #shelf .library[data-smart-subject] .lib-search-hint{display:none}
body.smart888-short #shelf .library[data-smart-subject] .lib-seg{flex:none}
body.smart888-short #shelf .library[data-smart-subject] .lib-seg button{min-height:44px;padding:0 8px}
body.smart888-short #shelf .library[data-smart-subject] .lib-index{padding-bottom:5px}
body.smart888-short #shelf .library[data-smart-subject] .lib-index button{min-height:44px}
body.smart888-short #shelf .library[data-smart-subject] .lib-chhead{position:static}
body.smart888-short #shelf .library[data-smart-subject] .lib-scroll{padding-top:8px;scroll-padding-bottom:12px}
body.smart888-short #shelf .library[data-smart-subject] .lib-fab{right:20px;bottom:12px;min-height:44px}
@media(max-width:450px){body.smart888-short #shelf .library[data-smart-subject] .lib-title{flex-wrap:wrap;gap:4px}body.smart888-short #shelf .library[data-smart-subject] .lib-prog{margin-left:auto}body.smart888-short #shelf .library[data-smart-subject] .lib-title h3{font-size:18px}}
#world .smart-motion-part{pointer-events:none;user-select:none;transform:none!important;animation:none!important;filter:none!important;transition:none!important}
#world .smart-ball{animation:smart-ball 2.2s cubic-bezier(.3,0,.6,1) infinite;transform-origin:0 0}
#world .smart-sprout{animation:smart-sprout 3s ease-in-out infinite alternate;transform-origin:0 0}
#world .smart-sum{animation:smart-sum 3s steps(1) infinite}
#world .isle:hover .smart-ball,#world .isle.poke .smart-ball{animation-duration:.7s}
#world .isle:hover .smart-sprout,#world .isle.poke .smart-sprout{animation-duration:.8s}
#world .isle:hover .smart-bubble,#world .isle.poke .smart-bubble{animation-duration:.9s}
@keyframes smart-ball{0%,60%,100%{transform:translateY(0)}78%{transform:translateY(-32px)}}
@keyframes smart-sprout{from{transform:rotate(-5deg)}to{transform:rotate(5deg)}}
@keyframes smart-sum{50%{fill:#ffd34a}}
body[data-view=map] #sceneAudioPanel{top:calc(var(--hudH,64px) + 8px);max-height:calc(var(--app-height,100dvh) - var(--hudH,64px) - 24px)}
body.smart888-tiny #shelf .library[data-smart-subject] .lib-index{display:none}
#shelf .library[data-smart-subject] .lib-seg button,#shelf .library[data-smart-subject] .lib-index button{min-height:44px}
#shelf .library[data-smart-subject] .lib-search-input{min-height:44px}
body.smart888-tiny #shelf .library[data-smart-subject] .lib-title{min-height:22px;gap:4px}
body.smart888-tiny #shelf .library[data-smart-subject] .smart-shelf-badge,body.smart888-tiny #shelf .library[data-smart-subject] .lib-prog{display:none}
body.smart888-tiny #shelf .library[data-smart-subject] .lib-title h3{font-size:16px;line-height:1.2}
body.smart888-tiny #shelf .library[data-smart-subject] .lib-row{padding:6px 8px;min-height:88px}
body.smart888-tiny #shelf .library[data-smart-subject] .lib-txt{gap:1px}
body.smart888-tiny #shelf .library[data-smart-subject] .lib-txt small,body.smart888-tiny #shelf .library[data-smart-subject] .lib-txt em{line-height:1.2}
body.smart888-tiny #shelf .library[data-smart-subject] .lib-txt b{font-size:16px;line-height:1.3}
@media(max-width:450px) and (max-height:720px) and (orientation:portrait){#world .isub{padding:0 6px;font-size:11px;line-height:1.3}#world .istars{margin-top:2px}}
@media(max-width:900px){body.smart888-short #shelf .library[data-smart-subject] .lib-rows{grid-template-columns:1fr}}
body.smart888-short:not(.smart888-tiny) #shelf .library[data-smart-subject] .lib-row{padding:6px 10px}
#v-map #worldWrap{padding-left:max(18px,env(safe-area-inset-left,0px));padding-right:max(18px,env(safe-area-inset-right,0px))}
@media(max-width:700px){#v-map #worldWrap{padding-left:max(12px,env(safe-area-inset-left,0px));padding-right:max(12px,env(safe-area-inset-right,0px))}}
/* The IP has its own stage. The five subjects occupy the separate right-hand region. */
#v-map #world{grid-template-columns:repeat(9,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:14px 16px;padding:0 0 10px;height:max(100%,480px);min-height:480px;box-sizing:border-box}
#world .isle:nth-child(1){grid-column:4/span 2;grid-row:1}
#world .isle:nth-child(2){grid-column:6/span 2;grid-row:1}
#world .isle:nth-child(3){grid-column:8/span 2;grid-row:1}
#world .isle:nth-child(4){grid-column:5/span 2;grid-row:2}
#world .isle:nth-child(5){grid-column:7/span 2;grid-row:2;width:100%}
#world .isle .land{width:min(100%,calc((100cqh - 24px)/2 - 90px));max-width:290px}
#world #mapBobo{position:relative;grid-column:1/span 3;grid-row:1/span 2;align-self:center;justify-self:center;left:auto;top:auto;right:auto;bottom:auto;width:min(100%,350px);z-index:3;isolation:isolate;transition:none}
#world #mapBobo:before{content:"";position:absolute;left:7%;bottom:-1%;width:86%;height:12%;z-index:-1;background:radial-gradient(ellipse at 42% 28%,#e8f7b6,#8ccf9c 70%);border:3px solid #477857;border-radius:50%;box-shadow:0 5px 0 #31615e,0 12px 14px #17586c24;box-sizing:border-box;pointer-events:none}
#world #mapBobo svg.bobo{display:block;width:100%;height:auto;overflow:visible}
@media(min-width:701px) and (max-width:1000px){#world .isle .iname{font-size:21px;padding:4px 10px}#world .isub{font-size:11px;padding:1px 5px}}
/* A phone opens on a large mascot, then scrolls through full-size subject islands. */
@media(max-width:700px) and (orientation:portrait){
 #v-map #world{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:290px repeat(3,222px);height:1000px;min-height:1000px;gap:10px 12px;padding:0 0 14px}
 #world #mapBobo{grid-column:1/span 2;grid-row:1;width:210px;align-self:start;justify-self:center;margin-top:0}
 #world #mapBobo:after{content:"向下滑，选择学习岛 ↓";position:absolute;left:0;right:0;bottom:-27px;text-align:center;font:700 14px/22px var(--f-body);color:#245664;text-shadow:0 1px #fff8;pointer-events:none}
 #world .isle:nth-child(1){grid-column:1;grid-row:2}
 #world .isle:nth-child(2){grid-column:2;grid-row:2}
 #world .isle:nth-child(3){grid-column:1;grid-row:3}
 #world .isle:nth-child(4){grid-column:2;grid-row:3}
 #world .isle:nth-child(5){grid-column:1/span 2;grid-row:4;width:50%;justify-self:center}
 #world .isle .land{width:min(100%,145px)}
 #world .isle .iname{font-size:23px;padding:4px 12px}
}
/* Short landscape keeps the hero visible while the two rows remain scrollable. */
@media(max-height:600px) and (orientation:landscape){
 #v-map #world{height:max(100%,430px);min-height:430px;gap:14px 10px}
 #world .isle .land{width:min(100%,125px)}
 #world .isle .iname{font-size:clamp(16px,2.1vw,22px);padding:4px 6px;border-radius:13px}
 #world #mapBobo{position:sticky;top:4px;align-self:start;width:min(100%,calc((100dvh - var(--hudH) - 132px)*.74),220px);min-width:96px;margin-top:4px}
}
