/* Chapter Reports — frontend page, reader modal/tab, and reporter notifications */

.cr-wrap{
  max-width: 1040px;
  margin: 0 auto;
  padding: 10px 0 28px;
  direction: rtl;
}

.cr-title{
  margin: 0;
  font-size: 22px;
  font-weight: 1000;
  text-align: center;
}

.cr-titleRow{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cr-titleBadge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,107,111,0.18), rgba(239,68,68,0.16));
  border: 1px solid rgba(239,68,68,0.34);
  color: #ef4444;
  font-size: 13px;
  font-weight: 1000;
  line-height: 1;
  box-shadow: 0 12px 28px rgba(239,68,68,0.12);
}

html[data-theme="day"] .cr-titleBadge,
html[data-theme="paper"] .cr-titleBadge{
  color: #b91c1c;
}

.cr-card,
.cr-group,
.cr-detail__item,
.mmr-report-box,
.tcr-modal__sheet,
.cr-modal__panel,
.tcr-toast,
.tcr-inline-toast{
  background: var(--surface);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow);
}

.cr-card,
.cr-group,
.cr-detail__item,
.mmr-report-box,
.tcr-toast{
  border-radius: 22px;
}

.cr-card,
.cr-group,
.cr-detail__item,
.mmr-report-box{
  padding: 14px;
}

.cr-empty,
.cr-loading,
.cr-muted,
.cr-meta-text,
.cr-group__meta,
.cr-card__sub,
.cr-detail__item-meta,
.mmr-report-box__text,
.mmr-report-box__note,
.tcr-modal__hint{
  color: var(--muted);
}

.cr-grid,
.cr-list,
.cr-detail__list{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 720px){
  .cr-grid{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 980px){
  .cr-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.cr-card--manga{
  appearance: none;
  width: 100%;
  text-align: right;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: inherit;
}

.cr-cover{
  width: 72px;
  height: 96px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--btn-bg);
  border: 1px solid var(--border-3);
}

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

.cr-card__title,
.cr-group__title,
.cr-detail__title,
.tcr-modal__title,
.tcr-toast__title,
.mmr-report-box__title{
  margin: 0;
  font-weight: 1000;
  line-height: 1.3;
  color: var(--text);
}

.cr-card__title{ font-size: 16px; }
.cr-card__sub,
.cr-group__meta,
.cr-detail__item-meta,
.mmr-report-box__text,
.mmr-report-box__note,
.tcr-modal__hint,
.tcr-label{
  font-size: 13px;
  font-weight: 800;
}

.cr-card__sub,
.cr-group__meta,
.mmr-report-box__text,
.mmr-report-box__note,
.tcr-modal__hint{
  margin: 4px 0 0;
}

.cr-card__meta,
.cr-topbar,
.cr-group__actions,
.tcr-actions,
.tcr-login-actions,
.tcr-toast__actions{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.cr-topbar{
  justify-content: space-between;
  margin-bottom: 14px;
}

.cr-topbar__title{
  font-weight: 1000;
  font-size: 18px;
}

.cr-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(92,124,255,0.16);
  border: 1px solid rgba(92,124,255,0.28);
  font-size: 12px;
  font-weight: 1000;
}

.cr-group{
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.cr-group__info{
  min-width: 0;
  flex: 1 1 auto;
}

.cr-group__title{
  font-size: 15px;
}

.cr-group__actions .btn,
.tcr-actions .btn,
.tcr-login-actions .btn,
.tcr-toast__actions .btn{
  width: auto !important;
}

@media (max-width: 640px){
  .cr-group{
    flex-direction: column;
  }

  .cr-group__actions{
    width: 100%;
  }

  .cr-group__actions .btn{
    flex: 1 1 auto;
  }
}

.cr-detail__title{
  font-size: 18px;
  margin-bottom: 12px;
}

.cr-detail__item-title{
  font-weight: 1000;
  margin-bottom: 4px;
}

.cr-detail__item-text{
  color: var(--text);
  font-weight: 700;
  line-height: 1.75;
  white-space: pre-wrap;
}

.cr-modal,
.tcr-modal{
  position: fixed;
  inset: 0;
  z-index: 10000;
}

.cr-modal__backdrop,
.tcr-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.58);
}

