
/* chalksta-messenger.css — isolated styles for messenger v2 */
#chalksta-msg-banner-root {
  position: sticky;
  top: 0;
  /* Above default Bootstrap .modal (1050); below sticky landing sheet + JS-adjusted backdrop */
  z-index: 1070;
  width: 100%;
  box-sizing: border-box;
}

.chalksta-msg-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: linear-gradient(90deg, #1a1a1a 0%, #252525 100%);
  border-bottom: 2px solid #e31837;
  color: #f8f9fa;
  font-family: "Roboto", sans-serif;
  font-size: 0.9rem;
}

.chalksta-msg-banner__accent {
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  color: #e31837;
  flex-shrink: 0;
}

.chalksta-msg-banner__preview {
  flex: 1;
  min-width: 0;
  opacity: 0.95;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chalksta-msg-banner__btn {
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border: none;
  border-radius: 2px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  flex-shrink: 0;
}

.chalksta-msg-banner__btn--primary {
  background: #e31837;
  color: #fff;
}

.chalksta-msg-banner__btn--muted {
  background: transparent;
  color: #adb5bd;
  border: 1px solid #444;
}

body:not(.dark-theme) .chalksta-msg-banner {
  background: linear-gradient(90deg, #f6f8fb 0%, #eaeef5 100%);
  color: #1d2127;
}

body:not(.dark-theme) .chalksta-msg-banner__btn--muted {
  color: #5c6570;
  border-color: rgba(0, 0, 0, 0.22);
}

#chalksta-msg-modal-root .modal-title,
#chalksta-msg-modal-root .chalksta-msg-read-heading {
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.05em;
  color: var(--chmsg-fg, #212529);
}

#chalksta-msg-modal-root .modal-title {
  text-transform: uppercase;
}

#chalksta-msg-modal-root #chalksta-msg-modal.chalksta-msg-modal--dm-thread .chalksta-msg-shell-title {
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  line-height: 1.25;
}

#chalksta-msg-modal-root .chalksta-msg-read-heading {
  flex: 1;
  min-width: 0;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  margin-bottom: 0;
  padding-left: 0.15rem;
}

/* Inbox + in-modal reader — default light; dark palette when body.dark-theme. */
#chalksta-msg-modal-root {
  --chmsg-surface: #ffffff;
  --chmsg-surface-elevated: #f3f5f8;
  --chmsg-fg: #1d1f24;
  --chmsg-muted: #5c6570;
  --chmsg-border: #cfd4dc;
  --chmsg-row-hover: #e9edf2;
  --chmsg-icon-hover: #111827;
}

body.dark-theme #chalksta-msg-modal-root {
  --chmsg-surface: #1a1a1e;
  --chmsg-surface-elevated: #242428;
  --chmsg-fg: #f0f3f6;
  --chmsg-muted: rgba(232, 234, 237, 0.78);
  --chmsg-border: #3a3a42;
  --chmsg-row-hover: #2c2c31;
  --chmsg-icon-hover: #fff;
}

/*
 * ESPN compact controls — inbox modal toolbars, filters, pagers.
 * Oswald: buttons, pills, section labels. Roboto: search + legend hints.
 */
#chalksta-msg-modal-root .chalksta-msg-list-pane,
#chalksta-msg-modal-root .chalksta-msg-read-pane {
  font-family: "Roboto", sans-serif;
}

#chalksta-msg-modal-root .chalksta-msg-list-pane .btn:not(.chalksta-msg-icon-btn):not(.close):not(.chalksta-msg-filter-pill),
#chalksta-msg-modal-root .chalksta-msg-read-pane-toolbar .btn:not(.close),
#chalksta-msg-modal-root .chalksta-msg-contact-toolbar .btn,
#chalksta-msg-modal-root .chalksta-msg-list-pager .btn,
#chalksta-msg-modal-root .chalksta-msg-recipients-pager .btn {
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  font-weight: 600;
  font-size: 0.62rem;
  line-height: 1.15;
  padding: 0.16rem 0.42rem;
  border-radius: 3px;
}

#chalksta-msg-modal-root .btn-group-sm > .btn,
#chalksta-msg-modal-root .btn-toolbar .btn-group-sm > .btn {
  font-size: 0.62rem;
  padding: 0.16rem 0.42rem;
}

#chalksta-msg-modal-root .modal-content.chalksta-msg-inbox-sheet,
#chalksta-msg-modal-root .chalksta-msg-read-sheet {
  background: var(--chmsg-surface);
  color: var(--chmsg-fg);
  border: none;
}

body:not(.dark-theme) #chalksta-msg-modal-root .modal-content.chalksta-msg-inbox-sheet,
body:not(.dark-theme) #chalksta-msg-modal-root .chalksta-msg-read-sheet {
  border: 1px solid var(--chmsg-border);
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.14);
}

#chalksta-msg-modal-root .modal-header.border-secondary {
  border-bottom-color: var(--chmsg-border) !important;
}

body:not(.dark-theme) #chalksta-msg-modal-root .modal-header .close.text-light {
  color: #334155 !important;
  opacity: 0.75;
  text-shadow: none;
}

body:not(.dark-theme) #chalksta-msg-modal-root .modal-header .close:hover {
  color: #e31837 !important;
  opacity: 1;
}

#chalksta-msg-modal-root .chalksta-msg-hint {
  color: var(--chmsg-muted) !important;
  font-family: "Roboto", sans-serif;
  font-size: 0.72rem;
  line-height: 1.35;
}

#chalksta-msg-modal-root .chalksta-msg-contact-hint {
  font-family: "Roboto", sans-serif;
  font-size: 0.68rem;
}

#chalksta-msg-modal-root .chalksta-msg-list-page-meta,
#chalksta-msg-modal-root .chalksta-msg-recipients-page-meta {
  font-family: "Oswald", sans-serif;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#chalksta-msg-modal-root .chalksta-msg-contact-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

#chalksta-msg-contact-modal-root {
  --chmsg-surface: #ffffff;
  --chmsg-surface-elevated: #f3f5f8;
  --chmsg-fg: #1d1f24;
  --chmsg-muted: #5c6570;
  --chmsg-border: #cfd4dc;
}

body.dark-theme #chalksta-msg-contact-modal-root {
  --chmsg-surface: #1a1a1e;
  --chmsg-surface-elevated: #242428;
  --chmsg-fg: #f0f3f6;
  --chmsg-muted: rgba(232, 234, 237, 0.78);
  --chmsg-border: #3a3a42;
}

#chalksta-msg-contact-modal-root .modal-content.chalksta-msg-contact-sheet {
  background: var(--chmsg-surface);
  color: var(--chmsg-fg);
  border: none;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

body:not(.dark-theme) #chalksta-msg-contact-modal-root .modal-content.chalksta-msg-contact-sheet {
  border: 1px solid var(--chmsg-border);
}

#chalksta-msg-contact-modal-root .modal-header.border-secondary,
#chalksta-msg-contact-modal-root .modal-footer.border-secondary {
  border-color: var(--chmsg-border) !important;
}

#chalksta-msg-contact-modal-root .modal-title {
  color: var(--chmsg-fg);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

body:not(.dark-theme) #chalksta-msg-contact-modal-root .modal-header .close.text-light {
  color: #1d1f24 !important;
  opacity: 0.75;
}

body:not(.dark-theme) #chalksta-msg-contact-modal-root .modal-header .close.text-light:hover {
  color: #e31837 !important;
  opacity: 1;
}

#chalksta-msg-contact-modal-root .chalksta-msg-contact-lead,
#chalksta-msg-contact-modal-root .chalksta-msg-muted {
  color: var(--chmsg-muted) !important;
}

#chalksta-msg-contact-modal-root textarea {
  resize: vertical;
  min-height: 6.5rem;
  max-height: 16rem;
  background: var(--chmsg-surface-elevated);
  color: var(--chmsg-fg);
  border-color: var(--chmsg-border);
}

#chalksta-msg-contact-modal-root .chalksta-msg-contact-status {
  min-width: 6rem;
}

body:not(.dark-theme) #chalksta-msg-contact-modal-root .btn-outline-light {
  color: #1d1f24;
  border-color: #adb5bd;
}

body:not(.dark-theme) #chalksta-msg-contact-modal-root .btn-outline-light:hover {
  background: #e9ecef;
  color: #111;
}

/* Player DM — New message compose modal (light + dark) */
#chalksta-direct-compose-modal-root {
  --chmsg-surface: #ffffff;
  --chmsg-surface-elevated: #f3f5f8;
  --chmsg-fg: #1d1f24;
  --chmsg-muted: #5c6570;
  --chmsg-border: #cfd4dc;
}

body.dark-theme #chalksta-direct-compose-modal-root {
  --chmsg-surface: #1a1a1e;
  --chmsg-surface-elevated: #242428;
  --chmsg-fg: #f0f3f6;
  --chmsg-muted: rgba(232, 234, 237, 0.78);
  --chmsg-border: #3a3a42;
}

#chalksta-direct-compose-modal-root .modal-content.chalksta-msg-dm-compose-sheet {
  background: var(--chmsg-surface);
  color: var(--chmsg-fg);
  border: none;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

body:not(.dark-theme) #chalksta-direct-compose-modal-root .modal-content.chalksta-msg-dm-compose-sheet {
  border: 1px solid var(--chmsg-border);
}

#chalksta-direct-compose-modal-root .modal-header.border-secondary,
#chalksta-direct-compose-modal-root .modal-footer.border-secondary {
  border-color: var(--chmsg-border) !important;
}

#chalksta-direct-compose-modal-root .modal-title {
  color: var(--chmsg-fg);
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

#chalksta-direct-compose-modal-root .modal-header .close {
  color: var(--chmsg-fg);
  opacity: 0.72;
  text-shadow: none;
}

#chalksta-direct-compose-modal-root .modal-header .close:hover {
  color: #e31837;
  opacity: 1;
}

#chalksta-direct-compose-modal-root label.small {
  color: var(--chmsg-fg);
}

#chalksta-direct-compose-modal-root .chalksta-msg-muted,
#chalksta-direct-compose-modal-root #chalksta_dm_compose_status {
  color: var(--chmsg-muted) !important;
}

#chalksta-direct-compose-modal-root .form-control {
  background: var(--chmsg-surface-elevated);
  color: var(--chmsg-fg);
  border-color: var(--chmsg-border);
}

#chalksta-direct-compose-modal-root .form-control:focus {
  background: var(--chmsg-surface-elevated);
  color: var(--chmsg-fg);
  border-color: rgba(40, 167, 69, 0.65);
  box-shadow: 0 0 0 0.15rem rgba(40, 167, 69, 0.2);
}

#chalksta-direct-compose-modal-root textarea.form-control {
  resize: vertical;
  min-height: 6.5rem;
  max-height: 16rem;
}

#chalksta-direct-compose-modal-root .chalksta-dm-recip-list {
  background: var(--chmsg-surface-elevated);
  border-color: var(--chmsg-border);
}

#chalksta-direct-compose-modal-root .chalksta-dm-recip-pick {
  color: var(--chmsg-fg);
  text-decoration: none;
}

#chalksta-direct-compose-modal-root .chalksta-dm-recip-pick:hover {
  color: #28a745;
  text-decoration: underline;
}

body:not(.dark-theme) #chalksta-direct-compose-modal-root .btn-outline-light {
  color: #1d1f24;
  border-color: #adb5bd;
}

