.js .nojs-only {
  display: none !important;
}

.follow {
  display: inline-flex;
  min-width: 0;
}

.follow form,
.follow .dropdown {
  display: inline-flex;
  min-width: 0;
  margin: 0;
}

.follow__button span,
.profile__actions .btn > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.follow__chevron {
  margin-left: -2px;
  opacity: .75;
}

.modal > form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.profile-alert {
  margin-bottom: 12px;
}

.profile {
  overflow: hidden;
}

.profile__cover,
.settings-cover {
  position: relative;
  aspect-ratio: 16 / 5;
  background-color: #2F4A48;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .05) 0%, rgba(0, 0, 0, .14) 100%);
}

.profile__cover--tone-1 { background-color: #364D4D; }
.profile__cover--tone-2 { background-color: #2E4440; }
.profile__cover--tone-3 { background-color: #3B4F55; }
.profile__cover--tone-4 { background-color: #4B6B6B; }
.profile__cover--tone-5 { background-color: #34484A; }

.profile__cover-img,
.settings-cover__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile__cover-add {
  position: absolute;
  right: 12px;
  bottom: 12px;
}

.profile__cover-add.btn--secondary,
.settings-cover__actions .btn--secondary {
  --btn-bg: rgba(16, 22, 22, .72);
  --btn-bg-hover: rgba(16, 22, 22, .86);
}

.profile__body {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0 16px 18px;
}

.profile__avatar-wrap {
  align-self: flex-start;
  margin-top: -52px;
}

.profile__avatar.avatar--xxl {
  --avatar-size: 96px;
}

a.profile__avatar:hover .avatar__img {
  filter: brightness(1.06);
}

.profile__name {
  margin-top: 12px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}

.profile__handle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: var(--fs-14);
}

.profile__chip {
  gap: 4px;
  color: var(--text-secondary);
}

.profile__status {
  margin-top: 10px;
  color: var(--text);
  font-size: var(--fs-15);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.profile__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 12px 0 0;
  padding: 0;
  color: var(--text-secondary);
  font-size: var(--fs-13);
  list-style: none;
}

.profile__meta li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.profile__meta .icon {
  color: var(--text-muted);
}

.presence.is-online {
  color: var(--green);
  font-weight: 600;
}

.presence.is-online::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.profile__stats {
  margin-top: 14px;
}

.profile__mutuals {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: var(--fs-13);
}

.profile__mutuals .user-link {
  font-size: inherit;
}

.profile__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  order: 10;
  margin-top: 16px;
}

.profile__actions > .follow,
.profile__actions > .btn:not(.btn--icon) {
  flex: 1 1 0;
  min-width: 0;
}

.profile__actions .follow form,
.profile__actions .follow .dropdown,
.profile__actions .follow .btn {
  width: 100%;
}

.profile__requests .badge {
  margin-left: 2px;
}

.profile-tabs {
  position: sticky;
  top: calc(var(--sticky-top) + 57px);
  z-index: 25;
  margin-top: 12px;
  background: var(--page-bg-translucent);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
}

.profile-tabs .tab {
  gap: 8px;
}

.profile-panel {
  min-height: 240px;
  padding-top: 12px;
  outline: none;
}

.profile-panel .feed,
.profile-panel .cover-grid {
  margin-top: 4px;
}

.profile-skeleton-cover {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-skeleton-cover__img {
  aspect-ratio: 2 / 3;
  border-radius: var(--r-md);
}

.profile-panel__error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 16px;
  color: var(--text-secondary);
  text-align: center;
}

.profile-noscript {
  padding: 24px 16px;
  text-align: center;
}

.notice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 36px 24px;
  text-align: center;
}

.notice-card--lock {
  margin-top: 12px;
}

.notice-card--compact {
  padding: 24px 20px;
}

.notice-card__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 4px;
  border-radius: 20px;
  background: var(--surface-2);
  color: var(--cyan);
}

.notice-card__avatar {
  margin-bottom: 4px;
}

.notice-card__title {
  font-size: var(--fs-17);
  font-weight: 700;
}

.notice-card__text {
  max-width: 380px;
  color: var(--text-secondary);
  font-size: var(--fs-14);
}

.notice-card form,
.notice-card .btn {
  margin-top: 6px;
}

.connections-modal__controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.connections-modal__body {
  height: min(60vh, 520px);
  padding: 4px 0 8px;
}

.connections-list .list-empty .empty-state {
  padding: 40px 16px;
}

.list-empty .empty-state {
  padding: 36px 16px;
}

.row-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: var(--fs-13);
  white-space: nowrap;
}