.cr-modal__panel,
.tcr-modal__sheet{
  position: relative;
  width: min(860px, calc(100% - 20px));
  margin: 20px auto;
  border-radius: 24px;
  padding: 16px;
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.tcr-modal__sheet{
  width: min(560px, calc(100% - 20px));
}

.tcr-modal__sheet--small{
  width: min(420px, calc(100% - 20px));
}

.cr-modal__close,
.tcr-modal__close{
  position: sticky;
  top: 0;
  left: 0;
  float: left;
  width: auto !important;
  min-width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255,77,77,.45);
  background: rgba(255,77,77,.12);
  color: var(--text);
  font-weight: 1000;
  cursor: pointer;
}

.cr-modal__body,
.tcr-modal__body{
  margin-top: 10px;
}

.tcr-modal__head{
  margin-bottom: 12px;
}

.tcr-field + .tcr-field{
  margin-top: 12px;
}

.tcr-label{
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
}

.tcr-chips{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tcr-chip{
  appearance: none;
  border: 1px solid var(--border-3);
  background: var(--btn-bg);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 900;
  cursor: pointer;
}

.tcr-chip.is-active{
  border-color: rgba(92,124,255,.5);
  background: rgba(92,124,255,.18);
}

.tcr-input,
.tcr-textarea{
  width: 100%;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border-3);
  background: var(--btn-bg);
  color: var(--text);
  direction: rtl;
  text-align: right;
  font-weight: 800;
}

.tcr-input{
  margin-top: 10px;
}

.tcr-textarea{
  min-height: 150px;
  resize: vertical;
  line-height: 1.8;
}

.tcr-actions{
  margin-top: 14px;
}

.tcr-login-box{
  text-align: center;
  padding-top: 8px;
}

.tcr-login-actions{
  justify-content: center;
  margin-top: 14px;
}

.mmr-report-box{
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.mmr-report-box__icon{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,193,7,.14);
  border: 1px solid rgba(255,193,7,.3);
  font-size: 22px;
  flex: 0 0 auto;
}

.mmr-report-box__content{
  min-width: 0;
  flex: 1 1 auto;
}

.mmr-report-box__btn{
  appearance: none;
  margin-top: 12px;
  border: 1px solid rgba(255,193,7,.45);
  background: rgba(255,193,7,.14);
  color: var(--text);
  border-radius: 16px;
  padding: 12px 14px;
  font-weight: 1000;
  cursor: pointer;
}

.tcr-toast,
.tcr-inline-toast{
  position: fixed;
  z-index: 10020;
}

.tcr-toast{
  inset-inline: 12px;
  bottom: 92px;
  margin: 0 auto;
  max-width: 540px;
  padding: 14px;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
}

.tcr-toast__icon{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(80,200,120,.18);
  border: 1px solid rgba(80,200,120,.35);
  font-size: 22px;
}

.tcr-toast__body{ min-width: 0; }
.tcr-toast__text{
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.6;
}

