.x-sidebar[hidden] {
  display: none;
}

.x-sidebar {
  position: fixed;
  top: 112px;
  right: 18px;
  z-index: 26;
  width: min(320px, calc(100vw - 36px));
  max-height: calc(100svh - 140px);
  overflow: auto;
  color: #f2f0e8;
  background: rgba(8, 8, 8, 0.94);
  border: 1px solid rgba(242, 240, 232, 0.5);
  box-shadow: 9px 9px 0 rgba(216, 255, 49, 0.9);
  backdrop-filter: blur(18px);
  transition:
    width 220ms ease,
    box-shadow 220ms ease;
}

.x-sidebar__header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding: 10px 12px;
  background: #080808;
  border-bottom: 1px solid rgba(242, 240, 232, 0.3);
}

.x-sidebar__identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.x-sidebar__identity > span:last-child {
  min-width: 0;
}

.x-sidebar__identity small,
.x-sidebar__identity b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.x-sidebar__identity small {
  margin-bottom: 3px;
  color: #9d9d9d;
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.x-sidebar__identity b {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.x-sidebar__mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #080808;
  background: #f2f0e8;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 950;
}

.x-sidebar__toggle {
  flex: 0 0 auto;
  padding: 8px 10px;
  color: #f2f0e8;
  background: transparent;
  border: 1px solid rgba(242, 240, 232, 0.45);
  cursor: pointer;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.x-sidebar__toggle:hover {
  color: #080808;
  background: #d8ff31;
  border-color: #d8ff31;
}

.x-sidebar__content {
  min-height: 120px;
  padding: 10px;
}

.x-sidebar__content iframe,
.x-sidebar__content .twitter-tweet {
  max-width: 100% !important;
  margin: 0 auto !important;
}

.x-sidebar__loading,
.x-sidebar__notice {
  margin: 24px 10px;
  color: #bdbdbd;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.7;
}

.x-sidebar__fallback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 10px;
  padding: 14px 0;
  border-bottom: 1px solid #d8ff31;
  font-size: 0.72rem;
  font-weight: 800;
}

.x-sidebar.is-collapsed {
  width: 205px;
  box-shadow: 5px 5px 0 rgba(216, 255, 49, 0.9);
}

.x-sidebar.is-collapsed .x-sidebar__content {
  display: none;
}

.x-sidebar.is-collapsed .x-sidebar__header {
  border-bottom: 0;
}

.has-x-sidebar .hero-side-note {
  display: none;
}

@media (max-width: 980px) {
  .x-sidebar,
  .x-sidebar.is-collapsed {
    position: relative;
    top: auto;
    right: auto;
    z-index: 1;
    width: auto;
    max-height: none;
    margin: 28px var(--side) 0;
    box-shadow: 7px 7px 0 rgba(216, 255, 49, 0.9);
  }

  .x-sidebar__header {
    position: relative;
  }
}

@media (max-width: 680px) {
  .x-sidebar,
  .x-sidebar.is-collapsed {
    margin: 20px 0 0;
    border-right: 0;
    border-left: 0;
    box-shadow: none;
  }

  .x-sidebar__content {
    padding-inline: var(--side);
  }
}

@media (prefers-reduced-motion: reduce) {
  .x-sidebar {
    transition: none;
  }
}
