/* Rusff Native Notifications v1.4.0-hsr
 * Standalone Honkai: Star Rail presentation layer.
 * Includes the portable modal base plus forum-matched colors and event icons.
 */

/* Root switches: keep the menu link available so settings can be re-enabled. */
html.kj-notifications-all-off .nav-item-notifications .bubble,
html.kj-notifications-all-off #pun-ulinks a[href*="p=notifications"] .bubble {
  display: none !important;
}

html.kj-notifications-popups-off #jGrowl .notify-message,
html.kj-notifications-popups-off .jGrowl .notify-message {
  display: none !important;
}

body.kj-notifications-open {
  overflow: hidden !important;
}

#kj-notifications-modal[hidden] {
  display: none !important;
}

#kj-notifications-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 16px;
  color: #272727;
  font: 14px/1.45 Arial, sans-serif;
}

#kj-notifications-modal .kj-notifications-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .58);
  backdrop-filter: blur(2px);
}

#kj-notifications-modal .kj-notifications-dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto;
  width: calc(100% - 32px);
  max-width: 720px;
  height: auto;
  max-height: calc(100% - 32px);
  overflow: hidden;
  background: #f7f7f7;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .38);
}

#kj-notifications-modal .kj-notifications-header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px 0 18px;
  color: #fff;
  background: #252525;
}

#kj-notifications-modal .kj-notifications-title {
  min-width: 0;
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

#kj-notifications-modal .kj-notifications-count {
  display: none;
  box-sizing: border-box;
  width: 18px;
  min-width: 18px;
  height: 18px;
  padding: 0;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  background: #b74747;
  border-radius: 10px;
}

#kj-notifications-modal .kj-notifications-full {
  margin-left: auto;
  color: #ddd;
  font-size: 12px;
  text-decoration: none;
}

#kj-notifications-modal .kj-notifications-full:hover {
  color: #fff;
  text-decoration: underline;
}

#kj-notifications-modal .kj-notifications-close {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #fff;
  font: 26px/32px Arial, sans-serif;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

#kj-notifications-modal .kj-notifications-close:hover,
#kj-notifications-modal .kj-notifications-close:focus {
  background: rgba(255, 255, 255, .14);
  outline: none;
}

#kj-notifications-modal .kj-notifications-tabs {
  display: flex;
  min-height: 42px;
  padding: 0 14px;
  background: #fff;
  border-bottom: 1px solid #ddd;
}

#kj-notifications-modal .kj-notifications-tab {
  position: relative;
  padding: 0 16px;
  color: #666;
  font: inherit;
  font-weight: 700;
  background: transparent;
  border: 0;
  cursor: pointer;
}

#kj-notifications-modal .kj-notifications-tab.is-active {
  color: #222;
}

#kj-notifications-modal .kj-notifications-tab.is-active::after {
  content: '';
  position: absolute;
  right: 10px;
  bottom: 0;
  left: 10px;
  height: 3px;
  background: #9d3f3f;
  border-radius: 3px 3px 0 0;
}

#kj-notifications-modal .kj-notifications-content {
  position: relative;
  min-height: 0;
  max-height: calc(100vh - 140px);
  overflow: hidden;
  background: #fff;
}

#kj-notifications-modal .kj-notifications-loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777;
  background: #fff;
}

#kj-notifications-modal .kj-notifications-loader[hidden] {
  display: none !important;
}

#kj-notifications-modal iframe {
  display: block;
  width: 100%;
  height: 180px;
  max-height: calc(100vh - 140px);
  background: #fff;
  border: 0;
}

/* This same-origin helper carries the account's native e-mail preference. */
#kj-notifications-modal .kj-notifications-email-frame {
  display: none !important;
}

/* The iframe loads the same stylesheet; these rules turn the native page into content. */
body.kj-notifications-embedded {
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0 !important;
  color: #292929 !important;
  background: #fff !important;
  font: 14px/1.45 Arial, sans-serif !important;
}

body.kj-notifications-embedded > div:not(#pun_wrap),
body.kj-notifications-embedded > iframe,
body.kj-notifications-embedded .caramel-fadeInBox {
  display: none !important;
}

body.kj-notifications-embedded #pun_wrap,
body.kj-notifications-embedded #pun {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #fff !important;
}

