/* ==========================================================================
   r6.css — Round 6 (30 Sep picks) on top of slim.css + r5.css. Colours only through tokens (+ r5's red ink).
   ========================================================================== */
[hidden]{display:none!important}

/* every tap target ≥ 44px (the Round 5 option pages were allowed smaller ones) */
.seg5 button{min-height:44px}
.car5 .nav{width:44px;height:44px}
.p5 .acts .react{min-height:44px}
.vid5 .snd{min-height:44px;padding:0 14px}
.cmp .foot .icon-btn{width:44px;height:44px}
.tbar button{min-width:44px;height:44px}
.scorein{min-height:44px;font-size:16px}
.gpick .gbtn{min-height:44px}
.msg.ai .qs button{min-height:44px}
.chatin input{font-size:16px}
.cmp .editor{font-size:16px}
.p5 .ph .grow{flex:1}
.p5 .ph .icon-btn{margin:-6px -8px -6px 0}

/* feed */
.feed6 .words{padding:0}
.cmp{margin-bottom:16px}

/* calendar: a lesson is a link to its attendance */
a.ev{display:block;text-decoration:none;min-height:44px}
a.ev small{display:flex;align-items:center;gap:4px;font-size:11.5px;opacity:.85;margin-top:2px}
a.ev small .ico{width:14px;height:14px}

/* attendance */
.att6 .lessons button .ok6{color:var(--alt-ink);font-weight:600}
@media (max-width:600px){
  .arow{gap:8px}
  .arow .nm{min-width:0;flex:1 1 calc(100% - 60px)}
  .seg5{width:100%;display:grid;grid-template-columns:repeat(4,1fr)}
  .seg5 button{min-width:0;padding:0 4px}
}
.agrid button{min-width:36px;min-height:44px}

/* class students */
.roster6{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:4px 4px;border-bottom:1px solid var(--line)}
.roster6:last-child{border-bottom:0}
.roster6 .r6who{display:flex;align-items:center;gap:12px;min-height:52px;color:inherit;text-decoration:none;min-width:0}
.roster6 .r6who b{font-weight:500}
.roster6 .r6who small{display:block;color:var(--muted);font-size:12.5px}
.roster6 .r6hw{font-size:13px}
.roster6 .r6att{display:inline-flex;align-items:center;min-height:44px;padding:0 12px;border-radius:10px;color:var(--accent-ink);background:var(--accent-soft);font-weight:500;text-decoration:none;font-size:13.5px}
@media (max-width:600px){.roster6{grid-template-columns:minmax(0,1fr) auto}.roster6 .r6hw{display:none}}

/* homework papers */
.hwnote{padding:10px 12px;border-radius:10px;background:var(--warn-soft);color:var(--warn);font-size:13.5px;margin-bottom:10px;display:flex;gap:8px;align-items:center}
.sstrip{display:flex;gap:8px;overflow-x:auto;padding:2px 2px 10px;margin-bottom:6px;scrollbar-width:thin}
.sstrip button{flex:none;display:flex;align-items:center;gap:8px;min-height:52px;padding:6px 12px;border-radius:12px;border:var(--ghost-border);background:var(--surface);font:inherit;font-size:14px;cursor:pointer;text-align:left;color:var(--ink)}
.sstrip button small{display:block;font-size:12px;color:var(--muted)}
.sstrip button.miss{border-style:dashed;color:var(--sub)}
.sstrip button[aria-pressed="true"]{border-color:var(--accent);background:var(--accent-soft)}
.hwnav{margin:0 0 12px}
.hw6grid{margin-top:14px;max-width:640px}
.sendprev{display:grid;gap:10px;padding-top:10px;border-top:1px dashed var(--line-strong)}
.sendbox .textarea{font-size:16px}
@media (max-width:600px){.paper{padding:20px 14px 24px 48px}}

