/* ============================================================
   BITSAT Daily: Google Pay–style theme (Material 3, blue)
   Light by default; dark via system preference or data-theme.
   ============================================================ */
:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-1: #ffffff;
  --surface-2: #f1f4f9;
  --surface-3: #e7ecf4;
  --on: #1d2433;
  --on-2: #535c6e;
  --on-3: #858d9c;
  --outline: #c4ccd9;
  --outline-v: #e2e7ef;
  --divider: #edf0f5;
  --primary: #1769f2;
  --on-primary: #ffffff;
  --pc: #e6efff;
  --on-pc: #0f3a8a;
  --sc: #eaf1ff;
  --on-sc: #1d4fb8;
  --inverse: #1d2433;
  --on-inverse: #f4f6fa;
  --error: #d93838;
  --success: #1b8a4f;
  --ok-c: #e3f6ec;
  --on-ok-c: #0f5132;
  --warn: #a46f00;
  --warn-c: #fff5d6;
  --on-warn-c: #5c4300;
  --logo: #0075ff;
  --state-hover: rgba(29, 36, 51, 0.05);
  --state-press: rgba(29, 36, 51, 0.09);
  --disabled-bg: rgba(29, 36, 51, 0.07);
  --disabled-on: rgba(29, 36, 51, 0.35);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 4px 12px rgba(16, 24, 40, 0.06);
  --shadow-2: 0 2px 6px rgba(16, 24, 40, 0.06), 0 12px 32px rgba(16, 24, 40, 0.1);
  /* Google brand hues for accents */
  --g-blue: #4285f4;
  --g-red: #ea4335;
  --g-yellow: #fbbc04;
  --g-green: #34a853;
  /* campus illustrations: monochrome blue scene, Google Pay style */
  --k0: #eef3fd;
  --k1: #dde7fb;
  --k2: #c6d7f7;
  --k3: #a9c3f2;
  --k4: #88aaeb;
  --k5: #6690e0;
  --k-sun: #fde9a9;
  --k-face: #ffffff;
  --k-sand: #f5ead0;
  --k-ink: #4a6aa8;
  --fire: #e8690a;
  --c-en: #1769f2;
  --c-lr: #1b8a4f;
  --on-fire: #ffffff;
  --fire-c: #fff3e6;
  --on-fire-c: #6a3300;
  --page-web: #eef2f8;
  --card-web: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #10141b;
    --surface: #171c25;
    --surface-1: #1b212b;
    --surface-2: #212834;
    --surface-3: #2a3240;
    --on: #e6e9f0;
    --on-2: #a9b1c1;
    --on-3: #7c8597;
    --outline: #3e4757;
    --outline-v: #2c3442;
    --divider: #242b37;
    --primary: #7aa7ff;
    --on-primary: #0b1f4a;
    --pc: #1d3466;
    --on-pc: #d9e5ff;
    --sc: #1f2f52;
    --on-sc: #c9dafc;
    --inverse: #e6e9f0;
    --on-inverse: #171c25;
    --error: #ff8a80;
    --success: #5fd394;
    --ok-c: #163a2a;
    --on-ok-c: #c8f0d9;
    --warn: #f2c14e;
    --warn-c: #3a2f12;
    --on-warn-c: #fde4a5;
    --logo: #ffffff;
    --state-hover: rgba(230, 233, 240, 0.06);
    --state-press: rgba(230, 233, 240, 0.1);
    --disabled-bg: rgba(230, 233, 240, 0.08);
    --disabled-on: rgba(230, 233, 240, 0.35);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 16px rgba(0, 0, 0, 0.25);
    --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.35), 0 14px 36px rgba(0, 0, 0, 0.35);
    --k0: #16213a;
    --k1: #1c2b4a;
    --k2: #24375d;
    --k3: #2e4573;
    --k4: #3b578e;
    --k5: #5272b2;
    --k-sun: #e9d48f;
    --k-face: #dfe7f7;
    --k-sand: #3a3322;
    --k-ink: #9db6e6;
    --fire: #ffa65c;
    --c-en: #4d8af0;
    --c-lr: #2f9d63;
    --on-fire: #2a1500;
    --fire-c: #3a2512;
    --on-fire-c: #ffd9b8;
    --page-web: #0d1117;
    --card-web: #171c25;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #10141b;
  --surface: #171c25;
  --surface-1: #1b212b;
  --surface-2: #212834;
  --surface-3: #2a3240;
  --on: #e6e9f0;
  --on-2: #a9b1c1;
  --on-3: #7c8597;
  --outline: #3e4757;
  --outline-v: #2c3442;
  --divider: #242b37;
  --primary: #7aa7ff;
  --on-primary: #0b1f4a;
  --pc: #1d3466;
  --on-pc: #d9e5ff;
  --sc: #1f2f52;
  --on-sc: #c9dafc;
  --inverse: #e6e9f0;
  --on-inverse: #171c25;
  --error: #ff8a80;
  --success: #5fd394;
  --ok-c: #163a2a;
  --on-ok-c: #c8f0d9;
  --warn: #f2c14e;
  --warn-c: #3a2f12;
  --on-warn-c: #fde4a5;
  --logo: #ffffff;
  --state-hover: rgba(230, 233, 240, 0.06);
  --state-press: rgba(230, 233, 240, 0.1);
  --disabled-bg: rgba(230, 233, 240, 0.08);
  --disabled-on: rgba(230, 233, 240, 0.35);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 16px rgba(0, 0, 0, 0.25);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.35), 0 14px 36px rgba(0, 0, 0, 0.35);
  --k0: #16213a;
  --k1: #1c2b4a;
  --k2: #24375d;
  --k3: #2e4573;
  --k4: #3b578e;
  --k5: #5272b2;
  --k-sun: #e9d48f;
  --k-face: #dfe7f7;
  --k-sand: #3a3322;
  --k-ink: #9db6e6;
  --fire: #ffa65c;
  --c-en: #4d8af0;
  --c-lr: #2f9d63;
  --on-fire: #2a1500;
  --fire-c: #3a2512;
  --on-fire-c: #ffd9b8;
  --page-web: #0d1117;
  --card-web: #171c25;
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--on);
  font: 400 16px/1.5 "Plus Jakarta Sans", Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button,
input {
  font: inherit;
  color: inherit;
}
button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
img {
  display: block;
  max-width: 100%;
}
h1,
h2,
h3,
p {
  margin: 0;
}
.num {
  font-variant-numeric: tabular-nums;
}
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.msr {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  flex: none;
  user-select: none;
  overflow: hidden;
  width: 1em;
}
.msr.fill {
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

/* ---------- app column (no device frame) ---------- */
.phone {
  position: relative;
  max-width: 440px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--surface);
  display: flex;
  flex-direction: column;
}

/* ---------- page + transitions ---------- */
.page {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.page.fwd {
  animation: inR 0.32s cubic-bezier(0.2, 0, 0, 1);
}
.page.back {
  animation: inL 0.32s cubic-bezier(0.2, 0, 0, 1);
}
@keyframes inR {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
}
@keyframes inL {
  from {
    opacity: 0;
    transform: translateX(-28px);
  }
}
.body {
  flex: 1;
  padding: 8px 24px 24px;
  display: flex;
  flex-direction: column;
}

/* ---------- top app bar ---------- */
.tb {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 64px;
  padding: 0 8px;
  flex: none;
}
.tb-sp {
  flex: 1;
}
.ib {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--on-2);
}
.ib:hover {
  background: var(--state-hover);
}
.ib:active {
  background: var(--state-press);
}
.prog {
  height: 4px;
  margin: 0 24px 8px;
  border-radius: 2px;
  background: var(--pc);
  overflow: hidden;
  flex: none;
}
.prog i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--primary);
  transition: width 0.45s cubic-bezier(0.2, 0, 0, 1);
}

/* ---------- brand ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 28px;
}
.logo {
  display: block;
  height: 26px;
  width: auto;
  color: var(--logo);
  flex: none;
}
.brand span {
  font-size: 14px;
  font-weight: 500;
  color: var(--on-2);
  padding-left: 12px;
  border-left: 1px solid var(--outline-v);
}

/* ---------- typography ---------- */
.h1 {
  font-size: 28px;
  line-height: 36px;
  font-weight: 400;
}
.sub {
  margin-top: 8px;
  font-size: 16px;
  line-height: 24px;
  color: var(--on-2);
}
.sub b {
  font-weight: 500;
  color: var(--on);
}
.lbl {
  font-size: 14px;
  font-weight: 500;
  color: var(--on-2);
  margin: 28px 0 12px;
}
.link {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
}
.link:hover {
  text-decoration: underline;
}
.fine {
  font-size: 12px;
  line-height: 16px;
  color: var(--on-3);
  text-align: center;
}
.helper {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 8px;
  padding-left: 4px;
  font-size: 13px;
  line-height: 18px;
  color: var(--on-2);
  min-height: 18px;
}
.helper .msr {
  font-size: 18px;
  color: var(--on-3);
}
.helper.err,
.helper.err .msr {
  color: var(--error);
}
.helper.ok .msr {
  color: var(--success);
}
.helper .spin {
  width: 14px;
  height: 14px;
  margin: 2px;
}

/* ---------- outlined text field ---------- */
.frow {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}
.tf {
  position: relative;
  flex: 1;
  min-width: 0;
}
.tf input {
  width: 100%;
  height: 56px;
  padding: 18px 16px 0;
  border-radius: 4px;
  border: 1px solid var(--outline);
  background: transparent;
  font-size: 18px;
  letter-spacing: 0.02em;
  outline: none;
  transition: border-color 0.15s;
}
.tf input:hover {
  border-color: var(--on);
}
.tf input:focus,
.tf.bad input {
  border: 2px solid var(--primary);
  padding: 17px 15px 0;
}
.tf.bad input {
  border-color: var(--error);
}
.tf input:disabled {
  border-color: var(--outline-v);
  color: var(--on-2);
}
.tf.trail input {
  padding-right: 48px;
}
.tf label {
  position: absolute;
  left: 16px;
  top: 16px;
  font-size: 16px;
  color: var(--on-2);
  pointer-events: none;
  transition: all 0.15s cubic-bezier(0.2, 0, 0, 1);
}
.tf input:focus + label,
.tf input:not(:placeholder-shown) + label {
  top: 6px;
  font-size: 12px;
}
.tf input:focus + label {
  color: var(--primary);
}
.tf.bad label {
  color: var(--error) !important;
}
.tf input::placeholder {
  color: transparent;
}
.tf .trail-i {
  position: absolute;
  right: 12px;
  top: 16px;
  pointer-events: none;
}
.tf .trail-i.ok {
  color: var(--success);
}
.tf .trail-i.err {
  color: var(--error);
}
.cc {
  flex: none;
  width: 100px;
  height: 56px;
  border-radius: 4px;
  border: 1px solid var(--outline);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 18px;
}
.flag {
  width: 24px;
  height: 16px;
  border-radius: 2px;
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr 1fr 1fr;
  box-shadow: 0 0 0 1px var(--outline-v);
}
.flag i:nth-child(1) {
  background: #ff9933;
}
.flag i:nth-child(2) {
  background: #fff;
  display: grid;
  place-items: center;
}
.flag i:nth-child(2)::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  border: 1px solid #000080;
}
.flag i:nth-child(3) {
  background: #138808;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  transition:
    box-shadow 0.15s,
    background-color 0.15s;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  opacity: 0;
  transition: opacity 0.15s;
}
.btn:hover::after {
  opacity: 0.08;
}
.btn:active::after {
  opacity: 0.12;
}
.btn .msr {
  font-size: 20px;
}
.btn.filled {
  background: var(--primary);
  color: var(--on-primary);
}
.btn.filled:hover {
  box-shadow: var(--shadow);
}
.btn.tonal {
  background: var(--pc);
  color: var(--on-pc);
}
.btn.outlined {
  border: 1px solid var(--outline);
  color: var(--primary);
}
.btn.text {
  color: var(--primary);
  padding: 0 12px;
}
.btn.sm {
  height: 36px;
  padding: 0 16px;
  font-size: 14px;
}
.btn.full {
  width: 100%;
}
.btn:disabled {
  background: var(--disabled-bg);
  color: var(--disabled-on);
  box-shadow: none;
  cursor: default;
  border-color: transparent;
}
.btn:disabled::after {
  display: none;
}
/* Google sign-in button (per Google branding: neutral fill, outlined, full-colour G) */
.gbtn {
  background: #fff;
  color: #1f1f1f;
  border: 1px solid #747775;
}
:root[data-theme="dark"] .gbtn {
  background: #131314;
  color: #e3e3e3;
  border-color: #8e918f;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .gbtn {
    background: #131314;
    color: #e3e3e3;
    border-color: #8e918f;
  }
}
.gbtn svg {
  width: 20px;
  height: 20px;
}
.spin {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: rot 0.8s linear infinite;
  flex: none;
}
@keyframes rot {
  to {
    transform: rotate(360deg);
  }
}
.foot {
  position: sticky;
  bottom: 0;
  padding: 12px 24px calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: none;
  z-index: 2;
}

/* ---------- social proof ---------- */
.proof {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 8px 16px 8px 8px;
  border-radius: 28px;
  background: var(--surface-2);
  font-size: 14px;
  line-height: 20px;
  color: var(--on-2);
}
.proof b {
  color: var(--on);
  font-weight: 500;
}
.stack {
  display: flex;
  flex: none;
}
.stack img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--surface-2);
  margin-left: -10px;
  background: var(--surface-3);
}
.stack img:first-child {
  margin-left: 0;
}

/* ---------- message cards (info / account found / mismatch) ---------- */
.msg {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 24px;
  padding: 16px;
  border-radius: 16px;
  background: var(--surface-2);
  color: var(--on-2);
  font-size: 14px;
  line-height: 20px;
}
.msg > .msr {
  color: var(--primary);
  margin-top: -1px;
}
.msg b {
  display: block;
  color: var(--on);
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 2px;
}
.msg p strong {
  font-weight: 500;
  color: var(--on);
}
.msg.ok {
  background: var(--ok-c);
  color: var(--on-ok-c);
}
.msg.ok b,
.msg.ok p strong {
  color: var(--on-ok-c);
}
.msg.ok > .msr {
  color: var(--success);
}
.msg.warn {
  background: var(--warn-c);
  color: var(--on-warn-c);
}
.msg.warn b,
.msg.warn p strong {
  color: var(--on-warn-c);
}
.msg.warn > .msr {
  color: var(--warn);
}
.msg .acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.msg .btn.outlined {
  border-color: currentColor;
  color: inherit;
}
.checking {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 16px;
  border-radius: 16px;
  background: var(--surface-2);
  font-size: 14px;
  color: var(--on-2);
}
.checking .spin {
  color: var(--primary);
}

/* ---------- Google account chip + chooser ---------- */
.acct {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding: 10px 8px 10px 12px;
  border: 1px solid var(--outline-v);
  border-radius: 16px;
}
.acct div {
  flex: 1;
  min-width: 0;
}
.acct b {
  display: block;
  font-weight: 500;
  font-size: 15px;
  line-height: 20px;
}
.acct small {
  display: block;
  font-size: 13px;
  color: var(--on-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gav {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 500;
  font-size: 16px;
  flex: none;
}
.gsh-h {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--divider);
  font-size: 14px;
  color: var(--on-2);
}
.gsh-h svg {
  width: 18px;
  height: 18px;
}
.sheet .gsh-t {
  text-align: center;
}
.sheet .gsh-s {
  text-align: center;
  margin: 4px 0 16px;
}
.gacc {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 24px;
  text-align: left;
  border-bottom: 1px solid var(--divider);
}
.gacc:hover {
  background: var(--state-hover);
}
.gacc .t {
  flex: 1;
  min-width: 0;
}
.gacc b {
  display: block;
  font-weight: 500;
  font-size: 15px;
}
.gacc small {
  display: block;
  font-size: 13px;
  color: var(--on-2);
}
.gacc .add {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--on-2);
}
.gnew {
  padding: 16px 24px 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.gnew .frow {
  margin-top: 0;
}
.sheet .fine {
  padding: 16px 24px 0;
  text-align: left;
}

/* ---------- OTP ---------- */
.otp {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}
.otp input {
  width: 100%;
  min-width: 0;
  height: 56px;
  border: 0;
  border-bottom: 2px solid var(--outline-v);
  background: transparent;
  text-align: center;
  font-size: 26px;
  font-weight: 500;
  outline: none;
  border-radius: 0;
  caret-color: var(--primary);
  transition: border-color 0.15s;
}
.otp input:focus {
  border-bottom-color: var(--primary);
}
.otp.bad input {
  border-bottom-color: var(--error);
}
.otp.ok input {
  border-bottom-color: var(--success);
}
.otp.shake {
  animation: shake 0.4s;
}
@keyframes shake {
  20%,
  60% {
    transform: translateX(-6px);
  }
  40%,
  80% {
    transform: translateX(6px);
  }
}
.sent {
  margin-top: 28px;
  font-size: 14px;
  color: var(--on-2);
}
.resend {
  margin-top: 16px;
  font-size: 14px;
  color: var(--on-2);
}
.note {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px dashed var(--outline-v);
  font-size: 13px;
  line-height: 18px;
  color: var(--on-2);
}
.note .msr {
  color: var(--on-3);
  font-size: 20px;
}
.verified {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--success);
}

/* ---------- avatar picker ---------- */
.avpick {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}
.avbig {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  flex: none;
  background: var(--surface-3);
  overflow: hidden;
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--primary);
  margin: 5px;
}
.avbig img,
.avbig .gav {
  width: 100%;
  height: 100%;
}
.avbig .gav {
  font-size: 36px;
}
/* Noto emoji avatars: emoji inset on a pastel disc */
img.av-e {
  box-sizing: border-box;
  padding: 15%;
  object-fit: contain;
  border-radius: 50%;
}
.avpick b {
  display: block;
  font-weight: 500;
}
.avpick small {
  display: block;
  font-size: 13px;
  color: var(--on-2);
}
.avrow {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin: 16px -24px 0;
  padding: 4px 24px;
  scrollbar-width: none;
}
.avrow::-webkit-scrollbar {
  display: none;
}
.av {
  position: relative;
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  padding: 2px;
  border: 2px solid transparent;
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.av img,
.av .gav {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--surface-3);
}
.av .gav {
  font-size: 20px;
}
.av:hover {
  transform: scale(1.05);
}
.av.on {
  border-color: var(--primary);
}
.av .chk {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 15px;
  display: none;
  place-items: center;
  border: 2px solid var(--surface);
}
.av.on .chk {
  display: grid;
}
.av-sh {
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1px dashed var(--outline);
  display: grid;
  place-items: center;
  color: var(--primary);
}
.av-sh:hover {
  background: var(--state-hover);
}

/* ---------- class choice ---------- */
.cls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.clsb {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--outline-v);
  text-align: left;
  position: relative;
}
.clsb:hover {
  background: var(--state-hover);
}
.clsb > .msr {
  color: var(--primary);
  margin-bottom: 6px;
}
.clsb b {
  font-weight: 500;
  font-size: 16px;
}
.clsb small {
  font-size: 12px;
  color: var(--on-2);
}
.clsb .radio {
  position: absolute;
  right: 14px;
  top: 14px;
}
.clsb.on {
  border: 2px solid var(--primary);
  padding: 13px 15px;
  background: color-mix(in srgb, var(--pc) 40%, var(--surface));
}
.clsb.on .radio {
  right: 13px;
  top: 13px;
}
.radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--on-2);
  flex: none;
  display: grid;
  place-items: center;
}
.on .radio {
  border-color: var(--primary);
}
.on .radio::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
}

/* ---------- campus cards ---------- */
.camps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}
.camp {
  border: 1px solid var(--outline-v);
  border-radius: 20px;
  overflow: hidden;
  text-align: left;
  width: 100%;
  transition: border-color 0.15s;
}
.camp.on {
  border: 2px solid var(--primary);
}
.camp-art {
  display: block;
  aspect-ratio: 360 / 150;
  background: var(--k0);
}
.camp-art svg {
  display: block;
  width: 100%;
  height: 100%;
}
.camp-b {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 14px;
}
.camp.on .camp-b {
  padding: 12px 15px 13px;
  background: color-mix(in srgb, var(--pc) 35%, var(--surface));
}
.camp-b .t {
  flex: 1;
  min-width: 0;
}
.camp-b b {
  display: block;
  font-size: 17px;
  font-weight: 500;
  line-height: 24px;
}
.camp-b small {
  display: block;
  font-size: 13px;
  color: var(--on-2);
}
.meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--on-sc);
  background: var(--sc);
  padding: 2px 8px 2px 6px;
  border-radius: 6px;
  flex: none;
}
.meta .msr {
  font-size: 15px;
}

/* campus illustration fills + subtle motion */
.k0 { fill: var(--k0); }
.k1 { fill: var(--k1); }
.k2 { fill: var(--k2); }
.k3 { fill: var(--k3); }
.k4 { fill: var(--k4); }
.k5 { fill: var(--k5); }
.ksun { fill: var(--k-sun); }
.kface { fill: var(--k-face); }
.ksand { fill: var(--k-sand); }
.kink { stroke: var(--k-ink); }
.ay { fill: var(--g-yellow); }
.ar { fill: var(--g-red); }
.ag { fill: var(--g-green); }
.ab { fill: var(--g-blue); }
.skin { fill: #e9b48c; }
.skin2 { fill: #b97a4f; }
.hairc { fill: #3c2a21; }
.an-min,
.an-hr,
.an-sway,
.an-bob,
.an-ripple,
.an-sun {
  transform-box: fill-box;
}
.an-min {
  transform-origin: 50% 100%;
  animation: spin 8s linear infinite;
}
.an-hr {
  transform-origin: 0% 50%;
  animation: spin 96s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.an-sway {
  transform-origin: 50% 100%;
  animation: sway 4.5s ease-in-out infinite alternate;
}
.an-sway.d2 {
  animation-duration: 5.2s;
  animation-delay: -2s;
}
@keyframes sway {
  from {
    transform: rotate(-3deg);
  }
  to {
    transform: rotate(3deg);
  }
}
.an-wave {
  animation: wave 7s linear infinite;
}
.an-wave.d2 {
  animation-duration: 11s;
  animation-direction: reverse;
}
@keyframes wave {
  to {
    transform: translateX(-120px);
  }
}
.an-bob {
  animation: bob 2.6s ease-in-out infinite alternate;
}
@keyframes bob {
  from {
    transform: translateY(-1.5px) rotate(-2deg);
  }
  to {
    transform: translateY(1.5px) rotate(2deg);
  }
}
.an-walk {
  animation: walk 26s linear infinite;
}
@keyframes walk {
  from {
    transform: translateX(-40px);
  }
  to {
    transform: translateX(400px);
  }
}
.an-fly {
  animation: fly 18s linear infinite;
}
.an-fly.d2 {
  animation-duration: 24s;
  animation-delay: -9s;
}
@keyframes fly {
  from {
    transform: translate(-60px, 6px);
  }
  50% {
    transform: translate(180px, -4px);
  }
  to {
    transform: translate(420px, 4px);
  }
}
.an-ripple {
  transform-origin: 50% 50%;
  animation: ripple 3.2s ease-out infinite;
}
.an-ripple.d2 {
  animation-delay: -1.6s;
}
@keyframes ripple {
  from {
    transform: scale(0.3);
    opacity: 0.9;
  }
  to {
    transform: scale(1.4);
    opacity: 0;
  }
}
.an-sun {
  transform-origin: 50% 50%;
  animation: glow 4s ease-in-out infinite alternate;
}
@keyframes glow {
  to {
    transform: scale(1.08);
  }
}
.an-flag {
  transform-box: fill-box;
  transform-origin: 0% 50%;
  animation: flag 1.6s ease-in-out infinite alternate;
}
@keyframes flag {
  to {
    transform: skewY(-8deg) scaleX(0.9);
  }
}

/* ---------- done screen ---------- */
.hero {
  position: relative;
  margin: 0;
  aspect-ratio: 360 / 150;
  background: var(--k0);
  overflow: hidden;
}
.hero svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero .tb {
  position: absolute;
  inset: 0 0 auto;
}
.hero-av {
  position: relative;
  width: 104px;
  height: 104px;
  margin: -52px auto 0;
  border-radius: 50%;
  padding: 4px;
  background: var(--surface);
  z-index: 1;
}
.hero-av img,
.hero-av .gav {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--surface-3);
  font-size: 40px;
}
.hero-av .ok {
  position: absolute;
  right: 0;
  bottom: 4px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--g-green);
  color: #fff;
  font-size: 20px;
  display: grid;
  place-items: center;
  border: 3px solid var(--surface);
}
.done-h {
  text-align: center;
  margin-top: 12px;
}
.done-h .sub {
  margin-top: 4px;
}
.linked {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 4px 12px 4px 8px;
  border-radius: 8px;
  background: var(--ok-c);
  color: var(--on-ok-c);
  font-size: 13px;
  font-weight: 500;
}
.linked .msr {
  font-size: 18px;
}
.card {
  border: 1px solid var(--outline-v);
  border-radius: 16px;
  background: var(--surface);
}
.sum {
  margin-top: 24px;
  padding: 0 8px 0 16px;
}
.row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  border-bottom: 1px solid var(--divider);
}
.row:last-child {
  border-bottom: 0;
}
.row .ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--primary);
  flex: none;
}
.row div {
  flex: 1;
  min-width: 0;
  padding: 10px 0;
}
.row small {
  display: block;
  color: var(--on-2);
  font-size: 12px;
  line-height: 16px;
}
.row b {
  display: block;
  font-weight: 500;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row .msr.v {
  color: var(--success);
  margin-right: 12px;
}
.fomo {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--pc);
  color: var(--on-pc);
  font-size: 14px;
  line-height: 20px;
}
.fomo b {
  font-weight: 700;
}
.fomo .msr {
  font-size: 28px;
}