body.kj-notifications-embedded #pun-title,
body.kj-notifications-embedded #pun-navlinks,
body.kj-notifications-embedded #pun-status,
body.kj-notifications-embedded #pun-ulinks,
body.kj-notifications-embedded #pun-crumbs1,
body.kj-notifications-embedded #pun-crumbs2,
body.kj-notifications-embedded #pun-footer,
body.kj-notifications-embedded #pun-about,
body.kj-notifications-embedded #pun-break1,
body.kj-notifications-embedded #pun-break2,
body.kj-notifications-embedded #pun-break3,
body.kj-notifications-embedded #pun-break4,
body.kj-notifications-embedded #profilenav,
body.kj-notifications-embedded #pun-main h1,
body.kj-notifications-embedded #MyBookmarks,
body.kj-notifications-embedded #html-header,
body.kj-notifications-embedded #html-footer,
body.kj-notifications-embedded .linkst,
body.kj-notifications-embedded .crumbs,
body.kj-notifications-embedded .modmenu {
  display: none !important;
}

body.kj-notifications-embedded #pun-main,
body.kj-notifications-embedded #profile {
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  background: #fff !important;
}

body.kj-notifications-embedded #profile > .container,
body.kj-notifications-embedded #profile .container {
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #fff !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.kj-notifications-embedded #profileContainer {
  box-sizing: border-box !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 14px 16px 22px !important;
  background: #fff !important;
}

body.kj-notifications-embedded #profileContainer fieldset {
  box-sizing: border-box !important;
  margin: 0 0 14px !important;
  padding: 0 !important;
  background: #fff !important;
  border: 1px solid #ddd !important;
  border-radius: 8px !important;
}

body.kj-notifications-embedded #profileContainer fieldset legend {
  box-sizing: border-box !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 11px 14px !important;
  color: #222 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  background: #f4f4f4 !important;
  border-bottom: 1px solid #ddd !important;
  border-radius: 8px 8px 0 0 !important;
}

body.kj-notifications-embedded #profileContainer .fs-box {
  box-sizing: border-box !important;
  padding: 12px 14px !important;
}

body.kj-notifications-embedded #profileContainer .infofield {
  margin: 0 0 12px !important;
  padding: 9px 11px !important;
  color: #666 !important;
  background: #f7f7f7 !important;
  border-radius: 6px !important;
}

body.kj-notifications-embedded #profileContainer .checkfield {
  display: flex !important;
  align-items: flex-start !important;
  gap: 9px !important;
  margin: 0 !important;
  padding: 10px 2px !important;
  border-bottom: 1px solid #eee !important;
}

body.kj-notifications-embedded #profileContainer .checkfield:last-of-type {
  border-bottom: 0 !important;
}

body.kj-notifications-embedded #profileContainer .checkfield .input {
  flex: 0 0 auto !important;
}

body.kj-notifications-embedded #profileContainer .checkfield label {
  cursor: pointer !important;
}

body.kj-notifications-embedded #profileContainer .formsubmit {
  margin: 12px 0 0 !important;
  padding: 0 !important;
}

body.kj-notifications-embedded #profileContainer input.button {
  padding: 7px 13px !important;
  cursor: pointer !important;
}

body.kj-notifications-embedded #profileContainer a {
  color: #9d3f3f !important;
}

body.kj-notifications-history .kj-notify-settings,
body.kj-notifications-history .kj-notify-telegram {
  display: none !important;
}

body.kj-notifications-settings .kj-notify-history {
  display: none !important;
}

/* Custom switches are deliberately styled like the native settings rows. */
.kj-custom-notification-settings {
  margin: 0 0 14px;
  border-bottom: 1px solid #ddd;
}

.kj-custom-notification-settings h3 {
  margin: 0;
  padding: 0 2px 8px;
  color: #222;
  font-size: 14px;
}

.kj-custom-setting-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0;
  padding: 9px 2px;
  border-top: 1px solid #eee;
  cursor: pointer;
}

.kj-custom-setting-input {
  flex: 0 0 auto;
  margin-top: 2px;
}

.kj-custom-setting-copy {
  display: block;
  min-width: 0;
}

.kj-custom-setting-copy strong,
.kj-custom-setting-copy small {
  display: block;
}

.kj-custom-setting-copy small {
  margin-top: 2px;
  color: #777;
  font-size: 12px;
  line-height: 1.35;
}

.kj-custom-notification-settings.is-disabled .kj-custom-setting-row:not(:first-of-type) {
  opacity: .55;
}

body.kj-notifications-embedded #profileContainer .checkfield.kj-native-reputation-setting {
  display: none !important;
}

/* Native and custom events share one direct-child list and one visual rhythm. */
#profileContainer .kj-notify-history .fs-box > .kj-notify-card {
  position: relative !important;
  margin: 0 !important;
  padding: 12px 8px 12px 12px !important;
  border-bottom: 1px solid #ececec !important;
}

