/* XplainMaths visual QA pass — layout consistency / decorative cleanup.
   Loaded last deliberately: consolidates earlier conflicting world-card rules. */
:root { --worlds-edge:#e1e9f4; }

/* Remove floating sparkle glyphs that appeared detached from the interface.
   The neon gradient and actual X logo remain the consistent brand motifs. */
.sparkle, .story-aura .aura-spark, .join-star, .world-scene .scene-particle,
.game-scenery .game-art { display:none!important; }
.game-logo-mark { display:none!important; }
.hero-proof .tiny-orb {font-size:0!important;}
.hero-proof .tiny-orb::before {content:'';display:inline-block;vertical-align:middle;width:7px;height:7px;border-radius:50%;background:#5975ec;margin-right:5px;}
/* A subtle inline accent rather than a giant free-floating star. */
.learning-bridge .bridge-icon {font-size:0!important; width:5px; height:62px; flex:0 0 5px; border-radius:20px; background:linear-gradient(180deg,#15c9ec,#7652e9,#e44bb7); filter:none;}

/* Theme gallery: consistent content regions, larger legible copy, no cropped labels.
   Desktop is a compact 5×2 collection; smaller widths are swipeable. */
.worlds-section {overflow:hidden;}
.worlds-section .worlds-header {gap:clamp(24px,4vw,60px)!important; margin-bottom:18px!important;align-items:center;}
.worlds-section .worlds-header h2 {font-size:clamp(34px,4.35vw,60px);line-height:1.08;margin-bottom:0;}
.worlds-intro p {margin-bottom:11px;line-height:1.6;}
.worlds-controls {display:flex;align-items:center;justify-content:space-between;gap:16px;margin-block:12px 13px;}
.worlds-controls .worlds-swipe-hint {display:block!important;margin:0!important;color:#687692!important;font-weight:600;font-size:12px;line-height:1.5;letter-spacing:0;}
.worlds-nav {display:none;align-items:center;gap:9px;white-space:nowrap;flex-shrink:0;}
.worlds-nav button {display:grid;place-items:center;width:37px;height:37px;border:1px solid #d9e1f2;border-radius:50%;background:white;color:#3d467a;font-size:19px;box-shadow:0 4px 13px #253a6820;transition:background .2s,transform .2s;}
.worlds-nav button:not(:disabled):hover {transform:translateY(-2px);background:#f0efff;}
.worlds-nav button:disabled {opacity:.34;cursor:default;box-shadow:none;}
.worlds-nav span {font-size:11px;color:#566780;font-weight:800;min-width:41px;text-align:center;font-variant-numeric:tabular-nums;}
#world-grid.worlds-grid {display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:14px!important;overflow:visible!important;scroll-snap-type:none!important;padding:3px 2px 15px!important;scrollbar-width:auto!important;}
#world-grid .world-card {display:flex;flex-direction:column;flex:initial!important;width:100%;min-width:0;min-height:296px!important;height:296px!important;margin:0;overflow:hidden;border-radius:18px;border:2px solid white!important;box-shadow:0 8px 25px #243d6a1b;transform:none;transition:transform .22s ease,box-shadow .22s ease;}
#world-grid .world-card:hover {transform:translateY(-4px)!important;box-shadow:0 17px 33px #243d6a27;}
#world-grid .world-scene {height:116px!important;flex:0 0 116px;overflow:hidden;}
#world-grid .world-scene .scene-emoji {font-size:55px!important;top:50%;transform:translate(-50%,-50%);}
#world-grid .world-content {display:flex!important;flex-direction:column;flex:1 1 auto;padding:12px 12px 13px!important;min-width:0;overflow:visible!important;}
#world-grid .world-topline {font-size:9px;gap:5px;min-height:19px;letter-spacing:.04em;}
#world-grid .equal-tag {font-size:8px;padding:3px 5px;letter-spacing:0;white-space:nowrap;flex-shrink:0;}
#world-grid .world-body {margin:7px 0 0!important;min-height:0;flex:1 1 auto;}
#world-grid .world-kicker {font-size:11px;line-height:1.2;}
#world-grid .world-body h3 {font-size:clamp(16px,1.5vw,20px)!important;line-height:1.12;margin:4px 0 5px!important;overflow-wrap:break-word;letter-spacing:-.035em;}
#world-grid .world-body p {font-size:11px!important;line-height:1.36!important;margin:0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;}
#world-grid .world-bottom {display:flex;gap:7px;align-items:center;min-height:29px;font-size:10px!important;line-height:1.2!important;margin-top:7px!important;letter-spacing:0;}
#world-grid .world-bottom>span:first-child {flex:1;min-width:0;overflow-wrap:break-word;}
#world-grid .world-mini-icon {font-size:18px!important;flex:none;}
.worlds-footer {margin-top:8px!important;line-height:1.55;}

/* Consistent spacing around content and cards across the light marketing pages. */
.hero .hero-preview {max-width:100%;}
.join-panel .join-content {position:relative;z-index:2;}
.join-panel {isolation:isolate;}
.story-headlines,.story-device,.dashboard-preview,.join-panel {min-width:0;}
.game-arena .game-scenery {pointer-events:none;}
.game-progress-zone .challenge-dots {min-width:0;}
.game-learning-panel,.game-wheel-panel {min-width:0;}

@media(max-width:1100px) {
 #world-grid.worlds-grid {display:flex!important;flex-wrap:nowrap!important;gap:14px!important;overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x mandatory!important;scroll-padding-inline:2px!important;overscroll-behavior-x:contain;padding:4px 2px 17px!important;scrollbar-width:thin!important;}
 #world-grid .world-card {flex:0 0 clamp(225px,31vw,295px)!important;width:clamp(225px,31vw,295px)!important;scroll-snap-align:center;}
 .worlds-nav {display:flex;}
}
@media(max-width:760px) {
 .worlds-section .worlds-header {gap:14px!important;}
 .worlds-controls {gap:8px;margin-block:10px 14px;align-items:center;}
 .worlds-controls .worlds-swipe-hint {font-size:11px;max-width:190px;}
 .worlds-nav {gap:6px;}
 .worlds-nav button {width:33px;height:33px;font-size:16px;}
 #world-grid.worlds-grid {gap:12px!important;}
 #world-grid .world-card {flex:0 0 min(80vw,340px)!important;width:min(80vw,340px)!important;height:300px!important;min-height:300px!important;}
 #world-grid .world-scene {height:126px!important;flex-basis:126px;}
 #world-grid .world-content {padding:13px 14px!important;}
 #world-grid .world-body h3 {font-size:19px!important;}
 #world-grid .world-body p {font-size:12px!important;}
 .game-shell {box-sizing:border-box;}
 .game-learning-panel,.game-wheel-panel {align-self:center;min-height:0!important;height:auto!important;max-height:calc(100svh - 200px);overflow-y:auto;justify-content:center!important;}
 .game-learning-panel {padding:17px!important;}
 .game-wheel-panel {padding:17px!important;}
 .game-layout {align-items:center;}
 .game-footnote {line-height:1.4;}
}
@media(max-width:380px) {
 .worlds-controls {flex-wrap:wrap;justify-content:space-between;}
 .worlds-controls .worlds-swipe-hint {max-width:175px;}
 #world-grid .world-card {flex-basis:calc(100vw - 54px)!important;width:calc(100vw - 54px)!important;height:300px!important;min-height:300px!important;}
 .game-learning-panel,.game-wheel-panel {max-height:calc(100svh - 190px);}
}
@media(prefers-reduced-motion:reduce) {
 #world-grid .world-card, .worlds-nav button {transition:none!important;}
 #world-grid.worlds-grid {scroll-behavior:auto!important;}
}
