/* ============ EXACT LIVE GK-EXPLORER 3D THEME ============ */
:root{
  --blue:#2F6DF4; --blue-d:#1749B8; --blue-l:#EAF2FF; --sky:#D9ECFF;
  --ink:#172554; --muted:#64748B;
  --green:#24B968; --green-l:#DCFCE7; --red:#EF476F; --red-l:#FFE5ED;
  --gold:#F5C842; --line:#D6E1F2; --bg:#EDF6FF;
  --gk-purple:#7432D5; --gk-purple-dark:#4C1D95;
  --gk-blue:#2F6DF4; --gk-blue-dark:#1749B8; --gk-cyan:#22B8DC;
  --gk-panel:#FFFFFF; --gk-shadow:#C9D4EA;
}
*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{min-height:100%;background:#BEE8F8}
body{
  font-family:'Nunito','Outfit',sans-serif;color:var(--ink);
  min-height:100vh;min-height:100dvh;overflow-x:hidden;position:relative;
  background: linear-gradient(115deg,#82D9F6 0%,#D9ECFB 46%,#F9CFE8 100%);
  background-attachment:fixed;
}

/* Real 3D Floating Spheres background styling */
.bg-spheres {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.bg-sphere {
  position: absolute;
  border-radius: 50%;
}
.sphere-blue-1 {
  width: 170px;
  height: 170px;
  left: -80px;
  top: 35%;
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #a5caff 15%, #3b82f6 55%, #1d4ed8 85%, #0f172a 100%);
  box-shadow: 0 15px 35px rgba(29, 78, 216, 0.22);
  animation: floatSphere1 8s ease-in-out infinite alternate;
}
.sphere-pink-1 {
  width: 120px;
  height: 120px;
  right: -55px;
  top: 18%;
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #ffd0e5 15%, #ec4899 55%, #be185d 85%, #470c24 100%);
  box-shadow: 0 12px 28px rgba(190, 24, 93, 0.22);
  animation: floatSphere2 7s ease-in-out infinite alternate;
}
.sphere-blue-2 {
  width: 110px;
  height: 110px;
  left: -40px;
  bottom: 8%;
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #a5caff 15%, #3b82f6 55%, #1d4ed8 85%, #0f172a 100%);
  box-shadow: 0 10px 22px rgba(29, 78, 216, 0.18);
  animation: floatSphere3 9s ease-in-out infinite alternate;
}
.sphere-pink-2 {
  width: 220px;
  height: 220px;
  right: -100px;
  bottom: 12%;
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #ffd0e5 15%, #ec4899 55%, #be185d 85%, #470c24 100%);
  box-shadow: 0 20px 45px rgba(190, 24, 93, 0.25);
  animation: floatSphere4 10s ease-in-out infinite alternate;
}

@keyframes floatSphere1 {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-12px) rotate(5deg); }
}
@keyframes floatSphere2 {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(10px) rotate(-8deg); }
}
@keyframes floatSphere3 {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-8px) rotate(6deg); }
}
@keyframes floatSphere4 {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(15px) rotate(-4deg); }
}
/* launcher screens use the exact GK 3D launcher background image */
body.launcher{
  background-image:url('../assets/ui/chapter-menu-bg.png');
  background-size:cover;background-position:center center;background-repeat:no-repeat;
}
body.launcher::before{content:none}
img{-webkit-user-drag:none;user-select:none}
button{font-family:inherit;cursor:pointer}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}

/* ---------- screens ---------- */
.scr{display:none;min-height:100vh;min-height:100dvh;position:relative;z-index:1}
.scr.on{display:block}

/* ---------- COVER (GK style - defined at end of file) ---------- */

/* ---------- CHAPTERS / LIST ---------- */
.hub{max-width:1240px;margin:0 auto;padding:12px 16px 40px}
.hubhead{display:none} /* Deprecated in favor of .app-header */

/* App header with level badge & settings */
.app-header {
  background: linear-gradient(180deg, #5C77FA, #4359EC);
  border-bottom: 5px solid #ffffff;
  padding: 12px clamp(16px, 6vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 5;
  box-shadow: 0 8px 20px rgba(71, 92, 227, 0.15), inset 0 2px 3px rgba(255, 255, 255, 0.25);
}
.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lvl-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: #ffffff;
  background: linear-gradient(180deg, #9254E8, #6C2CCB);
  border: 2.5px solid #ffffff;
  border-bottom: 5px solid #ffffff;
  border-radius: 20px;
  padding: 6px 16px 8px;
  box-shadow: 0 4px 10px rgba(76, 29, 149, 0.25), inset 0 2px 3px rgba(255, 255, 255, 0.25);
  text-shadow: 0 2px 0 rgba(54,19,111,.45);
}
.header-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid #fff;
  border-bottom: 5px solid #C7D4EA;
  color: #4168B7;
  font-size: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.12s;
  cursor: pointer;
}
.header-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
}
.header-btn:active {
  transform: translateY(1px);
  border-bottom-width: 2.5px;
}
.settings-wrapper-outer {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.lang-dropdown-container {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: flex;
  align-items: center;
  width: 0;
  opacity: 0;
  overflow: visible; /* Need overflow visible so dropdown list can render outside the container! */
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, transform 0.25s ease;
  transform: translateY(-5px);
  pointer-events: none;
  z-index: 999;
}
.lang-dropdown-container.open {
  width: 145px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.lang-select-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  border-bottom: 5px solid #ffffff;
  border-radius: 24px;
  padding: 6px 14px 8px;
  color: #1e293b;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05), inset 0 2px 2px #fff;
  transition: transform 0.1s, background 0.12s;
  user-select: none;
}
.lang-select-pill:hover {
  background: #e2e8f0;
}
.lang-select-pill:active {
  transform: translateY(2px);
  border-bottom-width: 2.5px;
}
.lang-select-pill .arrow {
  font-size: 12px;
  color: #64748b;
}
.flag-holder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Custom Dropdown List overlay */
.custom-dropdown-list {
  position: absolute;
  top: calc(100% + 8px);
  left: -20px;
  right: 0;
  background: #ffffff;
  border: 2.5px solid #cbd5e1;
  border-radius: 18px;
  max-height: 285px;
  overflow-y: auto;
  z-index: 999;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  display: none;
  padding: 6px 0;
}
.custom-dropdown-list.show {
  display: block;
  animation: dropdownFadeIn 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Scrollbar styles */
.custom-dropdown-list::-webkit-scrollbar {
  width: 8px;
}
.custom-dropdown-list::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 0 18px 18px 0;
}
.custom-dropdown-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 6px;
}
.custom-dropdown-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Custom Dropdown Items */
.custom-dropdown-item {
  width: 100%;
  background: transparent;
  border: none;
  padding: 9px 16px;
  text-align: left;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}
.custom-dropdown-item:hover {
  background: #f1f5f9;
}
.custom-dropdown-item.selected {
  background: #eff6ff;
  color: #2F6DF4;
}
.custom-dropdown-item .flag-img, .lang-select-pill .flag-img {
  width: 20px !important;
  height: 14px !important;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

/* Beautiful Hub Title Section */
.hub-title-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 28px;
  width: 100%;
}
.gk-logo-text, .hub-logo-text {
  font-family: 'Fredoka', sans-serif;
  font-weight: 900;
  letter-spacing: 2px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(2px, 0.6vw, 8px);
}
.gk-logo-text {
  font-size: clamp(38px, 9vw, 68px);
  margin-bottom: 2px;
}
.hub-logo-text {
  font-size: clamp(32px, 7vw, 54px);
  margin-bottom: 6px;
}

.gk-logo-text span, .hub-logo-text span {
  display: inline-block;
  font-weight: 900;
  -webkit-text-stroke: 2px #ffffff;
  paint-order: stroke fill;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
  animation: letterFloat 3s ease-in-out infinite alternate;
}
.gk-logo-text span:nth-child(even), .hub-logo-text span:nth-child(even) {
  animation-delay: 0.5s;
}

@keyframes letterFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-5px); }
}