.row-note--success {
  color: var(--green);
}

.user-row.is-leaving,
.request-row.is-leaving {
  opacity: 0;
  transform: translateX(12px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.requests-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text);
  text-decoration: none;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.requests-entry:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  text-decoration: none;
}

.requests-entry__avatars {
  display: inline-flex;
  flex-shrink: 0;
}

.requests-entry__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.requests-entry__title {
  font-size: var(--fs-15);
  font-weight: 600;
}

.requests-entry__sub {
  overflow: hidden;
  color: var(--text-muted);
  font-size: var(--fs-13);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.requests-entry__chevron {
  color: var(--text-muted);
}

.notifications {
  overflow: hidden;
}

.notif-list {
  display: flex;
  flex-direction: column;
}

.notif-group {
  padding: 14px 16px 6px;
  color: var(--text-secondary);
  font-size: var(--fs-13);
  font-weight: 700;
  letter-spacing: 0;
}

.notif-group + .notif {
  border-top: 0;
}

.notif {
  --notif-bg: var(--surface);
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: var(--notif-bg);
}

.notif + .notif {
  border-top: 1px solid var(--border);
}

.notif.is-unread {
  --notif-bg: #2C4542;
}

.notif.is-unread::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 5px;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--link);
}

.notif__avatar {
  position: relative;
  flex-shrink: 0;
}

.notif__avatar .avatar {
  --avatar-ring: var(--notif-bg);
}

.notif__brand .avatar__img {
  padding: 6px;
  background: #4B6B6B;
  object-fit: contain;
}

.notif__badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #FFFFFF;
  box-shadow: 0 0 0 2px var(--notif-bg);
}

.notif__badge .icon {
  width: 12px;
  height: 12px;
  stroke-width: 2.5;
}

.notif__badge--like { background: var(--like); }
.notif__badge--like .icon { fill: currentColor; }
.notif__badge--comment { background: var(--accent-hover); }
.notif__badge--follow { background: var(--blue); }
.notif__badge--request { background: var(--warning); color: #2B2208; }
.notif__badge--accept { background: var(--green); color: #0E2A10; }
.notif__badge--system { background: var(--surface-2); color: var(--cyan); }

.notif__body {
  flex: 1;
  min-width: 0;
}

.notif__text {
  font-size: var(--fs-14);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.notif__text .user-link {
  display: inline;
  max-width: none;
  vertical-align: baseline;
}

.notif__text .user-link__name {
  overflow: visible;
  white-space: normal;
}

.notif__actor {
  font-weight: 600;
}

.notif__target {
  font-weight: 600;
}

.notif__quote {
  display: -webkit-box;
  margin-top: 4px;
  padding-left: 10px;
  overflow: hidden;
  border-left: 2px solid var(--border-strong);
  color: var(--text-secondary);
  font-size: var(--fs-13);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.notif__time {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: var(--fs-12);
}

.notif__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.notif__actions form {
  margin: 0;
}

.notif__side {
  flex-shrink: 0;
  align-self: center;
}

.notif__thumb {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-muted);
}

.notif__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notif__thumb--tall {
  width: 36px;
  height: 54px;
  border-radius: 6px;
}

.request-row .user-row__action form {
  margin: 0;
}

.search-header__form {
  flex: 1;
  min-width: 0;
}

.search-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-page__hint {
  padding: 4px 4px 0;
  color: var(--text-secondary);
  font-size: var(--fs-14);
}

.search-page__results .card + .card {
  margin-top: 12px;
}

.explore-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text);
  text-decoration: none;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.explore-link:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  text-decoration: none;
}

.explore-link__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.explore-link__title {
  font-weight: 600;
}

.explore-link__sub {
  color: var(--text-muted);
  font-size: var(--fs-13);
}

.explore-link__chevron {
  color: var(--text-muted);
}

.settings-tabs {
  margin-bottom: 16px;
}

.settings-tabs .tab {
  gap: 8px;
}

.settings-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-media {
  overflow: hidden;
}

.settings-cover__actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
}

.settings-cover__actions form {
  margin: 0;
}

.settings-avatar {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-top: -36px;
  padding: 0 16px 16px;
}

.settings-avatar__picture {
  flex-shrink: 0;
}

.settings-avatar__side {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding-bottom: 2px;
}

.settings-avatar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-avatar__actions form {
  margin: 0;
}

.settings-avatar__hint {
  color: var(--text-muted);
  font-size: var(--fs-12);
}

.settings-file {
  cursor: pointer;
}

.settings-file:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.settings-form > * + * {
  margin-top: 16px;
}

