:root {
  --bg: #0a0a0b; --panel: #141416; --panel2: #1b1b1e; --line: #2a2a2e;
  --text: #f4f4f5; --muted: #9a9aa2; --good: #3ddc84; --mid: #f5b73b; --bad: #ff4d5a;
  /* The accent follows the school being viewed. core.js (applyTheme) overwrites these from data/schools.json. */
  --red: #e8b014; --red2: #7fb3ea; --redglow: rgba(232,176,20,.35); --accent-rgb: 232,176,20; --accent2-rgb: 127,179,234;
  --on-accent: #111; --tint: #2b2310; --tint-text: #f6dc8c; --tint-line: #4a3b14; --school2: #1f5fa8; --second-rgb: 31,95,168; --glow-rgb: 31,95,168; --glow2-rgb: 31,95,168;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: radial-gradient(900px 460px at 12% -160px, rgba(var(--glow-rgb),.2), transparent 70%), radial-gradient(900px 460px at 88% -160px, rgba(var(--glow2-rgb),.14), transparent 70%), var(--bg);
  color: var(--text); font-family: Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.top { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); background: rgba(10,10,11,.8); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 20px; letter-spacing: -.02em; }
.brand b { color: var(--red2); font-weight: 900; }
.logo { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--red); box-shadow: 0 0 20px var(--redglow); font-size: 16px; }

