/* Phone portrait and iPad landscape share semantics, but keep separate geometry. */
html body #game-category-dialog[data-step=modes] #game-category-title{display:none!important;}
@media (max-width:699px) and (orientation:portrait){
 :root{--sw-adapt-header:76px;--sw-adapt-top:16px;--sw-adapt-side:12px;--sw-adapt-hit:44px;--sw-adapt-plate:30.8px;--sw-adapt-inset:6.6px;--sw-adapt-glyph:22px;--sw-adapt-title:24px;--sw-adapt-title-top:23px;--sw-adapt-logo-width:222px;--sw-adapt-logo-height:74px;--sw-adapt-logo-top:1px;}
}
@media (min-width:700px) and (orientation:landscape){
 :root{--sw-adapt-header:104px;--sw-adapt-top:24px;--sw-adapt-side:32px;--sw-adapt-hit:56px;--sw-adapt-plate:39.2px;--sw-adapt-inset:8.4px;--sw-adapt-glyph:30px;--sw-adapt-title:36px;--sw-adapt-title-top:29.5px;--sw-adapt-logo-width:288px;--sw-adapt-logo-height:96px;--sw-adapt-logo-top:4px;}
}
@media (max-width:699px) and (orientation:portrait), (min-width:700px) and (orientation:landscape){
 html body :is(.worlds-header,.sw-header,.story-top,.album-top,.buddy-header,.voice-return-bar,.game-category-header){box-sizing:border-box!important;position:relative!important;width:100%!important;max-width:none!important;height:var(--sw-adapt-header)!important;min-height:var(--sw-adapt-header)!important;max-height:var(--sw-adapt-header)!important;flex-shrink:0!important;margin:0!important;padding:0!important;left:auto!important;right:auto!important;transform:none!important;}
 html body #screen-album .album-top,html body #screen-my-buddy>.buddy-header{position:absolute!important;inset:0 0 auto!important;z-index:12;}
 html body #screen-album .album-page-scroll{padding-top:var(--sw-adapt-header)!important;}
 html body #game-category-dialog .game-category-header{flex-basis:var(--sw-adapt-header)!important;}
 html body #game-category-dialog #game-category-copy{display:none!important;}
 html body #play-selection-heading{position:absolute!important;inset:var(--sw-adapt-logo-top) 0 auto!important;width:100%!important;height:var(--sw-adapt-logo-height)!important;margin:0!important;padding:0!important;text-align:center!important;}
 html body #play-selection-heading img{width:var(--sw-adapt-logo-width)!important;height:var(--sw-adapt-logo-height)!important;max-width:none!important;object-fit:contain!important;}
 html body #screen-album .album-title{position:absolute!important;left:50%!important;top:calc(var(--sw-adapt-header) / 2 - var(--sw-adapt-logo-width) * .161848)!important;width:calc(var(--sw-adapt-logo-width) * .9552699229)!important;height:calc(var(--sw-adapt-logo-height) * .9552699229)!important;margin:0!important;transform:translateX(-50%)!important;}
 html body #screen-album .album-title img{width:100%!important;height:100%!important;object-fit:contain!important;clip-path:none!important;}
 html body :is(.worlds-header,.sw-header,.story-top,.buddy-header,.voice-return-bar)>:is(h1,h2,.app-page-title),html body #game-category-dialog .game-category-header>.page-section-subtitle{position:absolute!important;left:calc(var(--sw-adapt-side) + var(--sw-adapt-hit) + 6px)!important;right:calc(var(--sw-adapt-side) + var(--sw-adapt-hit) + 6px)!important;top:var(--sw-adapt-title-top)!important;width:auto!important;height:calc(var(--sw-adapt-title) * 1.25)!important;min-height:0!important;margin:0!important;padding:0!important;transform:none!important;display:flex;align-items:center;justify-content:center;white-space:nowrap;font:600 var(--sw-adapt-title)/1.25 Fredoka,sans-serif!important;letter-spacing:0!important;}
 html body #buddy-name{font:600 var(--sw-adapt-title)/1.25 Fredoka,sans-serif!important;}
 /* The numbered selectors are explicit corner roles, never pagination or scene tools. */
 html body :is(#navigation-picker-back,#sw-back,#study-library-back,#study-back,#learning-themes-back,#learning-world-back,#worlds-buddy-back,#worlds-scene-back,#voice-return,#story-back,#navigation-buddy-back,.album-back,#navigation-picker-home,#navigation-spell-home,.study-home,#learning-themes-home,.album-profile,.buddy-settings),html body #screen-game[data-learning-mode] :is(.game-back,#btn-pause){--header-hit:var(--sw-adapt-hit)!important;--header-glyph:var(--sw-adapt-glyph)!important;position:absolute!important;top:var(--sw-adapt-top)!important;left:var(--sw-adapt-side)!important;right:auto!important;bottom:auto!important;width:var(--sw-adapt-hit)!important;height:var(--sw-adapt-hit)!important;min-width:var(--sw-adapt-hit)!important;max-width:var(--sw-adapt-hit)!important;min-height:var(--sw-adapt-hit)!important;max-height:var(--sw-adapt-hit)!important;margin:0!important;padding:0!important;transform:none!important;translate:none!important;border:0!important;background:transparent!important;box-shadow:none!important;isolation:isolate;color:#326b8d!important;z-index:12;}
 html body :is(#navigation-picker-home,#navigation-spell-home,.study-home,#learning-themes-home,.album-profile,.buddy-settings){left:auto!important;right:var(--sw-adapt-side)!important;}
 html body :is(#navigation-picker-back,#sw-back,#study-library-back,#study-back,#learning-themes-back,#learning-world-back,#worlds-buddy-back,#worlds-scene-back,#voice-return,#story-back,#navigation-buddy-back,.album-back,#navigation-picker-home,#navigation-spell-home,.study-home,#learning-themes-home,.album-profile,.buddy-settings)::before,html body #screen-game[data-learning-mode] :is(.game-back,#btn-pause)::before{content:''!important;display:block!important;position:absolute!important;inset:var(--sw-adapt-inset)!important;width:var(--sw-adapt-plate)!important;height:var(--sw-adapt-plate)!important;box-sizing:border-box!important;border:1px solid #c4e1ee!important;border-radius:calc(var(--sw-adapt-plate) / 3)!important;background:linear-gradient(150deg,#fff,#e8f8ff 55%,#b6e7fc)!important;box-shadow:inset 0 2px #fff,0 2px #add4df28!important;transform:none!important;opacity:1!important;z-index:-1;}
 html body :is(#navigation-picker-back,#sw-back,#study-library-back,#study-back,#learning-themes-back,#learning-world-back,#worlds-buddy-back,#worlds-scene-back,#voice-return,#story-back,#navigation-buddy-back,.album-back,#navigation-picker-home,#navigation-spell-home,.study-home,#learning-themes-home,.album-profile,.buddy-settings)::after,html body #screen-game[data-learning-mode] :is(.game-back,#btn-pause)::after{display:none!important;content:none!important;}
 html body :is(#navigation-picker-back,#sw-back,#study-library-back,#study-back,#learning-themes-back,#learning-world-back,#worlds-buddy-back,#worlds-scene-back,#voice-return,#story-back,#navigation-buddy-back,.album-back,#navigation-picker-home,#navigation-spell-home,.study-home,#learning-themes-home,.album-profile,.buddy-settings)> :is([data-header-glyph],svg,img),html body #screen-game[data-learning-mode] :is(.game-back,#btn-pause)> :is([data-header-glyph],svg,img){width:var(--sw-adapt-glyph)!important;height:var(--sw-adapt-glyph)!important;min-width:var(--sw-adapt-glyph)!important;max-width:var(--sw-adapt-glyph)!important;min-height:var(--sw-adapt-glyph)!important;max-height:var(--sw-adapt-glyph)!important;opacity:1!important;}
 html body #navigation-picker-back,html body #navigation-picker-home,html body #story-back{position:fixed!important;}
 html body #screen-game[data-learning-mode] .game-back{top:var(--sw-game-top)!important;left:var(--sw-game-left)!important;}
 html body #screen-game[data-learning-mode] #btn-pause{top:var(--sw-game-top)!important;right:var(--sw-game-right)!important;left:auto!important;}
 html body #screen-profile #profile-canva-stage>.pc-button[data-unified-profile-control]{display:flex!important;align-items:center!important;justify-content:center!important;isolation:isolate;}
 html body #screen-profile #profile-canva-stage>.pc-button[data-unified-profile-control]>img{width:calc(var(--sw-adapt-glyph) / var(--unified-scale))!important;height:calc(var(--sw-adapt-glyph) / var(--unified-scale))!important;object-fit:contain!important;}
 html body #screen-profile #profile-canva-stage>.pc-button[data-unified-profile-control]::before{content:''!important;position:absolute!important;left:50%!important;top:50%!important;width:calc(var(--sw-adapt-plate) / var(--unified-scale))!important;height:calc(var(--sw-adapt-plate) / var(--unified-scale))!important;transform:translate(-50%,-50%)!important;border:calc(1px / var(--unified-scale)) solid #c4e1ee!important;border-radius:calc(var(--sw-adapt-plate) / 3 / var(--unified-scale))!important;box-sizing:border-box!important;background:linear-gradient(150deg,#fff,#e8f8ff 55%,#b6e7fc)!important;box-shadow:inset 0 2px #fff,0 2px #add4df28!important;z-index:-1;}
 html body #screen-album .album-progress-panel{left:50%!important;}
 html body #screen-album .album-progress-copy{width:100%;margin-inline:auto;}
 html body #screen-album .album-progress-text{justify-content:center!important;text-align:center!important;}
 html body #screen-album .album-progress-bar{width:65.6%!important;margin-inline:auto!important;}
 html body #screen-word-study #study-listen{width:52.8px!important;height:52.8px!important;min-width:52.8px!important;min-height:52.8px!important;max-width:52.8px!important;max-height:52.8px!important;flex:0 0 52.8px!important;padding:0!important;transform:translateY(var(--sw-audio-optical-offset,3px))!important;}
 html body #screen-word-study #study-listen::before{inset:7.92px!important;width:36.96px!important;height:36.96px!important;}
 html body #screen-word-study #study-listen svg{width:21.84px!important;height:21.84px!important;min-width:21.84px!important;max-width:21.84px!important;}
}
@media (max-width:699px) and (orientation:portrait){
 html body #game-category-dialog.has-sight-entry[data-step=modes] .game-category-options{padding-top:6px!important;gap:8px!important;}
 html body #game-category-dialog.has-sight-entry[data-step=modes] .learning-play-entry{flex-basis:64px!important;width:64px!important;min-width:64px!important;height:48px!important;min-height:48px!important;padding:6px!important;border-radius:13px!important;}
 html body #game-category-dialog.has-sight-entry[data-step=modes] .learning-pick-icon{width:44px!important;height:32px!important;gap:3px!important;}
 html body #game-category-dialog.has-sight-entry[data-step=modes] .learning-play-entries{gap:12px!important;}
 html body #screen-album .album-rail{height:78.2px!important;}
 html body #screen-album .album-tab{flex-basis:19.32cqw!important;height:64.4px!important;border-radius:20px 20px 4px 4px!important;}
 html body #screen-album .album-tab.active{height:69px!important;}
 html body #screen-album .album-tab span{font-size:14px!important;}
 html body #screen-album .sb-category-icon{max-height:57.5px!important;}
 html body #screen-result .result-sticker-tray{display:none!important;}
 html body #screen-result #result-stickers{box-sizing:border-box!important;left:50%!important;top:41%!important;width:92%!important;height:13%!important;padding:10px!important;gap:4px!important;border:1px solid #dfc9aa!important;border-radius:24px!important;background:#fff9ed!important;box-shadow:0 3px 0 #dfc9aa59!important;overflow:visible!important;}
 html body #screen-result #result-stickers .fly-sticker{flex:0 1 calc((100% - 20px) / 6)!important;width:calc((100% - 20px) / 6)!important;height:100%!important;max-height:62px!important;min-width:0!important;}
 html body #screen-result #result-stickers .result-sticker-img{width:100%!important;height:100%!important;object-fit:contain!important;}
}
@media (min-width:700px) and (orientation:landscape){
 html body #screen-word-study{--sw-audio-optical-offset:5.12px;}
 html body #game-category-dialog.has-sight-entry[data-step=modes] .game-category-options{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-auto-rows:minmax(180px,1fr)!important;gap:16px!important;padding:12px 4px!important;align-content:stretch!important;}
 html body #game-category-dialog.has-sight-entry[data-step=modes] .learning-mode-card{min-width:0!important;min-height:180px!important;height:100%!important;max-height:none!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:8px!important;padding:12px!important;text-align:center!important;}
 html body #game-category-dialog.has-sight-entry[data-step=modes] .learning-mode-badge{width:104px!important;height:104px!important;flex:0 0 104px!important;}
 html body #game-category-dialog.has-sight-entry[data-step=modes] .learning-mode-copy{display:flex!important;flex-direction:column!important;align-items:center!important;gap:6px!important;}
 html body #game-category-dialog.has-sight-entry[data-step=modes] .learning-mode-copy strong{font-size:23px!important;}
 html body #game-category-dialog.has-sight-entry[data-step=modes] .learning-mode-arrow{display:none!important;}
 html body #screen-album .album-rail{height:119.6px!important;}
 html body #screen-album .album-tab{flex-basis:119.6px!important;height:96.6px!important;border-radius:23px 23px 4.6px 4.6px!important;}
 html body #screen-album .album-tab.active{height:108.1px!important;}
 html body #screen-album .album-tab span{font-size:20.7px!important;}
 html body #screen-album .sb-category-icon{max-height:87.4px!important;}
}
/* Album content has a centered max-width; its corner controls stay viewport-relative. */
@media (min-width:700px) and (orientation:landscape){
 html[data-ui-platform="ipad"][data-ipad-orientation="landscape"] body #screen-album .album-top .album-nav-control{position:fixed!important;top:24px!important;}
 html[data-ui-platform="ipad"][data-ipad-orientation="landscape"] body #screen-album .album-top .album-back{left:32px!important;right:auto!important;}
 html[data-ui-platform="ipad"][data-ipad-orientation="landscape"] body #screen-album .album-top .album-profile{right:32px!important;left:auto!important;}
 html[data-ui-platform="ipad"][data-ipad-orientation="landscape"] body #screen-album .album-top .album-nav-control::before{inset:8.4px!important;width:39.2px!important;height:39.2px!important;border-radius:13px!important;}
 html[data-ui-platform="ipad"][data-ipad-orientation="landscape"] body #screen-album .album-top .album-nav-control>:is(svg,img,[data-header-glyph]){width:30px!important;height:30px!important;min-width:30px!important;max-width:30px!important;min-height:30px!important;max-height:30px!important;position:static!important;inset:auto!important;transform:none!important;margin:0!important;}
}
html body #screen-profile #profile-canva-stage>.pc-button[data-unified-profile-control][data-profile-part="home"]{display:none!important;}
@media (max-width:699px) and (orientation:portrait), (min-width:700px) and (orientation:landscape){
 html body #screen-game[data-learning-mode] .game-stage :is(.game-back,#btn-pause){top:var(--sw-game-top)!important;left:var(--sw-game-left)!important;right:auto!important;}
 html body #screen-game[data-learning-mode] .game-stage #btn-pause{left:auto!important;right:var(--sw-game-right)!important;}
 html body #sw-back,html body #navigation-spell-home{position:fixed!important;}
 html body #screen-word-study.screen button.word-page-control :is(svg,[data-header-glyph]),html body #screen-sight-words.screen button.word-page-control :is(svg,[data-header-glyph]){width:var(--sw-adapt-glyph)!important;height:var(--sw-adapt-glyph)!important;min-width:var(--sw-adapt-glyph)!important;max-width:var(--sw-adapt-glyph)!important;min-height:var(--sw-adapt-glyph)!important;max-height:var(--sw-adapt-glyph)!important;}
}

@media (max-width:699px) and (orientation:portrait), (min-width:700px) and (orientation:landscape){
 html body #buddy-name .buddy-name-letter{-webkit-text-stroke:0!important;font:inherit!important;}
 html body #buddy-name::after{display:none!important;}
}

/* Place the two Word Play choices to the right of the title group. */
html body #game-category-dialog.has-sight-entry[data-step=modes] .learning-mode-card[data-section=play] {
  display:grid!important;
  grid-template-columns:var(--word-play-badge) minmax(0,1fr) auto 20px!important;
  align-items:center;
  column-gap:clamp(6px,1.1vw,14px);
  --word-play-badge:120px;
  --word-play-option-width:96px;
  --word-play-option-height:70px;
}
html body #game-category-dialog.has-sight-entry[data-step=modes] [data-section=play] .learning-mode-badge {
  grid-area:1 / 1;
  width:var(--word-play-badge)!important;
  height:var(--word-play-badge)!important;
}
html body #game-category-dialog.has-sight-entry[data-step=modes] [data-section=play] .learning-mode-copy {
  grid-area:1 / 2;
  align-self:center;
  text-align:left;
}
html body #game-category-dialog.has-sight-entry[data-step=modes] [data-section=play] .learning-play-entries {
  grid-area:1 / 3;
  flex-wrap:nowrap;
  gap:clamp(6px,1vw,12px)!important;
  margin:0;
}
html body #game-category-dialog.has-sight-entry[data-step=modes] [data-section=play] .learning-play-entry {
  box-sizing:border-box;
  flex:0 0 var(--word-play-option-width)!important;
  width:var(--word-play-option-width)!important;
  min-width:var(--word-play-option-width)!important;
  height:var(--word-play-option-height)!important;
  min-height:var(--word-play-option-height)!important;
}
html body #game-category-dialog.has-sight-entry[data-step=modes] [data-section=play] .learning-pick-icon {
  width:76%!important;
  height:78%!important;
  grid-auto-rows:minmax(0,1fr);
}
html body #game-category-dialog.has-sight-entry[data-step=modes] [data-section=play] .learning-pick-icon i {
  width:auto!important;
  height:auto!important;
}
@media (orientation:landscape), (max-width:699px) {
  html body #game-category-dialog.has-sight-entry[data-step=modes] .learning-mode-card[data-section=play] {
    --word-play-badge:clamp(48px,7vw,82px);
    --word-play-option-width:clamp(48px,15vw,74px);
    --word-play-option-height:56px;
  }
}
@media (max-width:699px) {
  html body #game-category-dialog.has-sight-entry[data-step=modes] .learning-mode-card[data-section=play] {
    --word-play-badge:clamp(48px,17vw,76px);
    --word-play-option-width:clamp(48px,16.8vw,70px);
  }
}