/* ---------- bottom sheet / menu ---------- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(6, 9, 15, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade 0.2s;
}
.scrim[hidden] {
  display: none;
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
.sheet {
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface-1);
  border-radius: 28px 28px 0 0;
  padding: 8px 0 calc(16px + env(safe-area-inset-bottom, 0px));
  animation: up 0.3s cubic-bezier(0.2, 0, 0, 1);
}
@keyframes up {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
}
.grip {
  width: 32px;
  height: 4px;
  border-radius: 2px;
  background: var(--outline);
  opacity: 0.4;
  margin: 8px auto 16px;
}
.sheet h2 {
  font-size: 22px;
  line-height: 28px;
  font-weight: 400;
  padding: 0 24px;
}
.sheet .sub {
  padding: 0 24px;
  font-size: 14px;
  line-height: 20px;
}
.seg {
  display: flex;
  margin: 20px 24px 8px;
  border: 1px solid var(--outline);
  border-radius: 20px;
  overflow: hidden;
}
.seg button {
  flex: 1;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  border-left: 1px solid var(--outline);
}
.seg button:first-child {
  border-left: 0;
}
.seg button.on {
  background: var(--sc);
  color: var(--on-sc);
}
.seg .msr {
  font-size: 18px;
}
.menu-i {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  height: 56px;
  padding: 0 24px;
  text-align: left;
  font-size: 16px;
}
.menu-i:hover {
  background: var(--state-hover);
}
.menu-i .msr {
  color: var(--on-2);
}
.menu-div {
  height: 1px;
  background: var(--divider);
  margin: 12px 0 8px;
}

/* ---------- snackbar ---------- */
.snack {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 70;
  width: calc(100% - 32px);
  max-width: 408px;
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  background: var(--inverse);
  color: var(--on-inverse);
  font-size: 14px;
  line-height: 20px;
  padding: 14px 16px;
  border-radius: 4px;
  box-shadow: var(--shadow-2);
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.snack.on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- confetti ---------- */
.fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 130; /* above the full-screen streak moments (120) and the prototype toolbar */
  overflow: hidden;
}
.cf {
  position: absolute;
  top: -12px;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  animation: fall linear forwards;
}
.cb {
  position: absolute;
  width: 6px;
  height: 9px;
  border-radius: 2px;
  animation: burst 0.8s ease-out forwards;
}
@keyframes burst {
  to {
    transform: translate3d(var(--dx), var(--dy), 0) rotate(var(--rot));
    opacity: 0;
  }
}
.rf-combo {
  min-height: 20px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--fire);
}
@keyframes fall {
  to {
    transform: translate3d(var(--dx), 105vh, 0) rotate(var(--rot));
  }
}

/* ---------- placeholder home ---------- */
.me-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-3);
  margin: 0 4px;
}
.me-btn img,
.me-btn .gav {
  width: 100%;
  height: 100%;
}

/* ============================================================
   Dashboard (home): illustrated campus banner + overlapping sheet
   ============================================================ */
.dash {
  padding-bottom: calc(176px + env(safe-area-inset-bottom, 0px));
}
.dh {
  position: relative;
  aspect-ratio: 360 / 165;
  background: var(--k0);
  overflow: hidden;
}
.dh svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.dh-bar {
  position: absolute;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 0 16px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 12px 0 8px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow);
}
.pill .msr {
  font-size: 20px;
}
.msr.fire {
  color: var(--fire);
}
.msr.amber {
  color: #f29900;
}
.dh-tag {
  position: absolute;
  left: 16px;
  bottom: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 8px 0 8px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--on);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow);
}
.dh-tag:hover {
  box-shadow: none;
}
.dh-tag .msr {
  font-size: 18px;
  color: var(--primary);
}
.dh-tag .msr:last-child {
  font-size: 16px;
  color: var(--on-2);
}
.dsheet {
  position: relative;
  margin-top: -24px;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  padding: 4px 0 8px;
}
.dsheet .grip {
  margin: 8px auto 16px;
}
.greet {
  padding: 0 16px;
}
.greet h1 {
  font-size: 22px;
  line-height: 28px;
  font-weight: 400;
}
.greet p {
  font-size: 14px;
  line-height: 20px;
  color: var(--on-2);
  margin-top: 2px;
}
.greet p b {
  color: var(--on);
  font-weight: 500;
}
.sec {
  padding: 0 16px;
  margin-top: 28px;
}
.sec-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
}
.sec-h h2 {
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
}
.sec-s {
  font-size: 14px;
  line-height: 20px;
  color: var(--on-2);
  margin-top: 2px;
}
.sec-s b {
  color: var(--on);
  font-weight: 500;
}
.sec-a {
  font-size: 13px;
  color: var(--on-2);
  white-space: nowrap;
}
.sec-a b {
  color: var(--on);
  font-weight: 500;
}
.cd {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px 0 8px;
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 13px;
  color: var(--on-2);
  white-space: nowrap;
}
.cd .msr {
  font-size: 16px;
}
.cd b {
  color: var(--on);
  font-weight: 500;
}
.seg2 {
  display: flex;
  gap: 4px;
  margin: 12px 0 14px;
}
.seg2 i {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--surface-3);
  transition: background 0.3s;
}
.seg2 i.on {
  background: var(--primary);
}

/* today's quiz cards: filled subject colours, illustration, reward and social proof */
.today .sec-h h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qt-count {
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--on-2);
}
.qt-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 19px;
}
.qt-alert b {
  font-weight: 500;
}
.qt-alert .msr {
  font-size: 22px;
}
.qt-alert.risk {
  background: var(--fire-c);
  color: var(--on-fire-c);
}
.qt-alert.risk .msr {
  color: var(--fire);
  transform-origin: 50% 100%;
  animation: flick 1.2s ease-in-out infinite alternate;
}
.qt-alert.safe {
  background: var(--ok-c);
  color: var(--on-ok-c);
}
.qt-alert.safe .msr {
  color: var(--success);
}
.qtiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
/* solid subject cards with a tonal illustration blended into the background */
.qtile {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 16px 14px 14px;
  border-radius: 24px;
  min-width: 0;
  min-height: 248px;
  overflow: hidden;
  color: #fff;
}
.qtile.s-en {
  --card: #1a73e8;
}
.qtile.s-lr {
  --card: #188038;
}
:root[data-theme="dark"] .qtile.s-en {
  --card: #1b5bc4;
}
:root[data-theme="dark"] .qtile.s-lr {
  --card: #13693a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .qtile.s-en {
    --card: #1b5bc4;
  }
  :root:not([data-theme="light"]) .qtile.s-lr {
    --card: #13693a;
  }
}
.qtile:not(.done) {
  background: var(--card);
}
.qt-bg {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 78%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}
.qt-ic {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  margin-bottom: 14px;
}
.qt-ic .msr {
  font-size: 24px;
}
.qtile > b {
  font-size: 18px;
  font-weight: 500;
  line-height: 24px;
}
.qt-m {
  font-size: 13px;
  line-height: 18px;
  opacity: 0.85;
}
.qt-pts {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 24px;
  margin-top: 10px;
  padding: 0 9px 0 5px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 500;
}
.qt-pts .msr {
  font-size: 16px;
}
.qt-who {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
  line-height: 16px;
}
.qt-who b {
  font-weight: 500;
}
.qt-who .stack img {
  width: 22px;
  height: 22px;
  margin-left: -8px;
  border: 2px solid var(--card);
}
.qt-who .stack img:first-child {
  margin-left: 0;
}
.qt-b {
  align-self: stretch;
  margin-top: auto;
}
.qtile .qt-b {
  margin-top: auto;
}
.qtile .qt-who {
  margin-bottom: 16px;
}
.qt-go {
  background: #fff;
  color: var(--card);
}
.qt-go:hover {
  box-shadow: var(--shadow);
}
.qt-badge {
  position: absolute;
  top: 16px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 24px;
  padding: 0 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 11.5px;
  font-weight: 500;
}
.qt-badge .msr {
  font-size: 16px;
  margin-left: -4px;
}
/* finished: quiet neutral card so the remaining quiz stands out */
.qtile.done {
  background: var(--surface-2);
  color: var(--on);
}
.qtile.done .qt-ic {
  border-color: var(--outline-v);
  color: var(--on-2);
}
.qtile.done .qt-badge {
  background: var(--ok-c);
  color: var(--on-ok-c);
}
.qt-sc {
  font-size: 14px;
  color: var(--on-2);
  line-height: 28px;
}
.qt-sc .num {
  font-size: 24px;
  font-weight: 500;
  color: var(--on);
}
.qt-sc em {
  font-style: normal;
  font-size: 12px;
  color: var(--success);
  margin-left: 6px;
  font-weight: 500;
}
.qtile.done .qt-b {
  margin-top: auto;
}

/* streak card (Google Pay "rewards" style header) */
.skc {
  border: 1px solid var(--outline-v);
  border-radius: 20px;
  overflow: hidden;
}
.skc-h {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px 12px 20px;
  background: var(--fire-c);
  color: var(--on-fire-c);
}
.skc-h > div {
  flex: 1;
  min-width: 0;
}
.skc-n {
  font-size: 16px;
  font-weight: 500;
}
.skc-n .num {
  font-size: 40px;
  line-height: 46px;
  font-weight: 500;
  margin-right: 4px;
}
.skc-s {
  font-size: 13px;
  line-height: 18px;
  opacity: 0.85;
  margin-top: 2px;
}
.flame {
  width: 76px;
  height: 80px;
  flex: none;
}
.an-flick {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: flick 1.4s ease-in-out infinite alternate;
}
@keyframes flick {
  from {
    transform: scale(1, 1) skewX(0deg);
  }
  to {
    transform: scale(0.97, 1.05) skewX(-2deg);
  }
}
.skc-b {
  padding: 16px;
}
.wk {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.wd {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.wd-c {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--on-3);
  font-size: 13px;
  font-weight: 500;
}
.wd-c .msr {
  font-size: 20px;
}
.wd-l {
  font-size: 12px;
  color: var(--on-3);
  font-weight: 500;
}
.wd.now .wd-l {
  color: var(--fire);
}
.wd.full .wd-c {
  background: var(--fire);
  color: var(--on-fire);
}
.wd.half .wd-c {
  background: var(--fire-c);
  color: var(--fire);
}
.wd.rest .wd-c {
  background: var(--pc);
  color: var(--primary);
}
.wd.plan .wd-c {
  background: transparent;
  border: 1.5px dashed var(--primary);
  color: var(--primary);
}
.wd.today .wd-c {
  background: transparent;
  border: 2px solid var(--fire);
  color: var(--fire);
}
.wd.pre .wd-c {
  background: transparent;
}
.wd.now:not(.today) .wd-c {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--fire);
}
.msn {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--on-2);
  margin-top: 18px;
}
.msn b {
  color: var(--fire);
  font-weight: 500;
}
.lin {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--surface-3);
  overflow: hidden;
  margin-top: 8px;
}
.lin i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--fire);
  transition: width 0.6s cubic-bezier(0.2, 0, 0, 1);
}
.lin.sm {
  height: 4px;
  margin-top: 8px;
}
.lin.sm i {
  background: var(--primary);
}
.restrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--divider);
}
.restrow > .msr {
  color: var(--primary);
}
.restrow div {
  flex: 1;
  min-width: 0;
}
.restrow b {
  display: block;
  font-size: 14px;
  font-weight: 500;
}
.restrow small {
  display: block;
  font-size: 12px;
  line-height: 16px;
  color: var(--on-2);
}

/* online people (Google Pay "People" row) */
.ppl {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin: 14px -16px 0;
  padding: 2px 16px 4px;
  scrollbar-width: none;
}
.ppl::-webkit-scrollbar {
  display: none;
}
.pp {
  flex: none;
  width: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1px;
}
.pp-av {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin-bottom: 6px;
}
.pp-av img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--surface-3);
}
.pp b {
  font-size: 13px;
  font-weight: 500;
  max-width: 68px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pp small {
  font-size: 11px;
  line-height: 14px;
  color: var(--on-3);
  white-space: nowrap;
}

.pp-n {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  background: var(--pc);
  color: var(--on-pc);
  margin-bottom: 5px;
  line-height: 1.1;
}
.pp-n b {
  font-size: 15px;
}
.pp-n small {
  color: inherit;
  font-size: 10px;
}

/* list cards */
.lc {
  margin-top: 12px;
  border: 1px solid var(--outline-v);
  border-radius: 16px;
  overflow: hidden;
}
.lrow {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 12px 12px 14px;
  border-bottom: 1px solid var(--divider);
  width: 100%;
  text-align: left;
  min-height: 68px;
}
.lrow:last-child {
  border-bottom: 0;
}
button.lrow:hover {
  background: var(--state-hover);
}
.lrow .ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--pc);
  color: var(--primary);
}
.ico.amber {
  background: var(--fire-c) !important;
  color: var(--fire) !important;
}
.ico.green,
.lrow.done .ico {
  background: var(--ok-c) !important;
  color: var(--success) !important;
}
.lrow > div {
  flex: 1;
  min-width: 0;
}
.lrow b {
  display: block;
  font-size: 15px;
  font-weight: 500;
  line-height: 20px;
}
.lrow small {
  display: block;
  font-size: 13px;
  line-height: 18px;
  color: var(--on-2);
}
.lrow .chev {
  color: var(--on-3);
}
.lrow.fail {
  opacity: 0.7;
}
.up {
  color: var(--success);
  font-weight: 500;
}
.dn {
  color: var(--error);
  font-weight: 500;
}
.chip-s {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--sc);
  color: var(--on-sc);
  white-space: nowrap;
}
.tk-p {
  font-size: 14px;
  font-weight: 500;
  color: var(--fire);
  white-space: nowrap;
}
.tk-ok {
  font-size: 14px;
  font-weight: 500;
  color: var(--success);
  white-space: nowrap;
}
.tk-x {
  font-size: 13px;
  color: var(--on-3);
  white-space: nowrap;
}

/* invite banner (scalloped top, like Google Pay's referral card) */
.inv {
  position: relative;
  margin-top: 40px;
  padding: 28px 16px 28px;
  background: var(--surface-2);
  display: flex;
  gap: 12px;
  align-items: flex-end;
}
.inv::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 10px;
  background: radial-gradient(circle at 10px 10px, var(--surface-2) 9.5px, transparent 10px) 0 0 / 20px 10px repeat-x;
}
.inv-in {
  flex: 1;
  min-width: 0;
}
.inv h2 {
  font-size: 18px;
  font-weight: 400;
  line-height: 24px;
}
.inv p {
  font-size: 14px;
  line-height: 20px;
  color: var(--on-2);
  margin-top: 6px;
}
.inv-code {
  display: flex;
  align-items: center;
  gap: 4px;
}
.inv-code b {
  white-space: nowrap;
  color: var(--on);
  font-weight: 500;
  letter-spacing: 0.06em;
}
.inv .btn {
  margin-top: 14px;
}
.inv-art {
  position: relative;
  width: 112px;
  height: 92px;
  flex: none;
  align-self: center;
}
.inv-art img,
.inv-art .gav {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid var(--surface-2);
  background: var(--surface-3);
}
.inv-art > :first-child {
  left: 0;
  bottom: 0;
}
.inv-art > :nth-child(2) {
  right: 0;
  top: 0;
}
.inv-art span {
  position: absolute;
  left: 41px;
  top: 31px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--g-yellow);
  color: #3c4043;
  font-weight: 700;
  font-size: 12px;
  font-style: italic;
  display: grid;
  place-items: center;
  border: 2px solid var(--surface-2);
  z-index: 1;
}
.ib.sm {
  width: 32px;
  height: 32px;
}
.ib.sm .msr {
  font-size: 18px;
}

/* extended FAB + navigation bar (Material 3) */
.fab {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 56px;
  padding: 0 24px 0 18px;
  border-radius: 28px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 16px;
  font-weight: 500;
  box-shadow: var(--shadow-2);
  white-space: nowrap;
  transition: box-shadow 0.15s;
}
.fab:hover {
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.25),
    0 6px 14px rgba(0, 0, 0, 0.2);
}
.nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 440px;
  z-index: 20;
  display: flex;
  height: calc(80px + env(safe-area-inset-bottom, 0px));
  padding: 12px 8px env(safe-area-inset-bottom, 0px);
  background: var(--surface-2);
}
.nv {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--on-2);
}
.nv-i {
  position: relative;
  width: 64px;
  height: 32px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  transition: background 0.2s;
}
.nv.on {
  color: var(--on);
}
.nv.on .nv-i {
  background: var(--sc);
  color: var(--on-sc);
}
.nv:not(.on):hover .nv-i {
  background: var(--state-hover);
}
.nv-b {
  position: absolute;
  top: 0;
  left: 36px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--error);
  color: var(--surface);
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

/* other tabs (not yet redesigned) */
.tb-t {
  font-size: 22px;
  font-weight: 400;
  padding-left: 12px;
}
.ph-empty {
  margin: 56px auto 0;
  max-width: 300px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.ph-empty .big {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--pc);
  color: var(--primary);
  display: grid;
  place-items: center;
  margin-bottom: 8px;
}
.ph-empty .big .msr {
  font-size: 44px;
}
.ph-empty h2 {
  font-size: 22px;
  font-weight: 400;
}
.ph-empty p {
  font-size: 14px;
  line-height: 20px;
  color: var(--on-2);
  margin-bottom: 8px;
}

/* sheets used by the dashboard */
.pfh {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
}
.av56 {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  flex: none;
}
.av56 img,
.av56 .gav {
  width: 100%;
  height: 100%;
}
.pfh h2 {
  padding: 0 !important;
}
.pfh small {
  display: block;
  color: var(--on-2);
  font-size: 13px;
}
.pchips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 24px 0;
}
.pchip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px 0 6px;
  border-radius: 8px;
  border: 1px solid var(--outline-v);
  font-size: 13px;
  color: var(--on-2);
}
.pchip .msr,
.pchip .dart {
  font-size: 16px;
  color: var(--primary);
}
.pchip .dart {
  width: 15px;
  height: 15px;
  flex: none;
}
.sheet-l {
  font-size: 12px;
  font-weight: 500;
  color: var(--on-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 24px 4px;
}
.sheet-acts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 24px 0;
}
.sheet .note {
  margin: 16px 24px 0;
}
.rvl {
  padding: 8px 24px 0;
}
.rvi {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--divider);
}
.rvi:last-child {
  border-bottom: 0;
}
.rvi .n {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 500;
  flex: none;
  background: var(--ok-c);
  color: var(--on-ok-c);
}
.rvi.bad .n {
  background: color-mix(in srgb, var(--error) 18%, var(--surface));
  color: var(--error);
}
.rvi p {
  font-size: 14px;
  line-height: 20px;
  white-space: pre-line;
}
.rvi small {
  display: block;
  font-size: 13px;
  line-height: 18px;
  color: var(--on-2);
  margin-top: 4px;
}
.rvi small b {
  font-weight: 500;
  color: var(--success);
}
.rvi small s {
  color: var(--error);
}
.rvi .e {
  color: var(--on-3);
}
.ropt {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 14px 24px;
  text-align: left;
}
.ropt:hover {
  background: var(--state-hover);
}
.ropt .grow {
  flex: 1;
}
.ropt small {
  color: var(--on-2);
  font-size: 13px;
}
.ropt > .msr {
  color: var(--primary);
}
.psh {
  text-align: center;
  padding: 0 24px;
}
.psh img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  margin: 0 auto 10px;
  background: var(--surface-3);
}
.psh h2 {
  padding: 0 !important;
}
.psh .pchips {
  justify-content: center;
  padding: 10px 0 0;
}
.pst {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 24px 0;
}
.pst div {
  padding: 10px 4px;
  border-radius: 12px;
  background: var(--surface-2);
  text-align: center;
}
.pst b {
  display: block;
  font-size: 18px;
  font-weight: 500;
}
.pst small {
  font-size: 12px;
  color: var(--on-2);
}

/* dashboard columns: one flowing column on phones (original order), two on the web */
.dgrid {
  display: flex;
  flex-direction: column;
}
.dcol {
  display: contents;
}
.o1 { order: 1; }
.o2 { order: 2; }
.o3 { order: 3; }
.o4 { order: 4; }
.o5 { order: 5; }
.o6 { order: 6; }

/* ============================================================
   Web layout (≥840px)
   Onboarding: Google sign-in–style two-column card.
   App: navigation rail (≥840) or drawer (≥1200), top app bar,
   banner with greeting, two-column dashboard, dialogs instead of sheets.
   ============================================================ */
