/* ===== SIDEBAR ===== */
#sidebar{
  padding: 10px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-userbar{
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 8px;
}

.profiles-catalog-icon-btn{
  position: relative;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,61,141,0.24);
  border-radius: 11px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  box-shadow: 0 10px 20px rgba(255,61,141,0.16);
}

.profiles-catalog-icon-btn__berry{
  position: absolute;
  inset: 0;
  background-image: url("/favicon.png?v=1");
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
}

.profiles-catalog-icon-btn__letter{
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  color: #c21845;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(58, 12, 24, 0.2);
}

.profiles-catalog-icon-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(255,61,141,0.42);
}

#meBadge{
  border: 1px solid var(--panel-soft-border);
  background: var(--panel-soft-bg);
  border-radius: 11px;
  padding: 4px 8px;
  margin-bottom: 0;
  font-size: 13px;
  font-weight: 700;
  flex: 1 1 auto;
  min-width: 0;
}

.user-status-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.35em;
  min-width: 1.35em;
  margin: 0 2px;
  line-height: 1;
  vertical-align: -0.08em;
}

.sidebar-chip-btn--compact {
  width: 100%;
  justify-content: center;
  min-height: 30px;
  padding: 4px 10px;
  margin: 0 0 10px;
  font-size: 12px;
}

.sidebar-share-bar{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.sidebar-share-wrap{
  display: grid;
  gap: 8px;
  margin: 2px 0 10px;
  padding: 8px;
  border: 1px solid var(--panel-soft-border);
  border-radius: 12px;
  background: var(--panel-soft-bg);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.sidebar-share-title{
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
}

.sidebar-share-btn{
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--panel-soft-border);
  border-radius: 10px;
  background: var(--panel-soft-bg);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
  max-width: 28px;
  min-width: 28px;
  max-height: 28px;
  min-height: 28px;
  justify-self: start;
}

.sidebar-share-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(255,61,141,0.28);
}

.sidebar-share-btn__logo{
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.sidebar-share-btn__logo svg{
  width: 18px;
  height: 18px;
  display: block;
}

.sidebar-share-btn--viber{ color: #7360f2; }
.sidebar-share-btn--telegram{ color: #1d9bf0; }
.sidebar-share-btn--whatsapp{ color: #1fa855; }
.sidebar-share-btn--facebook{ color: #1977f3; }

.chat-tools-row{
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0 10px;
  overflow: visible;
}

.chat-guide-start-btn{
  position: relative;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(56,189,248,0.38);
  border-radius: 11px;
  padding: 0;
  cursor: pointer;
  background: linear-gradient(135deg, #ffffff, #e0f2fe);
  color: #075985;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 10px 20px rgba(14,165,233,0.16);
}

.chat-guide-start-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(14,165,233,0.58);
}

.chat-tools-row .theme-panel{
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.moderation-berry-btn,
.share-invite-toggle{
  position: relative;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,61,141,0.24);
  border-radius: 11px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  box-shadow: 0 10px 20px rgba(255,61,141,0.16);
}

.moderation-berry-btn__berry{
  position: absolute;
  inset: 0;
  background-image: url("/favicon.png?v=1");
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
}

.moderation-berry-btn__letter{
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  color: #c21845;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(58, 12, 24, 0.2);
}

.moderation-berry-btn__count{
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e11d48;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.95);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.moderation-berry-btn__support-count{
  position: absolute;
  right: -3px;
  bottom: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.95);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(20, 40, 90, 0.28);
}

.moderation-berry-btn:hover,
.share-invite-toggle:hover{
  transform: translateY(-1px);
  border-color: rgba(255,61,141,0.42);
}

.share-invite-dropdown{
  position: relative;
  flex: 0 0 38px;
}

.share-invite-toggle{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  color: #c21845;
  background: rgba(255,255,255,0.86);
}

.share-invite-toggle__icon{
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 34px;
  display: block;
  z-index: 1;
  filter: drop-shadow(0 2px 5px rgba(58, 12, 24, 0.2));
}

.share-invite-menu{
  position: absolute;
  bottom: calc(100% + 7px);
  right: 0;
  z-index: 25;
  min-width: 150px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--panel-soft-border);
  border-radius: 12px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 18px 38px rgba(0,0,0,0.16);
}

.share-invite-menu.hidden{
  display: none;
}

.share-invite-menu .sidebar-share-btn{
  width: 100%;
  max-width: none;
  min-width: 0;
  height: 32px;
  max-height: none;
  min-height: 32px;
  aspect-ratio: auto;
  justify-content: flex-start;
  gap: 8px;
  padding: 0 10px;
}

.share-invite-label{
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

#rooms strong,
#online strong{
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--muted);
}

#rooms button{
  width: 100%;
  border: 1px solid var(--stroke);
  background: var(--room-btn-bg);
  color: var(--text);
  border-radius: 10px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 13px;
  margin: 4px 0;
  text-align: left;
  transition: transform .12s ease, background .12s ease;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

#rooms button:hover{
  transform: translateY(-1px);
  /*background: rgba(255,61,141,0.16);*/
  background: var(--room-btn-bg);
}

#rooms button.active{
  /*background: linear-gradient(135deg, rgba(255,61,141,0.25), rgba(255,106,169,0.18));
  border-color: rgba(255,61,141,0.35);*/
  background: var(--room-btn-active-bg);
  border-color: var(--room-btn-active-border);
}