.tcr-toast__actions{
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.tcr-inline-toast{
  right: 12px;
  bottom: 24px;
  max-width: min(420px, calc(100vw - 24px));
  padding: 12px 14px;
  border-radius: 18px;
  font-weight: 900;
  transform: translateY(14px);
  opacity: 0;
  transition: .2s ease;
}

.tcr-inline-toast.is-visible{
  transform: translateY(0);
  opacity: 1;
}

.tcr-inline-toast.is-ok{
  border-color: rgba(80,200,120,.35);
}

.tcr-inline-toast.is-err{
  border-color: rgba(255,77,77,.35);
}

@media (max-width: 560px){
  .cr-modal__panel,
  .tcr-modal__sheet{
    margin: 12px auto;
    max-height: calc(100vh - 24px);
    width: calc(100% - 16px);
    border-radius: 20px;
  }

  .mmr-report-box{
    flex-direction: column;
  }

  .tcr-toast{
    bottom: 82px;
  }
}

/* =========================================================
   v2 hotfixes: strong day/night button contrast + strict RTL
   ========================================================= */

/* Keep all chapter-report UI in RTL and aligned to the right */
.cr-wrap,
.cr-card,
.cr-group,
.cr-detail__item,
.cr-modal,
.cr-modal__panel,
.cr-modal__body,
.tcr-modal,
.tcr-modal__sheet,
.tcr-modal__head,
.tcr-modal__body,
.tcr-field,
.tcr-login-box,
.tcr-inline-toast,
.tcr-toast,
.mmr-report-box{
  direction: rtl;
  text-align: right;
}

.cr-group__actions,
.tcr-actions,
.tcr-login-actions,
.tcr-toast__actions,
.cr-card__meta,
.cr-topbar{
  direction: rtl;
}

/* Strong button readability inside reports feature only */
.cr-wrap .btn,
.cr-modal .btn,
.tcr-modal .btn,
.tcr-toast .btn,
.tcr-inline-toast .btn,
.mmr-report-box__btn,
.tcr-chip,
.cr-card--manga,
.cr-modal__close,
.tcr-modal__close{
  color: var(--text) !important;
}

html[data-theme="day"] .cr-wrap .btn,
html[data-theme="paper"] .cr-wrap .btn,
html[data-theme="day"] .cr-modal .btn,
html[data-theme="paper"] .cr-modal .btn,
html[data-theme="day"] .tcr-modal .btn,
html[data-theme="paper"] .tcr-modal .btn,
html[data-theme="day"] .tcr-toast .btn,
html[data-theme="paper"] .tcr-toast .btn,
html[data-theme="day"] .mmr-report-box__btn,
html[data-theme="paper"] .mmr-report-box__btn,
html[data-theme="day"] .tcr-chip,
html[data-theme="paper"] .tcr-chip,
html[data-theme="day"] .cr-card--manga,
html[data-theme="paper"] .cr-card--manga,
html[data-theme="day"] .cr-modal__close,
html[data-theme="paper"] .cr-modal__close,
html[data-theme="day"] .tcr-modal__close,
html[data-theme="paper"] .tcr-modal__close{
  color: #111 !important;
}

html:not([data-theme="day"]):not([data-theme="paper"]) .cr-wrap .btn,
html:not([data-theme="day"]):not([data-theme="paper"]) .cr-modal .btn,
html:not([data-theme="day"]):not([data-theme="paper"]) .tcr-modal .btn,
html:not([data-theme="day"]):not([data-theme="paper"]) .tcr-toast .btn,
html:not([data-theme="day"]):not([data-theme="paper"]) .mmr-report-box__btn,
html:not([data-theme="day"]):not([data-theme="paper"]) .tcr-chip,
html:not([data-theme="day"]):not([data-theme="paper"]) .cr-card--manga,
html:not([data-theme="day"]):not([data-theme="paper"]) .cr-modal__close,
html:not([data-theme="day"]):not([data-theme="paper"]) .tcr-modal__close{
  color: #fff !important;
}

/* Define outline buttons explicitly so they do not inherit faint styles */
.cr-wrap .btn.btn--outline,
.cr-modal .btn.btn--outline,
.tcr-modal .btn.btn--outline,
.tcr-toast .btn.btn--outline{
  background: var(--btn-bg) !important;
  border-color: var(--border-strong, var(--border-3)) !important;
}

html[data-theme="day"] .cr-wrap .btn,
html[data-theme="paper"] .cr-wrap .btn,
html[data-theme="day"] .cr-modal .btn,
html[data-theme="paper"] .cr-modal .btn,
html[data-theme="day"] .tcr-modal .btn,
html[data-theme="paper"] .tcr-modal .btn,
html[data-theme="day"] .tcr-toast .btn,
html[data-theme="paper"] .tcr-toast .btn,
html[data-theme="day"] .mmr-report-box__btn,
html[data-theme="paper"] .mmr-report-box__btn,
html[data-theme="day"] .tcr-chip,
html[data-theme="paper"] .tcr-chip,
html[data-theme="day"] .cr-card--manga{
  background: rgba(0,0,0,0.04) !important;
  border-color: rgba(0,0,0,0.18) !important;
}

html:not([data-theme="day"]):not([data-theme="paper"]) .cr-wrap .btn,
html:not([data-theme="day"]):not([data-theme="paper"]) .cr-modal .btn,
html:not([data-theme="day"]):not([data-theme="paper"]) .tcr-modal .btn,
html:not([data-theme="day"]):not([data-theme="paper"]) .tcr-toast .btn,
html:not([data-theme="day"]):not([data-theme="paper"]) .mmr-report-box__btn,
html:not([data-theme="day"]):not([data-theme="paper"]) .tcr-chip,
html:not([data-theme="day"]):not([data-theme="paper"]) .cr-card--manga{
  background: rgba(255,255,255,0.05) !important;
  border-color: rgba(255,255,255,0.20) !important;
}

/* Keep primary CTA readable in both modes */
.cr-wrap .btn.btn--primary,
.cr-modal .btn.btn--primary,
.tcr-modal .btn.btn--primary,
.tcr-toast .btn.btn--primary{
  background: rgba(92,124,255,0.18) !important;
  border-color: rgba(92,124,255,0.32) !important;
}

/* Layout: action rows should begin from the right in RTL */
.cr-group__actions,
.tcr-actions,
.tcr-login-actions,
.tcr-toast__actions{
  justify-content: flex-start;
}

/* Reporter notification: text on the right, check icon on the left */
.tcr-toast{
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
}

.tcr-toast__body{
  order: 1;
  flex: 1 1 220px;
  min-width: 0;
  text-align: right;
}

.tcr-toast__icon{
  order: 2;
  flex: 0 0 42px;
}

.tcr-toast__actions{
  order: 3;
  width: 100%;
  margin-top: 2px;
}

.tcr-toast__title,
.tcr-toast__text,
.tcr-modal__title,
.tcr-modal__hint,
.tcr-label,
.mmr-report-box__title,
.mmr-report-box__text,
.mmr-report-box__note,
.cr-topbar__title,
.cr-group__title,
.cr-group__meta,
.cr-card__title,
.cr-card__sub,
.cr-detail__title,
.cr-detail__item-title,
.cr-detail__item-text{
  text-align: right;
}

.tcr-inline-toast{
  left: auto;
  right: 12px;
  text-align: right;
}

/* On small screens, keep buttons visible and stacked cleanly */
@media (max-width: 560px){
  .tcr-actions .btn,
  .tcr-login-actions .btn,
  .tcr-toast__actions .btn,
  .cr-group__actions .btn{
    flex: 1 1 100%;
  }
}

/* =========================================================
   v3 polish: modern rounded buttons for reports UI
   ========================================================= */

.cr-wrap,
.cr-modal,
.tcr-modal,
.tcr-toast,
.tcr-inline-toast,
.mmr-report-box{
  --cr-btn-radius: 18px;
  --cr-btn-gap: 10px;
}

/* Keep report buttons content-sized by default */
.cr-wrap .btn,
.cr-modal .btn,
.tcr-modal .btn,
.tcr-toast .btn,
.tcr-inline-toast .btn,
.mmr-report-box__btn,
.tcr-chip,
.cr-modal__close,
.tcr-modal__close{
  width: auto !important;
  min-height: 46px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--cr-btn-radius) !important;
  line-height: 1;
  text-decoration: none;
  box-shadow:
    0 10px 22px rgba(0,0,0,0.16),
    inset 0 1px 0 rgba(255,255,255,0.06);
  transition:
    transform .16s ease,
    box-shadow .16s ease,
    border-color .16s ease,
    background-color .16s ease,
    opacity .16s ease;
  -webkit-tap-highlight-color: transparent;
}