html body #screen-sight-words .sw-library-tools #sw-resume .v39-forward-glyph {
  fill:none;
  stroke:currentColor;
}
html body #screen-story-time .story-book-cta {
  gap:6px;
}
@media (max-width:360px) {
  html body #game-category-dialog.has-sight-entry[data-step=modes] .learning-mode-card[data-section=play] {
    --word-play-badge:48px;
    --word-play-option-width:48px;
    --word-play-option-height:50px;
  }
}

@media (min-width:700px) and (orientation:portrait) {
  html body #game-category-dialog.has-sight-entry[data-step=modes] .learning-mode-card,
  html body #game-category-dialog.has-sight-entry[data-step=modes] .learning-mode-card[data-section=play] {
    grid-template-columns:128px minmax(0,1fr) auto 20px!important;
    column-gap:10px;
  }
  html body #game-category-dialog.has-sight-entry[data-step=modes] .learning-mode-card .learning-mode-copy {
    gap:9px;
  }
  html body #game-category-dialog.has-sight-entry[data-step=modes] .learning-mode-card .learning-mode-arrow {
    grid-area:1 / 4;
  }
  html body #game-category-dialog.has-sight-entry[data-step=modes] [data-section=play] .learning-play-entries {
    gap:clamp(12px,2vw,24px)!important;
    margin-inline-end:12px;
  }
}