.rooms-select{
  display: block;
  width: 100%;
  border: 1px solid var(--stroke);
  background: var(--room-btn-bg);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 34px 9px 10px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  outline: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.rooms-select:focus{
  border-color: var(--room-btn-active-border);
  box-shadow: 0 0 0 2px rgba(255,61,141,0.12);
}

#online{
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(0,0,0,0.12);
  flex: 1;
  overflow: auto;
  min-height: 0;
  font-size: 13px;
  line-height: 1.18;
}

.online-stats{
  margin: 6px 0 8px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.70);
  font-size: 12px;
  color: rgba(40,40,40,0.75);
}

.online-group{ margin-top: 6px; }
.online-group strong{ font-size: 12px; color: rgba(40,40,40,0.75); }

.online-user{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
}

.online-user--birthday{
  margin: 2px -6px;
  padding: 6px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 245, 180, 0.62), rgba(255, 216, 168, 0.48));
  box-shadow:
    0 0 0 1px rgba(244, 180, 0, 0.24) inset,
    0 8px 22px rgba(244, 140, 6, 0.12);
}

.online-user-main{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.online-user-name{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.online-user-birthday{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.78);
  box-shadow: 0 0 0 1px rgba(244, 180, 0, 0.28) inset;
  font-size: 13px;
  line-height: 1;
}

.online-user-rating{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 11px;
  color: rgba(40,40,40,0.72);
  cursor: help;
}

.online-user-rating::after{
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 30;
  display: none;
  min-width: 190px;
  max-width: min(300px, calc(100vw - 32px));
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid rgba(159, 91, 56, 0.18);
  background: rgba(255,255,255,0.98);
  box-shadow: 0 14px 30px rgba(84, 45, 28, 0.16);
  color: rgba(65,43,34,0.94);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  white-space: pre-line;
}

.online-user-rating:hover::after,
.online-user-rating:focus-within::after,
.online-user-rating.is-tooltip-open::after{
  display: block;
}

.online-user-run-icon{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.13);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.18) inset;
  font-size: 13px;
  line-height: 1;
  cursor: help;
}

.online-user-book-icon{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.18) inset;
  font-size: 13px;
  line-height: 1;
  cursor: help;
}

.online-user-tv-icon{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.2) inset;
  font-size: 13px;
  line-height: 1;
  cursor: help;
}

.online-user-garden-icon{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(132, 204, 22, 0.14);
  box-shadow: 0 0 0 1px rgba(101, 163, 13, 0.22) inset;
  font-size: 13px;
  line-height: 1;
  cursor: help;
}

.online-user-run-icon::after{
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 35;
  display: none;
  min-width: 210px;
  max-width: min(320px, calc(100vw - 32px));
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid rgba(34, 197, 94, 0.2);
  background: rgba(255,255,255,0.98);
  box-shadow: 0 14px 30px rgba(22, 101, 52, 0.16);
  color: rgba(25, 55, 36, 0.94);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  white-space: pre-line;
}

.online-user-book-icon::after{
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 35;
  display: none;
  min-width: 210px;
  max-width: min(320px, calc(100vw - 32px));
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  background: rgba(255,255,255,0.98);
  box-shadow: 0 14px 30px rgba(67, 56, 202, 0.14);
  color: rgba(38, 38, 80, 0.94);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  white-space: pre-line;
}

.online-user-tv-icon::after{
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 35;
  display: none;
  min-width: 210px;
  max-width: min(320px, calc(100vw - 32px));
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid rgba(14, 165, 233, 0.2);
  background: rgba(255,255,255,0.98);
  box-shadow: 0 14px 30px rgba(12, 74, 110, 0.14);
  color: rgba(12, 55, 74, 0.94);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  white-space: pre-line;
}

.online-user-garden-icon::after{
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 35;
  display: none;
  min-width: 210px;
  max-width: min(320px, calc(100vw - 32px));
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid rgba(101, 163, 13, 0.22);
  background: rgba(255,255,255,0.98);
  box-shadow: 0 14px 30px rgba(63, 98, 18, 0.14);
  color: rgba(44, 64, 16, 0.94);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  white-space: pre-line;
}

.online-user-run-icon:hover::after,
.online-user-run-icon:focus-visible::after{
  display: block;
}

.online-user-book-icon:hover::after,
.online-user-book-icon:focus-visible::after{
  display: block;
}

.online-user-tv-icon:hover::after,
.online-user-tv-icon:focus-visible::after{
  display: block;
}

.online-user-garden-icon:hover::after,
.online-user-garden-icon:focus-visible::after{
  display: block;
}

.online-user-stars{
  position: relative;
  display: inline-block;
  line-height: 1;
  letter-spacing: 0.08em;
  font-size: 12px;
}

.online-user-stars-base{
  color: rgba(148, 163, 184, 0.48);
}

.online-user-stars-fill{
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  color: #f4b400;
}

.online-user-karma-value{
  font-weight: 700;
  color: rgba(40,40,40,0.8);
}

.online-user-plan-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.online-user-plan-badge.plan-plus{
  background: rgba(74, 163, 255, 0.16);
  color: #1660b8;
}

.online-user-plan-badge.plan-premium{
  background: rgba(255, 179, 71, 0.2);
  color: #b56a09;
}

