.guild-layout {
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  gap: 0;
  align-items: start;
  min-height: calc(100vh - 79px);
  background: #050505;
  transition: grid-template-columns 180ms ease;
}

.guild-layout.sidebar-collapsed {
  grid-template-columns: 82px minmax(0, 1fr);
}

.guild-sidebar {
  position: sticky;
  top: 79px;
  min-height: calc(100vh - 79px);
  max-height: calc(100vh - 79px);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 1.25rem 1.1rem;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  background: #101010;
  color: var(--ink);
  transition: width 180ms ease;
}

.guild-brand-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.4rem;
  align-items: center;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.guild-brand-actions {
  display: flex;
  gap: 0.3rem;
  align-items: center;
}

.guild-brand-actions .icon-button {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}

.guild-brand {
  display: flex;
  width: 100%;
  min-width: 0;
  gap: 0.5rem;
  align-items: center;
}

.brand-mark {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(225, 29, 46, 0.35);
  border-radius: 0.6rem;
  background: #151515;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

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

.guild-brand strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.94rem;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guild-sidebar-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
  min-height: 52px;
  padding: 0.35rem 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.04);
}

.server-avatar,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.server-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-weight: 900;
}

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

.server-avatar-fallback {
  display: inline-flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.guild-sidebar-title {
  min-width: 0;
}

.guild-sidebar-title strong,
.guild-sidebar-title span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guild-sidebar-title span {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.045);
  color: inherit;
  cursor: pointer;
}

.guild-search,
.guild-command-search {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.5rem;
  background: #151515;
  padding: 0 0.65rem;
  color: #9ca3af;
}

.guild-search input,
.guild-command-search input {
  min-height: auto;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0 0 0 0.18rem;
}

.guild-search input:focus-visible,
.guild-command-search input:focus-visible {
  outline: none;
}

.guild-search:has(input:focus-visible),
.guild-command-search:has(input:focus-visible) {
  border-color: var(--primary);
  color: var(--ink);
}

.guild-search kbd,
.guild-command-search kbd {
  padding: 0.12rem 0.38rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0.35rem;
  color: #aeb4c2;
  font-size: 0.68rem;
  font-family: inherit;
}

.guild-nav {
  display: grid;
  gap: 1rem;
}

.guild-nav-group {
  display: grid;
  gap: 0.35rem;
}

.guild-nav-items {
  display: grid;
  gap: 0.35rem;
}

.guild-nav-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 1.8rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: default;
}

.guild-nav-link {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  min-height: 2.35rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.45rem;
  color: #b6b3b6;
  font-weight: 780;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.guild-nav-link:hover,
.guild-nav-link.active {
  background: rgba(225, 29, 46, 0.1);
  color: #fff;
  transform: translateX(2px);
}

.guild-nav-link.active {
  background: rgba(225, 29, 46, 0.14);
  color: #fff;
}

.guild-nav-link i {
  text-align: center;
  color: #777579;
}

.guild-nav-link em {
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 900;
}

.guild-nav-back {
  margin-top: auto;
}

.guild-sidebar.is-collapsed {
  width: 82px;
  padding-inline: 0.75rem;
}

.guild-sidebar.is-collapsed .guild-brand strong,
.guild-sidebar.is-collapsed .guild-sidebar-title,
.guild-sidebar.is-collapsed .guild-search,
.guild-sidebar.is-collapsed .guild-nav-section span,
.guild-sidebar.is-collapsed .guild-nav-section i,
.guild-sidebar.is-collapsed .guild-nav-link span,
.guild-sidebar.is-collapsed .guild-nav-link em,
.guild-sidebar.is-collapsed .refresh-button,
.guild-sidebar.is-collapsed .server-picker-caret {
  display: none;
}

.guild-sidebar.is-collapsed .guild-brand-row {
  grid-template-columns: 42px;
  justify-content: center;
}

.guild-sidebar.is-collapsed .guild-brand-actions {
  display: grid;
  grid-template-columns: 42px;
  justify-content: center;
}

.guild-sidebar.is-collapsed .guild-brand {
  justify-content: center;
}

.guild-sidebar.is-collapsed .guild-sidebar-head {
  grid-template-columns: 42px;
  justify-content: center;
  width: 56px;
  min-height: 52px;
  margin-inline: auto;
  padding: 4px 6px;
}

.guild-sidebar.is-collapsed .icon-button {
  width: 42px;
}

.guild-sidebar.is-collapsed .guild-nav-link {
  grid-template-columns: 1fr;
  width: 56px;
  min-height: 44px;
  margin-inline: auto;
  justify-items: center;
  padding: 0;
  border: 1px solid transparent;
}

.guild-sidebar.is-collapsed .guild-nav-link:hover,
.guild-sidebar.is-collapsed .guild-nav-link.active {
  transform: none;
  border-color: rgba(225, 29, 46, 0.34);
}

.guild-sidebar.is-collapsed .guild-nav {
  gap: 0.35rem;
}

.guild-sidebar.is-collapsed .guild-nav-group,
.guild-sidebar.is-collapsed .guild-nav-items {
  gap: 0.35rem;
}

.guild-sidebar.is-collapsed .guild-nav-section {
  display: none;
}

.guild-main {
  min-width: 0;
  min-height: calc(100vh - 79px);
  padding: 1.15rem 1.25rem 1.5rem;
  color: var(--ink);
}

.guild-topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  min-height: 64px;
  margin: -1.15rem -1.25rem 1rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(16, 16, 16, 0.94);
}

.guild-command-search {
  width: min(560px, 100%);
  background: #151515;
  color: var(--muted);
}

.guild-command-search kbd {
  color: var(--muted);
}

.guild-top-actions {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.guild-top-actions .icon-button {
  background: #151515;
  color: var(--muted);
}

.guild-top-actions [data-tooltip]::after {
  top: calc(100% + 0.5rem);
  right: 0;
  bottom: auto;
  left: auto;
  z-index: 300;
  transform: translateY(-0.25rem);
}

.guild-top-actions [data-tooltip]:hover::after,
.guild-top-actions [data-tooltip]:focus-visible::after {
  transform: translateY(0);
}

.guild-page-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 0.9rem;
}

.guild-page-head h1 {
  font-size: clamp(1.65rem, 2.4vw, 2.25rem);
  color: var(--ink);
}

.tool-card {
  display: block;
}

.overview-grid,
.analytics-grid,
.help-grid,
.command-help-grid {
  display: grid;
  gap: 1rem;
}

.overview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0;
}

.metric-card {
  min-height: 0;
}

.guild-main .panel {
  border-color: rgba(255, 255, 255, 0.1);
  background: #151515;
  color: var(--ink);
}

.guild-main label,
.guild-main fieldset,
.guild-main td {
  color: #f0eef0;
}

.guild-main input,
.guild-main select,
.guild-main textarea {
  border-color: rgba(255, 255, 255, 0.12);
  background-color: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.metric-card span,
.metric-card small,
.panel-head span {
  color: var(--muted);
}

.metric-icon {
  display: inline-flex;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.8rem;
  border-radius: 1rem;
  background: rgba(225, 29, 46, 0.12);
  color: var(--secondary);
  font-size: 1.2rem;
}

.metric-card strong {
  display: block;
  margin: 0.35rem 0;
  color: var(--ink);
  font-size: 2.35rem;
  line-height: 1;
}

.overview-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 1rem;
  align-items: stretch;
}

.overview-bottom {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.overview-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.overview-status-grid > * {
  min-width: 0;
  margin: 0;
}

@media (min-width: 761px) {
  .overview-status-grid {
    grid-auto-rows: 292px;
  }

  .overview-status-grid > * {
    height: 292px;
    min-height: 0;
    max-height: 292px;
  }
}

.overview-status-grid .statistics-tilt-shell {
  align-self: stretch;
  grid-template-rows: repeat(3, minmax(0, 1fr));
}

.overview-status-grid .statistics-tilt-card {
  display: flex;
  min-height: 0;
  flex-direction: column;
  align-self: stretch;
}

.overview-status-grid .statistics-card-content {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.overview-status-grid .statistics-tilt-card .density-chart {
  grid-template-rows: minmax(64px, 1fr) auto;
  min-height: 0;
  height: auto;
  flex: 1;
}

.overview-status-grid .statistics-tilt-card .density-chart svg {
  min-height: 64px;
  height: 100%;
}

.overview-status-grid .statistics-tilt-card .line-labels {
  align-self: auto;
}

.overview-status-grid .schedule-status-body {
  grid-template-columns: minmax(130px, 0.42fr) minmax(0, 1fr);
}

@media (min-width: 761px) {
  .overview-weekly,
  .overview-setup {
    min-width: 0;
  }
}

.overview-left {
  display: grid;
  grid-template-rows: auto auto;
  gap: 1rem;
  align-content: start;
}

.overview-right {
  display: flex;
  min-width: 0;
  align-self: start;
}

.overview-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.overview-kpis .metric-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-areas:
    "icon label"
    "icon value"
    "icon detail";
  column-gap: 0.85rem;
  align-content: center;
  min-height: 124px;
  padding: 1rem;
}

.overview-kpis .metric-icon {
  grid-area: icon;
  width: 48px;
  height: 48px;
  margin: 0;
  border-radius: 0.75rem;
}

.overview-kpis .metric-card > span {
  grid-area: label;
}

.overview-kpis .metric-card > strong {
  grid-area: value;
  margin: 0.18rem 0;
  font-size: 1.8rem;
}

.overview-kpis .metric-card > small {
  grid-area: detail;
}

.overview-quick-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.9rem;
}

.overview-quick-actions .panel-head {
  flex: 0 0 auto;
  margin: 0;
}

