/* Arcade R2: Blaster (practice · timed · arcade · endless · listening) and Match in design C.
   Scoped to the training pilot classes; Adventure keeps its own presentation. */
html body.game-world:is(.practice-pilot,.training-pilot):not(.adventure-view){background:var(--ax-bg)!important;color:var(--ax-text);font-family:var(--ax-thai)}
html body.game-world:is(.practice-pilot,.training-pilot):not(.adventure-view)::before{content:"";position:fixed;inset:0;pointer-events:none;z-index:0;background-image:radial-gradient(#3A3380 1px,transparent 1px);background-size:22px 22px;opacity:.35}
html body.game-world:is(.practice-pilot,.training-pilot):not(.adventure-view) :is(.gameplay-world,.gameplay-scene){display:none!important}
html body.game-world:is(.practice-pilot,.training-pilot):not(.adventure-view) .gameplay-shell{position:relative;z-index:1;font-family:var(--ax-thai);color:var(--ax-text)}
/* HUD */
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell .hud{background:var(--ax-panel);border:2px solid var(--ax-frame);border-radius:0;box-shadow:inset 0 0 0 2px var(--ax-bg),inset 0 0 0 4px var(--ax-frame-in);backdrop-filter:none;-webkit-backdrop-filter:none;clip-path:var(--ax-notch)}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell .hud small{font-family:var(--ax-pixel);font-size:11px;letter-spacing:1px;color:var(--ax-label);text-transform:uppercase}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell .hud strong{font-family:var(--ax-pixel);font-weight:700;text-shadow:none}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell #score{color:var(--ax-gold);text-shadow:0 0 10px rgba(255,209,102,.45)}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell #round{color:var(--ax-text)}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell #lives{color:var(--ax-cyan)}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell .session-mode{font-family:var(--ax-thai);font-size:17px;font-weight:700;color:var(--ax-text)}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell .session-hsk{font-family:var(--ax-pixel);font-size:12px;color:var(--ax-label);letter-spacing:1px}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell .session-hsk::before{content:"BLASTER · "}
html body.game-world.training-pilot .gameplay-shell[data-training-mode="match"] .session-hsk::before{content:"MATCH · "}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell #combo{font-family:var(--ax-pixel);color:var(--ax-gold);letter-spacing:1px}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell :is(.timer,progress){border-radius:0;background:var(--ax-track);box-shadow:none;border:0}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell #timebar{border-radius:0;background:repeating-linear-gradient(90deg,var(--ax-cyan) 0 calc(5% - 2px),transparent calc(5% - 2px) 5%);box-shadow:0 0 8px rgba(77,225,255,.5)}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell progress::-webkit-progress-bar{background:var(--ax-track);border-radius:0}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell progress::-webkit-progress-value{background:var(--ax-cyan);border-radius:0}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell progress::-moz-progress-bar{background:var(--ax-cyan)}
/* Question core: an octagon reactor anchored to the prompt (pinyin sits inside its lower half) */
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell .question{position:relative;background:none;border:0;box-shadow:none}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell #prompt{position:relative;z-index:0;isolation:isolate}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell #prompt::before,
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell #prompt::after{content:"";position:absolute;left:50%;top:calc(50% + 16px);width:clamp(190px,calc(100% + 96px),340px);height:clamp(150px,calc(100% + 120px),210px);transform:translate(-50%,-50%);clip-path:polygon(22% 0,78% 0,100% 22%,100% 78%,78% 100%,22% 100%,0 78%,0 22%);pointer-events:none;z-index:-1}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell #prompt::before{background:var(--ax-cyan);animation:ax-core 2.4s ease-in-out infinite}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell #prompt::after{width:calc(clamp(190px,calc(100% + 96px),340px) - 6px);height:calc(clamp(150px,calc(100% + 120px),210px) - 6px);background:radial-gradient(circle at 50% 40%,#1E1858,var(--ax-panel-2) 72%)}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell .gameplay-meaning-prompt #prompt::before,
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell .gameplay-meaning-prompt #prompt::after{top:50%}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell #prompt-pinyin{position:relative;z-index:1}
html body.game-world.training-pilot .gameplay-shell[data-training-mode="match"] #prompt::before,
html body.game-world.training-pilot .gameplay-shell[data-training-mode="match"] #prompt::after{display:none}
@keyframes ax-core{50%{opacity:.6}}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell #question-label{font-family:var(--ax-thai);font-size:14px;font-weight:500;color:var(--ax-muted);letter-spacing:0;text-transform:none;text-shadow:none}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell #prompt{font-family:var(--ax-hanzi);font-weight:700;color:var(--ax-text);text-shadow:0 0 14px rgba(77,225,255,.6)}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell .gameplay-meaning-prompt #prompt{font-family:var(--ax-thai)}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell #prompt-pinyin{font-family:var(--ax-thai);color:var(--ax-cyan);text-shadow:0 0 8px rgba(77,225,255,.5)}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell #listen{background:var(--ax-panel-2);border:2px solid var(--ax-cyan);border-radius:0;color:var(--ax-cyan);font-family:var(--ax-pixel);font-weight:700;box-shadow:0 0 18px rgba(77,225,255,.35)}
/* Answer tiles */
html body.game-world:is(.practice-pilot,.training-pilot) #field :is(.target:not(.word-bubble),.match-card){background:var(--ax-panel);border:2px solid var(--ax-frame);border-radius:0;box-shadow:inset 0 0 0 2px var(--ax-bg);color:var(--ax-text);font-family:var(--ax-thai);font-weight:600;backdrop-filter:none;-webkit-backdrop-filter:none;transition:transform .12s,border-color .12s,box-shadow .12s,background .12s}
html body.game-world:is(.practice-pilot,.training-pilot) #field :is(.target:not(.word-bubble),.match-card):nth-child(4n+1){clip-path:polygon(10px 0,100% 0,100% 100%,0 100%,0 10px)}
html body.game-world:is(.practice-pilot,.training-pilot) #field :is(.target:not(.word-bubble),.match-card):nth-child(4n+2){clip-path:polygon(0 0,calc(100% - 10px) 0,100% 10px,100% 100%,0 100%)}
html body.game-world:is(.practice-pilot,.training-pilot) #field :is(.target:not(.word-bubble),.match-card):nth-child(4n+3){clip-path:polygon(0 0,100% 0,100% 100%,10px 100%,0 calc(100% - 10px))}
html body.game-world:is(.practice-pilot,.training-pilot) #field :is(.target:not(.word-bubble),.match-card):nth-child(4n){clip-path:polygon(0 0,100% 0,100% calc(100% - 10px),calc(100% - 10px) 100%,0 100%)}
html body.game-world:is(.practice-pilot,.training-pilot) #field :is(.target,.match-card)::before,html body.game-world:is(.practice-pilot,.training-pilot) #field :is(.target,.match-card)::after{display:none}
html body.game-world:is(.practice-pilot,.training-pilot) #field :is(.target,.match-card) .hanzi{font-family:var(--ax-hanzi);font-weight:700;color:var(--ax-text);text-shadow:none}
html body.game-world:is(.practice-pilot,.training-pilot) #field :is(.target,.match-card) .pinyin{font-family:var(--ax-thai);color:var(--ax-muted)}
html body.game-world:is(.practice-pilot,.training-pilot) #field :is(.target,.match-card) .key{font-family:var(--ax-pixel);color:var(--ax-label);background:none;border:0;box-shadow:none}
html body.game-world:is(.practice-pilot,.training-pilot) #field :is(.target,.match-card):hover:not(:disabled){border-color:var(--ax-pink);background:#1A1035;box-shadow:inset 0 0 0 2px var(--ax-bg),0 0 16px rgba(255,93,162,.35);transform:none}
html body.game-world:is(.practice-pilot,.training-pilot) #field :is(.target,.match-card):active:not(:disabled){transform:translateY(2px)}
html body.game-world:is(.practice-pilot,.training-pilot) #field :is(.target,.match-card).selected{border-color:var(--ax-pink);background:#2A1030;box-shadow:inset 0 0 0 2px var(--ax-bg),0 0 18px rgba(255,93,162,.45)}
html body.game-world:is(.practice-pilot,.training-pilot) #field :is(.target,.match-card).correct{border-color:var(--ax-cyan);background:#0D2A33;color:#CFF6FF;box-shadow:inset 0 0 0 2px var(--ax-bg),0 0 22px rgba(77,225,255,.55);animation:ax-hit .32s ease-out}
html body.game-world:is(.practice-pilot,.training-pilot) #field :is(.target,.match-card).wrong{border-color:var(--ax-red);background:#2A0E16;color:#FFB0B0;box-shadow:inset 0 0 0 2px var(--ax-bg);animation:ax-shake .3s ease-in-out}
html body.game-world:is(.practice-pilot,.training-pilot) #field :is(.target,.match-card).matched{border-color:#2E6B5A;background:#0C1E1C;color:var(--ax-green);opacity:.6;box-shadow:none}
html body.game-world:is(.practice-pilot,.training-pilot) #field :is(.target,.match-card):disabled:not(.correct):not(.wrong):not(.matched){opacity:.55}
@keyframes ax-hit{40%{transform:scale(1.04)}}
@keyframes ax-shake{20%,60%{transform:translateX(-5px)}40%,80%{transform:translateX(5px)}}
/* Feedback + dock */
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell .bottom #feedback{font-family:var(--ax-thai);color:var(--ax-muted);text-shadow:none}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-dock .overdrive-panel{background:none;border:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;border-radius:0}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-dock #overdrive-label{font-family:var(--ax-pixel);color:var(--ax-gold);letter-spacing:1px}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-dock #overdrive-help{color:var(--ax-muted)}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-dock #overdrive-meter{height:6px;border-radius:0;background:repeating-linear-gradient(90deg,#3A3190 0 calc(20% - 3px),transparent calc(20% - 3px) 20%)}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-dock #overdrive-meter::-webkit-progress-bar{background:transparent}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-dock #overdrive-meter::-webkit-progress-value{background:repeating-linear-gradient(90deg,var(--ax-gold) 0 calc(20% - 3px),transparent calc(20% - 3px) 20%);background-size:calc(100% * 5 / var(--ax-od-max,5)) 100%}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-dock .arena-foot{background:none;border:0;box-shadow:none}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-dock :is(#round-pause,#howto){background:none;border:0;box-shadow:none;color:var(--ax-muted);font-family:var(--ax-thai);border-radius:0}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-dock #exit{background:none;border:2px solid #5A1E44;border-radius:0;box-shadow:none;color:#FF8AB8;font-family:var(--ax-thai);padding:0 12px}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-dock .gameplay-options summary{background:var(--ax-panel);border:2px solid var(--ax-frame);border-radius:0;color:var(--ax-cyan)}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-dock .gameplay-options[open]>:not(summary){background:var(--ax-panel-2);border:2px solid var(--ax-frame-hi);border-radius:0}
@media (prefers-reduced-motion:reduce){html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell #prompt::before,html body.game-world:is(.practice-pilot,.training-pilot) #field :is(.target,.match-card){animation:none!important}}
/* Short landscape tablets (iPad Safari ≈ 1180×700): keep every round on one screen. */
@media (orientation:landscape) and (min-width:900px) and (max-height:820px){
 html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell #prompt::before{width:clamp(170px,calc(100% + 80px),320px);height:clamp(110px,calc(100% + 70px),150px)}
 html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell #prompt::after{width:calc(clamp(170px,calc(100% + 80px),320px) - 6px);height:calc(clamp(110px,calc(100% + 70px),150px) - 6px)}
 html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell #prompt::before,html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell #prompt::after{top:calc(50% + 12px)}
 html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell #question-label{position:relative;z-index:2}
 html body.game-world:is(.practice-pilot,.training-pilot) #field .match-card{padding-top:2px;padding-bottom:2px;min-height:0}
 html body.game-world:is(.practice-pilot,.training-pilot) #field .match-card .hanzi{font-size:clamp(22px,4svh,30px);line-height:1.1}
}
/* Listening: the replay button is the reactor; the instruction prompt stays plain. */
html body.game-world.training-pilot .gameplay-shell[data-training-mode="listening"] #prompt::before,
html body.game-world.training-pilot .gameplay-shell[data-training-mode="listening"] #prompt::after{display:none}
html body.game-world.training-pilot .gameplay-shell[data-training-mode="listening"] #prompt{font-size:clamp(18px,2.6vmin,24px);text-shadow:none;color:var(--ax-muted)}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell #listen::before,html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell #listen::after{display:none}
html body.game-world:is(.practice-pilot,.training-pilot) .gameplay-shell #listen{min-height:64px!important;width:auto!important;height:auto!important;padding:0 26px!important;font-size:18px!important;letter-spacing:1px;background:var(--ax-panel-2)!important;border:2px solid var(--ax-cyan)!important;border-radius:0!important;color:var(--ax-cyan)!important;box-shadow:inset 0 0 0 2px var(--ax-bg),0 0 18px rgba(77,225,255,.35)!important;clip-path:polygon(14px 0,calc(100% - 14px) 0,100% 14px,100% calc(100% - 14px),calc(100% - 14px) 100%,14px 100%,0 calc(100% - 14px),0 14px);animation:ax-core 2.4s ease-in-out infinite;text-shadow:none!important}
/* Results (training) */
html body.game-world.training-results{background:var(--ax-bg)!important}
html body.game-world.training-results::before{content:"";position:fixed;inset:0;pointer-events:none;z-index:0;background-image:radial-gradient(#3A3380 1px,transparent 1px);background-size:22px 22px;opacity:.35}
html body.game-world.training-results .gameplay-world{display:none!important}
html body.game-world.training-results #results::before,html body.game-world.training-results #results::after{display:none!important}
html body.game-world.training-results #results:not([hidden]){position:relative;z-index:1;border:0!important;outline:0!important;padding-left:16px;padding-right:16px;background:none;border:0;box-shadow:none;font-family:var(--ax-thai);color:var(--ax-text);backdrop-filter:none;-webkit-backdrop-filter:none}
html body.game-world.training-results #results .training-result-identity{font-family:var(--ax-pixel);font-size:13px;color:var(--ax-label);letter-spacing:1px}
html body.game-world.training-results #results .eyebrow{font-family:var(--ax-pixel);color:var(--ax-cyan);letter-spacing:2px}
html body.game-world.training-results #results #result-title{font-family:var(--ax-pixel);font-weight:700;color:var(--ax-cyan);text-shadow:0 0 14px rgba(77,225,255,.55);letter-spacing:.5px}
html body.game-world.training-results #results .result-stats>div{background:var(--ax-panel);border:2px solid var(--ax-line);border-radius:0;box-shadow:inset 0 0 0 2px var(--ax-bg);backdrop-filter:none;-webkit-backdrop-filter:none}
html body.game-world.training-results #results .result-stats strong{font-family:var(--ax-pixel);color:var(--ax-gold);text-shadow:0 0 10px rgba(255,209,102,.4)}
html body.game-world.training-results #results .result-stats>div:nth-child(2) strong{color:var(--ax-cyan)}
html body.game-world.training-results #results .result-stats>div:nth-child(3) strong{color:var(--ax-pink)}
html body.game-world.training-results #results .result-stats span{color:var(--ax-muted)}
html body.game-world.training-results #results .learning-summary{background:#160B1F;border:0;border-left:4px solid var(--ax-gold);border-radius:0;color:var(--ax-muted)}
html body.game-world.training-results #results #again{background:var(--ax-pink);color:#1A0614;border:0;border-radius:0;font-weight:700;box-shadow:0 4px 0 var(--ax-pink-d),0 0 20px rgba(255,93,162,.4);clip-path:polygon(8px 0,calc(100% - 8px) 0,100% 8px,100% 100%,0 100%,0 8px)}
html body.game-world.training-results #results :is(#review-play,#results-home,.learning-report .primary){background:var(--ax-panel-2);border:2px solid var(--ax-cyan);border-radius:0;color:var(--ax-cyan);box-shadow:none;font-weight:700}
html body.game-world.training-results #results :is(.answer-history,.learning-report){background:var(--ax-panel);border:2px solid var(--ax-line);border-radius:0;box-shadow:none}
html body.game-world.training-results #results .review-item,html body.game-world.training-results #results .learning-word{background:var(--ax-panel-2);border:1px solid var(--ax-line);border-radius:0}
html body.game-world.training-results #results .result-status{color:var(--ax-cyan)}html body.game-world.training-results #results .result-status.miss{color:var(--ax-red)}
html body.game-world.training-results #results :is(h3,h4){font-family:var(--ax-thai);color:var(--ax-text)}
