#engageGame{--paper:#fff2d2;--ink:#233d28;--leaf:#2c502e;--gold:#d5a253;position:fixed;inset:0;margin:0;padding:0;width:100vw;height:100vh;height:100dvh;max-width:none;max-height:none;border:0;border-radius:0;background:#11281c;color:var(--ink);overflow:auto;overscroll-behavior:contain;font:16px/1.38 system-ui,sans-serif}
#engageGame::backdrop{background:#11281c}
body:has(#engageGame[open]){overflow:hidden}
html[data-theme=dark] #engageGame{--paper:#203629;--ink:#fff1cf;--leaf:#315236}
#engageGame .ed-wrap{box-sizing:border-box;width:min(100%,740px);min-height:100%;margin:auto;background:var(--paper);padding:env(safe-area-inset-top) max(10px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))}
#engageGame header{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:6px;background:#193923;color:#fff1ce;padding:10px;border-bottom:2px solid var(--gold);border-radius:0 0 16px 16px}
#engageGame header div{flex:1}
#engageGame header small{font-size:11px;letter-spacing:.1em;color:#ffdc91}
#engageGame h2,#engageGame h3{font:700 clamp(17px,4vw,24px)/1.15 Fraunces,Georgia,serif;color:inherit;margin:4px 0}
#engageGame :is(main,p,summary,label,small,li,ol,details){color:var(--ink);background:transparent}
#engageGame main{padding:10px 0;display:grid;gap:9px;grid-template-columns:minmax(0,1fr)}
#engageGame :is(button,select){box-sizing:border-box;min-width:0;min-height:45px;height:auto;width:auto;margin:0;padding:9px 11px;border:1px solid var(--gold);border-radius:13px;background:linear-gradient(#426339,#203e28);color:#fff5d9;font:650 15px/1.2 system-ui;white-space:normal;touch-action:manipulation;box-shadow:0 2px 3px #291b1333;cursor:pointer}
#engageGame button:active{transform:translateY(2px);filter:brightness(1.3)}
#engageGame :focus-visible{outline:3px solid #e49d30;outline-offset:1px}
#engageGame select{display:block;width:100%;background:#fff4d8;color:#173625;margin-top:4px}
#engageGame .ed-banner{min-height:130px;display:flex;flex-direction:column;justify-content:end;align-items:start;background:linear-gradient(transparent 20%,#102818ed),url(training/ed-autumn.webp) center 44%/cover;border-radius:16px;border:2px solid var(--gold);padding:15px}
#engageGame .ed-banner span{font:700 26px Fraunces,Georgia,serif;color:#fff6dc}
#engageGame :is(.ed-banner,header) small{color:#fff1ce}
#engageGame :is(.ed-form,.ed-pair,.ed-options){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#engageGame :is(.ed-tools,.ed-actions){display:flex;gap:7px}
#engageGame :is(.ed-tools,.ed-actions)>button{flex:1}
#engageGame.ed-left .ed-actions,#engageGame.ed-left .ed-tools{flex-direction:row-reverse}
#engageGame .ed-reward>button{width:100%}
#engageGame .ed-options{grid-template-columns:repeat(3,minmax(0,1fr))}
#engageGame :is(.ed-actions,.ed-options) button,#engageGame [data-ed=continue],#engageGame [data-ed=start]{background:linear-gradient(#fff3cb,#eec880);color:#20371e}
#engageGame [data-ed=mark]{background:#24452c;color:#fff3cb}
#engageGame p{margin:4px 0;line-height:1.45}
#engageGame summary{cursor:pointer;padding:12px 0;font-weight:700}
#engageGame .ed-check{display:flex;align-items:center;gap:9px;min-height:44px}
#engageGame input{width:21px;height:21px}
#engageGame canvas{display:block;width:100%;height:auto;max-height:max(180px,calc(100dvh - 414px));object-fit:fill;border:2px solid var(--gold);border-radius:18px;box-sizing:border-box;justify-self:center;max-width:max(277px,calc((100dvh - 414px)*1.53846));aspect-ratio:600/390;touch-action:manipulation;cursor:pointer}
#engageGame .ed-progress{text-align:center;font-weight:700;font-size:15px}
#engageGame .ed-caption{text-align:center;font:700 19px/1.22 Fraunces,Georgia,serif}
#engageGame .ed-coach{text-align:center;font-size:15px;min-height:2.7em}
#engageGame .ed-note{font-size:13px}
#engageGame .ed-history{padding:0;list-style:none}
#engageGame .ed-history li{padding:7px;border-bottom:1px solid #aa915f}
#engageGame time{font-variant-numeric:tabular-nums;font-weight:700;margin-right:6px}
#engageGame.ed-bold{--paper:#fff;--ink:#000;--gold:#c18b24}
#engageGame.ed-bold .ed-caption{border:3px solid;padding:5px}
@media(max-height:680px){#engageGame main{gap:5px;padding:4px 0}#engageGame header{padding:4px}#engageGame .ed-coach{min-height:0}}
@media(orientation:landscape) and (min-width:650px) and (max-height:620px){
#engageGame.ed-live .ed-wrap{width:100%}
#engageGame.ed-live main{grid-template-columns:1fr 1fr}
#engageGame.ed-live canvas{grid-area:1/1/8/2;align-self:center;max-height:none;max-width:100%}
#engageGame.ed-live main>:not(canvas){grid-column:2}
}
#engageGame .ed-wrap>header{flex-direction:row;flex-wrap:nowrap;text-align:left;align-items:center}
#engageGame .ed-wrap>header div{min-width:0}
#engageGame .ed-wrap>header button{flex:0 0 auto}
#engageGame .ed-wrap>header h2{text-align:left}
#engageGame .ed-reward>button{min-height:52px;font-size:18px}
#engageGame .ed-actions button{min-height:54px}
#engageGame .ed-tools button{background:var(--paper);color:var(--ink)}
#engageGame .ed-progress{padding:5px;border-bottom:1px solid #b89458}
#engageGame .ed-coach{padding:0 8px}
#engageGame .ed-options button{padding:7px 3px}
#engageGame canvas{aspect-ratio:6/5;max-width:max(216px,calc((100dvh - 414px)*1.2))}
#engageGame .ed-review input{width:100%;height:44px;accent-color:#b77418}
#engageGame .ed-review canvas{margin:auto}
@media(orientation:landscape) and (min-width:650px) and (max-height:620px){#engageGame.ed-live canvas{max-width:100%;max-height:none}}
#trainingGames #engageLaunch{white-space:normal;overflow-wrap:anywhere;height:auto;min-height:46px}
@media(max-width:480px){#trainingGames{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-height:680px){
 #engageGame .ed-actions button,#engageGame .ed-reward>button{min-height:44px}
 #engageGame .ed-progress{padding:1px}
 #engageGame .ed-coach{font-size:14px}
 #engageGame .ed-caption{font-size:17px}
 #engageGame .ed-wrap{padding-bottom:4px}
}
@media(orientation:landscape) and (min-width:650px) and (max-height:620px){
 #engageGame.ed-live canvas{max-width:calc((100dvh - 92px)*1.2)}
}
#engageGame .ed-note-input{box-sizing:border-box;display:block;width:100%;min-height:72px;padding:9px;background:#fff5db;color:#193824;border:1px solid #b99450;border-radius:10px;font:inherit}
