/* V6.3: child-accessible Day and Night maths worlds. */
html[data-background-world="simple"] body{background:linear-gradient(180deg,#eefaff 0,#faf7ff 310px,#f7f3ff 100%)}
html[data-background-world]:not([data-background-world="simple"]) body{
  background-image:linear-gradient(rgba(255,255,255,.16),rgba(255,255,255,.16)),var(--app-background-landscape);
  background-attachment:fixed;background-position:center;background-repeat:no-repeat;background-size:cover
}
html[data-background-world]:not([data-background-world="simple"]) .sky{display:none}
html[data-background-world]:not([data-background-world="simple"]) .card,
html[data-background-world]:not([data-background-world="simple"]) .week-card,
html[data-background-world]:not([data-background-world="simple"]) .course-card,
html[data-background-world]:not([data-background-world="simple"]) .today-card,
html[data-background-world]:not([data-background-world="simple"]) .home-action-button,
html[data-background-world]:not([data-background-world="simple"]) .home-progress,
html[data-background-world]:not([data-background-world="simple"]) .course-tabs,
html[data-background-world]:not([data-background-world="simple"]) .term-chooser{background-color:rgba(255,255,255,.96)}
@media(orientation:portrait){
  html[data-background-world]:not([data-background-world="simple"]) body{
    background-image:linear-gradient(rgba(255,255,255,.16),rgba(255,255,255,.16)),var(--app-background-portrait)
  }
}

.home-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
.world-home-thumb{overflow:hidden;background:#eaf6fb}
.world-home-thumb img{width:100%;height:100%;object-fit:cover;filter:none}
.world-home-thumb.simple i{display:block;width:100%;height:100%;background:linear-gradient(180deg,#eefaff,#f7f3ff)}

.worlds-heading{max-width:1060px;margin:2px auto 18px;display:flex;align-items:center;justify-content:space-between;gap:20px}
.worlds-heading h1{margin:2px 0 8px;font-size:clamp(32px,5vw,48px);line-height:1.08}
.worlds-heading p:not(.eyebrow){margin:0;color:var(--muted)}
.worlds-heading>span{font-size:58px;filter:drop-shadow(0 8px 10px rgba(65,44,125,.13))}
.world-specials,.world-grid,.world-lock-note{max-width:1060px;margin-left:auto;margin-right:auto}
.world-specials{margin-bottom:14px}
.world-specials.simple-row{margin-top:14px;margin-bottom:0}
.world-special-button{width:100%;min-height:108px;border:2px solid #ddd3ef;border-radius:20px;padding:10px;background:rgba(255,255,255,.97);display:grid;grid-template-columns:150px minmax(0,1fr) 42px;align-items:center;gap:16px;text-align:left;cursor:pointer;box-shadow:0 9px 24px rgba(54,39,91,.07)}
.world-special-button:hover,.world-mode-button:hover{border-color:#9d83e9}
.world-special-button.selected,.world-mode-button.selected{border-color:#7047dc;background:#f4efff;box-shadow:0 0 0 4px rgba(112,71,220,.11)}
.world-special-button>span:nth-child(2){min-width:0}
.world-special-button strong,.world-special-button small{display:block}
.world-special-button strong{font-size:20px}
.world-special-button small{margin-top:4px;color:var(--muted);line-height:1.35}
.world-special-button>i{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#eee8ff;color:#5d35c4;font-size:20px;font-style:normal;font-weight:900}
.auto-world-preview{height:86px;border-radius:13px;overflow:hidden;display:grid;grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(2,1fr);gap:2px;background:#fff}
.auto-world-preview img{display:block;width:100%;height:100%;object-fit:cover}
.simple-world-preview{height:86px;border-radius:13px;background:linear-gradient(180deg,#eefaff,#f7f3ff);border:1px solid #e0d9ee}
.world-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.world-card{padding:15px;border:1px solid rgba(112,71,220,.17);border-radius:8px;background:rgba(255,255,255,.97);box-shadow:0 10px 27px rgba(54,39,91,.07)}
.world-card-copy{padding:1px 2px 11px}
.world-card-copy h2{margin:0;font-size:20px}
.world-card-copy p{margin:4px 0 0;color:var(--muted);font-size:12px}
.world-mode-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.world-mode-button{min-width:0;min-height:146px;padding:0;border:2px solid #e2d9f1;border-radius:16px;overflow:hidden;background:#fff;display:grid;grid-template-rows:99px auto;cursor:pointer;text-align:left}
.world-mode-button>img{width:100%;height:99px;display:block;object-fit:cover}
.world-mode-button>span{min-width:0;min-height:45px;padding:7px 9px;display:grid;grid-template-columns:minmax(0,1fr) 26px;align-items:center;column-gap:5px;background:#fff}
.world-mode-button.selected>span{background:#7047dc;color:#fff}
.world-mode-button b,.world-mode-button small{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;grid-column:1}
.world-mode-button b{font-size:13px}
.world-mode-button small{margin-top:1px;color:var(--muted);font-size:9px}
.world-mode-button.selected small{color:#eee8ff}
.world-mode-button i{grid-column:2;grid-row:1/3;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:#fff;color:#5d35c4;font-style:normal;font-weight:900}
.world-lock-note{margin-top:13px;margin-bottom:0;padding:11px 15px;border-radius:14px;background:rgba(255,248,217,.96);border:1px solid #edcf71;color:#66500d;font-size:13px;font-weight:750;text-align:center}
.world-special-button:focus-visible,.world-mode-button:focus-visible{outline:4px solid rgba(112,71,220,.22);outline-offset:2px}

@media(max-width:850px){
  .home-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  .world-grid{grid-template-columns:1fr}
}
@media(max-width:560px){
  .home-actions{grid-template-columns:1fr}
  .worlds-heading{align-items:flex-start}.worlds-heading>span{font-size:42px}.worlds-heading h1{font-size:31px}
  .world-special-button{min-height:92px;grid-template-columns:105px minmax(0,1fr) 36px;gap:10px;padding:8px}
  .auto-world-preview,.simple-world-preview{height:72px}
  .world-special-button strong{font-size:17px}.world-special-button small{font-size:10px}
  .world-card{padding:11px}.world-card-copy h2{font-size:18px}
  .world-mode-button{min-height:126px;grid-template-rows:83px auto}.world-mode-button>img{height:83px}
}
@media(max-width:370px){
  .world-mode-grid{grid-template-columns:1fr}.world-mode-button{grid-template-rows:110px auto}.world-mode-button>img{height:110px}
  .world-special-button{grid-template-columns:82px minmax(0,1fr) 32px}.world-special-button>i{width:30px;height:30px}
}