.wtop,
.nv-brand,
.dh-hi {
  display: none;
}
.ob-head,
.ob-main {
  min-width: 0;
}
@media (min-width: 840px) {
  /* ---- onboarding card ---- */
  html:has(body.is-ob),
  body.is-ob {
    background: var(--page-web);
  }
  .phone.ob-shell {
    max-width: 1040px;
    min-height: 0;
    margin: 56px auto;
    padding: 16px 40px 32px;
    border-radius: 28px;
    background: var(--card-web);
  }
  .ob-shell .tb {
    height: 48px;
    padding: 0;
    margin: 0 -12px 8px;
  }
  .ob-shell .prog {
    margin: 0 0 36px;
  }
  .ob-shell .body {
    padding: 0 0 28px;
  }
  .body.ob {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 24px 64px;
    align-items: start;
  }
  .body.ob.wide {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .ob-head .brand {
    margin: 0 0 32px;
  }
  .ob-head .h1 {
    font-size: 36px;
    line-height: 44px;
  }
  .ob-head .sub {
    margin-top: 16px;
  }
  .ob-main > :first-child {
    margin-top: 0;
  }
  .wide .camps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
  .ob-shell .avrow {
    flex-wrap: wrap;
    margin: 16px 0 0;
    padding: 4px 0;
  }
  .ob-shell .foot {
    position: static;
    padding: 0;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    background: none;
  }
  .ob-shell .foot .btn.full {
    width: auto;
    min-width: 200px;
  }
  .ob-shell .foot .fine,
  .ob-shell .foot .helper {
    text-align: left;
    margin: 0 !important;
    max-width: 460px;
  }
  .ob-shell .hero {
    height: 220px;
    aspect-ratio: auto;
    border-radius: 20px;
    margin: 8px 0 0;
  }
  .ob-shell .hero .tb {
    margin: 0;
    padding: 8px 12px;
    height: 64px;
  }
  .ob-done {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr) !important;
  }
  .ob-done .ob-main .sum {
    margin-top: 28px;
  }

  /* ---- app shell: rail + top bar ---- */
  .phone.app-shell {
    max-width: none;
    margin: 0 0 0 88px;
  }
  .app-shell .page {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 32px;
  }
  .wtop {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 15;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 1240px;
    height: 72px;
    margin: 0 auto;
    padding: 0 32px;
    background: var(--surface);
  }
  .wtop .logo {
    height: 24px;
    margin-right: 12px;
  }
  .wtop h1 {
    font-size: 22px;
    line-height: 28px;
    font-weight: 400;
  }
  .wtop .pill {
    background: var(--surface-2);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .nav {
    left: 0;
    top: 0;
    bottom: 0;
    transform: none;
    width: 88px;
    max-width: none;
    height: auto;
    flex-direction: column;
    justify-content: flex-start;
    gap: 12px;
    padding: 84px 0 16px;
    background: var(--surface);
  }
  .nv {
    flex: none;
  }
  .nv-i {
    width: 56px;
  }
  .fab {
    display: none;
  }
  .tabpage > .tb {
    display: none;
  }

  /* ---- dashboard ---- */
  .dash {
    padding-bottom: 56px;
  }
  .dh {
    aspect-ratio: auto;
    height: 260px;
    border-radius: 28px;
  }
  .dh svg {
    left: auto;
    right: 0;
    width: min(624px, 56%);
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 30%);
    mask-image: linear-gradient(to right, transparent 0, #000 30%);
  }
  .dh-bar {
    display: none;
  }
  .dh-tag {
    left: auto;
    right: 16px;
    bottom: 16px;
  }
  .dh-hi {
    display: block;
    position: relative;
    z-index: 1;
    max-width: 52%;
    padding: 44px 0 0 40px;
  }
  .dh-hi h1 {
    font-size: 36px;
    line-height: 44px;
    font-weight: 400;
  }
  .dh-hi p {
    margin-top: 8px;
    color: var(--on-2);
  }
  .dh-hi p b {
    color: var(--on);
    font-weight: 500;
  }
  .dh-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
  }
  .dsheet {
    margin-top: 0;
    padding: 0;
    border-radius: 0;
    background: none;
  }
  .dsheet > .grip,
  .greet {
    display: none;
  }
  .sec {
    padding: 0;
    margin-top: 32px;
  }
  .ppl {
    margin: 16px 0 0;
    padding: 0;
    gap: 8px;
  }
  .inv {
    margin-top: 32px;
    padding: 24px;
    border-radius: 24px;
  }
  .inv::before {
    display: none;
  }

  /* ---- dialogs and snackbar ---- */
  .scrim {
    align-items: center;
    padding: 24px;
  }
  .sheet {
    max-width: 560px;
    max-height: calc(100vh - 48px);
    border-radius: 28px;
    padding-top: 24px;
  }
  .sheet > .grip {
    display: none;
  }
  body.is-app .snack {
    left: calc(88px + 24px);
    bottom: 24px;
    width: auto;
    max-width: 480px;
    transform: translateY(16px);
  }
  body.is-app .snack.on {
    transform: none;
  }
}
@media (min-width: 840px) and (max-width: 1199px) {
  .dh-hi {
    padding: 40px 0 0 32px;
  }
  .dh-hi h1 {
    font-size: 30px;
    line-height: 38px;
  }
}
@media (min-width: 1000px) and (max-width: 1279px) {
  .inv-art {
    display: none;
  }
}
@media (min-width: 1000px) {
  .dgrid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
    gap: 0 32px;
    align-items: start;
  }
  .dcol {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
}
@media (min-width: 1200px) {
  /* navigation drawer */
  .phone.app-shell {
    margin-left: 280px;
  }
  .nav {
    width: 280px;
    padding: 16px 12px;
    gap: 6px;
    align-items: stretch;
  }
  .nv-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 56px;
    padding: 0 16px;
    margin-bottom: 16px;
  }
  .nv-brand .logo {
    height: 24px;
  }
  .nv-brand span {
    font-size: 13px;
    font-weight: 500;
    color: var(--on-2);
    padding-left: 10px;
    border-left: 1px solid var(--outline-v);
  }
  .nv {
    flex-direction: row;
    height: 56px;
    padding: 0 24px 0 16px;
    border-radius: 28px;
    gap: 12px;
    font-size: 14px;
  }
  .nv-i {
    width: 24px;
    height: 24px;
    background: none !important;
  }
  .nv.on {
    background: var(--sc);
    color: var(--on-sc);
  }
  .nv:not(.on):hover {
    background: var(--state-hover);
  }
  .nv-b {
    top: -6px;
    left: 14px;
  }
  .wtop .logo {
    display: none;
  }
  body.is-app .snack {
    left: calc(280px + 24px);
  }
}

/* ============================================================
   Time-of-day campus scenes (data-tod on <html>: day | night).
   "day" uses the theme's base scene palette.
   ============================================================ */
:root[data-tod="night"] {
  --k0: #1e2a4c; --k1: #26345e; --k2: #2e3f70; --k3: #3a4e86; --k4: #4b62a2; --k5: #6a83c4;
  --k-sun: #f1f3f4; --k-cloud: #34426c; --k-sand: #34364d; --k-ink: #aab8e0; --k-face: #dfe5f5;
  /* text and outlines that sit on the night sky */
  --k-on: #f1f3f4; --k-on2: #c8d0e8; --k-link: #a8c7fa; --k-line: #8e918f;
}
:root[data-theme="dark"][data-tod="night"] {
  --k0: #0d1324; --k1: #131b32; --k2: #19233f; --k3: #202d51; --k4: #2a3a67; --k5: #3c4f87;
  --k-sun: #dfe3ea; --k-cloud: #1d2742; --k-sand: #21222e; --k-ink: #8fa0cc; --k-face: #c9d3ea;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"])[data-tod="night"] {
    --k0: #0d1324; --k1: #131b32; --k2: #19233f; --k3: #202d51; --k4: #2a3a67; --k5: #3c4f87;
    --k-sun: #dfe3ea; --k-cloud: #1d2742; --k-sand: #21222e; --k-ink: #8fa0cc; --k-face: #c9d3ea;
  }
}
.kcloud {
  fill: var(--k-cloud, var(--k-face));
}
.stars,
.moon-cut {
  display: none;
}
:root[data-tod="night"] .stars,
:root[data-tod="night"] .moon-cut {
  display: inline;
}
.moon-cut {
  fill: var(--k0);
}
.star {
  fill: #fff;
  opacity: 0.85;
}
.star.tw {
  animation: twinkle 2.4s ease-in-out infinite alternate;
}
@keyframes twinkle {
  to {
    opacity: 0.2;
  }
}
:root[data-tod="night"] .an-sun {
  animation: none;
}
:root[data-tod="night"] .win {
  fill: #fdd663;
}
.dh-hi h1,
.hero .ib {
  color: var(--k-on, var(--on));
}
.dh-hi p {
  color: var(--k-on2, var(--on-2)) !important;
}
.dh-hi p b {
  color: var(--k-on, var(--on)) !important;
}
.dh .btn.outlined {
  color: var(--k-link, var(--primary));
  border-color: var(--k-line, var(--outline));
}

/* ---------- profile: details list (only dream campus is editable) ---------- */
.plist {
  margin: 16px 24px 0;
  border: 1px solid var(--outline-v);
  border-radius: 16px;
  overflow: hidden;
}
.prow {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 12px 16px;
  border-bottom: 1px solid var(--divider);
  text-align: left;
}
button.prow:hover {
  background: var(--state-hover);
}
.prow > .msr {
  color: var(--primary);
}
.prow div {
  flex: 1;
  min-width: 0;
}
.prow small {
  display: block;
  font-size: 12px;
  line-height: 16px;
  color: var(--on-2);
}
.prow b {
  display: block;
  font-size: 15px;
  font-weight: 500;
}
.plist-n {
  margin: 0;
  padding: 10px 16px 12px;
  background: var(--surface-2);
  font-size: 12px;
  line-height: 16px;
  color: var(--on-2);
}
.sheet-m {
  font-size: 13px;
  color: var(--on-2);
  padding: 4px 24px 0;
}
.seg.sm {
  margin-top: 8px;
}
.seg.sm button {
  height: 36px;
  font-size: 13px;
}
.sheet-acts.row {
  flex-direction: row;
  justify-content: flex-end;
}

/* ---------- dream campus picker ---------- */
.cpk {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 24px 0;
}
.cpk-r {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 8px 16px 8px 8px;
  border: 1px solid var(--outline-v);
  border-radius: 16px;
  text-align: left;
}
.cpk-r:hover {
  background: var(--state-hover);
}
.cpk-r.on {
  border: 2px solid var(--primary);
  padding: 7px 15px 7px 7px;
  background: color-mix(in srgb, var(--pc) 35%, var(--surface-1));
}
.cpk-art {
  width: 112px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  flex: none;
  background: var(--k0);
}
.cpk-art svg {
  display: block;
  width: 100%;
  height: 100%;
}
.cpk-r .t {
  flex: 1;
  min-width: 0;
}
.cpk-r b {
  display: block;
  font-weight: 500;
}
.cpk-r small {
  display: block;
  font-size: 12px;
  line-height: 16px;
  color: var(--on-2);
}

/* ============================================================
   BITSAT Daily brand layer
   Our own look on top of the Material structure: tinted page with white cards,
   soft navy ink, semibold headings, rounded-rectangle buttons, labels above fields,
   boxed OTP, soft segmented controls and navigation.
   ============================================================ */
html,
body {
  background: var(--bg);
}
.phone,
.dsheet,
.foot,
.wtop {
  background: var(--bg);
}
@media (min-width: 840px) {
  .ob-shell .foot {
    background: none;
  }
}
/* disabled buttons are solid so nothing shows through them */
.btn:disabled {
  background: var(--surface-3);
  color: var(--on-3);
}
/* type: semibold headings with tighter tracking */
.h1,
.greet h1,
.dh-hi h1,
.done-h .h1 {
  font-weight: 600;
  letter-spacing: -0.02em;
}
.ob-head .h1 {
  font-size: 34px;
  line-height: 42px;
}
.sec-h h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.wtop h1,
.tb-t,
.sheet h2,
.inv h2,
.ph-empty h2 {
  font-weight: 600;
  letter-spacing: -0.01em;
}
.lrow b,
.prow b,
.row b,
.acct b,
.camp-b b,
.clsb b,
.qtile > b,
.skc-n,
.msg b {
  font-weight: 600;
}
.sub {
  color: var(--on-2);
}
/* buttons: rounded rectangles, semibold */
.btn {
  border-radius: 14px;
  font-weight: 600;
  letter-spacing: 0;
}
.btn.sm {
  border-radius: 12px;
}
.btn.filled {
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}
.btn.filled:hover {
  box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 30%, transparent);
}
.btn.outlined {
  border: 1.5px solid var(--outline-v);
  background: var(--surface);
}
.btn.tonal {
  background: var(--pc);
}
.fab {
  border-radius: 18px;
  font-weight: 600;
}
/* fields: label above, soft filled box, focus ring */
.frow {
  align-items: flex-end;
}
.tf {
  display: flex;
  flex-direction: column-reverse;
  gap: 6px;
}
.tf label,
.tf input:focus + label,
.tf input:not(:placeholder-shown) + label {
  position: static;
  font-size: 13px;
  font-weight: 600;
  color: var(--on-2);
}
.tf input:focus + label {
  color: var(--primary);
}
.tf input,
.tf input:focus,
.tf.bad input {
  height: 52px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1.5px solid var(--outline-v);
  background: var(--surface);
  font-size: 17px;
  letter-spacing: 0;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.tf input:hover {
  border-color: var(--outline);
}
.tf input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent);
}
.tf.bad input {
  border-color: var(--error);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--error) 12%, transparent);
}
.tf.trail input {
  padding-right: 46px;
}
.tf .trail-i {
  top: auto;
  bottom: 14px;
}
.tf input:disabled {
  background: var(--surface-2);
  border-color: var(--outline-v);
}
.cc {
  height: 52px;
  border-radius: 14px;
  border: 1.5px solid var(--outline-v);
  background: var(--surface);
  font-size: 17px;
}
.search {
  border-radius: 14px;
}
/* OTP: boxed digits */
.otp input {
  height: 58px;
  border: 1.5px solid var(--outline-v);
  border-radius: 14px;
  background: var(--surface);
  font-size: 24px;
  font-weight: 600;
}
.otp input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent);
}
.otp.bad input {
  border-color: var(--error);
}
.otp.ok input {
  border-color: var(--success);
}
/* cards float on the tinted page */
.lc,
.skc,
.card,
.acct,
.camp,
.clsb,
.cpk-r,
.plist,
.proof,
.checking {
  background: var(--surface);
  border: 1px solid var(--outline-v);
}
.lc,
.card,
.plist {
  border-radius: 18px;
}
.skc,
.camp {
  border-radius: 22px;
}
.clsb.on,
.camp.on,
.cpk-r.on {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent);
}
.clsb.on {
  background: color-mix(in srgb, var(--pc) 55%, var(--surface));
}
.lrow,
.row,
.prow {
  border-bottom-color: var(--divider);
}
.lrow .ico,
.row .ico {
  border-radius: 12px;
}
.msg {
  border-radius: 16px;
}
.msg.info,
.msg:not(.ok):not(.warn) {
  background: var(--pc);
  color: var(--on-pc);
}
.msg:not(.ok):not(.warn) b,
.msg:not(.ok):not(.warn) p strong {
  color: var(--on-pc);
}
.qt-alert {
  border-radius: 14px;
}
/* pills: fully rounded chips and badges */
.chip-s,
.meta,
.linked,
.pchip,
.qt-badge,
.qt-pts,
.qt-count,
.cd,
.dh-tag,
.pill {
  border-radius: 999px;
}
.dh-tag {
  padding: 0 12px 0 10px;
}
.pill {
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}
/* segmented control: soft track with a raised selection */
.seg {
  border: 0;
  border-radius: 14px;
  background: var(--surface-2);
  padding: 4px;
  gap: 4px;
}
.seg button {
  border: 0 !important;
  border-radius: 10px;
  color: var(--on-2);
  height: 36px;
}
.seg button.on {
  background: var(--surface);
  color: var(--on);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
}
.seg button.on .msr {
  color: var(--primary);
}
.seg.sm button {
  height: 32px;
}
/* sheets & dialogs */
.sheet {
  background: var(--surface);
  border-radius: 24px 24px 0 0;
}
.grip {
  background: var(--outline);
  opacity: 0.6;
}
.snack {
  border-radius: 12px;
}
.prog {
  height: 6px;
  border-radius: 3px;
  background: var(--surface-3);
}
.prog i {
  border-radius: 3px;
}
/* quiz cards in brand blue and green */
.qtile.s-en {
  --card: #1769f2;
}
.qtile.s-lr {
  --card: #1b7f4b;
}
:root[data-theme="dark"] .qtile.s-en {
  --card: #2457c5;
}
:root[data-theme="dark"] .qtile.s-lr {
  --card: #17663f;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .qtile.s-en {
    --card: #2457c5;
  }
  :root:not([data-theme="light"]) .qtile.s-lr {
    --card: #17663f;
  }
}
.qtile {
  border-radius: 22px;
}
.qt-ic {
  border-radius: 12px;
}
.qtile.done {
  background: var(--surface);
  border: 1px solid var(--outline-v);
}
/* navigation: soft tint highlight, brand-coloured active item */
.nav {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--divider);
}
.nv-i {
  border-radius: 12px;
}
.nv.on {
  color: var(--primary);
}
.nv.on .nv-i {
  background: var(--pc);
  color: var(--primary);
}
.nv-b {
  background: #e5484d;
  color: #fff;
}
@media (min-width: 840px) {
  .nav {
    background: var(--surface);
    border-top: 0;
    border-right: 1px solid var(--divider);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .wtop .pill {
    background: var(--surface);
    border: 1px solid var(--outline-v);
    box-shadow: none;
  }
  .dh {
    border: 1px solid var(--outline-v);
  }
  .sheet {
    border-radius: 24px;
  }
}
@media (min-width: 1200px) {
  .nv {
    border-radius: 14px;
    font-weight: 500;
  }
  .nv.on {
    background: var(--pc);
    color: var(--primary);
    font-weight: 600;
  }
  .nv.on .nv-i {
    background: none;
  }
}

/* ---------- prototype toolbar: a separate strip above the app, not product UI ---------- */
:root {
  --proto-h: 44px;
}
body {
  padding-top: var(--proto-h);
}
.proto {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--proto-h);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
  background: #111827;
  color: #e5e7eb;
  font-size: 12.5px;
  white-space: nowrap;
}
.proto::-webkit-scrollbar {
  display: none;
}
.proto .pt-l {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 6px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fbbf24;
}
.proto .pt-l .msr {
  font-size: 16px;
}
.proto button,
.proto select {
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  border: 0;
  background: rgba(255, 255, 255, 0.09);
  color: #e5e7eb;
  font: inherit;
  cursor: pointer;
  flex: none;
}
.proto button:hover,
.proto select:hover {
  background: rgba(255, 255, 255, 0.16);
}
.proto button:disabled {
  opacity: 0.35;
  cursor: default;
}
.proto label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #9ca3af;
  flex: none;
}
.proto select option {
  color: #111827;
}
.phone {
  min-height: calc(100vh - var(--proto-h));
  min-height: calc(100dvh - var(--proto-h));
}
@media (min-width: 840px) {
  .wtop {
    top: var(--proto-h);
  }
  .nav {
    top: var(--proto-h);
  }
  /* welcome card sits in the middle of the page */
  body.is-ob {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - var(--proto-h));
  }
  .phone.ob-shell {
    width: 100%;
    margin: 32px auto;
  }
}

/* ---------- larger MathonGo logo ---------- */
.brand .logo {
  height: 32px;
}
.nv-brand .logo {
  height: 30px;
}
.wtop .logo {
  height: 28px;
}

/* ---------- buttons: fully rounded, flat (no shadows or glows) ---------- */
.btn,
.btn.sm,
.fab {
  border-radius: 999px;
}
.btn.filled,
.btn.filled:hover,
.btn:hover,
.qt-go:hover,
.pill,
.dh-tag {
  box-shadow: none;
}
.fab {
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.14);
}
.dh-tag {
  border: 1px solid var(--outline-v);
}

/* ---------- fields and code boxes: colour change only on focus, no glow ---------- */
.tf input:focus,
.tf.bad input,
.otp input:focus {
  box-shadow: none;
}
.tf input:focus,
.otp input:focus {
  border-color: var(--primary);
}
.clsb.on,
.camp.on,
.cpk-r.on {
  box-shadow: none;
}

/* ---------- emoji avatars stay legible at small sizes ---------- */
.stack img.av-e {
  padding: 2px;
}
.me-btn img.av-e,
.av img.av-e {
  padding: 10%;
}

/* "joined" count sits under the welcome heading */
.ob-head .proof {
  margin-top: 28px;
  display: inline-flex;
  align-self: flex-start;
}
.ob-head {
  display: flex;
  flex-direction: column;
}

/* "You're in" banner on the web: show the whole scene (no cropping) and extend its
   sky, hills and ground to the banner edges with matching colour bands. */
@media (min-width: 840px) {
  .ob-shell .hero {
    height: 240px;
  }
  .ob-shell .hero.c-pilani {
    background: linear-gradient(to top, var(--k1) 27%, var(--k0) 27%);
  }
  .ob-shell .hero.c-hyderabad {
    background: linear-gradient(to top, var(--k1) 29%, var(--k0) 29%);
  }
  .ob-shell .hero.c-goa {
    background: linear-gradient(to top, var(--k4) 7%, var(--k3) 7% 11.3%, var(--k-sand) 11.3% 19%, var(--k1) 19% 37%, var(--k0) 37%);
  }
}

/* "You're in": campus/all-India line in orange under the heading */
.done-h .fomo.hot {
  margin: 18px 0 0;
  text-align: left;
  background: var(--fire-c);
  color: var(--on-fire-c);
}
.done-h .fomo.hot .msr {
  color: var(--fire);
}
.done-h .linked {
  margin-top: 14px;
}
/* phone "You're in" banner: inset with rounded corners, like the web card */
@media (max-width: 839px) {
  .ob-shell .hero {
    margin: 8px 16px 0;
    border-radius: 20px;
  }
}

/* phone layout uses the full screen width (up to 640px) instead of a 440px column */
@media (max-width: 839px) {
  .phone,
  .nav,
  .sheet {
    max-width: 640px;
  }
}

/* summary rows wrap rather than truncating long values */
.sum .row b {
  white-space: normal;
  overflow-wrap: anywhere;
}

/* ---------- phones: header bar above the banner, unobstructed full scene ---------- */
.cchip {
  display: none;
}
@media (max-width: 839px) {
  .wtop {
    display: flex;
    position: sticky;
    top: var(--proto-h);
    z-index: 15;
    align-items: center;
    gap: 8px;
    height: 60px;
    padding: 0 16px;
    background: var(--bg);
  }
  .wtop .logo {
    height: 24px;
    margin-right: 4px;
  }
  .wtop h1 {
    font-size: 20px;
    line-height: 26px;
  }
  .wtop.home h1 {
    display: none;
  }
  .wtop .pill {
    height: 32px;
    background: var(--surface);
    border: 1px solid var(--outline-v);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .wtop .me-btn {
    width: 36px;
    height: 36px;
    margin: 0;
  }
  .tabpage > .tb,
  .dh-bar,
  .dh-tag {
    display: none;
  }
  /* whole scene at its natural ratio; a ground-coloured strip sits under the sheet's overlap */
  .dh {
    aspect-ratio: auto;
    padding-bottom: 20px;
    background: linear-gradient(to top, var(--k1) 20px, var(--k0) 20px);
  }
  .dh.c-goa {
    background: linear-gradient(to top, var(--k4) 20px, var(--k0) 20px);
  }
  .dh svg {
    position: relative;
    inset: auto;
    display: block;
    height: auto;
  }
  .dsheet {
    margin-top: -20px;
  }
  .cchip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    margin-top: 12px;
    padding: 0 12px 0 10px;
    border-radius: 999px;
    border: 1px solid var(--outline-v);
    background: var(--surface);
    color: var(--on);
    font-size: 13px;
    font-weight: 500;
  }
  .cchip .msr {
    font-size: 18px;
    color: var(--primary);
  }
  .cchip .msr:last-child {
    font-size: 16px;
    color: var(--on-2);
  }
}
.clk-m,
.clk-h {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

/* ---------- quiz-day states ---------- */
.qtile.s-en {
  --ring: var(--primary);
}
.qtile.s-lr {
  --ring: var(--success);
}
/* finished quiz: tinted subject colour, score ring, points and how you compare */
.qtile.done {
  border: 0;
}
.qtile.done.s-en {
  background: var(--pc);
  color: var(--on-pc);
}
.qtile.done.s-lr {
  background: var(--ok-c);
  color: var(--on-ok-c);
}
.qtile.done .qt-badge.ok {
  background: var(--surface);
  color: var(--success);
}
.qt-res {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 16px;
}
.qt-ring {
  width: 60px;
  height: 60px;
  flex: none;
}
.qt-ring .tr {
  fill: none;
  stroke: currentColor;
  stroke-width: 5;
  opacity: 0.14;
}
.qt-ring .fg {
  fill: none;
  stroke: var(--ring);
  stroke-width: 5;
  stroke-linecap: round;
}
.qt-ring text {
  fill: currentColor;
  font-size: 17px;
  font-weight: 700;
  font-family: inherit;
}
.qt-gain {
  font-size: 16px;
  font-weight: 700;
}
.qt-beat {
  font-size: 12px;
  line-height: 16px;
  opacity: 0.8;
}
.qtile .qt-rev {
  margin-top: auto;
  background: var(--ring);
  color: var(--surface);
}
/* not published yet */
.qtile.soon {
  filter: saturate(0.7);
}
.qtile.soon .qt-go:disabled {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}
.qt-alert.info {
  background: var(--pc);
  color: var(--on-pc);
}
.qt-alert.info .msr {
  color: var(--primary);
}
/* planned no-quiz day */
.qt-off {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 18px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--outline-v);
}
.qt-off > .msr {
  font-size: 30px;
  color: var(--primary);
}
.qt-off b {
  display: block;
  font-size: 16px;
  font-weight: 600;
}
.qt-off p {
  margin-top: 4px;
  font-size: 14px;
  line-height: 20px;
  color: var(--on-2);
}
.qt-off .acts {
  margin-top: 14px;
}
.wd.off .wd-c {
  background: transparent;
  border: 1.5px dashed var(--outline);
  color: var(--on-3);
}
.fab.tonal {
  background: var(--pc);
  color: var(--on-pc);
}
/* banner supporting line under the joined count */
.dh-line {
  font-size: 14px;
  margin-top: 10px !important;
}
.dh-line b {
  font-weight: 600;
}
@media (min-width: 840px) {
  .dh {
    height: auto;
    min-height: 260px;
    padding-bottom: 36px;
  }
}

/* ---------- finished quiz card: keeps its background art, solid badge ---------- */
.qtile.done .qt-bg {
  opacity: 0.4;
}
.qtile.done .qt-badge.ok {
  background: var(--success);
  color: #fff;
}
.qt-ring text {
  font-size: 10px;
  letter-spacing: -0.02em;
}
.o7 { order: 7; }