.cr-wrap .btn:hover,
.cr-modal .btn:hover,
.tcr-modal .btn:hover,
.tcr-toast .btn:hover,
.tcr-inline-toast .btn:hover,
.mmr-report-box__btn:hover,
.tcr-chip:hover,
.cr-modal__close:hover,
.tcr-modal__close:hover{
  transform: translateY(-1px);
  box-shadow:
    0 14px 28px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

.cr-wrap .btn:active,
.cr-modal .btn:active,
.tcr-modal .btn:active,
.tcr-toast .btn:active,
.tcr-inline-toast .btn:active,
.mmr-report-box__btn:active,
.tcr-chip:active,
.cr-modal__close:active,
.tcr-modal__close:active{
  transform: translateY(0);
  box-shadow:
    0 8px 16px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

.cr-wrap .btn:focus-visible,
.cr-modal .btn:focus-visible,
.tcr-modal .btn:focus-visible,
.tcr-toast .btn:focus-visible,
.tcr-inline-toast .btn:focus-visible,
.mmr-report-box__btn:focus-visible,
.tcr-chip:focus-visible,
.cr-modal__close:focus-visible,
.tcr-modal__close:focus-visible{
  outline: none;
  box-shadow:
    0 0 0 2px rgba(92,124,255,0.18),
    0 0 0 5px rgba(92,124,255,0.10),
    0 14px 28px rgba(0,0,0,0.22);
}

.cr-wrap .btn[disabled],
.cr-modal .btn[disabled],
.tcr-modal .btn[disabled],
.tcr-toast .btn[disabled],
.tcr-inline-toast .btn[disabled],
.mmr-report-box__btn[disabled]{
  opacity: .58;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Better action row spacing so buttons feel like chips, not blocks */
.cr-topbar,
.cr-group__actions,
.tcr-actions,
.tcr-login-actions,
.tcr-toast__actions{
  gap: var(--cr-btn-gap);
}

.cr-topbar .btn{
  min-width: 120px;
}

.cr-group__actions .btn,
.tcr-actions .btn,
.tcr-login-actions .btn,
.tcr-toast__actions .btn{
  flex: 0 0 auto;
}

/* Softer modern surfaces in day mode */
html[data-theme="day"] .cr-wrap .btn,
html[data-theme="paper"] .cr-wrap .btn,
html[data-theme="day"] .cr-modal .btn,
html[data-theme="paper"] .cr-modal .btn,
html[data-theme="day"] .tcr-modal .btn,
html[data-theme="paper"] .tcr-modal .btn,
html[data-theme="day"] .tcr-toast .btn,
html[data-theme="paper"] .tcr-toast .btn,
html[data-theme="day"] .tcr-inline-toast .btn,
html[data-theme="paper"] .tcr-inline-toast .btn,
html[data-theme="day"] .mmr-report-box__btn,
html[data-theme="paper"] .mmr-report-box__btn,
html[data-theme="day"] .tcr-chip,
html[data-theme="paper"] .tcr-chip,
html[data-theme="day"] .cr-modal__close,
html[data-theme="paper"] .cr-modal__close,
html[data-theme="day"] .tcr-modal__close,
html[data-theme="paper"] .tcr-modal__close{
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(245,247,251,0.92)) !important;
  border-color: rgba(17,17,17,0.12) !important;
  box-shadow:
    0 10px 20px rgba(15,23,42,0.10),
    inset 0 1px 0 rgba(255,255,255,0.85);
}

html[data-theme="day"] .cr-wrap .btn:hover,
html[data-theme="paper"] .cr-wrap .btn:hover,
html[data-theme="day"] .cr-modal .btn:hover,
html[data-theme="paper"] .cr-modal .btn:hover,
html[data-theme="day"] .tcr-modal .btn:hover,
html[data-theme="paper"] .tcr-modal .btn:hover,
html[data-theme="day"] .tcr-toast .btn:hover,
html[data-theme="paper"] .tcr-toast .btn:hover,
html[data-theme="day"] .tcr-inline-toast .btn:hover,
html[data-theme="paper"] .tcr-inline-toast .btn:hover,
html[data-theme="day"] .mmr-report-box__btn:hover,
html[data-theme="paper"] .mmr-report-box__btn:hover,
html[data-theme="day"] .tcr-chip:hover,
html[data-theme="paper"] .tcr-chip:hover{
  background: linear-gradient(180deg, rgba(255,255,255,1), rgba(240,244,249,0.98)) !important;
}

/* Modern glassy buttons in dark mode */
html:not([data-theme="day"]):not([data-theme="paper"]) .cr-wrap .btn,
html:not([data-theme="day"]):not([data-theme="paper"]) .cr-modal .btn,
html:not([data-theme="day"]):not([data-theme="paper"]) .tcr-modal .btn,
html:not([data-theme="day"]):not([data-theme="paper"]) .tcr-toast .btn,
html:not([data-theme="day"]):not([data-theme="paper"]) .tcr-inline-toast .btn,
html:not([data-theme="day"]):not([data-theme="paper"]) .mmr-report-box__btn,
html:not([data-theme="day"]):not([data-theme="paper"]) .tcr-chip,
html:not([data-theme="day"]):not([data-theme="paper"]) .cr-modal__close,
html:not([data-theme="day"]):not([data-theme="paper"]) .tcr-modal__close{
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.045)) !important;
  border-color: rgba(255,255,255,0.14) !important;
  box-shadow:
    0 12px 24px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

html:not([data-theme="day"]):not([data-theme="paper"]) .cr-wrap .btn:hover,
html:not([data-theme="day"]):not([data-theme="paper"]) .cr-modal .btn:hover,
html:not([data-theme="day"]):not([data-theme="paper"]) .tcr-modal .btn:hover,
html:not([data-theme="day"]):not([data-theme="paper"]) .tcr-toast .btn:hover,
html:not([data-theme="day"]):not([data-theme="paper"]) .tcr-inline-toast .btn:hover,
html:not([data-theme="day"]):not([data-theme="paper"]) .mmr-report-box__btn:hover,
html:not([data-theme="day"]):not([data-theme="paper"]) .tcr-chip:hover{
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.07)) !important;
  border-color: rgba(255,255,255,0.22) !important;
}

