/* Профиль пользователя (userinfo.tpl) — 27.09.2026.
   Цвета только из переменных темы: светлая (красный акцент) и тёмная
   (.dt, бирюзовый) подхватываются сами. */
.up { min-width: 0; width: 100%; max-width: 100%; grid-column: 1 / -1; --up-r: 14px; --up-card: var(--bg); --up-soft: var(--bg-darker); --up-line: var(--bdc); color: var(--tt); }
.up *, .up *::before, .up *::after { box-sizing: border-box; }

/* --- шапка */
.up-hero { background: var(--up-card); border-radius: var(--up-r); overflow: hidden; box-shadow: 0 6px 24px rgba(0,0,0,.08); margin-bottom: 24px; }
.up-cover { position: relative; height: 190px; background: var(--bgsm1); background-size: cover; background-position: center; }
.up-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0) 40%, rgba(0,0,0,.35)); pointer-events: none; }
.up-cover__tools { position: absolute; top: 14px; right: 14px; display: flex; gap: 8px; z-index: 2; }
.up-cover__tools form { margin: 0; }
.up .up-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 17px; border: 0; cursor: pointer;
	background: rgba(0,0,0,.45); color: #fff; font: inherit; font-size: 13px; backdrop-filter: blur(6px); transition: background .2s; }
.up .up-chip:hover { background: rgba(0,0,0,.65); }
.up .up-chip--icon { width: 34px; padding: 0; justify-content: center; }

