/* prefs.css — Settings effects. Loaded in the main page and injected into section iframes. */
:root{--fs:1}
html{font-size:calc(100% * var(--fs))}
/* Text size: rem root + zoom for legacy px rules (zoom reflows to the viewport, so no sideways scroll). */
html.bigtext #app,html.bigtext #lgate>*,html.bigtext.el-frame body{zoom:var(--fs)}
html.bigtext #app,html.bigtext #lgate,html.bigtext body{overflow-wrap:break-word}
html.bigtext img,html.bigtext iframe,html.bigtext table{max-width:100%}
/* ---- skip link ---- */
.el-skip{position:absolute;left:8px;top:-100px;z-index:2147483647;background:#ffd400;color:#000;font:700 18px system-ui,sans-serif;padding:12px 16px;border:3px solid #000;border-radius:8px}
.el-skip:focus{top:8px}
/* ---- focus: yellow + black double ring everywhere ---- */
html.focusring :focus-visible{outline:4px solid #ffd400!important;outline-offset:2px!important;box-shadow:0 0 0 7px #000!important}
/* ---- tap targets (WCAG 2.2 2.5.8 at least 24px; we give 44px) ---- */
html.a11y button,html.a11y [role=button],html.a11y select,html.a11y #tabs a,html.a11y a.big,html.a11y .btn{min-height:44px;min-width:44px}
.el-set input[type=checkbox]{width:28px;height:28px;margin:8px;flex:none}
/* ---- gear buttons + panel ---- */
.el-gear{display:inline-flex;align-items:center;gap:6px;background:transparent;border:2px solid currentColor;color:inherit;border-radius:24px;padding:6px 12px;font:600 16px system-ui,sans-serif;cursor:pointer}
.el-gear span{font-size:14px}
header .el-gear span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
#lgate .el-gear{display:flex;margin:8px auto;color:#123;background:#f1f5f9}
.el-set-wrap{position:fixed;inset:0;z-index:2147483600;background:#0008;display:flex;align-items:flex-end;justify-content:center}
.el-set{background:#fff;color:#111;width:100%;max-width:560px;max-height:92vh;overflow:auto;border-radius:18px 18px 0 0;padding:16px 16px 24px;font:18px/1.4 system-ui,'Noto Naskh Arabic',sans-serif;box-sizing:border-box}
.el-set-top{display:flex;align-items:center;justify-content:space-between}
.el-set h2{margin:0;font-size:24px}
.el-x{background:#eee;border:0;border-radius:50%;width:48px;height:48px;font-size:22px;color:#111}
.el-ts{border:2px solid #ccc;border-radius:12px;margin:12px 0;display:flex;flex-wrap:wrap;gap:6px;padding:8px}
.el-ts legend{font-weight:700;padding:0 4px}
.el-ts button{flex:1 1 60px;border:2px solid #1e4f55;background:#fff;color:#111;border-radius:10px;font-weight:700}
.el-ts button[aria-pressed=true]{background:#1e4f55;color:#fff}
.el-row{display:flex;gap:10px;align-items:flex-start;padding:10px 0;border-top:1px solid #ddd;cursor:pointer}
.el-row span{display:flex;flex-direction:column}.el-row small{color:#333;font-size:15px}
.el-done{width:100%;margin-top:12px;background:#1e4f55;color:#fff;border:0;border-radius:12px;font:700 20px system-ui,sans-serif;min-height:56px}
/* ---- captions + flashes + suggestion ---- */
.el-cap{position:fixed;left:8px;right:8px;bottom:calc(84px + env(safe-area-inset-bottom));z-index:2147483500;background:#000;color:#fff;border:3px solid #ffd400;border-radius:12px;padding:10px 14px;font:600 18px/1.35 system-ui,'Noto Naskh Arabic',sans-serif;max-height:40vh;overflow:auto;pointer-events:none}
.el-cap[hidden]{display:none}
.el-flash{position:fixed;inset:0;z-index:2147483400;pointer-events:none;box-shadow:inset 0 0 0 0 transparent;opacity:0}
html.flashsnd .el-flash.go{opacity:1;animation:elfl .6s ease-out}
.el-flash.snd.go{box-shadow:inset 0 0 0 10px #2a9d8f}.el-flash.buzz.go{box-shadow:inset 0 0 0 14px #e63946}.el-flash.alert.go{box-shadow:inset 0 0 0 16px #ffb703}
@keyframes elfl{from{opacity:1}to{opacity:0}}
html.rmotion .el-flash.go{animation:none;transition:opacity .6s}
.el-sugg{position:fixed;left:8px;right:8px;top:8px;z-index:2147483550;background:#fff8d6;color:#111;border:2px solid #b08900;border-radius:12px;padding:10px;display:flex;flex-wrap:wrap;gap:8px;align-items:center;font:17px system-ui,sans-serif}
.el-sugg span{flex:1 1 200px}.el-sugg button{border:2px solid #111;border-radius:10px;background:#fff;color:#111;font-weight:700;padding:6px 12px}
.el-sugg button[data-y]{background:#1e4f55;color:#fff}
/* ---- low data ---- */
html.lowdata img:not([data-elkeep]),html.lowdata video,html.lowdata .qpic,html.lowdata picture{display:none!important}
html.lowdata *{background-image:none!important}
html.lowdata .r999,html.lowdata .pcirc,html.lowdata #tabs svg{background-image:revert}
.el-showmap{display:block;margin:10px auto;min-height:56px;padding:10px 20px;border:2px solid #1e4f55;border-radius:12px;background:#e8f4f5;color:#111;font:700 18px system-ui,sans-serif}
/* ---- reduced motion (setting or system) ---- */
html.rmotion *,html.rmotion *::before,html.rmotion *::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
/* ---- accessibility / high contrast ---- */
html.a11y{font-size:calc(100% * max(1.25,var(--fs)))}
html.a11y body,html.a11y #app,html.a11y #lgate,html.a11y .card,html.a11y main,html.a11y .el-set{background:#fff!important;color:#000!important}
html.a11y #app,html.a11y #lgate>*{zoom:max(1.25,var(--fs))}
html.a11y *{color:#000!important;text-shadow:none!important;border-color:#000!important}
html.a11y header,html.a11y #tabs{background:#000!important}
html.a11y header *,html.a11y #tabs *{color:#fff!important;border-color:#fff!important}
html.a11y #tabs a.on{background:#ffd400!important}html.a11y #tabs a.on *{color:#000!important}
html.a11y button,html.a11y [role=button],html.a11y a.big,html.a11y .btn,html.a11y select,html.a11y input{min-height:56px;border-width:3px!important;margin:6px 0}
html.a11y main button:not(.r999):not(.rpar),html.a11y #lgate button:not(.r999):not(.rpar),html.a11y .el-set button{background:#fff!important;border:3px solid #000!important}
html.a11y .el-ts button[aria-pressed=true],html.a11y .el-done{background:#000!important;color:#fff!important}
html.a11y a{text-decoration:underline!important;text-underline-offset:3px;text-decoration-thickness:2px}
html.a11y :focus-visible,html.a11y.focusring :focus-visible{outline:6px solid #ffd400!important;outline-offset:3px!important;box-shadow:0 0 0 10px #000!important}
/* keep emergency colours recognisable */
html.a11y .r999,html.a11y .r999 *{background:#d62828!important;color:#fff!important;border-color:#000!important}
html.a11y .pcirc a,html.a11y .rpar{color:#000!important}
html.a11y .el-cap{background:#000!important;color:#fff!important}html.a11y .el-cap *{color:#fff!important}
/* ---- labels under 999 / Parent circles ---- */
.el-cw{display:inline-flex;flex-direction:column;align-items:center;gap:3px;vertical-align:top;max-width:100%}
.el-clbl{display:block;font:800 13px/1.15 system-ui,'Noto Naskh Arabic',sans-serif;text-align:center;white-space:normal;max-width:88px;overflow-wrap:anywhere;padding:1px 5px;border-radius:6px}
.el-cw999 .el-clbl{background:#fff;color:#a4161a;border:2px solid #a4161a}
.el-cwpar .el-clbl{background:#fff;color:#5b3a00;border:2px solid #b07a00}
#tabs .el-clbl{font-size:11px;max-width:60px;padding:0 3px}
#tabs .el-cw .rpar,#tabs .el-cw .r999{margin-top:-14px}
#tabs .tab999{align-items:flex-start}
.pcirc .el-cw{margin:0 auto}
.el-press{animation:elpress .3s ease-out}
@keyframes elpress{0%{transform:scale(.88);box-shadow:0 0 0 0 #fff,0 0 0 10px #ffd40099}100%{transform:scale(1)}}
html.rmotion .el-press{animation:none;outline:4px solid #ffd400}
html.a11y .el-cw999 .el-clbl{background:#fff!important;color:#000!important;border:3px solid #000!important}
html.a11y .el-cwpar .el-clbl{background:#fff!important;color:#000!important;border:3px solid #000!important}
#tabs .tab999{flex:0 0 auto;gap:4px;padding:0 4px}
#tabs .el-cw .rpar,#tabs .el-cw .r999{width:54px!important;height:54px!important;min-width:54px!important;min-height:54px!important}
#tabs .el-clbl{max-width:58px}

.el-set h3{margin:18px 0 4px;font-size:20px}
.el-vol{display:flex;align-items:center;gap:10px;padding:10px 0}.el-vol input{flex:1;min-height:44px}
.el-help{background:#eef6ff;border:2px solid #1a4fd6;border-radius:12px;padding:10px 12px;margin:8px 0;font-size:16px}
.el-help summary{font-weight:700;cursor:pointer;min-height:44px;display:flex;align-items:center}
.el-help ol{padding-inline-start:22px;margin:6px 0}
@media (max-width:374px){#tabs>a{min-width:0!important;flex:1 1 0}#tabs .tab999{gap:2px;padding:0 2px}
 #tabs .el-cw .rpar,#tabs .el-cw .r999{width:46px!important;height:46px!important;min-width:46px!important;min-height:46px!important}
 #tabs .el-clbl{font-size:10px;max-width:50px;padding:0 2px}}
/* ---- I'm OK check-in (opt-in, shown under the orange Parent circle) ---- */
.ci-w{display:flex;flex-direction:column;align-items:center;gap:3px;margin-top:8px}
.ckin{width:44px;height:44px;min-width:44px;min-height:44px;border-radius:50%;border:3px solid #fff;background:#1b7a3a;box-shadow:0 2px 6px #0004;display:flex;align-items:center;justify-content:center;padding:0;cursor:pointer}
.ci-l{font:800 13px/1.1 system-ui,'Noto Naskh Arabic',sans-serif;color:#14532d;background:#fff;border:2px solid #1b7a3a;border-radius:6px;padding:1px 5px}
.ci-opt{display:flex;gap:8px;align-items:flex-start;margin:12px 0;padding:10px;border:2px solid #1b7a3a;border-radius:12px;background:#f0fbf3}
.ci-toast{position:fixed;left:12px;right:12px;bottom:calc(96px + env(safe-area-inset-bottom));z-index:2147483300;background:#14532d;color:#fff;border-radius:12px;padding:12px 14px;font:700 17px/1.3 system-ui,'Noto Naskh Arabic',sans-serif;text-align:center;box-shadow:0 4px 12px #0005}
.ci-toast[hidden]{display:none}
html.a11y .ckin{background:#000!important;border-color:#fff!important}html.a11y .ci-l{color:#000!important;border-color:#000!important}
@media (max-width:374px){html.a11y #tabs{overflow-x:auto}html.a11y #tabs>a{min-width:44px!important;flex:0 0 auto}}
@media (max-width:374px){html.a11y #tabs .tab999{position:sticky;right:0;left:0;z-index:1;background:#000}}
.pcirc .el-cw a.rpar span{display:none!important}
/* ---- Text 999 chip (opt-in: hearing options or "Show Text 999") ---- */
.el-t999{display:none}
html.t999 .el-t999{display:inline-flex;align-items:center;justify-content:center;margin-top:4px;min-height:44px;padding:4px 12px;border:2px solid #1e4f55;border-radius:22px;background:#fff;color:#123;font:800 14px/1.1 system-ui,'Noto Naskh Arabic',sans-serif;cursor:pointer;white-space:nowrap}
#tabs .el-t999{display:none!important}
.el-t999card ol,.el-t999card ul{padding-inline-start:22px;margin:6px 0}.el-t999card li{margin:6px 0}
.el-t9more{display:block;margin:12px 0 4px;padding:12px;border:2px solid #1a4fd6;border-radius:12px;text-align:center;font-weight:700;color:#0b3fb3;min-height:44px}
html.a11y .el-t999{border:3px solid #000!important;background:#fff!important;color:#000!important}
.el-cw a.rpar span{display:none!important}
/* Tab bar (Miyuki): Parent circle stays in the bar, the 999 circle (+ "Call 999" label) floats directly above it. */
#tabs .tab999{position:relative;flex:0 0 72px;gap:0;padding:0;display:flex;justify-content:center;align-items:flex-start}
#tabs .tab999>.el-cw999,#tabs .tab999>.r999{position:absolute;bottom:calc(100% + 22px);left:50%;transform:translateX(-50%);margin:0;z-index:51}
#tabs .tab999 .r999.r999tab{margin-top:0!important}
#tabs .el-cwpar{margin-top:0}
#app{padding-bottom:190px}
@media (max-width:374px){#tabs .tab999{flex:0 0 62px}}

/* ---- RESET: big button at the top of the menu, fixed escape chip, toast. Menu itself never zooms. ---- */
.el-set{zoom:1!important;max-height:calc(100dvh - 8px);overscroll-behavior:contain}
.el-set-top{position:sticky;top:-16px;background:#fff;z-index:2;padding:8px 0;margin-top:-8px}
.el-x{flex:none}
.el-resetbig{display:block;width:100%;margin:10px 0 6px;min-height:56px;border:3px solid #a4161a;border-radius:14px;background:#fff;color:#a4161a;font:800 20px/1.2 system-ui,'Noto Naskh Arabic',sans-serif;cursor:pointer}
.el-reset{display:none}
html.a11y .el-reset,html.bigtext .el-reset,html.focusring .el-reset{display:flex;align-items:center;position:fixed;left:8px;bottom:calc(84px + env(safe-area-inset-bottom));z-index:2147483200;min-height:44px;padding:6px 14px;border:3px solid #000!important;border-radius:22px;background:#ffd400!important;color:#000!important;font:800 16px/1 system-ui,'Noto Naskh Arabic',sans-serif!important;box-shadow:0 2px 8px #0006;zoom:1!important;cursor:pointer}
.el-toast{position:fixed;left:50%;top:16px;transform:translateX(-50%);z-index:2147483646;background:#14532d;color:#fff;border-radius:12px;padding:12px 18px;font:700 18px system-ui,'Noto Naskh Arabic',sans-serif;box-shadow:0 4px 12px #0005}
html.lg-on .el-reset{bottom:auto!important;top:8px;left:auto!important;right:8px}
/* big text on the login screen: let rows wrap instead of running off the right edge */
html.bigtext #lgate .lg-999row,html.a11y #lgate .lg-999row{flex-wrap:wrap}
html.bigtext #lgate *,html.a11y #lgate *{min-width:0;max-width:100%;overflow-wrap:break-word}
html.bigtext #lgate,html.a11y #lgate{overflow-x:hidden}

/* ---- Reset button: header (left of ♿) and login top bar. Fixed px size, immune to text size / Easy to see. ---- */
.el-gatebar{display:flex;justify-content:flex-end;align-items:center;gap:8px;position:sticky;top:0;z-index:5;padding:8px;background:#fff;zoom:1!important}
html.bigtext #lgate>.el-gatebar,html.a11y #lgate>.el-gatebar{zoom:1!important}
#lgate .el-gatebar .el-gear{margin:0;height:40px!important;min-height:40px!important;padding:0 12px!important;font:700 15px/1 system-ui,'Noto Naskh Arabic',sans-serif!important;zoom:1!important}
.el-resetbtn,html.a11y .el-resetbtn,html.a11y header .el-resetbtn,html.a11y main .el-resetbtn,html.a11y #lgate .el-resetbtn{flex:none;box-sizing:border-box;height:40px!important;min-height:40px!important;max-height:40px!important;min-width:0!important;width:auto!important;margin:0!important;padding:0 12px!important;border:2px solid #ffd400!important;border-radius:20px!important;background:#000!important;color:#fff!important;font:800 15px/1 system-ui,'Noto Naskh Arabic',sans-serif!important;letter-spacing:0;zoom:1!important;white-space:nowrap;cursor:pointer}
html.a11y header .el-resetbtn *{color:#fff!important}
.el-gatebar .el-resetbtn{border-color:#000!important}
header .el-gear{height:40px;min-height:40px!important;zoom:1!important}
/* Home (2026-10-15, Joseph): "I'm OK" sits BESIDE the orange Alert family circle on one row (was stacked, pushing content down). */
.pcirc.pcirc{flex-direction:row;flex-wrap:nowrap;justify-content:center;align-items:flex-start;gap:20px;max-width:100%}
.pcirc.pcirc>.el-cw,.pcirc.pcirc>.ci-w{flex:0 1 auto;min-width:0;max-width:calc(50% - 10px)}
.pcirc.pcirc>.ci-w{margin:0;padding-top:6px}.pcirc.pcirc>.el-cw{margin:0}
.pcirc .ci-l{max-width:110px;white-space:normal;overflow-wrap:anywhere;text-align:center}
