
.contact-unread{display:inline-block;width:10px;height:10px;margin-left:5px;border-radius:50%;background:#ef4444;box-shadow:0 0 0 3px #ef444420;vertical-align:middle}
#contactPage .contact-message-body{white-space:pre-wrap}
#contactPage .contact-reply{padding:14px;margin-top:12px;border:1px solid #cbdcf8;border-radius:14px;background:#edf4ff}
#contactPage .contact-reply>b{font-size:12px;color:#315e9d}
#contactPage .contact-reply time{display:block;margin:5px 0 8px}
#contactPage .contact-reply-form{display:grid;gap:8px;margin-top:16px;border-top:1px solid #e5ebf4;padding-top:14px}
#contactPage .contact-reply-form textarea{min-height:85px;margin:0}
#contactPage .contact-shell{max-width:900px;margin:16px auto;padding:clamp(18px,4vw,34px);border:1px solid rgba(220,230,245,.9);border-radius:28px;background:linear-gradient(145deg,#fff,#f6f9ff);box-shadow:0 20px 55px rgba(31,50,92,.1)}
#contactPage .contact-hero{display:flex;align-items:center;gap:17px;padding:8px 0 22px;border-bottom:1px solid #e7edf6}
#contactPage .contact-icon{width:58px;height:58px;flex:0 0 58px;display:grid;place-items:center;border-radius:20px;background:linear-gradient(145deg,#e9f1ff,#dce8ff);font-size:28px;box-shadow:inset 0 1px white}
#contactPage .contact-eyebrow{margin:0 0 4px;color:#5579aa;font-size:11px;font-weight:900;letter-spacing:.12em;text-transform:uppercase}
#contactPage .contact-hero h2,#contactPage .contact-inbox h3{margin:0 0 5px;color:#183557;font-size:clamp(20px,4vw,27px);font-weight:950}
#contactPage .contact-hero .muted{margin:0;color:#64748b}
#contactPage .contact-form{display:grid;gap:10px;padding:22px 0}
#contactPage .contact-form label{margin-top:5px;color:#344b6b;font-size:13px;font-weight:850}
#contactPage .contact-form input,#contactPage .contact-form select,#contactPage .contact-form textarea{width:100%;box-sizing:border-box;border:1px solid #dfe7f2;border-radius:15px;background:rgba(255,255,255,.88);padding:13px 15px;color:#203854;font:inherit;box-shadow:0 5px 18px rgba(35,62,104,.04);outline:none}
#contactPage .contact-form textarea{resize:vertical;min-height:150px;line-height:1.6}
#contactPage .contact-form input:focus,#contactPage .contact-form select:focus,#contactPage .contact-form textarea:focus{border-color:#7ba5e8;box-shadow:0 0 0 3px rgba(93,145,228,.14)}
#contactPage .contact-form-footer,#contactPage .contact-inbox-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
#contactPage .contact-notice{border:1px solid #dce7f5;border-radius:15px;background:#f5f8fd;color:#506581;padding:14px 16px;margin-top:18px}
#contactPage .contact-inbox{border-top:1px solid #e5ebf4;padding-top:22px;margin-top:4px}
#contactPage .contact-inbox-head{margin-bottom:14px}
#contactPage .contact-inbox-head h3{font-size:20px}
#contactPage .contact-inbox-list{display:grid;gap:11px}
#contactPage .contact-message{touch-action:pan-y;transition:transform .12s,opacity .12s;border:1px solid #e2e9f3;border-radius:18px;background:#fff;padding:16px 17px;box-shadow:0 8px 24px rgba(36,58,91,.05)}
#contactPage .contact-message-top{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
#contactPage .contact-kind{border-radius:99px;padding:5px 10px;font-size:11px;font-weight:900}
#contactPage .contact-kind.problem{background:#fff1ed;color:#a53d2a}
#contactPage .contact-kind.contact{background:#eaf2ff;color:#315e9d}
#contactPage .contact-message time,#contactPage .contact-message-meta{color:#718096;font-size:12px}
#contactPage .contact-message h4{margin:10px 0 4px;color:#1c3555;font-size:16px}
#contactPage .contact-message-meta{margin:0 0 10px}
#contactPage .contact-message-body{margin:0;color:#40536c;line-height:1.65;overflow-wrap:anywhere}
#contactPage .contact-error{border-color:#fecaca;background:#fff5f5;color:#9b3030}
@media(max-width:600px){#contactPage .contact-shell{border-radius:21px;padding:18px}#contactPage .contact-hero{align-items:flex-start;gap:12px}#contactPage .contact-icon{width:48px;height:48px;flex-basis:48px;border-radius:16px;font-size:23px}}


/* V16: center the Study Session controls/content and keep statistics above it. */
#studySessionBubbleMount .study-session-zone{
  text-align:center!important;
}
#studySessionBubbleMount .study-session-head{
  justify-content:center!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:12px!important;
}
#studySessionBubbleMount .study-session-btn,
#studySessionBubbleMount .study-session-stop{
  margin-left:auto!important;
  margin-right:auto!important;
}
#studySessionBubbleMount .study-history-btn{
  display:block!important;
  margin:12px auto 0!important;
}
#studySessionBubbleMount .study-session-options{
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:10px!important;
}
#studySessionBubbleMount .study-session-timer,
#studySessionBubbleMount .study-session-status{
  text-align:center!important;
  width:100%!important;
}
/* Statistics is its own modal: when opened from Study Session, it must sit
   above the Study Session bubble rather than underneath/inside it. */