.overview-quick-actions .actions {
  justify-content: flex-end;
}

.overview-weekly {
  grid-column: 1;
}

.overview-setup {
  grid-column: 2;
}

.overview-dashboard .panel {
  margin-bottom: 0;
}

.stats-wide {
  grid-column: 1 / -1;
  min-height: 0;
}

.statistics-tilt-card .panel-head {
  margin-bottom: 0.35rem;
}

.statistics-tilt-card .density-chart {
  grid-template-rows: 64px auto;
  gap: 0.9rem;
  min-height: 104px;
  height: 104px;
}

.statistics-tilt-card .density-chart svg {
  min-height: 64px;
  height: 64px;
}

.statistics-tilt-card .line-labels {
  padding-bottom: 3px;
  font-size: 0.7rem;
  line-height: 1.4;
}

.analytics-panel {
  min-height: 200px;
}

.analytics-panel.stats-wide {
  min-height: 0;
}

.statistics-tilt-shell {
  --statistics-radius: 1rem;
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(32px, auto));
  min-width: 0;
  perspective: 800px;
  isolation: isolate;
}

.statistics-hit-area {
  position: relative;
  z-index: 5;
}

.statistics-tilt-card {
  position: relative;
  z-index: 2;
  grid-area: 1 / 1 / -1 / -1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding-block: 0.85rem;
  border-radius: var(--statistics-radius);
  transform-style: preserve-3d;
  transition:
    transform 650ms cubic-bezier(0.03, 1, 0.5, 1),
    box-shadow 650ms ease;
}

.statistics-card-content {
  position: relative;
  z-index: 3;
  transform: translateZ(18px);
  transform-style: preserve-3d;
}

.statistics-card-head {
  position: relative;
  z-index: 2;
  transform: translateZ(12px);
}

.statistics-total {
  position: relative;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas:
    "label icon"
    "value icon";
  column-gap: 0.65rem;
  align-items: center;
  min-width: 125px;
  padding: 0.45rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--surface-2) 88%, transparent);
}

.statistics-total span {
  grid-area: label;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1;
}

.statistics-total strong {
  grid-area: value;
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1.1;
}

.statistics-total i {
  grid-area: icon;
  color: var(--accent);
  font-size: 1.25rem;
  filter: drop-shadow(0 0 7px var(--glow-primary));
}

.statistics-glow {
  display: none;
}

.statistics-glow-outer,
.statistics-glow-inner {
  display: none;
}

.statistics-hit-area:nth-child(1):hover ~ .statistics-tilt-card,
.statistics-hit-area:nth-child(2):hover ~ .statistics-tilt-card {
  transform: rotateX(-4deg) rotateY(4deg);
}

.statistics-hit-area:nth-child(3):hover ~ .statistics-tilt-card {
  transform: rotateX(-4deg);
}

.statistics-hit-area:nth-child(4):hover ~ .statistics-tilt-card,
.statistics-hit-area:nth-child(5):hover ~ .statistics-tilt-card {
  transform: rotateX(-4deg) rotateY(-4deg);
}

.statistics-hit-area:nth-child(6):hover ~ .statistics-tilt-card,
.statistics-hit-area:nth-child(7):hover ~ .statistics-tilt-card {
  transform: rotateY(4deg);
}

.statistics-hit-area:nth-child(9):hover ~ .statistics-tilt-card,
.statistics-hit-area:nth-child(10):hover ~ .statistics-tilt-card {
  transform: rotateY(-4deg);
}

.statistics-hit-area:nth-child(11):hover ~ .statistics-tilt-card,
.statistics-hit-area:nth-child(12):hover ~ .statistics-tilt-card {
  transform: rotateX(4deg) rotateY(4deg);
}

.statistics-hit-area:nth-child(13):hover ~ .statistics-tilt-card {
  transform: rotateX(4deg);
}

.statistics-hit-area:nth-child(14):hover ~ .statistics-tilt-card,
.statistics-hit-area:nth-child(15):hover ~ .statistics-tilt-card {
  transform: rotateX(4deg) rotateY(-4deg);
}

.statistics-tilt-card .density-chart-svg {
  transform: translateZ(8px);
}

.statistics-tilt-card .density-grid-line {
  opacity: 1;
  transform: none;
}

.statistics-tilt-card .density-stroke {
  stroke-dasharray: none;
  stroke-dashoffset: 0;
}

.density-gradient-start {
  stop-color: var(--accent);
}

.density-gradient-end {
  stop-color: var(--primary);
}

@media (hover: none), (prefers-reduced-motion: reduce) {
  .statistics-hit-area {
    pointer-events: none;
  }

  .statistics-tilt-card,
  .statistics-glow::before,
  .statistics-tilt-card .density-grid-line,
  .statistics-tilt-card .density-stroke,
  .statistics-total i {
    animation: none;
    transition: none;
  }

  .statistics-tilt-card .density-stroke {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

.dashboard-filter-form {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  align-items: end;
}

.form-actions {
  display: flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: flex-end;
}

.action-icon-button {
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 2.75rem;
  border-radius: 6px;
  border-color: rgba(225, 29, 46, 0.42);
  background: rgba(225, 29, 46, 0.11);
  color: #ff7b83;
}

.action-icon-button:hover,
.action-icon-button:focus-visible {
  border-color: var(--primary);
  background: var(--primary);
  color: #161107;
  outline: none;
}

.action-icon-button.danger {
  border-color: rgba(220, 72, 72, 0.5);
  background: rgba(220, 72, 72, 0.12);
  color: #ff9b9b;
}

.action-icon-button.danger:hover,
.action-icon-button.danger:focus-visible {
  border-color: #dc4848;
  background: #dc4848;
  color: #fff;
}

.recurring-table-panel {
  overflow-x: auto;
}

.recurring-table-panel td:first-child {
  min-width: 14rem;
  max-width: 26rem;
}

.recurring-table-panel td:first-child small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recurring-fields[hidden] {
  display: none;
}

.embed-composer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 1rem;
  align-items: start;
}

.embed-composer-form {
  margin: 0;
}

.embed-delivery-control {
  display: grid;
  align-content: start;
  gap: 0.55rem;
}

.embed-delivery-control > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.embed-v2-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem;
  border: 1px solid rgba(225, 29, 46, 0.18);
  border-radius: 0.75rem;
  background: rgba(225, 29, 46, 0.06);
  cursor: pointer;
}

.embed-v2-toggle > span {
  display: grid;
  gap: 0.2rem;
}

.embed-v2-toggle small {
  color: var(--muted);
  line-height: 1.4;
}

.embed-v2-toggle input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--primary);
}

.components-v2-fields[hidden] {
  display: none;
}

/* Exclusive mode toggle without JavaScript: legacy embed fields show by
   default; checking the V2 toggle hides them and shows the V2 layout. */
.embed-composer-form .components-v2-fields {
  display: none;
}

.embed-composer-form:has(.embed-v2-toggle input:checked) .components-v2-fields {
  display: grid;
}

.embed-composer-form:has(.embed-v2-toggle input:checked) .legacy-embed-fields {
  display: none;
}

.legacy-embed-fields {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0.9rem;
  border: 1px solid rgba(225, 29, 46, 0.16);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.025);
}

.legacy-embed-fields .form-grid {
  display: grid;
  gap: 0.75rem;
}

.components-v2-fields {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0.9rem;
  border: 1px solid rgba(225, 29, 46, 0.16);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.025);
}

.components-v2-fields .v2-checkbox {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.45rem;
  color: var(--muted);
  cursor: pointer;
}

.components-v2-fields .v2-checkbox input[type="checkbox"],
.embed-v2-toggle input[type="checkbox"] {
  width: 0.9rem;
  height: 0.9rem;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--primary);
}

.components-v2-fields .v2-checkbox span {
  font-size: 0.72rem;
  font-weight: 700;
}

.discord-v2-container {
  position: relative;
  display: grid;
  gap: 0.75rem;
  min-width: 0;
  overflow: hidden;
  padding: 0.9rem 1rem;
  border: 1px solid #3f4147;
  border-left: 4px solid var(--embed-color);
  border-radius: 0.55rem;
  background: #2b2d31;
  color: #dbdee1;
}

.discord-v2-container[hidden] {
  display: none;
}

.discord-embed-preview.is-components-v2 [data-preview-legacy] {
  display: none !important;
}

.discord-embed-preview.is-components-v2 [data-preview-v2] {
  display: grid !important;
}

.discord-v2-copy {
  min-width: 0;
  line-height: 1.4;
}

.discord-v2-section .discord-v2-copy {
  min-width: 0;
}

.discord-v2-thumbnail {
  width: 80px;
  height: 80px;
  flex: 0 0 auto;
  border-radius: 0.45rem;
  object-fit: cover;
}

.discord-v2-image {
  width: min(100%, 420px);
  max-height: 300px;
  border-radius: 0.45rem;
  object-fit: cover;
}

.discord-v2-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.discord-v2-media-grid:empty {
  display: none;
}

.discord-v2-media-grid img {
  width: 100%;
  height: 100px;
  border-radius: 0.4rem;
  object-fit: cover;
}

.discord-v2-footer {
  padding-top: 0.65rem;
  border-top: 1px solid #3f4147;
  color: #949ba4;
  font-size: 0.72rem;
}

.discord-v2-separator {
  height: 1px;
  margin: 0.15rem 0;
  background: #3f4147;
}

