body.session-ui #moreBtn { display: none; }

/* ==========================================================================
   tos.css — teacher OS screens (teacher.html, school.html, print-queue.html). Kit tokens only (kit.css).
   Phone first (360 px). Targets ≥ 56 px, text ≥ 18 px, one decision per screen, words next to every icon.
   ========================================================================== */
html.huge-text{ font-size:135%; --t-body:24px; --t-note:20px; }
:root[data-contrast="high"]{ --paper:#FFFFFF; --paper-2:#FFFFFF; --paper-3:#EDEDED; --ink:#000; --ink-2:#000; --ink-3:#111; --hair:#000; }
:root[data-contrast="high"] .sc, :root[data-contrast="high"] .card, :root[data-contrast="high"] .btn-tone, :root[data-contrast="high"] .tile, :root[data-contrast="high"] .rowlink{ box-shadow:inset 0 0 0 3px #000; }
:root[data-contrast="high"] .note, :root[data-contrast="high"] .sc-who{ color:#000; }

body.tos{ padding-bottom:calc(92px + env(safe-area-inset-bottom)); }
.tos main{ min-height:60vh; }
.view{ display:none; }
.view.on{ display:block; animation:vin .28s var(--ease); }
@keyframes vin{ from{ opacity:0; transform:translateY(10px); } to{ opacity:1; transform:none; } }
.wrapn{ width:100%; max-width:760px; margin-inline:auto; padding-inline:var(--gutter); }
.wrapw{ width:100%; max-width:1180px; margin-inline:auto; padding-inline:var(--gutter); }
.sp{ height:24px; } .sp-s{ height:12px; } .sp-l{ height:48px; }
.row{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.grow{ flex:1 1 auto; min-width:0; }
.muted{ color:var(--ink-2); }
.small{ font-size:var(--t-note); line-height:1.55; color:var(--ink-3); }
.chip{ display:inline-flex; align-items:center; gap:6px; min-height:32px; padding:3px 12px; border-radius:999px; background:var(--paper); color:var(--ink); font:700 16px/1.35 var(--f-text); max-width:100%; overflow-wrap:anywhere; }
.daylabel{ border-radius:16px; }
.chip.ink{ background:var(--selected, #E0E2DD); color:var(--ink, #0B0B0B); }
.chip.red{ background: #E4EDFF; color: var(--action, #1739A8); }
.chip.amber{ background:var(--amber-field); color:var(--amber-ink); }
.chip.green{ background:var(--green-field); color:var(--green-ink); }
.chip.tone{ background:var(--paper-2); }
.lbl{ font:700 17px/1.4 var(--f-text); color:var(--ink-2); }
h1.t{ font:900 clamp(34px,8vw,56px)/1.15 var(--f-display); }
h2.t{ font:800 clamp(26px,5.4vw,36px)/1.25 var(--f-display); }
h3.t{ font:800 22px/1.35 var(--f-display); }
.lead{ font-size:clamp(19px,2.2vw,22px); line-height:1.6; color:var(--ink-2); }

/* ---------- app bar additions ---------- */
#teacher-save-state{ display:inline-flex; flex-wrap:wrap; align-items:center; gap:4px; font-size:max(16px, 1rem); line-height:1.3; color:var(--ink); opacity:1; transition:opacity .25s ease; }
#teacher-save-state[data-state="saved"]{ --success:var(--green-ink); color:var(--success); background:var(--green-field); flex:none; font-weight:700; padding:3px 8px; border-radius:6px; }
#teacher-save-state:empty, #teacher-save-state[data-state="saving"], .appbar .who:empty{ display:none; }
#teacher-save-state.fading{ opacity:0; }
#teacher-save-state button{ min-height:44px; font:inherit; }
header.compact-appbar .appbar-in:has(#teacher-save-state[data-state="error"]){ flex-wrap:wrap; }
@media (prefers-reduced-motion:reduce){ #teacher-save-state{ transition:none; } }
.appbar .who{ font:700 18px/1.2 var(--f-text); display:flex; align-items:center; gap:8px; min-width:0; }
.appbar .who b{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.toolbtn{ min-height:56px; min-width:56px; padding:0 14px; background:var(--paper-2); border:0; font:700 17px/1 var(--f-text); color:var(--ink); cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; gap:6px; }
.toolbtn:active{ transform:translateY(2px); }
.toolbtn svg{ width:22px; height:22px; fill:none; stroke:currentColor; }

/* ---------- bottom tabs (words + icons, always visible) ---------- */
.tabs{ position:fixed; inset-inline:0; bottom:0; z-index:45; background:var(--paper); box-shadow:0 -1px 0 var(--hair); padding-bottom:env(safe-area-inset-bottom); }
.tabs-in{ display:grid; grid-template-columns:repeat(4,1fr); max-width:760px; margin:0 auto; }
.tabs a{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; min-height:72px; text-decoration:none; color:var(--ink-2); font:700 17px/1.2 var(--f-text); }
.tabs a svg{ width:26px; height:26px; fill:none; stroke:currentColor; stroke-width:2.2; }
.tabs a[aria-current="page"]{ color:var(--action, #1739A8); box-shadow:none; }   /* owner 28 Nov: no red bar (red = destructive only); ds/teacher-nav.css draws the short blue bar */
@media print{ .tabs{ display:none!important; } }

/* ---------- hero of the day ---------- */
.dayhead{ padding-block:20px 8px; }
.dayhead .hi{ font:700 19px/1.4 var(--f-text); color:var(--ink-2); }
.dayhead h1{ font:900 clamp(36px,9.6vw,64px)/1.1 var(--f-display); margin-top:4px; }
.dayhead .sum{ font-size:20px; margin-top:8px; line-height:1.5; }
.daylabel{ display:inline-flex; margin-top:10px; }

/* ---------- command box «أوامر» ---------- */
.cmd{ background:var(--paper-2); padding:12px; display:grid; gap:8px; }
.cmd label{ font:800 18px/1.3 var(--f-display); }
.cmd .in{ display:grid; grid-template-columns:1fr auto; gap:8px; }
.cmd input{ min-height:64px; border:0; padding:0 16px; font:500 20px var(--f-text); background:var(--paper); color:var(--ink); box-shadow:inset 0 -3px 0 var(--ink); border-radius:0; width:100%; min-width:0; }
.cmd input:focus{ outline:0; box-shadow:inset 0 0 0 3px var(--ink), inset 0 -6px 0 var(--action, #1739A8); }
.cmd .ex{ display:flex; gap:6px; flex-wrap:wrap; }
.cmd .ex button{ min-height:44px; border:0; background:var(--paper); padding:0 12px; font:500 16px var(--f-text); color:var(--ink-2); cursor:pointer; }

/* ---------- flag (late / overflow) ---------- */
.flag{ background:var(--amber-field); color:var(--amber-ink); padding:16px; display:grid; gap:10px; }
.flag.compact{ grid-template-columns:1fr auto; align-items:center; }
.flag.compact .btn{ min-height:56px; padding:8px 14px; }
.section-h{ font:800 20px/1.3 var(--f-display); color:var(--ink-2); margin-top:28px; }
.flag b{ font:800 21px/1.4 var(--f-display); }
.flag p{ font-size:18px; line-height:1.55; }

/* ---------- session card ---------- */
.cards{ display:grid; gap:8px; }
.sc{ position:relative; background:var(--paper-2); display:grid; grid-template-columns:minmax(0,1fr); gap:4px 14px; padding:16px; touch-action:pan-y; transition:transform .2s var(--ease), background-color .2s var(--ease); user-select:none; -webkit-user-select:none; }
.sc.dragging{ transition:none; }
.sc-time{ display:grid; align-content:start; gap:0; direction:ltr; text-align:right; font-family:var(--f-display); }
.sc-time b{ font:900 26px/1.1 var(--f-display); }
.sc-time span{ font:700 17px/1.4 var(--f-text); color:var(--ink-3); }
.sc-who{ font:700 18px/1.4 var(--f-text); color:var(--ink-2); display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.sc-obj{ font:800 clamp(21px,5vw,26px)/1.4 var(--f-display); margin-top:6px; overflow-wrap:anywhere; }
.sc-note{ font-size:17px; color:var(--ink-2); margin-top:6px; line-height:1.5; }
.sc-act{ grid-column:1/-1; display:grid; gap:8px; margin-top:12px; }
.sc-act .btn-big{ width:100%; min-height:68px; font-size:21px; }
.sc-row{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.sc-row .btn{ min-height:60px; padding:8px 10px; font-size:18px; }
.sc-row3{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.sc-row3 .btn{ min-height:56px; padding:6px 8px; font-size:17px; }
.sc.st-done{ background:var(--green-field); }
.sc.st-done .sc-obj{ color:var(--green-ink); }
.sc.st-partial{ background:var(--amber-field); }
.sc.st-cancelled{ background:var(--paper); box-shadow:inset 0 0 0 2px var(--paper-3); }
.sc.st-cancelled .sc-obj{ text-decoration:line-through; text-decoration-thickness:2px; color:var(--ink-3); }
.sc .swipehint{ position:absolute; inset-block:0; inset-inline-start:0; display:flex; align-items:center; padding:0 18px; font:800 20px var(--f-display); color:var(--green); opacity:0; pointer-events:none; }
.sc.sw .swipehint{ opacity:1; }
.donebar{ grid-column:1/-1; display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:10px; font:700 19px var(--f-text); color:var(--green-ink); }
.donebar svg{ width:26px; height:26px; fill:none; stroke:currentColor; }
.empty{ background:var(--paper-2); padding:24px 18px; display:grid; gap:10px; }
.empty b{ font:800 24px/1.35 var(--f-display); }

/* ---------- week ---------- */
.weeknav{ display:grid; grid-template-columns:auto 1fr auto; gap:8px; align-items:center; }
.weeknav h2{ text-align:center; font:800 21px/1.3 var(--f-display); }
.wday{ margin-top:16px; }
.wday > h3{ font:800 21px/1.35 var(--f-display); display:flex; gap:8px; align-items:center; flex-wrap:wrap; padding-block:6px; }
.wday.today > h3::after{ content:"اليوم"; font:700 15px var(--f-text); background: #E4EDFF; color: var(--action, #1739A8); padding:2px 10px; border-radius:999px; }
.wrow{ display:grid; grid-template-columns:64px 1fr auto; gap:12px; align-items:center; min-height:72px; padding:10px 14px; background:var(--paper-2); color:var(--ink); text-decoration:none; margin-top:4px; }
.wrow:hover{ background:var(--paper-3); }
.wrow .tm{ direction:ltr; text-align:right; font:800 20px var(--f-display); }
.wrow .ob{ font:700 18px/1.4 var(--f-text); overflow-wrap:anywhere; }
.wrow .ob small{ display:block; font-weight:500; font-size:16px; color:var(--ink-3); }
.wrow.st-cancelled .ob{ text-decoration:line-through; color:var(--ink-3); }
.wrow.st-done{ background:var(--green-field); }
.wrow.st-partial{ background:var(--amber-field); }
.wrow.st-presumed .tm{ color:var(--ink-3); }
.offday{ background:var(--paper); box-shadow:inset 0 0 0 2px var(--paper-2); padding:14px; font:700 18px var(--f-text); color:var(--ink-2); margin-top:4px; }

/* ---------- sheet confirm (diff) ---------- */
.sheet h2{ font:900 26px/1.3 var(--f-display); }
.sheet .chg{ display:grid; gap:4px; margin-top:12px; }
.sheet .chg li{ list-style:none; background:var(--paper-2); padding:12px 14px; font-size:18px; line-height:1.5; }
.sheet .chg li b{ font-weight:800; }
.sheet .chg{ padding:0; margin-inline:0; }
.sheet .acts{ display:grid; gap:8px; margin-top:16px; }
.sheet .acts .btn{ min-height:64px; font-size:20px; }
.big-n{ font:900 56px/1 var(--f-display); direction:ltr; display:inline-block; }
.reasons{ display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }
.reasons button{ min-height:48px; padding:0 14px; border:0; background:var(--paper-2); font:700 17px var(--f-text); color:var(--ink); cursor:pointer; }
.reasons button[aria-pressed="true"]{ background:var(--selected, #E0E2DD); color:var(--ink, #0B0B0B); }

/* ---------- forms ---------- */
.tos .field input, .tos .field select, .tos .field textarea{ font-size:20px; }
.edit{ width:100%; border:0; background:var(--paper); color:var(--ink); font:500 19px/1.6 var(--f-text); padding:10px 12px; box-shadow:inset 0 -2px 0 var(--ink-3); border-radius:0; resize:vertical; min-height:56px; }
.edit:focus{ outline:0; box-shadow:inset 0 0 0 3px var(--ink), inset 0 -6px 0 var(--action, #1739A8); }
.edit[readonly]{ box-shadow:none; background:transparent; }

/* ---------- fiche on screen ---------- */
.fiche{ background:var(--paper-2); padding:16px; display:grid; gap:12px; }
.fiche .fl{ display:grid; gap:4px; }
.fiche .fl > span{ font:700 16px var(--f-text); color:var(--ink-3); }
.fiche .fl > div{ font:700 19px/1.5 var(--f-text); }
.stage{ background:var(--paper); padding:12px; display:grid; gap:6px; }
.stage .sh{ display:flex; justify-content:space-between; gap:8px; align-items:center; }
.stage .sh b{ font:800 19px/1.35 var(--f-display); }
.stage .mn{ direction:ltr; font:800 18px var(--f-display); white-space:nowrap; }
.stage .tl{ font-size:17px; line-height:1.5; }
.stage .tl i{ font-style:normal; font-weight:700; color:var(--ink-3); }
.sugg{ box-shadow:inset 4px 0 0 var(--amber); }
[dir="rtl"] .sugg{ box-shadow:inset -4px 0 0 var(--amber); }
.why{ background:var(--selected, #E0E2DD); color:var(--ink, #0B0B0B); padding:14px 16px; font:800 20px/1.5 var(--f-display); }
.why small{ display:block; font:700 15px var(--f-text); opacity:.75; margin-bottom:4px; }
.locked{ background:var(--green-field); color:var(--green-ink); padding:12px 14px; font:700 18px/1.5 var(--f-text); display:grid; gap:4px; }
.locked code{ direction:ltr; unicode-bidi:isolate; font:600 15px ui-monospace,monospace; overflow-wrap:anywhere; }

/* ---------- tiles / lists ---------- */
.tile{ background:var(--paper-2); padding:18px; display:grid; gap:10px; }
.tile b.h{ font:800 22px/1.35 var(--f-display); }
.list{ list-style:none; padding:0; margin:0; display:grid; gap:4px; }
.list > li{ background:var(--paper-2); padding:14px 16px; display:grid; gap:4px; }
.toggles{ display:grid; gap:8px; grid-template-columns:1fr 1fr; }
@media (max-width:420px){ .toggles{ grid-template-columns:1fr; } }
.tog{ min-height:72px; border:0; background:var(--paper-2); color:var(--ink); font:700 19px/1.35 var(--f-text); padding:10px 16px; text-align:start; cursor:pointer; display:flex; align-items:center; gap:12px; }
.tog::before{ content:""; width:28px; height:28px; flex:none; box-shadow:inset 0 0 0 3px var(--ink); background:var(--paper); }
.tog[aria-pressed="true"]{ background:var(--selected, #E0E2DD); color:var(--ink, #0B0B0B); }
.tog[aria-pressed="true"]::before{ background: #E4EDFF; box-shadow:inset 0 0 0 3px var(--paper); }
.stmt{ background:var(--selected, #E0E2DD); color:var(--ink, #0B0B0B); padding:24px 20px; display:grid; gap:16px; }
.stmt p{ font:800 clamp(22px,5.6vw,28px)/1.45 var(--f-display); }
.stmt .row .btn{ flex:1; min-height:64px; font-size:20px; }
.stmt .btn-line{ color:var(--ink); }
.stmt .count{ font:700 17px var(--f-text); opacity:.8; }

/* scan */
.thumbs{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:8px; }
.thumb{ background:var(--paper-2); display:grid; gap:6px; padding:8px; }
.thumb img{ width:100%; aspect-ratio:3/4; object-fit:cover; background:#ddd; }
.thumb span{ font:700 16px/1.35 var(--f-text); }
.thumb.ok span{ color:var(--green); } .thumb.bad span{ color:var(--amber); }
.prog{ height:10px; background:var(--paper-2); position:relative; overflow:hidden; }
.prog i{ position:absolute; inset-block:0; inset-inline-start:0; width:var(--w,0%); background:var(--selected, #E0E2DD); transition:width .3s var(--ease); }

/* history */
.hday{ margin-top:18px; font:800 19px var(--f-display); color:var(--ink-2); }
.ev{ background:var(--paper-2); padding:12px 14px; display:grid; grid-template-columns:1fr auto; gap:4px 12px; align-items:center; margin-top:4px; }
.ev p{ font:700 18px/1.5 var(--f-text); overflow-wrap:anywhere; }
.ev .meta{ grid-column:1; font-size:16px; color:var(--ink-3); line-height:1.5; }
.ev .btn{ min-height:52px; padding:6px 14px; font-size:17px; grid-row:1/3; grid-column:2; }
.ev.off p{ text-decoration:line-through; color:var(--ink-3); }
.ev.sys{ background:transparent; box-shadow:inset 0 0 0 2px var(--paper-2); }
.ev.sys p{ font-weight:500; font-size:17px; color:var(--ink-2); }
.ev.admin{ box-shadow:inset -6px 0 0 var(--ink); }
.chain{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }

/* bytes table */
.kv{ display:grid; grid-template-columns:1fr auto; gap:4px; }
.kv > *{ background:var(--paper-2); padding:12px 14px; font-size:18px; }
.kv > b{ direction:ltr; text-align:left; font:800 19px var(--f-display); white-space:nowrap; }

/* error tally */
.tally{ display:grid; gap:6px; }
.tl-row{ display:grid; grid-template-columns:1fr auto auto auto; gap:8px; align-items:center; background:var(--paper-2); padding:8px 8px 8px 8px; padding-inline-start:16px; }
.tl-row b{ font:700 19px/1.4 var(--f-text); }
.tl-row .n{ font:900 32px/1 var(--f-display); min-width:48px; text-align:center; direction:ltr; }
.tl-row button{ min-width:64px; min-height:64px; border:0; font:900 26px var(--f-display); cursor:pointer; }
.tl-row .plus{ background:var(--selected, #E0E2DD); color:var(--ink, #0B0B0B); }
.tl-row .minus{ background:var(--paper); color:var(--ink); }

/* ---------- A4 print sheets ---------- */
.a4wrap{ display:grid; gap:16px; justify-items:center; overflow:hidden; }
.a4{ width:210mm; min-height:297mm; background:#fff; color:#000; padding:14mm; box-shadow:0 2px 16px rgba(0,0,0,.18); font:400 11.5pt/1.55 var(--f-text); direction:rtl; transform-origin:top right; }
.a4-scale{ width:100%; overflow:hidden; }
.a4 h1{ font:900 18pt/1.25 var(--f-display); }
.a4 .hd{ display:grid; grid-template-columns:repeat(3,1fr); gap:2mm 6mm; margin-top:4mm; }
.a4 .hd div{ border-bottom:.3mm solid #000; padding-bottom:1mm; }
.a4 .hd span{ display:block; font-size:8.5pt; color:#444; }
.a4 .blk{ margin-top:5mm; }
.a4 .blk > .bl{ font:800 10pt var(--f-display); margin-bottom:1.5mm; }
.a4 table{ width:100%; border-collapse:collapse; }
.a4 th, .a4 td{ border:.3mm solid #000; padding:1.8mm 2.2mm; vertical-align:top; text-align:start; font-size:10pt; }
.a4 th{ background:#f0f0f0; font-weight:700; }
.a4 .hand{ border:.4mm solid #000; min-height:26mm; background-color:var(--selected, #E0E2DD); }
.a4 .hand.tall{ min-height:58mm; }
.a4 .hand .hl{ font-size:8.5pt; color:#555; padding:1mm 2mm; background:#fff; display:inline-block; }
.a4 .why-p{ border:.6mm solid #000; padding:3mm; font:800 12pt/1.5 var(--f-display); }
.a4 .foot-p{ margin-top:6mm; font-size:8pt; color:#555; display:flex; justify-content:space-between; gap:6mm; }
.blockmode{ display:grid; gap:6px; }
.bm{ display:grid; grid-template-columns:1fr; gap:6px; background:var(--paper-2); padding:12px; }
.bm b{ font:700 18px var(--f-text); }
.bm .seg button{ min-height:52px; font-size:17px; }

@media print{
  body.tos{ padding:0!important; }
  body.printing > *:not(#printArea){ display:none!important; }
  body.printing #printArea{ display:block!important; }
  #printArea .a4{ box-shadow:none; width:auto; min-height:0; padding:0; transform:none!important; break-after:page; }
  #printArea .a4:last-child{ break-after:auto; }
  .a4-scale{ height:auto!important; }
}
#printArea{ display:none; }

/* ---------- school view ---------- */
.tgrid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:8px; }
.tcard{ background:var(--paper-2); color:var(--ink); text-decoration:none; padding:18px; display:grid; gap:8px; align-content:start; transition:background .15s var(--ease); }
.tcard:hover{ background:var(--paper-3); }
.tcard .nm{ display:flex; align-items:center; gap:12px; }
.tcard .av{ width:56px; height:56px; flex:none; background:var(--selected, #E0E2DD); color:var(--ink, #0B0B0B); display:grid; place-items:center; font:900 24px var(--f-display); }
.tcard b{ font:800 23px/1.3 var(--f-display); display:block; }
.tcard .meta{ font-size:17px; color:var(--ink-2); line-height:1.5; }
.tcard .fr{ font-size:17px; line-height:1.5; background:var(--paper); padding:10px 12px; }
.tcard .fx{ font:700 17px/1.45 var(--f-text); color:var(--green); }
.dots{ display:inline-flex; gap:4px; vertical-align:middle; }
.dots i{ width:12px; height:12px; border-radius:999px; background:var(--paper-3); }
.dots i.on{ background:var(--selected, #E0E2DD); }
.agg{ display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:4px; }
.agg .kpi .v{ font-size:clamp(44px,5vw,72px); }
.bars{ display:grid; gap:6px; }
.bar{ display:grid; grid-template-columns:150px 1fr 64px; gap:12px; align-items:center; font-size:18px; }
.bar .tr{ height:18px; background:var(--paper-2); position:relative; }
.bar .tr i{ position:absolute; inset-block:0; inset-inline-start:0; background:var(--selected, #E0E2DD); width:var(--w); }
.bar .tr em{ position:absolute; inset-block:-4px; width:3px; background: #E4EDFF; inset-inline-start:var(--b); }
.bar b{ direction:ltr; text-align:left; font:800 19px var(--f-display); }
@media (max-width:520px){ .bar{ grid-template-columns:110px 1fr 56px; font-size:16px; } }

/* print queue */
.job{ background:var(--paper-2); padding:16px; display:grid; grid-template-columns:1fr auto; gap:8px 16px; align-items:center; }
.job b{ font:800 21px/1.35 var(--f-display); }
.job .meta{ font-size:17px; color:var(--ink-2); }
.job.done{ background:var(--green-field); }
.job .acts{ display:flex; gap:8px; flex-wrap:wrap; }
@media (max-width:560px){ .job{ grid-template-columns:1fr; } }

/* phone app bar: logo + A+ + «الإعدادات» only (the connection status is in الإعدادات) */
@media (max-width:520px){
  .tos .appbar-tools [data-pn-net]{ display:none; }
  .tos .appbar .logo-mask{ width:76px; height:30px; }
  .tos .toolbtn{ padding:0 10px; }
  .tos .demo-strip .wrap{ font-size:16px; }
}

/* demo strip on phones: one line */
@media (max-width:640px){
  .tos .demo-strip .wrap{ min-height:0; padding-block:6px; gap:8px; flex-wrap:nowrap; }
  .tos .demo-strip #stripTxt{ display:none; }
  .tos .demo-strip .btn{ min-height:44px!important; font-size:16px!important; padding:4px 12px!important; }
}

/* ---------- «ملفّ المتفقّد» (A4, flows over as many pages as needed) ---------- */
.a4.insp{ min-height:0; }
.a4.insp h1{ font:900 20pt/1.2 var(--f-display); }
.a4.insp h2{ font:800 13pt/1.3 var(--f-display); margin-top:7mm; padding-top:2mm; border-top:.6mm solid #000; }
.a4.insp h3{ font:800 11pt/1.3 var(--f-display); margin-top:4mm; }
.a4.insp h3 small{ font:500 8.5pt var(--f-text); color:#444; }
.a4.insp table{ margin-top:2mm; }
.a4.insp th, .a4.insp td{ font-size:8.8pt; padding:1.2mm 1.6mm; }
.a4.insp tr.ok td:last-child{ font-weight:700; }
.a4.insp tr.x td{ color:#555; }
.a4.insp .seal{ margin-top:3mm; padding:2mm 3mm; border:.5mm solid #000; font:700 9.5pt var(--f-text); }
.a4.insp .seal.draft{ border-style:dashed; }
.a4.insp .small{ font-size:8.5pt; color:#333; margin-top:2mm; line-height:1.5; }
.a4.insp .sig{ display:grid; grid-template-columns:repeat(3,1fr); gap:6mm; margin-top:10mm; break-inside:avoid; }
.a4.insp .sig div{ border-top:.4mm solid #000; padding-top:1.5mm; min-height:22mm; font-size:9pt; }
@media print{ .a4.insp thead{ display:table-header-group; } .a4.insp tr{ break-inside:avoid; } }
/* the same file read on a phone */
.insp-screen .a4{ width:auto; min-height:0; padding:16px; box-shadow:none; transform:none!important; font-size:16px; }
.insp-screen .a4 .hd{ grid-template-columns:1fr; }
.insp-screen .a4 table{ display:block; overflow-x:auto; }
.insp-screen .a4 th, .insp-screen .a4 td{ font-size:14px; padding:6px 8px; min-width:56px; }
.insp-screen .a4 .sig{ grid-template-columns:1fr; }

/* production vs demo; error and update bars */
body.tos:not(.is-demo) .demo-only{ display:none; }
.errbar{ background: #E4EDFF; color: var(--action, #1739A8); position:sticky; top:0; z-index:60; }
.errbar .wrap{ display:flex; gap:10px; align-items:center; justify-content:space-between; flex-wrap:wrap; padding-block:8px; font:700 17px/1.5 var(--f-text); }
.errbar .btn{ min-height:48px; padding:4px 14px; font-size:17px; }
.errbar.upd{ background:var(--selected, #E0E2DD); }
body.no-tabs .tabs{ display:none; }
body.no-tabs{ padding-bottom:0; }

.kv{ grid-template-columns:minmax(0,1fr) minmax(0,auto); }
.kv > b{ white-space:normal; max-width:46vw; overflow-wrap:anywhere; }
.kv > span{ min-width:0; overflow-wrap:anywhere; }

@media (max-width:640px){ .tos .demo-strip .btn-line{ display:none; } .tos .demo-strip .wrap > b{ white-space:nowrap; } }

/* sweep 2026-11-18: the hub link stays visible on phones; toasts sit above the bottom tabs; landscape notch insets */
@media (max-width:640px){ .tos .demo-strip .btn-line.hub{ display:inline-flex; } }
body.tos:has(> .tabs):not(.no-tabs) .toasts{ bottom:calc(88px + env(safe-area-inset-bottom)); }
body.tos{ padding-left:env(safe-area-inset-left); padding-right:env(safe-area-inset-right); }
.tabs{ padding-left:env(safe-area-inset-left); padding-right:env(safe-area-inset-right); }
/* pressed «أ+»: polish.css gives .textsize a light ground, kit.css gives the pressed state white text → invisible (1.1:1) */
body.tos .appbar .textsize[aria-pressed="true"]{ background:var(--paper-2, #F1F0EC); color:var(--ink, #0B0B0B); }

/* ==========================================================================
   22 Nov 2026 · teacher UX pass: onboarding, «المزيد», the week, the fiche, print.
   ========================================================================== */
/* folded sections: one big summary line, always ≥ 56 px */
details.fold{ background:var(--paper-2); }
details.fold > summary{ list-style:none; cursor:pointer; min-height:60px; padding:12px 16px; display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px; font:800 20px/1.35 var(--f-display); color:var(--ink); }
details.fold > summary::-webkit-details-marker{ display:none; }
details.fold > summary::after{ content:"+"; margin-inline-start:auto; font:900 26px/1 var(--f-display); }
details.fold[open] > summary::after{ content:"−"; }
details.fold > summary span{ font:500 16px/1.4 var(--f-text); color:var(--ink-3); flex-basis:100%; order:3; }
details.fold > :not(summary){ margin:0 12px 12px; }
details.fold .list > li{ background:var(--paper); }
details.tech{ margin-top:6px; }
details.tech > summary{ cursor:pointer; min-height:44px; display:inline-flex; align-items:center; font:600 15px var(--f-text); color:var(--ink-3); text-decoration:underline; text-underline-offset:3px; }
details.tech code{ display:block; direction:ltr; unicode-bidi:isolate; text-align:left; font:600 13px ui-monospace,monospace; overflow-wrap:anywhere; margin-top:4px; }

/* onboarding */
.ob-one{ font:800 clamp(24px,6.4vw,32px)/1.45 var(--f-display); }
.ferr{ margin-top:8px; background: #E4EDFF; color: var(--action, #1739A8); padding:10px 14px; font:700 18px/1.5 var(--f-text); }
.field input[aria-invalid="true"]{ box-shadow:inset 0 0 0 3px var(--red); }
.yrs{ display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:6px; }
.yr{ min-height:64px; border:0; background:var(--paper-2); color:var(--ink); font:800 20px/1.3 var(--f-display); cursor:pointer; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; padding:6px; }
.yr small{ font:700 15px var(--f-text); }
.yr[aria-pressed="true"]{ background:var(--selected, #E0E2DD); color:var(--ink, #0B0B0B); }
.toggles.secs{ grid-template-columns:1fr 1fr; }
.toggles.secs .tog{ font:800 24px/1.2 var(--f-display); }
.picked{ font-size:19px; }
.trows > li{ grid-template-columns:auto 1fr; align-items:center; gap:4px 16px; min-height:64px; }
.trows .tm{ font:800 20px var(--f-display); direction:ltr; }
.trows span{ font:700 20px/1.35 var(--f-text); }
.trows small{ display:block; font:500 17px var(--f-text); color:var(--ink-3); }
.tday-open{ background:var(--paper); box-shadow:inset 0 0 0 3px var(--ink); padding:14px; margin-block:8px; }
.tday-open .list > li{ background:var(--paper-2); }
details.tday{ margin-top:6px; }
details.tday .ok{ font:700 16px var(--f-text); color:var(--green); flex-basis:auto; order:0; }

/* today: the folded «المزيد» */
.more-fold .more-in{ display:grid; gap:6px; }
.more-fold .rowlink{ background:var(--paper); min-height:72px; }
.more-fold .rowlink b{ display:block; font:800 19px/1.35 var(--f-display); }
.more-fold .rowlink span span{ display:block; font-size:16px; color:var(--ink-3); }
.more-fold .rowlink svg{ width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:2.2; }
.more-fold .cmd{ margin:0; }

/* week */
.wknav{ display:grid; grid-template-columns:1fr auto 1fr; gap:8px; }
.wknav .btn{ min-height:56px; font-size:18px; padding:6px 12px; }
.wkhead{ padding-block:16px 4px; }
.wk-rel{ font:800 18px/1.3 var(--f-text); color:var(--amber, #8A5300); }
.wkhead h1{ font:900 clamp(26px,6.6vw,40px)/1.3 var(--f-display); margin-top:2px; }
.wk-n{ font:700 18px/1.4 var(--f-text); color:var(--ink-2); margin-top:4px; }
.wctx{ list-style:none; padding:0; margin:12px 0 0; display:grid; gap:6px; }
.wctx li{ background:var(--paper); padding:10px 12px; display:grid; gap:4px; font:500 17px/1.5 var(--f-text); color:var(--ink-2); }
.wctx li.k-exam{ box-shadow:inset -6px 0 0 var(--ink); }
.wctx li.k-remed, .wctx li.k-vac, .wctx li.k-hol{ box-shadow:inset -6px 0 0 var(--amber); }
.wctx .chip{ justify-self:start; font-size:16px; }
.wday{ margin-top:18px; }
.wday > h3{ font:800 22px/1.35 var(--f-display); }
.wday.today > h3::after{ content:none; }
.wday .tbadge{ font:700 15px var(--f-text); background: #E4EDFF; color: var(--action, #1739A8); padding:2px 10px; }
.wday .wcount{ font:600 16px var(--f-text); color:var(--ink-3); margin-inline-start:auto; }
.wday.today{ box-shadow:inset -4px 0 0 var(--action, #1739A8); padding-inline-start:10px; }
.wday.past .wrow{ background:var(--paper); }
.wrow{ min-height:76px; }
.wrow .tm{ display:grid; gap:2px; font-size:21px; }
.wrow .tick{ font-style:normal; display:inline-grid; place-items:center; width:30px; height:30px; background:var(--green-field, #E6F2EA); color:var(--green-ink, #0B3F1D); font:900 18px var(--f-display); }
.wrow .ob{ font-size:19px; }
.wrow .st{ display:block; margin-top:4px; }
.wrow.st-done, .wrow.st-presumed{ background:var(--green-field); }
.wrow.st-done .ob, .wrow.st-presumed .ob{ color:var(--green-ink); }
.offday{ font-size:18px; }
.offday.k-holiday, .offday.k-vacation, .offday.k-closure{ background:var(--amber-field); color:var(--amber-ink); box-shadow:none; }

/* the fiche on screen: the usual sections, big text, white fields = editable */
.fh1{ font-size:clamp(28px,7vw,42px)!important; }
.fhint{ font:600 17px/1.55 var(--f-text); color:var(--ink-2); background:var(--paper); padding:10px 12px; }
.fiche{ background:var(--paper-2); padding:16px; display:grid; gap:16px; }
.fiche-t{ font:900 24px/1.2 var(--f-display); }
.fhead{ display:grid; grid-template-columns:1fr 1fr; gap:6px; margin:0; }
.fhead > div{ background:var(--paper); padding:8px 12px; min-width:0; }
.fhead dt{ font:700 15px var(--f-text); color:var(--ink-3); }
.fhead dd{ margin:0; font:700 18px/1.45 var(--f-text); overflow-wrap:anywhere; }
.fsec{ display:grid; gap:6px; }
.fsl{ font:800 20px/1.35 var(--f-display); color:var(--ink); display:flex; flex-wrap:wrap; gap:4px 10px; align-items:baseline; }
.fsl .sg{ font:600 15px var(--f-text); color:var(--amber); }
.fv{ font:500 19px/1.6 var(--f-text); background:var(--paper); padding:10px 12px; overflow-wrap:anywhere; }
.fiche .edit{ font-size:19px; box-shadow:inset 0 0 0 2px var(--ink-3); background:#FFFFFF; min-height:60px; }
.fiche .edit.sugg{ box-shadow:inset 0 0 0 2px var(--ink-3), inset -6px 0 0 var(--amber); }
.fiche .edit:focus{ box-shadow:inset 0 0 0 3px var(--ink), inset 0 -6px 0 var(--action, #1739A8); }
.stage{ background:var(--paper); padding:12px; display:grid; gap:6px; }
.stage.sugg{ box-shadow:inset -4px 0 0 var(--amber); }
.stage .sh{ display:grid; grid-template-columns:auto 1fr auto; gap:8px; align-items:center; }
.stage .sh b{ display:flex; gap:8px; align-items:center; grid-column:1/3; }
.stage .sn{ display:inline-grid; place-items:center; min-width:36px; height:36px; background:var(--selected, #E0E2DD); color:var(--ink, #0B0B0B); font:800 18px var(--f-display); }
.stage .sl{ font-weight:800; min-height:52px; min-width:0; }
.stage .mn{ display:flex; align-items:center; gap:6px; font:700 18px var(--f-text); direction:rtl; white-space:nowrap; }
.stage .mi{ width:72px; min-height:52px; text-align:center; direction:ltr; padding:6px; }
.stage .rl{ font:700 16px var(--f-text); color:var(--ink-2); margin-top:4px; }
.stage .tl{ font-size:18px; line-height:1.55; }
.stage .tl i{ font-style:normal; font-weight:700; color:var(--ink-3); }
.warn{ color:var(--red-press); }
.acts2{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.acts2 .btn{ min-height:56px; font-size:17px; padding:6px 10px; }
.locked{ background:var(--green-field); color:var(--green-ink); padding:14px; display:grid; gap:8px; font:700 18px/1.5 var(--f-text); }
.locked b{ font:800 21px/1.3 var(--f-display); }
.locked .btn-line{ color:var(--green-ink); }
.flag > .btn, .flag > a.btn{ justify-self:start; }
.cmp{ list-style:none; padding:0; margin:6px 0 0; display:grid; gap:8px; }
.cmp li{ background:var(--paper); padding:10px 12px; display:grid; gap:6px; font-size:18px; line-height:1.5; }
.cmp li > b{ font:800 18px/1.35 var(--f-display); }
.cmp .was, .cmp .now{ display:grid; grid-template-columns:52px 1fr; gap:8px; padding:6px 8px; overflow-wrap:anywhere; }
.cmp .was{ background:var(--paper-2); color:var(--ink-3); text-decoration:line-through; text-decoration-thickness:1px; }
.cmp .now{ background:var(--green-field); color:var(--green-ink); font-weight:700; }
.cmp span{ text-decoration:none; font:700 15px var(--f-text); display:inline-block; }
.cmp i{ font-style:normal; color:var(--ink-3); }
@media (max-width:420px){ .fhead{ grid-template-columns:1fr; } .acts2{ grid-template-columns:1fr 1fr; } }

/* A4 fiche: one page, header, sections, signatures */
.a4.fiche-a4{ padding:12mm 13mm; font-size:10.5pt; line-height:1.5; display:flex; flex-direction:column; }
.a4.fiche-a4 .top{ display:flex; justify-content:space-between; gap:4mm; font:700 9pt var(--f-text); border-bottom:.5mm solid #000; padding-bottom:1.5mm; margin-bottom:3mm; }
.a4.fiche-a4 h1{ font:900 15pt/1.3 var(--f-display); }
.a4.fiche-a4 .hd{ grid-template-columns:repeat(3,1fr); margin-top:3mm; }
.a4.fiche-a4 .blk{ margin-top:3.5mm; break-inside:avoid; }
.a4.fiche-a4 .secs{ display:grid; gap:2.5mm; }
.a4.fiche-a4 .secs.two{ grid-template-columns:1fr 1fr; gap:4mm; }
.a4.fiche-a4 .fsx .bl{ font:800 10pt var(--f-display); border-bottom:.3mm solid #000; margin-bottom:1mm; }
.a4.fiche-a4 th, .a4.fiche-a4 td{ font-size:9.5pt; padding:1.4mm 2mm; }
.a4.fiche-a4 tr{ break-inside:avoid; }
.a4.fiche-a4 tr.tot td{ font-weight:800; background:#f6f6f6; }
.a4.fiche-a4 .sig{ display:grid; grid-template-columns:1fr 1fr; gap:10mm; margin-top:auto; padding-top:8mm; break-inside:avoid; }
.a4.fiche-a4 .sig div{ border-top:.4mm solid #000; padding-top:1.5mm; min-height:20mm; font:700 9.5pt var(--f-text); }
.a4.fiche-a4 .foot-p{ margin-top:2mm; }
.a4.fiche-a4 .hand{ min-height:18mm; }
.a4.fiche-a4 .hand.tall{ min-height:70mm; }

@page{ size:A4; margin:10mm; }
@media print{
  /* never print the app around a page: bars, tabs, demo strip, sheets */
  body.tos .appbar, body.tos .tabs, body.tos .demo-strip, body.tos .errbar, body.tos .sheet, body.tos .toasts{ display:none!important; }
  #printArea .a4.fiche-a4{ min-height:275mm; height:auto; padding:0; }
}
/* stage header on phones: number + name on one line, the minutes under it (the name is never clipped) */
.stage .sh{ grid-template-columns:auto minmax(0,1fr); }
.stage .sh .mn{ grid-column:2; justify-self:start; }
@media (min-width:600px){ .stage .sh{ grid-template-columns:auto minmax(0,1fr) auto; } .stage .sh .mn{ grid-column:auto; } }
/* fiche header: compact «label | value» rows on phones */
@media (max-width:599px){
  .fhead{ grid-template-columns:1fr; gap:0; background:var(--paper); }
  .fhead > div{ display:grid; grid-template-columns:110px minmax(0,1fr); gap:8px; align-items:baseline; padding:7px 12px; box-shadow:inset 0 -1px 0 var(--paper-2); }
}
.flags-fold{ background:var(--amber-field); }
.flags-fold > summary{ color:var(--amber-ink); font-size:19px; }
.flags-fold > summary span{ color:var(--amber-ink); }
/* numbers, times and years inside Arabic text are always read left to right (2026-2027, 08:00–09:00) */
body.tos bdi, .a4 bdi{ direction:ltr; unicode-bidi:isolate; }

/* ---- 23 Nov 2026 · second pass (tests are not lessons, honest fiche, demo line at the bottom) ---- */
.tbanner{ margin-top:12px; background:var(--selected, #E0E2DD); color:var(--ink, #0B0B0B); padding:14px 16px; display:grid; gap:6px; }
.tbanner b{ font:800 21px/1.3 var(--f-display); }
.tbanner span{ font:600 17px/1.5 var(--f-text); color:#E6E6E6; }
.tbanner .btn{ justify-self:start; background:var(--paper); color:var(--ink); min-height:52px; font-size:18px; }
.sc.is-test{ box-shadow:inset -6px 0 0 var(--ink); }
.sc.is-test .sc-obj{ font-weight:800; }
.edit-t{ display:inline-flex; align-items:center; min-height:44px; font:700 17px var(--f-text); color:var(--ink); text-decoration:underline; text-underline-offset:4px; }
.wrow.is-test{ box-shadow:inset -6px 0 0 var(--ink); }
.wrow .chip.ink{ font-size:14px; min-height:26px; padding:1px 8px; }
.list.what > li{ gap:6px; }
.list.what .rowlink{ min-height:60px; background:var(--paper); padding:8px 12px; }
.list.what .rowlink b{ display:block; font:800 18px var(--f-display); }
.list.what .rowlink span span{ display:block; font-size:16px; color:var(--ink-3); }
.list.what .rowlink svg{ width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:2.2; }
.list.what .btn{ justify-self:start; min-height:48px; }
.fiche .edit::placeholder{ color:#6A6A64; opacity:1; font-weight:400; }
.a4.fiche-a4 .pupil{ display:flex; justify-content:space-between; gap:4mm; font:700 10pt var(--f-text); }
/* the demo line: thin, at the bottom above the tabs (the top space belongs to her day) */
body.tos.is-demo .demo-strip{ position:fixed; inset-inline:0; bottom:calc(73px + env(safe-area-inset-bottom)); z-index:44; border-top:1px solid var(--pl-line, #E4E3DD); border-bottom:0; }
body.tos.is-demo .demo-strip .wrap{ min-height:44px; padding-block:0; gap:8px; flex-wrap:nowrap; justify-content:space-between; font-size:14px; }
body.tos.is-demo .demo-strip #stripTxt{ display:none; }
body.tos.is-demo .demo-strip .btn{ min-height:44px !important; font-size:14px !important; padding:2px 10px !important; }
body.tos.is-demo{ padding-bottom:calc(140px + env(safe-area-inset-bottom)); }
body.tos.is-demo.no-tabs .demo-strip{ bottom:env(safe-area-inset-bottom); }
body.tos.is-demo:has(> .tabs):not(.no-tabs) .toasts{ bottom:calc(132px + env(safe-area-inset-bottom)); }
@media print{ body.tos .demo-strip{ display:none!important; } }
body.tos.is-demo .demo-strip .wrap > b{ font-size:13px; white-space:nowrap; }
body.tos.is-demo .demo-strip .row{ flex-wrap:nowrap; gap:6px; }
@media (max-width:640px){ body.tos.is-demo .demo-strip .btn-line:not(.hub){ display:none; } }

/* ---- 23 Nov 2026 · round 3 (persona test «سعاد» / «أيمن») ---- */
/* the demo line: ONE thin line (32 px), foldable to a small «عرض» tab; each link keeps a 44 px touch area */
body.tos.is-demo .demo-strip{ height:32px; min-height:0; overflow:visible; }
body.tos.is-demo .demo-strip .wrap{ min-height:32px; height:32px; gap:10px; align-items:center; justify-content:flex-start; padding-block:0; font:600 13px/1 var(--f-text); }
body.tos.is-demo .demo-strip .wrap > b{ font:800 13px/1 var(--f-text); color:var(--pl-ink, #0B0B0B); }
body.tos .demo-strip .dl{ position:relative; display:inline-flex; align-items:center; height:32px; padding:0 8px; font:700 13px/1 var(--f-text); color:#0B0B0B; background:#FFFFFF; border:1px solid #D9D8D2; text-decoration:none; white-space:nowrap; cursor:pointer; }
body.tos .demo-strip .dl.own{ background:var(--paper-2, #F1F0EC); color:var(--ink, #0B0B0B); border-color:#0B0B0B; }
body.tos .demo-strip .dl.x{ margin-inline-start:auto; min-width:44px; justify-content:center; }
body.tos.is-demo{ padding-bottom:calc(120px + env(safe-area-inset-bottom)); }
body.tos.is-demo.strip-min .demo-strip{ inset-inline:auto 0; width:auto; background:transparent; border:0; }
body.tos.is-demo.strip-min .demo-strip .wrap{ padding:0; width:auto; }
body.tos.is-demo.strip-min .demo-strip .wrap > :not(.x){ display:none; }
body.tos.is-demo.strip-min{ padding-bottom:calc(92px + env(safe-area-inset-bottom)); }
body.tos.is-demo:has(> .tabs):not(.no-tabs) .toasts{ bottom:calc(112px + env(safe-area-inset-bottom)); }
/* short screens (cheap Android 360×740 and landscape): a lower tab bar */
@media (max-height:760px){ body.tos .tabs a{ min-height:60px; } body.tos.is-demo .demo-strip{ bottom:calc(61px + env(safe-area-inset-bottom)); } body.tos.is-demo{ padding-bottom:calc(108px + env(safe-area-inset-bottom)); } }
@media (orientation:landscape) and (max-height:500px){
  body.tos .appbar-in{ min-height:52px; }
  body.tos .dayhead{ padding-top:10px; }
  body.tos .dayhead h1{ font-size:30px; }
  body.tos .tabs a{ min-height:52px; flex-direction:row; gap:6px; }
  body.tos.is-demo .demo-strip{ bottom:calc(53px + env(safe-area-inset-bottom)); }
  body.tos .toast{ max-width:60vw; }
}
/* «محفوظة ✓» on phones in portrait too (short form) */
@media (max-width:520px){ .tos .appbar-tools [data-pn-net]{ display:inline-flex; } .tos .appbar-tools [data-pn-net] .w{ display:none; } .tos .appbar .who{ min-width:0; } }
@media (max-width:380px){ .tos .appbar .logo-mask{ width:60px; } .tos .toolbtn span{ display:none; } .tos .toolbtn{ min-width:48px; justify-content:center; } }
/* examples in empty fields: lighter, italic, clearly «مثال» (still 6.6:1) */
.fiche .edit::placeholder, .tos textarea::placeholder, .tos input::placeholder{ color:#5C5C5C; font-style:italic; font-weight:400; opacity:1; }
/* print screen: the print buttons stay at the bottom */
.pbar{ position:sticky; bottom:calc(76px + env(safe-area-inset-bottom)); z-index:5; background:var(--pl-bg, #F5F5F2); padding-block:8px; display:grid; gap:8px; }
body.tos.is-demo .pbar{ bottom:calc(110px + env(safe-area-inset-bottom)); }
.notice{ margin-top:8px; font:700 17px/1.5 var(--f-text); background:#FFFFFF; padding:8px 12px; box-shadow:inset -4px 0 0 var(--ink); }
.tile.tprompt{ background:#FFFFFF; box-shadow:inset -6px 0 0 var(--ink); }
.tprompt .btn{ justify-self:start; }
.trows.ed > li{ grid-template-columns:1fr 1fr; gap:6px; }
.trows.ed select{ min-height:48px; font-size:17px; padding:4px 8px; }
.trows.ed .btn{ min-height:48px; }
.a4 .hand.short{ min-height:15mm; }
.a4.fiche-a4 .hand.short{ min-height:11mm; } .a4.fiche-a4 .hand.tall{ min-height:58mm; }
/* narrow phones: the name is already in the greeting; the bar keeps «محفوظة», «أ+» and «الإعدادات» */
@media (max-width:430px){ .tos .appbar .who{ display:none; } .tos .appbar-tools{ gap:6px; } .tos .appbar-tools [data-pn-net]{ padding:2px 8px; } }
.trows.ed select{ height:48px; min-height:48px; }
/* «ماذا تشاركين؟»: plain check boxes, readable at a glance (not red squares on black) */
.toggles.share .tog, .toggles.share .tog[aria-pressed="true"]{ background:#FFFFFF; color:var(--ink); box-shadow:inset 0 0 0 2px #D9D8D2; min-height:56px; }
.toggles.share .tog::before{ background:#FFFFFF; box-shadow:inset 0 0 0 3px var(--ink); display:grid; place-items:center; font:900 20px/1 var(--f-display); }
.toggles.share .tog[aria-pressed="true"]::before{ content:"✓"; background:var(--selected, #E0E2DD); color:var(--ink, #0B0B0B); box-shadow:none; }

/* ---- 23 Nov 2026 · teacher assist layer: the assistant dock (pn-assist.css) and «كلّ التغييرات» (pn-ledger.css) on «يومي» ---- */
/* phone, idle: two fixed layers only — the dock sits flush on the tab bar (no strip of page between them), the demo
   line leaves the bottom stack and becomes a thin line under the app bar, toasts rise above the dock.
   phone, assistant open (body.tos-pa-busy, from the 'pn-assist' event): tabs and demo line step aside, the sheet uses
   the whole height, and its buttons stay pinned at the bottom of the sheet. */
:root{ --tabs-h:73px; }
@media (max-height:760px){ :root{ --tabs-h:61px; } }
@media (orientation:landscape) and (max-height:500px){ :root{ --tabs-h:53px; } }
@media (max-width:899.98px){
  body.tos.pa-on .pa{ bottom:calc(var(--tabs-h) + env(safe-area-inset-bottom)); padding:8px var(--gutter); z-index:46; }
  body.tos.pa-on .pa .pa-bar{ grid-template-columns:64px minmax(0,1fr) 64px; }
  body.tos.pa-on .pa .pa-in{ min-width:0; width:100%; }
  body.tos.pa-on .pa .pa-mic, body.tos.pa-on .pa .pa-send, body.tos.pa-on .pa .pa-in{ min-height:56px; }
  body.tos.pa-on, body.tos.is-demo.pa-on, body.tos.is-demo.strip-min.pa-on{ padding-bottom:calc(var(--pa-h, 72px) + var(--tabs-h) + 16px + env(safe-area-inset-bottom)); }
  body.tos.is-demo.pa-on .demo-strip{ position:relative; bottom:auto; inset-inline:auto; z-index:auto; border-top:0; border-bottom:1px solid var(--pl-line, #E4E3DD); }
  body.tos.is-demo.pa-on:not(.strip-min) .demo-strip{ height:auto; }
  body.tos.is-demo.pa-on:not(.strip-min) .demo-strip .wrap{ height:auto; min-height:44px; flex-wrap:wrap; row-gap:6px; padding-block:6px; }
  body.tos.is-demo.strip-min.pa-on .demo-strip{ display:flex; justify-content:flex-end; background:transparent; height:32px; }
  body.tos.pa-on:has(> .tabs):not(.no-tabs) .toasts,
  body.tos.is-demo.pa-on:has(> .tabs):not(.no-tabs) .toasts{ bottom:calc(var(--pa-h, 72px) + var(--tabs-h) + 8px + env(safe-area-inset-bottom)); }
  /* open */
  body.tos.pa-on.tos-pa-busy .tabs, body.tos.pa-on.tos-pa-busy .demo-strip{ display:none!important; }
  body.tos.pa-on.tos-pa-busy .pa{ bottom:0; padding-bottom:calc(8px + env(safe-area-inset-bottom)); }
  body.tos.pa-on .pa.is-open{ z-index:60; max-height:calc(100svh - 40px); padding-bottom:0; }
  body.tos.pa-on .pa.is-open .pa-acts{ position:sticky; bottom:0; z-index:1; background:var(--paper); margin-inline:calc(-1 * var(--gutter)); padding:10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); box-shadow:0 -1px 0 var(--hair); }
}
/* desktop: the assistant card has the width of the day column */
@media (min-width:900px){ body.tos .pa{ max-width:760px; margin-inline:auto; } }
body.tos.no-tabs .pa{ display:none; }
.lg-open{ width:100%; min-height:56px; justify-content:flex-start; text-align:start; }
/* the move proposal: lessons that slide after the moved session, one compact list */
.tos-pa-after{ margin-top:8px; padding:10px 12px; background:var(--paper-2); font:400 16px/1.6 var(--f-text); color:var(--ink); }
.tos-pa-after .h{ font:700 16px/1.5 var(--f-text); color:var(--ink-2); margin:0 0 2px; }
.tos-pa-after ul{ list-style:none; margin:0; padding:0; display:grid; gap:2px; }
.tos-pa-after p{ margin:4px 0 0; color:var(--ink-2); }
.tos-pa-after bdi{ white-space:nowrap; }
/* drawer «كلّ التغييرات» → this page's own «السجلّ» */
#pnl-panel .tos-lg-xref{ margin:0; padding:0 var(--gutter, 16px) 8px; }
@media (min-width:900px){ #pnl-panel .tos-lg-xref{ padding:0 32px 12px; } }
.tos-lg-xref a{ display:flex; align-items:center; min-height:44px; font:700 16px/1.4 var(--f-text); color:var(--ink); text-decoration:underline; text-underline-offset:3px; }
@media (max-width:430px){
  body.tos .appbar-in .logo-mask{ width:64px; }
  .tos .toolbtn{ min-width:48px; justify-content:center; }
  .tos .appbar-in{ flex-wrap:wrap; }
  .tos .appbar-tools{ gap:4px; }
  .tos .appbar .appbar-tools{ flex:1 1 auto; min-width:0; max-width:100%; flex-wrap:wrap; justify-content:flex-end; }
}
@media (max-width:400px){
  body.tos .appbar-in .logo-mask{ width:54px; }
  body.tos .appbar .pnl-btn{ padding:0 6px; gap:4px; font-size:14px; }
  body.tos .appbar .pnl-btn svg{ width:18px; height:18px; }
}
@media (max-width:340px){ body.tos .appbar .pnl-btn svg{ display:none; } body.tos .appbar-in .logo-mask{ width:46px; } }

/* 24 Nov 2026: «من البرنامج الرسمي» under the fiche (source, missing fields, the programme's objectives to pick from) */
.cur-box{ margin-top: 12px; }
.cur-box .small{ line-height: 1.7; }
.cur-box .list li b{ font-weight: 700; }
.cur-c summary{ font-size: 15px; line-height: 1.6; }
.cur-o{ display: grid; gap: 6px; }
.cur-pick{ width: 100%; justify-content: flex-start; text-align: start; line-height: 1.6; white-space: normal; height: auto; min-height: 44px; padding-block: 8px; }

/* «الطريقة»: optional chips under a lesson marked done (on the phone only) */
.apbar{ display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.apbar .small{ flex-basis: 100%; }
.apbar .tog.ap{ min-height: 44px; padding: 6px 12px; font-size: 15px; width: auto; }

/* ---------- «عند ضيق الوقت» (tos-prio.js): facts, four options with their source, practice first ---------- */
.prio-card .pr-facts, .prio-sheet .pr-facts{ display:flex; flex-wrap:wrap; gap:6px 18px; font:700 19px/1.45 var(--f-text); color:var(--ink); margin-top:2px; }
.pr-facts b{ font:800 24px/1.2 var(--f-display); }
.prio-sheet .pr-facts{ margin-top:12px; }
.pr-opt{ margin-top:18px; padding-top:14px; box-shadow:inset 0 2px 0 var(--paper-3); display:grid; gap:8px; }
.pr-opt h3{ font:800 20px/1.35 var(--f-display); color:var(--ink); }
.pr-opt p{ font-size:18px; line-height:1.55; color:var(--ink); overflow-wrap:anywhere; }
.pr-opt p.small{ font-size:var(--t-note); color:var(--ink-2); }
.pr-opt .src{ font-size:15px; line-height:1.5; color:var(--ink-2); overflow-wrap:anywhere; }
.pr-opt .btn{ justify-self:start; max-width:100%; white-space:normal; text-align:center; }
.pr-list, .pr-mix{ padding:0; margin:0; }
.pr-list{ list-style:none; display:grid; gap:4px; }
.pr-list li{ background:var(--paper-2); padding:10px 12px; display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:space-between; font-size:17px; line-height:1.45; color:var(--ink); overflow-wrap:anywhere; }
.pr-list li small{ color:var(--ink-2); font-size:15px; white-space:nowrap; }
.pr-list li .btn{ min-height:48px; padding:6px 14px; font-size:16px; }
.pr-list label{ display:flex; gap:10px; align-items:flex-start; cursor:pointer; min-height:32px; }
.pr-list input[type="checkbox"]{ width:24px; height:24px; flex:0 0 24px; margin-top:2px; accent-color:var(--ink); }
.pr-mix{ list-style:none; display:grid; gap:2px; }
.pr-mix li{ display:flex; flex-wrap:wrap; justify-content:space-between; gap:4px 12px; padding:8px 12px; background:var(--paper-2); font-size:16px; color:var(--ink); }
.pr-chosen{ background:var(--paper-2); padding:12px 14px; font-size:17px; line-height:1.5; color:var(--ink); display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.pr-chosen .btn{ min-height:44px; padding:4px 12px; font-size:15px; }
.a4.insp td small{ font-size:7.8pt; font-weight:700; }
.wrow .st .chip.pr-def{ font-weight:700; }
.a4.insp .prio-box{ margin-top:2mm; padding:2mm 3mm; border:.4mm solid #000; font-size:8.8pt; line-height:1.5; }
.a4.insp .prio-box b{ font:700 9pt var(--f-text); }
.a4.insp .prio-box ul{ list-style:none; margin-top:1mm; display:grid; gap:1.4mm; }
.a4.insp .prio-box li{ display:grid; gap:.4mm; }
.a4.insp .prio-box .src{ color:#333; font-size:8.2pt; }

/* Onboarding and recovery scroll with the page when the tabs are hidden. */
body.tos.no-tabs #v-start{ padding-block-end:calc(24px + env(safe-area-inset-bottom)); }
body.tos.is-demo.no-tabs .demo-strip{ position:static; height:auto; }

#v-start .ob-recovery{ display:inline-flex; align-items:center; min-height:48px; margin-block:12px; white-space:normal; overflow-wrap:anywhere; }
#v-start .wrapn{ overflow-wrap:anywhere; }
#v-fix [data-tt-voice] .field > input{ min-block-size:44px; min-inline-size:44px; }
#v-start .field > input, #v-start .trows.ed select{ min-width:0; }
#v-start .trows > li{ grid-template-columns:auto minmax(0,1fr); }
#v-start .trows.ed > li{ grid-template-columns:repeat(2,minmax(0,1fr)); }
body.tos.is-demo.no-tabs .demo-strip .wrap{ flex-wrap:wrap; }
body.tos.is-demo .demo-strip, body.tos.is-demo .demo-strip .wrap{ min-height:48px; height:auto; }
body.tos .demo-strip .dl{ min-height:48px; font-size:16px; }
body.tos .demo-strip .dl.x{ min-width:48px; }

.app-actions #teacher-save-state[data-state="error"]{ color:var(--danger); }
.app-actions :is(.sc.st-done, .wrow.st-done, .job.done){ background: #DDF5E5; }
.app-actions :is(.errbar, .ferr, .chip.red){ background:var(--danger-field); color:var(--danger-ink); }
.app-actions .wday.today > h3::after, .app-actions .wday .tbadge{ background:var(--paper-3); color:var(--ink); }
