/* Smart Students Hub – AESN game theme for the course pages (matches the Games Arena). */
body{background:#0d1530!important}
header{background:radial-gradient(circle at 20% 0,#7c3aed,transparent 55%),radial-gradient(circle at 90% 20%,#0ea5e9,transparent 50%),#0d1530!important}
header h1{text-shadow:0 3px 0 #000,0 0 18px #7c3aed}
.welcome-visual{border:5px solid #fde047;box-shadow:0 10px 0 #0005}
main{color:#172b41}
main>.muted,main>.ar.muted{color:#c7d2fe!important}
.controls{background:#1c2752!important;color:#fff;border:0!important;box-shadow:0 8px 24px #0006}
.controls label,.controls .status{color:#fff}
button,a.btn{border:0!important;box-shadow:0 5px 0 #0003;font-weight:800!important;transition:transform .08s}
button:active,a.btn:active{transform:translateY(3px);box-shadow:0 2px 0 #0003}
button.primary,button[aria-pressed=true]{background:linear-gradient(#22c55e,#15803d)!important;color:#fff!important}
button:not(.primary):not([aria-pressed=true]):not(.picture),a.btn{background:linear-gradient(#ffffff,#e2e8f0);color:#14244a}
.stop{background:linear-gradient(#fecaca,#f87171)!important;color:#7f1d1d!important}
/* section tiles */
#sections{gap:12px}
#sections button{min-height:96px;color:#fff!important;border-radius:18px;font-size:.95em;text-shadow:0 2px 0 #0004;box-shadow:0 7px 0 #0005}
#sections button .ar{color:#fff;text-align:center}
#sections button:nth-child(1){background:linear-gradient(#ec4899,#9d174d)!important}
#sections button:nth-child(2){background:linear-gradient(#38bdf8,#0369a1)!important}
#sections button:nth-child(3){background:linear-gradient(#4ade80,#15803d)!important}
#sections button:nth-child(4){background:linear-gradient(#fb923c,#c2410c)!important}
#sections button:nth-child(5){background:linear-gradient(#a78bfa,#6d28d9)!important}
#sections button[aria-pressed=true]{outline:5px solid #fde047;outline-offset:3px;transform:scale(1.04)}
#sections button[aria-pressed=true]::after{content:' ▶ NOW';display:block;font-size:.7em;color:#fde047}
/* lesson card */
article{border:0!important;border-radius:24px!important;box-shadow:0 10px 30px #0008;position:relative;overflow:hidden}
article::before{content:'';position:absolute;left:0;right:0;top:0;height:10px;background:linear-gradient(90deg,#ec4899,#38bdf8,#4ade80,#fb923c,#a78bfa)}
article h2{font-size:1.9rem;color:#1e3a8a}
.badge{background:linear-gradient(#fde047,#f59e0b)!important;color:#3b2600!important;font-weight:800}
.instruction{background:linear-gradient(#eef2ff,#e0e7ff)!important;border-left:6px solid #6366f1!important;border-radius:16px!important}
.sticky{background:#ffffffee!important;border-radius:16px;padding:8px!important}
/* stage tabs as game levels */
.steps button{border-radius:30px!important;min-height:56px}
.steps button:nth-child(1)::before{content:'👀 '}.steps button:nth-child(2)::before{content:'🗣️ '}.steps button:nth-child(3)::before{content:'🎯 '}.steps button:nth-child(4)::before{content:'✍️ '}
.steps button[aria-pressed=true]{background:linear-gradient(#fde047,#f59e0b)!important;color:#3b2600!important;transform:scale(1.05)}
/* word cards */
.cards{gap:16px!important}
.word{border:0!important;border-radius:20px!important;background:linear-gradient(#fff,#f8fafc)!important;box-shadow:0 6px 0 #c7d2fe,0 10px 20px #0002;transition:transform .2s}
.word:hover{transform:translateY(-4px) rotate(-.5deg)}
.word h3{font-size:1.4em;color:#1e3a8a}
.picture{border-radius:16px!important;border:4px solid #fde047!important;box-shadow:none!important;background:#fff!important}
.g-pic{display:block;width:100%;height:170px;object-fit:contain;background:#fff}
.phrase{background:#fff;border-radius:16px;margin:8px 0;border:0!important;box-shadow:0 4px 0 #e0e7ff}
.g-thumb{width:84px;height:64px;object-fit:contain;border-radius:10px;border:3px solid #fde047;background:#fff}
.passage{background:#fffbeb;border:4px dashed #f59e0b;border-radius:18px;padding:14px 18px}
.g-prow{display:flex;gap:10px;flex-wrap:wrap;margin:10px 0}.g-prow img{width:130px;height:98px;object-fit:contain;border-radius:12px;border:4px solid #fde047;background:#fff}
/* questions */
.options button[aria-pressed=true]{background:linear-gradient(#c7d2fe,#818cf8)!important;color:#1e1b4b!important}
.question:has(.feedback.good) .options button[aria-pressed=true]{background:linear-gradient(#bbf7d0,#22c55e)!important;color:#14532d!important}
.question:has(.feedback.retry) .options button[aria-pressed=true]{background:linear-gradient(#fecaca,#f87171)!important;color:#7f1d1d!important}
.question{border:0!important;border-radius:20px!important;background:linear-gradient(#f8fafc,#eef2ff);box-shadow:0 6px 0 #c7d2fe;position:relative}
.question::after{content:'';display:block;clear:both}
.g-qpic{float:right;width:120px;height:90px;object-fit:contain;border-radius:12px;border:4px solid #fde047;background:#fff;margin:0 0 8px 10px}
.options button{min-height:58px;font-size:1.05em;border-radius:16px}
.feedback.good{background:linear-gradient(#bbf7d0,#86efac)!important;color:#14532d!important;font-weight:800;border-radius:14px!important;animation:gpop .4s}
.feedback.retry{background:linear-gradient(#fef3c7,#fde68a)!important;color:#713f12!important;font-weight:800;border-radius:14px!important}
.writing input{border:4px solid #6366f1!important;border-radius:14px!important}
.drawing-tool canvas{border:5px solid #fde047!important;border-radius:16px}
.panel{border:0!important;border-radius:24px!important;box-shadow:0 10px 30px #0008}
.footer,.footer a{color:#a5b4fc}
/* HUD and effects */
.g-hud{background:#1c2752;color:#fff;border-radius:20px;padding:12px 14px;margin:14px 0;box-shadow:0 8px 24px #0006}
.g-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.g-chip{background:#ffffff1f;border:1px solid #ffffff33;border-radius:20px;padding:3px 12px;font-weight:900}
.g-xp{flex:1;min-width:140px;height:14px;background:#ffffff22;border-radius:10px;overflow:hidden}.g-xp i{display:block;height:100%;width:0;background:linear-gradient(90deg,#22c55e,#fde047);transition:width .6s}
.g-small{min-height:40px!important;padding:4px 12px!important;background:#2b3a72!important;color:#fff!important}
.g-links{margin-top:10px}
.g-btn{display:inline-flex;align-items:center;min-height:50px;padding:8px 18px;border-radius:14px;font-weight:900;text-decoration:none;box-shadow:0 5px 0 #0004}
.g-gold{background:linear-gradient(#fde047,#f59e0b);color:#3b2600!important}.g-blue{background:linear-gradient(#38bdf8,#0369a1);color:#fff!important}
.g-tip{margin:8px 0 0;font-size:.75em;color:#c7d2fe}
.g-banner{position:fixed;left:50%;top:38%;transform:translate(-50%,-50%);z-index:60;font-size:clamp(2.4rem,9vw,5rem);font-weight:900;color:#fde047;text-shadow:0 5px 0 #b45309,0 0 30px #f59e0b,0 10px 20px #000;pointer-events:none;animation:gban 1.3s ease-out forwards;white-space:nowrap}
.g-banner.no{color:#fff;text-shadow:0 5px 0 #991b1b,0 0 24px #ef4444,0 10px 20px #000}
@keyframes gban{0%{transform:translate(-50%,-50%) scale(.2) rotate(-12deg);opacity:0}25%{transform:translate(-50%,-50%) scale(1.15) rotate(3deg);opacity:1}70%{opacity:1}100%{transform:translate(-50%,-80%);opacity:0}}
.g-conf{position:fixed;top:-30px;z-index:59;pointer-events:none;font-size:22px;animation:gfall linear forwards}
@keyframes gfall{to{transform:translateY(110vh) rotate(720deg)}}
.g-plus{position:fixed;z-index:61;font-weight:900;color:#fde047;text-shadow:0 2px 0 #000;font-size:1.6em;pointer-events:none;animation:gplus 1s ease-out forwards}
@keyframes gplus{to{transform:translateY(-70px);opacity:0}}
@keyframes gpop{0%{transform:scale(.8)}70%{transform:scale(1.04)}100%{transform:scale(1)}}
.g-shake{animation:gshake .4s}@keyframes gshake{20%,60%{transform:translateX(-8px)}40%,80%{transform:translateX(8px)}}
body.quiet-view .g-banner,body.quiet-view .g-conf{display:none}
@media (prefers-reduced-motion:reduce){.g-banner,.g-conf,.g-plus,.word,.feedback.good{animation:none!important;transition:none!important}}
@media print{.g-hud,.g-banner,.g-conf{display:none!important}body{background:#fff!important}}

/* writing cards, word basket, drawing tool, navigation */
.g-wcard{position:relative;background:#fff;border-radius:20px;padding:14px 14px 12px 64px;margin:14px 0;box-shadow:0 6px 0 var(--c),0 10px 20px #0002;border:3px solid var(--c)}
.g-wcard label{font-size:1.25em!important;font-weight:900;color:#1e3a8a;margin:0 0 6px!important}
.g-wicon{position:absolute;left:10px;top:12px;width:44px;height:44px;border-radius:50%;background:var(--c);display:flex;align-items:center;justify-content:center;font-size:1.4rem;box-shadow:0 4px 0 #0003}
.g-wcard input{font-size:1.2em!important;min-height:54px;margin:6px 0;background:#fffbeb}
.g-bank{background:linear-gradient(#fef3c7,#fde68a);border-radius:20px;padding:12px;margin:12px 0;box-shadow:0 6px 0 #f59e0b}
.g-bank-t{margin:0 0 8px;font-weight:900;color:#78350f;font-size:.9em}
.g-bank-w{display:flex;gap:10px;overflow-x:auto;padding-bottom:6px}
.g-bank-w button{flex:none;flex-direction:column;width:110px;padding:6px!important;background:#fff!important;border-radius:16px;min-height:auto}
.g-bank-w img{width:96px;height:72px;object-fit:contain}.g-bank-w span{font-size:.8em;color:#1e3a8a}
.g-bank-w button.g-used{outline:4px solid #22c55e}
button.g-done{background:linear-gradient(#fde047,#f59e0b)!important;color:#3b2600!important;font-size:1.15em;min-height:60px;padding:10px 24px}
.stage.writing>.muted{color:#475569!important}
.drawing-tool{background:linear-gradient(#fdf4ff,#fae8ff)!important;border:0!important;border-radius:22px!important;box-shadow:0 6px 0 #d8b4fe;padding:16px!important}
.drawing-tool h3{color:#7e22ce;font-size:1.4em}
.drawing-tool h3::before{content:'🎨 '}
.drawing-tool canvas{background:#fff;width:100%;max-width:850px}
.pen-colour[aria-pressed=true]{outline:4px solid #fde047;outline-offset:2px;transform:scale(1.08)}
.g-nav{gap:12px!important;margin:16px 0}
.g-nav button[data-next-stage]{background:linear-gradient(#22c55e,#15803d)!important;color:#fff!important}
.g-nav button[data-section]{background:linear-gradient(#38bdf8,#0369a1)!important;color:#fff!important}
.g-nav a.btn{background:linear-gradient(#fde047,#f59e0b)!important;color:#3b2600!important}
.g-nav button,.g-nav a.btn{min-height:58px;font-size:1.05em}
article details{background:linear-gradient(#f0fdf4,#dcfce7);border:0!important;border-radius:18px!important;box-shadow:0 4px 0 #86efac}
article details summary{color:#166534}
article details summary::before{content:'👨‍👩‍👦 '}
#summary{font-size:1.2em;font-weight:900;color:#1e3a8a}
.panel h2{color:#1e3a8a}
.panel h2::before{content:'🏅 '}
.progress{height:22px!important;accent-color:#22c55e;border-radius:12px}
#registration{background:linear-gradient(#fff,#eef2ff)!important;border-radius:24px!important;box-shadow:0 10px 0 #6366f1,0 16px 30px #0006!important;color:#172b41}
#registration .row label{background:#fff;border-radius:16px;padding:10px 14px;box-shadow:0 4px 0 #c7d2fe}
.qr-access{background:linear-gradient(#fff,#fef9c3)!important;border-radius:22px!important;box-shadow:0 8px 0 #f59e0b}

.pen-colour,.pen-colour[aria-pressed=true]{background:var(--pc,#14244a)!important;color:#fff!important}
[data-draw-action=eraser]{background:linear-gradient(#fbcfe8,#f472b6)!important;color:#500724!important}
[data-draw-action=undo]{background:linear-gradient(#e0e7ff,#a5b4fc)!important;color:#1e1b4b!important}
[data-draw-action=clear]{background:linear-gradient(#fecaca,#f87171)!important;color:#7f1d1d!important}
[data-draw-action=save]{background:linear-gradient(#bbf7d0,#22c55e)!important;color:#14532d!important}
/* every Listen / hear button: bright blue */
button[data-say],button[data-read-writing],#regListen,#welcome{background:linear-gradient(#38bdf8,#0369a1)!important;color:#fff!important}
/* Say & Read sentences as colourful rows */
.phrase{border-left:10px solid #f59e0b!important;padding:12px 14px!important;font-size:1.15em;font-weight:800;color:#1e3a8a}
.phrase:nth-of-type(5n+1){border-left-color:#ec4899!important;background:#fdf2f8}
.phrase:nth-of-type(5n+2){border-left-color:#38bdf8!important;background:#f0f9ff}
.phrase:nth-of-type(5n+3){border-left-color:#4ade80!important;background:#f0fdf4}
.phrase:nth-of-type(5n+4){border-left-color:#fb923c!important;background:#fff7ed}
.phrase:nth-of-type(5n+5){border-left-color:#a78bfa!important;background:#f5f3ff}
.stage h3,.stage h4{color:#7e22ce}
.stage h3::before{content:'⭐ '}
/* panels and form fields */
.panel:not(#registration){background:linear-gradient(#ffffff,#f0f9ff)!important}
.panel .muted{color:#475569!important}
#registration input[type=text],#registration select,input,select{border:3px solid #818cf8!important;border-radius:14px!important;min-height:52px;background:#fff}
#print{background:linear-gradient(#a78bfa,#6d28d9)!important;color:#fff!important}
#reset{background:linear-gradient(#fecaca,#f87171)!important;color:#7f1d1d!important}
header>p:not(.ar){color:#e0e7ff}
.scope-note{background:#ffffff14;border-radius:14px;padding:8px 12px}
.status{color:#fde047}