/* ---------- streak card: simple flame, month calendar ---------- */
.flame-i {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--fire);
  color: #fff;
  flex: none;
}
.flame-i .msr {
  font-size: 32px;
}
.cal-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.cal-h b {
  font-size: 15px;
  font-weight: 600;
}
.cal-h .ib:disabled {
  opacity: 0.3;
  cursor: default;
}
.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 14px 4px;
  justify-items: center;
}
.cal-dw {
  font-size: 11px;
  font-weight: 600;
  color: var(--on-3);
  padding-bottom: 0;
}
.cd-c {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--on-2);
}
.cd-c .msr {
  font-size: 17px;
}
.cd-c.full {
  background: var(--fire);
  color: #fff;
}
.cd-c.half {
  background: var(--fire-c);
  color: var(--fire);
}
.cd-c.rest {
  background: var(--pc);
  color: var(--primary);
}
.cd-c.plan {
  border: 1.5px dashed var(--primary);
  color: var(--primary);
}
.cd-c.off {
  border: 1.5px dashed var(--outline);
  color: var(--on-3);
}
.cd-c.miss {
  background: color-mix(in srgb, var(--error) 10%, transparent);
  color: var(--error);
}
.cd-c.up,
.cd-c.pre {
  color: var(--on-3);
  opacity: 0.6;
}
.cd-c.now {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--fire);
}
.cal-lg {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--on-2);
}
.cal-lg span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cal-lg i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.cal-lg .full { background: var(--fire); }
.cal-lg .half { background: var(--fire-c); border: 1px solid var(--fire); }
.cal-lg .rest { background: var(--pc); border: 1px solid var(--primary); }
.cal-lg .miss { background: color-mix(in srgb, var(--error) 18%, transparent); }

/* ---------- filter chips (leaderboard, previous sets) ---------- */
.lbf {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.lbf button {
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--outline-v);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--on-2);
}
.lbf button.on {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

/* ---------- leaderboard rows ---------- */
.lbc {
  margin-top: 12px;
}
.lbr {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--divider);
}
.lbr:last-child {
  border-bottom: 0;
}
.lbr-n {
  width: 34px;
  white-space: nowrap;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--on-2);
  flex: none;
}
.lbr-n .msr {
  font-size: 20px;
}
.lbr.t1 .lbr-n { color: #e8a200; }
.lbr.t2 .lbr-n { color: #8d99ae; }
.lbr.t3 .lbr-n { color: #c06a2b; }
.lbr-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex: none;
}
.lbr-av img,
.lbr-av .gav {
  width: 100%;
  height: 100%;
}
.lbr-b {
  flex: 1;
  min-width: 0;
}
.lbr-b b {
  display: block;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lbr-b small {
  font-size: 12px;
  color: var(--on-3);
}
.lbr-t {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  margin-top: 2px;
}
.lbr-t span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.lbr-t .msr,
.lbr-t .dart {
  font-size: 14px;
  color: var(--on-3);
}
.lbr-t .dart {
  width: 13px;
  height: 13px;
  flex: none;
}
.lbr-t span + span::before {
  content: "•";
  margin-right: 2px;
  color: var(--on-3);
}
.lbr-p {
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}
.lbr-p small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--on-3);
}
.lbr.me {
  background: var(--pc);
}
.lbr.me .lbr-b b,
.lbr.me .lbr-n {
  color: var(--on-pc);
}
.lb-gap {
  display: grid;
  place-items: center;
  height: 22px;
  color: var(--on-3);
  border-bottom: 1px solid var(--divider);
}
.lb-gap .msr {
  font-size: 18px;
}
.lb-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 48px;
  border: 0;
  border-top: 1px solid var(--divider);
  background: none;
  color: var(--primary);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.lb-more:hover {
  background: var(--surface-2);
}
.lb-more .msr {
  font-size: 18px;
}
.lbr .mv {
  font-weight: 600;
}
.lbr .mv.up,
.lbr .lbr-t .mv.up .msr {
  color: var(--success);
}
.lbr .mv.dn,
.lbr .lbr-t .mv.dn .msr {
  color: var(--error);
}
.btn.full .msr:last-child {
  margin-left: 2px;
}

/* leaderboard page */
.lbpage {
  padding: 8px 16px 120px;
  max-width: 760px;
}
.pg-h h1 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.pg-h p {
  color: var(--on-2);
  font-size: 14px;
  margin-top: 4px;
}
.lbseg {
  margin: 18px 0 0 !important;
}
.lb-me {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--primary);
  color: var(--on-primary);
}
.lb-me .lbr-av {
  width: 44px;
  height: 44px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6);
}
.lb-me > div:nth-child(2) {
  flex: 1;
}
.lb-me small {
  display: block;
  font-size: 12px;
  opacity: 0.85;
}
.lb-me b {
  font-size: 22px;
  font-weight: 700;
}
.lb-me b span {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.85;
}
.lb-me-s {
  text-align: right;
}
.lb-me .mv {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 10px 3px 6px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
}
.lb-me .mv .msr {
  font-size: 16px;
}
.lb-me .mv.up,
.lb-me .mv.up .msr {
  color: var(--success);
}
.lb-me .mv.dn,
.lb-me .mv.dn .msr {
  color: var(--error);
}

.lb-me-s b {
  font-size: 16px;
}
.lb-pin {
  position: sticky;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  margin-top: 12px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--primary);
  box-shadow: 0 4px 16px rgba(16, 24, 40, 0.12);
}
@media (min-width: 840px) {
  .lbpage {
    padding: 8px 0 56px;
    max-width: 900px;
  }
  .lb-pin {
    bottom: 16px;
  }
}

/* ---------- previous sets ---------- */
.sec-a .msr {
  font-size: 16px;
  vertical-align: -3px;
  color: var(--success);
  margin-right: 2px;
}
.ps-up {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--fire-c);
  color: var(--on-fire-c);
  font-size: 13px;
  line-height: 18px;
}
.ps-up > .msr {
  color: var(--fire);
}
.ps-up b {
  font-weight: 600;
}
.ps-up .btn {
  flex: none;
}
.ps {
  margin-top: 12px;
}
.ps-g {
  border-bottom: 1px solid var(--divider);
}
.ps-g:last-child {
  border-bottom: 0;
}
.ps-gh {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ps-gh:hover {
  background: var(--surface-2, transparent);
}
.ps-gd {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}
.ps-gd b {
  font-size: 14px;
  font-weight: 600;
}
.ps-gd small {
  font-size: 12px;
  color: var(--on-2);
}
.ps-gs {
  font-size: 12px;
  color: var(--on-2);
}
.ps-gs.ok {
  color: var(--success);
  font-weight: 600;
}
.ps-gh .msr {
  color: var(--on-2);
  transition: transform 0.2s;
}
.ps-g.open .ps-gh .msr {
  transform: rotate(180deg);
}
.ps-gb {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition:
    grid-template-rows 0.34s cubic-bezier(0.32, 0.72, 0, 1),
    visibility 0s linear 0.34s;
}
.ps-g.open .ps-gb {
  grid-template-rows: 1fr;
  visibility: visible;
  transition:
    grid-template-rows 0.34s cubic-bezier(0.32, 0.72, 0, 1),
    visibility 0s;
}
.ps-gi {
  min-height: 0;
  overflow: hidden;
  display: grid;
  gap: 8px;
  padding: 0 14px;
  opacity: 0;
  transition:
    opacity 0.18s ease,
    padding 0.34s cubic-bezier(0.32, 0.72, 0, 1);
}
.ps-g.open .ps-gi {
  padding: 2px 14px 14px;
  opacity: 1;
  transition:
    opacity 0.28s ease 0.08s,
    padding 0.34s cubic-bezier(0.32, 0.72, 0, 1);
}
@media (prefers-reduced-motion: reduce) {
  .ps-gb,
  .ps-gi,
  .ps-gh .msr {
    transition: none !important;
  }
}
.ps-r {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface-2);
}
.ps-ic {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--c-en) 18%, var(--surface));
  color: var(--c-en);
}
.ps-r.s-lr .ps-ic {
  background: color-mix(in srgb, var(--c-lr) 18%, var(--surface));
  color: var(--c-lr);
}
.ps-ic .msr {
  font-size: 22px;
}
.ps-t {
  min-width: 0;
}
.ps-t b {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ps-t small {
  display: block;
  margin-top: 1px;
  font-size: 12px;
  color: var(--on-2);
}
.ps-st {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ps-sc {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: var(--surface-3);
  color: var(--on-2);
}
.ps-sc.hi {
  background: var(--ok-c);
  color: var(--success);
}
@media (max-width: 599px) {
  .ps-r {
    grid-template-columns: 40px minmax(0, 1fr);
    grid-template-areas: "ic t" "st st";
    row-gap: 10px;
  }
  .ps-ic {
    grid-area: ic;
  }
  .ps-t {
    grid-area: t;
  }
  .ps-t b {
    white-space: normal;
  }
  .ps-st {
    grid-area: st;
    justify-content: space-between;
  }
  .ps-st .btn {
    flex: 1;
  }
  .ps-sc {
    flex: none;
  }
}
.ps-lock .msr {
  font-size: 16px;
}
@media (max-width: 599px) {
  .ps-up {
    flex-wrap: wrap;
  }
}

/* ================= QUIZ ================= */
body.is-quiz .phone {
  max-width: 1080px;
  margin: 0 auto;
}
.qz {
  --qc: var(--c-en);
  padding: 0 16px 120px;
}
.qz.s-lr {
  --qc: var(--c-lr);
}
.qz-top {
  position: sticky;
  top: var(--proto-h);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
  background: var(--bg);
}
.qz-tt {
  flex: 1;
  min-width: 0;
}
.qz-tt b {
  display: block;
  font-size: 16px;
  font-weight: 600;
}
.qz-tt small {
  font-size: 12.5px;
  color: var(--on-2);
}
.qz-tm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--outline-v);
  font-weight: 700;
  font-size: 15px;
}
.qz-tm .msr {
  font-size: 18px;
  color: var(--on-2);
}
.qz-tm.low {
  border-color: var(--error);
  color: var(--error);
}
.qz-tm.low .msr {
  color: var(--error);
}
.qz-prog {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  margin-bottom: 18px;
}
.qz-prog i {
  height: 5px;
  border-radius: 3px;
  background: var(--surface-3);
}
.qz-prog i.a {
  background: color-mix(in srgb, var(--qc) 55%, var(--surface-3));
}
.qz-prog i.c {
  background: var(--qc);
}
.qz-main {
  display: grid;
  gap: 20px;
}
.qz-vs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--fire-c);
  color: var(--on-fire-c);
  font-size: 13.5px;
}
.qz-vs img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}
.qz-vs b {
  font-weight: 600;
}
.qz-card {
  background: var(--surface);
  border: 1px solid var(--outline-v);
  border-radius: 22px;
  padding: 20px;
}
.qz-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--on-2);
  margin-bottom: 14px;
}
.qz-topic {
  padding: 3px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--qc) 12%, var(--surface));
  color: var(--qc);
  font-weight: 600;
  font-size: 12px;
}
/* the passage is part of the question: plain text above it, no box */
.qz-ps {
  font-size: 16px;
  line-height: 26px;
  color: var(--on);
  margin-bottom: 12px;
}
.qz-q {
  font-size: 19px;
  line-height: 28px;
  font-weight: 600;
  white-space: pre-line;
  letter-spacing: -0.005em;
}
.qz-opts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}
.qz-op {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1.5px solid var(--outline-v);
  background: var(--surface);
  text-align: left;
  font-size: 15.5px;
  transition:
    border-color 0.12s,
    background-color 0.12s;
}
.qz-op:hover {
  border-color: var(--outline);
}
.qz-op .L {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  font-weight: 700;
  font-size: 13px;
  flex: none;
}
.qz-op.on {
  border-color: var(--qc);
  background: color-mix(in srgb, var(--qc) 8%, var(--surface));
}
.qz-op.on .L {
  background: var(--qc);
  color: #fff;
}
.qz-side {
  display: none;
}
.qz-foot {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--divider);
}
.qz-foot .btn {
  flex: 1;
  max-width: 260px;
}
.qz-foot .btn.filled {
  background: var(--qc);
}
@media (min-width: 840px) {
  .qz {
    padding: 0 24px 120px;
  }
  .qz-main {
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
  }
  .qz-card {
    padding: 28px;
  }
  .qz-q {
    font-size: 21px;
    line-height: 31px;
  }
  .qz-side {
    display: block;
    position: sticky;
    top: calc(var(--proto-h) + 80px);
    background: var(--surface);
    border: 1px solid var(--outline-v);
    border-radius: 22px;
    padding: 18px;
  }
  .qz-side-h {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 14px;
  }
  .qz-side-h span {
    font-weight: 500;
    color: var(--on-2);
    font-size: 13px;
  }
  .qz-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin: 14px 0;
  }
  .qz-grid button {
    height: 40px;
    border-radius: 12px;
    border: 1.5px solid var(--outline-v);
    font-weight: 600;
    font-size: 14px;
    color: var(--on-2);
  }
  .qz-grid button.a {
    background: color-mix(in srgb, var(--qc) 14%, var(--surface));
    border-color: transparent;
    color: var(--qc);
  }
  .qz-grid button.c {
    border-color: var(--qc);
    color: var(--qc);
  }
  .qz-lg {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: var(--on-2);
    margin-bottom: 16px;
  }
  .qz-lg span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .qz-lg i {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    border: 1.5px solid var(--outline-v);
  }
  .qz-lg i.a {
    background: color-mix(in srgb, var(--qc) 30%, var(--surface));
    border-color: transparent;
  }
  .qz-side .btn.filled {
    background: var(--qc);
  }
  .qz-keys {
    margin-top: 10px;
    font-size: 12px;
    color: var(--on-3);
    text-align: center;
  }
  .qz-foot {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(1080px, 100%);
    padding: 12px 24px 16px;
  }
  .qz-foot .btn {
    flex: 0 0 auto;
    min-width: 180px;
  }
}

/* results */
.qz.res {
  padding-bottom: 48px;
}
.res-wrap {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.res-hero {
  text-align: center;
  padding: 12px 0 4px;
}
.big-ring {
  display: block;
  margin: 0 auto 12px;
}
.big-ring .tr {
  fill: none;
  stroke: var(--surface-3);
  stroke-width: 10;
}
.big-ring .fg {
  fill: none;
  stroke: var(--qc);
  stroke-width: 10;
  stroke-linecap: round;
}
.big-ring .sc {
  fill: var(--on);
  font-size: 38px;
  font-weight: 700;
  font-family: inherit;
}
.big-ring .of {
  fill: var(--on-2);
  font-size: 11px;
  font-family: inherit;
}
.res-hero h1 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.res-hero p {
  color: var(--on-2);
  margin-top: 4px;
}
.pts-big {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--fire-c);
  color: var(--on-fire-c);
  font-weight: 700;
  font-size: 17px;
}
.pts-big .msr {
  color: var(--fire);
}
.pts-big.prac {
  background: var(--surface-2);
  color: var(--on-2);
  font-size: 14px;
  font-weight: 600;
}
.pts-big.prac .msr {
  color: var(--on-3);
}
.res-streak {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--fire-c);
  color: var(--on-fire-c);
}
.res-streak b {
  font-size: 18px;
  font-weight: 700;
}
.res-streak p {
  font-size: 13.5px;
  margin-top: 2px;
}
.res-card {
  background: var(--surface);
  border: 1px solid var(--outline-v);
  border-radius: 18px;
  padding: 16px;
}
.res-card h2 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}
.res-card .brk div {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: var(--on-2);
  border-bottom: 1px solid var(--divider);
}
.res-card .brk b {
  color: var(--fire);
  font-weight: 600;
}
.res-card .brk .tot {
  border: 0;
  color: var(--on);
  font-weight: 700;
}
.res-card .brk .tot b {
  color: var(--on);
}
.res-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.res-tiles > div,
.an-tiles > div {
  background: var(--surface);
  border: 1px solid var(--outline-v);
  border-radius: 16px;
  padding: 14px;
}
.res-tiles small,
.an-tiles small {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--on-2);
}
.an-tiles small .msr {
  font-size: 16px;
}
.res-tiles b,
.an-tiles b {
  display: block;
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
}
.res-tiles span,
.an-tiles span {
  font-size: 12px;
  color: var(--on-3);
}
.res-acts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.res .res-acts .btn.filled {
  background: var(--qc);
}

/* head-to-head */
.hh {
  background: var(--surface);
  border: 1px solid var(--outline-v);
  border-radius: 22px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.hh-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  text-align: center;
}
.hh-p img,
.hh-p .gav {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 8px;
  display: grid;
}
.hh-p b {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.hh-p span {
  display: block;
  font-size: 32px;
  font-weight: 700;
  margin: 2px auto;
}
.hh-p .spin {
  width: 26px;
  height: 26px;
  margin: 10px auto;
  color: var(--primary);
}
.hh-p small {
  font-size: 12px;
  color: var(--on-2);
}
.hh-vs {
  font-weight: 800;
  font-style: italic;
  color: var(--on-3);
}
.hh-bar {
  display: flex;
  gap: 3px;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
}
.hh-bar i:first-child {
  background: var(--c-en);
}
.hh-bar i:last-child {
  background: var(--fire);
}
.hh-res {
  text-align: center;
  font-size: 26px;
  font-weight: 700;
}
.hh-res.w {
  color: var(--success);
}
.hh-res.l {
  color: var(--error);
}
.hh-res small {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--on-2);
}
.hh-wait {
  text-align: center;
  color: var(--on-2);
  font-size: 14px;
}

/* ================= COMBAT ================= */
.cb-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 16px;
  padding: 20px;
  border-radius: 22px;
  background: var(--pc);
  color: var(--on-pc);
}
.cb-vs {
  display: flex;
  align-items: center;
  flex: none;
}
.cb-vs img,
.cb-vs .gav {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid var(--surface);
}
.cb-vs span {
  margin: 0 -6px;
  z-index: 1;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--g-yellow);
  color: #3c4043;
  font-weight: 800;
  font-style: italic;
  font-size: 12px;
}
.cb-in {
  flex: 1;
}
.cb-in h2 {
  font-size: 18px;
  font-weight: 600;
}
.cb-in p {
  font-size: 13.5px;
  margin-top: 2px;
}
.cb-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.cb-btns .btn.tonal {
  background: var(--surface);
}
.cb-code {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--outline-v);
}
.cb-code > div {
  flex: 1;
}
.cb-code small {
  display: block;
  font-size: 12px;
  color: var(--on-2);
}
.cb-code b {
  font-size: 17px;
  letter-spacing: 0.08em;
}
.cb-join {
  display: flex;
  gap: 8px;
  flex-basis: 100%;
}
.cb-join input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid var(--outline-v);
  background: var(--surface);
  text-transform: uppercase;
  font-weight: 600;
  outline: none;
}
.cb-join input:focus {
  border-color: var(--primary);
}
.cb-join input::placeholder {
  text-transform: none;
  font-weight: 400;
  color: var(--on-3);
}
.cb-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.cb-stats div {
  background: var(--surface);
  border: 1px solid var(--outline-v);
  border-radius: 16px;
  padding: 12px;
  text-align: center;
}
.cb-stats b {
  display: block;
  font-size: 20px;
  font-weight: 700;
}
.cb-stats small {
  font-size: 12px;
  color: var(--on-2);
}
.cb-h {
  font-size: 15px;
  font-weight: 600;
  margin: 24px 0 -2px;
}
.cb-r > div {
  flex: 1;
  min-width: 0;
}
.cb-sc {
  font-weight: 700;
  font-size: 15px;
}
.cb-wl {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}
.cb-wl.w {
  background: var(--ok-c);
  color: var(--success);
}
.cb-wl.l {
  background: color-mix(in srgb, var(--error) 12%, transparent);
  color: var(--error);
}
.cb-r .spin {
  color: var(--primary);
}
.cb-ppl {
  flex-wrap: wrap;
  overflow: visible;
  margin: 12px 0 0;
  padding: 0;
}
@media (max-width: 599px) {
  .cb-hero {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ================= ANALYSIS ================= */
.an-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
@media (min-width: 840px) {
  .an-tiles {
    grid-template-columns: repeat(4, 1fr);
  }
}
.an-card {
  margin-top: 16px;
  padding: 18px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--outline-v);
}
.an-h {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.an-h h2 {
  font-size: 16px;
  font-weight: 600;
}
.an-h p {
  font-size: 13px;
  color: var(--on-2);
}
.an-lg {
  display: flex;
  gap: 16px;
  margin: 12px 0 6px;
  font-size: 12.5px;
  color: var(--on-2);
}
.an-lg span::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 3px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}
.an-lg .en::before {
  background: var(--c-en);
}
.an-lg .lr::before {
  background: var(--c-lr);
}
.chart {
  position: relative;
  touch-action: pan-y;
}
.chart svg {
  display: block;
  width: 100%;
  overflow: visible;
}
.chart text {
  fill: var(--on-3);
  font-size: 11px;
  font-family: inherit;
}
.chart .dl {
  fill: var(--on-2);
  font-weight: 700;
  font-size: 11.5px;
}
.chart .gl {
  stroke: var(--divider);
}
.chart .gl.base {
  stroke: var(--outline-v);
}
.chart .ln {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.chart .ln.en,
.chart .dot.en {
  stroke: var(--c-en);
}
.chart .ln.lr,
.chart .dot.lr {
  stroke: var(--c-lr);
}
.chart .dot.en {
  fill: var(--c-en);
}
.chart .dot.lr {
  fill: var(--c-lr);
}
.chart .dot {
  stroke-width: 2;
  paint-order: stroke;
  stroke: var(--surface) !important;
}
.chart .xh {
  stroke: var(--outline);
  stroke-dasharray: 3 3;
}
.tip {
  position: absolute;
  top: -8px;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
  min-width: 140px;
  background: var(--inverse);
  color: var(--on-inverse);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
}
.tip b {
  display: block;
  margin-bottom: 4px;
}
.tip div {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.tip .en i {
  background: var(--c-en);
}
.tip .lr i {
  background: var(--c-lr);
}
.tip em {
  margin-left: auto;
  padding-left: 12px;
  font-style: normal;
  font-weight: 700;
}
.an-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin-top: 8px;
}
.an-tbl th,
.an-tbl td {
  text-align: right;
  padding: 8px 4px;
  border-bottom: 1px solid var(--divider);
}
.an-tbl th:first-child,
.an-tbl td:first-child {
  text-align: left;
}
.an-tbl th {
  color: var(--on-2);
  font-weight: 600;
}
.tpb {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}
.tb-r {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: center;
}
.tb-r b {
  font-size: 14px;
  font-weight: 600;
}
.tb-r b small {
  margin-left: 8px;
  font-weight: 500;
  font-size: 12px;
  color: var(--on-3);
}
.tb-r span {
  font-weight: 700;
  font-size: 14px;
}
.tb-bar {
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 4px;
  background: var(--surface-3);
  overflow: hidden;
}
.tb-bar i {
  display: block;
  height: 100%;
  border-radius: 0 4px 4px 0;
}
.tpb.en .tb-bar i {
  background: var(--c-en);
}
.tpb.lr .tb-bar i {
  background: var(--c-lr);
}
.sw {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}
.sw > div {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-2);
}
.sw small {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
}
.sw small .msr {
  font-size: 16px;
}
.sw .s small {
  color: var(--success);
}
.sw .w small {
  color: var(--error);
}
.sw b {
  display: block;
  font-size: 14px;
  margin-top: 4px;
}
.sw span {
  font-size: 12px;
  color: var(--on-2);
}
.empty {
  padding: 22px 12px;
  text-align: center;
  color: var(--on-2);
  font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ---------- Challenge your friends: highlighted card, sits under Today's practice ---------- */
.inv {
  margin-top: 20px;
  padding: 20px;
  border-radius: 24px;
  background: var(--pc);
  color: var(--on-pc);
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
  align-items: center;
  gap: 16px;
  overflow: hidden;
}
.inv::before {
  display: none;
}
.inv-k {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
}
.inv-k .msr {
  font-size: 18px;
}
.inv h2 {
  font-size: 20px;
  line-height: 26px;
  font-weight: 700;
  color: var(--on-pc);
  margin-top: 4px;
}
.inv p {
  color: var(--on-pc);
  opacity: 0.8;
}
.inv p b {
  font-weight: 700;
}
.inv-acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 16px;
}
.inv .inv-go {
  margin-top: 0;
  background: var(--primary);
  color: var(--on-primary);
  border: 0;
}
.inv .inv-code {
  margin-top: 0;
  font-size: 13px;
  padding: 4px 4px 4px 12px;
  border: 1px dashed color-mix(in srgb, var(--on-pc) 40%, transparent);
  border-radius: 999px;
  opacity: 1;
}
.inv .inv-code b {
  color: var(--on-pc);
}
.inv .ib {
  color: var(--on-pc);
}
.inv-art {
  position: relative;
  display: block;
  flex: none;
  width: 168px;
  height: 124px;
  color: var(--primary);
}
.inv-art .ia-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.inv-art img,
.inv-art .gav {
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 3px solid var(--pc);
  box-shadow: 0 0 0 2px var(--primary);
}
.inv-art > :first-child {
  left: 0;
  bottom: 0;
}
.inv-art > :nth-child(2) {
  left: 18px;
  bottom: 8px;
  right: auto;
  top: auto;
}
.inv-art > :nth-child(3) {
  right: 18px;
  top: 8px;
  box-shadow: 0 0 0 2px var(--g-yellow);
}
.inv-art span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 3px solid var(--pc);
  z-index: 1;
}
@media (max-width: 479px) {
  .inv-art {
    display: none;
  }
}
@media (min-width: 840px) {
  .inv {
    margin-top: 24px;
    padding: 28px;
  }
  .inv h2 {
    font-size: 22px;
    line-height: 28px;
  }
}