body:not(.dark-theme) #chalksta-direct-compose-modal-root .btn-outline-light:hover {
  background: #e9ecef;
  color: #111;
}

/* Captain team broadcast compose — same tokens as contact modal */
#chalksta-team-broadcast-modal-root {
  --chmsg-surface: #ffffff;
  --chmsg-surface-elevated: #f3f5f8;
  --chmsg-fg: #1d1f24;
  --chmsg-muted: #5c6570;
  --chmsg-border: #cfd4dc;
}

body.dark-theme #chalksta-team-broadcast-modal-root {
  --chmsg-surface: #1a1a1e;
  --chmsg-surface-elevated: #242428;
  --chmsg-fg: #f0f3f6;
  --chmsg-muted: rgba(232, 234, 237, 0.78);
  --chmsg-border: #3a3a42;
}

#chalksta-team-broadcast-modal-root .modal-content.chalksta-msg-contact-sheet {
  background: var(--chmsg-surface);
  color: var(--chmsg-fg);
  border: none;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

body:not(.dark-theme) #chalksta-team-broadcast-modal-root .modal-content.chalksta-msg-contact-sheet {
  border: 1px solid var(--chmsg-border);
}

#chalksta-team-broadcast-modal-root .modal-header.border-secondary,
#chalksta-team-broadcast-modal-root .modal-footer.border-secondary {
  border-color: var(--chmsg-border) !important;
}

#chalksta-team-broadcast-modal-root .modal-title {
  color: var(--chmsg-fg);
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

body:not(.dark-theme) #chalksta-team-broadcast-modal-root .modal-header .close.text-light,
body:not(.dark-theme) #chalksta-team-broadcast-modal-root .modal-header .chalksta-team-bc-close {
  color: #1d1f24 !important;
  opacity: 0.75;
  text-shadow: none;
}

body:not(.dark-theme) #chalksta-team-broadcast-modal-root .modal-header .close.text-light:hover,
body:not(.dark-theme) #chalksta-team-broadcast-modal-root .modal-header .chalksta-team-bc-close:hover {
  color: #e31837 !important;
  opacity: 1;
}

body.dark-theme #chalksta-team-broadcast-modal-root .modal-header .close.text-light,
body.dark-theme #chalksta-team-broadcast-modal-root .modal-header .chalksta-team-bc-close {
  color: rgba(248, 249, 250, 0.92) !important;
  opacity: 0.85;
  text-shadow: none;
}

body.dark-theme #chalksta-team-broadcast-modal-root .modal-header .close.text-light:hover,
body.dark-theme #chalksta-team-broadcast-modal-root .modal-header .chalksta-team-bc-close:hover {
  color: #ff6b81 !important;
  opacity: 1;
}

#chalksta-team-broadcast-modal-root .chalksta-msg-muted {
  color: var(--chmsg-muted) !important;
}

#chalksta-team-broadcast-modal-root textarea {
  resize: vertical;
  min-height: 6.5rem;
  max-height: 16rem;
  background: var(--chmsg-surface-elevated);
  color: var(--chmsg-fg);
  border-color: var(--chmsg-border);
}

#chalksta-team-broadcast-modal-root textarea:focus {
  background: var(--chmsg-surface-elevated);
  color: var(--chmsg-fg);
  border-color: #e31837;
  box-shadow: 0 0 0 0.15rem rgba(227, 24, 55, 0.2);
}

#chalksta-team-broadcast-modal-root .custom-control-label {
  color: var(--chmsg-fg);
}

#chalksta-team-broadcast-modal-root .table.chalksta-team-bc-preview-table {
  max-width: 14rem;
  table-layout: fixed;
  background: var(--chmsg-surface-elevated);
  color: var(--chmsg-fg);
  border-color: var(--chmsg-border);
  margin-bottom: 0;
}

#chalksta-team-broadcast-modal-root .table.chalksta-team-bc-preview-table th,
#chalksta-team-broadcast-modal-root .table.chalksta-team-bc-preview-table td {
  border-color: var(--chmsg-border);
  color: var(--chmsg-fg);
}

#chalksta-team-broadcast-modal-root .chalksta-team-bc-beta-warn {
  color: #c9870a;
  max-width: 28rem;
}

body.dark-theme #chalksta-team-broadcast-modal-root .chalksta-team-bc-beta-warn {
  color: #f0ad4e;
}

#chalksta-team-broadcast-modal-root .chalksta-team-bc-err {
  color: #e31837;
  max-width: 28rem;
}

#chalksta-team-broadcast-modal-root .chalksta-team-bc-recip-toggle {
  color: var(--chmsg-accent, #e31837);
  font-family: Oswald, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

#chalksta-team-broadcast-modal-root .chalksta-team-bc-recip-toggle:hover,
#chalksta-team-broadcast-modal-root .chalksta-team-bc-recip-toggle:focus {
  color: #c41230;
  text-decoration: underline;
}

#chalksta-team-broadcast-modal-root .chalksta-team-bc-recip-list {
  max-height: 10.5rem;
  overflow-y: auto;
  border: 1px solid var(--chmsg-border);
  border-radius: 0.25rem;
  background: var(--chmsg-surface-elevated);
  padding: 0.35rem 0.5rem;
}

#chalksta-team-broadcast-modal-root .chalksta-team-bc-recip-li {
  border-bottom: 1px solid var(--chmsg-border);
}

#chalksta-team-broadcast-modal-root .chalksta-team-bc-recip-li:last-child {
  border-bottom: none;
}

#chalksta-team-broadcast-modal-root .chalksta-team-bc-recip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

#chalksta-team-broadcast-modal-root .chalksta-team-bc-recip-name {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--chmsg-fg);
}

#chalksta-team-broadcast-modal-root .chalksta-team-bc-recip-role {
  background: rgba(255, 255, 255, 0.08);
  color: var(--chmsg-muted, #adb5bd);
  font-family: Oswald, sans-serif;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

body:not(.dark-theme) #chalksta-team-broadcast-modal-root .chalksta-team-bc-recip-role {
  background: #e9ecef;
  color: #495057;
}

#chalksta-team-broadcast-modal-root .chalksta-team-bc-recip-beta {
  background: rgba(227, 24, 55, 0.15);
  color: #e31837;
  font-family: Oswald, sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

body.dark-theme #chalksta-team-broadcast-modal-root .chalksta-team-bc-recip-beta {
  background: rgba(227, 24, 55, 0.25);
  color: #ff6b7f;
}

#chalksta-team-broadcast-modal-root .chalksta-team-bc-recip-li--beta {
  background: rgba(227, 24, 55, 0.04);
}

body.dark-theme #chalksta-team-broadcast-modal-root .chalksta-team-bc-recip-li--beta {
  background: rgba(227, 24, 55, 0.08);
}

body:not(.dark-theme) #chalksta-team-broadcast-modal-root .btn-outline-light {
  color: #1d1f24;
  border-color: #adb5bd;
  background: transparent;
}

body:not(.dark-theme) #chalksta-team-broadcast-modal-root .btn-outline-light:hover {
  background: #e9ecef;
  color: #111;
  border-color: #868e96;
}

body.dark-theme #chalksta-team-broadcast-modal-root .btn-outline-light {
  color: var(--chmsg-fg);
  border-color: var(--chmsg-border);
}

body.dark-theme #chalksta-team-broadcast-modal-root .btn-outline-light:hover {
  background: var(--chmsg-row-hover, #2c2c31);
  color: #fff;
  border-color: #555;
}

#chalksta-team-broadcast-modal-root .btn-danger {
  background-color: #e31837;
  border-color: #e31837;
}

#chalksta-team-broadcast-modal-root .btn-danger:hover {
  background-color: #c41230;
  border-color: #c41230;
}

#chalksta-msg-modal-root .list-group-item.chalksta-msg-row {
  background: var(--chmsg-surface-elevated);
  color: var(--chmsg-fg);
  border-color: var(--chmsg-border);
}

#chalksta-msg-modal-root .table.chalksta-msg-table {
  table-layout: fixed;
  width: 100%;
  background: var(--chmsg-surface-elevated);
  color: var(--chmsg-fg);
  margin-bottom: 0;
}

#chalksta-msg-modal-root .chalksta-msg-table thead th.chalksta-msg-th-check {
  width: 2.75rem;
}

#chalksta-msg-modal-root .chalksta-msg-table thead th.chalksta-msg-th-dir-archive {
  text-align: center;
}

#chalksta-msg-modal-root .chalksta-msg-cell-dir-archive {
  text-align: center;
  font-family: "Oswald", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--chmsg-muted);
}

/** Column widths are driven by <colgroup> (resizable); preview column absorbs remainder. */
#chalksta-msg-modal-root .chalksta-msg-table thead th.chalksta-msg-th-sent,
#chalksta-msg-modal-root .chalksta-msg-table thead th.chalksta-msg-th-league,
#chalksta-msg-modal-root .chalksta-msg-table thead th.chalksta-msg-th-peer,
#chalksta-msg-modal-root .chalksta-msg-table thead th.chalksta-msg-th-act,
#chalksta-msg-modal-root .chalksta-msg-table thead th.chalksta-msg-th-dir-archive {
  width: auto;
}

#chalksta-msg-modal-root .chalksta-msg-table thead th.chalksta-msg-th-prev {
  width: auto;
  min-width: 4.5rem;
}

#chalksta-msg-modal-root .chalksta-msg-table-scroll {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  background: var(--chmsg-surface-elevated);
}

#chalksta-msg-modal-root .chalksta-msg-th-resizable {
  position: relative;
  padding-right: 0.65rem;
}

#chalksta-msg-modal-root .chalksta-msg-th-act.chalksta-msg-th-resizable {
  padding-left: 0.65rem;
}

#chalksta-msg-modal-root .chalksta-msg-col-resizer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 0.55rem;
  cursor: col-resize;
  touch-action: none;
  z-index: 3;
}

#chalksta-msg-modal-root .chalksta-msg-col-resizer--leading {
  right: auto;
  left: 0;
}

#chalksta-msg-modal-root .chalksta-msg-col-resizer::after {
  content: "";
  position: absolute;
  top: 22%;
  bottom: 22%;
  right: 2px;
  width: 2px;
  border-radius: 1px;
  background: var(--chmsg-border);
  opacity: 0.85;
}

#chalksta-msg-modal-root .chalksta-msg-col-resizer--leading::after {
  right: auto;
  left: 2px;
}

#chalksta-msg-modal-root .chalksta-msg-col-resizer:hover::after,
#chalksta-msg-modal-root .chalksta-msg-col-resizer:focus-visible::after {
  background: #e31837;
  opacity: 1;
}

body.chalksta-msg-col-resizing {
  cursor: col-resize !important;
  user-select: none !important;
}

body.chalksta-msg-col-resizing * {
  cursor: col-resize !important;
}

/** Reserve space so action icons aren’t drowned in slack width; previews take the remainder. */
#chalksta-msg-modal-root .chalksta-msg-table thead th.chalksta-msg-th-act {
  text-align: right;
}

#chalksta-msg-modal-root .table.chalksta-msg-table thead th {
  border-color: var(--chmsg-border);
  color: var(--chmsg-muted);
  font-family: "Oswald", sans-serif;
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  vertical-align: middle;
  padding-top: 0.32rem;
  padding-bottom: 0.32rem;
}

