/* МурКлуб 2.0 — стили */
:root {
  --bg-0: #0d0a1a;
  --bg-1: #171130;
  --bg-2: #1f1740;
  --panel: rgba(30, 22, 62, .82);
  --panel-2: rgba(42, 31, 84, .75);
  --line: rgba(150, 120, 255, .22);
  --txt: #ece8ff;
  --txt-dim: #a99fd0;
  --pink: #ff5fb0;
  --purple: #a44cff;
  --blue: #4aa8ff;
  --gold: #ffc93c;
  --green: #4ee3a5;
  --red: #ff5f6d;
  --r: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .55);
  --font: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  color: var(--txt);
  background:
    radial-gradient(1100px 700px at 15% -10%, #3a1d6e 0%, transparent 60%),
    radial-gradient(900px 600px at 110% 10%, #05445e 0%, transparent 55%),
    linear-gradient(160deg, var(--bg-0), var(--bg-1) 45%, #120d28 100%);
  background-attachment: fixed;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(160, 120, 255, .35); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(160, 120, 255, .6); }

.hidden { display: none !important; }

/* ============ кнопки ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 14px; font-weight: 800; font-size: 15px;
  background: linear-gradient(180deg, #6a4dff, #4a2fd0);
  box-shadow: 0 6px 0 #2f1c8f, 0 12px 26px rgba(80, 40, 200, .4);
  transition: transform .12s, box-shadow .12s, filter .15s;
  white-space: nowrap; color: #fff;
}
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #2f1c8f, 0 6px 14px rgba(80, 40, 200, .35); }
.btn.pink { background: linear-gradient(180deg, #ff7ac1, #e5388f); box-shadow: 0 6px 0 #a91f63, 0 12px 26px rgba(230, 60, 140, .35); }
.btn.gold { background: linear-gradient(180deg, #ffd46b, #f0a52a); box-shadow: 0 6px 0 #b26f00, 0 12px 26px rgba(240, 170, 40, .35); color: #4a2c00; }
.btn.green { background: linear-gradient(180deg, #63f0b6, #21b57f); box-shadow: 0 6px 0 #147854, 0 12px 26px rgba(40, 200, 140, .3); color: #05301f; }
.btn.ghost { background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 2px var(--line); }
.btn.ghost:hover { background: rgba(255, 255, 255, .13); }
.btn.sm { padding: 7px 13px; font-size: 13px; border-radius: 11px; box-shadow: 0 4px 0 rgba(0,0,0,.3); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; filter: grayscale(.5); }

input[type=text], input[type=password], input[type=email], input[type=number],
select, textarea {
  width: 100%; padding: 13px 15px; border-radius: 13px;
  background: rgba(10, 7, 24, .6); border: 2px solid var(--line);
  color: var(--txt); font-family: inherit; font-size: 14px; font-weight: 700;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--purple); box-shadow: 0 0 0 4px rgba(164, 76, 255, .18);
}
label.field { display: block; margin-bottom: 12px; }
label.field span { display: block; font-size: 12px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--txt-dim); margin-bottom: 6px; }

/* ============ авторизация ============ */
#auth {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(800px 500px at 50% 0%, rgba(120, 60, 220, .35), transparent 70%);
  overflow: auto;
}
.auth-card {
  width: min(820px, 100%); background: var(--panel); backdrop-filter: blur(18px);
  border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow);
  padding: 28px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 26px;
}
.auth-logo { display: block; width: 100%; max-width: 330px; margin: 0 auto 6px; }
.auth-tag { text-align: center; color: var(--txt-dim); font-weight: 700; margin-bottom: 18px; font-size: 15px; }
.auth-side { display: flex; flex-direction: column; justify-content: center; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; background: rgba(0,0,0,.28); padding: 5px; border-radius: 14px; }
.tabs button { flex: 1; padding: 10px; border-radius: 10px; font-weight: 800; color: var(--txt-dim); transition: .15s; }
.tabs button.on { background: linear-gradient(180deg, #6a4dff, #4a2fd0); color: #fff; box-shadow: 0 4px 14px rgba(90,50,220,.45); }
.pickers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 4px 0 14px; }
.pick {
  position: relative; aspect-ratio: 3/4; border-radius: 16px; overflow: hidden;
  background: linear-gradient(180deg, rgba(120,90,220,.22), rgba(60,40,120,.35));
  border: 2px solid transparent; transition: .15s; display: grid; place-items: end center; padding-bottom: 4px;
}
.pick img { width: 100%; height: 100%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 6px 10px rgba(0,0,0,.45)); }
.pick b { position: absolute; bottom: 4px; font-size: 11px; background: rgba(0,0,0,.55); padding: 2px 8px; border-radius: 8px; }
.pick:hover { transform: translateY(-3px); }
.pick.on { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255, 95, 176, .22), 0 10px 24px rgba(0,0,0,.4); }
.auth-err { color: #ff8f9a; font-weight: 800; min-height: 20px; font-size: 14px; margin-top: 8px; text-align: center; }
.auth-hint { text-align: center; color: var(--txt-dim); font-size: 12.5px; margin-top: 14px; line-height: 1.5; }

/* ============ каркас приложения ============ */
#app { display: grid; grid-template-rows: auto auto 1fr; height: 100vh; }
#app > main { grid-row: 3; }

header {
  display: flex; align-items: center; gap: 14px; padding: 10px 16px;
  background: linear-gradient(180deg, rgba(38, 26, 78, .95), rgba(28, 19, 60, .82));
  border-bottom: 1px solid var(--line); box-shadow: 0 6px 26px rgba(0,0,0,.4); z-index: 20;
}
header .logo { height: 40px; }
.hdr-room { font-weight: 900; font-size: 15px; letter-spacing: .01em; }
.hdr-room small { display: block; font-size: 11.5px; color: var(--txt-dim); font-weight: 700; }
.spacer { flex: 1; }
.pill {
  display: flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 13px;
  background: rgba(0, 0, 0, .3); border: 1px solid var(--line); font-weight: 900; font-size: 14px;
}
.pill .ic { font-size: 16px; }
.coins b { color: var(--gold); }
.nav { display: flex; gap: 7px; }
.nav .btn { padding: 9px 14px; font-size: 14px; }

/* Ширина чата — переменная: её меняет разделитель и запоминает браузер.
   Пятая колонка — сам разделитель (6px), поэтому gap уменьшен вдвое,
   чтобы полоса не «плавала» в широком промежутке. */
main {
  --side-w: 300px;
  display: grid; grid-template-columns: 244px 1fr 6px var(--side-w);
  gap: 12px; padding: 12px; overflow: hidden;
}
main > .resizer + .panel.side { margin-left: 0; }

/* Разделитель. Сам по себе тонкий, но зона захвата шире самой полоски:
   попасть мышью в 6 пикселей тяжело, поэтому ловим ±5px по бокам. */
.resizer {
  position: relative; cursor: col-resize; border-radius: 3px;
  background: rgba(255,255,255,.05); transition: background .15s;
  align-self: stretch;
}
.resizer::before { content: ''; position: absolute; inset: 0 -5px; }
.resizer::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 2px; height: 34px;
  transform: translate(-50%, -50%); border-radius: 2px; background: rgba(255,255,255,.22);
}
.resizer:hover, .resizer.drag { background: rgba(164,76,255,.45); }
.resizer:hover::after, .resizer.drag::after { background: #fff; }
/* Во время перетаскивания курсор не должен меняться над чужими элементами,
   а выделение текста — портить ощущение «тяну панель». */
body.resizing { cursor: col-resize; user-select: none; }
body.resizing iframe, body.resizing #stage { pointer-events: none; }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; backdrop-filter: blur(14px);
}
.panel > h3 {
  padding: 12px 14px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--txt-dim); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,.18);
}
.panel > h3 .cnt { margin-left: auto; background: rgba(164,76,255,.25); padding: 2px 9px; border-radius: 20px; font-size: 11px; color: #d9c9ff; }
/* Прокручиваемое тело боковой панели.
   :not(.doll .body) обязателен: сцена лежит внутри .panel, и без него
   правило цепляет тело пупса — overflow срезает эмоции, ник и облачко реплики. */
.panel > .body { overflow-y: auto; padding: 10px; flex: 1; }

/* список комнат */
.room-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 13px;
  cursor: pointer; transition: .13s; margin-bottom: 6px; border: 1px solid transparent;
}
.room-item:hover { background: rgba(255,255,255,.06); }
.room-item.on { background: linear-gradient(90deg, rgba(164,76,255,.3), rgba(74,168,255,.14)); border-color: rgba(164,76,255,.45); }
.room-item .thumb { width: 46px; height: 34px; border-radius: 9px; object-fit: cover; flex-shrink: 0; box-shadow: 0 3px 8px rgba(0,0,0,.4); }
/* Средняя колонка обязана уметь сжиматься. По умолчанию у flex-элемента
   min-width: auto, поэтому длинное описание или значок «официальная»
   рядом с темой распирали строку и уезжали за край панели. */
.room-item > div:not(.thumb) { min-width: 0; flex: 1 1 auto; }
.room-item .nm { font-weight: 800; font-size: 13.5px; line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Тема и «официальная» переносятся на вторую строку, если не влезли:
   обрезать статус комнаты многоточием — потерять смысл значка. */
.room-item .meta { font-size: 11px; color: var(--txt-dim); font-weight: 700;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  min-width: 0; line-height: 1.4; }
.room-item .meta > * { flex: 0 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-item .badge { margin-left: auto; font-size: 11px; font-weight: 900; color: var(--green); }

/* сцена */
.stage-wrap { position: relative; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); display: flex; flex-direction: column; }
#stage { position: relative; flex: 1; overflow: hidden; cursor: crosshair; background: #0b0818; }

/* Мир шире окна: --world задаёт во сколько раз. Камера двигает его
   через --cam (в процентах ширины окна), поэтому анимируется один
   элемент, а не каждый пупс по отдельности. */
#world {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: calc(var(--world, 1) * 100%);
  /* Процент в translateX считается от ширины САМОГО элемента, а мир шире
     окна в --world раз. Поэтому сдвиг задаём уже пересчитанным (--cam-w),
     иначе камера улетает за край сцены. */
  transform: translateX(calc(var(--cam-w, 0) * -1%));
  transition: transform .45s cubic-bezier(.3,.8,.4,1);
  will-change: transform;
}
/* Фон повторяется по горизонтали: продолжение зала уходит вбок,
   а не обрывается чёрным. */
.bg-strip {
  position: absolute; inset: 0;
  background-image: var(--bg-img);
  background-repeat: repeat-x;
  background-position: center bottom;
  background-size: auto 100%;
}
/* Кадр не бесшовный, и на стыке видно резкую склейку двух копий.
   Затемняющие полосы поверх швов маскируют переход: получается
   впечатление глубины зала, уходящего в темноту, а не обрыв картинки.
   Шаг полос равен ширине одной копии фона (--tile). */
.bg-strip::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(8,4,22,0) 0,
    rgba(8,4,22,0) calc(var(--tile, 100%) - 90px),
    rgba(8,4,22,.55) calc(var(--tile, 100%) - 30px),
    rgba(8,4,22,.55) calc(var(--tile, 100%) + 30px),
    rgba(8,4,22,0) calc(var(--tile, 100%) + 90px),
    rgba(8,4,22,0) calc(var(--tile, 100%) * 2)
  );
}
#stage .vignette { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 45%, rgba(5,3,15,.55) 100%); }

/* Пупсы стоят на общей линии пола: top фиксирован, меняется только left.
   Раньше вертикаль давала «глубину», но при большом онлайне пупсы
   налезали друг на друга и казались висящими в воздухе. */
.doll { position: absolute; top: var(--floor, 88%); transform-origin: bottom center;
  transition: left .55s cubic-bezier(.3,.8,.4,1), transform .55s cubic-bezier(.3,.8,.4,1);
  will-change: left, transform; }
.doll .body { position: relative; width: 100%; }
.doll img.skin { width: 100%; display: block; filter: drop-shadow(0 10px 14px rgba(0,0,0,.5)); }
.doll .acc { position: absolute; pointer-events: none; filter: drop-shadow(0 3px 5px rgba(12,6,30,.6)); }
.doll .nick {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: -22px; white-space: nowrap;
  font-size: 12px; font-weight: 900; padding: 3px 10px; border-radius: 20px;
  /* Фоны комнат разные: пляж и кафе светлые, клуб тёмный. Плашка была
     полупрозрачной, и на светлом фоне ник сливался. Делаем её плотной
     и добавляем обводку тексту — читается везде.
     Без backdrop-filter: рядом с анимированными .acc он поднимает куклу
     в отдельный слой композитинга и рисует светлый прямоугольник. */
  background: rgba(8,5,20,.94);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 2px 8px rgba(0,0,0,.55);
  text-shadow: 0 1px 2px rgba(0,0,0,.9);
}
/* Свой пупс подсвечен градиентом. Он был светлым, и белый ник на нём
   читался хуже, чем на обычной тёмной плашке. Берём насыщенные тона
   и добавляем контур — свой ник должен быть заметнее чужих, но читаемым. */
.doll.me .nick {
  background: linear-gradient(90deg, #d6187f, #6b21c8);
  border-color: rgba(255,255,255,.35);
  box-shadow: 0 2px 10px rgba(0,0,0,.6);
  text-shadow: 0 1px 3px rgba(0,0,0,.95);
}
.doll .bubble {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 102%;
  background: #fff; color: #241a3d; font-weight: 800; font-size: 13px; padding: 8px 13px;
  border-radius: 14px; max-width: 230px; width: max-content; box-shadow: 0 8px 22px rgba(0,0,0,.45);
  animation: pop .22s ease-out; line-height: 1.35;
}
.doll .bubble::after { content: ''; position: absolute; left: 50%; top: 100%; transform: translateX(-50%);
  border: 8px solid transparent; border-top-color: #fff; }
/* Эмоция висит НАД головным убором. Раньше bottom:104% отмерялось от
   тела, и высокая шапка или корона перекрывали смайл — его было не видно
   у тех, кто как раз и покупает дорогие вещи. z-index выше самого верхнего
   слоя экипировки (hand = 70), поэтому ничем не перекрывается.
   Эмоция теперь висит постоянно, поэтому лёгкое покачивание вместо
   разовой вспышки: статичный смайл на пять минут выглядит мёртвым. */
.doll .emo { position: absolute; left: 50%; bottom: 118%; z-index: 90;
  font-size: 34px; line-height: 1; pointer-events: none;
  transform: translateX(-50%);
  animation: pop .25s, emoFloat 2.6s ease-in-out .25s infinite;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
@keyframes emoFloat {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-3deg); }
  50%      { transform: translateX(-50%) translateY(-6px) rotate(3deg); }
}
/* Свой смайл подсвечен: игрок должен видеть, что эмоция всё ещё висит,
   и понимать, как её снять. */
.doll.me .emo { cursor: pointer; pointer-events: auto; }
.doll.me .emo::after { content: '✕'; position: absolute; top: -4px; right: -14px;
  font-size: 11px; width: 16px; height: 16px; line-height: 16px; text-align: center;
  border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; opacity: 0; transition: .15s; }
.doll.me .emo:hover::after { opacity: 1; }
@keyframes pop { from { transform: translateX(-50%) scale(.5); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
.doll.walk .body { animation: bob .45s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-5px) } }

.stage-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 60;
  width: 38px; height: 62px; border-radius: 12px; font-size: 26px; font-weight: 900;
  color: #fff; background: rgba(12,8,28,.6); border: 1px solid var(--line);
  backdrop-filter: blur(6px); transition: .15s; line-height: 1;
}
.stage-arrow:hover { background: rgba(164,76,255,.6); }
.stage-arrow.left { left: 8px; }
.stage-arrow.right { right: 8px; }

.stage-bar { display: flex; gap: 8px; padding: 9px; background: rgba(12,8,28,.85); border-top: 1px solid var(--line); align-items: center; flex-wrap: wrap; }
.stage-bar input { flex: 1; }
.emo-row { display: flex; gap: 4px; flex-wrap: wrap; min-width: 0; }
.emo-row button { width: 36px; height: 36px; border-radius: 10px; font-size: 19px; background: rgba(255,255,255,.07); transition: .12s; }
.emo-row button:hover { background: rgba(255,255,255,.18); transform: translateY(-2px) scale(1.08); }

