/* Scoped worksheet adventures; old game layouts stay unchanged. */
.worlds{grid-template-columns:repeat(3,minmax(0,1fr))!important}.wb-world-scene{background:linear-gradient(#d8e6c0 60%,#9ab77e 60%,#759961)!important}.wb-world-sun{position:absolute;right:18%;top:18%;width:48px;height:48px;background:#f9d78d;border-radius:50%}.wb-world-tree{position:absolute;left:5%;top:10%;font-size:100px}.woodland-depth{background:#ecedd9}.woodland-depth>.scene{background:linear-gradient(#dae8c9,#bed197 60%,#8fac74)!important}.woodland-depth .topbar{background:#eff0df!important;border-color:#c4cba5!important}
#englishIsland{padding-bottom:30px}#englishIsland .cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}#englishIsland .card{position:relative;display:flex;flex-direction:column;text-align:left;background:#fff9e9;border:2px solid #dbd7bb;border-radius:24px;padding:12px;box-shadow:0 5px 0 #c8c3a4}#englishIsland .card-txt{padding:10px;display:flex;flex-direction:column;gap:7px}#englishIsland .card-txt strong{font-size:23px;color:#315648}#englishIsland .go{position:static;align-self:flex-end}#englishIsland .map-inner{max-width:1150px;margin:auto;padding:24px}.wb-card-picture{position:relative!important;min-height:135px;display:flex!important;align-items:center;justify-content:space-evenly;background:linear-gradient(150deg,#bfdbbb,#f6e5ad)!important;border-radius:18px;overflow:hidden}.wb-card-picture>span{font-size:65px}.wb-card-picture i{font-size:32px;color:#426957;font-style:normal;letter-spacing:5px;transform:rotate(-8deg)}#map .wb-card-picture{background:linear-gradient(150deg,#b0dcdf,#e7ecce)!important}
#workbook{max-width:920px;margin:auto;padding:18px 20px 36px;color:#294f4c}#workbook.active{display:block}.wb-header{text-align:center;margin:10px 0 25px}.wb-header h2{font-size:clamp(26px,4vw,38px);margin:10px}.wb-stages{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}.wb-stage{background:#fff8e7;border:3px solid #d5c8a3;border-radius:24px;box-shadow:0 6px 0 #c6ba97;padding:14px 6px;display:flex;flex-direction:column;align-items:center;gap:8px;color:#2e5857}.wb-stage>b{font-size:38px}.wb-prize{display:block;width:100%;max-width:145px}.wb-prize svg{width:100%;height:auto}.silhouette{filter:brightness(0);opacity:.18}.wb-top{display:flex;justify-content:space-between;align-items:center;gap:10px}.wb-progress{display:flex;gap:12px;justify-content:center;margin:12px}.wb-progress span{display:grid;place-items:center;background:#ece9d6;color:#667b70;width:36px;height:36px;border-radius:50%;font-weight:900}.wb-progress .current{background:#f1c66c;box-shadow:0 0 0 4px #f1c66c45;color:#36584f}.wb-progress .done{background:#599679;color:white}.wb-panel{background:#fffaf0;border:3px solid #d8d5ba;box-shadow:0 7px 0 #bdbb9e50;border-radius:28px;padding:20px 24px;text-align:center}.wb-panel h2{margin:0 0 8px;font-size:clamp(22px,3vw,31px)}.wb-panel p{margin:8px 0 14px}.wb-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:52px;padding:12px 25px;border-radius:18px;background:#f2cd72;border:2px solid #d6ac4f;box-shadow:0 4px 0 #d6ac4f;color:#294f4c;font:inherit;font-weight:900;font-size:19px;cursor:pointer}.wb-button.secondary{background:#e4ead8;border-color:#becdb2;box-shadow:0 3px 0 #becdb2;font-size:16px}.wb-button:disabled{opacity:.4;cursor:default}.wb-button:active:not(:disabled){transform:translateY(2px)}#wbActions{display:flex;justify-content:center;flex-wrap:wrap;gap:12px;margin-top:14px}#wbFeedback{min-height:25px;font-weight:900;color:#4c8263;font-size:20px;padding-top:8px}.wb-retry{background:#ffd791}.wb-choices{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;margin:15px auto;max-width:600px}.wb-choice{width:65px;min-height:61px;border:3px solid #c6d7cb;border-radius:18px;background:#fffef8;color:#365d55;font:inherit;font-size:32px;font-weight:900;box-shadow:0 4px 0 #d7ddca}.wb-choice.chosen{background:#f9d576;border-color:#ba883b;box-shadow:0 0 0 4px #f9d57666}.wb-choice:disabled{opacity:1}.wb-sum{display:flex;align-items:center;justify-content:center;gap:35px;margin:20px auto;max-width:680px}.wb-column{display:flex;flex-direction:column;align-items:flex-end;gap:10px;font-size:44px;font-weight:900;min-width:105px}.wb-column strong{border-top:4px solid #456963;width:100%;text-align:right;color:#bc8044}.wb-cherries{min-width:0;flex:1;display:grid;gap:13px}.wb-cherries>div{min-height:65px;display:flex;justify-content:flex-start;flex-wrap:wrap;gap:10px;padding:8px;border-radius:16px;background:#f5ecd9}.wb-cherries>div:nth-child(2){background:#e4eee0}.wb-cherries span{position:relative;font-size:32px}.wb-cherries .pale{filter:saturate(.5)}.wb-cherries small{position:absolute;right:-5px;bottom:-5px;font-size:12px;color:white;background:#315d50;border-radius:50%;width:19px;height:19px;line-height:19px}.wb-board{display:block;width:100%;max-width:660px;margin:10px auto;background:#ecf4ed;border:2px solid #c1d3c6;border-radius:20px;touch-action:none;user-select:none;-webkit-user-select:none;aspect-ratio:3/2}.wb-dot circle{fill:#fffaf0;stroke:#6e9f96;stroke-width:3}.wb-dot text{font:800 19px sans-serif;fill:#2b514c;pointer-events:none}.wb-dot.next circle{fill:#f4ce71;stroke:#b98735;stroke-width:4}.wb-dot.done circle{fill:#91c4a2}.wb-dot{cursor:pointer}.wb-connected{fill:none;stroke:#52a49d;stroke-width:7;stroke-linejoin:round;stroke-linecap:round}.wb-draft{fill:none;stroke:#8bc1b9;stroke-width:4;stroke-dasharray:6 8}.wb-guide-line{fill:none;stroke:#b6c9bd;stroke-width:2}.wb-guide-line.dashed{stroke-dasharray:7 9}.wb-trace-guide{fill:none;stroke:#d1d9be;stroke-width:54;stroke-linecap:round;stroke-linejoin:round}.wb-trace-guide.done{stroke:#6eab8c}.wb-ink{fill:none;stroke:#c59745;stroke-width:15;stroke-linecap:round;stroke-linejoin:round}.wb-trace-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.wb-word{border:0;background:transparent;display:flex;flex-direction:column;align-items:center;color:#355d52;font-weight:800;min-width:85px}.wb-word svg,.wb-word .wb-emoji{width:76px;height:65px;font-size:48px}.wb-picture-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:18px 0}.wb-picture-card{display:flex;flex-direction:column;gap:5px;align-items:center}.wb-picture{background:#f0efdf;border:3px solid #d0d5bc;border-radius:22px;padding:14px 8px;width:100%;min-height:143px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;color:#33594d;font:inherit}.wb-picture svg{width:110px;max-width:100%;height:86px;filter:grayscale(1)}.wb-picture .wb-emoji{filter:grayscale(1)}.wb-picture.chosen{background:#fae6a8;border-color:#cc9d43;box-shadow:0 0 0 4px #f1cd7040}.wb-picture.chosen svg,.wb-picture.chosen .wb-emoji{filter:none}.wb-emoji{font:64px sans-serif;display:inline-block}.wb-listen{border:2px solid #c4d1b4;background:#e4ebd8;border-radius:14px;min-width:54px;min-height:44px;font-size:22px}.wb-hero-word{display:flex;flex-direction:column;align-items:center;justify-content:center;background:#e9edda;border:3px solid #c6d0b2;border-radius:24px;min-width:170px;min-height:155px;margin:15px auto;color:#345e4e;font:inherit;font-weight:900}.wb-hero-word svg{width:145px;height:115px}.wb-hero-word .wb-emoji{font-size:85px}.wb-revealed-word{font-size:35px;letter-spacing:4px}.wb-revealed-word b{color:#be7e35;background:#fae4a3;border-radius:6px}.wb-animal-section[hidden]{display:none}.wb-habitat{height:310px;position:relative;background:linear-gradient(#dce9c8 50%,#adc28d 50%,#8ba876);border:10px solid #ddd8b8;border-radius:30px;overflow:hidden;margin:20px auto}.wb-tree{position:absolute;font-size:180px;top:5%;opacity:.8}.tree1{left:-35px}.tree2{right:-35px}.wb-forest-animal{position:absolute;width:90px;height:85px;border:0;background:transparent;padding:0;animation:wb-sway 7s ease-in-out infinite alternate}.wb-forest-animal svg{width:100%;height:100%}.wb-empty{position:absolute;top:45%;left:50%;transform:translateX(-50%);font-size:16px;white-space:nowrap}.book-tabs{flex-wrap:wrap}.wb-win{animation:wb-celebrate .55s ease}.wb-shake{animation:wb-shake .48s ease}@keyframes wb-shake{20%,60%{transform:translateX(-10px) rotate(-1deg)}40%,80%{transform:translateX(10px) rotate(1deg)}}@keyframes wb-celebrate{45%{box-shadow:0 0 0 12px #84c4a444;transform:scale(1.015)}}@keyframes wb-sway{to{transform:translate(16px,-5px) rotate(3deg)}}
@media(max-width:850px){.worlds{grid-template-columns:1fr!important}#englishIsland .cards{grid-template-columns:1fr}.wb-stages{grid-template-columns:repeat(3,minmax(0,1fr))}.wb-world-tree{font-size:130px}}@media(max-width:540px){#workbook{padding:12px 10px 24px}.wb-panel{padding:15px 10px}.wb-picture-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.wb-picture{min-height:118px}.wb-emoji{font-size:52px}.wb-sum{gap:12px}.wb-column{font-size:34px;min-width:75px}.wb-cherries span{font-size:24px}.wb-cherries>div{gap:6px;padding:5px}.wb-choice{width:49px;min-height:49px;font-size:27px}.wb-choices{gap:9px}.wb-stages{gap:10px}.wb-stage>b{font-size:30px}.wb-trace-heading h2{font-size:23px}.wb-trace-heading p{font-size:13px}.wb-forest-animal{width:60px}.wb-habitat{height:260px}}
.woodland .a1{width:150px;left:12%;top:125px}.woodland .a2{width:125px;right:7%;top:155px}.wb-cherries span{color:#b85d5b;display:inline-block;width:35px;height:42px}.wb-cherries span svg{width:100%;height:100%}.wb-cherries .pale{color:#d58e7b;filter:none}
.wb-card-picture{width:100%;height:170px}.wb-choices button:focus-visible,.wb-dot:focus-visible,.wb-button:focus-visible{outline:4px solid #bd8a32;outline-offset:4px}
@media(min-width:700px) and (max-height:900px){.wb-board{max-width:clamp(450px,calc((100dvh - 430px)*1.5),660px)}.wb-panel{padding:14px 20px}}
@media(max-width:850px){.woodland .a1{top:60px}.woodland .a2{top:80px}}@media(max-width:540px){.wb-cherries span{width:27px;height:34px}}
@media(prefers-reduced-motion:reduce){.wb-win,.wb-shake,.wb-forest-animal{animation:none}.wb-win{outline:5px solid #80b391}.wb-shake{outline:5px solid #d59864}}

/* Match the original cream cards, gold actions and green confirmation badges. */
#workbook.wb-stage-select{max-width:1100px;padding:30px}
.wb-stage-select>.eyebrow{margin-top:24px}.wb-select-title{font-size:clamp(26px,4vw,36px);line-height:1.25;margin:0 0 10px;color:#254743}.wb-select-lead{font-size:14px;color:#6f8379;line-height:1.6;margin:0}.wb-stage-explainer{display:flex;align-items:center;gap:12px;background:#f5f3e7;border-radius:17px;padding:16px 20px;margin-top:24px}.wb-stage-explainer b{font-size:27px;color:#8ca773;white-space:nowrap}.wb-stage-explainer p{margin:0;font-size:13px;color:#6f8379;line-height:1.6}
#workbook .stage-tile{font:inherit;cursor:pointer}body.woodland-depth #workbook .stage-tile{background:linear-gradient(160deg,#fffdf4,#eef3e2);border-color:#d3dfc4}
@media(max-width:760px){#workbook.wb-stage-select{padding:20px 15px}#workbook .stage-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.wb-stage-explainer{padding:14px}}
@media(max-width:350px){#workbook .stage-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
#workbook .wb-panel{border-color:var(--cream-line);background:var(--cream);border-width:3px}
#workbook .wb-button.btn-yellow{font-family:inherit;color:var(--ink);background:linear-gradient(#ffe292,#f2c14e);border-color:#cf9f34;border-radius:18px;box-shadow:0 4px 0 #cf9f34}
#workbook .wb-stage{aspect-ratio:auto;min-height:190px;border-color:#d7cdb3;background:#fff9eb;border-radius:20px;gap:4px}
#workbook .wb-stage.done{background:#e5efe1;border-color:#8ab49b}
.wb-letter-range{font-size:18px;font-weight:900;color:#69886d}.wb-letter-steps{display:flex;gap:8px}.wb-letter-steps span{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#e9ebdc;font-weight:900}.wb-letter-steps .current{background:#f1cf7b;box-shadow:0 0 0 2px #d2a64f}.wb-letter-steps .done{background:#73a18a;color:white}
.wb-sound-target{max-width:660px;margin:12px auto 20px;background:#edf0de;border:2px solid #c5d2b6;border-radius:22px;padding:12px 18px}.wb-step-label{font-size:12px;letter-spacing:.07em;font-weight:900;color:#64826c}.wb-sound-play{display:flex;align-items:center;justify-content:center;gap:22px;margin:10px auto 8px;background:#f5d27c;border:3px solid #c5a05c;border-radius:20px;box-shadow:0 4px 0 #c5a05c;min-width:260px;min-height:90px;color:#315746;padding:9px 22px;font:inherit;font-weight:900;font-size:20px}.wb-sound-play>b{font-size:58px;line-height:1}.wb-sound-play span{display:flex;flex-direction:column;gap:4px;text-align:left}.wb-sound-play small{font-size:17px}.wb-sound-play.playing{outline:4px solid #9bc8a1;outline-offset:3px}.wb-sound-target p{font-size:15px;margin:12px 0 0}.wb-sound-position{display:inline-block;background:#fffaf0;border-radius:7px;padding:0 8px;letter-spacing:3px}.wb-pick-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.wb-pick-count{display:flex;align-items:center;gap:5px;font-weight:900;color:#5b7b61}.wb-pick-count i{font-style:normal;background:#ecebdd;border:2px solid #c6d1b7;border-radius:50%;width:28px;height:28px;display:grid;place-items:center}.wb-pick-count .filled{background:#609878;color:white;border-color:#609878}.wb-picture{position:relative;box-shadow:0 4px 0 #d4d4bb}.wb-selection-mark{position:absolute;right:8px;top:7px;display:grid;place-items:center;width:25px;height:25px;border:2px solid #c5ceb5;border-radius:50%;background:#fff9e8;color:#6b8972;font-weight:900}.wb-picture.chosen .wb-selection-mark{background:#518d6c;color:white;border-color:#fff9e8}.wb-word-label{font-weight:800;font-size:20px}.wb-listen{font-size:14px;padding:6px 12px}.wb-safari-help{font-size:13px;color:#6d806d}
@media(max-width:540px){.wb-sound-play{min-width:0;width:100%;font-size:17px;gap:13px}.wb-sound-play>b{font-size:48px}.wb-sound-target{padding:10px}.wb-step-label{font-size:10px}.wb-sound-target p{font-size:13px}.wb-pick-count{font-size:12px}.wb-pick-count i{width:22px;height:22px}.wb-stage strong{font-size:12px}#workbook .wb-stage{min-height:155px}.wb-safari-help{font-size:12px}}

/* ===== iPad landscape: every workbook screen fits one screen, no scrolling mid-question =====
   Same shape as the other games in landscape: the big picture on the left, words and
   buttons on the right. #wbTask becomes display:contents so its children join the grid. */
@media (orientation: landscape) and (min-width: 1000px) and (min-height: 600px){
  #workbook{max-width:1080px;padding:10px 20px 14px}
  #workbook .wb-progress{margin:6px auto}
  #workbook .wb-panel{padding:14px 20px}
  #workbook .wb-panel h2{margin-bottom:4px}
  #workbook #wbActions{margin-top:10px}

  /* Letter tracing and the number trails: board left, everything else right */
  #workbook .wb-panel:has(.wb-board){display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);
    align-items:center;gap:4px 22px;text-align:left}
  #workbook .wb-panel:has(.wb-board) #wbTask{display:contents}
  #workbook .wb-panel:has(.wb-board) > *,
  #workbook .wb-panel:has(.wb-board) #wbTask > *{grid-column:2;margin-left:0;margin-right:0}
  #workbook .wb-panel:has(.wb-board) #wbTask > #wbBoard{grid-column:1;grid-row:1/span 8;justify-self:center;
    width:auto;height:min(430px,calc(100dvh - 250px));max-width:100%;margin:0}
  #workbook .wb-panel:has(.wb-board) .wb-trace-heading{justify-content:flex-start;gap:14px}
  #workbook .wb-panel:has(.wb-board) .wb-trace-heading h2{font-size:clamp(20px,2.4vw,26px)}
  #workbook .wb-panel:has(.wb-board) .wb-word svg{width:64px;height:56px}
  #workbook .wb-panel:has(.wb-board) #wbFeedback{padding-top:2px;min-height:0}
  #workbook .wb-panel:has(.wb-board) #wbActions{justify-content:flex-start}
  #workbook .wb-panel:has(.wb-board) #wbTask > .wb-button{justify-self:start}

  /* Sound Safari: listen on the left, the pictures to choose on the right */
  #workbook .wb-panel:has(.wb-sound-target){display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);align-items:start;gap:8px 22px;text-align:left}
  #workbook .wb-panel:has(.wb-sound-target) #wbTask{display:contents}
  #workbook .wb-panel:has(.wb-sound-target) > h2,
  #workbook .wb-panel:has(.wb-sound-target) .wb-sound-target{grid-column:1}
  #workbook .wb-panel:has(.wb-sound-target) h2{grid-row:1}
  #workbook .wb-panel:has(.wb-sound-target) .wb-sound-target{grid-row:2}
  #workbook .wb-panel:has(.wb-sound-target) .wb-safari-help{grid-column:1;grid-row:3;margin:6px 0 0}
  #workbook .wb-panel:has(.wb-sound-target) .wb-pick-heading{grid-column:2;grid-row:1}
  #workbook .wb-panel:has(.wb-sound-target) .wb-picture-grid{grid-column:2;grid-row:2;
    grid-template-columns:repeat(2,minmax(0,1fr));margin:0}
  #workbook .wb-panel:has(.wb-sound-target) #wbFeedback{grid-column:2;grid-row:3;min-height:0;padding-top:4px}
  #workbook .wb-panel:has(.wb-sound-target) #wbActions{grid-column:2;grid-row:4;justify-content:flex-start}
  #workbook .wb-panel:has(.wb-sound-target) .wb-picture{min-height:0;padding:10px 6px}
  #workbook .wb-panel:has(.wb-sound-target) .wb-picture svg{height:clamp(54px,9vh,78px)}
  #workbook .wb-panel:has(.wb-sound-target) .wb-emoji{font-size:clamp(38px,7vh,58px)}
  /* once answered, the shared card sits under the sound (left) so the four pictures keep their room */
  #workbook.wb-solved .wb-panel:has(.wb-sound-target) .wb-safari-help{display:none}
  #workbook.wb-solved .wb-panel:has(.wb-sound-target) .wb-picture-grid{grid-row:2/span 3}
  #workbook.wb-solved .wb-panel:has(.wb-sound-target) #wbFeedback{display:none}
  #workbook.wb-solved .wb-panel:has(.wb-sound-target) #wbActions{grid-column:1;grid-row:3;align-self:start;margin-top:4px}
}

/* Ocean comparison / counting / maze worksheet extensions. */
.wb-count-animal{display:inline-block;position:relative;width:48px;flex:0 0 48px}
.wb-count-animal svg{display:block;width:100%;height:auto}
.wb-count-animal small{position:absolute;bottom:-3px;right:0;background:#fff7dc;color:#315a54;border-radius:50%;font-size:13px;min-width:19px;padding:2px;font-weight:900}
.wb-compare{display:grid;grid-template-columns:minmax(0,1fr) 65px minmax(0,1fr);gap:12px;align-items:center;margin:22px auto;max-width:650px}
.wb-compare-group{border:2px solid #b8d5ca;background:#e8f2e9;border-radius:20px;padding:14px 10px}
.wb-compare-group:last-child{background:#eee9f3;border-color:#cec4dc}
.wb-compare-group>div{display:flex;flex-wrap:wrap;justify-content:center;gap:9px;min-height:120px;align-content:center}
.wb-compare-group>b{display:block;font-size:36px;margin-top:8px}
.wb-compare-symbol{font-size:48px;font-weight:900;color:#467d79}
.wb-sequence{display:flex;justify-content:center;gap:14px;margin:28px 0}
.wb-sequence b{display:grid;place-items:center;width:80px;height:90px;background:#e4eddf;border:3px solid #b8cbb4;border-radius:16px;font-size:42px}
.wb-sequence .gap{background:#fff0ba;border-color:#dfba65}
.wb-writing.wb-no-guide .wb-trace-guide:not(.done){opacity:0}
.wb-write-sequence{margin:12px 0;justify-content:flex-start;gap:10px}
.wb-write-sequence b{width:64px;height:64px;font-size:32px}
.wb-number-heading .wb-word svg{width:85px;height:75px}
.wb-maze-cell rect{fill:#f7f3e6;stroke:#b6cfc4;stroke-width:2}
.wb-maze-cell text{fill:#325852;font-size:30px;font-weight:900;pointer-events:none}
.wb-maze-cell.done rect{fill:#c4e1d4;stroke:#79ab94}
.wb-maze-cell{cursor:pointer}
.wb-maze-cell:focus-visible rect{stroke:#d09b2e;stroke-width:4}
.wb-maze-line{fill:none;stroke:#498d8360;stroke-width:8;stroke-linecap:round;stroke-linejoin:round}
#workbook .wb-ocean-count .wb-count-animal{width:44px;flex-basis:44px;color:inherit}
#workbook .wb-ocean-count .wb-count-animal svg{width:100%;height:36px}
@media(max-width:600px){
 .wb-compare{grid-template-columns:minmax(0,1fr) 34px minmax(0,1fr);gap:5px}
 .wb-compare-group{padding:10px 6px}.wb-compare-group>div{gap:5px;min-height:100px}
 .wb-compare .wb-count-animal{width:34px;flex-basis:34px}.wb-compare-symbol{font-size:32px}
 #workbook .wb-ocean-count .wb-count-animal{width:32px;flex-basis:32px}
 #workbook .wb-choices{gap:8px}#workbook .wb-choice{width:48px;min-height:48px;font-size:27px}
}
/* Shorter landscape iPads (mini, 744pt): trim the addition board so it still fits */
@media (orientation: landscape) and (min-width: 1000px) and (max-height: 800px){
  #workbook .wb-sum{margin:10px auto;gap:26px}
  #workbook .wb-cherries{gap:9px}
  #workbook .wb-cherries>div{min-height:56px;padding:6px}
  #workbook .wb-choices{margin:10px auto}
  #workbook .wb-choice{width:58px;min-height:54px;font-size:28px}
}