.online-user-plan-badge.plan-vip{
  background: rgba(255, 92, 120, 0.18);
  color: #b32245;
}

.online-user-info{
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.14);
  background: rgba(255,255,255,0.86);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.online-user-info:hover{
  border-color: rgba(255,61,141,0.26);
}

#online a.uLink{
  color: rgba(40,40,40,0.92);
  text-decoration: none;
  display: inline-block;
  padding: 0;
  margin: 0;
  line-height: 1.15;
}

#online a.uLink:hover{
  text-decoration: underline;
  color: var(--accent);
}

#online .empty{ color: rgba(40,40,40,0.45); }

#logout{
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  position: relative;
  bottom: auto;
  z-index: 1;
  border: 1px solid rgba(255,61,141,0.18);
  border-radius: 11px;
  padding: 0;
  cursor: pointer;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 10px 20px rgba(255,61,141,0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
}

.sidebar-power-icon{
  width: 16px;
  height: 16px;
  display: block;
}

.sidebar-chip-btn{
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 30px;
  border: 1px solid var(--panel-soft-border);
  border-radius: 12px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  background: var(--panel-soft-bg);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.sidebar-chip-btn:hover{
  transform: translateY(-1px);
  border-color: rgba(255,61,141,0.28);
  background: rgba(255,255,255,0.78);
}

.sidebar-chip-btn__icon{
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: var(--accent);
}

/* ===== TOPBAR ===== */
.topbar-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.topbar-btn .icon{
  font-size: 20px;
  line-height: 1;
}

/* ===== RULES ===== */
.rules-banner{
  margin: 8px 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  font-size: 14px;
}

.rules-banner a{
  text-decoration: underline;
}

.rules-page{
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  min-height: 100%;
  height: auto;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.rules-wrap{
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.rules-head,
.rules-lang{
  display: flex;
  align-items: center;
  gap: 12px;
}

.rules-head{
  justify-content: space-between;
  flex-wrap: wrap;
}

.rules-lang{
  gap: 8px;
}

.rules-wrap hr{
  margin: 18px 0;
  opacity: .3;
}

.rules-wrap .muted{
  opacity: .7;
  font-size: 13px;
}

.logo{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.logo .top-rules{
  font-size: 14px;
}

.rules-toplink{
  position: fixed;
  left: 20px;
  top: 20px;
}

a.toplink.rules-toplink{
  left: 20px !important;
  right: auto !important;
  position: absolute !important;
  top: 20px !important;
}

/* ===== PRIVACY ===== */
.privacy-btn{
  margin-top: 8px;
  width: 100%;
}

.privacy-panel{
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
}

.privacy-panel.hidden{
  display: none;
}

.privacy-row{
  margin-bottom: 10px;
}

.privacy-row:last-child{
  margin-bottom: 0;
}

.privacy-check{
  display: flex;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.privacy-add{
  display: flex;
  gap: 10px;
  align-items: center;
}

#ignoreUserIdInput{
  flex: 1;
  min-width: 120px;
}

.privacy-subtitle{
  font-weight: 700;
  margin-bottom: 8px;
}

.ignored-list{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ignored-item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.10);
}

.ignored-item .ignored-id{
  font-weight: 700;
}

.ignored-item button{
  padding: 6px 10px;
  border-radius: 12px;
}

.privacy-hint{
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.75;
  line-height: 1.35;
}

.privacy-search{
  display: flex;
  gap: 10px;
  align-items: center;
}

#ignoreUserSearchInput{
  flex: 1;
}

.ignore-search-results{
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 6px 0 10px;
}

.search-item{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(0,0,0,0.12);
  border: 1px solid rgba(255,255,255,0.10);
}

.search-item .name{
  font-weight: 700;
}

.search-item .meta{
  opacity: .75;
  font-size: 12px;
  margin-left: 8px;
}

/* ===== RELATIONS ===== */
.relations-bar{
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  display: flex;
  gap: 10px;
  padding-top: 4px;
  position: relative;
  z-index: 2;
}

.relations-bar-sidebar{
  margin-top: 10px;
  justify-content: stretch;
  gap: 6px;
  padding-top: 0;
}

.relations-bar-sidebar .relations-open-btn{
  flex: 1 1 0;
}

.relations-open-btn{
  border: 1px solid rgba(255,61,141,0.18);
  background: rgba(255,255,255,0.9);
  color: var(--text);
  border-radius: 999px;
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0,0,0,0.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.relations-open-btn:hover{
  transform: translateY(-1px);
}

.relations-list-panel{
  position: fixed;
  right: 18px;
  top: 18px;
  width: min(320px, calc(100vw - 36px));
  max-height: calc(100vh - 110px);
  z-index: 1450;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.45);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.84));
  box-shadow: 0 24px 70px rgba(0,0,0,0.16);
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.relations-list-panel.hidden{
  display: none !important;
}

.relations-list-panel::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.28), transparent 26%);
}

.relations-list-head{
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  color: #24303f;
}

.relations-friends-head{
  background: linear-gradient(135deg, rgba(193,255,206,0.72), rgba(231,255,236,0.18));
}

.relations-ignore-head{
  background: linear-gradient(135deg, rgba(255,214,222,0.8), rgba(255,238,241,0.18));
}