.up-head { display: flex; align-items: flex-end; gap: 22px; padding: 0 28px; margin-top: -58px; position: relative; z-index: 3; flex-wrap: wrap; }
.up-ava { position: relative; width: 132px; height: 132px; flex-shrink: 0; border-radius: 50%; padding: 5px; background: var(--up-card); }
.up-ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: var(--up-soft); }
.up-ava.is-online::after { content: ""; position: absolute; right: 12px; bottom: 12px; width: 18px; height: 18px; border-radius: 50%;
	background: #2ecc71; border: 3px solid var(--up-card); }
.up-ava__form { margin: 0; }
.up-ava__edit { position: absolute; inset: 5px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer;
	background: rgba(0,0,0,.5); color: #fff; font-size: 26px; opacity: 0; transition: opacity .2s; }
.up-ava:hover .up-ava__edit { opacity: 1; }

.up-id { flex: 1 1 260px; min-width: 0; padding-bottom: 6px; }
.up-name { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 8px; font-size: 28px; line-height: 1.15; font-weight: 700; color: var(--tt); }
.up-name > span { overflow-wrap: anywhere; }
.up-badge { --up-g: var(--accent); display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 13px; font-size: 13px; font-weight: 700;
	color: var(--up-g); background: color-mix(in srgb, var(--up-g) 14%, transparent); border: 1px solid color-mix(in srgb, var(--up-g) 40%, transparent); }
.up-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--tt-fade); font-weight: 400; }
.up-meta i { margin-right: 4px; opacity: .8; }
.up-seen { display: inline-flex; align-items: center; gap: 7px; }
.up-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tt-fade); opacity: .6; }
.up-seen.is-online { color: #27ae60; }
.up-seen.is-online .up-dot { background: #2ecc71; opacity: 1; box-shadow: 0 0 0 4px rgba(46,204,113,.2); }

.up-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-bottom: 10px; }
.up-actions form { margin: 0; }
.up .up-btn, .up-actions .us2-act-btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 20px; border-radius: 21px; border: 0; cursor: pointer;
	font: inherit; font-size: 14px; font-weight: 700; text-decoration: none; color: #fff; background: var(--accent); transition: filter .2s, transform .2s; }
.up .up-btn:hover, .up-actions .us2-act-btn:hover { filter: brightness(1.1); color: #fff; transform: translateY(-1px); }
.up .up-btn--ghost, .up-actions .us2-act-btn--quiet { background: var(--up-soft); color: var(--tt); box-shadow: inset 0 0 0 1px var(--up-line); }
.up .up-btn--ghost:hover, .up-actions .us2-act-btn--quiet:hover { color: var(--tt); }
.up-actions .us2-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.up-stats { display: flex; flex-wrap: wrap; margin-top: 22px; border-top: 1px solid var(--up-line); }
.up-stat { flex: 1 1 120px; background: var(--up-card); box-shadow: 1px 1px 0 var(--up-line); padding: 16px 12px; text-align: center; text-decoration: none; color: var(--tt); display: block; }
.up-stat b { display: block; font-size: 22px; font-weight: 700; color: var(--accent); line-height: 1.1; }
.up-stat span { display: block; margin-top: 4px; font-size: 13px; font-weight: 400; color: var(--tt-fade); }
.up-stat--link:hover { background: var(--up-soft); }

/* --- колонки */
.up-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.up-box { background: var(--up-card); border-radius: var(--up-r); padding: 22px 24px; margin-bottom: 24px; box-shadow: 0 6px 24px rgba(0,0,0,.06); }
.up-h { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 19px; font-weight: 700; color: var(--tt); }
.up-h i { color: var(--accent); }
.up-h em { font-style: normal; font-size: 13px; color: var(--tt-fade); background: var(--up-soft); border-radius: 10px; padding: 2px 8px; }

/* --- вкладки списков */
.up-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.up .up-tab { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 20px; border: 0; cursor: pointer;
	font: inherit; font-size: 14px; font-weight: 700; color: var(--tt); background: var(--up-soft); box-shadow: inset 0 0 0 1px var(--up-line); transition: background .2s, color .2s; }
.up .up-tab b { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; font-size: 12px; line-height: 22px; background: var(--up-card); color: var(--tt-fade); }
.up .up-tab:hover { color: var(--accent); }
.up .up-tab.is-active { background: var(--accent); color: #fff; box-shadow: none; }
.up .up-tab.is-active b { background: rgba(255,255,255,.22); color: #fff; }
.up-pane { display: none; }
.up-pane.is-active { display: block; animation: upFade .25s ease; }
@keyframes upFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.up-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 16px; }
.up-card { display: block; text-decoration: none; color: var(--tt); }
.up-card__img { position: relative; display: block; aspect-ratio: 163 / 228; border-radius: 10px; overflow: hidden; background: var(--up-soft); }
.up-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.up-card:hover .up-card__img img { transform: scale(1.05); }
.up-card__score { position: absolute; top: 8px; left: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 8px;
	background: rgba(0,0,0,.65); color: #ffd23f; font-size: 12px; font-weight: 700; }
.up-card__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 8px; font-size: 14px; line-height: 1.3; font-weight: 700; }
.up-card:hover .up-card__title { color: var(--accent); }
.up-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px 10px; text-align: center; color: var(--tt-fade); font-weight: 400; }
.up-empty i { font-size: 34px; opacity: .6; }
.up-note { margin-top: 14px; text-align: center; color: var(--tt-fade); font-weight: 400; }

/* --- комментарии */
.up-coms { display: grid; gap: 10px; }
.up-com { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 14px; border-radius: 10px; background: var(--up-soft); text-decoration: none; color: var(--tt); }
.up-com:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.up-com__title { font-weight: 700; color: var(--accent); }
.up-com__date { font-size: 12px; color: var(--tt-fade); font-weight: 400; white-space: nowrap; }
.up-com__text { grid-column: 1 / -1; font-size: 14px; font-weight: 400; line-height: 1.45; color: var(--tt); }

/* --- сайдбар */
.up-facts { list-style: none; margin: 0; padding: 0; }
.up-facts li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--up-line); font-size: 14px; }
.up-facts li:last-child { border-bottom: 0; }
.up-facts span { color: var(--tt-fade); font-weight: 400; }
.up-facts b { text-align: right; }
.up-about { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--up-soft); font-weight: 400; line-height: 1.5; overflow-wrap: anywhere; }
.up-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-weight: 700; color: var(--accent); text-decoration: none; }
.up-link:hover { text-decoration: underline; }
.up-friends { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 8px; }
.up-friend { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--tt); min-width: 0; }
.up-friend__ava { position: relative; width: 56px; height: 56px; }
.up-friend__ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--up-soft); }
.up-friend__ava.is-online::after { content: ""; position: absolute; right: 2px; bottom: 2px; width: 12px; height: 12px; border-radius: 50%; background: #2ecc71; border: 2px solid var(--up-card); }
.up-friend__name { max-width: 100%; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-friend:hover .up-friend__name { color: var(--accent); }

/* --- телефон */
@media (max-width: 1100px) { .up-body { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
	.up-cover { height: 130px; }
	.up-head { flex-direction: column; align-items: center; text-align: center; padding: 0 16px; margin-top: -54px; gap: 12px; }
	.up-id { flex: none; width: 100%; padding-bottom: 0; }
	.up-actions { padding-bottom: 0; }
	.up-ava { width: 108px; height: 108px; }
	.up-name { justify-content: center; font-size: 23px; }
	.up-meta { justify-content: center; }
	.up-actions { justify-content: center; }
	.up-box { padding: 18px 16px; border-radius: 12px; }
	.up-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
	.up-card__title { font-size: 12px; }
	.up-stat { flex-basis: 33%; }
	.up-stat b { font-size: 19px; }
}
@media (max-width: 420px) { .up-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* --- настройки (profile/settings.tpl) */
.up-set__head { margin-bottom: 20px; }
.up-back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--tt-fade); text-decoration: none; font-weight: 700; }
.up-back:hover { color: var(--accent); }
.up-set__body { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.up-snav { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: var(--up-r); background: var(--up-card); box-shadow: 0 6px 24px rgba(0,0,0,.06); }
.up-snav__item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; color: var(--tt); text-decoration: none; font-weight: 700; }
.up-snav__item i { width: 18px; text-align: center; color: var(--tt-fade); }
.up-snav__item:hover { background: var(--up-soft); }
.up-snav__item.is-active { background: var(--accent); color: #fff; }
.up-snav__item.is-active i { color: #fff; }
.up-form { display: grid; gap: 16px; }
.up-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.up-field { display: grid; gap: 7px; min-width: 0; }
.up-field > span { font-size: 13px; color: var(--tt-fade); font-weight: 700; }
.up-field > em { font-style: normal; font-size: 12px; color: var(--tt-fade); font-weight: 400; }
.up .up-field input, .up .up-field select, .up .up-field textarea { width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 10px; border: 0;
	background: var(--up-soft); color: var(--tt); box-shadow: inset 0 0 0 1px var(--up-line); font: inherit; font-size: 15px; font-weight: 400; }
.up .up-field textarea { resize: vertical; min-height: 110px; line-height: 1.45; }
.up .up-field input:focus, .up .up-field select:focus, .up .up-field textarea:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--accent); }
.up .up-field input:disabled { opacity: .65; }
.up-submit { display: flex; justify-content: flex-end; }
.up-hint { margin-top: 10px; font-size: 13px; color: var(--tt-fade); font-weight: 400; line-height: 1.45; }
.up-media { display: flex; flex-wrap: wrap; gap: 10px; }
.up-media form { margin: 0; }
.up-alert { display: flex; align-items: center; gap: 10px; padding: 14px 18px; margin-bottom: 20px; border-radius: 12px; font-weight: 700; }
.up-alert--ok { background: rgba(46,204,113,.14); color: #27ae60; }
.up-alert--err { background: rgba(231,76,60,.14); color: #e74c3c; }
.up-switch { position: relative; display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 400; }
.up-switch input { position: absolute; opacity: 0; pointer-events: none; }
.up-switch > span { flex-shrink: 0; width: 44px; height: 24px; border-radius: 12px; background: var(--up-line); position: relative; transition: background .2s; box-shadow: inset 0 0 0 1px var(--up-line); }
.up-switch > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.up-switch input:checked + span { background: var(--accent); }
.up-switch input:checked + span::after { transform: translateX(20px); }
.up-devices { display: grid; gap: 10px; }
.up-devices .user__device { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 10px; background: var(--up-soft); }
.up-devices .user__device > span { font-size: 20px; color: var(--accent); width: 24px; text-align: center; }
.up-devices .user__device-name { font-weight: 700; }
.up-devices .user__device-meta { font-size: 12px; color: var(--tt-fade); font-weight: 400; margin-top: 3px; }
@media (max-width: 900px) {
	.up-set__body { grid-template-columns: 1fr; }
	.up-snav { position: static; flex-direction: row; overflow-x: auto; }
	.up-snav__item { flex-shrink: 0; }
	.up-row2 { grid-template-columns: 1fr; }
}

/* --- меню пользователя (login.tpl, вошедший) — окно темы, своё содержимое */
.um-head { position: relative; display: flex; align-items: center; gap: 14px; padding: 22px 22px 20px; background: var(--bgsm1); color: #fff; }
.um-ava { width: 60px; height: 60px; flex-shrink: 0; border-radius: 50%; padding: 3px; background: rgba(255,255,255,.35); }
.um-ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: #fff; }
.um-id { min-width: 0; flex: 1; }
.um-name { display: block; font-size: 19px; font-weight: 700; color: #fff; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-sub { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13px; font-weight: 400; color: rgba(255,255,255,.85); text-decoration: none; }
.um-sub:hover, .um-name:hover { color: #fff; text-decoration: underline; }
.um-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 18px; }
.um-grid a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 6px 14px; border-radius: 12px; background: var(--bg-darker);
	color: var(--tt); text-decoration: none; font-size: 13px; font-weight: 700; text-align: center; box-shadow: inset 0 0 0 1px var(--bdc); transition: transform .2s, box-shadow .2s; }
.um-grid a i { font-size: 22px; color: var(--accent); }
.um-grid a:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--accent); color: var(--tt); }
.um-grid a b { position: absolute; top: 8px; right: 8px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 11px; line-height: 20px; background: var(--accent); color: #fff; }
.um-grid a b:empty, .um-grid a b.um-num:empty { display: none; }
.um-foot { display: flex; gap: 10px; padding: 0 18px 18px; }
.um-foot a { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 12px; text-decoration: none; font-weight: 700; font-size: 14px; }
.um-admin { background: var(--accent); color: #fff; }
.um-admin:hover { filter: brightness(1.1); color: #fff; }
.um-exit { background: var(--bg-darker); color: var(--tt); box-shadow: inset 0 0 0 1px var(--bdc); }
.um-exit:hover { color: #e74c3c; }
@media (max-width: 420px) { .um-grid { grid-template-columns: repeat(2, 1fr); } }

/* --- личные сообщения (messenger.tpl + js/messenger-am.js) */
.pm { display: grid; grid-template-columns: 340px minmax(0, 1fr); width: 100%; max-width: 100%; height: min(78vh, 760px); min-height: 480px; border-radius: var(--up-r); overflow: hidden;
	background: var(--up-card); box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.pm-side { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-right: 1px solid var(--up-line); }
.pm-side__head { padding: 20px 20px 12px; }
.pm-title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 22px; font-weight: 700; color: var(--tt); }
.pm-title i { color: var(--accent); }
.pm-search { position: relative; display: block; margin: 0 16px 12px; }
.pm-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--tt-fade); }
.up .pm-search input { width: 100%; height: 42px; padding: 0 14px 0 40px; border: 0; border-radius: 21px; background: var(--up-soft); color: var(--tt); font: inherit; font-weight: 400; box-shadow: inset 0 0 0 1px var(--up-line); }
.up .pm-search input:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--accent); }
.pm-list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 8px 12px; }
.pm-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--tt); }
.pm-item:hover { background: var(--up-soft); }
.pm-item.is-active { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.pm-ava { position: relative; width: 48px; height: 48px; flex-shrink: 0; }
.pm-ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: var(--up-soft); }
.pm-ava.is-online::after { content: ""; position: absolute; right: 1px; bottom: 1px; width: 12px; height: 12px; border-radius: 50%; background: #2ecc71; border: 2px solid var(--up-card); }
.pm-item__body { min-width: 0; flex: 1; }
.pm-item__top { display: flex; justify-content: space-between; gap: 8px; }
.pm-item__top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-item__top em { flex-shrink: 0; font-style: normal; font-size: 12px; color: var(--tt-fade); font-weight: 400; }
.pm-item__last { display: block; margin-top: 3px; font-size: 13px; color: var(--tt-fade); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-item.is-unread .pm-item__last { color: var(--tt); font-weight: 700; }
.pm-badge { flex-shrink: 0; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--accent); color: #fff; font-size: 12px; line-height: 22px; text-align: center; }
.pm-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 40px 16px; text-align: center; color: var(--tt-fade); font-weight: 400; }
.pm-empty i { font-size: 30px; opacity: .6; }

.pm-chat { position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.pm-placeholder { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 30px; text-align: center; color: var(--tt-fade); font-weight: 400; }
.pm-placeholder i { font-size: 54px; color: var(--accent); opacity: .5; }
.pm-placeholder b { font-size: 18px; color: var(--tt); }
.pm-conv { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.pm-conv[hidden], .pm-placeholder[hidden] { display: none; }
.pm-conv__head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--up-line); }
.up .pm-back, .up .pm-menu__btn { width: 40px; height: 40px; flex-shrink: 0; border: 0; border-radius: 50%; background: transparent; color: var(--tt); font-size: 18px; cursor: pointer; }
.up .pm-back:hover, .up .pm-menu__btn:hover { background: var(--up-soft); }
.pm-back { display: none; }
.pm-peer { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; text-decoration: none; color: var(--tt); }
.pm-peer .pm-ava { width: 42px; height: 42px; }
.pm-peer__id { min-width: 0; display: flex; flex-direction: column; }
.pm-peer__id b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-peer__id em { font-style: normal; font-size: 12px; color: var(--tt-fade); font-weight: 400; }
.pm-peer__id em.is-online { color: #27ae60; }
.pm-peer:hover b { color: var(--accent); }
.pm-menu { position: relative; }
.pm-menu__pop { position: absolute; right: 0; top: 46px; z-index: 5; min-width: 220px; padding: 6px; border-radius: 12px; background: var(--up-card); box-shadow: 0 12px 30px rgba(0,0,0,.2), 0 0 0 1px var(--up-line); }
.up .pm-menu__pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--tt); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.up .pm-menu__pop button:hover { background: var(--up-soft); }
.pm-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 6px; background: var(--up-soft); }
.pm-day { align-self: center; margin: 10px 0 4px; padding: 4px 12px; border-radius: 12px; font-size: 12px; color: var(--tt-fade); background: var(--up-card); font-weight: 400; }
.pm-msg { max-width: min(75%, 560px); align-self: flex-start; padding: 9px 13px 6px; border-radius: 16px 16px 16px 4px; background: var(--up-card); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.pm-msg.is-my { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: var(--accent); color: #fff; }
.pm-msg__text { white-space: pre-wrap; overflow-wrap: anywhere; font-weight: 400; line-height: 1.45; font-size: 15px; }
.pm-msg__meta { display: flex; justify-content: flex-end; align-items: center; gap: 5px; margin-top: 3px; font-size: 11px; opacity: .7; font-weight: 400; }
.pm-note { padding: 10px 16px; font-size: 13px; text-align: center; background: var(--up-soft); color: var(--tt-fade); border-top: 1px solid var(--up-line); }
.pm-note--err { color: #e74c3c; }
.pm-note--warn { color: #d68910; }
.pm-form { display: flex; align-items: flex-end; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--up-line); }
.pm-form[hidden] { display: none; }
.up .pm-form textarea { flex: 1; min-height: 44px; max-height: 160px; padding: 11px 16px; border: 0; border-radius: 22px; resize: none; background: var(--up-soft); color: var(--tt);
	font: inherit; font-size: 15px; font-weight: 400; line-height: 1.4; box-shadow: inset 0 0 0 1px var(--up-line); }
.up .pm-form textarea:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--accent); }
.up .pm-send { width: 44px; height: 44px; flex-shrink: 0; border: 0; border-radius: 50%; background: var(--accent); color: #fff; font-size: 16px; cursor: pointer; transition: transform .15s, filter .2s; }
.up .pm-send:hover { filter: brightness(1.1); transform: scale(1.05); }
.pm-form.is-busy .pm-send { opacity: .6; pointer-events: none; }
@media (max-width: 760px) {
	.pm { grid-template-columns: minmax(0, 1fr); height: calc(100vh - 150px); min-height: 420px; border-radius: 12px; }
	.pm-side { border-right: 0; }
	.pm .pm-chat { display: none; }
	.pm.is-chat .pm-side { display: none; }
	.pm.is-chat .pm-chat { display: flex; }
	.pm-back { display: inline-block; }
	.pm-msgs { padding: 12px; }
	.pm-msg { max-width: 85%; }
}

/* тонкие полосы прокрутки в сообщениях (глобальная полоса темы — 11px акцентом) */
.pm-list, .pm-msgs, .up-tabs { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--tt-fade) 45%, transparent) transparent; }
.pm-list::-webkit-scrollbar, .pm-msgs::-webkit-scrollbar, .up-tabs::-webkit-scrollbar { width: 6px; height: 6px; background: transparent; }
.pm-list::-webkit-scrollbar-thumb, .pm-msgs::-webkit-scrollbar-thumb, .up-tabs::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--tt-fade) 45%, transparent); border-radius: 3px; }

