  :root{
    --bg:#eef2f7; --card:#fff; --ink:#0f1b2d; --muted:#6b7a90; --line:#e4e9f1;
    --green:#17a34a; --green-soft:#e6f7ec; --amber:#d97706; --amber-soft:#fdf1de;
    --red:#e0454b; --red-soft:#fdecec; --navy:#14213a;
  }
  *{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
  html,body{margin:0;height:100%}
  body{font-family:"Noto Sans Arabic","Segoe UI",system-ui,sans-serif;background:var(--bg);color:var(--ink);display:flex;justify-content:center;-webkit-font-smoothing:antialiased}
  .phone{width:390px;height:844px;background:var(--bg);display:flex;flex-direction:column;position:relative;overflow:hidden}

  .topbar{display:flex;align-items:center;justify-content:space-between;padding:8px 16px 6px}
  .brand{display:flex;align-items:center;gap:8px;font-weight:800;font-size:15px}
  .logo{width:26px;height:26px;border-radius:9px;background:var(--navy);color:#fff;display:grid;place-items:center;font-size:14px;font-weight:800}
  .who{font-size:12px;color:var(--muted);font-weight:600}

  .scroll{flex:1;overflow-y:auto;padding:0 14px 92px;scrollbar-width:none}
  .scroll::-webkit-scrollbar{display:none}

  .session{background:linear-gradient(160deg,#1b2c4b,#16233c);color:#fff;border-radius:18px;padding:11px 14px 11px;box-shadow:0 10px 22px rgba(20,33,58,.16)}
  .sess-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
  .live{display:inline-flex;align-items:center;gap:6px;background:rgba(23,163,74,.18);color:#8ff0b3;font-size:11px;font-weight:700;padding:5px 9px;border-radius:999px}
  .dot{width:6px;height:6px;border-radius:50%;background:#37d67a;box-shadow:0 0 0 3px rgba(55,214,122,.18)}
  .cancel{background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.16);color:#ffb4b6;font-family:inherit;font-size:11px;font-weight:700;padding:6px 9px;border-radius:10px}
  .session h1{margin:8px 0 1px;font-size:18px;font-weight:800;letter-spacing:-.3px}
  .session .sub{margin:0;font-size:11.5px;color:#a9b8d0;font-weight:600}

  .lesbtn{width:100%;margin-top:9px;display:flex;align-items:center;gap:8px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.15);border-radius:12px;padding:8px 10px;font-family:inherit;text-align:right}
  .lesbtn .num{flex:none;background:#fff;color:#16233c;font-size:11px;font-weight:800;padding:3px 7px;border-radius:7px}
  .lesbtn .ttl{flex:1;min-width:0;font-size:11.5px;font-weight:700;color:#e6edf7;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .lesbtn .chg{flex:none;font-size:10.5px;font-weight:800;color:#8ff0b3}
  .lesbtn.off .num{background:#ffd9c2;color:#7a3210}
  .lesbtn.off .ttl{color:#ffd9c2}

  .miniline{margin-top:8px;font-size:11px;font-weight:700;color:#93a5bf}
  .miniline b{font-weight:800}
  .miniline .g{color:#57e08e}.miniline .a{color:#ff8a8d}.miniline .l{color:#ffc46b}

  .quick{display:flex;gap:8px;margin-top:10px}
  .qbtn{font-family:inherit;border:none;border-radius:13px;font-weight:800;font-size:13px;padding:11px 8px;display:flex;align-items:center;justify-content:center;gap:6px;transition:background .15s,color .15s,transform .1s}
  .qbtn:active{transform:scale(.98)}
  .qbtn.primary{flex:1.5;background:var(--green);color:#fff;box-shadow:0 6px 14px rgba(23,163,74,.25)}
  .qbtn.primary.pressed{background:#fff;color:var(--green);border:1.5px solid var(--green);box-shadow:none}
  .qbtn.ghost{flex:1;background:#fff;color:#33415c;border:1px solid var(--line)}
  .qbtn.ghost:disabled{color:#bcc6d4}

  .filters{display:flex;gap:6px;margin:10px 0 6px}
  .f{font-family:inherit;border:1px solid var(--line);background:#fff;color:#6b7a90;font-size:11.5px;font-weight:800;padding:7px 10px;border-radius:11px;display:flex;align-items:center;gap:5px}
  .f span{background:#eef2f7;color:#8b98ab;border-radius:6px;padding:1px 5px;font-size:10px}
  .f.on{background:var(--navy);border-color:var(--navy);color:#fff}
  .f.on span{background:rgba(255,255,255,.16);color:#fff}

  .listhint{font-size:10.5px;color:var(--muted);font-weight:600;margin:0 3px 6px;display:flex;justify-content:space-between}
  ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
  li.stu{display:flex;align-items:center;gap:8px;background:var(--card);border:1px solid var(--line);border-radius:13px;padding:6px 9px;transition:background .15s,border-color .15s}
  li.stu.s-absent{border-color:#f6c9ca;background:#fffafa}
  li.stu.s-late{border-color:#f4dfbb;background:#fffdf8}
  .info{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
  .nm{font-family:inherit;background:none;border:none;padding:0;margin:0;text-align:right;font-size:14px;font-weight:700;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center;gap:4px}
  .nm .chev{color:#c2ccda;font-size:13px}
  #pgTpl .nbody{padding-bottom:40px}
  .chips{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
  .pts{font-family:inherit;font-size:10px;font-weight:800;border-radius:6px;padding:2px 6px;border:1px solid #f3e3c0;background:#fdf6e8;color:#a4690a;white-space:nowrap;display:inline-flex;gap:4px;align-items:center}
  .pts b{color:#d97706}
  .pmeta b.gold{color:#d97706}
  .ptsrow{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:2px 2px 0}
  .ptshint{font-size:10.5px;color:#8a94a6;line-height:1.7;flex:1}
  .ptsbtns{display:flex;gap:8px;flex:none}
  .ptsbtn{font-family:inherit;font-size:13px;font-weight:800;padding:9px 16px;border-radius:12px;border:1px solid var(--line);background:#fff;color:#6b7a90}
  .ptsbtn.plus{background:#fdf6e8;border-color:#f3e3c0;color:#a4690a}
  .abs{font-size:10px;font-weight:800;color:#8b98ab;background:#f3f6fa;border-radius:6px;padding:2px 5px;white-space:nowrap}
  .abs.warn{color:#b4541a;background:var(--amber-soft)}
  .hw{font-family:inherit;font-size:10px;font-weight:800;border-radius:6px;padding:2px 6px;border:1px solid #e8edf4;background:#f7f9fc;color:#b3bdca;white-space:nowrap}
  .hw.done{background:#eef2f7;border-color:#e0e6ee;color:#3c4a60}
  .streak{display:flex;gap:3px;align-items:center}
  .streak i{width:5px;height:5px;border-radius:50%;display:block}
  .streak i.ok{background:#4cc57e}.streak i.no{background:#f0a1a3}.streak i.lt{background:#efc07a}

  .states{display:flex;gap:4px}
  .seg{width:50px;height:38px;font-family:inherit;font-size:11.5px;font-weight:800;border-radius:11px;border:1px solid var(--line);background:#f7f9fc;color:#96a3b4;transition:background .12s,color .12s,border-color .12s,transform .1s}
  .seg:active{transform:scale(.95)}
  .seg.on-p{background:var(--green);border-color:var(--green);color:#fff;box-shadow:0 3px 8px rgba(23,163,74,.25)}
  .seg.on-l{background:var(--amber);border-color:var(--amber);color:#fff;box-shadow:0 3px 8px rgba(217,119,6,.25)}
  .seg.on-a{background:var(--red);border-color:var(--red);color:#fff;box-shadow:0 3px 8px rgba(224,69,75,.25)}

  .addrow{margin:10px 0 4px;width:100%;font-family:inherit;font-size:12.5px;font-weight:700;color:#33415c;background:#fff;border:1.5px dashed #cdd7e4;border-radius:13px;padding:12px}

  .savebar{position:absolute;left:0;right:0;bottom:0;background:#fff;border-top:1px solid var(--line);padding:9px 14px 15px;display:flex;align-items:center;gap:10px;box-shadow:0 -6px 18px rgba(16,28,48,.06)}
  .sbinfo{font-size:11px;color:var(--muted);font-weight:700;line-height:1.35}
  .sbinfo b{color:var(--ink);font-size:13px;display:block}
  .save{margin-right:auto;font-family:inherit;background:var(--navy);color:#fff;border:none;border-radius:14px;padding:12px 22px;font-size:14px;font-weight:800}

  .overlay{position:absolute;inset:0;background:rgba(10,20,38,.42);opacity:0;pointer-events:none;transition:opacity .22s}
  .overlay.show{opacity:1;pointer-events:auto}
  .sheet{position:absolute;left:0;right:0;bottom:0;background:#fff;border-radius:24px 24px 0 0;padding:10px 22px 24px;transform:translateY(102%);transition:transform .26s cubic-bezier(.2,.8,.2,1);max-height:92%;overflow:auto}
  .sheet.show{transform:translateY(0)}
  .handle{width:40px;height:4px;border-radius:99px;background:#dfe5ee;margin:2px auto 10px}
  .sh-head{display:flex;align-items:center;gap:10px}
  .whoami{flex:1;min-width:0}
  .whoami h2{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .av{width:40px;height:40px;border-radius:13px;background:#eaf0fb;color:#2b4d8f;display:grid;place-items:center;font-weight:800;font-size:16px}
  .sh-head h2{margin:0;font-size:16.5px;font-weight:800}
  .sh-head p{margin:1px 0 0;font-size:11px;color:var(--muted);font-weight:600}
  .x{margin-right:auto;background:#f3f6fa;border:none;border-radius:10px;width:30px;height:30px;font-size:13px;color:#6b7a90;font-family:inherit}

  .lbl{font-size:11px;font-weight:800;color:#93a1b3;margin:13px 0 6px;display:flex;align-items:center;justify-content:space-between}
  .lbl .cnt{background:var(--green-soft);color:#128040;border-radius:7px;padding:2px 7px;font-size:10.5px;font-weight:800}
  .lbl .cnt.zero{background:#f3f6fa;color:#8b98ab}

  .hwr{display:flex;align-items:center;gap:8px;width:100%;font-family:inherit;text-align:right;background:#fff;border:1px solid var(--line);border-radius:11px;padding:8px 10px;margin-bottom:5px;transition:background .15s,border-color .15s}
  .hwr.on{background:#fbfffc;border-color:#cfe9da}
  .hwmain{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
  .hwd{font-size:11.5px;font-weight:700;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .hwdd{font-size:9.5px;font-weight:700;color:#9aa7b8}
  .hws{flex:none;font-size:10px;font-weight:800;padding:4px 8px;border-radius:7px;white-space:nowrap}
  .hws.yes{background:var(--green-soft);color:#128040}
  .hws.no{background:#f3f6fa;color:#8b98ab}
  .hwnote{display:none;font-size:10.5px;font-weight:700;color:#128040;background:var(--green-soft);border-radius:9px;padding:6px 9px;margin-top:2px}
  .hwnote.show{display:block}
  .tl{position:relative;margin-top:2px}
  .tl::before{content:"";position:absolute;right:5px;top:16px;bottom:18px;width:2px;background:#e6ebf2;border-radius:2px}
  .tlitem{position:relative;margin-right:18px;margin-bottom:7px;width:calc(100% - 18px);display:flex;align-items:center;gap:9px;font-family:inherit;text-align:right;background:#fff;border:1px solid var(--line);border-radius:12px;padding:9px 11px;transition:background .15s,border-color .15s}
  .tlitem .dot{position:absolute;right:-18px;top:50%;margin-top:-5px;width:10px;height:10px;border-radius:50%;background:#b3bfd0}
  .tlitem.green{background:#fbfffc;border-color:#cfe9da}
  .tlitem.green .dot{background:var(--green)}
  .tlitem.red{background:#fffafa;border-color:#f6c9ca}
  .tlitem.red .dot{background:var(--red)}
  .tlitem.neutral{background:#f4f6fa;border-color:#e2e8f1}
  .tlitem.neutral .dot{background:#b3bfd0}
  .tlitem .body{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
  .tlitem .l1{display:flex;align-items:center;gap:6px}
  .tlitem .date{font-size:10.5px;font-weight:800;color:#8b98ab}
  .tlitem .st{font-size:9.5px;font-weight:800;padding:2px 7px;border-radius:6px;background:#f3f6fa;color:#8b98ab}
  .tlitem.green .st{background:var(--green-soft);color:#128040}
  .tlitem.red .st{background:var(--red-soft);color:#c02a2f}
  .tlitem .ttl{font-size:11.5px;font-weight:700;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .ltr{direction:ltr;unicode-bidi:isolate;display:inline-block}
  .hwblock{margin-top:18px}
  .hwtop{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:16px}
  .hwtitle{font-size:12px;font-weight:800;color:#9aa7b8}
  .hwmeta{font-size:11px;font-weight:700;color:#9aa7b8}
  .hwover{color:#d9575c;margin-right:7px}
  .hwgrid{display:flex;justify-content:space-between;gap:10px}
  .hwc{flex:1;display:flex;flex-direction:column;align-items:center;gap:9px;background:none;border:none;font-family:inherit;padding:0}
  .circ{position:relative;width:56px;height:56px;border-radius:50%;display:grid;place-items:center;font-size:12.5px;font-weight:800;background:#fff;border:1.5px solid #dbe2ec;color:#a3aebd;transition:background .15s,color .15s,border-color .15s,transform .1s}
  .hwc:active .circ{transform:scale(.94)}
  .hwc.done .circ{background:var(--navy);border-color:var(--navy);color:#fff}
  .hwc.over .circ{border-color:#e0454b;color:#c02a2f;background:#fff}
  .hwc.over .circ::after{content:"";position:absolute;top:0;left:0;width:9px;height:9px;border-radius:50%;background:#e0454b;box-shadow:0 0 0 2.5px #fff}
  .hwc .dt{font-size:9px;font-weight:700;color:#aab5c4}
  .pcard{margin-top:14px;background:#fff;border:1px solid #e9edf5;border-radius:18px;padding:13px 14px}
  .pcardh{display:flex;align-items:center;justify-content:space-between;margin-bottom:11px}
  .pt{font-size:12px;font-weight:800;color:#3c4a60}
  .prel{font-size:10px;font-weight:700;color:#a3aebd}
  .pmeta{font-size:10.5px;font-weight:800;color:#8b98ab}
  .pmeta b{color:#1b2437;font-size:11.5px}
  .pmeta i{font-style:normal;color:#c05a66;margin-right:6px}
  .cal{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
  .cell{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;height:60px;border-radius:15px;border:1px solid #e6ebf3;background:#eef1f7;color:#1b2437;font-family:inherit;transition:background .15s,color .15s,border-color .15s,transform .1s}
  .cell:active{transform:scale(.96)}
  .cell .cn{font-size:13.5px;font-weight:800;letter-spacing:.2px}
  .cell .cd{font-size:8.5px;font-weight:700;color:#98a4b4}
  .cell.sub{background:#5a67c6;border-color:#5a67c6;color:#fff}
  .cell.sub .cd{color:rgba(255,255,255,.78)}
  .cell.over{background:#cf6b78;border-color:#cf6b78;color:#fff}
  .cell.over .cd{color:rgba(255,255,255,.8)}
  .cell.fut{background:#f8fafc;border-color:#eef1f7;color:#c6cedb}
  .cell.fut .cd{color:#d6dde7}
  .pager{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:12px}
  .pgbtn{width:34px;height:32px;border-radius:11px;border:1px solid #e6ebf3;background:#f7f9fc;color:#5b6a80;font-family:inherit;font-size:14px;font-weight:800}
  .pgbtn:disabled{opacity:.35}
  #pgLbl{font-size:10.5px;font-weight:800;color:#8b98ab}
  .absrow{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
  .absbig{font-size:12.5px;font-weight:700;color:#5b6a80}
  .absbig b{font-size:20px;font-weight:800;color:#1b2437;margin-left:3px}
  .abssub{font-size:10.5px;font-weight:700;color:#9aa6b6}
  .linkbtn{font-family:inherit;background:none;border:none;padding:0;font-size:10.5px;font-weight:800;color:#5a67c6}
  .secfoot{display:flex;justify-content:flex-end;margin-top:12px}
  .secbtn{font-family:inherit;font-size:11.5px;font-weight:800;color:#3f4a9e;background:#f1f3ff;border:1px solid #e0e4fc;border-radius:11px;padding:9px 15px}
  .secbtn:active{background:#e6e9fd}
  .abslist{display:none;gap:6px;margin-top:10px;flex-wrap:wrap}
  .abslist.show{display:flex}
  .abslist span{font-size:10px;font-weight:800;color:#b06a72;background:#fdf1f2;border-radius:8px;padding:4px 8px}
  .parrow{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:12px}
  .par{font-size:14px;font-weight:800;color:#1b2437}
  .parnum{font-size:12px;font-weight:700;color:#8b98ab;letter-spacing:.4px}
  .qrow{display:flex;align-items:center;justify-content:space-between;padding:9px 0;font-size:11.5px;font-weight:700;color:#5b6a80}
  .qrow + .qrow{border-top:1px solid #f2f5f9}
  .qrow b{font-size:12px;font-weight:800;color:#1b2437}
  .qpage{position:absolute;inset:0;background:var(--bg);display:none;flex-direction:column;z-index:70}
  .qpage.show{display:flex}
  .qhead{display:flex;align-items:center;gap:10px;padding:14px 16px 10px}
  .qhead h1{margin:0;font-size:17px;font-weight:800}
  .qhead p{margin:2px 0 0;font-size:11px;color:var(--muted);font-weight:600}
  .qhead .x{margin-right:0;margin-left:auto}
  .scroll2{flex:1;overflow-y:auto;padding:0 14px 96px;scrollbar-width:none}
  .scroll2::-webkit-scrollbar{display:none}
  .qinput{width:100%;font-family:inherit;font-size:14px;font-weight:800;color:var(--ink);background:#f7f9fc;border:1px solid var(--line);border-radius:12px;padding:11px 12px}
  .qinput.small{width:80px;text-align:center}
  .maxrow{display:flex;gap:8px;align-items:center;margin-top:9px}
  .maxbtn{font-family:inherit;font-size:12px;font-weight:800;padding:10px 15px;border-radius:11px;border:1px solid var(--line);background:#fff;color:#6b7a90}
  .maxbtn.on{background:#eef0fe;border-color:#d8dcfa;color:#3f4a9e}
  .chiprow{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
  .glist2{display:flex;flex-direction:column;gap:8px}
  .gopt{display:flex;flex-direction:column;gap:3px;align-items:flex-start;text-align:right;width:100%;background:#fff;border:1px solid var(--line);border-radius:14px;padding:11px 13px;font-family:inherit}
  .gopt .go1{font-size:12.5px;font-weight:800;color:#1b2437}
  .gopt .go2{font-size:10.5px;font-weight:700;color:#9aa6b6}
  .gopt.on{background:#eef0fe;border-color:#d8dcfa}
  .gopt.on .go1{color:#3f4a9e}
  .gopt.on .go2{color:#6b78c9}
  .chipb{font-family:inherit;font-size:12px;font-weight:800;padding:10px 15px;border-radius:11px;border:1px solid var(--line);background:#fff;color:#6b7a90}
  .chipb.on{background:#eef0fe;border-color:#d8dcfa;color:#3f4a9e}
  textarea.qinput{resize:none;line-height:1.5;font-weight:700;height:auto}
  .qinput::placeholder{color:#b6c0cd;font-weight:700}
  .qsum{font-size:11px;font-weight:700;color:#8b98ab;margin:14px 3px 8px;display:flex;justify-content:space-between}
  .qlist{display:flex;flex-direction:column;gap:8px}
  .qrow2{background:#fff;border:1px solid #e9edf5;border-radius:16px;padding:10px 12px}
  .qr1{display:flex;align-items:center;justify-content:space-between;gap:8px}
  .qnm{font-size:13.5px;font-weight:800;color:#1b2437}
  .absbtn{font-family:inherit;font-size:10px;font-weight:800;padding:5px 10px;border-radius:9px;border:1px solid #eef1f7;background:#f7f9fc;color:#9aa6b6}
  .absbtn.on{background:#fdf1f2;border-color:#f7dfe1;color:#c05a66}
  .qr2{display:flex;align-items:center;gap:6px;margin-top:9px}
  .stp{flex:1;font-family:inherit;font-size:13px;font-weight:800;height:38px;border-radius:11px;border:1px solid #e6ebf3;background:#f7f9fc;color:#3c4a60}
  .stp:active{background:#eef1f7}
  .gval{min-width:92px;text-align:center;font-size:15px;font-weight:800;color:#1b2437;background:#eef1f7;border-radius:11px;padding:9px 6px}
  .qrow2.abs .gval{color:#b6c0cd;background:#f8fafc}
  .qrow2.abs .stp{opacity:.4}
  .qrow2.abs .qnm{color:#b6c0cd}
  .morebtn{width:100%;margin-top:20px;background:#f5f7fa;border:none;border-radius:12px;padding:12px;font-family:inherit;font-size:12.5px;font-weight:800;color:#5b6a80}
  .more{display:none;margin-top:4px}
  .more.show{display:block}
  .glist{display:flex;flex-direction:column}
  .grow{display:flex;align-items:center;justify-content:space-between;padding:9px 0;border-bottom:1px solid #f1f4f9;font-size:12px;font-weight:700;color:#5b6a80}
  .grow:last-child{border-bottom:none}
  .grow b{font-size:12.5px;font-weight:800;color:var(--ink)}
  .absline{margin-top:12px;font-size:11.5px;font-weight:700;color:#5b6a80;background:#f6f8fb;border-radius:10px;padding:9px 11px}
  .hwr.overdue{background:#fffafa;border-color:#f6c9ca}
  .hwr .odflag{display:flex;align-items:center;gap:3px;font-size:9.5px;font-weight:800;color:#c02a2f;margin-top:1px}
  .lbl .cnt.over{background:var(--red-soft);color:#c02a2f}
  .od{display:inline-flex;align-items:center;gap:2px;background:var(--red-soft);color:#c02a2f;border:1px solid #f6c9ca;border-radius:6px;padding:1px 5px;font-size:9.5px;font-weight:800;white-space:nowrap}

  .sess5{display:flex;gap:6px}
  .s5{flex:1;border-radius:11px;padding:8px 3px;text-align:center;background:#f6f8fb}
  .s5 b{display:block;font-size:13px;line-height:1.15}
  .s5 span{font-size:8.5px;color:#93a1b3;font-weight:700}
  .s5 b{color:#6b7a90}

  .grades{display:flex;gap:6px}
  .gr{flex:1;background:#f7f9fc;border:1px solid var(--line);border-radius:11px;padding:7px 8px}
  .gr span{display:block;font-size:10px;color:#93a1b3;font-weight:700}
  .gr b{font-size:14px;font-weight:800}
  .gr b i{font-style:normal;font-size:10.5px;color:#a6b2c2;font-weight:700}

  .absbox{display:flex;align-items:center;gap:7px;margin-top:10px;background:#fff7f0;border:1px solid #f8e0cc;border-radius:11px;padding:9px 11px;font-size:11.5px;font-weight:700;color:#a4560f}
  .acts{display:flex;gap:8px;margin-top:12px}
  .acts button{flex:1;font-family:inherit;border:none;border-radius:13px;padding:13px;font-size:13px;font-weight:800}
  .call{background:var(--navy);color:#fff}
  .wa{background:#f2f5f9;color:#3c4a60}

  /* lesson picker */
  .termtabs{display:flex;gap:6px;margin:2px 0 10px}
  .termtabs button{flex:1;font-family:inherit;font-size:12px;font-weight:800;padding:9px;border-radius:11px;border:1px solid var(--line);background:#f7f9fc;color:#6b7a90}
  .termtabs button.on{background:var(--navy);border-color:var(--navy);color:#fff}
  .sprow{display:flex;gap:6px;margin-bottom:10px}
  .sprow button{flex:1;font-family:inherit;font-size:11.5px;font-weight:800;padding:10px;border-radius:11px;border:1px solid #f0dcc6;background:#fffaf4;color:#a4560f}
  .sprow button.rv{border-color:#cfd5f3;background:#eef0fb;color:#4a56b0}
  .sw{width:auto!important;height:auto!important;min-height:0!important;margin:0!important;display:flex;align-items:center;gap:8px;font-family:inherit;border:none;background:none;padding:0;color:inherit}
  .sw i{position:relative;width:34px;height:20px;border-radius:12px;background:#d5dce6;flex:none;transition:.15s}
  .sw i::after{content:"";position:absolute;top:2px;right:2px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:.15s}
  .sw.on i{background:#2fa35b!important}
  .sw.on i::after{right:16px}
  .sw span{font-size:12px;font-weight:800;color:#93a1b3}
  .sw.on span{color:#1f8a4a}
  .hwrow{display:flex;align-items:center;justify-content:space-between;background:#f7f9fc;border:1px solid var(--line);border-radius:12px;padding:11px 12px;margin-bottom:10px}
  .hwrow div{flex:1}
  .hwrow div b{display:block;font-size:13px;font-weight:800;color:#33415c}
  .hwrow div small{font-size:10.5px;font-weight:600;color:#93a1b3}
  .rvp{display:none}
  .rvp.show{display:block}
  .rvp h3{margin:2px 2px 4px;font-size:15px;font-weight:800}
  .rvp p{margin:0 2px 10px;font-size:11.5px;color:#93a1b3;font-weight:600}
  .rvgrid{display:grid;grid-template-columns:1fr 1fr;gap:7px}
  .rvgrid button{font-family:inherit;text-align:right;border:1px solid var(--line);background:#fff;border-radius:13px;padding:11px 12px;color:#33415c}
  .rvgrid button b{display:block;font-size:13px;font-weight:800;margin-bottom:2px}
  .rvgrid button span{display:block;font-size:10.5px;font-weight:600;color:#93a1b3;line-height:1.4}
  .rvgrid button.on{background:#eef0fb;border-color:#5a67c6}
  .rvgrid button.on b{color:#4a56b0}
  .rvname{margin:12px 0 10px;background:#f5f8fc;border-radius:12px;padding:10px 12px;font-size:13px;font-weight:800;color:#33415c}
  .rvname small{display:block;font-size:10.5px;color:#93a1b3;font-weight:600;margin-top:2px}
  .rvok{width:100%;font-family:inherit;border:none;border-radius:14px;padding:14px;font-size:14px;font-weight:800;background:#5a67c6;color:#fff}
  .rvok:disabled{opacity:.4}
  .rvback{font-family:inherit;border:none;background:none;color:#6b7a90;font-size:12px;font-weight:700;margin:0 0 8px;padding:4px 2px;text-decoration:underline}
  .ch{font-size:10.5px;font-weight:800;color:#93a1b3;margin:10px 2px 5px}
  .lrow{display:flex;align-items:center;gap:8px;width:100%;font-family:inherit;text-align:right;background:#fff;border:1px solid var(--line);border-radius:10px;padding:9px 10px;margin-bottom:4px}
  .lrow b{flex:none;font-size:10.5px;font-weight:800;color:#2b4d8f;background:#eaf0fb;border-radius:6px;padding:2px 6px}
  .lrow span{flex:1;font-size:11.5px;font-weight:600;color:#33415c}
  .lrow.sel{border-color:#bfe8cd;background:#fbfffc}
  .lrow .auto{flex:none;font-style:normal;font-size:9.5px;font-weight:800;color:#2b4d8f;background:#eaf0fb;border-radius:6px;padding:2px 6px}
  .autohint{position:sticky;top:0;z-index:2;font-size:10.5px;font-weight:700;line-height:1.7;color:#2b4d8f;background:#eaf0fb;border-radius:9px;padding:7px 10px;margin-bottom:8px}

  .saved{position:absolute;inset:0;background:rgba(10,20,38,.42);display:none;place-items:center;padding:24px;z-index:96}
  .saved.show{display:grid}
  .savedcard{background:#fff;border-radius:22px;padding:24px 20px 18px;text-align:center;width:100%;box-shadow:0 20px 40px rgba(10,20,38,.2)}
  .check{width:56px;height:56px;border-radius:50%;background:var(--green-soft);color:var(--green);display:grid;place-items:center;font-size:26px;margin:0 auto 10px;font-weight:800}
  .savedcard h3{margin:0 0 5px;font-size:19px;font-weight:800}
  .savedcard p{margin:0;font-size:12px;color:var(--muted);font-weight:600;line-height:1.6}
  .savedrow{display:flex;gap:6px;margin:14px 0 16px}
  .savedrow div{flex:1;background:#f5f8fc;border-radius:12px;padding:8px 4px}
  .savedrow b{display:block;font-size:16px;font-weight:800}
  .savedrow span{font-size:10px;color:#93a1b3;font-weight:700}
  .okbtn{width:100%;font-family:inherit;background:var(--navy);color:#fff;border:none;border-radius:14px;padding:13px;font-size:14px;font-weight:800}

  .cancelbar{display:none;align-items:center;gap:8px;background:#fdecec;border:1px solid #f7cfd0;color:#a3232a;border-radius:13px;padding:10px 12px;font-size:12px;font-weight:700;margin:10px 0 0}
  .cancelbar.show{display:flex}
  .cbadge{width:16px;height:16px;border-radius:50%;background:#e0454b;color:#fff;font-size:11px;font-weight:800;display:grid;place-items:center;flex:none}
  /* ---------- add student: 5-second flow ---------- */
  .fastscroll{padding:0 14px 12px}
  .fname{position:relative;margin-top:4px}
  .fnamein{height:58px;font-size:19px;font-weight:800;background:#fff;border:1.5px solid #dfe5f0;border-radius:17px;padding:0 14px;box-shadow:0 2px 0 rgba(16,28,48,.03)}
  .fnamein:focus{outline:none;border-color:#3f4a9e;box-shadow:0 0 0 4px #eef0fe}
  .fnamein.typing{padding-right:27px}
  .caretsim{position:absolute;top:50%;right:16px;width:2px;height:26px;margin-top:-13px;background:#3f4a9e;border-radius:2px;display:none}
  .caretsim.show{display:block}
  .fgroup{display:flex;align-items:center;gap:9px;margin-top:10px;background:#fff;border:1px solid var(--line);border-radius:17px;padding:10px 12px}
  .fg1{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
  .fglab{font-size:10.5px;font-weight:800;color:#a3aebd}
  .fgval{font-size:12.5px;font-weight:800;color:#1b2437;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .fchg{flex:none;font-family:inherit;font-size:11.5px;font-weight:800;color:#3f4a9e;background:#f1f3ff;border:1px solid #e0e4fc;border-radius:11px;padding:8px 13px}
  .fchg:active{background:#e6e9fd}
  .fdel{flex:none;font-family:inherit;font-size:11.5px;font-weight:800;color:#c05a66;background:#fff;border:1px solid #f3d7db;border-radius:11px;padding:8px 13px}
  .fdel:active{background:#fdf1f2}
  .check.warn{background:#fdf1f2;color:#c05a66}
  .delrow{display:flex;gap:8px;margin-top:16px}
  .ghostbtn{flex:1;font-family:inherit;background:#f5f7fa;color:#5b6a80;border:none;border-radius:14px;padding:13px;font-size:14px;font-weight:800}
  .delbtn{flex:1;font-family:inherit;background:#fdf1f2;color:#c05a66;border:1px solid #f3d7db;border-radius:14px;padding:13px;font-size:14px;font-weight:800}
  .fextra{margin-top:10px}
  .fxbtn{width:100%;display:flex;align-items:center;gap:8px;background:#fff;border:1.5px dashed #cdd7e4;border-radius:17px;padding:12px 13px;font-family:inherit;text-align:right}
  .fx1{font-size:12.5px;font-weight:800;color:#33415c;white-space:nowrap}
  .fx2{flex:1;font-size:10.5px;font-weight:700;color:#a9b4c2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .fxchev{font-size:13px;color:#a9b4c2;transition:transform .18s}
  .fextra.open .fxbtn{border-style:solid;border-color:#dfe5f0;border-bottom-left-radius:6px;border-bottom-right-radius:6px}
  .fextra.open .fxchev{transform:rotate(180deg)}
  .fxbody{display:none;margin-top:8px;background:#fff;border:1px solid var(--line);border-radius:17px;padding:13px}
  .fextra.open .fxbody{display:block}
  .fpick{display:none;margin-top:10px;background:#fff;border:1px solid var(--line);border-radius:17px;padding:13px}
  .fpick.show{display:block}
  .fastbar{flex-direction:column;align-items:stretch;gap:7px;padding:8px 12px 12px}
  .fastbar.kbup{bottom:190px}
  .fastsave{width:100%;margin:0;padding:15px;border-radius:16px;font-size:15.5px;letter-spacing:.2px}
  .fsaved{display:none;font-size:11.5px;font-weight:800;color:#177a45;background:#e9f8ef;border:1px solid #cdeedb;border-radius:12px;padding:8px 10px;text-align:center}
  .fsaved.show{display:block}
  .kb{position:absolute;left:0;right:0;bottom:0;height:190px;background:#d3d6de;padding:5px 3px 0;display:none;flex-direction:column;gap:6px;z-index:80;box-shadow:0 -1px 0 rgba(0,0,0,.1)}
  .kb.show{display:flex}
  .kbrow{display:flex;gap:5px;padding:0 1px}
  .key{flex:1;height:38px;background:#fff;border-radius:6px;display:grid;place-items:center;font-size:15px;font-weight:600;color:#0f1b2d;box-shadow:0 1px 0 rgba(0,0,0,.3);line-height:1}
  .key.wide{flex:1.9}
  .key.fn{background:#b9bfcb;font-size:12px;font-weight:800;flex:1.25}
  .kbhome{height:13px;margin-top:2px}
  .fphones{display:flex;gap:9px;margin-top:10px}
  .fph{flex:1;min-width:0;background:#fff;border:1px solid var(--line);border-radius:17px;padding:10px 11px 11px;display:flex;flex-direction:column;gap:7px}
  .fphin{height:44px;font-size:15px;text-align:left;padding:0 11px}
  .fphin:focus{outline:none;border-color:#3f4a9e;box-shadow:0 0 0 3px #eef0fe}
  .fphin.fk{border-color:#3f4a9e;box-shadow:0 0 0 3px #eef0fe;background:#fff}
  .key.num{height:35px;font-size:20px;font-weight:600}
  .key.numfn{background:#b9bfcb;height:35px;font-size:15px;font-weight:800}
  .nextbtn{flex:none;font-family:inherit;font-size:12px;font-weight:800;color:#3f4a9e;background:#f1f3ff;border:1px solid #e0e4fc;border-radius:11px;padding:8px 12px}
  /* ---------- new pages ---------- */
  .npage{position:absolute;inset:0;background:var(--bg);display:none;flex-direction:column;z-index:90}
  .npage.show{display:flex}
  .nhead{display:flex;align-items:center;gap:10px;padding:14px 16px 8px}
  .nhead h1{margin:0;font-size:18px;font-weight:800}
  .nhead p{margin:2px 0 0;font-size:11px;color:var(--muted);font-weight:600}
  .nback{margin-right:0;margin-left:auto;background:#fff;border:1px solid var(--line);border-radius:11px;width:34px;height:34px;font-size:17px;color:#6b7a90;font-family:inherit}
  .nbody{flex:1;overflow-y:auto;padding:0 14px 96px;scrollbar-width:none}
  .nbody::-webkit-scrollbar{display:none}
  .nnav{position:absolute;left:0;right:0;bottom:0;background:#fff;border-top:1px solid var(--line);padding:8px 10px 14px;display:flex;gap:6px;box-shadow:0 -6px 18px rgba(16,28,48,.06)}
  .nnav button{flex:1;font-family:inherit;font-size:12px;font-weight:800;color:#8895a8;background:#f7f9fc;border:1px solid transparent;border-radius:13px;padding:11px 4px}
  .nnav button.on{background:#eef0fe;border-color:#d8dcfa;color:#3f4a9e}
  .nsearch{width:100%;font-family:inherit;font-size:14px;font-weight:700;background:#fff;border:1.5px solid #dfe5f0;border-radius:15px;padding:13px 14px;color:var(--ink)}
  .nsearch::placeholder{color:#b6c0cd}
  .nchips{display:flex;gap:7px;margin-top:10px;flex-wrap:wrap}
  .nchip{font-family:inherit;font-size:12px;font-weight:800;padding:9px 14px;border-radius:11px;border:1px solid var(--line);background:#fff;color:#6b7a90}
  .nchip.on{background:#eef0fe;border-color:#d8dcfa;color:#3f4a9e}
  .ncount{margin:12px 3px 7px;font-size:11px;font-weight:700;color:var(--muted);display:flex;justify-content:space-between}
  .nrow{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid #e9edf5;border-radius:15px;padding:10px 12px;margin-bottom:7px}
  .nav{flex:none;width:36px;height:36px;border-radius:12px;background:#eef0fe;color:#3f4a9e;display:grid;place-items:center;font-size:14px;font-weight:800}
  .ninfo{flex:1;min-width:0}
  .nnm{font-size:14px;font-weight:800;color:#1b2437}
  .nsub{margin-top:3px;font-size:10.5px;font-weight:700;color:#9aa6b6}
  .npill{flex:none;font-size:10.5px;font-weight:800;border-radius:8px;padding:4px 8px;background:#f3f6fa;color:#6b7a90}
  .npill.warn{background:#fdf1de;color:#b4541a}
  .npill.bad{background:#fbe6e9;color:#b4414f}
  .npill.good{background:#e6f4ec;color:#1f7a4a}
  .npill.brand{background:#eef0fe;color:#3f4a9e}
  .npill.gold{background:#fdf6e8;color:#a4690a}
  .leadbtn{width:100%;font-family:inherit;font-size:12.5px;font-weight:800;color:#a4690a;background:#fdf6e8;border:1px solid #f3e3c0;border-radius:13px;padding:11px;margin:10px 0 2px}
  .archived{opacity:.62}
  .arcbtn{font-family:inherit;font-size:11.5px;font-weight:800;color:#a4690a;background:#fffdf6;border:1px solid #f3e3c0;border-radius:11px;padding:8px 13px}
  .arcbtn.small{padding:5px 10px;font-size:10.5px}
  .delrow .arcbtn{flex:1;font-size:14px;padding:13px;border-radius:14px}
  .bigbtn.mkp{background:#fdf6e8;color:#a4690a;border:1px solid #f3e3c0;margin-top:8px}
  .mkday{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
  .mkday .chipb{font-size:11px;padding:9px 4px}
  .gcard{background:#fff;border:1px solid #e9edf5;border-radius:18px;padding:13px 14px;margin-bottom:10px}
  .gtop{display:flex;align-items:center;justify-content:space-between}
  .gday{font-size:16px;font-weight:800}
  .gmeta{margin-top:3px;font-size:11.5px;font-weight:700;color:#8895a8}
  .gstats{display:flex;gap:7px;margin-top:11px}
  .gst{flex:1;background:#f7f9fc;border-radius:12px;padding:8px 6px;text-align:center}
  .gst b{display:block;font-size:15px;font-weight:800;color:#1b2437}
  .gst span{font-size:10px;font-weight:700;color:#9aa6b6}
  .gacts{display:flex;gap:7px;margin-top:11px}
  .gacts button{font-family:inherit;font-size:11.5px;font-weight:800;border-radius:11px;padding:9px 14px;border:1px solid #e0e4fc;background:#f1f3ff;color:#3f4a9e}
  .gacts button.pri{background:#5a67c6;border-color:#5a67c6;color:#fff}
  .addbtn{width:100%;font-family:inherit;font-size:13px;font-weight:800;color:#3f4a9e;background:#fff;border:1.5px dashed #c9d0f3;border-radius:15px;padding:13px;margin-top:2px}
  .bar{height:8px;border-radius:6px;background:#eef1f7;overflow:hidden;margin-top:9px}
  .bar i{display:block;height:100%;border-radius:6px;background:#5a67c6}
  .bigst{display:flex;gap:8px}
  .bigst .gst{padding:12px 6px}
  .bigst .gst b{font-size:22px}
  .lgin{flex:1;display:flex;flex-direction:column;justify-content:center;padding:0 26px 40px}
  .lglogo{width:64px;height:64px;border-radius:22px;background:var(--navy);color:#fff;display:grid;place-items:center;font-size:30px;font-weight:800;margin:0 auto 18px;box-shadow:0 12px 24px rgba(20,33,58,.2)}
  .lgin h1{text-align:center;font-size:24px;margin:0 0 4px;font-weight:800}
  .lgin p{text-align:center;font-size:12.5px;color:var(--muted);font-weight:600;margin:0 0 26px}
  .lglab{font-size:11px;font-weight:800;color:#8895a8;margin:0 3px 6px;display:block}
  .lgbtn{width:100%;margin-top:18px;font-family:inherit;font-size:16px;font-weight:800;color:#fff;background:var(--navy);border:none;border-radius:16px;padding:16px;box-shadow:0 10px 20px rgba(20,33,58,.2)}
  .lgnote{text-align:center;font-size:11px;color:#a3aebd;font-weight:700;margin-top:14px}
  .tpl{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .tplb{font-family:inherit;font-size:12.5px;font-weight:800;color:#6b7a90;background:#fff;border:1px solid var(--line);border-radius:13px;padding:12px 8px}
  .tplb.on{background:#eef0fe;border-color:#d8dcfa;color:#3f4a9e}
  .msgbox{background:#f7f9fc;border:1px solid var(--line);border-radius:14px;padding:12px;font-size:13px;font-weight:700;line-height:1.7;color:#1b2437}
  .bigbtn{width:100%;font-family:inherit;font-size:15.5px;font-weight:800;color:#fff;background:var(--navy);border:none;border-radius:16px;padding:15px}
  .nfoot{position:absolute;left:0;right:0;bottom:0;background:#fff;border-top:1px solid var(--line);padding:9px 12px 14px;box-shadow:0 -6px 18px rgba(16,28,48,.06)}
  .sline{display:flex;align-items:center;justify-content:space-between;padding:6px 0}
  .sline + .sline{border-top:1px solid #f0f3f8}
  .slab{font-size:13px;font-weight:800;color:#1b2437}
  .ssub{font-size:10.5px;font-weight:700;color:#9aa6b6;margin-top:2px}
  .sopts{display:flex;gap:5px}
  .sopts button{font-family:inherit;font-size:12px;font-weight:800;padding:8px 12px;border-radius:10px;border:1px solid var(--line);background:#fff;color:#6b7a90}
  .sopts button.on{background:#eef0fe;border-color:#d8dcfa;color:#3f4a9e}
  .lgout{width:100%;margin-top:4px;font-family:inherit;font-size:13px;font-weight:800;color:#b4414f;background:#fff;border:1px solid #f1d4d8;border-radius:14px;padding:13px}
  .sesrow{display:flex;align-items:center;gap:10px;padding:9px 0}
  .sesrow + .sesrow{border-top:1px solid #f0f3f8}
  .sesdate{flex:1;font-size:13px;font-weight:800;color:#1b2437}
  .sesles{font-size:10.5px;font-weight:700;color:#9aa6b6;margin-top:2px}
  .arch{display:block;margin:6px auto 0;font-family:inherit;font-size:11.5px;font-weight:700;color:#8895a8;background:none;border:none;text-decoration:underline;padding:8px}
  .hrow{display:flex;align-items:center;gap:10px;padding:8px 0}
  .hrow + .hrow{border-top:1px solid #f0f3f8}
  .hdot{flex:none;width:9px;height:9px;border-radius:50%;background:#5a67c6}
  .hdot.old{background:#cfd6e6}
  .bigact{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;width:100%;font-family:inherit;border:none;border-radius:22px;padding:26px 14px;margin-bottom:12px}
  .bigact b{font-size:20px;font-weight:800}
  .bigact span{font-size:12px;font-weight:700;opacity:.8}
  .bigact.a{background:#5a67c6;color:#fff;box-shadow:0 12px 24px rgba(90,103,198,.28)}
  .bigact.b{background:#fff;color:#3f4a9e;border:1.5px solid #d8dcfa}
  .hnext{background:linear-gradient(160deg,#1b2c4b,#16233c);color:#fff;border-radius:18px;padding:14px;margin-bottom:12px}
  .hnext small{font-size:11px;font-weight:700;color:#a9b8d0}
  .hnext h2{margin:4px 0 2px;font-size:19px;font-weight:800}
  .hnext p{margin:0;font-size:11.5px;font-weight:700;color:#8ff0b3}
  .bigbtn,.addbtn{display:flex;align-items:center;justify-content:center;gap:8px}
  #pgMsgs.t-abs{--tc:#b4505e;--tb:#fbeef0;--tbd:#efc9cf}
  #pgMsgs.t-late{--tc:#a4701a;--tb:#fff6e6;--tbd:#f0d9a8}
  #pgMsgs.t-month{--tc:#4a56b0;--tb:#eef0fb;--tbd:#cfd5f3}
  #msgType{display:flex!important;flex-wrap:nowrap!important;gap:6px}
  #msgType .tplb{font-weight:800;flex:1;white-space:nowrap;font-size:12px;padding:10px 4px}
  #pgMsgs #q1.done,#pgMsgs #q2.done{background:#fff!important;border-color:var(--line)!important}
  #msgType [data-mt=abs]{background:#fdf6f7;color:#b4505e;border-color:#f3dde0}
  #msgType [data-mt=late]{background:#fffbf1;color:#a4701a;border-color:#f3e6c4}
  #msgType [data-mt=month]{background:#f6f7fd;color:#4a56b0;border-color:#dfe3f6}
  #msgType .tplb.on{background:var(--tb)!important;border:1.5px solid var(--tc)!important}
  #pgMsgs #q1{background:var(--tb)!important;border-color:var(--tbd)!important}
  #pgMsgs #q3.cur,#pgMsgs #q2.cur{background:var(--tb)!important;border-color:var(--tbd)!important}
  #pgMsgs .npill.brand,#pgMsgs #qCnt{background:var(--tb)!important;color:var(--tc)!important}
  #pgMsgs #q1 .nav,#pgMsgs #q3.cur .nav,#pgMsgs #q2.cur .nav{background:#fff!important;color:var(--tc)!important}
  #pgMsgs .msgbox{background:var(--tb);border-color:var(--tbd)}
  #pgTpl.t-abs,#pgSettings .r-abs{--tc:#b4505e;--tb:#fbeef0;--tbd:#efc9cf}
  #pgTpl.t-late,#pgSettings .r-late{--tc:#a4701a;--tb:#fff6e6;--tbd:#f0d9a8}
  #pgTpl.t-month,#pgSettings .r-month{--tc:#4a56b0;--tb:#eef0fb;--tbd:#cfd5f3}
  #pgSettings .nrow.tr{background:var(--tb);border-color:var(--tbd)}
  #pgSettings .nrow.tr .nav{background:#fff;color:var(--tc);font-size:11px}
  .chips{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 10px}
  .chip{font-family:inherit;font-size:11.5px;font-weight:800;border-radius:999px;padding:6px 11px;border:1px solid var(--tbd);background:var(--tb);color:var(--tc)}
  .chip::before{content:"+ ";font-weight:800}
  .tplarea{width:100%;box-sizing:border-box;min-height:170px;overflow:hidden;font-family:inherit;font-size:13px;font-weight:700;line-height:1.8;color:#1b2437;background:#fff;border:1.5px solid var(--tbd);border-radius:14px;padding:12px;resize:none;direction:rtl}
  .tplprev{background:var(--tb);border:1px solid var(--tbd);border-radius:14px;padding:12px;font-size:13px;font-weight:700;line-height:1.7;color:#1b2437;white-space:pre-line}
  .softbtn{font-family:inherit;border:none;background:#f2f5f9;color:#3c4a60;border-radius:12px;padding:10px 14px;font-size:12px;font-weight:800}
  #pgMsgs .nrow{padding:5px 11px}
  #pgMsgs .nav{width:30px;height:30px;font-size:13px}
  #pgMsgs .nsub{margin-top:1px}
  #pgMsgs .tplb{padding:9px 8px}
  #pgMsgs .gcard{margin-bottom:8px}
  .msgbox{white-space:pre-line}

  /* neutral pass: color only on type names */
  #pgMsgs #q1,#pgMsgs #q3.cur,#pgMsgs #q2.cur{background:#f7f9fc!important;border-color:#dfe5ee!important}
  #pgMsgs #q1.done{background:#fff!important;border-color:var(--line)!important}
  #pgMsgs .npill.brand,#pgMsgs #qCnt{background:#eef2f7!important;color:#3c4a60!important}
  #pgMsgs #q1 .nav,#pgMsgs #q2.cur .nav{background:#fff!important;color:#3c4a60!important}
  #pgMsgs .msgbox{background:#f7f9fc!important;border:1px solid #dfe5ee!important;border-right:4px solid var(--tc)!important}
  #pgMsgs .pcardh .pt,#pgMsgs .pcardh .prel{color:inherit}
  #pgSettings .nrow.tr{background:#fff!important;border-color:var(--line)!important}
  #pgSettings .nrow.tr .nav{background:#f3f6fa!important;color:#6b7a90!important}
  #pgSettings .nrow.tr .nnm{color:var(--tc)}
  #pgSettings .nrow.tr .npill{background:#f3f6fa!important;color:#3c4a60!important}
  #pgTpl #tplTitle{color:var(--tc)}
  #pgTpl .chip{background:#f3f6fa;border-color:#dfe5ee;color:#3c4a60}
  .tplarea{border-color:#dfe5ee!important}
  .tplprev{background:#f7f9fc!important;border:1px solid #dfe5ee!important;border-right:4px solid var(--tc)!important}
  #tplSave{background:var(--navy)!important}
  #pgMsgs #q1 .nav,#pgMsgs #q2.cur .nav,#pgMsgs #q3.cur .nav{background:#fff!important;color:#3c4a60!important}
  /* unified theme: navy = primary, neutral surfaces, color only for meaning */
  .nchip.on{background:var(--navy)!important;border-color:var(--navy)!important;color:#fff!important}
  .gacts button.pri{background:var(--navy)!important;border-color:var(--navy)!important}
  .rvok{background:var(--navy)!important}
  .bigact.a{background:var(--navy)!important;box-shadow:0 10px 22px rgba(20,33,61,.22)!important}
  .bigact.b{color:var(--navy)!important;border:1px solid var(--line)!important}
  .chipb.on{background:var(--navy)!important;border-color:var(--navy)!important;color:#fff!important}

/* ---- app overrides ---- */
html,body{height:100%;overscroll-behavior:none}
body{display:block;background:#dfe5ee}
.phone{width:100%;max-width:520px;height:100vh;height:100dvh;margin:0 auto;box-shadow:0 0 40px rgba(0,0,0,.08)}
#main{position:absolute;inset:0;display:flex;flex-direction:column}
.npage.inline{position:relative;display:flex;flex:1;min-height:0;z-index:1}
.nnav{padding-bottom:calc(14px + env(safe-area-inset-bottom))}
.savebar{padding-bottom:calc(15px + env(safe-area-inset-bottom))}
.topbar{padding-top:calc(8px + env(safe-area-inset-top))}
.nhead{padding-top:calc(14px + env(safe-area-inset-top))}
.sheet{z-index:100;max-height:90%}
.overlay{z-index:99}
.saved{z-index:110}
.qpage{z-index:95}
.offline{background:#fdf1de;color:#b4541a;font-size:11px;font-weight:800;text-align:center;padding:5px}
.toast{position:absolute;left:50%;transform:translateX(-50%);bottom:90px;background:#14213a;color:#fff;font-size:12px;font-weight:700;padding:9px 16px;border-radius:12px;z-index:200;opacity:0;pointer-events:none;transition:opacity .2s}
.toast.show{opacity:1}
.ltr{direction:ltr;unicode-bidi:isolate;display:inline-block}
button{cursor:pointer}
.hw.miss{background:#fdecec;border-color:#f6c9ca;color:#b4414f}
.hw.none{color:#8895a8}
.cell.none{background:#f3f5f9;color:#6b7a90}
.seg{touch-action:manipulation}
.lgerr{color:#b4414f;font-size:12px;font-weight:700;text-align:center;margin-top:10px;min-height:16px}
.card-note{font-size:11px;color:var(--muted);font-weight:600;margin:6px 2px}
.row2{display:flex;gap:8px}.row2>*{flex:1}
.sel2{width:100%;font-family:inherit;font-size:14px;font-weight:800;background:#f7f9fc;border:1px solid var(--line);border-radius:12px;padding:11px 12px;color:var(--ink)}
.lblx{font-size:11px;font-weight:800;color:#8895a8;margin:12px 2px 5px;display:block}
.stk{display:flex;align-items:center;justify-content:space-between;gap:8px}
.tabdot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#e0454b;margin-right:4px}
@media (min-width:521px){.phone{border-radius:0}}
.priorhw{margin-top:10px;border-top:1px solid var(--line);padding-top:10px}
.priorhw .sw{display:flex;align-items:center;gap:8px}