.relations-list-head strong{
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.relations-close-btn{
  border: none;
  background: rgba(255,255,255,0.72);
  color: rgba(40,40,40,0.72);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 18px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.relations-list-body{
  position: relative;
  z-index: 1;
  padding: 14px 16px 6px;
  overflow: auto;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.relations-empty{
  padding: 14px;
  border-radius: 18px;
  text-align: center;
  font-size: 13px;
  color: rgba(40,40,40,0.62);
  background: rgba(255,255,255,0.56);
  border: 1px dashed rgba(0,0,0,0.08);
}

.relations-row{
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}

.relations-row input[type="checkbox"]{
  width: 18px;
  height: 18px;
  margin: 0;
}

.relations-user{
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.relations-user strong{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(40,40,40,0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.relations-online-dot{
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.16);
}

.relations-user span{
  font-size: 12px;
  color: rgba(40,40,40,0.62);
}

.relations-location-tools{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 7px;
}

.relations-location-toggle,
.relations-location-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  text-decoration: none;
}

.relations-location-toggle{
  border: 1px solid rgba(52, 211, 153, 0.28);
  background: rgba(236, 253, 245, 0.82);
  color: #047857;
  cursor: pointer;
}

.relations-location-toggle.active{
  background: #10b981;
  border-color: rgba(16, 185, 129, 0.78);
  color: #ffffff;
}

.relations-location-link{
  border: 1px solid rgba(59, 130, 246, 0.22);
  background: rgba(239, 246, 255, 0.86);
  color: #1d4ed8;
}

.relations-location-map-btn{
  font: inherit;
  cursor: pointer;
}

.relations-location-time{
  flex-basis: 100%;
}

.relations-count{
  position: relative;
  z-index: 1;
  margin: 2px 16px 0;
  padding: 12px 14px 0;
  font-size: 14px;
  font-weight: 700;
  color: rgba(40,40,40,0.72);
  border-top: 1px solid rgba(0,0,0,0.08);
}

.relations-delete-btn{
  position: relative;
  z-index: 1;
  margin: 12px 16px 16px;
  border: none;
  border-radius: 16px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  color: white;
  background: linear-gradient(135deg, #ff6d8d, #ff8fa8);
  box-shadow: 0 14px 28px rgba(255,109,141,0.22);
}

.relations-check-row{
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 16px 16px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(0,0,0,0.06);
  font-size: 13px;
  color: rgba(40,40,40,0.82);
}

.relations-check-row input{
  width: 18px;
  height: 18px;
  margin: 0;
}

/* ===== TOAST ===== */
#privateBlockedToast{
  position: fixed;
  left: 50%;
  top: 18%;
  transform: translateX(-50%);
  max-width: min(92vw, 520px);
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 210, 210, 0.96);
  color: #3a1a1a;
  border: 1px solid rgba(180, 60, 60, 0.25);
  box-shadow: 0 10px 26px rgba(0,0,0,0.18);
  z-index: 4000;
  font-size: 14px;
  line-height: 1.25;
  display: none;
}

.center-toast{
  position: fixed;
  left: 50%;
  top: 18%;
  transform: translate(-50%, -8px);
  z-index: 1900;
  width: min(420px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 18px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: #4d1b1b;
  background: rgba(255, 233, 236, 0.96);
  border: 1px solid rgba(255, 105, 140, 0.24);
  box-shadow: 0 22px 50px rgba(0,0,0,0.16);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.center-toast[data-tone="info"]{
  color: #263344;
  background: rgba(236, 244, 255, 0.96);
  border-color: rgba(93, 146, 255, 0.22);
}

.center-toast[data-tone="success"]{
  color: #123524;
  background:
    linear-gradient(135deg, rgba(236, 253, 245, 0.98), rgba(220, 252, 231, 0.96));
  border-color: rgba(34, 197, 94, 0.28);
  box-shadow: 0 24px 56px rgba(22, 101, 52, 0.18);
}

.center-toast.is-visible{
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ===== CLICK/TAP SAFETY ===== */
#privateBtn, #privateShowBtn,
#chatsBtn, #roomsBtn, #conversationsBtn,
#menuBtn, #privacyBtn{
  pointer-events: auto !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

#menuBtn, #privateBtn, #privacyBtn{
  position: relative;
  z-index: 100000;
}

header, #topbar, .topbar, .header, .toolbar{
  pointer-events: auto;
}

#mobileTopbar{
  position: relative;
  z-index: 99999;
  pointer-events: auto;
}

/* ===== THEME PANEL ===== */
.theme-panel{
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(0,0,0,0.08);
  flex: 0 1 auto;
  min-height: 0;
}

.theme-toggle{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  text-align: left;
}

.theme-toggle-icon{
  transition: transform 0.18s ease;
}

.theme-panel-body{
  overflow: hidden;
  max-height: 600px;
  opacity: 1;
  transition: max-height 0.25s ease, opacity 0.2s ease, margin-top 0.2s ease;
  margin-top: 10px;
}



.theme-panel.is-collapsed .theme-panel-body{
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  pointer-events: none;
}

.theme-panel.is-collapsed .theme-toggle-icon{
  transform: rotate(-90deg);
}


.theme-grid{
  display: grid;
  gap: 12px;
}

.theme-field{
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 6px;
  font-size: 12px;
  color: rgba(40,40,40,0.85);
  min-width: 0;
}

.theme-field span{
  line-height: 1.2;
  min-width: 0;
}

.theme-field input[type="color"]{
  width: 100%;
  height: 38px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.theme-field input[type="range"]{
  width: 100%;
  margin: 0;
}

.theme-field input[type="number"]{
  width: 100%;
  min-width: 0;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.92);
  color: var(--text);
  font-size: 12px;
}

.theme-inline-number{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.theme-inline-number input[type="number"]{
  flex: 0 0 88px;
}

.theme-inline-number span{
  flex: 0 0 auto;
}

.theme-field select{
  width: 100%;
  min-width: 0;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.92);
  color: var(--text);
  font-size: 12px;
}

.theme-text-settings{
  margin-top: 12px;
}

.theme-reset-btn{
  margin-top: 10px;
  width: 100%;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.7);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}

.theme-link-btn{
  margin-top: 10px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.82);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 12px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
/* ===== LOGOUT MODAL ===== */
.hidden {
  display: none !important;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(20, 14, 22, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

#confirmActionModal{
  z-index: 2147483647;
}

.modal-card {
  width: min(100%, 420px);
  border-radius: 22px;
  border: 1px solid rgba(255, 80, 140, 0.18);
  background: rgba(255,255,255,0.92);
  box-shadow: 0 24px 60px rgba(0,0,0,0.22);
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.modal-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  color: var(--text);
}

.modal-close {
  border: 1px solid var(--stroke);
  background: rgba(255,61,141,0.08);
  border-radius: 12px;
  width: 38px;
  height: 38px;
  cursor: pointer;
  font-size: 16px;
}

.modal-body {
  padding: 16px 18px 6px;
}

.modal-body p {
  margin: 0 0 10px;
}

.confirm-action-media{
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(255,236,243,0.96));
  border: 1px solid rgba(255, 80, 140, 0.16);
  box-shadow: 0 16px 32px rgba(255, 80, 140, 0.1);
}

.confirm-action-media.hidden{
  display: none;
}

.confirm-action-media-avatar{
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 999px;
  background: center / cover no-repeat rgba(255,255,255,0.96);
  background-image: url("/pictures/strawberry2.jpg");
  border: 2px solid rgba(255, 80, 140, 0.18);
  box-shadow: 0 10px 22px rgba(255, 80, 140, 0.14);
}

.confirm-action-media-copy{
  display: grid;
  gap: 4px;
  min-width: 0;
}

.confirm-action-media-copy strong{
  font-size: 15px;
  line-height: 1.2;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.confirm-action-media-status{
  font-size: 13px;
  line-height: 1.35;
  color: rgba(40,40,40,0.72);
}

.modal-hint {
  font-size: 13px;
  color: rgba(40,40,40,0.68);
  line-height: 1.4;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px 18px;
}

.modal-btn {
  border: none;
  border-radius: 14px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.modal-btn.secondary {
  background: rgba(0,0,0,0.06);
  color: var(--text);
}

.modal-btn.danger {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 10px 24px rgba(255,61,141,0.24);
}

.guest-claim-fields{
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.guest-claim-field{
  display: grid;
  gap: 6px;
}

.guest-claim-field span{
  font-size: 13px;
  font-weight: 700;
  color: rgba(40,40,40,0.78);
}

.guest-claim-field input,
.guest-claim-field select{
  width: 100%;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  background: rgba(255,255,255,0.94);
}

.guest-intro-card .modal-actions{
  justify-content: space-between;
}

.guest-claim-message{
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.4;
}

.guest-claim-message.is-error{
  background: rgba(185, 28, 28, 0.08);
  color: #991b1b;
}

.guest-claim-message.is-success{
  background: rgba(22, 163, 74, 0.08);
  color: #166534;
}

.guest-claim-share{
  margin-top: 14px;
}

#restrictionNoticeModal[data-tone="danger"] .modal-card{
  border-color: rgba(185, 28, 28, 0.28);
  box-shadow: 0 28px 70px rgba(127, 29, 29, 0.26);
}

#restrictionNoticeModal[data-tone="danger"] .modal-head{
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.12), rgba(255,255,255,0.62));
  border-bottom-color: rgba(185, 28, 28, 0.14);
}

#restrictionNoticeModal[data-tone="danger"] .modal-head h3{
  color: #991b1b;
}