#chalksta-msg-modal-root .chalksta-msg-th-act-label {
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: 1.15;
}

#chalksta-msg-modal-root .table.chalksta-msg-table tbody td {
  border-color: var(--chmsg-border);
  vertical-align: middle;
}

/**
 * Bootstrap `.table-hover tbody tr:hover` sets `color: #212529` on the `<tr>`, which wins over
 * inherited messenger foreground and makes dark-theme inbox rows nearly unreadable on hover.
 */
#chalksta-msg-modal-root .chalksta-msg-table.table-hover tbody tr.chalksta-msg-row:hover {
  background: var(--chmsg-row-hover);
  color: var(--chmsg-fg);
}

#chalksta-msg-modal-root .chalksta-msg-table.table-hover tbody tr.chalksta-msg-row:hover > td {
  color: var(--chmsg-fg);
}

#chalksta-msg-modal-root .chalksta-msg-table.table-hover tbody tr.chalksta-msg-row:hover .chalksta-msg-preview-text {
  color: var(--chmsg-fg);
}

#chalksta-msg-modal-root .chalksta-msg-table.table-hover tbody tr.chalksta-msg-row:hover .chalksta-msg-icon-btn:not(.text-danger) {
  color: var(--chmsg-fg);
}

#chalksta-msg-modal-root .chalksta-msg-row--unread {
  font-weight: 600;
  box-shadow: inset 3px 0 0 #e31837;
}

#chalksta-msg-modal-root .chalksta-msg-tbody tr.chalksta-msg-row {
  cursor: pointer;
}

#chalksta-msg-modal-root .chalksta-msg-cell-check {
  cursor: default;
  width: 2.75rem;
  max-width: 3rem;
  text-align: center;
  overflow: visible;
}

#chalksta-msg-modal-root .chalksta-msg-cell-actions {
  cursor: default;
  overflow: hidden;
  text-align: right;
  white-space: nowrap;
  background-color: inherit;
}

#chalksta-msg-modal-root .chalksta-msg-cell-actions--pending {
  position: relative;
}

#chalksta-msg-modal-root .chalksta-msg-cell-actions--pending .chalksta-msg-row-pending-spinner {
  display: inline-block;
  vertical-align: middle;
  width: 0.95rem;
  height: 0.95rem;
  margin-left: 0.15rem;
  border-width: 0.14em;
  color: #e31837;
  border-color: rgba(227, 24, 55, 0.35);
  border-right-color: #e31837;
}

body.dark-theme #chalksta-msg-modal-root .chalksta-msg-cell-actions--pending .chalksta-msg-row-pending-spinner {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  border-right-color: #fff;
  opacity: 1;
}

#chalksta-msg-modal-root .chalksta-msg-cell-actions--pending .chalksta-msg-icon-btn:disabled {
  opacity: 0.35;
  pointer-events: none;
}

#chalksta-msg-modal-root .chalksta-msg-table thead th.chalksta-msg-th-act {
  background-color: var(--chmsg-surface-elevated);
}

#chalksta-msg-modal-root .chalksta-msg-cell-peer,
#chalksta-msg-modal-root .chalksta-msg-cell-league,
#chalksta-msg-modal-root .chalksta-msg-cell-time {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#chalksta-msg-modal-root .chalksta-msg-cell-league {
  color: var(--chmsg-muted);
  font-size: 0.78rem;
}

#chalksta-msg-modal-root .chalksta-msg-cell-peer-elide {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

#chalksta-msg-modal-root .chalksta-msg-recipients-trigger {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}

#chalksta-msg-modal-root .chalksta-msg-recipients-trigger:hover,
#chalksta-msg-modal-root .chalksta-msg-recipients-trigger:focus {
  color: #e31837 !important;
  text-decoration: underline;
  outline: none;
}

body.dark-theme #chalksta-msg-modal-root .chalksta-msg-recipients-trigger:hover,
body.dark-theme #chalksta-msg-modal-root .chalksta-msg-recipients-trigger:focus {
  color: #ff7a8f !important;
}

/* Sent “To” recipient list overlay (inside messenger modal; avoids stacked Bootstrap modals). */
#chalksta-msg-modal-root .chalksta-msg-recipients-overlay:not(.d-none) {
  display: flex !important;
}

#chalksta-msg-modal-root .chalksta-msg-recipients-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  align-items: flex-start;
  justify-content: center;
  padding: 0.85rem 0.65rem 1.25rem;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.5);
  -webkit-overflow-scrolling: touch;
}

#chalksta-msg-modal-root .chalksta-msg-recipients-overlay-inner {
  width: 100%;
  max-width: 26rem;
  margin-top: 0.25rem;
  margin-bottom: auto;
  background: var(--chmsg-surface);
  color: var(--chmsg-fg);
  border: 1px solid var(--chmsg-border);
  border-radius: 4px;
  box-shadow: 0 0.75rem 2.25rem rgba(0, 0, 0, 0.42);
  max-height: min(78vh, 100%);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#chalksta-msg-modal-root .chalksta-msg-recipients-panel-head .close {
  opacity: 0.82;
  text-shadow: none;
}

body:not(.dark-theme) #chalksta-msg-modal-root .chalksta-msg-recipients-panel-head .close {
  color: var(--chmsg-muted);
}

#chalksta-msg-modal-root .chalksta-msg-recipients-panel-head .close:hover {
  color: #e31837 !important;
  opacity: 1;
}

#chalksta-msg-modal-root .chalksta-msg-recipients-meta {
  flex-shrink: 0;
}

#chalksta-msg-modal-root .chalksta-msg-recipients-toolbar {
  flex-shrink: 0;
}

#chalksta-msg-modal-root .chalksta-msg-recipients-search {
  background: var(--chmsg-surface-elevated);
  border-color: var(--chmsg-border);
  color: var(--chmsg-fg);
}

#chalksta-msg-modal-root .chalksta-msg-recipients-search::placeholder {
  color: var(--chmsg-muted);
}

#chalksta-msg-modal-root .chalksta-msg-recipients-search:focus {
  border-color: #e31837;
  box-shadow: 0 0 0 0.12rem rgba(227, 24, 55, 0.22);
  outline: none;
}

#chalksta-msg-modal-root .chalksta-msg-recipients-pager,
#chalksta-msg-modal-root .chalksta-msg-list-pager {
  flex-shrink: 0;
}

/* Pager: btn-outline-light is unreadable on light surfaces; tie controls to --chmsg tokens. */
#chalksta-msg-modal-root .chalksta-msg-recipients-pager .chalksta-msg-recipients-pager-btn.btn {
  color: var(--chmsg-fg);
  border: 1px solid var(--chmsg-border);
  background-color: transparent;
}

#chalksta-msg-modal-root .chalksta-msg-recipients-pager .chalksta-msg-recipients-pager-btn.btn:hover:not(:disabled):not(.disabled) {
  color: var(--chmsg-fg);
  background-color: var(--chmsg-row-hover);
  border-color: var(--chmsg-muted);
}

#chalksta-msg-modal-root .chalksta-msg-recipients-pager .chalksta-msg-recipients-pager-btn.btn:focus {
  box-shadow: 0 0 0 0.12rem rgba(227, 24, 55, 0.22);
  outline: none;
}

#chalksta-msg-modal-root .chalksta-msg-recipients-pager .chalksta-msg-recipients-pager-btn.btn:disabled,
#chalksta-msg-modal-root .chalksta-msg-recipients-pager .chalksta-msg-recipients-pager-btn.btn.disabled {
  color: var(--chmsg-muted);
  opacity: 0.72;
  border-color: var(--chmsg-border);
  cursor: not-allowed;
}

#chalksta-msg-modal-root .chalksta-msg-recipients-page-meta,
#chalksta-msg-modal-root .chalksta-msg-list-page-meta {
  flex: 1;
  min-width: 7rem;
}

#chalksta-msg-modal-root .chalksta-msg-list-pager .chalksta-msg-list-pager-btn.btn {
  color: var(--chmsg-fg);
  border: 1px solid var(--chmsg-border);
  background-color: transparent;
}

#chalksta-msg-modal-root .chalksta-msg-list-pager .chalksta-msg-list-pager-btn.btn:hover:not(:disabled):not(.disabled) {
  color: var(--chmsg-fg);
  background-color: var(--chmsg-row-hover);
  border-color: var(--chmsg-muted);
}

#chalksta-msg-modal-root .chalksta-msg-list-pager .chalksta-msg-list-pager-btn.btn:focus {
  box-shadow: 0 0 0 0.12rem rgba(227, 24, 55, 0.22);
  outline: none;
}

#chalksta-msg-modal-root .chalksta-msg-list-pager .chalksta-msg-list-pager-btn.btn:disabled,
#chalksta-msg-modal-root .chalksta-msg-list-pager .chalksta-msg-list-pager-btn.btn.disabled {
  color: var(--chmsg-muted);
  opacity: 0.72;
  border-color: var(--chmsg-border);
  cursor: not-allowed;
}

#chalksta-msg-modal-root .chalksta-msg-recipients-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(52vh, 520px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#chalksta-msg-modal-root .chalksta-msg-recipients-li:last-child {
  border-bottom: none !important;
}

#chalksta-msg-modal-root .chalksta-msg-recipients-rowtop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.4rem;
}

#chalksta-msg-modal-root .chalksta-msg-recipients-rowtop .chalksta-msg-recipients-label {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

#chalksta-msg-modal-root .chalksta-msg-recipients-beta {
  flex-shrink: 0;
  font-size: 0.56rem;
  font-weight: 700;
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.18rem 0.38rem;
  line-height: 1.2;
  white-space: nowrap;
  border-radius: 999px;
  background: rgba(227, 24, 55, 0.18);
  border: 1px solid rgba(227, 24, 55, 0.52);
  color: var(--chmsg-fg);
}

body.dark-theme #chalksta-msg-modal-root .chalksta-msg-recipients-beta {
  background: rgba(227, 24, 55, 0.28);
  border-color: rgba(255, 122, 143, 0.65);
}

#chalksta-msg-modal-root .chalksta-msg-recipients-li--beta {
  background: rgba(227, 24, 55, 0.055);
}

body.dark-theme #chalksta-msg-modal-root .chalksta-msg-recipients-li--beta {
  background: rgba(227, 24, 55, 0.12);
}

#chalksta-msg-modal-root .chalksta-msg-recipients-fbid {
  font-size: 0.72rem;
  word-break: break-word;
  margin-top: 0.15rem;
}

#chalksta-msg-modal-root .chalksta-msg-cell-preview {
  cursor: pointer;
  overflow: hidden;
  vertical-align: middle;
}

/**
 * IMPORTANT: Never use display:flex on <td> — it breaks column layout in Bootstrap tables.
 * Flex + ellipsis lives on this inner wrapper.
 */
#chalksta-msg-modal-root .chalksta-msg-preview-cell-inner {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  max-width: 100%;
}

#chalksta-msg-modal-root .chalksta-msg-preview-cell-inner .chalksta-msg-preview-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#chalksta-msg-modal-root .chalksta-msg-preview-text--empty {
  color: var(--chmsg-muted);
  font-style: italic;
  font-weight: 400;
}

