/* School-B-Doo — Facebook-style design system. Brand color flows through --teal so school themes still work. */
:root {
  --teal: #268291; --teal-dark: #1c6471; --green: #1a7762; --mint: #56bf96; --yellow: #f2d307;
  --bg: #f0f2f5; --card: #ffffff; --ink: #050505; --muted: #65676b; --line: #dddfe2; --soft: #e4e6eb; --hover: #f2f3f5;
  --danger: #c0392b; --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.12);
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #18191a; --card: #242526; --ink: #e4e6eb; --muted: #b0b3b8; --line: #3e4042; --soft: #3a3b3c; --hover: #303031;
    --shadow: 0 1px 2px rgba(0,0,0,.5);
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body { font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--ink); }
#root { min-height: 100vh; position: relative; }
a { color: var(--teal); }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: middle; }
.ic.sm { width: 16px; height: 16px; } .ic.lg { width: 28px; height: 28px; }

/* ---------- header ---------- */
#top {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px;
  padding: calc(8px + var(--safe-t)) 12px 8px; background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.14);
}
#top[hidden], #tabs[hidden], #back[hidden] { display: none; }
#back { background: var(--soft); border: 0; color: var(--ink); width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; flex: none; }
#brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--teal); flex: 1; min-width: 0; }
#brand img { width: 34px; height: 34px; border-radius: 9px; flex: none; }
#top #title { font-weight: 800; font-size: 20px; letter-spacing: -.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--teal); }
.hdr-actions { display: flex; gap: 8px; flex: none; }
.iconbtn { width: 38px; height: 38px; border-radius: 50%; background: var(--soft); color: var(--ink); display: grid; place-items: center; text-decoration: none; overflow: hidden; }
.iconbtn .av { width: 38px; height: 38px; border-radius: 50%; font-size: 16px; }

#app { max-width: 720px; margin: 0 auto; padding: 12px 0 calc(84px + var(--safe-b)); }
#app > *:not(.bleed):not(.sbd-hero) { margin-left: 12px; margin-right: 12px; }
#app > .bleed, #app > .sbd-hero { margin-left: 0; margin-right: 0; }

/* ---------- nav ---------- */
#tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: flex; justify-content: center;
  background: var(--card); border-top: 1px solid var(--line); padding-bottom: var(--safe-b);
}
#tabs a { flex: 1; max-width: 140px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; color: var(--muted); text-decoration: none; position: relative; }
#tabs a b { font-size: 11px; font-weight: 600; }
#tabs a.on { color: var(--teal); }
#tabs a.on::before { content: ""; position: absolute; top: 0; left: 22%; right: 22%; height: 3px; border-radius: 0 0 3px 3px; background: var(--teal); }
@media (min-width: 900px) {
  #tabs { position: fixed; top: 0; bottom: auto; border: 0; background: transparent; pointer-events: none; padding: 0; height: 56px; z-index: 40; }
  #tabs a { pointer-events: auto; max-width: 110px; padding: 10px 0 0; height: 56px; justify-content: center; }
  #tabs a b { display: none; }
  #tabs a.on::before { top: auto; bottom: 0; border-radius: 3px 3px 0 0; left: 14%; right: 14%; }
  #tabs a:hover { background: var(--hover); border-radius: 8px; }
  #top { height: 56px; padding-top: 0; padding-bottom: 0; }
  #app { padding-bottom: 40px; max-width: 760px; }
  #toast { bottom: 30px !important; }
}