#restrictionNoticeModal[data-tone="danger"] .modal-btn.danger{
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow: 0 10px 24px rgba(185, 28, 28, 0.28);
}

#restrictionNoticeModal[data-tone="danger"] .modal-card{
  width: min(720px, calc(100vw - 24px));
}

.ban-garden{
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.ban-garden.hidden{
  display: none;
}

.ban-garden__notice{
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(185, 28, 28, 0.16);
  background: rgba(255, 247, 247, 0.94);
  color: #7f1d1d;
}

.ban-garden__notice strong{
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ban-garden__notice span{
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ban-garden__notice a{
  justify-self: start;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ban-garden__hud{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ban-garden__hud > div{
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(254, 242, 242, 0.9);
  border: 1px solid rgba(185, 28, 28, 0.12);
}

.ban-garden__label{
  display: block;
  margin-bottom: 2px;
  color: rgba(127, 29, 29, 0.72);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.ban-garden__hud strong{
  color: #7f1d1d;
  font-size: 20px;
  line-height: 1.1;
}

.ban-garden__field{
  position: relative;
  height: min(46vh, 360px);
  min-height: 260px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(34, 197, 94, 0.24);
  background:
    linear-gradient(180deg, rgba(186, 230, 253, 0.95) 0%, rgba(220, 252, 231, 0.96) 62%, rgba(74, 222, 128, 0.78) 63%, rgba(22, 163, 74, 0.86) 100%);
  box-shadow: inset 0 -18px 28px rgba(21, 128, 61, 0.14);
  outline: none;
  touch-action: none;
}

.ban-garden__field:focus-visible{
  box-shadow:
    inset 0 -18px 28px rgba(21, 128, 61, 0.14),
    0 0 0 3px rgba(34, 197, 94, 0.22);
}

.ban-garden__sun{
  position: absolute;
  top: 18px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: radial-gradient(circle, #fde68a 0%, #f59e0b 72%);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.35);
}

.ban-garden__cloud{
  position: absolute;
  width: 86px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255,255,255,0.82);
  box-shadow:
    18px -10px 0 2px rgba(255,255,255,0.82),
    42px -4px 0 4px rgba(255,255,255,0.82);
}

.ban-garden__cloud.cloud-a{
  top: 44px;
  left: 24px;
}

.ban-garden__cloud.cloud-b{
  top: 86px;
  right: 142px;
  transform: scale(0.72);
  opacity: 0.78;
}

.ban-garden__tree{
  position: absolute;
  bottom: 72px;
  width: 92px;
  height: 118px;
  border-radius: 46px 46px 34px 34px;
  background: radial-gradient(circle at 30% 32%, #86efac 0 18%, #22c55e 19% 100%);
}

.ban-garden__tree::after{
  content: "";
  position: absolute;
  left: 38px;
  bottom: -44px;
  width: 16px;
  height: 58px;
  border-radius: 8px;
  background: #9a5b2f;
}

.ban-garden__tree.tree-a{
  left: 28px;
}

.ban-garden__tree.tree-b{
  right: 38px;
  transform: scale(0.86);
}

.ban-garden__fruit{
  position: absolute;
  top: -32px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: 27px;
  line-height: 1;
  filter: drop-shadow(0 6px 6px rgba(21, 83, 45, 0.2));
  user-select: none;
  pointer-events: none;
}

.ban-garden__basket{
  position: absolute;
  left: 50%;
  bottom: 14px;
  width: 64px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 42px;
  line-height: 1;
  transform: translateX(-50%);
  filter: drop-shadow(0 8px 8px rgba(21, 83, 45, 0.22));
  user-select: none;
}

.ban-garden__catch{
  position: absolute;
  color: #166534;
  font-size: 13px;
  font-weight: 900;
  pointer-events: none;
  animation: banGardenPop 700ms ease forwards;
}

.ban-garden__hint{
  margin: 0;
  color: rgba(127, 29, 29, 0.74);
  font-size: 12px;
  text-align: center;
}

@keyframes banGardenPop{
  from{ opacity: 1; transform: translateY(0) scale(1); }
  to{ opacity: 0; transform: translateY(-24px) scale(1.08); }
}

#restrictionNoticeModal[data-tone="warning"] .modal-card{
  border-color: rgba(217, 119, 6, 0.26);
  box-shadow: 0 28px 70px rgba(180, 83, 9, 0.22);
}

#restrictionNoticeModal[data-tone="warning"] .modal-head{
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(255,255,255,0.62));
  border-bottom-color: rgba(217, 119, 6, 0.14);
}

#restrictionNoticeModal[data-tone="warning"] .modal-head h3{
  color: #9a3412;
}

#restrictionNoticeModal[data-tone="warning"] .modal-btn.danger{
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.24);
}

#restrictionNoticeModal[data-tone="warning"] .modal-head h3{
  font-size: 22px;
  line-height: 1.2;
}

