/* New Era School app — 2.3: only the school's ten app colours (blue, yellow, green, fiery red, orange, golden yellow, deep red,
   crimson red, white and black); a lighter shade is always one of them at part strength. The school's logo from the website.
   Rozha One for the name, Mukta for reading (it covers Hindi too).
   2.1: every screen fits the phone. The app is one column the height of the screen: top bar, the page, the tab bar.
   Lists fill the room that is left and page with arrows (or a sideways swipe) instead of scrolling. */
:root { --vh: 1vh; --dvh: 1vh; --vw: 1vw;
  --blue: #4285F4; --yellow: #FBBC05; --green: #34A853; --fiery: #D62300; --orange: #FF8732; --golden: #FFAA00; --deep: #DB0007; --crimson: #E4002B; --white: #FFFFFF; --black: #000000;
  --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: rgba(0,0,0,.05); --sunk: rgba(0,0,0,.07);
  --ink: #000000; --ink-2: rgba(0,0,0,.68); --ink-3: rgba(0,0,0,.45); --line: rgba(0,0,0,.14);
  --bar: #FFFFFF; --strong: #000000; --on-strong: #FFFFFF;
  --accent: #FF8732; --on-accent: #000000; --accent-soft: rgba(255,135,50,.18);
  --ok: #34A853; --ok-soft: rgba(52,168,83,.16); --bad: #DB0007; --bad-soft: rgba(219,0,7,.10); --bad-ink: #DB0007;
  --warn: #FF8732; --warn-soft: rgba(255,170,0,.20); --info: #4285F4; --info-soft: rgba(66,133,244,.13);
  --hol: #FBBC05; --hol-soft: rgba(251,188,5,.30);
  --t-green: rgba(52,168,83,.13); --t-blue: rgba(66,133,244,.12); --t-orange: rgba(255,135,50,.16); --t-red: rgba(228,0,43,.09); --t-yellow: rgba(251,188,5,.18);
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 3px 10px rgba(0,0,0,.06);
  --radius: 14px; --radius-sm: 10px;
  --f-name: "Rozha One", Georgia, "Times New Roman", serif;
  --f-head: "Baloo 2", "Mukta", ui-rounded, system-ui, sans-serif;
  --f-body: "Mukta", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Devanagari", sans-serif;
  --gl: max(16px, env(safe-area-inset-left, 0px)); --gr: max(16px, env(safe-area-inset-right, 0px));
  --tabh: 62px; --gap: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #000000; --surface: rgba(255,255,255,.08); --surface-2: rgba(255,255,255,.10); --sunk: rgba(255,255,255,.05);
  --ink: #FFFFFF; --ink-2: rgba(255,255,255,.74); --ink-3: rgba(255,255,255,.52); --line: rgba(255,255,255,.18);
  --bar: #000000; --strong: #FFFFFF; --on-strong: #000000;
  --accent-soft: rgba(255,135,50,.26); --ok-soft: rgba(52,168,83,.26); --bad-soft: rgba(228,0,43,.24); --bad-ink: #FF8732; --warn-soft: rgba(255,170,0,.24); --info-soft: rgba(66,133,244,.26); --hol-soft: rgba(251,188,5,.28);
  --t-green: rgba(52,168,83,.22); --t-blue: rgba(66,133,244,.22); --t-orange: rgba(255,135,50,.22); --t-red: rgba(228,0,43,.22); --t-yellow: rgba(251,188,5,.20);
  --shadow: 0 0 0 1px rgba(255,255,255,.10); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #000000; --surface: rgba(255,255,255,.08); --surface-2: rgba(255,255,255,.10); --sunk: rgba(255,255,255,.05);
  --ink: #FFFFFF; --ink-2: rgba(255,255,255,.74); --ink-3: rgba(255,255,255,.52); --line: rgba(255,255,255,.18);
  --bar: #000000; --strong: #FFFFFF; --on-strong: #000000;
  --accent-soft: rgba(255,135,50,.26); --ok-soft: rgba(52,168,83,.26); --bad-soft: rgba(228,0,43,.24); --bad-ink: #FF8732; --warn-soft: rgba(255,170,0,.24); --info-soft: rgba(66,133,244,.26); --hol-soft: rgba(251,188,5,.28);
  --t-green: rgba(52,168,83,.22); --t-blue: rgba(66,133,244,.22); --t-orange: rgba(255,135,50,.22); --t-red: rgba(228,0,43,.22); --t-yellow: rgba(251,188,5,.20);
  --shadow: 0 0 0 1px rgba(255,255,255,.10); color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
@supports (height: 1dvh) { :root { --dvh: 1dvh; } }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--f-body); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2.5px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--f-head); line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--ink); text-decoration-color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ic { width: 22px; height: 22px; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- the frame: one column the height of the screen ---- */
#app { max-width: 560px; margin: 0 auto; height: calc(100 * var(--dvh)); display: flex; flex-direction: column; overflow: hidden; background: var(--bg); position: relative; }
#app > * { flex: none; }
#app > main, #app > .welcome { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; }
:where(html.w600:not(.coarse)) body { background: #000000; } :root:where(.w600:not(.coarse)):not([data-theme="dark"]) body { background: rgba(0,0,0,.06); } :where(html.w600:not(.coarse)) #app { box-shadow: 0 0 0 1px var(--line), 0 10px 40px rgba(0,0,0,.08); }
html.coarse #app { max-width: none; }

/* ---- top bar ---- */
.bar { z-index: 20; background: var(--bar); color: var(--ink); padding: calc(env(safe-area-inset-top, 0px) + 5px) var(--gr) 7px var(--gl); display: flex; align-items: center; gap: 8px; min-height: 52px; position: relative; }
.bar::after, .stripe { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--blue) 0 25%, var(--crimson) 25% 50%, var(--yellow) 50% 75%, var(--green) 75%); }
.stripe { position: relative; display: block; height: 4px; flex: none; }
.stripe i { display: none; }
.bar-logo { display: flex; align-items: center; margin: 0 2px 0 2px; }
.bar-logo .emblem { width: 34px; height: auto; display: block; }
.bar h1 { font: 700 19px/1.1 var(--f-head); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .ibtn { color: var(--ink); }
.ibtn { appearance: none; border: 0; background: transparent; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; padding: 0; }
.ibtn:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.ibtn[disabled] { opacity: .3; cursor: default; }
.lang-btn { appearance: none; border: 1.5px solid var(--line); background: transparent; color: var(--ink); font: 700 13px/1 var(--f-body); padding: 7px 10px; border-radius: 999px; min-width: 44px; }

/* ---- home: the school's logo and a greeting ---- */
.hero { background: var(--bar); color: var(--ink); padding: calc(env(safe-area-inset-top, 0px) + 8px) var(--gr) 10px var(--gl); position: relative; }
.hero-row { display: flex; align-items: center; gap: 8px; position: relative; z-index: 1; }
.hero .ibtn { color: var(--ink); }
.wordmark { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wordmark .logo-full { height: 56px; width: auto; display: block; flex: none; }
.wordmark .nm { font: 400 30px/0.95 var(--f-name); color: var(--blue); letter-spacing: .5px; white-space: nowrap; }
.wordmark .sub { font: 700 11px/1.2 var(--f-body); letter-spacing: 1.1px; text-transform: uppercase; color: var(--ink-2); padding-top: 4px; white-space: nowrap; }
/* on black (dark mode) the logo sits on a white tile, as it does on the website */
:root[data-theme="dark"] .logo-full, :root[data-theme="dark"] .emblem { background: #FFFFFF; border-radius: 6px; padding: 4px 6px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-full, :root:not([data-theme="light"]) .emblem { background: #FFFFFF; border-radius: 6px; padding: 4px 6px; } }
.hello { margin-top: 8px; font: 600 15px/1.25 var(--f-body); position: relative; z-index: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hello b { font: 700 19px/1.2 var(--f-head); color: var(--ink); }
.hero-sub { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; position: relative; z-index: 1; }
.kids { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; position: relative; z-index: 1; }
.kids::-webkit-scrollbar { display: none; }
.kid { appearance: none; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 4px 12px 4px 4px; display: flex; align-items: center; gap: 8px; flex: none; text-align: left; }
.kid[aria-pressed="true"] { background: var(--strong); color: var(--on-strong); border-color: var(--strong); }
.kid .av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 700 13px/1 var(--f-head); background: var(--yellow); color: #000000; }
.kid small { display: block; font-size: 11.5px; line-height: 1.1; opacity: .78; }
.kid span { font-weight: 700; line-height: 1.15; font-size: 14.5px; }

/* ---- the page under the bar: a column whose last list takes the room that is left ---- */
.page { padding: 12px var(--gr) 12px var(--gl); display: flex; flex-direction: column; gap: var(--gap); }
.page > * { flex: none; }
.page > .grow { flex: 1 1 auto; }
.h-sm { font-size: 16.5px; }
.h-md { font: 700 18px/1.2 var(--f-head); }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; min-width: 0; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.wrap { flex-wrap: wrap; }
.long { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.clamp1 { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* lists fitted to the screen */
.fit { flex: 1 1 0 !important; min-height: 132px; display: flex; flex-direction: column; overflow: hidden; }
.fit.trim { min-height: 0; }
.fit-items { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.fit-items > * { flex: none; }
.pager { flex: none; display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 8px; }
.pg { appearance: none; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); width: 44px; height: 36px; border-radius: 12px; display: grid; place-items: center; padding: 0; }
.pg[disabled] { opacity: .35; cursor: default; }
.pg-n { font: 700 14px/1 var(--f-body); color: var(--ink-2); min-width: 46px; text-align: center; font-variant-numeric: tabular-nums; }
/* the buttons at the foot of a page */
.actbar { display: flex; gap: 10px; margin-top: auto; position: sticky; bottom: 0; z-index: 3; padding-top: 2px; }
.actbar > * { flex: 1 1 0; min-width: 0; }
.actbar .btn.ghost { flex: 0 1 auto; background: var(--surface); border: 1.5px solid var(--line); }
.fit + .actbar, .grow + .actbar, .fit + p + .actbar { margin-top: 0; }

/* ‹ label › and drop-downs */
.stepper { display: flex; align-items: center; gap: 4px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); padding: 2px; }
.stepper b { flex: 1; text-align: center; font: 700 15.5px/1.2 var(--f-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-card .stepper { box-shadow: none; padding: 0; background: transparent; }
.pick { position: relative; display: inline-flex; align-items: center; align-self: flex-start; max-width: 100%; }
.pick select { appearance: none; -webkit-appearance: none; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 8px 38px 8px 14px; font: 700 14.5px/1.1 var(--f-body); min-height: 38px; max-width: 100%; }
.pick .ic { position: absolute; right: 12px; width: 18px; height: 18px; pointer-events: none; color: var(--ink-2); }
.pick.hero-pick { margin-top: 8px; position: relative; z-index: 1; }
.head-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: space-between; }
.head-row .chips { margin: 0; padding: 0; flex: 1 1 auto; }

/* ---- home ---- */
.home { gap: 10px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { appearance: none; border: 1.5px solid var(--tb, var(--line)); text-align: left; background: var(--tbg, var(--surface)); color: var(--ink); border-radius: var(--radius); padding: 11px 10px 11px 11px; display: flex; align-items: flex-start; gap: 9px; min-height: 66px; min-width: 0; position: relative; }
.tile:active { transform: scale(.985); }
.tile .tic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--tc, var(--strong)); color: var(--tic-ink, #FFFFFF); flex: none; }
.tile .tic .ic { width: 20px; height: 20px; }
.tile .tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile .tt { font: 700 15.5px/1.15 var(--f-head); }
.tile .ts { font-size: 12.5px; line-height: 1.3; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .ts b { color: var(--ink); font-weight: 700; }
.tile.att { --tc: var(--green); --tic-ink: #000000; --tbg: var(--t-green); --tb: rgba(52,168,83,.45); } .tile.asg { --tc: var(--blue); --tic-ink: #FFFFFF; --tbg: var(--t-blue); --tb: rgba(66,133,244,.45); }
.tile.res { --tc: var(--orange); --tic-ink: #000000; --tbg: var(--t-orange); --tb: rgba(255,135,50,.55); } .tile.fee { --tc: var(--crimson); --tic-ink: #FFFFFF; --tbg: var(--t-red); --tb: rgba(228,0,43,.35); }
.tile .tic { position: relative; }
.tile .tpip { position: absolute; top: -6px; right: -7px; min-width: 19px; height: 19px; border-radius: 10px; background: var(--deep); color: #FFFFFF; font: 800 11px/19px var(--f-body); font-style: normal; text-align: center; padding: 0 5px; box-shadow: 0 0 0 2px var(--bg); }
.tile .ts b.bad { color: var(--bad-ink); } .tile .ts b.warn { color: var(--ink); text-decoration: underline 2px var(--orange); text-underline-offset: 3px; }
.minis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.mini { appearance: none; border: 1.5px solid var(--line); background: var(--surface); border-radius: 13px; padding: 6px 6px 6px 7px; display: flex; flex-direction: row; align-items: center; gap: 7px; font: 600 12.5px/1.12 var(--f-body); color: var(--ink); text-align: left; min-width: 0; min-height: 46px; text-decoration: none; }
.mini .ic { width: 28px; height: 28px; padding: 5px; border-radius: 8px; background: var(--mc, var(--strong)); color: var(--mc-ink, #FFFFFF); }
.mini.m-red { --mc: var(--crimson); } .mini.m-blue { --mc: var(--blue); } .mini.m-green { --mc: var(--green); --mc-ink: #000000; } .mini.m-orange { --mc: var(--orange); --mc-ink: #000000; } .mini.m-gold { --mc: var(--golden); --mc-ink: #000000; }
.mini .dollhouse { width: 36px; height: 36px; margin: -6px -4px -6px -5px; flex: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); }
.mini.tour { background: var(--t-yellow); border-color: rgba(251,188,5,.7); }
.mini span { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.nstrip { appearance: none; border: 0; width: 100%; text-align: left; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); padding: 9px 12px; display: flex; align-items: center; gap: 10px; color: var(--ink); }
.nstrip > .ic { color: var(--ink); width: 20px; height: 20px; }
.nstrip.pin { box-shadow: inset 4px 0 0 var(--crimson), var(--shadow); }
.nstrip .ns-t { display: block; font-weight: 700; font-size: 14.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nstrip .ns-b { display: block; font-size: 13px; color: var(--ink-2); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nudge { display: flex; align-items: center; gap: 8px; background: var(--warn-soft); border-radius: 12px; padding: 3px 2px 3px 10px; font-size: 13px; line-height: 1.25; }
.nudge > .ic { color: var(--ink); width: 20px; height: 20px; }
.nudge .btn.sm { min-height: 34px; padding: 7px 10px; font-size: 13.5px; }
.setup-row { appearance: none; border: 1.5px solid var(--line); width: 100%; text-align: left; background: var(--surface); border-radius: 12px; padding: 6px 12px; display: flex; align-items: center; gap: 10px; color: var(--ink); }
.setup-row .grow b, .setup-row .grow span { display: block; }
.tourcard { appearance: none; border: 0; width: 100%; text-align: left; text-decoration: none; border-radius: var(--radius); padding: 10px 14px; background: var(--yellow); color: #000000; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow); overflow: hidden; position: relative; }
.tourcard b { display: block; font: 700 16.5px/1.15 var(--f-head); }
.tourcard span { font-size: 13px; }
.tourcard .dollhouse { width: 58px; height: 58px; flex: none; margin: -8px -2px; filter: drop-shadow(0 3px 4px rgba(0,0,0,.3)); }

/* badges and chips */
.badge { display: inline-flex; align-items: center; gap: 5px; font: 700 12px/1 var(--f-body); padding: 5px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ink); } .badge.bad { background: var(--bad); color: #FFFFFF; } .badge.warn { background: var(--warn-soft); color: var(--ink); } .badge.info { background: var(--info-soft); color: var(--ink); } .badge.hol { background: var(--hol-soft); color: var(--ink); } .badge.acc { background: var(--accent-soft); color: var(--ink); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 1px 0 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { appearance: none; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 8px 14px; font: 600 14px/1 var(--f-body); white-space: nowrap; flex: none; }
.chip[aria-pressed="true"] { background: var(--strong); border-color: var(--strong); color: var(--on-strong); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { appearance: none; border: 0; background: transparent; border-radius: 9px; padding: 9px 4px; font: 700 13.5px/1.1 var(--f-body); color: var(--ink-2); min-width: 0; }
.seg button[aria-pressed="true"] { background: var(--strong); color: var(--on-strong); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* buttons and forms */
.btn { appearance: none; border: 0; border-radius: 12px; padding: 11px 16px; font: 700 15.5px/1.1 var(--f-body); background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; text-align: center; }
.btn.block { width: 100%; }
a.btn { text-decoration: none; }
.btn.ghost { background: var(--surface-2); color: var(--ink); }
.btn.line { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); }
.btn.navy { background: var(--strong); color: var(--on-strong); }
.btn.wa { background: var(--green); color: #000000; }
.btn.ok { background: var(--green); color: #000000; } .btn.bad { background: var(--bad-soft); color: var(--bad-ink); }
.btn.sm { min-height: 38px; padding: 8px 12px; font-size: 14px; border-radius: 10px; }
.btn[disabled], .btn.disabled { opacity: .45; cursor: not-allowed; }
.lnk { appearance: none; border: 0; background: none; color: var(--ink); font-weight: 700; font-size: 14px; padding: 4px 0; text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.lnk.center { align-self: center; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font: 600 14px/1.2 var(--f-body); color: var(--ink-2); }
.input, select.input, textarea.input { width: 100%; border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 11px 12px; font-size: 16px; min-height: 46px; }
textarea.input { min-height: 84px; resize: vertical; line-height: 1.45; }
textarea.input[rows="2"] { min-height: 64px; }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--info-soft); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.err { color: var(--bad-ink); font-size: 13.5px; font-weight: 600; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.check input { width: 22px; height: 22px; accent-color: var(--blue); }

/* lists */
.list { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.li { appearance: none; border: 0; background: transparent; text-align: left; width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); min-width: 0; color: var(--ink); }
.li:first-child { border-top: 0; }
.li .lt { font-weight: 700; line-height: 1.25; }
.li .ls { font-size: 13.5px; color: var(--ink-2); line-height: 1.35; }
.li .chev { color: var(--ink-3); }
.li.card-li { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); border-top: 0; padding: 10px 12px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--dc, var(--ink-3)); }
.subj { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font: 800 12.5px/1 var(--f-head); color: var(--st, #FFFFFF); background: var(--sc, #000000); flex: none; letter-spacing: .3px; }
.empty { text-align: center; padding: 22px 16px; color: var(--ink-2); }
.empty .ic { width: 38px; height: 38px; color: var(--ink-3); margin: 0 auto 8px; display: block; }

/* attendance and the school calendar: a month of days */
.att-sum { display: flex; align-items: center; gap: 14px; padding: 10px 14px; }
.att-sum .grow { display: flex; flex-direction: column; gap: 1px; }
.att-sum .grow b { font: 700 16.5px/1.2 var(--f-head); }
.cal-card { padding: 8px 10px 10px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 4px; }
.cal .wd { text-align: center; font: 700 11px/1 var(--f-body); color: var(--ink-3); text-transform: uppercase; letter-spacing: .4px; padding: 3px 0; }
.cal .d { height: clamp(30px, calc(5.2 * var(--vh)), 40px); border-radius: 9px; display: grid; place-items: center; font: 700 14px/1 var(--f-body); background: var(--surface-2); color: var(--ink-2); position: relative; border: 0; appearance: none; padding: 0; min-width: 0; }
.cal .d.P { background: var(--ok-soft); color: var(--ink); } .cal .d.A { background: var(--deep); color: #FFFFFF; } .cal .d.L { background: var(--warn-soft); color: var(--ink); box-shadow: inset 0 0 0 2px var(--warn); }
.cal .d.H { background: var(--hol-soft); color: var(--ink); } .cal .d.S { background: transparent; color: var(--ink-3); } .cal .d.F { background: transparent; color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); } .cal .d.N { background: transparent; outline: 1.5px dashed var(--ink-3); outline-offset: -3px; color: var(--ink-2); }
.cal .d.today::after { content: ""; position: absolute; bottom: 3px; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.cal .d.ev::before { content: ""; position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--info); }
.cal .d.sel { outline: 2.5px solid var(--blue); outline-offset: 1px; }
.cal .blank { height: 1px; }
.cal.six { gap: 3px; } .cal.six .d { height: clamp(27px, calc(4.4 * var(--vh)), 38px); }
.cal-foot { margin-top: 8px; min-height: 20px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--ink-2); }
.legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; vertical-align: -1px; margin-right: 5px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--surface); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); min-width: 0; }
.stat b { display: block; font: 800 24px/1.1 var(--f-head); font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--ink-2); line-height: 1.25; display: block; }
.ring { --p: 0; width: 60px; height: 60px; border-radius: 50%; background: conic-gradient(var(--ok) calc(var(--p) * 1%), var(--surface-2) 0); display: grid; place-items: center; flex: none; }
.ring > div { width: 46px; height: 46px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font: 800 15px/1 var(--f-head); }
.card.row .ring, section.row .ring { width: 72px; height: 72px; } .card.row .ring > div { width: 56px; height: 56px; font-size: 17px; }

/* marking attendance: the class as names, three to a row */
.att-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.roll-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rc { appearance: none; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 11px; min-height: 46px; padding: 4px 8px; display: flex; align-items: center; gap: 6px; text-align: left; min-width: 0; position: relative; }
.rc .rn { font: 700 12px/1 var(--f-body); color: var(--ink-3); min-width: 16px; font-variant-numeric: tabular-nums; }
.rc .nm { flex: 1; min-width: 0; font: 700 14px/1.15 var(--f-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc .st { font: 800 13px/1 var(--f-body); }
.rc.A { background: var(--deep); border-color: var(--deep); color: #FFFFFF; } .rc.A .rn { color: rgba(255,255,255,.8); }
.rc.L { background: var(--warn-soft); border-color: var(--warn); color: var(--ink); }
.rc.lv::after { content: ""; position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.roster .li { padding: 10px 12px 10px 14px; }
.roll { width: 30px; font: 700 14px/1 var(--f-body); color: var(--ink-3); text-align: center; flex: none; font-variant-numeric: tabular-nums; }
.note.slim { padding: 8px 12px; font-size: 13px; }

/* homework and assignments */
.hw { display: flex; align-items: flex-start; gap: 10px; padding: 11px 10px 11px 12px; }
.hw-h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.hw-text { appearance: none; border: 0; background: none; padding: 0; margin-top: 2px; text-align: left; color: var(--ink); font-size: 15px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; width: 100%; }
.hw.done .hw-text { text-decoration: line-through; opacity: .6; }
.tick { appearance: none; width: 40px; height: 40px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-3); display: grid; place-items: center; flex: none; padding: 0; }
.tick.on { background: var(--green); border-color: var(--green); color: #000000; }
.asg-row { appearance: none; border: 0; width: 100%; text-align: left; display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: var(--ink); }
.asg-row .grow { display: flex; flex-direction: column; gap: 1px; }
.asg-row .grow b { line-height: 1.25; }
.big-num { font: 800 26px/1 var(--f-head); font-variant-numeric: tabular-nums; }

/* fees */
.due-card { background: #000000; color: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow); }
.due-card .grow { display: flex; flex-direction: column; gap: 2px; }
.due-card .amt { font: 800 28px/1.05 var(--f-head); font-variant-numeric: tabular-nums; color: var(--yellow); }
.due-card .muted { color: rgba(255,255,255,.8); }
.due-card .btn { background: var(--yellow); color: #000000; flex: none; }
.due-card.col .bar-track { margin: 3px 0; }
.fee-li .amt { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.qr-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.qr-card .grow { display: flex; flex-direction: column; gap: 2px; }
.qr-card .grow b { font: 700 16px/1.2 var(--f-head); }
.qr-img, .qr-lg { appearance: none; border: 1px solid var(--line); background: #FFFFFF; border-radius: 10px; padding: 3px; flex: none; display: block; }
.qr-img img { width: clamp(96px, calc(16 * var(--vh)), 130px); height: auto; display: block; image-rendering: pixelated; }
.qr-payee { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qr-btns { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.qr-btns .btn { min-height: 34px; padding: 6px 10px; font-size: 13.5px; white-space: nowrap; }
.months { padding: 10px 12px; }
.months .mh { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.mgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.m { appearance: none; border: 0; border-radius: 9px; padding: 6px 0 5px; background: var(--surface-2); color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; }
.m b { font-size: 13px; line-height: 1.1; }
.m i { font-style: normal; font: 800 12px/1 var(--f-body); min-height: 12px; }
.m.paid { background: var(--ok-soft); color: var(--ink); } .m.due { background: var(--warn-soft); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--warn); }
.m.overdue { background: var(--deep); color: #FFFFFF; } .m.verifying { background: var(--info-soft); color: var(--ink); }
.pay-sum { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.pay-sum .grow { display: flex; flex-direction: column; gap: 1px; }
.pay-sum .amt { font: 800 28px/1.05 var(--f-head); font-variant-numeric: tabular-nums; }
.qr-pay { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 12px; }
.qr-pay .grid2 { width: 100%; margin-top: 4px; }
.qr-pay b { font: 700 17px/1.2 var(--f-head); }
.qr-lg img { width: clamp(150px, calc(29 * var(--vh)), 250px); height: auto; display: block; image-rendering: pixelated; }
.qr-sheet { align-items: center; text-align: center; }
.qr-sheet .grid2 { width: 100%; }
.qr-xl { width: min(320px, calc(82 * var(--vw)), calc(52 * var(--vh))); height: auto; display: block; background: #FFFFFF; padding: 6px; border-radius: 12px; border: 1px solid var(--line); image-rendering: pixelated; }
.upi-id { display: flex; align-items: center; gap: 6px; justify-content: center; flex-wrap: wrap; font: 700 15px/1.3 var(--f-body); }
.sum-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
.sum-row:first-child { border-top: 0; }
.sum-row.total { font-weight: 800; font-size: 18px; border-top: 1.5px solid var(--ink); margin-top: 4px; padding-top: 10px; }
.receipt { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 16px; position: relative; overflow: hidden; }
.receipt::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: linear-gradient(90deg, var(--blue) 0 25%, var(--crimson) 25% 50%, var(--yellow) 50% 75%, var(--green) 75%); }
.receipt .rh .logo-full { height: 58px; width: auto; flex: none; }
.receipt .rh { display: flex; gap: 12px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.receipt .rh .nm { font: 400 24px/1 var(--f-name); color: var(--blue); }
.stamp { display: inline-block; border: 2.5px solid var(--green); color: var(--ink); font: 800 15px/1 var(--f-body); letter-spacing: 2px; padding: 7px 12px; border-radius: 8px; transform: rotate(-6deg); text-transform: uppercase; }
.pay-check { gap: 8px; padding: 12px; }

/* notices */
.notice { appearance: none; border: 0; width: 100%; text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 11px 13px; color: var(--ink); }
.notice .nh { display: flex; align-items: center; gap: 8px; }
.notice .nt { font: 700 16px/1.25 var(--f-head); }
.notice .nb { font-size: 14px; color: var(--ink-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notice.pin { box-shadow: inset 4px 0 0 var(--crimson), var(--shadow); }

/* timetable */
.tt-list .fit-items { gap: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; flex: none; }
.tt-li { display: grid; grid-template-columns: 96px 1fr auto; gap: 10px; align-items: center; padding: 9px 14px; border-top: 1px solid var(--line); min-height: 42px; }
.tt-li:first-child { border-top: 0; }
.tt-li .tm { font: 700 13px/1.2 var(--f-body); color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tt-li.now { background: var(--accent-soft); }
.tt-li.brk { background: var(--surface-2); }

/* lunch */
.lunch-note { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; }
.lunch-note .ic { color: var(--green); }
.lunch-note .ic { width: 20px; height: 20px; }
.menu-list .fit-items { gap: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; flex: none; }
.menu-day { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-top: 1px solid var(--line); }
.menu-day:first-child { border-top: 0; }
.menu-day .dd { font: 800 14.5px/1.1 var(--f-head); width: 40px; color: var(--ink-2); flex: none; }
.menu-day.today { background: var(--accent-soft); }
.menu-day.today .dd { color: var(--ink); }
.vm { flex: none; display: inline-grid; place-items: center; width: 14px; height: 14px; border: 2px solid currentColor; border-radius: 2px; vertical-align: -2px; }
.vm::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.vm.veg { color: var(--green); } .vm.nonveg { color: var(--deep); }
.vm.nonveg::after { border-radius: 0; width: 0; height: 0; background: none; border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; border-bottom: 6px solid currentColor; }

/* contact */
.phone-big { font-size: 21px; letter-spacing: .5px; font-variant-numeric: tabular-nums; }

/* bottom tab bar (in the column, under the page) */
.tabs { z-index: 30; background: var(--bar); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); padding: 5px max(6px, env(safe-area-inset-right, 0px)) calc(5px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px)); box-shadow: 0 -4px 18px rgba(0,0,0,.05); }
.tab { appearance: none; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 2px 4px; border-radius: 12px; color: var(--ink-2); font: 600 11.5px/1.1 var(--f-body); min-width: 0; position: relative; }
.tab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tab[aria-current="page"] { color: var(--ink); font-weight: 800; }
.tab[aria-current="page"] .ic { background: var(--blue); color: #FFFFFF; border-radius: 10px; }
.tab .ic { width: 46px; height: 28px; padding: 3px 12px; box-sizing: border-box; }
.tab .pip { position: absolute; top: 2px; left: calc(50% + 10px); min-width: 17px; height: 17px; border-radius: 9px; background: var(--deep); color: #FFFFFF; font: 800 10.5px/17px var(--f-body); padding: 0 4px; font-style: normal; }

/* bottom sheet */
.sheet-back { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease; }
.sheet { width: 100%; max-width: 560px; max-height: calc(92 * var(--dvh)); overflow-y: auto; background: var(--bg); border-radius: 22px 22px 0 0; padding: 8px var(--gr) calc(18px + env(safe-area-inset-bottom, 0px)) var(--gl); animation: up .22s cubic-bezier(.2,.8,.2,1); overscroll-behavior: contain; }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 10px; }
.sheet-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sheet-h h2 { flex: 1; font-size: 20px; }
@keyframes up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet, .sheet-back { animation: none; } }

/* toast */
#toast { position: fixed; z-index: 60; left: 50%; bottom: calc(var(--tabh) + env(safe-area-inset-bottom, 0px) + 14px); transform: translateX(-50%); max-width: min(480px, calc(100% - 32px)); background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: opacity .25s, transform .25s; text-align: center; }
#toast.out { opacity: 0; transform: translate(-50%, 8px); }
#toast[data-kind="bad"] { background: var(--deep); color: #FFFFFF; }

/* welcome (signed out) */
.welcome { flex: 1 1 auto; min-height: 0; overflow-y: auto; background: var(--bg); color: var(--ink); border-top: 4px solid transparent; border-image: linear-gradient(90deg, var(--blue) 0 25%, var(--crimson) 25% 50%, var(--yellow) 50% 75%, var(--green) 75%) 1; padding: calc(env(safe-area-inset-top, 0px) + 20px) var(--gr) calc(env(safe-area-inset-bottom, 0px) + 16px) var(--gl); display: flex; flex-direction: column; gap: 14px; }
.welcome .wordmark .logo-full { height: 84px; }
.welcome .wordmark .nm { font-size: 40px; }
.w-head { display: flex; flex-direction: column; gap: 4px; }
.welcome h1 { font-size: 26px; }
.welcome .lead { font-size: 15.5px; color: var(--ink-2); max-width: 36ch; }
.welcome .card { color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; }

/* sign-in with an SMS code */
.input.otp { font: 700 26px/1.1 var(--f-body); letter-spacing: 10px; text-align: center; font-variant-numeric: tabular-nums; }
.otp-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.welcome .card .lnk { align-self: flex-start; }
.welcome .tiny a { color: inherit; }
/* reCAPTCHA's own badge is hidden; the sign-in card carries the notice Google asks for instead */
.grecaptcha-badge { visibility: hidden !important; }
.w-pub { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: auto; }
.wp { appearance: none; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 12px; padding: 8px 2px 7px; display: flex; flex-direction: column; align-items: center; gap: 4px; font: 600 12px/1.15 var(--f-body); text-decoration: none; min-width: 0; text-align: center; }
.wp span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp .ic { color: var(--blue); }
.wp .dollhouse { width: 30px; height: 30px; margin: -4px 0 -3px; }
.wp.tour { background: var(--t-yellow); border-color: rgba(251,188,5,.7); }
.hl { display: flex; flex-wrap: wrap; gap: 8px; }
.hl span { font: 600 13px/1 var(--f-body); padding: 8px 11px; border-radius: 999px; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.note { display: flex; gap: 10px; align-items: flex-start; background: var(--warn-soft); color: var(--ink); border-radius: 12px; padding: 11px 13px; font-size: 14px; line-height: 1.4; }
.note .ic { color: var(--ink); margin-top: 1px; }
.note.info { background: var(--info-soft); } .note.info .ic { color: var(--blue); }
.note.ok { background: var(--ok-soft); } .note.ok .ic { color: var(--ink); }
.note.bad { background: var(--bad-soft); } .note.bad .ic { color: var(--bad-ink); }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.thumb { width: 100%; max-height: 180px; object-fit: contain; border-radius: 12px; background: var(--surface-2); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14.5px; }
.kv.small { font-size: 13.5px; }
.kv dt { color: var(--ink-2); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.bar-track { height: 8px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.bar-track i { display: block; height: 100%; background: var(--green); border-radius: 6px; transition: width .2s; }

/* one-file build: the virtual tour opens in a layer over the app */
.tour-layer { position: fixed; inset: 0; z-index: 70; background: var(--bg); }
.tour-layer iframe { display: block; width: 100%; height: 100%; border: 0; }
body.tour-open { overflow: hidden; }

/* office set-up screens (these can be longer than the screen and scroll) */
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Roboto Mono", "Noto Sans Mono", monospace; font-size: .94em; letter-spacing: 0; overflow-wrap: anywhere; }
.steps { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 8px; }
.steps li { padding-left: 4px; }
.steps li::marker { font-weight: 800; color: var(--blue); }
textarea.rules-box { font-size: 12px; line-height: 1.45; min-height: 230px; background: var(--surface-2); tab-size: 2; }
.li .tic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--t-blue); color: var(--ink); flex: none; }
.li .tic.ok { background: var(--green); color: #000000; }
.list.flat { box-shadow: none; border: 1px solid var(--line); background: transparent; }
.login-card { background: var(--surface-2); border-color: transparent; }
.login-card .kv { align-items: baseline; }
.login-big { font: 800 21px/1.25 var(--f-body); letter-spacing: .3px; font-variant-numeric: tabular-nums; }
.login-big.mono { font-weight: 700; font-size: 20px; }
.tt-edit { display: grid; grid-template-columns: 1fr 1fr 40px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px; }
.tt-edit .input { min-width: 0; padding: 10px; }
.tt-edit [name=from] { grid-column: 1; grid-row: 1; } .tt-edit [name=to] { grid-column: 2; grid-row: 1; }
.tt-edit select { grid-column: 1 / 3; grid-row: 2; }
.tt-edit [data-del] { grid-column: 3; grid-row: 1 / 3; }
/* wider screens (vp.js: w460 when the page is at least 460 px wide) */
:where(html.w460) .tt-edit { grid-template-columns: 112px 112px 1fr 40px; }
:where(html.w460) .tt-edit select { grid-column: 3; grid-row: 1; }
:where(html.w460) .tt-edit [data-del] { grid-column: 4; grid-row: 1; }
.ibtn.bad { width: auto; padding: 0 12px; background: var(--bad-soft); color: var(--bad-ink); font: 700 14px/1 var(--f-body); }
/* screens without the top bar (first-time setup) keep clear of the iPhone's status bar and camera */
.page.safe-top { padding-top: calc(env(safe-area-inset-top, 0px) + 20px); }


/* ---- 2.3: the Notifications box on Home (yellow), where teachers and the office type or speak a notification ---- */
.nbox { flex: 1 1 auto; min-height: 92px; display: flex; flex-direction: column; background: var(--t-yellow); border: 2px solid var(--yellow); border-radius: 16px; overflow: hidden; }
.nbox.staff { min-height: 104px; }
.nbox-h { flex: none; display: flex; align-items: center; gap: 8px; background: var(--yellow); color: #000000; padding: 5px 10px 5px 8px; min-height: 42px; }
.nbox-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: #000000; color: var(--yellow); flex: none; }
.nbox-ic .ic { width: 18px; height: 18px; }
.nbox-h h2 { font: 700 17px/1.1 var(--f-head); flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nbox-h .lnk { color: #000000; text-decoration-color: #000000; flex: none; font-size: 13.5px; }
.nbox-to { flex: 0 1 auto; min-width: 0; }
.nbox-to select { min-height: 32px; padding: 5px 30px 5px 11px; font-size: 13.5px; background: #FFFFFF; color: #000000; border-color: rgba(0,0,0,.25); max-width: 150px; }
.nbox-to .ic { right: 9px; width: 16px; height: 16px; color: #000000; }
.nbox-to1 { font: 700 13.5px/1 var(--f-body); background: #FFFFFF; color: #000000; border-radius: 999px; padding: 7px 11px; flex: none; white-space: nowrap; }
.nbox-c { flex: none; display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px 0; }
.nbox-in { position: relative; flex: 1 1 auto; min-width: 0; display: block; }
.nbox-in textarea { display: block; width: 100%; resize: none; border: 1.5px solid rgba(0,0,0,.2); background: var(--surface); color: var(--ink); border-radius: 12px; padding: 10px 46px 10px 12px; font: 16px/1.35 var(--f-body); min-height: 44px; max-height: 96px; }
.nbox-in textarea.input { min-height: 84px; }
:root[data-theme="dark"] .nbox-in textarea { border-color: rgba(255,255,255,.25); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nbox-in textarea { border-color: rgba(255,255,255,.25); } }
.nbox-in textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--info-soft); }
.mic { appearance: none; position: absolute; right: 4px; bottom: 4px; width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--blue); color: #FFFFFF; display: grid; place-items: center; padding: 0; }
.mic .ic { width: 20px; height: 20px; }
.mic.on { background: var(--crimson); animation: micPulse 1.2s ease-in-out infinite; }
@keyframes micPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(228,0,43,.45); } 50% { box-shadow: 0 0 0 7px rgba(228,0,43,0); } }
@media (prefers-reduced-motion: reduce) { .mic.on { animation: none; } }
.send { appearance: none; border: 0; flex: none; width: 46px; height: 44px; border-radius: 12px; background: var(--orange); color: #000000; display: grid; place-items: center; padding: 0; }
.send[disabled] { opacity: .5; }
.nbox > .fit { padding: 8px 10px 10px; }
.nbox .fit-items { gap: 6px; }
.nbox .nstrip { box-shadow: none; border: 1px solid rgba(0,0,0,.08); padding: 8px 11px; }
.nstrip .ns-d { color: var(--ink-2); flex: none; white-space: nowrap; }
.nbox-none { padding: 10px 12px 12px; color: var(--ink-2); }

/* ---- 2.3: Results ---- */
.tic-sq { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--orange); color: #000000; flex: none; }
.ms-head { display: flex; align-items: center; gap: 14px; padding: 11px 14px; }
.ms-head .grow { display: flex; flex-direction: column; gap: 2px; }
.ring.ms-ring { width: 64px; height: 64px; background: conic-gradient(var(--orange) calc(var(--p) * 1%), var(--surface-2) 0); }
.ring.ms-ring > div { width: 50px; height: 50px; background: var(--bg); }
.ms-ring b { font: 800 18px/1 var(--f-head); }
.ms-list .fit-items, .ms-table { gap: 0; background: var(--surface); border-radius: var(--radius); border: 1.5px solid var(--line); overflow: hidden; flex: none; display: flex; flex-direction: column; }
.ms-row { display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 8px; border-top: 1px solid var(--line); min-height: 40px; }
.ms-row:first-child { border-top: 0; }
.ms-row .subj { width: 30px; height: 30px; font-size: 10.5px; border-radius: 8px; }
.ms-s { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-m { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; font-size: 15.5px; }
.ms-g { min-width: 38px; text-align: right; }
.ex-head { display: flex; flex-direction: column; gap: 6px; padding: 8px 8px 8px 14px; }
.ex-head .grow { display: flex; flex-direction: column; gap: 1px; }
.sw-row { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 8px 6px 0 0; cursor: pointer; }
.sw-row .grow b { font-size: 15px; }
input.sw { appearance: none; -webkit-appearance: none; flex: none; width: 50px; height: 30px; border-radius: 999px; background: var(--sunk); border: 1.5px solid var(--line); position: relative; margin: 0; cursor: pointer; transition: background .15s; }
input.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 23px; height: 23px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .15s; }
input.sw:checked { background: var(--green); border-color: var(--green); }
input.sw:checked::after { transform: translateX(20px); }
.mk-list .fit-items { gap: 6px; }
.mk-row { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 4px 5px 4px 2px; }
.mk-nm { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
input.mk { width: 62px; min-height: 40px; flex: none; padding: 6px 4px; text-align: center; font: 700 17px/1 var(--f-body); font-variant-numeric: tabular-nums; }
.mk-max { font-size: 13px; color: var(--ink-2); min-width: 30px; flex: none; }
.ab { appearance: none; flex: none; border: 1.5px solid var(--line); background: var(--surface); border-radius: 10px; min-width: 42px; height: 38px; font: 800 13px/1 var(--f-body); color: var(--ink-2); padding: 0 6px; }
.ab.on { background: var(--deep); color: #FFFFFF; border-color: var(--deep); }
fieldset.subj-pick { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
fieldset.subj-pick legend { font: 600 14px/1.2 var(--f-body); color: var(--ink-2); padding: 0; margin-bottom: 8px; }

/* ---- 2.3: the Gallery (three to a row; a square each, without aspect-ratio for older Android WebViews) ---- */
.g-list .fit-items { gap: 6px; }
.g-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.g-tile { appearance: none; border: 0; padding: 0; position: relative; border-radius: 10px; overflow: hidden; background: var(--surface-2); display: block; width: 100%; }
.g-sq { display: block; position: relative; width: 100%; height: 0; padding-bottom: 100%; }
.g-sq img, .g-sq .g-ph { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.g-ph { display: grid; place-items: center; color: var(--ink-3); }
.g-ph .ic { width: 30px; height: 30px; }
.g-play { position: absolute; left: 5px; bottom: 5px; background: rgba(0,0,0,.66); color: #FFFFFF; border-radius: 999px; padding: 3px 8px 3px 4px; display: flex; align-items: center; gap: 2px; font: 700 11.5px/1 var(--f-body); }
.g-play .ic { width: 16px; height: 16px; fill: #FFFFFF; stroke: #FFFFFF; }
.g-play i { font-style: normal; }
.g-view { gap: 10px; }
.g-media { width: 100%; max-height: calc(62 * var(--dvh)); object-fit: contain; background: #000000; border-radius: 12px; display: block; }
.g-meta { gap: 4px; }
.g-prev { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.g-pv { padding-bottom: 100%; height: 0; border-radius: 8px; overflow: hidden; background: var(--surface-2); position: relative; }
.g-pv img, .g-pv .g-ph { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.g-pv .g-play { padding: 2px; left: 3px; bottom: 3px; }
.g-pv.bad { box-shadow: inset 0 0 0 3px var(--deep); }
.btn.has-dh .dollhouse { width: 30px; height: 30px; margin: -6px 0; flex: none; }
.emblem { width: 44px; height: auto; flex: none; display: block; }
.card.row > .emblem { width: 56px; }
b.ink { color: var(--ink); }
.setup-mark { gap: 12px; }
.setup-mark .logo-full { height: 64px; width: auto; }
.setup-mark b { font: 400 28px/1 var(--f-name); color: var(--blue); }
.rules-new { border: 2px solid var(--crimson); }

/* short screens (small phones, or a browser's own bars): everything a little tighter. vp.js sets h700 when the page is at
   most 700 px high and h620 at most 620 px: classes rather than media queries, which would see a browser's wide
   desktop-site layout instead of the phone */
:root:where(.h700) { --gap: 9px; }
:where(html.h700) .page { padding-top: 9px; padding-bottom: 9px; }
:where(html.h700) .home { gap: 8px; }
:where(html.h700) .hero { padding-top: calc(env(safe-area-inset-top, 0px) + 5px); padding-bottom: 8px; }
:where(html.h700) .hello { margin-top: 3px; }
:where(html.h700) .hello b { font-size: 17.5px; }
:where(html.h700) .kids { margin-top: 7px; }
:where(html.h700) .tile { padding: 8px 9px; }
:where(html.h700) .setup-row { padding-top: 4px; padding-bottom: 4px; }
:where(html.h700) .setup-row .grow .small { display: none; }
:where(html.h700) .tile .tic { width: 32px; height: 32px; }
:where(html.h700) .mini { min-height: 42px; padding: 4px 5px 4px 6px; }
:where(html.h700) .mini .ic { width: 26px; height: 26px; padding: 4px; }
:where(html.h700) .mini .dollhouse { width: 32px; height: 32px; }
:where(html.h700) .tile { min-height: 60px; }
:where(html.h700) .wordmark .logo-full { height: 48px; }
:where(html.h700) .wordmark .nm { font-size: 27px; }
:where(html.h700) .nbox-h { min-height: 38px; padding-top: 3px; padding-bottom: 3px; }
:where(html.h700) .card { padding: 12px; }
:where(html.h700) .btn { min-height: 44px; padding: 10px 14px; }
:where(html.h700) .welcome { gap: 10px; padding-top: calc(env(safe-area-inset-top, 0px) + 14px); }
:where(html.h700) .welcome .wordmark .nm { font-size: 34px; }
:where(html.h700) .welcome h1 { font-size: 23px; }
:where(html.h700) .input { min-height: 44px; padding: 9px 12px; }
:where(html.h700) .qr-lg img { width: clamp(140px, calc(26 * var(--vh)), 250px); }
:where(html.h620) .att-sum { padding: 8px 12px; }
:where(html.h620) .ring { width: 48px; height: 48px; }
:where(html.h620) .ring > div { width: 36px; height: 36px; font-size: 13px; }

/* ---- 2.3.1: Fees on Home in two halves: green "Paid (n)" and red "Unpaid (n)"; a half with none in it is pale ---- */
.tile.fsplit { padding: 0; gap: 0; display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; border: 0; background: transparent; }
.tile.fsplit:active { transform: none; }
.fhalf { appearance: none; border: 0; margin: 0; padding: 8px 4px; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; font: 800 16px/1.1 var(--f-head); letter-spacing: .2px; }
.fhalf .fl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fhalf .fn { font-variant-numeric: tabular-nums; }
.fhalf.paid { background: var(--green); color: #000000; border-radius: var(--radius) 0 0 var(--radius); }
.fhalf.unpaid { background: var(--deep); color: #FFFFFF; border-radius: 0 var(--radius) var(--radius) 0; }
.fhalf.zero.paid { background: var(--t-green); color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(52,168,83,.45); }
.fhalf.zero.unpaid { background: var(--t-red); color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(228,0,43,.35); }
.fhalf:active { filter: brightness(.93); }
.tile.fsplit .tpip { top: -7px; right: -6px; background: var(--yellow); color: #000000; box-shadow: 0 0 0 2px var(--bg); }

/* ---- 2.3.1: today's date at the top of Home, beside the language button (a tap opens the calendar) ---- */
.hero-date { appearance: none; border: 1.5px solid var(--line); background: transparent; color: var(--ink); border-radius: 12px; padding: 3px 9px; min-height: 38px; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; text-align: center; }
.hero-date b { font: 700 12.5px/1.15 var(--f-head); white-space: nowrap; }
.hero-date span { font: 600 11.5px/1.2 var(--f-body); color: var(--ink-2); white-space: nowrap; }
.hero-date i { font-style: normal; } .hero-date .ds { display: none; }
/* phones under 400 px wide: "Wed" and "4 Nov"; under 340 px the name beside the logo is a little smaller too */
:where(html:not(.w400)) .hero-date .dl { display: none; }
:where(html:not(.w400)) .hero-date .ds { display: inline; }
:where(html:not(.w340)) .wordmark .logo-full { height: 44px; }
:where(html:not(.w340)) .wordmark .nm { font-size: 24px; }

/* ---- 2.3.1: phones under 340 px wide (old small phones, or a large browser zoom): narrower margins, slightly smaller
   tab labels and a tighter Contact screen, so every screen still fits ---- */
:root:where(:not(.w340)) { --gl: max(12px, env(safe-area-inset-left, 0px)); --gr: max(12px, env(safe-area-inset-right, 0px)); }
:where(html:not(.w340)) .tab { font-size: 10.5px; }
:where(html:not(.w340)) .card { padding: 11px; }
:where(html:not(.w340)) .phone-big { font-size: 19px; }
:where(html:not(.w340)) .tourcard { padding: 6px 12px; }
:where(html:not(.w340)) .tourcard .dollhouse { width: 46px; height: 46px; }
:where(html:not(.w340)) .tourcard b { font-size: 15px; }
:where(html:not(.w340)) .btn { font-size: 14.5px; padding-left: 12px; padding-right: 12px; }
:where(html:not(.w340)) .school-card .emblem { display: none; }