/* ---------- generic ---------- */
h1 { font-size: 24px; margin: 4px 0 6px; letter-spacing: -.3px; }
h2 { font-size: 17px; margin: 18px 0 10px; }
h3 { font-size: 16px; margin: 0 0 8px; }
p.sub { color: var(--muted); margin: 0 0 14px; }
.card { background: var(--card); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: 10px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); font-size: 14px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { text-align: center; padding: 28px 12px; color: var(--muted); }
.empty .big { font-size: 40px; }
.spin { text-align: center; color: var(--muted); padding: 30px; }
.spin::before { content: ""; display: block; width: 26px; height: 26px; margin: 0 auto 10px; border: 3px solid var(--soft); border-top-color: var(--teal); border-radius: 50%; animation: sp .8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
[hidden] { display: none !important; }

/* ---------- forms ---------- */
label { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 4px; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 22%, transparent); background: var(--card); }
textarea { min-height: 84px; resize: vertical; }
.hint { color: var(--muted); font-size: 13px; margin-top: 4px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 8px; padding: 10px 16px; font: inherit; font-weight: 600; background: var(--teal); color: var(--on-teal, #fff); cursor: pointer; text-align: center; text-decoration: none; }
.btn.teal { background: var(--teal); color: var(--on-teal, #fff); }
.btn.ghost { background: var(--soft); color: var(--ink); border: 0; }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn.sm { padding: 7px 12px; font-size: 14px; }
.btn.block { display: flex; width: 100%; margin-top: 16px; }
.btn[disabled] { opacity: .55; }
.btn:active { filter: brightness(.94); }
.err { background: #fdecea; color: #8e2b20; border-radius: 8px; padding: 10px 12px; margin-top: 12px; font-size: 14px; }
@media (prefers-color-scheme: dark) { .err { background: #3a1d1a; color: #ffb4a8; } }

/* ---------- auth ---------- */
.auth { text-align: center; padding: 28px 4px 0; max-width: 420px; margin: 0 auto; }
.auth img { width: 96px; height: 96px; border-radius: 24px; box-shadow: 0 6px 22px rgba(0,0,0,.18); }
.auth h1 { margin-top: 12px; font-size: 30px; color: var(--teal); }
.auth form { text-align: left; background: var(--card); border-radius: 12px; padding: 4px 16px 18px; box-shadow: 0 2px 12px rgba(0,0,0,.12); }
.seg { display: flex; background: var(--soft); border-radius: 10px; padding: 3px; margin: 14px 0 4px; }
.seg button { flex: 1; border: 0; background: none; padding: 9px; border-radius: 8px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- avatars / badges ---------- */
.av { width: 48px; height: 48px; border-radius: 12px; flex: none; background: var(--teal); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 20px; overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.round { border-radius: 50%; }
.av.sm { width: 40px; height: 40px; font-size: 16px; }
.av.lg { width: 72px; height: 72px; border-radius: 16px; font-size: 30px; }
.c1 { background: var(--teal); } .c2 { background: var(--green); } .c3 { background: #3a9d7c; } .c4 { background: #b99d05; color: #1b2b2e; } .c5 { background: #5b6fb8; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.badge.ok { background: #d9f2e8; color: #14684f; } .badge.warn { background: #fff3c4; color: #7a6500; }
.badge.admin { background: var(--green); color: #fff; } .badge.staff { background: var(--teal); color: var(--on-teal, #fff); } .badge.alumni { background: #e7e0fa; color: #4a3d8f; }
.badge.bad { background: #c0392b; color: #fff; }
@media (prefers-color-scheme: dark) { .badge.ok { background: #14392f; color: #8be0bf; } .badge.warn { background: #3d3510; color: #f2d307; } .badge.alumni { background: #2d2750; color: #cfc4ff; } }
.vbadge { color: #1877f2; width: 18px; height: 18px; vertical-align: -3px; margin-left: 3px; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 8px; color: inherit; text-decoration: none; }
a.item:hover { background: var(--hover); }
.item .t { font-weight: 600; }
button.item { font: inherit; cursor: pointer; text-align: left; border: 0; width: calc(100% - 24px); }

/* ---------- home ---------- */
.greet { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 12px; text-decoration: none; color: var(--muted); }
.greet .pill { flex: 1; background: var(--bg); border-radius: 999px; padding: 10px 14px; }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 2px 8px; }
.sec-h h2 { margin: 0; } .sec-h a { font-size: 14px; font-weight: 600; text-decoration: none; }
.scards { display: flex; gap: 10px; overflow-x: auto; padding: 2px 12px 8px; margin: 0 -12px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.scards::-webkit-scrollbar { display: none; }
.scard { flex: none; width: 190px; scroll-snap-align: start; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; text-decoration: none; color: inherit; }
.scard .cv { height: 74px; background: linear-gradient(135deg, var(--c1, var(--teal)), var(--c2, var(--green))) center/cover; }
.scard .bd { padding: 0 12px 12px; margin-top: -26px; }
.scard .av { border: 3px solid var(--card); width: 52px; height: 52px; background-color: var(--teal); }
.scard .nm { font-weight: 700; margin-top: 6px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.4em; }

/* ---------- school mini-site ---------- */
.sbd-hero { background: var(--card); box-shadow: var(--shadow); margin-bottom: 12px; }
.sbd-cover { position: relative; height: 150px; background: linear-gradient(120deg, var(--teal), var(--green)) center/cover; }
.sbd-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.28)); pointer-events: none; }
.sbd-cover.pat::before { content: ""; position: absolute; inset: 0; opacity: .16; background: radial-gradient(circle at 20% 30%, #fff 0 2px, transparent 3px) 0 0/26px 26px, radial-gradient(circle at 70% 60%, #fff 0 2px, transparent 3px) 0 0/34px 34px; }
.sbd-ident { position: relative; padding: 0 16px 10px; }
.sbd-logo { position: relative; margin-top: -48px; width: 96px; height: 96px; }
.sbd-logo .av { width: 96px; height: 96px; border-radius: 22px; border: 4px solid var(--card); font-size: 40px; background-color: var(--card); }
.sbd-logo .av img { object-fit: contain; background: #fff; }
.sbd-ident h1 { font-size: 24px; margin: 8px 0 2px; line-height: 1.15; }
.sbd-meta { color: var(--muted); font-size: 14px; }
.sbd-tag { margin: 8px 0 0; font-size: 15px; }
.camfab { position: absolute; right: 10px; bottom: 10px; z-index: 2; background: rgba(255,255,255,.92); color: #050505; border: 0; border-radius: 8px; padding: 7px 11px; font: inherit; font-weight: 600; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.camfab.logo { right: -6px; bottom: -4px; width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 50%; background: var(--soft); box-shadow: none; border: 2px solid var(--card); color: var(--ink); }
.sbd-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.tabsbar { display: flex; gap: 0; background: var(--card); border-top: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; padding: 0 6px; position: sticky; top: calc(54px + var(--safe-t)); z-index: 10; }
.tabsbar::-webkit-scrollbar { display: none; }
.tabsbar a { padding: 13px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; white-space: nowrap; position: relative; border-radius: 8px; }
.tabsbar a.on { color: var(--teal); }
.tabsbar a.on::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--teal); }
@media (min-width: 900px) { .sbd-cover { height: 230px; } .tabsbar { top: 56px; } .sbd-ident { display: grid; grid-template-columns: 96px 1fr; column-gap: 16px; } .sbd-ident > *:not(.sbd-logo) { grid-column: 2; } .sbd-logo { grid-row: 1 / span 4; } }

.fact { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; }
.fact .ic { color: var(--muted); margin-top: 1px; }
.fact b { font-weight: 600; } .fact .muted { display: block; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.facts .f { background: var(--bg); border-radius: 8px; padding: 10px 12px; }
.facts .f span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.facts .f b { font-size: 16px; }
.leader { display: flex; gap: 12px; align-items: center; }
.social { display: flex; gap: 8px; flex-wrap: wrap; }
.social a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--soft); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.social a:hover { background: var(--line); }
.aboutp { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 6px; scrollbar-width: none; }
.chip { flex: none; padding: 6px 14px; border-radius: 999px; border: 0; background: var(--soft); font-weight: 600; font-size: 14px; color: var(--ink); text-decoration: none; }
.chip.on { background: var(--teal); color: var(--on-teal, #fff); }
.tagchip { display: inline-block; padding: 5px 12px; border-radius: 999px; background: color-mix(in srgb, var(--teal) 14%, var(--card)); color: var(--teal-dark); font-weight: 600; font-size: 14px; margin: 0 6px 6px 0; }
@media (prefers-color-scheme: dark) { .tagchip { color: var(--ink); } }

/* ---------- posts ---------- */
.post { padding: 12px 0 0; }
.post .head, .post .body, .post .cmbox { padding-left: 16px; padding-right: 16px; }
.post .head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.post .body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 4px 0 10px; font-size: 16px; }
.post img.pic { width: 100%; display: block; margin: 0 0 6px; max-height: 520px; object-fit: cover; }
.post .counts { display: flex; justify-content: space-between; padding: 6px 16px; color: var(--muted); font-size: 14px; }
.post .acts { display: flex; margin: 0 8px; border-top: 1px solid var(--line); padding: 2px 0; }
.act { flex: 1; background: none; border: 0; font: inherit; color: var(--muted); font-weight: 600; padding: 9px 6px; border-radius: 6px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; justify-content: center; }
.act:hover { background: var(--hover); }
.act.on { color: var(--teal); }
.act.on .ic { fill: currentColor; fill-opacity: .18; }
.tag { color: var(--muted); font-weight: 400; font-size: 14px; text-decoration: none; }
.tag b { color: var(--ink); }
.cmbox { border-top: 1px solid var(--line); padding-top: 8px; padding-bottom: 12px; }
.cm { display: flex; gap: 8px; padding: 4px 0; font-size: 14px; }
.cm .bub { background: var(--soft); border-radius: 16px; padding: 7px 12px; }
.cm b { font-weight: 600; display: block; }
.cmform { display: flex; gap: 8px; margin-top: 8px; }
.cmform input { padding: 9px 14px; border-radius: 999px; }
.composer { padding: 12px 14px; }
.composer .top { display: flex; gap: 10px; align-items: flex-start; }
.composer textarea { min-height: 56px; border: 0; background: var(--bg); border-radius: 18px; padding: 10px 14px; }
.composer .row { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.composer select { padding: 8px 10px; }

/* ---------- profile ---------- */
.pf-cover { position: relative; height: 160px; background: linear-gradient(120deg, var(--teal), var(--green)) center/cover; }
.pf-cover.s0 { --a: #268291; --b: #1a7762; } .pf-cover.s1 { --a: #5b6fb8; --b: #8e5bb8; } .pf-cover.s2 { --a: #f2994a; --b: #eb5757; }
.pf-cover.s3 { --a: #2d9cdb; --b: #56ccf2; } .pf-cover.s4 { --a: #27ae60; --b: #bada55; } .pf-cover.s5 { --a: #eb5757; --b: #9b51e0; }
.pf-cover.s6 { --a: #232526; --b: #607d8b; } .pf-cover.s7 { --a: #f2c94c; --b: #f2994a; }
.pf-cover[class*=" s"] { background-image: linear-gradient(120deg, var(--a), var(--b)); }
.pf-cover.img { background-size: cover; background-position: center; }
.pf-head { background: var(--card); padding: 0 16px 14px; box-shadow: var(--shadow); text-align: center; margin-bottom: 12px; }
.pf-av { position: relative; display: inline-block; margin-top: -64px; }
.pf-av .av { width: 128px; height: 128px; border-radius: 50%; border: 4px solid var(--card); font-size: 54px; }
.pf-av .camfab.logo { right: 2px; bottom: 6px; }
.pf-head h1 { margin: 6px 0 0; font-size: 26px; }
.pf-head .hl { margin: 2px 0 0; color: var(--muted); }
.pf-head .btns { display: flex; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.pf-intro { text-align: left; }
.pf-intro .fact { padding: 6px 0; }
.sw-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.sw-row button { width: 54px; height: 34px; border-radius: 8px; border: 3px solid transparent; cursor: pointer; background: linear-gradient(120deg, var(--a), var(--b)); }
.sw-row button.on { border-color: var(--ink); }
.sw-row .s0 { --a: #268291; --b: #1a7762; } .sw-row .s1 { --a: #5b6fb8; --b: #8e5bb8; } .sw-row .s2 { --a: #f2994a; --b: #eb5757; } .sw-row .s3 { --a: #2d9cdb; --b: #56ccf2; }
.sw-row .s4 { --a: #27ae60; --b: #bada55; } .sw-row .s5 { --a: #eb5757; --b: #9b51e0; } .sw-row .s6 { --a: #232526; --b: #607d8b; } .sw-row .s7 { --a: #f2c94c; --b: #f2994a; }
.sch-row { display: flex; gap: 10px; align-items: center; padding: 6px 0; text-decoration: none; color: inherit; }
.setlist .item { margin-bottom: 6px; }

/* ---------- join code box ---------- */
.code { font: 800 26px/1 ui-monospace, Menlo, monospace; letter-spacing: 4px; background: var(--bg); border: 2px dashed var(--teal); border-radius: 12px; padding: 14px; text-align: center; }

/* ---------- toast ---------- */
#toast { position: fixed; left: 50%; bottom: calc(86px + var(--safe-b)); transform: translate(-50%, 20px); background: #242526; color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; z-index: 60; max-width: 90%; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- school communication features ---------- */
.banner { display: flex; gap: 8px; align-items: center; background: #c0392b; color: #fff; text-decoration: none; font-weight: 600; padding: 10px 14px; border-radius: var(--radius); margin-bottom: 12px; }
.banner span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.notice { border-left: 4px solid var(--teal); }
.notice.urgent { border-left-color: #c0392b; }
.notice .rm, .event .rm { margin-left: auto; font-size: 16px; padding: 2px 8px; }
.datebox { flex: none; width: 52px; border-radius: 10px; background: var(--teal); color: var(--on-teal, #fff); text-align: center; padding: 6px 0; line-height: 1.1; }
.datebox b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.datebox span { font-size: 22px; font-weight: 800; }
.event .t { font-weight: 700; }
label.sw { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 500; margin: 10px 0; }
input[type=checkbox] { width: 24px; height: 24px; padding: 0; accent-color: var(--teal); flex: none; }
.chip.rs { cursor: pointer; font: inherit; font-weight: 600; font-size: 14px; }
.chip input[type=radio] { width: auto; margin: 0 6px 0 0; display: inline-block; }
.rdbox, .rbox { overflow-wrap: anywhere; }
.swatch { display: flex; align-items: center; gap: 10px; }
.swatch input[type=color] { width: 56px; height: 44px; padding: 2px; border-radius: 8px; flex: none; }
.legal h1 { margin: 6px 0 8px; } .legal h2 { margin: 18px 0 6px; font-size: 17px; } .legal ul { padding-left: 20px; } .legal li { margin-bottom: 6px; }

/* ---------- alumni / business / back offices ---------- */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { margin: 0; text-align: center; padding: 14px 8px; }
.stat b { display: block; font-size: 24px; }
.stat span { color: var(--muted); font-size: 13px; font-weight: 600; }

/* ---------- small additions ---------- */
#top.sub #brand img { display: none; }
.sbd-gap { height: 12px; }
.tabsbar.bleed { margin-bottom: 12px; }
@media (min-width: 900px) { #top { justify-content: space-between; } #brand { flex: none; } .hdr-actions { margin-left: auto; } }
#app > .btn.block { width: calc(100% - 24px); }

/* ---- batch 1 extras ---- */
.iconbtn { position: relative; }
.iconbtn .dot { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #e53935; color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--card); box-sizing: border-box; }
.iconbtn .dot[hidden] { display: none; }
.mention { color: var(--teal); font-weight: 700; }
.act .rxe { font-size: 17px; line-height: 1; }
.post .acts { position: relative; }
.act.tr { text-decoration: none; }
.rxpop { position: absolute; left: 8px; bottom: 100%; background: var(--card); border-radius: 999px; box-shadow: 0 4px 18px rgba(0,0,0,.25); padding: 4px 6px; display: flex; gap: 2px; z-index: 30; animation: rxin .12s ease-out; }
.rxpop button { border: 0; background: none; font-size: 28px; line-height: 1; padding: 4px 6px; border-radius: 50%; transition: transform .1s; }
.rxpop button:active, .rxpop button:hover { transform: scale(1.3); }
@keyframes rxin { from { opacity: 0; transform: translateY(6px) scale(.9); } }
.poll { padding: 4px 14px 8px; }
.poll .pop { position: relative; display: flex; justify-content: space-between; align-items: center; width: 100%; margin: 6px 0; padding: 11px 14px; border: 1.5px solid var(--line, #d0d4d9); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; text-align: left; overflow: hidden; }
.poll .pop i { position: absolute; left: 0; top: 0; bottom: 0; background: color-mix(in srgb, var(--teal) 22%, transparent); z-index: 0; transition: width .3s; }
.poll .pop .pl, .poll .pop b { position: relative; z-index: 1; }
.poll .pop.mine { border-color: var(--teal); font-weight: 700; }
.composer .tools { margin: 8px 0 0; gap: 8px; }
.composer .tools .chip { display: inline-flex; align-items: center; gap: 6px; }
.composer .tools .chip.on { background: var(--teal); color: #fff; }
#cpoll { padding: 4px 0; } #cpoll input { margin: 4px 0; }
.composer .pv { position: relative; margin-top: 8px; } .composer .pv img { width: 100%; max-height: 300px; object-fit: cover; border-radius: 12px; display: block; }
.composer .pv .x { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 16px; }
.item.nf.unread { background: color-mix(in srgb, var(--teal) 10%, var(--card)); }
.ellipsis2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qrbox { background: #fff; border-radius: 12px; padding: 10px; width: 210px; max-width: 100%; margin: 10px auto; } .qrbox svg { width: 100%; height: auto; display: block; }

/* ---- batch 2 ---- */
.rpbtn { border: 0; background: none; color: var(--muted, #8a8d91); padding: 4px 8px; margin-left: auto; }
.linkbtn { border: 0; background: none; color: var(--teal); font: inherit; font-size: 12px; padding: 0 4px; }
.tier { padding: 6px 12px; border-radius: 999px; font-weight: 800; background: var(--soft); white-space: nowrap; } .tier.gold { background: #ffe58a; color: #5a4300; } .tier.silver { background: #e3e6ea; color: #333; } .tier.bronze { background: #f4d1b0; color: #5b3410; }
.bar { height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; margin: 8px 0 4px; flex: 1; } .bar i { display: block; height: 100%; background: var(--teal); border-radius: 4px; }
.rv { display: flex; align-items: center; gap: 10px; margin: 6px 0; } .rv span { width: 96px; font-size: 14px; flex: none; } .rv b { width: 38px; text-align: right; }
.card.spot { background: linear-gradient(135deg, color-mix(in srgb, var(--teal) 18%, var(--card)), var(--card)); border-color: var(--teal); }
.shout b { font-weight: 700; }
.game .score { font-size: 26px; font-weight: 800; text-align: right; } .game .score small { display: block; font-size: 12px; } .game .score.w { color: #1b8a3a; } .game .score.l { color: #c62828; }
.chat { display: flex; flex-direction: column; height: calc(100dvh - 150px); }
.chat .msgs { flex: 1; overflow-y: auto; padding: 6px 2px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 82%; align-self: flex-start; } .msg.me { align-self: flex-end; text-align: right; } .msg > b { font-size: 12px; display: block; margin-left: 10px; }
.bub2 { display: inline-block; background: var(--soft); padding: 8px 13px; border-radius: 18px; text-align: left; word-break: break-word; } .msg.me .bub2 { background: var(--teal); color: #fff; }
.msg .muted { font-size: 11px; display: block; margin: 2px 8px; } .msg .rpbtn { padding: 0; margin: 0 0 0 4px; vertical-align: middle; }
.cform { display: flex; gap: 8px; padding-top: 8px; } .cform input { flex: 1; }
.mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.mcard { background: var(--card); border-radius: 14px; overflow: hidden; text-decoration: none; color: inherit; box-shadow: 0 1px 2px rgba(0,0,0,.08); } .mcard img, .mcard .ph { width: 100%; aspect-ratio: 1; object-fit: cover; display: grid; place-items: center; background: var(--soft); } .mcard .mb { padding: 8px 10px 10px; } .mcard.sold { opacity: .55; }
.mprev { width: 120px; border-radius: 10px; margin: 6px 0; display: block; }
.rep { border-top: 1px solid var(--line, #e4e6eb); padding: 10px 0; }

/* ---- Batch 3: fundraising, careers, parents ---- */
.bar{height:10px;border-radius:6px;background:var(--line,#e4e6eb);overflow:hidden;margin:10px 0 6px}
.bar>i{display:block;height:100%;background:linear-gradient(90deg,var(--brand,#1877f2),var(--accent,#42b72a));border-radius:6px;min-width:2px}
.seg{display:flex;gap:6px;margin:0 0 12px;background:var(--line,#e4e6eb);padding:4px;border-radius:12px}
.seg a{flex:1;text-align:center;padding:8px 10px;border-radius:9px;font-weight:600;color:inherit;text-decoration:none;font-size:14px}
.seg a.on{background:var(--card,#fff);box-shadow:0 1px 2px rgba(0,0,0,.15)}
.fund .fa{max-width:120px}

/* batch 4: deals, redeem overlay, dashboard */
.ovl { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; }
.ovlbox { background: var(--card, #fff); color: inherit; border-radius: 18px; padding: 18px; width: 100%; max-width: 340px; text-align: center; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.ovlbox .code { letter-spacing: 4px; font-weight: 800; margin: 4px 0; }
.gb { background: rgba(46,160,67,.12); border-radius: 10px; padding: 8px 10px; margin-top: 8px; font-size: 13px; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 54px; margin: 6px 0; }
.spark i { flex: 1; background: var(--teal, #0aa6a6); border-radius: 3px 3px 0 0; min-height: 4px; opacity: .85; }
.deal .badge { white-space: nowrap; }

.yak { display: flex; gap: 10px; align-items: flex-start; }
.yv { display: flex; flex-direction: column; align-items: center; min-width: 34px; }
.yb { border: 0; background: none; color: var(--muted, #888); font-size: 16px; line-height: 1.1; padding: 4px 6px; cursor: pointer; border-radius: 6px; }
.yb.on.up { color: var(--teal); } .yb.on.dn { color: #c0392b; }
.yc { flex: 1; min-width: 0; } .yt { word-wrap: break-word; margin-top: 2px; }
.yl { font-size: 13px; color: var(--muted, #666); text-decoration: none; }
.linkbtn { border: 0; background: none; color: var(--muted, #666); font-size: 13px; padding: 0; cursor: pointer; }
.yform textarea { width: 100%; box-sizing: border-box; }


/* ---------- Premium polish layer (Batch 7): type, radii, depth. School themes still flow through --teal. ---------- */
:root {
  --disp: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --bg: #f4f7f5; --line: #e1e9e7; --soft: #e8eeec; --hover: #eef3f1;
  --radius: 20px; --shadow: 0 1px 2px rgba(10,48,57,.06), 0 0 0 1px rgba(10,48,57,.05);
  --lift: 0 18px 40px -18px rgba(10,48,57,.35);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #0b1c20; --card: #12282d; --line: #234148; --soft: #1d3a41; --hover: #183238; --shadow: 0 0 0 1px rgba(255,255,255,.06); } }
body { font-family: Figtree, "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
h1, h2, h3, #top #title, .sbd-hero h1, .sbd-hero h2 { font-family: var(--disp); letter-spacing: -.02em; }
h1 { font-weight: 800; } h2, h3 { font-weight: 700; }
#top { background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); box-shadow: 0 1px 0 var(--line); }
#top #title { font-weight: 800; font-size: 21px; letter-spacing: -.03em; }
#brand img { border-radius: 11px; }
.iconbtn, #back { background: var(--soft); transition: transform .12s, background .15s; } .iconbtn:active, #back:active { transform: scale(.94); }
.card { border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; box-shadow: var(--shadow); }
.card h3 { font-size: 19px; }
.btn { border-radius: 14px; padding: 12px 20px; font-weight: 700; transition: transform .12s, filter .15s; }
.btn:active { transform: scale(.98); }
.btn.sm { border-radius: 12px; padding: 8px 14px; }
.btn.teal, .btn:not(.ghost):not(.danger) { box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--teal) 80%, #000); }
.btn.ghost { box-shadow: none; }
.av { border-radius: 16px; font-family: var(--disp); font-weight: 800; } .av.round { border-radius: 50%; } .av.lg { border-radius: 22px; }
.chip { padding: 8px 16px; font-weight: 700; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.chip.on { box-shadow: none; }
.post { border-radius: var(--radius); overflow: hidden; }
input:not([type=checkbox]):not([type=radio]), select, textarea { border-radius: 14px; }
.sbd-hero { border-radius: 0 0 28px 28px; overflow: hidden; box-shadow: var(--lift); margin-bottom: 18px; }
.sbd-hero h1, .sbd-hero h2 { font-weight: 800; letter-spacing: -.03em; }

/* floating tab bar on phones */
@media (max-width: 899px) {
  #tabs { left: 12px; right: 12px; bottom: calc(10px + var(--safe-b)); border: 0; border-radius: 26px; padding-bottom: 0; background: color-mix(in srgb, var(--card) 90%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); box-shadow: 0 18px 40px -12px rgba(10,48,57,.45), 0 0 0 1px var(--line); }
  #tabs a { padding: 10px 0 9px; border-radius: 22px; }
  #tabs a.on::before { top: 0; left: 30%; right: 30%; height: 3px; }
  #app { padding-bottom: calc(110px + var(--safe-b)); }
}
#toast { border-radius: 16px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- clips ---------- */
.clipgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 12px 12px 0; }
@media (min-width: 700px) { .clipgrid { grid-template-columns: repeat(3, 1fr); } }
.clipcard { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.clipthumb { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 9 / 12; border: 0; padding: 0; cursor: pointer; background: #0a3039 center / cover no-repeat; color: #fff; }
.clipthumb span { width: 52px; height: 52px; border-radius: 50%; background: rgba(10,48,57,.55); backdrop-filter: blur(6px); display: grid; place-items: center; font-size: 20px; padding-left: 3px; }
.clipthumb i { position: absolute; right: 8px; bottom: 8px; font-style: normal; font-size: 12px; font-weight: 700; background: rgba(0,0,0,.6); border-radius: 8px; padding: 2px 7px; }
.clipthumb.ph { cursor: default; } .clipthumb.ph.st span { width: auto; height: auto; border-radius: 12px; padding: 6px 12px; font-size: 13px; font-weight: 700; background: rgba(255,255,255,.14); }
.clipmeta { padding: 10px 12px 12px; } .clipmeta b { display: block; line-height: 1.25; }
.clipmodal { position: fixed; inset: 0; z-index: 100; background: rgba(6,28,34,.82); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
.clipbox { width: min(420px, 100%); max-height: 100%; overflow: auto; background: var(--card); border-radius: 26px; position: relative; }
.clipvid { aspect-ratio: 9 / 14; background: #000; border-radius: 26px 26px 0 0; overflow: hidden; } .clipvid iframe { width: 100%; height: 100%; border: 0; display: block; }
.clipx { position: absolute; top: 10px; right: 10px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.clipinfo { padding: 12px 16px 0; } .clipacts { padding: 10px 16px 16px; }

/* live streams */
.badge.livebadge { background: #d6342b; color: #fff; }
.livecard { display: block; text-decoration: none; color: inherit; }
.livet { display: block; margin: 4px 0 0; }
.livevid { position: relative; aspect-ratio: 16 / 9; background: #000; margin: 0 -16px; overflow: hidden; }
.livevid iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.livevid.ph { display: grid; place-items: center; color: #cfeee6; padding: 20px; text-align: center; }
.livehead { padding: 12px 0 4px; }
.livehead h2 { margin: 6px 0 2px; }
.rbar { display: flex; gap: 8px; justify-content: space-between; margin: 10px 0; }
.rbtn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; border-radius: 14px; border: 1px solid var(--line, #d7e3df); background: var(--card, #fff); font-size: 24px; line-height: 1; touch-action: manipulation; }
.rbtn span { font-size: 12px; color: var(--muted); font-weight: 700; }
.rbtn:active { transform: scale(.94); }
.rfloat { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.rfloat span { position: absolute; bottom: 8px; font-size: 28px; animation: rfl 2.2s ease-out forwards; }
@keyframes rfl { to { transform: translateY(-190px); opacity: 0; } }
.livepre { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; margin-bottom: 8px; }
@media (prefers-reduced-motion: reduce) { .rfloat span { animation-duration: .01s; } }

.auth .forgot{text-align:center;margin:10px 0 0;font-size:14px}
.auth .forgot a{color:var(--teal-dark);font-weight:600}

/* accessibility */
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 6px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--teal); color: var(--on-teal, #fff); padding: 10px 14px; border-radius: 8px; z-index: 1000; }
.skip:focus { left: 8px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* =====================================================================
   v2: "night" scheme: the opening page's look carried through every screen.
   Night teal surfaces, big Bricolage headings, sun-yellow accents, roomy white cards.
   ===================================================================== */
:root {
  --night: #0a3039; --deep: #0f4450; --sun: #f0d60a; --mint: #cfeee6; --leaf: #1c7f5d;
  --paper: #f5f8f6; --bg: #f5f8f6; --ink: #0d2a31; --muted: #56696e; --line: #dde8e6;
  --radius: 22px; --shadow: 0 1px 2px rgba(10,48,57,.05), 0 8px 24px -16px rgba(10,48,57,.28);
  --cta: var(--night); --on-cta: #fff;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #071c22; --card: #0f2b32; --ink: #e8f2f0; --muted: #9db4b8; --line: #1f4650; --soft: #1b3d45; --hover: #163840; --cta: var(--sun); --on-cta: #0a3039; --shadow: 0 0 0 1px rgba(255,255,255,.06); } }
body { background: var(--bg); color: var(--ink); }
h1, h2, h3 { font-weight: 800; letter-spacing: -.025em; }
h1 { font-size: 30px; line-height: 1.05; }
h2 { font-size: 21px; }

/* header: night bar, like the opening page */
#top { background: linear-gradient(120deg, var(--night), var(--deep)); color: #fff; box-shadow: 0 10px 28px -18px rgba(10,48,57,.8); backdrop-filter: none; -webkit-backdrop-filter: none; }
#top #title, #brand { color: #fff; }
#top #title { font-size: 22px; font-weight: 800; letter-spacing: -.035em; }
#brand img { border-radius: 10px; box-shadow: 0 0 0 2px rgba(255,255,255,.18); }
#top .iconbtn, #top #back { background: rgba(255,255,255,.12); color: #fff; }
#top .iconbtn:hover, #top #back:hover { background: rgba(255,255,255,.2); }
#bellDot, .dot { background: var(--sun) !important; }

/* buttons */
.btn, .btn.teal, .btn:not(.ghost):not(.danger) { background: var(--cta); color: var(--on-cta); box-shadow: 0 12px 24px -14px rgba(10,48,57,.65); }
.btn.sun { background: var(--sun); color: var(--night); box-shadow: 0 12px 24px -14px rgba(120,100,0,.7); }
.btn.ghost { background: color-mix(in srgb, var(--night) 8%, var(--card)); color: var(--ink); box-shadow: none; }
.btn.danger { background: transparent; color: var(--danger); box-shadow: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.ghost { background: var(--soft); } }
.chip { background: var(--card); color: var(--ink); }
.chip.on { background: var(--night); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip.on { background: var(--sun); color: var(--night); } }
.badge.admin { background: var(--night); color: var(--sun); } .badge.staff { background: var(--deep); color: #fff; }
.datebox { background: var(--night); color: #fff; } .datebox b { color: var(--sun); }
.notice { border-left-color: var(--sun); }
input:not([type=checkbox]):not([type=radio]), select, textarea { background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 13px 14px; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); }
label { font-weight: 700; font-size: 14px; }

/* cards, rows, section headers */
.card, .item, .scard, .post, .clipcard { border-radius: var(--radius); box-shadow: var(--shadow); }
.item { padding: 14px 16px; }
a.item:hover { background: var(--card); transform: translateY(-1px); }
.sec-h { margin: 22px 2px 10px; } .sec-h h2 { font-size: 22px; } .sec-h a { color: var(--leaf); }
.greet { border-radius: 999px; padding: 10px 14px; } .greet .pill { background: var(--paper); }
.scard .cv { height: 88px; background: linear-gradient(135deg, var(--c1, var(--deep)), var(--c2, var(--night))) center/cover; }
.empty .big { font-size: 44px; }

/* school page */
.sbd-hero { background: var(--card); border-radius: 0 0 32px 32px; }
.sbd-cover { background: linear-gradient(135deg, var(--deep), var(--night)) center/cover; height: 168px; }
.sbd-cover::after { background: linear-gradient(180deg, rgba(10,48,57,0) 40%, rgba(10,48,57,.55)); }
.tabsbar { background: transparent; border: 0; padding: 4px 12px 10px; gap: 6px; top: calc(56px + var(--safe-t)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); background: color-mix(in srgb, var(--bg) 88%, transparent); }
.tabsbar a { padding: 9px 16px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font-weight: 700; font-size: 14.5px; }
.tabsbar a.on { background: var(--night); color: #fff; box-shadow: none; }
.tabsbar a.on::after { display: none; }
.tabsbar .more { background: var(--sun); color: var(--night); box-shadow: none; cursor: pointer; border: 0; font: inherit; font-weight: 800; font-size: 14.5px; padding: 9px 16px; border-radius: 999px; white-space: nowrap; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabsbar a.on { background: var(--sun); color: var(--night); } }

/* bottom navigation: night pill, sun-yellow active */
@media (max-width: 899px) {
  #tabs { background: linear-gradient(120deg, var(--night), var(--deep)); box-shadow: 0 20px 40px -14px rgba(10,48,57,.7); backdrop-filter: none; -webkit-backdrop-filter: none; }
  #tabs a { color: rgba(255,255,255,.62); }
  #tabs a.on { color: var(--sun); background: rgba(255,255,255,.08); }
  #tabs a.on::before { background: var(--sun); }
}
#tabs a b { font-family: var(--disp); font-weight: 700; letter-spacing: .01em; }
@media (min-width: 900px) { #tabs a { color: rgba(255,255,255,.7); } #tabs a.on { color: var(--sun); } #tabs a.on::before { background: var(--sun); } #tabs a:hover { background: rgba(255,255,255,.1); } }

/* opening / sign-in: the hero from the landing page */
body.bare { background: radial-gradient(120% 70% at 85% 0%, #3e5a14 0%, transparent 45%), linear-gradient(160deg, var(--night) 0%, var(--deep) 55%, #0f5360 100%) fixed; }
body.bare #app { padding-top: 0; max-width: 460px; }
.auth { text-align: left; padding: calc(34px + var(--safe-t)) 6px 40px; max-width: 460px; }
.auth img { width: 62px; height: 62px; border-radius: 18px; box-shadow: 0 0 0 3px rgba(255,255,255,.16); }
.auth h1 { color: #fff; font-size: clamp(40px, 12vw, 58px); line-height: .98; letter-spacing: -.04em; margin: 22px 0 12px; }
.auth .sub { color: var(--mint); font-size: 18px; margin: 0 0 22px; line-height: 1.4; }
.auth .seg { background: rgba(255,255,255,.12); border-radius: 999px; padding: 4px; }
.auth .seg button { color: rgba(255,255,255,.8); border-radius: 999px; padding: 11px; }
.auth .seg button.on { background: var(--sun); color: var(--night); box-shadow: none; }
.auth form { border-radius: 26px; padding: 8px 20px 22px; box-shadow: 0 30px 60px -28px rgba(0,0,0,.6); color: var(--ink); }
.auth form .btn { background: var(--sun); color: var(--night); }
.auth .forgot a, .auth form a { color: var(--deep); }
.auth .perks { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.auth .perks li { background: rgba(255,255,255,.1); color: #fff; border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 14px; }
body.bare #toast { background: var(--sun); color: var(--night); }

/* role hub on Home */
.hubhead { position: relative; overflow: hidden; border-radius: 28px; padding: 22px 22px 20px; margin-bottom: 14px; color: #fff; background: radial-gradient(90% 120% at 100% 0%, rgba(240,214,10,.28), transparent 55%), linear-gradient(135deg, var(--night), var(--deep)); box-shadow: 0 24px 40px -26px rgba(10,48,57,.9); }
.hubhead small { display: block; color: var(--mint); font-weight: 600; font-size: 14px; }
.hubhead h1 { color: #fff; font-size: 32px; margin: 4px 0 4px; }
.hubhead p { margin: 0; color: rgba(255,255,255,.78); font-size: 15px; }
.who { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.who button { border: 0; font: inherit; font-weight: 700; font-size: 14px; border-radius: 999px; padding: 8px 14px; cursor: pointer; background: rgba(255,255,255,.14); color: #fff; }
.who button.on { background: var(--sun); color: var(--night); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile { display: flex; flex-direction: column; gap: 10px; padding: 16px 16px 14px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); min-height: 112px; position: relative; transition: transform .12s; }
.tile:active { transform: scale(.98); }
.tile .ti { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: var(--mint); }
.tile:nth-child(3n+2) .ti { background: #fbf1a6; } .tile:nth-child(3n) .ti { background: #d9e6ff; }
.tile b { font-family: var(--disp); font-size: 17px; letter-spacing: -.02em; line-height: 1.1; }
.tile span { color: var(--muted); font-size: 13px; line-height: 1.25; }
.tile.hot { background: var(--night); color: #fff; } .tile.hot span { color: var(--mint); } .tile.hot .ti { background: var(--sun); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tile .ti { background: #1d4a55; } }

/* "More" sheet for school tabs */
.sheet { position: fixed; inset: 0; z-index: 90; background: rgba(6,28,34,.6); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; }
.sheet .box { width: min(560px, 100%); background: var(--bg); border-radius: 28px 28px 0 0; padding: 18px 16px calc(22px + var(--safe-b)); max-height: 82vh; overflow: auto; }
.sheet h3 { font-size: 22px; margin: 0 4px 12px; }
.sheet .tiles { grid-template-columns: repeat(3, 1fr); }
.sheet .tile { min-height: 0; padding: 12px; align-items: flex-start; } .sheet .tile b { font-size: 15px; }
.sheet .tile .ti { width: 38px; height: 38px; font-size: 19px; }
#app > input, #app > select, #app > textarea { width: calc(100% - 24px); }
#app > label { margin-top: 14px; }
.pf-cover { background: linear-gradient(135deg, var(--deep), var(--night)) center/cover; }
.auth form .btn:not(.ghost):not(.danger) { background: var(--sun); color: var(--night); box-shadow: 0 14px 26px -14px rgba(0,0,0,.6); }
html:has(body.bare) { background: var(--night); }
.sbd-logo .av { background-color: var(--night); color: var(--sun); }

/* official vs alumni site */
.sitetag { display: inline-block; font-family: var(--disp); font-weight: 800; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; background: var(--night); color: #fff; }
.sitetag.alum { background: var(--sun); color: var(--night); }
.sitebar { display: flex; justify-content: space-between; align-items: center; margin: 0 14px 10px !important; }
.sitebar a { font-weight: 700; color: var(--leaf); text-decoration: none; }
.hero .sitetag { margin-bottom: 8px; }

.sitebar .btn { min-height: 0; padding: 6px 14px; }