.btn { border: 1px solid var(--line); background: var(--panel2); padding: 10px 18px; border-radius: 10px; font-weight: 600; font-size: 14px; transition: .15s; }
.btn:hover { border-color: #444; background: #232327; }
.btn.primary { background: var(--red); border-color: var(--red); color: var(--on-accent); box-shadow: 0 4px 20px var(--redglow); }
.btn.primary:hover { background: var(--red2); border-color: var(--red2); transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.hero { padding: 48px 0 24px; }
.hero h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.05; margin: 0 0 10px; letter-spacing: -.035em; font-weight: 900; }
.hero h1 span { color: var(--red2); }
.hero p { color: var(--muted); margin: 0; font-size: 16px; max-width: 560px; }

.controls { display: flex; gap: 10px; flex-wrap: wrap; margin: 24px 0 20px; }
.input, select, textarea { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 11px 14px; font: inherit; font-size: 14px; outline: none; transition: border-color .15s; }
.input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.18); }
.controls .input { flex: 1; min-width: 200px; }
select option { background: var(--panel); }
.count { color: var(--muted); font-size: 13px; margin: 0 0 14px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.card { display: flex; align-items: center; gap: 14px; text-align: left; width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; transition: .15s; }
.card:hover { border-color: var(--red); transform: translateY(-2px); box-shadow: 0 10px 30px -10px var(--redglow); }
.card .info { flex: 1; min-width: 0; }
.card .name { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .role { color: var(--muted); font-size: 13px; margin-top: 2px; }
.card .meta { color: var(--muted); font-size: 12px; margin-top: 8px; display: flex; gap: 12px; }
.card .meta b { color: var(--text); font-weight: 600; }

.avatar { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; font-weight: 800; font-size: 16px;
  background: linear-gradient(135deg, var(--tint), #1a1a1d); border: 1px solid var(--tint-line); color: var(--tint-text); }
.avatar.lg { width: 72px; height: 72px; border-radius: 20px; font-size: 26px; }

.score { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; font-weight: 800; font-size: 20px; color: #0a0a0b; letter-spacing: -.02em; }
.score.good { background: var(--good); } .score.mid { background: var(--mid); } .score.bad { background: var(--bad); }
.score.none { background: var(--panel2); color: var(--muted); font-size: 13px; font-weight: 600; border: 1px dashed #3a3a40; }
.score.lg { width: 112px; height: 112px; border-radius: 26px; font-size: 44px; }

/* detail */
.back { display: inline-block; margin: 28px 0 16px; color: var(--muted); font-size: 14px; font-weight: 500; }
.back:hover { color: var(--red2); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.t-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.t-head h2 { margin: 0; font-size: 30px; letter-spacing: -.03em; font-weight: 800; }
.t-head .role { color: var(--muted); margin-top: 4px; }
.t-head .grow { flex: 1; min-width: 200px; }
.stats { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.overall { display: flex; gap: 18px; align-items: center; }
.overall .lbl { color: var(--muted); font-size: 13px; }
.overall .big { font-size: 13px; margin-top: 4px; color: var(--muted); }
.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 32px; align-items: center; gap: 10px; font-size: 14px; }
.bar { height: 8px; border-radius: 99px; background: var(--panel2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--red), var(--red2)); }
.bar-row b { text-align: right; font-weight: 700; }
.pills { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.pill { background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.pill b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.pill span { color: var(--muted); font-size: 12px; }
.dist { display: grid; gap: 6px; margin-top: 22px; }
.dist .bar-row { grid-template-columns: 24px 1fr 28px; font-size: 12px; color: var(--muted); }

.rev-head { display: flex; align-items: center; justify-content: space-between; margin: 34px 0 14px; flex-wrap: wrap; gap: 10px; }
.rev-head h3 { margin: 0; font-size: 20px; }
.reviews { display: grid; gap: 12px; margin-bottom: 40px; }
.review { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; grid-template-columns: auto 1fr; gap: 16px; }
.review .score { width: 52px; height: 52px; }
.review .top-line { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.review .course { font-weight: 700; }
.review .date { color: var(--muted); font-size: 12px; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.tag { font-size: 12px; padding: 4px 10px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); }
.tag b { color: var(--text); }
.tag.yes { color: var(--good); border-color: rgba(61,220,132,.35); } .tag.no { color: var(--bad); border-color: rgba(255,77,90,.35); }
.comment { margin: 6px 0 0; line-height: 1.55; color: #dcdce0; white-space: pre-wrap; overflow-wrap: anywhere; }
.nocomment { color: var(--muted); font-style: italic; }
.actions { display: flex; gap: 8px; margin-top: 14px; }
.act { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; font-size: 13px; color: var(--muted); transition: .15s; }
.act:hover { color: var(--text); border-color: #555; }
.act.on { color: var(--on-accent); background: var(--red); border-color: var(--red); }
.act.report { margin-left: auto; }
.act.report.on { background: transparent; color: var(--muted); border-color: var(--line); cursor: default; }
.empty { text-align: center; color: var(--muted); padding: 48px 20px; border: 1px dashed var(--line); border-radius: 16px; }

/* modal */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.75); backdrop-filter: blur(4px); display: grid; place-items: start center; overflow-y: auto; padding: 30px 14px; animation: fade .15s; }
.modal { width: 100%; max-width: 560px; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 26px; box-shadow: 0 30px 80px -20px #000, 0 0 60px -30px var(--redglow); animation: pop .18s; }
.modal h2 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.02em; }
.modal .sub { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.field { margin-bottom: 18px; }
.field > label, .field > .lab { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.field > label small, .field > .lab small { color: var(--muted); font-weight: 400; }
.field .input, .field select, .field textarea { width: 100%; }
textarea { resize: vertical; min-height: 96px; }
.counter { text-align: right; font-size: 11px; color: var(--muted); margin-top: 4px; }
.rate-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rate-row:last-child { border: 0; }
.rate-row span { font-size: 14px; }
.stars { display: flex; gap: 4px; }
.stars button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); font-weight: 700; font-size: 14px; color: var(--muted); transition: .12s; }
.stars button:hover { border-color: var(--red); color: var(--text); }
.stars button.fill { background: var(--red); border-color: var(--red); color: var(--on-accent); }
.scale-note { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; }
.yn { display: flex; gap: 10px; }
.yn button { flex: 1; padding: 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); font-weight: 600; }
.yn button.sel { background: var(--red); border-color: var(--red); color: var(--on-accent); }
.err { color: var(--bad); font-size: 13px; min-height: 18px; margin: 4px 0 10px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

.foot { color: #5f5f66; font-size: 12px; text-align: center; padding: 30px 20px 40px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); background: var(--text); color: #000; font-weight: 600; font-size: 14px; padding: 12px 20px; border-radius: 12px; opacity: 0; pointer-events: none; transition: .25s; z-index: 99; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes fade { from { opacity: 0 } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98) } }

@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .review { grid-template-columns: 1fr; }
  .review .score { width: 46px; height: 46px; font-size: 17px; }
  .bar-row { grid-template-columns: 96px 1fr 30px; }
  .stars button { width: 32px; height: 32px; }
}

.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.top-actions, #auth-slot { display: flex; gap: 8px; align-items: center; }
.ts-box { min-height: 65px; margin-bottom: 8px; }
.code-input { font-size: 28px; letter-spacing: .4em; text-align: center; font-weight: 700; }
.tabs { display: flex; gap: 8px; }
.tab { background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 8px 16px; font-size: 14px; font-weight: 600; color: var(--muted); }
.tab.on { background: var(--red); border-color: var(--red); color: var(--on-accent); }
.admin-stats { grid-template-columns: repeat(5, 1fr); margin-top: 0; }
.admin-row .actions { flex-wrap: wrap; }
@media (max-width: 720px) { .admin-stats { grid-template-columns: repeat(2, 1fr); } .top-actions .btn { padding: 9px 12px; } }

.top-in { gap: 16px; }
.nav { display: flex; gap: 4px; margin-right: auto; margin-left: 18px; }
.nav a { padding: 8px 14px; border-radius: 99px; font-weight: 600; font-size: 14px; color: var(--muted); transition: .15s; }
.nav a:hover { color: var(--text); }
.nav a.on { background: rgba(var(--accent-rgb),.16); color: var(--red2); }
.lb-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 40px; align-items: start; }
.lb h3 { margin: 0 0 2px; font-size: 20px; }
.lb .count { margin: 0 0 14px; }
.lb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lb-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--panel2); border: 1px solid transparent; border-radius: 12px; padding: 10px 12px; transition: .15s; }
.lb-row:hover { border-color: var(--red); }
.lb-row .avatar { width: 38px; height: 38px; border-radius: 11px; font-size: 13px; }
.rank { width: 26px; text-align: center; font-weight: 800; color: var(--muted); }
.rank.r1 { color: #ffd34d; } .rank.r2 { color: #cfd3da; } .rank.r3 { color: #e0955a; }
.lb-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lb-info b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-info small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-val { font-weight: 800; font-size: 18px; color: var(--good); }
.lb-val.bad { color: var(--bad); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 16px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
@media (max-width: 720px) { .lb-cols { grid-template-columns: 1fr; } .nav { margin-left: 4px; } .nav a { padding: 7px 10px; } .brand span:last-child { display: none; } }

/* ===== v2 additions ===== */
.lnk { color: var(--red2); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.hint { color: var(--muted); font-size: 12.5px; margin: 8px 0 0; line-height: 1.5; }
.hint a { color: var(--red2); }
.sm { color: var(--muted); font-weight: 400; font-size: 11px; margin-left: 6px; }
.grow { flex: 1; min-width: 0; }
.block { display: block; margin-top: 2px; }
.you { margin-left: 8px; font-size: 11px; font-weight: 700; color: var(--red2); background: rgba(var(--accent-rgb),.14); padding: 2px 8px; border-radius: 99px; }
.review.own { border-color: rgba(var(--accent-rgb),.45); }
.btn.danger { background: #7a1018; border-color: #a31826; color: #fff; }
.btn.danger:hover { background: #a31826; }
.btn.icon { padding: 9px; width: 40px; height: 40px; display: grid; place-items: center; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 4px 0 8px; }
.check input { accent-color: var(--red); width: 16px; height: 16px; }

/* header */
.top-in { gap: 14px; }
.nav { flex: 1; min-width: 0; display: flex; gap: 2px; margin: 0 0 0 10px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { white-space: nowrap; }
.top-actions { flex: none; }

/* site banner + rank icons */
.staff-chip { display: inline-flex; align-items: center; gap: 7px; flex: none; }
.staff-chip b { font-weight: 700; font-size: 13.5px; }
.staff-pfp { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; overflow: hidden; background: var(--tint); border: 1px solid rgba(255,255,255,.18); font-size: 11px; font-weight: 800; color: var(--tint-text); flex: none; }
.staff-pfp img { width: 100%; height: 100%; object-fit: cover; display: block; }
.staff-chip.sm .staff-pfp { width: 24px; height: 24px; font-size: 10px; }
.staff-chip.lg .staff-pfp { width: 64px; height: 64px; font-size: 20px; }
.staff-chip.lg b { font-size: 18px; }
.rank-icon { position: relative; cursor: help; font-size: 15px; line-height: 1; outline: none; }
.tip::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%) translateY(4px); background: #000; color: #fff; border: 1px solid var(--line); padding: 4px 9px; border-radius: 8px; font-size: 12px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: .12s; z-index: 70; }
.tip:hover::after, .tip:focus::after { opacity: 1; transform: translateX(-50%); }

/* settings menu */
.menu-wrap { position: relative; }
.menu { display: none; position: absolute; right: 0; top: 100%; padding-top: 8px; z-index: 40; }
.menu-wrap:hover .menu, .menu-wrap.open .menu, .menu-wrap:focus-within .menu { display: block; }
.menu-card { min-width: 230px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 6px; box-shadow: 0 20px 50px -10px #000; }
.menu-head { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.menu-head small { color: var(--muted); font-weight: 400; font-size: 12px; }
.menu-item { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 9px; font-size: 14px; font-weight: 500; }
.menu-item:hover { background: var(--panel2); }
.menu-item.danger { color: var(--bad); }

/* announcements, guidelines */
.announce.pinned { border-color: rgba(var(--accent-rgb),.5); }
.a-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.a-head .date { color: var(--muted); font-size: 12px; }
.announce h3 { margin: 0 0 8px; font-size: 20px; letter-spacing: -.02em; }
.a-body { margin: 0; line-height: 1.6; color: #dcdce0; white-space: pre-wrap; overflow-wrap: anywhere; }
.announce-form .field { margin-bottom: 12px; }
.g-sec { margin-bottom: 14px; }
.g-sec h2 { margin: 0 0 12px; font-size: 20px; letter-spacing: -.02em; }
.g-sec p { color: #dcdce0; line-height: 1.6; margin: 0 0 10px; }
.g-sec ul { margin: 0; padding-left: 20px; display: grid; gap: 9px; color: #dcdce0; line-height: 1.55; }
.g-sec li::marker { color: var(--red2); }
.foot-links { margin: 20px 0 40px; }
.foot a { color: var(--muted); text-decoration: underline; }
.foot a:hover { color: var(--red2); }

/* modal tweaks */
.modal.wide { max-width: 820px; }
.g-box { margin-bottom: 4px; }

/* tier list */
.tl-board { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--panel); margin-bottom: 16px; }
.tl-row { display: flex; border-bottom: 1px solid #000; }
.tl-row:last-child { border-bottom: 0; }
.tl-label { flex: none; width: 82px; display: grid; place-items: center; font-weight: 900; font-size: 30px; color: #111; }
.tl-zone { flex: 1; min-height: 96px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; padding: 8px; background: #151518; transition: background .12s; }
.tl-zone.hot { background: var(--tint); box-shadow: inset 0 0 0 2px var(--red); }
.tl-tray { min-height: 96px; background: var(--panel2); border-radius: 12px; border: 1px dashed #3a3a40; }
.tl-empty { color: var(--muted); font-size: 13px; align-self: center; padding: 0 8px; }
.tl-chip { position: relative; width: 80px; height: 80px; border-radius: 10px; overflow: hidden; background: #26262b; border: 1px solid #3a3a40; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; flex: none; }
.tl-chip img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.tl-chip.noimg { display: grid; place-items: center; background: linear-gradient(135deg, var(--tint), #1a1a1d); }
.tl-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 3px 3px; font-size: 10.5px; font-weight: 700; text-align: center; line-height: 1.1; background: linear-gradient(transparent, rgba(0,0,0,.85)); color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.tl-chip.noimg .tl-name { position: static; background: none; padding: 4px; white-space: normal; font-size: 12px; color: var(--tint-text); }
.tl-x { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.75); color: #fff; font-size: 14px; line-height: 1; display: none; place-items: center; padding: 0; }
.tl-chip:hover .tl-x { display: grid; }
@media (hover: none) { .tl-x { display: grid; } }
.tl-chip.dragging { opacity: .25; }
.tl-ghost { position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none; opacity: .92; box-shadow: 0 14px 34px rgba(0,0,0,.6); transform-origin: top left; }
body.tl-dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.tl-pool-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.tl-pool-head h3 { margin: 0; }
.tl-results { margin-top: 10px; max-height: 260px; overflow-y: auto; display: grid; gap: 4px; padding-right: 4px; }
.tl-res { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--panel2); border: 1px solid transparent; border-radius: 10px; padding: 7px 10px; }
.tl-res:hover:not(:disabled) { border-color: var(--red); }
.tl-res.added { opacity: .5; cursor: default; }
.tl-res .avatar { width: 34px; height: 34px; border-radius: 10px; font-size: 12px; }
.tl-res-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tl-res-info small { color: var(--muted); font-size: 12px; }
.tl-add { font-size: 13px; font-weight: 700; color: var(--red2); }

/* admin */
.adm-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 30px 0 14px; }
.adm-head h1 { margin: 0; font-size: 32px; letter-spacing: -.03em; font-weight: 900; }
.adm-tabs { flex-wrap: wrap; margin-bottom: 16px; }
.adm-panel { margin-bottom: 14px; }
.adm-panel h3 { margin: 0 0 12px; font-size: 18px; }
.adm-panel h4 { margin: 14px 0 8px; font-size: 14px; color: var(--muted); font-weight: 600; }
.admin-stats.six { grid-template-columns: repeat(6, 1fr); }
.tag.linkish { cursor: pointer; font: inherit; font-size: 12px; }
.tag.linkish:hover { color: var(--text); border-color: var(--red); }
.user-list { display: grid; gap: 6px; margin-bottom: 40px; }
.user-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.user-row:hover { border-color: var(--red); }
.user-row small { color: var(--muted); }
.audit-row { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.audit-row:last-child { border: 0; }
.audit-row small { color: var(--muted); }
.audit-row code { background: var(--panel2); border: 1px solid var(--line); padding: 1px 7px; border-radius: 6px; font-size: 12px; color: var(--red2); }
.prof { display: flex; align-items: center; gap: 16px; margin: 14px 0 18px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.two-col.tight { gap: 12px; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 10px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.hbars { display: grid; gap: 8px; }
.bar-row.wide { grid-template-columns: 120px 1fr 40px; font-size: 13px; }
.bar-row.wide span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.toggle-row:last-child { border: 0; }
.toggle-row p { margin: 4px 0 0; }
.switch { position: relative; flex: none; width: 46px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--panel2); border: 1px solid #3a3a40; border-radius: 99px; cursor: pointer; transition: .15s; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #aaa; transition: .15s; }
.switch input:checked + span { background: var(--red); border-color: var(--red); }
.switch input:checked + span::after { transform: translateX(20px); background: var(--on-accent); }
.backup-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.backup-row:last-child { border: 0; }
.backup-row small { color: var(--muted); }

@media (max-width: 720px) {
  .admin-stats.six { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .tl-label { width: 54px; font-size: 22px; }
  .tl-chip { width: 66px; height: 66px; }
  .nav { margin-left: 2px; }
  .top-in { gap: 8px; }
  .top-actions .btn:not(.icon) { padding: 9px 12px; font-size: 13px; }
  .staff-chip b { font-size: 12.5px; }
}

/* ===== v3 additions ===== */
img.logo { display: block; width: auto; height: 40px; border-radius: 0; background: none; box-shadow: none; filter: drop-shadow(0 0 10px rgba(var(--accent-rgb),.35)); }
.brand { gap: 10px; white-space: nowrap; }
.admin-stats, .admin-stats.six { grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); }

/* settings dot + menu badge */
.btn.icon { position: relative; }
.dot { position: absolute; right: 4px; bottom: 4px; width: 11px; height: 11px; border-radius: 50%; background: var(--red2); border: 2px solid var(--bg); box-shadow: 0 0 8px var(--redglow); }
.badge { display: inline-block; min-width: 20px; padding: 1px 7px; margin-left: 8px; border-radius: 99px; background: var(--red); color: var(--on-accent); font-size: 11px; font-weight: 800; text-align: center; }

/* notifications */
.notif { display: grid; grid-template-columns: 40px 1fr; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.notif.unread { border-color: rgba(var(--accent-rgb),.55); box-shadow: inset 3px 0 0 var(--red); }
.n-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--panel2); display: grid; place-items: center; font-size: 19px; }
.n-text { font-weight: 600; line-height: 1.45; }
.n-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; color: var(--muted); font-size: 12.5px; }
.n-why { margin-top: 8px; padding: 9px 12px; background: var(--panel2); border-radius: 10px; font-size: 13.5px; color: #dcdce0; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.n-why b { color: var(--muted); font-weight: 600; margin-right: 6px; }
.n-foot { margin-top: 8px; text-align: right; }
.tiny-btn { background: none; border: 0; color: var(--muted); font-size: 11.5px; text-decoration: underline; padding: 2px 0; }
.tiny-btn:hover { color: var(--red2); }

/* frozen reviews */
.tag.frozen { color: #8fd3ff; border-color: rgba(143,211,255,.4); background: rgba(143,211,255,.08); }
.frozen-note { margin-top: 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: rgba(143,211,255,.07); border: 1px solid rgba(143,211,255,.35); color: #cfeaff; font-size: 14px; line-height: 1.5; }
.frozen-note .staff-chip b { color: #fff; }
.t-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* feedback + staff views */
.fb { display: grid; gap: 8px; }
.fb-msg { margin: 6px 0 0; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; color: #dcdce0; }
.fb-ref { margin: 8px 0 0; padding: 7px 10px; border-left: 3px solid var(--line); color: var(--muted); font-size: 12.5px; }
.fb-reply { margin: 8px 0 0; padding: 8px 12px; background: var(--panel2); border-radius: 10px; font-size: 13.5px; }
.sec-note { color: var(--muted); font-size: 12.5px; margin: -4px 0 10px; }
.arch { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.arch .comment { margin-top: 6px; }
.hist-row { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; padding: 6px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.hist-row:last-child { border: 0; }
.hist-row small { color: var(--muted); }
.hist-row code { background: var(--panel); border: 1px solid var(--line); padding: 1px 7px; border-radius: 6px; font-size: 11.5px; color: var(--red2); }
.modal select, .modal textarea { width: 100%; }

@media (max-width: 720px) {
  img.logo { height: 34px; }
  .notif { grid-template-columns: 1fr; }
  .n-ico { display: none; }
}

.g-sub { margin: 18px 0 8px; font-size: 15px; color: var(--red2); letter-spacing: -.01em; }
.g-sec h4.g-sub:first-of-type { margin-top: 6px; }

/* ===== v4 additions ===== */
.frozen-note.silent { background: rgba(245,183,59,.07); border-color: rgba(245,183,59,.4); color: #ffe3a3; }
.flag-box { margin: 12px 0; padding: 12px 14px; border-radius: 12px; background: rgba(255,77,90,.07); border: 1px solid rgba(255,77,90,.35); font-size: 13.5px; display: grid; gap: 6px; line-height: 1.5; }
.flag-box small { color: var(--muted); }
.inc-reviews { margin: 10px 0; }
.inc-reviews summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--red2); }
.toggle-row select { flex: none; width: auto; max-width: 260px; }

.adm-panel .top-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.adm-panel .top-line .date { color: var(--muted); font-size: 12px; }

/* ===== v5: exports + saved tier lists ===== */
.tl-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tl-status { margin: -4px 0 12px; font-size: 12.5px; color: var(--muted); }
.tl-status .tiny-btn { color: var(--red2); font-size: 12.5px; }

/* ===== phones: the page links get their own full-width row under the logo and buttons ===== */
@media (max-width: 720px) {
  .top-in { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 8px; row-gap: 8px; justify-content: space-between; }
  .nav { order: 3; flex: 0 0 auto; width: calc(100% + 40px); margin: 0 -20px; padding: 0 20px; gap: 2px; justify-content: space-between; }
  .nav a { padding: 7px 6px; font-size: clamp(11.5px, 3.3vw, 13.5px); }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .bar-row { grid-template-columns: 116px 1fr 30px; }
  .tl-zone { min-height: 80px; }
  .tl-pool-head { flex-wrap: wrap; gap: 10px; }
  .hero { padding: 30px 0 20px; }
  .panel { padding: 18px; }
  .modal { padding: 20px; }
  .overlay { padding: 16px 10px; }
  .input, select, textarea { font-size: 16px; } /* below 16px, iPhones zoom the page in when a field is tapped */
  .stars { gap: 6px; }
  .stars button { flex: 1; width: auto; height: 44px; font-size: 16px; }
  .rate-row { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 0; }
  .toast { width: max-content; max-width: calc(100vw - 28px); text-align: center; }
  .modal-actions { flex-wrap: wrap; }
}
.tl-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 18px; }
.tl-pick button { aspect-ratio: 1; border: 0; border-radius: 12px; font-weight: 900; font-size: 22px; color: #111; }
.tl-pick button:hover { filter: brightness(1.12); }
.tl-pool .input { width: 100%; }
/* Touch screens: the settings menu opens and closes by tapping only (hover and focus would leave it stuck open). */
@media (hover: none) {
  .menu-wrap:hover .menu, .menu-wrap:focus-within .menu { display: none; }
  .menu-wrap.open .menu { display: block; }
}
@media (max-width: 720px) { .menu { position: fixed; right: 12px; top: 50px; max-width: calc(100vw - 24px); } }
select, .input, textarea { max-width: 100%; }
@media (max-width: 720px) {
  .lb-cols { grid-template-columns: minmax(0, 1fr); }
  .tabs { flex-wrap: wrap; }
}
@media (max-width: 720px) {
  .toggle-row:has(> select) { flex-direction: column; align-items: stretch; gap: 10px; }
  .toggle-row > select { width: 100%; }
}
.lb-list { grid-template-columns: minmax(0, 1fr); }
.lb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lb-head h3 { margin: 0; }
.lb-head .tiny-btn { flex: none; text-decoration: none; border: 1px solid var(--line); background: var(--panel2); color: var(--text); border-radius: 99px; padding: 6px 12px; font-size: 12px; font-weight: 600; }
.lb-head .tiny-btn:hover { border-color: var(--red); color: var(--text); }

/* announcement dot, confetti, community tier list */
.nav-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red2); margin-left: 5px; vertical-align: top; box-shadow: 0 0 8px var(--redglow); }
.confetti { position: fixed; left: 50%; top: 42%; width: 0; height: 0; z-index: 300; pointer-events: none; }
.confetti i { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 2px; opacity: 0; }
.tl-tabs { margin: 0 0 16px; }
.tl-chip.static { display: block; cursor: pointer; touch-action: auto; transition: transform .12s, border-color .12s; }
.tl-chip.static.noimg { display: grid; }
.tl-chip.static:hover { border-color: var(--red); transform: translateY(-2px); }
.tl-score { position: absolute; top: 3px; left: 3px; padding: 1px 5px; border-radius: 6px; background: rgba(0,0,0,.78); color: #fff; font-size: 11px; font-weight: 800; line-height: 1.4; }
.tl-how { margin-top: 12px; font-size: 13px; color: var(--muted); }
.tl-how summary { cursor: pointer; color: var(--red2); font-weight: 600; }
.tl-how p { margin: 10px 0 6px; line-height: 1.5; }
.tl-how ul { margin: 0; padding-left: 18px; line-height: 1.6; }
.modal .sub b { color: var(--text); }
.hero p b { color: var(--text); }

.share-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.share-row label { display: flex; align-items: center; gap: 6px; font-weight: 800; }
.share-row .input { width: 84px !important; }
[hidden] { display: none !important; }

/* teacher picker in the review form */
.tp .input { width: 100%; }
.tp-list { margin-top: 8px; max-height: 250px; overflow-y: auto; display: grid; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.tp-list .tl-res:disabled { opacity: .45; cursor: not-allowed; }
.tp-chosen { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--red); border-radius: 12px; background: rgba(var(--accent-rgb),.08); }
.tp-chosen .avatar { width: 40px; height: 40px; border-radius: 11px; font-size: 13px; }
.tp-chosen .btn { padding: 7px 12px; font-size: 13px; }
.tp-list, .tl-results { scrollbar-width: thin; scrollbar-color: #3a3a40 transparent; align-content: start; }
/* Fun follows the site's existing hero, panel, search, and rating styles. */
.fun-hero.with-back { padding-top:8px; }
.fun-hero p { max-width:620px; }
.fun-eyebrow { color:var(--muted); font-size:11px; font-weight:700; letter-spacing:.1em; }
.fun-games { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; margin:16px 0 32px; }
.fun-game { overflow:hidden; background:var(--panel); border:1px solid var(--line); border-radius:20px; transition:transform .18s,border-color .18s,box-shadow .18s; }
.fun-game:hover { transform:translateY(-3px); border-color:var(--red); box-shadow:0 12px 36px -18px var(--redglow); }
.fun-game:focus-visible { outline:2px solid var(--red2); outline-offset:4px; }
.fun-game-body { padding:24px; }
.fun-game h2 { font-size:23px; margin:10px 0; letter-spacing:-.025em; }
.fun-game p { color:var(--muted); font-size:14px; line-height:1.6; margin:0; min-height:46px; }
.fun-game-action { display:flex; justify-content:space-between; align-items:center; color:var(--red2); font-size:14px; font-weight:700; border-top:1px solid var(--line); margin-top:24px; padding-top:18px; }
.fun-game-action span { width:29px; height:29px; background:rgba(var(--accent-rgb),.12); display:grid; place-items:center; border-radius:8px; font-size:18px; }
.fun-art { height:196px; padding:25px; position:relative; overflow:hidden; border-bottom:1px solid var(--line); background:radial-gradient(ellipse at 50% 0,rgba(var(--accent-rgb),.18),transparent 80%),#111113; }
.art-kicker { font-size:9px; font-weight:800; letter-spacing:.15em; color:var(--red2); }
.art-question { font-size:28px; font-weight:850; line-height:1.1; letter-spacing:-.035em; margin:15px 0 20px; }
.art-question span { color:var(--red2); display:block; }
.art-voters { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.portrait-stack { display:flex; padding-left:5px; }
.portrait-stack .avatar { width:32px; height:32px; border-radius:50%; margin-left:-5px; border:2px solid var(--panel); }
.art-live { display:flex; align-items:center; gap:5px; color:var(--muted); font-size:9px; }
.art-live i,.fun-status i { width:6px; height:6px; border-radius:50%; background:var(--good); }
.art-duo { display:flex; justify-content:center; align-items:center; gap:22px; margin-top:9px; }
.art-duo>div { display:grid; justify-items:center; gap:8px; }
.art-duo .avatar { width:76px; height:76px; border-radius:22px; }
.art-duo .score { width:44px; height:30px; border-radius:9px; font-size:17px; }
.art-vs { color:var(--red2); font-size:16px; font-weight:900; }
.art-mystery { display:flex; justify-content:center; align-items:baseline; gap:8px; }
.art-mystery>span { font-size:72px; font-weight:900; color:var(--red2); line-height:1.1; }
.art-mystery small { font-size:10px; font-weight:700; color:var(--muted); letter-spacing:.08em; }
.art-options { display:flex; justify-content:center; gap:6px; margin-top:17px; }
.art-options span { display:grid; place-items:center; width:33px; height:33px; border:1px solid var(--line); border-radius:10px; background:var(--panel2); color:var(--muted); font-weight:700; font-size:12px; }
.art-options span.on { background:var(--red); border-color:var(--red); color: var(--on-accent); box-shadow:0 4px 20px var(--redglow); }
.fun-panel-title { margin:0; font-size:18px; font-weight:800; letter-spacing:-.025em; }
.fun-panel-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.fun-panel-heading h3 { margin:0; }
.fun-status { display:inline-flex; align-items:center; gap:7px; font-size:12px; font-weight:600; color:var(--muted); padding:7px 10px; border:1px solid var(--line); background:var(--panel2); border-radius:99px; }
.fun-status.live { color:var(--good); background:rgba(61,220,132,.07); border-color:rgba(61,220,132,.18); }
.weekly-question { padding:30px 32px; margin:12px 0 22px; background:radial-gradient(ellipse at 100% 0,rgba(var(--accent-rgb),.12),transparent 65%),var(--panel); }
.weekly-question-top,.weekly-question-foot { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.weekly-week { color:var(--muted); font-size:12px; }
.weekly-question h2 { font-size:clamp(24px,3vw,34px); line-height:1.2; letter-spacing:-.035em; max-width:750px; margin:22px 0 26px; font-weight:800; }
.weekly-question-foot { color:var(--muted); font-size:12px; border-top:1px solid var(--line); padding-top:17px; }
.weekly-layout { display:grid; grid-template-columns:1.25fr 1fr; gap:20px; align-items:start; }
.fun-picker .controls { margin:18px 0 12px; }
.fun-picker .input { width:100%; min-width:0; }
.fun-pick-list { display:grid; gap:7px; max-height:300px; overflow-y:auto; padding:2px 4px 3px 1px; scrollbar-width:thin; scrollbar-color:#3a3a40 transparent; }
.fun-pick-row { padding:10px 12px; border-radius:12px; gap:12px; background:var(--panel2); }
.fun-pick-row:hover { transform:none; }
.fun-pick-row.picked { border-color:var(--red); background:rgba(var(--accent-rgb),.08); }
.fun-pick-row .avatar { width:40px; height:40px; border-radius:12px; }
.fun-pick-row .name { font-size:14px; }
.fun-pick-row .role { font-size:11px; }
.fun-pick-row .score { width:38px; height:38px; border-radius:10px; font-size:16px; }
.pick-check { width:20px; height:20px; border:1px solid #424248; border-radius:50%; display:grid; place-items:center; flex:none; font-size:12px; }
.picked .pick-check { border-color:var(--red); background:var(--red); color: var(--on-accent); }
.fun-no-match { margin:20px 4px; }
.weekly-submit { display:flex; justify-content:space-between; align-items:center; gap:12px; border-top:1px solid var(--line); padding-top:18px; margin-top:16px; }
.weekly-submit .hint { font-size:12px; }
.weekly-leaders { margin-top:24px; display:grid; gap:20px; }
.weekly-leader { display:flex; align-items:center; gap:10px; }
.weekly-rank { font-size:12px; color:var(--muted); width:20px; font-weight:700; }
.weekly-leader .avatar { width:36px; height:36px; border-radius:11px; }
.weekly-leader-info { flex:1; min-width:0; }
.weekly-leader-info b { display:block; font-size:13px; margin-bottom:8px; }
.weekly-vote-count { font-size:20px; font-weight:800; color:var(--red2); }
.weekly-no-votes { text-align:center; padding:44px 10px; }
.weekly-no-votes h4 { font-size:15px; margin:24px 0 6px; }
.weekly-no-votes p { color:var(--muted); font-size:13px; margin:0; }
.empty-chart { display:flex; align-items:flex-end; justify-content:center; gap:7px; height:60px; }
.empty-chart i { width:14px; height:24px; border-radius:4px; background:rgba(var(--accent-rgb),.18); border:1px solid rgba(var(--accent-rgb),.2); }
.empty-chart i:nth-child(2) { height:48px; }
.empty-chart i:nth-child(3) { height:36px; }
.empty-chart i:nth-child(4) { height:60px; }
.weekly-voted { text-align:center; margin:28px 0 22px; }
.weekly-voted .avatar { margin:0 auto; width:96px; height:96px; border-radius:26px; }
.weekly-voted h3 { margin:15px 0 8px; font-size:24px; letter-spacing:-.025em; }
.weekly-voted p { color:var(--muted); font-size:14px; }
.winner-votes { color:var(--good); font-weight:700; }
.compare-picks { display:grid; grid-template-columns:1fr 1fr; gap:20px; margin:12px 0 24px; }
.compare-pick { min-width:0; }
.compare-pick-title { text-align:center; font-size:13px; font-weight:700; color:var(--muted); margin:0 0 20px; }
.compare-pick .fun-pick-list { max-height:284px; }
.fun-picked-teacher { text-align:center; padding:8px 0; }
.fun-picked-teacher>.avatar { margin:0 auto 18px; width:112px; height:112px; border-radius:30px; }
.fun-picked-teacher h2 { font-size:28px; line-height:1.2; letter-spacing:-.035em; margin:0 0 7px; }
.fun-picked-teacher>.role { color:var(--muted); font-size:13px; margin:0; }
.fun-picked-score { display:flex; justify-content:center; align-items:center; gap:16px; margin:24px 0; text-align:left; }
.fun-picked-score .score.lg { width:74px; height:74px; font-size:30px; border-radius:20px; }
.fun-picked-score b { display:block; font-size:14px; }
.fun-picked-score small { display:block; color:var(--muted); font-size:12px; margin-top:4px; }
.fun-change { padding:8px 14px; font-size:12px; }
.comparison-table { padding:26px 30px; }
.comparison-labels,.comparison-row { display:grid; grid-template-columns:minmax(0,1fr) 160px minmax(0,1fr); gap:30px; text-align:center; align-items:center; }
.comparison-labels { color:var(--muted); font-size:12px; padding:24px 0 8px; }
.comparison-labels b { color:var(--text); font-size:13px; }
.comparison-row { padding:18px 0; border-bottom:1px solid var(--line); }
.comparison-value { display:grid; gap:9px; justify-items:center; }
.comparison-value>.bar { width:100%; max-width:230px; }
.metric-number { font-size:26px; font-weight:800; letter-spacing:-.035em; }
.metric-number small { font-size:12px; font-weight:500; letter-spacing:0; color:var(--muted); }
.metric-number.good { color:var(--good); }
.metric-number.mid { color:var(--mid); }
.metric-number.bad { color:var(--bad); }
.metric-number.neutral { color:var(--text); }
.comparison-metric b { font-size:13px; }
.comparison-metric small { display:block; margin-top:6px; color:var(--muted); font-size:11px; }
.compare-note { text-align:center; font-size:12px; margin:20px 0 0; }
.fun-export-row { display:flex; justify-content:center; margin:24px 0 12px; }
.fun-export-row[hidden] { display:none; }
.guess-root { margin:12px 0 30px; }
.guess-setup { max-width:780px; margin:0 auto; padding:30px; }
.guess-section-heading { text-align:center; margin:0 0 26px; }
.guess-section-heading h2 { font-size:24px; margin:0 0 9px; letter-spacing:-.03em; }
.guess-section-heading p { margin:0; }
.guess-modes { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.guess-mode { position:relative; text-align:center; background:var(--panel2); border:1px solid var(--line); border-radius:18px; padding:24px 20px; transition:.15s; }
.guess-mode:hover { border-color:#555; }
.guess-mode.selected { border-color:var(--red); background:linear-gradient(150deg,rgba(var(--accent-rgb),.12),rgba(var(--accent-rgb),.02)),var(--panel2); box-shadow:0 0 0 1px rgba(var(--accent-rgb),.3); }
.mode-check { position:absolute; right:16px; top:16px; width:20px; height:20px; border-radius:50%; border:1px solid #444; display:grid; place-items:center; font-size:12px; }
.selected .mode-check { color: var(--on-accent); background:var(--red); border-color:var(--red); }
.mode-art { display:flex; justify-content:center; align-items:center; height:96px; gap:12px; color:var(--muted); }
.mode-score { font-weight:900; font-size:42px; color:var(--red2); width:70px; height:70px; background:rgba(var(--accent-rgb),.1); border:1px solid rgba(var(--accent-rgb),.2); border-radius:19px; display:grid; place-items:center; }
.mode-art>span { font-size:20px; font-weight:700; }
.mode-art.complex { align-items:flex-end; padding-bottom:14px; gap:9px; }
.mode-art.complex>div { display:flex; flex-direction:column-reverse; align-items:center; gap:6px; font-size:10px; font-weight:700; }
.mode-art.complex i { width:24px; background:linear-gradient(var(--red2),var(--red)); border-radius:5px; }
.guess-mode h3 { font-size:22px; margin:13px 0 7px; letter-spacing:-.025em; }
.guess-mode p { color:var(--muted); font-size:13px; margin:0; line-height:1.5; }
.fun-centered-actions { display:flex; justify-content:center; flex-wrap:wrap; gap:10px; margin-top:28px; }
.fun-centered-actions .btn.primary { min-width:170px; }
.guess-round { max-width:860px; padding:32px; margin:0 auto; }
.guess-teacher { text-align:center; padding:0 0 26px; border-bottom:1px solid var(--line); }
.guess-teacher .avatar { width:112px; height:112px; border-radius:30px; margin:18px auto; }
.guess-teacher h2 { font-size:28px; margin:0 0 6px; letter-spacing:-.035em; }
.guess-teacher .role { color:var(--muted); font-size:13px; margin:0; }
.guess-inputs { display:grid; grid-template-columns:1fr 1fr; gap:16px 24px; margin-top:26px; }
.guess-inputs.single { grid-template-columns:1fr; max-width:450px; margin:26px auto 0; }
.guess-control { padding:16px; border:1px solid var(--line); border-radius:14px; background:var(--panel2); }
.guess-control-title { display:flex; justify-content:space-between; align-items:center; margin:0 0 13px; gap:10px; }
.guess-control-title h3 { font-size:14px; margin:0; font-weight:700; }
.guess-control-title .hint { font-size:11px; }
.guess-choices { display:grid; grid-template-columns:repeat(5,1fr); gap:6px; }
.guess-choices button { background:var(--panel); border:1px solid #343438; color:var(--muted); border-radius:10px; font-size:16px; font-weight:700; min-height:46px; padding:4px; transition:.12s; }
.guess-choices button:hover { border-color:var(--red); color:var(--text); }
.guess-choices button.on { background:var(--red); border-color:var(--red); color:var(--on-accent); box-shadow:0 4px 12px rgba(var(--accent-rgb),.2); }
.guess-fine { display:flex; align-items:center; justify-content:center; gap:12px; margin:14px 0 0; }
.guess-fine[hidden] { display:none; }
.guess-fine .btn { padding:0; width:32px; height:32px; font-size:19px; }
.guess-fine output { min-width:48px; text-align:center; font-size:17px; font-weight:700; }
.guess-progress { text-align:center; font-size:12px; margin:22px 0 -12px; }
.guess-verdict { display:flex; justify-content:center; align-items:center; gap:22px; margin:28px 0; }
.guess-verdict h3 { margin:0 0 9px; font-size:24px; letter-spacing:-.025em; }
.guess-verdict p { margin:0; font-size:13px; }
.guess-accuracy { width:106px; height:106px; flex:none; display:grid; place-items:center; border-radius:50%; background:conic-gradient(var(--red2) var(--accuracy),var(--line) 0); padding:5px; }
.guess-accuracy>div { background:var(--panel); width:100%; height:100%; border-radius:50%; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:3px; }
.guess-accuracy b { font-size:28px; font-weight:900; letter-spacing:-.04em; }
.guess-accuracy span { font-size:11px; color:var(--muted); }
.guess-results { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.guess-results.single { grid-template-columns:1fr; max-width:450px; margin:0 auto; }
.guess-result-card { border:1px solid var(--line); border-radius:16px; padding:19px; background:var(--panel2); }
.guess-result-card h3 { font-size:14px; margin:0; }
.guess-off { color:var(--muted); font-size:11px; padding:5px 7px; background:var(--panel); border-radius:7px; white-space:nowrap; }
.guess-off.close { color:var(--good); background:rgba(61,220,132,.08); }
.guess-result-values { display:grid; grid-template-columns:1fr 24px 1fr; text-align:center; align-items:center; margin:21px 0 24px; }
.guess-result-values small { display:block; color:var(--muted); font-size:11px; margin-bottom:7px; }
.guess-result-values b { font-size:30px; font-weight:800; letter-spacing:-.035em; }
.guess-result-arrow { color:var(--muted); }
.guess-scale { margin:0 7px; }
.guess-scale-track { position:relative; height:6px; border-radius:4px; background:#36363d; }
.guess-scale-distance { position:absolute; top:0; height:6px; background:rgba(var(--accent2-rgb),.5); }
.guess-marker { position:absolute; width:12px; height:12px; border:2px solid var(--panel2); border-radius:50%; transform:translateX(-50%); }
.guess-marker.guessed { background:var(--text); top:-6px; }
.guess-marker.actual { background:var(--red2); top:2px; }
.guess-marker.actual.good,.legend-actual.good { background:var(--good); }
.guess-marker.actual.mid,.legend-actual.mid { background:var(--mid); }
.guess-marker.actual.bad,.legend-actual.bad { background:var(--bad); }
.guess-scale-labels { display:flex; justify-content:space-between; color:var(--muted); font-size:10px; margin-top:12px; }
.guess-legend { display:flex; justify-content:center; gap:16px; margin-top:14px; font-size:10px; color:var(--muted); }
.guess-legend span { display:flex; align-items:center; gap:5px; }
.guess-legend i { width:7px; height:7px; border-radius:50%; }
.legend-guess { background:var(--text); }
.legend-actual { background:var(--red2); }
.export-preview { display:block; max-width:100%; max-height:55vh; object-fit:contain; margin:16px auto; border-radius:12px; -webkit-touch-callout:default; }
@media(max-width:900px) {
  .fun-art { padding:22px; }
  .art-live { font-size:8px; }
  .art-voters { gap:6px; flex-wrap:wrap; }
  .art-duo { gap:14px; }
  .art-duo .avatar { width:65px; height:65px; }
  .fun-game-body { padding:20px; }
  .fun-game h2 { font-size:21px; }
}
@media(max-width:720px) {
  .fun-games { grid-template-columns:1fr; gap:16px; }
  .fun-art { height:176px; padding:24px; }
  .art-question { font-size:27px; }
  .art-voters { flex-wrap:nowrap; }
  .art-live { font-size:10px; }
  .art-duo .avatar { width:76px; height:76px; }
  .fun-game p { min-height:0; }
  .fun-game-body { padding:22px; }
  .weekly-question { padding:22px; }
  .weekly-question-top { flex-wrap:wrap; }
  .weekly-question-foot { align-items:flex-start; flex-direction:column; gap:8px; }
  .weekly-layout { grid-template-columns:1fr; }
  .weekly-submit { flex-direction:column; align-items:stretch; text-align:center; }
  .weekly-submit .btn { width:100%; }
  .compare-picks { gap:12px; }
  .compare-picks.choosing { grid-template-columns:1fr; }
  .compare-picks.choosing .fun-pick-row .avatar { width:40px; height:40px; border-radius:12px; }
  .compare-picks.choosing .fun-pick-row .name { font-size:14px; }
  .compare-picks.choosing .fun-pick-row .role { font-size:11px; }
  .compare-picks.choosing .fun-pick-row .score { display:grid; }
  .compare-pick { padding:16px 12px; }
  .compare-pick-title { font-size:12px; margin-bottom:16px; }
  .compare-pick .fun-picker .controls { margin-top:0; }
  .compare-pick .input { font-size:12px; padding:10px; }
  .compare-pick .fun-pick-row { gap:8px; padding:8px; }
  .compare-pick .fun-pick-row .avatar { width:30px; height:30px; border-radius:9px; }
  .compare-pick .fun-pick-row .name { font-size:11px; }
  .compare-pick .fun-pick-row .role { font-size:9px; }
  .compare-pick .fun-pick-row .score { display:none; }
  .fun-picked-teacher>.avatar { width:80px; height:80px; border-radius:22px; }
  .fun-picked-teacher h2 { font-size:19px; overflow-wrap:anywhere; }
  .fun-picked-teacher>.role { font-size:11px; }
  .fun-picked-score { flex-direction:column; text-align:center; gap:9px; margin:20px 0; }
  .fun-picked-score .score.lg { width:64px; height:64px; border-radius:17px; font-size:27px; }
  .fun-picked-score b { font-size:11px; }
  .fun-picked-score small { font-size:10px; }
  .fun-change { padding:8px 10px; font-size:11px; }
  .comparison-table { padding:20px 16px; }
  .comparison-table>.fun-panel-heading { flex-direction:column; align-items:center; gap:7px; }
  .comparison-table>.fun-panel-heading>.hint { font-size:11px; }
  .comparison-row,.comparison-labels { grid-template-columns:minmax(0,1fr) 115px minmax(0,1fr); gap:12px; }
  .comparison-labels b { font-size:11px; overflow-wrap:anywhere; }
  .comparison-labels>span { font-size:10px; }
  .comparison-metric b { font-size:11px; }
  .comparison-metric small { font-size:10px; }
  .metric-number { font-size:23px; }
  .metric-number small { display:none; }
  .compare-note { line-height:1.6; }
  .guess-setup,.guess-round { padding:22px 18px; }
  .guess-modes { gap:12px; }
  .guess-mode { padding:18px 12px; }
  .guess-mode h3 { font-size:20px; }
  .guess-mode p { font-size:12px; }
  .mode-art { height:80px; gap:6px; }
  .mode-score { width:56px; height:56px; font-size:32px; border-radius:16px; }
  .mode-art.complex { gap:6px; }
  .mode-art.complex i { width:16px; }
  .mode-check { right:10px; top:10px; width:17px; height:17px; font-size:10px; }
  .guess-inputs,.guess-results { grid-template-columns:1fr; }
  .guess-teacher h2 { font-size:25px; }
  .guess-verdict { gap:16px; }
  .guess-verdict h3 { font-size:20px; }
  .guess-accuracy { width:90px; height:90px; }
  .guess-accuracy b { font-size:25px; }
  .fun-centered-actions .btn { width:100%; }
}
@media(prefers-reduced-motion:reduce) { .fun-game { transition:none; } .fun-game:hover { transform:none; } }

/* Weekly voting stays blind until a vote is cast; final rounds get a podium. */
.weekly-results-lock { position:relative; min-height:290px; display:grid; place-items:center; margin-top:14px; overflow:hidden; border-radius:14px; }
.weekly-blur { position:absolute; inset:22px 4px; filter:blur(7px); opacity:.25; pointer-events:none; display:grid; gap:18px; }
.weekly-blur>div { display:flex; align-items:center; gap:14px; background:var(--panel2); border-radius:12px; padding:16px; }
.weekly-blur i { width:36px; height:36px; border-radius:50%; background:#777; flex:none; }
.weekly-blur span { height:10px; background:var(--red2); border-radius:8px; }
.weekly-blur b { color:var(--muted); }
.weekly-unlock-message { position:relative; z-index:1; text-align:center; padding:20px; }
.weekly-lock-icon { display:block; position:relative; width:48px; height:48px; margin:0 auto 18px; background:rgba(var(--accent-rgb),.12); border:1px solid rgba(var(--accent-rgb),.22); border-radius:14px; font-size:0; }
.weekly-lock-icon::before { content:''; position:absolute; width:16px; height:13px; left:14px; top:22px; border:2px solid var(--red2); border-radius:3px; }
.weekly-lock-icon::after { content:''; position:absolute; width:10px; height:11px; left:17px; top:12px; border:2px solid var(--red2); border-bottom:0; border-radius:7px 7px 0 0; }
.weekly-unlock-message h4 { font-size:17px; margin:0 0 9px; letter-spacing:-.025em; }
.weekly-unlock-message p { margin:0; color:var(--muted); font-size:13px; max-width:260px; line-height:1.6; }
.weekly-layout.finished { grid-template-columns:1fr; }
.weekly-preview-note { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px 16px; background:rgba(245,183,59,.06); border:1px solid rgba(245,183,59,.18); border-radius:12px; color:var(--mid); font-size:12px; margin:8px 0 16px; }
.weekly-preview-note a { color:var(--text); }
.weekly-finale { padding:40px 44px 24px; background:radial-gradient(ellipse at 50% 18%,rgba(245,183,59,.08),transparent 50%),var(--panel); overflow:hidden; }
.podium-heading { text-align:center; margin:0 0 24px; }
.podium-heading .fun-eyebrow { color:#d8b86c; font-size:10px; letter-spacing:.18em; }
.podium-heading h2 { font-size:clamp(25px,3vw,34px); letter-spacing:-.035em; margin:12px 0 10px; font-weight:850; }
.podium-heading p { margin:0; color:var(--muted); font-size:13px; }
.weekly-podium { display:flex; align-items:flex-end; justify-content:center; gap:18px; max-width:850px; margin:0 auto; padding-top:24px; }
.podium-place { flex:1; min-width:0; max-width:280px; text-align:center; --medal:#e8ba53; }
.podium-place.silver { --medal:#bcc7d9; }
.podium-place.bronze { --medal:#d69369; }
.podium-summary { padding:0 6px 22px; }
.podium-portrait-line { height:110px; display:flex; align-items:center; justify-content:center; position:relative; margin-bottom:14px; }
.gold .podium-portrait-line { height:128px; }
.podium-photo { width:84px; height:84px; }
.podium-photo>.avatar { width:100%; height:100%; border-radius:50%; margin:0; border:3px solid var(--medal); box-shadow:0 0 0 5px rgba(255,255,255,.025); }
.gold .podium-photo { width:108px; height:108px; }
.gold .podium-photo>.avatar { box-shadow:0 0 0 6px rgba(232,186,83,.07),0 0 42px -12px rgba(232,186,83,.5); }
.podium-crown { position:absolute; z-index:1; top:-24px; left:50%; transform:translateX(-50%); font-size:29px; color:var(--medal); text-shadow:0 0 18px rgba(232,186,83,.35); }
.podium-summary h3 { font-size:19px; letter-spacing:-.025em; line-height:1.25; height:2.5em; margin:0 0 8px; font-weight:800; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
.gold .podium-summary h3 { font-size:22px; }
.podium-votes { margin:0; color:var(--muted); font-size:12px; }
.podium-votes b { color:var(--medal); font-size:25px; font-weight:850; letter-spacing:-.035em; margin-right:3px; }
.podium-tie-portraits { display:flex; justify-content:center; align-items:center; padding:0 8px; }
.podium-tie-portraits>.avatar { width:64px; height:64px; border-radius:50%; border:3px solid var(--medal); flex:none; margin:0 0 0 -20px; background:var(--panel2); font-size:18px; }
.podium-tie-portraits>.avatar:first-child { margin-left:0; }
.podium-tie-more { display:grid; place-items:center; width:40px; height:40px; flex:none; margin-left:-12px; border:3px solid var(--panel); border-radius:50%; background:var(--medal); color:var(--bg); font-size:13px; font-weight:800; }
.podium-step { height:90px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; background:linear-gradient(180deg,rgba(188,199,217,.13),rgba(188,199,217,.02)); border:1px solid rgba(188,199,217,.2); border-bottom:0; border-radius:16px 16px 0 0; }
.gold .podium-step { height:125px; background:linear-gradient(180deg,rgba(232,186,83,.18),rgba(232,186,83,.035)); border-color:rgba(232,186,83,.28); }
.bronze .podium-step { height:65px; background:linear-gradient(180deg,rgba(214,147,105,.12),rgba(214,147,105,.025)); border-color:rgba(214,147,105,.2); }
.podium-step>span { font-size:40px; font-weight:900; color:var(--medal); line-height:1; letter-spacing:-.045em; }
.podium-step>small { color:var(--medal); font-size:9px; letter-spacing:.11em; font-weight:700; }
.podium-rest { max-width:850px; margin:0 auto; border-top:1px solid var(--line); padding:26px 0; }
.podium-rest>.fun-panel-title { font-size:15px; }
.podium-rest .weekly-leaders { gap:18px; margin-top:20px; }
.podium-rest .weekly-vote-count { color:var(--text); }
.podium-ties { max-width:850px; margin:0 auto; padding:20px 0 24px; border-top:1px solid var(--line); }
.podium-tie-note { color:var(--muted); font-size:12px; text-align:center; margin:0 0 20px; }
.podium-tie-group+.podium-tie-group { margin-top:20px; }
.podium-tie-group .fun-panel-heading { margin-bottom:12px; }
.podium-tie-group h3 { font-size:15px; margin:0; }
.podium-tie-roster { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:10px; }
.podium-tie-teacher { display:flex; align-items:center; gap:10px; padding:12px; border:1px solid var(--line); border-radius:12px; background:var(--panel2); text-decoration:none; color:var(--text); min-width:0; }
.podium-tie-teacher:hover,.podium-tie-teacher:focus-visible { border-color:var(--red2); }
.podium-tie-teacher>.avatar { width:36px; height:36px; border-radius:50%; flex:none; margin:0; font-size:12px; }
.podium-tie-teacher>b { font-size:13px; line-height:1.4; overflow-wrap:anywhere; }
.podium-tie-teacher>span { margin-left:auto; font-size:15px; color:var(--muted); flex:none; }
.podium-footer { display:flex; justify-content:center; align-items:center; gap:16px; padding-top:20px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; }
.guess-control.has-guess { border-color:rgba(var(--accent-rgb),.4); }
.guess-control.has-guess .guess-fine output { color:var(--red2); }
.guess-inputs:not(.single)>.guess-control:last-child:nth-child(odd),.guess-results:not(.single)>.guess-result-card:last-child:nth-child(odd) { grid-column:1/-1; width:100%; max-width:380px; justify-self:center; }
.fun-status:not(.live) i { background:var(--muted); }

/* Shared rating colors: difficulty reverses the 1–5 scale; review counts stay neutral. */
.rating-bar.good i { background:var(--good); }
.rating-bar.mid i { background:var(--mid); }
.rating-bar.bad i { background:var(--bad); }
.guess-control[data-tone="good"] { --guess-color:var(--good); --guess-outline:rgba(61,220,132,.4); }
.guess-control[data-tone="mid"] { --guess-color:var(--mid); --guess-outline:rgba(245,183,59,.4); }
.guess-control[data-tone="bad"] { --guess-color:var(--bad); --guess-outline:rgba(255,77,90,.4); }
.guess-control.has-guess { border-color:var(--guess-outline); }
.guess-control.has-guess .guess-fine output { color:var(--guess-color); }
.guess-control .guess-choices button.on { background:var(--guess-color); border-color:var(--guess-color); color:var(--bg); box-shadow:none; }
.guess-marker.guessed { background:var(--panel2); border:2px solid currentColor; }
.legend-guess { background:transparent; border:1.5px solid currentColor; }
.guess-marker.guessed.good,.legend-guess.good { color:var(--good); }
.guess-marker.guessed.mid,.legend-guess.mid { color:var(--mid); }
.guess-marker.guessed.bad,.legend-guess.bad { color:var(--bad); }
.guess-off.good { color:var(--good); background:rgba(61,220,132,.08); }
.guess-off.mid { color:var(--mid); background:rgba(245,183,59,.08); }
.guess-off.bad { color:var(--bad); background:rgba(255,77,90,.08); }
.guess-scale-distance.good { background:rgba(61,220,132,.5); }
.guess-scale-distance.mid { background:rgba(245,183,59,.5); }
.guess-scale-distance.bad { background:rgba(255,77,90,.5); }
.guess-accuracy { background:conic-gradient(var(--accuracy-color,var(--red2)) var(--accuracy),var(--line) 0); }
.poll-disclaimer { font-size:12px; line-height:1.6; color:var(--muted); margin:-8px 4px 24px; max-width:900px; }
.weekly-control-buttons { display:flex; flex-wrap:wrap; gap:10px; margin:18px 0; }
.guess-session-count { font-size:12px; margin:14px 0 0; }
.guess-rounded-note { font-size:12px; line-height:1.6; color:var(--muted); margin:14px auto 0; max-width:430px; padding:10px 14px; border:1px solid var(--line); border-radius:10px; background:var(--panel2); }
.guess-complete { max-width:650px; margin:0 auto; padding:32px; text-align:center; }
.guess-complete h2 { font-size:28px; letter-spacing:-.03em; margin:18px 0 24px; }
@media(max-width:720px) { .weekly-control-buttons .btn { width:100%; } .guess-complete { padding:24px 18px; } }
@media(max-width:720px) {
  .weekly-finale { padding:28px 18px 20px; }
  .weekly-podium { gap:8px; padding-top:22px; }
  .podium-summary { padding:0 0 16px; }
  .podium-portrait-line { height:72px; margin-bottom:10px; }
  .gold .podium-portrait-line { height:88px; }
  .podium-photo { width:56px; height:56px; }
  .gold .podium-photo { width:74px; height:74px; }
  .podium-summary h3 { font-size:12px; }
  .gold .podium-summary h3 { font-size:14px; }
  .podium-votes { font-size:10px; }
  .podium-votes b { font-size:20px; }
  .podium-crown { font-size:24px; top:-20px; }
  .podium-tie-portraits { padding:0; }
  .podium-tie-portraits>.avatar { width:31px; height:31px; border-width:2px; margin-left:-10px; font-size:10px; }
  .podium-tie-more { width:25px; height:25px; border-width:2px; margin-left:-6px; font-size:10px; }
  .podium-tie-roster { grid-template-columns:1fr; gap:8px; }
  .podium-step>span { font-size:30px; }
  .podium-step>small { font-size:7px; letter-spacing:.04em; }
  .podium-step { height:70px; border-radius:12px 12px 0 0; }
  .gold .podium-step { height:105px; }
  .bronze .podium-step { height:52px; }
  .podium-footer { flex-direction:column; gap:10px; }
  .weekly-preview-note { flex-direction:column; align-items:flex-start; line-height:1.6; }
}

/* ===== FISD Ratings: schools, landing page, live ticker ===== */
/* School logo on a light tile (the logos are drawn for white backgrounds). Without a logo: initials in the school colors. */
.school-icon { flex: none; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; overflow: hidden;
  background: linear-gradient(135deg, var(--s1, #1b4469), var(--s2, #e8b30f)); color: #fff; font-weight: 900; font-size: 11px; letter-spacing: .02em;
  text-shadow: 0 1px 2px rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.14); }
.school-icon.img { background: none; border: 0; text-shadow: none; padding: 0; overflow: visible; }
.school-icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* a faint light outline keeps black and navy logos visible on the dark background */
.school-icon.img img { width: 100%; height: 100%; filter: drop-shadow(0 0 1px rgba(255,255,255,.55)) drop-shadow(0 4px 10px rgba(0,0,0,.5)); }
.school-icon.fisd { --s1: #1b4469; --s2: #e8b30f; font-size: 9.5px; }
.school-icon.xs { width: 24px; height: 24px; border-radius: 7px; font-size: 7.5px; }
.school-icon.sm { width: 30px; height: 30px; border-radius: 9px; font-size: 9px; }
.school-icon.lg { width: 60px; height: 60px; border-radius: 17px; font-size: 16px; }
.school-icon.xl { width: 128px; height: 128px; border-radius: 34px; font-size: 30px; }
.school-tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 6px; border-radius: 99px; font-size: 11px; font-weight: 700; white-space: nowrap;
  background: var(--panel2); border: 1px solid var(--line); color: var(--text); vertical-align: middle; }
.school-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--s1, #888), var(--s2, #555)); box-shadow: 0 0 0 1px rgba(255,255,255,.2); }
.school-tag.has-logo::before { display: none; }
.school-tag .school-icon { width: 16px; height: 16px; margin: -2px 0; font-size: 0; border: 0; }
.school-tag .school-icon img { filter: drop-shadow(0 0 .6px rgba(255,255,255,.6)); }
.staff-chip .school-tag { margin-left: 2px; }

/* header: one logo, the school's name over "FISD Ratings", and a switcher to jump to any school */
.brand-wrap { display: flex; align-items: center; gap: 2px; flex: none; min-width: 0; }
.brand-wrap .brand { gap: 10px; min-width: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.12; min-width: 0; }
.brand .brand-text b { color: var(--text); font-size: 17px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.brand-text small { font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--red2); }
.brand-switch .switch-btn { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--muted); transition: .15s; }
.brand-switch .switch-btn:hover, .brand-switch.open .switch-btn { color: var(--text); background: var(--panel2); border-color: var(--line); }
.brand-switch .menu { left: 0; right: auto; }
.brand-switch:hover .menu, .brand-switch:focus-within .menu { display: none; } /* opens by clicking only */
.brand-switch.open .menu { display: block; }
.switch-menu .menu-card { width: 250px; max-height: min(70vh, 560px); overflow-y: auto; scrollbar-width: thin; }
.sw-item { display: flex !important; align-items: center; gap: 10px; }
.sw-item.on { background: rgba(var(--accent-rgb), .14); }
.sw-item small { margin-left: auto; font-size: 10.5px; font-weight: 700; color: var(--red2); }
.menu-schools { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.menu-item.accent { color: var(--red2); font-weight: 700; }

/* landing: hero with the district logo surrounded by every school */
.landing-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 30px; padding: 18px 0 14px; }
.lh-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; font-size: 11px; font-weight: 800; letter-spacing: .12em;
  color: var(--red2); background: rgba(var(--accent-rgb), .1); border: 1px solid rgba(var(--accent-rgb), .3); }
.landing-hero h1 { font-size: clamp(38px, 6vw, 64px); line-height: 1.02; margin: 0 0 16px; }
.lh-line { display: block; white-space: nowrap; }
.landing-hero h1 .grad { color: var(--red2); }
.landing-hero p { font-size: 17px; line-height: 1.55; max-width: 400px; }
.landing-hero p b { color: var(--text); font-weight: 700; }
.lh-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.lh-actions .btn { padding: 12px 20px; font-size: 15px; }
.lh-art { position: relative; height: 330px; display: grid; place-items: center; }
.lh-art::before { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--glow-rgb), .32), rgba(var(--glow-rgb), .1) 55%, transparent 72%); }
.orbit { position: absolute; width: 300px; height: 300px; border-radius: 50%; border: 1px dashed rgba(255,255,255,.12); animation: orbit 90s linear infinite; }
.orbit-slot { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; transform: rotate(var(--a)) translate(150px) rotate(calc(-1 * var(--a))); }
.orbit-slot .school-icon { width: 44px; height: 44px; border-radius: 13px; animation: orbit 90s linear infinite reverse; }
.lh-center { position: relative; z-index: 1; filter: drop-shadow(0 18px 40px rgba(0,0,0,.5)); }
@keyframes orbit { to { transform: rotate(360deg); } }

/* the three steps, as picture cards like the Fun page */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0 0 30px; }
.step-card { display: flex; flex-direction: column; overflow: hidden; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 0; color: inherit; transition: transform .18s, border-color .18s, box-shadow .18s; }
.step-card:hover { transform: translateY(-3px); border-color: rgba(var(--accent-rgb), .6); box-shadow: 0 14px 36px -18px var(--redglow); }
.step-card:focus-visible { outline: 2px solid var(--red2); outline-offset: 4px; }
.step-art { position: relative; height: 150px; overflow: hidden; display: grid; place-items: center; border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at 30% 0, rgba(var(--glow-rgb), .24), transparent 70%), #111113; }
.step-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.step-body .fun-eyebrow { color: var(--red2); }
.step-body h3 { margin: 8px 0 6px; font-size: 21px; letter-spacing: -.025em; }
.step-body p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.step-go { margin-top: auto; padding-top: 14px; display: flex; justify-content: space-between; align-items: center; color: var(--red2); font-weight: 700; font-size: 14px; }
.step-go span { width: 28px; height: 28px; display: grid; place-items: center; font-size: 18px; }
/* step 1: a fan of school logos */
.art-fan { display: flex; align-items: center; }
.art-fan { gap: 14px; }
.art-fan .school-icon { width: 46px; height: 46px; transform: translateY(calc(var(--d) * 1px)); }
.art-fan .school-icon:nth-child(3) { width: 64px; height: 64px; }
.art-fan .school-icon:nth-child(2), .art-fan .school-icon:nth-child(4) { z-index: 1; }
/* step 2: a search box and a result */
.art-search { width: 78%; display: grid; gap: 10px; }
.art-input { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 11px; background: var(--panel); border: 1px solid rgba(var(--accent-rgb), .55); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .12); font-size: 13px; color: var(--text); }
.art-input i { width: 2px; height: 15px; background: var(--red2); animation: caret 1s steps(1) infinite; }
.art-input svg { color: var(--muted); flex: none; }
@keyframes caret { 50% { opacity: 0; } }
.art-result { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); }
.art-result .avatar { width: 34px; height: 34px; border-radius: 10px; font-size: 12px; }
.art-result > span { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 12px; color: var(--muted); }
.art-result span b { color: var(--text); font-size: 13px; }
.art-result .score { width: 36px; height: 36px; border-radius: 10px; font-size: 15px; }
/* step 3: tap a number, stay anonymous */
.art-rate { display: grid; justify-items: center; gap: 12px; }
.art-rate .art-options { margin: 0; }
.art-lock { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; font-size: 11.5px; font-weight: 700; color: var(--good); background: rgba(61,220,132,.08); border: 1px solid rgba(61,220,132,.28); }

/* live ticker */
.live-panel { padding: 18px 0 16px; margin-bottom: 34px; overflow: hidden; }
.live-head { display: flex; align-items: center; gap: 12px; padding: 0 20px 14px; }
.live-head > b { font-size: 15px; }
.live-badge { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 99px; font-size: 11px; font-weight: 800; letter-spacing: .1em;
  color: var(--good); background: rgba(61,220,132,.08); border: 1px solid rgba(61,220,132,.3); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(61,220,132,.7); animation: live-pulse 1.6s ease-out infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(61,220,132,.7); opacity: 1; } 50% { opacity: .45; } 70% { box-shadow: 0 0 0 8px rgba(61,220,132,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,132,0); opacity: 1; } }
.live-total { margin-left: auto; font-size: 13px; color: var(--muted); padding: 5px 12px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line); white-space: nowrap; }
.live-total b { color: var(--text); font-size: 15px; }
.ticker { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.ticker-track { display: flex; gap: 10px; width: max-content; padding: 2px 0; animation: ticker var(--ticker-time, 60s) linear infinite; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 5px)); } }
.ticker-empty { padding: 6px 20px 0; margin: 0; }
.tick { display: flex; align-items: center; gap: 12px; width: 300px; flex: none; padding: 10px 12px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--line); transition: border-color .15s; }
.tick:hover { border-color: var(--red); }
.tick .score { width: 44px; height: 44px; border-radius: 12px; font-size: 17px; }
.tick-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tick-info b, .tick-info small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tick-info b { font-size: 14px; }
.tick-info small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.tick-meta { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.tick-meta small { color: var(--muted); font-size: 11px; }
@media (prefers-reduced-motion: reduce) {
  .ticker { overflow-x: auto; -webkit-mask-image: none; mask-image: none; padding: 0 20px; }
  .ticker-track { animation: none; }
  .ticker-track > [aria-hidden="true"] { display: none; }
  .live-dot, .orbit, .orbit-slot .school-icon, .art-input i { animation: none; }
}

/* school cards */
.school-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 40px; scroll-margin-top: 90px; }
.school-card { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 18px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); transition: transform .15s, border-color .15s, box-shadow .15s; }
.school-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.28); box-shadow: 0 16px 36px -16px var(--s1); }
.school-card.mine { border-color: rgba(255,255,255,.32); }
.sc-band { position: absolute; inset: 0 0 auto 0; height: 84px; background: linear-gradient(120deg, var(--s1), var(--s2)); opacity: .95; }
/* The band fades out by itself (a mask), so no hard edge can show where it ends. */
.sc-band { -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent 100%); mask-image: linear-gradient(180deg, #000 20%, transparent 100%); }
.sc-top { position: relative; display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.sc-mine { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.25); }
.school-card h3 { position: relative; margin: 2px 0 2px; font-size: 21px; letter-spacing: -.025em; }
.sc-sub { position: relative; margin: 0; color: var(--muted); font-size: 12.5px; }
.sc-stats { position: relative; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 4px 16px; margin: 14px 0 0; font-size: 12px; color: var(--muted); }
.sc-stats span { display: flex; flex-direction: column; }
.sc-stats b { color: var(--text); font-size: 16px; }
.sc-go { position: relative; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--text); display: flex; justify-content: space-between; }

/* choosing a school, wrong-school notice */
.school-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 0 0 12px; }
.school-opt { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.school-opt:hover { border-color: #555; }
.school-opt.on { border-color: var(--red); background: rgba(var(--accent-rgb), .14); box-shadow: 0 0 0 1px var(--red); }
.ws-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.ws-head .school-icon { width: 54px; height: 54px; border-radius: 15px; font-size: 14px; }
.ws-transfer { margin: 14px 0 18px; padding: 12px 14px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); }

/* staff panels */
.adm-title { display: flex; align-items: center; gap: 12px; }
.adm-title .school-icon { width: 48px; height: 48px; border-radius: 14px; font-size: 13px; }
.flag-box.neutral { background: var(--panel2); border-color: var(--line); }
.school-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 8px; }
.school-check { margin: 0; }
.adm-schools { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 40px; }
.adm-school { border-top: 4px solid var(--s1); padding: 18px; }
.adm-school-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.adm-school-head h3 { margin: 0; font-size: 17px; }
.adm-school-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 6px; }
.adm-school-stats .pill { padding: 8px 10px; border-radius: 10px; }
.adm-school-stats .pill b { font-size: 18px; }
.adm-school .toggle-row { padding: 8px 0; }
.school-table { display: grid; gap: 2px; font-size: 13px; overflow-x: auto; }
.st-row { display: grid; grid-template-columns: minmax(130px, 1.4fr) repeat(5, minmax(64px, 1fr)); gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; }
a.st-row:hover { background: var(--panel2); }
.st-head { color: var(--muted); font-size: 11.5px; font-weight: 600; }

@media (max-width: 900px) {
  .landing-hero { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 30px; }
  .lh-art { display: none; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .step-card { flex-direction: row; }
  .step-art { width: 132px; height: auto; min-height: 120px; flex: none; border-bottom: 0; border-right: 1px solid var(--line); }
  .step-body { padding: 14px 16px; }
  .step-body h3 { font-size: 18px; margin-top: 4px; }
  .step-body p { font-size: 13px; }
  .step-go { padding-top: 8px; }
  .art-fan { gap: 6px; }
  .art-fan .school-icon { width: 28px; height: 28px; }
  .art-fan .school-icon:nth-child(3) { width: 38px; height: 38px; }
  .art-fan .school-icon:nth-child(1), .art-fan .school-icon:nth-child(5) { display: none; }
  .art-search { width: 88%; gap: 6px; }
  .art-input { padding: 6px 8px; font-size: 11px; }
  .art-input svg { display: none; }
  .art-result { padding: 5px 6px; gap: 6px; }
  .art-result > span { display: none; }
  .art-result .score { width: 30px; height: 30px; font-size: 13px; margin: 0 auto; }
  .art-rate .art-options span { width: 20px; height: 20px; font-size: 10px; border-radius: 6px; }
  .art-rate .art-options { gap: 3px; }
  .art-lock { display: none; }
}
@media (max-width: 720px) {
  .live-head { flex-wrap: wrap; padding: 0 14px 12px; gap: 8px; }
  .tick { width: 260px; }
  .school-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .school-card { padding: 14px; }
  .school-card h3 { font-size: 17px; }
  .sc-band { height: 64px; }
  .sc-stats { grid-template-columns: repeat(2, auto); }
  .school-icon.lg { width: 48px; height: 48px; font-size: 13px; }
  .brand-text small { display: none; }
  .brand .brand-text b { font-size: 15px; max-width: 120px; }
  .brand-switch .menu { position: fixed; left: 12px; right: auto; top: 52px; }
  .adm-schools { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 380px) { .brand-text { display: none; } }
@media (max-width: 360px) { .school-grid { grid-template-columns: minmax(0, 1fr); } }
.nowrap { white-space: nowrap; }

/* ===== banners: a card under the header, with the scope's logo ===== */
.sb-stack { display: grid; gap: 8px; padding-top: 14px; }
.sb-card { --b: var(--accent-rgb); position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 12px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(100deg, rgba(var(--b), .2), rgba(var(--b), .06) 60%, rgba(255,255,255,.02)), var(--panel);
  border: 1px solid rgba(var(--b), .38); box-shadow: 0 10px 30px -22px rgba(var(--b), .9); }
.sb-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: rgb(var(--b)); }
.sb-card.neutral { --b: 235, 235, 240; }
.sb-card.success { --b: 34, 197, 94; }
.sb-card.news { --b: 59, 130, 246; }
.sb-card.warning { --b: 245, 179, 59; }
.sb-card.alert { --b: 239, 68, 68; }
.sb-icon { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: 17px; font-weight: 900; line-height: 1;
  color: #111; background: rgb(var(--b)); box-shadow: 0 0 0 4px rgba(var(--b), .16), 0 0 18px rgba(var(--b), .45); }
.sb-card.info .sb-icon { color: var(--on-accent); background: var(--red); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .18), 0 0 18px rgba(var(--accent-rgb), .45); }
.sb-card.alert .sb-icon, .sb-card.news .sb-icon { color: #fff; }
.sb-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sb-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red2); }
.sb-card.warning .sb-label { color: #f5c76b; } .sb-card.alert .sb-label { color: #ff8f8f; }
.sb-card.neutral .sb-label { color: #f2f2f5; } .sb-card.success .sb-label { color: #6ee7a0; } .sb-card.news .sb-label { color: #8ab8ff; }
.sb-label b { font-weight: 900; }
.sb-msg { font-size: 14.5px; line-height: 1.4; color: var(--text); overflow-wrap: anywhere; }
.sb-by { flex: none; padding-left: 12px; border-left: 1px solid var(--line); }
@media (max-width: 640px) {
  .sb-card { flex-wrap: wrap; gap: 4px 10px; padding: 10px 12px; }
  .sb-icon { width: 28px; height: 28px; font-size: 15px; }
  .sb-text { flex-basis: calc(100% - 40px); }
  .sb-by { padding: 4px 0 0 38px; border: 0; }
}

/* ===== landing tweaks ===== */
.lh-art { height: 372px; }
.art-result { padding: 9px 12px 9px 9px; }
.art-result .avatar { width: 46px; height: 46px; border-radius: 12px; font-size: 14px; }
.art-result > span { gap: 1px; }
.art-result > span small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art-result .school-tag { align-self: flex-start; margin-top: 3px; font-size: 10px; }
.art-result .score { width: 40px; height: 40px; font-size: 16px; flex: none; }

/* school cards: the logo on the school's colors, the name, three stat tiles */
.school-card { padding: 16px; }
.sc-band { height: 92px; }
.sc-top { margin-bottom: 16px; }
.school-card h3 { margin: 0 0 12px; font-size: 22px; }
.sc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; }
.sc-stat { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 2px; padding: 9px 4px; border-radius: 11px; background: var(--panel2); border: 1px solid var(--line); min-width: 0; }
.sc-stat b { color: var(--text); font-size: 17px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.sc-stat small { color: var(--muted); font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; line-height: 1.2; }
.sc-go { margin-top: 14px; padding-top: 12px; color: var(--muted); transition: color .15s; }
.school-card:hover .sc-go { color: var(--text); }
@media (max-width: 720px) {
  .sc-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .sc-stat { padding: 7px 2px; border-radius: 9px; }
  .sc-stat b { font-size: 14px; }
  .sc-stat small { font-size: 8px; letter-spacing: .02em; }
  .school-card h3 { margin-bottom: 10px; }
}

/* placeholder pictures and the "no photos" note */
.photo-note { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; color: var(--muted);
  background: rgba(245, 179, 59, .08); border: 1px solid rgba(245, 179, 59, .3); }
.photo-note b { color: #f5c76b; }
.pn-icon { flex: none; }

/* Guidelines → Meet the admins */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 14px; }
.team-card { padding: 16px; border-radius: 16px; background: var(--panel2); border: 1px solid var(--line); }
.team-card p { margin: 12px 0 0; font-size: 14px; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; white-space: pre-line; }
.team-card p.hint { color: var(--muted); font-style: italic; }
.team-top { display: flex; align-items: center; gap: 12px; }
.team-pfp { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; background: var(--tint); border: 2px solid rgba(var(--accent-rgb), .5); font-weight: 800; color: var(--tint-text); }
.team-pfp img { width: 100%; height: 100%; object-fit: cover; display: block; }
.team-id { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.team-id > b { font-size: 16.5px; overflow-wrap: anywhere; }
.team-badges { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.rank-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 800; }
.rank-badge.admin { background: rgba(245, 197, 66, .14); color: #f5c542; border: 1px solid rgba(245, 197, 66, .35); }
@media (max-width: 720px) {
  .art-result { justify-content: center; }
  .art-result .avatar { width: 34px; height: 34px; border-radius: 10px; }
  .art-result .score { width: 30px; height: 30px; font-size: 13px; margin: 0; }
}

/* banner icons: symbols in a solid circle, emoji in a soft ring */
.sb-icon.emoji { color: inherit; background: rgba(var(--b), .14); box-shadow: 0 0 0 1px rgba(var(--b), .45); font-size: 16px; }
.sb-card.info .sb-icon.emoji { background: rgba(var(--accent-rgb), .14); box-shadow: 0 0 0 1px rgba(var(--accent-rgb), .45); }
.sb-card.no-icon { padding-left: 16px; }

/* admin: banner list and editor */
.banner-list { display: grid; gap: 12px; }
.banner-row { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--line); }
.banner-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 13px; color: var(--muted); }
.banner-meta b { color: var(--text); font-weight: 700; }
.banner-acts { margin-left: auto; display: flex; gap: 8px; }
.banner-preview { margin: 4px 0 14px; }
.pick-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pick { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 12px; border-radius: 99px; font-size: 13px; font-weight: 600;
  background: var(--panel2); border: 1px solid var(--line); color: var(--muted); cursor: pointer; }
.pick:hover { color: var(--text); border-color: rgba(255,255,255,.25); }
.pick.on { color: var(--text); border-color: var(--red2); background: rgba(var(--accent-rgb), .16); box-shadow: inset 0 0 0 1px var(--red2); }
.pick-row.icons .pick { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 12px; }
.pick-row.icons .pick:last-child { width: auto; padding: 0 12px; }
.pick-icon { font-size: 17px; font-weight: 900; color: var(--text); }
.pick-none { font-size: 12px; }
.swatch::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 7px; border-radius: 50%; vertical-align: -1px; background: var(--red); }
.swatch.neutral::before { background: #ebebf0; } .swatch.news::before { background: #3b82f6; } .swatch.success::before { background: #22c55e; }
.swatch.warning::before { background: #f5b33b; } .swatch.alert::before { background: #ef4444; }
@media (max-width: 640px) { .banner-acts { margin-left: 0; } }

/* admin: shared weekly questions */
.weekly-source { margin: 0 0 14px; }
.weekly-schools { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.weekly-school { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); color: inherit; text-align: left; cursor: pointer; }
.weekly-school:hover { border-color: rgba(255,255,255,.25); }
.weekly-school .school-icon { width: 30px; height: 30px; flex: none; }
.ws-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ws-name small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-tag { flex: none; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 99px; background: rgba(255,255,255,.06); color: var(--muted); }
.ws-tag.shared { background: rgba(var(--accent-rgb), .16); color: var(--red2); }
.ws-tag.own { background: rgba(34,197,94,.14); color: #6ee7a0; }

/* ===== Stats (#/stats) ===== */
.stats-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 4px 0 18px; }
.stats-totals > div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 8px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.stats-totals b { font-size: 26px; font-weight: 900; letter-spacing: -.03em; }
.stats-totals span { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stats-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats-art { display: flex; flex-direction: column; justify-content: center; }
/* card art: bars that grow in */
.bars-art { gap: 9px; padding: 22px 28px; }
.mini-bar { display: flex; align-items: center; gap: 10px; }
.mini-bar .school-icon { width: 24px; height: 24px; flex: none; }
.mini-track { flex: 1; height: 12px; border-radius: 4px; background: rgba(255,255,255,.05); overflow: hidden; }
.mini-track i { display: block; height: 100%; width: var(--w); border-radius: 4px; background: linear-gradient(90deg, var(--c1), var(--c2)); transform-origin: left;
  animation: bar-grow .9s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 90ms + 150ms); }
@keyframes bar-grow { from { transform: scaleX(0); } }
/* card art: a small podium */
.podium-art { flex-direction: row; align-items: flex-end; justify-content: center; gap: 10px; padding-bottom: 0; }
.mini-place { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mini-place .avatar { width: 46px; height: 46px; border-radius: 14px; box-shadow: 0 0 0 2px rgba(61,220,132,.5), 0 0 18px rgba(61,220,132,.35); }
.mini-place.p1 .avatar { width: 58px; height: 58px; border-radius: 16px; box-shadow: 0 0 0 2px rgba(61,220,132,.8), 0 0 26px rgba(61,220,132,.5); }
.mini-step { display: grid; place-items: center; width: 64px; border-radius: 10px 10px 0 0; font-weight: 900; font-size: 18px; color: var(--text);
  background: linear-gradient(180deg, rgba(61,220,132,.28), rgba(27,27,30,.9)); border: 1px solid rgba(61,220,132,.35); border-bottom: 0;
  animation: step-rise .8s cubic-bezier(.2,.8,.2,1) both; transform-origin: bottom; }
.mini-place.p1 .mini-step { height: 70px; width: 76px; font-size: 24px; } .mini-place.p2 .mini-step { height: 50px; } .mini-place.p3 .mini-step { height: 36px; }
@keyframes step-rise { from { transform: scaleY(0); } }

/* shared controls */
.stats-panel { padding: 18px; }
.stats-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.stats-pickers { display: flex; flex-wrap: wrap; gap: 8px; }
.stats-actions { display: flex; gap: 8px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); }
.seg-btn { padding: 7px 13px; border-radius: 9px; font-size: 13.5px; font-weight: 700; color: var(--muted); background: none; border: 0; cursor: pointer; transition: background .2s, color .2s; white-space: nowrap; }
.seg-btn:hover { color: var(--text); }
.seg-btn.on { background: var(--red); color: var(--on-accent); }
.next-stat { font-size: 18px; font-weight: 800; }
.next-stat.spin { animation: nudge .45s ease; }
@keyframes nudge { 40% { transform: translateX(5px); } }

/* the school bar chart */
.chart-title { margin: 4px 0 12px; font-size: 22px; letter-spacing: -.02em; }
.chart-title.swap { animation: title-swap .45s ease; }
@keyframes title-swap { from { opacity: 0; transform: translateX(-12px); } }
.bar-chart { display: grid; gap: 6px; }
.bar-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 64px; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 12px; color: inherit;
  transition: transform .6s cubic-bezier(.2,.8,.2,1), background .15s; }
.bar-row:hover { background: rgba(255,255,255,.04); }
.bar-name { display: flex; align-items: center; gap: 9px; min-width: 0; font-weight: 700; font-size: 14px; }
.bar-name span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-name .school-icon { width: 28px; height: 28px; flex: none; }
.bar-track { height: 18px; border-radius: 4px; background: rgba(255,255,255,.05); overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, var(--c1), var(--c2)); transition: width .7s cubic-bezier(.2,.8,.2,1); }
.bar-val { text-align: right; font-size: 16px; font-variant-numeric: tabular-nums; }
.chart-caption { margin: 12px 0 0; }

/* the teacher leaderboard */
.stat-board { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.stat-board li { animation: row-in .45s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 40ms); }
@keyframes row-in { from { opacity: 0; transform: translateY(10px); } }
.sb-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--line); color: inherit; }
.sb-row:hover { border-color: rgba(255,255,255,.25); }
.sb-rank { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-weight: 900; font-size: 14px; background: #26262b; color: var(--muted); }
.sb-rank.r1 { background: #ffd24a; color: #111; } .sb-rank.r2 { background: #cfd3da; color: #111; } .sb-rank.r3 { background: #d08b4f; color: #111; }
.sb-row .avatar { width: 42px; height: 42px; border-radius: 12px; font-size: 14px; }
.sb-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sb-who b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-who small { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: 12px; }
.sb-role { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-score, .sb-count { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sb-score small, .sb-count small { font-size: 10.5px; color: var(--muted); }
.sb-score .score { width: 44px; height: 36px; border-radius: 10px; font-size: 16px; }
.sb-count b { font-size: 20px; font-weight: 900; }

/* the podium */
.podium-stage { --g: 61,220,132; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 12px; padding: 20px 4px 0; margin-bottom: 12px;
  background: radial-gradient(ellipse at 50% 70%, rgba(var(--g), .16), transparent 65%); }
.podium-stage.bad { --g: 255,77,90; }
.pod-col { display: flex; flex-direction: column; align-items: center; color: inherit; min-width: 0; }
.pod-who { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 4px 12px; text-align: center; min-width: 0; max-width: 100%;
  animation: pod-drop .6s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(.35s + var(--i) * 120ms); }
.pod-who > b { font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.pod-pic .avatar { box-shadow: 0 0 0 3px rgba(var(--g), .75), 0 0 30px rgba(var(--g), .55); }
.p1 .pod-pic .avatar { width: 96px; height: 96px; border-radius: 26px; font-size: 30px; box-shadow: 0 0 0 4px rgb(var(--g)), 0 0 44px rgba(var(--g), .7); }
.pod-who .score { width: 48px; height: 34px; border-radius: 10px; font-size: 16px; }
.pod-step { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 16px 16px 0 0;
  background: linear-gradient(180deg, rgba(var(--g), .3), rgba(27,27,30,.95)); border: 1px solid rgba(var(--g), .45); border-bottom: 0;
  transform-origin: bottom; animation: step-rise .7s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 100ms); }
.pod-step span { font-size: 40px; font-weight: 900; }
.pod-step small { font-size: 11px; color: var(--muted); }
.p1 .pod-step { height: 170px; border-color: rgba(var(--g), .8); } .p1 .pod-step span { font-size: 56px; }
.p2 .pod-step { height: 125px; } .p3 .pod-step { height: 95px; }
@keyframes pod-drop { from { opacity: 0; transform: translateY(-18px); } }
@media (prefers-reduced-motion: reduce) {
  .mini-track i, .mini-step, .stat-board li, .pod-who, .pod-step, .chart-title.swap, .next-stat.spin { animation: none; }
  .bar-row, .bar-fill { transition: none; }
}
@media (max-width: 720px) {
  .stats-totals { gap: 8px; } .stats-totals > div { padding: 10px 4px; } .stats-totals b { font-size: 20px; } .stats-totals span { font-size: 9.5px; }
  .stats-cards { grid-template-columns: minmax(0, 1fr); }
  .stats-panel { padding: 12px; }
  .stats-bar { flex-direction: column; align-items: stretch; }
  .stats-pickers { flex-direction: column; }
  .seg { display: flex; } .seg-btn { flex: 1; padding: 8px 6px; font-size: 13px; }
  .stats-actions { justify-content: flex-end; }
  .bar-row { grid-template-columns: 122px minmax(0, 1fr) 42px; gap: 8px; padding: 6px 2px; }
  .bar-name { font-size: 12px; gap: 5px; letter-spacing: -.01em; } .bar-name .school-icon { width: 20px; height: 20px; }
  .bar-track { height: 14px; } .bar-val { font-size: 13.5px; }
  .chart-title { font-size: 18px; }
  .sb-row { gap: 9px; padding: 8px; } .sb-row .avatar { width: 36px; height: 36px; } .sb-rank { width: 26px; height: 26px; font-size: 12.5px; }
  .sb-who b { font-size: 14px; } .sb-role { display: none; }
  .pod-who > b { font-size: 12.5px; } .p1 .pod-pic .avatar { width: 70px; height: 70px; border-radius: 20px; } .pod-pic .avatar { width: 52px; height: 52px; }
  .pod-who .school-tag { font-size: 10px; max-width: 100%; } .pod-step span { font-size: 28px; } .p1 .pod-step span { font-size: 40px; }
  .p1 .pod-step { height: 130px; } .p2 .pod-step { height: 96px; } .p3 .pod-step { height: 72px; }
  .podium-stage { gap: 6px; }
}

.stats-bar.stacked { flex-direction: column; align-items: flex-start; }
.stats-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; }
.stat-board li, .sb-row { min-width: 0; }
@media (max-width: 720px) {
  .stats-bar.stacked { align-items: stretch; }
  .stats-bar.stacked > .seg { width: 100%; }
  .stats-row .seg { flex: 1; }
  .sb-score .score { width: 40px; height: 32px; font-size: 15px; }
}

/* Stats, round 2: solid school colors, gold/silver/bronze podiums, readable ranks */
.mini-track i, .bar-fill { background: var(--c); }
.mini-place .avatar, .pod-pic .avatar { --m: 255,210,74; }
.mini-place.p2 .avatar, .pod-col.p2 .pod-pic .avatar { --m: 207,211,218; }
.mini-place.p3 .avatar, .pod-col.p3 .pod-pic .avatar { --m: 208,139,79; }
.mini-place .avatar, .mini-place.p1 .avatar { box-shadow: 0 0 0 2px rgba(var(--m), .85); }
.mini-step { background: linear-gradient(180deg, rgba(var(--m), .28), rgba(27,27,30,.9)); border-color: rgba(var(--m), .45); }
.mini-place { --m: 255,210,74; } .mini-place.p2 { --m: 207,211,218; } .mini-place.p3 { --m: 208,139,79; }
.podium-stage { background: none; }
.pod-col { --m: 255,210,74; } .pod-col.p2 { --m: 207,211,218; } .pod-col.p3 { --m: 208,139,79; }
.pod-pic .avatar, .p1 .pod-pic .avatar { box-shadow: 0 0 0 3px rgb(var(--m)); }
.pod-step, .p1 .pod-step { background: linear-gradient(180deg, rgba(var(--m), .3), rgba(27,27,30,.95)); border-color: rgba(var(--m), .55); }
.pod-step span { color: rgb(var(--m)); }
.sb-rank { background: #2e2e34; color: var(--text); }

/* Teacher pictures are circles everywhere, with a thin ring; teachers without a photo get the same circle with initials.
   (Many pages size .avatar with their own corner radius; this one rule overrides them all.) */
.avatar { border-radius: 50% !important; border: 2px solid rgba(var(--accent-rgb), .45); }
.avatar img { border-radius: 50%; }
/* the Stats cards' arrow has no box behind it */
.stats-cards .fun-game-action span { background: none; }
/* the Stats leaderboard: gold, silver and bronze rows for the top three */
.stat-board li:nth-child(-n+3) .sb-row { --m: 255,210,74; background: linear-gradient(90deg, rgba(var(--m), .16), rgba(var(--m), .03)), var(--panel2); border-color: rgba(var(--m), .45); }
.stat-board li:nth-child(2) .sb-row { --m: 207,211,218; }
.stat-board li:nth-child(3) .sb-row { --m: 208,139,79; }
.stat-board li:nth-child(-n+3) .avatar { border-color: rgb(var(--m)); }
/* On the district's pages the main button is gold and turns blue on hover (schools keep their own color). */
#top-review { background: var(--cta, var(--red)); border-color: var(--cta, var(--red)); color: var(--cta-text, var(--on-accent)); transition: background .18s, border-color .18s, color .18s; }
#top-review:hover { background: var(--cta-hover, var(--red2)); border-color: var(--cta-hover, var(--red2)); color: var(--on-accent); }

/* Quieter medal rows, and medal-colored rings that replace a picture's normal ring instead of sitting on top of it. */
.stat-board li:nth-child(-n+3) .sb-row { background: linear-gradient(90deg, rgba(var(--m), .075), rgba(var(--m), .01)), var(--panel2); border-color: rgba(var(--m), .22); }
.stat-board li:nth-child(-n+3) .avatar, .pod-pic .avatar, .p1 .pod-pic .avatar, .mini-place .avatar, .mini-place.p1 .avatar { border: 2px solid rgb(var(--m)); box-shadow: none; }
.p1 .pod-pic .avatar { border-width: 3px; }

/* School cards on phones: two cards per row leave no room for three tiles side by side,
   so the three numbers become one small table (label left, number right), all the same size. */
@media (max-width: 720px) {
  .sc-stats { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 2px 0; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); }
  .sc-stats .sc-stat { flex-direction: row-reverse; justify-content: space-between; align-items: baseline; padding: 5px 9px; border: 0; border-radius: 0; background: none; }
  .sc-stats .sc-stat + .sc-stat { border-top: 1px solid var(--line); }
  .sc-stat b { font-size: 13.5px; }
  .sc-stat small { font-size: 9.5px; letter-spacing: .04em; }
  .school-card h3 { font-size: 18px; letter-spacing: -.02em; overflow-wrap: anywhere; }
  .sc-mine { white-space: nowrap; font-size: 10px; padding: 3px 7px; }
}

/* ===== Seasonal skins (season.js): decoration only, never takes clicks ===== */
.season-layer { position: fixed; inset: 0; z-index: 15; pointer-events: none; overflow: hidden; }
.season-glow { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.season-toggle { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }
.season-toggle:hover { color: var(--red2); }
.brand-wrap { position: relative; }

/* Halloween: corner webs, a spider on a thread, bats, an orange and purple glow */
.season-halloween .season-glow { background: radial-gradient(760px 420px at 0% 100%, rgba(255,122,24,.10), transparent 70%), radial-gradient(760px 420px at 100% 100%, rgba(140,70,220,.10), transparent 70%); }
.season-halloween .top { border-bottom-color: rgba(255,130,40,.35); box-shadow: 0 1px 22px -8px rgba(255,120,20,.45); }
.web { position: absolute; top: var(--head-h, 64px); width: 170px; height: 170px; color: rgba(225,225,235,.24); }
.web-left { left: 0; }
.web-right { right: 0; transform: scaleX(-1); }
.spider { position: absolute; top: calc(var(--head-h, 64px) + 20px); right: 75px; display: flex; flex-direction: column; align-items: center; transform-origin: 50% 0; animation: spider-sway 7s ease-in-out infinite; }
.spider-thread { width: 1px; height: 96px; background: rgba(225,225,235,.55); animation: spider-drop 7s ease-in-out infinite; }
.spider-body { width: 26px; height: 33px; margin-top: -8px; color: #141016; filter: drop-shadow(0 0 1px rgba(255,170,80,.95)) drop-shadow(0 0 7px rgba(255,130,30,.6)); }
@keyframes spider-drop { 0%, 100% { height: 70px; } 50% { height: 140px; } }
@keyframes spider-sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
.bat { position: absolute; left: 0; width: 34px; color: #160f1a; filter: drop-shadow(0 0 1px rgba(255,170,80,.9)) drop-shadow(0 0 6px rgba(255,130,30,.5)); animation: bat-fly var(--fly, 26s) linear infinite; animation-delay: var(--wait, 0s); transform: translateX(-80px); }
.bat-svg { display: block; width: 100%; overflow: visible; }
.bat .wing { transform-box: view-box; animation: .26s ease-in-out infinite alternate; }
.bat .wing-l { transform-origin: 23px 10px; animation-name: wing-l; }
.bat .wing-r { transform-origin: 25px 10px; animation-name: wing-r; }
@keyframes wing-l { from { transform: rotate(22deg); } to { transform: rotate(-26deg); } }
@keyframes wing-r { from { transform: rotate(-22deg); } to { transform: rotate(26deg); } }
.bat.b1 { top: 24%; --fly: 26s; --wait: -2s; }
.bat.b2 { top: 46%; width: 26px; --fly: 33s; --wait: -14s; }
.bat.b3 { top: 15%; width: 22px; --fly: 41s; --wait: -27s; }

/* each bat crosses the screen in the first 40% of its loop, then waits off-screen */
@keyframes bat-fly { 0% { transform: translate(-80px, 0); } 8% { transform: translate(18vw, -26px); } 16% { transform: translate(38vw, 8px); } 24% { transform: translate(58vw, -30px); } 32% { transform: translate(78vw, -4px); } 40%, 100% { transform: translate(calc(100vw + 80px), -24px); } }

/* Winter: snow, a snow-capped header with icicles, a cold blue glow */
.season-winter .season-glow { background: radial-gradient(760px 420px at 0% 100%, rgba(120,190,255,.10), transparent 70%), radial-gradient(760px 420px at 100% 100%, rgba(90,140,255,.10), transparent 70%),
  radial-gradient(900px 420px at 30% -60px, rgba(170,215,255,.09), transparent 70%), linear-gradient(180deg, rgba(14,34,70,.35), rgba(14,34,70,0) 70%); }
.season-winter .top { border-bottom-color: rgba(170,215,255,.28); box-shadow: 0 1px 22px -8px rgba(140,200,255,.4); }
/* frost: a pale top edge and a cool sheen in the upper corners of cards */
.season-winter :is(.panel, .step-card, .school-card, .fun-game, .stats-totals > div):not(:hover) { border-top-color: rgba(190,225,255,.32);
  box-shadow: inset 0 1px 0 rgba(210,235,255,.12), inset 60px 40px 80px -60px rgba(170,215,255,.07), inset -60px 40px 80px -60px rgba(170,215,255,.07); }
/* gold stays on buttons and titles; small details turn icy blue */
.season-winter :is(.fun-eyebrow, .step-body .fun-eyebrow, .step-go, .fun-game-action, .live-badge) { color: #9fd3ff; }
.flake { position: absolute; top: -14px; width: var(--s); height: var(--s); opacity: var(--o); animation: snow-fall var(--d) linear var(--delay) infinite; }
.flake i { display: block; width: 100%; height: 100%; border-radius: 50%; background: #eef6ff; animation: snow-sway 4s ease-in-out infinite alternate; }
.flake.near i { filter: blur(1.6px); }
.flake.mid i { filter: blur(.4px); }
@keyframes snow-fall { to { transform: translate(var(--x), calc(100vh + 30px)); } }
@keyframes snow-sway { from { transform: translateX(-7px); } to { transform: translateX(7px); } }

@media (max-width: 720px) {
  .web { width: 104px; height: 104px; }
  .spider { right: 44px; top: calc(var(--head-h, 64px) + 12px); }
  .bat { width: 26px; } .bat.b2 { width: 20px; } .bat.b3 { display: none; }
  .flake:nth-child(n+23) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .flake, .bat { display: none; }
  .spider-thread, .spider-body { animation: none; }
}

/* Halloween: the home page's logo circle glows a soft orange instead of blue */
.season-halloween .lh-art::before { background: radial-gradient(circle, rgba(255,122,24,.16), rgba(255,122,24,.05) 55%, transparent 72%); }
/* the main button's glow matches its own color */
#top-review { box-shadow: 0 4px 20px var(--cta-glow, var(--redglow)); }
#top-review:hover { box-shadow: 0 4px 20px var(--cta-hover-glow, var(--redglow)); }
