.chinese-pilot{position:absolute;inset:0;z-index:35;pointer-events:none;container-type:size;font-family:"Microsoft YaHei","PingFang SC",sans-serif;color:#654c38}
/* Translation cards are tap controls: suppress the browser's dark tap overlay and selection. */
.chinese-pilot,.chinese-pilot *{-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.chinese-pilot img{-webkit-user-drag:none}
.chinese-pilot :is(button,[role=button]):focus:not(:focus-visible){outline:none}
.chinese-pilot [hidden],.chinese-pilot[hidden]{display:none!important}
.chinese-pilot .zh-toggle{position:absolute;right:14%;top:2.4%;display:flex;align-items:center;justify-content:center;gap:5px;width:11%;min-width:86px;height:8%;min-height:30px;padding:2px 8px;box-sizing:border-box;background:#fffdf4;color:#3b7680;border:2px solid #d1dfd3;border-radius:18px;box-shadow:0 3px 0 #617f7020;cursor:pointer;pointer-events:auto;font:600 clamp(11px,1.4cqw,17px)/1.3 "Microsoft YaHei",sans-serif}
.zh-toggle svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2}.zh-toggle[aria-pressed=false] .zh-eye-slash{display:block}.zh-toggle[aria-pressed=true] .zh-eye-slash{display:none}
.zh-body{position:absolute;right:calc(14% + max(11cqw,86px) + 1.3%);top:1.2%;width:auto;min-width:21%;max-width:46%;height:10.4%;display:flex;align-items:center;justify-content:center;gap:1cqw;padding:.3% 1.4%;box-sizing:border-box;background:linear-gradient(135deg,#fffefa,#f1f7e9);border:2px solid #fffdf8;border-radius:24px 24px 24px 8px;box-shadow:0 0 0 1px #cbdcc8,0 4px 0 #5b7c701c}
.zh-art{display:block;flex:0 0 auto;width:6.7cqw;height:110%;object-fit:contain}
.zh-copy{text-align:center;min-width:0}.zh-title{display:block;font-size:clamp(17px,2.65cqw,35px);font-weight:900;line-height:1.2;color:#286b75;white-space:nowrap}.zh-en{display:block;margin-top:3px;font-size:clamp(10px,1.15cqw,15px);line-height:1.1;color:#79958b;font-weight:600;letter-spacing:.06em}.zh-note{display:none}
.chinese-pilot[data-game=alphabet] .zh-body{background:linear-gradient(135deg,#fffdf6,#fff0da);box-shadow:0 0 0 1px #dec8a6,0 4px 0 #a77e541c}.chinese-pilot[data-game=alphabet] .zh-title{color:#86583f}.chinese-pilot[data-game=alphabet] .zh-en{color:#af8a65}.chinese-pilot[data-game=alphabet] .zh-toggle{color:#8b684a;border-color:#e3d0ae}
.chinese-pilot[data-game=wordplay] .zh-body{width:1px;height:1px;clip-path:inset(50%);overflow:hidden;padding:0;border:0;white-space:nowrap}
.chinese-pilot[data-game=wordplay] .zh-toggle{height:6%;background:#e8f7ff;color:#245c7b;border-color:#acd1e3;top:1.5%}
/* Chinese occupies a measured header slot; English and moving words stay below. */
.zh-sentence{position:absolute;left:15%;top:1.2%;width:58%;height:11.5%;padding:.5% 1.4%;box-sizing:border-box;display:flex;align-items:center;justify-content:center;border-radius:16px;background:#fffcf3f5;border:1px solid #e1e8d6;box-shadow:0 3px 0 #78998c14;text-align:center;color:#376779;font-size:clamp(12px,1.85cqw,24px);font-weight:700;line-height:1.45;text-wrap:pretty}
.zh-word-note{position:absolute;transform:translateX(-50%);min-width:8%;max-width:21%;padding:3px 10px;border-radius:10px;box-sizing:border-box;background:#fffdf2f2;border:1px solid #bdcec0;box-shadow:0 2px 0 #72988918;text-align:center;color:#3a7076;font-size:clamp(11px,1.6cqw,21px);font-weight:700;line-height:1.3}
.zh-word-note small{display:none}.zh-word-note:before{content:"";position:absolute;left:50%;top:-4px;width:6px;height:6px;transform:rotate(45deg);background:#fffdf2;border-top:1px solid #bdcec0;border-left:1px solid #bdcec0}
/* The English rhyme stays below the movie; Chinese overlays the movie. */
.chinese-pilot[data-game=wordplay][data-phase=story] .zh-sentence{left:16%;width:68%;top:69.3%;height:12.5%;font-size:clamp(12px,1.75cqw,23px);color:#6e573d;background:#fff9eaf5;border-color:#dfcaa4;box-shadow:none}
body.zh-story-active:is([data-zh-game=reader],[data-zh-game=alphabet]) video{top:0!important;height:100%!important;bottom:auto!important;object-fit:fill!important}
.chinese-pilot[data-game=numbers] .zh-title{color:#8a5435}.chinese-pilot[data-game=numbers] .zh-sentence{left:24%;width:52%;top:auto;bottom:3%;height:8%;background:#fffbedf2;color:#7d5936;font-size:clamp(12px,1.9cqw,24px)}
.chinese-pilot button:focus-visible{outline:3px solid #e9a64c;outline-offset:3px}
@media(prefers-reduced-motion:no-preference){.zh-toggle{transition:background .15s,box-shadow .15s}.zh-toggle:hover{background:#fff;box-shadow:0 3px 6px #85664030}}
.chinese-pilot[data-game=wordplay] .zh-toggle{width:auto;min-width:94px;white-space:nowrap}.zh-toggle svg{flex-shrink:0}
/* Keep the full switch label on one line at phone widths. */
.chinese-pilot .zh-toggle{min-width:94px;white-space:nowrap}.zh-toggle span{white-space:nowrap}
.zh-body{right:calc(14% + max(11cqw,94px) + 1.3%)}
.zh-sentence{width:55%}
/* Keep story illustrations inside the reserved caption slot, away from English. */
.zh-sentence.has-art{gap:1cqw;padding:.3% 1.2%}
.zh-sentence-art{display:block;flex:0 0 7.5cqw;width:7.5cqw;height:100%;min-height:0;object-fit:contain}
.zh-sentence-text{display:block;min-width:0}
.zh-sentence.has-art .zh-sentence-text{flex:1;text-align:left}
.chinese-pilot[data-game=wordplay] .zh-sentence-art{flex-basis:9cqw;width:9cqw}
.chinese-pilot[data-game=alphabet] .zh-sentence{background:#fff8eaf5;border-color:#e3d0ae;color:#86583f}
/* One enlarged meaning review throughout the existing word-complete phase. */
.chinese-pilot:is([data-game=reader],[data-game=alphabet])[data-phase=victory] .zh-body{left:17%;right:auto;top:68%;width:66%;min-width:0;max-width:none;height:28%;gap:2cqw;padding:0;background:transparent;border:0;border-radius:0;box-shadow:none}
.chinese-pilot:is([data-game=reader],[data-game=alphabet])[data-phase=victory] .zh-art{width:20cqw;height:100%;flex:0 0 30%}
.chinese-pilot:is([data-game=reader],[data-game=alphabet])[data-phase=victory] .zh-copy{flex:1;text-align:left}
.chinese-pilot:is([data-game=reader],[data-game=alphabet])[data-phase=victory] .zh-title{font-size:clamp(24px,4.5cqw,52px);white-space:normal;line-height:1.15}
.chinese-pilot:is([data-game=reader],[data-game=alphabet])[data-phase=victory] .zh-en{font-size:clamp(12px,1.65cqw,21px);margin-top:6px}
.chinese-pilot:is([data-game=reader],[data-game=alphabet])[data-phase=victory] .zh-note{display:block;font-size:clamp(12px,1.6cqw,20px);line-height:1.45;margin:8px 0 0;color:#6f8073}
@media(prefers-reduced-motion:no-preference){.chinese-pilot:is([data-game=reader],[data-game=alphabet])[data-phase=victory] .zh-body{animation:zh-review-in .36s ease-out both}@keyframes zh-review-in{from{opacity:0;transform:translateY(12px) scale(.94)}to{opacity:1;transform:translateY(0) scale(1)}}}
/* Movie continuation is independent of the Chinese pilot and its switch. */
/* Preserve the reserved header area on compact landscape phones. */
@media(max-height:340px){
 .chinese-pilot:not([data-phase=victory]) .zh-body{height:11.5%;padding:0 1.4%}
 .chinese-pilot:not([data-phase=victory]) .zh-title{font-size:15px;line-height:1.1}
 .chinese-pilot:not([data-phase=victory]) .zh-en{font-size:9px;line-height:1.15;margin-top:1px;letter-spacing:.03em}
 .chinese-pilot .zh-sentence{font-size:11px;line-height:1.3}
 .chinese-pilot[data-game=numbers] .zh-sentence{height:10%}
 .chinese-pilot:is([data-game=reader],[data-game=alphabet])[data-phase=victory] .zh-en{margin-top:3px}
 .chinese-pilot:is([data-game=reader],[data-game=alphabet])[data-phase=victory] .zh-note{margin-top:4px;font-size:11px}
}
/* Movie captions float inside the image and never reserve player space. */
.chinese-pilot[data-phase=story] .zh-sentence,.chinese-pilot[data-game=wordplay][data-phase=story] .zh-sentence{height:auto;min-height:9%;padding:.5% 1.2%;gap:.8cqw;border-radius:12px;background:#15313cb3;border:1px solid #ffffff55;box-shadow:0 2px 8px #071f3026;color:#fff;font-size:clamp(12px,1.65cqw,21px);line-height:1.35;text-shadow:0 1px 2px #071f3066}
.chinese-pilot[data-phase=story] .zh-sentence-art{flex:0 0 5.5cqw;width:5.5cqw;height:5.5cqw;max-height:40px}
.zh-voice-enabled :is(.zh-body,.zh-sentence,.zh-word-note){pointer-events:auto;cursor:pointer;touch-action:manipulation}
.zh-word-hit{position:absolute;pointer-events:auto;cursor:pointer;touch-action:manipulation;background:transparent;border:0;padding:0}
.zh-voice-enabled [role=button]:focus-visible,.zh-word-hit:focus-visible{outline:3px solid #e9a64c;outline-offset:3px}

#endless-numbers-translation #zh-content[hidden]{display:none!important}

/* Movie observation prompt: local number-specific text, no header card over animation. */
.chinese-pilot[data-game=numbers][data-phase=story] .zh-body{display:none}
.chinese-pilot[data-game=numbers][data-phase=story] .zh-sentence{left:15%;width:70%;top:auto;bottom:3%;height:auto;min-height:42px;max-height:18%;padding:10px 16px;gap:12px;background:#344f57c9;border:0;border-radius:12px;color:#fff;box-shadow:0 2px 5px #122d3e18;font-size:clamp(14px,1.6cqw,22px);line-height:1.4}
.chinese-pilot[data-game=numbers][data-phase=story] .zh-sentence-art{display:block;flex:0 0 28px;width:28px;height:36px;object-fit:contain}
@media(max-height:420px){.chinese-pilot[data-game=numbers][data-phase=story] .zh-sentence{min-height:36px;padding:5px 10px;gap:8px}.chinese-pilot[data-game=numbers][data-phase=story] .zh-sentence-art{height:26px;width:22px;flex-basis:22px}}


#stage-shell #top-controls,#stage-shell #menu-button,#stage-shell #replay-button,#stage-shell #endless-native-home,.endless-native-audio-entry{display:none!important}
#numbers-reader-tools{position:absolute;left:64px!important;top:8px!important;z-index:60;display:flex;gap:8px;pointer-events:none}
#numbers-reader-tools button{box-sizing:border-box;width:48px;height:48px;min-height:48px;padding:3px 0 0;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:2px;border:0;border-radius:10px;background:transparent;box-shadow:none;color:#126370;font:800 10px/12px "PingFang SC","Hiragino Sans GB",system-ui,sans-serif;pointer-events:auto;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
#numbers-reader-tools svg{width:28px;height:28px;flex:0 0 28px;fill:currentColor}
#numbers-reader-tools span{white-space:nowrap}
#numbers-reader-tools button:disabled{opacity:.45}
#numbers-reader-tools button:focus-visible{outline:3px solid #45999e;outline-offset:2px}

#stage-shell[data-numbers-scene="menu"] #numbers-reader-tools{
  display:none!important;
}

#stage-shell #level-navigation{
  justify-content:flex-end!important;
}