/* Distinct primary / danger accents without reverting to ugly hard rectangles */
.cr-wrap .btn.btn--primary,
.cr-modal .btn.btn--primary,
.tcr-modal .btn.btn--primary,
.tcr-toast .btn.btn--primary,
.tcr-inline-toast .btn.btn--primary,
.mmr-report-box__btn{
  border-color: rgba(92,124,255,0.34) !important;
  background: linear-gradient(180deg, rgba(92,124,255,0.28), rgba(92,124,255,0.18)) !important;
}

.cr-wrap .btn.btn--primary:hover,
.cr-modal .btn.btn--primary:hover,
.tcr-modal .btn.btn--primary:hover,
.tcr-toast .btn.btn--primary:hover,
.tcr-inline-toast .btn.btn--primary:hover,
.mmr-report-box__btn:hover{
  background: linear-gradient(180deg, rgba(92,124,255,0.34), rgba(92,124,255,0.24)) !important;
  border-color: rgba(92,124,255,0.42) !important;
}

.cr-wrap .btn.btn--danger,
.cr-modal .btn.btn--danger,
.tcr-modal .btn.btn--danger,
.tcr-toast .btn.btn--danger,
.tcr-inline-toast .btn.btn--danger{
  border-color: rgba(255,77,77,0.34) !important;
  background: linear-gradient(180deg, rgba(255,77,77,0.26), rgba(255,77,77,0.16)) !important;
}

