/* School for the children (ui/school-ui.js): the School part of a child's page in the Family app, the homework
   mini-game, the report card, the best pupils and the live PTA panel in the school hall. Phone first (375 px). */
.sc-schools { display: grid; gap: 8px; margin: 6px 0 10px; }
.sc-sch { border-radius: 16px; padding: 10px 12px; color: #fff; display: flex; flex-direction: column; gap: 4px; }
.sc-sch.sttherese { background: linear-gradient(135deg, #1d4f91, #162e62); } .sc-sch.gov { background: linear-gradient(135deg, #1f7a3d, #15532a); }
.sc-sch b { font: 800 14.5px var(--ui); } .sc-sch span { font: 600 12px var(--ui); opacity: .9; } .sc-sch small { font: 700 11.5px var(--ui); color: #ffe7a3; }
.sc-sch .ev-btn { align-self: flex-start; background: #fcd116; color: #17181b; }
.sc-head { border-radius: 14px; padding: 9px 12px; color: #fff; display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.sc-head.sttherese { background: #1d4f91; } .sc-head.gov { background: #1f7a3d; }
.sc-head b { font: 800 14px var(--ui); } .sc-head span { font: 600 12.5px var(--ui); }
.sc-week { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 6px 0; }
.sc-week span { background: #ececef; border-radius: 12px; padding: 6px 0; text-align: center; font: 700 15px var(--ui); display: flex; flex-direction: column; }
.sc-week span b { font: 800 11px var(--ui); color: #5b5f66; }
.sc-week .present { background: #dcfce7; } .sc-week .late { background: #fef3c7; } .sc-week .absent { background: #fee2e2; } .sc-week .today { outline: 2px solid #6b2147; }
.sc-prep { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.sc-prep .ev-btn small { font-weight: 600; opacity: .8; }
.sc-rep { display: flex; align-items: center; gap: 10px; width: 100%; }
.sc-rep > div { flex: 1; text-align: left; display: flex; flex-direction: column; gap: 2px; } .sc-rep strong { font: 800 14px var(--ui); } .sc-rep span { font: 600 12px var(--ui); color: #5b5f66; }
.sc-rep > b, .sc-total > b { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font: 900 24px var(--ui); color: #fff; flex: none; }
.gA { background: #15803d; } .gB { background: #2563eb; } .gC { background: #0891b2; } .gD { background: #d97706; } .gE { background: #ea580c; } .gF { background: #b91c1c; }
em.gA, em.gB, em.gC, em.gD, em.gE, em.gF { color: #fff; border-radius: 8px; padding: 2px 6px; font-style: normal; }

/* the overlay: homework, report cards, best pupils */
.sc-over { position: fixed; inset: 0; z-index: 8000; background: rgba(10,12,16,.62); display: none; align-items: center; justify-content: center; padding: 12px; font-family: var(--ui); }
.sc-over.open { display: flex; }
.sc-quiz, .sc-card { width: 100%; max-width: 440px; max-height: calc(100vh - 24px); overflow-y: auto; background: #fffdf7; border-radius: 22px; padding: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.4); }
.sc-qh, .sc-ch { display: flex; align-items: center; gap: 8px; } .sc-qh b { flex: 1; font: 800 14px var(--ui); }
.sc-qh .x, .sc-ch .x, .sc-ph .x { border: 0; background: #ececef; border-radius: 99px; width: 34px; height: 34px; font: 800 15px var(--ui); flex: none; }
.sc-prog { height: 8px; border-radius: 99px; background: #ececef; margin: 10px 0 4px; overflow: hidden; } .sc-prog i { display: block; height: 100%; background: #f59e0b; transition: width .3s; }
.sc-n { font: 700 11.5px var(--ui); color: #6b7280; }
.sc-pic { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px; min-height: 110px; margin: 8px 0; }
.sc-swatch { width: 110px; height: 110px; border-radius: 22px; border: 3px solid #e5e7eb; }
.sc-shape { width: 120px; height: 120px; fill: #2563eb; }
.sc-pic.count span { font-size: 38px; line-height: 1.1; } .sc-emoji { font-size: 84px; line-height: 1; }
.sc-q { font: 800 19px var(--ui); text-align: center; margin: 6px 4px 12px; color: #17181b; }
.sc-ans { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sc-ans button { border: 0; border-radius: 16px; min-height: 58px; padding: 8px; font: 800 16px var(--ui); background: #eef2ff; color: #1e293b; box-shadow: 0 2px 0 #c7d2fe; }
.sc-ans button:nth-child(2) { background: #fef3c7; box-shadow: 0 2px 0 #fde68a; } .sc-ans button:nth-child(3) { background: #dcfce7; box-shadow: 0 2px 0 #bbf7d0; } .sc-ans button:nth-child(4) { background: #fce7f3; box-shadow: 0 2px 0 #fbcfe8; }
.sc-ans button.picked { outline: 3px solid #17181b; transform: scale(.97); }
.sc-score { text-align: center; margin: 14px 0; } .sc-score b { display: block; font: 900 44px var(--ui); color: #15803d; } .sc-score span { font: 700 15px var(--ui); }
.sc-review { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.sc-review div { display: flex; flex-direction: column; background: #f4f4f5; border-radius: 10px; padding: 6px 9px; font: 600 12.5px var(--ui); }
.sc-review div.no { background: #fef2f2; } .sc-review small { color: #15803d; font-weight: 800; }
.ev-btn.wide { width: 100%; margin-top: 8px; }
.sc-card { border-top: 8px solid #1f7a3d; } .sc-card.sttherese { border-top-color: #1d4f91; }
.sc-ch { flex-wrap: wrap; } .sc-ch b { flex: 1; font: 900 14px var(--ui); letter-spacing: .5px; } .sc-ch span { order: 3; width: 100%; font: italic 600 12px Georgia, serif; color: #6b7280; }
.sc-card h3 { text-align: center; font: 900 18px Georgia, serif; letter-spacing: 3px; margin: 10px 0; }
.sc-cr { display: flex; justify-content: space-between; border-bottom: 1px dashed #d4d4d8; padding: 4px 0; font: 600 13px var(--ui); } .sc-cr span { color: #6b7280; }
.sc-card table { width: 100%; border-collapse: collapse; margin: 10px 0; font: 600 12.5px var(--ui); }
.sc-card td { border-bottom: 1px solid #ececef; padding: 6px 2px; } .sc-card td:first-child { font-weight: 800; } .sc-card td:last-child { text-align: right; font-weight: 800; }
.sc-total { display: flex; gap: 10px; align-items: center; background: #f4f4f5; border-radius: 14px; padding: 10px; } .sc-total strong { display: block; font: 800 16px var(--ui); } .sc-total span { font: 600 12.5px var(--ui); color: #5b5f66; }
.sc-remark { font: italic 600 14px Georgia, serif; text-align: center; margin: 12px 4px; } .sc-remark small { font: 600 11px var(--ui); color: #6b7280; }
.sc-top { margin: 10px 0; padding-left: 22px; } .sc-top li { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid #ececef; font: 600 13px var(--ui); }
.sc-top li b { flex: 1; } .sc-top li span { color: #6b7280; font-size: 12px; }

/* the PTA panel in the hall (under the top bar, clear of the joystick) */
.sc-pta { display: none; position: fixed; top: calc(env(safe-area-inset-top, 0px) + 112px); left: 8px; right: 8px; max-width: 520px; margin: 0 auto; z-index: 6; background: rgba(23,24,27,.9); color: #fff; border-radius: 18px; padding: 8px 10px; box-shadow: 0 6px 20px rgba(0,0,0,.3); font-family: var(--ui); max-height: 46vh; overflow-y: auto; }
.sc-pta.open { display: block; } .sc-pta.closed { max-height: 44px; overflow: hidden; }
.sc-ph { display: flex; align-items: center; gap: 8px; } .sc-ph b { flex: 1; font: 800 13px var(--ui); } .sc-ph span { font: 700 11.5px var(--ui); color: #fcd116; } .sc-ph .x { width: 28px; height: 28px; background: #3a3d42; color: #fff; }
.sc-pta p { margin: 6px 0; font: 600 12.5px var(--ui); } .sc-say { color: #fde68a; } .sc-ppl { color: #cbd5e1; }
.sc-acts { display: flex; flex-wrap: wrap; gap: 6px; } .sc-acts small { color: #cbd5e1; }
.sc-mo { width: 100%; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: rgba(255,255,255,.08); border-radius: 12px; padding: 6px; }
.sc-mo span { flex: 1 1 100%; font: 700 12.5px var(--ui); } .sc-mo small { color: #fcd116; }
.sc-prep .ev-btn.on:disabled { opacity: 1; }
.sc-ans.plain button, .sc-ans.plain button:nth-child(n) { background: #f1f1f4; box-shadow: 0 2px 0 #d4d4d8; }
.sc-mini { display: inline-block; width: 16px; height: 16px; border-radius: 4px; vertical-align: -3px; margin-right: 4px; fill: #2563eb; border: 1px solid #d4d4d8; }

/* 👫 the children's friends (Family app) */
.sc-fr { display: flex; align-items: center; gap: 9px; background: #f6f6f8; border-radius: 14px; padding: 8px 10px; margin: 6px 0; }
.sc-fr > i { font-style: normal; font-size: 22px; width: 30px; text-align: center; flex: none; }
.sc-fr > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sc-fr b { font: 800 13.5px var(--ui); } .sc-fr span { font: 600 11.5px var(--ui); color: #5b5f66; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-fr em { display: block; height: 6px; border-radius: 99px; background: #e2e3e7; overflow: hidden; } .sc-fr em u { display: block; height: 100%; background: #9ca3af; }
.sc-fr.friend em u { background: #22c55e; } .sc-fr.good em u { background: #0ea5e9; } .sc-fr.best em u { background: #f59e0b; } .sc-fr.rival em u { background: #ef4444; }
.sc-fr.best { background: #fff7e0; } .sc-fr.rival { background: #fff1f1; }
.sc-fr .ev-btn { flex: none; }
.sc-ask { background: #fdf2f8; border-radius: 14px; padding: 8px 10px; margin: 6px 0; font: 600 12.5px var(--ui); }
.sc-sibs { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; } .sc-sibs span { background: #ececef; border-radius: 99px; padding: 4px 10px; font: 700 12px var(--ui); }