#chalksta-msg-modal-root .chalksta-msg-announcement-pill,
#chalksta-msg-modal-root .chalksta-msg-banner-pill,
#chalksta-msg-modal-root .chalksta-msg-sticky-pill {
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  padding: 0.1rem 0.42rem;
  font-size: 0.56rem;
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.25;
  border-radius: 2px;
  font-weight: 600;
  background: rgba(227, 24, 55, 0.16);
  border: 1px solid rgba(227, 24, 55, 0.52);
  color: var(--chmsg-fg);
}

@media (min-width: 400px) {
  #chalksta-msg-modal-root .chalksta-msg-announcement-pill {
    padding: 0.1rem 0.48rem;
    font-size: 0.58rem;
    letter-spacing: 0.055em;
  }
}

body.dark-theme #chalksta-msg-modal-root .chalksta-msg-announcement-pill,
body.dark-theme #chalksta-msg-modal-root .chalksta-msg-banner-pill,
body.dark-theme #chalksta-msg-modal-root .chalksta-msg-sticky-pill {
  background: rgba(227, 24, 55, 0.28);
  border-color: rgba(255, 107, 120, 0.55);
  color: #f8f9fa;
}

/* Home / landing announcement bundle (Chalksta-marked rows) */
.chalksta-msg-banner-bundle-brand {
  min-height: 1.25rem;
}
.chalksta-msg-banner-bundle-logo {
  flex-shrink: 0;
  object-fit: contain;
  opacity: 0.92;
}
.chalksta-msg-banner-bundle-line {
  word-break: break-word;
}

.chalksta-msg-banner-bundle-from {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--chmsg-muted, #5c6570);
}

body.dark-theme #chalksta-msg-modal-root .chalksta-msg-banner-bundle-from {
  color: var(--chmsg-muted, rgba(232, 234, 237, 0.78));
}

.chalksta-msg-sticky-home-copy .chalksta-msg-banner-bundle-from {
  color: var(--idx-muted, #5f6368) !important;
}

body.dark-theme .chalksta-msg-sticky-home-copy .chalksta-msg-banner-bundle-from {
  color: var(--idx-muted, #bdc1c6) !important;
}

#chalksta-msg-modal-root .chalksta-msg-icon-btn {
  color: var(--chmsg-muted);
  min-width: 1.25rem;
  line-height: 1;
}

#chalksta-msg-modal-root .chalksta-msg-icon-btn:hover {
  color: var(--chmsg-icon-hover);
}

#chalksta-msg-modal-root .chalksta-msg-icon-btn.text-muted {
  cursor: not-allowed;
  opacity: 0.45;
}

body:not(.dark-theme) #chalksta-msg-modal-root .chalksta-msg-bulk-toolbar-wrap .btn-outline-light {
  color: var(--chmsg-fg);
  border-color: rgba(0, 0, 0, 0.28);
}

body:not(.dark-theme) #chalksta-msg-modal-root .chalksta-msg-bulk-toolbar-wrap .btn-outline-light:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.35);
  color: var(--chmsg-fg);
}

/* Mailbox + league scope segmented controls (theme-aware; not btn-outline-light). */
#chalksta-msg-modal-root .chalksta-msg-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.35rem;
}

#chalksta-msg-modal-root .chalksta-msg-seg-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

#chalksta-msg-modal-root .chalksta-msg-admin-league-scope:not(.d-none) {
  padding-left: 1.1rem;
  border-left: 1px solid var(--chmsg-border);
}

#chalksta-msg-modal-root .chalksta-msg-toolbar-group-label {
  font-family: "Oswald", sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--chmsg-muted);
  margin-right: 0.15rem;
  user-select: none;
}

#chalksta-msg-modal-root .chalksta-msg-seg-btn {
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  font-weight: 600;
  font-size: 0.62rem;
  line-height: 1.15;
  border-radius: 3px;
  padding: 0.18rem 0.48rem;
  border: 1px solid var(--chmsg-border);
  background: var(--chmsg-surface-elevated);
  color: var(--chmsg-fg);
  box-shadow: none;
}

#chalksta-msg-modal-root .chalksta-msg-seg-btn:hover,
#chalksta-msg-modal-root .chalksta-msg-seg-btn:focus-visible {
  border-color: rgba(227, 24, 55, 0.5);
  background: rgba(227, 24, 55, 0.1);
  color: var(--chmsg-fg);
}

#chalksta-msg-modal-root .chalksta-msg-seg-btn.active,
#chalksta-msg-modal-root .chalksta-msg-seg-btn.active:hover,
#chalksta-msg-modal-root .chalksta-msg-seg-btn.active:focus-visible {
  background: #e31837;
  border-color: #e31837;
  color: #fff;
}

body:not(.dark-theme) #chalksta-msg-modal-root .btn.chalksta-msg-more.btn-outline-light {
  color: var(--chmsg-fg);
  border-color: rgba(0, 0, 0, 0.28);
}

body:not(.dark-theme) #chalksta-msg-modal-root .btn.chalksta-msg-more.btn-outline-light:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--chmsg-fg);
}

#chalksta-msg-modal-root .chalksta-msg-bulk-toolbar-wrap .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.28);
}

#chalksta-msg-modal-root .chalksta-msg-read-pane .chalksta-msg-muted,
#chalksta-msg-modal-root .chalksta-msg-read-meta {
  color: var(--chmsg-muted) !important;
}

#chalksta-msg-modal-root .chalksta-msg-read-pane .chalksta-msg-body {
  color: var(--chmsg-fg);
}

#chalksta-msg-modal-root .chalksta-msg-list-pane .chalksta-msg-scroll.chalksta-msg-list {
  max-height: min(62vh, 520px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#chalksta-msg-modal-root .chalksta-msg-modal-body-shell {
  position: relative;
  min-height: min(52vh, 420px);
  /*
   * modal-dialog-scrollable makes .modal-content a flex column and .modal-body a flex item.
   * Default min-width:auto lets in-flow content (table + absolutely positioned reader translated off-screen)
   * widen the body and produce a bogus horizontal scrollbar + empty space to the right.
   */
  min-width: 0;
  overflow-x: hidden;
}

/* Same flex shrink contract on the sheet — completes the column chain under scrollable modals */
#chalksta-msg-modal-root .modal-dialog-scrollable.chalksta-msg-dialog .modal-content.chalksta-msg-inbox-sheet {
  min-width: 0;
}

#chalksta-msg-modal-root .chalksta-msg-list-pane {
  min-width: 0;
  max-width: 100%;
}

#chalksta-msg-modal-root .chalksta-msg-modal-body-shell--reading {
  overflow: hidden;
}

/* In-modal reader: slide from right (desktop) / up (mobile), no second Bootstrap modal. */
#chalksta-msg-modal-root .chalksta-msg-read-pane {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: var(--chmsg-surface);
  border-radius: 0;
  transform: translate3d(100%, 0, 0);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.22s ease,
    visibility 0s linear 0.28s;
}

#chalksta-msg-modal-root .chalksta-msg-read-pane--open {
  transform: translate3d(0, 0, 0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.22s ease,
    visibility 0s linear 0s;
}

#chalksta-msg-modal-root .chalksta-msg-read-pane-inner {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: var(--chmsg-surface);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.08);
}

body.dark-theme #chalksta-msg-modal-root .chalksta-msg-read-pane-inner {
  box-shadow: -8px 0 28px rgba(0, 0, 0, 0.45);
}

#chalksta-msg-modal-root .chalksta-msg-read-pane-toolbar {
  flex-shrink: 0;
  border-color: var(--chmsg-border) !important;
  padding: 0.5rem 0.25rem 0.5rem 0;
  gap: 0.35rem;
}

#chalksta-msg-modal-root .chalksta-msg-read-back {
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  font-weight: 600;
  font-size: 0.62rem;
  line-height: 1.15;
  padding: 0.16rem 0.42rem;
  border: 1px solid var(--chmsg-border);
  background: transparent;
  color: var(--chmsg-fg);
  border-radius: 3px;
}

#chalksta-msg-modal-root .chalksta-msg-read-back:hover {
  background: var(--chmsg-row-hover);
  color: var(--chmsg-icon-hover);
}

body.dark-theme #chalksta-msg-modal-root .chalksta-msg-read-back {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--chmsg-fg);
}

body.dark-theme #chalksta-msg-modal-root .chalksta-msg-read-back:hover {
  background: var(--chmsg-row-hover);
}

#chalksta-msg-modal-root .chalksta-msg-read-pane-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 0.05rem;
}

#chalksta-msg-modal-root .chalksta-msg-read-pane .chalksta-msg-read-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

#chalksta-msg-modal-root .chalksta-msg-read-reply-slot {
  flex: 0 0 auto;
  flex-shrink: 0;
  min-height: 0;
}

#chalksta-msg-modal-root .chalksta-msg-read-reply-slot--dm {
  margin-top: 0.5rem !important;
  padding-top: 0.35rem;
  border-top: 1px solid var(--chmsg-border);
}

#chalksta-msg-modal-root .chalksta-msg-dm-reply-compose {
  position: relative;
}

#chalksta-msg-modal-root .chalksta-msg-dm-reply-resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background-color: transparent;
  /* Native textarea grip look — diagonal hatch, anchored top-right */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M14 1.5 L1.5 14' stroke='%238b95a1' stroke-width='1.15' fill='none'/%3E%3Cpath d='M14 5.5 L5.5 14' stroke='%238b95a1' stroke-width='1.15' fill='none'/%3E%3Cpath d='M14 9.5 L9.5 14' stroke='%238b95a1' stroke-width='1.15' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: top right;
  background-size: 14px 14px;
  cursor: ns-resize;
  opacity: 0.9;
}

#chalksta-msg-modal-root .chalksta-msg-dm-reply-resize-handle:hover,
#chalksta-msg-modal-root .chalksta-msg-dm-reply-resize-handle:focus-visible {
  opacity: 1;
  outline: none;
}

body.dark-theme #chalksta-msg-modal-root .chalksta-msg-dm-reply-resize-handle {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M14 1.5 L1.5 14' stroke='%23b8c0ca' stroke-width='1.15' fill='none'/%3E%3Cpath d='M14 5.5 L5.5 14' stroke='%23b8c0ca' stroke-width='1.15' fill='none'/%3E%3Cpath d='M14 9.5 L9.5 14' stroke='%23b8c0ca' stroke-width='1.15' fill='none'/%3E%3C/svg%3E");
}

body.chalksta-msg-dm-reply-resizing {
  cursor: ns-resize !important;
  user-select: none;
}

body.chalksta-msg-dm-reply-resizing * {
  cursor: ns-resize !important;
}

#chalksta-msg-modal-root .chalksta-msg-dm-reply-ta {
  resize: none;
  display: block;
  width: 100%;
  min-height: 2.125rem;
  max-height: min(36vh, 240px);
  overflow: auto;
  line-height: 1.4;
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
  box-sizing: border-box;
}

#chalksta-msg-modal-root .chalksta-msg-dm-reply-compose label {
  margin-bottom: 0.25rem !important;
  padding-right: 1.75rem;
}

#chalksta-msg-modal-root .chalksta-msg-dm-timeline {
  max-width: 100%;
  overflow-x: hidden;
}

#chalksta-msg-modal-root .chalksta-msg-dm-load-older {
  flex-shrink: 0;
}

#chalksta-msg-modal-root .chalksta-msg-dm-load-older-btn {
  font-size: 0.8rem;
}