/* колонки не распираются содержимым (строка вкладок прокручивается внутри) */
.up-main, .up-side, .up-box, .up-set__main, .up-grid { min-width: 0; }
.up-set__body { grid-template-columns: 260px minmax(0, 1fr); }
@media (max-width: 900px) { .up-set__body { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
	.up-tabs { flex-wrap: wrap; overflow: visible; }
	.up .up-tab { flex: 1 1 auto; justify-content: center; height: 38px; padding: 0 12px; font-size: 13px; }
}
@media (min-width: 761px) and (max-width: 1100px) {
	.up-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-bottom: 24px; }
	.up-side .up-box { margin-bottom: 0; }
}

/* --- статистика (stats.tpl) */
.st-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.st-head .up-name { margin: 0; }
.st-head .up-name i { color: var(--accent); margin-right: 6px; }
.st-periods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.st-kv { list-style: none; margin: 0; padding: 0; }
.st-kv li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--up-line); font-size: 14px; }
.st-kv li:last-child { border-bottom: 0; }
.st-kv span { color: var(--tt-fade); font-weight: 400; }
.st-kv b { font-size: 20px; color: var(--accent); }
.st-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.st-tile { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 12px; background: var(--up-soft); box-shadow: inset 0 0 0 1px var(--up-line); color: var(--tt); text-decoration: none; transition: transform .2s, box-shadow .2s; }
.st-tile i { font-size: 22px; color: var(--accent); }
.st-tile b { font-size: 26px; line-height: 1.1; }
.st-tile span { font-size: 13px; color: var(--tt-fade); font-weight: 400; }
a.st-tile:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--accent); color: var(--tt); }
.st-table { overflow-x: auto; }
.st .dle-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.st .dle-table thead td { padding: 10px 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--tt-fade); border-bottom: 1px solid var(--up-line); white-space: nowrap; }
.st .dle-table tbody td, .st .dle-table tr:not(:first-child) td { padding: 12px; border-bottom: 1px dashed var(--up-line); font-weight: 400; white-space: nowrap; }
.st .dle-table tr:last-child td { border-bottom: 0; }
.st .dle-table a { color: var(--accent); font-weight: 700; text-decoration: none; }
.st .dle-table a:hover { text-decoration: underline; }
.st .dle-table tr:hover td { background: var(--up-soft); }
@media (max-width: 900px) { .st-periods { grid-template-columns: minmax(0, 1fr); gap: 0; } }
@media (max-width: 760px) {
	.st-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.st-tile { padding: 14px; }
	.st-tile b { font-size: 22px; }
	.st-head { margin-bottom: 16px; }
}

