/* Teacher Challenge UI */
#tcIntroModal, #tcInputModal, #tcResultsModal { position: fixed !important; }
/* Small Business Owner Challenge UI */
#sboIntroModal, #sboTaskModal, #sboResultsModal { position: fixed !important; }
.modal-content {
  background: #fff;
  border-radius: 20px;
  padding: 24px 22px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,.22);
  width: 100%;
  box-sizing: border-box;
}
.modal-content h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 21px; letter-spacing: -.04em; margin: 0 0 6px; color: #111b21;
}
.modal-content h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 17px; letter-spacing: -.03em; margin: 0 0 6px; color: #111b21;
}
#tcHUD {
  position: fixed; top: 0; left: 0; right: 0;
  background: #0d2126; color: #fff;
  z-index: 9999; display: flex; justify-content: center; align-items: center;
  padding: 0 20px; height: 54px;
  pointer-events: none; opacity: 0; transition: opacity 0.3s;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
}
#tcHUD.show { opacity: 1; pointer-events: auto; }
.tc-hud-inner {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: 960px; gap: 16px;
}
.tc-timer {
  font-weight: 800; font-size: 18px; color: #4fe3b6;
  font-family: "Space Grotesk", sans-serif; letter-spacing: .02em;
  display: flex; align-items: center; gap: 7px; flex: 0 0 auto;
  transition: color .4s ease;
}
.tc-timer--urgent {
  color: #ff4d4d !important;
  animation: tc-pulse 1s ease-in-out infinite;
}
@keyframes tc-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .65; transform: scale(1.08); }
}
.tc-status-text {
  flex: 1; text-align: center; font-size: 11px; font-weight: 800;
  color: #6a8890; text-transform: uppercase; letter-spacing: .14em;
}
.tc-hud-submit {
  background: #4fe3b6; color: #0d2126; border: none;
  border-radius: 999px; padding: 8px 18px;
  font-weight: 800; font-size: 12px; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; gap: 6px; flex: 0 0 auto;
  transition: .18s ease;
}
.tc-hud-submit:hover { background: #3dd4a5; }
.tc-cheat-btn {
  background: rgba(255,255,255,.08); color: #9ecfca; border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px; padding: 8px 14px;
  font-weight: 800; font-size: 12px; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; gap: 5px; flex: 0 0 auto;
  transition: background .18s ease;
}
.tc-cheat-btn:hover, .tc-cheat-btn.open { background: rgba(255,255,255,.15); color: #fff; }
#tcCheatSheet {
  position: fixed; bottom: 72px; left: 50%; transform: translateX(-50%) translateY(12px);
  width: min(420px, 96vw); background: #1a2c30;
  border-radius: 18px; padding: 14px 16px;
  z-index: 9998; border: 1px solid #2d4450;
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
#tcCheatSheet.show {
  opacity: 1; pointer-events: all; transform: translateX(-50%) translateY(0);
}
#tcFab {
  position: fixed; bottom: 28px; right: 28px;
  background: linear-gradient(180deg,#20c26a,#0ea855); color: white; border-radius: 50%;
  width: 58px; height: 58px; display: flex; justify-content: center; align-items: center;
  box-shadow: 0 10px 26px rgba(14,168,85,.38); cursor: pointer; z-index: 9998; border: none;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
#tcFab.show { opacity: 1; pointer-events: auto; }
.tc-period-badge {
  background: #edf8f5; border: 1.5px solid #c8e8e0; border-radius: 14px;
  padding: 14px 16px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px;
}
.tc-period-badge .tc-pb-icon {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg,#109d88,#0b8f7d);
  display: grid; place-items: center; flex: 0 0 auto;
}
.tc-period-badge .tc-pb-text { flex: 1; }
.tc-period-badge .tc-pb-label {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .12em; color: #7a9098; display: block; margin-bottom: 2px;
}
.tc-period-badge .tc-pb-val {
  font-size: 17px; font-weight: 800; color: #0b8f7d;
  font-family: "Space Grotesk", sans-serif;
}
.tc-mode-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.tc-mode-btn {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 14px 16px; border-radius: 14px;
  font-family: inherit; font-size: 14px; font-weight: 800; cursor: pointer;
  border: 1.5px solid var(--line); background: #f4f7f8; color: #334;
  text-align: left; transition: .18s ease; box-sizing: border-box;
}
.tc-mode-btn:hover { transform: translateY(-1px); }
.tc-mode-btn .tc-mb-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; flex: 0 0 auto;
}
.tc-mode-btn .tc-mb-text { flex: 1; }
.tc-mode-btn .tc-mb-title { display: block; font-size: 14px; font-weight: 800; }
.tc-mode-btn .tc-mb-sub { display: block; font-size: 11px; font-weight: 600; opacity: .65; margin-top: 1px; }
.tc-mode-btn.primary {
  background: linear-gradient(180deg,#2cdb8a,#19c474);
  color: #072317; border-color: transparent;
}
.tc-input-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid #eef1f3; font-size: 14px; font-weight: 600; color: #1a2f35;
}
.tc-input-row input {
  width: 96px; padding: 8px 10px; border: 1.5px solid #dde4e7; border-radius: 10px;
  text-align: right; font-size: 14px; font-family: inherit; color: #1a2f35;
  outline: none; transition: .18s ease;
}
.tc-input-row input:focus { border-color: #0b8f7d; }
.tc-btn {
  background: linear-gradient(180deg,#2cdb8a,#19c474); color: #072317; border: none;
  padding: 13px; width: 100%; border-radius: 14px; font-weight: 800; font-size: 14px;
  margin-top: 14px; cursor: pointer; font-family: inherit;
}
.tc-results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.tc-stat-box {
  background: #f4f7f8; padding: 14px 10px; border-radius: 14px; text-align: center;
  border: 1px solid var(--line);
}
.tc-stat-val {
  font-size: 22px; font-weight: 800; color: #111b21;
  font-family: "Space Grotesk", sans-serif;
}
.tc-stat-lbl {
  font-size: 10px; color: #667781; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; margin-top: 3px;
}
.tc-diff-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 6px 12px;
  padding: 9px 0;
  font-size: 13px;
  border-bottom: 1px solid #eef1f3;
}
.tc-diff-row:last-child { border-bottom: none; }
.tc-diff-name { font-weight: 600; color: #1a2f35; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-diff-cell { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; flex: 0 0 auto; }
.tc-diff-cell-label { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #8a9da5; }
.tc-diff-cell-val { font-size: 14px; font-weight: 800; font-family: "Space Grotesk", sans-serif; }
.tc-diff-correct { color: #25d366; }
.tc-diff-wrong { color: #e95e68; }
.tc-diff-neutral { color: #111b21; }
.tc-diff-row--total { background: #f0faf8; border-radius: 8px; padding: 9px 10px; margin-top: 4px; }
.tc-diff-row--total .tc-diff-name { color: #0b8f7d; font-weight: 800; font-size: 14px; }

/* ── TC Intro — two mini-badges + contact chip grid ─────────────────────── */
.tc-two-badges {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px;
}
.tc-mini-badge {
  background: #edf8f5; border: 1.5px solid #c8e8e0; border-radius: 12px;
  padding: 11px 14px; display: flex; flex-direction: column; gap: 3px;
}
.tc-mini-badge .tc-mb-lbl {
  font-size: 9px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .12em; color: #0b8f7d; display: flex; align-items: center; gap: 3px;
}
.tc-mini-badge .tc-mb-val {
  font-size: 15px; font-weight: 800; color: #0a7264;
  font-family: "Space Grotesk", sans-serif; line-height: 1.2;
}
.tc-contact-chip-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 14px;
}
.tc-contact-chip {
  background: #fff; border: 1px solid #d4ede8; border-radius: 11px;
  padding: 9px 10px; display: flex; flex-direction: column; gap: 5px;
}
.tc-cc-row {
  display: flex; align-items: center; gap: 6px; min-width: 0;
}
.tc-cc-av {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto;
  font-size: 8px; font-weight: 800; display: grid; place-items: center; color: #fff;
}
.tc-cc-av--parent { background: #6a8890; }
.tc-cc-av--student { background: linear-gradient(135deg,#109d88,#0b8f7d); }
.tc-cc-label {
  font-size: 11px; font-weight: 700; color: #334; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; line-height: 1.2;
}
.tc-cc-student .tc-cc-label { color: #0b8f7d; font-weight: 800; }
.tc-cc-arrow {
  display: flex; justify-content: center; color: #c8d4d8; margin: -2px 0;
}
.tc-tasks-box {
  background: #f0faf8; border: 1.5px solid #c8e8e0; border-radius: 14px;
  padding: 12px 14px; margin-bottom: 16px;
}
.tc-tasks-box-title {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .12em; color: #0b8f7d; margin-bottom: 8px;
}
.tc-task-item {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 5px 0; border-bottom: 1px solid #d4ede8;
  font-size: 12.5px; color: #334; line-height: 1.4;
}
.tc-task-item:last-child { border-bottom: none; padding-bottom: 0; }
.tc-task-num {
  width: 18px; height: 18px; border-radius: 50%; background: #0b8f7d; color: #fff;
  font-size: 9px; font-weight: 800; display: grid; place-items: center;
  flex: 0 0 auto; margin-top: 1px;
}

/* ── WhatsCash Challenge Hint Banner ─────────────────────────────────────── */
    #wcHintBanner {
      display: none;
      align-items: flex-start;
      gap: 9px;
      margin: 0 10px 6px;
      padding: 10px 10px 10px 12px;
      border-radius: 10px;
      border-left: 4px solid currentColor;
      font-size: 11.5px;
      line-height: 1.45;
      color: #1a2e1a;
      background: #f0faf3;
      animation: wc-hint-in .25s ease;
    }
    #wcHintBanner.show { display: flex; }
    #wcHintBanner.wc-hint--tc  { color: #064e3b; background: #ecfdf5; border-color: #08a652; }
    #wcHintBanner.wc-hint--sbo { color: #431407; background: #fff7ed; border-color: #ff9a1f; }
    #wcHintBanner.wc-hint--chm { color: #1e3a8a; background: #eff6ff; border-color: #1565c0; }
    .wc-hint-icon {
      flex: 0 0 auto;
      margin-top: 1px;
      opacity: .85;
    }
    .wc-hint-body { flex: 1; }
    .wc-hint-body strong { font-weight: 700; }
    .wc-hint-dismiss {
      flex: 0 0 auto;
      background: none;
      border: none;
      cursor: pointer;
      font-size: 13px;
      line-height: 1;
      padding: 0 2px;
      opacity: .5;
      color: inherit;
      margin-top: -1px;
    }
    .wc-hint-dismiss:hover { opacity: 1; }
    @keyframes wc-hint-in {
      from { opacity: 0; transform: translateY(-4px); }
      to   { opacity: 1; transform: translateY(0); }
    }

/* ── TC Answer Table ──────────────────────────────────────────────────────── */
.tc-table-wrap { border: 1.5px solid #dde4e7; border-radius: 14px; overflow: hidden; }
.tc-table-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 14px;
  background: linear-gradient(90deg,#edf8f5,#f0faf8);
  border-bottom: 1.5px solid #c8e8e0;
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .12em; color: #0b8f7d;
}
.tc-input-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 14px; border-bottom: 1px solid #f0f3f5;
  font-size: 14px; font-weight: 600; color: #1a2f35; transition: background .12s;
}
.tc-input-row:last-child { border-bottom: none; }
.tc-input-row:hover { background: #fafcfc; }
.tc-input-row--total {
  background: #f0faf8; border-top: 2px solid #c8e8e0;
  padding: 13px 14px; font-weight: 800; color: #0b8f7d;
  font-size: 15px; display: flex; justify-content: space-between; align-items: center;
}
.tc-amount-field {
  display: flex; align-items: center; gap: 2px;
  background: #fff; border: 1.5px solid #dde4e7; border-radius: 10px;
  padding: 0 10px 0 8px; transition: border-color .18s;
}
.tc-amount-field:focus-within { border-color: #0b8f7d; box-shadow: 0 0 0 3px rgba(11,143,125,.08); }
.tc-amount-prefix {
  font-size: 12px; color: #8a9da5; font-weight: 700; pointer-events: none; flex: 0 0 auto;
}
.tc-amount-field input {
  width: 72px; border: none; outline: none;
  padding: 8px 0; text-align: right;
  font-size: 14px; font-family: inherit; color: #1a2f35; background: transparent;
  -moz-appearance: textfield;
}
.tc-amount-field input::-webkit-inner-spin-button,
.tc-amount-field input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
/* Override legacy input rule inside tc-input-row */
.tc-input-row > input { all: unset; }

/* ── TC Contact Map rows ──────────────────────────────────────────────────── */
.tc-contact-row {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 10px; padding: 8px 10px;
  border: 1px solid #eaeff1; min-width: 0;
}
.tc-cr-name {
  font-size: 12px; font-weight: 700; color: #334;
  font-family: "Space Grotesk", sans-serif; letter-spacing: .01em;
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tc-cr-student { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.tc-cr-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: #0b8f7d; color: #fff; font-size: 10px; font-weight: 800;
  display: grid; place-items: center; flex: 0 0 auto;
}
.tc-cr-sname { font-size: 13px; font-weight: 800; color: #0b8f7d; white-space: nowrap; }

/* ── TC Cheat Sheet rows ─────────────────────────────────────────────────── */
.tc-cheat-row {
  display: flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,.06); border-radius: 9px; padding: 7px 10px; min-width: 0;
}
.tc-cheat-name {
  font-size: 11px; font-weight: 700; color: #b0ccd0; flex: 1;
  letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.tc-cheat-student { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.tc-cheat-avatar {
  width: 20px; height: 20px; border-radius: 50%;
  background: #0b8f7d; color: #fff; font-size: 9px; font-weight: 800;
  display: grid; place-items: center; flex: 0 0 auto;
}
.tc-cheat-sname { font-size: 12px; font-weight: 800; color: #4fe3b6; white-space: nowrap; }

/* ── TC Comparison banner ─────────────────────────────────────────────────── */
.tc-compare-header {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .12em; color: #7a9098; margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.tc-compare-wrap { display: flex; gap: 8px; align-items: stretch; }
.tc-compare-card {
  flex: 1; background: #f4f7f8; border-radius: 12px; padding: 12px 10px;
  border: 1.5px solid #dde4e7; text-align: center; min-width: 0;
}
.tc-compare-card.winner { background: #edf8f5; border-color: #c8e8e0; }
.tc-compare-tool {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .10em; color: #7a9098; margin-bottom: 4px;
}
.tc-compare-card.winner .tc-compare-tool { color: #0b8f7d; }
.tc-compare-pct {
  font-size: 22px; font-weight: 800;
  font-family: "Space Grotesk", sans-serif; color: #111b21; line-height: 1.1;
}
.tc-compare-card.winner .tc-compare-pct { color: #0b8f7d; }
.tc-compare-sub { font-size: 11px; color: #8a9da5; margin-top: 3px; }
.tc-compare-arrow { display: flex; align-items: center; color: #c8d4d8; font-size: 18px; flex: 0 0 auto; }

/* ── TC Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  /* Bottom-sheet style for TC modals on mobile */
  #tcIntroModal,
  #tcInputModal,
  #tcResultsModal {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  #tcIntroModal .modal-content,
  #tcInputModal .modal-content,
  #tcResultsModal .modal-content {
    max-width: 100% !important;
    border-radius: 24px 24px 0 0 !important;
    padding: 20px 16px 28px !important;
    max-height: 92vh !important;
  }
  /* Tighten HUD on small screens */
  .tc-status-text { font-size: 10px; letter-spacing: .08em; }
  .tc-timer { font-size: 15px; }
  .tc-hud-submit { padding: 7px 13px; font-size: 11px; }
  /* Stat boxes */
  .tc-stat-val { font-size: 19px; }
  .tc-stat-lbl { font-size: 9px; }
  /* Diff list */
  #tcDiffList { max-height: min(220px, 38vh); }
  /* Comparison banner values */
  .tc-compare-pct { font-size: 19px; }
  /* Amount input narrower */
  .tc-amount-field input { width: 62px; }
  /* Results action row stacks on very small */
  #tcResultsModal .modal-content > div:last-child { flex-wrap: wrap; }
  /* Intro: stack badges and chips to single col on very small screens */
  .tc-two-badges { grid-template-columns: 1fr; }
  .tc-contact-chip-grid { grid-template-columns: 1fr; }
}

#sboHUD {
  position: fixed; top: 0; left: 0; right: 0;
  background: #26160d; color: #fff;
  z-index: 9999; display: flex; justify-content: center; align-items: center;
  padding: 0 20px; height: 54px;
  pointer-events: none; opacity: 0; transition: opacity 0.3s;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
}
#sboHUD.show { opacity: 1; pointer-events: auto; }
.sbo-timer {
  font-weight: 800; font-size: 18px; color: #ffb84f;
  font-family: "Space Grotesk", sans-serif; letter-spacing: .02em;
  display: flex; align-items: center; gap: 7px; flex: 0 0 auto;
  transition: color .4s ease;
}
.sbo-timer--urgent { color: #ff4d4d !important; animation: tc-pulse 1s ease-in-out infinite; }
.sbo-scenario-text {
  flex: 1; text-align: center; font-size: 12px; font-weight: 700;
  color: #ffd9a8; letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; padding: 0 10px;
}
.sbo-progress-badge {
  background: rgba(255,255,255,.1); color: #fff; border-radius: 999px;
  padding: 6px 14px; font-weight: 800; font-size: 12px; flex: 0 0 auto;
  font-family: "Space Grotesk", sans-serif;
}
#sboFab {
  position: fixed; bottom: 28px; right: 28px;
  background: linear-gradient(180deg,#ffb84f,#ff9a1f); color: #26160d; border-radius: 50%;
  width: 58px; height: 58px; display: flex; justify-content: center; align-items: center;
  box-shadow: 0 10px 26px rgba(255,154,31,.38); cursor: pointer; z-index: 9998; border: none;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
#sboFab.show { opacity: 1; pointer-events: auto; }
.sbo-badge {
  background: #fff6ea; border: 1.5px solid #ffe0b0; border-radius: 14px;
  padding: 14px 16px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px;
}
.sbo-badge .sbo-icon {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg,#ff9a1f,#ff7a1f);
  display: grid; place-items: center; flex: 0 0 auto; color: #fff;
}
.sbo-badge .sbo-text { flex: 1; }
.sbo-badge .sbo-label {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .12em; color: #7a9098; display: block; margin-bottom: 2px;
}
.sbo-badge .sbo-val { font-size: 14px; font-weight: 700; color: #7a4a10; line-height: 1.4; }
.sbo-toast {
  position: fixed; top: 66px; left: 50%; transform: translateX(-50%) translateY(-8px);
  background: #16241f; color: #fff; padding: 10px 18px; border-radius: 12px;
  font-weight: 700; font-size: 13px; z-index: 10000; opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease; box-shadow: 0 8px 24px rgba(0,0,0,.35);
  display: flex; align-items: center; gap: 8px;
}
.sbo-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.sbo-toast.good { background: #12351f; color: #6ee7a0; }
.sbo-toast.bad { background: #3a1414; color: #ff8a8a; }
.sbo-msg-flagged {
  outline: 2.5px solid #ff9a1f !important;
  outline-offset: 2px;
}

/* ── CHAMA TREASURER CHALLENGE ────────────────────────────────────────────── */
#chmIntroModal, #chmInputModal, #chmResultsModal { position: fixed !important; }
.chm-modal-close {
  background: none; border: none; cursor: pointer; color: #8a9da5;
  display: grid; place-items: center; padding: 6px; border-radius: 50%;
  transition: all 0.2s ease-in-out;
}
.chm-modal-close:hover {
  background: #eff6ff; color: #2563eb; transform: rotate(90deg);
}
#chmHUD {
  position: fixed; top: 0; left: 0; right: 0;
  background: #0d1a2e; color: #fff;
  z-index: 9999; display: flex; justify-content: center; align-items: center;
  padding: 0 20px; height: 54px;
  pointer-events: none; opacity: 0; transition: opacity 0.3s;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
}
#chmHUD.show { opacity: 1; pointer-events: auto; }
.chm-timer {
  font-weight: 800; font-size: 18px; color: #60a5fa;
  font-family: "Space Grotesk", sans-serif; letter-spacing: .02em;
  display: flex; align-items: center; gap: 7px; flex: 0 0 auto; transition: color .4s ease;
}
.chm-timer--urgent { color: #ff4d4d !important; animation: tc-pulse 1s ease-in-out infinite; }
.chm-status-text {
  flex: 1; text-align: center; font-size: 11px; font-weight: 800;
  color: #93c5fd; text-transform: uppercase; letter-spacing: .14em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 8px;
}
#chmFab {
  position: fixed; bottom: 28px; right: 28px;
  background: linear-gradient(180deg,#2563eb,#1565c0); color: #fff; border-radius: 50%;
  width: 58px; height: 58px; display: flex; justify-content: center; align-items: center;
  box-shadow: 0 10px 26px rgba(21,101,192,.38); cursor: pointer; z-index: 9998; border: none;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
#chmFab.show { opacity: 1; pointer-events: auto; }
#chmToast {
  position: fixed; top: 66px; left: 50%; transform: translateX(-50%) translateY(-8px);
  background: #0d1a2e; color: #fff; padding: 10px 18px; border-radius: 12px;
  font-weight: 700; font-size: 13px; z-index: 10000; opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease; box-shadow: 0 8px 24px rgba(0,0,0,.35);
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
#chmToast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#chmToast.good { background: #12351f; color: #6ee7a0; }
#chmToast.bad { background: #3a1414; color: #ff8a8a; }
.chm-period-badge {
  background: #eff6ff; border: 1.5px solid #bfdbfe; border-radius: 14px;
  padding: 13px 16px; margin-bottom: 12px;
  display: flex; align-items: center; gap: 12px;
}
.chm-period-badge .chm-pb-icon {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg,#2563eb,#1565c0);
  display: grid; place-items: center; flex: 0 0 auto;
}
.chm-period-badge .chm-pb-label {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .12em; color: #7a9098; display: block; margin-bottom: 2px;
}
.chm-period-badge .chm-pb-val {
  font-size: 16px; font-weight: 800; color: #1565c0; font-family: "Space Grotesk", sans-serif;
}
.chm-two-badges { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.chm-mini-badge {
  background: #eff6ff; border: 1.5px solid #bfdbfe; border-radius: 12px;
  padding: 11px 14px; display: flex; flex-direction: column; gap: 3px;
}
.chm-mini-badge .lbl {
  font-size: 9px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .12em; color: #93c5fd;
}
.chm-mini-badge .val {
  font-size: 15px; font-weight: 800; color: #1565c0; font-family: "Space Grotesk", sans-serif;
}
.chm-member-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 14px; }
.chm-member-chip {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid #dbeafe; border-radius: 10px; padding: 8px 10px;
}
.chm-member-av {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg,#2563eb,#1565c0); color: #fff;
  font-size: 10px; font-weight: 800; display: grid; place-items: center; flex: 0 0 auto;
}
.chm-member-name { font-size: 12px; font-weight: 700; color: #1a2f35; line-height: 1.2; }
.chm-tasks-box {
  background: #f0f7ff; border: 1.5px solid #dbeafe; border-radius: 14px;
  padding: 12px 14px; margin-bottom: 16px;
}
.chm-task-item {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 5px 0; border-bottom: 1px solid #dbeafe;
  font-size: 12.5px; color: #334; line-height: 1.4;
}
.chm-task-item:last-child { border-bottom: none; padding-bottom: 0; }
.chm-task-num {
  width: 18px; height: 18px; border-radius: 50%; background: #1565c0; color: #fff;
  font-size: 9px; font-weight: 800; display: grid; place-items: center; flex: 0 0 auto; margin-top: 1px;
}
.chm-section-head {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em;
  color: #1565c0; margin: 14px 0 7px; display: flex; align-items: center; gap: 7px;
}
.chm-section-head span {
  background: #dbeafe; color: #1565c0; font-size: 9px; font-weight: 800;
  padding: 2px 8px; border-radius: 999px;
}
.chm-table-wrap { border: 1.5px solid #bfdbfe; border-radius: 14px; overflow: hidden; }
.chm-table-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px;
  background: linear-gradient(90deg,#eff6ff,#dbeafe);
  border-bottom: 1.5px solid #bfdbfe;
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: #1565c0;
}
.chm-check-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid #e0eeff;
  font-size: 13.5px; font-weight: 600; color: #1a2f35; cursor: pointer;
  transition: background .12s; user-select: none;
}
.chm-check-row:last-child { border-bottom: none; }
.chm-check-row:hover { background: #f0f9ff; }
.chm-check-row input[type="checkbox"] {
  width: 17px; height: 17px; accent-color: #1565c0; cursor: pointer; flex: 0 0 auto; margin: 0;
}
.chm-total-row {
  background: #eff6ff; border-top: 2px solid #bfdbfe;
  padding: 12px 14px; font-weight: 800; color: #1565c0;
  font-size: 14.5px; display: flex; justify-content: space-between; align-items: center;
}
.chm-btn {
  background: linear-gradient(180deg,#2563eb,#1565c0); color: #fff; border: none;
  padding: 13px; width: 100%; border-radius: 14px; font-weight: 800; font-size: 14px;
  margin-top: 14px; cursor: pointer; font-family: inherit; transition: .15s;
}
.chm-btn:hover { opacity: .92; }
@media (max-width: 600px) {
  #chmIntroModal, #chmInputModal, #chmResultsModal {
    align-items: flex-end !important; padding: 0 !important;
  }
  #chmIntroModal .modal-content, #chmInputModal .modal-content, #chmResultsModal .modal-content {
    max-width: 100% !important; border-radius: 24px 24px 0 0 !important;
    padding: 20px 16px 28px !important; max-height: 92vh !important;
  }
  .chm-timer { font-size: 15px; }
  .chm-status-text { font-size: 10px; }
  .chm-member-grid { grid-template-columns: 1fr; }
}