/* ---------- Challenge others: stat pill on top, tiles in a card ---------- */
.oncard {
  margin-top: 0;
  padding: 16px 0 14px;
  border: 1px solid var(--outline-v);
  border-radius: 20px;
  background: var(--surface);
}
.oncard h2 {
  padding: 0 16px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.oncard .sec-s {
  padding: 0 16px;
}
.oncard .ppl {
  margin: 14px 0 0;
  padding: 0 16px 2px;
  gap: 8px;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
}
.oncard .pp {
  width: 104px;
  padding: 14px 10px 14px;
  border-radius: 16px;
  background: var(--surface-2);
}
.oncard .pp b {
  max-width: 84px;
}
.pp-go {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--pc);
  color: var(--on-pc);
  font-size: 11px;
  font-weight: 600;
}
.pp-go .msr {
  font-size: 13px;
}

.pp small.pp-rk {
  color: var(--on-2);
}
.pp small.pp-rk b {
  font-size: 11px;
  font-weight: 600;
  color: var(--on);
}

.cb-r.tap {
  cursor: pointer;
}
.cb-r.tap:hover {
  background: var(--surface-2);
}
.cb-r.tap:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}
.cb-go {
  display: grid;
  place-items: center;
  width: 28px;
  color: var(--on-3);
}
.cbpage .onsec {
  padding: 0;
  margin-top: 24px;
}

/* head-to-head inside a sheet: sheets pad their children, not themselves */
.sheet .hh {
  margin: 16px 24px 0;
  padding: 20px 16px;
  background: var(--surface-2);
  border: 0;
}
.sheet .hh-p small {
  display: none;
}

/* close button on every sheet; sticky so it stays put when a long sheet scrolls */
.sheet-x {
  position: sticky;
  top: 8px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: 0 12px -36px auto;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--on-2);
  cursor: pointer;
}
.sheet-x:hover {
  background: var(--surface-3);
  color: var(--on);
}
.sheet-x .msr {
  font-size: 20px;
}
@media (min-width: 840px) {
  .sheet-x {
    top: 0;
    margin-top: -8px;
  }
}
.sheet > h2 {
  padding-right: 60px;
}

/* ---------- Combat tab: fewer boxes ---------- */
.cbpage .cb-code {
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: none;
}
.cbpage .cb-stats {
  gap: 0;
  margin-top: 8px;
  padding: 4px 0;
}
.cbpage .cb-stats div {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 4px 8px;
}
.cbpage .cb-stats div + div {
  border-left: 1px solid var(--divider);
}
.cbpage .cb-r.tap:hover {
  background: var(--surface-2);
}

@media (min-width: 1000px) {
  .cbpage {
    max-width: 1120px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    column-gap: 32px;
    align-items: start;
  }
  .cbpage > .pg-h {
    grid-column: 1 / -1;
  }
  .cbpage .onsec {
    position: sticky;
    top: calc(var(--proto-h, 0px) + 88px);
    margin-top: 16px;
  }
}

/* ---------- tab pills slide to the selected tab ---------- */
.seg,
.lbf {
  position: relative;
}
.seg > button,
.lbf > button {
  position: relative;
  z-index: 1;
}
.tab-ind {
  position: absolute;
  z-index: 0;
  pointer-events: none;
}
.tab-ind.go {
  transition:
    left 0.4s cubic-bezier(0.32, 0.72, 0, 1),
    top 0.4s cubic-bezier(0.32, 0.72, 0, 1),
    width 0.4s cubic-bezier(0.32, 0.72, 0, 1),
    height 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}
.seg > button,
.lbf > button {
  transition: color 0.3s ease;
}
/* list rows ease in after the tab changes */
.lbc.swap .lbr {
  animation: lbIn 0.34s cubic-bezier(0.32, 0.72, 0, 1) both;
}
.lbc.swap .lbr:nth-child(2) { animation-delay: 30ms; }
.lbc.swap .lbr:nth-child(3) { animation-delay: 60ms; }
.lbc.swap .lbr:nth-child(4) { animation-delay: 90ms; }
.lbc.swap .lbr:nth-child(5) { animation-delay: 120ms; }
.lbc.swap .lbr:nth-child(n + 6) { animation-delay: 150ms; }
@keyframes lbIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .tab-ind.go,
  .lbc.swap .lbr {
    transition: none;
    animation: none;
  }
}
.seg .tab-ind {
  background: var(--surface);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
}
.lbf .tab-ind {
  background: var(--primary);
  border-radius: 999px;
}
.has-ind > button.on {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* leaderboard: scope chips on the left, period as a small menu on the right */
.lb-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
.lb-bar .lbf {
  margin-top: 0;
}
.lb-per {
  position: relative;
  flex: none;
}
.dd-b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 8px 0 14px;
  border-radius: 999px;
  border: 1px solid var(--outline-v);
  background: var(--surface);
  color: var(--on);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.dd-b:hover {
  background: var(--surface-2);
}
.dd-b .msr {
  font-size: 18px;
  color: var(--on-2);
  transition: transform 0.2s;
}
.dd.open .dd-b .msr {
  transform: rotate(180deg);
}
.dd-m {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  min-width: 100%;
  width: max-content;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid var(--outline-v);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px) scale(0.98);
  transform-origin: top right;
  transition:
    opacity 0.16s ease,
    transform 0.16s ease,
    visibility 0s linear 0.16s;
}
.dd.open .dd-m {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity 0.16s ease,
    transform 0.16s ease,
    visibility 0s;
}
.dd-o {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--on-2);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.dd-o:hover {
  background: var(--surface-2);
  color: var(--on);
}
.dd-o.on {
  color: var(--primary);
  font-weight: 600;
}
.dd-o .msr {
  font-size: 18px;
}
@media (prefers-reduced-motion: reduce) {
  .dd-m,
  .dd-b .msr {
    transition: none;
  }
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- leaderboard: side cards on wide screens ---------- */
.lb-side {
  display: none;
}
@media (min-width: 1000px) {
  .lbpage:not(.cbpage) {
    max-width: 1120px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    column-gap: 32px;
    align-items: start;
  }
  .lbpage:not(.cbpage):not(:has(.lb-side)) {
    display: block;
    max-width: 900px;
  }
  .lb-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: calc(var(--proto-h, 0px) + 80px);
    margin-top: 24px;
  }
}
.lbs {
  padding: 16px;
  border: 1px solid var(--outline-v);
  border-radius: 20px;
  background: var(--surface);
}
.lbs h3 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.lbs-rows {
  margin: 8px -16px 0;
}
.lbs-rows .lbr {
  padding: 8px 16px;
}
.lbs-rows .lbr:last-child {
  border-bottom: 0;
}
.lbs-gap,
.lbs-sub {
  margin-top: 8px;
  font-size: 13px;
  color: var(--on-2);
}
.lbs-gap b,
.lbs-sub b {
  color: var(--on);
  font-weight: 600;
}
.lbs-trend {
  padding: 18px 16px 14px;
}
.lbs-sum {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 10px;
}
.lbs-sum .mv {
  font-size: 24px;
  line-height: 28px;
  letter-spacing: -0.02em;
}
.lbs-sum .mv .msr {
  font-size: 22px;
  margin-right: 1px;
  align-self: center;
}
.lbs-sum small {
  font-size: 13px;
  color: var(--on-2);
}
.lbs-trend .lbs-chart {
  margin: 16px 0 0;
}
.lbs-t {
  font-size: 11px;
  fill: var(--on-3);
}
.lbs-t.now {
  fill: var(--on);
  font-weight: 600;
}
.lbs .mv {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
}
.lbs .mv .msr {
  font-size: 15px;
}
.lbs .mv.up,
.lbs .mv.up .msr {
  color: var(--success);
}
.lbs .mv.dn,
.lbs .mv.dn .msr {
  color: var(--error);
}
.lbs-rows .lbr-t {
  display: none;
}
.lbs-rows .lbr {
  min-height: 52px;
}

/* ---------- streak flame and points bolt ---------- */
.pill svg.fire,
.rf-combo svg.fire {
  width: 16px;
  height: 20px;
  flex: none;
  overflow: visible;
  transform-origin: 50% 100%;
  animation: fireSway 2.4s ease-in-out infinite;
}
svg.fire .fl-o,
svg.fire .fl-i {
  transform-origin: 50% 100%;
}
svg.fire .fl-o {
  animation: fireFlick 1.3s ease-in-out infinite;
}
svg.fire .fl-i {
  animation: fireFlick 0.9s ease-in-out infinite reverse;
}
@keyframes fireFlick {
  0%, 100% { transform: scale(1, 1) skewX(0deg); }
  25% { transform: scale(0.96, 1.07) skewX(-3deg); }
  50% { transform: scale(1.03, 0.95) skewX(2deg); }
  75% { transform: scale(0.97, 1.05) skewX(3deg); }
}
@keyframes fireSway {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
}
.pill .bolt {
  width: 18px;
  height: 18px;
  flex: none;
  overflow: visible;
}
.pill .bolt .bolt-shine {
  animation: boltShine 3.6s ease-in-out infinite;
}
@keyframes boltShine {
  0%, 56%, 100% { transform: translateY(0); }
  8% { transform: translateY(0); }
  42% { transform: translateY(326px); }
}
svg.fire.pop {
  animation: flamePop 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pill .bolt.zap {
  animation: boltZap 0.9s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pill .bolt.zap .bolt-shine {
  animation: boltShine 0.9s ease-out;
}
@keyframes flamePop {
  0% { transform: scale(1); }
  25% { transform: scale(1.5, 1.7) rotate(-6deg); }
  55% { transform: scale(0.92, 0.88) rotate(4deg); }
  100% { transform: scale(1); }
}
@keyframes boltZap {
  0% { transform: scale(1) rotate(0deg); }
  20% { transform: scale(1.6) rotate(-16deg); }
  40% { transform: scale(1.15) rotate(10deg); }
  60% { transform: scale(1.35) rotate(-6deg); }
  100% { transform: scale(1) rotate(0deg); }
}
.pn {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}
@media (prefers-reduced-motion: reduce) {
  svg.fire,
  svg.fire .fl-o,
  svg.fire .fl-i,
  .pill .bolt .bolt-shine,
  svg.fire.pop,
  .pill .bolt.zap {
    animation: none;
  }
}

/* streak card flame: same flame, larger, no circle */
.skc svg.fire {
  width: 40px;
  height: 50px;
  flex: none;
  margin-left: auto;
  overflow: visible;
  transform-origin: 50% 100%;
  animation: fireSway 2.4s ease-in-out infinite;
}
.skc svg.fire.off {
  animation: none;
}
.skc svg.fire.off .fl-o,
.skc svg.fire.off .fl-i {
  animation: none;
  fill: var(--outline);
}



.qz-meta {
  flex-wrap: wrap;
  gap: 8px 12px;
}
.qz-meta > span:first-child,
.qz-topic {
  white-space: nowrap;
}
@media (max-width: 480px) {
  .qz-op .qz-clear {
    padding: 0 6px;
  }
}

/* ---------- answer review page (same layout as the quiz) ---------- */
.qz-prog i.ok {
  background: color-mix(in srgb, var(--success) 40%, var(--surface-3));
}
.qz-prog i.no {
  background: color-mix(in srgb, var(--error) 40%, var(--surface-3));
}
.qz-prog i.sk {
  background: var(--surface-3);
}
/* the segment you're on is the full colour of its result */
.qz-prog i.ok.c {
  background: var(--success);
}
.qz-prog i.no.c {
  background: var(--error);
}
.qz-prog i.sk.c {
  background: var(--on-3);
}
.qz-grid button.ok {
  background: color-mix(in srgb, var(--success) 16%, var(--surface));
  border-color: transparent;
  color: var(--success);
}
.qz-grid button.no {
  background: color-mix(in srgb, var(--error) 14%, var(--surface));
  border-color: transparent;
  color: var(--error);
}
.qz-grid button.sk {
  color: var(--on-3);
}
.qz-grid button.c {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--on-3);
}
.qz-lg i.ok {
  background: var(--success);
  border-color: transparent;
}
.qz-lg i.no {
  background: var(--error);
  border-color: transparent;
}
.qz-lg i.sk {
  background: var(--surface-3);
}
.rv .qz-op {
  cursor: default;
}
.rv .qz-op.ok {
  border-color: var(--success);
  background: color-mix(in srgb, var(--success) 9%, var(--surface));
}
.rv .qz-op.ok .L {
  background: var(--success);
  color: #fff;
}
.rv .qz-op.no {
  border-color: var(--error);
  background: color-mix(in srgb, var(--error) 8%, var(--surface));
}
.rv .qz-op.no .L {
  background: var(--error);
  color: #fff;
}
.rv-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.rv-tag .msr {
  font-size: 16px;
}
.rv .qz-op.ok .rv-tag {
  color: var(--success);
}
.rv .qz-op.no .rv-tag {
  color: var(--error);
}
.rv-st {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  margin-left: auto;
  margin-right: 8px;
}
.rv-st.ok {
  background: var(--ok-c);
  color: var(--success);
}
.rv-st.no {
  background: color-mix(in srgb, var(--error) 14%, transparent);
  color: var(--error);
}
.rv-st.sk {
  background: var(--surface-3);
  color: var(--on-2);
}
.rv-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--on-2);
}
.rv-exp {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-2);
}
.rv-exp b {
  font-size: 13px;
  font-weight: 600;
}
.rv-exp p {
  margin-top: 4px;
  font-size: 14px;
  line-height: 20px;
  color: var(--on-2);
}
.rv .qz-meta .qz-topic {
  margin-left: 0;
}
.ps-st .btn {
  min-width: 100px;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
}
.ps-st .btn.filled {
  background: var(--primary);
  color: var(--on-primary);
}

/* locked previous sets: topics are teased but blurred until the student has the Test Series or MARKS Premium */
.ps-r.locked .ps-st .btn {
  border-color: var(--primary);
  color: var(--primary);
}

/* product logos (Quizrr, MathonGo, MARKS) */
.plogo {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  overflow: hidden;
}
.plogo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.plogo.quizrr {
  background: #fff;
}
.plogo.quizrr img {
  padding: 2px;
  object-fit: contain;
}
.prow .plogo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}
.prow .plogo.quizrr img {
  padding: 5px;
}
.ps-up {
  align-items: center;
  gap: 16px;
}
.ps-up-m {
  flex: 1;
  min-width: 0;
}
.ps-up-m p {
  margin: 0;
}
.ps-prods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.ps-prod {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px 0 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--on-fire-c) 10%, transparent);
  font-size: 12px;
  font-weight: 600;
}
@media (max-width: 599px) {
  .ps-up {
    flex-direction: column;
    align-items: stretch;
  }
}
.sheet > .sub {
  padding-right: 60px;
}
.ps-prod .plogo {
  width: 22px;
  height: 22px;
  border-radius: 7px;
}

/* ---------- extra tasks: tiles with a points pill ---------- */
.tks {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.tks .lrow {
  min-height: 0;
  padding: 12px 14px;
  border: 0;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--outline-v);
}
.tks .lrow b {
  font-size: 14px;
  font-weight: 600;
}
.tks .lrow small {
  font-size: 12px;
}
.tks .lrow.fail {
  opacity: 1;
  box-shadow: inset 0 0 0 1px var(--divider);
}
.tks .lrow.fail > div,
.tks .lrow.fail .ico {
  opacity: 0.55;
}
.tk-p,
.tk-ok,
.tk-x {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 5px 12px 5px 8px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.tk-x {
  padding-left: 12px;
  font-weight: 600;
  background: var(--surface-3);
  color: var(--on-3);
}
.tk-p {
  background: var(--fire-c);
  color: var(--fire);
}
.tk-ok {
  background: var(--ok-c);
  color: var(--success);
}
.tk-p .msr,
.tk-ok .msr {
  font-size: 16px;
}
.tks .tk-claim {
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
}

/* all previous sets page */
.sets-page .sec {
  padding: 0;
  margin-top: 8px;
}
.sets-page .ps-up {
  margin-top: 0;
}
.wback {
  margin-left: -8px;
}

/* the animated flame in alerts, the result streak card and onboarding */
.qt-alert svg.fire {
  width: 20px;
  height: 25px;
  flex: none;
}
.res-streak svg.fire {
  width: 40px;
  height: 50px;
  flex: none;
}
.fomo svg.fire {
  width: 20px;
  height: 25px;
  flex: none;
}
.qt-alert svg.fire,
.res-streak svg.fire,
.fomo svg.fire {
  overflow: visible;
  transform-origin: 50% 100%;
  animation: fireSway 2.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .qt-alert svg.fire,
  .res-streak svg.fire,
  .fomo svg.fire {
    animation: none;
  }
}
/* the streak alert flame stays still */
.qt-alert svg.fire,
.qt-alert svg.fire .fl-o,
.qt-alert svg.fire .fl-i {
  animation: none;
}

/* daily BITS fact: a chip in the campus banner on web, a line under the greeting on phone */
.dh-fact,
.greet-fact {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.dh-fact .msr,
.greet-fact .msr {
  font-size: 20px;
  margin-top: 1px;
  color: #f2a900;
}
.dh-fact p,
.greet-fact p {
  margin: 0;
  font-size: 13.5px;
  line-height: 19px;
}
.dh-fact small,
.greet-fact small {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  line-height: 16px;
  opacity: 0.75;
}
.dh-fact {
  max-width: 540px;
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--k-on, var(--on)) 10%, transparent);
  color: var(--k-on, var(--on));
}
.dh-fact p b {
  font-weight: 600;
}
.greet-fact {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--on);
}
.greet-fact p b {
  font-weight: 600;
}
/* in the banner keep just the fact so the scene isn't pushed taller */
.dh-fact small {
  display: none;
}
.dh-fact {
  margin-top: 14px;
  padding: 9px 14px;
}
.dh-fact .fact-h,
.greet-fact .fact-h {
  display: block;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}
.dh-fact p,
.greet-fact p {
  margin-top: 1px;
  font-size: 13px;
  line-height: 18px;
  opacity: 0.78;
}

/* the bulb switches on once, the first time Home is drawn */
.bulb-anim .msr {
  animation: bulbOn 1.5s linear 0.4s both;
}
/* irregular flicker, then it holds on: the pattern the references use (uneven dips, not a steady blink) */
@keyframes bulbOn {
  0%, 8% {
    color: var(--on-3);
    opacity: 0.55;
    transform: scale(0.94);
  }
  12% {
    color: #f2a900;
    opacity: 1;
    transform: scale(1.12);
  }
  18% {
    color: var(--on-3);
    opacity: 0.6;
    transform: scale(0.97);
  }
  30% {
    color: #f2a900;
    opacity: 1;
    transform: scale(1.1);
  }
  36% {
    color: var(--on-3);
    opacity: 0.7;
    transform: scale(1);
  }
  44% {
    color: #f2a900;
    opacity: 1;
    transform: scale(1.1);
  }
  50% {
    color: #f2a900;
    opacity: 0.75;
  }
  62%, 100% {
    color: #f2a900;
    opacity: 1;
    transform: scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .bulb-anim .msr {
    animation: none;
  }
}

/* combat on today's quiz */
.cb-btns .btn {
  flex-direction: column;
  height: auto;
  min-height: 52px;
  padding: 8px 20px;
  gap: 0;
  line-height: 20px;
}
.cb-btns .btn .msr {
  display: none;
}
.cb-st {
  display: block;
  font-size: 11px;
  font-weight: 500;
  line-height: 14px;
  opacity: 0.75;
}
.cb-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 13px;
  line-height: 18px;
}
.cb-note .msr {
  font-size: 18px;
  flex: none;
}
.sheet-n {
  padding: 4px 0 0;
  color: var(--on-2);
}
.cb-wl.d {
  background: var(--surface-3);
  color: var(--on-2);
}
.cb-wl.x {
  background: var(--surface-3);
  color: var(--on-3);
}
.cb-r.exp {
  opacity: 0.65;
}
.hh-res.d {
  color: var(--on-2);
}
.hh-note,
.cb-sent {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  font-size: 13px;
  color: var(--on-2);
}
.hh-note .msr,
.cb-sent .msr {
  font-size: 18px;
  color: var(--success);
}
.cb-sent {
  justify-content: flex-start;
  padding: 10px 24px 0;
}

/* extra tasks: tappable rows, bonus card, locked state */
.tks .lrow.tk[role="button"] {
  cursor: pointer;
}
.tks .lrow.tk[role="button"]:hover {
  background: var(--surface-2);
}
.tks .lrow.tk[role="button"]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}
.tks.wait .lrow {
  opacity: 0.7;
}
.tks .lrow .cb-go {
  margin-left: -4px;
}
.tks .lrow.bonus .ico {
  background: var(--primary-c, var(--pc)) !important;
  color: var(--primary) !important;
}
.sec-a.ok {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--success);
  font-weight: 600;
}
.sec-a.ok .msr {
  font-size: 16px;
}

/* scratch card */
.sc-wrap {
  padding: 20px 24px 0;
}
.sc-card {
  position: relative;
  height: 180px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--outline-v);
}
.sc-reward {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.sc-reward .sc-ic {
  color: #f2a900;
}
.sc-reward .sc-ic .msr {
  font-size: 30px;
}
.sc-reward b {
  font-size: 44px;
  line-height: 48px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.sc-reward small {
  font-size: 13px;
  color: var(--on-2);
}
.sc-cv {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
  transition: opacity 0.5s ease;
}
.sc-cv.gone {
  opacity: 0;
  pointer-events: none;
}
.sc-card.won .sc-reward b {
  animation: scPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes scPop {
  0% {
    transform: scale(0.7);
  }
  100% {
    transform: scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .sc-card.won .sc-reward b,
  .sc-cv {
    animation: none;
    transition: none;
  }
}

/* surprise reward card */
.sc-reward.res {
  padding: 0 24px;
  text-align: center;
  gap: 4px;
}
.sc-reward.res .sc-ic .msr {
  font-size: 34px;
}
.sc-reward.res b {
  font-size: 17px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.sc-reward.res small:first-of-type {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary);
}

/* ---------- extra tasks, premium pass ---------- */
.tk-prog {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
}
.tk-prog i {
  flex: 1;
  max-width: 64px;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
  transition: background 0.3s ease;
}
.tk-prog i.on {
  background: var(--fire);
}
.tk-prog span {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--on-2);
}
.tks {
  gap: 10px;
  margin-top: 14px;
}
.tks .lrow.tk {
  gap: 14px;
  padding: 14px 16px;
  border-radius: 20px;
}
.tks .lrow.tk .ico {
  width: 46px;
  height: 46px;
  border-radius: 15px;
}
.tks .lrow.tk .ico .msr {
  font-size: 24px;
}
.tks .lrow.tk b {
  font-size: 15px;
  letter-spacing: -0.005em;
}
.tks .lrow.tk small {
  margin-top: 1px;
  font-size: 12.5px;
}
.tks .lrow.tk .lin {
  margin-top: 8px;
}
.tks .lrow.tk.done .ico {
  background: var(--ok-c) !important;
}
/* surprise reward: the one tile that stands out */
.tks .lrow.bonus {
  position: relative;
  padding: 18px 18px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--primary) 20%, var(--surface)) 0%,
    var(--surface) 70%
  );
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 38%, transparent);
}
.bn-ic {
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: var(--on-primary);
}
.bn-ic .msr {
  font-size: 28px;
}
.tks .lrow.bonus.locked .bn-ic,
.tks .lrow.bonus.missed .bn-ic {
  background: color-mix(in srgb, var(--primary) 22%, var(--surface-3));
  color: var(--primary);
}
.tks .lrow.bonus b {
  font-size: 16px;
  font-weight: 700;
}
.tks .lrow.bonus.claimed .bn-ic {
  background: var(--success);
  color: #fff;
}
.tks .lrow.bonus.missed {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--divider);
}
.tks .lrow.bonus.missed > div {
  opacity: 0.6;
}
.tk-x.lk {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-left: 9px;
}
.tk-x.lk .msr {
  font-size: 15px;
}