#restrictionNoticeModal[data-tone="warning"] .modal-body p{
  font-size: 24px;
  line-height: 1.6;
}

#restrictionNoticeModal[data-tone="warning"] .modal-hint{
  font-size: 17px;
  line-height: 1.55;
}

.attachment-viewer-card {
  width: min(calc(100vw - 8px), 1320px);
  max-height: calc(100dvh - 8px);
  display: flex;
  flex-direction: column;
  border-radius: 8px;
}

#attachmentViewerModal{
  padding: 4px;
}

#attachmentViewerModal .modal-head{
  flex: 0 0 auto;
  padding: 6px 8px;
  gap: 8px;
}

#attachmentViewerModal .modal-head h3{
  font-size: 14px;
}

#attachmentViewerModal .modal-close{
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

#attachmentViewerModal .modal-actions{
  flex: 0 0 auto;
  padding: 5px 8px 7px;
  gap: 5px;
}

.profile-viewer-window{
  position: fixed;
  margin: 0;
  z-index: 50020;
  overflow: hidden;
}

.profile-viewer-card{
  width: min(100%, 980px);
  height: min(88vh, 860px);
  display: flex;
  flex-direction: column;
}

.profile-viewer-controls{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.profile-viewer-window .modal-head{
  background: #fff;
}

.profile-viewer-body{
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
}

.profile-viewer-frame{
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: 0;
  background: #fff;
}

.profile-viewer-mobile{
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 14px;
  padding: 14px;
  height: 100%;
  overflow-y: auto;
  background: #fff;
}

.profile-viewer-mobile-stage{
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,244,238,0.95), rgba(255,232,242,0.88));
  min-height: 0;
  aspect-ratio: 1 / 1;
  align-self: start;
  touch-action: pan-y;
}