#profileContainer .kj-subscription-notification {
  cursor: pointer !important;
}

#profileContainer .kj-subscription-notification:hover {
  background: #f6f6f6 !important;
}

.kj-subscription-notification-icon {
  background: #197c78 !important;
}

.kj-subscription-notification.is-read .kj-subscription-notification-icon {
  background: #b8b8b8;
}

/* Fallback polish for jGrowl subscription cards. */
#jGrowl .kj-subscription-toast .kj-subscription-popup-content,
.jGrowl .kj-subscription-toast .kj-subscription-popup-content {
  display: block;
  color: inherit;
  text-decoration: none;
}

#jGrowl .kj-subscription-toast .kj-subscription-popup-content span,
.jGrowl .kj-subscription-toast .kj-subscription-popup-content strong {
  display: block;
}

@media (max-width: 640px) {
  #kj-notifications-modal {
    padding: 0;
  }

  #kj-notifications-modal .kj-notifications-dialog {
    width: 100%;
    height: auto;
    max-height: 100%;
    border: 0;
    border-radius: 0;
  }

  #kj-notifications-modal .kj-notifications-full {
    display: none;
  }

  #kj-notifications-modal .kj-notifications-tabs {
    padding: 0 6px;
  }

  #kj-notifications-modal .kj-notifications-tab {
    flex: 1 1 50%;
    padding: 0 6px;
  }

  body.kj-notifications-embedded #profileContainer {
    padding: 10px 8px 18px !important;
  }

  body.kj-notifications-embedded #profileContainer fieldset {
    border-radius: 6px !important;
  }

  body.kj-notifications-embedded #profileContainer .fs-box {
    padding: 10px !important;
  }
}

/* --------------------------------------------------------------------------
 * Honkai: Star Rail theme
 * The palette and corner geometry mirror the forum's navy/gold navigation and
 * warm paper content area. Event colors are accents; the glyph identifies the
 * event even when color perception is limited.
 * -------------------------------------------------------------------------- */

#kj-notifications-modal {
  --hsr-night: #021121;
  --hsr-ink: #07081c;
  --hsr-navy: #1c2035;
  --hsr-blue: #272e46;
  --hsr-blue-light: #323b65;
  --hsr-gold: #ffcf70;
  --hsr-gold-dark: #e0b86a;
  --hsr-paper: #d3cabb;
  --hsr-paper-light: #dadada;
  color: var(--hsr-ink);
  font-family: "DIN Pro", Arial, Helvetica, sans-serif;
}

#kj-notifications-modal .kj-notifications-backdrop {
  background:
    radial-gradient(circle at 14% 20%, rgba(200, 200, 255, .15) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 30%, rgba(255, 207, 112, .18) 0 1px, transparent 2px),
    radial-gradient(circle at 66% 78%, rgba(200, 200, 255, .12) 0 1px, transparent 2px),
    rgba(2, 17, 33, .82);
  background-size: 190px 190px, 260px 260px, 230px 230px, auto;
  backdrop-filter: blur(4px);
}

#kj-notifications-modal .kj-notifications-dialog {
  max-width: 760px;
  background: var(--hsr-paper);
  border: 1px solid var(--hsr-gold);
  border-radius: 20px 0;
  box-shadow:
    0 28px 80px rgba(2, 17, 33, .62),
    inset 0 0 0 1px rgba(255, 207, 112, .14);
}

#kj-notifications-modal .kj-notifications-dialog::before,
#kj-notifications-modal .kj-notifications-dialog::after {
  position: absolute;
  z-index: 4;
  width: 34px;
  height: 34px;
  pointer-events: none;
  content: "";
}

#kj-notifications-modal .kj-notifications-dialog::before {
  top: 7px;
  left: 7px;
  border-top: 1px solid var(--hsr-gold);
  border-left: 1px solid var(--hsr-gold);
  border-radius: 12px 0 0;
}

#kj-notifications-modal .kj-notifications-dialog::after {
  right: 7px;
  bottom: 7px;
  border-right: 1px solid var(--hsr-gold);
  border-bottom: 1px solid var(--hsr-gold);
}

#kj-notifications-modal .kj-notifications-header {
  min-height: 52px;
  padding: 0 16px 0 22px;
  color: var(--hsr-gold);
  background:
    linear-gradient(105deg, rgba(255, 255, 255, .025), transparent 38%),
    linear-gradient(135deg, var(--hsr-navy), var(--hsr-blue-light));
  border-bottom: 1px solid rgba(255, 207, 112, .72);
}