#chalksta-msg-modal-root .chalksta-msg-dm-bubble {
  overflow-wrap: anywhere;
  word-break: break-word;
}

#chalksta-msg-modal-root .chalksta-msg-autolink {
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}

#chalksta-msg-modal-root .chalksta-msg-read-pane .chalksta-msg-autolink {
  color: #c41230;
}

#chalksta-msg-modal-root .chalksta-msg-dm-bubble-wrap--mine .chalksta-msg-autolink {
  color: #fff;
  font-weight: 600;
}

#chalksta-msg-modal-root .chalksta-msg-dm-bubble-wrap--theirs .chalksta-msg-autolink {
  color: #c41230;
}

body.dark-theme #chalksta-msg-modal-root .chalksta-msg-dm-bubble-wrap--theirs .chalksta-msg-autolink {
  color: #ff8fa3;
}

body.dark-theme #chalksta-msg-modal-root .chalksta-msg-read-pane .chalksta-msg-autolink {
  color: #ff8fa3;
}

#chalksta-msg-modal-root .chalksta-msg-modal-body-shell--dm-thread .chalksta-msg-read-meta {
  display: none;
}

#chalksta-msg-modal-root .chalksta-msg-modal-body-shell--dm-thread .chalksta-msg-read-dm-badge,
#chalksta-msg-modal-root .chalksta-msg-modal-body-shell--dm-thread .chalksta-msg-read-beta-banner {
  padding-top: 0.35rem !important;
  padding-bottom: 0.35rem !important;
  margin-bottom: 0.35rem !important;
}

#chalksta-msg-modal-root .chalksta-msg-modal-body-shell--dm-thread .chalksta-msg-read-pane-toolbar {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

/* Keep last bubble timestamp/receipt visible above reply strip (mobile scroll clip) */
#chalksta-msg-modal-root .chalksta-msg-modal-body-shell--dm-thread .chalksta-msg-read-pane .chalksta-msg-read-scroll {
  padding-bottom: 1rem;
  scroll-padding-bottom: 1rem;
}

@media (max-width: 575.98px) {
  #chalksta-msg-modal-root .modal-dialog.chalksta-msg-dialog {
    margin: 0 auto;
    max-width: 100%;
    width: 100%;
    min-height: 100%;
    height: calc(100% - env(safe-area-inset-bottom, 0px));
  }

  #chalksta-msg-modal.modal {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  #chalksta-msg-modal-root .modal-content.chalksta-msg-inbox-sheet {
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 0;
    border-left: none;
    border-right: none;
    display: flex;
    flex-direction: column;
  }

  #chalksta-msg-modal-root .modal-dialog-scrollable.chalksta-msg-dialog .modal-content {
    max-height: none;
    min-height: inherit;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #chalksta-msg-modal-root .modal-dialog-scrollable.chalksta-msg-dialog .modal-body.chalksta-msg-modal-body-shell {
    overflow: hidden !important;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: none !important;
  }

  /* Let body flex to fill full-height sheet (overrides desktop min-height floor) */
  #chalksta-msg-modal-root .chalksta-msg-modal-body-shell {
    min-height: 0;
  }

  /* Reader sheet feels like full-step on phone */
  #chalksta-msg-modal-root .chalksta-msg-read-pane {
    transform: translate3d(0, 100%, 0);
    box-shadow: 0 -6px 32px rgba(0, 0, 0, 0.12);
  }

  body.dark-theme #chalksta-msg-modal-root .chalksta-msg-read-pane {
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  }

  #chalksta-msg-modal-root .chalksta-msg-read-pane--open {
    transform: translate3d(0, 0, 0);
  }

  #chalksta-msg-modal-root .chalksta-msg-read-pane-inner {
    box-shadow: none;
    border-radius: 0;
  }

  #chalksta-msg-modal-root .chalksta-msg-list-pane .chalksta-msg-scroll.chalksta-msg-list {
    max-height: none;
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  #chalksta-msg-modal-root .chalksta-msg-table-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
  }

  #chalksta-msg-modal-root .modal-header.border-secondary {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }

  #chalksta-msg-modal-root .chalksta-msg-mailbox-tabs .btn {
    padding-left: 0.42rem;
    padding-right: 0.42rem;
    font-size: 0.6rem;
  }

  #chalksta-msg-modal-root .chalksta-msg-hint {
    font-size: 0.68rem;
    line-height: 1.35;
  }

  #chalksta-msg-modal-root .chalksta-msg-cell-actions .chalksta-msg-icon-btn {
    margin-left: 0.12rem !important;
    padding-left: 0.1rem !important;
    padding-right: 0.1rem !important;
  }

  #chalksta-msg-modal-root .chalksta-msg-th-act-label {
    display: inline-block;
    padding-right: 0.15rem;
  }

  #chalksta-msg-modal-root .chalksta-msg-col-resizer {
    width: 0.75rem;
  }

  #chalksta-msg-modal-root .chalksta-msg-col-resizer--leading {
    width: 0.85rem;
  }

  /* When only listing, let list flex inside shell */
  #chalksta-msg-modal-root .chalksta-msg-list-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  #chalksta-msg-modal-root .chalksta-msg-modal-body-shell--dm-thread .chalksta-msg-read-pane .chalksta-msg-read-scroll {
    padding-bottom: 1.35rem;
    scroll-padding-bottom: 1.35rem;
  }

  .chalksta-msg-dm-timeline {
    padding-bottom: 0.85rem;
  }
}

/*
 * Phone/tablet landscape: viewport width often exceeds 576px so Bootstrap’s default
 * modal max-width (~500px) applies and the sheet looks as narrow as portrait.
 */
@media (orientation: landscape) and (max-width: 991.98px) {
  #chalksta-msg-modal-root .modal-dialog.chalksta-msg-dialog {
    margin: 0.5rem auto;
    max-width: calc(100vw - 1rem);
    width: calc(100vw - 1rem);
    max-height: calc(100dvh - 1rem);
    height: auto;
    min-height: calc(100dvh - 1rem);
  }

  #chalksta-msg-modal.modal {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }

  #chalksta-msg-modal-root .modal-content.chalksta-msg-inbox-sheet {
    min-height: calc(100dvh - 1rem);
    border-radius: 4px;
  }

  #chalksta-msg-modal-root .modal-dialog-scrollable.chalksta-msg-dialog .modal-content {
    max-height: calc(100dvh - 1rem);
  }

  #chalksta-msg-modal-root .chalksta-msg-modal-body-shell {
    min-height: 0;
  }
}

@media (max-width: 575.98px) and (orientation: portrait) {
  #chalksta-msg-modal-root .chalksta-msg-bulk-toolbar-wrap .btn {
    font-size: 0.58rem;
    padding: 0.14rem 0.36rem;
  }

  #chalksta-msg-modal-root .table.chalksta-msg-table thead th {
    font-size: 0.54rem;
    padding-top: 0.28rem;
    padding-bottom: 0.28rem;
  }

  #chalksta-msg-modal-root .table.chalksta-msg-table tbody td {
    padding-top: 0.42rem;
    padding-bottom: 0.42rem;
    font-size: 0.8125rem;
  }

  #chalksta-msg-modal-root .chalksta-msg-table thead th.chalksta-msg-th-prev {
    min-width: 3.75rem;
  }
}

@media (min-width: 576px) {
  /* Desktop: near full-viewport messenger sheet (matches mobile fill intent) */
  #chalksta-msg-modal-root .modal-dialog.chalksta-msg-dialog {
    margin: 0.75rem auto;
    max-width: min(1140px, calc(100vw - 1.5rem));
    width: calc(100vw - 1.5rem);
    height: calc(100dvh - 1.5rem);
    max-height: calc(100dvh - 1.5rem);
  }

  #chalksta-msg-modal-root .modal-dialog-scrollable.chalksta-msg-dialog .modal-content.chalksta-msg-inbox-sheet {
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #chalksta-msg-modal-root .modal-dialog-scrollable.chalksta-msg-dialog .modal-body.chalksta-msg-modal-body-shell {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none !important;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
  }

  #chalksta-msg-modal-root .chalksta-msg-modal-body-shell {
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
  }

  #chalksta-msg-modal-root .chalksta-msg-list-pane {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  #chalksta-msg-modal-root .chalksta-msg-list-pane .chalksta-msg-scroll.chalksta-msg-list {
    max-height: none;
    flex: 1 1 auto;
    min-height: 0;
  }

}

@media (prefers-reduced-motion: reduce) {
  #chalksta-msg-modal-root .chalksta-msg-read-pane {
    transition: none !important;
  }
}

#chalksta-msg-modal-root .chalksta-msg-beta-ribbon-wrap,
.chalksta-msg-read-beta-banner {
  background: rgba(227, 24, 55, 0.16);
  border: 1px solid rgba(227, 24, 55, 0.45);
  color: var(--chmsg-fg);
  border-radius: 4px;
  font-size: 0.8125rem;
  line-height: 1.4;
}

/* Official Chalksta row: dark badge container so logo/wordmark stay legible on light messenger theme */
.chalksta-msg-read-chalksta-brand-badge,
.chalksta-msg-read-chalksta-brand-inner {
  background: #15171b;
  color: #f3f5f9;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  font-size: 0.8125rem;
  line-height: 1.4;
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.04) inset,
    0 6px 18px rgba(0, 0, 0, 0.22);
}

body.dark-theme #chalksta-msg-modal-root .chalksta-msg-read-chalksta-brand-inner {
  background: #0d0f12;
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.035) inset,
    0 8px 24px rgba(0, 0, 0, 0.45);
}

#chalksta-msg-modal-root .chalksta-msg-read-contact-badge {
  background: rgba(227, 24, 55, 0.12);
  color: var(--chmsg-fg);
  border: 1px solid rgba(227, 24, 55, 0.35);
  border-radius: 8px;
  line-height: 1.45;
}

body:not(.dark-theme) #chalksta-msg-modal-root .chalksta-msg-read-contact-badge {
  background: rgba(227, 24, 55, 0.08);
  color: #1d1f24;
}

#chalksta-msg-modal-root .chalksta-msg-read-team-badge {
  background: rgba(30, 58, 95, 0.1);
  color: var(--chmsg-fg);
  border: 1px solid rgba(30, 58, 95, 0.28);
  border-radius: 8px;
  line-height: 1.45;
}

body.dark-theme #chalksta-msg-modal-root .chalksta-msg-read-team-badge {
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(147, 197, 253, 0.35);
}

body:not(.dark-theme) #chalksta-msg-modal-root .chalksta-msg-read-team-badge {
  color: #1d1f24;
}

#chalksta-msg-modal-root .chalksta-msg-read-team-title {
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#chalksta-msg-modal-root .chalksta-msg-read-chalksta-logo {
  flex-shrink: 0;
  display: block;
  height: 2.875rem;
  width: auto;
  max-width: 10rem;
  object-fit: contain;
}

#chalksta-msg-modal-root .chalksta-msg-read-chalksta-wordmark {
  letter-spacing: 0.045em;
  text-transform: uppercase;
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  color: #f8f9fc !important;
}

#chalksta-msg-modal-root .chalksta-msg-read-chalksta-brand-inner .chalksta-msg-read-chalksta-sub,
#chalksta-msg-modal-root .chalksta-msg-read-chalksta-brand-inner .chalksta-msg-muted {
  color: rgba(248, 250, 252, 0.72) !important;
}