.gk-logo-text span:nth-child(7n+1), .hub-logo-text span:nth-child(7n+1) { 
  color: #3B82F6; 
  text-shadow: 0 2px 0 #2563EB, 0 4px 0 #1D4ED8, 0 6px 0 #172554, 0 8px 12px rgba(0,0,0,0.3);
}
.gk-logo-text span:nth-child(7n+2), .hub-logo-text span:nth-child(7n+2) { 
  color: #F59E0B; 
  text-shadow: 0 2px 0 #D97706, 0 4px 0 #B45309, 0 6px 0 #78350F, 0 8px 12px rgba(0,0,0,0.3);
}
.gk-logo-text span:nth-child(7n+3), .hub-logo-text span:nth-child(7n+3) { 
  color: #EF4444; 
  text-shadow: 0 2px 0 #DC2626, 0 4px 0 #B91C1C, 0 6px 0 #7F1D1D, 0 8px 12px rgba(0,0,0,0.3);
}
.gk-logo-text span:nth-child(7n+4), .hub-logo-text span:nth-child(7n+4) { 
  color: #10B981; 
  text-shadow: 0 2px 0 #059669, 0 4px 0 #047857, 0 6px 0 #064E3B, 0 8px 12px rgba(0,0,0,0.3);
}
.gk-logo-text span:nth-child(7n+5), .hub-logo-text span:nth-child(7n+5) { 
  color: #8B5CF6; 
  text-shadow: 0 2px 0 #7C3AED, 0 4px 0 #5B21B6, 0 6px 0 #4C1D95, 0 8px 12px rgba(0,0,0,0.3);
}
.gk-logo-text span:nth-child(7n+6), .hub-logo-text span:nth-child(7n+6) { 
  color: #EC4899; 
  text-shadow: 0 2px 0 #DB2777, 0 4px 0 #BE185D, 0 6px 0 #831843, 0 8px 12px rgba(0,0,0,0.3);
}
.gk-logo-text span:nth-child(7n+7), .hub-logo-text span:nth-child(7n+7) { 
  color: #06B6D4; 
  text-shadow: 0 2px 0 #0891B2, 0 4px 0 #0E7490, 0 6px 0 #155E75, 0 8px 12px rgba(0,0,0,0.3);
}

.hub-logo-emoji {
  font-size: clamp(38px, 8vw, 58px);
  margin-bottom: 6px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.15));
  animation: letterFloat 3.5s ease-in-out infinite alternate;
}