/* чат */
#chat { display: flex; flex-direction: column; gap: 7px; }
.msg { padding: 8px 11px; border-radius: 12px; background: rgba(255,255,255,.045); font-size: 13.5px; line-height: 1.45; animation: slide .2s; word-break: break-word; }
@keyframes slide { from { opacity: 0; transform: translateY(6px); } }
.msg .who { font-weight: 900; margin-right: 6px; }
.msg .tm { float: right; font-size: 10.5px; color: var(--txt-dim); margin-left: 8px; opacity: .8; }
.msg.sys { background: rgba(74,168,255,.09); color: #9fd2ff; font-size: 12.5px; font-weight: 700; text-align: center; }
.msg.mine { background: linear-gradient(90deg, rgba(255,95,176,.18), rgba(164,76,255,.1)); }

/* участники */
.user-item { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 12px; cursor: pointer; transition: .12s; }
.user-item:hover { background: rgba(255,255,255,.07); }
.user-item .av { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: linear-gradient(180deg, #6a4dff, #2b1a66); display: grid; place-items: start center; }
.user-item .av img { width: 150%; margin-top: -3px; }
.user-item .nm { font-weight: 800; font-size: 13px; }
.user-item .ti { font-size: 10.5px; font-weight: 800; }

/* модалки */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px;
  background: rgba(6, 3, 16, .72); backdrop-filter: blur(6px); animation: fade .18s; }
/* Документы и помощь доступны с экрана входа, а у #auth z-index 100:
   без этого окно открывалось ПОД ним и его нельзя было ни прочитать,
   ни закрыть. */
#mDoc, #mSupport { z-index: 130; }

/* Вложенные окна: карточка открывается из админки, выбор аватарки —
   из профиля. При равном z-index родитель перекрывал бы их. */
#mCard, #mAva { z-index: 120; }
@keyframes fade { from { opacity: 0 } }
.modal-card { width: min(900px, 100%); max-height: 86vh; background: linear-gradient(180deg, #251a52, #1a1238);
  border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: rgba(0,0,0,.2); }
.modal-head h2 { font-size: 19px; font-weight: 900; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.x { margin-left: auto; width: 36px; height: 36px; border-radius: 11px; background: rgba(255,255,255,.08); font-size: 18px; font-weight: 900; }
.x:hover { background: var(--red); }

/* магазин */
.shop-tabs { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 16px; }
.shop-tabs button { padding: 8px 15px; border-radius: 12px; background: rgba(255,255,255,.07); font-weight: 800; font-size: 13.5px; transition: .13s; }
.shop-tabs button.on { background: linear-gradient(180deg, #ff7ac1, #e5388f); box-shadow: 0 4px 14px rgba(230,60,140,.4); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 13px; }
.card {
  background: rgba(255,255,255,.05); border: 2px solid var(--line); border-radius: 17px; padding: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; transition: .15s; position: relative; overflow: hidden;
}
.card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 0%, var(--glow, transparent), transparent 65%); opacity: .5; pointer-events: none; }
.card:hover { transform: translateY(-4px); border-color: rgba(164,76,255,.5); }
.card img { width: 78px; height: 78px; object-fit: contain; filter: drop-shadow(0 5px 10px rgba(0,0,0,.45)); }
.card .nm { font-weight: 900; font-size: 13px; text-align: center; line-height: 1.25; }
.card .rr { font-size: 10.5px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.card .pr { font-weight: 900; color: var(--gold); font-size: 14px; }
.card .btn { width: 100%; }
.card.owned { border-color: rgba(78, 227, 165, .5); }
.card .tag { position: absolute; top: 8px; right: 8px; font-size: 10px; font-weight: 900; padding: 2px 7px; border-radius: 8px; background: var(--green); color: #04301f; }

/* профиль */
.prof { display: grid; grid-template-columns: 260px 1fr; gap: 22px; }
.prof-doll { position: relative; background: linear-gradient(180deg, rgba(120,90,220,.2), rgba(30,20,70,.5));
  border-radius: 20px; border: 1px solid var(--line); aspect-ratio: 3/4; display: grid; place-items: end center; overflow: hidden; }
.prof-doll .body { position: relative; width: 62%; margin-bottom: 8%; }
.prof-doll img.skin { width: 100%; display: block; filter: drop-shadow(0 10px 16px rgba(0,0,0,.5)); }
.prof-doll .acc { position: absolute; }
.stat-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.stat { flex: 1; min-width: 110px; background: rgba(0,0,0,.28); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.stat b { display: block; font-size: 21px; font-weight: 900; }
.stat span { font-size: 11px; color: var(--txt-dim); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.bar { height: 9px; background: rgba(0,0,0,.35); border-radius: 20px; overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), var(--gold)); border-radius: 20px; transition: width .5s; }

/* тосты */
/* Контейнер не ловит клики (pointer-events: none), иначе невидимая колонка
   перекрывала бы сцену. Клики включены только на самих плашках. */
#toasts { position: fixed; bottom: 88px; left: 50%; transform: translateX(-50%); z-index: 200;
  display: flex; flex-direction: column; align-items: center; gap: 9px; pointer-events: none; }

.toast {
  position: relative; pointer-events: auto;
  padding: 12px 40px 14px 18px;      /* справа место под крестик, снизу под полоску */
  border-radius: 14px; font-weight: 800; font-size: 14px; box-shadow: var(--shadow);
  background: linear-gradient(180deg, #6a4dff, #4a2fd0); animation: tin .25s;
  max-width: 380px; overflow: hidden; line-height: 1.35;
  display: flex; align-items: flex-start; gap: 8px;
}
.toast.ok { background: linear-gradient(180deg, #35d497, #17a06c); color: #04301f; }
.toast.bad { background: linear-gradient(180deg, #ff7a86, #e0374a); }
.toast.gold { background: linear-gradient(180deg, #ffd46b, #f0a52a); color: #4a2c00; }
/* Плашка, которая ждёт закрытия, чуть заметнее: светлая рамка намекает,
   что сама она не пропадёт. */
.toast.sticky { box-shadow: var(--shadow), 0 0 0 1.5px rgba(255,255,255,.35) inset; }
.toast.out { opacity: 0; transform: translateY(14px) scale(.97); transition: .25s; }

.toast .t-text { flex: 1; min-width: 0; word-break: break-word; }
/* Счётчик повторов вместо стопки одинаковых плашек */
.toast .t-count {
  flex-shrink: 0; font-size: 12px; padding: 1px 7px; border-radius: 20px;
  background: rgba(0,0,0,.22); align-self: center;
}
.toast .t-count.hidden { display: none; }

.toast .t-x {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px;
  border-radius: 9px; font-size: 19px; font-weight: 900; line-height: 1;
  color: inherit; opacity: .65; background: rgba(0,0,0,.14);
  display: grid; place-items: center; transition: .12s; flex-shrink: 0;
}
.toast .t-x:hover { opacity: 1; background: rgba(0,0,0,.3); transform: scale(1.1); }

/* Полоска остатка времени: видно, сколько плашка ещё провисит */
.toast .t-bar {
  position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: rgba(255,255,255,.5); transform-origin: left center;
}
@keyframes tbar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes tin { from { opacity: 0; transform: translateY(20px) scale(.92); } }

.empty { text-align: center; color: var(--txt-dim); padding: 26px 10px; font-size: 13px; font-weight: 700; line-height: 1.6; }

@media (max-width: 1080px) and (min-width: 861px) {
  main { --side-w: 250px; grid-template-columns: 200px 1fr 6px var(--side-w); }
  header .logo { height: 32px; }
  .hdr-room { display: none; }
  .nav .btn { padding: 8px 11px; }
}

/* ============ РАСШИРЕНИЕ 2.1 ============ */
.lbl { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--txt-dim); }
.hint-sm { font-size: 11.5px; color: var(--txt-dim); font-weight: 700; margin-top: 6px; }
.pad-t { padding: 10px; border-top: 1px solid var(--line); }
.panel.side { gap: 0; }
.panel > h3.bt { border-top: 1px solid var(--line); }
.users-body { max-height: 190px; flex: none; }
.bg-grid { grid-template-columns: repeat(2, 1fr); }

/* значок непрочитанного */
.btn.rel { position: relative; }
.dot { position: absolute; top: -4px; right: -4px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--red); border: 2px solid #221a44; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.25); } }

.promo-row { display: flex; gap: 9px; margin-bottom: 16px; align-items: center;
  background: rgba(0,0,0,.25); padding: 11px; border-radius: 15px; border: 1px solid var(--line); }
.promo-row input { flex: 1; }

/* танцы пупса */
.doll.d-jump  .body { animation: dJump .6s ease-in-out infinite; }
.doll.d-spin  .body { animation: dSpin 1.1s linear infinite; }
.doll.d-shake .body { animation: dShake .35s ease-in-out infinite; }
.doll.d-float .body { animation: dFloat 2.2s ease-in-out infinite; }
@keyframes dJump  { 0%,100% { transform: translateY(0) }   45% { transform: translateY(-22%) } }
@keyframes dSpin  { to { transform: rotateY(360deg) } }
@keyframes dShake { 0%,100% { transform: rotate(-7deg) }   50% { transform: rotate(7deg) } }
@keyframes dFloat { 0%,100% { transform: translateY(0) }    50% { transform: translateY(-12%) } }

/* статус над головой */
.doll .status { position: absolute; left: 50%; transform: translateX(-50%); bottom: -40px;
  white-space: nowrap; font-size: 10.5px; font-weight: 700; color: #cbbdf5;
  background: rgba(10,6,26,.6); padding: 2px 8px; border-radius: 12px; max-width: 160px;
  overflow: hidden; text-overflow: ellipsis; }
.doll .mute-ic { position: absolute; left: 50%; transform: translateX(-50%); bottom: -22px;
  margin-left: 46px; font-size: 13px; }

/* викторина */
#quizBox { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); z-index: 12;
  width: min(560px, 92%); background: rgba(16,10,38,.94); border: 2px solid var(--purple);
  border-radius: 20px; padding: 16px 18px; box-shadow: var(--shadow); backdrop-filter: blur(10px); }
#quizBox .q { font-weight: 900; font-size: 16px; margin-bottom: 12px; line-height: 1.35; }
#quizBox .qmeta { font-size: 11.5px; color: var(--txt-dim); font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
#quizBox .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#quizBox .opts button { padding: 11px 13px; border-radius: 12px; font-weight: 800; font-size: 13.5px;
  background: rgba(255,255,255,.08); border: 2px solid transparent; text-align: left; transition: .13s; }
#quizBox .opts button:hover:not(:disabled) { background: rgba(164,76,255,.3); }
#quizBox .opts button.ok  { background: rgba(78,227,165,.35); border-color: var(--green); }
#quizBox .opts button.bad { background: rgba(255,95,110,.3);  border-color: var(--red); }
#quizBox .qbar { height: 6px; background: rgba(0,0,0,.4); border-radius: 10px; margin-top: 12px; overflow: hidden; }
#quizBox .qbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), var(--gold)); }

/* достижения */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 9px; }
.ach { aspect-ratio: 1; border-radius: 15px; display: grid; place-items: center; font-size: 26px;
  background: rgba(255,255,255,.05); border: 2px solid var(--line); position: relative; cursor: help; transition: .15s; }
.ach.got { background: linear-gradient(180deg, rgba(255,201,60,.25), rgba(255,140,40,.12));
  border-color: rgba(255,201,60,.6); }
.ach:not(.got) { filter: grayscale(1); opacity: .38; }
.ach:hover { transform: translateY(-3px) scale(1.05); }

/* друзья */
.fr-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 13px;
  background: rgba(255,255,255,.04); margin-bottom: 7px; }
.fr-item .av { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: linear-gradient(180deg,#6a4dff,#2b1a66); display: grid; place-items: start center; }
.fr-item .av img { width: 150%; margin-top: -3px; }
.fr-item .on-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.fr-item .off-dot { width: 9px; height: 9px; border-radius: 50%; background: #55506e; flex-shrink: 0; }
.fr-item .acts { margin-left: auto; display: flex; gap: 6px; }

/* личные сообщения */
.pm-wrap { display: grid; grid-template-columns: 210px 1fr; flex: 1; overflow: hidden; }
.pm-list { border-right: 1px solid var(--line); overflow-y: auto; padding: 8px; }
.pm-peer { padding: 10px; border-radius: 12px; cursor: pointer; font-weight: 800; font-size: 13.5px;
  display: flex; align-items: center; gap: 8px; transition: .12s; }
.pm-peer:hover { background: rgba(255,255,255,.07); }
.pm-peer.on { background: linear-gradient(90deg, rgba(164,76,255,.32), transparent); }
.pm-chat { display: flex; flex-direction: column; overflow: hidden; }
.pm-head { padding: 13px 16px; border-bottom: 1px solid var(--line); font-weight: 900; }
.pm-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 7px; }
.pm-msg { max-width: 76%; padding: 9px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.4;
  background: rgba(255,255,255,.07); align-self: flex-start; word-break: break-word; }
.pm-msg.mine { align-self: flex-end; background: linear-gradient(135deg,#7a4dff,#c93cc0); }
.pm-msg .t { display: block; font-size: 10px; opacity: .65; margin-top: 3px; }
.pm-bar { display: flex; gap: 8px; padding: 11px; border-top: 1px solid var(--line); }
.pm-bar input { flex: 1; }

/* всплывающее меню игрока */
.ctx { position: fixed; z-index: 300; background: linear-gradient(180deg,#2a1e5c,#1d1440);
  border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); padding: 7px; min-width: 190px; }
.ctx b { display: block; padding: 8px 12px 10px; font-size: 13.5px; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
.ctx button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 10px;
  font-weight: 800; font-size: 13px; transition: .1s; }
.ctx button:hover { background: rgba(164,76,255,.3); }
.ctx button.danger:hover { background: rgba(255,95,110,.35); }

/* ==================== МОБИЛЬНАЯ ВЕРСИЯ ==================== */
.mob-only { display: none; }
#mobNav, #mobMore, #drawerOv { display: none; }
/* на десктопе обёртка эмоций прозрачна для лэйаута — ряды в одну строку */
.emo-wrap { display: contents; }

/* safe-area для iPhone с «чёлкой» */
:root { --safe-b: env(safe-area-inset-bottom, 0px); --nav-h: 58px; }

@media (max-width: 860px) {
  html, body { overflow-x: hidden; }
  body { overscroll-behavior-y: contain; }
  .mob-only { display: inline-flex; }

  /* --- шапка: только логотип, деньги и бургер --- */
  header { padding: 8px 10px; gap: 8px; position: sticky; top: 0; }
  header .logo { height: 30px; }
  .hdr-room { display: none; }
  .pill { padding: 6px 10px; font-size: 13px; border-radius: 11px; }
  .nav { display: none; }

  /* --- основной каркас: сцена на весь экран --- */
  #app { height: 100dvh; grid-template-rows: auto auto 1fr; }
  main {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    padding: 8px 8px calc(var(--nav-h) + var(--safe-b) + 8px);
    gap: 0; overflow: hidden;
  }
  /* на телефоне чат — выдвижная шторка на всю ширину, тянуть нечего */
  .resizer { display: none; }
  .panel.stage-wrap { grid-row: 1; }
  #stage { min-height: 0; }

  /* комнаты и чат превращаются в выдвижные шторки */
  .panel.rooms, .panel.side {
    position: fixed; z-index: 60; top: 0; width: min(86vw, 340px);
    /* не заезжаем под нижний таб-бар, иначе кнопки недоступны */
    bottom: calc(var(--nav-h) + var(--safe-b));
    max-height: none; border-radius: 0; transition: transform .26s cubic-bezier(.3,.8,.4,1);
    box-shadow: 0 0 60px rgba(0,0,0,.7);
  }
  .panel.rooms { left: 0;  transform: translateX(-102%); border-left: none; }
  .panel.side  { right: 0; transform: translateX(102%);  border-right: none; }
  .panel.rooms.open, .panel.side.open { transform: translateX(0); }
  .users-body { max-height: 38vh; }

  #drawerOv {
    display: block; position: fixed; inset: 0; z-index: 55; background: rgba(4,2,12,.6);
    backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .24s;
  }
  #drawerOv.on { opacity: 1; pointer-events: auto; }

  /* --- панель ввода --- */
  .stage-bar { padding: 7px; gap: 6px; flex-wrap: nowrap; }
  .stage-bar input { font-size: 16px; padding: 11px 13px; }  /* 16px = iOS не зумит */
  .stage-bar .btn { padding: 11px 14px; }
  #btnQuiz { display: none; }

  /* эмоции выезжают над панелью */
  .emo-wrap {
    position: absolute; left: 8px; right: 8px; bottom: 100%; margin-bottom: 8px;
    background: rgba(16,10,38,.96); border: 1px solid var(--line); border-radius: 16px;
    padding: 9px; display: none; flex-wrap: wrap; gap: 6px; z-index: 14;
    box-shadow: var(--shadow); backdrop-filter: blur(10px);
  }
  .emo-wrap.open { display: flex; }
  .emo-row { flex-wrap: wrap; gap: 6px; }
  .emo-row button { width: 42px; height: 42px; font-size: 21px; }
  .stage-bar { position: relative; }

  /* --- нижняя навигация --- */
  #mobNav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed;
    left: 0; right: 0; bottom: 0; z-index: 70; height: calc(var(--nav-h) + var(--safe-b));
    padding-bottom: var(--safe-b);
    background: linear-gradient(180deg, rgba(38,26,78,.97), rgba(20,13,44,.99));
    border-top: 1px solid var(--line); backdrop-filter: blur(14px);
  }
  #mobNav button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: var(--txt-dim); font-weight: 800; font-size: 10px; position: relative; transition: .15s;
  }
  #mobNav button i { font-size: 20px; font-style: normal; line-height: 1; }
  #mobNav button.on { color: #fff; }
  #mobNav button.on i { transform: translateY(-2px) scale(1.12); filter: drop-shadow(0 3px 8px rgba(164,76,255,.8)); }
  #mobNav .ndot { position: absolute; top: 5px; right: calc(50% - 18px); width: 9px; height: 9px;
    border-radius: 50%; background: var(--red); border: 2px solid #1a1236; }

  /* --- шторка «Ещё» --- */
  #mobMore { display: block; position: fixed; inset: 0; z-index: 80; pointer-events: none; }
  #mobMore::before { content: ''; position: absolute; inset: 0; background: rgba(4,2,12,.6);
    opacity: 0; transition: opacity .24s; }
  #mobMore.open { pointer-events: auto; }
  #mobMore.open::before { opacity: 1; }
  .sheet-card {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px calc(18px + var(--safe-b));
    background: linear-gradient(180deg, #2a1e5c, #191140); border-top: 1px solid var(--line);
    border-radius: 26px 26px 0 0; transform: translateY(102%); transition: transform .28s cubic-bezier(.3,.8,.4,1);
    box-shadow: 0 -18px 50px rgba(0,0,0,.6);
  }
  #mobMore.open .sheet-card { transform: translateY(0); }
  .sheet-grip { width: 44px; height: 5px; border-radius: 10px; background: rgba(255,255,255,.25);
    margin: 2px auto 14px; }
  .sheet-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .sheet-grid button {
    display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 13px 4px;
    border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid var(--line);
    font-weight: 800; font-size: 11px; color: var(--txt); transition: .14s; text-align: center; line-height: 1.2;
  }
  .sheet-grid button:active { transform: scale(.94); background: rgba(164,76,255,.3); }
  .sheet-grid button i { font-size: 24px; font-style: normal; }
  .sheet-grid button:disabled { opacity: .45; }

  /* --- модалки на весь экран --- */
  .modal { padding: 0; align-items: flex-end; }
  .modal-card {
    width: 100%; max-width: none; max-height: 92dvh; height: auto;
    border-radius: 24px 24px 0 0; animation: slideUp .26s cubic-bezier(.3,.8,.4,1);
  }
  @keyframes slideUp { from { transform: translateY(60px); opacity: .5 } }
  /* Шапка модалки на узком экране. Переносить её нельзя — крестик
     уезжал на вторую строку и шапка занимала двойную высоту. Вместо
     переноса ужимаем: заголовок сокращается многоточием, длинная
     кнопка («✏️ Редактировать») теряет подпись и остаётся значком,
     крестик всегда на месте и в одну строку с заголовком. */
  .modal-head { flex-wrap: nowrap; gap: 8px; }
  .modal-head h2 { flex: 1 1 auto; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .modal-head .btn { flex: 0 0 auto; max-width: 42vw;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .modal-head .x { flex: 0 0 auto; }

  .modal-head { padding: 14px 16px; position: sticky; top: 0; z-index: 5;
    background: linear-gradient(180deg,#2a1e5c,#241a52); }
  .modal-head h2 { font-size: 17px; }
  .modal-body { padding: 14px; padding-bottom: calc(20px + var(--safe-b)); }
  .x { width: 40px; height: 40px; }

  /* профиль в одну колонку */
  .prof { grid-template-columns: 1fr; gap: 16px; }
  .prof-doll { aspect-ratio: 4/3; max-height: 240px; }
  .prof-doll .body { width: 44%; }
  .pickers { grid-template-columns: repeat(6, 1fr); gap: 7px; }
  .pick b { font-size: 9.5px; padding: 1px 5px; }
  .stat-row { gap: 8px; }
  .stat { min-width: 0; padding: 10px; }
  .stat b { font-size: 17px; }

  /* магазин: 2 колонки, крупные кнопки */
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card { padding: 10px; }
  .card img { width: 62px; height: 62px; }
  .card .nm { font-size: 12px; }
  .card .btn { padding: 9px; font-size: 12.5px; }
  .bg-grid { grid-template-columns: repeat(2, 1fr); }
  .shop-tabs button { padding: 8px 13px; font-size: 12.5px; }
  .promo-row { flex-wrap: wrap; }
  .promo-row input { min-width: 55%; font-size: 16px; }
  .ach-grid { grid-template-columns: repeat(5, 1fr); }
  .ach { font-size: 22px; border-radius: 13px; }
  /* 16px — чтобы iOS не увеличивал страницу при фокусе на поле */
  input[type=text], input[type=password], input[type=email], input[type=number],
  select, textarea { font-size: 16px; }

  /* ЛС: список диалогов -> горизонтальные чипсы */
  .pm-wrap { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .pm-list {
    display: flex; gap: 7px; overflow-x: auto; border-right: none;
    border-bottom: 1px solid var(--line); padding: 9px; scrollbar-width: none;
  }
  .pm-list::-webkit-scrollbar { display: none; }
  .pm-peer { flex: 0 0 auto; padding: 8px 13px; border-radius: 20px; background: rgba(255,255,255,.06); }
  .pm-msg { max-width: 84%; }
  #mPM .modal-card { height: 88dvh; }
  .pm-bar input { font-size: 16px; }

  /* викторина */
  #quizBox { top: 8px; width: calc(100% - 16px); padding: 13px; border-radius: 16px; }
  #quizBox .q { font-size: 14.5px; }
  #quizBox .opts { grid-template-columns: 1fr; gap: 7px; }
  #quizBox .opts button { padding: 12px; font-size: 13.5px; }

  /* сцена: пупсы крупнее, чтобы не терялись */
  .doll { width: 20% !important; }
  .doll .nick { font-size: 10.5px; padding: 2px 7px; bottom: -18px; }
  .doll .status { font-size: 9px; bottom: -32px; max-width: 110px; }
  .doll .bubble { font-size: 12px; padding: 6px 10px; max-width: 150px; }

  /* вход */
  .auth-card { grid-template-columns: 1fr; padding: 20px 16px; border-radius: 22px; gap: 18px; }
  #auth { padding: 12px; align-items: flex-start; }
  .auth-logo { max-width: 240px; }
  .auth-tag { font-size: 13.5px; }
  .pickers#skinPick { grid-template-columns: repeat(3, 1fr); }
  /* Тосты компактные и не закрывают сцену. Жёсткого max-height больше нет:
     он обрезал вторую строку у длинных сообщений, а теперь плашка ждёт,
     пока её прочтут, и текст обязан быть виден целиком. Потолок задаём
     долей экрана — если сообщений много, колонка прокручивается. */
  #toasts { bottom: calc(var(--nav-h) + var(--safe-b) + 62px); gap: 6px;
            max-height: 46vh; overflow-y: auto; flex-direction: column-reverse;
            width: calc(100vw - 24px); scrollbar-width: none; }
  #toasts::-webkit-scrollbar { display: none; }
  .toast { width: 100%; max-width: none; font-size: 12.5px;
           padding: 10px 42px 12px 14px; border-radius: 12px; }
  /* палец крупнее курсора: зона нажатия крестика увеличена */
  .toast .t-x { width: 32px; height: 32px; top: 50%; right: 5px; margin-top: -16px;
                font-size: 21px; opacity: .85; }
  /* Прячем только совсем старые: с крестиком плашки не исчезают сами,
     и скрывать непрочитанное вредно. */
  #toasts .toast:nth-child(n+6) { display: none; }
  .ctx { min-width: 210px; }
}

/* очень узкие экраны */
@media (max-width: 380px) {
  .sheet-grid { grid-template-columns: repeat(3, 1fr); }
  .pickers#skinPick { grid-template-columns: repeat(3, 1fr); }
  .ach-grid { grid-template-columns: repeat(4, 1fr); }
  #mobNav button span { font-size: 9px; }
}

/* ландшафт на телефоне: сцена низкая — прячем лишнее */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  /* низкая сцена: уменьшаем куклу по ширине (height правит пропорции) */
  .doll { width: 7.5% !important; }
  .doll .nick { font-size: 9px; bottom: -15px; }
  .doll .status, .doll .mute-ic { display: none; }
  .emo-wrap { max-height: 40vh; overflow-y: auto; }
  #mobNav { height: calc(48px + var(--safe-b)); }
  #mobNav button i { font-size: 17px; }
  #mobNav button span { display: none; }
  main { padding-bottom: calc(48px + var(--safe-b) + 6px); }
  header { padding: 5px 10px; }
  header .logo { height: 24px; }
}

/* ==================== PWA: плашки установки и обновления ==================== */
#installBar {
  position: fixed; left: 12px; right: 12px; z-index: 210;
  bottom: calc(var(--nav-h) + var(--safe-b) + 12px);
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: linear-gradient(180deg, rgba(46,32,96,.97), rgba(28,19,60,.98));
  border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  backdrop-filter: blur(14px); animation: ibIn .3s cubic-bezier(.3,.8,.4,1);
}
@keyframes ibIn { from { transform: translateY(24px); opacity: 0 } }
#installBar img { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; }
#installBar .ib-txt { flex: 1; min-width: 0; line-height: 1.3; }
#installBar .ib-txt b { display: block; font-size: 14px; font-weight: 900; }
#installBar .ib-txt span { font-size: 11.5px; color: var(--txt-dim); font-weight: 700; }
#installBar .btn { flex-shrink: 0; }

#updateBar {
  position: fixed; left: 50%; transform: translateX(-50%); top: 12px; z-index: 220;
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: linear-gradient(180deg, rgba(46,32,96,.97), rgba(28,19,60,.98));
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  font-weight: 800; font-size: 13.5px; backdrop-filter: blur(12px);
}

/* на десктопе плашка установки живёт в правом нижнем углу */
@media (min-width: 861px) {
  #installBar { left: auto; right: 20px; bottom: 20px; max-width: 400px; }
}
@media (max-width: 420px) {
  #installBar .ib-txt span { display: none; }
  #installBar { gap: 9px; padding: 10px; }
}

/* ---- строка настройки с переключателем ---- */
.setting-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 16px;
  background: rgba(0,0,0,.28); border: 1px solid var(--line); border-radius: 14px;
}
.setting-row b { display: block; font-size: 13.5px; font-weight: 900; }
.setting-row span { font-size: 11.5px; color: var(--txt-dim); font-weight: 700; }
.switch {
  margin-left: auto; flex-shrink: 0; width: 52px; height: 30px; border-radius: 20px;
  background: rgba(255,255,255,.12); position: relative; transition: background .18s;
  box-shadow: inset 0 0 0 2px var(--line);
}
.switch i {
  position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #cfc6f5; transition: transform .18s, background .18s;
}
.switch.on { background: linear-gradient(90deg, var(--pink), var(--purple)); box-shadow: none; }
.switch.on i { transform: translateX(22px); background: #fff; }
.switch:disabled { opacity: .45; cursor: not-allowed; }
/* в установленном приложении «Выйти» не нужна */
html.pwa #btnLogout, html.pwa [data-more="logout"] { display: none; }

/* ==================== КОМНАТЫ 2.4 ==================== */
/* метки в списке комнат */
.room-item .flags { display: flex; gap: 3px; margin-left: 4px; font-size: 11px; }
.room-item .nm { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.room-item.locked .thumb { filter: brightness(.72) saturate(.8); }

/* строка заместителя */
.dep-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 11px; border-radius: 12px;
  background: rgba(255,255,255,.05); margin-bottom: 6px; font-weight: 800; font-size: 13px;
}
.dep-item .star { color: var(--gold); }
.dep-item button { margin-left: auto; }
#rcDelete:hover { background: rgba(255,95,110,.25); box-shadow: inset 0 0 0 2px rgba(255,95,110,.5); }

/* владелец/зам в списке участников */
.user-item .crown { font-size: 11px; }

/* ==================== АДМИН-ПАНЕЛЬ ==================== */
/* Вкладок стало 14, и в одну строку они не помещаются. Раньше стоял
   overflow-x: auto со спрятанной полосой прокрутки — вкладки просто
   уезжали за край, и о существовании «Аватарок» и «Ошибок» узнать
   было неоткуда. Переносим на несколько строк: лучше шапка на три
   ряда, чем невидимые разделы. */
.admin-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,.2); flex-shrink: 0;
  max-height: 30vh; overflow-y: auto; }
.admin-tabs button { flex: 0 1 auto; padding: 9px 13px; border-radius: 12px; font-weight: 800;
  font-size: 12.5px; background: rgba(255,255,255,.06); color: var(--txt-dim); transition: .13s;
  display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.admin-tabs button.on { background: linear-gradient(180deg,#ff7a7a,#e03c4e); color: #fff;
  box-shadow: 0 4px 14px rgba(230,60,80,.35); }
.admin-tabs .cnt { background: rgba(0,0,0,.35); padding: 1px 7px; border-radius: 20px; font-size: 11px; }

.ad-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 11px; }
.ad-stat { background: rgba(0,0,0,.28); border: 1px solid var(--line); border-radius: 15px; padding: 14px; }
.ad-stat b { display: block; font-size: 24px; font-weight: 900; line-height: 1.1; }
.ad-stat span { font-size: 11px; color: var(--txt-dim); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }

.ad-search { display: flex; gap: 8px; margin-bottom: 14px; }
.ad-search input { flex: 1; }

.ad-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 13px; background: rgba(255,255,255,.045); margin-bottom: 7px; }
.ad-row .who { font-weight: 900; font-size: 13.5px; display: flex; align-items: center; gap: 5px; }
.ad-row .sub { font-size: 11px; color: var(--txt-dim); font-weight: 700; }
.ad-row .acts { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end;
  align-items: center; max-width: 480px; }
.ad-row .btn { padding: 6px 10px; font-size: 11.5px; border-radius: 9px; box-shadow: none; }
.role-badge { font-size: 10.5px; font-weight: 900; padding: 2px 8px; border-radius: 8px;
  background: rgba(255,255,255,.1); }
.ad-row.banned { background: rgba(255,95,110,.12); border: 1px solid rgba(255,95,110,.3); }

.reason-list { display: flex; flex-wrap: wrap; gap: 7px; }
.reason-list button { padding: 9px 14px; border-radius: 12px; background: rgba(255,255,255,.07);
  font-weight: 800; font-size: 13px; transition: .13s; }
.reason-list button.on { background: linear-gradient(180deg,#ff7ac1,#e5388f); color: #fff; }

.log-item { display: flex; gap: 9px; padding: 8px 11px; border-radius: 11px; font-size: 12.5px;
  background: rgba(255,255,255,.035); margin-bottom: 5px; font-weight: 700; align-items: baseline; }
.log-item .t { color: var(--txt-dim); font-size: 10.5px; flex-shrink: 0; }
.log-item .act { font-weight: 900; }
textarea { resize: vertical; min-height: 70px; }

/* роль рядом с ником */
.role-ic { font-size: 12px; }
@media (max-width: 860px) {
  #mAdmin .modal-card { height: 90dvh; max-width: none; }
  .ad-row { grid-template-columns: 1fr; }
  .ad-row .acts { max-width: none; justify-content: flex-start; margin-top: 4px; }
  .ad-stats { grid-template-columns: repeat(2, 1fr); }
}
.ad-role { width: auto; padding: 6px 8px; border-radius: 9px; font-size: 11.5px; font-weight: 800;
  background: rgba(10,7,24,.7); border: 1px solid var(--line); }

/* ==================== ДОНАТ ==================== */
.gem-ic { width: 17px; height: 17px; vertical-align: -3px; }
.pill.gems { cursor: pointer; background: linear-gradient(180deg, rgba(255,79,216,.22), rgba(164,76,255,.16));
  border-color: rgba(255,79,216,.45); transition: .15s; }
.pill.gems:hover { filter: brightness(1.18); transform: translateY(-1px); }
.pill.gems b { color: #ff9ee8; }

/* донат-карточка в магазине */
.card.donate {
  border-color: rgba(255,79,216,.5);
  background: linear-gradient(180deg, rgba(255,79,216,.14), rgba(120,40,180,.1));
}
.card.donate::after {
  content: ''; position: absolute; inset: -40% -60%; pointer-events: none;
  background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,.22) 50%, transparent 58%);
  animation: shine 3.4s ease-in-out infinite;
}
@keyframes shine { 0%, 65% { transform: translateX(-60%); } 100% { transform: translateX(60%); } }
.card .pr.gem { color: #ff9ee8; display: flex; align-items: center; justify-content: center; gap: 5px; }
.card .pr.gem .gem-ic { width: 20px; height: 20px; vertical-align: 0; }
.shop-tabs button.donate-tab { background: linear-gradient(180deg,#ff5fd0,#c026a8); color: #fff; }
.shop-tabs button.donate-tab.on { box-shadow: 0 4px 16px rgba(255,79,216,.5); }

#gemBanner {
  display: flex; align-items: center; gap: 12px; padding: 13px 15px; margin-bottom: 15px;
  border-radius: 16px; border: 1px solid rgba(255,79,216,.4);
  background: linear-gradient(120deg, rgba(255,79,216,.18), rgba(90,40,200,.14));
}
#gemBanner .t { flex: 1; min-width: 0; line-height: 1.35; }
#gemBanner b { display: block; font-size: 14px; font-weight: 900; }
#gemBanner span { font-size: 11.5px; color: var(--txt-dim); font-weight: 700; }

.gem-grid { grid-template-columns: repeat(auto-fill, minmax(130px,1fr)); }
.pack { position: relative; text-align: center; }
.pack .amount { font-size: 21px; font-weight: 900; color: #ff9ee8; display: flex;
  align-items: center; justify-content: center; gap: 5px; }
.pack .rub { font-weight: 900; font-size: 15px; color: var(--gold); }
.pack .bonus { position: absolute; top: 7px; right: 7px; font-size: 10px; font-weight: 900;
  padding: 2px 7px; border-radius: 8px; background: var(--green); color: #04301f; }

/* строка выдачи гемов в админке */
.ad-row .gem-give { display: flex; gap: 4px; align-items: center; }
.ad-row .gem-give input { width: 62px; padding: 6px 8px; font-size: 12px; border-radius: 9px; }
.gem-log { font-size: 11.5px; color: var(--txt-dim); font-weight: 700; margin-top: 6px; }

/* ==================== АНИМАЦИИ ВЕЩЕЙ ====================
   Базовый transform у .acc — translate(-50%,0), поэтому каждая
   анимация обязана его сохранять, иначе предмет улетит с пупса. */

/* --- tier 1: простое движение (дешёвый игровой шмот) --- */
.acc.fx-sway  { animation: fxSway 2.6s ease-in-out infinite; transform-origin: 50% 12%; }
@keyframes fxSway {
  0%,100% { transform: translate(-50%,0) rotate(-5deg); }
  50%     { transform: translate(-50%,0) rotate(5deg); }
}
.acc.fx-bob   { animation: fxBob 2.2s ease-in-out infinite; }
@keyframes fxBob {
  0%,100% { transform: translate(-50%,0); }
  50%     { transform: translate(-50%,-9%); }
}
.acc.fx-pulse { animation: fxPulse 1.7s ease-in-out infinite; transform-origin: 50% 50%; }
@keyframes fxPulse {
  0%,100% { transform: translate(-50%,0) scale(1); }
  50%     { transform: translate(-50%,0) scale(1.09); }
}

/* --- tier 2: движение + мягкая подсветка (дорогой игровой) --- */
.acc.fx-swing { animation: fxSwing 1.9s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes fxSwing {
  0%,100% { transform: translate(-50%,0) rotate(-13deg); }
  50%     { transform: translate(-50%,0) rotate(13deg); }
}
.acc.fx-glowSoft { animation: fxGlow 2.4s ease-in-out infinite; }
@keyframes fxGlow {
  0%,100% { filter: drop-shadow(0 3px 5px rgba(12,6,30,.6)) drop-shadow(0 0 3px rgba(255,180,240,.5)); }
  50%     { filter: drop-shadow(0 3px 5px rgba(12,6,30,.6)) drop-shadow(0 0 13px rgba(255,140,235,.95)); }
}
.acc.fx-spin { animation: fxSpin 9s linear infinite; transform-origin: 50% 50%; }
@keyframes fxSpin {
  from { transform: translate(-50%,0) rotate(0deg); }
  to   { transform: translate(-50%,0) rotate(360deg); }
}

/* --- tier 3: донат — сложные эффекты --- */
.acc.fx-flame { animation: fxFlame 1.1s ease-in-out infinite; transform-origin: 50% 85%; }
@keyframes fxFlame {
  0%,100% { transform: translate(-50%,0) scale(1,1);
            filter: drop-shadow(0 0 6px rgba(255,140,40,.9)) drop-shadow(0 0 16px rgba(255,80,0,.6)); }
  35%     { transform: translate(-50%,-2%) scale(1.04,.97);
            filter: drop-shadow(0 0 12px rgba(255,190,60,1)) drop-shadow(0 0 26px rgba(255,90,0,.8)); }
  70%     { transform: translate(-50%,0) scale(.98,1.03);
            filter: drop-shadow(0 0 8px rgba(255,120,20,.95)) drop-shadow(0 0 20px rgba(255,60,0,.7)); }
}
.acc.fx-rainbow { animation: fxRainbow 4.2s linear infinite; }
@keyframes fxRainbow {
  0%   { filter: hue-rotate(0deg)   drop-shadow(0 0 9px rgba(255,120,220,.9)); }
  50%  { filter: hue-rotate(180deg) drop-shadow(0 0 15px rgba(120,220,255,.95)); }
  100% { filter: hue-rotate(360deg) drop-shadow(0 0 9px rgba(255,120,220,.9)); }
}
.acc.fx-electric { animation: fxElectric .45s steps(2, end) infinite; }
@keyframes fxElectric {
  0%,100% { filter: drop-shadow(0 0 7px rgba(80,190,255,.95)) drop-shadow(0 0 18px rgba(40,120,255,.6)); }
  50%     { filter: drop-shadow(0 0 15px rgba(180,240,255,1)) drop-shadow(0 0 30px rgba(60,160,255,.9)) brightness(1.22); }
}
.acc.fx-float3 { animation: fxFloat3 3.4s ease-in-out infinite; }
@keyframes fxFloat3 {
  0%,100% { transform: translate(-50%,0)    rotate(-3deg);
            filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)) drop-shadow(0 0 10px rgba(150,200,255,.7)); }
  50%     { transform: translate(-50%,-14%) rotate(3deg);
            filter: drop-shadow(0 14px 14px rgba(0,0,0,.4)) drop-shadow(0 0 18px rgba(180,220,255,.95)); }
}
.acc.fx-beat { animation: fxBeat 1.25s ease-in-out infinite; transform-origin: 50% 50%; }
@keyframes fxBeat {
  0%,100%  { transform: translate(-50%,0) scale(1);
             filter: drop-shadow(0 0 6px rgba(255,90,180,.85)); }
  15%      { transform: translate(-50%,0) scale(1.16);
             filter: drop-shadow(0 0 16px rgba(255,120,200,1)); }
  30%      { transform: translate(-50%,0) scale(1.02); }
  45%      { transform: translate(-50%,0) scale(1.11);
             filter: drop-shadow(0 0 13px rgba(255,110,195,.95)); }
}
.acc.fx-orbit { animation: fxOrbit 5.5s linear infinite; }
@keyframes fxOrbit {
  0%   { transform: translate(-50%,0)      rotate(0deg)   scale(1); }
  25%  { transform: translate(-30%,-14%)   rotate(8deg)   scale(1.07); }
  50%  { transform: translate(-50%,-20%)   rotate(0deg)   scale(1); }
  75%  { transform: translate(-70%,-14%)   rotate(-8deg)  scale(.93); }
  100% { transform: translate(-50%,0)      rotate(0deg)   scale(1); }
}

/* аура лежит на полу: сплющиваем и убираем из потока слоёв */
.acc.slot-aura { transform: translate(-50%,0) scaleY(.42) !important; opacity: .88; }
.acc.slot-aura.fx-spin    { animation: fxAuraSpin 7s linear infinite; }
.acc.slot-aura.fx-flame   { animation: fxAuraFlame 1.3s ease-in-out infinite; }
.acc.slot-aura.fx-rainbow { animation: fxAuraRainbow 4.5s linear infinite; }
@keyframes fxAuraSpin {
  from { transform: translate(-50%,0) scaleY(.42) rotate(0deg); }
  to   { transform: translate(-50%,0) scaleY(.42) rotate(360deg); }
}
@keyframes fxAuraFlame {
  0%,100% { transform: translate(-50%,0) scaleY(.42) scale(1);
            filter: drop-shadow(0 0 10px rgba(255,140,40,.9)); }
  50%     { transform: translate(-50%,0) scaleY(.42) scale(1.06);
            filter: drop-shadow(0 0 22px rgba(255,190,60,1)); }
}
@keyframes fxAuraRainbow {
  0%   { transform: translate(-50%,0) scaleY(.42) rotate(0deg);   filter: hue-rotate(0deg)   drop-shadow(0 0 12px rgba(255,200,80,.9)); }
  100% { transform: translate(-50%,0) scaleY(.42) rotate(360deg); filter: hue-rotate(360deg) drop-shadow(0 0 12px rgba(255,200,80,.9)); }
}

/* значок «анимировано» в магазине */
.card .fx-tag { position: absolute; top: 8px; left: 8px; font-size: 10px; font-weight: 900;
  padding: 2px 7px; border-radius: 8px; background: rgba(120,80,255,.85); color: #fff; }
.card.donate .fx-tag { background: linear-gradient(90deg,#ff5fd0,#a44cff); }
/* превью анимации прямо в карточке магазина */
.card img.preview-fx { animation-duration: 2.4s; }

/* фильтр по полу */
.sex-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.sex-tabs button { padding: 7px 14px; border-radius: 11px; background: rgba(255,255,255,.06);
  font-weight: 800; font-size: 12.5px; transition: .13s; }
.sex-tabs button.on { background: linear-gradient(180deg,#6a4dff,#4a2fd0); color: #fff; }

/* уважаем системную настройку «меньше движения» */
@media (prefers-reduced-motion: reduce) {
  .acc[class*="fx-"] { animation: none !important; }
}

/* ==================== КОНСТРУКТОР ПУПСА ==================== */
.creator { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: start; }
.creator-preview {
  background: linear-gradient(180deg, rgba(120,90,220,.22), rgba(40,26,90,.4));
  border: 1px solid var(--line); border-radius: 18px; aspect-ratio: 3/4;
  display: grid; place-items: end center; overflow: hidden; padding-bottom: 6%;
}
.creator-preview img { width: 82%; filter: drop-shadow(0 8px 14px rgba(0,0,0,.5)); }
.creator-opts .lbl { margin: 0 0 7px; }
.creator-opts .lbl.small { font-size: 11px; margin-top: 12px; }
.creator-opts .lbl:not(:first-child) { margin-top: 13px; }
.warn-lock { color: #ff9ee8; font-size: 10px; letter-spacing: 0; text-transform: none; }

.opt-row { display: flex; flex-wrap: wrap; gap: 7px; }
.opt-row button {
  padding: 8px 13px; border-radius: 11px; font-weight: 800; font-size: 12.5px;
  background: rgba(255,255,255,.07); border: 2px solid transparent; transition: .13s;
  display: flex; align-items: center; gap: 6px; color: var(--txt);
}
.opt-row button:hover { background: rgba(255,255,255,.14); }
.opt-row button.on { border-color: var(--pink); background: rgba(255,95,176,.2); }
.opt-row .sw { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.35); }
.opt-row button.locked { opacity: .5; cursor: not-allowed; }

@media (max-width: 860px) {
  .creator { grid-template-columns: 120px 1fr; gap: 12px; }
  .opt-row button { padding: 9px 12px; font-size: 12px; }
}

/* ============ РЕДАКТОР ПРЕДМЕТОВ (админка) ============ */
.ie-wrap { display: grid; grid-template-columns: 230px 1fr; gap: 14px; align-items: start; }

.ie-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ie-select {
  width: 100%; padding: 9px 11px; border-radius: 11px; font-weight: 800; font-size: 12.5px;
  background: rgba(255,255,255,.07); border: 2px solid transparent; color: var(--txt);
}
.ie-select:focus { outline: none; border-color: var(--pink); }

.ie-list {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 46vh; overflow-y: auto; padding-right: 4px;
}
.ie-item {
  display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 9px;
  padding: 7px 9px; border-radius: 11px; text-align: left; color: var(--txt);
  background: rgba(255,255,255,.05); border: 2px solid transparent; transition: .12s;
}
.ie-item:hover { background: rgba(255,255,255,.12); }
.ie-item.on { border-color: var(--pink); background: rgba(255,95,176,.18); }
.ie-item img { width: 30px; height: 30px; object-fit: contain; }
.ie-item .nm { font-weight: 800; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ie-item .sl { font-size: 10.5px; color: var(--txt-dim); font-weight: 700; }
.dot-changed { color: var(--pink); font-style: normal; font-size: 15px; line-height: 0; }

.ie-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ie-stage-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ie-stage {
  /* Сцена выше пупса: сверху остаётся запас под ушки, шляпы и нимбы (y < 0),
     иначе вещь уезжает за рамку и кажется обрезанной.
     Пропорция 3/4.4 вместо 3/4 даёт ~⅓ роста пупса свободного места. */
  position: relative; width: 216px; aspect-ratio: 3 / 4.4;
  background: repeating-conic-gradient(rgba(255,255,255,.05) 0% 25%, transparent 0% 50%) 50% / 18px 18px;
  border-radius: 14px; border: 2px dashed rgba(255,255,255,.16);
  touch-action: none;
  /* НЕ обрезаем: крупные вещи всё равно могут выйти за рамку,
     при overflow:hidden их не видно и невозможно схватить мышью */
  overflow: visible;
}
/* Линия «верх головы»: ориентир, докуда вещь гарантированно видна.
   Рисуется по верхней кромке .ie-doll, поэтому лежит на самом пупсе. */
.ie-doll::before {
  content: ''; position: absolute; left: -14%; right: -14%; top: 0;
  border-top: 1px dashed rgba(124,196,255,.4); pointer-events: none; z-index: 5;
}
/* запас сверху и по бокам, чтобы вынесенные вещи не наезжали на соседние блоки */
.ie-stage-wrap { padding: 18px 34px 10px; }
.ie-guide-v, .ie-guide-h { position: absolute; background: rgba(255,95,176,.28); pointer-events: none; }
.ie-guide-v { left: 50%; top: 0; bottom: 0; width: 1px; }
.ie-guide-h { top: 50%; left: 0; right: 0; height: 1px; }

/* 52% ширины сцены: над головой остаётся ~⅓ роста пупса под высокие вещи */
.ie-doll { position: absolute; left: 50%; bottom: 5%; width: 52%; transform: translateX(-50%); }
.ie-body { width: 100%; display: block; position: relative; z-index: 0; }
.ie-acc { position: absolute; cursor: grab; }
.ie-acc.dragging { cursor: grabbing; filter: drop-shadow(0 0 6px var(--pink)); }
.ie-stage-hint { font-size: 11px; color: var(--txt-dim); font-weight: 700; }

.ie-ctl { display: flex; flex-direction: column; gap: 9px; }
.ie-head { display: flex; align-items: center; gap: 11px; margin-bottom: 2px; }
.ie-head img { width: 38px; height: 38px; object-fit: contain; }
.ie-head b { display: block; font-size: 14.5px; }
.ie-head .sub { font-size: 11.5px; color: var(--txt-dim); font-weight: 700; }
.ie-badge {
  margin-left: auto; font-size: 10.5px; font-weight: 800; padding: 4px 9px;
  border-radius: 8px; background: rgba(255,95,176,.2); color: #ff9ee8;
}

.ie-row { display: flex; align-items: center; gap: 10px; }
.ie-row > span { width: 108px; font-size: 12px; font-weight: 800; color: var(--txt-dim); flex: none; }
.ie-row input[type="range"] { flex: 1; accent-color: var(--pink); min-width: 0; }
.ie-row input[type="number"] {
  width: 78px; flex: none; padding: 7px 9px; border-radius: 9px; font-weight: 800; font-size: 12px;
  background: rgba(255,255,255,.07); border: 2px solid transparent; color: var(--txt);
}
.ie-row input[type="number"]:focus { outline: none; border-color: var(--pink); }

.ie-actions { display: flex; align-items: center; gap: 8px; margin-top: 3px; flex-wrap: wrap; }
.ie-sex { display: flex; gap: 6px; }
.ie-sex .btn.on { border-color: var(--pink); background: rgba(255,95,176,.2); }
.ie-actions .btn[disabled] { opacity: .4; cursor: not-allowed; }
.ie-factory { font-size: 11px; color: var(--txt-dim); font-weight: 700; margin: 2px 0 0; }

.ie-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.1); flex-wrap: wrap;
}
.ie-foot .sub { font-size: 12px; color: var(--txt-dim); font-weight: 700; }
.ie-foot .acts { display: flex; gap: 7px; }

@media (max-width: 860px) {
  .ie-wrap { grid-template-columns: 1fr; }
  .ie-list { max-height: 26vh; }
  .ie-row > span { width: 84px; font-size: 11.5px; }
}

/* ---- подвкладки редактора, коллекции, создание предмета ---- */
.ie-subtabs { display: flex; gap: 6px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.ie-subtabs button {
  padding: 8px 13px; border-radius: 10px; font-weight: 800; font-size: 12.5px;
  background: rgba(255,255,255,.06); border: 2px solid transparent; color: var(--txt); transition: .12s;
}
.ie-subtabs button:hover { background: rgba(255,255,255,.13); }
.ie-subtabs button.on { border-color: var(--pink); background: rgba(255,95,176,.18); }
.ie-sale-note { margin-left: auto; font-size: 11.5px; font-weight: 800; color: #ffb020; }

.dot-custom, .dot-hidden, .sale-tag {
  font-style: normal; font-size: 9.5px; font-weight: 800; padding: 1px 5px;
  border-radius: 6px; margin-left: 4px; vertical-align: middle;
}
.dot-custom { background: rgba(74,168,255,.22); color: #7cc4ff; }
.dot-hidden { background: rgba(255,255,255,.12); color: var(--txt-dim); }
.sale-tag   { background: rgba(255,176,32,.2); color: #ffb020; }

.ie-badge.custom { background: rgba(74,168,255,.2); color: #7cc4ff; }
.ie-props { display: flex; flex-direction: column; gap: 9px; padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,.08); border-bottom: 1px solid rgba(255,255,255,.08); }
.ie-props .ie-row input[type="text"] {
  flex: 1; padding: 7px 9px; border-radius: 9px; font-weight: 800; font-size: 12.5px;
  background: rgba(255,255,255,.07); border: 2px solid transparent; color: var(--txt);
}
.ie-props .ie-row input[type="text"]:focus { outline: none; border-color: var(--pink); }
.ie-unit { width: auto !important; flex: none; font-size: 14px; }

.ie-check { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--txt-dim); }
.ie-check input { accent-color: var(--pink); width: 16px; height: 16px; }

.ie-coll-new {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 12px; border-radius: 12px; background: rgba(255,255,255,.05); margin-bottom: 12px;
}
.ie-coll-new input {
  padding: 8px 11px; border-radius: 10px; font-weight: 800; font-size: 12.5px;
  background: rgba(255,255,255,.08); border: 2px solid transparent; color: var(--txt);
}
.ie-coll-new input:focus { outline: none; border-color: var(--pink); }
.ie-coll-new input[type="text"]:first-child { flex: 1; min-width: 160px; }
.ie-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 12px;
  font-weight: 700; color: var(--txt-dim); }
.ie-inline input { padding: 6px 8px; border-radius: 8px; background: rgba(255,255,255,.08);
  border: 2px solid transparent; color: var(--txt); font-weight: 800; }
.ie-inline input:focus { outline: none; border-color: var(--pink); }

.ie-new { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; }
.ie-new-preview { display: flex; flex-direction: column; align-items: center; }
.ie-new-form { display: flex; flex-direction: column; gap: 10px; }
.ie-new-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ie-new-form .field span { font-size: 11px; }

/* скидки в магазине */
.sale-badge {
  position: absolute; top: 8px; left: 8px; z-index: 3;
  background: linear-gradient(135deg, #ff8a3d, #ffb020); color: #201400;
  font-size: 10.5px; font-weight: 900; padding: 3px 7px; border-radius: 7px;
}
.card .pr s { color: var(--txt-dim); font-size: .85em; margin-right: 4px; font-weight: 700; }
.shop-tabs .coll-tab { border-color: rgba(255,176,32,.5); color: #ffcf6b; }
.shop-tabs .coll-tab.on { background: rgba(255,176,32,.2); border-color: #ffb020; }

@media (max-width: 860px) {
  .ie-new { grid-template-columns: 1fr; }
  .ie-new-grid { grid-template-columns: 1fr; }
}

/* ---- срок действия коллекций ---- */
.ie-coll-when {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  width: 100%; padding-top: 9px; margin-top: 3px;
  border-top: 1px dashed rgba(255,255,255,.12);
}
.ie-coll-when .hint { font-size: 11px; color: var(--txt-dim); font-weight: 700; }
.ie-when-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 7px; }
.ie-inline input[type="datetime-local"] {
  padding: 6px 9px; border-radius: 8px; background: rgba(255,255,255,.08);
  border: 2px solid transparent; color: var(--txt); font-weight: 700;
  font-size: 12px; color-scheme: dark;
}
.ie-inline input[type="datetime-local"]:focus { outline: none; border-color: var(--pink); }

/* ============ НОВЫЕ АНИМАЦИИ (2.13) ============
   Правило прежнее: каждый keyframe целиком переписывает transform,
   сохраняя базовый translate(-50%,0), иначе вещь улетает с пупса. */

/* --- tier 1 --- */
.acc.fx-tilt { animation: fxTilt 3.4s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes fxTilt {
  0%,100% { transform: translate(-50%,0) rotate(-3deg) scale(1); }
  50%     { transform: translate(-50%,0) rotate(3deg) scale(1.02); }
}

.acc.fx-breathe { animation: fxBreathe 3s ease-in-out infinite; transform-origin: 50% 50%; }
@keyframes fxBreathe {
  0%,100% { transform: translate(-50%,0) scale(1); opacity: .92; }
  50%     { transform: translate(-50%,0) scale(1.06); opacity: 1; }
}

.acc.fx-drift { animation: fxDrift 4.2s ease-in-out infinite; }
@keyframes fxDrift {
  0%,100% { transform: translate(-50%,0) translateX(-3px); }
  50%     { transform: translate(-50%,0) translateX(3px) translateY(-2px); }
}

/* --- tier 2 --- */
.acc.fx-jelly { animation: fxJelly 2.1s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes fxJelly {
  0%,100% { transform: translate(-50%,0) scale(1, 1); }
  30%     { transform: translate(-50%,0) scale(1.08, .92); }
  55%     { transform: translate(-50%,0) scale(.94, 1.07); }
  80%     { transform: translate(-50%,0) scale(1.03, .97); }
}

.acc.fx-pendulum { animation: fxPendulum 2.4s cubic-bezier(.45,0,.55,1) infinite; transform-origin: 50% 5%; }
@keyframes fxPendulum {
  0%,100% { transform: translate(-50%,0) rotate(-14deg); }
  50%     { transform: translate(-50%,0) rotate(14deg); }
}

.acc.fx-blink { animation: fxBlink 1.8s ease-in-out infinite; }
@keyframes fxBlink {
  0%,100% { transform: translate(-50%,0) scale(1);
            filter: drop-shadow(0 0 2px rgba(255,255,255,.5)) brightness(1); }
  50%     { transform: translate(-50%,0) scale(1.04);
            filter: drop-shadow(0 0 10px rgba(180,220,255,.95)) brightness(1.25); }
}

/* --- tier 3 --- */
.acc.fx-aurora { animation: fxAurora 5.5s ease-in-out infinite; }
@keyframes fxAurora {
  0%,100% { transform: translate(-50%,0) translateY(0) scale(1);
            filter: hue-rotate(0deg) drop-shadow(0 0 8px rgba(120,255,214,.75)); }
  33%     { transform: translate(-50%,0) translateY(-4px) scale(1.04);
            filter: hue-rotate(70deg) drop-shadow(0 0 14px rgba(140,190,255,.9)); }
  66%     { transform: translate(-50%,0) translateY(-2px) scale(1.02);
            filter: hue-rotate(-60deg) drop-shadow(0 0 12px rgba(220,150,255,.85)); }
}

.acc.fx-shockwave { animation: fxShock 2.2s cubic-bezier(.2,.7,.3,1) infinite; transform-origin: 50% 60%; }
@keyframes fxShock {
  0%      { transform: translate(-50%,0) scale(1);
            filter: drop-shadow(0 0 0 rgba(255,180,80,.9)); }
  18%     { transform: translate(-50%,0) scale(1.16);
            filter: drop-shadow(0 0 16px rgba(255,180,80,.95)); }
  40%     { transform: translate(-50%,0) scale(.97);
            filter: drop-shadow(0 0 6px rgba(255,140,60,.6)); }
  100%    { transform: translate(-50%,0) scale(1);
            filter: drop-shadow(0 0 0 rgba(255,180,80,0)); }
}

.acc.fx-glitch { animation: fxGlitch 1.6s steps(1, end) infinite; }
@keyframes fxGlitch {
  0%,100% { transform: translate(-50%,0) translateX(0); filter: none; opacity: 1; }
  8%      { transform: translate(-50%,0) translateX(-3px);
            filter: drop-shadow(2px 0 0 #ff2d6f) drop-shadow(-2px 0 0 #21e6ff); }
  14%     { transform: translate(-50%,0) translateX(3px);
            filter: drop-shadow(-2px 0 0 #ff2d6f) drop-shadow(2px 0 0 #21e6ff); }
  20%     { transform: translate(-50%,0) translateX(0); opacity: .78; }
  26%     { transform: translate(-50%,0) translateX(-2px);
            filter: drop-shadow(1px 0 0 #21e6ff); }
  32%     { transform: translate(-50%,0) translateX(0); filter: none; }
}

.acc.fx-starfall { animation: fxStar 3.2s ease-in-out infinite; }
@keyframes fxStar {
  0%,100% { transform: translate(-50%,0) translateY(0) rotate(0deg);
            filter: drop-shadow(0 0 5px rgba(255,240,160,.85)) brightness(1); }
  25%     { transform: translate(-50%,0) translateY(-6px) rotate(8deg);
            filter: drop-shadow(0 0 13px rgba(255,240,160,1)) brightness(1.3); }
  50%     { transform: translate(-50%,0) translateY(-2px) rotate(-6deg);
            filter: drop-shadow(0 0 9px rgba(255,225,120,.9)) brightness(1.15); }
  75%     { transform: translate(-50%,0) translateY(-5px) rotate(4deg);
            filter: drop-shadow(0 0 12px rgba(255,250,190,.95)) brightness(1.25); }
}

/* ============ СМАЙЛИКИ ДЛЯ ЧАТА ============ */
/* min-width: 0 обязателен: без него флекс не даёт полю сжиматься меньше
   содержимого, и при узкой сцене (широкий чат) строка ввода схлопывалась
   в квадратик, оставляя видимой только кнопку смайлика.
   Нижняя граница держит поле пригодным для набора. */
.msg-field { position: relative; flex: 1 1 140px; min-width: 120px; display: flex; align-items: center; }
.msg-field input { flex: 1; padding-right: 42px; }
.smile-btn {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; padding: 0; font-size: 17px; line-height: 1;
  background: transparent;
}
.smile-btn:hover { background: rgba(255,255,255,.12); }

.smile-pick {
  position: absolute; bottom: calc(100% + 10px); right: 0; z-index: 40;
  width: min(340px, 78vw); padding: 10px;
  background: linear-gradient(180deg, #2a1f5c, #1c1440);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  animation: slide .16s;
}
.smile-pick.hidden { display: none; }

.smile-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.smile-tabs button {
  padding: 5px 10px; border-radius: 9px; font-size: 11.5px; font-weight: 800;
  background: rgba(255,255,255,.07); color: var(--txt-dim); transition: .12s;
}
.smile-tabs button:hover { background: rgba(255,255,255,.15); color: var(--txt); }
.smile-tabs button.on { background: rgba(255,95,176,.22); color: #ffb0da; }

.smile-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
  gap: 3px; max-height: 216px; overflow-y: auto;
}
.smile-grid button {
  width: 100%; aspect-ratio: 1; border-radius: 9px; font-size: 20px; line-height: 1;
  background: transparent; transition: .1s;
}
.smile-grid button:hover { background: rgba(255,255,255,.16); transform: scale(1.18); }

@media (max-width: 860px) {
  .smile-pick { width: min(320px, 90vw); right: -6px; }
  .smile-grid { max-height: 168px; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); }
  .smile-grid button { font-size: 22px; }
}

/* ============ ВЫДАЧА ВАЛЮТЫ И ПРОМОКОДЫ (админ) ============ */
.give-box { display: inline-flex; align-items: center; gap: 4px; }
.give-in {
  width: 92px; padding: 6px 8px; border-radius: 9px; font-weight: 800; font-size: 12px;
  background: rgba(255,255,255,.08); border: 2px solid transparent; color: var(--txt);
}
.give-in:focus { outline: none; border-color: var(--pink); }

.promo-new {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 12px; border-radius: 12px; background: rgba(255,255,255,.05); margin-bottom: 12px;
}
.promo-new input {
  padding: 8px 11px; border-radius: 10px; font-weight: 800; font-size: 12.5px;
  background: rgba(255,255,255,.08); border: 2px solid transparent; color: var(--txt);
  color-scheme: dark;
}
.promo-new input:focus { outline: none; border-color: var(--pink); }
#pnCode { width: 210px; text-transform: uppercase; letter-spacing: .5px; }
.promo-new .hint { font-size: 11px; color: var(--txt-dim); font-weight: 700; width: 100%; }
.promo-code { letter-spacing: .6px; color: #ffd479; }

/* значок официальной комнаты */
.off-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 7px; border-radius: 7px; font-size: 10.5px; font-weight: 800;
  background: rgba(74,168,255,.18); color: #7cc4ff; letter-spacing: .2px;
}

/* ============ ГЕНЕРАТОР ПРЕДМЕТОВ ============ */
.gen-grid { display: flex; flex-wrap: wrap; gap: 5px; }
.gen-grid button {
  padding: 6px 11px; border-radius: 9px; font-size: 12px; font-weight: 800;
  background: rgba(255,255,255,.07); color: var(--txt-dim);
  border: 2px solid transparent; transition: .12s;
}
.gen-grid button:hover { background: rgba(255,255,255,.15); color: var(--txt); }
.gen-grid button.on { border-color: var(--pink); background: rgba(255,95,176,.2); color: var(--txt); }

.gen-pals { display: flex; flex-wrap: wrap; gap: 5px; }
.gen-pals button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px 5px 6px; border-radius: 9px; font-size: 11.5px; font-weight: 800;
  background: rgba(255,255,255,.07); color: var(--txt-dim);
  border: 2px solid transparent; transition: .12s;
}
.gen-pals button:hover { background: rgba(255,255,255,.15); color: var(--txt); }
.gen-pals button.on { border-color: var(--pink); background: rgba(255,95,176,.18); color: var(--txt); }
.gen-pals i { width: 16px; height: 16px; border-radius: 5px; border: 1px solid rgba(0,0,0,.35); }
#gnImg.hidden { display: none; }

/* превью генератора: крупные вещи не должны вылезать за карточку */
.ie-new-preview { overflow: visible; }
.ie-new-preview .ie-stage { margin: 26px 0 10px; }

/* ============ ПОЧТА: подтверждение и сброс ============ */
.link-btn {
  display: block; margin: 8px auto 0; padding: 4px 8px;
  font-size: 12.5px; font-weight: 800; color: var(--txt-dim);
  background: transparent; text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--pink); }
.link-btn.hidden { display: none; }
.code-input {
  width: 100%; text-align: center; letter-spacing: 10px;
  font-size: 26px; font-weight: 900; padding: 12px;
  border-radius: 14px; background: rgba(255,255,255,.08);
  border: 2px solid transparent; color: var(--txt);
}
.code-input:focus { outline: none; border-color: var(--pink); }
.mm-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; }
.mm-foot .link-btn { margin: 0; }

/* поле описания в генераторе */
.gen-prompt { display: flex; gap: 7px; align-items: center; }
.gen-prompt input {
  flex: 1; padding: 9px 12px; border-radius: 11px; font-weight: 700; font-size: 13px;
  background: rgba(255,255,255,.08); border: 2px solid transparent; color: var(--txt);
}
.gen-prompt input:focus { outline: none; border-color: var(--pink); }
.gen-matched { min-height: 15px; margin: 5px 0 2px; font-size: 11.5px;
  font-weight: 700; color: #7cc4ff; }

/* ============ СТАТИСТИКА И ЧУЖОЙ ПРОФИЛЬ ============ */
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px;
}
.sbox {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 11px 8px; border-radius: 13px; text-align: center;
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
}
.sbox i { font-style: normal; font-size: 18px; line-height: 1; }
.sbox b { font-size: 15px; font-weight: 900; }
.sbox span { font-size: 10.5px; color: var(--txt-dim); font-weight: 700; line-height: 1.25; }
.sbox.wide { grid-column: 1 / -1; }
.sbox.wide b { font-size: 13.5px; }

.up-top { display: grid; grid-template-columns: 168px 1fr; gap: 18px; align-items: start; }
.up-doll { aspect-ratio: 3/4; }
.up-info { display: flex; flex-direction: column; gap: 7px; }
.up-name { font-size: 19px; font-weight: 900; display: flex; align-items: center;
  gap: 7px; flex-wrap: wrap; }
.up-title { font-size: 14px; font-weight: 800; }
.up-status {
  font-size: 13px; color: var(--txt-dim); font-style: italic;
  padding: 7px 11px; border-radius: 11px; background: rgba(255,255,255,.05);
}
.up-meta { font-size: 12px; color: var(--txt-dim); font-weight: 700; line-height: 1.7; }
.up-acts { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 4px; }

@media (max-width: 860px) {
  .up-top { grid-template-columns: 1fr; }
  .up-doll { max-width: 190px; margin: 0 auto; }
  .stat-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
}

/* ============ АВАТАРКИ ============ */
.ava-row { display: flex; gap: 12px; align-items: center; }
.ava-now {
  width: 68px; height: 68px; border-radius: 18px; overflow: hidden; flex: none;
  background: rgba(255,255,255,.06); border: 2px solid var(--line);
  display: grid; place-items: center;
}
.ava-now img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* когда аватарки нет — показываем голову пупса, а не всё тело */
.ava-now.is-doll img { width: 165%; height: auto; object-fit: none; margin-top: 30%; }
.ava-btns { display: flex; flex-direction: column; gap: 5px; }
.ava-btns .btn { justify-content: flex-start; }
.ava-btns .btn[disabled] { opacity: .4; cursor: not-allowed; }

.ava-bgs { display: flex; gap: 7px; flex-wrap: wrap; }
.ava-bgs button {
  width: 34px; height: 34px; border-radius: 10px;
  border: 2px solid transparent; transition: .12s;
}
.ava-bgs button:hover { transform: scale(1.08); }
.ava-bgs button.on { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,95,176,.4); }

.ava-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.ava-grid button {
  aspect-ratio: 1; border-radius: 16px; padding: 0; overflow: hidden;
  border: 2px solid transparent; background: transparent; transition: .12s;
}
.ava-grid button img { width: 100%; height: 100%; display: block; }
.ava-grid button:hover { transform: scale(1.07); }
.ava-grid button.on { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255,95,176,.3); }

.up-left { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.up-ava { width: 96px; height: 96px; border-radius: 24px; object-fit: cover;
  border: 2px solid var(--line); }

/* ============ КАРТОЧКА ИГРОКА (админ) ============ */
.card-top { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.card-ava { width: 84px; height: 84px; border-radius: 22px; object-fit: cover;
  border: 2px solid var(--line); flex: none; background: rgba(255,255,255,.06); }
.card-head { min-width: 0; }
.card-name { font-size: 18px; font-weight: 900; display: flex; align-items: center;
  gap: 7px; flex-wrap: wrap; margin-bottom: 4px; }
.card-sub { font-size: 12.5px; color: var(--txt-dim); font-weight: 700; line-height: 1.6; }

.card-money {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 12px; border-radius: 13px; background: rgba(255,255,255,.05);
}
.card-money .hint { font-size: 11px; color: var(--txt-dim); font-weight: 700; width: 100%; }

.card-inv { display: flex; flex-direction: column; gap: 5px; max-height: 240px; overflow-y: auto; }
.inv-line {
  display: grid; grid-template-columns: 30px 1fr auto auto; gap: 10px; align-items: center;
  padding: 6px 10px; border-radius: 11px; background: rgba(255,255,255,.05);
}
.inv-line img { width: 30px; height: 30px; object-fit: contain; }
.inv-line .no-ic { display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 8px; background: rgba(255,255,255,.08); font-style: normal; color: var(--txt-dim); }
.inv-line .nm { font-weight: 800; font-size: 12.5px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.inv-line .pr { font-size: 12px; font-weight: 800; color: var(--txt-dim); }

.card-give { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 7px; max-height: 230px; overflow-y: auto; }
.give-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 7px 4px;
  border-radius: 12px; background: rgba(255,255,255,.05); border: 2px solid transparent;
  color: var(--txt); transition: .12s;
}
.give-item:hover { background: rgba(74,168,255,.18); border-color: #4aa8ff; }
.give-item img { width: 34px; height: 34px; object-fit: contain; }
.give-item span { font-size: 10px; font-weight: 700; line-height: 1.2; text-align: center;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

@media (max-width: 860px) {
  .ava-grid { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); }
  .card-top { flex-direction: column; align-items: center; text-align: center; }
  .inv-line { grid-template-columns: 26px 1fr auto; }
  .inv-line .pr { display: none; }
}

/* ==================== ПРЕМИУМ 2.21 ==================== */

/* Анимированный ник: цвет плавно идёт от тёмного к белому и обратно.
   Сделано градиентом по тексту, а не сменой color: так переход виден
   как перелив вдоль букв, а не как мигание всего ника целиком.
   background-clip: text требует прозрачного цвета самого текста. */
@keyframes premShine {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.nick.prem, .who.prem, .user-item .nm.prem, .up-name .prem, .card-name .prem {
  /* Радужный перелив вместо прежнего фиолетово-белого: тот менял
     яркость, но оставался одного цвета, и «анимация» читалась как
     мерцание. Цвета взяты насыщенные — ник виден на любом фоне. */
  background-image: linear-gradient(90deg,
    #ff6ec7 0%, #ffd24a 14%, #7dffb0 28%, #5ad2ff 42%,
    #b98cff 56%, #ff6ec7 70%, #ffd24a 84%, #7dffb0 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: premShine 4.5s linear infinite;
  font-weight: 900;
}
/* Над пупсом ник лежит на тёмной плашке — добавляем ей золотой контур,
   иначе светлая часть градиента теряется на фоне сцены. */
/* Плашка премиум-ника.
   ВАЖНО: сам ник красится градиентом через background-clip: text, то есть
   использует СВОЙ background. Если задать здесь background целиком, он
   затрёт градиент — а текст-то прозрачный, и ник исчезает совсем
   (проверено на скриншоте: от ника осталась одна корона).
   Поэтому фон плашки рисуем НЕ фоном, а тенью-подложкой: box-shadow
   с нулевым размытием и большим spread даёт ту же плотную подложку,
   не трогая background элемента. */
/* Плашка премиум-ника.
   Ник красится градиентом через background-clip: text и использует свой
   background. Правило .doll.me .nick (розовая подсветка своего пупса)
   идёт ниже и раньше затирало и градиент, и clip — ник пропадал целиком,
   оставалась одна корона. Проверено на скриншоте.
   Поэтому здесь селектор той же силы (.doll.me .nick.prem), и градиент
   с clip восстанавливаются явно. Подложку рисуем inset-тенью, чтобы
   не трогать background. */
.doll .nick.prem,
.doll.me .nick.prem {
  background-image: linear-gradient(90deg,
    #ff6ec7 0%, #ffd24a 14%, #7dffb0 28%, #5ad2ff 42%,
    #b98cff 56%, #ff6ec7 70%, #ffd24a 84%, #7dffb0 100%) !important;
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  border-color: rgba(255,196,64,.85);
  box-shadow: 0 0 0 100px rgba(6,3,16,.96) inset,
              0 0 12px rgba(255,184,32,.45),
              0 2px 8px rgba(0,0,0,.6);
  text-shadow: none;
}
/* Корона рядом с ником. Внутри градиентного текста эмодзи потеряло бы
   цвет из-за background-clip, поэтому заливку возвращаем принудительно. */
.prem-mark {
  -webkit-text-fill-color: initial; color: initial;
  font-style: normal; font-size: .9em; margin-right: 3px;
}

/* Золотая рамка вокруг аватарки: двойное кольцо + мягкое свечение.
   Кольцо рисуем через box-shadow, чтобы не сдвигать вёрстку размерами. */
@keyframes premGlow {
  0%, 100% { box-shadow: 0 0 0 2px #ffcf4a, 0 0 0 3.5px #a9761a, 0 0 12px rgba(255,190,60,.5); }
  50%      { box-shadow: 0 0 0 2px #fff0b0, 0 0 0 3.5px #c99326, 0 0 20px rgba(255,205,90,.85); }
}
.user-item .av.prem, .fr-item .av.prem, .ava-now.prem, .up-ava.prem, .card-ava.prem {
  animation: premGlow 2.6s ease-in-out infinite;
  border: none;
}
.ava-now.prem, .up-ava.prem { outline: none; }

/* вкладка «Особое» в магазине */
.shop-tabs .special-tab, #shopTabs .special-tab {
  background: linear-gradient(180deg, rgba(255,205,90,.28), rgba(200,140,20,.18));
  color: #ffd97a; border: 1px solid rgba(255,200,80,.45);
}
#shopTabs .special-tab.on {
  background: linear-gradient(180deg, #ffd46b, #e0a41f); color: #4a2c00; border-color: transparent;
}

/* карточка премиума */
.prem-card {
  grid-column: 1 / -1;                /* занимает всю ширину сетки магазина */
  background: linear-gradient(160deg, rgba(60,40,110,.85), rgba(30,20,58,.9));
  border: 1px solid rgba(255,200,80,.35); border-radius: 20px; padding: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,.4);
}
.prem-card.on { border-color: rgba(255,200,80,.75); box-shadow: 0 10px 44px rgba(255,180,40,.18); }
.prem-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.prem-crown {
  font-size: 40px; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center;
  background: linear-gradient(180deg, rgba(255,210,90,.3), rgba(180,120,20,.2));
  animation: premGlow 2.6s ease-in-out infinite;
}
.prem-title { font-size: 21px; font-weight: 900;
  background: linear-gradient(90deg, #ffe9a8, #ffc247, #ffe9a8);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.prem-sub { color: var(--txt-dim); font-size: 13px; font-weight: 700; }
.prem-price { margin-left: auto; display: flex; align-items: center; gap: 7px;
  font-size: 24px; font-weight: 900; color: #ff9ee8; }
.prem-price .gem-ic { width: 26px; height: 26px; }

.prem-active {
  background: rgba(53,212,151,.16); border: 1px solid rgba(53,212,151,.4);
  border-radius: 13px; padding: 10px 14px; margin-bottom: 14px;
  font-weight: 800; font-size: 14px; color: #7ff0c0;
}
.prem-active span { color: var(--txt-dim); font-weight: 700; margin-left: 8px; font-size: 12.5px; }

.prem-perks { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.prem-perk {
  display: flex; gap: 11px; align-items: flex-start;
  background: rgba(255,255,255,.05); border-radius: 13px; padding: 11px 13px;
}
.prem-perk i { font-size: 21px; font-style: normal; line-height: 1.1; }
.prem-perk b { display: block; font-size: 13.5px; margin-bottom: 2px; }
.prem-perk span { display: block; font-size: 12px; color: var(--txt-dim); font-weight: 700; line-height: 1.4; }

.prem-foot { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.prem-buy { padding: 13px 26px; font-size: 15px; }
.prem-note { margin-top: 8px; }
.role-badge.prem-badge { color: #ffd166; }

@media (max-width: 860px) {
  .prem-card { padding: 15px; }
  .prem-head { gap: 10px; }
  .prem-crown { width: 52px; height: 52px; font-size: 31px; border-radius: 15px; }
  .prem-title { font-size: 18px; }
  .prem-price { font-size: 20px; }
  .prem-perks { grid-template-columns: 1fr; }
  .prem-foot .prem-buy { width: 100%; }
}

/* лестница рангов */
#mRanks { z-index: 120; }   /* открывается поверх профиля */
.rank-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px;
  margin-bottom: 5px; background: rgba(255,255,255,.04); font-weight: 800; font-size: 13.5px;
}
.rank-row.done { opacity: .55; }
.rank-row.on {
  background: linear-gradient(90deg, rgba(164,76,255,.35), transparent);
  box-shadow: inset 0 0 0 1.5px rgba(164,76,255,.55);
}
.rank-n { width: 24px; color: var(--txt-dim); font-size: 12px; flex-shrink: 0; }
.rank-name { flex: 1; }
.rank-min { color: var(--txt-dim); font-size: 12.5px; font-weight: 700; }
.rank-you { font-style: normal; font-size: 11px; color: #d9c9ff;
  background: rgba(164,76,255,.3); padding: 2px 8px; border-radius: 20px; }

/* ==================== МЕДАЛИ В КОМНАТЕ (2.22) ====================
   Топ-3 по рейтингу среди тех, кто сейчас в комнате. */

/* Обёртка нужна потому, что у .av стоит overflow: hidden для кадрирования
   аватарки — значок, положенный внутрь, обрезался бы по кругу. */
.user-item .av-wrap { position: relative; flex-shrink: 0; line-height: 0; }
.user-item .medal {
  /* Значок был 13px и тонул на фоне аватарки: место в комнате — это
     повод для гордости, его должно быть видно с первого взгляда.
     Кружок-подложка отделяет медаль от картинки под ней. */
  position: absolute; right: -5px; bottom: -4px;
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-style: normal; line-height: 1;
  background: rgba(12,8,28,.92); box-shadow: 0 1px 4px rgba(0,0,0,.6);
  pointer-events: none;   /* не перехватываем клик по строке игрока */
}
/* Золото слегка пульсирует — первое место должно бросаться в глаза */
.user-item.medal-gold .medal { box-shadow: 0 0 0 1px #ffc94a, 0 0 10px rgba(255,190,60,.6);
  animation: medalPulse 2.4s ease-in-out infinite; }
@keyframes medalPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }

/* Кольцо вокруг аватарки в цвет места — видно даже боковым зрением,
   не приглядываясь к мелкому значку. */
.user-item.medal-gold   .av { box-shadow: 0 0 0 3px #ffc94a, 0 0 12px rgba(255,190,60,.6); }
.user-item.medal-silver .av { box-shadow: 0 0 0 3px #cfd8e6, 0 0 10px rgba(190,205,225,.45); }
.user-item.medal-bronze .av { box-shadow: 0 0 0 3px #d08b4a, 0 0 10px rgba(200,130,60,.45); }

/* Премиум важнее: его золотая рамка анимированная, и перебивать её
   статичным кольцом нельзя — иначе пропадёт оплаченный эффект. */
.user-item .av.prem { box-shadow: none; }

/* Лёгкая подсветка строки призёра */
.user-item.medal-gold   { background: linear-gradient(90deg, rgba(255,201,74,.13), transparent); }
.user-item.medal-silver { background: linear-gradient(90deg, rgba(207,216,230,.10), transparent); }
.user-item.medal-bronze { background: linear-gradient(90deg, rgba(208,139,74,.10), transparent); }
.user-item.medal-gold:hover   { background: linear-gradient(90deg, rgba(255,201,74,.22), rgba(255,255,255,.06)); }
.user-item.medal-silver:hover { background: linear-gradient(90deg, rgba(207,216,230,.18), rgba(255,255,255,.06)); }
.user-item.medal-bronze:hover { background: linear-gradient(90deg, rgba(208,139,74,.18), rgba(255,255,255,.06)); }

@media (max-width: 860px) {
  .user-item .medal { font-size: 12px; right: -3px; }
}

/* ==================== ВИТРИНА ГЕМОВ И СООБЩЕСТВО (2.23) ==================== */

/* шапка с курсом */
.gem-hero {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,79,216,.22), rgba(106,77,255,.18));
  border: 1px solid rgba(255,120,220,.32);
}
.gem-hero img { width: 56px; height: 56px; filter: drop-shadow(0 4px 12px rgba(255,80,200,.5)); }
.gem-rate { font-size: 21px; font-weight: 900; }
.gem-rate b { color: #ff9ee8; }
.gem-have { font-size: 13px; color: var(--txt-dim); font-weight: 700; margin-top: 3px; }
.gem-have b { color: #fff; }

/* пакеты — теперь просто прайс, без кнопки «купить»:
   оплата идёт вручную через мессенджер */
.gem-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: 10px; }
.gem-pack {
  position: relative; text-align: center; padding: 14px 10px; border-radius: 15px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); transition: .14s;
}
.gem-pack:hover { transform: translateY(-2px); border-color: rgba(255,120,220,.5); }
.gem-pack .bonus {
  position: absolute; top: -8px; right: -6px; background: linear-gradient(180deg, #35d497, #17a06c);
  color: #04301f; font-size: 10.5px; font-weight: 900; padding: 3px 8px; border-radius: 20px;
}
.gem-pack .pk-amount { display: flex; align-items: center; justify-content: center; gap: 5px;
  font-size: 20px; font-weight: 900; color: #ff9ee8; }
.gem-pack .pk-name { font-size: 11.5px; color: var(--txt-dim); font-weight: 800; margin: 2px 0 6px; }
.gem-pack .pk-rub { font-size: 15px; font-weight: 900; color: var(--gold); }

/* шаги «как купить» */
.gem-steps { display: grid; gap: 7px; }
.gem-steps > div { display: flex; align-items: center; gap: 11px;
  background: rgba(255,255,255,.04); border-radius: 12px; padding: 9px 13px; }
.gem-steps b {
  width: 23px; height: 23px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: linear-gradient(180deg, #6a4dff, #4a2fd0); font-size: 12px;
}
.gem-steps span { font-size: 13px; font-weight: 700; color: var(--txt-dim); }
.gem-steps em { font-style: normal; color: #fff; font-weight: 900; }

/* контакты */
.gem-contacts { display: grid; gap: 8px; margin-top: 12px; }
.gem-contact {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  background: rgba(255,255,255,.06); border: 1px solid var(--line);
  cursor: pointer; transition: .14s; text-decoration: none; color: inherit;
}
.gem-contact:hover { background: rgba(164,76,255,.2); border-color: rgba(164,76,255,.5); transform: translateX(3px); }
.gem-contact i { font-size: 23px; font-style: normal; width: 34px; text-align: center; }
.gem-contact b { display: block; font-size: 14px; }
.gem-contact span { display: block; font-size: 12.5px; color: var(--txt-dim); font-weight: 700; }
.gem-contact .copy-hint { margin-left: auto; font-style: normal; font-size: 11px;
  color: var(--txt-dim); background: rgba(0,0,0,.25); padding: 4px 10px; border-radius: 20px; }
.gem-note { margin-top: 14px; }

/* ---- редактор настроек (админ) ---- */
.cfg-edit .field { margin-bottom: 12px; }
.cfg-edit textarea {
  width: 100%; resize: vertical; font-family: inherit; font-size: 13.5px; line-height: 1.55;
  padding: 11px 13px; border-radius: 13px; background: rgba(0,0,0,.28);
  border: 1px solid var(--line); color: var(--txt);
}
.cfg-edit textarea:focus { outline: none; border-color: rgba(164,76,255,.6); }
.cfg-row { display: flex; gap: 6px; margin-bottom: 6px; align-items: center; }
.cfg-row input { flex: 1; min-width: 0; }
.cfg-row .c-ic { flex: 0 0 52px; text-align: center; }
.cfg-foot { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* ---- сообщество ---- */
.comm-hero {
  display: flex; align-items: center; gap: 15px; padding: 16px 18px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(74,168,255,.22), rgba(106,77,255,.18));
  border: 1px solid rgba(90,170,255,.32); margin-bottom: 16px;
}
.comm-logo {
  font-size: 32px; width: 58px; height: 58px; border-radius: 17px; display: grid; place-items: center;
  background: linear-gradient(180deg, rgba(90,170,255,.35), rgba(60,80,200,.25)); flex-shrink: 0;
}
.comm-title { font-size: 20px; font-weight: 900; }
.comm-site { font-size: 13.5px; font-weight: 800; color: #7cc4ff; text-decoration: none; }
.comm-site:hover { text-decoration: underline; }
.comm-text { font-size: 13.5px; line-height: 1.65; color: #d6d0ee; font-weight: 600; }
.comm-text p { margin: 0 0 12px; }
.comm-links { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; align-items: center; }
.btn.blue { background: linear-gradient(180deg, #5aa8ff, #2b6fd8); color: #fff; text-decoration: none; }
.comm-links .btn { text-decoration: none; display: inline-flex; align-items: center; }

@media (max-width: 860px) {
  .gem-hero { padding: 13px; gap: 12px; }
  .gem-hero img { width: 44px; height: 44px; }
  .gem-rate { font-size: 18px; }
  .gem-packs { grid-template-columns: repeat(2, 1fr); }
  .gem-contact .copy-hint { display: none; }   /* на телефоне и так тап */
  .cfg-row { flex-wrap: wrap; }
  .cfg-row input[data-f="link"] { flex: 1 0 100%; }
  .comm-links .btn { width: 100%; justify-content: center; }
}

/* ==================== ЗАЯВКИ НА ГЕМЫ И ИСТОРИЯ ЧАТА (2.24) ==================== */

/* --- форма заявки у игрока --- */
.ord-form {
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
  border-radius: 15px; padding: 14px;
}
.ord-row { display: grid; grid-template-columns: 150px 1fr; gap: 10px; }
.ord-row .field { margin: 0; }
.ord-sum { margin: 12px 0; font-size: 15px; font-weight: 800; color: var(--txt-dim); }
.ord-sum b { color: var(--gold); font-size: 19px; }
.ord-form .btn { width: 100%; }
.ord-form .hint { margin-top: 9px; }

.ord-list { display: grid; gap: 7px; }
.ord-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 13px; border-radius: 13px;
  background: rgba(255,255,255,.05); border-left: 3px solid var(--line);
}
.ord-item .ord-main { flex: 1; min-width: 0; }
.ord-item b { display: block; font-size: 13.5px; }
.ord-item span { display: block; font-size: 12px; color: var(--txt-dim); font-weight: 700; }
/* цвет полосы = стадия: видно с одного взгляда, что происходит */
.ord-item.ord-new  { border-left-color: var(--gold); }
.ord-item.ord-paid { border-left-color: #4aa8ff; }
.ord-item.ord-done { border-left-color: var(--green); }
.ord-item.ord-canc { border-left-color: #6b6480; opacity: .6; }

/* --- админская вкладка заявок --- */
.ord-tabs { display: flex; gap: 6px; margin: 12px 0; flex-wrap: wrap; }
.ord-tabs button {
  padding: 7px 13px; border-radius: 11px; font-weight: 800; font-size: 12.5px;
  background: rgba(255,255,255,.06); color: var(--txt-dim); transition: .12s;
}
.ord-tabs button:hover { background: rgba(255,255,255,.14); }
.ord-tabs button.on { background: linear-gradient(180deg, #6a4dff, #4a2fd0); color: #fff; }

.ad-row.ord-new  { border-left: 3px solid var(--gold); }
.ad-row.ord-paid { border-left: 3px solid #4aa8ff; }
.ad-row.ord-done { border-left: 3px solid var(--green); opacity: .75; }
.ad-row.ord-canc { border-left: 3px solid #6b6480; opacity: .55; }

.ord-badge {
  font-size: 10.5px; font-weight: 900; padding: 2px 9px; border-radius: 20px; margin-left: 6px;
  background: rgba(255,255,255,.1); color: var(--txt-dim);
}
.ord-badge.new  { background: rgba(255,201,74,.25); color: #ffd166; }
.ord-badge.paid { background: rgba(74,168,255,.25); color: #7cc4ff; }
.ord-badge.done { background: rgba(53,212,151,.25); color: #7ff0c0; }

/* счётчик на вкладке горит, только когда есть работа */
.admin-tabs .cnt.hot {
  background: linear-gradient(180deg, #ff7a86, #e0374a); color: #fff;
  animation: ordPulse 1.6s ease-in-out infinite;
}
@keyframes ordPulse { 0%,100% { opacity: 1 } 50% { opacity: .55 } }

/* --- история чата --- */
.cl-search { display: flex; gap: 7px; margin-bottom: 10px; flex-wrap: wrap; }
.cl-search input { flex: 1; min-width: 130px; }
.cl-search select { flex: 0 0 170px; }
.cl-list { display: grid; gap: 4px; }
.cl-row {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  padding: 7px 11px; border-radius: 10px; background: rgba(255,255,255,.04);
  font-size: 12.5px; line-height: 1.45;
}
.cl-row.sys { opacity: .6; font-style: italic; }
.cl-row .t { color: var(--txt-dim); font-size: 11px; font-weight: 700; flex-shrink: 0; }
.cl-row .rm {
  font-size: 10.5px; font-weight: 800; color: #b79bff;
  background: rgba(164,76,255,.16); padding: 1px 7px; border-radius: 20px; flex-shrink: 0;
}
.cl-row b { color: #fff; cursor: pointer; }
.cl-row b:hover { text-decoration: underline; }
.cl-row .sysn { color: var(--txt-dim); cursor: default; }
.cl-row .tx { flex: 1; min-width: 120px; word-break: break-word; }
.cl-row .btn { margin-left: auto; }

/* контекст раскрывается прямо под строкой */
.cl-ctx {
  flex: 1 0 100%; margin-top: 7px; padding: 9px 11px; border-radius: 10px;
  background: rgba(0,0,0,.3); border: 1px solid var(--line);
}
.cl-line { display: flex; gap: 7px; font-size: 12px; padding: 2px 0; line-height: 1.5; }
.cl-line .t { color: var(--txt-dim); font-size: 10.5px; flex-shrink: 0; }
.cl-line.on { background: rgba(255,201,74,.14); border-radius: 6px; padding: 3px 6px; }
.cl-line.sys { opacity: .55; font-style: italic; }

@media (max-width: 860px) {
  .ord-row { grid-template-columns: 1fr; }
  .ord-item { flex-wrap: wrap; }
  .cl-search select { flex: 1 0 100%; }
  .cl-row .btn { margin-left: 0; }
}

/* ==================== ЗНАКОМСТВО С ЧАТОМ (2.25) ==================== */
/* Не модалка на весь экран: гид должен объяснять интерфейс, а не закрывать
   его. Карточка стоит сбоку, подсвеченная кнопка остаётся видна. */
#tourBox {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  z-index: 190; width: min(420px, calc(100vw - 32px)); pointer-events: none;
}
.tour-card {
  position: relative; pointer-events: none;   /* фон карточки не перехватывает клики */
  background: linear-gradient(150deg, rgba(76,52,150,.97), rgba(32,20,64,.97));
  border: 1px solid rgba(164,76,255,.5); border-radius: 20px; padding: 18px 20px 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,.55); animation: tin .3s;
}
.tour-card button { pointer-events: auto; }   /* но кнопки нажимаются */
.tour-x {
  position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 9px;
  color: var(--txt-dim); background: rgba(0,0,0,.2); font-size: 15px; transition: .12s;
}
.tour-x:hover { color: #fff; background: rgba(0,0,0,.4); }
.tour-step { font-size: 11px; font-weight: 800; color: var(--txt-dim); letter-spacing: .08em; }
.tour-ic { font-size: 34px; line-height: 1; margin: 6px 0 8px; }
.tour-title { font-size: 17px; font-weight: 900; margin-bottom: 6px; }
.tour-text { font-size: 13.5px; line-height: 1.55; color: #ddd6f5; font-weight: 600; }
.tour-foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.tour-dots { display: flex; gap: 5px; flex: 1; }
.tour-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.22); }
.tour-dots i.on { background: var(--pink); width: 18px; border-radius: 20px; }

/* Подсветка кнопки, о которой идёт речь */
.tour-hl {
  position: relative; z-index: 185;
  box-shadow: 0 0 0 3px rgba(255,95,176,.75), 0 0 22px rgba(255,95,176,.5) !important;
  border-radius: 12px; animation: tourPulse 1.4s ease-in-out infinite;
}
@keyframes tourPulse { 0%,100% { filter: brightness(1) } 50% { filter: brightness(1.25) } }

@media (max-width: 860px) {
  #tourBox { bottom: calc(var(--nav-h) + var(--safe-b) + 74px); }
  .tour-card { padding: 15px 16px 13px; }
  .tour-title { font-size: 15.5px; }
  .tour-text { font-size: 12.5px; }
}

/* автомодерация в админке */
.md-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 14px; }
.md-modes button {
  text-align: left; padding: 12px 14px; border-radius: 14px; font-weight: 800; font-size: 13.5px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); transition: .13s;
}
.md-modes button span { display: block; font-size: 11.5px; color: var(--txt-dim);
  font-weight: 700; margin-top: 3px; line-height: 1.4; }
.md-modes button.on { background: linear-gradient(180deg, rgba(164,76,255,.35), rgba(90,40,180,.2));
  border-color: rgba(164,76,255,.6); }
.md-nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px,1fr)); gap: 10px; margin: 14px 0; }
.md-nums .field { margin: 0; }
.md-testout { min-height: 22px; font-size: 13.5px; font-weight: 700; padding: 4px 2px; }
@media (max-width: 860px) { .md-modes { grid-template-columns: 1fr; } }

/* ==================== ЗАДАНИЯ И УСЛУГИ (2.25) ==================== */
.quest {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 15px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); margin-bottom: 8px;
}
.quest.got { border-color: rgba(53,212,151,.5); background: rgba(53,212,151,.1); }
.quest i { font-size: 26px; font-style: normal; flex-shrink: 0; }
.quest .q-main { flex: 1; min-width: 0; }
.quest .q-main b { display: block; font-size: 14px; }
.quest .q-main span { display: block; font-size: 12px; color: var(--txt-dim); font-weight: 700; margin: 2px 0 6px; }
.q-bar { height: 5px; border-radius: 4px; background: rgba(0,0,0,.35); overflow: hidden; }
.q-bar i { display: block; height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--pink), var(--gold)); transition: width .4s; }
.quest .q-rew { text-align: right; font-weight: 900; color: var(--gold); font-size: 14px; flex-shrink: 0; }
.quest .q-rew span { display: block; font-size: 11px; color: var(--txt-dim); font-weight: 800; }
.quest .q-rew em { font-style: normal; font-size: 11.5px; color: var(--green); }
.quest.got .q-rew { color: var(--green); }

.sink {
  display: flex; align-items: flex-start; gap: 12px; padding: 13px 15px; border-radius: 15px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); margin-bottom: 9px;
}
.sink.has { border-color: rgba(255,201,74,.45); }
.sink i { font-size: 24px; font-style: normal; flex-shrink: 0; }
.sink .s-main { flex: 1; min-width: 0; }
.sink .s-main b { display: block; font-size: 14px; }
.sink .s-main span { display: block; font-size: 12px; color: var(--txt-dim); font-weight: 700;
  margin-top: 2px; line-height: 1.45; }
.sink .s-act { text-align: right; flex-shrink: 0; }
.sink .s-price { font-size: 14px; font-weight: 900; color: var(--gold); margin-bottom: 6px; }
.bub-row { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.bub { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; transition: .12s; }
.bub:hover { transform: scale(1.15); }
.bub.on { border-color: #fff; box-shadow: 0 0 0 2px rgba(164,76,255,.8); }

/* хвостик облачка красится в тот же цвет, что и само облачко */
.doll .bubble[style*="--bub"]::after { border-top-color: var(--bub); }
/* подсвеченный статус */
.user-item .ti.hl {
  background: linear-gradient(90deg, rgba(255,201,74,.25), transparent);
  border-radius: 6px; padding: 1px 6px; margin-left: -6px;
}

@media (max-width: 860px) {
  .quest { padding: 10px 12px; gap: 9px; }
  .quest i { font-size: 22px; }
  .sink { flex-wrap: wrap; }
  .sink .s-act { width: 100%; display: flex; align-items: center; justify-content: space-between; }
}

/* аналитика */
.fn { display: grid; gap: 3px; margin-bottom: 6px; }
.fn-bar { position: relative; height: 34px; border-radius: 10px; background: rgba(0,0,0,.3);
  overflow: hidden; display: flex; align-items: center; }
.fn-bar i { position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, rgba(164,76,255,.55), rgba(74,168,255,.4)); }
.fn-lbl { position: relative; padding-left: 12px; font-size: 12.5px; font-weight: 800; }
.fn-n { position: relative; margin-left: auto; padding-right: 12px; font-size: 12px;
  font-weight: 800; color: var(--txt-dim); }
.fn-drop { font-size: 11px; font-weight: 800; color: var(--txt-dim); padding: 1px 12px 4px; }
.fn-drop.bad { color: #ff9aa5; }
.an-chart { display: flex; align-items: flex-end; gap: 4px; height: 110px; padding: 6px 0; }
.an-col { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 2px;
  height: 100%; position: relative; }
.an-col i { width: 45%; border-radius: 3px 3px 0 0; min-height: 2px; }
.an-col .a-act { background: #4aa8ff; }
.an-col .a-reg { background: var(--pink); }
.an-col span { position: absolute; bottom: -16px; font-size: 9px; color: var(--txt-dim); font-weight: 700; }
.an-chart + .hint { margin-top: 20px; }

/* обмен вещами */
.tr-cols { display: grid; grid-template-columns: 1fr 34px 1fr; gap: 10px; align-items: start; }
.tr-arrow { font-size: 22px; text-align: center; padding-top: 34px; color: var(--txt-dim); }
.tr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px,1fr)); gap: 7px;
  max-height: 280px; overflow-y: auto; }
.tr-item { padding: 8px 5px; border-radius: 12px; background: rgba(255,255,255,.05);
  border: 1px solid var(--line); text-align: center; transition: .12s; }
.tr-item:hover { background: rgba(255,255,255,.12); }
.tr-item.on { border-color: var(--green); background: rgba(53,212,151,.18); }
.tr-item img { width: 40px; height: 40px; object-fit: contain; }
.tr-item span { display: block; font-size: 10.5px; font-weight: 800; line-height: 1.25; margin-top: 3px; }
.tr-item em { display: block; font-size: 9.5px; font-style: normal; font-weight: 800; }
@media (max-width: 860px) {
  .tr-cols { grid-template-columns: 1fr; }
  .tr-arrow { padding: 4px 0; }
}

/* мафия */
#mafBox { position: absolute; right: 14px; top: 14px; z-index: 70; width: 234px; }
.maf-card { background: rgba(14,9,32,.94); border: 1px solid rgba(164,76,255,.45);
  border-radius: 16px; padding: 11px 12px; backdrop-filter: blur(10px);
  box-shadow: 0 12px 34px rgba(0,0,0,.5); }
.maf-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; font-size: 13px; }
.maf-head b { flex: 1; font-weight: 900; }
.maf-head span { font-size: 12px; color: var(--gold); font-weight: 800; }
.maf-x { width: 20px; height: 20px; border-radius: 6px; color: var(--txt-dim); font-size: 15px; }
.maf-list { display: grid; gap: 4px; max-height: 240px; overflow-y: auto; }
.maf-p { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 9px;
  background: rgba(255,255,255,.05); font-size: 12px; font-weight: 800; }
.maf-p.dead { opacity: .45; text-decoration: line-through; }
.maf-p.me { box-shadow: inset 0 0 0 1.5px rgba(164,76,255,.55); }
.maf-p .mp-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.maf-p .mp-r { font-style: normal; font-size: 10px; padding: 1px 6px; border-radius: 20px; }
.maf-p .mp-r.mafia { background: rgba(224,55,74,.3); color: #ff9aa5; }
.maf-p .mp-r.civil { background: rgba(53,212,151,.25); color: #7ff0c0; }
.maf-p .mp-v { background: rgba(255,201,74,.25); color: #ffd166; font-size: 10.5px;
  padding: 1px 6px; border-radius: 20px; }
.maf-p .btn { padding: 2px 7px; font-size: 12px; }
.btn.red { background: linear-gradient(180deg, #ff7a86, #d02b3e); color: #fff; }
.maf-foot { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; align-items: center; }
.maf-role { margin-top: 9px; padding: 6px 9px; border-radius: 9px; font-size: 11.5px; font-weight: 800;
  text-align: center; }
.maf-role.mafia { background: rgba(224,55,74,.22); color: #ff9aa5; }
.maf-role.civil { background: rgba(53,212,151,.2); color: #7ff0c0; }
.maf-win { margin-top: 9px; text-align: center; font-weight: 900; font-size: 13px; color: var(--gold); }
@media (max-width: 860px) { #mafBox { right: 8px; top: 8px; width: 190px; } }

/* сезон */
.top-tabs { display: flex; gap: 6px; padding: 10px 16px 0; }
.top-tabs button { flex: 1; padding: 9px; border-radius: 12px; font-weight: 800; font-size: 13px;
  background: rgba(255,255,255,.06); color: var(--txt-dim); transition: .12s; }
.top-tabs button.on { background: linear-gradient(180deg, #6a4dff, #4a2fd0); color: #fff; }
.se-head { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-radius: 15px;
  background: linear-gradient(135deg, rgba(255,201,74,.2), rgba(164,76,255,.15));
  border: 1px solid rgba(255,201,74,.3); margin-bottom: 12px; flex-wrap: wrap; }
.se-head b { font-size: 16px; }
.se-head span { display: block; font-size: 12px; color: var(--txt-dim); font-weight: 700; }
.se-me { margin-left: auto; font-size: 12.5px; color: var(--txt-dim); font-weight: 700; }
.se-me b { color: var(--gold); }
.top-item { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 12px;
  background: rgba(255,255,255,.04); margin-bottom: 5px; }
.top-item.me { box-shadow: inset 0 0 0 1.5px rgba(164,76,255,.55); }
.top-item .pos { width: 28px; text-align: center; font-weight: 900; color: var(--txt-dim); }
.top-item .pos.p1 { color: #ffc93c; } .top-item .pos.p2 { color: #c9d1e0; } .top-item .pos.p3 { color: #c98a3c; }
.top-item .nm { flex: 1; font-weight: 800; font-size: 13.5px; }
.top-item .pts { font-size: 12px; font-weight: 800; color: var(--gold); }

/* ==================== 2.26: ДОКУМЕНТЫ, ПРИГЛАШЕНИЯ, КРОКОДИЛ ==================== */

/* ссылки на правила на экране входа */
.auth-links { display: flex; gap: 12px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.auth-links .link-btn { font-size: 12px; }

/* текст документа */
.doc-text { font-size: 13.5px; line-height: 1.7; color: #d6d0ee; font-weight: 600; }
.doc-text p { margin: 0 0 13px; }

/* что нового */
.news-one { margin-bottom: 10px; }
.news-ver { font-size: 11.5px; font-weight: 800; color: var(--txt-dim); letter-spacing: .05em; }
.news-title { font-size: 19px; font-weight: 900; margin: 4px 0 10px; }

/* приглашения */
.ref-hero { display: flex; gap: 14px; padding: 15px; border-radius: 17px;
  background: linear-gradient(135deg, rgba(53,212,151,.18), rgba(74,168,255,.14));
  border: 1px solid rgba(53,212,151,.32); }
.ref-ic { font-size: 32px; flex-shrink: 0; }
.ref-hero b { display: block; font-size: 15.5px; margin-bottom: 4px; }
.ref-hero span { display: block; font-size: 12.5px; color: var(--txt-dim);
  font-weight: 700; line-height: 1.55; }
.ref-hero span b { display: inline; color: var(--green); }
.ref-code { display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  border-radius: 13px; background: rgba(0,0,0,.3); border: 1px solid var(--line); }
.ref-code b { font-size: 17px; font-weight: 900; color: var(--gold); flex: 1; }
.ref-link { flex: 1; font-size: 12px; color: var(--txt-dim); font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* тег и описание комнаты */
.room-tag { font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 20px;
  background: rgba(164,76,255,.22); color: #d9c9ff; }
.room-descr { font-size: 11px; color: var(--txt-dim); font-weight: 600; margin-top: 2px;
  line-height: 1.35; min-width: 0;
  /* Две строки максимум: одной мало для осмысленного описания,
     а три уже раздувают список. Дальше — многоточие. */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; }
.msg.pinned { background: rgba(255,201,74,.14); border-left: 3px solid var(--gold);
  font-weight: 800; }

/* крокодил */
#crocoBox { position: absolute; left: 14px; top: 14px; z-index: 70; width: 220px; }
.croco-card { background: rgba(14,9,32,.94); border: 1px solid rgba(53,212,151,.45);
  border-radius: 16px; padding: 11px 12px; backdrop-filter: blur(10px);
  box-shadow: 0 12px 34px rgba(0,0,0,.5); }
.croco-head { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 8px; }
.croco-head b { flex: 1; font-weight: 900; }
.croco-head span { font-size: 12px; color: var(--gold); font-weight: 800; }
.croco-host { font-size: 11.5px; color: var(--txt-dim); font-weight: 700; margin-bottom: 6px; }
.croco-host b { color: #fff; }
.croco-word { font-size: 20px; font-weight: 900; text-align: center; padding: 8px;
  border-radius: 11px; background: rgba(53,212,151,.2); color: #7ff0c0; letter-spacing: .04em; }
.croco-mask { font-size: 21px; font-weight: 900; text-align: center; padding: 8px;
  letter-spacing: .22em; color: #ffd166; }
.croco-tip { font-size: 10.5px; color: var(--txt-dim); font-weight: 700; text-align: center;
  margin-top: 6px; line-height: 1.4; }
.croco-acts { display: flex; gap: 6px; margin-top: 9px; }
.croco-acts .btn { flex: 1; }
.croco-top { margin-top: 9px; border-top: 1px solid var(--line); padding-top: 7px; }
.croco-top div { display: flex; justify-content: space-between; font-size: 11.5px;
  font-weight: 800; padding: 2px 0; }
.croco-top b { color: var(--gold); }

/* настройки интерфейса */
.pf-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; flex-wrap: wrap; }
.pf-row > span { font-size: 13px; font-weight: 800; color: var(--txt-dim); min-width: 120px; }
.pf-seg { display: flex; gap: 5px; flex: 1; flex-wrap: wrap; }
.pf-seg button { padding: 7px 12px; border-radius: 10px; font-size: 12.5px; font-weight: 800;
  background: rgba(255,255,255,.06); color: var(--txt-dim); transition: .12s; }
.pf-seg button.on { background: linear-gradient(180deg, #6a4dff, #4a2fd0); color: #fff; }

/* --- без анимаций: для слабых телефонов и экономии батареи --- */
html.no-anim *, html.no-anim *::before, html.no-anim *::after {
  animation-duration: .001s !important; animation-iteration-count: 1 !important;
  transition-duration: .001s !important;
}
/* --- компактный вид --- */
html.compact .msg { padding: 5px 9px; font-size: 12.5px; }
html.compact .user-item { padding: 5px 7px; }
html.compact .room-item { padding: 6px 8px; }

/* --- светлая тема ---
   Меняем только переменные: остальная разметка подхватит сама. */
  --txt: #241a3d; --txt-dim: #6b6288;
  --shadow: 0 8px 26px rgba(60,40,120,.14);
}
}

/* Светлые элементы, рассчитанные на тёмный фон: полупрозрачный белый
   на белом исчезает, поэтому подменяем на тёмный полупрозрачный. */
  background: rgba(60,40,120,.06);
}
/* Титул и прочий текст, который красится инлайново под тёмный фон:
   светлые оттенки на белом не видны — притемняем через фильтр. */
  background: linear-gradient(180deg, #6a4dff, #4a2fd0); color: #fff;
}
/* Панель под сценой и её кнопки рассчитаны на тёмный фон: в светлой теме
   белые иконки на светлой панели полностью исчезали. */
}

@media (max-width: 860px) {
  #crocoBox { left: 8px; top: 8px; width: 178px; }
  .pf-row > span { min-width: 100%; }
  .ref-hero { flex-wrap: wrap; }
}

/* обращения в поддержку */
.sup-text { font-size: 12.5px; color: #d6d0ee; font-weight: 600; margin-top: 5px;
  line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.sup-ans { font-size: 12px; color: #7ff0c0; font-weight: 700; margin-top: 6px;
  padding: 6px 10px; border-radius: 9px; background: rgba(53,212,151,.12); }

/* ==== 2.27: модерация аватарок, ошибки клиента, удаление аккаунта ==== */

/* Сетка на проверке: картинку нужно видеть крупно — по миниатюре
   в 40 пикселей решение принять нельзя. */
.avm-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.avm-card { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.avm-card.hot { border-color: var(--red, #ff5a76); box-shadow: 0 0 0 1px rgba(255,90,118,.35); }
.avm-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px;
  background: rgba(0,0,0,.25); }
.avm-info { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px;
  color: var(--txt-dim); font-weight: 600; }
.avm-info b { font-size: 13px; color: var(--txt); }
.avm-rep { color: var(--red, #ff5a76); }
.avm-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.avm-acts .btn { flex: 1; padding: 6px 8px; }

/* Плашка «ваша аватарка ещё не проверена» */
.ava-wait { margin-top: 10px; padding: 9px 12px; border-radius: 12px; font-size: 12px;
  font-weight: 700; line-height: 1.4;
  background: rgba(255,196,84,.13); color: #ffc454; border: 1px solid rgba(255,196,84,.3); }

/* Разобранная ошибка гаснет, но остаётся в списке — чтобы было видно,
   что её уже смотрели, и никто не чинил дважды. */
.ad-row.done { opacity: .5; }

/* ==== 2.27: баннер техработ ==== */
/* Полоса над всем интерфейсом: во время работ человек должен понимать,
   что происходит, ещё до того как что-то не сработает. */
.maint-bar { padding: 9px 16px; font-weight: 800; font-size: 13.5px; text-align: center;
  line-height: 1.35; }
.maint-bar.hidden { display: none; }
.maint-bar.on { background: linear-gradient(90deg, #d02b3e, #ff7a86); color: #fff; }
.maint-bar.soon { background: linear-gradient(90deg, #f0a52a, #ffd46b); color: #4a2c00; }
.maint-bar b { font-weight: 900; }

/* Аватарка в списке поиска — тот же кружок, что в друзьях */
#findList .av { width: 40px; height: 40px; border-radius: 12px; overflow: hidden;
  flex: none; background: rgba(255,255,255,.06); }
#findList .av img { width: 100%; height: 100%; object-fit: cover; }

/* ==== 2.27: пары, витрина, гостевая книга ==== */

/* Кольцо у ника — маленькое, но заметное: пара должна быть видна
   в комнате без открывания профиля, иначе смысл теряется. */
.ring-mark { font-style: normal; font-size: .9em; margin-left: 3px;
  filter: drop-shadow(0 0 4px rgba(255,120,180,.6)); }
.ring-badge { font-weight: 800; }

.ring-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.ring-cell { background: rgba(255,255,255,.05); border: 2px solid var(--rc, #888);
  border-radius: 16px; padding: 14px 10px; cursor: pointer; color: var(--txt);
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  font-family: inherit; transition: transform .12s, background .12s; }
.ring-cell:hover { transform: translateY(-3px); background: rgba(255,255,255,.1); }
.ring-cell i { font-size: 34px; font-style: normal; line-height: 1; }
.ring-cell b { font-size: 13px; text-align: center; }
.ring-cell span { font-size: 12.5px; color: var(--rc, #888); font-weight: 800; }

.wed-card { display: flex; align-items: center; gap: 14px; padding: 16px;
  border-radius: 18px; border: 2px solid var(--rc, #888);
  background: linear-gradient(135deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); }
.wed-card .wed-ring { font-size: 42px; line-height: 1; }
.wed-card > div { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.wed-card b { font-size: 17px; }
.wed-card span { font-size: 12.5px; color: var(--txt-dim); font-weight: 600; }

/* Витрина: рамка по редкости — то же правило, что в магазине,
   чтобы дорогая вещь читалась с одного взгляда. */
.shelf-row { display: flex; gap: 10px; flex-wrap: wrap; }
.shelf-cell { width: 62px; height: 62px; border-radius: 14px; position: relative;
  border: 2px solid var(--rc, #888); background: rgba(255,255,255,.05);
  display: flex; align-items: center; justify-content: center; }
.shelf-cell img { max-width: 78%; max-height: 78%; object-fit: contain; }
.shelf-cell.empty-cell { border-style: dashed; border-color: var(--line);
  color: var(--txt-dim); font-size: 22px; font-weight: 800; }
.shelf-x { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px;
  border-radius: 50%; border: 0; cursor: pointer; background: #d02b3e; color: #fff;
  font-size: 11px; line-height: 1; }
.shelf-inv { display: flex; gap: 7px; flex-wrap: wrap; max-height: 132px;
  overflow-y: auto; padding: 4px; }
.shelf-pick { width: 46px; height: 46px; border-radius: 11px; cursor: pointer;
  background: rgba(255,255,255,.05); border: 2px solid transparent; }
.shelf-pick.on { border-color: var(--pink, #ff7ac1); }
.shelf-pick img { max-width: 80%; max-height: 80%; object-fit: contain; }

.pf-about { margin-top: 14px; padding: 12px 14px; border-radius: 14px;
  background: rgba(255,255,255,.05); font-size: 13.5px; font-weight: 600;
  line-height: 1.45; white-space: pre-wrap; }

/* Ссылка ВК: длинный адрес не должен растягивать окно профиля */
.pf-vk { margin-top: 10px; font-size: 13px; font-weight: 700; }
.pf-vk a { color: #6aa2ff; text-decoration: none; word-break: break-all; }
.pf-vk a:hover { text-decoration: underline; }

/* Гостевая: записи читают чаще, чем пишут, поэтому форма компактная сверху */
.wall-write { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 14px; }
.wall-write textarea { flex: 1; }
.wall-list { display: flex; flex-direction: column; gap: 9px; }
.wall-post { padding: 11px 13px; border-radius: 14px; background: rgba(255,255,255,.05); }
.wall-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.wall-head b { font-size: 13.5px; cursor: pointer; }
.wall-head b:hover { text-decoration: underline; }
.wall-head span { font-size: 11.5px; color: var(--txt-dim); font-weight: 600; }
.wall-x { margin-left: auto; border: 0; background: none; cursor: pointer;
  color: var(--txt-dim); font-size: 13px; }
.wall-x:hover { color: #ff5a76; }
.wall-text { font-size: 13.5px; font-weight: 600; line-height: 1.4; word-break: break-word; }

/* ==== 2.28: панель эмоций ==== */
/* Активная эмоция подсвечена — она висит, пока её не снимут,
   и игрок должен видеть, какая именно включена. */
.emo-row button.on { background: rgba(255,95,176,.28);
  box-shadow: inset 0 0 0 2px var(--pink, #ff7ac1); transform: translateY(-2px); }
.emo-row .emo-off { color: #ff8a9c; font-weight: 900; }
.emo-row .emo-off.hidden { display: none; }

/* ==== 2.28: примерочная и корзина ==== */
.fit-wrap { display: grid; grid-template-columns: 260px 1fr; gap: 16px; }
.fit-left { display: flex; flex-direction: column; gap: 10px; }
/* Сцена примерки: тёмная подложка как в комнате, чтобы вещь выглядела
   так же, как её увидят другие, а не на белом фоне карточки. */
.fit-stage { position: relative; height: 380px; border-radius: 18px; overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #2a1f4d, #120c26 70%);
  display: flex; align-items: flex-end; justify-content: center;
  /* Аура рисуется под ногами и шире куклы: без отступа снизу её
     срезало краем сцены, и дорогая донат-вещь выглядела «не работающей». */
  padding-bottom: 54px; }
.fit-doll { position: relative; width: 150px; }
.fit-doll .body { position: relative; width: 100%; }
.fit-doll img.skin { width: 100%; display: block; }
.fit-doll .acc { position: absolute; }

.fit-right { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fit-tabs { display: flex; flex-wrap: wrap; gap: 5px; }
.fit-tabs button { padding: 6px 11px; border-radius: 10px; font-size: 12.5px; font-weight: 700;
  background: rgba(255,255,255,.06); color: var(--txt-dim); border: 0; cursor: pointer; }
.fit-tabs button.on { background: rgba(255,95,176,.22); color: var(--txt);
  box-shadow: inset 0 0 0 2px var(--pink, #ff7ac1); }

.fit-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  max-height: 330px; overflow-y: auto; padding: 3px; }
.fit-item { position: relative; border-radius: 13px; padding: 8px 6px 6px; cursor: pointer;
  background: rgba(255,255,255,.05); border: 2px solid transparent; color: var(--txt);
  display: flex; flex-direction: column; align-items: center; gap: 3px; font-family: inherit; }
.fit-item:hover { background: rgba(255,255,255,.1); }
.fit-item.on { border-color: var(--rc, #888); background: rgba(255,255,255,.12); }
.fit-item.incart { box-shadow: 0 0 0 2px rgba(99,240,182,.55); }
.fit-item img { width: 46px; height: 46px; object-fit: contain; }
.fit-item .fi-name { font-size: 10.5px; font-weight: 700; text-align: center; line-height: 1.15;
  max-height: 26px; overflow: hidden; }
.fit-item .fi-price { font-size: 11px; font-weight: 800; color: #ffd46b; }
.fit-item .fi-price.gem { color: #7cc4ff; }
.fit-item .fi-mark { position: absolute; top: 3px; right: 4px; font-size: 12px; font-style: normal; }
.fit-item .fi-mark.own { color: #63f0b6; }

/* Корзина внизу: итог всегда на виду, чтобы «оплатить» не было
   прыжком в неизвестность. */
.fit-cart { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.fc-empty { color: var(--txt-dim); font-size: 13px; font-weight: 600; text-align: center; padding: 8px; }
.fc-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.fc-chip { display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  padding: 5px 9px; border-radius: 11px; background: rgba(255,255,255,.07);
  font-size: 12px; font-weight: 700; }
.fc-chip:hover { background: rgba(255,90,118,.2); }
.fc-chip img { width: 20px; height: 20px; object-fit: contain; }
.fc-chip b { color: #ffd46b; }
.fc-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fc-sum { flex: 1; font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fc-sum b.bad { color: #ff5a76; }
.fc-have { font-size: 12px; font-weight: 600; color: var(--txt-dim); }

/* Кнопки на карточке магазина: примерка рядом с покупкой */
.card-acts { display: flex; gap: 5px; align-items: center; justify-content: center; }
.card-acts .btn { padding: 6px 10px; }

@media (max-width: 760px) {
  .fit-wrap { grid-template-columns: 1fr; }
  /* На телефоне сцена ниже, а кукла оставалась прежней ширины 150px —
     при высоте 260px ей не хватало места и голову срезало верхним краем.
     Ужимаем куклу вместе со сценой: пропорции те же, но образ виден
     целиком, ради чего примерочная и существует. */
  .fit-stage { height: 300px; padding-bottom: 40px; }
  .fit-doll { width: 108px; }
  .fit-grid { max-height: 220px; }
}

/* ==== 2.28: награда за вступление в сообщество ==== */
.comm-reward { display: flex; align-items: center; gap: 14px; margin-top: 16px;
  padding: 14px 16px; border-radius: 16px;
  background: linear-gradient(120deg, rgba(99,240,182,.15), rgba(99,240,182,.04));
  border: 1px solid rgba(99,240,182,.35); }
.comm-reward.done { background: rgba(255,255,255,.05); border-color: var(--line); }
.comm-reward .cr-icon { font-size: 30px; line-height: 1; }
.comm-reward .cr-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.comm-reward .cr-text b { font-size: 15px; }
.comm-reward .cr-text span { font-size: 12.5px; color: var(--txt-dim); font-weight: 600; }
.comm-reward .cr-ok { font-size: 22px; color: #63f0b6; }

/* На телефоне текст и кнопка в одну строку не помещаются: кнопка
   «Я подписался — забрать» шириной 223px уезжала за край экрана.
   Переносим её под текст и растягиваем на всю ширину — заодно по ней
   удобнее попадать пальцем. */
@media (max-width: 520px) {
  .comm-reward { flex-wrap: wrap; }
  .comm-reward .cr-text { flex: 1 1 100%; }
  .comm-reward .btn { flex: 1 1 100%; }
}

/* ==== 2.28: оформление частных комнат ==== */
/* Цвет комнаты подкрашивает рамки и заголовки, но не фон текста:
   читаемость чата важнее, чем «своя атмосфера». */
body.has-accent .panel.side,
body.has-accent .panel.rooms { border-color: color-mix(in srgb, var(--room-accent) 40%, var(--line)); }
body.has-accent .panel h3 { color: var(--room-accent); }
body.has-accent #stage { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--room-accent) 35%, transparent); }
body.has-accent .msg.pinned { border-left-color: var(--room-accent); }

/* Приветствие от хозяина комнаты */
.msg.welcome { background: linear-gradient(120deg, rgba(255,212,107,.18), rgba(255,212,107,.05));
  border: 1px solid rgba(255,212,107,.4); border-radius: 14px; padding: 10px 13px;
  font-weight: 700; font-size: 13px; line-height: 1.4; color: #ffd46b; margin: 6px 0; }

/* Выбор темы и цвета в настройках комнаты */
.rc-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.rc-chips button { padding: 6px 11px; border-radius: 10px; font-size: 12.5px; font-weight: 700;
  background: rgba(255,255,255,.06); color: var(--txt-dim); border: 0; cursor: pointer; }
.rc-chips button.on { background: rgba(255,95,176,.22); color: var(--txt);
  box-shadow: inset 0 0 0 2px var(--pink, #ff7ac1); }
.rc-colors { display: flex; flex-wrap: wrap; gap: 7px; }
.rc-colors button { width: 32px; height: 32px; border-radius: 10px; cursor: pointer;
  border: 2px solid transparent; background: rgba(255,255,255,.08); color: var(--txt-dim);
  font-size: 13px; font-weight: 800; }
.rc-colors button.on { border-color: #fff; transform: scale(1.1); }
/* Метка цвета комнаты у названия — единственное место, где акцент
   показан «в лоб»: остальное подкрашено мягко, чтобы не мешать чтению. */
.room-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px;
  margin-right: 7px; vertical-align: middle; box-shadow: 0 0 8px currentColor; }
body.has-accent .hdr-room #hRoom { border-left: 0; }

/* ==== 2.29: смена ника ==== */
.nick-stat { position: relative; }
.nick-edit { position: absolute; top: 4px; right: 4px; border: 0; cursor: pointer;
  background: rgba(255,255,255,.08); border-radius: 8px; width: 24px; height: 24px;
  font-size: 12px; line-height: 1; padding: 0; }
.nick-edit:hover { background: rgba(255,122,193,.3); }
.nick-now { font-size: 20px; font-weight: 900; padding: 10px 14px; border-radius: 12px;
  background: rgba(255,255,255,.06); text-align: center; }
.nick-price { display: flex; align-items: center; gap: 10px; margin-top: 12px;
  padding: 11px 14px; border-radius: 12px; background: rgba(99,240,182,.12);
  border: 1px solid rgba(99,240,182,.3); font-weight: 700; font-size: 13px; }
.nick-price.bad { background: rgba(255,90,118,.12); border-color: rgba(255,90,118,.35); }
.nick-price b { font-size: 16px; display: inline-flex; align-items: center; gap: 4px; }
.nick-price .nk-have { margin-left: auto; color: var(--txt-dim); font-weight: 600; }
.nick-hist { display: flex; flex-wrap: wrap; gap: 6px; }
.nick-hist span { padding: 5px 10px; border-radius: 10px; background: rgba(255,255,255,.06);
  font-size: 12px; font-weight: 700; }
.nick-hist i { font-style: normal; color: var(--txt-dim); font-weight: 600; margin-left: 5px; }

/* ==== 2.29: индикатор связи ==== */
/* Полоса поверх всего: если связь оборвалась, человек должен понимать,
   почему чат «не отвечает», а не думать, что сайт сломался. */
.conn-bar { position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 18px; z-index: 400; padding: 10px 18px; border-radius: 14px;
  font-size: 13px; font-weight: 800; color: #fff; pointer-events: none;
  box-shadow: 0 8px 26px rgba(0,0,0,.45); }
.conn-bar.off { background: linear-gradient(90deg, #d02b3e, #ff7a86); }
.conn-bar.on  { background: linear-gradient(90deg, #21b57f, #63f0b6); color: #05301f; }
.conn-bar.hidden { display: none; }

/* ==== 2.30: почта в профиле ==== */
.mail-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 11px 13px; border-radius: 13px; background: rgba(255,255,255,.05);
  border: 1px solid var(--line); }
.mail-row.wait { border-color: rgba(255,196,84,.4); background: rgba(255,196,84,.09); }
.mail-info { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mail-info b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-info span { font-size: 11.5px; font-weight: 600; color: var(--txt-dim); }
.mail-row.wait .mail-info span { color: #ffc454; }
.mail-acts { display: flex; gap: 6px; flex-wrap: wrap; }
