:root {
  --hcr-bg: #ffffff;
  --hcr-text: #111827;
  --hcr-muted: #6b7280;
  --hcr-border: rgba(17, 24, 39, 0.12);
  --hcr-primary: #111827;
  --hcr-danger: #b75b68;
  --hcr-safe: #2f8f64;
  --hcr-safe-bg: rgba(47, 143, 100, 0.09);
  --hcr-safe-border: rgba(47, 143, 100, 0.15);
  --hcr-nsfw: #c1546b;
  --hcr-nsfw-bg: rgba(193, 84, 107, 0.09);
  --hcr-nsfw-border: rgba(193, 84, 107, 0.15);
}

[data-theme='dark'] {
  --hcr-bg: #15171c;
  --hcr-text: #f9fafb;
  --hcr-muted: #aeb5c2;
  --hcr-border: rgba(255, 255, 255, 0.14);
  --hcr-primary: #f9fafb;
  --hcr-safe: #6ab98e;
  --hcr-nsfw: #d37a8d;
  --hcr-safe-bg: rgba(106, 185, 142, 0.14);
  --hcr-safe-border: rgba(106, 185, 142, 0.22);
  --hcr-nsfw-bg: rgba(211, 122, 141, 0.14);
  --hcr-nsfw-border: rgba(211, 122, 141, 0.22);
}

.halo-content-rating-nav {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.halo-content-rating-nav__button {
  appearance: none;
  min-width: 84px !important;
  height: 36px !important;
  padding: 0 12px !important;
  border: 1px solid transparent !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: var(--hcr-text) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.halo-content-rating-nav__button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
}

.halo-content-rating-nav__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.halo-content-rating-nav__shield {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.halo-content-rating-nav__shield svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.halo-content-rating-nav__shield-mark--nsfw {
  display: none;
}

.halo-content-rating-nav__shield .halo-content-rating-nav__shield-mark--nsfw {
  stroke-width: 2.05;
}

.halo-content-rating-nav__shield-dot {
  stroke-width: 0;
}

.halo-content-rating-nav__label {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.halo-content-rating-nav[data-mode='SFW'] .halo-content-rating-nav__button {
  border-color: var(--hcr-safe-border) !important;
  background: transparent !important;
  color: var(--hcr-safe) !important;
}

.halo-content-rating-nav[data-mode='NSFW'] .halo-content-rating-nav__button {
  border-color: var(--hcr-nsfw-border) !important;
  background: transparent !important;
  color: var(--hcr-nsfw) !important;
}

.halo-content-rating-nav[data-mode='SFW'] .halo-content-rating-nav__label,
.halo-content-rating-nav[data-mode='SFW'] .halo-content-rating-nav__shield {
  color: var(--hcr-safe) !important;
}

.halo-content-rating-nav[data-mode='NSFW'] .halo-content-rating-nav__label,
.halo-content-rating-nav[data-mode='NSFW'] .halo-content-rating-nav__shield {
  color: var(--hcr-nsfw) !important;
}

.halo-content-rating-nav[data-mode='SFW'] .halo-content-rating-nav__button:hover,
.halo-content-rating-nav[data-mode='SFW'].is-open .halo-content-rating-nav__button {
  background: color-mix(in srgb, var(--hcr-safe-bg) 78%, transparent) !important;
}

.halo-content-rating-nav[data-mode='NSFW'] .halo-content-rating-nav__button:hover,
.halo-content-rating-nav[data-mode='NSFW'].is-open .halo-content-rating-nav__button {
  background: color-mix(in srgb, var(--hcr-nsfw-bg) 78%, transparent) !important;
}

.halo-content-rating-nav[data-mode='NSFW'] .halo-content-rating-nav__shield-mark--safe {
  display: none;
}

.halo-content-rating-nav[data-mode='NSFW'] .halo-content-rating-nav__shield-mark--nsfw {
  display: inline;
}

.halo-content-rating-nav__menu[hidden] {
  display: none;
}

.halo-content-rating-nav__menu {
  position: fixed;
  top: var(--hcr-menu-top, 72px);
  left: var(--hcr-menu-left, 18px);
  z-index: 10040;
  width: min(330px, calc(100vw - 28px));
  max-height: calc(100vh - var(--hcr-menu-top, 72px) - 12px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 10px;
  border: 1px solid var(--hcr-border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--hcr-bg) 96%, transparent);
  color: var(--hcr-text);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.halo-content-rating-nav__option {
  --hcr-option-color: var(--hcr-text);
  --hcr-option-bg: rgba(15, 23, 42, 0.05);
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--hcr-option-color);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  text-align: left;
  cursor: pointer;
  font-weight: 500;
  transition: background 160ms ease, color 160ms ease;
}

.halo-content-rating-nav__option:hover {
  background: var(--hcr-option-bg) !important;
  background-color: var(--hcr-option-bg) !important;
}

.halo-content-rating-nav__option.is-active {
  background: transparent !important;
  background-color: transparent !important;
}

.halo-content-rating-nav__option.is-active:hover {
  background: var(--hcr-option-bg) !important;
  background-color: var(--hcr-option-bg) !important;
}

body .halo-content-rating-nav__menu .halo-content-rating-nav__option:hover,
body .halo-content-rating-nav__menu .halo-content-rating-nav__option.is-active:hover {
  background: var(--hcr-option-bg) !important;
  background-color: var(--hcr-option-bg) !important;
  background-image: none !important;
}

body .halo-content-rating-nav__menu .halo-content-rating-nav__option.is-active:not(:hover) {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

.halo-content-rating-nav__option[data-mode='SFW'] {
  --hcr-option-color: var(--hcr-safe);
  --hcr-option-bg: var(--hcr-safe-bg);
}

.halo-content-rating-nav__option[data-mode='NSFW'] {
  --hcr-option-color: var(--hcr-nsfw);
  --hcr-option-bg: var(--hcr-nsfw-bg);
}

.halo-content-rating-nav__option-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--hcr-option-color);
}

.halo-content-rating-nav__option-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.72;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.halo-content-rating-nav__option-alert {
  stroke-width: 2.25;
}

.halo-content-rating-nav__option-alert-dot {
  stroke-width: 0;
}

.halo-content-rating-nav__option-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.halo-content-rating-nav__option-title {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
}

.halo-content-rating-nav__option-desc {
  color: color-mix(in srgb, var(--hcr-option-color) 62%, var(--hcr-muted));
  font-size: 12px;
  line-height: 1.45;
}

.halo-content-rating-nav__option-check {
  opacity: 0;
  font-size: 11px;
  color: var(--hcr-option-color);
  transition: opacity 160ms ease;
}

.halo-content-rating-nav__option.is-active .halo-content-rating-nav__option-check {
  opacity: 1;
}

.halo-content-rating-nav__hint {
  margin: 8px 4px 2px;
  padding-top: 9px;
  border-top: 1px solid var(--hcr-border);
  color: var(--hcr-muted);
  font-size: 12px;
  line-height: 1.5;
}

.halo-content-rating-hidden {
  display: none !important;
}

.halo-content-rating-toggle {
  position: fixed;
  right: 18px;
  bottom: 96px;
  z-index: 1004;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--hcr-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--hcr-bg) 92%, transparent);
  color: var(--hcr-text);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(14px);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.halo-content-rating-toggle:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--hcr-primary) 28%, transparent);
}