@media (max-width: 400px) {
  #chalksta-msg-modal-root .chalksta-msg-read-chalksta-logo {
    height: 2.5rem;
    max-width: 8rem;
    margin-right: 0.6rem !important;
  }
}

.chalksta-msg-sticky-optout-sub {
  font-size: 0.8125rem;
  line-height: 1.35;
}

/* Sticky announcement — rises from bottom, finishes visually centered */
/* Above messenger inbox modal (~1050). Backdrop z-index set in bootstrap.js when modals stack. */
#chalksta-msg-sticky-home-modal.modal {
  z-index: 20050 !important;
}

.chalksta-msg-sticky-home-modal-root--sheet.modal {
  overflow-x: hidden;
}

.chalksta-msg-sticky-home-modal-root--sheet.modal.fade .modal-dialog.chalksta-msg-sticky-home-dialog {
  position: fixed;
  left: 50vw;
  top: 50vh;
  margin: 0 !important;
  max-width: min(520px, calc(100% - 2rem)) !important;
  width: calc(100% - 2rem);
  transform-origin: center center;
  opacity: 0;
  animation: none;
}

.chalksta-msg-sticky-home-modal-root--sheet.modal.fade.show .modal-dialog.chalksta-msg-sticky-home-dialog {
  opacity: 1;
  animation: chalkstaStickyAnnounceReveal 0.76s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes chalkstaStickyAnnounceReveal {
  0% {
    opacity: 0;
    transform: translate3d(-50%, 44vh, 0) scale(0.93);
  }
  68% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translate3d(-50%, -50%, 0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chalksta-msg-sticky-home-modal-root--sheet.modal.fade .modal-dialog.chalksta-msg-sticky-home-dialog {
    opacity: 0;
    animation: none;
  }

  .chalksta-msg-sticky-home-modal-root--sheet.modal.fade.show .modal-dialog.chalksta-msg-sticky-home-dialog {
    opacity: 1;
    animation: chalkstaStickyAnnounceRevealReduced 0.14s ease-out forwards !important;
  }

  @keyframes chalkstaStickyAnnounceRevealReduced {
    0% {
      opacity: 0;
      transform: translate3d(-50%, 18vh, 0) scale(0.96);
    }
    100% {
      opacity: 1;
      transform: translate3d(-50%, -50%, 0) scale(1);
    }
  }
}

.chalksta-msg-sticky-optout-wrap {
  cursor: pointer;
  color: var(--idx-fg, #1d1d1f) !important;
}

body.dark-theme .chalksta-msg-sticky-optout-wrap {
  color: var(--idx-fg, #e8eaed) !important;
}

.chalksta-msg-sticky-optout-wrap span,
.chalksta-msg-sticky-optout-wrap .form-check-input {
  vertical-align: middle;
}

.chalksta-msg-sticky-home-sheet .close {
  text-shadow: none;
  color: var(--idx-fg, #1d1d1f);
  opacity: 0.55;
}

.chalksta-msg-sticky-home-sheet .close:hover {
  opacity: 1;
  color: var(--espn-red, #e31837);
}

body.dark-theme .chalksta-msg-sticky-home-sheet .close {
  color: var(--idx-fg, #f0f3f6);
  opacity: 0.72;
}

body.dark-theme .chalksta-msg-sticky-home-sheet .close:hover {
  color: #ff6b78;
}

.chalksta-msg-sticky-corner-close:focus {
  outline: thin dotted currentColor;
  outline-offset: 2px;
}

/* Announcement modal — inherits site tokens (--idx-*) where defined; Bootstrap text utilities must not flatten contrast */
.chalksta-msg-sticky-home-sheet {
  --espn-red: #e31837;
  background: var(--idx-surface, #ffffff);
  color: var(--idx-fg, #1d1d1f);
  border: 1px solid var(--idx-border, rgba(0, 0, 0, 0.12));
  border-radius: 10px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.4),
    0 6px 20px rgba(0, 0, 0, 0.12);
}

body.dark-theme .chalksta-msg-sticky-home-sheet {
  background: var(--idx-surface, #252528);
  color: var(--idx-fg, #e8eaed);
  border-color: var(--idx-border, rgba(255, 255, 255, 0.14));
}

.chalksta-msg-sticky-home-head {
  padding-bottom: 0;
}

.chalksta-msg-sticky-home-head-brand {
  line-height: 0;
  padding: 0.4rem 0.65rem;
  background: #15171b;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 4px 14px rgba(0, 0, 0, 0.2);
}

body.dark-theme .chalksta-msg-sticky-home-head-brand {
  background: #0d0f12;
  border-color: rgba(255, 255, 255, 0.18);
}

.chalksta-msg-sticky-home-head-logo {
  display: block;
  height: 3.375rem;
  width: auto;
  max-width: 11rem;
  object-fit: contain;
}

@media (max-width: 400px) {
  .chalksta-msg-sticky-home-head-logo {
    height: 2.85rem;
    max-width: 8.75rem;
  }

  .chalksta-msg-sticky-home-head-brand {
    padding: 0.32rem 0.5rem;
  }
}

.chalksta-msg-sticky-home-title {
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--espn-red, #e31837);
}

body.dark-theme .chalksta-msg-sticky-home-title {
  color: #ff4d62;
}

.chalksta-msg-sticky-home-hint {
  color: var(--idx-muted, #5f6368) !important;
}

body.dark-theme .chalksta-msg-sticky-home-hint {
  color: var(--idx-muted, #bdc1c6) !important;
}

.chalksta-msg-sticky-home-copy {
  font-family: "Roboto", sans-serif;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--idx-fg, #1b1f24) !important;
}

body.dark-theme .chalksta-msg-sticky-home-copy {
  color: var(--idx-fg, #e8eaed) !important;
}

body.dark-theme .chalksta-msg-sticky-home-sheet .form-check-input {
  border-color: rgba(255, 255, 255, 0.45);
  background-color: rgba(0, 0, 0, 0.15);
}

body:not(.dark-theme) .chalksta-msg-sticky-home-sheet .form-check-input {
  border-color: rgba(0, 0, 0, 0.35);
}

.chalksta-msg-sticky-home-foot .btn-outline-secondary {
  border-color: var(--idx-border, rgba(0, 0, 0, 0.25));
  color: var(--idx-fg, #333);
}

body.dark-theme .chalksta-msg-sticky-home-foot .btn-outline-secondary {
  border-color: var(--idx-border, rgba(255, 255, 255, 0.35));
  color: var(--idx-fg, #e8eaed);
}

.chalksta-msg-sticky-home-foot .btn-secondary {
  background: #5c636a;
  border-color: #5c636a;
  color: #fff;
}

body.dark-theme .chalksta-msg-sticky-home-foot .btn-secondary {
  background: #3c4043;
  border-color: #5f6368;
  color: var(--idx-fg, #e8eaed);
}

.chalksta-msg-sticky-home-foot .btn-danger {
  background: #e31837;
  border-color: #e31837;
}

/* Messenger-style unread dot on envelope (Facebook/iMessage-style placement) */
#notifs_col {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

/* Pulsing ESPN-red glow behind envelope when unread messages exist */
#notifs_col.idx-notifs-col--has-unread::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.65em;
  height: 1.65em;
  margin-left: -0.825em;
  margin-top: -0.825em;
  border-radius: 50%;
  background: rgba(227, 24, 55, 0.18);
  box-shadow:
    0 0 6px rgba(227, 24, 55, 0.45),
    0 0 14px rgba(227, 24, 55, 0.22);
  animation: idx-notifs-envelope-glow 2.2s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

#notifs_col.idx-notifs-col--has-unread > #notifs-icon-link,
#notifs_col.idx-notifs-col--has-unread > svg {
  position: relative;
  z-index: 1;
}

body.dark-theme #notifs_col.idx-notifs-col--has-unread::before {
  background: rgba(227, 24, 55, 0.24);
  box-shadow:
    0 0 8px rgba(227, 24, 55, 0.55),
    0 0 18px rgba(227, 24, 55, 0.3);
}

@keyframes idx-notifs-envelope-glow {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.72;
    box-shadow:
      0 0 4px rgba(227, 24, 55, 0.35),
      0 0 10px rgba(227, 24, 55, 0.18);
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
    box-shadow:
      0 0 12px rgba(227, 24, 55, 0.95),
      0 0 26px rgba(227, 24, 55, 0.5);
  }
}

#notifs_col > #notifs-link.idx-notifs-unread-badge {
  position: absolute;
  /* Sit mostly outside the 1em envelope — pin near corner but translate down/left so the dot hugs the edge */
  left: 0;
  bottom: 0;
  transform: translate(-72%, 58%);
  box-sizing: border-box;
  min-width: 0.8125rem;
  height: 0.75rem;
  padding: 0 0.14rem;
  margin: 0 !important;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.5rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff !important;
  background: #e31837;
  border-radius: 999px;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  z-index: 2;
}

body.dark-theme #notifs_col > #notifs-link.idx-notifs-unread-badge:not(.idx-notifs-unread-badge--empty) {
  border-color: #2a2d34;
}

#notifs_col > #notifs-link.idx-notifs-unread-badge.idx-notifs-unread-badge--empty {
  display: none !important;
}

#notifs_col > #notifs-link.idx-notifs-unread-badge.idx-notifs-unread-badge--wide {
  min-width: 1.35rem;
  padding: 0 0.1rem;
  font-size: 0.4375rem;
  letter-spacing: -0.04em;
}

.chalksta-msg-league-pill {
  display: inline-block;
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
  font-size: 0.68rem;
  color: #9aa0a6;
  margin-right: 0.25rem;
}

@media (prefers-reduced-motion: reduce) {
  #notifs_col.idx-notifs-col--has-unread::before {
    animation: none;
    transform: none;
    opacity: 1;
    box-shadow:
      0 0 8px rgba(227, 24, 55, 0.65),
      0 0 16px rgba(227, 24, 55, 0.35);
  }
}

/*
 * Legacy fave row (#fave_div outside idx-header — e.g. admin pages): Bootstrap cols + inline
 * heights/margins made the unread count / envelope / star misaligned vs index landing inline bar.
 */
#fave_div:not(.idx-header-fave-inline) > .row.no-gutters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  min-height: 1.75rem;
  height: auto !important;
  row-gap: 0.15rem;
  column-gap: 0.55rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  box-sizing: border-box;
}

#fave_div:not(.idx-header-fave-inline) > .row.no-gutters > [class*="col"] {
  height: auto !important;
}

#fave_div:not(.idx-header-fave-inline) #favorite_info_col {
  flex: 1 1 8rem;
  min-width: 0;
  display: flex;
  align-items: center;
}

#fave_div:not(.idx-header-fave-inline) #notifs_col,
#fave_div:not(.idx-header-fave-inline) #faves_menu_col {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#fave_div:not(.idx-header-fave-inline) #notifs_col #notifs-icon-link,
#fave_div:not(.idx-header-fave-inline) #notifs_col svg#notifs-icon-link,
#fave_div:not(.idx-header-fave-inline) #faves_menu_col svg#faves_menu_link {
  margin-right: 0 !important;
  margin-left: 0 !important;
  vertical-align: middle;
  display: block;
}

/* HTML broadcasts with embedded images/logos scale inside the reader modal */
.chalksta-msg-body img {
  max-width: 100%;
  height: auto;
  display: block;
}

.chalksta-msg-body p {
  margin-bottom: 0.65rem;
}

/* Quoted reply — compact quote block + distinct reply body */
#chalksta-msg-modal-root .chalksta-msg-reply-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#chalksta-msg-modal-root .chalksta-msg-reply-quote {
  margin: 0;
  padding: 0.55rem 0.65rem 0.55rem 0.7rem;
  border: 0;
  border-left: 3px solid var(--chmsg-border);
  border-radius: 0 2px 2px 0;
  background: var(--chmsg-surface-elevated);
  color: var(--chmsg-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

#chalksta-msg-modal-root .chalksta-msg-reply-quote-label {
  font-family: "Oswald", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--chmsg-fg);
  opacity: 0.82;
  margin-bottom: 0.35rem;
}

#chalksta-msg-modal-root .chalksta-msg-reply-quote-text {
  white-space: pre-wrap;
  word-break: break-word;
}

#chalksta-msg-modal-root .chalksta-msg-reply-body {
  color: var(--chmsg-fg);
  font-size: 0.95rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

#chalksta-msg-modal-root .chalksta-msg-reply-sep {
  border: 0;
  border-top: 1px solid var(--chmsg-border);
  margin: 0.75rem 0;
}

/* Coming-soon modal (non–beta testers) */
.chalksta-msg-cs-dialog {
  max-width: 380px;
}

.chalksta-msg-cs-modal {
  background: #1b1e24;
  color: #f8f9fa;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

body:not(.dark-theme) .chalksta-msg-cs-modal {
  background: #ffffff;
  color: #1d1f24;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
}

body:not(.dark-theme) .chalksta-msg-cs-title {
  color: #1d2127 !important;
}

body:not(.dark-theme) .chalksta-msg-cs-copy {
  color: #333944;
}

.chalksta-msg-cs-header {
  background: transparent;
  padding-bottom: 0;
}

.chalksta-msg-cs-title {
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 1rem;
  color: #f8f9fa !important;
  border-bottom: 2px solid #e31837;
  padding-bottom: 0.35rem;
  margin-right: auto;
}

.chalksta-msg-cs-close {
  opacity: 0.85;
  text-shadow: none;
}

.chalksta-msg-cs-close:hover {
  opacity: 1;
  color: #e31837 !important;
}

.chalksta-msg-cs-body {
  padding-top: 0.75rem;
  padding-bottom: 1.25rem;
}

.chalksta-msg-cs-copy {
  font-family: "Roboto", sans-serif;
  font-size: 0.96rem;
  line-height: 1.45;
  color: #dee2e6;
}

/*
 * notify.js Bootstrap confirm — appended to <body>, not under #chalksta-msg-modal-root.
 * Dark admin shell: body.dark-theme sets light text; default white .modal-content inherits it → illegible title.
 */
.chalksta-msg-confirm-modal .modal-content {
  background-color: #fff;
  color: #1d1f24;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.chalksta-msg-confirm-modal .modal-header {
  background-color: #fff;
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

.chalksta-msg-confirm-modal .modal-title,
.chalksta-msg-confirm-modal .chmsg-cfm-title {
  color: #16191e !important;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chalksta-msg-confirm-modal .chmsg-cfm-body {
  color: #495057 !important;
}

.chalksta-msg-confirm-modal .modal-footer {
  border-top-color: rgba(0, 0, 0, 0.08);
}

.chalksta-msg-confirm-modal .modal-header .close {
  color: #334155;
  opacity: 0.8;
  text-shadow: none;
}

.chalksta-msg-confirm-modal .modal-header .close:hover {
  color: #e31837 !important;
  opacity: 1;
}

body.dark-theme .chalksta-msg-confirm-modal .modal-content {
  background-color: #1a1a1e;
  color: #f0f3f6;
  border-color: #3a3a42;
}

body.dark-theme .chalksta-msg-confirm-modal .modal-header {
  background-color: #1a1a1e;
  border-bottom-color: #3a3a42;
}

body.dark-theme .chalksta-msg-confirm-modal .modal-title,
body.dark-theme .chalksta-msg-confirm-modal .chmsg-cfm-title {
  color: #f8f9fa !important;
}

body.dark-theme .chalksta-msg-confirm-modal .chmsg-cfm-body {
  color: rgba(232, 234, 237, 0.92) !important;
}

body.dark-theme .chalksta-msg-confirm-modal .modal-footer {
  border-top-color: #3a3a42;
}

body.dark-theme .chalksta-msg-confirm-modal .modal-header .close {
  color: rgba(248, 249, 250, 0.9);
}

body.dark-theme .chalksta-msg-confirm-modal .modal-header .close:hover {
  color: #ff6b81 !important;
}

/* Tooltip: stable beside scrollParents (boundary: viewport in JS) — avoid jitter from overlapping hover hit areas */
.tooltip.chalksta-msg-tip {
  pointer-events: none;
}
.tooltip.chalksta-msg-tip .tooltip-inner {
  max-width: min(280px, 85vw);
  text-align: left;
}
#chalksta-msg-modal .tooltip {
  z-index: 1065;
}

/* Inbox / sent / archive list search + filter chips */
#chalksta-msg-modal-root .chalksta-msg-list-filters {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.35rem 0.5rem 0.32rem;
  background: rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.chalksta-msg-list-filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.chalksta-msg-list-filters-head-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex: 1 1 auto;
  min-width: 0;
}

/* Green Compose / Send (inbox toolbar + DM modal) */
.chalksta-msg-compose-btn {
  background: rgba(40, 167, 69, 0.92);
  border: 1px solid rgba(30, 126, 52, 0.95);
  color: #fff;
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.045em;
  font-size: 0.62rem;
  line-height: 1.15;
  padding: 0.16rem 0.42rem;
}

.chalksta-msg-compose-btn:hover,
.chalksta-msg-compose-btn:focus-visible {
  background: #218838;
  border-color: #1e7e34;
  color: #fff;
}

body:not(.dark-theme) .chalksta-msg-compose-btn {
  background: #28a745;
  border-color: #1e7e34;
  color: #fff;
}

body:not(.dark-theme) .chalksta-msg-compose-btn:hover,
body:not(.dark-theme) .chalksta-msg-compose-btn:focus-visible {
  background: #218838;
  border-color: #1c7430;
  color: #fff;
}

#chalksta-msg-modal-root .chalksta-msg-bulk-toolbar-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
}