/* Shared rows keep each landscape card's artwork and labels aligned. */
@media (min-width:700px) and (orientation:landscape) {
  #game-category-dialog.has-sight-entry[data-step=modes] {
    --landscape-mode-badge:clamp(104px,12vw,144px);
    --landscape-mode-choices:50px;
  }
  html body #game-category-dialog.has-sight-entry[data-step=modes] .game-category-options {
    grid-auto-rows:minmax(calc(var(--landscape-mode-badge) + 132px),1fr)!important;
  }
  html body #game-category-dialog.has-sight-entry[data-step=modes] .learning-mode-card.learning-mode-card {
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:var(--landscape-mode-badge) minmax(56px,1fr) var(--landscape-mode-choices);
    justify-items:center;
    justify-content:stretch!important;
    gap:4px!important;
  }
  html body #game-category-dialog.has-sight-entry[data-step=modes] .learning-mode-card .learning-mode-badge {
    grid-area:1 / 1!important;
    width:var(--landscape-mode-badge)!important;
    height:var(--landscape-mode-badge)!important;
  }
  html body #game-category-dialog.has-sight-entry[data-step=modes] .learning-mode-card .learning-mode-copy {
    grid-area:2 / 1!important;
    align-self:start!important;
    width:100%;
    margin:0;
  }
  html body #game-category-dialog.has-sight-entry[data-step=modes] .learning-mode-card :is(.learning-mode-copy strong,.learning-mode-subtitle) {
    text-align:center;
  }
  html body #game-category-dialog.has-sight-entry[data-step=modes] [data-section=play] {
    --word-play-option-width:clamp(60px,7vw,84px);
    --word-play-option-height:44px;
  }
  html body #game-category-dialog.has-sight-entry[data-step=modes] [data-section=play] .learning-play-entries {
    grid-area:3 / 1!important;
    align-self:center!important;
    justify-self:center!important;
    margin-block-end:16px;
  }
}

