@font-face{font-family:EzyArabic;src:url('./assets/fonts/vazirmatn-696249a2.ttf') format('truetype');font-style:normal;font-weight:100 900;font-display:swap}
@font-face{font-family:EzyLatin;src:url('./assets/fonts/atkinson-hyperlegible-latin-400.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:EzyLatin;src:url('./assets/fonts/atkinson-hyperlegible-latin-700.woff2') format('woff2');font-weight:700;font-display:swap}
:root{--ivory:#f7f3e8;--paper:#fffdf7;--pine:#173d35;--moss:#426b50;--coral:#b94e36;--gold:#e4b65a;--muted:#626b5e;--line:#dcded0;--soft:#eceee2;--shadow:0 20px 70px #173d351a;--radius:24px;--space:8px;--ar:EzyArabic,Tahoma,sans-serif;--en:EzyLatin,Arial,sans-serif;color-scheme:light}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overscroll-behavior:none}body{background:var(--ivory);font-family:var(--ar);color:var(--pine);font-size:20px;line-height:1.65;overflow:hidden}button,input,select{font:inherit}button{color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}button:disabled{cursor:default;opacity:.55}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #925529;outline-offset:4px}button svg{flex-shrink:0;vertical-align:middle}button{transition:background .18s,box-shadow .18s,transform .18s}button:active:not(:disabled){transform:translateY(2px)}a{color:inherit}[dir=ltr],.english{font-family:var(--en);direction:ltr;unicode-bidi:isolate}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.skip-link{position:fixed;z-index:100;top:8px;right:8px;background:var(--paper);padding:12px;transform:translateY(-200%)}.skip-link:focus{transform:none}
#scene-stage{position:fixed;inset:0;transition:right .6s cubic-bezier(.2,.7,.3,1)}.is-home #scene-stage{right:25%}#world{width:100%;height:100%;display:block;touch-action:none;outline-offset:-6px}#app{position:fixed;inset:0;pointer-events:none}#app button,#app a{pointer-events:auto}.app-header{display:flex;align-items:center;justify-content:space-between;padding:32px 4.3%;gap:20px;position:relative;z-index:4}.brand{display:flex;gap:12px;align-items:center;text-decoration:none;pointer-events:auto;border:0;background:none;padding:0;text-align:right}.brand-symbol{width:46px;height:46px;display:block}.wordmark{font-family:var(--en);font-size:29px;font-weight:700;line-height:1.05;letter-spacing:-1.1px;direction:ltr}.brand .wordmark{display:block}.brand-sub{display:block;font-size:18px;letter-spacing:1px;color:var(--muted);margin-top:2px;line-height:1.25}.header-actions{display:flex;align-items:center;gap:10px}.icon-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid #d5dacf;background:#fffdf7e8;border-radius:50%;min-width:46px;min-height:46px;padding:10px;box-shadow:0 4px 15px #173d3506}.icon-btn:hover{background:white;box-shadow:0 5px 18px #173d3517}.text-link{background:transparent;border:0;font-size:20px;font-weight:600;min-height:46px;padding:8px 12px}.home-content{position:absolute;z-index:2;right:7%;top:24%;width:36%;pointer-events:none}.eyebrow{display:flex;align-items:center;gap:9px;font-size:18px;font-weight:700;letter-spacing:1px;color:var(--moss);margin:0 0 18px}.eyebrow:before{content:'';display:inline-block;width:27px;height:1px;background:currentColor}.home-content h1{font-size:clamp(42px,4.5vw,72px);font-weight:800;letter-spacing:-2px;line-height:1.34;margin:0 0 20px;max-width:600px}.home-content h1 em{font-style:normal;color:var(--coral)}.home-description{font-size:20px;line-height:1.95;max-width:360px;color:#536254;margin:0 0 27px}.btn{border:0;display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:52px;padding:12px 24px;border-radius:15px;font-weight:700;font-size:20px}.btn-primary{background:var(--pine);color:var(--paper);box-shadow:0 6px 0 #0d2a24,0 12px 24px #173d3517}.btn-primary:hover{background:#254d41}.btn-secondary{background:var(--soft);color:var(--pine);border:1px solid #d2d8c9}.btn-coral{background:var(--coral);color:white;box-shadow:0 5px 0 #913b29}.btn-ghost{background:transparent;color:var(--pine);border:1px solid var(--line)}.home-primary{min-width:202px}.home-cta-note{font-size:18px;color:var(--muted);margin:15px 0 0;display:flex;align-items:center;gap:7px}.home-cta-note span{width:5px;height:5px;border-radius:50%;background:var(--moss)}.home-bottom{position:absolute;bottom:35px;right:7%;left:5%;display:flex;justify-content:space-between;align-items:flex-end;gap:30px}.home-summary{display:flex;gap:30px;pointer-events:none}.home-summary strong{font-family:var(--en);font-size:24px;line-height:1.2;display:block}.home-summary span{font-size:18px;color:var(--muted)}.island-caption{display:flex;align-items:center;gap:13px;border-right:1px solid #c8cdb9;padding:0 17px;color:var(--pine);background:none;max-width:240px}.island-caption .caption-number{font-family:var(--en);font-size:38px;font-weight:400;color:#7b8d74}.island-caption b{display:block;font-size:20px}.island-caption small{font-size:18px;color:var(--muted)}.home-footnote{position:absolute;left:5%;top:160px;writing-mode:vertical-rl;font-family:var(--ar);font-size:18px;letter-spacing:0;color:#5e7567}.home-wash{position:absolute;inset:0;background:linear-gradient(270deg,var(--ivory) 0%,var(--ivory) 24%,#f7f3e8c2 38%,#f7f3e800 57%);pointer-events:none}.home-progress{margin-top:24px;width:min(300px,100%)}.progress-track{height:5px;border-radius:20px;background:#dce2d2;overflow:hidden}.progress-track>span{display:block;height:100%;background:var(--moss);border-radius:20px}.home-progress small{display:block;margin-top:7px;font-size:18px;color:var(--muted)}
.is-playing .app-header{padding:20px 28px}.is-playing .brand-symbol{width:38px;height:38px}.is-playing .wordmark{font-size:23px}.is-playing .brand-sub{display:none}.stat-pills{display:flex;gap:8px}.stat-pill{background:#fffdf7ed;border:1px solid #d7ddce;box-shadow:0 4px 15px #173d3509;border-radius:30px;display:flex;align-items:center;gap:7px;padding:8px 13px;font-size:18px;min-height:43px}.stat-pill b{font-family:var(--en);font-size:20px}.stat-pill .coin-icon{color:#86601c}.quest-chip{position:absolute;top:99px;right:28px;width:260px;padding:17px 18px;background:#fffdf7ed;border:1px solid #dce0d3;border-radius:20px;box-shadow:var(--shadow);pointer-events:auto}.quest-chip small{display:block;color:var(--muted);font-size:18px}.quest-chip h2{font-size:20px;margin:3px 0 7px;line-height:1.45}.quest-chip .quest-link{display:flex;align-items:center;gap:8px;margin-top:12px;background:none;border:0;padding:0;min-height:44px;font-weight:700;font-size:18px;color:var(--moss)}.quest-chip .progress-track{height:4px}.world-label{position:absolute;bottom:126px;right:28px;display:flex;align-items:center;gap:10px;pointer-events:none}.world-label span{font-size:18px;background:#173d35ed;color:var(--paper);padding:5px 12px;border-radius:20px}.world-label small{font-size:18px;font-weight:600;background:#fffdf7ed;padding:5px 12px;border-radius:20px}.game-dock{position:absolute;bottom:max(25px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:flex;gap:6px;background:#fffdf7f2;padding:8px;border:1px solid #d1dacb;border-radius:24px;box-shadow:0 12px 35px #173d3520;pointer-events:auto}.dock-btn{border:0;background:transparent;border-radius:17px;padding:9px 17px;min-width:75px;min-height:65px;display:flex;align-items:center;flex-direction:column;gap:4px;font-size:18px;font-weight:650}.dock-btn:hover,.dock-btn.active{background:var(--soft)}.dock-btn.luma{background:var(--pine);color:var(--paper)}.dock-btn.luma:hover{background:#2d5744}.world-controls{position:absolute;left:25px;bottom:128px;display:flex;gap:8px;pointer-events:auto}.tool-action{position:absolute;bottom:33px;right:28px;pointer-events:auto;display:flex;align-items:center;gap:9px;max-width:265px}.tool-action>button{background:var(--pine);color:var(--paper);border:0;border-radius:50%;width:56px;height:56px;display:grid;place-items:center;box-shadow:0 5px 20px #173d3525}.tool-caption{background:#fffdf7ed;border:1px solid #dce0d3;border-radius:14px;padding:7px 12px;max-width:165px}.tool-caption b{font-size:18px;display:block}.tool-caption small{font-size:18px;display:block;line-height:1.5}.control-hint{position:absolute;left:28px;top:96px;color:#314e40;font-size:18px;pointer-events:none;background:#fffdf7d9;padding:7px 13px;border-radius:20px}.keycap{display:inline-block;direction:ltr;font:18px var(--en);border:1px solid #b9c5b0;border-radius:4px;padding:0 4px;margin:0 2px}.loading-cover{position:fixed;z-index:10;inset:0;background:var(--ivory);display:grid;place-items:center;text-align:center;transition:opacity .3s}.loading-cover svg{width:70px;height:70px;animation:loadspin 4s linear infinite}.loading-cover p{font-size:20px;color:var(--muted)}@keyframes loadspin{to{transform:rotate(360deg)}}
dialog{width:min(740px,calc(100% - 32px));max-height:calc(100dvh - 56px);padding:0;border:1px solid #d4dbca;border-radius:28px;background:var(--paper);color:var(--pine);box-shadow:0 28px 100px #102d354d;overscroll-behavior:contain;overflow:auto}dialog::backdrop{background:#15372c70;backdrop-filter:blur(6px)}dialog[open]{animation:panel-in .22s ease-out}@keyframes panel-in{from{transform:translateY(18px);opacity:0}to{transform:none;opacity:1}}.panel-header{display:flex;align-items:center;gap:14px;padding:24px 28px 17px;border-bottom:1px solid var(--line);position:sticky;top:0;background:#fffdf7f5;backdrop-filter:blur(10px);z-index:5}.panel-header .icon-btn{width:44px;min-width:44px;min-height:44px;padding:8px;box-shadow:none}.panel-heading{flex:1}.panel-heading h2{font-size:23px;line-height:1.4;margin:0;font-weight:750}.panel-heading p{font-size:18px;color:var(--muted);margin:2px 0 0}.panel-body{padding:26px 28px 30px}.panel-body h3{font-size:18px;margin:0 0 12px}.panel-body p{margin:0 0 15px}.muted{color:var(--muted)}.panel-tabs{display:flex;gap:7px;padding:5px;border:1px solid var(--line);border-radius:15px;background:var(--soft);margin-bottom:23px}.panel-tabs button{flex:1;border:0;background:none;border-radius:11px;min-height:44px;font-size:18px;font-weight:650;padding:8px}.panel-tabs button[aria-selected=true]{background:var(--paper);box-shadow:0 2px 8px #173d3510}.section-title{display:flex;align-items:center;justify-content:space-between;margin:24px 0 15px}.section-title h3{margin:0}.section-title small{font-size:18px;color:var(--muted)}.chapter-list{display:grid;gap:10px}.chapter-row{display:flex;align-items:center;gap:14px;padding:13px 15px;background:var(--paper);border:1px solid var(--line);border-radius:17px;text-align:right;min-height:76px;width:100%}.chapter-row:hover{background:var(--soft);border-color:#a8b9a0}.chapter-avatar{width:45px;height:45px;border-radius:14px;display:grid;place-items:center;background:var(--soft);color:var(--moss);font:700 19px var(--en);flex-shrink:0}.chapter-row .row-copy{flex:1}.chapter-row b{display:block;font-size:22px}.chapter-row small{font-size:18px;color:var(--muted)}.chapter-row .row-status{font:18px var(--en);color:var(--moss);display:flex;align-items:center;gap:7px}.chapter-avatar.done{background:var(--pine);color:var(--paper)}.map-surface{height:335px;border-radius:20px;position:relative;background:#dce8df;overflow:hidden;border:1px solid #c8d7c7}.map-surface>svg{position:absolute;inset:0;width:100%;height:100%;opacity:.95}.map-pin{position:absolute;transform:translate(50%,-50%);border:3px solid var(--paper);border-radius:50%;width:44px;height:44px;min-height:44px;background:var(--pine);color:var(--paper);display:grid;place-items:center;font:700 18px var(--en);box-shadow:0 3px 7px #173d3520}.map-pin:active:not(:disabled){transform:translate(50%,-50%) translateY(2px)}.map-pin.done{background:#53794b}.map-pin.bonus{background:var(--coral)}.map-caption{position:absolute;right:14px;bottom:10px;font-size:18px;color:#3d5847;pointer-events:none}.chapter-hero{display:flex;align-items:center;gap:20px;padding:22px;border-radius:21px;background:var(--soft);margin-bottom:23px}.chapter-hero .chapter-art{width:84px;height:84px;background:var(--paper);border-radius:22px;display:grid;place-items:center;flex-shrink:0;color:var(--moss)}.chapter-hero .chapter-art svg{width:44px;height:44px}.chapter-hero p{font-size:18px;margin:2px 0 0;color:var(--muted)}.lesson-note{line-height:1.95;font-size:20px}.examples{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0 24px}.example{padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:white;font-size:20px;font-family:var(--en);direction:ltr;unicode-bidi:isolate}.panel-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:24px}.panel-actions .btn{flex:1;min-width:155px}.lesson-progress{display:flex;align-items:center;gap:10px;margin-bottom:23px}.lesson-progress .progress-track{flex:1}.lesson-progress>span{font:18px var(--en);white-space:nowrap;direction:ltr;unicode-bidi:isolate}.exercise-prompt{font-size:25px;line-height:1.4;text-align:center;letter-spacing:-.3px;margin:15px 0!important;font-weight:700}.exercise-hint{text-align:center;font-size:20px;color:#58644e;line-height:1.85}.exercise-art{height:140px;display:grid;place-items:center;margin:0 0 14px;background:linear-gradient(160deg,#f0efe0,#e5ecdc);border-radius:20px;overflow:hidden}.exercise-art>svg{width:100%;height:100%;max-width:370px}.big-letter{font:700 85px var(--en);color:var(--pine)}.options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;direction:ltr;margin-top:24px}.answer-option{min-height:64px;background:#fff;border:2px solid #d6ddcf;border-radius:15px;font:700 21px var(--en);padding:13px;display:flex;align-items:center;justify-content:center;gap:12px;color:var(--pine)}.answer-option:hover{border-color:var(--moss);background:#eef2e8}.swatch{width:24px;height:24px;border-radius:7px;display:inline-block;border:1px solid #173d3530}.feedback{border-radius:18px;padding:20px;margin-top:24px;background:#e3efdd;border:1px solid #bfd0b7}.feedback.wrong{background:#fff0e6;border-color:#e4bf9e}.feedback h3{display:flex;align-items:center;gap:9px;font-size:18px;margin:0 0 8px}.feedback p{font-size:20px;line-height:1.8;margin:0 0 10px}.feedback .explanation{font-size:20px}.feedback .btn{margin-top:8px;width:100%}.answer-tray{display:flex;gap:7px;flex-wrap:wrap;align-items:center;justify-content:center;min-height:70px;border:2px dashed #c4ceba;border-radius:17px;margin:22px 0 14px;padding:12px;direction:ltr}.answer-tray button{min-width:44px;min-height:44px;border:1px solid #c6d0bd;background:white;border-radius:9px;font:700 19px var(--en);padding:7px 13px}.answer-tray .placeholder{font:20px var(--ar);color:#617057;direction:rtl}.letter-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:7px;direction:ltr;margin-bottom:20px}.letter-grid button{min-height:44px;border:1px solid #c6d0bd;background:white;border-radius:9px;font:700 18px var(--en)}.word-bank{display:flex;justify-content:center;gap:9px;flex-wrap:wrap;direction:ltr}.word-bank button{min-height:46px;border:1px solid #c6d0bd;background:white;border-radius:11px;padding:8px 15px;font:700 20px var(--en)}.exercise-tools{display:flex;align-items:center;justify-content:center;gap:12px}.exercise-tools button{min-height:44px}.build-area{display:grid;grid-template-columns:1fr 1fr;gap:15px;direction:ltr;margin:22px 0}.blueprint,.build-board{padding:14px;border:1px solid var(--line);background:var(--soft);border-radius:17px;text-align:center}.blueprint h4,.build-board h4{font:18px var(--ar);margin:0 0 13px;direction:rtl}.build-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.build-grid>button,.build-cell{min-height:67px;border:1px solid #b7c6ad;border-radius:9px;background:var(--paper);display:flex;flex-direction:column;align-items:center;justify-content:flex-end;padding:6px;gap:2px;font:18px var(--en)}.mini-block{display:block;width:26px;height:12px;background:var(--block-color);border:1px solid #173d3530;border-radius:2px}.color-choice{display:flex;gap:8px;justify-content:center;direction:ltr}.color-choice button{border:2px solid transparent;background:var(--paper);border-radius:10px;min-height:44px;padding:6px 11px;display:flex;align-items:center;gap:6px;font:18px var(--en)}.color-choice button[aria-pressed=true]{border-color:var(--pine)}
.tool-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.tool-card{border:1px solid var(--line);border-radius:19px;padding:18px 14px;background:white;display:flex;flex-direction:column;text-align:center;align-items:center}.tool-card.selected{border:2px solid var(--moss);padding:17px 13px;background:#f0f4e9}.tool-illustration{width:70px;height:70px;border-radius:50%;display:grid;place-items:center;background:var(--soft);color:var(--moss);margin-bottom:12px}.tool-illustration svg{width:36px;height:36px}.tool-card h3{font-size:20px;margin:0 0 8px}.tool-card p{font-size:18px;color:var(--muted);line-height:1.8;flex:1}.tool-card .btn{font-size:18px;min-height:44px;width:100%;padding:8px}.relic-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.relic-card{border:1px solid var(--line);border-radius:18px;background:var(--soft);padding:18px 10px;text-align:center}.relic-card.found{background:#fff6df;border-color:#e5d19f}.relic-card svg{width:38px;height:38px;color:#73521e;margin-bottom:10px}.relic-card h3{font-size:18px;margin:0 0 2px}.relic-card .english{font-size:32px;font-weight:700}.relic-card .btn{min-height:44px;padding:7px 12px;font-size:18px;margin-top:10px}.staff-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(128px,1fr));gap:12px}
.staff-card{border:1px solid var(--line);border-radius:18px;padding:16px;background:white;text-align:center;display:flex;flex-direction:column;gap:6px}
.staff-card.selected{border-color:var(--moss);box-shadow:0 0 0 2px #426b5030}
.staff-card h3{margin:0;font-size:20px}
.staff-card p{margin:0;font-size:18px;line-height:1.7;color:var(--muted)}
.staff-figure{height:110px;display:flex;justify-content:center}
.staff-figure svg{height:110px;width:auto}
.staff-level{font-size:20px;letter-spacing:2px;color:#D9A33B!important}
.staff-level span{color:#D5D9CC}
.staff-need{font-size:18px!important;color:var(--coral)!important}
.staff-max{font-weight:700;color:var(--moss)!important}
.staff-card .btn{width:100%}
.outfit-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.outfit-card{border:1px solid var(--line);border-radius:18px;padding:20px;background:white;text-align:center}.outfit-figure{height:80px;display:flex;justify-content:center}.outfit-figure svg{height:80px;width:70px}.outfit-card h3{font-size:20px;margin:10px 0 12px}.outfit-card .btn{width:100%;font-size:18px;min-height:44px}.journal-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.journal-stat{background:var(--soft);border-radius:17px;padding:20px 10px;text-align:center}.journal-stat strong{font:700 30px var(--en);display:block}.journal-stat span{font-size:18px;color:var(--muted)}.journal-empty{padding:28px;background:var(--soft);border-radius:17px;font-size:20px;text-align:center}.setting-row{padding:17px 0;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:16px}.setting-row>div{flex:1}.setting-row strong{display:block;font-size:20px}.setting-row small{font-size:18px;color:var(--muted);display:block;line-height:1.7}.switch{position:relative;width:52px;height:44px;min-width:52px;border:0;background:transparent;padding:7px 0}.switch:before{content:'';position:absolute;inset:8px 0;background:#c5cebc;border-radius:20px}.switch:after{content:'';position:absolute;top:12px;left:4px;width:20px;height:20px;border-radius:50%;background:white;box-shadow:0 1px 4px #173d3530;transition:transform .18s}.switch[aria-checked=true]:before{background:var(--moss)}.switch[aria-checked=true]:after{transform:translateX(24px)}.settings-note{font-size:18px;background:var(--soft);border-radius:14px;padding:15px;margin-top:22px!important;line-height:1.9}.danger-link{border:0;background:none;text-decoration:underline;color:#9a3c28;min-height:44px;font-size:18px;padding:8px 0}.luma-intro{display:flex;align-items:center;gap:20px;border-radius:22px;background:#e9eddd;padding:23px;margin-bottom:22px}.luma-orb{display:grid;place-items:center;width:74px;height:74px;border-radius:50%;background:#fff4c6;color:#55773e;box-shadow:0 0 35px #e4b65a30;flex-shrink:0}.luma-orb svg{width:45px;height:45px}.luma-intro h3{margin:0 0 5px}.luma-intro p{font-size:18px;margin:0;line-height:1.9}.help-steps{display:grid;gap:16px;margin:20px 0;padding:0;list-style:none;counter-reset:steps}.help-steps li{display:flex;gap:13px;align-items:flex-start;font-size:20px;line-height:1.9}.help-steps li:before{counter-increment:steps;content:counter(steps);background:var(--soft);width:32px;height:32px;flex-shrink:0;display:grid;place-items:center;border-radius:50%;font:700 18px var(--en)}.reward-hero{text-align:center;padding:18px 0}.reward-medallion{width:118px;height:118px;border-radius:50%;background:#f6e6ba;border:1px solid #dcc692;color:#825b1e;display:grid;place-items:center;margin:0 auto 24px;box-shadow:0 0 0 10px #f9f1da}.reward-medallion.hidden-picture{background:var(--soft);border-style:dashed;color:var(--muted)}
.reward-medallion svg{width:55px;height:55px}.reward-hero h3{font-size:27px;margin:12px 0}.reward-hero p{font-size:20px;color:var(--muted)}.reward-values{display:flex;justify-content:center;gap:14px;margin:20px 0}.reward-values span{display:flex;align-items:center;gap:7px;background:var(--soft);border-radius:13px;padding:10px 15px;font:700 20px var(--en)}.relic-word{font:700 38px var(--en);letter-spacing:3px;margin:18px 0 0!important;color:var(--pine)}.relic-answers{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin:22px 0}.relic-answers button{min-height:52px;border:1px solid var(--line);background:white;border-radius:12px;font-size:20px;padding:10px}.error-state{position:fixed;inset:50% auto auto 50%;transform:translate(-50%,-50%);background:var(--paper);padding:30px;border:1px solid var(--line);border-radius:24px;max-width:400px;z-index:6;pointer-events:auto}.error-state h2{font-size:22px}.error-state p{font-size:20px}#toast{position:fixed;z-index:30;bottom:132px;left:50%;transform:translate(-50%,15px);width:max-content;max-width:min(430px,calc(100% - 36px));padding:12px 20px;background:var(--pine);color:var(--paper);border-radius:15px;box-shadow:var(--shadow);font-size:20px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;text-align:center}#toast.visible{opacity:1;transform:translate(-50%,0)}.large-text{font-size:19px}.large-text .panel-body{font-size:19px}.large-text .panel-body p,.large-text .lesson-note,.large-text .exercise-hint{font-size:18px}.large-text .chapter-row b,.large-text .tool-card h3{font-size:22px}.large-text .chapter-row small,.large-text .tool-card p,.large-text .setting-row small{font-size:22px}.large-text .panel-body .btn{font-size:22px}.reduced-motion *, .reduced-motion *:before,.reduced-motion *:after{animation-duration:.001ms!important;transition-duration:.001ms!important;scroll-behavior:auto!important}
@media(min-width:1500px){.home-content{right:9%;top:26%}.home-description{font-size:19px}.home-content h1{font-size:78px}.home-bottom{right:9%}}
@media(max-width:1000px){.home-content{right:6%;width:42%;top:25%}.home-content h1{font-size:52px}.home-description{font-size:20px;max-width:300px}.is-home #scene-stage{right:18%}.home-wash{background:linear-gradient(270deg,var(--ivory) 0%,var(--ivory) 18%,#f7f3e8c9 34%,#f7f3e800 65%)}.home-footnote{display:none}.quest-chip{width:225px}.tool-action{right:20px}.tool-caption{display:none}.game-dock{gap:2px}.dock-btn{min-width:64px;padding:9px 13px}}
@media(max-width:650px){.app-header{padding:max(20px,env(safe-area-inset-top)) 22px 18px}.brand-symbol{width:39px;height:39px}.wordmark{font-size:25px}.brand-sub{font-size:18px}.header-actions{gap:5px}.text-link{font-size:18px;padding:8px}.icon-btn{min-width:44px;min-height:44px}.is-home #scene-stage{left:0;right:0;top:14%;height:49%;bottom:auto}.home-wash{background:linear-gradient(0deg,var(--ivory) 0%,var(--ivory) 15%,#f7f3e800 43%);inset:15% 0 0}.home-content{top:auto;bottom:max(79px,calc(env(safe-area-inset-bottom) + 65px));right:25px;left:25px;width:auto;text-align:right}.eyebrow{font-size:20px;gap:7px;margin-bottom:8px}.eyebrow:before{width:20px}.home-content h1{font-size:39px;letter-spacing:-1px;line-height:1.27;margin-bottom:9px}.home-content h1 br{display:none}.home-description{font-size:20px;line-height:1.7;max-width:360px;margin-bottom:17px}.home-primary{width:100%;min-height:54px;border-radius:15px}.home-cta-note{justify-content:center;font-size:18px;margin-top:12px}.home-bottom{bottom:max(17px,env(safe-area-inset-bottom));right:25px;left:25px;align-items:center}.home-summary{gap:20px}.home-summary strong{font-size:18px}.home-summary span{font-size:18px}.island-caption{max-width:155px;padding-right:11px;gap:9px}.island-caption .caption-number{font-size:26px}.island-caption b{font-size:18px}.island-caption small{font-size:18px}.home-progress{display:none}.is-playing .app-header{padding:max(14px,env(safe-area-inset-top)) 16px 12px}.is-playing .brand{gap:6px}.is-playing .brand-symbol{width:30px;height:30px}.is-playing .wordmark{font-size:20px}.stat-pill{padding:6px 10px;font-size:18px;min-height:37px;gap:5px}.stat-pill b{font-size:20px}.stat-pill svg{width:17px;height:17px}.stat-pills{gap:5px}.is-playing .header-actions{gap:6px}.is-playing .header-actions>.icon-btn{min-width:44px;min-height:44px;width:44px;height:44px}.quest-chip{top:max(79px,calc(env(safe-area-inset-top) + 62px));right:16px;width:185px;padding:13px 15px;border-radius:17px}.quest-chip small{font-size:18px}.quest-chip h2{font-size:20px}.quest-chip .quest-link{font-size:18px;margin-top:5px;min-height:44px}.quest-chip .quest-link svg{width:16px}.control-hint{display:none}.world-controls{left:16px;bottom:114px;gap:5px;flex-direction:column}.world-controls .icon-btn{min-width:44px;min-height:44px;width:44px;height:44px;padding:8px}.world-label{right:16px;bottom:110px;gap:5px;max-width:calc(100% - 80px);flex-wrap:wrap}.world-label span{font-size:18px;padding:4px 9px}.world-label small{font-size:18px;padding:4px 9px}.game-dock{bottom:max(17px,env(safe-area-inset-bottom));left:16px;right:16px;transform:none;justify-content:space-between;padding:6px;border-radius:22px;gap:1px}.dock-btn{min-width:0;flex:1;padding:8px 5px;min-height:61px;font-size:18px;border-radius:16px}.dock-btn svg{width:23px;height:23px}.tool-action{bottom:205px;right:16px}.tool-action>button{width:47px;height:47px}.tool-action>button svg{width:23px;height:23px}dialog{width:calc(100% - 20px);max-height:calc(100dvh - 24px);border-radius:23px}.panel-header{padding:18px 18px 14px;gap:10px}.panel-heading h2{font-size:20px}.panel-heading p{font-size:18px}.panel-body{padding:21px 18px 24px}.panel-tabs{gap:3px;padding:4px}.panel-tabs button{font-size:18px;padding:7px 4px}.map-surface{height:300px}.map-pin{width:44px;height:44px}.chapter-row{padding:11px;gap:10px}.chapter-avatar{width:41px;height:41px;font-size:20px}.chapter-row b{font-size:22px}.chapter-row small{font-size:18px}.chapter-hero{padding:17px;gap:14px}.chapter-hero .chapter-art{width:65px;height:65px;border-radius:17px}.lesson-note{font-size:20px}.exercise-prompt{font-size:22px}.exercise-art{height:125px}.answer-option{min-height:59px;font-size:19px}.options{gap:9px;margin-top:18px}.letter-grid{grid-template-columns:repeat(auto-fit,minmax(44px,1fr))}.tool-grid{grid-template-columns:1fr}.tool-card{display:grid;grid-template-columns:60px 1fr 80px;text-align:right;gap:5px 14px;padding:15px}.tool-card.selected{padding:14px}.tool-illustration{width:58px;height:58px;grid-row:1/3;margin:0}.tool-illustration svg{width:30px;height:30px}.tool-card h3{margin:0}.tool-card p{font-size:18px;grid-column:2;margin:0}.tool-card .btn{grid-column:3;grid-row:1/3}.relic-grid{grid-template-columns:repeat(2,1fr);gap:10px}.relic-card{padding:16px 10px}.outfit-grid{gap:10px}.outfit-card{padding:15px}.journal-stats{gap:8px}.journal-stat{padding:16px 5px}.journal-stat strong{font-size:25px}.journal-stat span{font-size:18px}.luma-intro{padding:18px;gap:14px}.luma-orb{width:59px;height:59px}.luma-orb svg{width:37px;height:37px}.luma-intro p{font-size:18px}.relic-answers{grid-template-columns:1fr}.build-area{gap:9px}.blueprint,.build-board{padding:10px}.build-grid{gap:5px}.build-grid>button,.build-cell{min-height:60px}.color-choice{gap:4px}.color-choice button{padding:6px;font-size:18px}.color-choice .swatch{width:18px;height:18px}.large-text .home-content h1{font-size:40px}.large-text .tool-card{grid-template-columns:50px 1fr}.large-text .tool-card .btn{grid-column:1/-1;grid-row:auto}.large-text .tool-card p{font-size:22px}#toast{bottom:110px;font-size:18px}}
@media(max-width:650px) and (max-height:740px){.is-home #scene-stage{top:12%;height:36%}.home-wash{inset:12% 0 0;background:linear-gradient(0deg,var(--ivory) 0%,var(--ivory) 52%,#f7f3e800 64%)}.home-content{bottom:72px}.home-content h1{font-size:30px;margin-bottom:6px}.home-description{font-size:20px;line-height:1.6;margin-bottom:12px}.home-cta-note{display:none}.eyebrow{margin-bottom:6px}.home-bottom{bottom:13px}.home-summary strong{font-size:20px}}
@media(max-height:520px) and (min-width:651px){.app-header{padding:16px 26px}.home-content{top:23%;right:6%;width:38%}.home-content h1{font-size:38px;margin-bottom:10px}.home-description{font-size:18px;margin-bottom:15px}.eyebrow{margin-bottom:10px}.home-bottom{bottom:20px}.home-cta-note,.home-progress{display:none}.home-summary strong{font-size:18px}.is-playing .quest-chip{top:80px;padding:12px 15px}.game-dock{bottom:12px}.dock-btn{min-height:52px;padding:5px 12px}.world-controls{bottom:95px}.world-label{bottom:96px}.tool-action{bottom:16px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;transition-duration:.001ms!important;scroll-behavior:auto!important}}
/* The six panel styles that used Kenney's brown pieces (CC0, still kept with their license) now wear the islands' colours (v4.1 plan, Sprint 1): cream #FFF8E7, its lip #EADFC3 and pine #173035. */
.btn-secondary{border:2px solid #EADFC3;background:#FFF8E7;border-radius:15px;padding:6px 18px;box-shadow:0 4px 0 #EADFC3;color:#173035}
.answer-option{border:2px solid #EADFC3;background:#FFF8E7;border-radius:18px;padding:10px 12px;box-shadow:0 4px 0 #EADFC3;color:#173035}
.answer-option:hover{filter:brightness(1.035);background:#FFF8E7}
.tool-illustration{background:#FFF8E7;border:3px solid #EADFC3;border-radius:50%;color:#173035}
.reward-medallion{background:#FFF8E7;border:3px solid #EADFC3;border-radius:50%;box-shadow:0 4px 0 #EADFC3;color:#173035}
.map-surface{border:6px solid #EADFC3;border-radius:22px}
.map-pin.bonus{background:var(--coral)}

.music-controls{padding:3px 0 22px;border-bottom:1px solid var(--line)}.music-controls label{display:flex;justify-content:space-between;gap:14px;font-size:20px;font-weight:700}.music-controls output{font-variant-numeric:tabular-nums;direction:ltr;unicode-bidi:isolate}.music-controls input[type="range"]{display:block;width:100%;min-height:44px;margin:5px 0;accent-color:var(--pine);direction:ltr}.music-controls p{font-size:18px;line-height:1.8;margin:5px 0;color:var(--muted)}.music-controls .music-note{font-size:18px}.music-retry[hidden]{display:none}.large-text .music-controls label{font-size:18px}.large-text .music-controls p{font-size:22px}

@media(max-width:650px){.home-bottom .island-caption{display:none}.home-bottom .home-summary{width:100%;justify-content:space-between;gap:16px}}

/* Compact touch HUD: three primary actions; secondary controls live in the menu. */
.mobile-play-header,.mobile-play-dock,.mobile-home-menu{display:none}
.journey-menu{display:grid;gap:4px}
.journey-menu-item{display:flex;align-items:center;gap:14px;width:100%;min-height:62px;padding:12px 4px;text-align:right;background:transparent;border:0;border-bottom:1px solid var(--line);border-radius:0}
.journey-menu-item:hover{background:var(--soft)}
.journey-menu-icon{display:grid;place-items:center;flex-shrink:0;width:42px;height:42px;border-radius:14px;background:var(--soft);color:var(--moss)}
.journey-menu-copy{display:block;min-width:0;flex:1}
.journey-menu-copy b{display:block;font-size:20px;line-height:1.6}
.journey-menu-copy small{display:block;font-size:18px;color:var(--muted);line-height:1.7}
.journey-menu-progress{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:18px;color:var(--muted);padding:0 0 14px;margin:0 0 8px;border-bottom:1px solid var(--line)}
.journey-menu-details{border-bottom:1px solid var(--line);margin-top:8px}
.journey-menu-details summary{cursor:pointer;min-height:50px;padding:13px 4px;font-size:20px;font-weight:650;touch-action:manipulation}
.journey-menu-details summary:focus-visible{outline:3px solid #925529;outline-offset:3px}
.journey-menu-actions{display:flex;flex-wrap:wrap;gap:8px;padding:4px 0 16px}
.journey-menu-actions button{min-height:46px;flex:1 1 auto;font-size:18px}
.journey-menu-home{margin-top:14px;min-height:46px;width:100%;font-size:18px}
.large-text .journey-menu-copy b{font-size:18px}.large-text .journey-menu-copy small{font-size:22px}
@media(max-width:650px),(max-width:1000px) and (max-height:520px){
 .is-home .desktop-home-actions,.is-playing .desktop-play-header,.is-playing .quest-chip,.is-playing .game-dock,.is-playing .world-controls,.is-playing .tool-action,.is-playing .control-hint,.is-playing .world-label{display:none}
 .is-home .mobile-home-menu{display:inline-flex}
 .mobile-play-header{position:absolute;top:max(12px,env(safe-area-inset-top));right:max(16px,env(safe-area-inset-right));left:max(16px,env(safe-area-inset-left));display:flex;align-items:center;justify-content:space-between;gap:16px;pointer-events:none}
 .mobile-play-header .wordmark{font-size:22px;letter-spacing:-.7px;text-shadow:0 1px 10px var(--ivory)}
 .mobile-play-header .stat-pill{padding:5px 10px;min-height:34px;gap:6px;box-shadow:none;font-size:18px}
 .mobile-play-header .stat-pill b{font-size:20px}
 .mobile-play-header svg{width:17px;height:17px}
 .mobile-play-dock{display:grid;grid-template-columns:minmax(0,2fr) repeat(2,minmax(0,1fr));gap:7px;position:absolute;bottom:max(12px,env(safe-area-inset-bottom));right:max(12px,env(safe-area-inset-right));left:max(12px,env(safe-area-inset-left));padding:7px;background:#fffdf7f5;border:1px solid #d1dacb;border-radius:23px;box-shadow:0 6px 25px #173d3520;pointer-events:auto}
 .mobile-dock-button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:62px;padding:7px 5px;border:0;border-radius:16px;background:transparent;font-size:18px;font-weight:650;line-height:1.5}
 .mobile-dock-button svg{width:23px;height:23px;flex-shrink:0}
 .mobile-dock-button:hover{background:var(--soft)}
 .mobile-dock-button.mobile-learn{flex-direction:row;gap:8px;padding:8px 10px;background:var(--pine);color:var(--paper)}
 .mobile-learn:hover{background:#254d41}.mobile-learn span{min-width:0;text-align:right}.mobile-learn b{display:block;font-size:20px;line-height:1.6}
 .large-text .mobile-learn b{font-size:22px}.large-text .mobile-dock-button{font-size:22px}
 dialog[data-screen="menu"]{margin:auto auto max(10px,env(safe-area-inset-bottom));width:min(470px,calc(100% - 20px));max-height:calc(100dvh - max(16px,env(safe-area-inset-top)) - max(20px,env(safe-area-inset-bottom)));border-radius:25px}
 dialog[data-screen="menu"] .panel-header{padding:17px 20px 13px}
 dialog[data-screen="menu"] .panel-body{padding:10px 20px 18px}
 #toast{bottom:calc(106px + env(safe-area-inset-bottom));font-size:20px}
}
@media(max-width:1000px) and (max-height:520px) and (min-width:651px){
 .mobile-play-dock{width:min(430px,calc(100% - 32px));left:50%;right:auto;transform:translateX(-50%);bottom:max(10px,env(safe-area-inset-bottom))}
 .mobile-dock-button{min-height:52px;flex-direction:row;gap:8px}.mobile-dock-button svg{width:21px;height:21px}
 dialog[data-screen="menu"]{max-height:calc(100dvh - 20px);margin:10px auto}
 .is-home .app-header{padding:max(12px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right))}
}@media(max-width:650px),(max-width:1000px) and (max-height:520px){.mobile-coins{display:flex;align-items:center;gap:6px;background:#fffdf7eb;border:1px solid #d7ddce;border-radius:30px;padding:5px 10px;font-size:18px}.mobile-coins b{font-weight:700;font-variant-numeric:tabular-nums}.mobile-coins svg{color:#86601c}}@media(max-width:360px){.mobile-dock-button.mobile-learn{gap:5px;padding-inline:8px}.journey-menu-home>.btn{width:100%}}
/* Spoken guidance stays in the open sheet; the mobile world keeps three main controls. */
.voice-controls{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px 28px;background:#e8eddd;border-bottom:1px solid #d6dfcb;font-size:18px;min-height:48px;color:#325c4a}.voice-controls .text-link{min-height:44px;flex-shrink:0;display:flex;align-items:center;gap:7px}.voice-controls #voice-status{max-width:65%}
.story-seals{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:0 0 25px}.story-seal{display:flex;align-items:center;flex-direction:column;gap:6px;padding:16px 4px;border-radius:15px;background:#ecebe1;color:#6f796a;font-size:18px}.story-seal.lit{background:#f6e4aa;color:#584518;box-shadow:inset 0 0 0 1px #d6b45b}
.intro-dialog{margin:auto;padding:0;border:0;max-width:100vw;max-height:100dvh;width:100vw;height:100dvh;background:#132a30;color:#fff4dd;overflow:hidden}.intro-dialog::backdrop{background:#132a30}.intro-frame{height:100%;position:relative}.intro-frame video{width:100%;height:100%;object-fit:contain}.intro-top{position:absolute;left:0;right:0;top:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:calc(16px + env(safe-area-inset-top)) 22px 12px;background:linear-gradient(#132a30d9,transparent);font-size:18px}.intro-top .btn{font-size:18px;min-height:44px;padding:10px 16px}.intro-bottom{position:absolute;bottom:0;left:0;right:0;text-align:center;padding:20px 22px calc(24px + env(safe-area-inset-bottom));background:linear-gradient(transparent,#132a30f2)}.intro-bottom p{max-width:620px;margin:0 auto;font-size:20px;line-height:1.8}.intro-bottom .btn{margin:12px auto 0}.intro-bottom [hidden]{display:none}
@media(max-width:650px){.voice-controls{padding-inline:18px}.intro-top{padding-inline:14px}.intro-top>span{max-width:46%}.intro-frame video{object-fit:cover}.intro-bottom p{font-size:20px}.story-seal{font-size:18px}}
.answer-option.tried{opacity:.45;text-decoration:line-through;cursor:default}
.answer-option.hint-pulse{outline:3px solid #e4b65a;outline-offset:3px;animation:hint-pulse 1.1s ease-in-out 3}
@keyframes hint-pulse{50%{transform:scale(1.04)}}
.intro-dialog :focus-visible{outline-color:#f2c46d}
.exercise-meaning{margin:4px 0 8px;font-size:20px}
/* A started save shows its progress in the bottom bar in place of the counters it repeats. */
.home-bottom .home-progress{margin-top:0}
@media(min-width:651px) and (min-height:521px){.home-bottom:has(.home-progress) .home-summary{display:none}}
/* Short landscape phones: the start button reaches the bottom bar, so the counters step aside like the note and progress do. */
@media(max-height:520px) and (min-width:651px){.home-bottom .home-summary{display:none}}
/* The caption keeps its own corner even when the bottom bar has nothing beside it. */
.home-bottom .island-caption{margin-inline-start:auto}
.save-tools{background:var(--soft);border-radius:14px;padding:15px;margin-top:14px;display:grid;gap:6px}.save-tools small{font-size:18px;line-height:1.8;color:var(--muted,inherit)}.save-tools .panel-actions{margin-top:6px}
.code-label{display:block;font-weight:700;margin:14px 0 6px}.save-code{width:100%;box-sizing:border-box;font:18px/1.5 ui-monospace,Consolas,monospace;border:1px solid var(--line);border-radius:12px;padding:10px;resize:vertical;word-break:break-all;background:white;color:inherit;text-align:left}
/* Walk-to-answer and encounter banner */
#field-hud{position:fixed;z-index:9;top:max(84px,calc(env(safe-area-inset-top) + 66px));left:50%;transform:translateX(-50%);width:min(520px,calc(100% - 24px));pointer-events:none}
#field-hud[hidden]{display:none}
.field-card{pointer-events:auto;background:#fffdf7f2;border:1px solid #dce0d3;border-radius:20px;box-shadow:var(--shadow);padding:14px 18px;text-align:center;backdrop-filter:blur(6px)}
.field-kicker{margin:0 0 4px;font-size:20px;font-weight:700;color:var(--coral,#C97557)}
/* Boss life as pips beside the "باقي … صح" text: filled pips are the right answers still needed. */
.boss-pips{display:inline-flex;gap:4px;margin-inline-start:8px;vertical-align:middle}
.boss-pips i{width:10px;height:10px;border-radius:50%;background:var(--coral,#C97557)}
.boss-pips i.done{background:transparent;box-shadow:inset 0 0 0 2px #d9b7a9}
.field-card h2{margin:0;font:700 21px/1.35 var(--en,sans-serif);color:var(--ink,#254C40)}
.field-answer.tried{color:#a3513f;text-decoration:line-through}
.field-picture{margin:4px auto 0;max-width:240px}.field-picture svg{display:block;width:100%;height:auto;max-height:74px}
@media(max-height:700px),(max-height:520px) and (orientation:landscape){.field-picture{margin-top:2px;max-width:190px}.field-picture svg{max-height:60px}}
.field-answer{margin:8px auto 0;min-height:1.6em;padding:6px 12px;border-radius:12px;background:var(--soft,#f1ede1);font:700 18px/1.4 var(--en,sans-serif);letter-spacing:.02em;max-width:100%;overflow-wrap:anywhere}
.field-hint{margin:6px 0 0;font-size:20px;line-height:1.7}
.field-choices{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:10px}
.field-choice{min-width:64px;min-height:48px;padding:6px 14px;border:1px solid #d7ddce;border-radius:14px;background:var(--paper);font:700 18px var(--en);color:var(--pine)}
.field-choice:disabled{opacity:.4}
.field-swatch{display:inline-block;width:26px;height:26px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px #c9cfc0;vertical-align:middle}
.field-actions{display:flex;justify-content:center;gap:16px;flex-wrap:wrap;margin-top:6px}
.field-actions .text-link{font-size:20px}
.large-text .field-kicker,.large-text .field-hint{font-size:22px}.large-text .field-card h2{font-size:23px}.large-text .field-actions .text-link{font-size:22px}
/* During a fight the dock is hidden: "اتركه وكمّل" on the fight card is the one way out. */
body.in-field .quest-chip,body.in-field .game-dock,body.in-field .mobile-play-dock{display:none}
.walk-answer{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:10px 0 4px}.walk-answer small{font-size:18px;line-height:1.7;flex:1;min-width:160px}
@media (max-width:650px){.field-card{padding:11px 14px}.field-card h2{font-size:18px}.field-hint{font-size:20px}.field-kicker{font-size:20px}}
/* Sound strand: listening rounds, letter-sound cards, word pairs and the daily review */
.listen-orb{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:112px;height:112px;border-radius:50%;border:0;background:var(--pine);color:var(--paper);box-shadow:0 6px 0 #0d2a24,0 14px 30px #173d3526;font-weight:700;font-size:18px;cursor:pointer}
.listen-orb:active{transform:translateY(3px);box-shadow:0 3px 0 #0d2a24}
.listen-fallback{font-size:20px;margin:6px 0}.listen-fallback b{font:700 19px var(--en)}
.word-chips{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.word-chip{display:inline-flex;align-items:center;gap:7px;min-height:44px;padding:7px 12px;border:1px solid var(--line);border-radius:12px;background:white;color:var(--pine);font-size:20px;cursor:pointer}
.word-chip b{font:700 20px var(--en)}.word-chip.heard{border-color:var(--moss);background:#eef4e8}
.sound-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:8px;margin:0 0 20px}
/* The letter cards and word pairs fold under one button at the two sound stations. */
.sound-explore{margin:18px 0 0;border:1px solid var(--line);border-radius:18px;background:var(--paper)}
.sound-explore>summary{display:flex;align-items:center;gap:8px;min-height:52px;padding:10px 16px;font-weight:700;color:var(--moss);cursor:pointer;list-style:none}
.sound-explore>summary::-webkit-details-marker{display:none}
.sound-explore>summary:after{content:'';margin-inline-start:auto;width:9px;height:9px;border:solid currentColor;border-width:0 2px 2px 0;transform:rotate(45deg);transition:transform .18s}
.sound-explore[open]>summary:after{transform:rotate(-135deg)}
.sound-explore>summary:focus-visible{outline:3px solid #925529;outline-offset:2px;border-radius:18px}
.sound-explore[open]{padding:0 14px 6px}
.sound-explore[open]>summary{padding-inline:2px}
/* Chapter panels keep their start button in view while the page scrolls. */
dialog[data-screen="chapter"] .panel-actions{position:sticky;bottom:0;z-index:2;margin-inline:-4px;padding:18px 4px 4px;background:linear-gradient(#fffdf700,var(--paper) 16px)}
.hold-count{display:inline-grid;place-items:center;min-width:28px;height:28px;margin-inline-start:10px;border-radius:50%;background:#fffdf733;font-weight:750;vertical-align:middle}
/* The story cards' choices stay in view while the card scrolls (owner, 4 November 2026): a footer that mirrors the panel header. */
dialog[data-screen="adventure"] .panel-actions,dialog[data-screen="welcome"] .panel-actions{position:sticky;bottom:0;z-index:2;flex-wrap:nowrap;margin:24px -28px -30px;padding:14px 28px 18px;border-top:1px solid var(--line);background:#fffdf7f5;backdrop-filter:blur(10px)}
dialog[data-screen="adventure"] .panel-actions .btn,dialog[data-screen="welcome"] .panel-actions .btn{min-width:0}
@media(max-width:650px){dialog[data-screen="adventure"] .panel-actions,dialog[data-screen="welcome"] .panel-actions{margin:20px -18px -24px;padding:12px 18px 14px}}
/* The title takes focus when a panel opens so screen readers start there; it is not a control, so iPhone browsers should not ring it. */
#panel-title:focus{outline:none}
/* English words inside Arabic text: a small gap, because a joined و before "an" read as "ang" (learner review). */
.en-run{margin-right:.18em;font-weight:600;white-space:nowrap}
/* A short note that says what the rule's own terms mean. */
.lesson-steps .word-note{margin:0}
.word-note{margin:0 0 14px;padding:10px 14px;border-radius:14px;background:#fbf6e8;font-size:20px;line-height:1.85}
.large-text .word-note{font-size:22px}
/* Two action buttons share a row on phones, so the examples get more of the screen. */
dialog[data-screen="chapter"] .panel-actions .btn{min-width:130px}
/* Example chips with the Arabic meaning under the English, and the word key for pronouns. */
.example.has-meaning{display:inline-flex;flex-direction:column;align-items:center;gap:2px;text-align:center}
.example.has-meaning small{font:400 20px/1.5 var(--ar);color:var(--muted);direction:rtl}
.large-text .example.has-meaning small{font-size:22px}
.word-key{list-style:none;display:flex;flex-wrap:wrap;gap:6px;padding:0;margin:0 0 16px}
.word-key li{display:flex;align-items:baseline;gap:6px;padding:4px 10px;border:1px solid var(--line);border-radius:12px;background:var(--paper);font-size:20px;line-height:1.5}
.word-key b{font:700 20px/1.5 var(--en)}
.large-text .word-key li{font-size:22px}
/* Station intro in three blocks: what we learn, the rule, and the challenge. */
.lesson-steps{display:grid;gap:10px;margin-bottom:18px}
.lesson-steps .lesson-note{margin:0}
.lesson-challenge{padding:10px 14px;border-radius:16px;background:var(--soft)}
.lesson-challenge b{color:var(--moss)}
.chapter-hero.compact{padding:12px 14px;gap:12px;margin-bottom:16px}
.chapter-hero.compact .chapter-art{width:48px;height:48px;border-radius:14px}
.chapter-hero.compact .chapter-art svg{width:28px;height:28px}
.chapter-hero.compact h3{font-size:20px;margin:0}
.vowel-list{display:grid;gap:8px;margin-bottom:6px}
.vowel-row{display:grid;grid-template-columns:56px 44px 1fr;align-items:center;gap:10px;min-height:60px;padding:8px 14px;border:1px solid var(--line);border-radius:16px;background:var(--paper);text-align:start;font:inherit;color:var(--pine)}
.vowel-row b{font:700 24px var(--en)}
.vowel-sound{font-size:30px;font-weight:700;line-height:1;color:var(--moss);text-align:center}
.vowel-copy{display:flex;flex-direction:column;gap:2px}
.vowel-copy small{font-size:18px;line-height:1.6}
.vowel-copy span{font:600 20px var(--en);color:var(--muted)}
.large-text .vowel-copy small{font-size:22px}
.sound-note{font-size:18px;color:var(--moss);font-weight:650}
.sound-card{display:flex;flex-direction:column;align-items:center;gap:1px;padding:9px 4px;border:1px solid var(--line);border-radius:14px;background:white;color:var(--pine);cursor:pointer;min-height:44px}
.sound-card b{font:700 24px/1.2 var(--en)}.sound-card span{font:600 20px var(--en)}.sound-card small{font-size:18px;color:var(--muted)}
.pair-list{display:grid;gap:8px;margin:0 0 20px}.pair-row{display:flex;flex-wrap:wrap;gap:8px}.pair-row .word-chip{flex:1;min-width:130px;justify-content:center}
.daily-review{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:16px 18px;margin:0 0 18px;border-radius:18px;background:linear-gradient(160deg,#eef4e8,#f7efd8);border:1px solid #d9e2cc}
.daily-copy{display:flex;flex-direction:column;gap:3px;flex:1;min-width:190px}.daily-copy b{display:flex;align-items:center;gap:7px;font-size:20px}.daily-copy small{font-size:18px;line-height:1.7}
.daily-streak{display:flex;align-items:center;gap:6px;color:var(--moss);font-weight:700}
@media (max-width:650px){.listen-orb{width:96px;height:96px}.sound-cards{grid-template-columns:repeat(auto-fill,minmax(78px,1fr))}.sound-card b{font-size:21px}}
/* Feel: visible thumbstick, coin pop, answer feedback motion and the graphics quality picker. */
.world-pad{position:fixed;z-index:8;left:max(24px,env(safe-area-inset-left));bottom:max(24px,env(safe-area-inset-bottom));width:112px;height:112px;border-radius:50%;border:2px solid #fff9e9cc;background:radial-gradient(circle,#254c4014 0 55%,#254c4038 100%);box-shadow:0 6px 22px #173d3524;backdrop-filter:blur(4px);touch-action:none;user-select:none;-webkit-user-select:none;display:grid;place-items:center;transition:opacity .2s,transform .2s;opacity:.82}
.world-pad[hidden]{display:none}
.world-pad.active{opacity:1;transform:scale(1.04)}
.world-pad-thumb{width:46px;height:46px;border-radius:50%;background:#fff9e9;border:2px solid #e4b65a;box-shadow:0 3px 10px #173d3540;pointer-events:none}
.world-pad:not(.active) .world-pad-thumb{transition:transform .15s ease-out}
body.has-world-pad #toast{bottom:156px}
@media(max-width:650px),(max-width:1000px) and (max-height:520px){
 .world-pad{left:max(16px,env(safe-area-inset-left));bottom:calc(max(12px,env(safe-area-inset-bottom)) + 94px)}
 body.has-world-pad #toast{bottom:calc(220px + env(safe-area-inset-bottom))}
}
/* Portrait phones in play: toasts sit under the top bar, clear of the hero and the paths. In a fight the fight card
   holds the top, so toasts stay above the thumbstick. */
@media(max-width:650px){body.has-world-pad.in-field #toast{bottom:calc(14px + env(safe-area-inset-bottom))}body.has-world-pad:not(.in-field) #toast{top:max(72px,calc(env(safe-area-inset-top) + 60px));bottom:auto;font-size:20px}}
@media(max-width:1000px) and (max-height:520px){.world-pad{width:96px;height:96px;bottom:calc(max(10px,env(safe-area-inset-bottom)) + 76px)}.world-pad-thumb{width:40px;height:40px}body.has-world-pad #toast{bottom:calc(90px + env(safe-area-inset-bottom));left:auto;right:16px;transform:none}}
@keyframes coin-pop{0%{transform:scale(1)}35%{transform:scale(1.22);box-shadow:0 0 0 6px #e4b65a55}100%{transform:scale(1)}}
.stat-pill.gain,.mobile-coins.gain{animation:coin-pop .6s ease-out}
@keyframes feedback-in{from{transform:scale(.94);opacity:0}to{transform:scale(1);opacity:1}}
@keyframes feedback-shake{20%,60%{transform:translateX(-7px)}40%,80%{transform:translateX(7px)}}
.feedback.enter{animation:feedback-in .28s ease-out}
.feedback.wrong.enter{animation:feedback-shake .4s ease-in-out}
@keyframes medal-in{0%{transform:scale(.4) rotate(-25deg);opacity:0}70%{transform:scale(1.08) rotate(4deg);opacity:1}100%{transform:scale(1) rotate(0)}}
.reward-medallion.enter{animation:medal-in .55s cubic-bezier(.3,1.4,.5,1)}
/* The win screen: twelve rays leave the medal as it lands, then a soft glow stays behind it. Reduced motion cuts the
   animation to its end state, which is the glow alone. */
.medal-stage{position:relative;width:118px;height:118px;margin:0 auto 24px}
.medal-stage .reward-medallion{position:relative;z-index:1;margin:0}
.mastery-burst{position:absolute;inset:-40px;pointer-events:none}
.mastery-burst:before{content:'';position:absolute;inset:14px;border-radius:50%;background:radial-gradient(circle,#ffe7a3 0,#ffe7a300 68%);opacity:.6}
.mastery-burst i{position:absolute;left:50%;top:50%;width:6px;height:16px;margin:-8px 0 0 -3px;border-radius:3px;background:var(--gold);opacity:0}
.mastery-burst i:nth-child(even){background:#e98a5b;height:11px;margin-top:-5px}
.reward-medallion.enter+.mastery-burst:before{animation:burst-glow .45s ease-out .2s both}
.reward-medallion.enter+.mastery-burst i{animation:burst-ray .45s ease-out .25s both}
@keyframes burst-glow{0%{opacity:0;transform:scale(.6)}45%{opacity:1;transform:scale(1.1)}100%{opacity:.6;transform:scale(1)}}
@keyframes burst-ray{0%{opacity:0;transform:rotate(var(--a)) translateY(-50px) scaleY(.4)}30%{opacity:1}100%{opacity:0;transform:rotate(var(--a)) translateY(-92px) scaleY(1)}}
.story-why{font-size:20px;line-height:1.8;color:var(--muted);margin:10px 0}
.large-text .story-why{font-size:22px}
@media(pointer:coarse){.desktop-only{display:none}}
.mobile-play-header .wordmark{background:#fffdf7e6;border:1px solid #d7ddce;border-radius:30px;padding:3px 12px}
.quality-controls{padding:17px 0;border-bottom:1px solid var(--line)}
.quality-controls strong{display:block;font-size:20px}
.quality-controls small{font-size:18px;color:var(--muted);display:block;line-height:1.7}
.quality-controls p{font-size:18px;color:var(--muted);margin:8px 0 0;min-height:1em}
.segmented{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;margin-top:10px;padding:4px;background:var(--soft);border-radius:14px}
.segment{min-height:44px;border:0;border-radius:11px;background:transparent;font:inherit;font-size:20px;font-weight:650;color:var(--pine)}
.segment[aria-checked=true]{background:var(--paper);box-shadow:0 2px 8px #173d351f}
.large-text .quality-controls small{font-size:22px}
.large-text .quality-controls p,.large-text .segment{font-size:22px}
.miss-note{font-weight:650;color:var(--coral)}
/* v2.1 firefly jar in the journal: calmed monsters per chapter, and shiny ones. */
.firefly-jar{list-style:none;margin:0 0 12px;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.firefly-jar li{display:flex;justify-content:space-between;align-items:center;gap:8px;background:var(--soft);border-radius:14px;padding:10px 14px;font-size:18px}
.firefly-jar b{display:flex;align-items:center;gap:4px;color:#825b1e;font:700 20px var(--en)}
.firefly-shiny{display:flex;align-items:center;gap:6px;color:#825b1e;font-weight:700;font-size:20px;margin:0 0 12px}
/* Boss battle (owner request, 4 November 2026): plates on top, whose turn it is, and the answers as a command card at the bottom. */
#battle-hud{position:fixed;z-index:9;top:max(72px,calc(env(safe-area-inset-top) + 60px));left:50%;transform:translateX(-50%);width:min(560px,calc(100% - 24px));pointer-events:none}
#battle-hud[hidden]{display:none}
.battle-plates{display:flex;gap:8px;align-items:stretch}
.battle-plate{background:#fffdf7f2;border:1px solid #dce0d3;border-radius:14px;box-shadow:var(--shadow);padding:7px 10px}
.boss-plate{flex:1 1 auto;min-width:0}.hero-plate{flex:0 0 31%}
.plate-head{display:flex;justify-content:space-between;align-items:baseline;gap:8px;font-size:18px}
.plate-head b{font-size:20px;white-space:nowrap}.plate-head small{color:var(--muted);font-size:18px;white-space:nowrap}
.battle-bar{height:12px;border-radius:7px;background:#e8e3d4;overflow:hidden;margin-top:4px;box-shadow:inset 0 1px 2px #173d3530}
.battle-bar i{display:block;height:100%;border-radius:7px;background:linear-gradient(#e2725b,#c2452d);transition:width .45s ease-out}
.battle-bar.shield i{background:linear-gradient(#9fd8ef,#5fb0d6)}
.battle-banner{margin:8px auto 0;width:fit-content;max-width:100%;padding:5px 16px;border-radius:999px;background:var(--pine,#254C40);color:#fff;font-size:20px;font-weight:700;text-align:center}
.battle-banner[data-turn=attack]{background:#c2452d}.battle-banner[data-turn=boss]{background:#7b5e8e}
.battle-banner[data-turn=win]{background:#e4b65a;color:#173d35;font-size:24px;padding:8px 26px}
body.in-battle #field-hud{top:auto;bottom:max(10px,env(safe-area-inset-bottom))}
body.in-battle .quest-chip,body.in-battle .game-dock,body.in-battle .mobile-play-dock,body.in-battle .world-label,body.in-battle .world-controls,body.in-battle .tool-action,body.in-battle .control-hint{display:none}
.battle-card{padding:10px 14px 6px}.battle-card h2{font-size:18px}.battle-card .field-hint{font-size:20px;line-height:1.55}
.battle-note{margin:6px 0 0;padding:6px 10px;border-radius:10px;background:#fdf1dc;font-size:20px;line-height:1.55}
.battle-card .field-choices{margin-top:8px}.battle-card .field-choice{min-height:52px;flex:1 1 28%}
.field-choice.hint{border-color:#e4b65a;box-shadow:0 0 0 3px #e4b65a88;animation:hint-pulse 1s ease-in-out infinite}
@keyframes hint-pulse{50%{box-shadow:0 0 0 7px #e4b65a44}}
body.reduced-motion .field-choice.hint{animation:none;transform:scale(1.06)}
.chapter-row:disabled{opacity:.62}
/* Short phones: a compact command card, and no game header, so the battle still shows. */
@media(max-height:700px) and (orientation:portrait){
 body.in-battle .mobile-play-header{display:none}
 #battle-hud{top:max(8px,env(safe-area-inset-top))}
 .battle-plate{padding:5px 8px}.battle-bar{height:9px;margin-top:3px}.plate-head b{font-size:18px}.plate-head small{font-size:18px}
 .battle-banner{margin-top:5px;padding:3px 12px;font-size:18px}
 .battle-card{padding:7px 10px 3px}.battle-card h2{font-size:20px}
 .battle-card .field-hint,.battle-note{font-size:18px;line-height:1.45;margin-top:3px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 .battle-card .field-answer{margin-top:4px;padding:3px 10px;font-size:20px;min-height:0}
 .battle-card .field-choices{margin-top:5px;gap:5px}.battle-card .field-choice{min-height:44px;flex:1 1 22%;min-width:48px;padding:3px 8px;font-size:20px}
 .battle-card .field-actions{margin-top:1px;gap:6px;flex-wrap:nowrap}.battle-card .field-actions .text-link{font-size:18px;padding:6px 4px;white-space:nowrap}
}
/* Landscape phones: the card docks at the left and the plates sit over the free side. */
@media(max-height:520px) and (orientation:landscape){
 body.in-battle .mobile-play-header{display:none}
 #battle-hud{left:auto;right:max(10px,env(safe-area-inset-right));top:8px;transform:none;width:calc(50% - 24px)}
 body.in-battle #field-hud{left:max(10px,env(safe-area-inset-left));right:auto;top:8px;bottom:auto;transform:none;width:calc(50% - 16px)}
 .battle-card{max-height:calc(100dvh - 16px);overflow:auto;padding:8px 12px 2px}.battle-card h2{font-size:20px}
 .battle-card .field-hint,.battle-note{font-size:18px;line-height:1.45;margin-top:3px}
 .battle-card .field-choices{margin-top:6px;gap:5px}.battle-card .field-choice{min-height:44px;font-size:20px}
 .battle-plate{padding:5px 8px}.battle-bar{height:9px;margin-top:3px}.battle-banner{margin-top:5px;padding:3px 12px;font-size:18px}
}
/* The title page fits any window (src/home-fit.js): on a short one the note under the button goes and the spacing tightens; on the shortest the line above the headline goes too.
   Its lines are balanced, so «سوا.» or «البرج.» never sits alone on a line, and on a phone too the headline breaks after «البرج طفى!». */
.home-content h1,.home-description{text-wrap:balance}@media(max-width:650px){.home-content h1 br{display:inline}}
.home-content.home-tight .home-cta-note,.home-content.home-tighter .eyebrow{display:none}@media(min-width:651px){.home-content.home-tight .eyebrow{margin-bottom:8px}.home-content.home-tight h1{line-height:1.25;margin-bottom:10px}.home-content.home-tight .home-description{line-height:1.6;margin-bottom:16px}}@media(max-width:650px){.home-content.home-tight .eyebrow{margin-bottom:4px}.home-content.home-tight .home-description{margin-bottom:8px}}

/* ISLAND FLOW's styles: the island home, the end of a game, the sheet, the gate and the map. No state here uses red, and nothing shakes or flashes. */
.fl-drawing{display:block;width:100%;height:100%}
/* A whole-screen stop on the frame: no speaker, strip or answers, so the picture area takes the room. */
.fl-screen .gf-listen,.fl-screen .gf-answers,.fl-sheet-screen .gf-listen,.fl-sheet-screen .gf-answers{display:none}
.fl-screen .gf-picture,.fl-sheet-screen .gf-picture{background:transparent;border-radius:0;overflow:visible}
.fl-screen .gf-art,.fl-sheet-screen .gf-art{display:block}
.fl-screen .gf-caption,.fl-sheet-screen .gf-caption{bottom:auto;top:8px}
.gf.fl-window{background:transparent}
.fl-window .gf-picture{background:transparent}
.fl-window .gf-listen,.fl-window .gf-answers{visibility:hidden}
.fl-window .gf-hanay{background:#fffdf7e6}
.gf.fl-window .gf-exit{background:#eceee2e6}
.fl-faded:after{content:"";position:fixed;inset:0;z-index:8;background:#fffdf7;animation:fl-fade-in .42s ease-out both;pointer-events:none}
@keyframes fl-fade-in{from{opacity:0}to{opacity:1}}
.gf.is-reduced.fl-faded:after{animation:none}

/* The island home, 375 x 812: the view, the beads, then the cards in play order. */
.fl-home{display:flex;flex-direction:column;gap:10px;height:100%}
.fl-home .fl-button{margin-top:auto}
.fl-view{position:relative;flex:0 1 auto;width:100%;aspect-ratio:343/260;min-height:130px;border-radius:18px;overflow:hidden;background:#dceee9}
.fl-view .fl-drawing{position:absolute;inset:0;width:100%;height:100%}
.fl-view-person{position:absolute;right:6px;bottom:0;width:74px;height:96px}
.fl-beads{display:flex;direction:ltr;justify-content:center;gap:10px;margin:0;padding:0;list-style:none}
.fl-bead{display:grid;place-items:center;width:36px;height:36px;padding:7px;border:2px solid var(--line);border-radius:50%;background:var(--paper);color:var(--muted)}
.fl-bead.is-filled{border-color:var(--moss);background:var(--moss);color:var(--paper)}
.fl-bead.is-now{width:42px;height:42px;border-color:var(--gold);box-shadow:0 0 0 3px #e4b65a44;color:var(--pine)}
.fl-cards{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.fl-cards[data-count="1"]{grid-template-columns:minmax(0,180px);justify-content:center}
/* Letters island has eight stations, and its guard's card still has to fit on a phone. */
.fl-home{overflow-y:auto}
.fl-cards[data-count="7"],.fl-cards[data-count="8"]{grid-template-columns:repeat(3,1fr);gap:9px}
.fl-cards[data-count="7"] .fl-card:not(.is-wide),.fl-cards[data-count="8"] .fl-card:not(.is-wide){min-height:88px;padding:4px}
.fl-cards[data-count="7"] .fl-card:not(.is-wide) .fl-card-art,.fl-cards[data-count="8"] .fl-card:not(.is-wide) .fl-card-art{max-height:50px}
.fl-cards[data-count="7"] .fl-card:not(.is-wide) .fl-card-label,.fl-cards[data-count="8"] .fl-card:not(.is-wide) .fl-card-label{font-size:18px}
.fl-card{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:0;min-height:125px;padding:8px;border:2px solid var(--moss);border-radius:18px;background:var(--paper);color:var(--pine);box-shadow:0 6px 0 #426b5040,0 10px 18px #173d3524}
.fl-card:after{content:"";position:absolute;inset:-5px}
.fl-card:active{transform:scale(.97)}
.fl-card-art{display:block;flex:1;width:100%;min-height:0;max-height:84px}
.fl-card-label{font-size:20px;font-weight:700;line-height:1.3}
/* Dim with no lock icon, until the game before it is finished. */
.fl-card.is-dim{border-color:var(--line);background:var(--soft);box-shadow:none;opacity:.55}
.fl-card.is-wide{grid-column:1/-1;flex-direction:row;gap:14px;min-height:96px}
.fl-card.is-wide .fl-card-art{flex:none;width:96px;height:80px}
.fl-card.is-finished:before{content:"";position:absolute;top:-8px;right:-8px;width:34px;height:34px;border-radius:50%;background:var(--moss) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fffdf7' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E") center/20px no-repeat}
.fl-button{position:relative;display:flex;align-items:center;justify-content:center;gap:12px;min-height:80px;padding:10px 18px;border:0;border-radius:20px;background:var(--paper);color:var(--pine);font-size:22px;font-weight:700;box-shadow:0 6px 0 #426b5040,0 10px 18px #173d3524}
.fl-button:active{transform:scale(.97)}
.fl-button.is-primary{background:#FFC83D;color:#4A2E00;min-height:96px;font-weight:800;box-shadow:0 4px 0 #D99A1C,0 10px 18px #4a2e0026}
.fl-button.is-primary:active{box-shadow:0 1px 0 #D99A1C}
.fl-button.is-round{flex:none;width:96px;height:96px;padding:0;border:2px solid var(--moss);border-radius:50%}
.fl-mark{flex:none;width:40px;height:46px}

/* A game's end: what came back, then again and on. */
.fl-end{display:flex;flex-direction:column;gap:16px;height:100%}
.fl-end .fl-view{flex:none;width:100%;aspect-ratio:343/260;margin:auto 0}
.fl-end-space{flex:1}
.fl-end-buttons{display:flex;direction:ltr;align-items:center;gap:16px}
.fl-button.is-wide{flex:1}

/* The sheet, over the lit scene. The window's corners stay. */
.fl-sheet-screen.fl-window .gf-picture{overflow:visible}
.fl-sheet{position:absolute;left:0;right:0;bottom:0;display:flex;flex-direction:column;gap:10px;max-height:100%;padding:16px;border-radius:24px;background:var(--paper);box-shadow:0 -10px 30px #173d3530;animation:fl-rise .4s cubic-bezier(.215,.61,.355,1) both}
@keyframes fl-rise{from{transform:translateY(40px);opacity:0}to{transform:none;opacity:1}}
.gf.is-reduced .fl-sheet{animation:none}
.fl-sheet-stem{margin:0;font-size:22px;line-height:1.4}
.fl-chips{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:0;padding:0;list-style:none;overflow:auto;min-height:0}
.fl-chips li{display:flex;min-width:0}
.fl-chip{position:relative;display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;min-width:0;min-height:88px;padding:6px 4px;border:2px solid var(--line);border-radius:14px;background:#fffefb;color:inherit;font:inherit}
.fl-chip-word{font-family:var(--en);font-size:32px;font-weight:700;line-height:1.2}
.fl-chip-gloss{font-size:20px;line-height:1.3;color:var(--muted)}
.fl-chip-sound{display:grid;place-items:center;width:44px;height:36px;margin-top:2px;border-radius:12px;background:var(--soft);color:var(--pine)}
.fl-sheet .fl-button.is-primary{animation:gf-pulse 1.6s ease-in-out infinite}
.gf.is-reduced .fl-sheet .fl-button.is-primary{animation:none}

/* The gate. Between questions the arch fills the picture. During a question it sits on top, and the game's picture has the room under it. */
.fl-gate .gf-listen,.fl-gate .gf-answers{min-height:0}
.fl-gate:not(.is-asking) .gf-listen{visibility:hidden;min-height:0;height:0}
.fl-gate:not(.is-asking) .gf-answers{display:none}
.fl-gate .gf-picture{background:radial-gradient(ellipse 30% 3% at 20% 90%,#ffffff40 98%,#0000),radial-gradient(ellipse 22% 2.5% at 82% 94%,#ffffff33 98%,#0000),radial-gradient(ellipse 24% 2.5% at 80% 12%,#ffffff33 98%,#0000),linear-gradient(#A5E07F,#7CC65B)}
.fl-arch{position:absolute;left:0;right:0;top:0;bottom:0;display:flex;align-items:center;justify-content:center;padding:8px}
.fl-arch .fl-drawing{max-width:100%;max-height:100%;width:auto;aspect-ratio:240/216}
.fl-gate:not(.is-asking) .fl-arch .fl-drawing{width:100%;height:auto}
.fl-gate.is-asking .fl-arch{bottom:auto;height:136px;padding:6px 0}
.fl-gate.is-asking .gf-art{top:136px}
.fl-gate.is-asking .gf-caption{bottom:4px}
/* Before the first question the arrow can wait low on the left, so the review line runs along the top, as on the other whole-screen stops. */
.fl-gate:not(.is-asking) .gf-caption{bottom:auto;top:8px}
/* The rope only says the row can be tied, and at the gate the caption takes its place. The stones draw smaller, under the arch and clear of the caption. */
.fl-gate .pp-loose-rope{display:none}
.fl-gate .pp-tower{padding:4px 12px 44px}
.fl-gate .pp-stones{width:min(100%,190px);gap:4px}
.fl-gate .pp-stone{font-size:20px}
.fl-stone.is-lit{filter:drop-shadow(0 0 6px #6FCF7A)}
.fl-arch.is-open{animation:fl-arch-pulse 1.6s ease-in-out infinite}
@keyframes fl-arch-pulse{50%{transform:scale(1.025)}}
.gf.is-reduced .fl-arch.is-open{animation:none}
.fl-arch-hit{position:absolute;inset:0;padding:0;border:0;background:transparent;pointer-events:auto}
.fl-arch-shine{animation:fl-shine 2.4s ease-in-out infinite}
@keyframes fl-shine{50%{opacity:.12}}
.gf.is-reduced .fl-arch-shine{animation:none}

/* A resident named aloud, with a plate under the picture. Lina's and Sami's look the same, and the caption stays clear below them. */
.fl-meet{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;width:100%;height:100%;padding:12px 12px 92px}
.fl-meet .gf-model-card{flex:0 1 auto;min-height:0}

.segmented.is-two{grid-template-columns:repeat(2,1fr)}

/* The map stub. */
.fl-map{display:flex;flex-direction:column;gap:12px;height:100%}
.fl-map-sea{position:relative;flex:1;min-height:0;border-radius:24px;overflow:hidden;background:#5CC6D0}
.fl-map-sea .fl-drawing{position:absolute;inset:0;width:100%;height:100%}
.fl-map-island{position:absolute;width:58%;height:30%;padding:0;border:0;background:transparent;border-radius:50%}
.fl-map-island.is-home{left:2%;bottom:11%}
.fl-map-island.is-second{right:2%;top:15%}
.fl-map-hanay{position:absolute;display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:#fffdf7;color:var(--pine);box-shadow:0 0 0 3px #FFC83D,0 3px 8px #173d3533;pointer-events:none}
.fl-map-more{position:absolute;left:5%;top:19%;width:30%;text-align:center;font-size:18px;font-weight:600;color:#1F3A38;opacity:.6;pointer-events:none}
.fl-map-hanay.is-home{left:6%;bottom:36%}
.fl-map-hanay.is-second{right:8%;top:40%}
.fl-map-go{flex:none}

/* The caterpillar's fight, for a child who cannot read yet: a speaker, two large letter buttons and the link. No English prompt and no hint text. */
.fl-plain{padding:12px 14px 6px}
.fl-plain-top{display:flex;align-items:center;justify-content:center;gap:12px;min-height:72px}
.fl-plain-speaker{display:grid;place-items:center;width:72px;height:72px;padding:0;border:0;border-radius:50%;background:var(--pine);color:var(--paper)}
.fl-plain-word{font-family:var(--en);font-size:32px;font-weight:700;line-height:1.2}
.fl-plain-gloss{display:block;font-family:var(--ar);font-size:20px;font-weight:400;color:var(--muted)}
.fl-plain-picture{flex:none;width:72px;height:72px}
.fl-plain .field-choices{gap:12px;margin-top:10px}
.fl-plain .field-choice{flex:1 1 40%;min-height:96px;font-size:38px;border-width:2px;border-color:var(--moss)}
.fl-plain .field-choice.hint:disabled{opacity:1}
.fl-plain .field-actions{justify-content:center;margin-top:4px}
.fl-plain .battle-note{margin:6px 0 0;text-align:center;font-size:20px;line-height:1.5}
.battle-banner[data-turn=attack]{background:var(--pine,#254C40)}
body.in-battle .battle-banner[data-turn=attack]{font-family:var(--en)}

/* A fight has its own plates: the wordmark and coins step aside, as a frame's do, on a tablet too. */
body.in-battle .mobile-play-header,body.in-battle .desktop-play-header{display:none}
/* A plain fight's plates are pictures, not words: nothing here has to be read. */
.plate-face{display:block;width:44px;height:36px;color:var(--pine)}
.plate-face svg{display:block;width:100%;height:100%}
.battle-plate:has(.plate-face){display:flex;align-items:center;gap:8px}
.battle-plate:has(.plate-face) .battle-bar{flex:1;margin-top:0}
body.in-battle #battle-hud{top:max(8px,env(safe-area-inset-top))}


/* The game frame (lens-game-ui.md §5). Same corners everywhere, and nothing above z-index 100. Sizes are starting points from the touch note, not measurements.
   No state here uses red, and nothing shakes or flashes: right and wrong differ by where the answer ends up. */
.in-game-frame #app,.in-game-frame #toast,.in-game-frame .world-pad{visibility:hidden}
.gf{position:fixed;inset:0;z-index:90;display:grid;grid-template-rows:auto minmax(120px,1fr) auto auto;gap:8px;padding:max(8px,env(safe-area-inset-top)) 16px max(16px,env(safe-area-inset-bottom));background:var(--ivory);color:var(--pine);touch-action:manipulation;overflow:hidden}
.gf[hidden]{display:none}
.gf-bar{display:flex;direction:ltr;align-items:center;justify-content:space-between;gap:8px;min-height:64px}
/* Focus goes exit, هناي, then the speaker and answers (lens-game-ui.md §5.4), so the source order and the corners differ. */
.gf-hanay{order:0}.gf-dots{order:1}.gf-exit{order:2}
.gf-hanay,.gf-exit{position:relative;display:grid;place-items:center;width:64px;height:64px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--pine)}
.gf-hanay{background:var(--paper);box-shadow:0 2px 8px #173d3522}
.gf-hanay:after,.gf-exit:after{content:"";position:absolute;inset:-6px}
/* The way out: a pill flush against the screen's edge, «رجوع للجزيرة» beside a drawn island (v4.1 plan, Sprint 1). Its touch area reaches 6px past it. */
.gf-exit{display:flex;direction:rtl;align-items:center;gap:6px;width:auto;height:56px;margin-right:calc(-16px - env(safe-area-inset-right));padding:0 calc(12px + env(safe-area-inset-right)) 0 16px;border-radius:28px 0 0 28px;background:var(--paper);box-shadow:0 2px 8px #173d3522;color:var(--pine);font-size:20px;font-weight:800;line-height:1;white-space:nowrap}
.gf-exit-icon{flex:none;display:block;width:34px;height:34px}
.gf-exit-label{display:block}
.gf-dots{display:flex;direction:rtl;gap:10px;margin:0;padding:0;list-style:none}
.gf-dots[hidden]{display:none}
.gf-dot{width:14px;height:14px;border:2px solid var(--muted);border-radius:50%;background:transparent;transition:background .2s}
.gf-dot.is-filled{border-color:var(--moss);background:var(--moss)}
.gf-picture{position:relative;min-height:0;border-radius:20px;background:linear-gradient(#fffdf7,#f2eddc);overflow:hidden}
.gf-art{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}
.gf-overlay{position:absolute;inset:0;pointer-events:none}
.gf-overlay[hidden]{display:none}
.gf-model-card{width:min(62%,220px);aspect-ratio:1}
.gf-drawing{display:block;width:100%;height:100%}
.gf-caption{position:absolute;left:8px;right:8px;bottom:8px;margin:0;padding:6px 12px;border-radius:14px;background:#fffdf7f2;box-shadow:0 2px 10px #173d351f;font-size:22px;line-height:1.5;text-align:center}
.gf-caption[hidden]{display:none}
.gf-listen{position:relative;display:flex;direction:ltr;align-items:center;gap:12px;min-height:96px}
.gf-speaker{position:relative;flex:none;display:grid;place-items:center;width:96px;height:96px;padding:0;border:0;border-radius:50%;background:var(--pine);color:var(--paper)}
.gf-speaker[hidden]{display:none}
.gf-speaker.is-ringing:before,.gf-speaker.is-ringing:after{content:"";position:absolute;inset:-6px;border:3px solid var(--moss);border-radius:50%;animation:gf-ring 1.1s ease-out infinite}
.gf-speaker.is-ringing:after{animation-delay:.45s}
@keyframes gf-ring{from{transform:scale(.92);opacity:.8}to{transform:scale(1.2);opacity:0}}
.gf-strip{position:relative;flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:72px;padding:6px 12px;border:2px solid var(--moss);border-radius:16px;background:var(--paper);overflow:hidden}
.gf-strip[data-strip=hidden]{visibility:hidden}
.gf-word{position:relative;display:inline-block;font-family:var(--en);font-size:32px;font-weight:700;line-height:1.3;padding-bottom:9px}
.gf-letter.is-gold{color:#a8761a;text-shadow:0 0 12px #e4b65a99}
.gf-gloss{font-size:20px;line-height:1.4;color:var(--muted)}
/* The sweep's soft light moves left to right, and evenly: no clip has per-word times. */
.gf-sweep{position:absolute;top:-6px;bottom:0;left:0;width:34%;background:linear-gradient(90deg,transparent,#e4b65a66,transparent);opacity:0;pointer-events:none}
.gf-sweep.is-running{animation:gf-sweep var(--sweep-s,1s) linear}
@keyframes gf-sweep{from{left:-34%;opacity:1}to{left:100%;opacity:1}}
/* The reading line: a thin pen line in the word's own ink, a dot under the first letter and an arrowhead just past the last. It has no shape around it, so it reads as neither a button nor "back". */
.gf-reading-line{position:absolute;left:0;right:-6px;bottom:2px;height:2px;background:currentColor;transform-origin:left center}
.gf-reading-line:before{content:"";position:absolute;left:-1px;top:-2px;width:6px;height:6px;border-radius:50%;background:currentColor}
.gf-reading-line:after{content:"";position:absolute;right:-1px;top:-3px;width:0;height:0;border-left:7px solid currentColor;border-top:4px solid transparent;border-bottom:4px solid transparent}
.gf-reading-line[data-line=draw]{transform:scaleX(0)}
.gf-reading-line.is-drawing{animation:gf-draw var(--sweep-s,1s) linear forwards}
@keyframes gf-draw{to{transform:scaleX(1)}}
.gf-wave{display:block;width:62%;height:3px;border-radius:2px;background:var(--line)}
.is-waving .gf-wave{height:18px;background:repeating-linear-gradient(90deg,var(--moss) 0 4px,transparent 4px 10px);animation:gf-wave .9s ease-in-out infinite alternate}
@keyframes gf-wave{from{transform:scaleY(.35)}to{transform:scaleY(1)}}
.gf-phone{position:absolute;left:104px;top:-30px;width:32px;height:44px}
.gf-phone[hidden]{display:none}
.gf-answers{display:grid;direction:ltr;grid-template-columns:repeat(2,1fr);gap:16px;min-height:125px}
.gf-answers[data-count="0"]{display:none}
.gf-answers[data-count="1"]{grid-template-columns:minmax(0,180px);justify-content:center}
.gf-answer{position:relative;display:flex;align-items:center;justify-content:center;min-width:0;min-height:125px;padding:8px;border:2px solid var(--line);border-radius:18px;background:var(--paper);color:var(--pine);font-family:var(--en);font-size:32px;font-weight:700;transition:box-shadow .16s,transform .16s,opacity .2s}
.gf-answer:after{content:"";position:absolute;inset:-10px}
.gf-answer .gf-drawing{max-height:105px}
.gf[data-profile=normal] .gf-answer{min-height:80px}
.gf[data-profile=normal] .gf-answer:after{inset:-4px}
/* The game's turn is flat, with no shadow and a thin edge. The child's turn stands up. */
.gf[data-turn=watch] .gf-answer{box-shadow:none;border-width:1px}
.gf[data-turn=act] .gf-answer:not(.is-off){border-color:var(--moss);box-shadow:0 6px 0 #426b5040,0 10px 18px #173d3524;transform:translateY(-2px);touch-action:none}
.gf-answer.is-off{opacity:.45}
.gf-answer:active{transform:scale(.96)}
.gf-answer.is-held{z-index:5;box-shadow:0 14px 26px #173d3540;transition:none}
.gf-answer.is-gliding{transition:transform .32s cubic-bezier(.215,.61,.355,1)}
.gf-answer.is-flying{z-index:5;transition:transform .32s cubic-bezier(.3,1.4,.5,1)}
.gf[data-turn] .gf-answer[data-state=faded]{opacity:.45}
.gf[data-turn] .gf-answer[data-state=gold]{border-color:var(--gold);box-shadow:0 0 0 4px #e4b65a66,0 6px 0 #426b5040;animation:gf-pulse 1.1s ease-in-out infinite}
.gf[data-turn] .gf-answer[data-state=pulsing]{animation:gf-pulse 1.1s ease-in-out infinite}
.gf[data-turn] .gf-answer[data-state=landed]{border-color:var(--moss);box-shadow:none}
.gf[data-turn] .gf-answer[data-state=landed]:before{content:"";position:absolute;top:-10px;right:-10px;width:40px;height:40px;border-radius:50%;background:var(--moss) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fffdf7' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E") center/26px no-repeat}
@keyframes gf-pulse{50%{transform:translateY(-2px) scale(1.05)}}
.is-wiggling{animation:gf-wiggle .32s ease-in-out}
@keyframes gf-wiggle{25%{transform:rotate(-2deg)}75%{transform:rotate(2deg)}}
.gf-next{position:absolute;left:24px;bottom:max(28px,env(safe-area-inset-bottom));z-index:6;display:grid;place-items:center;width:96px;height:96px;padding:0;border:0;border-radius:50%;background:var(--pine);color:var(--paper);box-shadow:0 8px 18px #173d3540}
.gf-next[hidden]{display:none}
.gf-next.is-pulsing{animation:gf-pulse 1.1s ease-in-out infinite}
.gf-hand{position:fixed;z-index:7;width:64px;height:64px;margin:6px 0 0 -18px;pointer-events:none;animation:gf-hand 1.2s ease-in-out infinite}
.gf-hand[hidden]{display:none}
@keyframes gf-hand{50%{transform:translateY(10px)}}
.gf-spark{position:absolute;left:50%;top:50%;width:8px;height:8px;margin:-4px;background:var(--gold);border:1px solid #173d3580;transform:rotate(45deg);animation:gf-spark .5s ease-out forwards}
@keyframes gf-spark{to{transform:rotate(var(--turn)) translateY(-70px) rotate(45deg);opacity:0}}
.has-glow{box-shadow:0 0 0 8px #e4b65a4d}
/* Reduced motion: cuts and fades only. The app's global rule already stops animations, and these stop what scripts move. */
.gf.is-reduced .gf-answer,.gf.is-reduced .gf-answer.is-gliding,.gf.is-reduced .gf-answer.is-flying{transition:opacity .15s}
.gf.is-reduced[data-turn] .gf-answer[data-state=gold],.gf.is-reduced[data-turn] .gf-answer[data-state=pulsing],.gf.is-reduced .gf-next.is-pulsing,.gf.is-reduced .gf-hand,.gf.is-reduced .is-waving .gf-wave,.gf.is-reduced .is-wiggling{animation:none}
.gf.is-reduced .gf-speaker.is-ringing:after{display:none}
.gf.is-reduced .gf-speaker.is-ringing:before{animation:none;transform:scale(1.1)}
@media(max-height:640px){
 .gf{gap:4px;padding-top:4px;padding-bottom:8px}
 .gf-bar{min-height:52px}
 .gf-hanay{width:52px;height:52px}
 .gf-exit{height:48px;font-size:18px}
 .gf-exit-icon{width:28px;height:28px}
 .gf-speaker{width:72px;height:72px}
 .gf-listen{min-height:72px}
 .gf-strip{min-height:56px}
 .gf-word{font-size:32px}
 .gf-answer{min-height:104px}
}
/* Narrow phones: the dots move closer, so هناي, the dots and the way out still share the top line. */
@media(max-width:360px){
 .gf-bar{gap:4px}
 .gf-dots{gap:5px}
 .gf-dot{width:11px;height:11px}
 .gf-exit{gap:4px;padding-left:10px;font-size:18px}
 .gf-exit-icon{width:28px;height:28px}
}
#slice-debug{position:fixed;inset:16px;z-index:95;overflow:auto;padding:16px;border-radius:16px;background:var(--paper);box-shadow:var(--shadow);font-family:var(--en);text-align:left}
#slice-debug[hidden]{display:none}
#slice-debug pre{white-space:pre-wrap;font-size:12px}
#slice-debug button{min-height:64px;min-width:160px;font-size:22px}

/* The islands' frame games: v2.1's rounds on the frame, Chameleon Hide and the walking puzzles' questions. Prefix ig-. */
.ig-big{font-family:var(--en);font-size:clamp(90px,28vw,150px);font-weight:800;line-height:1;color:var(--pine,#173d35)}
.ig-well{width:min(64%,240px);height:auto}
.ig-swatch{display:block;width:62px;height:44px;margin:0 auto 4px;border-radius:10px;border:2px solid #173d3555}
.ig-swatch-big{width:92px;height:92px;margin:0;border-radius:18px}
.ig-hide{--ig-skin:#6BD24E;--ig-dark:#1F9D57;--ig-band:#D9F24F;--ig-line:#14532D;background:#BFE8F5}
.ig-hide[data-state=hidden]{--ig-dark:var(--ig-skin);--ig-band:var(--ig-skin)}
.ig-scene{position:absolute;inset:0;width:100%;height:100%}
.ig-rock{position:absolute;inset:0;opacity:0;pointer-events:none;transition:opacity .35s ease}
.ig-hide[data-state=hidden] .ig-rock{opacity:1}
.ig-chameleon{position:absolute;inset:0;width:min(82%,330px);height:auto;margin:auto;overflow:visible}
.ig-skin path{transition:fill .35s ease,stroke .35s ease}
.ig-smile{transition:stroke .35s ease}
.ig-hide[data-state=hidden] .ig-chameleon{animation:ig-settle .5s ease-out both}
@keyframes ig-settle{40%{transform:scale(1.04,.96)}100%{transform:none}}
.ig-eye{transform-box:fill-box;transform-origin:center}
.ig-hide[data-state=plain] .ig-eye{animation:ig-blink 3.6s ease-in-out infinite}
@keyframes ig-blink{0%,92%,100%{transform:scaleY(1)}96%{transform:scaleY(.15)}}
.gf.is-reduced .ig-hide[data-state=hidden] .ig-chameleon,.gf.is-reduced .ig-eye{animation:none}
.gf.is-reduced .ig-skin path,.gf.is-reduced .ig-smile,.gf.is-reduced .ig-rock{transition:none}

/* The islands' interface look: gold means go, and panels are warm cream. Prefix iu-. This file joins before island.css, opening.css, pair-paint.css and pick.css, so a rule aimed at theirs needs a stronger selector. */
:root{--iu-go:#FFC83D;--iu-go-hover:#FFD45F;--iu-go-ink:#4A2E00;--iu-go-lip:#D99A1C;--iu-cream:#FFF8E7;--iu-ink:#1F3A38;--iu-teal:#2A6F6B;--iu-lip:#EADFC3}

/* Primary buttons. */
.btn-primary{background:var(--iu-go);color:var(--iu-go-ink);box-shadow:0 4px 0 var(--iu-go-lip),0 8px 16px #4a2e0022;font-size:20px;font-weight:800}
.btn-primary:hover{background:var(--iu-go-hover)}
.btn-primary:active{transform:translateY(3px);box-shadow:0 1px 0 var(--iu-go-lip)}
.btn-primary .hold-count{background:#4a2e0022}

/* The bar along the bottom. */
.mobile-play-dock{background:#fff8e7f5;border:0;border-radius:24px;box-shadow:0 6px 20px #4a2e0026}
.mobile-dock-button{color:var(--iu-ink);font-weight:700}
.mobile-dock-button svg{color:var(--iu-teal)}
.mobile-dock-button:hover{background:#fff}
.mobile-dock-button.mobile-learn{gap:6px;padding:6px 10px;background:var(--iu-go);color:var(--iu-go-ink);box-shadow:0 4px 0 var(--iu-go-lip)}
.mobile-dock-button.mobile-learn:hover{background:var(--iu-go-hover)}
.mobile-dock-button.mobile-learn:active{transform:translateY(3px);box-shadow:0 1px 0 var(--iu-go-lip)}
.mobile-dock-button.mobile-learn svg{color:var(--iu-go-ink)}
.mobile-learn span{flex:1;overflow:hidden}
/* هناي's walk button shows one bold line (v4.1 plan, Sprint 1). Where it walks to is in its label for a screen reader, and هناي says it. */
.mobile-learn b,.large-text .mobile-learn b{overflow:hidden;font-size:20px;font-weight:800;line-height:1.3;white-space:nowrap;text-overflow:ellipsis}

/* The logo and the walking puzzle's card want the same corner. */
body.in-puzzle .mobile-play-header .wordmark,body.in-puzzle .brand{visibility:hidden}

/* The end of a station. */
.iu-done{position:relative;padding:4px 0 8px}
.iu-confetti{position:absolute;inset:0 -18px;overflow:hidden;pointer-events:none}
.iu-confetti i{position:absolute;top:84px;left:50%;width:10px;height:14px;margin-left:-5px;border-radius:3px;background:var(--c);opacity:0;animation:iu-pop 1.2s cubic-bezier(.15,.7,.3,1) both;animation-delay:var(--d)}
.iu-confetti i:nth-child(3n){width:11px;height:11px;border-radius:50%}
@keyframes iu-pop{0%{opacity:1;transform:translate(0,0) rotate(0) scale(.6)}70%{opacity:1}100%{opacity:0;transform:translate(var(--x),var(--y)) rotate(var(--r)) scale(1)}}
.iu-confetti i:nth-child(1){--c:#FFC83D;--x:-150px;--y:-60px;--r:220deg;--d:0s}
.iu-confetti i:nth-child(2){--c:#1F7FE5;--x:-118px;--y:-84px;--r:-160deg;--d:.04s}
.iu-confetti i:nth-child(3){--c:#37B24D;--x:-84px;--y:-82px;--r:190deg;--d:.02s}
.iu-confetti i:nth-child(4){--c:#E8352B;--x:-46px;--y:-84px;--r:-240deg;--d:.06s}
.iu-confetti i:nth-child(5){--c:#FFD21F;--x:-14px;--y:-84px;--r:150deg;--d:0s}
.iu-confetti i:nth-child(6){--c:#1F7FE5;--x:22px;--y:-84px;--r:-200deg;--d:.05s}
.iu-confetti i:nth-child(7){--c:#FFC83D;--x:58px;--y:-82px;--r:260deg;--d:.03s}
.iu-confetti i:nth-child(8){--c:#E8352B;--x:92px;--y:-80px;--r:-170deg;--d:.07s}
.iu-confetti i:nth-child(9){--c:#37B24D;--x:128px;--y:-70px;--r:210deg;--d:.01s}
.iu-confetti i:nth-child(10){--c:#FFD21F;--x:154px;--y:-30px;--r:-230deg;--d:.05s}
.iu-confetti i:nth-child(11){--c:#1F7FE5;--x:158px;--y:40px;--r:180deg;--d:.02s}
.iu-confetti i:nth-child(12){--c:#E8352B;--x:138px;--y:96px;--r:-150deg;--d:.08s}
.iu-confetti i:nth-child(13){--c:#FFC83D;--x:-156px;--y:30px;--r:200deg;--d:.03s}
.iu-confetti i:nth-child(14){--c:#37B24D;--x:-140px;--y:90px;--r:-210deg;--d:.06s}
.iu-confetti i:nth-child(15){--c:#FFD21F;--x:-104px;--y:128px;--r:170deg;--d:.09s}
.iu-confetti i:nth-child(16){--c:#1F7FE5;--x:108px;--y:128px;--r:-190deg;--d:.04s}
body.reduced-motion .iu-confetti{display:none}
@media(prefers-reduced-motion:reduce){.iu-confetti{display:none}}
.iu-done-star{position:relative;display:grid;place-items:center;width:168px;height:168px;margin:0 auto 6px;border-radius:50%;background:radial-gradient(circle,#FFE9A8 0 58%,#ffe9a800 72%)}
.iu-done-star svg{width:112px;height:112px;fill:var(--iu-go);stroke:var(--iu-go-lip);stroke-width:1;stroke-linejoin:round}
.reward-hero.iu-done h3{margin:6px 0 8px;font-size:28px;font-weight:800;line-height:1.3;color:var(--iu-ink)}
.reward-hero.iu-done p{font-size:20px;line-height:1.7;color:var(--iu-ink)}
.reward-hero.iu-done p.eyebrow{margin-bottom:0;font-size:20px}
.iu-done-dots{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:14px 0 20px}
.iu-done-dots span{width:16px;height:16px;border-radius:50%;background:#37B24D;box-shadow:inset 0 -2px 0 #1f8f39}
.iu-done-dots span.off{background:#EADFC3;box-shadow:inset 0 -2px 0 #d8c9a6}
.iu-done .panel-actions{flex-direction:column;align-items:stretch;gap:8px;margin-top:0}
.iu-done .panel-actions .btn{flex:none;min-height:60px}
#panel .iu-text-link{align-self:center;color:var(--iu-teal);font-size:20px;font-weight:700;text-decoration:underline;text-underline-offset:3px}

/* The panels: a warm surface. */
#panel{--paper:#FFF8E7;--line:#EFE3C4;--soft:#FBEFCF;--muted:#4F6360;background:var(--iu-cream);border:0;border-radius:28px;box-shadow:0 24px 70px #4a2e0033;color:var(--iu-ink)}
#panel .panel-header{background:#fff8e7f5;border-bottom:0}
#panel .panel-heading h2{font-size:24px;font-weight:800}
#panel .panel-heading p{font-size:20px}
#panel .voice-controls{background:#FBEFCF;border-bottom:0;color:var(--iu-ink);font-size:18px}
#panel .btn-secondary,.field-card .btn-secondary{padding:10px 12px;border:0;border-image:none;border-radius:15px;background:#fff;box-shadow:0 4px 0 var(--iu-lip);color:var(--iu-ink);font-size:20px;font-weight:700}
#panel .btn-secondary:active,.field-card .btn-secondary:active{transform:translateY(3px);box-shadow:0 1px 0 var(--iu-lip)}
dialog[data-screen="chapter"] .panel-actions .btn-primary{flex:3 1 0;padding:10px 12px}
dialog[data-screen="chapter"] .panel-actions .btn-secondary{flex:2 1 0}

/* The lesson: its examples lead, and the words beside them are large. */
dialog[data-screen="chapter"] .panel-body{display:flex;flex-direction:column}
dialog[data-screen="chapter"] .panel-body>.examples{order:-2}
dialog[data-screen="chapter"] .panel-body>.examples+.text-link{order:-1;align-self:center;margin-bottom:14px}
#panel .examples{display:flex;flex-wrap:wrap;gap:12px;margin:0 0 6px}
#panel .example{flex:1 1 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:96px;min-height:72px;padding:10px 14px;border:0;border-radius:20px;background:#fff;box-shadow:0 4px 0 var(--iu-lip),0 8px 16px #4a2e0012;font:800 32px/1.25 var(--en);color:var(--iu-ink);text-align:center}
#panel .example.has-meaning small{font:600 20px/1.4 var(--ar);color:#4F6360}
#panel .lesson-note{margin:0 0 16px;font-size:20px;line-height:1.8;color:var(--iu-ink)}
#panel .lesson-steps{gap:14px}
#panel .word-note{background:#FBEFCF;font-size:20px;color:var(--iu-ink)}
.large-text #panel .lesson-note{font-size:21px}
.large-text #panel .word-note{font-size:18px}
#panel .chapter-hero{border:0;border-radius:20px;background:#FBEFCF}

/* The exercise's answers. */
#panel .answer-option{min-height:72px;padding:12px;border:0;border-image:none;border-radius:18px;background:#fff;box-shadow:0 4px 0 var(--iu-lip),0 8px 14px #4a2e0012;font:800 32px var(--en);color:var(--iu-ink)}
#panel .answer-option:hover{filter:none;background:#FFFBEF}
#panel .answer-option:active{transform:translateY(3px);box-shadow:0 1px 0 var(--iu-lip)}
#panel .exercise-art{border-radius:22px;background:linear-gradient(#EAF7FB,#FFF1C9)}
#panel .exercise-hint{font-size:20px;color:var(--iu-ink)}
/* A station's explanation before its activity: the same family as the letters station's lesson. */
#panel[data-screen="intro"] .panel-body{display:flex;flex-direction:column;gap:6px}
#panel[data-screen="intro"] .text-link{align-self:center}
#panel[data-screen="intro"] .panel-actions{position:sticky;bottom:0;z-index:2;margin:6px -4px 0;padding:14px 4px 4px;background:linear-gradient(#fffdf700,var(--paper) 14px)}
#panel[data-screen="intro"] .panel-actions .btn-primary{flex:1;min-height:60px;font-size:19px}
.iu-intro-show{display:grid;gap:8px;grid-template-columns:repeat(2,minmax(0,1fr))}
.iu-show-letters{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.iu-show-firsts{grid-template-columns:repeat(3,minmax(0,1fr))}
.iu-show-colours,.iu-show-words{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.iu-show-fork{display:flex;align-items:center;justify-content:center;gap:10px;direction:ltr}
.iu-ex{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:64px;padding:8px 4px;border:0;border-radius:16px;background:#fff;box-shadow:0 3px 0 var(--iu-lip),0 6px 12px #4a2e0012;color:var(--iu-ink);font:inherit;cursor:pointer}
.iu-ex:active{transform:translateY(2px);box-shadow:0 1px 0 var(--iu-lip)}
.iu-ex small{font-size:18px;line-height:1.3;color:#5E6B66}
.iu-ex-word{font:800 32px var(--en)}
.iu-ex-letter{font:800 32px var(--en);line-height:1}
.iu-ex-pic{display:block;width:clamp(44px,9dvh,64px);height:clamp(44px,9dvh,64px)}
.iu-ex-pic svg{display:block;width:100%;height:100%}
/* A colour answer on the panel is its paint alone, with no word under it. */
#panel .answer-option .gem-swatch{width:clamp(44px,8dvh,60px);height:clamp(44px,8dvh,60px);border-radius:14px;border:2px solid #173d3555}
.iu-ex-swatch{display:block;width:clamp(40px,8dvh,56px);height:clamp(40px,8dvh,56px);border-radius:12px;border:2px solid #173d3555}
.iu-ex-arrow{flex:none;width:20px;height:20px;color:#b98a4e}
.iu-ex-rope{flex:none;width:44px;height:16px}
.iu-ex-say{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:var(--iu-gold,#FFC83D);color:#3b2a00}
.iu-show-pairs .iu-ex{flex-direction:row;gap:6px;direction:ltr}
.iu-show-letters:has(>:nth-child(9)){grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
.iu-show-letters:has(>:nth-child(9)) .iu-ex{padding:6px 2px}
.iu-show-letters:has(>:nth-child(9)) .iu-ex-word{font-size:32px}
.iu-show-letters:has(>:nth-child(9)) .iu-ex small{font-size:18px}
.iu-ex-stone{display:grid;place-items:center;width:clamp(60px,12dvh,84px);height:clamp(60px,12dvh,84px);border-radius:50%;background:#F4ECD8;box-shadow:0 4px 0 #cdbb96;font:800 28px var(--en);color:var(--iu-ink);overflow:hidden}
.iu-ex-stone.is-right{background:#FFC83D;box-shadow:0 4px 0 #d39a12,0 0 0 4px #FFC83D55}
.iu-ex-stone .iu-ex-swatch{width:100%;height:100%;border:0;border-radius:0}
.iu-intro-learn{display:flex;align-items:center;gap:10px;margin:2px 0 0}
#panel .iu-intro-learn .lesson-note{margin:0;flex:1}
.iu-intro-figure{flex:none;display:block;width:clamp(48px,10dvh,68px);height:clamp(48px,10dvh,68px)}
.iu-intro-figure svg{display:block;position:static;width:100%;height:100%;margin:0;animation:none;transform:none}
.iu-intro-figure .ig-chameleon{--ig-skin:#6BD24E;--ig-dark:#1F9D57;--ig-band:#D9F24F;--ig-line:#14532D}
.iu-ex-feet{flex:none;width:30px;height:30px;color:#b98a4e}
.iu-ex-feet svg{display:block;width:100%;height:100%}
.iu-show-firsts .iu-ex-arrow{transform:rotate(90deg)}
.iu-how .iu-ex-arrow{transform:scaleX(-1)}
#panel .iu-intro-play{display:flex;align-items:center;gap:10px;margin:0}
.iu-how{flex:none;display:inline-flex;align-items:center;gap:2px;color:var(--iu-teal)}
.iu-how svg{width:22px;height:22px}
.iu-how .iu-ex-arrow{width:16px;height:16px}
@media(max-width:650px),(max-height:720px){
 #panel[data-screen="intro"]{max-height:calc(100dvh - 12px)}
 #panel[data-screen="intro"] .panel-header{padding:10px 12px 6px;gap:8px}
 #panel[data-screen="intro"] .panel-heading h2{font-size:19px}
 #panel[data-screen="intro"] .voice-controls{min-height:36px;padding:0 14px;font-size:18px}
 #panel[data-screen="intro"] .voice-controls .text-link{min-height:36px;padding:2px 6px}
 #panel[data-screen="intro"] .panel-body{padding:10px 14px 12px}
 #panel[data-screen="intro"] .panel-body>.text-link{min-height:32px;padding:2px 8px;font-size:18px}
 #panel[data-screen="intro"] .lesson-note{font-size:20px;line-height:1.5}
}
/* A question or a treasure's question fits on one screen, even on a phone in a browser with its bars showing, so no child scrolls to find the answers (owner, 7 November 2026). If the words still grow past the screen, the answers stay in reach. */
@media(max-width:650px),(max-height:720px){
 #panel:is([data-screen="exercise"],[data-screen="relic"]){max-height:calc(100dvh - 12px)}
 #panel:is([data-screen="exercise"],[data-screen="relic"]) .panel-header{padding:8px 12px 4px;gap:8px}
 #panel:is([data-screen="exercise"],[data-screen="relic"]) .panel-heading h2{font-size:18px}
 #panel:is([data-screen="exercise"],[data-screen="relic"]) .panel-heading p{display:none}
 #panel:is([data-screen="exercise"],[data-screen="relic"]) .voice-controls{min-height:36px;padding:0 14px;font-size:18px}
 #panel:is([data-screen="exercise"],[data-screen="relic"]) .voice-controls .text-link{min-height:36px;padding:2px 6px}
 #panel:is([data-screen="exercise"],[data-screen="relic"]) .panel-body{padding:8px 14px 12px}
 #panel[data-screen="relic"] .reward-hero{padding:0}
 #panel[data-screen="relic"] .reward-medallion{width:clamp(56px,15dvh,112px);height:clamp(56px,15dvh,112px);margin-block:0}
 #panel[data-screen="relic"] .reward-medallion svg{width:clamp(28px,8dvh,55px);height:clamp(28px,8dvh,55px)}
 #panel[data-screen="relic"] .reward-hero h3{font-size:20px;margin:4px 0 0}
 #panel[data-screen="relic"] .relic-word{font-size:32px;margin:0!important}
 #panel[data-screen="relic"] .reward-hero .text-link{min-height:32px;padding:2px 8px;font-size:18px}
 #panel[data-screen="relic"] .reward-hero p{margin:2px 0 4px;font-size:20px;line-height:1.5}
 #panel[data-screen="relic"] .relic-answers{grid-template-columns:repeat(3,minmax(0,1fr));margin:6px 0 2px}
 #panel[data-screen="relic"] .relic-answers button{min-height:clamp(56px,10dvh,76px);padding:6px}
 #panel[data-screen="relic"] .panel-actions{margin-top:8px}
 #panel[data-screen="exercise"] .lesson-progress{margin-bottom:8px}
 #panel[data-screen="exercise"] .exercise-art{height:clamp(56px,16dvh,130px);margin-bottom:6px}
 #panel[data-screen="exercise"] .big-letter{font-size:clamp(40px,12dvh,85px);line-height:1}
 #panel[data-screen="exercise"] .listen-orb{width:clamp(56px,14dvh,112px);height:clamp(56px,14dvh,112px);gap:0;font-size:18px}
 #panel[data-screen="exercise"] .listen-orb svg{width:clamp(22px,6dvh,46px);height:clamp(22px,6dvh,46px)}
 #panel[data-screen="exercise"] .exercise-prompt{font-size:20px;line-height:1.3;margin:4px 0!important}
 #panel[data-screen="exercise"] .panel-body>.text-link{display:flex;margin:0 auto;min-height:32px;padding:2px 8px;font-size:18px}
 #panel[data-screen="exercise"] .exercise-hint{font-size:20px;line-height:1.5;margin:0 0 4px}
 #panel[data-screen="exercise"] .walk-answer{justify-content:center;margin:4px 0 0}
 #panel[data-screen="exercise"] .walk-answer small{display:none}
 #panel[data-screen="exercise"] .walk-answer .btn{min-height:44px;padding:6px 16px;font-size:20px}
 #panel[data-screen="exercise"] .options{position:sticky;bottom:0;z-index:2;margin:6px -14px -12px;padding:8px 14px 12px;background:linear-gradient(#fffdf700,var(--paper) 8px)}
 #panel[data-screen="exercise"] .options:has(>:nth-child(3):last-child){grid-template-columns:repeat(3,minmax(0,1fr))}
 #panel[data-screen="exercise"] .answer-option{min-height:clamp(64px,11dvh,84px);padding:8px}
 #panel[data-screen="exercise"] .answer-option:has(.swatch){flex-direction:column;gap:2px;font-size:20px}
 #panel[data-screen="exercise"] .feedback{margin-top:8px;padding:12px 14px}
}

/* The toast, clear of the top bar. */
#toast,body.has-world-pad:not(.in-field) #toast{padding:12px 18px;border-radius:18px;background:var(--iu-cream);color:var(--iu-ink);box-shadow:0 10px 28px #17332a38;font-size:20px;font-weight:600;line-height:1.5}

/* The walking card, smaller, so the world stays in view. */
.field-card{background:#fff8e7f5;border:0;border-radius:22px;box-shadow:0 8px 22px #17332a2e;backdrop-filter:none}
.field-kicker{color:var(--iu-teal)}
.field-card h2{color:var(--iu-ink)}
.field-card .text-link{color:var(--iu-teal)}
@media(max-width:650px){
 .field-card:not(.battle-card){padding:8px 12px}
 .field-card:not(.battle-card) .field-kicker{margin:0 0 2px;font-size:18px}
 .field-card:not(.battle-card) h2{font-size:20px;line-height:1.25}
 .field-card:not(.battle-card) .field-hint{margin-top:2px;font-size:20px;line-height:1.45}
 .field-card:not(.battle-card) .field-actions{margin-top:2px;gap:10px}
 .field-card:not(.battle-card) .text-link{min-height:44px;padding:4px 8px}
}

/* The colour answers: a gem of a fixed colour on a strong card, the same family as the plain fight's letters. */
.field-choices.iu-gems{display:grid;grid-template-columns:repeat(auto-fit,96px);justify-content:center;gap:10px}
.field-choices.iu-gems:has(>:nth-child(4)){grid-template-columns:repeat(2,96px)}
.field-choices .field-choice.iu-gem{display:grid;place-items:center;flex:none;width:96px;min-width:96px;height:80px;min-height:80px;padding:0;border:2px solid var(--moss);border-radius:18px;background:#fff;box-shadow:0 4px 0 #426b5040}
.field-choices .field-choice.iu-gem:active{transform:translateY(3px);box-shadow:0 1px 0 #426b5040}
.iu-gem-shape{display:block;width:56px;height:56px}
@media(max-height:520px){
 .field-choices .field-choice.iu-gem{width:72px;min-width:72px;height:56px;min-height:56px}
 .field-choices.iu-gems{grid-template-columns:repeat(auto-fit,72px)}
 .field-choices.iu-gems:has(>:nth-child(4)){grid-template-columns:repeat(4,72px)}
 .iu-gem-shape{width:40px;height:40px}
}

/* The Wall's empty slots. */
.pp-swatch:not([style]){background:#fff;border:3px dashed var(--iu-teal)}

/* The maps: one toy sea at three distances. The atlas and the chain map share a frame. */
.map-surface,.fl-map-sea{border:4px solid #F3D58B;border-image:none;border-radius:20px;background:#4FC6D8}
.map-surface{height:auto;aspect-ratio:320/280;margin-bottom:12px;box-shadow:none}
.map-surface>svg{opacity:1}
.iu-place{display:block;width:32px;height:32px}
.map-pin.iu-pin{transform:translate(-50%,-50%);width:48px;height:48px;min-height:48px;padding:5px;border:3px solid #FFC531;border-radius:50%;background:#fff;box-shadow:0 3px 6px #17332a40}
.map-pin.iu-pin:active:not(:disabled){transform:translate(-50%,-50%) translateY(2px)}
.map-pin.iu-pin.done{border-color:#22A559;background:#fff}
.iu-tick{position:absolute;top:-6px;right:-6px;display:block;width:18px;height:18px;border-radius:50%;background:#22A559;box-shadow:0 0 0 2px #fff}
.iu-tick svg{display:block;width:18px;height:18px}
#panel .chapter-avatar.iu-row-pic{position:relative;width:52px;height:52px;border-radius:16px;background:#fff;box-shadow:inset 0 0 0 2px #F3D58B}
#panel .chapter-avatar.iu-row-pic .iu-place{width:44px;height:44px}
#panel .chapter-avatar.iu-row-pic.is-played{box-shadow:inset 0 0 0 3px #22A559}

/* The one "you" marker: a 44 px disc, a tail planted at left and top, a shadow, and the orange ring that means nothing else. */
.iu-hero{position:absolute;z-index:3;display:block;width:44px;height:52px;transform:translate(-50%,-100%);pointer-events:none}
.iu-hero-disc{position:absolute;top:0;left:0;display:grid;place-items:center;width:44px;height:44px;box-sizing:border-box;border:3px solid #FF7A2F;border-radius:50%;background:#fff;color:#1F3A38}
.iu-hero-tail{position:absolute;left:50%;top:41px;margin-left:-7px;width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-top:11px solid #FF7A2F}
.iu-hero-shadow{position:absolute;left:50%;bottom:-4px;width:24px;height:8px;margin-left:-12px;border-radius:50%;background:#17332a40}
.iu-hero.is-small{left:30%;top:66%;transform:translate(-50%,-100%) scale(.55);transform-origin:50% 100%}

/* The island list. */
.iu-thumb{position:relative;display:block;flex:none;width:56px;height:44px}
.iu-thumb>svg{display:block;width:56px;height:44px}
.iu-dots{display:flex;flex-wrap:wrap;gap:5px;margin-top:5px}
.iu-dots i{display:block;width:8px;height:8px;border-radius:50%;background:#E8DFC8}
.iu-dots i.on{background:#FFC531}
.iu-title-dots{justify-content:center;margin:-10px 0 12px}
#panel .chapter-row.iu-here:disabled,#panel .chapter-row.iu-locked:disabled{opacity:1}
#panel .chapter-row.iu-locked b,#panel .chapter-row.iu-locked small{color:#5E6B66}
.panel-tabs .iu-tab{display:flex;align-items:center;justify-content:center;gap:6px}
.iu-tab-pic{display:block;flex:none;width:20px;height:14px}

/* The chain map. */
.fl-map-island{width:58%;height:22%}
.fl-map-island.is-home{left:4%;top:64%;bottom:auto}
.fl-map-island.is-second{right:3%;top:37%}
.fl-map-more{left:2%;top:30%;width:36%;font-size:20px;font-weight:700;color:#0B5563;opacity:1}
.fl-map-hanay.iu-hero{display:block;width:44px;height:52px;border-radius:0;background:none;box-shadow:none}
.fl-map-hanay.iu-hero.is-home{left:19%;top:83%;right:auto;bottom:auto}
.fl-map-hanay.iu-hero.is-second{left:49.6%;top:49.5%;right:auto;bottom:auto}

/* Touch sizes (v4.1 plan, Sprint 1): main buttons are 64 to 80px high, each with a touch area a little larger than its drawing, and the panels' answers are 80px. */
.btn-primary,#panel .panel-actions .btn{min-height:64px}
.home-primary,.fl-start,.mobile-dock-button.mobile-learn{min-height:72px!important}
.btn-primary,.mobile-dock-button.mobile-learn,.fl-start{position:relative}
.btn-primary:after,.mobile-dock-button.mobile-learn:after,.fl-start:after{content:"";position:absolute;inset:-8px;border-radius:inherit}
#panel[data-screen="exercise"] .answer-option{min-height:80px}
.row-hint small{font-size:20px}
/* English example words at 32px need two columns on a phone (v4.1 plan, Sprint 1): each card puts its picture beside its word and the word's meaning. */
.iu-show-colours,.iu-show-words{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.iu-show-colours .iu-ex,.iu-show-words .iu-ex{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto;align-items:center;justify-items:center;column-gap:8px;row-gap:0;min-height:0;padding:8px 10px}
.iu-show-colours .iu-ex>:first-child,.iu-show-words .iu-ex>:first-child{grid-row:1/3}
/* Narrow phones: هناي's button takes a little more of the bar, so its one line at 20px stays whole; on the narrowest it drops to the 18px floor. */
@media(max-width:400px){
 .mobile-play-dock{grid-template-columns:minmax(0,2.4fr) repeat(2,minmax(0,1fr))}
 .mobile-dock-button.mobile-learn{gap:4px;padding-inline:8px}
 .mobile-dock-button.mobile-learn svg{width:20px;height:20px}
}
@media(max-width:350px){.mobile-learn b,.large-text .mobile-learn b{font-size:18px}}
/* The big letter the letters rounds' hint «هذا حرف كبير، …» points at, on its own (14 November 2026). English targets are 32px or more (v4.1 plan, Sprint 1). */
.hint-letter{display:inline-block;min-width:48px;margin-inline-end:10px;padding:0 10px;border:2px solid var(--gold);border-radius:12px;background:#FFF8E7;color:var(--pine);font:700 32px/1.25 var(--en);text-align:center;vertical-align:middle}

/* The walking islands: the island's name on arrival, the hand on the first walk, and the card of a walking puzzle. Prefix il-. */
.il-banner{position:fixed;top:18%;left:50%;z-index:30;transform:translateX(-50%);padding:10px 26px;border-radius:999px;background:#fffdf7f2;color:#173d35;font-size:clamp(22px,6vw,34px);font-weight:800;white-space:nowrap;box-shadow:0 10px 30px #17332a33;pointer-events:none;animation:il-banner 2.6s ease-out both}
@keyframes il-banner{0%{opacity:0;transform:translate(-50%,-14px) scale(.92)}12%{opacity:1;transform:translate(-50%,0) scale(1)}80%{opacity:1}100%{opacity:0}}
.il-hand{position:fixed;left:0;top:0;z-index:30;width:64px;height:64px;margin:-6px 0 0 -18px;pointer-events:none}
.il-hand svg{width:100%;height:100%;animation:gf-hand 1.2s ease-in-out infinite}
.il-puzzle{position:fixed;z-index:30;top:max(14px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:24px;background:#fffdf7f5;box-shadow:0 10px 30px #17332a33}
.il-puzzle-say{width:64px;height:64px;border:0;border-radius:50%;background:#f6d572;color:#173d35;display:grid;place-items:center;cursor:pointer}
.il-puzzle-say:active{transform:scale(.94)}
.il-puzzle-word{font-size:32px;font-weight:800;color:#173d35}
.il-puzzle-dots{display:flex;gap:6px;margin:0;padding:0;list-style:none}
.il-puzzle-dots li{width:14px;height:14px;border-radius:50%;background:#d9d2bd}
.il-puzzle-dots .is-now{background:#f6d572;box-shadow:0 0 0 3px #f6d57266}
.il-puzzle-dots .is-done{background:#478364}
.il-puzzle-exit{width:44px;height:44px;border:0;border-radius:50%;background:#eceee2;color:#173d35;display:grid;place-items:center;cursor:pointer}
/* The first walk's tour. The ring dims what is around it and takes no touches, so nothing is ever blocked. */
.il-tour-ring{position:fixed;z-index:29;border-radius:24px;box-shadow:0 0 0 4px #FFC83D,0 0 0 9999px #17332a4d;pointer-events:none;animation:il-tour-pulse 1.4s ease-in-out infinite}
.il-tour[data-step=free] .il-tour-ring{border-radius:50%;box-shadow:0 0 0 4px #FFC83D}
.il-tour[data-step=walking] .il-tour-ring,.il-tour[data-step=walking] .il-tour-hand{display:none}
.il-tour-ring[hidden],.il-tour-hand[hidden],.il-tour-bubble[hidden]{display:none}
@keyframes il-tour-pulse{50%{outline:6px solid #FFC83D66;outline-offset:4px}}
.il-tour-hand{position:fixed;left:0;top:0;z-index:31;width:64px;height:64px;margin:-4px 0 0 -18px;pointer-events:none}
.il-tour-hand svg{width:100%;height:100%;animation:gf-hand 1.2s ease-in-out infinite}
.il-tour-bubble{position:fixed;z-index:31;left:50%;transform:translateX(-50%);width:min(88%,340px);display:flex;align-items:center;gap:12px;padding:14px 16px;border-radius:20px;background:#fffdf7;color:#173d35;box-shadow:0 10px 30px #17332a40}
@media(min-width:650px){.il-tour-bubble{left:auto;right:24px;transform:none}.il-tour[data-step=free] .il-tour-bubble{right:auto;left:24px}}
.il-tour-hanay{flex:none;display:block;width:46px;height:46px}
.il-tour-hanay svg{display:block}
.il-tour-line{margin:0;flex:1;font-size:19px;font-weight:700;line-height:1.4}
.il-tour-skip{flex:none;min-height:44px;padding:0 12px;border:0;border-radius:12px;background:transparent;color:#5E6B66;font:inherit;font-size:20px;cursor:pointer}
body.reduced-motion .il-tour-ring,body.reduced-motion .il-tour-hand svg{animation:none}
body.reduced-motion .il-banner{animation:none;transition:none}
body.reduced-motion .il-hand svg{animation:none}
/* After a station: هناي's words for where to go next, held above her by src/slice/island/walk.js. Touches pass through. */
.il-say{position:fixed;left:0;top:0;z-index:29;display:flex;align-items:center;gap:8px;max-width:min(80vw,300px);padding:8px 16px 8px 10px;border-radius:20px;background:#fffdf7;color:#173d35;box-shadow:0 8px 24px #17332a40,0 0 0 3px #FFC93F;pointer-events:none;animation:il-say .35s ease-out both}
.il-say[hidden]{display:none}
.il-say-hanay{flex:none;display:block;width:34px;height:34px}
.il-say-hanay svg{display:block}
.il-say-line{margin:0;font-size:20px;font-weight:800;line-height:1.35}
@keyframes il-say{from{opacity:0}to{opacity:1}}
body.reduced-motion .il-say{animation:none}

/* The island's milestones (v4.1 Sprint 5): the pill beside the coins, its flights, the guard's and the gate's cards, the friend's word and the map's rest button. */

/* The pill: a lit tower and an island key, each with its number, between the coins and the EzyQuest plate. Grey until the first is won. */
.mobile-stats{display:flex;align-items:center;gap:6px;pointer-events:none}
.milestone-pill{display:inline-flex;align-items:center;gap:5px;min-height:44px;padding:2px 9px;border:3px solid #EADFC3;border-radius:999px;background:#FFFDF7;color:var(--pine);box-shadow:0 3px 0 #D9CDB0;font:700 20px/1 var(--ar);pointer-events:auto}
.ms-part{display:inline-flex;align-items:center;gap:3px}
.milestone-pill svg,.mobile-play-header .milestone-pill svg{display:block;width:27px;height:27px}
/* The shared tower drawing is tall and narrow: it keeps its own width. */
.milestone-pill svg.ms-tower,.mobile-play-header .milestone-pill svg.ms-tower{width:auto;height:31px}
.ms-fly svg.ms-tower{width:auto}
.ms-count{font:700 20px/1 var(--ar);font-variant-numeric:tabular-nums}
.ms-part:not(.is-lit){opacity:.8}
.ms-sep{width:2px;height:24px;border-radius:2px;background:#EADFC3}
.ms-part.ms-bump{animation:coin-bump .34s cubic-bezier(.3,1.6,.5,1)}
.ms-fly{position:fixed;left:0;top:0;width:48px;height:48px;z-index:61;pointer-events:none;will-change:transform}
.ms-fly svg{display:block;width:48px;height:48px;filter:drop-shadow(0 2px 4px #7a541055)}
.reduced-motion .ms-part.ms-bump{animation:none}
.desktop-play-header .milestone-pill{min-height:40px;box-shadow:none}
/* On a phone the plate gets smaller beside the coins and the pill, and on a narrow one it gives way. */
@media(max-width:650px),(max-width:1000px) and (max-height:520px){.mobile-play-header{gap:8px}.mobile-play-header .wordmark{font-size:19px;padding:3px 10px}}
@media(max-width:389px){.mobile-play-header .wordmark{display:none}.mobile-play-header{justify-content:flex-end}}

/* The cards: a sheet over the world, with confetti, the line, the prize and the wide arrow. The guard's sits at the top, over the hero and the friend; the gate's at the foot, under the arch. */
.ms-showing .gf-art{display:block}
.ms-showing .gf-picture{background:transparent;overflow:visible}
.ms-showing .gf-listen,.ms-showing .gf-answers{display:none}
.ms-card{position:absolute;left:0;right:0;display:flex;flex-direction:column;align-items:center;gap:8px;max-height:100%;padding:18px 16px 16px;border-radius:28px;background:#FFF8E7;color:var(--pine);text-align:center;box-shadow:0 10px 30px #173d3530,0 0 0 3px #FFE08A;animation:fl-rise .4s cubic-bezier(.215,.61,.355,1) both;overflow:hidden}
.ms-card.is-top{top:0}
.ms-card.is-bottom{bottom:0}
.gf.is-reduced .ms-card{animation:none}
.ms-line{position:relative;margin:0;font-size:26px;line-height:1.45;font-weight:800}
.ms-prize{position:relative;display:grid;place-items:center;width:100%;border-radius:50%;background:radial-gradient(circle,#FFE9A8 0 40%,#ffe9a800 68%)}
.ms-prize svg{display:block;width:min(42vw,170px);height:auto}
.ms-guard .ms-line{font-size:24px}
.ms-guard{gap:6px;padding-top:14px}
.ms-guard .ms-go{min-height:68px}
.ms-note{position:relative;display:flex;align-items:center;justify-content:center;gap:6px;margin:0;font-size:18px;font-weight:600;color:#5B5446}
.ms-plus{display:inline-flex;align-items:center;gap:4px;padding:5px 14px;border-radius:999px;background:#FFC83D;color:#4A3510;font:800 22px/1 var(--ar);box-shadow:0 3px 0 #D9A126}
.ms-plus svg{width:24px;height:24px}
.ms-note.ms-plus{color:#4A3510}
.ms-gifts{position:relative;display:flex;align-items:flex-end;justify-content:center;gap:16px;width:100%}
.ms-gift{display:flex;flex-direction:column;align-items:center;gap:6px}
.ms-chest>svg{width:92px;height:92px}
.ms-key .ms-big-key{display:block;width:min(42vw,170px);height:auto}
.ms-key-name{font-size:18px;font-weight:700}
.ms-go{position:relative;align-self:stretch;min-height:76px}
.ms-confetti{inset:0}
.ms-confetti i{top:42%}

/* The friend's English word, over its head when tapped. */
.il-friend-say{padding:6px 16px;box-shadow:0 8px 24px #17332a40,0 0 0 3px #7CC47F}
.il-friend-say .il-say-line{font:700 26px/1.2 EzyLatin,sans-serif;letter-spacing:.5px}
/* هناي's line after the tower lights. */
.il-say-tower{box-shadow:0 8px 24px #17332a40,0 0 0 3px #FFC83D}

/* The map's rest button, under the wide one: a Najdi house and «نرتاح ونكمل بعدين». */
.fl-map-rest{flex:none;min-height:68px;font-size:21px}
.fl-map-rest svg{flex:none;width:46px;height:46px}

/* OPENING's styles. The sound check draws on the frame, and the hero scene is invisible touch zones over the 3D heroes and staffs. No red and no shake here either. */
/* The sound check, S2: three large pictures, هناي and her plate. */
/* The caption runs along the picture's foot, so the bottom keeps room for two lines at 22px, as on سارة's screen, and هناي shrinks to fit above her plate (v4.1, 14 November 2026: the plate was half under the caption). */
.op-sound .gf-answers{grid-template-columns:repeat(3,1fr);gap:10px}
.op-sound .gf-answer{min-height:112px;padding:4px}
.op-sound .gf-answer:after{inset:-5px}
.op-hanay{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;width:100%;height:100%;padding:12px 12px 92px;color:var(--moss)}
.op-hanay>.hanay-figure{flex:1 1 0;min-height:0;width:100%;max-width:230px;max-height:230px;height:auto}
.op-hanay>.op-plate{flex:none}
.op-plate{padding:2px 22px;border:2px solid var(--gold);border-radius:999px;background:var(--paper);color:var(--pine);font-size:24px;font-weight:700;line-height:1.5}
.op-flip svg{animation:op-flip .8s ease-in-out}
@keyframes op-flip{50%{transform:rotateY(180deg) scale(1.1)}to{transform:rotateY(360deg)}}
.op-bounce{animation:op-bounce .8s cubic-bezier(.3,1.4,.5,1)}
@keyframes op-bounce{25%{transform:translateY(-26px)}50%{transform:translateY(0)}70%{transform:translateY(-10px)}}
/* S3, for the adult: one drawing, one printed line, one large button with a hand on it. The corners go, since nothing else may be touched. */
.op-no-sound .gf-hanay,.op-no-sound .gf-exit{visibility:hidden}
.op-no-sound .gf-listen{display:none}
.op-s3{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;width:100%;height:100%;padding:12px 16px}
.op-s3 .gf-drawing{flex:1;min-height:0;max-height:260px}
.op-s3-line{margin:0;font-size:22px;font-weight:700;line-height:1.5;text-align:center}
.op-no-sound .gf-answers{min-height:160px;justify-items:center}
.gf.op-no-sound[data-turn] .gf-answer{width:160px;min-height:160px;border:0;border-radius:50%;background:var(--pine);color:var(--paper)}
.op-again-arrow{position:absolute;inset:10px;width:calc(100% - 20px);height:calc(100% - 20px)}
.op-phone-rocker{animation:op-rocker 1.4s ease-in-out infinite}
.op-phone-switch{animation:op-switch 2.8s step-end infinite}
.op-phone-ring{animation:op-ring 1.4s ease-in-out infinite}
@keyframes op-rocker{50%{transform:translateY(-6px)}}
@keyframes op-switch{50%{transform:translateY(8px)}}
@keyframes op-ring{50%{opacity:.35}}
.gf.is-reduced .op-phone-rocker,.gf.is-reduced .op-phone-switch,.gf.is-reduced .op-phone-ring,.gf.is-reduced .op-bounce,.gf.is-reduced .op-flip svg{animation:none}
/* Lina's line. The caption runs along the picture's foot, so her name stands clear of it. */
/* The bottom keeps room for a caption of two lines at 22px (v4.1 plan, Sprint 1). */
.op-lina{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;width:100%;height:100%;padding:12px 12px 92px}
.op-lina-figure{flex:1;min-height:0;width:min(70%,240px)}
.op-lina-figure:empty{display:none}
.op-lina-book{position:relative;width:min(44%,150px);aspect-ratio:1;max-height:28%}
/* سارة's line says her book's words flew away, so words fly up out of the closed book and away while she says it (owner's fix list, 14 November 2026, point 8; book-words.js). */
.op-book-words{position:absolute;left:50%;top:45%;z-index:1;width:0;height:0;pointer-events:none}
.op-book-words.in-hand{left:70%;top:46%}
.op-book-words i{position:absolute;left:0;top:0;opacity:0;color:var(--c);font:700 26px/1 var(--en);white-space:nowrap;font-style:normal;text-shadow:0 0 2px #fffdf7,0 0 4px #fffdf7,0 2px 5px #173d3540;transform:translate(-50%,-50%) scale(.35);animation:op-letter-fly 2.4s cubic-bezier(.2,.7,.3,1) var(--d) 2 both}
.op-book-words.in-hand i{font-size:21px}
@keyframes op-letter-fly{0%{opacity:0;transform:translate(-50%,-50%) scale(.35) rotate(0)}14%{opacity:1}72%{opacity:1}100%{opacity:0;transform:translate(calc(-50% + var(--x)),calc(-50% + var(--y))) scale(1) rotate(var(--r))}}
.gf.is-reduced .op-book-words i,.reduced-motion .op-book-words i{animation:none;opacity:.85;transform:translate(calc(-50% + var(--x) * .55),calc(-50% + var(--y) * .55)) rotate(var(--r))}
.fl-meet .gf-model-card{position:relative}
.fl-start{flex:none;width:min(88%,320px);min-height:66px!important;font-size:24px}
/* The hero scene. Nothing to read but the short line, and only while a line has no clip. */
body.in-hero-scene #app,body.in-hero-scene #toast,body.in-hero-scene .world-pad{visibility:hidden}
.op-scene{position:fixed;inset:0;z-index:12;overflow:hidden;touch-action:manipulation;-webkit-tap-highlight-color:transparent;user-select:none}
.op-scene button{position:absolute;padding:0;border:0;background:none;border-radius:24px;cursor:pointer;touch-action:manipulation}
.op-scene button:focus{outline:none}
.op-scene button:focus-visible{outline:3px solid #f2c46d;outline-offset:-3px}
.op-line{position:absolute;top:max(18px,env(safe-area-inset-top));left:50%;z-index:2;transform:translateX(-50%);margin:0;padding:10px 24px;max-width:calc(100% - 32px);border-radius:999px;background:#fff9e9f2;border:2px solid #e4b65a;color:#254c40;font:700 24px/1.3 var(--ar);text-align:center;white-space:nowrap;box-shadow:0 6px 18px #173d3530;pointer-events:none}
.op-line[hidden]{display:none}
.op-hand{position:absolute;z-index:3;width:74px;margin:0 0 0 -24px;pointer-events:none;transition:left .45s ease-in-out,top .45s ease-in-out;filter:drop-shadow(0 4px 6px #173d3540)}
.op-hand[hidden]{display:none}
.op-hand svg{display:block;width:100%;transform-origin:30% 6%;animation:op-hand-press 1.1s ease-in-out infinite}
.op-veil{position:absolute;inset:0;z-index:4;background:var(--ivory);opacity:0;pointer-events:none;transition:opacity .3s ease-in-out}
.op-scene.is-fading .op-veil{opacity:1}
.op-scene.is-done .op-veil{opacity:0}
.op-scene.is-leaving button{pointer-events:none}
.op-heroes,.op-staffs{display:contents}
.op-staffs[hidden]{display:none}
.op-staff-zone.is-held{pointer-events:none}
/* With no WebGL: the same scene in flat pictures. */
.op-scene.is-pictures{display:grid;grid-template-rows:auto minmax(0,1.25fr) minmax(0,1fr);gap:10px;padding:max(16px,env(safe-area-inset-top)) 16px max(16px,env(safe-area-inset-bottom));background:linear-gradient(#bfe0e6,#f6e8c6 60%,#efd6a3)}
.op-scene.is-pictures button{position:relative;display:flex;align-items:center;justify-content:center;min-height:0;min-width:0}
.op-scene.is-pictures .op-line{position:static;transform:none;justify-self:center;grid-row:1}
.op-scene.is-pictures .op-heroes,.op-scene.is-pictures .op-staffs{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:10px;min-height:0}
.op-scene.is-pictures .op-heroes{grid-row:2}
.op-scene.is-pictures .op-staffs{grid-row:3}
.op-scene.is-pictures .op-staffs[hidden]{display:none}
.op-scene.is-pictures button svg{display:block;width:100%;height:100%;max-height:100%}
.op-scene.is-pictures .op-hero-zone.is-chosen{background:#fff9e9a6;animation:medal-in .4s ease-out}
.op-scene.is-pictures .op-hero-zone.is-waving{box-shadow:0 0 0 5px #e4b65a}
.op-scene.is-pictures[data-prompt=go] .op-hero-zone.is-chosen{animation:hint-pulse 1.1s ease-in-out infinite;box-shadow:0 0 0 5px #e4b65a}
.op-scene.is-pictures .op-staff-zone.is-held{background:#fff9e9a6;box-shadow:0 0 0 4px #e4b65a;pointer-events:auto}
.reduced-motion .op-hand svg{animation:none}
@keyframes op-hand-press{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(10px) scale(.92)}}
/* The free change of hero, in the menu and settings: two pictures. */
.op-hero-picker{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 14px}
.op-hero-pick{display:flex;justify-content:center;align-items:flex-end;height:140px;padding:4px;border:2px solid var(--line);border-radius:18px;background:var(--paper);cursor:pointer}
.op-hero-pick svg{display:block;height:100%}
.op-hero-pick.is-selected{border-color:var(--gold);box-shadow:0 0 0 3px #e4b65a55;background:#fff6dc}
.outfit-figure>svg{height:100%;max-height:96px}
body.in-hero-scene #scene-stage{top:0;right:0;height:100%}

/* PAIR AND PAINT's styles. As in frame.css, no state here has a failure colour or a jolt: right and wrong differ by where things end up. The paints' own colours live in pictures/paints.js. */
.gf-answers{position:relative}
.gf-answers[data-count="6"],.gf-answers[data-count="8"]{grid-template-columns:repeat(4,1fr);gap:8px}
.gf-answers[data-count="6"]{grid-template-columns:repeat(3,1fr)}
/* Big and Small: letters, stones and the rope. */
.pp-letter{display:block;font-family:var(--en);font-size:72px;font-weight:700;line-height:1;direction:ltr}
.gf[data-profile=normal] .pp-letter{font-size:48px}
.gf-answer[data-pp=held]{z-index:2;border-color:var(--gold);box-shadow:0 0 0 4px #e4b65a66,0 8px 0 #426b5040;transform:translateY(-6px)}
.gf-answer.is-off[data-pp=held]{opacity:1}
/* A tied pair needs no badge: the rope says it. It stays bright while the word plays, and steps back a little once the next pair is up. */
.gf[data-turn] .gf-answer[data-pp=tied]:not([data-state=gold]){border-color:var(--moss);opacity:1;box-shadow:none;transform:none}
.gf[data-turn] .gf-answer[data-pp=tied]:before{display:none}
.gf[data-turn] .gf-answer.is-off[data-pp=tied]{opacity:.7}
.gf[data-turn] .gf-answer[data-pp=held]{border-color:var(--gold)}
.pp-rope{position:absolute;inset:0;z-index:3;width:100%;height:100%;overflow:visible;pointer-events:none}
.pp-rope-under,.pp-rope-over,.pp-tied-rope path{fill:none;stroke-linecap:round}
.pp-rope-under{stroke:#6f4e24;stroke-width:9}
.pp-rope-over{stroke:#dcb67c;stroke-width:5.5;stroke-dasharray:6 4}
.pp-rope-knot{fill:#dcb67c;stroke:#6f4e24;stroke-width:2.5}
.pp-rope.is-tying .pp-rope-under{stroke-dasharray:1;animation:pp-rope-tie .42s ease-out both}
.pp-rope.is-tying .pp-rope-over,.pp-rope.is-tying .pp-rope-knot{animation:pp-rope-show .2s .3s ease-out both}
@keyframes pp-rope-tie{from{stroke-dashoffset:1}to{stroke-dashoffset:0}}
@keyframes pp-rope-show{from{opacity:0}to{opacity:1}}
.pp-tower{display:flex;flex-direction:column;align-items:center;gap:10px;width:100%;padding:12px}
.pp-stones{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;width:min(100%,300px)}
.pp-stone{display:grid;place-items:center;aspect-ratio:3/2;border-radius:10px;border:2px solid #6d6f68;background:linear-gradient(#a2a39a,#8c8d84);color:#55574f;font-family:var(--en);font-size:30px;font-weight:700;box-shadow:inset 0 -3px 0 #6d6f6880;transition:background .3s,color .3s,box-shadow .3s}
.pp-stone.is-lit{border-color:#b98f3a;background:linear-gradient(#fff3c9,#f0d48a);color:var(--pine);box-shadow:0 0 16px #e4b65a99,inset 0 -3px 0 #d9b86a80}
.pp-loose-rope{width:min(100%,300px);height:30px}
.pp-loose-rope path{fill:none;stroke-linecap:round}
.pp-demo{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;width:100%;height:100%;padding:12px}
.pp-tied{display:flex;align-items:center;justify-content:center;width:100%;max-width:330px}
.pp-tile{flex:none;display:grid;place-items:center;width:112px;height:112px;border:1px solid var(--line);border-radius:18px;background:var(--paper);font-family:var(--en);font-size:76px;font-weight:700;line-height:1;transition:transform .3s}
.pp-tied-rope{flex:1;min-width:0;height:60px;overflow:visible;opacity:.25;transition:opacity .25s}
.pp-tied.is-tied .pp-tied-rope{opacity:1}
.pp-tied.is-tied .pp-tile-first{animation:pp-lift .7s ease-out both}
.pp-tied.is-tied .pp-rope-under{stroke-dasharray:1;animation:pp-rope-tie .5s .2s ease-out both}
@keyframes pp-lift{35%{transform:translateY(-16px)}100%{transform:none}}
/* Paint the Wall: a plaster wall of blank panels, Sami on the ground in front of it, and the pots. */
.pp-scene{position:relative;display:flex;flex-direction:column;width:100%;height:100%;padding:12px 12px 0;gap:6px}
.pp-wall{position:relative;flex:1 1 0;display:flex;gap:4px;min-height:90px;width:100%;padding:18px 8px 8px;border:2px solid #b7a78a;border-top:10px solid #8f6d4e;border-radius:6px;background:#dcd2bd;color:inherit}
.pp-panel{position:relative;flex:1;min-width:0;border-radius:3px;background:#ece4d2;box-shadow:inset 0 0 0 1px #c6baa0}
.pp-panel.is-next{box-shadow:inset 0 0 0 3px var(--moss)}
.pp-panel.is-pulsing{animation:pp-panel 1.1s ease-in-out infinite}
@keyframes pp-panel{50%{box-shadow:inset 0 0 0 6px var(--gold),0 0 14px #e4b65a}}
.pp-panel.is-spreading,.pp-swatch.is-spreading{animation:pp-spread .55s ease-out both}
@keyframes pp-spread{from{clip-path:circle(0 at 50% 50%)}to{clip-path:circle(80% at 50% 50%)}}
.pp-chameleon{position:absolute;top:-10px;right:10px;width:52px;height:31px;pointer-events:none}
.pp-chameleon svg{display:block;width:100%;height:100%}
/* The caption runs along the picture's foot beside Sami, so it covers neither him nor the swatch above it. */
.gf-picture:has(.pp-scene) .gf-caption{right:clamp(100px,46%,168px)}
.pp-ground{position:relative;flex:0 0 clamp(92px,38%,160px)}
.pp-ground .pp-sami{position:absolute;right:0;bottom:0;height:100%;aspect-ratio:1}
.pp-swatch-spot{position:absolute;left:0;top:0;bottom:44px;aspect-ratio:1}
.pp-swatch-spot .pp-swatch{width:100%;height:100%}
.pp-kept{position:absolute;left:4px;top:6px;display:flex;gap:2px;width:clamp(84px,34%,124px);height:48px;padding:5px 4px 4px;border:1px solid #b7a78a;border-top:5px solid #8f6d4e;border-radius:4px;background:#dcd2bd}
.pp-kept-panel{flex:1;min-width:0;border-radius:2px;background:#ece4d2;background-size:12px 12px!important}
.pp-sami-large{flex:none;width:190px;height:190px}
.pp-swatch{display:block;width:96px;height:96px;border-radius:10px;border:2px solid #b7a78a;background:#ece4d2}
.pp-model{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;width:100%;height:100%;padding:12px}
.pp-swatches{display:flex;justify-content:center;gap:16px}
.pp-model-swatch{display:flex;flex-direction:column;align-items:center;gap:8px}
.pp-model-swatch .pp-pot{width:72px;height:72px}
.pp-pot{position:relative;display:block;width:96px;height:100px;font-family:var(--en)}
.pp-pot-body{position:absolute;left:8%;right:8%;top:20%;bottom:0;border:2px solid var(--pine);border-radius:6px 6px 16px 16px}
.pp-pot-rim{position:absolute;left:2%;right:2%;top:10%;height:18%;border:2px solid var(--pine);border-radius:50%;background:#d9d6c8}
.pp-pot-handle{position:absolute;left:18%;right:18%;top:-6%;height:34%;border:3px solid var(--pine);border-bottom:0;border-radius:50% 50% 0 0}
.pp-pot-label{position:absolute;left:50%;bottom:8%;transform:translateX(-50%);padding:0 8px;border-radius:8px;background:var(--paper);color:var(--pine);font-size:20px;font-weight:700;line-height:1.4;white-space:nowrap;box-shadow:0 0 0 1px #173d3540}
.gf-answer.pp-pot-answer{transition:box-shadow .16s,transform .16s,opacity .2s,scale .32s}
.gf-answer.pp-pot-answer.is-flying{scale:.55;transition:transform .32s cubic-bezier(.3,1.4,.5,1),scale .32s}
.gf-answer.pp-pot-answer.is-gliding{transition:transform .32s cubic-bezier(.215,.61,.355,1),scale .32s}
.gf[data-profile=normal] .gf-answers[data-count="4"] .pp-pot{width:64px;height:66px}
.gf[data-profile=normal] .pp-pot-label{font-size:20px}
/* Reduced motion: cuts and fades, as in frame.css. */
.gf.is-reduced .pp-rope-under,.gf.is-reduced .pp-rope-over,.gf.is-reduced .pp-rope-knot,.gf.is-reduced .pp-tied .pp-tile-first,.gf.is-reduced .pp-panel,.gf.is-reduced .pp-swatch{animation:none}
.gf.is-reduced .pp-panel.is-pulsing{box-shadow:inset 0 0 0 6px var(--gold)}
@media(max-height:640px){
 .pp-letter{font-size:52px}
 .pp-sami-large{width:96px;height:96px}
 .pp-swatch{width:64px;height:64px}
 .pp-stone{font-size:22px}
 .pp-tile{width:84px;height:84px;font-size:56px}
 .pp-pot{width:76px;height:80px}
 .pp-pot-label{font-size:20px}
}

/* The pick games. As in frame.css, no state here uses a failure colour, and nothing jolts: a miss only glides home. Sizes are starting points, not measurements. */
.pk-stage{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;overflow:hidden}
.gf-answer.pk-glides.is-flying{transition:transform 1.1s cubic-bezier(.45,.05,.3,1)}
.gf[data-turn] .gf-answer.pk-glow{border-color:var(--gold);border-width:2px;box-shadow:0 0 0 5px #e4b65a59,0 0 22px #e4b65a80}
.gf-answer.pk-gone{opacity:0}
.gf-answer.pk-clear-arrow{translate:48px 0}
/* The hand's demo: an empty card carried from the answers up to where they go, with no finger resting on an answer. It dims as it crosses the strip, and with no motion it rests at the place. */
.pk-drift{position:fixed;left:0;top:0;z-index:7;width:52px;height:52px;margin:-20px 0 0 -20px;pointer-events:none;transform:translate(var(--pk-to-x),var(--pk-to-y));animation:pk-drift 2.8s ease-in-out infinite}
.pk-drift svg{position:relative;display:block;width:100%;height:100%}
.pk-drift-card{position:absolute;left:-12px;top:-20px;width:56px;height:46px;border:3px dashed var(--pine);border-radius:12px;background:#fffdf7b3}
@keyframes pk-drift{0%{transform:translate(var(--pk-from-x),var(--pk-from-y));opacity:0}14%{transform:translate(var(--pk-from-x),var(--pk-from-y));opacity:1}33%{opacity:.2}52%{opacity:1}72%{transform:translate(var(--pk-to-x),var(--pk-to-y));opacity:1}100%{transform:translate(var(--pk-to-x),var(--pk-to-y));opacity:0}}
/* Lina's book. */
.pk-book{display:block;width:96%;max-height:100%}
.pk-page-word{font:700 27px var(--en);fill:var(--pine)}
/* Letter Snack: the picture high on the left, above the speaker, and the bat on its stone. */
.pk-letter{display:inline-flex;align-items:baseline;gap:2px;font-size:54px;line-height:1}
.pk-small{transition:color .2s}
.pk-small.is-gold{color:#a8761a;text-shadow:0 0 12px #e4b65a99}
.pk-snack-picture{position:absolute;left:32%;top:2%;width:36%;aspect-ratio:1;max-height:36%}
.pk-bat{position:absolute;left:1%;right:1%;bottom:11%;width:98%;max-height:60%;overflow:visible}
.pk-bat-body{transform-origin:0 70px;transform-box:view-box;transition:transform .35s ease-in-out}
.pk-eye-shut,.pk-butterfly,.pk-cheek{opacity:0;transition:opacity .15s}
/* Its wings beat slowly while it waits, each from its own shoulder. */
.pk-wing{transform-box:view-box}
.pk-wing-left{transform-origin:-48px 22px;animation:pk-flap-left 1.6s ease-in-out infinite}
.pk-wing-right{transform-origin:48px 22px;animation:pk-flap-right 1.6s ease-in-out infinite}
@keyframes pk-flap-left{50%{transform:rotate(-9deg)}}
@keyframes pk-flap-right{50%{transform:rotate(9deg)}}
/* It hovers, since it flies. */
.pk-bat-hover{animation:pk-hover 1.6s ease-in-out infinite}
@keyframes pk-hover{50%{transform:translateY(-5px)}}
.gf.is-reduced .pk-wing,.gf.is-reduced .pk-bat-hover{animation:none}
/* It leans its ear toward the speaker, where the picture was. */
.pk-snack[data-bat=listen] .pk-bat-body{transform:translateX(-10px) rotate(-11deg)}
.pk-snack[data-bat=sniff] .pk-bat-body{transform:rotate(7deg)}
.pk-snack[data-bat=chew] .pk-eye,.pk-snack[data-bat=fed] .pk-eye{opacity:0}
.pk-snack[data-bat=chew] .pk-eye-shut,.pk-snack[data-bat=fed] .pk-eye-shut,.pk-snack[data-bat=chew] .pk-cheek,.pk-snack[data-bat=fed] .pk-cheek{opacity:1}
.pk-snack[data-bat=chew] .pk-bat-body,.pk-snack[data-bat=fed] .pk-bat-body{animation:pk-chew .5s ease-in-out}
@keyframes pk-chew{35%{transform:scale(1.03,.97)}70%{transform:scale(.98,1.02)}}
/* A small butterfly of light on a right, and never on a shown answer. */
.pk-snack[data-bat=fed] .pk-butterfly{opacity:1;animation:pk-lift 1.2s ease-out forwards}
@keyframes pk-lift{to{transform:translateY(-44px);opacity:0}}
/* The lane, the crate, the thing that walks off, and the two chips. */
.pk-lane-ground{position:absolute;inset:0;width:100%;height:100%}
.pk-crate{position:absolute;left:50%;top:44%;width:112px;height:124px;margin:-62px 0 0 -56px;overflow:visible}
.pk-crate-lid{transform-box:fill-box;transform-origin:0 100%;transition:transform .3s ease-out}
.pk-lane[data-walk] .pk-crate-lid{transform:rotate(-38deg)}
.pk-walker{position:absolute;left:50%;top:44%;width:92px;height:92px;margin:-46px 0 0 -46px;opacity:0}
.pk-lane[data-walk] .pk-walker{opacity:1;animation:pk-walk 2.6s ease-in-out forwards}
@keyframes pk-walk{0%{transform:translate(0,-8px) scale(.6) rotate(0)}15%{transform:translate(22px,-34px) scale(.9) rotate(5deg)}30%{transform:translate(44px,-52px) scale(.95) rotate(-5deg)}45%{transform:translate(66px,-74px) scale(.95) rotate(5deg)}60%{transform:translate(88px,-92px) scale(.92) rotate(-5deg)}75%{transform:translate(108px,-112px) scale(.88) rotate(5deg);opacity:1}100%{transform:translate(150px,-150px) scale(.8) rotate(0);opacity:0}}
.gf.is-reduced .pk-lane[data-walk] .pk-walker{animation:none;transform:translate(96px,-96px) scale(.9)}
.pk-chips{position:absolute;left:0;right:0;bottom:8px;display:flex;justify-content:center;gap:12px}
.pk-chips:empty{display:none}
.pk-chip{display:flex;flex-direction:column;align-items:center;min-width:112px;min-height:64px;padding:4px 14px;border:2px solid var(--moss);border-radius:14px;background:var(--paper);box-shadow:0 4px 0 #426b5040;color:var(--pine);font:700 24px/1.2 var(--en)}
.pk-chip small{font:400 20px/1.3 var(--ar);color:var(--muted)}
.pk-chip.is-playing{border-color:var(--gold);box-shadow:0 0 0 4px #e4b65a66}
/* The phone moves on S3 by opening.css, and beside the speaker it stays small and still. */
.gf-phone .pk-phone-rocker,.gf-phone .pk-phone-switch,.gf-phone .pk-phone-ring,.gf.is-reduced .pk-phone-rocker,.gf.is-reduced .pk-phone-switch{animation:none}
.gf.is-reduced .pk-drift{animation:none}
.gf.is-reduced .pk-bat-body,.gf.is-reduced .pk-crate-lid{transition:none}
.gf.is-reduced .pk-snack[data-bat] .pk-bat-body{animation:none}
.gf.is-reduced .pk-snack[data-bat=fed] .pk-butterfly{animation:none}
@media(max-height:640px){
 .pk-letter{font-size:44px}
 .pk-crate{width:88px;height:98px;margin:-49px 0 0 -44px}
 .pk-chip{min-height:52px;min-width:96px;font-size:20px}
}

/* دكان الجزيرة (v4.1 Sprint 4): the coin counter as the shop's button, the coins that fly to it, and the shop's drawer. */

/* The counter: a drawn gift, the number and «عملة», at least 44px high, 18px bold, in a gold border. */
.coin-button{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:4px 12px 4px 10px;border:3px solid #FFC83D;border-radius:999px;background:#FFFDF7;color:var(--pine);font:700 18px/1 var(--ar);box-shadow:0 3px 0 #E0A92B;cursor:pointer;pointer-events:auto;-webkit-tap-highlight-color:transparent}
.coin-button .coin-count{font:700 21px/1 var(--ar);font-variant-numeric:tabular-nums}
.coin-button .coin-word{font-size:18px}
.coin-button .coin-gift{display:inline-flex}
.coin-button .coin-gift svg,.mobile-play-header .coin-button .coin-gift svg{width:26px;height:26px;color:inherit}
.coin-button:active{transform:translateY(2px);box-shadow:0 1px 0 #E0A92B}
.stat-pill.coin-button{border:3px solid #FFC83D;background:#FFFDF7}
.mobile-coins.coin-button{border:3px solid #FFC83D;background:#FFFDF7;padding:4px 12px 4px 10px}
.coin-button.coin-bump{animation:coin-bump .34s cubic-bezier(.3,1.6,.5,1)}
@keyframes coin-bump{0%{transform:scale(1)}45%{transform:scale(1.25)}100%{transform:scale(1)}}
.coin-fly{position:fixed;left:0;top:0;width:28px;height:28px;z-index:60;pointer-events:none;will-change:transform}
.coin-fly svg{width:28px;height:28px;display:block;filter:drop-shadow(0 2px 2px #7a541055)}
.reduced-motion .coin-button.coin-bump{animation:none}

/* The drawer: it slides up from the bottom and leaves the counter in sight above it. */
dialog[data-screen="shop"]{background:#FFF8E7}
dialog[data-screen="shop"] .panel-body{position:relative;padding-top:8px}
@media(max-width:650px),(max-width:1000px) and (max-height:520px){
 dialog[data-screen="shop"]{margin:auto auto 0;width:min(560px,100%);max-width:100%;max-height:calc(100dvh - max(66px,calc(env(safe-area-inset-top) + 62px)));border-radius:28px 28px 0 0;border-bottom:0;padding-bottom:env(safe-area-inset-bottom)}
 dialog[data-screen="shop"][open]{animation:shop-up .32s cubic-bezier(.2,.8,.3,1)}
}
@keyframes shop-up{from{transform:translateY(40%);opacity:.4}to{transform:none;opacity:1}}
.reduced-motion dialog[data-screen="shop"][open]{animation:none}

/* The top: the hero's live picture beside هناي's welcome. */
.shop-top{display:grid;grid-template-columns:118px 1fr;gap:12px;align-items:center}
.shop-hero{width:118px;height:150px;border-radius:22px;background:radial-gradient(circle at 50% 60%,#FFFDF7 0 45%,#F9E9C4 70%);display:grid;place-items:center;overflow:hidden;box-shadow:inset 0 0 0 2px #EADFC3}
.shop-portrait{display:block;width:112px;height:151px;object-fit:contain}
span.shop-portrait svg{width:100%;height:100%}
.shop-hello{display:flex;align-items:center;gap:10px;padding:12px 14px;border-radius:20px;background:#FFFDF7;box-shadow:0 3px 0 #EADFC3}
.shop-hello p{margin:0;font-size:20px;line-height:1.6;font-weight:600}
.shop-hello-face{flex:none;width:52px;height:52px;border-radius:50%;background:#FCE3DA;display:grid;place-items:center;overflow:hidden}
.shop-hello-face svg{width:50px;height:50px}

/* The cards: three across, each a big target, with its tag along the foot. */
.shop-section{margin:18px 4px 0;font-size:22px;line-height:1.4}
.shop-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px}
.shop-card{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:4px;min-height:136px;padding:12px 6px 10px;border:2px solid #EADFC3;border-radius:20px;background:#FFFDF7;color:var(--pine);font:inherit;box-shadow:0 4px 0 #EADFC3;cursor:pointer;-webkit-tap-highlight-color:transparent}
button.shop-card:active{transform:translateY(2px);box-shadow:0 2px 0 #EADFC3}
.shop-card.is-worn{border:3px solid #2A6F6B}
.shop-card.is-picked{border:3px solid #FFC83D;box-shadow:0 0 0 4px #FFC83D55,0 4px 0 #EADFC3}
.shop-pic{display:grid;place-items:center;height:72px}
.shop-pic svg{width:86px;height:72px}
.shop-outfit .shop-pic{height:84px}.shop-outfit .shop-pic svg{width:62px;height:84px}
.shop-name{font-size:18px;line-height:1.3;font-weight:700;text-align:center}
.shop-card.is-dim .shop-pic,.shop-card.is-dim .shop-name{opacity:.62}
.shop-tag{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:34px;margin-top:auto;padding:2px 12px;border-radius:999px;font:700 18px/1 var(--ar);white-space:nowrap}
.shop-tag svg{width:18px;height:18px;flex:none}
.shop-tag.is-price{background:#FFC83D;color:#4A3510;box-shadow:0 3px 0 #D9A126}
.shop-tag.is-buy{background:#FFC83D;color:#4A3510;box-shadow:0 3px 0 #D9A126;animation:shop-pulse 1.1s ease-in-out infinite}
.shop-tag.is-worn{background:#2A6F6B;color:#FFFDF7;min-width:64px}
.shop-tag.is-owned{background:#DDEFEA;color:#2A6F6B;min-width:64px}
.shop-tag.is-locked{background:#E9E1CF;color:#6F6858}
.shop-tag.is-prize{background:#E9E1CF;color:#5B5446;white-space:normal;text-align:center;line-height:1.2;padding:4px 10px}
.shop-tag.is-max{background:#DDEFEA;color:#2A6F6B;font-size:18px}
.shop-lock{width:15px;height:17px}
@keyframes shop-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.07)}}
.reduced-motion .shop-tag.is-buy{animation:none}
.shop-word{position:absolute;top:-12px;left:50%;transform:translateX(-50%);z-index:2;padding:2px 10px;border-radius:12px;background:#173035;color:#FFFDF7;font:700 20px/1.3 var(--en);white-space:nowrap;animation:shop-word .3s ease-out}
@keyframes shop-word{from{opacity:0;transform:translate(-50%,6px)}to{opacity:1;transform:translate(-50%,0)}}
.reduced-motion .shop-word{animation:none}

/* Staffs: a touch on the staff holds it for free; the tag beneath raises its level with coins. */
.shop-staff{cursor:default}
.shop-hold{display:flex;flex-direction:column;align-items:center;gap:2px;width:100%;padding:0;border:0;background:none;color:inherit;font:inherit;cursor:pointer}
.shop-staff .shop-pic{height:78px}.shop-staff .shop-pic svg{width:40px;height:80px}
.shop-dots{display:flex;gap:5px;margin:2px 0}
.shop-dots i{width:12px;height:12px;border-radius:50%;border:2px solid #2A6F6B}
.shop-dots i.on{background:#2A6F6B}
.shop-up{display:flex;align-items:center;gap:4px;margin-top:auto;padding:0;border:0;background:none;color:#2A6F6B;font:inherit;cursor:pointer}
.shop-up.is-picked .shop-tag{outline:3px solid #FFC83D;outline-offset:2px}
.shop-arrow svg{width:18px;height:18px;transform:rotate(90deg)}

/* Too few coins: هناي flies in with her line, and a touch anywhere closes it. */
.shop-more{position:fixed;inset:0;z-index:6;display:flex;align-items:flex-end;justify-content:center;gap:0;padding:0 16px max(26px,env(safe-area-inset-bottom));border:0;background:#17303555;font:inherit;cursor:pointer}
.shop-more-say{align-self:flex-end;margin:0 -6px 118px 0;max-width:250px;padding:16px 18px;border-radius:24px;background:#FFFDF7;color:var(--pine);font-size:24px;line-height:1.5;font-weight:700;box-shadow:0 10px 30px #17303533;text-align:right}
.shop-more-hanay svg{width:150px;height:134px}
@media(max-width:360px){.shop-pic svg{width:72px;height:62px}.shop-top{grid-template-columns:100px 1fr}.shop-hero{width:100px;height:128px}.shop-portrait{width:96px;height:130px}.shop-tag{padding:2px 8px}}
