@font-face{font-family:Sing;font-weight:200;src:url(fonts/FbSingulari-ExtraLight.otf);font-display:block}
@font-face{font-family:Sing;font-weight:300;src:url(fonts/FbSingulari-Light.otf);font-display:block}
@font-face{font-family:Sing;font-weight:400;src:url(fonts/FbSingulari-Regular.otf);font-display:block}
@font-face{font-family:Sing;font-weight:500;src:url(fonts/FbSingulari-Medium.otf);font-display:block}
@font-face{font-family:Sing;font-weight:700;src:url(fonts/FbSingulari-Bold.otf);font-display:block}
@font-face{font-family:Sing;font-weight:900;src:url(fonts/FbSingulari-Black.otf);font-display:block}
:root{--n950:#051E29;--n900:#08293A;--n800:#0C3A4D;--n700:#104967;--n500:#3D6A7D;--n300:#8FA9B5;--n100:#DCE6EA;--g:#9DB93A;--gink:#0A2E12;--line:rgba(255,255,255,.16)}
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html,body{height:100%}
body{background:var(--n950);color:#fff;font-family:Sing,Rubik,Arial,sans-serif;font-size:17px;line-height:1.35;overscroll-behavior:none}
button,input,textarea{font:inherit;color:inherit}
button{cursor:pointer;border:0;background:none}
.scr{display:none;min-height:100%;max-width:560px;margin:0 auto;padding:calc(env(safe-area-inset-top) + 14px) 18px calc(env(safe-area-inset-bottom) + 24px)}
.scr.on{display:block}

/* בית */
.hlogo{display:block;width:150px;margin:26px 0 44px auto}
#home h1,#login h1{font-weight:900;font-size:92px;line-height:.9;display:flex;align-items:flex-end;gap:14px}
#home h1 i,#login h1 i{width:22px;height:22px;border-radius:50%;background:var(--g);margin-bottom:12px}
.sub{font-weight:300;font-size:24px;color:var(--n100);margin:10px 0 34px}
.big{display:block;width:100%;text-align:right;background:var(--n800);padding:22px 26px 22px 20px;margin-bottom:12px;clip-path:polygon(18px 0,100% 0,calc(100% - 18px) 100%,0 100%);box-shadow:inset 0 -5px 0 var(--g)}
.big b{display:block;font-weight:900;font-size:30px;line-height:1.1}
.big span{display:block;font-weight:300;font-size:17px;color:var(--n300);margin-top:4px}
.big:active{background:var(--n700)}
.big.solid{background:var(--g);color:var(--gink);box-shadow:none;text-align:center}
.note{font-weight:300;font-size:15px;color:var(--n300);margin-top:26px}

header{display:flex;align-items:center;justify-content:space-between;gap:10px;height:44px;margin-bottom:10px}
header h2{font-weight:900;font-size:24px}
header span{width:64px}
.back{font-weight:500;color:var(--n300);min-width:64px;height:44px;text-align:right}
.go{font-weight:700;background:var(--g);color:var(--gink);height:40px;padding:0 22px;clip-path:polygon(9px 0,100% 0,calc(100% - 9px) 100%,0 100%)}
.hint{font-weight:300;font-size:15px;color:var(--n300);margin:8px 0}
.hint b{color:var(--g);font-weight:700}

/* בחירת עמוד */
#pagelist{display:grid;grid-template-columns:1fr 1fr;gap:14px}
#pagelist button{background:#fff;position:relative;padding:0;line-height:0}
#pagelist canvas{width:100%;height:auto}
#pagelist em{position:absolute;bottom:0;right:0;background:var(--g);color:var(--gink);font-style:normal;font-weight:700;font-size:15px;line-height:1.6;padding:0 12px}

/* בדיקת כיסויים */
.rvwrap{overflow:auto;max-height:calc(100dvh - 210px);background:#000;border:1px solid var(--line)}
#rv{display:block;width:100%;height:auto;touch-action:none}
#rv.scroll{touch-action:auto}
.tools{display:flex;gap:8px;overflow-x:auto;padding:10px 0;scrollbar-width:none}
.tools button{flex:none;font-weight:500;font-size:15px;height:38px;padding:0 15px;background:var(--n800);white-space:nowrap}
.tools button.on{background:var(--g);color:var(--gink);font-weight:700}
.tools button:disabled{opacity:.35}
.tools button[hidden]{display:none}

/* עורך */
#edit{padding-left:0;padding-right:0;padding-bottom:0}
#edit header{padding:0 18px}
.stage{position:sticky;top:0;z-index:2;background:var(--n950);padding:4px 0 10px;display:flex;justify-content:center}
#cv{height:56dvh;width:auto;aspect-ratio:9/16;touch-action:none;box-shadow:0 10px 40px rgba(0,0,0,.5);transition:height .2s}
body.typing #cv{height:30dvh}
.panel{padding:0 18px calc(env(safe-area-inset-bottom) + 40px)}
.strip{display:flex;gap:10px;overflow-x:auto;padding:4px 0 8px;scrollbar-width:none}
.strip button{flex:none;width:76px}
.strip canvas{width:76px;height:135px;display:block;outline:2px solid transparent;outline-offset:1px;background:var(--n800)}
.strip button.on canvas{outline-color:var(--g)}
.strip span{display:block;font-size:12.5px;font-weight:500;color:var(--n300);margin-top:5px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.strip button.on span{color:#fff}
.zoom{display:flex;align-items:center;gap:12px;font-size:15px;color:var(--n300)}
.zoom input{flex:1;accent-color:var(--g)}
form{display:grid;gap:12px;margin-top:10px}
form label{display:block}
form label>span{display:block;font-size:14px;font-weight:500;color:var(--n300);margin-bottom:4px}
form input,form textarea{width:100%;background:var(--n900);border:1px solid var(--line);border-radius:0;padding:11px 12px;font-size:18px;font-weight:500;outline:none;-webkit-appearance:none}
form input:focus,form textarea:focus{border-color:var(--g)}
form textarea{resize:none;line-height:1.3}
form .pair{display:grid;grid-template-columns:1fr 1.4fr;gap:8px}
form .chips{display:flex;gap:6px;overflow-x:auto;margin-top:6px;scrollbar-width:none}
form .chips button{flex:none;font-size:14px;font-weight:500;padding:5px 12px;background:var(--n800);color:var(--n100);white-space:nowrap}

#busy{display:none;position:fixed;inset:0;z-index:20;background:rgba(5,30,41,.92);align-items:center;justify-content:center;text-align:center;padding:30px}
#busy.on{display:flex}
#busy i{display:block;width:54px;height:54px;margin:0 auto 18px;border:5px solid var(--n700);border-top-color:var(--g);border-radius:50%;animation:sp 1s linear infinite}
#busy p{font-weight:500;font-size:20px}
@keyframes sp{to{transform:rotate(360deg)}}

#done{display:none;position:fixed;inset:0;z-index:15;background:var(--n950);overflow:auto;padding:calc(env(safe-area-inset-top) + 14px) 18px calc(env(safe-area-inset-bottom) + 24px)}
#done.on{display:block}
.sheet{max-width:520px;margin:0 auto;text-align:center}
#result{height:52dvh;width:auto;max-width:100%;box-shadow:0 10px 40px rgba(0,0,0,.5);margin-bottom:14px;-webkit-touch-callout:default}
.chk{font-size:15px;font-weight:500;color:var(--n100);text-align:right;margin-bottom:14px;border-right:4px solid var(--g);padding-right:12px}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:6px}
.row2 button{height:46px;background:var(--n800);font-weight:500}
#loginErr{color:#ffb4c0}
form [hidden]{display:none}
