/* Vườn Thú Nhỏ (bản 38): màu tươi, nút to, nhẹ cho máy cũ. Chỉ dùng transform và opacity để chuyển động. */
.tabs{grid-template-columns:repeat(5,1fr)!important}
.gameroot{display:block;padding-bottom:84px;font-family:var(--display)}
.gameroot *{box-sizing:border-box}
.gameroot h2{font-size:1.35rem;margin:6px 0;text-align:center}
.gameroot h3{font-size:1.05rem;margin:14px 0 6px}
.gp{text-align:center;font-size:1.05rem;line-height:1.45;margin:8px 4px;color:var(--ink)}
.gp.ok{color:var(--ok);font-weight:600}
.gsmall{text-align:center;font-size:.88rem;color:var(--ink-2);margin:8px 4px}
.err{color:var(--warn);text-align:center;min-height:1.2em}
:where(.gameroot) .gbtn{font:inherit;font-weight:600;border:0;border-radius:var(--r-ctl);padding:12px 16px;background:var(--surface);color:var(--ink);box-shadow:var(--lift);cursor:pointer;min-height:48px;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.gbtn:active{transform:scale(.97)}
.gbtn:disabled{opacity:.4}
.gprimary{display:block;width:100%;max-width:420px;margin:12px auto;background:var(--action);color:var(--action-ink);font-size:1.25rem;min-height:60px;border-radius:20px;text-shadow:0 1px 0 rgba(0,0,0,.15)}
.gback{background:transparent;box-shadow:none;color:var(--accent);padding:8px 10px;min-height:44px}
.gtop{display:flex;align-items:center;gap:8px;margin-bottom:6px}
.gtop h2{flex:1;margin:0}
.gstar{margin-left:8px;font-weight:700;color:#d98a00}
/* vườn */
.scene{position:relative;height:290px;border-radius:24px;overflow:hidden;background:linear-gradient(#bfe6ff 0%,#e6f6ff 55%,#c8efa8 55%,#9ed97a 100%);box-shadow:var(--lift)}
.scene::after{content:"";position:absolute;left:-10%;right:-10%;bottom:-40px;height:110px;background:#86cf63;border-radius:50% 50% 0 0}
.petwrap{position:absolute;left:50%;bottom:26px;width:190px;margin-left:-95px;z-index:3;transform-origin:50% 100%;animation:bob 3s ease-in-out infinite;cursor:pointer}
.petwrap .pet{transform-origin:50% 100%}.petwrap.st0 .pet,.petwrap.st1 .pet{transform:scale(.78)}.petwrap.st2 .pet{transform:scale(.92)}.petwrap.st3 .pet,.petwrap.st4 .pet{transform:scale(1.02)}
.petwrap.hop{animation:hop .5s ease-out}
.pet{width:100%;height:auto;display:block;filter:drop-shadow(0 6px 4px rgba(0,0,0,.15))}
.pet.small{width:56px}
.friends,.flowers{position:absolute;inset:0;z-index:2;pointer-events:none}
.flowers{z-index:4}
.friend,.flower{position:absolute;font-size:24px;line-height:1}
.friend.mv{animation:wander 6s ease-in-out infinite}
.ginfo{text-align:center;margin:10px 0 2px;font-size:1.05rem}
.ghome .scene.empty{display:grid;place-items:center;height:200px}
.egg{width:64px;height:auto}.egg.big{width:110px}
.egg.sel{transform:scale(1.12);filter:drop-shadow(0 4px 6px rgba(0,0,0,.25))}
.ggrid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:10px 0}
.gtile{position:relative;font-size:1.1rem;min-height:64px}
.gtile.lock{opacity:.55}
.gtile .dot{position:absolute;right:10px;top:8px;background:#ff4d4d;color:#fff;border-radius:50%;width:22px;height:22px;display:grid;place-items:center;font-style:normal;font-size:.9rem}
/* trứng */
.eggrow{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:10px 0}
.geggbtn{display:grid;place-items:center;min-width:0;min-height:100px;padding:8px;border-radius:20px}
.geggbtn>div{width:min(64px,90%);min-width:0}
.geggbtn .egg{display:block;width:100%}
.geggbtn.on{outline:3px solid #ffb84d;outline-offset:-3px}
.chiprow{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin:8px 0}
.preview{width:190px;margin:6px auto;display:block}.preview .pet{width:100%}
.gname{display:block;width:100%;max-width:340px;margin:10px auto;font:inherit;font-size:1.2rem;text-align:center;padding:12px;border-radius:14px;border:2px solid var(--rule-strong);background:var(--surface);color:var(--ink)}
.gchip{min-height:44px;border-radius:22px;padding:8px 16px}.gchip.on{background:var(--accent-soft);outline:3px solid var(--accent)}.gchip.lock{opacity:.5}
/* chơi */
.gplay{max-width:520px;margin:0 auto}
.gprog{display:flex;gap:5px;flex:1;justify-content:center}
.gprog i{flex:1;max-width:16px;height:12px;border-radius:6px;background:var(--rule-strong);display:block}.gprog i.on{background:#35c759}
.gbody{display:flex;flex-direction:column;align-items:center;gap:10px;padding:6px 4px}
.gq{font-size:1.25rem;font-weight:700;text-align:center;margin:4px 0}
.bigem{font-size:92px;line-height:1.05;text-align:center}
.bigw{font-size:2.2rem;font-weight:800;text-align:center}.bigv{font-size:1.2rem;color:var(--ink-2);text-align:center}
.gex{font-size:1.5rem;font-weight:700;text-align:center;margin:6px 0}.gexv{font-size:1rem;color:var(--ink-2);text-align:center;min-height:1.2em;margin:0}
.gsay{font-size:1.2rem;min-height:56px;min-width:120px;background:#e8f3ff}.gsay.big{font-size:2.2rem;width:110px;height:92px;border-radius:50%}
.gsay2{background:#e8f3ff}
.opts4{display:grid;grid-template-columns:1fr 1fr;gap:12px;width:100%;max-width:380px}
.opts3{display:grid;gap:10px;width:100%;max-width:380px}
.gopt{font-size:1.4rem;min-height:68px;border-radius:18px}.gopt.em{font-size:56px;min-height:112px;line-height:1}
.right{outline:4px solid #35c759;background:#e6f9ec!important}
.wrong{animation:shake .4s;outline:4px solid #ff6b6b}
.slots{display:flex;gap:6px;flex-wrap:wrap;justify-content:center}
.slot{width:40px;height:50px;border-bottom:4px solid var(--rule-strong);font-size:1.8rem;font-weight:800;text-align:center;line-height:50px}
.slot.right{border-color:#35c759;outline:0}.slot.wrong{border-color:#ff6b6b;outline:0}
.tiles{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;max-width:380px}
.gtile2{font-size:1.7rem;font-weight:800;width:52px;min-height:56px;padding:0;border-radius:14px;text-transform:lowercase}
.gword{font-size:1.2rem;padding:10px 12px;min-height:50px;border-radius:14px}.gword:disabled{opacity:.25}.gword.on{background:#fff3cf}
.sline{display:flex;flex-wrap:wrap;gap:6px;min-height:64px;width:100%;max-width:380px;border-bottom:3px dashed var(--rule-strong);padding-bottom:6px;justify-content:center}
.sline.right{border-color:#35c759}.sline.wrong{border-color:#ff6b6b}
.gundo{min-width:80px}
.twice{display:flex;gap:14px;margin:6px 0}.twice i{width:30px;height:30px;border-radius:50%;background:var(--rule);display:block}.twice i.on{background:#35c759}
.intro{gap:6px}
/* thẻ */
.cardgrid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin:10px 0}
.card{position:relative;border-radius:14px;padding:6px 2px;text-align:center;background:var(--surface);border:3px solid #7fb0ff;min-height:96px;display:flex;flex-direction:column;justify-content:center;cursor:pointer}
.card.r1{border-color:#b07cff;box-shadow:0 0 10px rgba(176,124,255,.5)}
.card.r2{border-color:#ffc400;box-shadow:0 0 14px rgba(255,196,0,.7);background:linear-gradient(135deg,#fffbe6,#fff0b3)}
.card.none{border-style:dashed;border-color:var(--rule-strong);opacity:.6;box-shadow:none;background:transparent}
.card .ce{font-size:34px;line-height:1.1}.card .cw{font-size:.82rem;font-weight:700}.card .cv{font-size:.72rem;color:var(--ink-2)}
.card .cn{position:absolute;right:4px;top:2px;font-size:.7rem;font-style:normal;color:var(--ink-2)}
.card.big{width:200px;min-height:260px;margin:12px auto;border-width:6px}.card.big .ce{font-size:100px}.card.big .cw{font-size:1.6rem}.card.big .cv{font-size:1.1rem}
.card.flip{animation:flip .8s ease-out}
.gpack,.gdone,.gboss{text-align:center}
.gdone .preview.hop{animation:hop .8s ease-out 2}
/* đua */
.rrow{display:flex;align-items:center;gap:10px;margin:10px 0;background:var(--surface);border-radius:18px;padding:10px;box-shadow:var(--lift)}
.rrow.mine{outline:3px solid #ffb84d}
.rmid{flex:1;min-width:0}.rtxt{font-size:1.05rem}.rbar{height:16px;background:var(--rule);border-radius:8px;overflow:hidden;margin-top:6px}.rfill{height:100%;background:linear-gradient(90deg,#ffb84d,#ff7a3d);border-radius:8px}
.ravatar{width:56px;flex:none}
.gcode{font-size:2.4rem;font-weight:800;letter-spacing:.2em;text-align:center;background:var(--surface);border-radius:16px;padding:12px;margin:8px auto;max-width:320px;box-shadow:var(--lift)}
.bosshp{display:flex;gap:3px;flex:1}.bosshp i{flex:1;height:14px;border-radius:7px;background:var(--rule);display:block}.bosshp i.on{background:#ff6b6b}.bem{font-size:28px}
@keyframes bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
@keyframes hop{0%{transform:translateY(0)}35%{transform:translateY(-26px) scale(1.04)}100%{transform:translateY(0)}}
@keyframes wander{0%,100%{transform:translateX(0)}50%{transform:translateX(26px)}}
@keyframes shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-7px)}75%{transform:translateX(7px)}}
@keyframes flip{0%{transform:perspective(600px) rotateY(90deg) scale(.7);opacity:0}100%{transform:perspective(600px) rotateY(0) scale(1);opacity:1}}
@media (prefers-reduced-motion:reduce){.petwrap,.friend.mv,.card.flip,.gdone .preview.hop{animation:none!important}}
@media (prefers-color-scheme:dark){.scene{background:linear-gradient(#27406b 0%,#35567f 55%,#2f6a3e 55%,#2b5e37 100%)}.scene::after{background:#285a34}.right{background:#14301f!important}.gword.on{background:#3a3115}}

.ico{display:inline-flex;align-items:center;justify-content:center;line-height:1}.ico svg{width:1.15em;height:1.15em;display:block}
.friend .ico svg{width:1.4em;height:1.4em}

/* bản 40: đẹp hơn — chỉ dùng transform/opacity để chuyển động */
.gameroot{background:linear-gradient(#eef7ff,#fff7ec 45%,#fffdf8);border-radius:26px;padding:10px 8px 84px}
.scene{border:4px solid #fff;box-shadow:0 8px 22px rgba(60,120,200,.25)}
.scene::before{content:none}
.scene .sky{position:absolute;inset:0;z-index:1;pointer-events:none}.sky svg,.sky img{width:100%;height:100%;display:block}.sky img{object-fit:cover;object-position:bottom}
.sky .cl1{animation:drift 26s ease-in-out infinite alternate}.sky .cl2{animation:drift 34s ease-in-out infinite alternate-reverse}
.petwrap::after{content:"";position:absolute;left:20%;right:20%;bottom:-4px;height:14px;border-radius:50%;background:rgba(0,0,0,.16);z-index:-1}
.gbtn{border-bottom:4px solid rgba(0,0,0,.10)}
.gprimary{border-bottom:5px solid #18479e;box-shadow:0 8px 16px rgba(36,95,201,.24)}
.gprimary:active{transform:translateY(3px);border-bottom-width:2px}
.gopt{position:relative;background:#fff;border:3px solid #d6e6fa;border-bottom-width:6px;box-shadow:0 4px 10px rgba(60,120,200,.12)}
.gopt:active{transform:translateY(3px);border-bottom-width:3px}
.gopt.right{animation:pop .45s ease-out;border-color:#35c759}
.gq{background:#fff;border-radius:22px;padding:10px 20px;box-shadow:0 4px 12px rgba(60,120,200,.14)}
.gsay.big{background:var(--action);border-bottom:6px solid #18479e}
.bigem{padding:8px;filter:drop-shadow(0 6px 6px rgba(0,0,0,.12))}
.gprog i{height:14px;transition:transform .2s}.gprog i.on{background:linear-gradient(#5ee07f,#2fbf5a);transform:scaleY(1.15)}
.gtile{border-bottom-width:5px}
.gcode,.rrow{border:2px solid #fff}
.card{background:linear-gradient(#fff,#f7fbff)}
.card.r2{overflow:hidden}
.card.r2::after{content:"";position:absolute;inset:0;background:linear-gradient(115deg,transparent 35%,rgba(255,255,255,.8) 50%,transparent 65%);transform:translateX(-130%);animation:sheen 3.4s ease-in-out infinite;pointer-events:none}
.card.r1{animation:glow 3s ease-in-out infinite}
.burst{position:absolute;left:50%;top:50%;width:0;height:0;pointer-events:none;z-index:5}
.burst i{position:absolute;left:-7px;top:-7px;width:14px;height:14px;background:#ffd23f;clip-path:polygon(50% 0,62% 36%,100% 38%,70% 60%,80% 100%,50% 76%,20% 100%,30% 60%,0 38%,38% 36%);opacity:0;animation:burst .7s ease-out forwards}
.confetti{position:fixed;inset:0;overflow:hidden;pointer-events:none;z-index:60}
.confetti i{position:absolute;top:-16px;width:9px;height:14px;border-radius:2px;animation:fall 2.8s ease-in forwards}
@keyframes pop{0%{transform:scale(1)}40%{transform:scale(1.1)}100%{transform:scale(1)}}
@keyframes burst{0%{opacity:1;transform:translate(0,0) scale(.3)}70%{opacity:1}100%{opacity:0;transform:translate(var(--dx),var(--dy)) scale(1.2)}}
@keyframes fall{to{transform:translateY(108vh) rotate(var(--r))}}
@keyframes sheen{0%,55%{transform:translateX(-130%)}100%{transform:translateX(130%)}}
@keyframes glow{0%,100%{opacity:1}50%{opacity:.82}}
@keyframes drift{from{transform:translateX(-14px)}to{transform:translateX(26px)}}
@media (prefers-reduced-motion:reduce){.sky .cl1,.sky .cl2,.card.r2::after,.card.r1,.gopt.right,.burst i,.confetti i{animation:none!important}.confetti{display:none}}
@media (prefers-color-scheme:dark){.gameroot{background:transparent}.gq,.gopt,.card{background:var(--surface)}.gopt{border-color:#2d4469}.sky svg{opacity:.8}}

@media (min-width:640px){.tabs{grid-template-columns:repeat(5,auto)!important}}

/* bản 41: thanh con của tab Học tập (Chụp bài, Sổ bài, Luyện tập) */
#studyBar{display:flex;gap:4px;padding:4px;background:var(--surface);border-radius:12px;margin:0 0 6px}
#studyBar .subtab{flex:1;min-width:0;font:inherit;font-family:var(--display);font-weight:500;font-size:.92rem;border:0;border-radius:9px;background:transparent;color:var(--ink-2);padding:8px 6px;min-height:40px;display:flex;align-items:center;justify-content:center;gap:6px;cursor:pointer;white-space:nowrap}
#studyBar .subtab svg{width:18px;height:18px;flex:none}
#studyBar .subtab[aria-selected="true"]{background:var(--accent-soft);color:var(--accent);font-weight:600}
#studyBar .subtab:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
@media (max-width:359px){.tabs .tab{font-size:.7rem;padding-inline:1px}}

:where(.gameroot) button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}

.gstudy-ready{text-align:center;margin:12px 0;padding:8px;border:1px solid var(--rule);border-radius:var(--r-ctl)}
.gstudy-ready .gbtn{margin:4px}

/* Phiêu lưu dùng cùng thẻ, nút và cảnh nền của Vườn Thú Nhỏ. */
.gadventure{text-align:center}
.gadventure-filter{display:grid;gap:6px;margin:12px 0;text-align:left}
.gadventure-filter select{width:100%;min-height:44px;font:inherit;color:var(--ink);background:var(--surface);border:1px solid var(--rule-strong);border-radius:var(--r-ctl);padding:8px}
.gadventure-trip{display:block;width:100%;margin:8px 0;text-align:left}
.scene.gadventure-scene{height:176px}
.gadventure-prop{position:absolute;bottom:26px;right:19%;font-size:clamp(36px,12vw,64px);z-index:3}
.gadventure-pet{position:absolute;bottom:18px;left:16%;width:min(32%,120px);z-index:3}
.gadventure-move{transform:translateX(48%);transition:transform .45s ease}
.gadventure .gopt{width:100%;overflow-wrap:anywhere}
@media (prefers-reduced-motion:reduce){.gadventure-move{transition:none}}

.gtrip-entry{display:block;width:100%;margin:12px 0}

.gexv.gintro-translation{font-size:1.3rem;font-weight:650;line-height:1.4;color:var(--ink);overflow-wrap:anywhere}
.glisten{display:inline-flex;align-items:center;justify-content:center;gap:8px;color:var(--action-ink);background:var(--action)}
.glisten.icon-only{min-height:56px;min-width:56px}
.gsound-icon{display:inline-flex;width:26px;height:26px;flex:none}
.gsound-icon svg{width:100%;height:100%}
.glisten.icon-only .gsound-icon,.glisten.big .gsound-icon{width:34px;height:34px}
.gundo{display:grid;justify-items:center;gap:2px;color:#88400f;background:#ffead4;font-size:1rem}
.gillustration-caption{font-size:1rem;font-weight:600;color:var(--ink)}
.gwardrobe-row .gchip{display:grid;justify-items:center;align-content:center;gap:4px;max-width:155px}
.gwardrobe-row .gchip.lock{opacity:.82}
.gwardrobe-mini{width:56px;height:56px}
.gwardrobe-swatch{width:10px;height:10px;border-radius:50%}
.gwardrobe-crown{margin-top:16px}
.greward{position:relative;text-align:center;padding:8px 0}
.gjourney-map{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding:0;margin:12px 0;list-style:none}
.gjourney-map li{min-width:0;display:grid;justify-items:center;align-content:start;gap:5px;font-size:.78rem;line-height:1.25;overflow-wrap:anywhere}
.gjourney-map .marker{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--fill);color:var(--ink)}
.gjourney-map .current .marker{background:var(--accent);color:var(--accent-ink);font-weight:800}
.gjourney-map .passed .marker{background:var(--sc);color:var(--sc-d)}
.word-illustration{display:block;width:72px;max-width:100%;height:auto;object-fit:contain}
.word-illustration svg{display:block;width:100%;height:auto}
.bigem .word-illustration{width:96px}
#studyBar .subtab{font-size:clamp(.8rem,2.65vw,1.1rem);min-height:48px;white-space:normal}
.pwfield .btn{flex:none}
.gjourney-traveler{width:32px}
.gjourney-traveler .pet.small{width:100%}
#reviewByLesson[aria-pressed=true],#reviewByGroup[aria-pressed=true]{background:var(--accent-soft);color:var(--accent);border:1px solid var(--accent-line)}
.gadventure-buddy-picker{display:flex;justify-content:center;gap:12px;padding:8px 0;margin:12px 0;border:0;min-inline-size:0}
.gadventure-buddy-picker legend{margin-inline:auto;font-weight:700}
.gadventure-buddy-choice{display:grid;justify-items:center;gap:5px;min-width:92px;padding:8px;border:1px solid var(--rule-strong);border-radius:var(--r-ctl);background:var(--surface);color:var(--ink);cursor:pointer}
.gadventure-buddy-choice:has(:checked){outline:2px solid var(--accent);outline-offset:-2px}
.gadventure-buddy-choice input{accent-color:var(--accent)}
/* Chân dung lấy trực tiếp từ logo đang dùng trên trang chủ. */
.gadventure-buddy-art{display:block;width:56px;height:56px;border-radius:50%;background-image:url(logo.png);background-size:465% auto;background-repeat:no-repeat}
.gadventure-buddy-art.squirrel{background-position:17% 74%}
.gadventure-buddy-art.hedgehog{background-position:85% 76%}
.gadventure-prop.gadventure-buddy{bottom:16px;right:15%}
.gadventure-buddy .gadventure-buddy-art{width:clamp(56px,20vw,104px);height:clamp(56px,20vw,104px)}
.pet-interactive{display:block;padding:0;border:0;background:transparent;touch-action:manipulation}
.pet-front{position:absolute;inset:0;opacity:0}
.pet-interactive.pet-dancing{animation:pet-dance 1s ease-in-out}
.pet-dancing .pet-side{animation:pet-side-turn 1s linear}
.pet-dancing .pet-front{animation:pet-front-turn 1s linear}
@keyframes pet-dance{0%,100%{transform:translateY(0)}26%{transform:translateY(-20px) rotate(-5deg)}50%{transform:translateY(-5px) rotate(5deg)}72%{transform:translateY(-17px) rotate(-5deg)}}
@keyframes pet-side-turn{0%,100%{opacity:1}18%,82%{opacity:0}}
@keyframes pet-front-turn{0%,100%{opacity:0}18%,82%{opacity:1}}
@media(prefers-reduced-motion:reduce){
  .pet-interactive.pet-dancing,.pet-dancing .pet-side,.pet-dancing .pet-front{animation:none}
  .pet-dancing .pet-side{opacity:0}.pet-dancing .pet-front{opacity:1}
}
.gadventure-landmark{position:absolute;right:9%;bottom:18px;width:44%;max-width:215px;height:auto;z-index:2;pointer-events:none}
.gadventure-landmark.halong{max-width:215px}

.gavatar-action{display:block;margin:0 0 8px auto;color:var(--action-text)}
.game-avatar-dialog{max-width:min(92vw,620px);max-height:85dvh;overflow:auto;border:0;border-radius:18px;background:var(--surface);color:var(--ink);padding:16px}
.game-avatar-dialog::backdrop{background:rgb(0 0 0 / .45)}
.geggs:has(.gname:focus) .eggrow{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:minmax(58px,1fr);overflow-x:auto}
.geggs:has(.gname:focus) .geggbtn{min-height:64px}
.geggs:has(.gname:focus) .geggbtn>div{width:min(38px,90%)}
.geggs:has(.gname:focus) .preview{display:none}

.gavatar-action{margin:0 auto 12px;border-radius:999px;background:#e6f0ff;color:#18479e}
.gpet-picker{display:grid;grid-template-columns:repeat(auto-fit,minmax(88px,1fr));gap:8px;margin:12px 0}
.gpet-picker .gchip{display:grid;justify-items:center;padding:6px}
.gnav-arrow{display:grid;place-items:center;margin:10px auto;min-width:54px;min-height:48px;border-radius:18px;background:#dcecff;color:#18479e;font-size:1.55rem;line-height:1}
.gtop .gnav-arrow{margin:0}
.gtop{display:grid;grid-template-columns:auto minmax(0,1fr) auto}
.gtop::after{content:"";width:54px}
.grace-boss{max-width:640px;margin:20px auto 0;padding:12px;text-align:center}
.gtile{font-size:1.2rem}
.gwardrobe-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,102px),1fr));gap:8px;align-items:stretch}
.gwardrobe-row .gchip{position:relative;max-width:none;min-width:0;padding:8px 4px;border-radius:16px;font-size:1rem;line-height:1.15;overflow-wrap:anywhere}
.gwardrobe-row .gwardrobe-mini{width:44px;height:44px}
.gwardrobe-lock{position:absolute;inset-block-start:5px;inset-inline-end:6px;font-size:.78rem}
.gletter-row{display:flex;justify-content:center;gap:8px;width:100%}
.ganswer-reveal{text-align:center;margin:12px auto;padding:10px;background:#eef6ff;color:#163d69;border-radius:16px}
.ganswer-reveal strong{font-size:1.3rem}
.ganswer-art,.ganswer-geometry{width:min(130px,100%);margin:6px auto}
.ganswer-art svg,.ganswer-art img,.ganswer-geometry svg{width:100%;height:auto;display:block}
.gopt.right:disabled{opacity:1}
.gopt.ganswer-dim{opacity:.34}
.geo-focus{stroke:#cd2434;stroke-width:4;animation:geo-highlight .8s ease-in-out 3 alternate}
circle.geo-focus[r="4"]{fill:#cd2434}
.garrival-hop>.gadventure-buddy-art,.gadventure-pet.garrival-hop>svg{animation:arrival-hop .62s ease-in-out 4}
@keyframes geo-highlight{from{opacity:.55}to{opacity:1}}
@keyframes arrival-hop{50%{transform:translateY(-16px) rotate(-4deg)}}
@media (max-width:600px){
  .gdress .gwardrobe-preview{position:sticky;top:calc(env(safe-area-inset-top,0px) + 70px);z-index:10;width:min(120px,100%);padding:5px;background:#f6faff;border-radius:18px;box-shadow:var(--lift)}
  .gdress .gwardrobe-preview svg{width:100%;height:auto;display:block}
}
@media (prefers-reduced-motion:reduce){
  .geo-focus,.garrival-hop>.gadventure-buddy-art,.gadventure-pet.garrival-hop>svg{animation:none}
}
.gflower-confetti i{width:auto;height:auto;font-size:1.2rem;background:transparent}
/* Ảnh toàn thân cho bạn đồng hành, ảnh giữ nguyên tỷ lệ ở mọi cỡ. */
.gadventure-buddy-art{object-fit:contain;border-radius:0;background:none}
.glisten-block{display:flex;justify-content:center;margin:12px auto 14px}
@media (min-width:800px){.glisten-block{margin-block:20px 24px}}
.ganswer-geometry circle.geo-focus:nth-of-type(2){animation-delay:.22s}
.ganswer-geometry circle.geo-focus:nth-of-type(3){animation-delay:.44s}

/* Màu theo thao tác, cùng nét bo tròn và kích thước chạm tối thiểu 48px. */
.gcontrol-icon{display:inline-flex;width:26px;height:26px;flex:none}
.gcontrol-icon svg{width:100%;height:100%}
.gnav-arrow{min-height:48px;min-width:54px;background:#e0edff;color:#18479e}
.gmic-control{display:flex;align-items:center;justify-content:center;gap:10px}
.gundo{min-height:48px}
.gnav-arrow:focus-visible,.glisten:focus-visible,.gmic-control:focus-visible,.gundo:focus-visible{outline:3px solid #3478f6;outline-offset:3px}

.gnav-arrow,.glisten,.gsay.big,.gmic-control,.gundo{
  background:var(--control-fill);color:var(--control-ink);
  border-bottom:4px solid var(--control-edge);
  box-shadow:0 4px 10px rgb(8 94 79 / .14);
}
.gnav-arrow{min-width:70px;min-height:58px}
.gnav-art{display:block;width:44px;height:42px}
.gnav-art svg{display:block;width:100%;height:100%}
.gnav-art-back{transform:scaleX(-1)}
.gtop:has(.gnav-arrow)::after{width:70px}

.groute-modes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem;margin:1rem auto;max-width:52rem}
.groute-mode{position:relative;display:grid;gap:.3rem;justify-items:center;align-content:start;padding:.4rem .4rem .65rem;border:2px solid #b6d9c2;border-radius:1rem;background:#fff5dd;color:#244e42;font:inherit;font-weight:800;cursor:pointer;overflow:hidden}
.groute-mode.on{border-color:#36836d;background:#daf1df}
.groute-mode img{width:100%;aspect-ratio:2.4;object-fit:cover;border-radius:.62rem}
.groute-arrow{color:#287961;font-weight:900}
.groute-overview{position:relative;margin:.7rem auto 1rem;width:min(100%,28rem);overflow:hidden;border:2px solid #bddfcb;border-radius:1.25rem;background:linear-gradient(#d6f0f3,#fff6df)}
.groute-overview.story{width:min(100%,17rem)}
.groute-map{display:block;width:100%;height:auto}
.groute-pins{position:absolute;inset:0;width:100%;height:100%}
.groute-pins polyline{fill:none;stroke:#fff5c7;stroke-width:4;stroke-linecap:round;stroke-dasharray:2 6}
.groute-pins line{stroke:#42684c;stroke-width:1}
.groute-pins circle{fill:#fff3ce;stroke:#416e54;stroke-width:1.5}
.groute-pins .current{fill:#ffd066}.groute-pins .done{fill:#bcf1ba}
.groute-pins text{text-anchor:middle;dominant-baseline:central;fill:#243f32;font-size:11px;font-weight:850}
.groute-stops{width:min(100%,39rem);padding:0;list-style:none;margin:1rem auto}
.groute-stops .gadventure-trip{display:flex;text-align:left;align-items:center;gap:.55rem;margin:.5rem 0}
.groute-stops .gadventure-trip[aria-current]{border-color:#438368;background:#e5f4e7}
.groute-stops .groute-arrow{margin-left:auto}
.groute-num{display:grid;place-items:center;flex:0 0 1.65rem;height:1.65rem;border-radius:50%;background:#ffefb6;color:#314b3b}
.groute-stops img{width:2.8rem;height:2.3rem;border-radius:.45rem;object-fit:cover}
@media (max-width:859px){
  .groute-modes{grid-template-columns:minmax(0,1fr)}
  .groute-mode{grid-template-columns:minmax(40px,22%) minmax(0,1fr) auto;align-items:center;padding:.35rem;text-align:left}
  .groute-mode img{aspect-ratio:1.8}
}
.groute-menu{width:100%;max-width:55rem}
.groute-title{white-space:nowrap;font-size:clamp(.85rem,3.8vw,1rem);line-height:1.3}
.groute-header{display:flex;justify-content:center;align-items:center;gap:.6rem;margin:.5rem auto;color:#214e40;font-size:clamp(1rem,5vw,1.4rem);text-align:left}
.groute-header img{width:clamp(42px,12vw,64px);height:auto;flex:none}
.groute-header strong{min-width:0;overflow-wrap:break-word}
.groute-overview.story .groute-map{aspect-ratio:142/237;object-fit:fill}
.groute-overview.story .groute-pins circle{r:8}
.groute-overview.story .groute-pins text{font-size:9px}
.groute-countries{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem;margin:1rem auto;max-width:32rem}
.groute-countries .gchip{display:grid;justify-items:center;align-content:center;min-width:0;min-height:4rem;padding:.35rem;font-weight:750}
.groute-pins .groute-coast{fill:none;stroke:#fff8d9;stroke-width:3.4;stroke-linecap:round;stroke-dasharray:2 5}
.groute-pins .groute-island{fill:#225f4b;stroke:#e1f4e3;stroke-width:.8}
.groute-pins .groute-place{font-size:14px;paint-order:stroke;stroke:#fff8de;stroke-width:4px;stroke-linejoin:round}
.groute-pins .groute-place[data-align="start"]{text-anchor:start}
.groute-pins .groute-place[data-align="end"]{text-anchor:end}
.groute-map-alt{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(max-width:540px){.groute-countries{grid-template-columns:repeat(2,minmax(0,1fr))}}

.groute-overview:has(.groute-labelled){width:min(100%,39.5rem)}
.groute-labelled{position:static;display:block;height:auto}
.groute-labelled .groute-place{font-size:16px;stroke-width:5px}

.gchallenge-board{display:grid;gap:.65rem;margin:1rem auto;max-width:32rem}
.gchallenge-row{display:flex;justify-content:center;gap:.55rem}
.gchallenge-shape{width:min(23vw,7rem);margin:auto}
.gchallenge-shape svg{display:block;width:100%;fill:#f9d589;stroke:#35585a;stroke-width:3;stroke-linejoin:round}
.gchallenge-shape.circle svg{fill:#a9dbbf}.gchallenge-shape.square svg{fill:#b6ddf0}.gchallenge-shape.rectangle svg{fill:#f3bdaf}
.gchallenge-choice{min-width:2.75rem;min-height:2.75rem;padding:.4rem;border:2px solid #b6d7c9;border-radius:.8rem;background:#fffdf2;color:#234c42;font:inherit;font-weight:800;cursor:pointer}
.gchallenge-choice.correct{border-color:#388456;background:#e1f5df;color:#234c42;opacity:1}
.gchallenge-tick{display:grid;place-items:center;width:1.35rem;height:1.35rem;margin:.15rem auto;border:2px solid currentColor;border-radius:.2rem}
.correct .gchallenge-tick::after{content:'✓'}
.gchallenge-vertices{position:relative;width:14rem;max-width:88%;margin:auto}
.gchallenge-vertices .gchallenge-shape{width:100%}
.gchallenge-choice.vertex{position:absolute;transform:translate(-50%,-50%);padding:0;border-radius:50%;background:#f9ebbeaa}
.gchallenge-choice.vertex::after{content:'';display:block;width:.55rem;height:.55rem;border-radius:50%;margin:auto;background:#286d5b}
.vertex.point-0{left:50%;top:14%}.vertex.point-1{left:15%;top:84%}.vertex.point-2{left:85%;top:84%}.vertex.point-3{left:50%;top:55%}
.vertex.correct::after{background:#d6383d;animation:gchallenge-pulse .6s ease 3}
.gchallenge-board.solved:not(.vertices) .gchallenge-row:first-child>.gchallenge-shape svg{stroke:#bf433b;stroke-width:5}
.gchallenge-bridge{display:block;width:min(100%,17rem);border-radius:.7rem;margin:auto}
.gchallenge-entry{background:#e7f3df}
@keyframes gchallenge-pulse{50%{transform:scale(1.75)}}
@media(prefers-reduced-motion:reduce){.vertex.correct::after{animation:none}}
.bridge-sign .gchallenge-row{position:relative;width:max-content;max-width:100%;margin:-1.8rem auto 0;padding:.35rem;background:#52764d;border:3px solid #e8c15e;border-radius:.75rem}
.bridge-sign .correct svg polygon{stroke:#d6383d;stroke-width:5}

.gchallenge-choice{min-width:48px;min-height:48px;touch-action:manipulation}
.gchallenge-choice:focus-visible{outline:3px solid #26537b;outline-offset:2px}
.gchallenge-choice.mistake:not(.correct){border-color:#d87424;box-shadow:0 0 0 2px #f9b76f;animation:gchallenge-shake .32s ease}
.gchallenge-choice.guided:not(.correct){outline:3px dashed #266949;outline-offset:2px}
.gchallenge-choice.vertex{width:48px;height:48px;background:transparent;border:2px solid transparent}
.gchallenge-choice.vertex::after{opacity:.35;width:.7rem;height:.7rem}
.gchallenge-choice.vertex.correct::after{opacity:1}
@keyframes gchallenge-shake{25%{translate:-3px 0}75%{translate:3px 0}}
.gchallenge-edges{position:relative;flex:0 0 124px;height:124px}
.gchallenge-edges .gchallenge-shape{width:124px;position:absolute;top:7px;left:0}
.gchallenge-choice.count-target{width:48px;height:48px;color:#214d48}
.gchallenge-edges .count-target{position:absolute;transform:translate(-50%,-50%);background:transparent;border:2px solid transparent;padding:0}
.gchallenge-edges .count-target::before{content:'';display:block;background:#518e7c;opacity:.5;width:9px;height:9px;border-radius:50%;margin:auto}
.gchallenge-edges .count-target.counted::before{width:48px;height:4px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) rotate(var(--edge-angle,0deg));background:#c84239;opacity:1}
.gchallenge-edges .edge-0{left:40px;top:60px;--edge-angle:-60deg}
.gchallenge-edges .edge-1{left:84px;top:60px;--edge-angle:60deg}
.gchallenge-edges .edge-2{left:62px;top:99px}
.gchallenge-edges:is(.square,.rectangle) .edge-0{left:62px;top:27px;--edge-angle:0deg}
.gchallenge-edges:is(.square,.rectangle) .edge-1{left:96px;top:62px;--edge-angle:90deg}
.gchallenge-edges:is(.square,.rectangle) .edge-2{left:62px;top:96px}
.gchallenge-edges:is(.square,.rectangle) .edge-3{left:28px;top:62px;--edge-angle:90deg}
.gchallenge-edges.rectangle .edge-0{top:37px}.gchallenge-edges.rectangle .edge-1{left:108px}
.gchallenge-edges.rectangle .edge-2{top:87px}.gchallenge-edges.rectangle .edge-3{left:16px}
.count-mark{position:relative;display:inline-grid;place-items:center;min-width:1.35rem;height:1.35rem;background:#e6f5dd;border:1px solid #40846a;border-radius:50%;font-size:.85rem}
.count-objects{flex-wrap:wrap}.count-objects button,.count-figures button{position:relative}
.count-objects .count-mark{position:absolute;bottom:-4px;right:-4px}
.gchallenge-group{display:grid;grid-template-columns:repeat(3,1fr);gap:.15rem}
.gchallenge-group .gcontrol-icon{width:1.1rem;height:1.1rem}
.gchallenge-number{display:block;font-size:2rem;min-width:3rem}
.gscience-object{display:grid;justify-items:center;gap:.4rem}
.gscience-object .gcontrol-icon{width:4rem;height:4rem;background:#eff6ff;border-radius:1rem;padding:.5rem}
.gchallenge-choice>.gcontrol-icon+span{display:block}
.gweek-progress{width:min(90%,23rem);height:1.2rem;accent-color:#347963}
@media(prefers-reduced-motion:reduce){.gchallenge-choice.mistake{animation:none}}
.gchallenge-edges{flex-basis:136px;height:135px}
.gchallenge-edges .gchallenge-shape{width:136px}
.gchallenge-edges.triangle .edge-0{left:44px;top:61px}
.gchallenge-edges.triangle .edge-1{left:92px;top:61px}
.gchallenge-edges.triangle .edge-2{left:68px;top:108px}
.gchallenge-edges:is(.square,.rectangle) .edge-0,.gchallenge-edges:is(.square,.rectangle) .edge-2{left:68px}
.gchallenge-edges.square .edge-1{left:106px;top:67px}.gchallenge-edges.square .edge-3{left:30px;top:67px}
.gchallenge-edges.square .edge-0{top:29px}.gchallenge-edges.square .edge-2{top:105px}
.gchallenge-edges.rectangle .edge-1{left:120px;top:67px}.gchallenge-edges.rectangle .edge-3{left:16px;top:67px}
.gchallenge-edges.rectangle .edge-0{top:39px}.gchallenge-edges.rectangle .edge-2{top:94px}
@media(max-width:360px){.gchallenge-row.count-figures{gap:0;margin-inline:-.5rem}}
.gclass-goal{max-width:29rem;margin:1rem auto;padding:1rem;border-radius:1rem;background:#e6f4eb}
.gchallenge-hints{margin-top:.7rem;padding:.45rem;border-radius:.8rem;background:#fff1d9}
.gchallenge-choice[hidden],.gchallenge-hints[hidden]{display:none!important}
.flash .word-illustration,.learncard .word-illustration{margin-inline:auto;font-size:2.5rem;text-align:center}
.word-illustration img{display:block;width:100%;height:auto}

.gmeadow-welcome{display:block;width:min(100%,640px);height:auto;margin:0 auto 1rem;border-radius:22px}
.gmeadow .scene-art{object-position:50% 75%}
.gnav-arrow.gnav-prev{background:linear-gradient(#fff6db,#ecedc6);color:#254c2c;border-color:#b8c780}
.gnav-arrow.gnav-next{background:linear-gradient(#517e39,#3a652a);color:#fffdf0;border-color:#2c4d1b}
.glisten{background:linear-gradient(#e0efd0,#c7dda9);color:#234d27;border-color:#9ab781}
.gnav-arrow:active,.glisten:active{transform:translateY(1px)}
@media (prefers-reduced-motion:reduce){.gnav-arrow:active,.glisten:active{transform:none}}

.gwardrobe-heading{display:flex;align-items:center;gap:.45rem;margin-top:1rem;font-weight:800}
.gwardrobe-heading .gwardrobe-icon{width:44px}
.gwardrobe-icon svg{width:100%;height:auto;display:block}
.gwardrobe-name{width:100%}
.gdress .gwardrobe-tip{margin:0;padding:.35rem .5rem;background:#fff0cc;border-radius:.75rem;font-size:.87rem;text-align:center;color:#684318}
.gdress .gwardrobe-preview{position:sticky;top:calc(env(safe-area-inset-top,0px) + 78px);z-index:10;width:min(280px,100%);padding:5px;background:#fff8ec;border-radius:18px;box-shadow:var(--lift)}
.gdress .gwardrobe-preview svg{display:block;width:clamp(98px,28vw,146px);height:auto;margin:auto}
.gwardrobe-row .gchip{font:700 .9rem/1.2 var(--display);text-align:center;overflow-wrap:break-word}
.gwardrobe-picture{width:min(100%,88px);height:58px;object-fit:contain;border-radius:10px}
.gpet-portrait{width:76px;aspect-ratio:4/5;object-fit:cover;border-radius:12px}
.preview.gpet-portrait{width:min(45vw,156px)}
.gseason-banner,.gstory-hero{display:block;width:min(100%,36rem);max-height:240px;object-fit:contain;margin:.7rem auto;border-radius:16px}
.glisten-block{align-items:center;gap:1rem;flex-wrap:wrap}
.glisten-block .gnav-arrow{margin:0}
.groute-stops img{width:4.2rem;height:3.4rem;object-fit:cover}
.gadventure-scene .scene-art{object-position:50% 45%}
.g-unlock-dance{animation:g-unlock-sway 1.8s ease-in-out}
.g-unlock-dance .pet-front{opacity:1}
.g-unlock-dance .pet-side{opacity:0}
@keyframes g-unlock-sway{
  0%,100%{transform:translateY(0) rotate(0)}
  20%{transform:translateY(-13px) rotate(0)}
  42%{transform:translateY(-3px) rotate(-11deg)}
  64%{transform:translateY(-3px) rotate(11deg)}
  84%{transform:translateY(-9px) rotate(0)}
}
@media(prefers-reduced-motion:reduce){.g-unlock-dance{animation:none}}

.gflower-confetti i{width:20px;height:20px;animation-duration:1.65s}
.gflower-confetti svg{width:100%;height:100%;display:block}

.gtop h2{min-width:0;overflow-wrap:anywhere}
.geggbtn{align-content:start;gap:4px;color:var(--ink)}
.geggbtn .egg{height:auto;aspect-ratio:218/246;object-fit:cover;border-radius:13px}
.gegg-label{font-size:clamp(.75rem,2.7vw,.95rem);line-height:1.25;overflow-wrap:anywhere;text-align:center}
.geggs:has(.gname:focus) .eggrow{grid-auto-columns:minmax(84px,1fr)}
.gmeadow .pet-habitat-art{object-position:center 60%}
.gmarine .petwrap::after{display:none}
.gmarine .petwrap{bottom:14%}
.gdress .gwardrobe-preview{isolation:isolate;overflow:hidden}
.gwardrobe-preview .pet-habitat-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;z-index:-1}
.gwardrobe-preview .gwardrobe-tip:not([hidden]){background:#fffffff2;border-radius:12px;padding:.3rem}
@media(max-width:639px){
  .tabs{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .gtop:has(.gnav-arrow)::after{width:clamp(22px,10vw,70px)}
}
@media(min-width:960px){.tabs{grid-template-columns:repeat(3,auto)!important}}
.groute-mode .groute-title{white-space:nowrap;font-size:clamp(.86rem,3.5vw,1.15rem)}
@media(max-width:639px){
  .groute-modes{grid-template-columns:minmax(0,1fr)}
  .groute-mode{min-width:0}
}

.gpet-poses{display:flex;justify-content:center;flex-wrap:wrap;gap:.5rem}
.gpet-poses [aria-pressed="true"]{outline:2px solid currentColor;outline-offset:-2px}
.gapproved-pet{display:block;width:100%;height:auto;aspect-ratio:2/3;object-fit:contain;border-radius:12px}
.glisten-block{flex-wrap:nowrap;gap:clamp(.35rem,3vw,1rem)}
.ganswer-art,.ganswer-geometry{width:min(240px,100%);margin-inline:auto}
.ganswer-art .ico{display:flex;width:100%}
.ganswer-art .ico svg,.ganswer-art .word-illustration{width:100%;height:auto;max-height:230px;object-fit:contain}
.gwardrobe-name{font-style:italic;font-weight:500}
.gnoel-gift{margin:1rem auto;padding:.8rem;width:min(100%,580px);border:1px solid #e7c781;border-radius:18px;background:#fff7e3;text-align:center}

/* Ô đặt tên và thao tác trong phần học cùng nhân vật. */
#gameRoot .gname{min-height:54px;width:min(100%,24rem);font-size:1.25rem}
#gameRoot :is(.gtile,.gprimary,.gopt,.gavatar-action,.gwardrobe-row .gchip){min-height:48px}
#gameRoot :is(.gq,.gopt,.groute-title,.gwardrobe-name){overflow-wrap:anywhere;line-height:1.26}
#gameRoot .gq{font-size:clamp(1.15rem,4vw,1.45rem)}
#gameRoot .gwardrobe-name{font-size:1rem}