/* extra tasks: one card for the three tasks, the surprise stands apart */
.tk-list {
  border: 1px solid var(--outline-v);
  border-radius: 20px;
  background: var(--surface);
  overflow: hidden;
}
.tks .tk-list .lrow.tk {
  padding: 14px 16px;
  border-radius: 0;
  border-bottom: 1px solid var(--divider);
  background: none;
  box-shadow: none;
}
.tks .tk-list .lrow.tk:last-child {
  border-bottom: 0;
}
.tks .tk-list .lrow.tk[role="button"]:hover {
  background: var(--surface-2);
}
.tks .tk-list .lrow.fail > div,
.tks .tk-list .lrow.fail .ico {
  opacity: 0.55;
}

/* the surprise is the last row of the same card, tinted to stand out */
.tks .tk-list .lrow.bonus {
  border-radius: 0;
  box-shadow: none;
  padding: 16px 16px;
  background: linear-gradient(
    100deg,
    color-mix(in srgb, var(--primary) 18%, var(--surface)) 0%,
    var(--surface) 85%
  );
}
.tks .tk-list .lrow.bonus.missed {
  background: none;
}

.sheet-acts[hidden] {
  display: none;
}
.sc-cv:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
/* the 0/2 chip sits level with the heading text */
.qt-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 9px;
  line-height: 1;
  vertical-align: middle;
  margin-left: 4px;
  /* the title's lowercase letters sit below its line-box centre, so the chip drops a touch to look level */
  transform: translateY(1.5px);
}
.cb-top {
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--on-2);
}
/* the surprise row keeps its gradient in every state */
.tks .tk-list .lrow.bonus.missed,
.tks .tk-list .lrow.bonus.claimed {
  background: linear-gradient(
    100deg,
    color-mix(in srgb, var(--primary) 18%, var(--surface)) 0%,
    var(--surface) 85%
  );
}
.tks .lrow.bonus.missed > div {
  opacity: 0.75;
}

.cb-beat {
  font-size: 12px;
  font-weight: 600;
  color: var(--on-2);
  white-space: nowrap;
}
.cb-wl.p {
  background: var(--fire-c);
  color: var(--fire);
}
.cb-wl.a {
  background: var(--pc);
  color: var(--primary);
}
@media (max-width: 480px) {
  .cb-beat {
    display: none;
  }
}

/* swipeable incoming challenges */
.cb-ct {
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 12px;
  font-weight: 700;
  vertical-align: 2px;
}
.swp {
  margin-top: 12px;
  display: grid;
  justify-items: center;
}
.swp-stack {
  position: relative;
  width: 100%;
  max-width: 360px;
  height: 370px;
  margin-bottom: 30px;
}
.swp-card {
  --ok: 0;
  --no: 0;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 28px 28px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--outline-v);
  text-align: center;
  user-select: none;
  touch-action: pan-y;
  transform-origin: 50% 100%;
  transform: translateY(calc(var(--i) * 12px)) scale(calc(1 - var(--i) * 0.05))
    rotate(calc(var(--i) * var(--tilt, 1.5deg)));
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}
.swp-card:nth-child(odd):not(.swp-top) {
  --tilt: -1.5deg;
}
.swp-card:not(.swp-top) {
  pointer-events: none;
  background: var(--surface-2);
  border-color: var(--outline);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
}
.swp-card:not(.swp-top) > * {
  opacity: 0;
}
.swp-top {
  cursor: grab;
  z-index: 3;
}
.swp-top:active {
  cursor: grabbing;
}
.swp-top:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
.swp-av img,
.swp-av .gav {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  pointer-events: none;
}
.swp-card h3 {
  margin-top: 12px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.swp-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--on-2);
}
.swp-chips span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.swp-chips .msr,
.swp-chips .dart {
  font-size: 14px;
  width: 14px;
  height: 14px;
  color: var(--on-3);
}
.swp-sub {
  margin-top: 12px;
  font-size: 14px;
  color: var(--on-2);
}
.swp-sub b {
  color: var(--on);
  font-weight: 600;
}
.swp-vs {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  width: 100%;
}
.swp-vs > div {
  flex: 1;
  padding: 10px 6px;
  border-radius: 14px;
  background: var(--surface-2);
}
.swp-vs b {
  display: block;
  font-size: 20px;
  font-weight: 700;
}
.swp-vs small {
  font-size: 11.5px;
  color: var(--on-2);
}
.swp-tag {
  position: absolute;
  top: 18px;
  padding: 4px 12px;
  border: 2px solid;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
}
.swp-tag.ok {
  left: 16px;
  color: var(--success);
  transform: rotate(-12deg);
  opacity: var(--ok);
}
.swp-tag.no {
  right: 16px;
  color: var(--error);
  transform: rotate(12deg);
  opacity: var(--no);
}
.swp-acts {
  display: flex;
  gap: 28px;
  margin-top: 22px;
}
.swp-b {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1.5px solid var(--outline-v);
  background: var(--surface);
  cursor: pointer;
}
.swp-b .msr {
  font-size: 28px;
}
.swp-b.no {
  color: var(--error);
}
.swp-b.ok {
  color: var(--success);
}
.swp-b:hover {
  background: var(--surface-2);
}
.swp-hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--on-3);
}
@media (prefers-reduced-motion: reduce) {
  .swp-card {
    transition: none;
  }
}
.swp-set {
  margin-top: 4px;
  font-size: 13px;
  color: var(--on-3);
}
.swp-vs {
  gap: 12px;
}
.swp-vs > div {
  padding: 12px 8px;
}

/* the swipe stack, its heading and buttons are one card */
.swp-box {
  margin-top: 24px;
  padding: 18px 18px 16px;
  border: 1px solid var(--outline-v);
  border-radius: 20px;
  background: var(--surface);
}
.swp-box > .cb-h {
  margin: 0;
}
.swp-box .swp {
  margin-top: 16px;
}
.swp-box .swp-card.swp-top {
  background: var(--surface-2);
  border-color: var(--outline);
}
.swp-box .swp-card:not(.swp-top) {
  background: var(--surface-3);
}
.swp-box .swp-vs > div {
  background: var(--surface);
}
.swp-box .swp-b {
  background: var(--surface-2);
}
/* the group spans the whole middle column; the card pile sits centred inside it */
.swp-box {
  max-width: none;
}
.swp-box .swp-stack {
  max-width: 420px;
}
.swp-stack.one {
  margin-bottom: 0;
}

/* my rewards: a grid of cards, scratch-card style */
.rw-page {
  max-width: 900px;
}
.rw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.rw {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 210px;
  padding: 16px;
  border-radius: 22px;
  text-align: left;
  overflow: hidden;
  color: var(--on);
}
.rw b {
  font-size: 15px;
  font-weight: 700;
  line-height: 20px;
  letter-spacing: -0.01em;
}
.rw small {
  font-size: 12px;
  color: var(--on-2);
}
.rw-got {
  cursor: pointer;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--outline-v);
}
.rw-got::before {
  content: "";
  position: absolute;
  right: -34px;
  top: -34px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--rw, var(--pc));
  opacity: 0.9;
}
.rw-got.t0 { --rw: color-mix(in srgb, var(--c-en) 22%, transparent); }
.rw-got.t1 { --rw: color-mix(in srgb, var(--c-lr) 22%, transparent); }
.rw-got.t2 { --rw: color-mix(in srgb, #f2a900 24%, transparent); }
.rw-got.t3 { --rw: color-mix(in srgb, var(--primary) 22%, transparent); }
.rw-got:hover {
  background: var(--surface-2);
}
.rw-ic {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 15px;
  background: var(--surface-2);
  color: var(--primary);
}
.rw-ic .msr {
  font-size: 26px;
}
.rw-ty {
  margin-top: auto;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-3);
  font-weight: 600;
}
.rw-dt {
  color: var(--on-3);
}
.rw-foil {
  cursor: pointer;
  justify-content: flex-end;
  color: #fff;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0 2px, transparent 2px 16px),
    linear-gradient(135deg, #5b8cff, #8fb3ff 50%, #3f6fe8);
}
.rw-foil small {
  color: rgba(255, 255, 255, 0.85);
}
.rw-gift {
  position: absolute;
  top: 16px;
  left: 16px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}
.rw-gift .msr {
  font-size: 26px;
}
.rw-wait {
  justify-content: flex-end;
  border: 1.5px dashed var(--outline);
  background: none;
}
.rw-wait .rw-gift {
  background: var(--surface-2);
  color: var(--on-3);
}
.rw-empty {
  margin-top: 24px;
}
.tk-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
}
.tk-link b {
  padding: 0 7px;
  border-radius: 999px;
  background: var(--pc);
  color: var(--on-pc);
  font-size: 11px;
}
.tk-link .msr {
  font-size: 16px;
}

/* swap a challenge for XP */
.tk-sw {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--outline-v);
  color: var(--on-2);
  cursor: pointer;
}
.tk-sw:hover {
  background: var(--surface-3);
  color: var(--on);
}
.tk-sw .msr {
  font-size: 18px;
}

.sw-short {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 24px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 13px;
  line-height: 18px;
  color: var(--on-2);
}
.sw-short .msr {
  font-size: 18px;
  flex: none;
}

.tk-prog .tk-link {
  margin-left: 0;
}
.tk-prog .tk-swl {
  margin-left: auto;
  color: var(--on-2);
}
.tk-prog .tk-swl + .tk-rw {
  margin-left: 14px;
}
/* My rewards stays pinned right, with or without the Swap link */
.tk-prog .tk-rw {
  margin-left: auto;
}
.tk-prog .tk-swl {
  margin-left: auto;
  margin-right: 0;
}
.tk-prog .tk-swl + .tk-rw {
  margin-left: 14px;
}
/* long facts (e.g. the Broccoli AI one) stay within three lines in the banner */
.dh-fact p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 3, 2, 1 before a quiz: a deep indigo board of coloured dots, and one huge white numeral with a thick grey side */
.cd3 {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  overflow: hidden;
  /* the quiz page stays behind, blurred, under a deep indigo tint */
  background: rgba(16, 22, 78, 0.6);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  color: #fff;
  animation: cdIn 0.3s ease-out;
}
@keyframes cdIn {
  from {
    opacity: 0;
  }
}
.cd3-live {
  position: absolute;
  left: max(18px, env(safe-area-inset-left));
  top: max(20px, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
}
.cd3-live .msr {
  font-size: 20px;
}
.cd3-in {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
}
.cd3-in p {
  margin-top: 36px;
  padding: 10px 20px;
  border-radius: 999px;
  background: #1e2470;
  font-size: 16px;
  font-weight: 600;
}
.cd3-in .btn {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.8);
}
.cd3-in {
  perspective: 1000px;
}
.cd3-n {
  display: block;
  font-size: clamp(200px, 60vw, 320px);
  line-height: 1;
  font-weight: 800;
  color: #fff;
}
.cd3-n.tick {
  animation: cdTick 1s ease-out both;
}
/* each number starts small and grows slowly */
@keyframes cdTick {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }
  25% {
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cd3,
  .cd3-n.tick {
    animation: none;
  }
}

/* Victory / Keep going strip in the combat result: a short entrance so it feels earned */
.hh-bar i {
  transform-origin: left center;
  animation: hhGrow 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.hh-bar i:last-child {
  transform-origin: right center;
  animation-delay: 0.08s;
}
@keyframes hhGrow {
  from {
    transform: scaleX(0);
  }
}
.hh-res.w {
  background: linear-gradient(100deg, var(--success) 38%, #fff 50%, var(--success) 62%) 120% 0 / 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation:
    hhPop 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) both,
    hhShine 1.1s ease-out 0.55s both;
}
.hh-res.w small {
  -webkit-text-fill-color: var(--on-2);
}
@keyframes hhPop {
  0% {
    transform: scale(0.55);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes hhShine {
  to {
    background-position: -20% 0;
  }
}
.hh-res.l {
  animation:
    hhRise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both,
    hhNudge 0.9s ease-in-out 0.7s 2;
}
@keyframes hhNudge {
  0%,
  100% {
    transform: none;
  }
  40% {
    transform: translateY(-5px);
  }
}
@keyframes hhRise {
  0% {
    transform: translateY(16px);
    opacity: 0;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hh-bar i,
  .hh-res.w,
  .hh-res.l {
    animation: none;
  }
  .hh-res.w {
    background: none;
    -webkit-text-fill-color: currentColor;
  }
}

/* Results / Ended: extra rows slide open */
.cb-fold {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition:
    grid-template-rows 0.36s cubic-bezier(0.32, 0.72, 0, 1),
    visibility 0s linear 0.36s;
}
.cb-fold.open {
  grid-template-rows: 1fr;
  visibility: visible;
  transition:
    grid-template-rows 0.36s cubic-bezier(0.32, 0.72, 0, 1),
    visibility 0s;
}
.cb-fold-in {
  min-height: 0;
  overflow: hidden;
}
.cb-fold .lrow {
  opacity: 0;
  transform: translateY(-6px);
  transition:
    opacity 0.25s ease,
    transform 0.3s ease;
}
.cb-fold.open .lrow {
  opacity: 1;
  transform: none;
  transition-delay: 0.08s;
}
.cb-fold-in .lrow:first-child {
  border-top: 1px solid var(--divider);
}
.lb-more .msr {
  transition: transform 0.25s ease;
}
@media (prefers-reduced-motion: reduce) {
  .cb-fold,
  .cb-fold .lrow {
    transition: none;
  }
}

/* All sets: date range control */
.sr-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px;margin-top:12px}
.sr-bar .lbf{margin-top:0}
.rng{position:relative;display:flex;align-items:center;gap:4px}
.sr-k{margin-right:6px;font-size:12px;color:var(--on-2)}
.sr-b{display:inline-flex;align-items:center;gap:4px;height:36px;padding:0 6px 0 12px;border:1px solid var(--outline);border-radius:8px;background:var(--surface);font:inherit;font-size:13.5px;font-weight:500;color:var(--on);cursor:pointer}
.rng.open .sr-b{border-color:var(--primary)}
.sr-b .msr{font-size:22px;color:var(--on-2)}
.rng .ib:disabled{opacity:.35}
.sr-l{margin-left:8px;font:inherit;font-size:13px;font-weight:600;color:var(--primary);cursor:pointer;white-space:nowrap}
.sr-pop{position:absolute;right:0;top:calc(100% + 8px);z-index:30;display:flex;gap:4px;padding:12px;border:1px solid var(--outline-v);border-radius:18px;background:var(--surface);box-shadow:0 12px 32px rgba(16,24,40,.3)}
.sr-pre{display:flex;flex-direction:column;gap:2px;padding-right:10px;border-right:1px solid var(--divider)}
.sr-pre button{padding:8px 12px;border-radius:10px;font:inherit;font-size:13px;text-align:left;color:var(--on-2);white-space:nowrap;cursor:pointer}
.sr-pre button:hover{background:var(--surface-2);color:var(--on)}
.sr-m{display:flex;align-items:center;justify-content:space-between;min-width:252px;padding:0 0 6px 10px}
.sr-m b{font-size:14px;font-weight:600}
.sr-w,.sr-g{display:grid;grid-template-columns:repeat(7,36px);justify-content:center;margin-left:10px}
.sr-w span{display:grid;place-items:center;height:28px;font-size:11px;font-weight:600;color:var(--on-3)}
.sr-d{height:34px;margin:1px 0;font:inherit;font-size:13px;color:var(--on);cursor:pointer}
.sr-d:disabled{color:var(--on-3);opacity:.4;cursor:default}
.sr-d:not(:disabled):hover{background:var(--surface-2);border-radius:50%}
.sr-d.in{background:var(--pc);color:var(--on-pc);border-radius:0}
.sr-d.in.edge{background:var(--primary);color:var(--on-primary);border-radius:50%;font-weight:600}
.sr-f{display:flex;align-items:center;gap:6px;margin:8px 0 0 10px;padding-top:8px;border-top:1px solid var(--divider)}
.sr-f span{flex:1;font-size:12.5px;color:var(--on-2)}
@media (max-width:599px){.sr-bar{flex-direction:column;align-items:stretch}.sr-pop{right:auto;left:0;flex-direction:column}.sr-pre{flex-direction:row;padding:0 0 8px;border-right:0;border-bottom:1px solid var(--divider)}}
.sr-f span{white-space:nowrap}.sr-pop{min-width:max-content}

/* All sets by month */
.mth {
  margin-top: 22px;
}
.mth-h {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 6px 2px;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.mth-h h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.mth-h > span:not(.msr) {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--on-2);
}
.mth-h > .msr {
  flex: none;
  font-size: 24px;
  margin-left: 0;
  color: var(--on-2);
  transition: transform 0.25s ease;
}
.mth:not(.open) .mth-h .msr {
  transform: rotate(-90deg);
}
.mth-b {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition:
    grid-template-rows 0.36s cubic-bezier(0.32, 0.72, 0, 1),
    visibility 0s linear 0.36s;
}
.mth.open .mth-b {
  grid-template-rows: 1fr;
  visibility: visible;
  transition:
    grid-template-rows 0.36s cubic-bezier(0.32, 0.72, 0, 1),
    visibility 0s;
}
.mth-bi {
  min-height: 0;
  overflow: hidden;
}
@media (prefers-reduced-motion: reduce) {
  .mth-b,
  .mth-h .msr {
    transition: none;
  }
}
.mth .lc.ps {
  margin-top: 10px;
}
.mth .cb-fold-in .ps-g:first-child {
  border-top: 1px solid var(--divider);
}
.sr-pre button.on{background:var(--pc);color:var(--on-pc);font-weight:600}

/* combat results: result badge on the avatar and a mini score bar */
.cb-av {
  position: relative;
  overflow: visible;
}
.cb-bdg {
  position: absolute;
  right: -5px;
  bottom: -5px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--surface-3);
  color: var(--on-2);
}
.cb-bdg .msr {
  font-size: 12px;
}
.cb-bdg.w {
  background: #f2a900;
  color: #fff;
}
.cb-bdg.l {
  background: var(--fire-c);
  color: var(--fire);
}
.cb-scw {
  display: grid;
  justify-items: center;
  gap: 4px;
}
.cb-mini {
  display: flex;
  gap: 2px;
  width: 44px;
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
}
.cb-mini i:first-child {
  background: var(--c-en);
}
.cb-mini i:last-child {
  background: var(--fire);
}
.cb-av img,.cb-av .gav{border-radius:50%;width:100%;height:100%}

/* ---------- rapid fire ---------- */
.rf-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--outline-v);
}
.rf-ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--fire-c);
  color: var(--fire);
}
.rf-ic .msr {
  font-size: 24px;
}
.rf-card > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.rf-card b {
  display: block;
  font-size: 15px;
  font-weight: 600;
}
.rf-card small {
  display: block;
  font-size: 12.5px;
  line-height: 17px;
  color: var(--on-2);
}
.rf-go {
  display: flex;
  gap: 8px;
  flex: none;
}
@media (max-width: 520px) {
  .rf-card {
    flex-wrap: wrap;
  }
  .rf-go {
    width: 100%;
  }
  .rf-go .btn {
    flex: 1;
  }
}
.rf-op:disabled {
  opacity: 1;
}
.rf-op.ok {
  border-color: var(--success);
  background: color-mix(in srgb, var(--success) 10%, var(--surface));
}
.rf-op.no {
  border-color: var(--error);
  background: color-mix(in srgb, var(--error) 9%, var(--surface));
}
.qz-tm.rf-ok {
  color: var(--success);
}
.qz-tm.rf-no {
  color: var(--error);
}
.rf-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.rf-r {
  display: grid;
  justify-items: center;
  gap: 1px;
  padding: 10px 4px;
  border-radius: 14px;
  background: var(--surface-2);
}
.rf-r span {
  font-size: 11px;
  color: var(--on-3);
}
.rf-r b {
  font-size: 16px;
  font-weight: 700;
}
.rf-r small {
  font-size: 11px;
  color: var(--on-2);
}
.rf-r.ok b {
  color: var(--success);
}
.rf-r.no b {
  color: var(--on-3);
}
.rf-note {
  text-align: center;
  font-size: 13px;
  color: var(--on-2);
}
.pt-sw {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .rf-xp b.bump,
  .rf-fl,
  .rf-tm.beat,
  .rf-tm .pg {
    animation: none;
  }
}

/* ---------- rapid fire: question screen ---------- */
/* One focused column on the normal page: a thin HUD (progress, XP, sound), the timer ring on the card's top edge,
   one card holding the question and its answers. Blue appears only where it means something. */