/* AI Create */
@media (max-width:1100px){.nb{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.nb > .nbp:first-child{grid-column:1/-1}}
@media (max-width:760px){.nb{grid-template-columns:minmax(0,1fr);min-height:0}.nb .chat{max-height:420px}}
.nbp > h3 .srcadd{min-height:44px;margin:-8px -6px -8px 0}
.srcs6{display:grid;gap:8px}
.src .srcic{width:18px;text-align:center}
.ol6{margin:8px 0 0;padding-left:18px;font-size:13px;display:grid;gap:4px}
.aud6{margin-top:8px;padding:10px 12px;border-radius:10px;background:var(--neutral-soft);font-size:13px}
.outc .btn{min-height:44px}

/* Google Drive (drive6.js) */
.drv6row{display:grid;grid-template-columns:64px minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:8px 0;border-bottom:1px solid var(--line)}
.drv6row:last-child{border-bottom:0}
.drv6th{width:64px;height:48px;border-radius:8px;overflow:hidden;background:var(--neutral-soft);display:grid;place-items:center;color:var(--sub);font-size:12px}
.drv6th img{width:100%;height:100%;object-fit:cover}
.drv6th img.drv6ic{object-fit:contain;padding:8px}
.drv6nm{min-width:0}.drv6nm b{display:block;font-weight:500;overflow-wrap:anywhere}.drv6nm small{color:var(--muted);font-size:12.5px}
.drv6sl{display:grid;place-items:center;width:100%;height:100%;background:#1558B0;color:#fff;font-size:12px;font-weight:600}
.drv6empty{font-size:14px}
.drv6big{display:block;width:100%;border:0;border-top:1px solid var(--line);background:var(--surface);padding:0;text-align:left;cursor:pointer;font:inherit;color:inherit}
.drv6big .drv6th{width:100%;height:auto;aspect-ratio:16/9;border-radius:0;font-size:20px}
.drv6big .cap{display:block;padding:10px 16px}.drv6big .cap b{font-weight:500}.drv6big .cap small{display:block;color:var(--muted);font-size:12.5px}
dialog.drv6dlg{width:min(960px,calc(100vw - 24px))}
.drv6body{padding:12px;display:grid;gap:8px}
.drv6body iframe{width:100%;height:70vh;border:0;border-radius:8px;background:var(--neutral-soft)}
.drv6body img,.drv6body video{width:100%;border-radius:8px;max-height:72vh;object-fit:contain;background:#000}
.drv6warn{padding:10px 16px;background:#FEF7E0;color:#5F4B00;font-size:13px;border-bottom:1px solid #DADCE0}
@media (max-width:600px){.drv6row{grid-template-columns:48px minmax(0,1fr) auto}.drv6row .icon-btn{grid-column:3}.drv6row .btn{grid-column:2/4;justify-self:start}.drv6th{width:48px;height:40px}}

/* recording */
.consent6{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border-radius:12px;background:var(--warn-soft);margin:6px 0 12px;font-size:14.5px;cursor:pointer}
.consent6 input{width:22px;height:22px;flex:none;margin-top:1px}
.recbtn{color:var(--ink-red);border-color:var(--ink-red)}
.recbtn .ico{color:var(--ink-red)}
.mail6.editing{outline:2px dashed var(--accent);outline-offset:4px}

/* class header on a phone: the two ghost buttons wrap under the title */
@media (max-width:600px){.chdr{flex-wrap:wrap}.chdr .btn{flex:1 1 auto}}

/* feed photo grid fills the card width (r5's square grid left a gap on a laptop) */
.feed6 .pgrid.n4{aspect-ratio:4/3;max-height:none}
/* AI Create: long source names wrap instead of being cut */
.srcs6 .src{align-items:flex-start}
.srcs6 .src > span:last-child{min-width:0;overflow-wrap:anywhere}

/* homework as a normal web page (q104, 30 Sep late): the teacher's red handwriting stays, the lined paper goes */
.paper.web6{background:var(--surface);background-image:none;border:var(--card-border);border-radius:14px;box-shadow:var(--shadow);padding:18px 20px 16px;font-size:15.5px;line-height:1.5}
.paper.web6 h3{line-height:1.3;padding-right:96px}
.paper.web6 .meta{padding-right:96px;margin-bottom:10px}
.paper.web6 .qq{margin:0;padding:12px 44px 12px 42px;border-top:1px solid var(--line)}
.paper.web6 .qn{left:0;top:12px;width:30px;height:30px;border-radius:50%;background:var(--neutral-soft);color:var(--sub);display:grid;place-items:center;text-align:center;font-size:13px;font-weight:600}
.paper.web6 .tickm,.paper.web6 .crossm{left:auto;right:6px;top:12px;width:26px;height:26px}
.paper.web6 .popt{display:inline-flex;align-items:center;min-height:36px;padding:0 14px;margin:8px 8px 0 0;border:var(--ghost-border);border-radius:18px;background:var(--surface);color:var(--sub)}
.paper.web6 .popt.stu{border-color:var(--accent);background:var(--accent-soft);color:var(--accent-ink)}
.paper.web6 .popt .circ{inset:-5px -7px}
.paper.web6 .gap{min-width:120px;border:var(--ghost-border);border-radius:8px;padding:2px 10px;line-height:1.6;margin:0 4px;background:var(--accent-soft)}
.paper.web6 .ink-score{right:26px;top:22px;font-size:32px}
.paper.web6 .ink-score small{font-size:15px}
@media (max-width:600px){.paper.web6{padding:14px 14px 12px}.paper.web6 .qq{padding:12px 34px 12px 38px}.paper.web6 .ink-score{right:22px;top:20px;font-size:26px}}

/* comments under a post */
.p5 .sum{align-items:center;padding:2px 8px 2px 16px}
.p5 .acts .cmbtn{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 14px;border-radius:22px;border:var(--ghost-border);background:var(--surface);color:var(--sub);font:inherit;font-size:13.5px;cursor:pointer}
.cm6{display:grid;gap:10px;padding:12px 16px 14px;border-top:1px solid var(--line);background:var(--bg)}
.cm6 [data-cm6-list]{display:grid;gap:8px}
.cmrow{display:flex;gap:8px;align-items:flex-start}
.cmrow .bubble{max-width:none;flex:1;background:var(--surface)}
.cmrow .bubble.me{margin-left:0;background:var(--accent-soft);border-radius:4px 14px 14px 14px}
.cmrow .bubble b{font-weight:500}.cmrow .bubble small{color:var(--muted);font-size:12px}
.cm6 .replybox .input{flex:1;font-size:16px}
/* material viewer: word cards */
.flash6{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.flash6 button{min-height:84px;border-radius:12px;border:var(--card-border);background:var(--surface);font:inherit;font-size:16px;cursor:pointer;color:var(--ink);padding:8px}
.flash6 button.flip{background:var(--accent-soft);color:var(--accent-ink)}

/* 1 Oct · Create homework pop-up (3 steps, q107 A) */
dialog.chw{border:0;border-radius:16px;padding:0;width:min(720px,calc(100vw - 24px));max-height:calc(100vh - 24px);box-shadow:var(--shadow-pop);background:var(--surface);color:var(--ink)}
dialog.chw::backdrop{background:var(--scrim)}
.chw-in{display:flex;flex-direction:column;max-height:calc(100vh - 24px)}
.chw-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;padding:14px 16px 10px 20px;border-bottom:1px solid var(--line)}
.chw-head h2{font-size:18px;margin:0 0 6px}
.chw-steps{display:flex;gap:6px;flex-wrap:wrap}
.chw-steps button{border:0;border-radius:20px;background:var(--neutral-soft);color:var(--sub);font:inherit;font-size:12.5px;padding:6px 12px;min-height:32px;cursor:pointer}
.chw-steps button:hover{background:var(--accent-soft)}
.chw-steps button.done{background:var(--alt-soft);color:var(--alt-ink)}
.chw-steps button[aria-current=step]{background:var(--accent-soft);color:var(--accent-ink);font-weight:600;box-shadow:0 0 0 1px var(--accent) inset}
.chw-body{padding:16px 20px;overflow:auto}
.chw-body section{display:grid;gap:14px}
.chw-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
.chw-card{border:1px solid var(--line-strong);border-radius:12px;background:var(--surface);padding:12px;text-align:left;display:grid;gap:4px;font:inherit;color:var(--ink);cursor:pointer}
.chw-card small,.chw-tile small{color:var(--sub);font-size:12.5px;line-height:1.35}
.chw-card[aria-pressed=true]{border-color:var(--accent);background:var(--accent-soft);box-shadow:0 0 0 1px var(--accent) inset}
.chw-glyph{width:34px;height:34px;border-radius:8px;display:grid;place-items:center;background:var(--neutral-soft);color:var(--accent-ink)}
.chw-two{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px}
.chw-body [data-chw-extra]:not([hidden]){display:grid;gap:12px}
.chw-drop{display:flex;gap:10px;align-items:center;justify-content:center;border:2px dashed var(--line-strong);border-radius:12px;padding:16px;color:var(--sub);font-size:13.5px;cursor:pointer;text-align:left}
.chw-drop b{color:var(--accent-ink)} .chw-drop small{display:block;font-size:12px}
.chw-file{display:flex;align-items:center;gap:10px;flex-wrap:wrap;border:1px solid var(--line);border-radius:10px;padding:8px 12px;font-size:13px}
.chw-ext{font-size:11px;font-weight:600;background:var(--warn-soft);color:var(--warn);border-radius:6px;padding:2px 6px}
.chw-qs{display:grid;gap:8px}
.chw-q{border:1px solid var(--line);border-radius:12px;padding:10px 14px;display:grid;gap:6px;font-size:14px}
.chw-q.new{border-color:var(--accent);background:var(--accent-soft)}
.chw-qtop{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:12.5px}
.chw-opts{display:flex;gap:6px;flex-wrap:wrap}
.chw-opts span{border:1px solid var(--line-strong);border-radius:8px;padding:2px 10px;font-size:13px}
.chw-opts span.right{border-color:var(--alt-ink);background:var(--alt-soft);color:var(--alt-ink)}
.chw-empty{border:2px dashed var(--line-strong);border-radius:12px;padding:14px;text-align:center;color:var(--sub);font-size:13.5px}
.chw-gal{display:grid;grid-template-columns:repeat(auto-fit,minmax(118px,1fr));gap:8px;margin-top:6px}
.chw-tile{border:1px solid var(--line-strong);border-radius:12px;background:var(--surface);padding:10px;text-align:left;display:grid;gap:4px;font:inherit;font-size:13.5px;color:var(--ink);cursor:pointer}
.chw-tile:hover{border-color:var(--accent)}
.chw-mini{height:40px;border-radius:8px;background:var(--neutral-soft);display:flex;gap:4px;align-items:center;justify-content:center;font-size:11px;color:var(--muted)}
.chw-mini i{display:block;width:26%;height:8px;border-radius:4px;background:var(--line-strong)}
.chw-fs{border:0;margin:0;padding:0;display:grid;gap:8px}
.chw-fs legend{font-weight:600;font-size:14px;margin-bottom:6px;padding:0}
.chw-radio{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--line-strong);border-radius:10px;padding:10px 12px;font-size:13.5px;cursor:pointer}
.chw-radio:has(input:checked){border-color:var(--accent);background:var(--accent-soft)}
.chw-radio input{margin-top:3px}
.chw-radio small{display:block;color:var(--sub);font-size:12.5px}
.chw-toggle{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:13.5px;border:1px solid var(--line);border-radius:10px;padding:10px 12px;cursor:pointer;min-height:44px}
.chw-toggle small{color:var(--sub)}
.chw-toggle input{width:20px;height:20px;flex:none}
.chw-done{display:flex;gap:10px;align-items:flex-start;background:var(--alt-soft);color:var(--alt-ink);border-radius:12px;padding:14px;font-weight:500}
.chw-foot{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:12px 20px;border-top:1px solid var(--line)}
.chw-foot [hidden]{display:none}
@media (max-width:520px){.chw-body{padding:14px}.chw-head{padding:12px 10px 8px 14px}.chw-foot{padding:10px 14px}}