.cr-wrap .btn.btn--outline,
.cr-modal .btn.btn--outline,
.tcr-modal .btn.btn--outline,
.tcr-toast .btn.btn--outline,
.tcr-inline-toast .btn.btn--outline{
  background: transparent !important;
}

.tcr-chip{
  border-radius: 999px !important;
  padding-inline: 15px;
}

.tcr-chip.is-active{
  border-color: rgba(92,124,255,.42) !important;
  background: linear-gradient(180deg, rgba(92,124,255,.26), rgba(92,124,255,.16)) !important;
}

.cr-modal__close,
.tcr-modal__close{
  min-width: 46px;
  min-height: 46px;
  padding: 0;
  border-radius: 16px !important;
}

/* Toast action buttons should not span awkward widths */
.tcr-toast__actions{
  align-items: center;
}

@media (max-width: 560px){
  .cr-topbar .btn{
    min-width: 0;
    width: 100% !important;
  }

  .cr-topbar{
    flex-direction: column;
    align-items: stretch;
  }

  .cr-group__actions,
  .tcr-actions,
  .tcr-login-actions,
  .tcr-toast__actions{
    width: 100%;
  }

  .cr-group__actions .btn,
  .tcr-actions .btn,
  .tcr-login-actions .btn,
  .tcr-toast__actions .btn,
  .mmr-report-box__btn{
    width: 100% !important;
    justify-content: center;
  }
}