.rf2 {
  padding: 0 0 56px;
}
.rf-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 640px;
  margin: 0 auto;
  padding: 14px 16px 0;
}
.rf-bar .ib {
  flex: none;
  margin-right: -8px;
  color: var(--on-2);
}
.rf-dots {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
}
.rf-dots i {
  height: 6px;
  border-radius: 3px;
  background: var(--surface-3);
  transition: background-color 0.3s;
}
.rf-dots i.c {
  background: var(--primary);
}
.rf-dots i.ok {
  background: var(--success);
}
.rf-dots i.no {
  background: var(--error);
}
/* the round's XP, as one pill; the streak flame joins it from the second right answer in a row */
.rf-xp {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  background: var(--fire-c);
  color: var(--on-fire-c);
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
}
.rf-xp .msr {
  font-size: 19px;
  color: var(--fire);
}
.rf-xp b {
  display: inline-block;
  font-weight: 800;
}
.rf-xp small {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  opacity: 0.7;
}
.rf-xp b.bump {
  animation: rfBump 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes rfBump {
  0%,
  100% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.25);
  }
}
.rf-fl {
  position: absolute;
  left: 50%;
  top: 100%;
  margin-left: -12px;
  font-size: 16px;
  font-weight: 800;
  color: var(--success);
  pointer-events: none;
  animation: rfFloat 1.1s ease-out forwards;
}
@keyframes rfFloat {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  25% {
    opacity: 1;
  }
  100% {
    transform: translateY(-26px);
    opacity: 0;
  }
}
.rf-xp .rf-combo {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 0;
  margin: 0 0 0 8px;
  font-style: normal;
  font-size: 14px;
  font-weight: 800;
}
.rf-xp .rf-combo:empty {
  display: none;
}
.rf-xp .rf-cl {
  display: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.rf-body {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  padding: 46px 16px 0;
}
/* the question's clock: a ring on the card's top edge that empties over 15s, blue then amber then red */
.rf-tm {
  position: absolute;
  left: 50%;
  top: 6px;
  z-index: 2;
  width: 80px;
  height: 80px;
  margin-left: -40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 0 5px var(--bg);
  color: var(--on);
}
.rf-tm svg {
  position: absolute;
  inset: 2px;
  width: 76px;
  height: 76px;
  transform: rotate(-90deg);
}
.rf-tm circle {
  fill: none;
  stroke-width: 4.5;
}
.rf-tm .tr {
  stroke: var(--surface-3);
}
.rf-tm .pg {
  stroke: var(--primary);
  stroke-linecap: round;
  stroke-dasharray: 169.65;
  animation: rfRing 150s linear both;
}
@keyframes rfRing {
  0% {
    stroke-dashoffset: 0;
    stroke: var(--primary);
  }
  45% {
    stroke: var(--primary);
  }
  72% {
    stroke: #f2a516;
  }
  100% {
    stroke-dashoffset: 169.65;
    stroke: var(--error);
  }
}
.rf-tm b {
  position: relative;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  transition: color 0.4s;
}
.rf-tm.warn b {
  color: var(--warn);
}
.rf-tm.low b {
  color: var(--error);
}
.rf-tm.beat {
  animation: rfBeat 1s ease-in-out infinite;
}
@keyframes rfBeat {
  0%,
  40%,
  100% {
    transform: scale(1);
  }
  12% {
    transform: scale(1.13);
  }
  26% {
    transform: scale(1.06);
  }
}
.rf-qc {
  position: relative;
  padding: 56px 22px 24px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--outline-v);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04); /* just enough to lift it off the page */
  text-align: center;
}
.rf-tp {
  position: absolute;
  left: 16px;
  top: 16px;
  max-width: calc(50% - 56px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--pc);
  color: var(--on-pc);
  font-size: 12px;
  font-weight: 600;
}
.rf-up {
  position: absolute;
  right: 16px;
  top: 16px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px 11px 5px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--on-2);
  font-size: 12px;
  font-weight: 700;
}
.rf-up .msr {
  font-size: 14px;
  color: var(--fire);
}
.rf-qt {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.rf-sj {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--on-3);
}
.rf-qc .qz-ps {
  margin-top: 22px;
  text-align: left;
  font-size: 16px;
  line-height: 26px;
  color: var(--on-2);
}
.rf-q {
  margin-top: 22px;
  text-align: left;
  font-size: 20px;
  line-height: 30px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.rf-q.c {
  text-align: center;
  font-size: 24px;
  line-height: 34px;
  font-weight: 500;
}
.rf-qc .qz-ps + .rf-q {
  margin-top: 16px;
}
.rf-opts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 26px;
  text-align: left;
}
/* an answer: a roomy row with a lettered chip; it fills with the crowd's share once answered */
.rf-op {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 10px 16px;
  border-radius: 18px;
  border: 1.5px solid var(--outline-v);
  background: var(--surface);
  font-size: 17px;
  font-weight: 500;
  transition:
    border-color 0.15s,
    background-color 0.15s,
    transform 0.15s;
  animation: rfOpIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.rf-op:nth-child(1) {
  animation-delay: 0.04s;
}
.rf-op:nth-child(2) {
  animation-delay: 0.09s;
}
.rf-op:nth-child(3) {
  animation-delay: 0.14s;
}
.rf-op:nth-child(4) {
  animation-delay: 0.19s;
}
@keyframes rfOpIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
.rf-op:not(:disabled):hover {
  border-color: color-mix(in srgb, var(--primary) 50%, var(--outline-v));
  background: color-mix(in srgb, var(--primary) 4%, var(--surface));
}
.rf-op:not(:disabled):active {
  transform: scale(0.992);
}
.rf-op:disabled {
  opacity: 1;
}
.rf-op > * {
  position: relative;
  z-index: 1;
}
.rf-op .L {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--pc);
  color: var(--on-pc);
  font-size: 14px;
  font-weight: 800;
}
.rf-ot {
  flex: 1 1 auto;
  min-width: 0;
}
/* the share of students who picked it: a bar that grows behind the row, then the number */
.rf-op::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 0;
  background: color-mix(in srgb, var(--on) 7%, transparent);
  transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.rf-op.shown::before {
  width: var(--pct);
}
.rf-pc {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--on-2);
  opacity: 0;
  transition: opacity 0.3s 0.15s;
}
.rf-op.shown .rf-pc {
  opacity: 1;
}
/* the tick or cross only shows on the two rows it is about; until then the row stays clean */
.rf-t {
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
}
.rf-t .msr {
  grid-area: 1 / 1;
  font-size: 18px;
  visibility: hidden;
}
.rf-op.ok {
  border-color: var(--success);
  background: color-mix(in srgb, var(--success) 8%, var(--surface));
}
.rf-op.no {
  border-color: var(--error);
  background: color-mix(in srgb, var(--error) 7%, var(--surface));
}
.rf-op.ok::before {
  background: color-mix(in srgb, var(--success) 24%, transparent);
}
.rf-op.no::before {
  background: color-mix(in srgb, var(--error) 20%, transparent);
}
.rf-op.ok .rf-t {
  background: var(--success);
}
.rf-op.no .rf-t {
  background: var(--error);
}
.rf-op.ok .rf-t .msr:first-child,
.rf-op.no .rf-t .msr:last-child {
  visibility: visible;
}
.rf-op.ok .L {
  background: var(--success);
  color: #fff;
}
.rf-op.no .L {
  background: var(--error);
  color: #fff;
}
.rf-op.ok .rf-pc {
  color: var(--success);
}
.rf-op.no .rf-pc {
  color: var(--error);
}
/* who else is playing: a quiet line under the card */
.rf-live {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--on-3);
}
.rf-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}
@media (min-width: 840px) {
  .rf-bar {
    padding-top: 22px;
  }
  .rf-q.c {
    font-size: 26px;
    line-height: 36px;
  }
}
@media (max-width: 520px) {
  .rf-bar {
    gap: 10px;
    padding-top: 10px;
  }
  .rf-qc {
    padding: 54px 16px 20px;
    border-radius: 24px;
  }
  .rf-op {
    min-height: 60px;
    padding: 8px 14px;
    font-size: 16px;
  }
  .rf-q.c {
    font-size: 22px;
    line-height: 32px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rf-xp b.bump,
  .rf-fl,
  .rf-tm.beat,
  .rf-tm .pg,
  .rf-op {
    animation: none;
  }
  .rf-op::before,
  .rf-pc,
  .rf-dots i,
  .rf-tm b {
    transition: none;
  }
}

/* ---------- leaderboard podium ---------- */
/* a stepped podium: each block has a lit top face and a large numeral on its front */
.pd {
  --gold: #e8a200;
  --silver: #8d99ae;
  --bronze: #c06a2b;
  display: grid;
  grid-template-columns: 1fr 1.12fr 1fr;
  align-items: end;
  margin: 16px 0 4px;
  padding: 22px 10px 0;
  list-style: none;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--outline-v);
  overflow: hidden;
}
.pd-c {
  --rc: var(--silver);
  --h: 76px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 0 4px;
  text-align: center;
  animation: pdRise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.pd1 {
  --rc: var(--gold);
  --h: 112px;
  grid-area: 1 / 2;
  animation-delay: 0.1s;
}
.pd2 {
  grid-area: 1 / 1;
  animation-delay: 0.2s;
}
.pd3 {
  --rc: var(--bronze);
  --h: 58px;
  grid-area: 1 / 3;
  animation-delay: 0.3s;
}
.pd-medal {
  width: 30px;
  height: 36px;
  margin-bottom: 6px;
  color: var(--rc);
}
.pd1 .pd-medal {
  width: 36px;
  height: 43px;
}
.pd-av {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--rc);
  overflow: hidden;
  background: var(--surface-3);
}
.pd1 .pd-av {
  width: 80px;
  height: 80px;
}
.pd-av img,
.pd-av .gav {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pd-name {
  max-width: 100%;
  margin-top: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
}
.pd1 .pd-name {
  font-size: 15px;
}
.pd-c.me .pd-name {
  color: var(--primary);
}
.pd-pts {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 24px;
  margin-top: 6px;
  padding: 0 10px 0 6px;
  border-radius: 12px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--outline-v);
  font-size: 13px;
  font-weight: 700;
}
.pd-pts .msr {
  font-size: 15px;
  color: var(--fire);
}
.pd-pts small {
  margin-left: 2px;
  font-size: 11px;
  font-weight: 500;
  color: var(--on-2);
}
.pd-step {
  position: relative;
  display: grid;
  place-items: center;
  width: calc(100% + 8px);
  margin: 22px -4px 0; /* cancels the column padding so neighbouring blocks meet */
  height: var(--h);
  background: color-mix(in srgb, var(--primary) 15%, var(--surface));
  box-shadow: inset -1px 0 0 color-mix(in srgb, var(--primary) 22%, var(--surface));
  color: color-mix(in srgb, var(--primary) 34%, transparent);
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
}
.pd1 .pd-step {
  font-size: 72px;
}
.pd3 .pd-step {
  font-size: 44px;
}
/* the lit top face, narrower at the back; the inner edges stay flush so the three blocks read as one straight podium */
.pd-step::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 12px;
  background: color-mix(in srgb, var(--primary) 46%, var(--surface));
  clip-path: polygon(7% 0, 93% 0, 100% 100%, 0 100%);
}
.pd2 .pd-step::before {
  clip-path: polygon(7% 0, 100% 0, 100% 100%, 0 100%);
}
.pd3 .pd-step::before {
  clip-path: polygon(0 0, 93% 0, 100% 100%, 0 100%);
}
.pd1 .pd-step::before {
  height: 14px;
  background: color-mix(in srgb, var(--primary) 62%, var(--surface));
}
@keyframes pdRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .pd-c {
    animation: none;
  }
}
@media (min-width: 840px) {
  .pd {
    padding: 28px 24px 0;
  }
  .pd-av {
    width: 72px;
    height: 72px;
  }
  .pd1 .pd-av {
    width: 96px;
    height: 96px;
  }
  .pd-c {
    --h: 92px;
  }
  .pd1 {
    --h: 136px;
  }
  .pd3 {
    --h: 68px;
  }
}


/* ---------- festival theme: Diwali (the quiz screen only; Home and everything else stay as they are) ----------
   Warm cream and deep saffron tokens on the quiz page, fairy lights hanging over the question card, a faint
   rangoli behind it, lanterns at the top corners and a row of diyas at the foot. Reward screens get warm colours. */