.profile-viewer-mobile-stage img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-viewer-mobile-photo-count{
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.profile-viewer-mobile-copy{
  display: grid;
  gap: 8px;
}

.profile-viewer-mobile-copy strong{
  font-size: 22px;
  line-height: 1.05;
}

.profile-viewer-mobile-copy span{
  font-size: 14px;
  color: rgba(40,40,40,0.68);
}

.profile-viewer-mobile-copy p{
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.profile-viewer-mobile-interests{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-viewer-mobile-interests span{
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 48, 62, 0.12);
  background: rgba(255,255,255,0.9);
  color: #0f3443;
  font-size: 12px;
  font-weight: 800;
}

.profile-viewer-mobile-map-wrap{
  display: grid;
  gap: 8px;
}

.profile-viewer-mobile-map-label{
  font-size: 13px;
  font-weight: 800;
  color: rgba(40,40,40,0.74);
}

.profile-viewer-mobile-map{
  display: block;
  width: 100%;
  height: 220px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 18px;
  background: #f8fafc;
}

.profile-viewer-mobile-actions{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.profile-viewer-mobile-btn{
  appearance: none;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 16px;
  background: rgba(255,255,255,0.96);
  color: #1f2937;
  font: inherit;
  font-weight: 800;
  padding: 12px 14px;
  cursor: pointer;
}

.profile-viewer-mobile-btn.primary{
  border-color: rgba(255, 61, 141, 0.18);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
}

.profile-viewer-mini-badge{
  position: fixed;
  left: 12px;
  top: calc(100vh - 84px);
  z-index: 50020;
  width: 72px;
  height: 72px;
  border: none;
  border-radius: 22px;
  padding: 0;
  background: linear-gradient(160deg, rgba(255,255,255,0.98), rgba(255,240,246,0.96));
  box-shadow: 0 20px 40px rgba(0,0,0,0.22), 0 0 0 1px rgba(255, 61, 141, 0.18);
  cursor: pointer;
  overflow: hidden;
}

.profile-viewer-mini-badge-photo{
  display: block;
  width: 100%;
  height: 100%;
  background-image: url("/pictures/strawberry2.jpg");
  background-size: cover;
  background-position: center;
}

.attachment-viewer-copy {
  min-width: 0;
}

.attachment-viewer-meta {
  margin: 1px 0 0;
  font-size: 11px;
  color: rgba(40,40,40,0.68);
}

.attachment-viewer-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 3px;
  padding: 3px 4px;
}

.attachment-viewer-stage {
  --attachment-viewer-zoom: 1;
  --attachment-viewer-rotation: 0deg;
  position: relative;
  width: 100%;
  height: min(calc(100dvh - 92px), 860px);
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: rgba(12, 12, 16, 0.72);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  touch-action: pan-x pan-y;
}

.attachment-viewer-stage img,
.attachment-viewer-stage video {
  max-width: 100%;
  max-height: min(calc(100dvh - 92px), 860px);
  display: block;
  object-fit: contain;
  background: transparent;
}

.attachment-viewer-stage.is-image{
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.attachment-viewer-stage.is-image.is-dragging-image{
  cursor: grabbing;
  overflow: hidden;
  user-select: none;
}

.attachment-viewer-stage.is-image .attachment-viewer-image{
  max-width: none;
  max-height: none;
  width: calc(min(100%, 100vh) * var(--attachment-viewer-zoom));
  height: auto;
  margin: auto;
  object-fit: initial;
  transform: rotate(var(--attachment-viewer-rotation));
  transform-origin: center center;
  -webkit-user-drag: none;
  user-select: none;
}

.attachment-viewer-zoom-floating{
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(15,23,42,0.72);
  box-shadow: 0 10px 24px rgba(0,0,0,0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.attachment-viewer-zoom-floating button{
  min-width: 38px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255,255,255,0.92);
  color: #111827;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.attachment-viewer-zoom-floating button:hover,
.attachment-viewer-zoom-floating button:focus-visible{
  background: #fff;
  outline: none;
}

.attachment-viewer-stage video {
  width: 100%;
}

.attachment-viewer-empty {
  padding: 28px;
  text-align: center;
  color: rgba(241,241,245,0.9);
}

.attachment-viewer-file {
  max-width: 420px;
  padding: 24px;
  text-align: center;
  color: rgba(241,241,245,0.94);
}

.attachment-viewer-file strong {
  display: block;
  font-size: 16px;
  margin-bottom: 8px;
}

.attachment-viewer-file span {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(203,213,225,0.82);
}

.attachment-viewer-nav {
  width: 22px;
  height: 46px;
  border: 1px solid rgba(255, 80, 140, 0.18);
  border-radius: 6px;
  background: rgba(255,255,255,0.92);
  color: var(--text);
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}

.attachment-viewer-nav:disabled {
  opacity: 0.42;
  cursor: default;
}

.attachment-viewer-actions {
  justify-content: flex-end;
}

#attachmentViewerZoomOutBtn,
#attachmentViewerZoomResetBtn,
#attachmentViewerZoomInBtn{
  min-width: 34px;
  min-height: 30px;
  padding-inline: 8px;
}

/* ===== THEME PANEL SCROLL ===== */
.theme-panel {
  min-height: 0;
}

.theme-panel-body {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: min(36vh, 320px);
  padding-right: 6px;
}

.theme-panel-body::-webkit-scrollbar {
  width: 8px;
}

.theme-panel-body::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.16);
  border-radius: 999px;
}

.theme-panel-body::-webkit-scrollbar-track {
  background: transparent;
}

.theme-panel.is-collapsed .theme-panel-body {
  max-height: 0 !important;
  overflow: hidden;
  padding-right: 0;
}

@media (max-height: 900px) {
  .theme-panel-body {
    max-height: min(30vh, 260px);
  }
}

@media (max-height: 760px) {
  .theme-panel-body {
    max-height: min(24vh, 220px);
  }
}
/* ===== USER CONTEXT MENU ===== */
.user-context-menu {
  position: fixed;
  z-index: 200000;
  width: max-content;
  max-width: min(320px, calc(100vw - 16px));
  min-width: 0;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(255, 80, 140, 0.16);
  background: rgba(255,255,255,0.95);
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.user-context-menu,
.user-context-menu * {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.user-context-menu-btn {
  width: 100%;
  border: none;
  background: transparent;
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;

  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.user-context-menu-btn__icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  opacity: 0.92;
}

.user-context-menu-btn__icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.user-context-menu-item {
  width: 100%;
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  line-height: 1.35;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.user-context-menu-btn:hover,
.user-context-menu-btn:active,
.user-context-menu-btn:focus,
.user-context-menu-item:hover,
.user-context-menu-item:active,
.user-context-menu-item:focus {
  background: rgba(255,61,141,0.10);
  outline: none;
}

.message-reaction-inline-row{
  display:flex;
  flex-wrap:nowrap;
  gap:6px;
  padding:2px 2px 10px;
  margin-bottom:4px;
  border-bottom:1px solid rgba(255, 80, 140, 0.12);
  width: min(100%, 320px);
  max-width: min(320px, calc(100vw - 32px));
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,61,141,0.45) rgba(255,255,255,0.5);
  position: relative;
  scroll-behavior: smooth;
}

.message-forward-menu{
  min-width: 210px;
  max-width: min(280px, calc(100vw - 20px));
}

.message-forward-menu__title{
  padding: 4px 8px 10px;
  font-size: 12px;
  font-weight: 800;
  color: rgba(40,40,40,.64);
  text-transform: uppercase;
  letter-spacing: .02em;
}

.message-forward-menu__list{
  display: grid;
  gap: 4px;
  max-height: min(320px, calc(100vh - 80px));
  overflow: auto;
}

.message-reaction-inline-row .reaction-inline-option{
  width:auto;
  min-width:42px;
  padding:8px 11px;
  text-align:center;
  font-size:22px;
  line-height:1;
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,0.74);
  background:
    radial-gradient(circle at 30% 22%, rgba(255,255,255,0.98), rgba(255,255,255,0) 48%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,240,247,0.96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.88),
    0 10px 18px rgba(255,61,141,0.10);
  transition:
    transform 0.14s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.message-reaction-inline-row .reaction-inline-option .kolobok-img,
.message-reaction-inline-row .reaction-inline-option .kolobok{
  width: 26px;
  height: 26px;
  max-width: 30px;
  max-height: 30px;
  font-size: 22px;
  vertical-align: middle;
}

.message-reaction-inline-row::-webkit-scrollbar{
  height: 8px;
}

.message-reaction-inline-row::-webkit-scrollbar-track{
  background: rgba(255,255,255,0.54);
  border-radius: 999px;
}

.message-reaction-inline-row::-webkit-scrollbar-thumb{
  background: linear-gradient(180deg, rgba(255, 122, 173, 0.9), rgba(255, 178, 94, 0.88));
  border-radius: 999px;
}

.message-reaction-inline-row .reaction-inline-option:hover,
.message-reaction-inline-row .reaction-inline-option:focus{
  transform: translateY(-1px) scale(1.03);
  border-color: rgba(255, 122, 173, 0.24);
  background:
    radial-gradient(circle at 30% 22%, rgba(255,255,255,1), rgba(255,255,255,0) 48%),
    linear-gradient(180deg, rgba(255,250,252,1), rgba(255,228,239,0.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 13px 22px rgba(255,61,141,0.14);
}

.message-reaction-inline-row .reaction-inline-option--more{
  min-width:42px;
  padding-inline: 0;
  font-size:22px;
  font-weight:700;
  color: var(--accent);
  position: sticky;
  right: 0;
  z-index: 2;
  margin-left: auto;
  background:
    radial-gradient(circle at 28% 20%, rgba(255,255,255,1), rgba(255,255,255,0) 42%),
    linear-gradient(180deg, rgba(255,244,177,0.96), rgba(255,198,230,0.98) 48%, rgba(188,224,255,0.96));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.92),
    -8px 0 12px rgba(255,255,255,0.8),
    0 13px 22px rgba(255,61,141,0.16);
}

.reaction-users-menu{
  min-width: 140px;
  max-width: min(260px, calc(100vw - 16px));
  padding: 8px;
}

.reaction-users-title{
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 8px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(70,70,70,0.72);
}

.reaction-users-title__emoji{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
}

.reaction-users-item{
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--text);
}