/* =========================================================
   v4 fixes: selected preset visibility + stronger active state
   ========================================================= */
.tcr-chip.is-active,
.tcr-chip[aria-pressed="true"],
.tcr-chip[data-selected="1"]{
  border-color: rgba(92,124,255,.72) !important;
  background: linear-gradient(180deg, rgba(92,124,255,.34), rgba(92,124,255,.22)) !important;
  box-shadow:
    0 0 0 1px rgba(92,124,255,.28),
    0 12px 22px rgba(32,58,170,.22),
    inset 0 1px 0 rgba(255,255,255,.12) !important;
  transform: translateY(-1px);
}

html[data-theme="day"] .tcr-chip.is-active,
html[data-theme="day"] .tcr-chip[aria-pressed="true"],
html[data-theme="day"] .tcr-chip[data-selected="1"],
html[data-theme="paper"] .tcr-chip.is-active,
html[data-theme="paper"] .tcr-chip[aria-pressed="true"],
html[data-theme="paper"] .tcr-chip[data-selected="1"]{
  color: #111 !important;
}

html:not([data-theme="day"]):not([data-theme="paper"]) .tcr-chip.is-active,
html:not([data-theme="day"]):not([data-theme="paper"]) .tcr-chip[aria-pressed="true"],
html:not([data-theme="day"]):not([data-theme="paper"]) .tcr-chip[data-selected="1"]{
  color: #fff !important;
}


/* =========================================================
   Temporary new-feature hint for reader reports tab
   ========================================================= */
.mmr-tabbtn[data-mmr-tabbtn="warn"].has-tcr-new{
  position: relative;
  overflow: visible;
}

.mmr-tabbtn[data-mmr-tabbtn="warn"].has-tcr-new::before{
  content: "";
  position: absolute;
  top: 7px;
  inset-inline-end: 7px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5b6b;
  box-shadow: 0 0 0 0 rgba(255,91,107,.42);
  animation: tcrReaderHintPulse 1.8s ease-out infinite;
}

.tcr-new-badge{
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,96,112,.96), rgba(230,54,85,.94));
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 14px 30px rgba(172,24,51,.34);
  pointer-events: none;
  z-index: 30;
}

.tcr-new-badge::after{
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 7px 6px 0 6px;
  border-style: solid;
  border-color: rgba(230,54,85,.94) transparent transparent transparent;
}

.tcr-new-badge__dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 6px rgba(255,255,255,.14);
  flex: 0 0 8px;
}

.tcr-new-badge__text{
  display: inline-block;
}

@keyframes tcrReaderHintPulse{
  0% { box-shadow: 0 0 0 0 rgba(255,91,107,.42); }
  70% { box-shadow: 0 0 0 10px rgba(255,91,107,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,91,107,0); }
}

@media (max-width: 560px){
  .tcr-new-badge{
    bottom: calc(100% + 10px);
    font-size: 10px;
    padding: 6px 9px;
  }
}
