.inline-emoji {
  max-width: 100px;
  max-height: 100px;
  vertical-align: middle;
  object-fit: contain;
}
.emoji-picker {
  position: fixed;
  z-index: 110;
  left: 88px;
  bottom: 60px;
  width: 400px;
  height: 360px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 10px 30px #0003;
  display: flex;
  flex-direction: column;
  padding: 4px;
}
.emoji-picker nav {
  display: flex;
  height: 36px;
  flex-shrink: 0;
}
.emoji-picker nav button {
  flex: 1;
  border: 1px solid #ddd;
  color: #666;
  background: #fff;
}
.emoji-picker nav button:first-child {
  flex: 0 0 50px;
}
.emoji-picker .selected {
  background: #f5f5f5;
  font-weight: bold;
}
.emoji-grid {
  padding: 10px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  grid-auto-rows: 48px;
  align-content: start;
}
.emoji-grid.animate {
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  grid-auto-rows: 60px;
}
.emoji-grid button {
  border: 0;
  background: white;
  padding: 5px;
  display: grid;
  place-items: center;
}
.emoji-grid button:hover {
  background: #f1f5f9;
}
.emoji-grid img {
  max-width: 34px;
  max-height: 34px;
}
.emoji-grid.animate img {
  max-width: 44px;
  max-height: 44px;
}
.vip-locked {
  text-align: center;
  padding: 55px 8px 20px;
}
.vip-medal {
  display: grid;
  place-items: center;
  margin: auto;
  background: #ffb600;
  color: white;
  width: 56px;
  height: 56px;
  border-radius: 50%;
}
.vip-locked h3 {
  font-size: 16px;
  margin: 16px 0;
}
.vip-locked p {
  font-size: 12px;
  line-height: 20px;
  color: #6c7b90;
}
.vip-locked button {
  background: #f2ad00;
  border: 0;
  border-radius: 24px;
  padding: 10px 20px;
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.social-popup {
  position: fixed;
  z-index: 100;
  left: 88px;
  bottom: 65px;
  width: 380px;
  height: 520px;
  max-height: calc(var(--visible-height, 100vh) - 80px);
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 16px;
  box-shadow: 0 10px 35px #0003;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.social-popup header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  min-height: 52px;
}
.social-popup header button {
  border: 0;
  background: none;
  color: #77808d;
}
.conversation-list {
  overflow: auto;
}
.conversation-list > button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #eee;
  padding: 14px;
  text-align: left;
}
.conversation-list span {
  flex: 1;
  min-width: 0;
}
.conversation-list small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #7d8592;
}
.profile-content {
  padding: 20px;
  text-align: center;
  overflow: auto;
}
.profile-content > .ref-avatar {
  width: 96px;
  height: 96px;
}
.profile-tabs {
  border-block: 1px solid #eee;
  padding: 12px;
  margin: 16px -20px;
}
.profile-content label {
  display: block;
  text-align: left;
  font-size: 12px;
  margin: 12px 0;
}
.profile-content input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
}
.feature-primary {
  border: 0;
  background: #387ffe;
  color: #fff;
  padding: 10px 16px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.feature-primary:disabled {
  opacity: 0.5;
}
.pm-messages {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #f5f6f8;
  padding: 12px;
}
.pm-message {
  background: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  margin: 8px 0;
  max-width: 85%;
  width: fit-content;
  overflow-wrap: anywhere;
}
.pm-message.outgoing {
  margin-left: auto;
  background: #e4efff;
}
.pm-message small {
  display: block;
  font-size: 10px;
  text-align: right;
  color: #8c96a2;
}
.pm-popup form {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #eee;
}
.pm-popup input {
  min-width: 0;
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 10px;
}
.person[data-profile] {
  cursor: pointer;
}
@media (max-width: 767px) {
  .emoji-picker {
    left: 4px;
    bottom: 52px;
    width: calc(100% - 8px);
    max-height: calc(var(--visible-height, 100vh) - 110px);
  }
  .social-popup {
    left: 0;
    bottom: 0;
    width: 100%;
    height: var(--visible-height, 100vh);
    max-height: none;
    border-radius: 0;
  }
}
@media (min-width: 768px) {
  .profile-popup {
    left: auto;
    right: 0;
    top: 56px;
    bottom: 0;
    width: 360px;
    height: auto;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
  }
}
.header-actions .ref-icon {
  position: relative;
}
.header-count {
  position: absolute;
  right: 0;
  top: 0;
  font-size: 9px;
  line-height: 15px;
  min-width: 15px;
  background: #ef4444;
  color: #fff;
  border-radius: 9px;
  padding: 0 3px;
}
.notification-tabs {
  display: flex;
  width: 100%;
}
.notification-tabs button {
  flex: 1;
  border: 1px solid #ddd;
  background: #fff;
  padding: 10px 4px;
  font-size: 12px;
}
.notification-tabs .selected {
  background: #f5f5f5;
  font-weight: 600;
}
.notification-item {
  display: flex;
  gap: 10px;
  padding: 12px 8px;
  border-bottom: 1px solid #eee;
  font-size: 12px;
}
.notification-item > div {
  min-width: 0;
  flex: 1;
}
.notification-item.unread {
  background: #eff6ff;
}
.notification-item p {
  overflow-wrap: anywhere;
  margin: 5px 0;
}
.notification-item time {
  font-size: 10px;
  color: #8994a3;
}
.notification-item button {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 6px;
  font-size: 11px;
  padding: 6px;
  margin-top: 8px;
  color: #60718a;
}
.request-actions {
  display: flex;
  gap: 8px;
}
.request-actions button:first-child {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}
.notification-empty {
  text-align: center;
  padding: 48px 16px;
  color: #7b8797;
}
.notification-empty > .material-symbols-outlined {
  font-size: 36px;
}
.profile-follow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border: 1px solid #ddd;
  border-radius: 20px;
  background: #fff;
  color: #61728a;
  margin: 8px;
}
.plus-menu {
  position: fixed;
  z-index: 110;
  width: 210px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 24px #0003;
  padding: 6px;
}
.plus-menu button {
  display: flex;
  width: 100%;
  gap: 10px;
  align-items: center;
  border: 0;
  background: white;
  padding: 10px;
  text-align: left;
}