:root[data-fest="diwali"] body {
  --bg: #fff8ef;
  --surface-2: #fbf0e0;
  --surface-3: #f3e2c8;
  --on: #2b1a12;
  --on-2: #66503f;
  --on-3: #8a7563;
  --outline: #d9c4a8;
  --outline-v: #efe0c9;
  --divider: #f2e6d3;
  --primary: #c2410c;
  --on-primary: #ffffff;
  --pc: #ffe6cc;
  --on-pc: #6b2a05;
  --sc: #ffeed9;
  --on-sc: #7a3508;
  --fire-c: #ffe1bd;
  --on-fire-c: #5c2300;
}
@media (prefers-color-scheme: dark) {
  :root[data-fest="diwali"]:not([data-theme="light"]) body {
    --bg: #17100c;
    --surface: #1f1712;
    --surface-1: #251b15;
    --surface-2: #2c211a;
    --surface-3: #382a21;
    --on: #f6e9dc;
    --on-2: #cdb9a6;
    --on-3: #9d8774;
    --outline: #5a4536;
    --outline-v: #3a2c22;
    --divider: #2e231b;
    --primary: #ffb05c;
    --on-primary: #3a1a00;
    --pc: #4a2a10;
    --on-pc: #ffe2c4;
    --sc: #3d230f;
    --on-sc: #ffd9b5;
    --fire-c: #3a2512;
    --on-fire-c: #ffd9b8;
  }
}
:root[data-fest="diwali"][data-theme="dark"] body {
  --bg: #17100c;
  --surface: #1f1712;
  --surface-1: #251b15;
  --surface-2: #2c211a;
  --surface-3: #382a21;
  --on: #f6e9dc;
  --on-2: #cdb9a6;
  --on-3: #9d8774;
  --outline: #5a4536;
  --outline-v: #3a2c22;
  --divider: #2e231b;
  --primary: #ffb05c;
  --on-primary: #3a1a00;
  --pc: #4a2a10;
  --on-pc: #ffe2c4;
  --sc: #3d230f;
  --on-sc: #ffd9b5;
  --fire-c: #3a2512;
  --on-fire-c: #ffd9b8;
}
/* marks that stand in for the bolt and the flame */
.rf-xp .fest-diya {
  width: 22px;
  height: 22px;
}
.rf-up .fest-diya {
  width: 15px;
  height: 15px;
}
.rf-win-xp .fest-diya path:first-child {
  fill: #ffe9b0;
}
.rf-win-xp .fest-diya path:last-child {
  fill: #fff;
}
.rf-win-xp .fest-diya {
  width: 0.62em;
  height: 0.62em;
  margin-right: 6px;
  align-self: center;
}
.rf-xp .fest-spark {
  width: 18px;
  height: 18px;
}
.rf-sym.glyph svg {
  width: calc(var(--cell) * 0.64);
  height: calc(var(--cell) * 0.64);
}
/* the sale page's own cracker drawings; each rises in, one after another, and sways like it is lit */
.rf-flames .rf-cracker {
  width: 104px;
  height: 104px;
  animation: rfFlame 0.55s 0.15s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.rf-flames .rf-cracker:nth-child(2) {
  animation-delay: 0.3s;
}
.rf-flames .rf-cracker:nth-child(3) {
  animation-delay: 0.45s;
}
.rf-sur.fire .rf-flames .rf-cracker:only-child {
  width: 150px;
  height: 150px;
}
.rf-flames .rf-cracker:nth-child(2):not(:only-child) {
  width: 132px;
  height: 132px;
}
.rf-sur-fw {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
/* fairy lights: a thin wire with small warm bulbs and a soft bloom; the two sets of bulbs brighten and dim in turn */
.fest-lt {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.fest-lt .fw-wire {
  fill: none;
  stroke: #a97c2a;
  stroke-opacity: 0.55;
  stroke-width: 1;
}
.fest-lt .fw-d circle {
  fill: url(#fwBloom);
}
.fest-lt .fw-d .c {
  fill: #ffb020;
}
.fw-d {
  animation: fwChase 2.4s ease-in-out infinite;
}
@keyframes fwChase {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}
/* the footer: a string of lights over a row of diyas, centred under the card */
.fest-foot {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 1;
  width: min(560px, 100%);
  height: 84px;
  transform: translateX(-50%);
  pointer-events: none;
}
.fest-fw {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.fest-row {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 20px;
}
.fest-d {
  flex: none;
  overflow: visible;
}
.fest-d.s0 {
  width: 34px;
}
.fest-d.s1 {
  width: 46px;
}
.fest-d.s2 {
  width: 66px;
}
/* the flame flickers and the halo pulses, each a little out of step */
.fest-d .fl {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: festFlame 1.5s ease-in-out infinite alternate;
}
.fest-d .hl {
  transform-box: fill-box;
  transform-origin: center;
  animation: festGlow 2s ease-in-out infinite alternate;
}
.fest-d.s1 .fl,
.fest-d.s1 .hl {
  animation-delay: -0.6s;
}
.fest-d.s0 .fl,
.fest-d.s0 .hl {
  animation-delay: -1.1s;
}
@keyframes festFlame {
  0% {
    transform: scale(1, 1) skewX(0deg);
  }
  50% {
    transform: scale(0.94, 1.08) skewX(-2deg);
  }
  100% {
    transform: scale(1.04, 0.95) skewX(2deg);
  }
}
@keyframes festGlow {
  from {
    opacity: 0.45;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1.2);
  }
}
@media (max-width: 420px) {
  .fest-d.s0 {
    width: 26px;
  }
  .fest-d.s1 {
    width: 36px;
  }
  .fest-d.s2 {
    width: 50px;
  }
  .fest-row {
    gap: 12px;
  }
}
.fest-cl {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 0;
  pointer-events: none;
}

/* background: a faint rangoli behind the card, lanterns hanging at the top corners, diyas along the foot */
:root[data-fest="diwali"] .rf2 {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - var(--proto-h, 0px));
  min-height: calc(100dvh - var(--proto-h, 0px));
  padding-bottom: 96px;
}
:root[data-fest="diwali"] .rf-bar,
:root[data-fest="diwali"] .rf-body {
  position: relative;
  z-index: 1;
}

:root[data-fest="diwali"] .rf-qc {
  z-index: 1;
}

/* the full-screen moments get warm colours of their own */
/* each streak and win screen has its own warm colour */
:root[data-fest="diwali"] .rf-sur.s3 {
  background: radial-gradient(95% 70% at 50% 30%, #d8434f 0%, #8e1c2e 40%, #4a0c1c 75%, #230610 100%);
}
:root[data-fest="diwali"] .rf-sur.s5 {
  background: radial-gradient(95% 70% at 50% 30%, #ffae45 0%, #e0561e 40%, #8a1d10 75%, #3a0a05 100%);
}
:root[data-fest="diwali"] .rf-sur.s7 {
  background: radial-gradient(95% 70% at 50% 30%, #b45cf0 0%, #6a22b8 40%, #2a0c66 75%, #12052f 100%);
}
:root[data-fest="diwali"] .rf-win.t8 {
  background: radial-gradient(95% 70% at 50% 30%, #ffc247 0%, #e8801f 40%, #8f3a0e 75%, #3a1505 100%);
}
:root[data-fest="diwali"] .rf-win.t9 {
  background: radial-gradient(95% 70% at 50% 30%, #f06aa8 0%, #b0226e 40%, #5a0f42 75%, #260520 100%);
}
:root[data-fest="diwali"] .rf-win.t10 {
  background: radial-gradient(95% 70% at 50% 30%, #ffb23a 0%, #d6451d 38%, #7a1230 75%, #2e0612 100%);
}
:root[data-fest="diwali"] .rf-sur-go,
:root[data-fest="diwali"] .rf-win .rf-sur-go {
  background: #fff;
  color: #7a1d06;
}
.rf-flames.fest-sp {
  display: block;
  width: min(100%, 360px);
  height: 190px;
  margin-bottom: 8px;
  animation: none;
}
.rf-win-spot {
  width: min(100%, 360px);
  height: 230px;
  margin-top: 6px;
}
@media (prefers-reduced-motion: reduce) {
  :root[data-fest="diwali"] .rf-qc::before,
  .fw-d,
  .fest-d .fl,
  .fest-d .hl {
    animation: none;
  }
}

/* confetti shapes for festivals */
.cf.petal,
.cb.petal {
  width: 9px;
  height: 13px;
  border-radius: 70% 0 70% 0;
}
.cf.spark,
.cb.spark {
  width: 13px;
  height: 13px;
  border-radius: 0;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

/* ---------- rapid fire surprises: full-screen takeovers (3 in a row: jackpot; 5 and 7: flames) ---------- */
/* An immersive moment, so it keeps its own deep colour in both themes instead of following the page. */
.rf-sur {
  --cell: min(24vw, 88px);
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  background: radial-gradient(95% 70% at 50% 30%, #3b6df0 0%, #1b3fb0 38%, #0e1f63 72%, #080f33 100%);
  color: #fff;
  text-align: center;
  animation: rfCurtain 0.38s cubic-bezier(0.7, 0, 0.2, 1) both;
}
/* each streak reward has its own colour: 3 emerald (the jackpot), 5 hot pink, 7 electric teal */
.rf-sur.s3 {
  background: radial-gradient(95% 70% at 50% 30%, #37d68a 0%, #12935f 38%, #07553a 72%, #03251a 100%);
}
.rf-sur.s5 {
  background: radial-gradient(95% 70% at 50% 30%, #ff5fae 0%, #d1237f 40%, #7a0e4f 75%, #330524 100%);
}
.rf-sur.s7 {
  background: radial-gradient(95% 70% at 50% 30%, #35e0e6 0%, #1393b8 40%, #0b4a80 75%, #061c3d 100%);
}
.rf-sur.out {
  opacity: 0;
  transition: opacity 0.3s;
}
/* the screen is covered by a circle that opens from the middle */
@keyframes rfCurtain {
  from {
    clip-path: circle(0% at 50% 55%);
  }
  to {
    clip-path: circle(150% at 50% 55%);
  }
}
/* slow turning rays behind everything */
.rf-rays {
  position: absolute;
  left: 50%;
  top: 38%;
  width: 240vmax;
  height: 240vmax;
  margin: -120vmax 0 0 -120vmax;
  background: repeating-conic-gradient(rgba(255, 255, 255, 0.1) 0 7deg, transparent 7deg 14deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 42%);
  mask-image: radial-gradient(circle, #000 0%, transparent 42%);
  animation: rfSpin 30s linear infinite;
  pointer-events: none;
}
@keyframes rfSpin {
  to {
    transform: rotate(360deg);
  }
}
.rf-sur.won .rf-rays {
  animation-duration: 12s;
}
.rf-sur-in {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(360px, 100%);
}
.rf-sur-h {
  font-size: clamp(34px, 11vw, 48px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
  animation: rfSlam 0.4s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.rf-sur.won .rf-sur-h {
  animation: rfSlam 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
/* the headline lands from large, a little past its size, and settles */
@keyframes rfSlam {
  0% {
    opacity: 0;
    transform: scale(1.6);
  }
  60% {
    opacity: 1;
    transform: scale(0.96);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
.rf-sur-sub {
  margin-top: 10px;
  font-size: 17px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  animation: rfRise 0.35s 0.35s both;
}
@keyframes rfRise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
/* the machine: a gold cabinet, marquee lights, three reels, a lever on the right */
.rf-machine {
  position: relative;
  width: calc(var(--cell) * 3 + 8px * 2 + 20px + 24px);
  margin-top: 26px;
  padding: 12px 12px 14px;
  border-radius: 28px;
  background: linear-gradient(180deg, #ffd76a 0%, #f0a81c 52%, #c97d08 100%);
  box-shadow: 0 26px 48px rgba(3, 8, 36, 0.45);
  animation: rfRise 0.35s 0.15s both;
}
.rf-sur.won .rf-machine {
  animation: rfShake 0.45s;
}
@keyframes rfShake {
  20% {
    transform: translateX(-4px) rotate(-0.6deg);
  }
  40% {
    transform: translateX(4px) rotate(0.6deg);
  }
  60% {
    transform: translateX(-2px);
  }
  80% {
    transform: translateX(2px);
  }
}
.rf-lights {
  display: flex;
  justify-content: space-between;
  padding: 0 8px 10px;
}
.rf-lights i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff6c8;
  animation: rfChase 1s steps(1) infinite;
}
.rf-lights i:nth-child(odd) {
  animation-delay: -0.5s;
}
@keyframes rfChase {
  50% {
    background: #a96a06;
  }
}
.rf-sur.won .rf-lights i {
  animation-duration: 0.4s;
}
.rf-reels {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: 18px;
  background: #0b1030;
}
.rf-reel {
  width: var(--cell);
  height: var(--cell);
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #e9eef9);
  transition: box-shadow 0.25s;
}
.rf-sur.won .rf-reel {
  box-shadow: inset 0 0 0 3px #ffc83d;
}
.rf-sym {
  display: grid;
  place-items: center;
  height: var(--cell);
}
.rf-sym .msr {
  font-size: calc(var(--cell) * 0.55);
}
.s-bolt {
  color: #f2750a;
}
.s-star {
  color: #e8a200;
}
.s-diamond {
  color: #1769f2;
}
.s-redeem {
  color: #d6336c;
}
.s-local_fire_department {
  color: #e8503a;
}
/* the lever: its ball drops down the stick when it is pulled */
.rf-lever {
  position: absolute;
  right: -22px;
  top: 34%;
  width: 8px;
  height: 78px;
  border-radius: 4px;
  background: linear-gradient(90deg, #b8bcc8, #eceff6 50%, #9ea3b2);
}
.rf-lever i {
  position: absolute;
  left: 50%;
  top: -10px;
  width: 24px;
  height: 24px;
  margin-left: -12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff7a86, #d6283a 70%);
  transition: transform 0.35s cubic-bezier(0.5, 0, 0.7, 1);
}
.rf-sur.pull .rf-lever i {
  transform: translateY(58px);
  animation: rfLeverBack 0.5s 0.4s forwards;
}
@keyframes rfLeverBack {
  to {
    transform: translateY(0);
  }
}
/* streak banners */
.rf-flames {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  margin-bottom: 18px;
  animation: rfRise 0.35s 0.1s both;
}
.rf-flames svg.fire {
  width: 112px;
  height: 140px;
  overflow: visible;
  animation: rfFlame 0.55s 0.15s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.rf-sur.fire .rf-flames svg.fire:only-child {
  width: 150px;
  height: 188px;
}
.rf-flames svg.fire:nth-child(2):not(:only-child) {
  width: 140px;
  height: 176px;
}
@keyframes rfFlame {
  from {
    opacity: 0;
    transform: scale(0.3) translateY(30px);
  }
}
.rf-sur-r {
  min-height: 28px;
  margin-top: 22px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.78);
  opacity: 0;
  transform: translateY(8px);
}
.rf-sur-r b {
  display: inline-block;
  padding: 4px 14px;
  margin-right: 4px;
  border-radius: 999px;
  background: #ffc83d;
  color: #3a2300;
  font-weight: 800;
}
.rf-sur.won .rf-sur-r {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.25s 0.1s,
    transform 0.25s 0.1s;
}
.rf-sur.won .rf-sur-r b {
  animation: rfPop 0.45s 0.1s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes rfPop {
  from {
    transform: scale(0.4);
  }
}
.rf-sur-go {
  min-width: 200px;
  height: 52px;
  margin-top: 26px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #0e1f63;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
}
:root[data-fest="diwali"] .rf-sur-go {
  color: #7a1d06;
}
.rf-sur.won .rf-sur-go {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.3s 0.3s;
}
.rf-sur-go:focus-visible {
  outline: 3px solid #ffc83d;
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .rf-sur,
  .rf-rays,
  .rf-sur-h,
  .rf-sur-sub,
  .rf-machine,
  .rf-flames,
  .rf-flames svg.fire,
  .rf-lights i,
  .rf-lever i {
    animation: none !important;
  }
  .rf-sur.won .rf-sur-r,
  .rf-sur.won .rf-sur-go {
    transition: none;
  }
}

/* speed blur while a reel is rolling; it clears as the reel stops */
.rf-sur.pull .rf-reel:not(.still) .rf-strip {
  filter: blur(1.6px);
}
/* a white flash as the reels land, and gold coins in the shower */
.rf-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}
.rf-sur.won .rf-flash {
  animation: rfFlash 0.5s ease-out;
}
@keyframes rfFlash {
  from {
    opacity: 0.6;
  }
}
.cf.coin {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe27a, #f0a81c 70%);
  box-shadow: inset 0 0 0 2px #c97d08;
}
.rf-tm.frozen .pg {
  animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
  .rf-flash,
  .rf-sur.won .rf-sur-r b {
    animation: none !important;
  }
}

/* ---------- the win screen (more than 70% right): ribbon, XP count-up, trophy; one look per tier ---------- */
.rf-win.t8 {
  background: radial-gradient(95% 70% at 50% 30%, #4f7bff 0%, #2a45c4 40%, #131a66 75%, #0a0e3a 100%);
}
.rf-win.t9 {
  background: radial-gradient(95% 70% at 50% 30%, #9a5bff 0%, #5a22c8 40%, #260c6e 75%, #12063a 100%);
}
.rf-win.t10 {
  background: radial-gradient(95% 70% at 50% 30%, #ffb23a 0%, #e0561e 38%, #8a1330 75%, #3a0618 100%);
}
.rf-ribbon {
  position: relative;
  isolation: isolate;
  padding: 10px 44px 12px;
  background: linear-gradient(180deg, #f2505f, #cf2a3b);
  color: #fff;
  font-size: clamp(28px, 9vw, 38px);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.1;
  box-shadow: 0 10px 20px rgba(20, 4, 30, 0.35);
  animation: rfSlam 0.45s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}
/* the ribbon's two tails: tucked behind, dropped a little, with a dark fold where they meet the banner */
.rf-ribbon::before,
.rf-ribbon::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 14px;
  width: 44px;
  height: 100%;
  background-color: #b3263a;
  background-repeat: no-repeat;
  background-size: 14px 14px;
}
.rf-ribbon::before {
  left: -30px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 28% 50%);
  background-image: linear-gradient(to bottom left, #6a0f1d 50%, transparent 50%);
  background-position: right bottom;
}
.rf-ribbon::after {
  right: -30px;
  clip-path: polygon(0 0, 100% 0, 72% 50%, 100% 100%, 0 100%);
  background-image: linear-gradient(to bottom right, #6a0f1d 50%, transparent 50%);
  background-position: left bottom;
}
.rf-win-xp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 22px;
  font-size: clamp(60px, 19vw, 84px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  opacity: 0;
  transform: translateY(10px);
}
.rf-win-xp .msr {
  font-size: 0.62em;
  color: #ffc83d;
}
.rf-win-xp small {
  align-self: flex-end;
  margin: 0 0 8px 6px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.82);
}
.rf-trophy {
  width: min(50vw, 180px);
  height: auto;
  margin-top: 8px;
  opacity: 0;
  transform: translateY(40px) scale(0.7);
}
.rf-win-sub {
  margin-top: 14px;
  font-size: 17px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.84);
  opacity: 0;
}
.rf-win.won .rf-win-xp,
.rf-win.won .rf-win-sub {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.3s,
    transform 0.3s;
}
.rf-win.won .rf-trophy {
  animation: rfTrophy 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes rfTrophy {
  to {
    opacity: 1;
    transform: none;
  }
}
.rf-win.won .rf-star {
  transform-origin: 60px 46px;
  animation: rfTwinkle 1.8s 0.7s ease-in-out infinite;
}
@keyframes rfTwinkle {
  50% {
    transform: scale(1.18) rotate(14deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .rf-ribbon,
  .rf-win.won .rf-trophy,
  .rf-win.won .rf-star {
    animation: none !important;
  }
  .rf-win .rf-trophy {
    opacity: 1;
    transform: none;
  }
}

/* festival: streak shelf, calendar diyas, greeting chip, quiz-card rangoli, the diya to light, the burst canvas */
.mdy {
  width: 30px;
  height: 28px;
  flex: none;
  overflow: visible;
}
.mdy .bw {
  fill: #e9b860;
}
.mdy .rm {
  fill: #a86e1c;
}
.mdy:not(.lit) .bw {
  fill: #cdb48a;
}
.mdy .fl {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: festFlame 1.5s ease-in-out infinite alternate;
}
.skc-shelf {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 2px 6px 12px;
}
.cd-c .mdy.cdy {
  width: 24px;
  height: 22px;
}
.cd-c.full .mdy .bw {
  fill: #fff1d0;
}
.cd-c.half .mdy .bw {
  fill: #e9b860;
}
.cd-c.full .mdy .rm,
.cd-c.half .mdy .rm {
  fill: #f0b36a;
}
.fest-greet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 3px 12px 3px 8px;
  border-radius: 999px;
  background: var(--pc);
  color: var(--on-pc);
  font-weight: 600;
  font-size: 13px;
}
.fest-greet .mdy {
  width: 20px;
  height: 18px;
}
:root[data-fest="diwali"] .qtile::after {
  content: "";
  position: absolute;
  left: -46px;
  bottom: -46px;
  width: 140px;
  height: 140px;
  background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%22-100 -100 200 200%22%3E%3Cg fill=%22none%22 stroke=%22%23fff%22 stroke-width=%221.600%22%3E%3Cellipse rx=%229%22 ry=%2230%22 cy=%22-58%22 transform=%22rotate(0)%22/%3E%3Cellipse rx=%229%22 ry=%2230%22 cy=%22-58%22 transform=%22rotate(30)%22/%3E%3Cellipse rx=%229%22 ry=%2230%22 cy=%22-58%22 transform=%22rotate(60)%22/%3E%3Cellipse rx=%229%22 ry=%2230%22 cy=%22-58%22 transform=%22rotate(90)%22/%3E%3Cellipse rx=%229%22 ry=%2230%22 cy=%22-58%22 transform=%22rotate(120)%22/%3E%3Cellipse rx=%229%22 ry=%2230%22 cy=%22-58%22 transform=%22rotate(150)%22/%3E%3Cellipse rx=%229%22 ry=%2230%22 cy=%22-58%22 transform=%22rotate(180)%22/%3E%3Cellipse rx=%229%22 ry=%2230%22 cy=%22-58%22 transform=%22rotate(210)%22/%3E%3Cellipse rx=%229%22 ry=%2230%22 cy=%22-58%22 transform=%22rotate(240)%22/%3E%3Cellipse rx=%229%22 ry=%2230%22 cy=%22-58%22 transform=%22rotate(270)%22/%3E%3Cellipse rx=%229%22 ry=%2230%22 cy=%22-58%22 transform=%22rotate(300)%22/%3E%3Cellipse rx=%229%22 ry=%2230%22 cy=%22-58%22 transform=%22rotate(330)%22/%3E%3Ccircle r=%222.200%22 cy=%22-92%22 transform=%22rotate(0)%22/%3E%3Ccircle r=%222.200%22 cy=%22-92%22 transform=%22rotate(15)%22/%3E%3Ccircle r=%222.200%22 cy=%22-92%22 transform=%22rotate(30)%22/%3E%3Ccircle r=%222.200%22 cy=%22-92%22 transform=%22rotate(45)%22/%3E%3Ccircle r=%222.200%22 cy=%22-92%22 transform=%22rotate(60)%22/%3E%3Ccircle r=%222.200%22 cy=%22-92%22 transform=%22rotate(75)%22/%3E%3Ccircle r=%222.200%22 cy=%22-92%22 transform=%22rotate(90)%22/%3E%3Ccircle r=%222.200%22 cy=%22-92%22 transform=%22rotate(105)%22/%3E%3Ccircle r=%222.200%22 cy=%22-92%22 transform=%22rotate(120)%22/%3E%3Ccircle r=%222.200%22 cy=%22-92%22 transform=%22rotate(135)%22/%3E%3Ccircle r=%222.200%22 cy=%22-92%22 transform=%22rotate(150)%22/%3E%3Ccircle r=%222.200%22 cy=%22-92%22 transform=%22rotate(165)%22/%3E%3Ccircle r=%222.200%22 cy=%22-92%22 transform=%22rotate(180)%22/%3E%3Ccircle r=%222.200%22 cy=%22-92%22 transform=%22rotate(195)%22/%3E%3Ccircle r=%222.200%22 cy=%22-92%22 transform=%22rotate(210)%22/%3E%3Ccircle r=%222.200%22 cy=%22-92%22 transform=%22rotate(225)%22/%3E%3Ccircle r=%222.200%22 cy=%22-92%22 transform=%22rotate(240)%22/%3E%3Ccircle r=%222.200%22 cy=%22-92%22 transform=%22rotate(255)%22/%3E%3Ccircle r=%222.200%22 cy=%22-92%22 transform=%22rotate(270)%22/%3E%3Ccircle r=%222.200%22 cy=%22-92%22 transform=%22rotate(285)%22/%3E%3Ccircle r=%222.200%22 cy=%22-92%22 transform=%22rotate(300)%22/%3E%3Ccircle r=%222.200%22 cy=%22-92%22 transform=%22rotate(315)%22/%3E%3Ccircle r=%222.200%22 cy=%22-92%22 transform=%22rotate(330)%22/%3E%3Ccircle r=%222.200%22 cy=%22-92%22 transform=%22rotate(345)%22/%3E%3Ccircle r=%2228%22/%3E%3Ccircle r=%2246%22/%3E%3Ccircle r=%2276%22/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0.12;
  pointer-events: none;
  z-index: -1;
}
.fest-burst {
  position: fixed;
  inset: 0;
  z-index: 200;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* the campus hero: lights hanging down the facade, one anar sparking at the centre */
.dh .fest-lt .fw-wire {
  stroke: #d9b86a;
  stroke-opacity: 0.45;
}
.dh .fest-lt .c {
  fill: #ffcf5a;
}
.dh .as {
  fill: #ffd23f;
  opacity: 0;
  animation: asSpark 1.6s ease-out infinite;
}
@keyframes asSpark {
  0% {
    opacity: 0.9;
    transform: translate(0, 0);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), -15px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .dh .as {
    animation: none;
  }
}
/* on the question screen the content comes first: the lights round the card hold still and stay soft */
.fest-cl .fw-d {
  animation: none;
  opacity: 0.6;
}

/* "Did you know?": a quiet white card, a small lead-in over the fact. */
.fact-card,
.dh .fact-card,
.dh .dh-fact.fact-card,
.greet-fact.fact-card {
  display: block;
  max-width: 400px;
  margin-top: 16px;
  padding: 14px 18px 15px;
  border: 1px solid var(--outline-v);
  border-radius: 16px;
  background: var(--surface);
  color: var(--on);
}
/* the card pops in, the "?" wobbles, then the fact lands word by word */
.fact-card .fc-t span {
  display: inline-block;
}
.fact-card .fact-h i {
  display: inline-block;
  font-style: normal;
  transform-origin: 50% 80%;
}
@media (prefers-reduced-motion: no-preference) {
  .fact-card {
    animation: factIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  }
  .fact-card .fact-h i {
    animation: factQ 0.9s 0.45s ease-in-out both;
  }
  .fact-card .fc-t span {
    animation: factWord 0.45s calc(0.55s + var(--i) * 45ms) cubic-bezier(0.34, 1.7, 0.64, 1) both;
  }
}
@keyframes factIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.94);
  }
}
@keyframes factQ {
  0%,
  100% {
    transform: none;
  }
  20% {
    transform: translateY(-4px) rotate(-18deg) scale(1.3);
  }
  45% {
    transform: rotate(14deg) scale(1.2);
  }
  70% {
    transform: rotate(-6deg);
  }
}
@keyframes factWord {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.85);
  }
}
.fact-card .fact-h,
.dh .dh-fact.fact-card .fact-h {
  display: block;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--primary);
}
.fact-card .fc-t,
.dh .dh-fact.fact-card p {
  display: block;
  margin: 4px 0 0;
  font-size: 13.5px;
  line-height: 21px;
  font-weight: 400;
  color: var(--on-2);
  opacity: 1;
  text-wrap: pretty;
  -webkit-line-clamp: unset;
  overflow: visible;
}
.dh .fact-card .fact-h,
.dh .dh-fact.fact-card .fact-h {
  color: var(--primary);
}

/* 7 in a row: a 3D chest. The scene is tilted so we look slightly down into it; the lid swings back on its rear hinge. */
.rf-flames .rf-chest {
  --W: 180px;
  --D: 110px;
  --H: 72px;
  position: relative;
  width: 240px;
  height: 220px;
  perspective: 900px;
  animation: rfFlame 0.55s 0.15s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.rf-chest .ch3 {
  position: absolute;
  left: calc(50% - var(--W) / 2);
  top: 112px;
  width: var(--W);
  height: var(--H);
  transform-style: preserve-3d;
  transform: rotateX(-24deg) rotateY(-30deg);
}
.rf-chest .ch3 > *,
.rf-chest .ch-lid > * {
  position: absolute;
  display: block;
  transform-style: preserve-3d;
  backface-visibility: visible;
}
.rf-chest {
  --wood: linear-gradient(180deg, #a8631b, #74400d);
  --strap: linear-gradient(90deg, transparent 0 10%, #f3c44a 10% 18%, #c98a14 18% 21%, transparent 21% 79%, #c98a14 79% 82%, #f3c44a 82% 90%, transparent 90%);
}
.rf-chest .ch-fr,
.rf-chest .ch-bk {
  left: 0;
  top: 0;
  width: var(--W);
  height: var(--H);
  background:
    linear-gradient(180deg, transparent 0 22%, #f3c44a 22% 30%, #c98a14 30% 33%, transparent 33%),
    var(--strap),
    var(--wood);
}
.rf-chest .ch-fr {
  transform: translateZ(calc(var(--D) / 2));
}
.rf-chest .ch-bk {
  transform: rotateY(180deg) translateZ(calc(var(--D) / 2));
  filter: brightness(0.7);
}
.rf-chest .ch-lt,
.rf-chest .ch-rt {
  left: calc((var(--W) - var(--D)) / 2);
  top: 0;
  width: var(--D);
  height: var(--H);
  background: linear-gradient(180deg, transparent 0 22%, #e6b13a 22% 30%, #b07a12 30% 33%, transparent 33%), linear-gradient(180deg, #8e4f12, #5f330a);
}
.rf-chest .ch-lt {
  transform: rotateY(-90deg) translateZ(calc(var(--W) / 2));
}
.rf-chest .ch-rt {
  transform: rotateY(90deg) translateZ(calc(var(--W) / 2));
  filter: brightness(0.85);
}
/* the floor of the chest, glinting with the treasure */
.rf-chest .ch-fl {
  left: 0;
  top: calc((var(--H) - var(--D)) / 2);
  width: var(--W);
  height: var(--D);
  background: radial-gradient(60% 60% at 50% 50%, #ffe27a, #e0a21a 60%, #7a4a0a);
  transform: rotateX(90deg) translateZ(calc(var(--H) / 2 - 10px));
}
.rf-chest .ch-in {
  left: 0;
  top: 0;
  width: var(--W);
  height: var(--H);
}
.rf-chest .ch-lock {
  position: absolute;
  left: calc(50% - 13px);
  top: 12px;
  width: 26px;
  height: 30px;
  border-radius: 6px;
  background: linear-gradient(135deg, #ffe58a, #d9930d);
  box-shadow: inset 0 0 0 2px #b5780c;
}
.rf-chest .ch-lock::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 10px;
  width: 4px;
  height: 9px;
  border-radius: 2px;
  background: #5e3203;
}
/* lid: zero-height group on the top rim, hinged at the back edge */
.rf-chest .ch-lid {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--W);
  height: 0;
  transform-style: preserve-3d;
  transform-origin: 50% 0 calc(var(--D) / -2);
  transition: transform 0.8s cubic-bezier(0.34, 1.35, 0.64, 1);
}
.rf-chest .ch-slat {
  left: 0;
  top: -13px;
  width: var(--W);
  height: 27px;
  background: var(--strap), linear-gradient(180deg, #a8631b, #86500f);
  filter: brightness(var(--b));
  transform: rotateX(var(--a)) translateZ(calc(var(--D) / 2 * 0.974));
}
.rf-chest .ch-end {
  top: calc(var(--D) / -2);
  left: calc((var(--W) - var(--D)) / 2);
  width: var(--D);
  height: calc(var(--D) / 2);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: linear-gradient(180deg, #7a430c, #5f330a);
  box-shadow: inset 0 3px 0 #e6b13a;
}
.rf-chest .ch-el {
  transform: rotateY(-90deg) translateZ(calc(var(--W) / 2));
}
.rf-chest .ch-er {
  transform: rotateY(90deg) translateZ(calc(var(--W) / 2));
  filter: brightness(0.85);
}
.rf-sur.won .rf-chest .ch-lid {
  transform: rotateX(112deg);
}
/* light rises out of the open chest */
.rf-chest .ch-beam {
  position: absolute;
  left: calc(50% - 90px);
  top: -30px;
  width: 180px;
  height: 160px;
  clip-path: polygon(30% 100%, 0 0, 100% 0, 70% 100%);
  background: linear-gradient(0deg, rgba(255, 243, 184, 0.85), rgba(255, 243, 184, 0));
  opacity: 0;
  transition: opacity 0.6s 0.25s;
}
.rf-sur.won .rf-chest .ch-beam {
  opacity: 1;
}
/* coins arc out of the opening */
.rf-chest .ch-coins i {
  position: absolute;
  left: calc(50% - 10px);
  top: 100px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3b0, #f3b81c 55%, #b9780a);
  box-shadow: inset 0 0 0 2px #c98a14;
  opacity: 0;
}
.rf-chest .ch-coins i:nth-child(1) { --dx: -62px; --dy: -30px; --k: 0; }
.rf-chest .ch-coins i:nth-child(2) { --dx: -34px; --dy: -58px; --k: 1; }
.rf-chest .ch-coins i:nth-child(3) { --dx: -8px; --dy: -40px; --k: 2; }
.rf-chest .ch-coins i:nth-child(4) { --dx: 16px; --dy: -66px; --k: 3; }
.rf-chest .ch-coins i:nth-child(5) { --dx: 42px; --dy: -36px; --k: 4; }
.rf-chest .ch-coins i:nth-child(6) { --dx: 68px; --dy: -52px; --k: 5; }
.rf-sur.won .rf-chest .ch-coins i {
  animation: chCoin 1.2s calc(0.3s + var(--k) * 0.08s) cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
@keyframes chCoin {
  0% { opacity: 0; transform: translate(0, 0) scale(0.6); }
  20% { opacity: 1; }
  50% { transform: translate(calc(var(--dx) * 0.7), calc(var(--dy) - 40px)) scale(1); }
  100% { opacity: 1; transform: translate(var(--dx), var(--dy)) scale(1); }
}
@keyframes chShake {
  0%, 100% { transform: rotateX(-24deg) rotateY(-30deg); }
  20% { transform: rotateX(-24deg) rotateY(-36deg) rotateZ(-3deg); }
  40% { transform: rotateX(-24deg) rotateY(-24deg) rotateZ(3deg); }
  60% { transform: rotateX(-24deg) rotateY(-35deg) rotateZ(-2deg); }
  80% { transform: rotateX(-24deg) rotateY(-26deg) rotateZ(2deg); }
}
@keyframes chSway {
  50% { transform: rotateX(-24deg) rotateY(-14deg); }
}
@media (prefers-reduced-motion: no-preference) {
  .rf-sur:not(.won) .rf-chest .ch3 {
    animation: chShake 0.55s 0.8s ease-in-out 2;
  }
  .rf-sur.won .rf-chest .ch3 {
    animation: chSway 3.2s 0.9s ease-in-out infinite;
  }
}

/* ` hides the prototype toolbar */
:root.no-proto {
  --proto-h: 0px;
}
.no-proto .proto {
  display: none;
}

/* the card stays light on the dark night banner, so its text must beat the banner's light-on-dark paragraph rule */
.dh-hi .fact-card .fc-t {
  color: var(--on-2) !important;
}

/* ---------- web build ---------- */
:root {
  --proto-h: 0px; /* no prototype toolbar */
}
.proto {
  display: none;
}
/* the slot Google draws its own sign-in button into */
.gbtn-host {
  display: flex;
  justify-content: center;
  min-height: 44px;
}
.sub-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

/* onboarding card: lights swag along its top edge */
.ob-shell {
  position: relative;
}
.fest-ob {
  position: absolute;
  top: 0;
  height: 84px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  /* a warm wash from the corner, so the lights belong to the card; both fade out toward the middle */
  background: radial-gradient(120% 140% at 0 0, rgba(255, 170, 40, 0.28), rgba(255, 170, 40, 0) 70%);
  -webkit-mask-image: radial-gradient(ellipse 100% 100% at 0 0, #000 55%, transparent);
  mask-image: radial-gradient(ellipse 100% 100% at 0 0, #000 55%, transparent);
}
.fest-ob.l {
  left: 0;
  border-top-left-radius: inherit;
}
.fest-ob.r {
  right: 0;
  transform: scaleX(-1);
  border-top-left-radius: inherit;
}
.fest-ob .fest-lt {
  width: 100%;
  height: auto;
}
.fest-ob .fw-wire {
  stroke: #e0a63a;
  stroke-opacity: 0.8;
}
.fest-ob .fw-sp {
  fill: #ffd98a;
  opacity: 0.8;
}
.fest-ob .fw-d .h {
  fill: url(#obBloom);
}
.fest-ob .fw-d .c {
  fill: #fffbe6;
}
.fest-ob .fw-d .c.s {
  fill: #ffc233;
}

/* Goa skyshot: rises from the beach, then bursts; one 8s loop */
.fest-sky .sk-up {
  animation: skUp 8s ease-out infinite;
}
.fest-sky .sk-bu {
  transform-box: fill-box;
  transform-origin: center;
  animation: skBurst 8s ease-out infinite;
  opacity: 0;
}
@keyframes skUp {
  0% {
    transform: translateY(104px);
    opacity: 1;
  }
  17.5% {
    transform: translateY(0);
    opacity: 1;
  }
  18%,
  100% {
    transform: translateY(0);
    opacity: 0;
  }
}
@keyframes skBurst {
  0%,
  17.5% {
    transform: scale(0.2);
    opacity: 0;
  }
  20% {
    opacity: 0.9;
  }
  32.5% {
    transform: scale(1);
    opacity: 0.7;
  }
  50%,
  100% {
    transform: scale(1.15);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fest-sky .sk-up {
    display: none;
  }
  .fest-sky .sk-bu {
    animation: none;
    opacity: 0.6;
  }
}
.fest-sky .sk-fl {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: skFlash 8s ease-out infinite;
}
.fest-sky .sk-fall {
  opacity: 0;
  animation: skFall 8s ease-in infinite;
}
@keyframes skFlash {
  0%,
  17.5% {
    transform: scale(0.3);
    opacity: 0;
  }
  19% {
    transform: scale(1);
    opacity: 0.9;
  }
  24%,
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}
@keyframes skFall {
  0%,
  20% {
    transform: translateY(0);
    opacity: 0;
  }
  23% {
    opacity: 1;
  }
  45%,
  100% {
    transform: translateY(14px);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fest-sky .sk-fl,
  .fest-sky .sk-fall {
    display: none;
  }
}

/* a fine string of glowing lights across the top of the app pages (see festToran), over a faint warm wash */
.fest-toran {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--proto-h, 0px);
  height: 72px;
  z-index: 40;
  pointer-events: none;
  background: linear-gradient(rgba(255, 159, 28, 0.16), rgba(255, 159, 28, 0));
}
.fest-toran svg {
  display: block;
}
body.is-quiz .fest-toran,
body.is-ob .fest-toran {
  display: none;
}

/* the question card: garlands sit behind its content */
.rf-qc {
  isolation: isolate;
}
.rf-qc > .fest-ob {
  height: 46px;
}
/* festival: a band at the top of the card for the garlands; the pill and chip move below it */
:root[data-fest="diwali"] .rf-qc {
  padding-top: 84px;
}
:root[data-fest="diwali"] .rf-tp,
:root[data-fest="diwali"] .rf-up {
  top: 44px;
}

/* side nav: the highlight slides to the chosen item (reuses the tab pill code) */
@media (min-width: 840px) {
  .nav > .nv {
    position: relative;
    z-index: 1;
    transition:
      color 0.3s ease,
      background 0.2s ease;
  }
  .nav .tab-ind {
    background: var(--sc);
    border-radius: 28px;
  }
}
@media (min-width: 1200px) {
  .nav .tab-ind {
    background: var(--pc);
    border-radius: 14px;
  }
}

/* phone bottom nav: the pill behind the icon slides to the chosen item */
@media (max-width: 839px) {
  .nav .tab-ind {
    background: var(--pc);
    border-radius: 12px;
  }
  .nav.has-ind .nv.on .nv-i {
    background: transparent;
  }
}

/* phone: the two subject cards stack, one per row */
@media (max-width: 599px) {
  .qtiles {
    grid-template-columns: 1fr;
  }
  .qtile {
    min-height: 0;
  }
}

/* campus chip and festival greeting: same height and shape, with room around them */
.cchip + .fest-greet {
  height: 32px;
  margin: 16px 0 0 10px;
  padding: 0 12px 0 10px;
  border: 1px solid transparent;
  font-weight: 500;
}
@media (max-width: 839px) {
  .cchip {
    margin-top: 16px;
  }
}

/* profile sheet: the Sign out button sits inside the sheet's side margins, with room below */
.sheet .menu-div + .btn.full {
  width: calc(100% - 40px);
  margin: 12px 20px 8px;
}
