:root{font-family:Arial,"Noto Sans Hebrew",sans-serif;color:#163e42;background:#f4f3ed;font-synthesis:none;--ink:#163e42;--muted:#59716f;--line:#d5dfd8;--green:#b9e4b3;--orange:#f2bb80}*{box-sizing:border-box}body{margin:0}button,a,select{-webkit-tap-highlight-color:transparent}button,select{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer}button:focus-visible,a:focus-visible,select:focus-visible,canvas:focus-visible{outline:3px solid #cf7438;outline-offset:4px}a{color:inherit}button{color:inherit}button:active{transform:translateY(2px)}[hidden]{display:none!important}.topbar{max-width:1200px;margin:auto;padding:23px 32px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:9px;font-weight:900;font-size:27px;text-decoration:none}.brand img{width:38px;height:38px}.brand span{font-weight:400;font-size:13px;color:var(--muted);padding-right:14px;border-right:1px solid var(--line);margin-right:5px}.parent-link{font-size:14px;text-underline-offset:5px}.lobby{max-width:1200px;margin:auto;padding:44px 32px 20px;display:grid;grid-template-columns:1fr 1fr;gap:28px}.eyebrow{font-size:12px;font-weight:700;letter-spacing:.035em;color:var(--muted)}.intro h1{font-size:clamp(38px,4.7vw,62px);line-height:1.03;margin:14px 0 17px;letter-spacing:-2px}.intro h1 span{color:#477765}.intro p{color:var(--muted);font-size:17px;line-height:1.6;margin:0}.setup{align-self:center;justify-self:end;width:310px;border:1px solid var(--line);padding:22px;border-radius:18px;background:#fff9}.setup label{font-size:14px;font-weight:700;display:block;margin-bottom:12px}.setup select{width:100%;padding:13px 10px;background:white;border:1px solid #a9beb4;border-radius:9px;font-size:14px}.setup p{font-size:13px;line-height:1.6;color:var(--muted);margin:12px 0 0}.worlds{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.world-card{background:#fff;border:1px solid #d9e1d9;border-radius:20px;overflow:hidden}.world-card .picture{height:180px;width:100%;display:block}.card-copy{padding:23px}.card-copy h2{font-size:24px;letter-spacing:-.6px;margin:8px 0}.card-copy p{font-size:14px;color:var(--muted);line-height:1.6;min-height:44px;margin:9px 0 20px}.card-copy button{display:flex;justify-content:space-between;align-items:center;width:100%;padding:14px 17px;background:var(--ink);color:white;border:0;border-radius:10px;font-size:15px;font-weight:700}.lobby-note{grid-column:1/-1;display:flex;gap:25px;justify-content:center;font-size:13px;color:var(--muted)}.built{grid-column:1/-1;border-top:1px solid var(--line);padding-top:26px;display:flex;align-items:center;justify-content:space-between}.built h2{font-size:22px;margin:8px 0}.buildings{display:flex;gap:10px;flex-wrap:wrap}.building{background:#e4ebdd;padding:13px 16px;border-radius:12px;font-size:14px}.building.locked{color:#6b7c74;background:#eaece7}.resume{grid-column:1/-1;background:#d9ebc9;border:1px solid #a9c99a;border-radius:12px;padding:16px;text-align:right;font-weight:700}footer{grid-column:1/-1;text-align:center;color:#60746b;font-size:12px;padding:15px;display:flex;justify-content:center;gap:12px}footer a{text-underline-offset:4px}.game{max-width:1200px;margin:auto;padding:23px 32px 24px}.game-top{display:flex;align-items:center;justify-content:space-between;gap:15px}.game-top>div{text-align:center}.game-top h1{font-size:25px;margin:5px 0}.quiet{border:1px solid #ccd9d1;border-radius:10px;padding:12px 14px;background:white;font-size:13px}.game-status{display:flex;align-items:center;gap:22px;margin:20px 0 12px;font-size:13px}.gate-progress{display:flex;gap:7px;margin-left:auto}.gate-dot{padding:7px 12px;border-radius:8px;background:#e4e9e0}.gate-dot.done{background:#b9e4b3;font-weight:700}.checkpoint{color:var(--muted)}.stage{position:relative;background:#d4eef4;border:1px solid #bdcec9;border-radius:22px;overflow:hidden;isolation:isolate;height:clamp(280px,51svh,460px)}#canvas{width:100%;height:100%;display:block;touch-action:none}.gate-action{position:absolute;bottom:25px;left:50%;transform:translateX(-50%);white-space:nowrap}.primary{background:var(--ink);color:white;border:0;padding:16px 23px;border-radius:12px;font-weight:700;min-height:48px}.gate-action button{box-shadow:0 5px 0 #092b2a,0 8px 20px #14343533}.gate-action span{margin-right:14px;color:#b9e4b3}.toast{position:absolute;top:17px;left:50%;transform:translateX(-50%);max-width:90%;width:max-content;background:#fffffff0;color:var(--ink);padding:10px 16px;border-radius:10px;font-size:14px;text-align:center;pointer-events:none}.toast:empty{display:none}.control-row{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:15px;direction:ltr}.direction-controls{display:flex;gap:10px}.control{height:60px;min-width:66px;border:1px solid #b6c8bf;border-bottom:4px solid #a6bbb0;border-radius:14px;background:white;font-size:26px;touch-action:none;user-select:none;-webkit-user-select:none}.control.active{background:#c7e8bd;transform:translateY(2px);border-bottom-width:2px}.jump{background:#dbedc7;padding:0 23px}.jump span{font-size:14px;margin-left:9px}.control-row p{direction:rtl;text-align:center;font-size:14px;color:var(--muted);max-width:330px}.game-bottom{display:flex;align-items:center;justify-content:space-between;margin-top:12px;gap:15px}.game-bottom>span{font-size:12px;color:var(--muted)}.text-button{background:transparent;border:0;padding:12px 0;font-size:14px;text-decoration:underline;text-underline-offset:5px;min-height:44px}.pause-overlay{position:absolute;inset:0;background:#eaf3e8ed;display:flex;align-items:center;justify-content:center;gap:22px;flex-direction:column;z-index:3}.pause-overlay>span{font-size:28px;font-weight:700}dialog{border:1px solid #cad5cb;border-radius:25px;padding:34px;max-width:460px;width:calc(100% - 28px);color:var(--ink);box-shadow:0 25px 100px #132c3755;background:#fafbf6;max-height:90svh;overflow:auto}dialog::backdrop{background:#102b386b;backdrop-filter:blur(4px)}dialog form{position:absolute;top:12px;left:12px}.close{border:0;width:44px;height:44px;background:transparent;font-size:28px}dialog h2{font-size:26px;line-height:1.25;margin:16px 0 12px}dialog p{color:var(--muted);line-height:1.55;font-size:15px}.formula{font:700 32px Arial,sans-serif;letter-spacing:2px;text-align:center;background:#e5edde;border:1px solid #d1ddca;border-radius:14px;padding:23px 10px;margin:24px 0}.choices{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.choices button{height:65px;border:1px solid #abbfb4;border-bottom:4px solid #a9bcb0;border-radius:12px;background:white;font-size:25px;font-weight:700}.choices button:disabled{cursor:default}.choices button.wrong{background:#ffe0c8}.choices button.correct{background:#b9e4b3;border-color:#78a06f}.feedback{min-height:24px;margin:16px 0 0}.hint{background:#fff0d8;border-radius:12px;padding:14px}.finish-star{font-size:70px;line-height:1;color:#d7983d;text-shadow:0 4px #f1d7b0}#finish{text-align:center}.learning{border:1px solid #c8d9bc;background:#e6f0dc;border-radius:12px;padding:16px;line-height:1.8;font-size:15px}.offline{text-align:right;margin:25px 0}.offline strong{font-size:15px}.offline p{margin:8px 0}.small{font-size:12px!important}.gate-action,.toast{animation:arrive .18s cubic-bezier(.23,1,.32,1)}@keyframes arrive{from{opacity:0;translate:0 6px}to{opacity:1;translate:0 0}}@media(hover:hover){.card-copy button:hover,.primary:hover{background:#2d5953}.control:hover{background:#e8f1e2}}@media(max-width:760px){.topbar{padding:17px 20px}.brand span{display:none}.lobby{padding:30px 20px 10px;gap:24px}.intro{grid-column:1/-1}.intro h1{font-size:46px}.intro p{font-size:15px}.setup{grid-column:1/-1;width:100%;padding:16px;justify-self:stretch;display:grid;grid-template-columns:1fr 1.5fr;align-items:center;gap:10px}.setup label{margin:0}.setup p{grid-column:1/-1;margin:0}.worlds{gap:14px;grid-template-columns:1fr}.world-card{display:grid;grid-template-columns:125px 1fr;direction:ltr}.world-card .picture{height:100%;min-height:205px}.card-copy{padding:20px;direction:rtl}.card-copy h2{font-size:22px}.card-copy p{margin:6px 0 15px;min-height:0;font-size:13px}.card-copy button{padding:12px;font-size:14px}.lobby-note{flex-wrap:wrap;gap:12px;font-size:12px}.built{align-items:flex-start;gap:18px;flex-direction:column}.game{padding:17px 12px}.game-top h1{font-size:20px}.quiet{padding:10px;font-size:12px}.game-top .eyebrow{font-size:10px}.game-status{gap:12px;margin-top:16px}.gate-dot{padding:6px 8px;font-size:12px}.checkpoint{display:none}.stage{height:clamp(280px,44svh,400px);border-radius:16px}.control-row p{font-size:11px;line-height:1.5;max-width:100px}.control{min-width:57px;height:58px}.jump{padding:0 15px}.jump span{display:none}.direction-controls{gap:7px}.game-bottom{margin-top:6px}.game-bottom>span{display:none}.game-bottom .text-button{font-size:13px}dialog{padding:30px 23px}.toast{font-size:12px;padding:10px;top:12px}}@media(max-height:540px) and (orientation:landscape){.topbar{display:none}.game{padding:9px 18px}.game-top h1{font-size:18px}.game-top .eyebrow{display:none}.game-status{margin:6px 0}.stage{height:calc(100svh - 179px);min-height:170px}.control-row{margin-top:7px}.control{height:45px}.game-bottom{margin:0}.game-bottom .text-button{min-height:35px;padding:6px}.control-row p{max-width:none}.gate-action{bottom:13px}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}button:active{transform:none}}
/* Give Hebrew vowel marks room above and below each line. */
.intro h1{line-height:1.2;letter-spacing:-.7px}.eyebrow{letter-spacing:0;line-height:1.65}.card-copy h2,.game-top h1,dialog h2{line-height:1.4;letter-spacing:0}.card-copy p,.intro p{line-height:1.75}.quiet,.primary,.text-button,.card-copy button,.setup select{line-height:1.6}.control-row p{font-size:15px;line-height:1.65}.hint,.feedback,.learning{font-size:16px;line-height:1.8}.about-oritai{grid-column:1/-1;border-top:1px solid var(--line);padding:4px 0;color:var(--muted);font-size:14px;line-height:1.7}.about-oritai summary{cursor:pointer;padding:13px 0;min-height:48px}.about-oritai>div{max-width:750px;padding-bottom:12px}.about-oritai p{margin:4px 0 12px}.about-oritai a{display:inline-block;padding:8px 0;text-underline-offset:4px}.about-oritai strong{color:var(--ink)}
@media(max-width:760px){.setup{grid-template-columns:1fr}.setup select{font-size:16px}.card-copy{padding:17px}.card-copy button{font-size:16px}.card-copy p{font-size:15px}.quiet{font-size:13px}.game-top h1{font-size:19px}.game-top{gap:8px}.control-row p{font-size:13px;max-width:100px}.jump{min-width:73px;padding:0 10px}.jump span{display:inline;font-size:13px;margin-left:4px}.game-bottom .text-button{font-size:15px}.gate-dot{font-size:13px}.toast{font-size:14px;line-height:1.65}.lobby-note{font-size:13px}.intro h1{font-size:43px}}
@media(max-height:540px) and (orientation:landscape){.game-top h1{font-size:18px}.control-row p{max-width:none;font-size:13px}.game-status{margin:3px 0}.game-bottom .text-button{font-size:13px}}

footer{flex-wrap:wrap;line-height:1.7}

.setup{width:370px;max-width:100%;padding:0;border:0;background:none}.setup p{margin:13px 0;font-size:14px}.setup .learner-note{font-size:12px}.choices.two{grid-template-columns:repeat(2,1fr)}.choices button{font-size:clamp(17px,4.8vw,25px);padding:4px}.formula{font-size:clamp(22px,5.6vw,32px);letter-spacing:0;overflow-wrap:anywhere}.lobby{align-items:start}@media(max-width:700px){.setup{width:100%;justify-self:stretch}}
/* Keep keyboard help, focus and enlarged layouts usable on narrow screens. */
.skip-link{position:fixed;top:12px;right:12px;z-index:100;background:#163e42;color:white;padding:14px;transform:translateY(-200%)}.skip-link:focus{transform:none}
.canvas-help{font-size:1rem;line-height:1.7;max-width:70ch}.topbar,.game-top,.game-status,.control-row{flex-wrap:wrap}.lobby>*,.world-card>*,.game-top>*{min-width:0}a,button{overflow-wrap:anywhere}footer a{min-height:44px;display:inline-flex;align-items:center}
button:focus-visible,a:focus-visible,select:focus-visible,canvas:focus-visible{outline-color:#863e1c}
@media(max-width:400px){.world-card{grid-template-columns:1fr}.world-card .picture{height:150px;min-height:0}.control-row p{flex-basis:100%;max-width:none;order:3}.game-top>div{order:-1;flex-basis:100%}.choices{grid-template-columns:repeat(2,minmax(0,1fr))}}

#canvas:focus-visible{outline-offset:-5px}