#kj-notifications-modal .kj-notifications-title {
  color: var(--hsr-gold);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .075em;
  text-transform: uppercase;
}

#kj-notifications-modal .kj-notifications-title::before {
  margin-right: 9px;
  color: #fff;
  content: "\2726";
}

#kj-notifications-modal .kj-notifications-count,
.nav-item-notifications .bubble,
#pun-ulinks a[href*="p=notifications"] .bubble {
  box-sizing: border-box;
  width: 18px;
  min-width: 18px;
  height: 18px;
  padding: 0;
  color: #fff !important;
  line-height: 18px;
  background: #a33333 !important;
  border: 1px solid var(--hsr-gold, #ffcf70);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 207, 112, .35);
}

/* jQuery's show() restores the native bubble as an inline element, so width
 * and height would be ignored and the counter would become oval. The script
 * adds these state classes only while the corresponding counter is visible. */
#kj-notifications-modal .kj-notifications-count.is-visible,
.nav-item-notifications .bubble.kj-notifications-bubble-visible,
#pun-ulinks a[href*="p=notifications"] .bubble.kj-notifications-bubble-visible {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  line-height: 1 !important;
  vertical-align: middle;
}

#kj-notifications-modal .kj-notifications-full {
  color: #c0ba9d;
  font-size: 11px;
  letter-spacing: .035em;
  text-transform: uppercase;
}

#kj-notifications-modal .kj-notifications-full:hover,
#kj-notifications-modal .kj-notifications-full:focus {
  color: var(--hsr-gold);
}

#kj-notifications-modal .kj-notifications-close {
  color: var(--hsr-gold);
}

#kj-notifications-modal .kj-notifications-close:hover,
#kj-notifications-modal .kj-notifications-close:focus {
  color: #fff;
  background: rgba(255, 207, 112, .12);
}

#kj-notifications-modal .kj-notifications-tabs {
  min-height: 44px;
  background: var(--hsr-navy);
  border-bottom: 1px solid rgba(255, 207, 112, .42);
}

#kj-notifications-modal .kj-notifications-tab {
  color: #c0ba9d;
  font-family: "DIN Pro", Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
}

#kj-notifications-modal .kj-notifications-tab:hover,
#kj-notifications-modal .kj-notifications-tab:focus,
#kj-notifications-modal .kj-notifications-tab.is-active {
  color: var(--hsr-gold);
  outline: none;
}

#kj-notifications-modal .kj-notifications-tab.is-active::after {
  right: 14px;
  left: 14px;
  height: 2px;
  background: var(--hsr-gold);
  box-shadow: 0 0 8px rgba(255, 207, 112, .55);
}

#kj-notifications-modal .kj-notifications-content,
#kj-notifications-modal .kj-notifications-loader,
#kj-notifications-modal iframe {
  background: var(--hsr-paper);
}

#kj-notifications-modal .kj-notifications-loader {
  color: var(--hsr-blue);
  letter-spacing: .04em;
}

body.kj-notifications-embedded {
  --hsr-ink: #07081c;
  --hsr-navy: #1c2035;
  --hsr-blue: #272e46;
  --hsr-blue-light: #323b65;
  --hsr-gold: #ffcf70;
  --hsr-gold-dark: #e0b86a;
  --hsr-paper: #d3cabb;
  --hsr-paper-light: #dadada;
  color: var(--hsr-ink) !important;
  background: var(--hsr-paper) !important;
  font: 13px/1.45 "DIN Pro", Arial, Helvetica, sans-serif !important;
}

body.kj-notifications-embedded #pun_wrap,
body.kj-notifications-embedded #pun,
body.kj-notifications-embedded #pun-main,
body.kj-notifications-embedded #profile,
body.kj-notifications-embedded #profile > .container,
body.kj-notifications-embedded #profile .container,
body.kj-notifications-embedded #profileContainer {
  color: var(--hsr-ink) !important;
  background: var(--hsr-paper) !important;
  font-family: "DIN Pro", Arial, Helvetica, sans-serif !important;
}

body.kj-notifications-embedded #profileContainer {
  padding: 16px 18px 22px !important;
}

/* The regular HSR profile layout reserves large space for the decorative
 * header and footer. Inside the modal those offsets must not survive. */
body.kj-notifications-embedded #pun-profile {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: var(--hsr-paper) !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.kj-notifications-embedded #profileContainer fieldset {
  margin: 0 0 14px !important;
  overflow: hidden;
  background: rgba(255, 255, 255, .12) !important;
  border: 1px solid rgba(191, 157, 100, .7) !important;
  border-radius: 14px 0 !important;
  box-shadow: 0 7px 20px rgba(28, 32, 53, .08) !important;
}