/* таблица «Самые активные»: снять рамки/заливку общих таблиц темы */
.up.st .dle-table, .up.st .dle-table tr, .up.st .dle-table td, .up.st .dle-table thead { border: 0; background: none; box-shadow: none; }
.up.st .dle-table thead td { color: var(--tt-fade); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; padding: 10px 12px; border-bottom: 1px solid var(--up-line); }
.up.st .dle-table tbody tr td, .up.st .dle-table > tr td { padding: 13px 12px; border-bottom: 1px dashed var(--up-line); }
.up.st .dle-table tr:hover td { background: var(--up-soft); }
.up.st .dle-table td:first-child { text-align: left; }

/* «Порядок просмотра» на странице тайтла (fullstory.tpl, [worldart-parts]) */
.am-wo-meta { margin-top: 2px; font-size: 12px; color: var(--tt-fade); font-weight: 400; }
.am-wo-hidden { display: none !important; }
.am-wo.is-open .am-wo-hidden { display: flex !important; }
.am-wo-more { margin-top: 10px; padding: 8px 16px; border: 0; border-radius: 8px; background: var(--bg-darker); color: var(--accent);
	font: inherit; font-weight: 700; cursor: pointer; box-shadow: inset 0 0 0 1px var(--bdc); }
.am-wo-more:hover { box-shadow: inset 0 0 0 1px var(--accent); }

