/* V75 (2026-10-16) — shared accessibility styles for the member apps: /game/ (adventure), /game/code-login.php (hub),
   /game/register.php, /game/login.php. External on purpose (the pages' CSP hashes inline blocks). */

/* skip link: first focusable element, visible on focus */
.eh-skip{position:absolute;inset-inline-start:8px;top:8px;z-index:1200;background:#1a3a0d;color:#fff;padding:10px 16px;border-radius:10px;font-weight:800;text-decoration:none;clip:rect(0 0 0 0);clip-path:inset(50%);width:1px;height:1px;overflow:hidden;white-space:nowrap}
.eh-skip:focus{clip:auto;clip-path:none;width:auto;height:auto;overflow:visible;outline:3px solid #ffd54a;outline-offset:2px}

/* /game/: hero, tier and plan cards are real buttons now — keep the card look */
button.av-card,button.tier-card,button.pay-tier-card{font:inherit;color:inherit;width:100%;-webkit-appearance:none;appearance:none}
button.av-card{display:flex;flex-direction:column;align-items:center;justify-content:flex-start}
button.tier-card{display:flex;flex-direction:column;align-items:center;gap:2px;background:var(--card,#fff)}
button.tier-card .tier-icon,button.tier-card .tier-name,button.tier-card .tier-price{display:block}
button.tier-card .tier-badge{display:inline-block;margin-top:4px}
button.pay-tier-card{display:block;text-align:start}
button.pay-tier-card span[data-t],button.pay-tier-card span[style*="font-size"]{display:block}
button.guest-link{background:none;border:0;padding:6px 4px;font:inherit;font-size:13px;color:var(--muted,#57695a);text-decoration:underline;cursor:pointer}
.av-card:focus-visible,.tier-card:focus-visible,.pay-tier-card:focus-visible,.guest-link:focus-visible,#start-btn:focus-visible,#hero-name-input:focus-visible{outline:3px solid #1a3a0d;outline-offset:3px;box-shadow:0 0 0 6px #ffd54a}
.av-card[aria-pressed="true"],.tier-card[aria-pressed="true"],.pay-tier-card[aria-pressed="true"]{border-color:var(--g,#2d8a4e)}
.eh-hint{display:block;font-size:12px;line-height:1.45;color:var(--muted,#57695a);margin:6px 0 0}

/* register / login: labelled fields, visible errors tied to their field */
.eh-field-err{display:block;color:#b3261e;font-size:.8rem;font-weight:700;margin-top:.35rem}
input[aria-invalid="true"]{border-color:#b3261e!important;background:#fff6f5}
.eh-form-err:focus{outline:3px solid #ffd54a;outline-offset:2px}

/* member hub: one language selector (in the shared header); the member bar's language badge would be a second one */
.eh-nav:has(.eh-nav__lang select) ~ .eh-inav .eh-inav-lang{display:none}

/* /game/ now opens under the shared header: the old top padding for the removed floating shell is not needed */
body.has-eco-shell:has(header.eh-nav) .screen{padding-top:0}
body.has-eco-shell:has(header.eh-nav) #sw{padding-top:28px}
/* the game's dialogs (sign-up, tour) cover the shared header (z-index 900) instead of sliding under it */
body.has-eco-shell .modal-overlay{z-index:1250}

/* ── V76 (2026-10-16) /game/: accessible map tiles, matching buttons, child-safe dialogs, grown-up gate, tidy header ── */
.eh-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.screen h2[tabindex="-1"]:focus,.quiz-q[tabindex="-1"]:focus,#gate-ok-h:focus{outline:none}
/* map tiles are buttons */
button.sdg-tile{font:inherit;color:inherit;width:100%;-webkit-appearance:none;appearance:none;gap:0}
.sdg-tile .sdg-num{display:block;font-size:12px}
.sdg-tile .sdg-tname{display:block;font-size:12px;line-height:1.25;color:#4a5a4a;margin-top:2px;overflow-wrap:anywhere}
.sdg-tile .lock-lbl{display:inline-block;font-size:12px;font-weight:700;color:#4a5a4a;background:#fff;border:1px solid #d0d8c8;border-radius:100px;padding:1px 10px;margin-top:6px}
.sdg-tile.locked{opacity:1;background:#f3f1ec;border:2px dashed #c9d2c0;color:#4a5a4a}
.sdg-tile.locked .lock-icon{opacity:.55}
.sdg-tile.locked:hover,.sdg-tile.locked:focus-visible{opacity:1;background:#eef5ec;border-color:var(--g,#2d8a4e)}
.sdg-tile:focus-visible,.match-item:focus-visible,.quiz-opt:focus-visible,.quiz-tf-btn:focus-visible,.tab-btn:focus-visible,.nav-btn:focus-visible,.back-btn:focus-visible,.hdr-ico:focus-visible,.hdr-help:focus-visible,.m-btn:focus-visible,.btn-primary:focus-visible,.btn-secondary:focus-visible,.btn-link:focus-visible,.dlg-close:focus-visible,.video-placeholder:focus-visible,.nav-lang:focus-visible,.lang-chip-btn:focus-visible{outline:3px solid #1a3a0d;outline-offset:3px;box-shadow:0 0 0 6px #ffd54a}
/* matching question: toggle buttons */
button.match-item{font:inherit;color:inherit;width:100%;-webkit-appearance:none;appearance:none}
.match-item[aria-pressed="true"]:not(.matched){border-color:var(--b,#2563eb);background:var(--bp,#eff6ff)}
.match-item.matched{cursor:default}
.match-hint{font-size:12px;color:var(--muted,#5e6e5e);text-align:center;margin:4px 0}
/* chapter loading / errors (SDG 2–17 come from the server for members) */
.ch-loading{font-size:14px;color:var(--muted,#5e6e5e);padding:1rem 0}
.ch-error{background:#fff8e1;border:1px solid #f2d98a;border-radius:16px;padding:16px;font-size:14px;line-height:1.5}
.ch-error p{margin:0 0 10px}
/* dialogs */
.modal{position:relative}
.modal-title{font-size:18px;font-weight:700;text-align:center;margin:0 0 4px}
.modal-h3{font-size:14px;font-weight:700;margin:0 0 8px}
.modal-sub{font-size:13px;color:var(--muted,#5e6e5e);text-align:center;margin:0 0 1.2rem;line-height:1.5}
.dlg-close{position:absolute;top:10px;inset-inline-end:10px;width:40px;height:40px;border-radius:50%;border:1.5px solid var(--border,#e8ede3);background:#fff;color:#1c2e10;font-size:16px;cursor:pointer;font-family:inherit}
.dlg-close:hover{background:var(--gp,#eef5ec)}
.free-chip{text-align:center;margin:8px 0 14px}
.free-chip .tier-badge{font-size:12px;padding:3px 12px}
.code-box{border-top:1px solid var(--border,#e8ede3);padding-top:14px;margin-top:4px}
.modal .btn-link{margin-top:14px}
.btn-a{display:block;text-align:center;text-decoration:none;box-sizing:border-box}
.modal .btn-secondary.btn-a{margin-top:8px}
.modal.gate{text-align:center}
.gate-icon{font-size:40px;line-height:1;margin:4px 0 10px}
.modal.gate .form-group{text-align:start}
.modal.gate .error-msg{text-align:start}
#gate-q{font-size:17px;line-height:1.4;margin-bottom:12px}
/* map header: one tidy row at every width (no tall empty block on the right) */
.map-hdr{gap:10px;flex-wrap:wrap;padding:10px 14px;align-items:center}
.map-hdr .map-ctl{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;margin-inline-start:auto}
.map-hdr .sync-badge{margin-top:3px;font-size:11px;padding:2px 9px;min-height:0}
.map-hdr .map-xp{padding:4px 12px;display:flex;align-items:baseline;gap:4px}
.map-hdr .map-xp-l{font-size:11px}
.map-hdr .hdr-ico,.map-hdr .hdr-help{margin:0}
.map-hdr .nav-lang{margin:0!important;font-size:.8rem!important;padding:6px 8px!important;min-height:36px}
.hdr-lang select{max-width:140px}
@media(max-width:420px){.map-hdr .map-ctl{width:100%;justify-content:space-between}}
/* tap target for the video poster (role=button) */
.video-placeholder{cursor:pointer}
/* colour contrast (WCAG 1.4.3): a slightly darker brand green for text and filled buttons inside the game (#2d8a4e = 4.3:1 on white) */
.screen,.modal-overlay,.toast{--g:#25703d;--am:#9a4a0a}
.mg-btn{color:#1c2e10!important;background:color-mix(in srgb,var(--c) 22%,#fff)!important;border-color:var(--c)!important}
.mg-btn:hover{background:color-mix(in srgb,var(--c) 34%,#fff)!important}
.mg-real>div{background:linear-gradient(180deg,rgba(0,0,0,0),rgba(0,0,0,.55) 40%);width:100%}
.mg-real .mg-tag{background:rgba(0,0,0,.45)}
.badge-item.badge-locked{opacity:1;border-color:var(--border,#e8ede3)}
.badge-item.badge-locked img{opacity:.35}
.badge-item.badge-locked .badge-sdg{color:#5e6e5e}