/* The modal title and tabs already provide the page hierarchy. Flatten the
 * first native fieldset so "Notifications / History / Notification history"
 * does not look like three nested windows. Telegram remains its own section. */
body.kj-notifications-embedded #profileContainer fieldset.kj-notify-history,
body.kj-notifications-embedded #profileContainer fieldset.kj-notify-settings {
  margin: 0 !important;
  overflow: visible;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.kj-notifications-embedded #profileContainer fieldset.kj-notify-history > legend,
body.kj-notifications-embedded #profileContainer fieldset.kj-notify-settings > legend {
  display: none !important;
}

body.kj-notifications-embedded #profileContainer fieldset.kj-notify-history > .fs-box,
body.kj-notifications-embedded #profileContainer fieldset.kj-notify-settings > .fs-box {
  padding: 0 !important;
}

/* Give the save action breathing room before the separate Telegram section. */
body.kj-notifications-embedded #profileContainer fieldset.kj-notify-settings .formsubmit {
  margin-bottom: 20px !important;
}

body.kj-notifications-embedded #profileContainer fieldset legend,
body.kj-notifications-embedded #profileContainer fieldset legend span {
  padding: 10px 14px !important;
  color: var(--hsr-gold) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: .065em;
  text-transform: uppercase;
  background: linear-gradient(100deg, var(--hsr-blue-light), var(--hsr-navy)) !important;
  border-bottom: 1px solid rgba(255, 207, 112, .52) !important;
  border-radius: 13px 0 0 !important;
}

body.kj-notifications-embedded #profileContainer fieldset legend span {
  display: block;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

body.kj-notifications-embedded #profileContainer .fs-box {
  padding: 12px 14px !important;
}

body.kj-notifications-embedded #profileContainer .infofield {
  margin: 0 0 10px !important;
  padding: 9px 11px !important;
  color: #343a4c !important;
  background: rgba(255, 255, 255, .27) !important;
  border-left: 3px solid var(--hsr-gold-dark);
  border-radius: 0 7px 7px 0 !important;
}

body.kj-notifications-embedded #profileContainer .checkfield,
body.kj-notifications-embedded .kj-custom-setting-row {
  border-color: rgba(109, 84, 39, .18) !important;
}

body.kj-notifications-embedded #profileContainer .checkfield:hover,
body.kj-notifications-embedded .kj-custom-setting-row:hover {
  background: rgba(255, 255, 255, .18) !important;
}

body.kj-notifications-embedded input[type="checkbox"] {
  accent-color: var(--hsr-blue-light);
}

body.kj-notifications-embedded #profileContainer input.button {
  padding: 7px 14px !important;
  color: #e1c07f !important;
  font: 500 11px "DIN Pro", Arial, sans-serif !important;
  letter-spacing: .045em;
  text-transform: uppercase;
  background: var(--hsr-blue-light) !important;
  border: 1px solid rgba(255, 207, 112, .68) !important;
  border-radius: 7px !important;
  box-shadow: none !important;
}

body.kj-notifications-embedded #profileContainer input.button:hover,
body.kj-notifications-embedded #profileContainer input.button:focus {
  color: #fff !important;
  background: var(--hsr-navy) !important;
}

body.kj-notifications-embedded #profileContainer a {
  color: var(--hsr-blue-light) !important;
  font-weight: 600;
  text-decoration-color: rgba(50, 59, 101, .38);
}

body.kj-notifications-embedded #profileContainer a:hover {
  color: #6d5427 !important;
}

body.kj-notifications-embedded .kj-custom-notification-settings {
  margin-bottom: 12px;
  border-color: rgba(109, 84, 39, .22);
}

body.kj-notifications-embedded .kj-custom-notification-settings h3 {
  padding: 8px 10px;
  color: var(--hsr-gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .055em;
  text-transform: uppercase;
  background: var(--hsr-blue);
  border-radius: 8px 0;
}

body.kj-notifications-embedded .kj-custom-setting-copy small {
  color: #666;
}

/* Unified event cards. The icon and the left wash both follow --event-color. */
body.kj-notifications-embedded #profileContainer .kj-notify-history .fs-box > p.kj-notify-card {
  --event-color: #8fa7c2;
  --event-wash: rgba(143, 167, 194, .12);
  box-sizing: border-box !important;
  min-height: 58px;
  padding: 12px 14px 12px 58px !important;
  color: var(--hsr-ink) !important;
  line-height: 1.45;
  background: linear-gradient(90deg, var(--event-wash), transparent 62%) !important;
  border-bottom: 1px solid rgba(109, 84, 39, .16) !important;
}