.hub-main-badge {
  display: inline-block;
  padding: 10px 32px 14px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 800;
  font-size: clamp(18px, 4vw, 26px);
  color: #ffffff;
  background: linear-gradient(180deg, #a855e7 0%, #7a31c8 48%, #5d209d 100%);
  border: 3.5px solid #c865ff;
  border-bottom: 8px solid #3f147b;
  border-radius: 20px;
  box-shadow: 0 8px 16px rgba(53, 18, 107, 0.25), inset 0 2px 4px rgba(255, 255, 255, 0.27);
  text-shadow: 0 3px 0 rgba(43, 12, 83, 0.4);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.hub-sub-badge {
  display: inline-block;
  padding: 8px 24px 10px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: clamp(13px, 2.5vw, 15px);
  color: #ffffff;
  background: linear-gradient(180deg, #259dff, #0877dd);
  border: 2px solid #75c5ff;
  border-bottom: 5px solid #126bbb;
  border-radius: 15px;
  box-shadow: 0 6px 12px rgba(12, 75, 154, 0.2), inset 0 2px 3px rgba(255, 255, 255, 0.25);
  text-shadow: 0 1.5px 0 rgba(0, 66, 145, 0.5);
}

.langpill{
  display:inline-flex;align-items:center;gap:8px;font-family:'Fredoka',sans-serif;font-weight:700;font-size:14px;
  color:#fff;border:2.5px solid #fff;border-bottom:5px solid #ffffff;border-radius:24px;padding:7px 18px 8px;
  background:linear-gradient(180deg,#9254E8,#6C2CCB);
  box-shadow:0 6px 12px rgba(75,31,146,.22),inset 0 2px 3px rgba(255,255,255,.25);text-shadow:0 2px 0 rgba(54,19,111,.45)}
.langpill:active{transform:translateY(2px);border-bottom-width:2.5px}

.pcards{display:grid;grid-template-columns:repeat(3, 1fr);gap:16px;max-width:1200px;margin:0 auto}
.pcards:has(.pcard:only-child){grid-template-columns:minmax(0, 520px);justify-content:center}
@media(max-width:980px){.pcards{grid-template-columns:repeat(2, 1fr)}}
@media(max-width:640px){.pcards{grid-template-columns:1fr}}

.pcard{
  --theme-c1: #3B82F6;
  --theme-c2: #1D4ED8;
  display:flex;gap:12px;align-items:center;border-radius:22px;padding:12px 14px;color:#1e293b;text-align:left;
  background:linear-gradient(180deg, #ffffff 55%, var(--theme-light, rgba(255,255,255,0)) 100%), #ffffff;
  border:3px solid var(--theme-c1);border-bottom:8px solid var(--theme-c2);
  box-shadow:0 8px 18px rgba(57,74,125,.08),inset 0 2px 4px #ffffff;transition:transform .12s, border-bottom-width .12s, box-shadow .12s;
  position:relative;cursor:pointer;width:100%}
.pcard:hover{transform:translateY(-3px);box-shadow:0 12px 22px rgba(57,74,125,.12),inset 0 2px 4px #ffffff}
.pcard:active{transform:scale(.98) translateY(2px);border-bottom-width:3.5px}
.pcard .ic{
  flex:0 0 46px;height:46px;background:linear-gradient(135deg,var(--theme-c1),var(--theme-c2));color:#ffffff;
  border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:22px;
  box-shadow:0 4px 8px rgba(0,0,0,.1),inset 0 2px 4px rgba(255,255,255,.25)}
.pcard .tx{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.pcard .tt{font-family:'Fredoka',sans-serif;font-weight:700;font-size:clamp(14px,1.15vw,16.5px);line-height:1.2;color:#1e293b}
.pcard .dd{display:block;font-family:'Outfit',sans-serif;font-size:12px;font-weight:600;color:#64748b;line-height:1.2}
.pcard .pill{
  display:inline-block;margin-top:3px;align-self:flex-start;background:#f1f5f9;color:var(--theme-c1);
  border-radius:12px;font-family:'Outfit',sans-serif;font-size:11px;font-weight:800;padding:2px 8px;border:1.5px solid var(--theme-c1)}
.pcard .arrow-circle{
  flex:0 0 30px;height:30px;border-radius:50%;background:linear-gradient(135deg,var(--theme-c1),var(--theme-c2));color:#ffffff;
  display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:bold;
  box-shadow:0 2.5px 0 var(--theme-c2),inset 0 1px 2px rgba(255,255,255,.35)}
.backpill{
  display:inline-flex;align-items:center;gap:8px;font-family:'Fredoka',sans-serif;font-weight:700;font-size:15px;color:#4168B7;
  border:3px solid #fff;border-bottom:6px solid #C7D4EA;border-radius:22px;padding:9px 20px;margin-bottom:14px;
  background:linear-gradient(180deg,#FFFFFF,#EEF4FF);box-shadow:0 7px 14px rgba(55,75,127,.18),inset 0 2px 4px #fff}
.backpill:active{transform:translateY(2px);border-bottom-width:3px}

/* ---------- CHAPTER SELECT: FUN ALPHABET SCENE ---------- */





/* ---------- GAME SHELL (glass) ---------- */
#gameScr{padding:clamp(8px,1.7vw,18px)}
.card-shell{
  position:relative;overflow:hidden;isolation:isolate;max-width:900px;margin:0 auto;
  display:flex;flex-direction:column;min-height:calc(100vh - 40px);min-height:calc(100dvh - 40px);
  border:3px solid rgba(255,255,255,.96);border-radius:clamp(24px,3vw,34px);
  background:linear-gradient(145deg,rgba(255,255,255,.82),rgba(239,244,255,.72));
  box-shadow:0 28px 64px rgba(77,65,145,.22),inset 0 2px 5px rgba(255,255,255,.92);
  backdrop-filter:blur(13px) saturate(1.12);
}
.card-shell::before{
  content:"";position:absolute;inset:78px 0 0;z-index:-1;pointer-events:none;
  background:
    radial-gradient(circle at 4% 82%,rgba(93,198,255,.28) 0 9%,transparent 9.2%),
    radial-gradient(circle at 98% 28%,rgba(232,144,226,.22) 0 8%,transparent 8.2%),
    linear-gradient(135deg,rgba(217,244,255,.5),rgba(255,235,248,.42));
}
/* white glossy toolbar */
.topbar{
  min-height:76px;padding:10px clamp(12px,2vw,22px) 13px;display:flex;align-items:center;gap:clamp(8px,1.4vw,14px);flex-wrap:wrap;
  border-bottom:8px solid rgba(146,157,203,.14);border-radius:30px 30px 0 0;
  background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(244,248,255,.92));
  box-shadow:0 8px 22px rgba(75,73,133,.09),inset 0 2px 4px #fff;
}
.topbar .iconbtn{
  width:46px;height:46px;border-radius:50%;font-size:19px;display:flex;align-items:center;justify-content:center;flex:0 0 auto;
  border:3px solid #fff;border-bottom:6px solid #C7D4EA;color:#4168B7;
  background:linear-gradient(180deg,#FFFFFF,#EEF4FF);
  box-shadow:0 7px 14px rgba(55,75,127,.18),inset 0 2px 4px #fff;transition:.12s}
.topbar .iconbtn:hover{transform:translateY(-2px);filter:brightness(1.03)}
.topbar .iconbtn:active{transform:translateY(2px);border-bottom-width:3px}
.topbar .iconbtn.on{background:linear-gradient(180deg,#4ED5E6,#1AA8D2);border-color:#fff;border-bottom-color:#127CA7;color:#fff}
.topbar .gname{
  color:var(--ink);font-family:'Nunito',sans-serif;font-weight:900;letter-spacing:0;
  font-size:clamp(14px,1.9vw,18px);flex:0 1 auto;min-width:0}
.topbar .lvl{
  padding:7px clamp(14px,2vw,22px) 9px;border:3px solid #fff;border-bottom:6px solid var(--gk-purple-dark);border-radius:24px;
  background:linear-gradient(180deg,#9254E8,#6C2CCB);color:#fff;font-family:'Fredoka',sans-serif;font-weight:600;font-size:12.5px;white-space:nowrap;
  box-shadow:0 8px 15px rgba(75,31,146,.28),inset 0 3px 4px rgba(255,255,255,.25);text-shadow:0 2px 0 rgba(54,19,111,.45)}
.topbar .stat, .topbar .statpill{
  min-width:78px;min-height:46px;padding:4px 10px 6px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;
  border:2px solid #fff;border-bottom:5px solid #C7D4EA;border-radius:16px;
  background:linear-gradient(180deg,#fff,#F3F7FF);color:#6B7895;font-family:'Fredoka',sans-serif;font-weight:600;font-size:14px;
  box-shadow:0 6px 13px rgba(55,75,127,.16),inset 0 2px 3px #fff;white-space:nowrap}
.topbar .stat b, .topbar .statpill b{color:var(--ink);font-size:15px;font-weight:800;display:flex;align-items:center;justify-content:center;gap:3px;line-height:1.1}
.topbar .stat small, .topbar .statpill small{font-size:10.5px;font-weight:700;color:#64748b;line-height:1}
.topbar .langbtn{position:relative}
.topbar .langbtn small{position:absolute;bottom:-4px;right:-5px;background:linear-gradient(180deg,#9254E8,#6C2CCB);color:#fff;font-size:9px;font-weight:800;border-radius:8px;padding:1px 5px;border:2px solid #fff}
.topbar .dots{flex:1;justify-content:center;padding:0;min-width:60px}
.dots{display:flex;gap:4px;flex-wrap:wrap;padding:9px 16px 0}
.dots .dot{width:10px;height:18px;border:2px solid #C4D2EE;border-radius:8px;background:#F6F8FF;box-shadow:inset 0 -2px 0 rgba(77,87,139,.1)}
.dots .dot.done{border-color:#7A45DB;background:#8D55EA}
.dots .dot.cur{border-color:#fff;background:#6B38D3;box-shadow:0 0 0 3px #DCCBFF}

/* white 3D content stage */
.gbody{
  flex:1;margin:clamp(12px,2.6vh,26px) clamp(12px,3.5vw,44px);padding:clamp(14px,3vw,28px);
  display:flex;flex-direction:column;align-items:center;gap:13px;
  border:4px solid rgba(255,255,255,.98);border-bottom:12px solid #C7D2E8;border-radius:clamp(22px,3vw,32px);
  background:linear-gradient(145deg,rgba(255,255,255,.96),rgba(248,250,255,.92));
  box-shadow:0 24px 46px rgba(66,67,124,.18),inset 0 3px 8px rgba(255,255,255,.98);
}
.qpill{
  display:table;margin:0 auto;padding:9px 22px 11px;max-width:720px;
  border:2px solid #fff;border-bottom:5px solid #C8D5EA;border-radius:20px;
  background:linear-gradient(180deg,#fff,#F0F5FF);color:#3A4C78;
  font-family:'Baloo 2',cursive;font-weight:700;font-size:clamp(16px,3.4vw,21px);text-align:center;
  box-shadow:0 7px 15px rgba(62,77,128,.13)}
.qimg{max-width:min(440px,92%);max-height:34vh;object-fit:contain;border-radius:20px;border:4px solid #fff;box-shadow:0 14px 25px rgba(57,74,125,.16);background:#fff;margin:6px auto}
.panelimg{max-width:min(440px,92%);max-height:36vh;object-fit:contain;border-radius:20px;border:4px solid #fff;box-shadow:0 14px 28px rgba(57,74,125,.14);background:#fff;margin:6px auto;display:block}
.ptext{font-family:'Fredoka',sans-serif;font-weight:500;font-size:clamp(16px,2.8vw,19px);color:#2D3748;line-height:1.65;background:#F8FAFC;border:2px solid #E2E8F0;border-radius:20px;padding:18px 24px;margin:12px auto;box-shadow:0 4px 12px rgba(0,0,0,.04);text-align:center;width:100%;box-sizing:border-box}
.spkline{display:inline-flex;align-items:center;gap:8px;background:linear-gradient(180deg,#FFFFFF,#F1F5F9);color:#2563EB;border:2px solid #CBD5E1;border-bottom:4px solid #94A3B8;border-radius:9999px;padding:8px 22px;font-family:'Fredoka',sans-serif;font-weight:700;font-size:14px;cursor:pointer;box-shadow:0 4px 10px rgba(37,99,235,.1);transition:all .15s ease;margin-top:4px}
.spkline:hover{transform:translateY(-2px);background:#FFFFFF;border-color:#93C5FD}
.spkline:active{transform:translateY(1px);border-bottom-width:2px}
.hintline{font-family:'Fredoka',sans-serif;color:#3A4C78;font-weight:600;font-size:14.5px;text-align:center}

/* answer tiles â€” exact four-color rhythm */
.cards3{display:grid;grid-template-columns:repeat(3,1fr);gap:clamp(12px,2vw,20px);width:100%;max-width:820px}
.cards3:has(.opt:nth-child(4):last-child){grid-template-columns:repeat(4,minmax(0,1fr))}
.opt{
  --tile-bg:#F3FCF4;--tile-bg2:#E4F8EA;--tile-edge:#2FA85C;
  position:relative;overflow:hidden;aspect-ratio:1/1.12;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:4px;
  cursor:pointer;border:3px solid #fff;border-bottom:10px solid var(--tile-edge);border-radius:clamp(20px,2.4vw,26px);
  background:linear-gradient(170deg,#fff 0%,var(--tile-bg) 40%,var(--tile-bg2) 100%);
  box-shadow:0 14px 26px rgba(57,74,125,.14),inset 0 2px 6px rgba(255,255,255,.9);transition:.15s;padding:14px 10px 46px;
  animation:optPop .42s cubic-bezier(.34,1.56,.64,1) both}
.opt:nth-child(2){animation-delay:.08s}
.opt:nth-child(3){animation-delay:.16s}
.opt:nth-child(4){animation-delay:.24s}
@keyframes optPop{0%{opacity:0;transform:scale(.6) translateY(26px)}100%{opacity:1;transform:scale(1) translateY(0)}}
.opt:nth-child(4n+2){--tile-bg:#FFF7E8;--tile-bg2:#FDEECF;--tile-edge:#F0932B}
.opt:nth-child(4n+3){--tile-bg:#F7F0FE;--tile-bg2:#EFE2FC;--tile-edge:#8E4FD0}
.opt:nth-child(4n+4){--tile-bg:#EDF5FF;--tile-bg2:#DEEBFC;--tile-edge:#3E8BF3}
.opt.txt{aspect-ratio:auto;min-height:115px;height:auto;justify-content:center;padding:14px 10px 50px}
.opt .otext{overflow-wrap:break-word;word-break:break-word}
.radio{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);width:32px;height:32px;border-radius:50%;
  background:linear-gradient(180deg,#F4F7FD,#E6ECF7);box-shadow:inset 0 2px 5px rgba(80,95,140,.22),0 2px 3px #fff;
  display:flex;align-items:center;justify-content:center;font-weight:900;color:#fff;font-size:17px}
.opt.correct .radio{background:linear-gradient(180deg,#3ED27E,#17A657);box-shadow:0 4px 10px rgba(23,166,87,.4)}
.opt.correct .radio::after{content:'\2713'}
.opt.wrong .radio{background:linear-gradient(180deg,#FF7A97,#E8355F);box-shadow:0 4px 10px rgba(232,53,95,.4)}
.opt.wrong .radio::after{content:'\2715'}
.opt img{width:88%;height:64%;object-fit:contain;filter:drop-shadow(0 6px 10px rgba(0,0,0,.12))}
.opt:hover:not(.locked){transform:translateY(-6px);filter:saturate(1.06);box-shadow:0 20px 32px rgba(48,66,122,.22),inset 0 3px 8px rgba(255,255,255,.9)}
.opt:active{transform:scale(.96)}
.opt img{width:94%;height:62%;object-fit:contain}
.opt .otext{font-family:'Baloo 2',cursive;font-weight:700;font-size:clamp(13px,1.35vw,15.5px);color:#33415F;text-align:center;padding:4px 8px;line-height:1.36;width:100%;letter-spacing:0.2px}
.opt img + .otext{font-size:clamp(12px,2vw,14px);padding:0 6px 6px;line-height:1.24}
.opt.correct{--tile-bg:#E5FBEC;--tile-bg2:#C9F5DA;--tile-edge:#17A657;animation:winBounce .55s;box-shadow:0 0 0 4px rgba(23,166,87,.35),0 14px 26px rgba(23,166,87,.25)}
@keyframes winBounce{0%{transform:scale(1)}35%{transform:scale(1.12) rotate(-2deg)}70%{transform:scale(.97)}100%{transform:scale(1)}}
.opt.wrong{--tile-bg:#FFEDF1;--tile-bg2:#FDD5DE;--tile-edge:#E8355F;animation:shake .45s}
.opt.locked:not(.correct):not(.wrong){filter:grayscale(.55) opacity(.6)}
.opt.locked{pointer-events:none}
@keyframes shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-7px)}75%{transform:translateX(7px)}}
@media(max-width:560px){
  .bottombar{gap:6px;padding:9px 10px 12px;min-height:62px}
  .bbtn{font-size:13px;padding:8px 12px 9px;border-radius:12px;border-bottom-width:5px}
  .bbtn.next{padding:8px 14px 10px;border-bottom-width:5px}
  .bbtn.hint{padding:8px 12px 9px}
  .navgrp{gap:6px}
  .progpill{font-size:12.5px;padding:6px 12px;border-bottom-width:4px}
}
@media(max-width:720px){
  .topbar .dots {
    display: none !important;
  }
  .cards3{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-width:560px}
  .cards3:has(.opt:nth-child(4):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}
  .cards3 .opt:nth-child(3):last-child{grid-column:1/-1;width:calc(50% - 6px);justify-self:center}
  .opt{border-bottom-width:8px}
}

/* purple word chips + fill lines */
.bank{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;max-width:680px}
.chip{
  border:3px solid #fff;border-bottom:7px solid #6E3DC0;border-radius:16px;
  background:linear-gradient(180deg,#9B64E8,#7335CD);color:#fff;
  font-family:'Baloo 2',cursive;font-weight:800;font-size:16.5px;padding:9px 20px;
  box-shadow:0 8px 15px rgba(68,35,131,.2),inset 0 2px 3px rgba(255,255,255,.25);transition:.12s}
.chip:hover{transform:translateY(-4px);filter:brightness(1.05)}
.chip:active{transform:translateY(2px);border-bottom-width:3px}
.chip.used{opacity:.35;pointer-events:none}
.chip.wrong{animation:shake .4s;background:linear-gradient(180deg,#F87BA0,#E63D68);border-bottom-color:#B91C4B}
.lines{display:flex;flex-direction:column;gap:10px;width:100%;max-width:680px}
.line{
  border:3px solid #fff;border-bottom:6px solid #C7D4EA;border-radius:18px;padding:11px 15px;
  background:linear-gradient(145deg,#fff,#F5F8FF);box-shadow:0 8px 16px rgba(54,72,125,.10),inset 0 2px 4px #fff;
  font-family:'Fredoka',sans-serif;font-weight:600;font-size:clamp(15px,3.4vw,18.5px);line-height:1.6;color:#3A4C78}
.line.cur{border-bottom-color:#6E3DC0;background:linear-gradient(145deg,#FCF8FF,#F0E5FF)}
.line .blank{display:inline-block;min-width:86px;border-bottom:3px dashed #8B5ACD;color:#7432D5;font-family:'Baloo 2',cursive;font-weight:800;text-align:center;padding:0 6px}
.line .blank.fill{border-bottom-style:solid;border-bottom-color:var(--green);color:#1B8A50}
.line .spk{border:2px solid #fff;background:linear-gradient(180deg,#fff,#ECF4FF);color:var(--gk-blue);border-bottom:4px solid #C8D5EA;border-radius:50%;width:32px;height:32px;font-size:14px;margin-left:8px;vertical-align:middle;box-shadow:0 4px 8px rgba(51,74,129,.16)}

/* match tiles: blue left / purple right */
.mwrap{display:flex;gap:14px;width:100%;max-width:720px;justify-content:center}
.mcol{display:flex;flex-direction:column;gap:11px;flex:1;max-width:320px}
.mitem{
  display:flex;align-items:center;justify-content:center;gap:8px;height:clamp(88px,13vh,112px);padding:9px;text-align:center;cursor:pointer;
  border:4px solid #fff;border-bottom:9px solid #4D8EDB;border-radius:22px;
  background:linear-gradient(145deg,#F5FAFF,#D9EBFF);
  box-shadow:0 12px 22px rgba(59,74,127,.16),inset 0 2px 4px #fff;
  font-family:'Baloo 2',cursive;font-weight:800;font-size:clamp(13.5px,3vw,17px);color:var(--ink);transition:.12s}
.mcol:nth-child(2) .mitem{border-bottom-color:#8B5ACD;background:linear-gradient(145deg,#FCF8FF,#EBD5FF)}
.mitem img{max-height:92%;max-width:100%;object-fit:contain;border-radius:12px}
.mitem:hover{transform:translateY(-3px)}
.mitem.sel{border-bottom-color:#1AA8D2;background:linear-gradient(145deg,#F0FCFF,#C9F0FA);transform:scale(1.03)}
.mitem.done{border-bottom-color:#21A55B;background:linear-gradient(145deg,#F4FFF7,#D9FBE5);pointer-events:none}
.mitem.wrong{animation:shake .4s}

/* pickset white 3D cards */
.pgrid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;width:100%;max-width:720px}
@media(max-width:560px){
  .bottombar{gap:6px;padding:9px 10px 12px;min-height:62px}
  .bbtn{font-size:13px;padding:8px 12px 9px;border-radius:12px;border-bottom-width:5px}
  .bbtn.next{padding:8px 14px 10px;border-bottom-width:5px}
  .bbtn.hint{padding:8px 12px 9px}
  .navgrp{gap:6px}
  .progpill{font-size:12.5px;padding:6px 12px;border-bottom-width:4px}
}
@media(max-width:720px){.pgrid{grid-template-columns:repeat(2,1fr)}}
.pick{
  display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px;overflow:hidden;
  border:4px solid #fff;border-bottom:9px solid #C7D4EA;border-radius:24px;
  background:linear-gradient(145deg,#fff,#EAF3FF);
  box-shadow:0 14px 25px rgba(54,72,125,.16),inset 0 3px 5px #fff;transition:.12s}
.pick img{width:100%;height:88px;object-fit:contain}
.pick .pt{font-family:'Baloo 2',cursive;font-weight:800;font-size:14.5px;color:var(--ink);padding-bottom:3px;text-align:center}
.pick:hover{transform:translateY(-4px)}
.pick:active{transform:scale(.95)}
.pick.good{border-bottom-color:#21A55B;background:linear-gradient(145deg,#F4FFF7,#D9FBE5);pointer-events:none}
.pick.bad{animation:shake .4s;border-bottom-color:#E63D68;background:linear-gradient(145deg,#FFF6F9,#FFE3EC)}

/* order cards */
.ogrid{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;width:100%;max-width:780px}
@media(max-width:560px){
  .bottombar{gap:6px;padding:9px 10px 12px;min-height:62px}
  .bbtn{font-size:13px;padding:8px 12px 9px;border-radius:12px;border-bottom-width:5px}
  .bbtn.next{padding:8px 14px 10px;border-bottom-width:5px}
  .bbtn.hint{padding:8px 12px 9px}
  .navgrp{gap:6px}
  .progpill{font-size:12.5px;padding:6px 12px;border-bottom-width:4px}
}
@media(max-width:720px){.ogrid{grid-template-columns:repeat(3,1fr)}}
.ocard{
  position:relative;padding:6px;
  border:4px solid #fff;border-bottom:9px solid #C7D4EA;border-radius:22px;
  background:linear-gradient(145deg,#fff,#EAF3FF);
  box-shadow:0 12px 22px rgba(54,72,125,.15),inset 0 2px 4px #fff;transition:.12s}
.ocard img{width:100%;height:112px;object-fit:contain}
.ocard .ot{font-family:'Fredoka',sans-serif;font-weight:600;font-size:12px;text-align:center;color:#3A4C78}
.ocard:hover{transform:translateY(-4px)}
.ocard:active{transform:scale(.95)}
.ocard.done{border-bottom-color:#21A55B;background:linear-gradient(145deg,#F4FFF7,#D9FBE5);pointer-events:none}
.ocard.bad{animation:shake .4s}
.ocard .num{position:absolute;top:-9px;left:-9px;width:31px;height:31px;border-radius:50%;background:linear-gradient(180deg,#9B64E8,#7335CD);border:3px solid #fff;color:#fff;font-family:'Baloo 2',cursive;font-weight:800;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 9px rgba(68,35,131,.3);z-index:2}

/* sort bins (dashed purple photobox style) */
.bins{display:flex;gap:14px;width:100%;max-width:680px;justify-content:center}
.bin{
  flex:1;max-width:290px;padding:12px;text-align:center;min-height:158px;transition:.12s;
  border:4px dashed #B78AEF;border-bottom:8px solid #8B5ACD;border-radius:22px;
  background:linear-gradient(145deg,#FFF8FE,#F1E4FF);
  box-shadow:0 12px 24px rgba(84,51,134,.14),inset 0 2px 5px #fff}
.bin.sel{border-color:#1AA8D2;background:linear-gradient(145deg,#F0FCFF,#D8F3FB)}
.bin h4{font-family:'Baloo 2',cursive;font-weight:800;font-size:18px;color:#7432D5;margin-bottom:6px}
.bin img{height:62px;object-fit:contain;margin-bottom:4px;border-radius:14px}
.bin .got{display:flex;flex-wrap:wrap;gap:6px;justify-content:center}
.bin .got span{background:#DCFCE7;border:2px solid #fff;border-bottom:4px solid #21A55B;color:#166534;border-radius:14px;font-family:'Baloo 2',cursive;font-weight:800;font-size:13.5px;padding:3px 12px;box-shadow:0 4px 8px rgba(33,165,91,.16)}

/* story / poem panels */
.panelimg{max-width:min(560px,94%);max-height:38vh;border-radius:24px;border:4px solid #fff;box-shadow:0 14px 25px rgba(57,74,125,.16);object-fit:contain;background:#fff}
.ptext{
  border:3px solid #fff;border-bottom:8px solid #C7D4EA;border-radius:24px;padding:14px 18px;max-width:700px;
  background:linear-gradient(145deg,#fff,#F5F8FF);box-shadow:0 13px 24px rgba(54,72,125,.13),inset 0 2px 4px #fff;
  font-family:'Fredoka',sans-serif;font-weight:500;font-size:clamp(15.5px,3.6vw,19px);line-height:1.68;color:#3A4C78;text-align:left}
.spkline{
  border:3px solid #fff;border-bottom:6px solid #C8D5EA;border-radius:18px;padding:7px 18px;margin-top:10px;
  background:linear-gradient(180deg,#fff,#ECF4FF);color:var(--gk-blue);
  font-family:'Baloo 2',cursive;font-weight:700;font-size:14px;box-shadow:0 8px 16px rgba(51,74,129,.16)}
.spkline:active{transform:translateY(2px);border-bottom-width:3px}
.poemline{
  width:100%;max-width:680px;padding:11px 16px;text-align:left;cursor:pointer;
  border:3px solid #fff;border-bottom:7px solid #C7D4EA;border-left:9px solid #8B5ACD;border-radius:20px;
  background:linear-gradient(145deg,#fff,#F5F8FF);box-shadow:0 10px 18px rgba(54,72,125,.11),inset 0 2px 4px #fff;
  font-family:'Fredoka',sans-serif;font-weight:600;font-size:clamp(15px,3.5vw,18.5px);line-height:1.62;color:#3A4C78;transition:.12s}
.poemline:hover{transform:translateY(-2px)}
.poemline.playing{border-bottom-color:#6E3DC0;background:linear-gradient(145deg,#FCF8FF,#F0E5FF)}
.poet{font-family:'Baloo 2',cursive;color:#E11D62;font-weight:700;font-size:15px;align-self:flex-end;max-width:680px}
.meanwrap{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;max-width:700px}
.mean{
  border:3px solid #fff;border-bottom:5px solid #21A55B;border-radius:16px;padding:7px 14px;cursor:pointer;
  background:linear-gradient(145deg,#F4FFF7,#DCFCE7);box-shadow:0 6px 12px rgba(33,165,91,.14);
  font-family:'Outfit',sans-serif;font-size:13.5px;font-weight:600;color:#14532D}
.mean b{color:#E11D62}

/* reference-style stat pills, round buttons, progress pill */
.statpill{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:64px;padding:5px 10px;
  background:#fff;border-radius:14px;box-shadow:0 4px 10px rgba(57,74,125,.12);border:2px solid #F0F3FA}
.statpill b{font-family:'Baloo 2',cursive;font-size:15px;color:#27324F;display:flex;align-items:center;gap:3px}
.statpill small{font-family:'Outfit',sans-serif;font-size:10.5px;font-weight:600;color:#8A93AC;margin-top:-2px}
.iconbtn.round{width:44px;height:44px;border-radius:50%!important;display:flex;align-items:center;justify-content:center}
#sndBtn.round{background:linear-gradient(180deg,#3ECBF0,#12A5D8);color:#fff;border-color:#fff}
.progpill{font-family:'Baloo 2',cursive;font-weight:800;font-size:16px;color:#7434C9;background:#fff;white-space:nowrap;
  padding:8px 22px;border-radius:999px;border:3px solid #F0E9FC;border-bottom:5px solid #C9B2EE;
  box-shadow:0 6px 14px rgba(116,52,201,.14)}
.qbig{
  font-family:'Baloo 2',cursive;
  font-weight:800;
  font-size: clamp(17px,2.2vw,22px);
  line-height:1.35;
  color:#2563EB;
  text-align:center;
  text-shadow:0 1px 2px rgba(37,99,235,.15);
  padding:4px 16px;
  max-width:860px;
  margin:0 auto
}
.qsub{font-family:'Fredoka',sans-serif;font-weight:600;font-size:clamp(12.5px,1.8vw,14.5px);color:#3A4C78;
  background:#fff;border-radius:999px;padding:6px 18px;border:2px solid #EEF2FA;border-bottom:3px solid #DDE5F2;
  box-shadow:0 4px 10px rgba(57,74,125,.08);margin-top:4px}

/* footer nav â€” white glossy */
.bottombar{
  min-height:74px;display:flex;gap:10px;justify-content:space-between;align-items:center;
  /* hint | progress | nav */
  padding:11px clamp(16px,2vw,28px) 14px;border-top:3px solid #fff;
  background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(246,249,255,.94));
  box-shadow:0 -8px 22px rgba(67,70,126,.1),inset 0 2px 4px #fff}
.bbtn{
  font-family:'Fredoka',sans-serif;font-weight:700;font-size:16px;transition:.12s;
  padding:9px clamp(16px,2.4vw,24px) 11px;border:3px solid #fff;border-bottom:6px solid #C5D2E8;border-radius:15px;
  background:linear-gradient(180deg,#fff,#EEF4FF);color:#354A76;
  box-shadow:0 7px 14px rgba(52,72,124,.16),inset 0 2px 3px #fff}
.bbtn.next{
  padding:10px clamp(18px,2.7vw,29px) 12px;border-bottom:7px solid var(--gk-blue-dark);
  background:linear-gradient(180deg,#4388FF,#2363E5);color:#fff;
  box-shadow:0 8px 16px rgba(31,83,187,.25),inset 0 2px 4px rgba(255,255,255,.28);text-shadow:0 2px 0 rgba(21,64,153,.45)}
.bbtn:hover{transform:translateY(-2px);filter:brightness(1.04)}
.bbtn:active{transform:translateY(2px);border-bottom-width:3px}
.bbtn:disabled{opacity:.45;pointer-events:none}
.navgrp{display:flex;gap:10px;align-items:center}
.bbtn.hint{
  padding:10px clamp(16px,2.4vw,26px) 12px;border-bottom:6px solid #C5D2E8;
  background:linear-gradient(180deg,#fff,#F2F6FF);color:#354A76;
  box-shadow:0 7px 14px rgba(52,72,124,.16),inset 0 2px 3px #fff}
@keyframes hintPulse{0%,100%{transform:scale(1);box-shadow:0 0 0 0 rgba(245,168,0,.7)}50%{transform:scale(1.07);box-shadow:0 0 0 14px rgba(245,168,0,0)}}
.hintglow{animation:hintPulse .7s ease-in-out 3;outline:4px solid #F5A800;outline-offset:2px;border-radius:16px;z-index:5}

.poemline.odone{background:linear-gradient(160deg,#5FE595,#17A657)!important;color:#fff!important;pointer-events:none}
.poemline .onum{display:inline-flex;width:26px;height:26px;border-radius:50%;background:#fff;color:#0C7A3D;
  align-items:center;justify-content:center;font-weight:900;margin-right:6px;border:2px solid #0C7A3D}
.poemline.shake{animation:shake .45s;background:linear-gradient(160deg,#FF8FA9,#E8355F)!important;color:#fff!important}
@keyframes shake{0%,100%{transform:translateX(0)}20%{transform:translateX(-8px)}40%{transform:translateX(8px)}60%{transform:translateX(-6px)}80%{transform:translateX(6px)}}

.blank.fill.bad{color:#E8355F!important;border-bottom-color:#E8355F!important}
.blank.fill.bad::after{content:' âœ•';font-weight:900}
.mitem.done.bad{border-bottom-color:#E8355F!important;background:linear-gradient(145deg,#FFF5F8,#FDD5DE)!important}
.ocard.done.bad{border-bottom-color:#E8355F!important;background:linear-gradient(145deg,#FFF5F8,#FDD5DE)!important}
.ocard.done.bad .num{background:#E8355F!important;border-color:#B01B41!important}
.poemline.odone.obad{background:linear-gradient(160deg,#FF8FA9,#E8355F)!important}
.poemline.odone.obad .onum{color:#B01B41;border-color:#B01B41}
.bin .got .sbad{background:#FDD5DE!important;color:#B01B41!important;border-color:#E8355F!important}

.builtline{min-height:46px;width:100%;max-width:660px;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px;
  font-family:'Baloo 2',cursive;font-weight:800;font-size:clamp(16px,3.4vw,21px);color:#0C7A3D;text-align:center;
  background:linear-gradient(145deg,#F4FFF7,#DCFCE7);border:3px solid #fff;border-bottom:6px solid #21A55B;border-radius:18px;padding:9px 16px;
  box-shadow:0 8px 16px rgba(33,165,91,.14)}
.bbtn,.opt,.chip,.mitem,.pick,.ocard,.poemline,.iconbtn{touch-action:manipulation}

/* toast */
#toast{
  position:fixed;left:50%;bottom:92px;transform:translateX(-50%) translateY(20px);z-index:60;opacity:0;pointer-events:none;transition:.25s;
  border:3px solid #fff;border-bottom:6px solid #C7D2E8;border-radius:18px;padding:10px 24px;
  background:linear-gradient(180deg,#fff,#F0F5FF);color:#3A4C78;
  font-family:'Baloo 2',cursive;font-weight:700;font-size:16px;box-shadow:0 12px 25px rgba(52,69,119,.2)}
#toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
#toast.good{background:linear-gradient(180deg,#E9FFF2,#C9F7DC);border-bottom-color:#21A55B;color:#14532D}
#toast.bad{background:linear-gradient(180deg,#FFF0F4,#FFDBE6);border-bottom-color:#E63D68;color:#9F1239}

/* end overlay â€” sky/pink glass */
#endOv{
  position:fixed;inset:0;display:none;align-items:center;justify-content:center;z-index:70;padding:18px;
  background:linear-gradient(125deg,rgba(130,217,246,.94),rgba(249,207,232,.94));backdrop-filter:blur(8px)}
#endOv.on{display:flex}
.endcard{
  text-align:center;max-width:430px;width:100%;padding:clamp(22px,4vw,34px);
  border:4px solid #fff;border-bottom:11px solid #C7D2E8;border-radius:30px;
  background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(246,249,255,.96));
  box-shadow:0 24px 50px rgba(61,61,117,.22),inset 0 3px 6px #fff}
.endcard .stars{font-size:46px;letter-spacing:6px;filter:drop-shadow(0 4px 6px rgba(180,130,20,.35))}
.endcard h2{font-family:'Baloo 2',cursive;font-weight:800;font-size:27px;color:var(--gk-blue);text-shadow:0 3px 0 #CEDCF5;margin:6px 0 2px}
.endcard p{font-family:'Fredoka',sans-serif;font-weight:600;color:#6B7895;margin-bottom:16px}
.endcard .row{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}

/* language + settings overlays */
#langMenu,#setScreen{
  position:fixed;inset:0;display:none;align-items:center;justify-content:center;z-index:80;padding:16px;
  background:linear-gradient(125deg,rgba(130,217,246,.9),rgba(249,207,232,.9));backdrop-filter:blur(6px)}
#langMenu.on,#setScreen.on{display:flex}
.langcard{
  max-width:740px;width:100%;max-height:86vh;display:flex;flex-direction:column;overflow:hidden;
  border:4px solid #fff;border-bottom:11px solid #C7D2E8;border-radius:30px;
  background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(246,249,255,.96));
  box-shadow:0 24px 50px rgba(61,61,117,.22),inset 0 3px 6px #fff}
.langhead{padding:15px 18px 11px;display:flex;align-items:center;gap:10px;border-bottom:3px solid #EDF2FC}
.langhead h3{font-family:'Baloo 2',cursive;font-weight:800;font-size:20px;color:var(--gk-blue);text-shadow:0 2px 0 #DCE7F8;flex:1}
.langhead button{
  width:38px;height:38px;border-radius:50%;font-size:16px;font-weight:800;color:#4168B7;
  border:3px solid #fff;border-bottom:5px solid #C7D4EA;background:linear-gradient(180deg,#fff,#EEF4FF);
  box-shadow:0 5px 10px rgba(55,75,127,.16)}
#langSearch{
  margin:12px 16px 6px;padding:11px 16px;outline:none;
  border:3px solid #D6E1F2;border-bottom-width:5px;border-radius:16px;background:#fff;color:var(--ink);
  font-family:'Fredoka',sans-serif;font-weight:600;font-size:15px}
#langSearch:focus{border-color:#8B5ACD}
#langList{overflow:auto;padding:12px 16px 18px;display:grid;grid-template-columns:repeat(auto-fill,minmax(155px,1fr));gap:9px}
.lang-item{
  display:flex;flex-direction:column;gap:1px;text-align:left;padding:8px 12px;min-height:48px;justify-content:center;transition:.1s;
  border:3px solid #fff;border-bottom:5px solid #C7D2E8;border-radius:14px;
  background:linear-gradient(180deg,#fff,#F0F5FF);box-shadow:0 5px 10px rgba(52,71,122,.1)}
.lang-item:hover{transform:translateY(-2px)}
.lang-item .ln-native{font-family:'Fredoka',sans-serif;font-weight:700;font-size:15px;color:var(--ink);line-height:1.15}
.lang-item .ln-eng{font-family:'Outfit',sans-serif;font-size:11.5px;color:#90A4BE;font-weight:500;line-height:1.1}
.lang-item.sel{border-bottom-color:#4C1D95;background:linear-gradient(180deg,#9254E8,#6C2CCB)}
.lang-item.sel .ln-native{color:#fff}.lang-item.sel .ln-eng{color:rgba(255,255,255,.85)}
.transnote{margin:0 16px 10px;font-family:'Outfit',sans-serif;font-size:12.5px;color:#7432D5;font-weight:600;text-align:center}
/* voice settings */
.setbody{padding:16px 20px 22px;display:flex;flex-direction:column;gap:12px}
.setbody label{font-family:'Fredoka',sans-serif;font-weight:700;color:#3A4C78;font-size:15px}
#voiceSel{
  padding:11px 14px;font-family:'Outfit',sans-serif;font-weight:600;font-size:14px;width:100%;
  border:3px solid #D6E1F2;border-bottom-width:5px;border-radius:14px;background:#fff;color:var(--ink)}
#voiceHint{font-family:'Outfit',sans-serif;font-size:13px;color:#64748B;font-weight:500}
#testVoice{align-self:flex-start}

/* confetti canvas */
#confetti{position:fixed;inset:0;pointer-events:none;z-index:75}
@media(max-width:560px){
  .bottombar{gap:6px;padding:9px 10px 12px;min-height:62px}
  .bbtn{font-size:13px;padding:8px 12px 9px;border-radius:12px;border-bottom-width:5px}
  .bbtn.next{padding:8px 14px 10px;border-bottom-width:5px}
  .bbtn.hint{padding:8px 12px 9px}
  .navgrp{gap:6px}
  .progpill{font-size:12.5px;padding:6px 12px;border-bottom-width:4px}
}
@media(max-width:720px){
  .card-shell{border-radius:22px}
  .topbar{min-height:64px;padding:8px 9px 10px;border-radius:20px 20px 0 0}
  .topbar .stat{min-width:54px;padding-inline:6px}
  .gbody{margin:10px;padding:12px;border-bottom-width:8px}
  .bottombar{min-height:62px;padding:8px 9px 10px}
  .bbtn{padding-inline:13px}
  .cover-left{flex:0 0 auto}
}
@media(max-width:460px){
  .topbar .lvl{padding-inline:10px}
  .topbar .stat{display:none}
  .mwrap{gap:8px}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}


/* ============ GK Explorer style cover ============ */
#coverScr{display:none;flex-direction:column;align-items:stretch;padding:0;position:relative}
#coverScr.on{display:flex}
.gk-clouds{position:fixed;inset:0;overflow:hidden;pointer-events:none;z-index:0}
.gkcloud{position:absolute;color:rgba(255,255,255,.8);font-size:6rem;filter:drop-shadow(0 8px 15px rgba(255,255,255,.5));animation:gkDrift 60s linear infinite;left:-220px}
.gkc1{top:10%;animation-duration:48s}
.gkc2{top:38%;font-size:8.5rem;animation-duration:72s;animation-delay:-20s}
.gkc3{top:72%;font-size:5rem;animation-duration:58s;animation-delay:-36s}
@keyframes gkDrift{0%{transform:translateX(0)}100%{transform:translateX(calc(100vw + 440px))}}
.gk-header-outer{background:linear-gradient(180deg, #5C77FA, #4359EC);border-bottom:5px solid #ffffff;padding:12px clamp(16px, 6vw, 48px);position:relative;z-index:5;box-shadow:0 8px 20px rgba(71, 92, 227, 0.15),inset 0 2px 3px rgba(255, 255, 255, 0.25)}
.gk-header{max-width:1180px;margin:0 auto;background:transparent;border:none;border-radius:0;padding:0;display:flex;align-items:center;justify-content:space-between;gap:12px;box-shadow:none}
.gk-hl,.gk-hr{display:flex;align-items:center;gap:11px}
.gk-title{font-family:'Fredoka',sans-serif;font-weight:700;font-size:clamp(17px,3.4vw,23px);color:#fff;text-shadow:0 2px 0 rgba(60,15,120,.4)}
.gk-circle{width:46px;height:46px;border-radius:50%;border:2.5px solid rgba(255,255,255,0.9);border-bottom:5px solid rgba(0,0,0,0.25);cursor:pointer;font-size:20px;display:flex;align-items:center;justify-content:center;color:#fff;transition:transform 0.12s, border-bottom-width 0.12s;box-shadow:0 6px 14px rgba(0,0,0,0.15),inset 0 2px 3px rgba(255,255,255,.3)}
.gk-circle:hover{transform:translateY(-3px) scale(1.05)}
.gk-circle:active{transform:translateY(1.5px);border-bottom-width:2.5px}
.gk-blue{background:linear-gradient(180deg,#4DA3FF,#1D6FE0)}
.gk-purple{background:linear-gradient(180deg,#C069F5,#8E2DE2)}
.gk-cyan{background:linear-gradient(180deg,#3ECBF0,#12A5D8)}
.gk-badge{background:linear-gradient(180deg,#ff659e,#df1f68);color:#fff;font-family:'Fredoka',sans-serif;font-weight:700;font-size:12.5px;letter-spacing:1px;padding:7px 16px 8px;border-radius:18px;border:2.5px solid rgba(255,255,255,.9);border-bottom:5px solid #a5114e;box-shadow:0 6px 14px rgba(85,22,92,.22);text-shadow:0 2px 0 rgba(126,15,59,.5)}
.gk-cover{flex:1;min-height:calc(100dvh - 79px);display:flex;align-items:center;justify-content:center;padding:clamp(18px,4vw,46px) 18px;position:relative;z-index:1}
.gk-txtcol{display:flex;flex-direction:column;align-items:center;gap:14px;max-width:760px;text-align:center;margin-bottom:clamp(10px,6vh,60px)}
.gk-ukg{padding:8px 24px 11px;border:2.5px solid rgba(255,255,255,.95);border-bottom:6px solid #a5114e;border-radius:24px;background:linear-gradient(180deg,#ff659e,#df1f68);box-shadow:0 8px 18px rgba(85,22,92,.35),inset 0 2px 3px rgba(255,255,255,.3);color:#fff;font-family:'Fredoka',sans-serif;font-weight:700;font-size:14px;letter-spacing:1px;text-transform:uppercase;text-shadow:0 2px 0 rgba(126,15,59,0.5);animation:letterFloat 3.5s ease-in-out infinite alternate}

.gk-ctitle {
  display: inline-block;
  padding: 10px 48px 14px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 800;
  font-size: clamp(22px, 5vw, 36px);
  color: #ffffff;
  background: linear-gradient(180deg, #a855e7 0%, #7a31c8 48%, #5d209d 100%);
  border: 3.5px solid #c865ff;
  border-bottom: 9px solid #3f147b;
  border-radius: 999px; /* Capsule shape matching 2nd image */
  box-shadow: 0 12px 24px rgba(53, 18, 107, 0.28), inset 0 2px 4px rgba(255, 255, 255, 0.27);
  text-shadow: 0 3px 0 rgba(43, 12, 83, 0.4);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.15));
}
.gk-desc {
  max-width: 580px;
  padding: 12px 32px 14px;
  margin: 2px 0 8px;
  border: 3px solid #75c5ff;
  border-bottom: 7px solid #1165b3;
  border-radius: 40px; /* Highly-rounded capsule for multi-line description */
  background: linear-gradient(180deg, #259dff, #0877dd);
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(13px, 2vw, 16px);
  line-height: 1.35;
  text-shadow: 0 2.5px 0 rgba(0, 66, 145, 0.5);
  box-shadow: 0 10px 20px rgba(12, 75, 154, 0.22), inset 0 2px 3px rgba(255, 255, 255, 0.25);
}
.gk-btn {
  margin-top: 10px;
  padding: 14px 44px 18px;
  border: 3.5px solid #fff3a5;
  border-bottom: 9px solid #bd3f0e;
  border-radius: 999px; /* Capsule shaped play button matching 2nd image */
  background: linear-gradient(180deg, #ffbf30, #ff6b19);
  color: #fff;
  cursor: pointer;
  font-family: 'Fredoka', sans-serif;
  font-weight: 800;
  font-size: clamp(18px, 4.5vw, 26px);
  box-shadow: 0 14px 28px rgba(122, 40, 13, 0.35), inset 0 3px 5px rgba(255, 255, 255, 0.4);
  text-shadow: 0 3px 0 rgba(144, 48, 9, 0.45);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  animation: gkPulse 1.6s ease-in-out infinite alternate;
  transition: transform 0.15s, border-bottom-width 0.15s;
}
.gk-btn:hover{transform:translateY(-3px) scale(1.03);filter:brightness(1.06)}
.gk-btn:active{transform:translateY(3px);border-bottom-width:4px}
@keyframes gkPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.045)}}

/* ============ RESPONSIVE POLISH â€” mobile / tablet / desktop (v20260724l) ============ */
/* global wrap + overflow safety */
.gname,.qpill,.line,.mitem,.opt .otext,.pick .pt{overflow-wrap:break-word;word-break:break-word}
#gbody img{max-width:100%}

/* -- BIG DESKTOP: roomier card + hub -- */
@media(min-width:1200px){
  .card-shell{max-width:1060px}
  .hub{max-width:1060px}
  .gbody{gap:16px}
}

/* -- MOBILE / TABLET game topbar: clean single row top controls, game name ALWAYS visible below -- */
@media(max-width:768px){
  #gameScr{padding:6px 6px 10px}
  .card-shell{min-height:calc(100dvh - 16px);border-radius:22px}
  .topbar{
    min-height:54px;
    padding:8px 8px 10px;
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:space-between;
    gap:5px;
    row-gap:6px;
    border-radius:18px 18px 0 0;
  }
  .topbar .iconbtn{
    width:38px;
    height:38px;
    font-size:16px;
    flex:0 0 38px;
    border-bottom-width:4px;
  }
  .topbar .lvl{
    order:0;
    flex:0 1 auto;
    max-width:34vw;
    font-size:11.5px;
    padding:5px 8px 6px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    border-radius:16px;
    border-bottom-width:4px;
  }
  .topbar .statpill{
    order:0;
    min-width:46px;
    min-height:36px;
    padding:3px 6px;
    border-radius:12px;
    border-bottom-width:3px;
    flex:0 0 auto;
  }
  .topbar .statpill b{font-size:13px}
  .topbar .statpill small{display:none}
  .topbar .header-btn{
    width:38px;
    height:38px;
    font-size:16px;
    flex:0 0 38px;
    border-bottom-width:4px;
  }
  .topbar .settings-wrapper-outer{
    flex:0 0 38px;
    position:relative;
  }
  .topbar .settings-wrapper-outer .header-btn{
    width:38px;
    height:38px;
    font-size:16px;
    flex:0 0 38px;
  }
  .topbar .gname{
    order:5;
    flex:1 1 100%;
    text-align:center;
    font-size:15px;
    font-weight:800;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    margin-top:2px;
  }
  .topbar .dots{
    order:6;
    flex:1 1 100%;
    justify-content:center;
    min-width:0;
    padding:0;
    gap:3px;
  }
  .dots .dot{width:8px;height:14px;border-radius:6px}

  /* Game Body & Elements on Mobile */
  .gbody{margin:8px;padding:12px 10px;border-bottom-width:8px;border-radius:20px;gap:10px}
  .lines{gap:8px;width:100%}
  .line{
    font-size:clamp(13px,3.2vw,15.5px);
    line-height:1.55;
    padding:9px 12px;
    border-radius:14px;
    border-bottom-width:5px;
  }
  .line .blank{
    min-width:56px;
    font-size:clamp(13px,3.2vw,15.5px);
    padding:0 4px;
  }
  .bank{gap:8px;max-width:100%}
  .chip{
    font-size:clamp(13px,3vw,15px);
    padding:7px 14px;
    border-radius:13px;
    border-bottom-width:5px;
  }
  .bottombar{
    min-height:58px;
    padding:8px 10px 10px;
    gap:6px;
  }
  .bbtn{font-size:13px;padding:7px 12px 8px;border-radius:12px;min-height:40px;border-bottom-width:4px}
  .bbtn.next{padding:7px 14px 8px;min-height:40px}
  .bbtn.hint{padding:7px 10px 8px}
  .progpill{font-size:12px;padding:5px 10px;border-bottom-width:3px}
  .qbig{font-size:clamp(15.5px,4vw,19px);padding:2px 8px}
  .qpill{font-size:14.5px;padding:7px 14px 8px}
}

/* -- SMALL PHONES (max-width: 460px) -- */
@media(max-width:460px){
  #gameScr{padding:4px}
  .topbar{padding:6px 6px 8px;gap:4px;row-gap:4px}
  .topbar .iconbtn{width:36px;height:36px;font-size:15px;flex:0 0 36px}
  .topbar .lvl{font-size:11px;padding:5px 7px 6px;max-width:30vw}
  .topbar .statpill{min-width:42px;min-height:34px;padding:2px 4px}
  .topbar .statpill b{font-size:12px}
  .topbar .header-btn{width:36px;height:36px;font-size:15px;flex:0 0 36px}
  .topbar .settings-wrapper-outer{flex:0 0 36px}
  .topbar .settings-wrapper-outer .header-btn{width:36px;height:36px;font-size:15px}
  .topbar .gname{font-size:13.5px}
  .panelimg{max-height:30dvh}
  .mitem{height:clamp(70px,11vh,90px);border-bottom-width:6px;border-radius:16px;font-size:13px;padding:6px}
  .opt.txt{min-height:100px;padding:10px 6px 44px}
  .opt .otext{font-size:clamp(12px,3.2vw,14px)}
  .pick img{height:72px}
  .ocard img{height:84px}
  .endcard{border-radius:22px}
  .endcard .stars{font-size:34px}
  .endcard h2{font-size:21px}
  .hub{padding:12px 10px 28px}
  .pcard{padding:11px 12px;border-bottom-width:6px;border-radius:18px}
}

/* -- VERY NARROW PHONES (iPhone SE, max-width: 380px) -- */
@media(max-width:380px){
  #gameScr{padding:2px}
  .topbar{padding:5px 4px 6px;gap:3px;row-gap:3px}
  .topbar .iconbtn{width:32px;height:32px;font-size:14px;flex:0 0 32px}
  .topbar .lvl{max-width:26vw;font-size:9.5px;padding:3px 5px 4px}
  .topbar .statpill{min-width:36px;min-height:30px;padding:2px 3px}
  .topbar .statpill b{font-size:11px}
  .topbar .header-btn{width:32px;height:32px;font-size:14px;flex:0 0 32px}
  .topbar .settings-wrapper-outer{flex:0 0 32px}
  .topbar .settings-wrapper-outer .header-btn{width:32px;height:32px;font-size:14px}
  .topbar .gname{font-size:13px}
  .gbody{margin:4px;padding:8px 6px}
  .line{font-size:12px;padding:7px 8px}
  .line .blank{min-width:44px;font-size:12px}
  .chip{font-size:12px;padding:5px 10px}
  .bottombar{padding:6px 6px 8px;gap:3px;min-height:52px}
  .bbtn{font-size:11.5px;padding:5px 8px 6px}
  .bbtn.next{padding:5px 10px 6px}
  .progpill{font-size:11px;padding:3px 6px}
  .ogrid{grid-template-columns:repeat(2,1fr)}
  .pgrid{gap:8px}
}

/* -- LANDSCAPE PHONES / SHORT SCREENS: compress vertical chrome -- */
@media(max-height:520px) and (orientation:landscape){
  .gk-cover{min-height:calc(100dvh - 56px);padding:10px 14px}
  .gk-txtcol{gap:8px;margin-bottom:8px}
  .gk-ctitle{padding:8px 26px 12px;border-bottom-width:7px;font-size:clamp(20px,4.5vw,34px)}
  .gk-desc{padding:6px 14px 8px;font-size:12.5px}
  .gk-btn{padding:9px 26px 12px;border-bottom-width:6px;font-size:16px}
  .topbar{min-height:48px;padding:4px 8px 6px;row-gap:3px}
  .topbar .iconbtn{width:34px;height:34px;font-size:14px}
  .statpill{display:none}
  .gbody{margin:6px 8px;padding:8px 10px;border-bottom-width:6px}
  .bottombar{min-height:48px;padding:4px 8px 6px}
  .panelimg{max-height:50dvh}
  .langcard{max-height:90dvh}
}