#chalksta-msg-modal-root .chalksta-msg-bulk-toolbar-wrap .chalksta-msg-compose-wrap {
  margin-left: auto;
}

#chalksta-msg-modal-root .chalksta-msg-bulk-toolbar-wrap .chalksta-msg-compose-btn {
  align-self: center;
  white-space: nowrap;
}

#chalksta-msg-modal-root .chalksta-msg-list-filters-title {
  font-family: "Oswald", sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--chmsg-muted, #adb5bd);
  line-height: 1.2;
}

.chalksta-msg-list-filters-search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

#chalksta-msg-modal-root .chalksta-msg-list-search {
  flex: 1 1 10rem;
  min-width: 8.5rem;
  max-width: 100%;
  font-family: "Roboto", sans-serif;
  font-size: 0.72rem;
  line-height: 1.3;
  padding: 0.2rem 0.45rem;
}

#chalksta-msg-modal-root .chalksta-msg-list-filter-clear {
  flex: 0 0 auto;
}

.chalksta-msg-list-filters-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.45rem;
}

.chalksta-msg-filter-chip-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.22rem;
}

.chalksta-msg-filter-chip-group + .chalksta-msg-filter-chip-group::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 0.85rem;
  margin-right: 0.12rem;
  background: rgba(255, 255, 255, 0.14);
  align-self: center;
}

#chalksta-msg-modal-root .chalksta-msg-list-count {
  color: var(--chmsg-fg, #f8f9fa);
  font-family: "Oswald", sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  text-align: right;
  flex: 1 1 auto;
}

#chalksta-msg-modal-root .chalksta-msg-filter-legend {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 0.1rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-family: "Roboto", sans-serif;
  font-size: 0.58rem;
  line-height: 1.35;
}

.chalksta-msg-filter-legend-hint,
.chalksta-msg-filter-legend-copy {
  color: var(--chmsg-muted, #adb5bd);
}

.chalksta-msg-filter-legend-hint {
  display: block;
}

.chalksta-msg-filter-legend-copy {
  display: block;
}

.chalksta-msg-filter-legend-inline {
  display: inline;
  white-space: nowrap;
}

.chalksta-msg-filter-legend-inline .chalksta-msg-filter-legend-icon {
  display: inline-flex;
  vertical-align: -0.05em;
  margin-right: 0.08rem;
}

.chalksta-msg-filter-legend-icon,
.chalksta-msg-filter-pill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: "Comic Sans MS", "Comic Neue", cursive;
  font-weight: 700;
  line-height: 1;
  -webkit-text-stroke: 0.2px currentColor;
}

.chalksta-msg-filter-pill-icon {
  width: 0.72rem;
  height: 0.72rem;
  font-size: 0.64rem;
}

.chalksta-msg-filter-legend-icon {
  width: 0.68rem;
  height: 0.68rem;
  font-size: 0.6rem;
}

.chalksta-msg-filter-pill:not(.active-include):not(.active-exclude) .chalksta-msg-filter-pill-icon::before,
.chalksta-msg-filter-legend-icon--off::before {
  content: "o";
}

.chalksta-msg-filter-pill.active-include .chalksta-msg-filter-pill-icon::before,
.chalksta-msg-filter-legend-icon--include::before {
  content: "\2713";
}

.chalksta-msg-filter-pill.active-exclude .chalksta-msg-filter-pill-icon::before,
.chalksta-msg-filter-legend-icon--exclude::before {
  content: "\00d7";
}

.chalksta-msg-filter-legend-swatch {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.chalksta-msg-filter-legend-swatch--off {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.chalksta-msg-filter-legend-swatch--include {
  background: rgba(40, 167, 69, 0.35);
  border: 1px solid rgba(40, 167, 69, 0.9);
}

.chalksta-msg-filter-legend-swatch--exclude {
  background: rgba(227, 24, 55, 0.32);
  border: 1px solid rgba(227, 24, 55, 0.9);
}

#chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: transparent;
  background-image: none;
  box-shadow: none;
  color: var(--chmsg-muted, #adb5bd);
  border-radius: 999px;
  padding: 0.04rem 0.34rem 0.04rem 0.26rem;
  font-family: "Oswald", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.56rem;
  line-height: 1.2;
}

#chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill .chalksta-msg-filter-pill-label {
  line-height: 1.2;
}

#chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill:hover,
#chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill:focus,
#chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill:focus-visible {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.06);
  background-image: none;
  box-shadow: none;
  color: var(--chmsg-fg, #f8f9fa);
}

#chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill.active-include,
#chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill.active-include:hover,
#chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill.active-include:focus,
#chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill.active-include:focus-visible {
  background: rgba(40, 167, 69, 0.38);
  background-image: none;
  border-color: rgba(72, 210, 100, 0.95);
  box-shadow: none;
  color: #eafff0;
}

#chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill.active-include .chalksta-msg-filter-pill-icon::before {
  color: #b8ffd0;
}

#chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill.active-exclude,
#chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill.active-exclude:hover,
#chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill.active-exclude:focus,
#chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill.active-exclude:focus-visible {
  background: rgba(227, 24, 55, 0.36);
  background-image: none;
  border-color: rgba(255, 90, 110, 0.95);
  box-shadow: none;
  color: #fff;
}

#chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill.active-exclude .chalksta-msg-filter-pill-icon::before {
  color: #ffd0d8;
}

body:not(.dark-theme) #chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill.active-include .chalksta-msg-filter-pill-icon::before {
  color: #1e7e34;
}

body:not(.dark-theme) #chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill.active-exclude .chalksta-msg-filter-pill-icon::before {
  color: #c41230;
}

.chalksta-msg-filter-legend-icon--include::before {
  color: rgba(72, 210, 100, 0.95);
}

.chalksta-msg-filter-legend-icon--exclude::before {
  color: rgba(255, 90, 110, 0.95);
}

body:not(.dark-theme) .chalksta-msg-filter-legend-icon--include::before {
  color: #1e7e34;
}

body:not(.dark-theme) .chalksta-msg-filter-legend-icon--exclude::before {
  color: #c41230;
}

body:not(.dark-theme) #chalksta-msg-modal-root .chalksta-msg-list-filters {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.12);
}

body:not(.dark-theme) #chalksta-msg-modal-root .chalksta-msg-list-filters-title {
  color: #5c6570;
}

body:not(.dark-theme) .chalksta-msg-filter-chip-group + .chalksta-msg-filter-chip-group::before {
  background: rgba(0, 0, 0, 0.14);
}

body:not(.dark-theme) .chalksta-msg-filter-legend {
  border-top-color: rgba(0, 0, 0, 0.08);
}

body:not(.dark-theme) .chalksta-msg-filter-legend-swatch--off {
  border-color: rgba(0, 0, 0, 0.22);
}

body:not(.dark-theme) .chalksta-msg-filter-legend-swatch--include {
  background: rgba(40, 167, 69, 0.22);
  border-color: rgba(30, 126, 52, 0.8);
}

body:not(.dark-theme) .chalksta-msg-filter-legend-swatch--exclude {
  background: rgba(227, 24, 55, 0.18);
  border-color: rgba(200, 35, 51, 0.8);
}

body:not(.dark-theme) #chalksta-msg-modal-root .chalksta-msg-list-count {
  color: #1d2127;
}

body:not(.dark-theme) #chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill {
  border-color: rgba(0, 0, 0, 0.18);
  color: #5c6570;
}

body:not(.dark-theme) #chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill:hover,
body:not(.dark-theme) #chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill:focus,
body:not(.dark-theme) #chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill:focus-visible {
  border-color: rgba(0, 0, 0, 0.28);
  background: rgba(0, 0, 0, 0.04);
  color: #1d2127;
}

body:not(.dark-theme) #chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill.active-include,
body:not(.dark-theme) #chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill.active-include:hover,
body:not(.dark-theme) #chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill.active-include:focus,
body:not(.dark-theme) #chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill.active-include:focus-visible {
  background: rgba(40, 167, 69, 0.2);
  border-color: rgba(30, 126, 52, 0.8);
  color: #155724;
}

body:not(.dark-theme) #chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill.active-exclude,
body:not(.dark-theme) #chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill.active-exclude:hover,
body:not(.dark-theme) #chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill.active-exclude:focus,
body:not(.dark-theme) #chalksta-msg-modal-root .chalksta-msg-list-pane .btn.chalksta-msg-filter-pill.active-exclude:focus-visible {
  background: rgba(227, 24, 55, 0.14);
  border-color: rgba(200, 35, 51, 0.8);
  color: #842029;
}

body.dark-theme #chalksta-msg-modal-root .chalksta-msg-filter-legend {
  border-top-color: rgba(255, 255, 255, 0.1);
}

/* Player DM — thread bubbles */
#chalksta-direct-compose-modal-root .chalksta-dm-recip-list {
  max-height: 10rem;
  overflow-y: auto;
  border-radius: 0.25rem;
  padding: 0.35rem 0.5rem;
}

.chalksta-msg-read-dm-badge {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 0.35rem;
  gap: 0.35rem;
}

/* Web push — bell toggle in modal header */
#chalksta-msg-modal .btn.chalksta-msg-push-bell {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin-left: 0.65rem;
  padding: 0.1rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: transparent;
  color: var(--chmsg-muted, #adb5bd);
  font-family: "Oswald", sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

#chalksta-msg-modal .btn.chalksta-msg-push-bell:hover,
#chalksta-msg-modal .btn.chalksta-msg-push-bell:focus {
  background: rgba(255, 255, 255, 0.08);
  color: var(--chmsg-fg, #f8f9fa);
  box-shadow: none;
}

#chalksta-msg-modal .btn.chalksta-msg-push-bell--on {
  background: rgba(40, 167, 69, 0.3);
  border-color: rgba(72, 210, 100, 0.85);
  color: #d8ffe4;
}

#chalksta-msg-modal .btn.chalksta-msg-push-bell--blocked {
  background: rgba(227, 24, 55, 0.22);
  border-color: rgba(255, 90, 110, 0.7);
  color: #ffd0d8;
}

.chalksta-msg-push-bell-icon {
  font-size: 0.78rem;
  line-height: 1;
}

body:not(.dark-theme) #chalksta-msg-modal .btn.chalksta-msg-push-bell {
  border-color: rgba(0, 0, 0, 0.22);
  color: #5c6570;
}

body:not(.dark-theme) #chalksta-msg-modal .btn.chalksta-msg-push-bell:hover,
body:not(.dark-theme) #chalksta-msg-modal .btn.chalksta-msg-push-bell:focus {
  background: rgba(0, 0, 0, 0.05);
  color: #1d2127;
}

body:not(.dark-theme) #chalksta-msg-modal .btn.chalksta-msg-push-bell--on {
  background: rgba(40, 167, 69, 0.16);
  border-color: rgba(30, 126, 52, 0.7);
  color: #155724;
}

body:not(.dark-theme) #chalksta-msg-modal .btn.chalksta-msg-push-bell--blocked {
  background: rgba(227, 24, 55, 0.1);
  border-color: rgba(200, 35, 51, 0.6);
  color: #842029;
}

/* Web push — discovery nudge in list pane */
#chalksta-msg-modal-root .chalksta-msg-push-nudge {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  background: rgba(40, 167, 69, 0.12);
  border: 1px solid rgba(72, 210, 100, 0.4);
  color: var(--chmsg-fg, #f8f9fa);
  font-size: 0.78rem;
}

#chalksta-msg-modal-root .chalksta-msg-push-nudge.d-none {
  display: none !important;
}

.chalksta-msg-push-nudge-text {
  flex: 1 1 14rem;
  min-width: 0;
}

.chalksta-msg-push-nudge-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
}

body:not(.dark-theme) #chalksta-msg-modal-root .chalksta-msg-push-nudge {
  background: rgba(40, 167, 69, 0.08);
  border-color: rgba(30, 126, 52, 0.4);
  color: #1d2127;
}

body:not(.dark-theme) #chalksta-msg-modal-root .chalksta-msg-push-nudge .btn-outline-light {
  border-color: rgba(0, 0, 0, 0.25);
  color: #1d2127;
}

.chalksta-msg-dm-peer-cell {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-width: 100%;
}

.chalksta-msg-dm-peer-name {
  font-weight: 600;
}

.chalksta-msg-dm-admin-badge {
  display: inline-block;
  padding: 0.08rem 0.42rem;
  font-family: "Oswald", sans-serif;
  font-size: 0.58rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 3px;
  background: rgba(227, 24, 55, 0.14);
  border: 1px solid rgba(227, 24, 55, 0.38);
  color: #c41230;
  white-space: nowrap;
}

body.dark-theme .chalksta-msg-dm-admin-badge {
  background: rgba(255, 143, 163, 0.12);
  border-color: rgba(255, 143, 163, 0.42);
  color: #ff8fa3;
}

#chalksta-msg-modal-root .chalksta-msg-read-pane-toolbar .chalksta-msg-read-heading {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

body:not(.dark-theme) .chalksta-msg-read-dm-badge {
  background: rgba(0, 0, 0, 0.04);
}

.chalksta-msg-dm-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.35rem 0.15rem 0.65rem;
}

.chalksta-msg-dm-bubble-wrap {
  display: flex;
  flex-direction: column;
  max-width: 78%;
}

.chalksta-msg-dm-bubble-wrap--mine {
  align-self: flex-end;
  align-items: flex-end;
}

.chalksta-msg-dm-bubble-wrap--theirs {
  align-self: flex-start;
  align-items: flex-start;
}

.chalksta-msg-dm-bubble {
  position: relative;
  padding: 0.55rem 0.85rem;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.92rem;
  line-height: 1.45;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Rounded rects with a tucked corner — direction hint without a protruding tail */
.chalksta-msg-dm-bubble-wrap--mine .chalksta-msg-dm-bubble {
  background: linear-gradient(180deg, #eb2846 0%, #e31837 100%);
  color: #fff;
  border-radius: 1.125rem 1.125rem 0.3rem 1.125rem;
}

.chalksta-msg-dm-bubble-wrap--theirs .chalksta-msg-dm-bubble {
  background: rgba(255, 255, 255, 0.12);
  color: var(--chmsg-fg, #f8f9fa);
  border-radius: 1.125rem 1.125rem 1.125rem 0.3rem;
}

.chalksta-msg-dm-bubble-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.2rem;
  padding: 0 0.25rem 0.15rem;
  font-size: 0.72rem;
  line-height: 1.35;
}

.chalksta-msg-dm-bubble-time {
  font-size: 0.72rem;
}

.chalksta-msg-dm-bubble-wrap--theirs .chalksta-msg-dm-unread-label {
  color: var(--chmsg-fg, #f8f9fa);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.chalksta-msg-dm-receipt {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.chalksta-msg-dm-receipt-icon {
  font-size: 0.78rem;
  letter-spacing: -0.08em;
  font-weight: 700;
}

/* Receipts sit below bubbles on the pane surface — not on the red bubble fill */
.chalksta-msg-dm-bubble-wrap--mine .chalksta-msg-dm-receipt--sent .chalksta-msg-dm-receipt-icon {
  color: var(--chmsg-muted, #5c6570);
}

.chalksta-msg-dm-bubble-wrap--mine .chalksta-msg-dm-receipt--read .chalksta-msg-dm-receipt-icon {
  color: #e31837;
}

body.dark-theme .chalksta-msg-dm-bubble-wrap--mine .chalksta-msg-dm-receipt--sent .chalksta-msg-dm-receipt-icon {
  color: rgba(232, 234, 237, 0.62);
}

body.dark-theme .chalksta-msg-dm-bubble-wrap--mine .chalksta-msg-dm-receipt--read .chalksta-msg-dm-receipt-icon {
  color: #ff8fa3;
}

body:not(.dark-theme) .chalksta-msg-dm-bubble-wrap--theirs .chalksta-msg-dm-unread-label {
  color: #1d2127;
}

body:not(.dark-theme) .chalksta-msg-dm-bubble-wrap--theirs .chalksta-msg-dm-bubble {
  background: #eceff3;
  color: #1d2127;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

body:not(.dark-theme) .chalksta-msg-read-dm-badge {
  background: rgba(0, 0, 0, 0.04);
}