.settings-form > .form-actions {
  margin-top: 22px;
}

.settings-grid {
  display: grid;
  gap: 16px;
}

.settings-grid > .field + .field {
  margin-top: 0;
}

.input-prefix {
  position: relative;
}

.input-prefix__mark {
  position: absolute;
  top: 50%;
  left: 14px;
  color: var(--text-muted);
  font-size: var(--fs-15);
  transform: translateY(-50%);
  pointer-events: none;
}

.input-prefix .input {
  padding-left: 32px;
}

.settings-counter {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.settings-counter .is-full {
  color: var(--warning);
}

.settings-switch-card {
  padding: 16px;
}

.settings-switch {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
}

.settings-switch__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.settings-switch__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-15);
  font-weight: 600;
}

.settings-switch__title .icon {
  color: var(--cyan);
}

.settings-switch__help {
  color: var(--text-secondary);
  font-size: var(--fs-13);
  line-height: 1.45;
}

.settings-note {
  padding: 12px 16px 4px;
  color: var(--text-secondary);
  font-size: var(--fs-13);
}

.danger-zone {
  border-color: rgba(218, 87, 87, .36);
}

.danger-zone .card__title {
  color: var(--danger-hover);
}

.list-form {
  display: block;
  margin: 0;
}

.list > .list-form {
  border-top: 1px solid var(--border);
}

.crop-modal__stage {
  position: relative;
  height: min(58vh, 440px);
  background: #101616;
}

.crop-modal__image {
  display: block;
  max-width: 100%;
}

.crop-modal__spinner {
  position: absolute;
  inset: 0;
  margin: auto;
}

.crop-modal__tools {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
}

.crop-modal__hint {
  margin-left: auto;
  color: var(--text-muted);
  font-size: var(--fs-12);
  text-align: right;
}

.crop-modal .cropper-view-box {
  outline: 2px solid var(--cyan);
  outline-color: rgba(180, 249, 249, .8);
}

.crop-modal .cropper-line,
.crop-modal .cropper-point {
  background-color: var(--cyan);
}

.crop-modal .cropper-modal {
  background-color: #000000;
  opacity: .55;
}

.crop-modal--round .cropper-view-box,
.crop-modal--round .cropper-face {
  border-radius: 50%;
}

@media (max-width: 767.98px) {
  .profile {
    margin: -12px calc(-1 * var(--gutter)) 0;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .profile-alert {
    margin-top: 0;
  }

  .profile-tabs {
    margin: 0 calc(-1 * var(--gutter));
    padding: 0 var(--gutter);
    border-bottom: 1px solid var(--border);
  }

  .profile-tabs .tabs {
    border-bottom: 0;
  }

  .profile-tabs .tab {
    padding: 0 8px;
  }

  .profile-tabs .tab .icon,
  .settings-tabs .tab .icon {
    display: none;
  }

  .profile__actions .btn:not(.btn--icon) .icon:not(.follow__chevron) {
    display: none;
  }

  .profile__actions > .btn.profile__message,
  .profile__actions > .btn.profile__requests {
    flex: 0 0 auto;
  }

  .crop-modal__hint {
    display: none;
  }

  .crop-modal__stage {
    height: min(52vh, 380px);
  }

  .connections-modal__body {
    height: min(64vh, 520px);
  }
}

@media (max-width: 559.98px) {
  .notif {
    flex-wrap: wrap;
  }

  .notif__side {
    flex-basis: 100%;
    padding-left: 52px;
  }

  .request-row {
    flex-wrap: wrap;
  }

  .request-row .user-row__action {
    flex-basis: 100%;
    padding-left: 52px;
  }

  .request-row .user-row__action form {
    flex: 1 1 0;
  }

  .request-row .user-row__action form .btn {
    width: 100%;
  }

  .settings-avatar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

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

@media (min-width: 768px) {
  .profile__body {
    padding: 0 20px 20px;
  }

  .profile__avatar-wrap {
    margin-top: -68px;
  }

  .profile__avatar.avatar--xxl {
    --avatar-size: 128px;
  }

  .profile__name {
    margin-top: 14px;
    font-size: var(--fs-24);
  }

  .profile__actions {
    position: absolute;
    top: 14px;
    right: 20px;
    margin-top: 0;
  }

  .profile__actions > .follow,
  .profile__actions > .btn:not(.btn--icon) {
    flex: 0 0 auto;
  }

  .settings-avatar {
    margin-top: -44px;
    padding: 0 20px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .user-row.is-leaving,
  .request-row.is-leaving {
    transition: none;
  }
}