.discord-v2-button {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid #4b4d54;
  border-radius: 0.35rem;
  color: #dbdee1;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}

.embed-delivery-choice {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
}

.embed-delivery-choice strong {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.8rem;
  transition: color 180ms ease;
}

.embed-delivery-choice:has(input:not(:checked)) strong:first-child,
.embed-delivery-choice:has(input:checked) strong:last-child {
  color: var(--primary);
}

.embed-delivery-switch {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 3.5em;
  height: 2em;
  font-size: 17px;
}

.embed-delivery-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.embed-delivery-slider {
  position: absolute;
  inset: 0;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: color-mix(in srgb, var(--surface-2) 85%, #aaa);
  cursor: pointer;
  transition: 400ms;
}

.embed-delivery-slider::before {
  position: absolute;
  bottom: 0.3em;
  left: 0.3em;
  width: 0.1em;
  height: 1.4em;
  border-radius: 0;
  background: var(--ink);
  content: "";
  transition: 400ms;
}

.embed-delivery-switch input:checked + .embed-delivery-slider {
  border-color: color-mix(in srgb, var(--primary) 60%, transparent);
  background: color-mix(in srgb, var(--primary) 24%, #171717);
}

.embed-delivery-switch input:checked + .embed-delivery-slider::before {
  background: var(--secondary);
  transform: translateX(2.8em) rotate(360deg);
}

.embed-delivery-switch input:focus-visible + .embed-delivery-slider {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.form-hint {
  margin: 0;
  padding: 0.75rem;
  border: 1px solid color-mix(in srgb, var(--primary) 24%, transparent);
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--primary) 7%, transparent);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.form-hint i {
  margin-right: 0.35rem;
  color: var(--primary);
}

details.form-hint summary {
  cursor: pointer;
  font-weight: 700;
}

details.form-hint[open] summary {
  margin-bottom: 0.45rem;
}

details.form-hint div {
  display: grid;
  gap: 0.35rem;
}

.embed-preview-panel {
  position: sticky;
  top: 1rem;
  min-width: 0;
}

.discord-embed-preview {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
  padding: 1rem;
  border-radius: 0.8rem;
  background: #313338;
  color: #dbdee1;
  font-family:
    "gg sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.discord-embed-content,
.discord-embed-description {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.discord-embed-content {
  color: #f2f3f5;
  font-size: 0.9rem;
  line-height: 1.35;
}

.discord-preview-sender {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.discord-preview-sender img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.discord-preview-sender strong {
  overflow: hidden;
  color: #f2f3f5;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discord-preview-sender span {
  padding: 0.08rem 0.28rem;
  border-radius: 0.2rem;
  background: var(--primary);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 800;
}

.discord-preview-verified {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  margin-left: -0.15rem;
  color: #b5bac1;
  font-size: 0.85rem;
}

.bot-profile-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 0.6rem;
  background: #1e1f22;
}

.bot-profile-banner {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.bot-profile-banner-empty {
  height: 60px;
  background: var(--primary);
}

.bot-profile-identity {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 0.7rem;
  align-items: center;
  margin-top: -36px;
  padding: 0 1rem;
}

.bot-profile-identity img,
.bot-profile-avatar-fallback {
  grid-row: 1 / 3;
  width: 72px;
  height: 72px;
  border: 5px solid #1e1f22;
  border-radius: 50%;
  object-fit: cover;
}

.bot-profile-avatar-fallback {
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

.bot-profile-identity strong {
  align-self: end;
  overflow: hidden;
  color: #f2f3f5;
  font-size: 1.05rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-profile-identity small {
  align-self: start;
  color: #b5bac1;
  font-size: 0.8rem;
}

.bot-profile-bio {
  margin: 0.8rem 1rem 1rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.5rem;
  background: #2b2d31;
}

.bot-profile-bio span {
  display: block;
  margin-bottom: 0.3rem;
  color: #b5bac1;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bot-profile-bio p {
  margin: 0;
  overflow-wrap: anywhere;
  color: #dbdee1;
  font-size: 0.85rem;
  white-space: pre-wrap;
}

.bot-profile-bio-empty {
  color: #80848e;
}

.discord-embed-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  min-width: 0;
  overflow: hidden;
  padding: 0.8rem 0.9rem 0.8rem 1rem;
  border-radius: 0 0.3rem 0.3rem 0;
  background: #2b2d31;
}

.discord-embed-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--embed-color, #e11d2e);
  content: "";
}

.discord-embed-copy {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.discord-embed-title {
  color: #00a8fc;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.discord-embed-title:not([href="#"]):hover {
  text-decoration: underline;
}

.discord-embed-description {
  color: #dbdee1;
  font-size: 0.875rem;
  line-height: 1.35;
}

.discord-embed-author,
.discord-embed-footer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.discord-embed-author {
  color: #f2f3f5;
  font-size: 0.78rem;
  font-weight: 700;
}

.discord-embed-footer {
  color: #b5bac1;
  font-size: 0.72rem;
}

.discord-embed-author img,
.discord-embed-footer img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.discord-embed-footer img {
  width: 18px;
  height: 18px;
}

.discord-embed-thumbnail {
  width: 80px;
  max-height: 80px;
  border-radius: 0.25rem;
  object-fit: cover;
}

.discord-embed-image {
  width: min(100%, 420px);
  max-height: 300px;
  margin-top: 0.25rem;
  border-radius: 0.25rem;
  object-fit: contain;
}

.discord-embed-button {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: 0.45rem;
  min-height: 32px;
  padding: 0.35rem 0.75rem;
  border-radius: 0.25rem;
  background: #4e5058;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.discord-embed-button:hover {
  background: #6d6f78;
}

.discord-embed-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.discord-embed-field {
  min-width: 0;
}

.discord-embed-field--block {
  grid-column: 1 / -1;
}

.discord-embed-field strong {
  display: block;
  color: #f2f3f5;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.discord-embed-field span {
  display: block;
  color: #dbdee1;
  font-size: 0.82rem;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.discord-v2-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
}

.discord-md-heading {
  margin: 0.2rem 0;
  color: #f2f3f5;
  font-weight: 700;
  line-height: 1.2;
}

.discord-md-heading-1 {
  font-size: 1.35rem;
}

.discord-md-heading-2 {
  font-size: 1.18rem;
}

.discord-md-heading-3 {
  font-size: 1.02rem;
}

.discord-md-line {
  min-height: 1.15em;
  overflow-wrap: anywhere;
}

.discord-md-empty {
  min-height: 0.45rem;
  font-size: 0;
}

.discord-md-subtext {
  color: #b5bac1;
  font-size: 0.72rem;
}

.discord-md-quote {
  padding-left: 0.65rem;
  border-left: 4px solid #4e5058;
  overflow-wrap: anywhere;
}

.discord-md-quote-continuation {
  margin-top: -0.1rem;
}

.discord-md-list-item {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr);
  gap: 0.2rem;
  padding-left: 0.35rem;
}

.discord-md-inline-code,
.discord-md-code-block {
  border: 1px solid #1e1f22;
  border-radius: 0.25rem;
  background: #1e1f22;
  font-family:
    "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.discord-md-inline-code {
  padding: 0.08rem 0.28rem;
  font-size: 0.85em;
}

.discord-md-code-block {
  max-width: 100%;
  margin: 0.3rem 0;
  padding: 0.65rem;
  overflow-x: auto;
  color: #dbdee1;
  font-size: 0.78rem;
  line-height: 1.35;
  white-space: pre;
}

.discord-md-code-block code[data-language]::before {
  display: block;
  margin-bottom: 0.4rem;
  color: #949ba4;
  content: attr(data-language);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.discord-md-link {
  color: #00a8fc;
}

.discord-md-link:hover {
  text-decoration: underline;
}

.discord-md-mention {
  padding: 0 0.18rem;
  border-radius: 0.18rem;
  background: rgba(225, 29, 46, 0.3);
  color: #c9cdfb;
}

.discord-md-spoiler {
  padding: 0 0.15rem;
  border-radius: 0.18rem;
  background: #1e1f22;
  color: transparent;
  cursor: pointer;
}

.discord-md-spoiler:hover,
.discord-md-spoiler:focus {
  color: inherit;
}

.discord-md-emoji {
  white-space: nowrap;
}

.discord-embed-preview [hidden] {
  display: none;
}

@media (max-width: 980px) {
  .embed-composer-grid {
    grid-template-columns: 1fr;
  }

  .embed-preview-panel {
    position: static;
    grid-row: 1;
  }
}

.dashboard-action-button {
  width: 100%;
  min-height: 2.75rem;
  gap: 0.55rem;
  white-space: nowrap;
}

.mobile-back-button {
  display: none;
  gap: 0.45rem;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.panel-head h2 {
  color: var(--ink);
  font-size: 1rem;
}

.monthly-panel {
  position: relative;
  min-height: 220px;
  overflow: hidden;
}

.monthly-bars {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
  align-items: end;
  height: 180px;
  padding: 0.75rem 1rem 0;
}

.weekly-bars {
  position: relative;
  z-index: 1;
  grid-template-columns: repeat(var(--bar-count, 1), minmax(42px, 1fr));
  gap: clamp(0.8rem, 4vw, 1.5rem);
  height: 192px;
  padding: 1rem 1rem 0;
}

.weekly-chart-grid {
  position: absolute;
  z-index: 0;
  right: 1.5rem;
  bottom: 4.7rem;
  left: 1.5rem;
  display: flex;
  height: 150px;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.weekly-chart-grid i {
  width: 100%;
  height: 1px;
  background: #222;
}

.weekly-chart-grid i:last-child {
  background: #1a1a1a;
}

.monthly-bar {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.45rem;
  height: 100%;
  min-width: 0;
  text-align: center;
  cursor: default;
}

.weekly-bar-stage {
  display: flex;
  height: 100%;
  min-height: 0;
  align-items: end;
}

.weekly-bar-stage > span {
  width: 100%;
}

.monthly-bar span {
  position: relative;
  align-self: end;
  width: 100%;
  height: var(--target-height);
  min-height: 10px;
  overflow: hidden;
  border-radius: 0.5rem 0.5rem 0.15rem 0.15rem;
  background: linear-gradient(180deg, #ff5555, #ff3333 52%, #b91c1c);
}

.monthly-bar span::after {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
  content: "";
}

.monthly-bar span i {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.14),
    transparent
  );
}

.monthly-bar strong {
  color: #aaa;
  font-size: 0.8rem;
  font-weight: 800;
  opacity: 0;
  transition:
    color 200ms ease,
    opacity 200ms ease;
}

.monthly-bar:hover strong {
  color: #fff;
  opacity: 1;
}

.monthly-bar small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  transition: color 200ms ease;
}

.monthly-bar:hover small {
  color: #fff;
}

.weekly-bar-tooltip {
  position: absolute;
  z-index: 3;
  top: -2rem;
  left: 50%;
  padding: 0.4rem 0.6rem;
  border: 1px solid #333;
  border-radius: 0.45rem;
  background: #1f1f1f;
  color: #fff;
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0.45rem);
  transition:
    opacity 200ms ease,
    transform 200ms ease;
  white-space: nowrap;
}

.monthly-bar:hover .weekly-bar-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.weekly-chart-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid #222;
}

.weekly-chart-footer span {
  color: #555;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.weekly-chart-footer strong {
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.target-panel {
  width: 100%;
  min-height: 0;
}

.setup-target-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: center;
}

.target-gauge {
  position: relative;
  width: min(220px, 100%);
  min-height: 132px;
  min-width: 0;
  justify-self: center;
}

.setup-gauge-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.setup-gauge-track,
.setup-gauge-progress {
  fill: none;
  stroke-linecap: round;
  stroke-width: 18;
}

.setup-gauge-track {
  stroke: #262626;
}

.setup-gauge-progress {
  stroke: url(#setupGaugeGradient);
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}

.setup-gauge-ticks {
  stroke: #666;
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0.38;
}

.gauge-value {
  position: absolute;
  right: 0;
  bottom: 0.15rem;
  left: 0;
  display: grid;
  gap: 0.2rem;
  text-align: center;
}

.gauge-value strong {
  color: var(--ink);
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
}

.gauge-value span {
  color: var(--secondary);
  font-size: 0.72rem;
  font-weight: 900;
}

.setup-breakdown {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
  background: transparent;
}

.setup-breakdown .setup-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  min-width: 0;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  background: #1a1a1a;
  text-align: left;
  transition:
    border-color 200ms ease,
    background 200ms ease;
}

.setup-breakdown .setup-step:hover {
  background: #1c1c1c;
}

.setup-breakdown .setup-step.is-ready:hover {
  border-color: rgba(74, 222, 128, 0.3);
}

.setup-breakdown .setup-step.is-missing:hover {
  border-color: rgba(248, 113, 113, 0.3);
}

.setup-breakdown span,
.setup-breakdown strong {
  display: inline;
}

.setup-breakdown span {
  color: var(--muted);
}

.setup-breakdown strong {
  margin-top: 0;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.setup-step-icon {
  display: grid !important;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 0.55rem;
  font-size: 0.75rem;
}

.setup-step.is-ready .setup-step-icon,
.setup-step.is-ready strong {
  color: #4ade80;
}

.setup-step.is-ready .setup-step-icon {
  border-color: rgba(74, 222, 128, 0.2);
  background: rgba(74, 222, 128, 0.1);
}

.setup-step.is-missing .setup-step-icon,
.setup-step.is-missing strong {
  color: #f87171;
}

.setup-step.is-missing .setup-step-icon {
  border-color: rgba(248, 113, 113, 0.2);
  background: rgba(248, 113, 113, 0.1);
}

.line-chart {
  height: 300px;
}

.density-chart {
  display: grid;
  grid-template-rows: minmax(150px, 1fr) auto;
  gap: 1.1rem;
  min-height: 205px;
  overflow: hidden;
}

.line-chart svg {
  display: block;
  width: 100%;
  height: 250px;
}

.density-chart svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 150px;
}

.density-chart-svg {
  border-radius: 0.7rem;
  background:
    linear-gradient(rgba(225, 29, 46, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(225, 29, 46, 0.045) 1px, transparent 1px),
    rgba(255, 255, 255, 0.025);
  background-size:
    100% 33.333%,
    12.5% 100%,
    auto;
}

.density-grid-line {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 0.35;
  vector-effect: non-scaling-stroke;
}

.density-area {
  opacity: 1;
}

.density-stroke {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.1;
  vector-effect: non-scaling-stroke;
}

.line-grid {
  stroke: #e5e7eb;
  stroke-width: 0.45;
}

.line-area {
  fill: url("#usageArea");
}

.line-stroke {
  fill: none;
  stroke: var(--secondary);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.line-labels {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.trend-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.65rem;
  align-items: end;
  height: 220px;
  padding-top: 0.5rem;
}

.trend-bar {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 0.45rem;
  height: 100%;
  min-width: 0;
  text-align: center;
}

.trend-bar span {
  align-self: end;
  min-height: 8px;
  border-radius: 0.45rem 0.45rem 0.15rem 0.15rem;
  background: linear-gradient(180deg, var(--accent), var(--primary));
}

.trend-bar small {
  color: var(--muted);
  font-size: 0.76rem;
}

.pie-wrap {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
}

.pie-card {
  display: grid;
  grid-template-columns: minmax(140px, 190px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  min-width: 0;
}

.pie-card:empty {
  min-height: 190px;
}

.pie-chart {
  width: 190px;
  max-width: 100%;
  aspect-ratio: 1;
  justify-self: center;
  border-radius: 50%;
  border: 1px solid rgba(225, 29, 46, 0.14);
}

.pie-legend,
.command-chip-list {
  display: grid;
  gap: 0.55rem;
}

.legend-row,
.bar-row-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.legend-row span {
  display: inline-flex;
  min-width: 0;
  gap: 0.5rem;
  align-items: center;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend-row span i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  flex: 0 0 auto;
}

.legend-row strong,
.bar-row-meta strong {
  color: var(--ink);
  flex: 0 0 auto;
}

.bar-row {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}

.top-users-head > span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.top-users-head > span > i {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #22c55e;
}

.top-users-list {
  display: grid;
  gap: 1.05rem;
}

.top-user-row {
  gap: 0.55rem;
  margin: 0;
}

.top-user-row .bar-row-meta {
  align-items: end;
}

.top-user-identity {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.6rem;
}

.top-user-identity em {
  width: 1rem;
  flex: 0 0 auto;
  color: #555;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
}

.top-user-identity b {
  overflow: hidden;
  color: #aaa;
  font-size: 0.85rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-user-row:first-child .top-user-identity b,
.top-user-row:hover .top-user-identity b {
  color: #fff;
}

.top-user-rank {
  padding: 0.12rem 0.38rem;
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: 0.25rem;
  background: rgba(248, 113, 113, 0.1);
  color: #f87171;
  font-size: 0.55rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.top-user-row .bar-row-meta > strong {
  font-size: 0.85rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.bar-row-meta span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  position: relative;
  height: 0.62rem;
  overflow: hidden;
  border-radius: 999px;
  background: #1f1f1f;
}

.bar-track span {
  position: relative;
  display: block;
  height: 100%;
  width: var(--target-width);
  overflow: hidden;
  border-radius: inherit;
  background: linear-gradient(90deg, #cc0000, #ff3333);
  background-size: 200% 100%;
}

.top-user-row:first-child .bar-track span {
  background: linear-gradient(90deg, #ff1a1a 0%, #ff4444 50%, #ff1a1a 100%);
  background-size: 200% 100%;
}

.bar-track span i {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
}

.top-users-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.3rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.top-users-footer span {
  color: #555;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.top-users-footer strong {
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.empty-state {
  padding: 1rem;
  border: 1px dashed #cbd5e1;
  border-radius: 0.65rem;
  color: var(--muted);
}

.help-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.about-panel p {
  color: var(--muted);
  line-height: 1.65;
}

.command-help-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.command-chip-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.command-chip-list code {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.dashboard-body.guild-dashboard-page {
  --bg: #050505;
  --surface: #101010;
  --surface-2: #151515;
  --border: rgba(255, 255, 255, 0.12);
  --ink: #f8f7f4;
  --muted: #9c9a9c;
  --primary: #e11d2e;
  --secondary: #f05b66;
  --accent: #ff7b83;
  background: #050505;
}

body.guild-dashboard-page .site-header {
  background: #050505;
  border-bottom-color: rgba(225, 29, 46, 0.18);
}

body.guild-dashboard-page .footer {
  display: none;
}

body.guild-dashboard-page .ambient-bg {
  contain: strict;
  opacity: 0.9;
}

body.guild-dashboard-page .overview-grid,
body.guild-dashboard-page .overview-bottom {
  align-items: stretch;
}

body.guild-dashboard-page .overview-dashboard .panel,
body.guild-dashboard-page .overview-dashboard .panel:last-child {
  height: 100%;
  margin-bottom: 0;
}

.schedule-view-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.schedule-view-tab {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(225, 29, 46, 0.18);
  border-radius: 6px;
  background: #151515;
  color: var(--muted);
}

.schedule-view-tab:hover,
.schedule-view-tab.active {
  border-color: rgba(225, 29, 46, 0.48);
  background: rgba(225, 29, 46, 0.1);
  color: var(--ink);
}

.schedule-view-tab strong {
  color: var(--primary);
}

td[data-mobile-label="Links"] a {
  color: #58a6ff;
  text-decoration: none;
}

td[data-mobile-label="Links"] a:hover {
  text-decoration: underline;
}

.team-table {
  width: 100%;
  table-layout: fixed;
}

.team-table th:nth-child(1) {
  width: 20%;
}
.team-table th:nth-child(2) {
  width: 15%;
}
.team-table th:nth-child(3) {
  width: 65%;
}
.team-table td {
  vertical-align: top;
}
.team-table td > small {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
}

.team-details summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  list-style: none;
  color: var(--primary);
}

.team-details summary::-webkit-details-marker {
  display: none;
}
.team-details summary i {
  transition: transform 160ms ease;
}
.team-details[open] summary i {
  transform: rotate(90deg);
}
.team-player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 0.7rem;
  margin-top: 0.75rem;
}
.team-player-section {
  min-width: 0;
  padding: 0.7rem;
  border-left: 3px solid rgba(225, 29, 46, 0.65);
  background: rgba(255, 255, 255, 0.035);
}
.team-player-section h3 {
  margin: 0 0 0.55rem;
  font-size: 0.9rem;
}
.team-player-section dl {
  margin: 0;
}
.team-player-section dl div {
  display: grid;
  grid-template-columns: minmax(5.5rem, 0.42fr) minmax(0, 1fr);
  gap: 0.45rem;
  padding: 0.28rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.team-player-section dt {
  color: var(--muted);
}
.team-player-section dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}
.team-player-section code {
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
}

@media (max-width: 760px) {
  .schedule-view-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-scroll {
    width: 100%;
    min-width: 0;
    overflow: visible;
  }

  .team-table {
    display: block;
    width: 100%;
    min-width: 0;
    overflow: visible;
    table-layout: auto;
  }

  .team-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .team-table tbody {
    display: grid;
    width: 100%;
  }

  .team-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
    min-width: 0;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border);
  }

  .team-table td {
    display: block;
    width: auto;
    min-width: 0;
    padding: 0 0.75rem;
    border: 0;
    white-space: normal;
  }

  .team-table td:first-child strong,
  .team-table td:first-child small {
    overflow-wrap: anywhere;
  }

  .team-table td:nth-child(2) {
    align-self: start;
    text-align: right;
  }

  .team-table td:nth-child(3) {
    grid-column: 1 / -1;
    margin-top: 0.75rem;
  }

  .team-details,
  .team-details summary {
    width: 100%;
    min-width: 0;
  }

  .team-details summary {
    justify-content: flex-start;
    padding-top: 0.7rem;
    border-top: 1px solid rgba(225, 29, 46, 0.14);
  }

  .team-player-grid {
    grid-template-columns: 1fr;
  }

  .team-table td[colspan] {
    grid-column: 1 / -1;
  }
}

.guild-layout {
  background: rgba(5, 5, 5, 0.78);
  animation: none;
}

.guild-sidebar {
  border-right-color: rgba(225, 29, 46, 0.16);
  background: #101010;
}

.guild-brand-row,
.guild-sidebar-head {
  border-color: rgba(214, 222, 230, 0.12);
}

.guild-sidebar-head,
.guild-search,
.guild-command-search,
.guild-nav-link.active,
.guild-topbar,
.guild-main .panel {
  backdrop-filter: none;
}

.guild-sidebar-head,
.guild-search {
  background: rgba(255, 255, 255, 0.045);
}

.brand-mark,
.server-avatar,
.metric-icon {
  background: #151515;
  color: var(--primary);
}

.guild-brand strong,
.guild-sidebar-title strong,
.guild-page-head h1,
.panel-head h2,
.metric-card strong,
.gauge-value strong,
.setup-breakdown strong,
.legend-row strong,
.bar-row-meta strong {
  color: var(--ink);
}

.guild-sidebar-title span,
.guild-nav-section,
.guild-nav-link,
.metric-card span,
.metric-card small,
.panel-head span,
.monthly-bar small,
.line-labels,
.setup-breakdown span,
.bar-row-meta span,
.empty-state,
.about-panel p {
  color: var(--muted);
}

.guild-nav-link:hover,
.guild-nav-link.active {
  background: rgba(225, 29, 46, 0.11);
}

.guild-nav-link i,
.server-picker-caret {
  color: #7f8c97;
}

.guild-nav-link em {
  background: rgba(240, 91, 102, 0.14);
  color: #ff7b83;
}

.guild-main {
  color: var(--ink);
}

.guild-topbar {
  border-bottom-color: rgba(225, 29, 46, 0.16);
  background: #101010;
}

.guild-command-search,
.guild-top-actions .icon-button {
  border-color: rgba(225, 29, 46, 0.2);
  background: #151515;
  color: var(--muted);
}
.guild-main .panel {
  margin-bottom: 1rem;
  border-color: rgba(225, 29, 46, 0.18);
  background: #151515;
  color: var(--ink);
  animation: none;
}

.guild-main .panel:hover {
  border-color: rgba(225, 29, 46, 0.42);
}
.guild-main .panel:last-child {
  margin-bottom: 0;
}

.guild-main .panel:nth-child(2n) {
  animation-delay: 60ms;
}

.guild-main .panel:nth-child(3n) {
  animation-delay: 110ms;
}

.guild-main label,
.guild-main fieldset,
.guild-main td {
  color: #f0eef0;
}

.guild-main input,
.guild-main select,
.guild-main textarea {
  border-color: rgba(214, 222, 230, 0.15);
  background-color: rgba(255, 255, 255, 0.07);
  color: var(--ink);
}

.metric-icon {
  color: #fff;
}

.monthly-bar span,
.trend-bar span {
  background: linear-gradient(180deg, var(--secondary), var(--primary));
}

.monthly-bar:nth-child(2n) span {
  animation-delay: 70ms;
}

.monthly-bar:nth-child(3n) span {
  animation-delay: 120ms;
}

.gauge-value span {
  color: var(--primary);
}

.setup-breakdown {
  background: transparent;
}

.setup-breakdown div {
  border-color: rgba(225, 29, 46, 0.16);
  background: #101010;
}

.line-grid {
  stroke: rgba(255, 255, 255, 0.1);
}

.line-area {
  fill: rgba(240, 91, 102, 0.12);
}

.line-stroke {
  stroke: var(--secondary);
  filter: none;
}

.bar-track {
  background: rgba(255, 255, 255, 0.07);
}

.bar-track span {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.empty-state {
  border-color: rgba(225, 29, 46, 0.18);
}

.command-chip-list code {
  color: #f05b66;
  background: rgba(225, 29, 46, 0.1);
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.history-panel {
  --history-row-height: 54px;
  --history-row-gap: 0.375rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 700px;
  min-height: 0;
  margin-bottom: 0;
}

.history-panel .panel-head {
  align-items: flex-start;
  flex: 0 0 64px;
  height: 64px;
  min-height: 64px;
  margin-bottom: 0.5rem;
}

.history-panel .panel-head > div {
  min-width: 0;
}

.history-list {
  display: grid;
  gap: 0.7rem;
  position: relative;
}

.history-list--scroll {
  align-content: start;
  flex: 0 0 562px;
  height: 562px;
  min-height: 0;
  max-height: 562px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(225, 29, 46, 0.35) transparent;
}

.history-list--scroll::-webkit-scrollbar {
  width: 6px;
}

.history-list--scroll::-webkit-scrollbar-thumb {
  background: rgba(225, 29, 46, 0.35);
  border-radius: 999px;
}

.history-list--scroll::-webkit-scrollbar-track {
  background: transparent;
}

.history-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  min-height: 68px;
  padding: 0.75rem;
  border: 1px solid rgba(225, 29, 46, 0.12);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.045);
  transition:
    border-color 160ms ease,
    background 160ms ease;
}

.history-panel .history-list {
  gap: var(--history-row-gap);
}

.history-panel .history-item {
  min-height: var(--history-row-height);
  height: var(--history-row-height);
  padding: 0.5rem 0.65rem;
}

.history-panel .history-icon {
  width: 36px;
  height: 36px;
}

.history-panel .history-item > div:nth-child(2) {
  min-width: 0;
}

.history-panel .empty-state {
  flex: 1;
}

.history-item:hover {
  border-color: rgba(225, 29, 46, 0.28);
  background: rgba(225, 29, 46, 0.08);
}

.history-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 0.6rem;
  background: rgba(225, 29, 46, 0.14);
  color: var(--accent);
}

.history-item strong,
.history-item span,
.history-item time {
  display: block;
}

.history-item strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-item span,
.history-item time {
  color: var(--muted);
  font-size: 0.82rem;
}

.history-item time {
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

.tournament-discovery-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
}

.tournament-discovery-count {
  display: grid;
  min-width: 150px;
  padding: 1.15rem;
  border: 1px solid rgba(225, 29, 46, 0.25);
  border-radius: 0.85rem;
  background: rgba(225, 29, 46, 0.08);
  text-align: center;
}

.tournament-discovery-count strong {
  color: var(--accent);
  font-size: 2rem;
}

.tournament-discovery-count span {
  color: var(--muted);
  font-size: 0.82rem;
}

.tournament-discovery-tools,
.advertisement-manage-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.tournament-discovery-tools select {
  width: auto;
  min-width: 135px;
}

.tournament-discovery-section {
  margin-bottom: 1.5rem;
}

.tournament-verified {
  color: #38bdf8;
  font-size: 0.8em;
}

.tournament-featured {
  color: var(--primary);
  font-size: 0.78em;
}

.tournament-discovery-tools label {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
}

.tournament-discovery-tools label i {
  position: absolute;
  left: 1rem;
  color: var(--muted);
}

.tournament-discovery-tools input {
  width: 100%;
  padding-left: 2.7rem;
}

.tournament-ad-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.tournament-ad-card {
  display: grid;
  grid-template-rows: 220px 1fr;
  overflow: hidden;
  padding: 0;
}

.tournament-ad-image {
  display: flex;
  min-height: 220px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(225, 29, 46, 0.16);
  background: linear-gradient(
    135deg,
    rgba(225, 29, 46, 0.16),
    rgba(83, 58, 183, 0.14)
  );
  color: var(--accent);
}

.tournament-ad-image img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.tournament-ad-card:hover .tournament-ad-image img {
  transform: scale(1.025);
}

.tournament-ad-image-empty i {
  font-size: 3rem;
}

.tournament-ad-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.2rem;
}

.tournament-ad-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.tournament-ad-body h2 {
  margin: 0;
  font-size: 1.35rem;
}

.tournament-ad-body h2 a {
  color: var(--ink);
  text-decoration: none;
}

.tournament-ad-copy {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  white-space: pre-line;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  -webkit-line-clamp: 3;
}

.tournament-ad-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tournament-ad-tags span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(225, 29, 46, 0.17);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
}

.tournament-ad-tags i {
  color: var(--accent);
}

.tournament-ad-server {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: auto;
}

.tournament-ad-server img,
.tournament-ad-server .avatar-fallback {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.tournament-ad-empty {
  grid-column: 1 / -1;
  padding: 3rem 1.5rem;
  text-align: center;
}

.tournament-ad-empty > i {
  margin-bottom: 0.8rem;
  color: var(--accent);
  font-size: 2.5rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
  color: var(--muted);
  text-decoration: none;
}

.tournament-detail {
  overflow: hidden;
  padding: 0;
}

.tournament-detail-banner {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

.tournament-detail-content {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

.tournament-detail-content h1 {
  margin: 0;
}

.tournament-detail-description {
  max-width: 80ch;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.75;
  white-space: pre-line;
}

.tournament-detail-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0;
}

.tournament-detail-facts div {
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(225, 29, 46, 0.14);
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.035);
}

.tournament-detail-facts dt {
  color: var(--muted);
  font-size: 0.78rem;
}

.tournament-detail-facts dd {
  margin: 0.25rem 0 0;
  color: var(--ink);
  font-weight: 700;
}

.tournament-rewards-fact dd {
  line-height: 1.4;
  white-space: pre-line;
}

.tournament-detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.tournament-detail-links form {
  margin: 0;
}

.tournament-report-panel {
  max-width: 680px;
  padding: 0.8rem;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 0.7rem;
}

.tournament-report-panel summary {
  color: var(--muted);
  cursor: pointer;
}

.tournament-report-panel form {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.advertisement-editor {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 1.2rem;
  align-items: start;
}

.advertisement-form-section {
  margin-top: 0.8rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(225, 29, 46, 0.14);
}

.advertisement-preview {
  position: sticky;
  top: 1rem;
}

.advertisement-preview-image {
  display: flex;
  min-height: 190px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.55rem;
  overflow: hidden;
  margin: 0.8rem 0 1rem;
  border: 1px dashed rgba(225, 29, 46, 0.3);
  border-radius: 0.75rem;
  background: rgba(225, 29, 46, 0.06);
  color: var(--muted);
}

.advertisement-preview-image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.advertisement-preview p {
  color: var(--muted);
  white-space: pre-line;
}

.advertisement-rejection {
  margin: 0;
  padding: 0.7rem;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 0.6rem;
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
  font-size: 0.84rem;
}

.moderation-queue {
  display: grid;
  gap: 1rem;
}

.moderation-card {
  display: grid;
  overflow: hidden;
  padding: 0;
}

.moderation-card-preview {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
}

.moderation-card-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.moderation-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.moderation-card-meta .status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.moderation-card-server {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.moderation-card-server img,
.moderation-card-server .avatar-fallback {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.moderation-card-preview-head time {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.moderation-card-preview-body {
  display: grid;
  grid-template-columns: minmax(120px, 200px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.moderation-card-thumb {
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(225, 29, 46, 0.16);
  border-radius: 0.75rem;
  background: linear-gradient(
    135deg,
    rgba(225, 29, 46, 0.16),
    rgba(83, 58, 183, 0.14)
  );
  color: var(--accent);
}

.moderation-card-thumb img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
}

.moderation-card-thumb i {
  font-size: 2.5rem;
}

.moderation-card-summary {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.moderation-card-summary h2 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--ink);
}

.moderation-card-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.moderation-card-excerpt {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-line;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  -webkit-line-clamp: 3;
}

.moderation-expand-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem;
  border: 1px solid rgba(225, 29, 46, 0.18);
  border-radius: 0.55rem;
  background: rgba(225, 29, 46, 0.06);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.moderation-expand-toggle:hover,
.moderation-expand-toggle:focus-visible {
  border-color: rgba(225, 29, 46, 0.42);
  background: rgba(225, 29, 46, 0.12);
  color: var(--ink);
  outline: none;
}

.moderation-expand-toggle i {
  transition: transform 200ms ease;
}

.moderation-card.is-expanded .moderation-expand-toggle i {
  transform: rotate(180deg);
}

.moderation-expand-label-collapsed {
  display: none;
}

.moderation-card.is-expanded .moderation-expand-label {
  display: none;
}

.moderation-card.is-expanded .moderation-expand-label-collapsed {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.moderation-card-details {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border-top: 1px solid rgba(225, 29, 46, 0.14);
  background: rgba(255, 255, 255, 0.02);
}

.moderation-card-details[hidden] {
  display: none;
}

.moderation-card-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.moderation-card-detail-section {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.moderation-card-detail-section h3 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.moderation-card-detail-section h3 i {
  color: var(--accent);
}

.moderation-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  white-space: pre-line;
}

.moderation-prize {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  white-space: pre-line;
}

.moderation-actions {
  display: flex;
  align-items: end;
  gap: 0.7rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(225, 29, 46, 0.14);
  flex-wrap: wrap;
}

.moderation-actions form {
  margin: 0;
}

.moderation-option {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.moderation-option input {
  width: auto;
}

.moderation-reports {
  margin-bottom: 1rem;
}

.moderation-report-item {
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

.advertisement-analytics-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(44px, 1fr));
  gap: 0.7rem;
  min-height: 250px;
  align-items: end;
}

.advertisement-analytics-bars > div {
  display: grid;
  grid-template-rows: 180px auto auto;
  gap: 0.3rem;
  text-align: center;
}

.advertisement-analytics-bars > div > span {
  width: min(42px, 80%);
  height: var(--bar-height);
  align-self: end;
  justify-self: center;
  border-radius: 0.45rem 0.45rem 0 0;
  background: linear-gradient(to top, var(--primary), var(--secondary));
}

.advertisement-analytics-bars small {
  color: var(--muted);
}

.notification-list {
  display: grid;
  gap: 0.75rem;
}

.notification-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
}

.notification-item.unread {
  border-color: color-mix(in srgb, var(--primary) 55%, transparent);
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}

.notification-item h2,
.notification-item p {
  margin: 0;
}

.notification-item p,
.notification-item time {
  color: var(--muted);
}

.notification-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--primary);
}

.notification-preferences-panel {
  margin-bottom: 1rem;
}

.notification-preference-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.notification-preference {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
  border-radius: 0.8rem;
  background: color-mix(in srgb, var(--surface-2) 76%, transparent);
  cursor: pointer;
}

.notification-preference-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.notification-preference-copy strong,
.notification-preference-copy small {
  display: block;
}

.notification-preference-copy small {
  color: var(--muted);
  line-height: 1.35;
}

.notification-bell-toggle {
  position: relative;
  display: inline-flex;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  border-radius: 50%;
  color: var(--muted);
  fill: currentColor;
  cursor: pointer;
  user-select: none;
}

.notification-bell-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.notification-bell-toggle svg {
  position: absolute;
  width: 19px;
  height: 22px;
  animation: notification-bell-fill 500ms ease;
}

.notification-bell-toggle .bell-solid {
  display: none;
}

.notification-bell-toggle input:checked ~ .bell-regular {
  display: none;
}

.notification-bell-toggle input:checked ~ .bell-solid {
  display: block;
  color: var(--primary);
}

.notification-bell-toggle:has(input:focus-visible) {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .notification-bell-toggle svg {
    animation: none;
  }
}

@property --analytics-pie-reveal {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}

[data-analytics-animate] .monthly-bar span,
[data-analytics-animate="user-bars"] .bar-track span {
  transform-origin: bottom;
  will-change: transform, opacity;
}

[data-analytics-animate="weekly-bars"].is-chart-pending .monthly-bar span {
  height: var(--target-height);
  transform: scaleY(0.02);
}

[data-analytics-animate="user-bars"] .bar-track span {
  transform-origin: left center;
}

[data-analytics-animate="weekly-bars"].is-chart-active .monthly-bar span {
  animation: analytics-bar-rise 1.05s var(--bar-delay)
    cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

[data-analytics-animate="user-bars"].is-chart-active
  .bar-row:nth-child(1)
  .bar-track
  span {
  animation: analytics-progress-fill 620ms cubic-bezier(0.22, 0.75, 0.2, 1)
    forwards;
}

[data-analytics-animate="user-bars"].is-chart-active
  .bar-row:nth-child(2)
  .bar-track
  span {
  animation: analytics-progress-fill 620ms 110ms
    cubic-bezier(0.22, 0.75, 0.2, 1) forwards;
}

[data-analytics-animate="user-bars"].is-chart-active
  .bar-row:nth-child(n + 3)
  .bar-track
  span {
  animation: analytics-progress-fill 620ms 190ms
    cubic-bezier(0.22, 0.75, 0.2, 1) forwards;
}

[data-analytics-animate="command-pie"] .pie-chart {
  --analytics-pie-reveal: 100%;
  -webkit-mask-image: conic-gradient(
    #000 var(--analytics-pie-reveal),
    transparent 0
  );
  mask-image: conic-gradient(#000 var(--analytics-pie-reveal), transparent 0);
  transform-origin: center;
}

[data-analytics-animate="command-pie"].is-chart-active .pie-chart {
  animation: analytics-pie-draw 620ms cubic-bezier(0.22, 0.75, 0.2, 1) forwards;
}

[data-analytics-animate="command-pie"].is-chart-active .legend-row {
  animation: analytics-legend-enter 420ms ease both;
}

[data-analytics-animate="command-pie"].is-chart-active
  .legend-row:nth-child(2) {
  animation-delay: 90ms;
}

[data-analytics-animate="command-pie"].is-chart-active
  .legend-row:nth-child(3) {
  animation-delay: 160ms;
}

@media (prefers-reduced-motion: reduce) {
  [data-analytics-animate] .monthly-bar span,
  [data-analytics-animate] .bar-track span,
  [data-analytics-animate] .setup-gauge-progress,
  [data-analytics-animate] .pie-chart,
  [data-analytics-animate] .legend-row {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}

.moderator-manager-add {
  margin-bottom: 1rem;
}

.moderator-manager-list {
  display: grid;
  gap: 0.75rem;
}

.moderator-manager-item {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(290px, 0.8fr) auto;
  gap: 0.8rem;
  align-items: center;
}

.moderator-manager-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.moderator-manager-identity > div:last-child {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.moderator-manager-identity span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.moderator-manager-avatar {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--primary);
  font-weight: 900;
}

.moderator-manager-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.moderator-manager-edit {
  display: flex;
  align-items: end;
  gap: 0.55rem;
}

.moderator-manager-edit label {
  flex: 1;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
  margin-block: 1rem;
}

.admin-grid > .panel {
  height: auto;
  margin: 0;
}

.admin-block-grid {
  align-items: stretch;
}

.admin-block-grid > .panel {
  min-width: 0;
  height: 100%;
}

.admin-block-form-panel {
  display: flex;
  flex-direction: column;
}

.admin-block-form-panel .form-grid {
  flex: 1;
}

.admin-block-form-panel .actions {
  margin-top: auto;
}

.admin-block-form-panel label small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.35;
}

.admin-block-list-panel .history-list {
  max-height: 260px;
  overflow-y: auto;
}

.guide-tutorial-admin-list {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.guide-tutorial-admin-item {
  display: grid;
  grid-template-columns: minmax(170px, 240px) minmax(0, 1fr) auto;
  gap: 1.15rem;
  align-items: center;
}

.guide-tutorial-admin-item > img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0.75rem;
  object-fit: cover;
  background: #090a0b;
}

.guide-tutorial-admin-item h2 {
  margin: 0.55rem 0 0.35rem;
  color: var(--ink);
  font-size: clamp(1rem, 2vw, 1.35rem);
}

.guide-tutorial-admin-item p,
.guide-tutorial-admin-item a {
  display: block;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.84rem;
}

.guide-tutorial-admin-item a {
  margin-top: 0.45rem;
  color: var(--secondary);
}

.admin-health-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.admin-health-grid .metric-card {
  min-width: 0;
  padding: 0.85rem;
}

.admin-health-grid .metric-card strong {
  overflow: hidden;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-health-grid .metric-card {
  height: 100%;
}

.admin-advertisements-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
}

.admin-advertisements-scroll table {
  min-width: 42rem;
}

.admin-user-profile-link {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink);
  text-decoration: none;
}

.admin-user-profile-link strong {
  min-width: 0;
}

.admin-user-profile-link > i {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 0.72rem;
}

.admin-user-profile-link:hover strong {
  color: var(--accent);
}

.admin-user-list,
[data-admin-audit-list] {
  --admin-history-row-height: 68px;
  max-height: calc(680px + 6.3rem);
  max-block-size: calc(680px + 6.3rem);
  padding-right: 0.35rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--accent) rgba(255, 255, 255, 0.06);
  scrollbar-width: thin;
}

.admin-user-list > .history-item,
[data-admin-audit-list] > .history-item {
  min-block-size: var(--admin-history-row-height);
}

.admin-user-summary {
  margin-bottom: 1rem;
}

.admin-user-summary .metric {
  margin: 0;
}

.admin-user-detail-panels {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 1rem;
}

.admin-user-detail-panels > .panel {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
}

.admin-user-map-panel .badge {
  flex: 0 0 auto;
  margin: 0;
}

.admin-user-identity {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
}

.admin-user-identity > div {
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.035);
}

.admin-user-identity dt {
  color: var(--muted);
  font-size: 0.78rem;
}

.admin-user-identity dd {
  margin: 0.25rem 0 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.admin-user-login-table {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  max-height: 560px;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.admin-user-login-table table {
  display: table;
  width: 100%;
  max-width: none;
  min-width: 1120px;
  overflow: visible;
}

.admin-user-login-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom-color: rgba(255, 255, 255, 0.14);
  background: #111;
}

.admin-user-login-table td {
  min-width: 110px;
  vertical-align: top;
}

.admin-user-login-table th,
.admin-user-login-table td {
  padding-inline: 0.7rem;
}

.admin-user-login-table th:nth-child(2),
.admin-user-login-table td:nth-child(2) {
  min-width: 165px;
  white-space: nowrap;
}

.admin-user-login-table .admin-user-login-serial {
  width: 64px;
  min-width: 64px;
  max-width: 64px;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
}

.admin-user-login-table .admin-user-ip {
  min-width: 210px;
}

.admin-user-ip code {
  display: block;
  width: max-content;
  max-width: 100%;
  color: var(--ink);
  overflow-wrap: anywhere;
  white-space: normal;
}

.admin-user-ip-location {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.admin-user-ip-location small {
  display: block;
  margin-top: 0.15rem;
  color: color-mix(in srgb, var(--muted) 78%, transparent);
}

.admin-user-ip-location-entry {
  display: block;
}

.admin-user-ip-location-entry + .admin-user-ip-location-entry {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
}

.admin-user-ip-location.unavailable {
  color: var(--muted);
  font-style: italic;
}

.admin-user-login-table .admin-user-agent {
  min-width: 260px;
  max-width: 380px;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}

.admin-user-agent-compact {
  display: none;
}

.admin-user-map {
  min-height: 360px;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: #aad3df;
  overflow: hidden;
}

.admin-user-map-note {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.admin-user-map-note i {
  margin-top: 0.15rem;
  color: var(--accent);
}

.admin-user-map--loading,
.admin-user-map--empty,
.admin-user-map--error {
  display: grid;
  place-items: center;
  gap: 0.45rem;
  min-height: 180px;
  margin: 0;
  padding: 1.5rem;
  border: 1px dashed var(--border);
  border-radius: 0.75rem;
  color: var(--muted);
  text-align: center;
}

.admin-user-map--loading > span {
  color: var(--muted);
}

.admin-user-map--empty i,
.admin-user-map--error i {
  color: var(--accent);
  font-size: 1.4rem;
}

.admin-user-map--empty strong,
.admin-user-map--error strong {
  color: var(--ink);
}

.admin-user-map--empty span,
.admin-user-map--error span {
  max-width: 560px;
  font-size: 0.82rem;
  line-height: 1.5;
}

.admin-user-map .leaflet-control-attribution {
  background: rgba(10, 10, 10, 0.86);
  color: #b8b6b8;
}

.admin-user-map .leaflet-control-attribution a {
  color: #f06c75;
}

.admin-user-map .leaflet-bar a {
  border-color: rgba(255, 255, 255, 0.1);
  background: #151515;
  color: #f8f7f4;
}

.admin-user-map .leaflet-popup-content-wrapper,
.admin-user-map .leaflet-popup-tip {
  background: #151515;
  color: #f8f7f4;
}

.admin-user-map .leaflet-popup-content-wrapper {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
}

.admin-user-map .leaflet-popup-close-button {
  color: #b8b6b8;
}

.admin-map-popup {
  display: grid;
  gap: 0.5rem;
  min-width: 220px;
}

.admin-map-popup > div {
  display: grid;
  gap: 0.1rem;
}

.admin-map-popup span {
  color: #9c9a9c;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-map-popup strong {
  color: #f8f7f4;
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.admin-login-map-marker,
.admin-login-map-cluster {
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
}

.admin-login-map-marker span,
.admin-login-map-cluster span {
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: var(--accent);
}

.admin-login-map-marker span {
  width: 16px;
  height: 16px;
}

.admin-login-map-cluster span {
  width: 38px;
  height: 38px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-list-search {
  display: block;
  margin-bottom: 0.8rem;
}

.admin-list-search input {
  width: 100%;
}

.moderation-reject-form {
  display: flex;
  flex: 1;
  align-items: end;
  gap: 0.55rem;
}

.moderation-reject-form label {
  flex: 1;
}

@media (max-width: 720px) {
  .admin-user-identity {
    grid-template-columns: 1fr;
  }

  .admin-user-detail-panels {
    gap: 0.75rem;
  }

  .admin-user-login-table {
    max-height: 480px;
  }

  .admin-user-login-table table {
    min-width: 780px;
  }

  .admin-user-login-table .admin-user-agent-full {
    display: none;
  }

  .admin-user-login-table .admin-user-agent-compact {
    display: inline;
  }

  .admin-user-login-table .admin-user-agent {
    width: 92px;
    min-width: 92px;
    max-width: 92px;
    white-space: normal;
    overflow-wrap: normal;
  }

  .admin-user-map {
    min-height: 300px;
  }

  .moderation-card {
    grid-template-columns: 1fr;
  }

  .moderation-card-banner {
    min-height: 190px;
    max-height: 280px;
  }

  .moderation-actions,
  .moderation-reject-form {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .guide-tutorial-admin-item {
    grid-template-columns: 1fr auto;
  }

  .guide-tutorial-admin-item > img {
    grid-column: 1 / -1;
  }

  .notification-preference-grid {
    grid-template-columns: 1fr;
  }

  .notification-preferences-panel .panel-head,
  .moderator-manager-edit {
    align-items: stretch;
    flex-direction: column;
  }

  .moderator-manager-item {
    grid-template-columns: 1fr auto;
  }

  .moderator-manager-edit {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .notification-item {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .notification-item > .button {
    grid-column: 1 / -1;
  }

  .advertisement-analytics-bars {
    gap: 0.25rem;
    overflow-x: auto;
  }
}

.error-state {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(1rem, 4vw, 3rem);
  max-width: 920px;
  min-height: 430px;
  margin: 2rem auto;
  align-items: center;
  overflow: hidden;
}

.error-face-container {
  display: flex;
  height: 330px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--primary) 13%, transparent) 0%,
    transparent 68%
  );
  color: var(--primary);
}

.error-face {
  width: min(200px, 72%);
  filter: drop-shadow(
    0 14px 28px color-mix(in srgb, var(--primary) 22%, transparent)
  );
}

.error-face__eyes,
.error-face__eye-lid,
.error-face__mouth-left,
.error-face__mouth-right,
.error-face__nose,
.error-face__pupil {
  animation: error-face-eyes 1s 0.3s forwards;
}

.error-face__eye-lid,
.error-face__pupil {
  animation-duration: 4s;
  animation-delay: 1.3s;
  animation-iteration-count: infinite;
}

.error-face__eye-lid {
  animation-name: error-face-eye-lid;
}

.error-face__mouth-left {
  animation-name: error-face-mouth-left;
}

.error-face__mouth-right {
  animation-name: error-face-mouth-right;
}

.error-face__nose {
  animation-name: error-face-nose;
}

.error-face__pupil {
  animation-name: error-face-pupil;
}

.error-state-copy {
  min-width: 0;
}

.error-state-copy h1 {
  margin-bottom: 0.65rem;
}

.error-state-copy .lede {
  max-width: 54ch;
}

@media (max-width: 680px) {
  .error-state {
    grid-template-columns: 1fr;
    min-height: 0;
    margin-block: 1rem;
    text-align: center;
  }

  .error-face-container {
    height: 230px;
  }

  .error-face {
    width: 135px;
  }

  .error-state-copy .actions {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .error-face__eyes {
    transform: translateY(15px);
  }

  .error-face__nose {
    transform: translateY(22.5px);
  }

  .error-face__mouth-left,
  .error-face__mouth-right {
    stroke-dashoffset: 0;
  }

  .error-face__eyes,
  .error-face__eye-lid,
  .error-face__mouth-left,
  .error-face__mouth-right,
  .error-face__nose,
  .error-face__pupil {
    animation: none !important;
  }
}

.ping-card-panel {
  position: relative;
  min-height: 0;
  margin-top: 1.25rem;
  padding: 1.1rem 1.35rem;
  overflow: hidden;
}

.ping-card-panel::before {
  content: "";
  position: absolute;
  inset: -40% 18% auto;
  height: 170px;
  border-radius: 999px;
  background: radial-gradient(
    circle at 35% 50%,
    rgba(225, 29, 46, 0.12),
    transparent 42%
  );
  filter: blur(24px);
  opacity: 0.6;
  pointer-events: none;
}

.ping-card-body {
  position: relative;
  z-index: 1;
  margin-top: 0.85rem;
}

.ping-card-content {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(340px, 1.6fr);
  gap: 1.35rem;
  align-items: center;
}

.ping-card-panel .panel-head h2 i {
  color: var(--primary);
}

.ping-card-panel .ping-chart-wrapper {
  border-color: rgba(225, 29, 46, 0.24);
  background:
    linear-gradient(180deg, rgba(225, 29, 46, 0.08), transparent), #111;
}

.ping-card-panel .ping-grid-line,
.ping-card-panel .ping-baseline {
  stroke: rgba(225, 29, 46, 0.26);
}

.ping-card-panel .ping-baseline {
  stroke: rgba(225, 29, 46, 0.42);
}

.ping-card-panel .ping-stroke {
  filter: drop-shadow(0 0 2px currentColor);
}

.ping-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.ping-stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-height: 4.15rem;
  padding: 0.7rem 0.85rem;
  border-radius: 0.6rem;
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent),
    color-mix(in srgb, var(--surface-2) 75%, transparent);
}

.ping-stat-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ping-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ping-name {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ping-value {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
}

.ping-value strong {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
  transition: color 300ms ease;
}

.ping-value small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
}

.ping-chart-wrapper {
  position: relative;
  width: 100%;
  height: 132px;
  overflow: hidden;
  border-radius: 0.7rem;
  border: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent),
    color-mix(in srgb, var(--surface-2) 48%, transparent);
  padding: 0.35rem 0.45rem 1.6rem;
}

.ping-chart-svg {
  width: 100%;
  height: calc(100% - 1rem);
  overflow: visible;
}

.ping-grid-line,
.ping-baseline {
  stroke: color-mix(in srgb, var(--muted) 30%, transparent);
  stroke-width: 1;
  stroke-dasharray: 4 8;
  opacity: 0.45;
}

.ping-baseline {
  stroke-dasharray: none;
  opacity: 0.32;
  animation: none;
}

.ping-area {
  opacity: 0.75;
}

.ping-stroke {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 680;
  stroke-dashoffset: 680;
  animation: ping-path-draw 1.1s cubic-bezier(0.22, 0.78, 0.2, 1)
    calc(var(--i, 1) * 90ms) both;
}

.ping-stroke-glow {
  stroke-width: 5;
  opacity: 0.1;
}

.ping-live-dot {
  animation: ping-live-pulse 1.6s ease infinite;
}

.ping-chart-footer {
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.38rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.ping-chart-footer time {
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  .ping-grid-line,
  .ping-area,
  .ping-stroke,
  .ping-live-dot {
    animation: none;
  }

  .ping-stroke {
    stroke-dashoffset: 0;
  }
}

@media (max-width: 768px) {
  .ping-card-content {
    grid-template-columns: 1fr;
  }

  .ping-stats-grid {
    grid-template-columns: 1fr;
  }

  .overview-status-grid {
    grid-template-columns: 1fr;
  }
}

.schedule-status-card {
  position: relative;
  overflow: hidden;
}

.schedule-status-card::before {
  content: "";
  position: absolute;
  inset: -40% 18% auto;
  height: 170px;
  border-radius: 999px;
  background: radial-gradient(
    circle at 35% 50%,
    rgba(255, 68, 68, 0.08),
    transparent 42%
  );
  filter: blur(24px);
  opacity: 0.4;
  pointer-events: none;
}

.schedule-status-body {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.5rem 0.25rem;
}

.schedule-ring-wrapper {
  position: relative;
  width: 176px;
  height: 176px;
  flex-shrink: 0;
}

.schedule-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}

.schedule-done-arc {
  stroke-dasharray: 0 477.52;
  animation: schedule-draw-done 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s
    forwards;
}

.schedule-pending-arc {
  stroke-dasharray: 0 477.52;
  animation: schedule-draw-pending 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.8s
    forwards;
}

.schedule-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.schedule-ring-center strong {
  color: var(--ink);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 20px rgba(255, 50, 50, 0.3);
}

.schedule-ring-center span {
  color: var(--primary);
  font-size: 0.56rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-top: 0.25rem;
}

.schedule-stats-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.schedule-stat-item {
  cursor: default;
}

.schedule-stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.schedule-stat-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.schedule-stat-label span:last-child {
  transition: color 200ms ease;
}

.schedule-stat-item:hover .schedule-stat-label span:last-child {
  color: var(--ink);
}

.schedule-stat-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-size: 0.7rem;
}

.schedule-stat-icon.done {
  background: rgba(255, 68, 68, 0.1);
  border: 1px solid rgba(255, 68, 68, 0.2);
  color: #ff4444;
}

.schedule-stat-icon.pending {
  background: rgba(85, 34, 34, 0.3);
  border: 1px solid rgba(85, 34, 34, 0.4);
  color: #aa4444;
}

.schedule-stat-head > strong {
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 900;
}

.schedule-mini-track {
  height: 6px;
  border-radius: 999px;
  background: #1f1f1f;
  overflow: hidden;
}

.schedule-mini-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  animation: schedule-grow-mini 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s
    forwards;
}

.schedule-mini-bar.done {
  background: linear-gradient(90deg, #cc0000, #ff4444);
}

.schedule-mini-bar.pending {
  background: linear-gradient(90deg, #331111, #552222);
  animation-delay: 0.7s;
}

.schedule-completion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.schedule-completion span {
  color: #555;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.schedule-completion-rate {
  color: #ff4444;
  font-size: 0.75rem;
  font-weight: 900;
}

@media (max-width: 640px) {
  .schedule-status-body {
    flex-direction: column;
    gap: 1.5rem;
  }

  .schedule-ring-wrapper {
    width: 140px;
    height: 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .schedule-done-arc,
  .schedule-pending-arc,
  .schedule-mini-bar {
    animation: none;
  }

  .schedule-done-arc {
    stroke-dasharray: var(--done-arc, 0) 477.52;
  }

  .schedule-pending-arc {
    stroke-dasharray: var(--pending-arc, 0) 477.52;
    stroke-dashoffset: calc(-1 * var(--done-arc, 0));
  }

  .schedule-mini-bar {
    width: var(--target, 0);
  }
}