.halo-content-rating-toggle:focus-visible,
.halo-content-rating-nav__button:focus-visible,
.halo-content-rating-nav__option:focus-visible,
.halo-content-rating-dialog__button:focus-visible,
.halo-content-rating-dialog__close:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 3px;
}

.halo-content-rating-toggle__mark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e8eef7;
  color: #263445;
  font-size: 11px;
}

.halo-content-rating-toggle[data-mode='NSFW'] .halo-content-rating-toggle__mark {
  background: #fee4e2;
  color: var(--hcr-danger);
}

.halo-content-rating-modal[hidden] {
  display: none;
}

.halo-content-rating-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 18px;
}

.halo-content-rating-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.46);
}

.halo-content-rating-dialog {
  position: relative;
  width: min(420px, 100%);
  border: 1px solid var(--hcr-border);
  border-radius: 16px;
  background: var(--hcr-bg);
  color: var(--hcr-text);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.26);
  padding: 22px;
}

.halo-content-rating-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.halo-content-rating-dialog__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.halo-content-rating-dialog__close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--hcr-muted);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.halo-content-rating-dialog__message {
  margin: 0 0 18px;
  color: var(--hcr-muted);
  font-size: 14px;
  line-height: 1.65;
}

.halo-content-rating-dialog__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.halo-content-rating-dialog__button {
  min-height: 42px;
  border: 1px solid var(--hcr-border);
  border-radius: 12px;
  background: transparent;
  color: var(--hcr-text);
  cursor: pointer;
  font-weight: 800;
}

.halo-content-rating-dialog__button.is-primary {
  background: var(--hcr-primary);
  color: var(--hcr-bg);
}

@media (max-width: 520px) {
  .halo-content-rating-toggle {
    right: 14px;
    bottom: 86px;
    padding: 0 11px;
  }

  .halo-content-rating-dialog__actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .halo-content-rating-nav__button {
    min-width: 40px !important;
    width: 40px;
    padding: 0 !important;
    border-radius: 14px !important;
  }

  .halo-content-rating-nav__label,
  .halo-content-rating-nav__hint {
    display: none;
  }

}

@media (prefers-reduced-motion: reduce) {
  .halo-content-rating-nav__button,
  .halo-content-rating-nav__option,
  .halo-content-rating-toggle {
    transition: none;
  }
}