body.kj-notifications-embedded #profileContainer .kj-notify-history .fs-box > p.kj-notify-card:hover {
  background: linear-gradient(90deg, var(--event-wash), rgba(255, 255, 255, .16)) !important;
}

body.kj-notifications-embedded .kj-notify-card > span[class^="p-"],
body.kj-notifications-embedded .kj-notify-card > span[class*=" p-"] {
  position: absolute;
  top: 12px;
  left: 13px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 32px !important;
  height: 32px !important;
  color: var(--event-color) !important;
  font-size: 0 !important;
  background: rgba(28, 32, 53, .94) !important;
  border: 1px solid var(--event-color) !important;
  border-radius: 50% 0 50% 50% !important;
  box-shadow: 0 0 10px color-mix(in srgb, var(--event-color) 32%, transparent);
}

body.kj-notifications-embedded .kj-notify-card > span[class^="p-"]::before,
body.kj-notifications-embedded .kj-notify-card > span[class*=" p-"]::before {
  font: 900 14px/1 "Font Awesome 6 Pro", "Font Awesome 6 Free", Arial, sans-serif;
  content: "\f0f3";
}

body.kj-notifications-embedded .kj-notify-card:has(> .p-mention) {
  --event-color: #67c7e8 !important;
  --event-wash: rgba(103, 199, 232, .15) !important;
}

body.kj-notifications-embedded .kj-notify-card:has(> .p-message) {
  --event-color: #aa9cf1 !important;
  --event-wash: rgba(170, 156, 241, .15) !important;
}

body.kj-notifications-embedded .kj-notify-card:has(> .p-award) {
  --event-color: #ffc85f !important;
  --event-wash: rgba(255, 200, 95, .17) !important;
}

body.kj-notifications-embedded .kj-notify-card:has(> .p-reputation) {
  --event-color: #e58aaf !important;
  --event-wash: rgba(229, 138, 175, .14) !important;
}

body.kj-notifications-embedded .kj-notify-card:has(> .p-report) {
  --event-color: #ef806f !important;
  --event-wash: rgba(239, 128, 111, .14) !important;
}

body.kj-notifications-embedded .kj-notify-card:has(> .p-system) {
  --event-color: #8fa7c2 !important;
  --event-wash: rgba(143, 167, 194, .14) !important;
}

body.kj-notifications-embedded .kj-notify-card:has(> .p-promo) {
  --event-color: #8ac176 !important;
  --event-wash: rgba(138, 193, 118, .14) !important;
}

body.kj-notifications-embedded .kj-notify-card:has(> .p-advert) {
  --event-color: #d49a62 !important;
  --event-wash: rgba(212, 154, 98, .15) !important;
}

body.kj-notifications-embedded .kj-notify-card:has(> .p-notice) {
  --event-color: #c8c8ff !important;
  --event-wash: rgba(125, 125, 201, .14) !important;
}

body.kj-notifications-embedded #profileContainer .kj-notify-history .fs-box > p.kj-notify-card[data-kj-notification-type="subscription"] {
  --event-color: #72bfb2 !important;
  --event-wash: rgba(114, 191, 178, .15) !important;
}

body.kj-notifications-embedded #profileContainer .kj-notify-history .fs-box > p.kj-notify-card[data-kj-notification-type="important"] {
  --event-color: #ffcf70 !important;
  --event-wash: rgba(255, 207, 112, .2) !important;
}

body.kj-notifications-embedded #profileContainer .kj-notify-history .fs-box > p.kj-notify-card[data-kj-notification-type="like"] {
  --event-color: #e58aaf !important;
  --event-wash: rgba(229, 138, 175, .17) !important;
}

body.kj-notifications-embedded #profileContainer .kj-notify-history .fs-box > p.kj-notify-card[data-kj-notification-type="like_comment"] {
  --event-color: #b49be7 !important;
  --event-wash: rgba(180, 155, 231, .18) !important;
}