/* --- уведомления DLE (DLEPush / jGrowl) в цветах темы (27.09.2026: «уведа корявая»).
   Селектор с body — сильнее engine.css темы, который грузится позже. */
body .DLEPush { top: 16px; right: 16px; left: auto; max-width: calc(100vw - 32px); }
body .DLEPush-notification.wrapper { display: grid; grid-template-columns: 52px minmax(0, 1fr); grid-template-rows: auto; align-items: stretch;
	width: 380px; min-width: 0; max-width: 100%; margin-bottom: 10px; padding: 0; border-radius: 14px; overflow: hidden;
	background: var(--bg); color: var(--tt); box-shadow: 0 14px 40px rgba(0,0,0,.25), 0 0 0 1px var(--bdc); font-family: inherit; }
body .DLEPush-notification .DLEPush-icon { grid-column: 1; grid-row: 1 / span 2; width: auto; height: auto; min-height: 100%; border-radius: 0;
	display: flex; align-items: center; justify-content: center; color: #fff; background: var(--accent); }
body .DLEPush-notification .DLEPush-icon svg { width: 22px; height: 22px; scale: 1; }
body .DLEPush-notification .DLEPush-header { grid-column: 2; grid-row: 1; margin: 14px 40px 0 14px; font-size: 15px; font-weight: 700; }
body .DLEPush-notification .DLEPush-header:empty { display: none; }
body .DLEPush-notification .DLEPush-message { grid-column: 2; grid-row: 2; align-self: center; margin: 14px 40px 14px 14px; font-size: 14px; font-weight: 400; line-height: 1.45; }
body .DLEPush-notification .DLEPush-header:empty + .DLEPush-message { grid-row: 1 / span 2; }
body .DLEPush-notification .DLEPush-close { top: 50%; right: 12px; transform: translateY(-50%); font-size: 20px; color: var(--tt-fade); opacity: .8; }
body .DLEPush-notification .DLEPush-close:hover { color: var(--tt); opacity: 1; }
body .DLEPush-notification.wrapper.push-success .DLEPush-icon { background: #27ae60; }
body .DLEPush-notification.wrapper.push-warning .DLEPush-icon { background: #f39c12; }
body .DLEPush-notification.wrapper.push-error .DLEPush-icon { background: #e74c3c; }
body .DLEPush-notification.wrapper.push-success, body .DLEPush-notification.wrapper.push-warning,
body .DLEPush-notification.wrapper.push-error { background: var(--bg); }
body .DLEPush .DLEPush-closer { display: none; }
@media (max-width: 600px) { body .DLEPush { left: 16px; } body .DLEPush-notification.wrapper { width: 100%; } }

/* animedia (28.09.2026): у DLE «Новые серии» рядом с плеером были только на
   компьютере ([desktop] в fullstory.tpl). Движок отдаёт вариант «компьютер»
   (кэш страниц общий для всех устройств), телефонную раскладку делаем тут. */
@media screen and (max-width: 760px) {
}


/* jam-club.tv (28.09.2026): шапки профиля и меню — фирменный градиент темы */
.up-cover, .um-head { background: linear-gradient(135deg, #6e2a0b 0%, #c34c14 100%); }
.dt .up-cover, .dt .um-head { background: linear-gradient(135deg, #3d3440 0%, #99796d 100%); }

/* jam: списки профиля как на DLE */
.up .up-body { display: block; }
.up-lists-dle { margin-bottom: 30px; }
.up .up-lists-dle .up-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; padding: 10px; border-radius: 6px;
	background: var(--bg-darker); border-bottom: 3px solid var(--accent); overflow: visible; }
.up .up-lists-dle .up-tab { flex: 1 1 auto; justify-content: center; gap: 0; height: auto; padding: 10px 20px; border-radius: 4px;
	background: var(--bg); color: var(--tt); text-transform: uppercase; font-size: 12px; font-weight: 400; box-shadow: none; }
.up .up-lists-dle .up-tab i { display: none; }
.up .up-lists-dle .up-tab b { min-width: 0; height: auto; padding: 0; border-radius: 0; background: none; color: inherit;
	font-size: inherit; font-weight: inherit; line-height: inherit; }
.up .up-lists-dle .up-tab b::before { content: "\00a0("; }
.up .up-lists-dle .up-tab b::after { content: ")"; }
.up .up-lists-dle .up-tab:hover { color: var(--accent); }
.up .up-lists-dle .up-tab.is-active, .up .up-lists-dle .up-tab.is-active:hover { background: var(--accent); color: #fff; }
.up .up-lists-dle .up-tab.is-active b { background: none; color: #fff; }
.up .up-lists-dle .up-tab[data-up-tab="favorite"], .up .up-lists-dle .up-pane[data-up-pane="favorite"] { display: none; }

/* jam: фильтр списков профиля */
.up-lists-dle .jamclub-tabs-searchform { margin: 0 0 20px; }
.up-lists-dle .jamclub-tabs-searchform select, .up-lists-dle .jamclub-clearsearch input { width: 100%; height: 40px; padding: 0 15px;
	border-radius: 6px; border: 1px solid var(--bdc); background-color: var(--bg); color: var(--tt); font-size: 13px; }
.up-lists-dle .jamclub-clearsearch { position: relative; }
.up-lists-dle .jamclub-clearsearch input { padding-right: 34px; }
.up-lists-dle .jamclub-clear { display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--tt-fade); }
.up-lists-dle .up-card { color: var(--tt); }

/* jam: фильтр списков — поиск на всю ширину, три колонки */
.up-lists-dle .up-lf { display: grid; gap: 10px; margin: 0 0 20px; }
.up-lists-dle .up-lf__search { position: relative; }
.up-lists-dle .up-lf__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.up-lists-dle .up-lf select, .up-lists-dle .up-lf input { width: 100%; height: 40px; padding: 0 15px; border-radius: 6px;
	border: 1px solid var(--bdc); background-color: var(--bg); color: var(--tt); font-size: 13px; box-shadow: none; }
.up-lists-dle .up-lf input { padding-right: 36px; }
.up-lists-dle .up-lf .jamclub-clear { position: absolute; top: 0; right: 0; width: 36px; height: 100%; display: flex;
	align-items: center; justify-content: center; font-size: 18px; color: var(--tt-fade); cursor: pointer; }
@media (max-width: 760px) { .up-lists-dle .up-lf__row { grid-template-columns: minmax(0, 1fr); } }

/* jam: кнопка «Избранное» ([add-favorites]/[del-favorites] движка) */
.dle-fav { display: inline-flex; align-items: center; color: inherit; cursor: pointer; }
.dle-fav:hover { color: var(--accent); }
.dle-fav.is-active .dle-fav__add, .dle-fav:not(.is-active) .dle-fav__del { display: none; }
.dle-fav.is-active { color: var(--accent); }

/* jam: форма комментария — у движка обычный textarea вместо DLE-редактора:
   поле во всю ширину, кнопка под ним справа (тема клала её поверх поля) */
.jamclub-ac-form .jamclub-ac-form__editor { display: block; margin-bottom: 12px; }
.jamclub-page__comments .jamclub-ac-form textarea.addcomment-editor { display: block; width: 100%; min-height: 120px; padding: 14px 16px; resize: vertical;
	border: 1px solid var(--bdc); border-radius: 6px; background-color: var(--bg-darker); color: var(--tt);
	font: inherit; font-size: 14px; line-height: 1.5; box-shadow: none; }
.jamclub-ac-form textarea.addcomment-editor:focus { outline: none; border-color: var(--accent); }
.jamclub-ac-form .ac-form__bottom { justify-content: flex-end; }
.jamclub-page__comments .jamclub-ac-form .ac-form__bottom .jamclub-ac-form__btn { position: static; pointer-events: auto; }
.jamclub-page__comments .jamclub-ac-form .jamclub-ac-form__btn { height: 42px; padding: 0 40px; border-radius: 6px; }
.jamclub-ac-toggle.jamclub-ac-form { cursor: default; }

/* jam: стрелка у выпадающих списков настроек — одна справа (shorthand
   background выше сбрасывал no-repeat темы, стрелка шла «зигзагом») */
.up .up-field select { -webkit-appearance: none; appearance: none; padding-right: 38px;
	background-image: url(../dleimages/chevron-down.svg); background-repeat: no-repeat;
	background-position: right 14px center; background-size: 12px auto; }

/* jam: карточки списков профиля — карточки темы (shortstory.tpl) в сетке темы;
   обёртка с данными фильтра не рисуется (display: contents) */
.up-lists-dle .up-card--theme { display: contents; }

/* jam: табы ТОП-100 — ссылки (/top-100/, /top-100/serials/, /top-100/films/), вид как у кнопок темы */
.jamclub-tabs-block__select a.btn { background-color: var(--bg-darker); color: var(--tt-fade); text-decoration: none; }
.jamclub-tabs-block__select a.btn.is-active, .jamclub-tabs-block__select a.btn:hover { background: var(--accent); color: #fff; }
@media (max-width: 760px) { .jamclub-tabs-block__select a.btn { flex-grow: 1; } }
.jamclub-tabs-block__select { margin-bottom: 20px; }

/* страницы «Друзья» и «Комментарии» пользователя */
.up-sub__head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.up-sub__back { display: inline-flex; align-items: center; gap: 8px; color: var(--tt-fade); font-size: 13px; text-decoration: none; }
.up-sub__back:hover { color: var(--accent); }
.up-sub__title { margin: 0; font-size: 24px; font-weight: 700; }
.up-sub .user__friends-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.up-sub .user__friends-card { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--tt); text-decoration: none; text-align: center; }
.up-sub .user__friends-card:hover { color: var(--accent); }
.up-sub .user__friends-avatar { position: relative; width: 84px; height: 84px; border-radius: 50%; }
.up-sub .user__friends-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.up-sub .user__friends-online { position: absolute; right: 4px; bottom: 4px; width: 14px; height: 14px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 0 3px var(--up-card, #222); }
.up-sub .user__friends-card-name { font-size: 14px; font-weight: 600; word-break: break-word; }
.up-sub .user__friends-none { padding: 30px 10px; text-align: center; color: var(--tt-fade); }
.up-sub__comments > * + * { margin-top: 12px; }

/* jam: в строке списка кнопки текущего списка нет (как на DLE) — остаются 3 списка + «Удалить», 2x2 */
.up-lists-dle.jamclub-utabs-profile .jamclub-news-list .jamclub-transfer li.jamclub-active { display: none !important; }

/* заявки в друзья у счётчика профиля */
.up-stat__new { margin-left: 4px; font-style: normal; font-size: 12px; color: var(--accent); }

/* jam: кольцо рейтинга в строке списка — цифра по центру, без точки-разделителя */
.jamclub-utn .item__rating { position: relative !important; flex: 0 0 40px; font-weight: 700; }
.jamclub-utn .item__rating::after, .jamclub-utn .item__rating::before { display: none !important; }

/* jam: страница франшизы — строка «N аниме · годы» и табы по типам */
.jc-fr-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: -6px 0 20px; }
.jc-fr-bar__meta { color: var(--tt-fade); font-size: 14px; }
.jc-fr-bar .jamclub-tabs-block__select { margin: 0; gap: 8px; flex-wrap: wrap; }
.jc-fr-bar .jamclub-tabs-block__select button span { opacity: .7; margin-left: 4px; }
@media (max-width: 760px) { .jc-fr-bar .jamclub-tabs-block__select button { flex-grow: 1; } }

/* jam: франшиза списком — строка с номером по порядку и доп. данными */
.jc-fr-list { display: flex !important; flex-direction: column; gap: 8px; counter-reset: fr; }
.jc-fr-row { display: flex; align-items: center; gap: 16px; padding: 10px 16px 10px 10px; border-radius: 8px; background: var(--bg-darker); }
.jc-fr-row:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.jc-fr-row__num { flex: 0 0 44px; text-align: center; font-size: 26px; font-weight: 800; color: var(--tt-fade); }
.jc-fr-row__num::before { counter-increment: fr; content: counter(fr); }
.jc-fr-row__img { flex: 0 0 60px; height: 90px; border-radius: 6px; overflow: hidden; display: block; }
.jc-fr-row__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jc-fr-row__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.jc-fr-row__title { font-size: 16px; font-weight: 700; color: var(--tt); text-decoration: none; }
.jc-fr-row__title:hover { color: var(--accent); }
.jc-fr-row__orig { font-size: 13px; color: var(--tt-fade); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jc-fr-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 4px; font-size: 13px; color: var(--tt-fade); }
.jc-fr-row__type { color: var(--tt); font-weight: 600; }
.jc-fr-row__rating { flex: 0 0 40px; position: relative !important; font-weight: 700; }
.jc-fr-row__rating::after, .jc-fr-row__rating::before { display: none !important; }
@media (max-width: 600px) {
	.jc-fr-row { gap: 10px; padding: 8px; }
	.jc-fr-row__num { flex-basis: 28px; font-size: 18px; }
	.jc-fr-row__img { flex-basis: 48px; height: 72px; }
	.jc-fr-row__title { font-size: 14px; }
}

.jc-fr-row__desc { font-size: 13px; line-height: 1.45; color: var(--tt-fade); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jc-fr-row__img { height: 105px; flex-basis: 70px; }
@media (max-width: 600px) { .jc-fr-row__desc { -webkit-line-clamp: 3; } .jc-fr-row__img { flex-basis: 48px; height: 72px; } }

.jc-fr-row__rel { padding: 1px 8px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--tt); font-size: 12px; }