.plus-menu small {
  display: block;
  font-size: 10px;
  color: #8090a0;
}
.gif-popup {
  left: 50%;
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: 560px;
  height: auto;
  max-height: 70vh;
  border-radius: 16px;
  background: #f6f6f6;
}
.gif-search {
  padding: 4px 12px 8px;
}
.gif-search label {
  display: flex;
  gap: 8px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 8px 12px;
}
.gif-search input {
  border: 0;
  outline: none;
  min-width: 0;
  width: 100%;
  background: none;
}
.gif-search small {
  display: block;
  margin-top: 6px;
  color: #7b8797;
}
.gif-results {
  overflow: auto;
  columns: 3;
  column-gap: 8px;
  padding: 0 12px 8px;
  max-height: 44vh;
}
.gif-results button {
  display: block;
  break-inside: avoid;
  width: 100%;
  border: 0;
  background: #eee;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}
.gif-results img {
  display: block;
  width: 100%;
}
@media (max-width: 767px) {
  .gif-popup {
    left: 0;
    top: 0;
    bottom: 0;
    transform: none;
    width: 100%;
    height: var(--visible-height, 100vh);
    max-height: none;
    border-radius: 0;
  }
  .gif-results {
    columns: 2;
    max-height: none;
    flex: 1;
  }
}
.gif-backdrop {
  position: fixed;
  inset: 0;
  background: #0006;
  z-index: 100;
}
.gif-popup {
  z-index: 101;
  width: 360px;
  max-width: 94vw;
  max-height: 85vh;
  border-radius: 14px;
}
.gif-popup header {
  justify-content: center;
  position: relative;
}
.gif-popup header strong {
  font-size: 17px;
}
.gif-popup header button {
  position: absolute;
  left: 12px;
  right: auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  border: 1px solid #ddd;
  display: grid;
  place-items: center;
}
.plus-menu [data-feature="gifs"] > .material-symbols-outlined {
  color: #10b981;
  background: #d1fae5;
  padding: 6px;
  border-radius: 8px;
}
@media (max-width: 767px) {
  .gif-backdrop {
    top: 48px;
  }
  .gif-popup {
    top: 48px;
    height: calc(var(--visible-height, 100vh) - 48px);
    width: 100%;
    max-width: none;
    border-radius: 14px 14px 0 0;
    max-height: none;
  }
}

.profile-follow{border-radius:8px;font-size:12px;padding:8px;margin:8px 0}.profile-follow .material-symbols-outlined{font-size:16px}.profile-follow[data-status="accepted"]{background:#22c55e0d;border-color:#22c55e4d;color:#16a34a}.profile-follow[data-status="pending"]{background:#eab3080d;border-color:#eab3084d;color:#ca8a04}
.inline-emoji.inline-gif{max-width:200px;max-height:260px;height:auto;border-radius:12px;margin-bottom:8px}.pm-message .inline-gif{max-height:200px;border-radius:8px}
