:root { --ink:#1f2933; --muted:#66727f; --line:#e3e7ec; --soft:#f4f6f8; --bg:#fbfbfc; --card:#fff; --accent:#244a7a; --warn:#c0392b; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin:0; font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; color:var(--ink); background:var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #f2a900; outline-offset: 2px; }
.hidden { display:none !important; }
.muted { color:var(--muted); } .pad { padding:16px; }
.top { display:flex; gap:10px; align-items:center; justify-content:space-between; padding:14px 20px; background:#fff; border-bottom:1px solid var(--line); position:sticky; top:0; z-index:5; }
.title { display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; }
.top h1 { font-size:22px; margin:0; letter-spacing:-.2px; }
.year { color:var(--muted); font-weight:600; }
.badge { background:#fff4d6; color:#8a6100; border-radius:999px; padding:2px 10px; font-size:13px; font-weight:600; }
.savestate { font-size:13px; color:var(--muted); }
.menubtn { border:1px solid var(--line); background:#fff; border-radius:10px; padding:8px 14px; cursor:pointer; font-weight:600; }
.daybar { display:flex; flex-wrap:wrap; gap:10px 16px; align-items:center; justify-content:space-between; padding:12px 20px; background:#fff; border-bottom:1px solid var(--line); position:sticky; top:63px; z-index:4; }
.daytabs { display:flex; gap:4px; overflow-x:auto; background:var(--soft); padding:4px; border-radius:12px; }
.daytabs button { border:0; background:none; padding:8px 14px; border-radius:9px; cursor:pointer; font-weight:600; color:var(--muted); white-space:nowrap; }
.daytabs button.on { background:#fff; color:var(--ink); box-shadow:0 1px 3px rgba(0,0,0,.12); }
.filters { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.filters select { padding:8px 10px; border:1px solid var(--line); border-radius:10px; background:#fff; }
.ghost { border:1px solid var(--line); background:#fff; border-radius:10px; padding:8px 12px; cursor:pointer; }
.ghost.warn { color:var(--warn); border-color:#f1c5bf; background:#fff7f6; font-weight:600; }
.ghost.on { background:var(--soft); }
.banner { background:#fff4d6; border-bottom:1px solid #f0d58c; padding:10px 20px; display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.legend { background:#fff; border-bottom:1px solid var(--line); padding:12px 20px; display:flex; flex-wrap:wrap; gap:6px; }
.legend .hint { width:100%; margin:0 0 4px; font-size:14px; color:var(--muted); display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.lg { display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line); background:#fff; padding:4px 10px 4px 4px; border-radius:999px; cursor:pointer; font-size:14px; }
.lg.sel { border-color:var(--ink); box-shadow:0 0 0 1px var(--ink); }
.sw { width:16px; height:16px; border-radius:50%; flex:none; border:1px solid rgba(0,0,0,.15); -webkit-print-color-adjust:exact; print-color-adjust:exact; }
main { padding:16px 20px 40px; max-width:1500px; margin:0 auto; }
.loc { margin:0 0 22px; }
.loc h2 { font-size:17px; margin:0 0 8px; color:var(--ink); }
.tl { background:var(--card); border:1px solid var(--line); border-radius:14px; overflow:hidden; }
.tlhead, .tlrow { display:grid; grid-template-columns: 150px 1fr 44px; }
.tlhead { background:var(--soft); font-size:12.5px; color:var(--muted); border-bottom:1px solid var(--line); }
.tlhead .hrs { position:relative; height:28px; }
.tlhead .hrs span { position:absolute; top:6px; transform:translateX(-50%); white-space:nowrap; }
.tlrow { border-bottom:1px solid var(--line); min-height:54px; }
.tlrow:last-child { border-bottom:0; }
.rname { padding:10px 14px; border-right:1px solid var(--line); display:flex; flex-direction:column; justify-content:center; }
.rname strong { font-size:16px; }
.rname small { color:var(--muted); font-size:12.5px; line-height:1.2; }
.track { position:relative; background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); background-size: var(--hr) 100%; }
.pill { position:absolute; border:0; border-left:5px solid var(--c); background:var(--p); color:var(--ink); border-radius:8px; padding:4px 8px; text-align:left; cursor:pointer; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:14px; line-height:1.15; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
.pill b { font-weight:650; display:block; overflow:hidden; text-overflow:ellipsis; }
.pill span { font-size:12px; color:#4a5560; }
.pill.open { --c:#aab4be; --p:#fff; border:1px dashed #aab4be; border-left:5px solid #aab4be; color:var(--muted); }
.pill.notime { opacity:.85; background-image: repeating-linear-gradient(135deg, transparent 0 8px, rgba(255,255,255,.55) 8px 16px); }
.pill.bad { box-shadow: inset 0 0 0 2px var(--warn); }
.pill.dim { opacity:.15; }
.pill .flag { color:var(--warn); }
.addcell { display:flex; align-items:center; justify-content:center; border-left:1px solid var(--line); }
.add { width:30px; height:30px; border-radius:50%; border:1px dashed #aab4be; background:#fff; color:var(--muted); cursor:pointer; font-size:18px; line-height:1; }
.free { position:absolute; left:10px; top:50%; transform:translateY(-50%); color:#a0aab4; font-size:13px; }
.rnote { font-size:13px; color:var(--muted); margin:6px 2px 0; }
/* phone: one card per room */
.cards { display:grid; gap:10px; }
.rcard { background:#fff; border:1px solid var(--line); border-radius:14px; padding:12px 14px; }
.rcard header { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:8px; }
.rcard header strong { font-size:17px; }
.rcard header small { color:var(--muted); font-size:13px; display:block; }
.item { display:flex; gap:12px; align-items:center; width:100%; border:0; border-left:5px solid var(--c); background:var(--p); border-radius:10px; padding:9px 12px; margin-top:6px; cursor:pointer; text-align:left; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
.item .t { font-variant-numeric: tabular-nums; font-weight:600; min-width:92px; color:#3c4752; font-size:15px; }
.item .n { font-weight:650; font-size:16px; }
.item.open { --c:#aab4be; --p:#fff; border:1px dashed #aab4be; border-left:5px solid #aab4be; color:var(--muted); }
.item.bad { box-shadow: inset 0 0 0 2px var(--warn); }
.item.dim { opacity:.2; }
.card { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:16px; margin-bottom:14px; }
.card h2 { margin:0 0 10px; font-size:18px; }
table.list { width:100%; border-collapse:collapse; font-size:15px; }
.list th, .list td { text-align:left; border-bottom:1px solid var(--line); padding:8px 6px; vertical-align:middle; }
.list th { font-size:13px; color:var(--muted); font-weight:600; }
.list td.act { white-space:nowrap; text-align:right; }
.row { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.btn { border:1px solid var(--line); background:#fff; border-radius:10px; padding:7px 12px; cursor:pointer; min-height:36px; }
.btn.primary { background:var(--accent); color:#fff; border-color:var(--accent); }
.btn.danger { background:var(--warn); color:#fff; border-color:var(--warn); }
.btn.small { padding:5px 10px; min-height:32px; font-size:14px; }
.btn.active { background:#fff4d6; border-color:#e0b400; font-weight:700; }
.linkbtn { border:0; background:none; padding:0; cursor:pointer; text-decoration:underline; text-underline-offset:2px; }
dialog { border:0; border-radius:16px; padding:0; width:min(470px, 94vw); box-shadow:0 12px 40px rgba(0,0,0,.25); }
dialog::backdrop { background:rgba(20,30,40,.35); }
dialog form { padding:18px; display:grid; gap:12px; }
dialog h3 { margin:0; font-size:18px; }
dialog label { display:grid; gap:4px; font-size:14px; color:var(--muted); }
dialog input:not([type=checkbox]):not([type=radio]), dialog select, dialog textarea { padding:9px; border:1px solid var(--line); border-radius:10px; width:100%; background:#fff; color:var(--ink); }
dialog input[type=color] { height:42px; padding:2px; }
dialog .days { display:flex; flex-wrap:wrap; gap:10px; }
dialog .days label, dialog .radio label { display:flex; gap:6px; align-items:center; color:var(--ink); font-size:15px; }
dialog .radio { display:grid; gap:8px; }
dialog .btns { display:flex; gap:8px; justify-content:flex-end; flex-wrap:wrap; }
dialog .btns .left { margin-right:auto; }
dialog .err { color:var(--warn); font-size:14px; margin:0; }
.menu { position:fixed; top:58px; right:16px; background:#fff; border:1px solid var(--line); border-radius:14px; box-shadow:0 12px 32px rgba(0,0,0,.16); display:grid; z-index:20; overflow:hidden; min-width:220px; padding:6px 0; }
.menu button { border:0; background:none; padding:11px 18px; text-align:left; cursor:pointer; font-size:15px; }
.menu button:hover { background:var(--soft); }
.menu hr { border:0; border-top:1px solid var(--line); margin:4px 0; }
.toast { position:fixed; left:50%; bottom:20px; transform:translateX(-50%); background:#1f2933; color:#fff; padding:12px 16px; border-radius:12px; z-index:30; max-width:92vw; }
.conf { font-size:14px; margin:0; padding-left:18px; } .conf li { margin:4px 0; }
.gate { max-width:380px; margin:40px auto; }
.printarea { display:none; }
.findbtn { border:0; background:var(--accent); color:#fff; border-radius:10px; padding:9px 14px; cursor:pointer; font-weight:650; }
.fres h4 { margin:10px 0 6px; font-size:15px; }
.flist { list-style:none; margin:0; padding:0; display:grid; gap:6px; }
.flist li { display:flex; justify-content:space-between; align-items:center; gap:10px; border:1px solid var(--line); border-left:5px solid #2e9d63; border-radius:10px; padding:8px 10px; background:#f3fbf6; }
.flist li small { display:block; color:var(--muted); font-size:13px; }
.flist.taken li { border-left-color:#c9d1d9; background:#fafbfc; }
.fres details summary { cursor:pointer; color:var(--muted); margin-top:10px; }
dialog { max-height:92vh; }
@media (max-width: 760px) {
  .findbtn { width:100%; order:-1; }
  .top { padding:12px 14px; } .top h1 { font-size:20px; }
  .daybar { padding:10px 14px; top:57px; }
  .daytabs { width:100%; } .daytabs button { flex:1; padding:8px 6px; }
  .filters { width:100%; } .filters select { flex:1; }
  main { padding:12px 12px 32px; }
  .legend { padding:10px 14px; }
}
@media print {
  @page { size: landscape; margin: 8mm; }
  body { background:#fff; font-size:11px; }
  .top { position:static; border:0; padding:0 0 4px; }
  .menubtn, .daybar, .banner, .legend, .menu, .toast, dialog, .addcell, .savestate, .badge, #view { display:none !important; }
  .printarea { display:block; }
  main { padding:0; max-width:none; }
  .pday { break-after: page; }
  .pday:last-child { break-after: auto; }
  .pday h2.day { font-size:15px; margin:0 0 6px; }
  .tlhead, .tlrow { grid-template-columns: 110px 1fr; }
  .tlrow { min-height:30px; }
  .rname { padding:3px 6px; } .rname strong { font-size:12px; } .rname small { font-size:9px; }
  .pill { font-size:9.5px; padding:1px 4px; } .pill span { font-size:8.5px; }
  .loc { margin-bottom:8px; break-inside:avoid; } .loc h2 { font-size:12px; margin-bottom:3px; }
  .pill.dim { opacity:1; }
  .plegend { display:flex; flex-wrap:wrap; gap:3px 10px; font-size:9px; margin-top:6px; }
  .plegend span { display:inline-flex; gap:4px; align-items:center; } .plegend .sw { width:10px; height:10px; }
}

.dchips{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 6px}
.dchip{display:inline-flex;align-items:center;cursor:pointer;margin:0}
.dchip input{position:absolute;opacity:0;width:0;height:0}
.dchip span{padding:7px 12px;border:1px solid #c9ced6;border-radius:999px;font-weight:600;font-size:14px;background:#fff}
.dchip input:checked+span{background:#1f4e8c;color:#fff;border-color:#1f4e8c}
.dquick{display:flex;gap:6px;margin-bottom:8px}
.flabel{font-weight:600;margin-top:4px}

/* editors + invite */
.lastchange { margin:0 0 10px; font-size:13px; color:var(--muted); }
a.btn { display:inline-flex; align-items:center; justify-content:center; text-decoration:none; color:inherit; }
.btn.big { min-height:48px; padding:10px 16px; font-size:16px; font-weight:600; width:100%; }
.btn.wa { background:#25d366; border-color:#25d366; color:#fff; }
.btn.dangerline { color:var(--warn); border-color:#f1c5bf; }
.bigbtns { display:grid; gap:8px; }
.linkbox { font-size:14px; background:var(--soft) !important; }
.edwrap { max-width:720px; margin-left:auto; margin-right:auto; }
.edadd { display:grid; grid-template-columns: 1.4fr 1fr auto; gap:8px; }
.edadd input, .ivform input { padding:10px; border:1px solid var(--line); border-radius:10px; width:100%; background:#fff; font-size:16px; }
.edlist { display:grid; }
.edrow { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:12px 0; border-bottom:1px solid var(--line); flex-wrap:wrap; }
.edrow:last-child { border-bottom:0; }
.edwho { display:grid; gap:2px; min-width:0; }
.edwho small { color:var(--muted); font-size:13px; overflow-wrap:anywhere; }
.edmeta { display:flex; gap:6px; align-items:center; flex-wrap:wrap; margin-top:2px; }
.edact { display:flex; gap:6px; flex-wrap:wrap; }
.st { font-size:12px; font-weight:700; border-radius:999px; padding:2px 9px; }
.st.act { background:#e3f5ea; color:#1d7a46; } .st.inv { background:#fff4d6; color:#8a6100; } .st.exp { background:#f1f3f5; color:var(--muted); }
.chg { list-style:none; margin:0; padding:0; display:grid; gap:0; font-size:14px; }
.chg li { display:grid; grid-template-columns: 130px 1fr; gap:8px; padding:7px 0; border-bottom:1px solid var(--line); }
.chg li:last-child { border-bottom:0; }
.chg .cw { color:var(--muted); font-variant-numeric:tabular-nums; }
.invite { max-width:440px; }
.ivform { display:grid; gap:12px; }
.ivform label { display:grid; gap:4px; font-size:14px; color:var(--muted); }
.ivform input[readonly] { background:var(--soft); color:var(--ink); }
@media (max-width: 760px) {
  .edadd { grid-template-columns: 1fr; }
  .edadd .btn { min-height:44px; }
  .edact { width:100%; } .edact .btn { flex:1; min-height:40px; }
  .chg li { grid-template-columns: 1fr; gap:0; } .chg .cw { font-size:12px; }
}
.ivform .err { margin:0; min-height:0; }
.ivform .err:empty { display:none; }

/* report */
.rctl { max-width:860px; margin-left:auto; margin-right:auto; }
.seg { display:inline-flex; background:var(--soft); padding:4px; border-radius:12px; gap:4px; margin-bottom:12px; }
.seg button { border:0; background:none; padding:9px 18px; border-radius:9px; cursor:pointer; font-weight:600; color:var(--muted); min-height:40px; }
.seg button.on { background:#fff; color:var(--ink); box-shadow:0 1px 3px rgba(0,0,0,.12); }
.rpick { margin-bottom:12px; }
.rptop { display:flex; justify-content:space-between; align-items:baseline; gap:8px; margin-bottom:6px; }
.rplbl { font-weight:600; font-size:14px; }
.rcount { font-size:14px; font-weight:600; color:var(--accent); }
.rptools { display:flex; gap:6px; margin-bottom:6px; }
.rptools input { flex:1; min-width:0; padding:9px 10px; border:1px solid var(--line); border-radius:10px; background:#fff; font-size:16px; min-height:44px; }
.rptools .btn { min-height:44px; padding:8px 12px; white-space:nowrap; font-size:14px; }
.rlist { border:1px solid var(--line); border-radius:10px; background:#fff; max-height:300px; overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; display:grid; grid-template-columns:repeat(auto-fill, minmax(230px, 1fr)); align-content:start; padding:4px; }
.ritem { display:flex; align-items:center; gap:8px; padding:8px; min-height:44px; border-radius:8px; cursor:pointer; user-select:none; }
.ritem:hover { background:var(--soft); }
.ritem input { width:20px; height:20px; margin:0; flex:none; accent-color:var(--accent); }
.ritem .sw { width:12px; height:12px; flex:none; }
.ritem .rin { flex:1; min-width:0; line-height:1.2; overflow-wrap:anywhere; }
.ritem .rin small { display:block; color:var(--muted); font-size:12px; }
.ritem .rcn { flex:none; font-size:12px; color:var(--muted); background:var(--soft); border-radius:999px; padding:1px 7px; font-variant-numeric:tabular-nums; }
.ritem .rcn.z { opacity:.55; }
.ritem:has(input:checked) { background:#eaf0f8; }
.rchips { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.rchips:empty { display:none; }
.rchip { border:1px solid #c9d6e8; background:#eaf0f8; color:var(--accent); border-radius:999px; padding:5px 10px; font-size:14px; font-weight:600; cursor:pointer; min-height:32px; }
.rchip span { margin-left:2px; opacity:.7; }
.rnomatch { grid-column:1 / -1; margin:10px; font-size:14px; }
.rpickme { text-align:center; color:var(--muted); }
.rpickme p { margin:6px 0; }
.rbtns .btn:disabled { opacity:.45; cursor:not-allowed; }
.rbtns { display:flex; gap:8px; flex-wrap:wrap; }
.rbtns .btn { min-height:44px; padding:9px 16px; font-weight:600; }
.rhint { margin:10px 0 0; font-size:13px; }
.rout { max-width:860px; margin:0 auto; }
.rsec { background:#fff; border:1px solid var(--line); border-radius:14px; padding:16px; margin-bottom:14px; }
.rkick { display:none; }
.rhead { display:flex; gap:10px; align-items:center; }
.rhead .sw { width:20px; height:20px; }
.rhead h2 { margin:0; font-size:20px; }
.rlabel { font-weight:500; color:var(--muted); font-size:16px; }
.rloc { color:var(--muted); font-size:14px; }
.rsum { margin:8px 0 10px; font-weight:600; font-size:15px; }
.rnote { margin:-4px 0 10px; color:var(--muted); font-size:13px; }
.rempty h2 { font-size:17px; margin:0 0 6px; } .rempty p { margin:0; }
.rtab { width:100%; border-collapse:collapse; font-size:15px; }
.rtab thead th { text-align:left; font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); border-bottom:2px solid var(--line); padding:6px 8px; }
.rtab td, .rtab tbody th { padding:7px 8px; vertical-align:top; text-align:left; }
.rtab tbody.rday { border-top:1px solid var(--line); }
.rtab tbody.rday:first-of-type { border-top:0; }
.rtab tbody th.cd { font-weight:700; white-space:nowrap; }
.rtab .ct { white-space:nowrap; font-variant-numeric:tabular-nums; }
.rtab .cw small { display:block; color:var(--muted); font-size:12px; line-height:1.25; }
.rtab .cw .sw.sm { display:inline-block; width:11px; height:11px; margin-right:6px; vertical-align:-1px; }
.rtab .cn { font-size:13px; color:var(--muted); }
.rwarn { color:var(--warn); }
.rtab .nw { white-space:nowrap; }
.rtab .ds { display:none; }
@media (max-width: 560px) {
  .rsec { padding:12px; border-radius:12px; }
  .rtab { font-size:14px; }
  .rtab td, .rtab tbody th { padding:6px 5px; }
  .rtab thead th { padding:5px; }
  .rtab .cn { font-size:12px; }
  .rtab th.cn, .rtab td.cn { max-width:30vw; overflow-wrap:anywhere; }
  .seg { display:flex; } .seg button { flex:1; }
  .rtab .dl { display:none; } .rtab .ds { display:inline; }
  .rbtns .btn { flex:1; }
  .rlist { max-height:42vh; grid-template-columns:1fr; }
  .rptools .btn { padding:8px 10px; }
}
@media print {
  body.rptmode { font-size:11pt; background:#fff; }
  body.rptmode .top, body.rptmode .banner, body.rptmode .rctl, body.rptmode .printarea, body.rptmode .lastchange { display:none !important; }
  body.rptmode #view { display:block !important; }
  body.rptmode main { padding:0; max-width:none; }
  body.rptmode .rout { max-width:none; }
  body.rptmode .rsec { border:0; border-radius:0; padding:0 0 10px; margin:0 0 12px; border-bottom:1px solid #999 !important; break-inside:avoid; page-break-inside:avoid; }
  body.rptmode .rsec:last-child { border-bottom:0 !important; }
  body.rptmode .rpickme { display:none !important; }
  body.rptmode .rkick { display:block; font-size:8.5pt; color:#555; border-bottom:1px solid #999; padding-bottom:4px; margin-bottom:10px; }
  body.rptmode .rsec + .rsec .rkick { display:none; }
  body.rptmode .rhead h2 { font-size:18pt; }
  body.rptmode .rsum { font-size:11.5pt; }
  body.rptmode .rtab { font-size:10.5pt; }
  body.rptmode .rtab td, body.rptmode .rtab tbody th { padding:3px 8px; line-height:1.25; }
  body.rptmode .rtab thead { display:table-header-group; }
  body.rptmode .rtab thead th { color:#333; border-bottom:1.5px solid #333; font-size:9pt; }
  body.rptmode .rtab tbody.rday { break-inside:avoid; page-break-inside:avoid; border-top:1px solid #aaa; }
  body.rptmode .rtab .cn, body.rptmode .rtab .cw small { color:#444; }
  body.rptmode .rtab .dl { display:inline !important; } body.rptmode .rtab .ds { display:none !important; }
}

/* inactive tutors */
.inact { font-style:normal; font-size:11px; font-weight:600; color:#6b5b00; background:#f3efe0; border:1px solid #e2d9b8; border-radius:999px; padding:0 6px; margin-left:4px; vertical-align:1px; white-space:nowrap; }
.pill .inact { font-size:10px; padding:0 4px; }
.lg.off { opacity:.6; border-style:dashed; }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.thint { margin:-4px 0 8px; font-size:13px; }
.tlist .tact { display:flex; gap:8px; justify-content:flex-end; align-items:center; }
.tgl { display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line); background:#fff; border-radius:999px; padding:3px 10px 3px 3px; min-height:34px; cursor:pointer; font-size:13px; font-weight:600; color:var(--muted); }
.tgl .knob { width:34px; height:20px; border-radius:999px; background:#c9d1d9; position:relative; flex:none; transition:background .15s; }
.tgl .knob::after { content:""; position:absolute; top:2px; left:2px; width:16px; height:16px; border-radius:50%; background:#fff; box-shadow:0 1px 2px rgba(0,0,0,.25); transition:left .15s; }
.tgl.on { color:#1e6b3a; border-color:#bfe0c9; background:#f1faf3; }
.tgl.on .knob { background:#2e9e57; }
.tgl.on .knob::after { left:16px; }
.tgl .tgt { min-width:52px; text-align:left; }
.tinact { background:#fafbfc; }
.tinact h2 { color:var(--muted); }
.tlist tr.tin td { color:var(--muted); }
.tlist tr.tin .sw { opacity:.45; }
.tlist tr.tin .lg { color:var(--muted); }
label.chk { display:inline-flex; align-items:center; gap:8px; font-size:14px; color:var(--ink); cursor:pointer; }
label.chk input { width:18px; height:18px; margin:0; accent-color:var(--accent); }
dialog label.chk { display:flex; color:var(--ink); }
/* not placed report */
.rgapintro { margin:0 0 10px; font-size:15px; }
.rgapctl { display:flex; flex-wrap:wrap; gap:10px 16px; align-items:flex-end; margin-bottom:12px; }
.rgy { display:grid; gap:4px; font-size:13px; color:var(--muted); font-weight:600; flex:1; min-width:220px; max-width:420px; }
.rgy select { padding:9px 10px; border:1px solid var(--line); border-radius:10px; background:#fff; font-size:16px; min-height:44px; color:var(--ink); font-weight:400; }
.gtab td { border-top:1px solid var(--line); }
.gtab td small { display:block; color:var(--muted); font-size:12px; line-height:1.25; }
.gtab .gst { white-space:nowrap; font-size:14px; }
.gtab tr.gst-inactive td { color:var(--muted); }
.gtab tr.gst-inactive .gst { font-style:italic; }
.gtab tr.gst-missing .gst { color:#8a6100; }
@media (max-width: 560px) {
  .tlist .hw { display:none; }
  .tlist .tact { gap:6px; }
  .tgl { padding:3px; } .tgl .tgt { display:none; }
  .tlist td, .tlist th { padding:8px 4px; }
  .seg button { padding:9px 6px; font-size:15px; }
  .rgy { min-width:0; max-width:none; flex-basis:100%; }
  .gtab .gst { white-space:normal; font-size:13px; }
}
@media print {
  body.rptmode .rsec.rgap { break-inside:auto; page-break-inside:auto; border-bottom:0 !important; }
  body.rptmode .gtab tr { break-inside:avoid; page-break-inside:avoid; }
  body.rptmode .gtab td { padding:3px 8px; border-top:1px solid #bbb; }
  body.rptmode .gtab td small { color:#444; }
  body.rptmode .gtab .gst { font-size:10pt; }
  body.rptmode .rgap .rhead h2 { font-size:16pt; }
  .inact { border-color:#999; background:none; color:#333; }
}

.rshowin { display:flex; margin:2px 0 8px; }
.rsum2 { margin:-6px 0 10px; color:var(--muted); font-size:14px; }
@media print { body.rptmode .rsum2 { color:#444; font-size:10pt; } }

/* Who's in each room now */
.nowbtn { background:#2e7d4f; }
.nctl h2 { margin:0; }
.nday { display:flex; flex-wrap:wrap; margin:12px 0 10px; }
.nday button { flex:1; padding:9px 8px; }
.nday .ds { display:none; }
.ntrow { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:10px; }
.ntrow input[type=time] { padding:7px 10px; border:1px solid var(--line); border-radius:10px; background:#fff; min-height:40px; font-size:17px; font-weight:600; }
.ntrow select { padding:8px 10px; border:1px solid var(--line); border-radius:10px; background:#fff; min-height:36px; max-width:100%; }
#nNow { min-width:120px; font-weight:700; }
.nhint { margin:0; font-size:13px; }
.nkick { display:none; }
.nsum { margin:0 0 6px; font-size:17px; }
.nlive { color:#2e7d4f; font-size:13px; font-weight:700; margin-left:4px; }
.nloc { font-size:13px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); margin:16px 0 6px; }
.nlist .nloc:first-child { margin-top:6px; }
.nrow { display:grid; grid-template-columns:120px 1fr; gap:10px; align-items:start; padding:9px 12px; border:1px solid var(--line); border-radius:10px; margin-bottom:6px; background:#fff; }
.nrow.nbusy { border-left:6px solid var(--c, var(--accent)); background:var(--p, #fff); -webkit-print-color-adjust:exact; print-color-adjust:exact; }
.nrow.nopen { border-left:6px solid #cfd6dd; }
.nroom strong { font-size:16px; display:block; }
.nroom small { display:block; color:var(--muted); font-size:12px; }
.nocc { display:flex; flex-wrap:wrap; gap:2px 10px; align-items:baseline; }
.nocc + .nocc { margin-top:4px; }
.nwho { display:inline-flex; align-items:center; gap:6px; font-size:16px; }
.ntime { font-size:14px; color:#38444f; }
.nnote { width:100%; font-size:13px; color:#38444f; font-style:italic; }
.nfree { font-weight:700; color:#2e7d4f; font-size:16px; }
.nnext { font-size:13px; color:#38444f; margin-top:2px; }
.nwarn { color:var(--warn); font-size:13px; font-weight:600; margin-top:2px; }
@media (max-width: 560px) {
  .nday button { padding:9px 4px; font-size:15px; }
  .nday .dl { display:none; } .nday .ds { display:inline; }
  .nrow { grid-template-columns:78px 1fr; padding:8px 10px; gap:8px; }
  .nroom strong { font-size:15px; }
  .ntrow input[type=time] { flex:1; }
  .ntrow select { flex:1; }
}
@media print {
  body.nowmode { background:#fff; font-size:11pt; }
  body.nowmode .top, body.nowmode .banner, body.nowmode .nctl, body.nowmode .printarea, body.nowmode .lastchange { display:none !important; }
  body.nowmode #view { display:block !important; }
  body.nowmode main { padding:0; max-width:none; }
  body.nowmode .nout { border:0; padding:0; }
  body.nowmode .nkick { display:block; font-size:8.5pt; color:#555; border-bottom:1px solid #999; padding-bottom:4px; margin-bottom:8px; }
  body.nowmode .nlive { display:none; }
  body.nowmode .nrow { break-inside:avoid; page-break-inside:avoid; padding:4px 8px; margin-bottom:3px; grid-template-columns:110px 1fr; border-radius:6px; }
  body.nowmode .nloc { margin:8px 0 3px; font-size:9pt; color:#333; break-after:avoid; }
  body.nowmode .nwho, body.nowmode .nfree, body.nowmode .nroom strong { font-size:11pt; }
  body.nowmode .ntime, body.nowmode .nnext, body.nowmode .nnote { font-size:9.5pt; }
}

/* ---- All days view (r6) ---- */
.daytabs button.alltab { color:var(--accent); }
.daytabs button.alltab.on { color:var(--accent); }
.wkhead { display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; margin:0 0 10px; }
.wkhead p { margin:0; font-size:14px; }
.wkwrap { overflow-x:auto; background:#fff; border:1px solid var(--line); border-radius:14px; }
.wktab { width:100%; min-width:900px; border-collapse:collapse; table-layout:fixed; }
.wktab th, .wktab td { border-bottom:1px solid var(--line); border-right:1px solid var(--line); vertical-align:top; padding:6px; text-align:left; }
.wktab tr > :last-child { border-right:0; }
.wktab tbody tr:last-child > * { border-bottom:0; }
.wktab thead th { background:var(--soft); font-size:14px; color:var(--ink); padding:8px; }
.wktab thead th small { display:block; font-weight:500; color:var(--muted); font-size:12px; }
.wktab th.wkr { width:104px; background:#fff; }
.wktab thead th.wkr { background:var(--soft); color:var(--muted); font-weight:600; }
.wktab tbody th.wkr strong { font-size:16px; display:block; }
.wktab tbody th.wkr small { display:block; color:var(--muted); font-size:12px; font-weight:400; line-height:1.2; }
.wkfree { color:#b3bcc5; font-size:13px; display:block; padding:6px 2px; }
.wk { display:block; width:100%; border:0; border-left:5px solid var(--c, #aab4be); background:var(--p, #fff); color:var(--ink); border-radius:8px; padding:5px 8px; margin:0 0 5px; text-align:left; cursor:pointer; line-height:1.2; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
.wk:last-child { margin-bottom:0; }
.wk .wt { display:block; font-size:12.5px; color:#3c4752; font-variant-numeric:tabular-nums; font-weight:600; }
.wk b { display:block; font-size:14px; font-weight:650; overflow-wrap:anywhere; }
.wk small { display:block; font-size:11.5px; color:var(--muted); overflow-wrap:anywhere; }
.wk.open { --c:#aab4be; --p:#fff; border:1px dashed #aab4be; border-left:5px solid #aab4be; color:var(--muted); }
.wk.bad { box-shadow: inset 0 0 0 2px var(--warn); }
.wk.dim { opacity:.2; }
.wk .flag { color:var(--warn); }
.wkcard .wkday { display:grid; grid-template-columns:42px 1fr; gap:8px; align-items:start; padding:6px 0; border-top:1px solid var(--line); }
.wkcard header + .wkday { border-top:0; padding-top:0; }
.wkcard .wkdn { font-weight:700; color:var(--muted); font-size:14px; padding-top:6px; }
.wkcard .wkitems { min-width:0; }
.wkcard .wk { display:flex; flex-wrap:wrap; align-items:baseline; column-gap:10px; padding:7px 10px; }
.wkcard .wk .wt { font-size:14px; min-width:84px; } .wkcard .wk b { font-size:15.5px; flex:1; min-width:0; }
.wkcard .wk small { flex-basis:100%; }
.wkloc .rnote { margin-top:6px; }
@media (max-width: 760px) { .wkhead .ghost { display:none; } }
@media print {
  .pweek h2.day { font-size:15px; margin:0 0 6px; }
  .pweek .wkwrap { border:0; border-radius:0; overflow:visible; }
  .pweek .wktab { min-width:0; font-size:9px; }
  .pweek .wktab th, .pweek .wktab td { padding:2px 3px; border:1px solid #cfd6dd; }
  .pweek .wktab thead th { font-size:10px; padding:3px; } .pweek .wktab thead th small { font-size:8px; }
  .pweek .wktab th.wkr { width:62px; } .pweek .wktab tbody th.wkr strong { font-size:11px; } .pweek .wktab tbody th.wkr small { font-size:7.5px; }
  .pweek .wk { padding:1px 3px; margin-bottom:2px; border-left-width:4px; border-radius:4px; }
  .pweek .wk .wt { font-size:8px; } .pweek .wk b { font-size:9px; } .pweek .wk small { font-size:7.5px; }
  .pweek .wk.dim { opacity:1; }
  .pweek .wkfree { font-size:8px; padding:1px; }
  .pweek .wktab tr { break-inside:avoid; }
  .pweek .wkloc { break-inside:auto; margin-bottom:6px; }
  .pweek .rnote { font-size:8.5px; margin:2px 0 0; }
  .pweek .wkloc h2 { break-after:avoid; page-break-after:avoid; }
  .pweek .wktab thead { display:table-header-group; }
}

/* Yeshiva Bais Dovid crest (Oct 23 2026). Header keeps its old height (63px desktop / 57px phone) so the sticky day bar still sits flush. */
.brand { display:flex; align-items:center; gap:12px; min-width:0; }
.crest { height:48px; width:auto; flex:none; display:block; }
.top { padding-top:7px; padding-bottom:7px; }
.gcrest { display:block; height:104px; width:auto; margin:2px auto 14px; }
dialog .gcrest { height:88px; margin:0 auto; justify-self:center; }
@media (max-width: 760px) {
  .brand { gap:10px; }
  .crest { height:40px; }
  .top { padding-top:8px; padding-bottom:8px; }
}
@media print {
  .crest { height:22px; }
  .top { padding:0 0 4px; }
}

/* School building picture in the header, after the title — added Oct 23 2026 (David: "put it on banner"). Same height as the crest so the header height doesn't change. */
.bldg { height:48px; width:auto; flex:none; display:block; }
@media (max-width: 700px) { .bldg { height:34px; } }
@media print { .bldg { display:none; } }
@media (max-width: 480px) {
  /* phones: the year (and the Editing / saved labels) sit on a small second line under "Tutor Rooms" so the building fits and the header stays 57px tall */
  .title { column-gap:6px; row-gap:0; align-items:center; }
  .title h1 { flex-basis:100%; line-height:22px; }
  .title .year { font-size:12px; line-height:18px; }
  .title .badge, .title .savestate { font-size:11px; line-height:14px; }
  .title .badge { padding:1px 7px; }
  .menubtn { white-space:nowrap; }
}
@media (max-width: 380px) { .bldg { height:28px; } }