body.kj-notifications-embedded .kj-notify-card > span.p-mention::before { content: "\f3e5" !important; }
body.kj-notifications-embedded .kj-notify-card > span.p-message::before { content: "\f0e0" !important; }
body.kj-notifications-embedded .kj-notify-card > span.p-award::before { content: "\f091" !important; }
body.kj-notifications-embedded .kj-notify-card > span.p-reputation::before { content: "\f005" !important; }
body.kj-notifications-embedded .kj-notify-card > span.p-report::before { content: "\f071" !important; }
body.kj-notifications-embedded .kj-notify-card > span.p-system::before { content: "\f013" !important; }
body.kj-notifications-embedded .kj-notify-card > span.p-promo::before { content: "\f06b" !important; }
body.kj-notifications-embedded .kj-notify-card > span.p-advert::before { content: "\f0a1" !important; }
body.kj-notifications-embedded .kj-notify-card > span.p-notice::before { content: "\f0f3" !important; }
body.kj-notifications-embedded .kj-notify-card[data-kj-notification-type="subscription"] > .kj-subscription-notification-icon::before { content: "\f02e" !important; }
body.kj-notifications-embedded .kj-notify-card[data-kj-notification-type="important"] > .kj-subscription-notification-icon::before { content: "\f06a" !important; }
body.kj-notifications-embedded .kj-notify-card[data-kj-notification-type="like"] > .kj-subscription-notification-icon::before { content: "\f164" !important; }
body.kj-notifications-embedded .kj-notify-card[data-kj-notification-type="like_comment"] > .kj-subscription-notification-icon::before { content: "\f075" !important; }

body.kj-notifications-embedded .kj-subscription-notification-icon,
body.kj-notifications-embedded .kj-subscription-notification.is-read .kj-subscription-notification-icon {
  background: rgba(28, 32, 53, .94) !important;
}

body.kj-notifications-embedded .kj-subscription-notification.is-read {
  opacity: .7;
}

body.kj-notifications-embedded .kj-rating-comment {
  display: block;
  margin: 5px 0 0 0;
  color: #59617a;
  font-style: italic;
}

/* Forum popups: the native jg-* classes and our synthetic event classes share the
 * same shell, while their leading glyphs remain distinct. */
#jGrowl .notify-message,
.jGrowl .notify-message {
  --event-color: #8fa7c2;
  position: relative;
  box-sizing: border-box;
  width: 330px !important;
  max-width: calc(100vw - 20px);
  min-height: 70px !important;
  padding: 12px 14px 10px !important;
  color: var(--hsr-paper, #d3cabb);
  font: 12px/1.45 "DIN Pro", Arial, Helvetica, sans-serif;
  background: linear-gradient(135deg, rgba(50, 59, 101, .98), rgba(2, 17, 33, .98)) !important;
  border: 1px solid #ffcf70 !important;
  border-left: 3px solid var(--event-color) !important;
  border-radius: 14px 0 !important;
  box-shadow: 0 16px 36px rgba(2, 17, 33, .42);
  opacity: 1;
}

#jGrowl .notify-message::before,
.jGrowl .notify-message::before {
  position: absolute;
  top: 12px;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--event-color);
  font: 900 10px/1 "Font Awesome 6 Pro", "Font Awesome 6 Free", Arial, sans-serif;
  background: rgba(2, 17, 33, .7);
  border: 1px solid var(--event-color);
  border-radius: 50% 0 50% 50%;
  content: "\f0f3";
}