@media (orientation:portrait) {
  html body #game-category-dialog.has-sight-entry[data-step=modes] [data-section=play] .learning-mode-arrow {
    display:grid;
    grid-area:1 / 4;
    place-items:center;
    margin:0;
  }
}
@media (max-width:699px) and (orientation:portrait) {
  html body #game-category-dialog.has-sight-entry[data-step=modes] .learning-mode-card[data-section=play] {
    --word-play-badge:var(--mode-badge-size,var(--entry-badge-size,88px));
    --word-play-option-width:clamp(48px,16.8vw,70px);
    --word-play-option-height:48px;
    grid-template-columns:var(--word-play-badge) minmax(0,1fr) 20px!important;
    grid-template-rows:1fr auto 1fr auto 1fr;
    padding-block:0;
    row-gap:0!important;
  }
  html body #game-category-dialog.has-sight-entry[data-step=modes] [data-section=play] .learning-mode-badge {
    grid-area:1 / 1 / -1;
  }
  html body #game-category-dialog.has-sight-entry[data-step=modes] [data-section=play] .learning-mode-copy {
    grid-area:2 / 2;
  }
  html body #game-category-dialog.has-sight-entry[data-step=modes] [data-section=play] .learning-play-entries {
    grid-area:4 / 2;
    gap:clamp(12px,2vw,24px)!important;
    justify-self:start;
  }
  html body #game-category-dialog.has-sight-entry[data-step=modes] [data-section=play] .learning-mode-arrow {
    grid-area:1 / 3 / -1;
  }
  html body #game-category-dialog.has-sight-entry[data-step=modes] [data-section=play] .learning-mode-subtitle {
    display:none;
  }
}
