/* v147 — комната общения: люди, быстрые действия и более понятная шапка локации. */
.world-people-button,
.chat-people-all,
.room-switch-trigger {
  font: inherit;
}

.world-people-button {
  min-height: 40px;
  padding: 0 11px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  background: rgba(255,255,255,.12);
  white-space: nowrap;
  font-size: 12px;
  font-weight: 750;
}
.world-people-button:hover { background: rgba(255,255,255,.20); }
.world-people-button .ui-icon { width: 16px; height: 16px; }
.world-people-button b {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.17);
  font-size: 10px;
}

.room-switch-trigger {
  width: auto !important;
  min-width: 132px;
  height: 40px !important;
  padding: 0 11px 0 13px;
  border-radius: 13px !important;
  display: inline-flex !important;
  grid-template-columns: none !important;
  gap: 6px;
  color: #fff;
  background: rgba(255,255,255,.12) !important;
  font-size: 12px;
  font-weight: 750;
}
.room-switch-trigger:hover,
.room-native-menu-world[open] .room-switch-trigger { background: rgba(255,255,255,.20) !important; }
.room-switch-trigger .ui-icon { width: 13px !important; height: 13px !important; transform: rotate(90deg); opacity: .85; }

.chat-people-all {
  height: 30px;
  padding: 0 10px;
  border: 1px solid #e4e8ed;
  border-radius: 10px;
  color: #687484;
  background: #f8fafc;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}
.chat-people-all:hover { color: var(--blue); border-color: #d6dff3; background: #f3f6ff; }
.chat-people-all b { color: inherit; }

.composer-emoji-wrap { position: relative; }
.composer-emoji-picker {
  position: absolute;
  left: 0;
  bottom: calc(100% + 12px);
  z-index: 90;
  width: 196px;
  padding: 9px;
  border: 1px solid #e2e6eb;
  border-radius: 15px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 15px 40px rgba(37,48,62,.18);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.composer-emoji-picker[hidden] { display: none !important; }
.composer-emoji-picker button {
  height: 48px;
  border-radius: 12px;
  background: #f7f8fa;
  font-size: 23px;
}
.composer-emoji-picker button:hover { background: #edf2ff; transform: translateY(-1px); }

.room-people-backdrop {
  position: absolute;
  inset: 0;
  z-index: 245;
  background: rgba(31,42,54,.18);
  backdrop-filter: blur(1px);
}
.room-people-backdrop[hidden],
.room-people-panel[hidden],
.room-person-card[hidden] { display: none !important; }

.room-people-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 250;
  width: min(390px, calc(100% - 24px));
  display: flex;
  flex-direction: column;
  background: #fff;
  border-left: 1px solid #e2e7ec;
  box-shadow: -18px 0 55px rgba(34,47,61,.16);
  animation: room-panel-in .16s ease-out;
}
@keyframes room-panel-in { from { transform: translateX(22px); opacity: .65; } to { transform: none; opacity: 1; } }

.room-people-head {
  min-height: 94px;
  padding: 18px 18px 15px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #edf0f3;
}
.room-people-head small { color: var(--blue); font-size: 9px; font-weight: 850; letter-spacing: 1.1px; }
.room-people-head h2 { margin: 3px 0 2px; font-size: 21px; line-height: 1.1; }
.room-people-head p { margin: 0; color: #8a94a0; font-size: 11px; }
.room-people-head > button {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 12px;
  color: #7d8792;
  background: #f4f6f8;
  font-size: 23px;
}
.room-people-head > button:hover { background: #eceff3; color: #384451; }

.room-people-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
}
.room-person-row {
  min-height: 72px;
  padding: 8px;
  display: grid;
  grid-template-columns: 54px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  border-radius: 15px;
}
.room-person-row:hover { background: #f7f9fb; }
.room-person-row > .character-portrait {
  width: 54px;
  height: 54px;
  border: 2px solid #fff;
  box-shadow: 0 2px 10px rgba(40,55,70,.11);
}
.room-person-row-copy { min-width: 0; }
.room-person-row-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.room-person-row-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.room-online-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #51bf62; box-shadow: 0 0 0 3px rgba(81,191,98,.10); }
.room-person-row-copy small { display: block; margin-top: 4px; color: #8b95a0; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-person-row-self { color: #8290a0; font-size: 10px; font-weight: 750; }
.room-person-row-action {
  height: 34px;
  padding: 0 11px;
  border-radius: 11px;
  background: #eef3ff;
  color: #5d78c7;
  font-size: 10px;
  font-weight: 800;
}
.room-person-row-action:hover { background: #e4ebff; }
.room-people-empty { padding: 44px 20px; text-align: center; color: #8c96a1; font-size: 12px; }
.room-people-empty b { display: block; margin-bottom: 5px; color: #4a5663; }

.room-person-card {
  position: fixed;
  z-index: 700;
  width: 310px;
  max-width: calc(100vw - 20px);
  padding: 14px;
  border: 1px solid rgba(213,220,228,.95);
  border-radius: 18px;
  background: rgba(255,255,255,.985);
  box-shadow: 0 20px 55px rgba(28,40,54,.22);
  animation: person-card-in .12s ease-out;
}
@keyframes person-card-in { from { transform: translateY(4px) scale(.985); opacity: .45; } to { transform: none; opacity: 1; } }
.room-person-card-head { display: grid; grid-template-columns: 64px minmax(0,1fr) 30px; gap: 10px; align-items: center; }
.room-person-card-head > .character-portrait { width: 64px; height: 64px; border: 3px solid #fff; box-shadow: 0 3px 12px rgba(35,48,62,.13); }
.room-person-card-name { min-width: 0; }
.room-person-card-name b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.room-person-card-name small { display: block; margin-top: 4px; color: #86909b; font-size: 10px; line-height: 1.4; }
.room-person-card-close { width: 30px; height: 30px; border-radius: 10px; background: #f3f5f7; color: #7e8994; font-size: 19px; align-self: start; }
.room-person-card-actions { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.room-person-card-actions button {
  min-height: 38px;
  padding: 0 9px;
  border-radius: 12px;
  background: #f3f5f8;
  color: #46515e;
  font-size: 10.5px;
  font-weight: 800;
}
.room-person-card-actions button:hover { background: #e9edf2; }
.room-person-card-actions button.primary { background: #667fd7; color: #fff; }
.room-person-card-actions button.primary:hover { background: #5a73ca; }
.room-person-card-actions button.heart { background: #fff0f4; color: #d94d72; }
.room-person-card-actions button.heart:hover { background: #ffe4ec; }
.room-person-card-actions button.gift { background: #fff7e8; color: #a97016; }
.room-person-card-actions button.gift:hover { background: #ffefd0; }
.room-person-card-actions button:disabled { opacity: .55; cursor: wait; }

.room-person-interactions {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid #edf0f3;
}
.room-person-interactions-label {
  display: block;
  margin: 0 0 8px 2px;
  color: #99a2ad;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .9px;
}
.room-person-interactions-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.room-interaction-button {
  min-width: 0;
  min-height: 54px;
  padding: 5px 4px 6px;
  border-radius: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: #f6f8fa;
  color: #687483;
  font-size: 8.5px;
  font-weight: 750;
}
.room-interaction-button:hover { background: #edf2ff; color: #536fc3; transform: translateY(-1px); }
.room-interaction-button:disabled { opacity: .5; cursor: wait; transform: none; }
.room-interaction-emoji { font-size: 20px; line-height: 1.1; }

#city { cursor: default; }

@media (max-width: 1150px) {
  .world-people-button span,
  .room-switch-trigger span { display: none; }
  .world-people-button { padding: 0 9px; }
  .room-switch-trigger { min-width: 40px; width: 40px !important; padding: 0 !important; justify-content: center; }
  .room-switch-trigger .ui-icon { transform: rotate(90deg); }
}

@media (max-width: 700px) {
  .world-overlay-people { display: none !important; }
  .world-people-button { min-height: 32px; height: 32px; padding: 0 8px; border-radius: 10px; }
  .room-switch-trigger { width: 32px !important; min-width: 32px; height: 32px !important; border-radius: 10px !important; }
  .world-people-button b { min-width: 17px; height: 17px; padding: 0 4px; }
  .room-people-panel { position: fixed; width: min(92vw, 390px); }
  .room-people-backdrop { position: fixed; }
  .room-person-card { width: min(310px, calc(100vw - 16px)); }
  .chat-people-all { padding: 0 8px; }
}

/* v161 — gift catalog picker */
.gift-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 920;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(31,42,54,.24);
  backdrop-filter: blur(2px);
}
.gift-picker-overlay[hidden] { display:none !important; }
.gift-picker-card {
  width: min(520px, calc(100vw - 28px));
  max-height: min(650px, calc(100vh - 36px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid #e1e6ec;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(33,46,60,.24);
}
.gift-picker-head {
  padding: 17px 18px 14px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #edf0f3;
}
.gift-picker-head small { color:#7b88d2;font-size:9px;font-weight:850;letter-spacing:1px; }
.gift-picker-head h3 { margin:4px 0 4px;font-size:20px; }
.gift-picker-head p { margin:0;color:#8994a1;font-size:11px;line-height:1.45; }
.gift-picker-head > button { width:34px;height:34px;flex:0 0 34px;border-radius:11px;background:#f3f5f7;color:#7d8792;font-size:22px; }
.gift-picker-grid {
  min-height: 120px;
  overflow-y: auto;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 9px;
}
.gift-picker-item {
  min-width:0;
  padding: 10px 7px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:7px;
  border:1px solid #e8ebef;
  border-radius:16px;
  background:#fbfcfd;
  color:#46515e;
}
.gift-picker-item:hover { border-color:#d5dcf0;background:#f6f8ff;transform:translateY(-1px); }
.gift-picker-item:disabled { opacity:.55;cursor:wait;transform:none; }
.gift-picker-visual { width:64px;height:64px;display:grid;place-items:center;overflow:hidden;border-radius:17px;background:linear-gradient(145deg,#fff7fb,#f3efff);font-size:34px; }
.gift-picker-visual img { width:100%;height:100%;object-fit:contain;display:block; }
.gift-picker-item b { max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px; }
.gift-picker-loading,.gift-picker-empty { grid-column:1/-1;padding:34px 12px;text-align:center;color:#8a95a2;font-size:12px; }
@media (max-width: 700px) {
  .gift-picker-overlay { place-items:end center;padding:0;background:rgba(31,42,54,.25); }
  .gift-picker-card { width:100%;max-height:min(72vh,650px);border-radius:22px 22px 0 0;border-bottom:0;padding-bottom:max(8px,env(safe-area-inset-bottom)); }
  .gift-picker-grid { grid-template-columns:repeat(3,minmax(0,1fr));padding:12px; }
  .gift-picker-visual { width:58px;height:58px;font-size:31px; }
}
@media (max-width: 390px) {
  .gift-picker-grid { grid-template-columns:repeat(3,minmax(0,1fr));gap:7px; }
  .gift-picker-item { padding:8px 5px; }
  .gift-picker-visual { width:52px;height:52px; }
}

/* v162 — gift categories */
.gift-picker-categories {
  display:flex;
  gap:7px;
  overflow-x:auto;
  padding:10px 14px;
  border-bottom:1px solid #edf0f3;
  scrollbar-width:none;
}
.gift-picker-categories::-webkit-scrollbar { display:none; }
.gift-picker-category {
  flex:0 0 auto;
  height:32px;
  padding:0 12px;
  border:1px solid #e3e7ec;
  border-radius:999px;
  background:#fff;
  color:#6f7a87;
  font-size:11px;
  font-weight:750;
}
.gift-picker-category:hover { background:#f7f8fb; }
.gift-picker-category.active { border-color:#cfd7f1;background:#eef1ff;color:#5c68ad; }
.gift-picker-visual.missing { font-size:10px;font-weight:800;letter-spacing:.08em;color:#9ba5b1;background:#f3f5f7; }
.gift-picker-item small { max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#98a1ac;font-size:9px; }
@media (max-width:700px) {
  .gift-picker-categories { padding:9px 12px; }
  .gift-picker-category { height:30px;padding:0 11px;font-size:10px; }
}


/* v164 — graphics-only gifts: no public gift titles */
.gift-picker-item { min-height: 104px; padding: 8px; }
.gift-picker-item .gift-picker-visual { width: 78px; height: 78px; margin: 0 auto; }
@media (max-width: 640px) {
  .gift-picker-item { min-height: 88px; padding: 7px; }
  .gift-picker-item .gift-picker-visual { width: 68px; height: 68px; }
}


/* v165 — free and paid gifts */
.gift-picker-price {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:22px;
  padding:3px 8px;
  border-radius:999px;
  background:#fff4e5;
  color:#9b6912;
  font-size:9px;
  font-weight:850;
  line-height:1;
  white-space:nowrap;
}
.gift-picker-price.free {
  background:#edf8f1;
  color:#39885b;
}