#jGrowl .notify-message .jGrowl-header,
.jGrowl .notify-message .jGrowl-header {
  box-sizing: border-box;
  min-height: 22px;
  margin: 0 0 8px !important;
  padding: 0 28px 6px !important;
  color: #ffcf70;
  font-size: 10px !important;
  font-weight: 600 !important;
  line-height: 20px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

#jGrowl .notify-message a,
.jGrowl .notify-message a {
  color: #d3cabb;
  text-decoration: none;
}

#jGrowl .notify-message strong,
.jGrowl .notify-message strong {
  color: #fff;
}

#jGrowl .notify-message .n-content,
.jGrowl .notify-message .n-content {
  display: block;
  min-height: 52px;
}

#jGrowl .notify-message .n-content::after,
.jGrowl .notify-message .n-content::after {
  display: block;
  clear: both;
  content: "";
}

#jGrowl .notify-message .n-content > img:not(.award),
.jGrowl .notify-message .n-content > img:not(.award) {
  box-sizing: border-box;
  width: 50px !important;
  height: 50px !important;
  margin: 0 10px 6px 0 !important;
  padding: 0 !important;
  object-fit: cover;
  border: 1px solid rgba(255, 207, 112, .7);
  border-radius: 50% 0 50% 50%;
}

#jGrowl .notify-message .jGrowl-date,
.jGrowl .notify-message .jGrowl-date {
  box-sizing: border-box;
  width: auto !important;
  clear: both;
}

#jGrowl .notify-message.jg-mention, .jGrowl .notify-message.jg-mention { --event-color: #67c7e8; }
#jGrowl .notify-message.jg-message, .jGrowl .notify-message.jg-message { --event-color: #aa9cf1; }
#jGrowl .notify-message.jg-award, .jGrowl .notify-message.jg-award { --event-color: #ffc85f; }
#jGrowl .notify-message.jg-reputation, .jGrowl .notify-message.jg-reputation { --event-color: #e58aaf; }
#jGrowl .notify-message.jg-report, .jGrowl .notify-message.jg-report { --event-color: #ef806f; }
#jGrowl .notify-message.jg-system, .jGrowl .notify-message.jg-system { --event-color: #8fa7c2; }
#jGrowl .notify-message.jg-promo, .jGrowl .notify-message.jg-promo { --event-color: #8ac176; }
#jGrowl .notify-message.jg-advert, .jGrowl .notify-message.jg-advert { --event-color: #d49a62; }
#jGrowl .notify-message.jg-notice, .jGrowl .notify-message.jg-notice { --event-color: #c8c8ff; }
#jGrowl .notify-message.kj-subscription-toast, .jGrowl .notify-message.kj-subscription-toast { --event-color: #72bfb2; }
#jGrowl .notify-message.kj-important-toast, .jGrowl .notify-message.kj-important-toast { --event-color: #ffcf70; }
#jGrowl .notify-message.kj-like-toast, .jGrowl .notify-message.kj-like-toast { --event-color: #e58aaf; }
#jGrowl .notify-message.kj-like-comment-toast, .jGrowl .notify-message.kj-like-comment-toast { --event-color: #b49be7; }

#jGrowl .notify-message.jg-mention::before, .jGrowl .notify-message.jg-mention::before { content: "\f3e5"; }
#jGrowl .notify-message.jg-message::before, .jGrowl .notify-message.jg-message::before { content: "\f0e0"; }
#jGrowl .notify-message.jg-award::before, .jGrowl .notify-message.jg-award::before { content: "\f091"; }
#jGrowl .notify-message.jg-reputation::before, .jGrowl .notify-message.jg-reputation::before { content: "\f005"; }
#jGrowl .notify-message.jg-report::before, .jGrowl .notify-message.jg-report::before { content: "\f071"; }
#jGrowl .notify-message.jg-system::before, .jGrowl .notify-message.jg-system::before { content: "\f013"; }
#jGrowl .notify-message.jg-promo::before, .jGrowl .notify-message.jg-promo::before { content: "\f06b"; }
#jGrowl .notify-message.jg-advert::before, .jGrowl .notify-message.jg-advert::before { content: "\f0a1"; }
#jGrowl .notify-message.jg-notice::before, .jGrowl .notify-message.jg-notice::before { content: "\f0f3"; }
#jGrowl .notify-message.kj-subscription-toast::before, .jGrowl .notify-message.kj-subscription-toast::before { content: "\f02e"; }
#jGrowl .notify-message.kj-important-toast::before, .jGrowl .notify-message.kj-important-toast::before { content: "\f06a"; }
#jGrowl .notify-message.kj-like-toast::before, .jGrowl .notify-message.kj-like-toast::before { content: "\f164"; }
#jGrowl .notify-message.kj-like-comment-toast::before, .jGrowl .notify-message.kj-like-comment-toast::before { content: "\f075"; }

#jGrowl .kj-rating-popup-comment,
.jGrowl .kj-rating-popup-comment {
  margin-top: 4px;
  color: #e8dff9;
  font-style: italic;
}

/* The custom commented-like switch also governs an occasional native
 * reputation popup that may arrive before Rusff saves its profile setting. */
html.kj-notifications-commented-likes-off #jGrowl .notify-message.jg-reputation,
html.kj-notifications-commented-likes-off .jGrowl .notify-message.jg-reputation {
  display: none !important;
}

@media (max-width: 640px) {
  #kj-notifications-modal .kj-notifications-dialog {
    border-radius: 0;
  }

  #kj-notifications-modal .kj-notifications-dialog::before,
  #kj-notifications-modal .kj-notifications-dialog::after {
    display: none;
  }

  body.kj-notifications-embedded #profileContainer {
    padding: 10px 8px 16px !important;
  }

  body.kj-notifications-embedded #profileContainer .kj-notify-history .fs-box > p.kj-notify-card {
    padding-right: 9px !important;
    padding-left: 52px !important;
  }

  #jGrowl .notify-message,
  .jGrowl .notify-message {
    width: min(330px, calc(100vw - 20px)) !important;
    margin: 8px 10px;
  }
}