#studyHistoryOverlay,
#cardReviewHistoryOverlay{
  z-index:2147483005!important;
}
#studyHistoryOverlay .study-history-card,
#cardReviewHistoryOverlay .study-history-card{
  position:relative!important;
  margin:0 auto!important;
}
@media(max-width:600px){
  #studySessionBubbleMount .study-session-head{justify-content:center!important;}
  #studySessionBubbleMount .study-session-options{justify-content:center!important;}
  #studySessionBubbleMount .study-session-status{font-size:16px!important;}
}


#dueBadge{
  text-align:center!important;
  align-items:center!important;
  justify-content:center!important;
  text-indent:0!important;
}


body.streak-bubble-open{overflow:hidden!important}
#streakPage.streak-bubble{box-sizing:border-box;width:min(720px,calc(100% - 32px));max-width:720px;max-height:calc(100dvh - 40px);margin:auto;padding:0;border:1px solid rgba(255,255,255,.8);border-radius:34px;background:rgba(245,249,255,.97);color:#172033;overflow:auto;overscroll-behavior:contain;box-shadow:0 28px 100px rgba(8,20,40,.35);}
#streakPage:not([open]){display:none!important}
#streakPage[open]{animation:streakBubbleIn .22s ease-out}
#streakPage::backdrop{background:rgba(8,20,40,.44);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
#streakPage .streak-bubble-content{margin:0!important;padding:32px!important;border:0!important;border-radius:33px!important;box-shadow:none!important;background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
#streakPage .streak-big{font-size:76px}#streakPage .streak-fire-big{font-size:68px}
#streakBubbleTitle{font-size:17px;font-weight:800;color:#344564}
#streakPage .streak-close{display:grid;place-items:center;width:44px;height:44px;padding:0;border-radius:50%;font-size:20px;flex-shrink:0}
#streakPage .day-dot{padding:15px 3px;font-size:13px;border-radius:16px}
#streakPage .streak-info{padding:18px;border-radius:20px}
#streakPage .streak-mini{padding:13px 0}
#streakStudyBtn{min-height:52px;border-radius:17px}
@keyframes streakBubbleIn{from{opacity:0;transform:translateY(14px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-width:600px){#streakPage.streak-bubble{width:calc(100% - 24px);max-height:calc(100dvh - 24px);border-radius:28px}#streakPage .streak-bubble-content{padding:22px 18px!important;border-radius:27px!important}#streakPage .streak-big{font-size:60px}#streakPage .streak-fire-big{font-size:54px}#streakPage .day-dot{padding:12px 2px;font-size:11px}#streakPage .streak-mini{font-size:14px}}
@media(prefers-reduced-motion:reduce){#streakPage[open]{animation:none}}
