* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; margin: 0; padding: 0; }
:root { --bg: #121212; --bar: #212121; --card: #242424; --acc: #FFA000; --red: #D32F2F; --bub: #D6D6D6; }
html, body { height: 100%; background: var(--bg); color: #fff; font-family: Roboto, "Noto Sans", sans-serif; overflow: hidden; }
input, textarea, select, button { font: inherit; color: inherit; }
button { background: none; border: 0; }
svg { display: block; }

.screen { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); overflow: hidden; }
.scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; position: relative; }

/* ---------- toolbar ---------- */
.bar { height: 56px; display: flex; align-items: center; padding: 0 4px 0 16px; background: var(--bar); flex-shrink: 0; z-index: 3; }
.bar.back { padding-left: 4px; }
.bar h1 { font-size: 19px; font-weight: 400; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar.center h1 { text-align: center; }
.ib { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 50%; flex-shrink: 0; }
.ib:active { background: rgba(255, 255, 255, .12); }
.ib svg { width: 26px; height: 26px; fill: #fff; }

.tabs { display: flex; background: var(--bar); flex-shrink: 0; }
.tabs div { flex: 1; text-align: center; padding: 15px 0 13px; font-size: 14px; font-weight: 500; letter-spacing: .3px; color: #c9c9c9; border-bottom: 3px solid transparent; }
.tabs div.on { color: var(--acc); border-bottom-color: var(--acc); }

/* ---------- welcome ---------- */
.welcome .title { padding: 20px 20px; font-size: 22px; font-weight: 500; }
.welcome .mid { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 20px; text-align: center; }
.welcome .logo { width: 90px; height: auto; margin: 30px 0 90px; }
.welcome h2 { color: var(--acc); font-size: 27px; font-weight: 500; margin-bottom: 14px; }
.welcome p { font-size: 17px; line-height: 1.38; color: #e0e0e0; letter-spacing: .2px; }
.btn-red { background: var(--red); color: #fff; border-radius: 40px; padding: 19px 36px; font-size: 18px; font-weight: 500; letter-spacing: 2.4px; margin-top: 88px; }
.btn-red:active { background: #b71c1c; }
.welcome .foot { padding: 0 0 38px; display: flex; justify-content: center; gap: 34px; align-items: center; font-size: 17px; color: #e0e0e0; letter-spacing: .3px; }
.welcome .foot b { letter-spacing: 2.4px; font-weight: 500; color: #fff; font-size: 18px; }

/* ---------- forms ---------- */
.form { padding: 22px 20px 40px; display: flex; flex-direction: column; gap: 16px; }
.field label { display: block; font-size: 13px; color: var(--acc); margin: 0 0 4px 2px; }
.field input, .field textarea, .field select { width: 100%; background: transparent; border: 0; border-bottom: 1px solid #616161; padding: 10px 2px; font-size: 17px; outline: none; border-radius: 0; }
.field textarea { min-height: 110px; resize: vertical; line-height: 1.4; }
.field input:focus, .field textarea:focus, .field select:focus { border-bottom: 2px solid var(--acc); }
.field select option { background: #222; }
.hint { font-size: 13px; color: #9e9e9e; line-height: 1.4; }
.err { color: #ff6e6e; font-size: 14px; min-height: 18px; }
.btn { background: var(--acc); color: #000; font-weight: 500; border-radius: 4px; padding: 14px; font-size: 15px; text-align: center; letter-spacing: 1.2px; text-transform: uppercase; }
.btn.red { background: var(--red); color: #fff; border-radius: 40px; }
.btn.flat { background: transparent; color: var(--acc); }
.btn:active { filter: brightness(.88); }
.btn[disabled] { opacity: .5; }
.pickimg { display: flex; align-items: center; gap: 14px; }
.pickimg .prev { width: 76px; height: 76px; border-radius: 8px; background: #2c2c2c center / cover; flex-shrink: 0; }
.pickimg .prev.round { border-radius: 50%; }
.pickimg .btn { flex: 1; }

/* ---------- room cards ---------- */
.rooms { padding: 6px 6px 96px; display: flex; flex-direction: column; gap: 5px; }
.card { background: var(--card); border-radius: 12px; overflow: hidden; display: flex; height: 176px; }
.card:active { background: #2e2e2e; }
.card .pic { width: 40%; flex-shrink: 0; position: relative; background: #333 center / cover; }
.card .pic::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 52px; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); }
.card .dot { position: absolute; left: 8px; top: 8px; width: 11px; height: 11px; border-radius: 50%; background: #2bd52b; z-index: 1; }
.card .cnt { position: absolute; left: 10px; right: 6px; bottom: 9px; z-index: 1; display: flex; align-items: center; gap: 4px; font-size: 14px; color: #fff; white-space: nowrap; }
.card .cnt svg { width: 19px; height: 19px; fill: none; stroke: #fff; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.card .cnt .s2 { margin-left: 8px; }
.card .txt { flex: 1; min-width: 0; padding: 12px 14px 10px; display: flex; flex-direction: column; }
.card .txt h3 { color: var(--acc); font-size: 19px; font-weight: 400; line-height: 1.15; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .txt p { font-size: 14px; line-height: 1.3; color: #ececec; flex: 1; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.card .last { font-size: 12px; color: #8a8a8a; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fab { position: absolute; right: 18px; bottom: 22px; width: 58px; height: 58px; border-radius: 50%; background: var(--acc); display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 8px rgba(0, 0, 0, .55); z-index: 5; }
.fab svg { width: 28px; height: 28px; fill: #000; }
.empty { text-align: center; color: #9e9e9e; padding: 50px 30px; font-size: 15px; line-height: 1.45; }

/* ---------- full-screen art (комната / профиль) ---------- */
.art { position: absolute; inset: 0; background: #1a1a1a center / cover no-repeat; z-index: 0; }
.art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, #000 0%, rgba(0, 0, 0, .92) 34%, rgba(0, 0, 0, .35) 58%, rgba(0, 0, 0, .05) 75%, rgba(0, 0, 0, .25) 100%); }
.over { position: relative; z-index: 2; }
.room .scroll, .prof .scroll { z-index: 2; }
.spacer { height: 64vh; position: relative; }
.creator { position: absolute; right: 18px; top: 18px; display: flex; align-items: center; gap: 12px; z-index: 3; }
.creator .lbl { text-align: right; text-shadow: 0 1px 4px rgba(0, 0, 0, .7); }
.creator .lbl small { display: block; font-size: 14px; letter-spacing: 1px; color: #fff; }
.creator .lbl span { font-size: 14px; color: #fff; }
.creator .av { width: 76px; height: 76px; border: 2px solid #fff; font-size: 28px; }
.playbtn { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); width: 66px; height: 66px; border-radius: 50%; background: rgba(60, 60, 60, .55); display: flex; align-items: center; justify-content: center; }
.playbtn svg { width: 34px; height: 34px; fill: #fff; }
.playbtn.on { background: rgba(255, 160, 0, .5); }
.rtitle { display: flex; align-items: flex-end; justify-content: space-between; padding: 0 18px 8px; }
.rtitle h2 { font-size: 18px; font-weight: 500; letter-spacing: .3px; }
.rtitle img { width: 22px; opacity: .9; }
.oline { height: 1px; background: var(--acc); }
.lore { padding: 14px 18px 60px; font-size: 15px; line-height: 1.36; color: #fff; white-space: pre-wrap; background: #000; }
.topl { position: absolute; left: 4px; top: 4px; z-index: 4; }
.topl svg { filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .8)); }

.av { width: 44px; height: 44px; border-radius: 50%; background: #2a2a2a center / cover; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 500; color: #fff; font-size: 18px; overflow: hidden; }

/* ---------- профиль ---------- */
.ptop { display: flex; align-items: center; padding: 4px 4px 0; position: relative; z-index: 4; }
.ptop .nm { flex: 1; min-width: 0; padding-left: 8px; text-shadow: 0 1px 4px rgba(0, 0, 0, .8); }
.ptop .nm b { display: block; font-size: 18px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptop .nm span { font-size: 14px; color: #ddd; }
.ptop svg { filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .8)); }
.bigwrap { position: absolute; left: 50%; top: 22vh; transform: translateX(-50%); }
.bigav { width: 38vw; height: 38vw; max-width: 190px; max-height: 190px; border: 3px solid #fff; font-size: 64px; }
.stdot { position: absolute; left: 12%; top: 10%; width: 18px; height: 18px; border-radius: 50%; background: #ffeb3b; border: 2px solid rgba(0, 0, 0, .25); }
.prow2 { display: flex; justify-content: space-between; align-items: baseline; padding: 0 18px 6px; }
.prow2 .n { font-size: 21px; font-weight: 400; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow2 .k { color: var(--acc); font-size: 20px; font-weight: 400; white-space: nowrap; margin-left: 10px; }
.biobox { background: #000; padding: 12px 18px 30px; position: relative; }
.bio { font-size: 15px; line-height: 1.38; white-space: pre-wrap; padding-right: 26px; }
.bio.clip { display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.bio .tg { color: #fff; display: block; margin-bottom: 14px; }
.chev { position: absolute; right: 10px; top: 50%; width: 24px; height: 24px; fill: #fff; }
.biobox.open .chev { transform: rotate(90deg); }
.masks { background: #000; padding: 4px 18px 110px; }
.masks h4 { color: var(--acc); font-weight: 500; font-size: 15px; letter-spacing: .5px; margin: 6px 0 12px; }
.mrow { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 6px; }
.mk { width: 70px; flex-shrink: 0; text-align: center; font-size: 13px; color: #ddd; }
.mk .av { width: 64px; height: 64px; margin: 0 auto 6px; border: 2px solid #fff; font-size: 24px; }
.mk.add .av { background: #2c2c2c; border-color: var(--acc); color: var(--acc); font-size: 32px; font-weight: 300; }
.role { display: inline-block; font-size: 12px; color: #000; background: var(--acc); border-radius: 10px; padding: 1px 8px; margin: 0 0 8px 18px; }

/* ---------- лидеры / онлайн ---------- */
.plist { padding-bottom: 30px; background: #1c262e; min-height: 100%; }
.prow { display: flex; align-items: center; gap: 16px; padding: 12px 16px; }
.prow:active { background: rgba(255, 255, 255, .06); }
.rank { min-width: 26px; height: 26px; padding: 0 4px; border-radius: 13px; background: #f44336; color: #fff; font-size: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.prow .av { width: 50px; height: 50px; border: 1px solid rgba(255, 255, 255, .6); font-size: 22px; }
.prow .who { flex: 1; min-width: 0; color: var(--acc); }
.prow .who b { display: block; font-weight: 400; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .who span { font-size: 14px; }
.prow .side { font-size: 13px; color: #fff; max-width: 42%; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- чат ---------- */
.msgs { flex: 1; overflow-y: auto; padding: 10px 8px 6px; display: flex; flex-direction: column; gap: 10px; }
.more { text-align: center; color: var(--acc); font-size: 14px; padding: 8px; }
.m { display: flex; align-items: flex-end; gap: 0; max-width: 100%; }
.m .av { width: 44px; height: 44px; border: 2px solid #e0e0e0; font-size: 19px; position: relative; z-index: 1; }
.m .col { min-width: 0; max-width: calc(100% - 56px); display: flex; flex-direction: column; align-items: flex-start; }
.m .nm { color: var(--acc); font-size: 15px; padding: 0 10px 2px 14px; }
.m .nm .r { font-size: 12px; color: #bdbdbd; margin-left: 4px; }
.m .bub { background: var(--bub); color: #000; border-radius: 18px; padding: 8px 14px 9px; font-size: var(--msg, 15px); line-height: 1.32; white-space: pre-wrap; word-wrap: break-word; margin-left: -10px; padding-left: 20px; }
.m .lk { font-size: 12px; color: var(--acc); padding: 2px 14px 0; }
.m.me { flex-direction: row-reverse; }
.m.me .col { align-items: flex-end; }
.m.me .nm { padding: 0 14px 2px 10px; }
.m.me .bub { margin-left: 0; margin-right: -10px; padding-left: 14px; padding-right: 20px; }
.m.info { justify-content: center; }
.m.info .bub { margin: 0; padding: 7px 16px; border-radius: 20px; text-align: center; }
.act { }
.ooc { font-style: normal; color: var(--oocO, #546E7A); }
.sp { font-style: italic; }
.inbar { background: var(--bar); padding: 6px 6px 8px; flex-shrink: 0; }
.modes:empty { display: none; }
.modes { display: flex; gap: 6px; padding: 0 2px 6px; align-items: center; overflow-x: auto; }
.chip { font-size: 13px; padding: 6px 12px; border-radius: 16px; background: #333; color: #ddd; white-space: nowrap; flex-shrink: 0; }
.chip.on { background: var(--acc); color: #000; }
.chip.to { background: rgba(255, 160, 0, .18); color: var(--acc); }
.inrow { display: flex; align-items: flex-end; gap: 6px; }
.inrow textarea { flex: 1; resize: none; max-height: 130px; min-height: 46px; background: #2c2c2c; border: 0; border-radius: 23px; padding: 12px 16px; font-size: 16px; outline: none; line-height: 1.3; }
.send { width: 46px; height: 46px; border-radius: 50%; background: var(--acc); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.send svg { width: 22px; height: 22px; fill: #000; }
.readonly { text-align: center; color: #9e9e9e; padding: 14px; font-size: 14px; }

/* ---------- настройки ---------- */
.slist { padding: 6px 0; }
.sitem { display: flex; align-items: center; gap: 20px; padding: 16px 20px; font-size: 16px; }
.sitem:active { background: rgba(255, 255, 255, .06); }
.sitem svg { width: 24px; height: 24px; fill: #bdbdbd; }
.sitem small { display: block; color: #9e9e9e; font-size: 13px; margin-top: 2px; }
.ms { padding: 10px 8px 40px; display: flex; flex-direction: column; gap: 12px; }
.capsule { align-self: center; background: var(--bub); color: #000; border-radius: 20px; padding: 6px 16px; font-size: 15px; }
.slabel { color: var(--acc); font-size: 15px; padding: 6px 0 0 58px; }

/* ---------- sheet / toast ---------- */
.shade { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 50; display: flex; align-items: flex-end; animation: fade .15s; }
.sheet { width: 100%; background: #2a2a2a; border-radius: 12px 12px 0 0; padding: 8px 0 14px; max-height: 80vh; overflow-y: auto; animation: up .18s ease-out; }
.sheet .t { padding: 12px 20px 8px; font-size: 14px; color: #9e9e9e; }
.sheet .it { padding: 15px 20px; font-size: 16px; }
.sheet .it:active { background: rgba(255, 255, 255, .06); }
.sheet .it.danger { color: #ff6e6e; }
.sw { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; padding: 12px 20px 6px; }
.sw div { aspect-ratio: 1; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .2); }
.sw div.on { border: 3px solid #fff; }
@keyframes up { from { transform: translateY(40px); opacity: .3 } to { transform: none; opacity: 1 } }
@keyframes fade { from { opacity: 0 } }
#toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 6px); background: #323232; color: #fff; padding: 12px 18px; border-radius: 4px; font-size: 14px; z-index: 99; opacity: 0; pointer-events: none; transition: opacity var(--motion-control) var(--ease-out), transform var(--motion-control) var(--ease-out); max-width: 88vw; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.spin { width: 34px; height: 34px; border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--acc); border-radius: 50%; animation: rot .8s linear infinite; margin: 40px auto; }
@keyframes rot { to { transform: rotate(360deg) } }

/* ---------- чат на фоне арта комнаты ---------- */
.chat .chatbg { position: absolute; inset: 0; background: center / cover no-repeat; z-index: 0; }
.chat .chatbg::after { content: ""; position: absolute; inset: 0; background: rgba(18, 18, 18, .78); }
.chat > .bar, .chat > .msgs, .chat > .inbar { position: relative; z-index: 1; }
.chat > .bar { background: rgba(33, 33, 33, .94); }
.chat > .inbar { background: rgba(33, 33, 33, .96); }

/* ---------- аватар профиля: смена ---------- */
.avedit { position: absolute; right: 6%; bottom: 6%; width: 34px; height: 34px; border-radius: 50%; background: var(--acc); display: flex; align-items: center; justify-content: center; }
.avedit svg { width: 18px; height: 18px; fill: #000; }

/* ---------- регистрация / вход (как в оригинале) ---------- */
.auth { background: #121015; }
.aform { padding: 60px 15px 140px; }
.box { position: relative; background: #121015; border: 1px solid #1a181c; border-radius: 6px; margin-top: 14px; }
.box input, .obox input { width: 100%; background: transparent; border: 0; outline: none; padding: 26px 56px 26px 16px; font-size: 18px; color: #fff; letter-spacing: .3px; }
.box input::placeholder { color: #8d8b90; }
.eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.eye svg { width: 28px; height: 28px; fill: #fff; }
.help { font-size: 13.5px; line-height: 1.4; color: #c9c7cc; padding: 6px 4px 0; letter-spacing: .2px; }
.help b { color: #e4e2e6; font-weight: 700; }
.policy { font-size: 16px; line-height: 1.35; padding: 26px 0 0; letter-spacing: .2px; }
.policy a { color: var(--acc); text-decoration: underline; }
.rpbtn { position: absolute; right: 12px; bottom: 0; display: flex; align-items: center; gap: 14px; background: #913D00; color: #fff; border-radius: 34px 34px 0 34px; padding: 14px 22px 16px 14px; font-size: 18px; font-weight: 500; letter-spacing: 2.6px; z-index: 5; }
.rpbtn img { width: 32px; height: auto; filter: brightness(0) invert(1); }
.rpbtn:active { filter: brightness(1.15); }
.rpbtn[disabled] { opacity: .6; }
.rpbtn.inpanel { position: static; align-self: flex-end; border-radius: 34px; margin-top: 18px; }
.login .dimmed { flex: 1; display: flex; flex-direction: column; opacity: .38; }
.login .panel { background: #19262e; padding: 18px 15px 18px; display: flex; flex-direction: column; animation: up .25s ease-out; }
.helpi { display: flex; align-items: flex-start; margin-bottom: 20px; }
.helpi img { width: 66px; height: 66px; border-radius: 50%; border: 2px solid #e0e0e0; flex-shrink: 0; position: relative; z-index: 1; }
.helpi div { margin-left: -2px; padding-top: 0; }
.helpi b { display: block; font-weight: 400; font-size: 17px; padding-left: 2px; }
.helpi span { display: inline-block; background: #1b1c1e; border-radius: 0 20px 20px 0; padding: 7px 14px 8px 6px; font-size: 16px; margin-top: 2px; }
.obox { position: relative; border: 1.5px solid #4b5961; border-radius: 6px; margin-top: 14px; background: #1c2931; }
.obox:focus-within { border: 2px solid #913D00; }
.obox label { position: absolute; left: 12px; top: -10px; font-size: 13.5px; color: var(--acc); background: #19262e; padding: 0 6px; letter-spacing: .3px; }
.obox input { padding: 22px 56px 18px 16px; }

/* ---------- шторка участников ---------- */
.dscrim { position: absolute; inset: 56px 0 0 0; background: rgba(0, 0, 0, .55); z-index: 6; opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer { position: absolute; left: 0; top: 56px; bottom: 0; width: 82%; max-width: 400px; background: #0e1420; z-index: 7; transform: translateX(-100%); transition: transform .25s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; box-shadow: 4px 0 18px rgba(0, 0, 0, .5); }
.chat.dopen .drawer:not(.rdr) { transform: translateX(0); }
.chat.dopen .dscrim { opacity: 1; pointer-events: auto; }
.chat.ddrag .drawer, .chat.ddrag .dscrim { transition: none; }
.drawer.rdr { left: auto; right: 0; transform: translateX(100%); box-shadow: -4px 0 18px rgba(0, 0, 0, .5); }
.chat.ropen .drawer.rdr { transform: translateX(0); }
.chat.ropen .dscrim { opacity: 1; pointer-events: auto; }
.chat.ddrag .dscrim { pointer-events: none; }
.dh { font-size: 22px; padding: 26px 18px 18px; letter-spacing: .3px; }
.dscroll { flex: 1; overflow-y: auto; }
.dlist { padding: 0 12px; display: flex; flex-direction: column; gap: 10px; }
.drow { position: relative; display: flex; align-items: center; min-height: 64px; }
.drow:active .dw { background: rgba(255, 255, 255, .08); }
.dav { position: relative; z-index: 1; flex-shrink: 0; }
.dav .av { width: 62px; height: 62px; border: 2px solid #161616; font-size: 24px; }
.dav.self .av { box-shadow: 0 0 0 3px #e9c46a; }
.dav .on { position: absolute; right: 0; bottom: 2px; width: 13px; height: 13px; border-radius: 50%; background: #3ac25a; border: 2px solid #161616; }
.dw { flex: 1; min-width: 0; margin-left: -30px; padding: 9px 14px 9px 42px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 18px; background: linear-gradient(90deg, rgba(40, 50, 66, .7), rgba(26, 33, 46, .5)); }
.dw b { display: block; font-weight: 400; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dw b i { font-style: normal; font-size: 13px; color: #9aa3ad; }
.dw span { font-size: 14px; color: #9aa3ad; }
.leave { --leave-gutter: 12px; margin: 12px var(--leave-gutter) 16px; padding: 13px; border: 1.5px solid rgba(229, 115, 115, .55); border-radius: 18px; color: #e57373; font-size: 18px; letter-spacing: .5px; flex-shrink: 0; }
.leave:active { background: rgba(229, 115, 115, .1); }

/* ---------- кубик ---------- */
.dicebtn { width: 46px; height: 46px; border-radius: 50%; background: #000; border: 2px solid var(--acc); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dicebtn svg { width: 26px; height: 26px; }
.dicebtn:active { background: #1a1200; }
.m.dice .bub { border: 2px solid var(--acc); }
.dicei { display: inline-block; vertical-align: -5px; margin-right: 6px; }
.dicei svg { width: 22px; height: 22px; }
.dv { font-size: 18px; font-weight: 700; color: #000; }
.dv.crit { color: #2e7d32; }
.dv.fail { color: #c62828; }
.dgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 8px 16px 6px; }
.dgrid button { background: #1b1b1b; border: 1.5px solid #3a3a3a; border-radius: 14px; padding: 12px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: #fff; font-size: 15px; }
.dgrid button:active { border-color: var(--acc); }
.dgrid svg { width: 34px; height: 34px; }

/* ---------- печатает, ответ, закреп ---------- */
.typing { font-size: 13px; color: var(--acc); font-style: italic; padding: 0 10px 4px; min-height: 0; }
.typing:empty { display: none; }
.chip.reply { background: rgba(255, 160, 0, .15); color: #ffcc80; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.quote { border-left: 3px solid var(--acc); background: rgba(0, 0, 0, .07); border-radius: 4px; padding: 3px 8px; margin: 2px 0 6px; font-size: 13px; line-height: 1.3; }
.quote b { display: block; color: #8a5a00; font-weight: 500; }
.quote span { color: #333; }
.m { transition: background .3s; }
.m.flash .bub { box-shadow: 0 0 0 3px var(--acc); }
.pin { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: rgba(33, 33, 33, .95); border-top: 1px solid #333; position: relative; z-index: 1; flex-shrink: 0; }
.pin .pi { font-size: 18px; }
.pin div { min-width: 0; flex: 1; }
.pin b { display: block; color: var(--acc); font-weight: 400; font-size: 13px; }
.pin span { display: block; font-size: 14px; color: #ddd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pinfull { padding: 6px 20px 14px; font-size: 16px; line-height: 1.4; white-space: pre-wrap; }

/* ---------- письма, поиск, диалоги ---------- */
.mailbtn { position: relative; }
.mailbadge { position: absolute; top: 6px; right: 4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.search { padding: 8px 6px 0; }
.search input { width: 100%; background: #1e1e1e; border: 1px solid #2c2c2c; border-radius: 22px; padding: 10px 16px; font-size: 15px; outline: none; color: #fff; }
.search input:focus { border-color: var(--acc); }
.dlg { padding: 6px 6px 30px; display: flex; flex-direction: column; gap: 5px; }
.drow2 { display: flex; gap: 14px; align-items: center; padding: 12px 14px; background: var(--card); border-radius: 12px; }
.drow2:active { background: #2e2e2e; }
.drow2 .av { width: 52px; height: 52px; }
.drow2 .dt { flex: 1; min-width: 0; }
.drow2 .top { display: flex; justify-content: space-between; align-items: baseline; }
.drow2 .top b { font-weight: 400; font-size: 16px; color: var(--acc); }
.drow2 .top span { font-size: 12px; color: #888; }
.drow2 .bot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 3px; }
.drow2 .bot span { font-size: 14px; color: #bbb; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drow2 .bot i { font-style: normal; background: var(--acc); color: #000; font-size: 12px; min-width: 20px; height: 20px; border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 0 6px; }
.dmhead { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dmhead .av { width: 38px; height: 38px; font-size: 16px; }
.dmhead b { display: block; font-weight: 400; font-size: 17px; }
.dmhead span { font-size: 12px; color: #aaa; }
.dm .msgs { background: var(--bg); }
.dmt { display: inline-block; font-size: 11px; color: #666; margin-left: 8px; vertical-align: -1px; }
.role.ban { background: var(--red); color: #fff; margin-left: 6px; }

/* ---------- баннер ---------- */
.banner { position: fixed; left: 10px; right: 10px; top: 10px; z-index: 120; background: #2b2b2b; border-left: 4px solid var(--acc); border-radius: 10px; padding: 10px 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, .55); transform: translateY(-12px); opacity: 0; pointer-events: none; transition: transform var(--motion-panel) var(--ease-out), opacity var(--motion-panel) var(--ease-out); }
.banner.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
.banner b { display: block; font-weight: 500; font-size: 14px; color: var(--acc); margin-bottom: 2px; }
.banner span { font-size: 14px; color: #eee; }

/* ---------- оригинальные функции ---------- */
.helpi img { object-fit: cover; }
.cats { display: flex; gap: 6px; overflow-x: auto; padding: 8px 6px 2px; }
.cats .chip { background: #1e1e1e; border: 1px solid #2c2c2c; }
.cats .chip.on { background: var(--acc); color: #000; border-color: var(--acc); }
.star { color: var(--acc); margin-right: 4px; }
.rtabs { display: flex; gap: 22px; padding: 10px 18px 0; background: #000; }
.rtabs span { font-size: 14px; color: #9e9e9e; padding-bottom: 6px; border-bottom: 2px solid transparent; letter-spacing: .4px; }
.rtabs span.on { color: var(--acc); border-bottom-color: var(--acc); }
.visit { margin-top: 22px; white-space: normal; }
.visit h5 { color: var(--acc); font-weight: 400; font-size: 14px; margin-bottom: 10px; }
.vrow { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.vi { width: 58px; flex-shrink: 0; text-align: center; font-size: 11px; color: #bbb; }
.vi .av { width: 50px; height: 50px; margin: 0 auto 4px; border: 1.5px solid #e0e0e0; }
.vi span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rmeta { margin-top: 18px; font-size: 12px; color: #8a8a8a; white-space: normal; }
.evl { padding: 8px 8px 40px; display: flex; flex-direction: column; gap: 6px; }
.ev { background: var(--card); border-radius: 12px; padding: 10px 14px; }
.evh { font-size: 12px; color: #9e9e9e; margin-bottom: 4px; }
.evt { font-size: 15px; line-height: 1.38; white-space: pre-wrap; }
.pbox { padding: 4px 18px 10px; display: flex; flex-direction: column; gap: 10px; }
.pbox textarea { width: 100%; background: #1d1d1d; border: 1px solid #3a3a3a; border-radius: 10px; padding: 10px 12px; font-size: 16px; color: #fff; outline: none; resize: none; }
.pbox textarea:focus { border-color: var(--acc); }
.rate2 { display: flex; gap: 8px; }
.rate2 .btn { flex: 1; letter-spacing: .3px; text-transform: none; }
.sgrp { color: var(--acc); font-size: 13px; letter-spacing: .6px; padding: 18px 20px 4px; }
.sitem .st { flex: 1; }
.sw2 { width: 40px; height: 22px; border-radius: 11px; background: #555; position: relative; flex-shrink: 0; transition: background .2s; }
.sw2::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #ddd; transition: transform var(--motion-panel) var(--ease-out), background-color var(--motion-control) ease; }
.sw2.on { background: rgba(255, 160, 0, .55); }
.sw2.on::after { transform: translateX(18px); background: var(--acc); }
.srange { padding: 0 20px 10px; }
.srange input { width: 100%; accent-color: var(--acc); }
.sdot { width: 14px; height: 14px; border-radius: 50%; margin: 0 5px; flex-shrink: 0; }
.pstat { padding: 0 18px 8px; font-size: 13px; color: #9e9e9e; }
.m.helpim .nm { color: #e0e0e0 !important; }
.m.notice .bub { border: 1.5px solid var(--acc); }
.dgrid i { font-style: normal; font-size: 30px; line-height: 34px; }
.dgrid span { text-align: center; font-size: 13px; }
/* темница */
.dungeon .art::after { background: rgba(0, 0, 0, .78); }
.dg { position: relative; z-index: 2; padding: 60px 18px; display: flex; flex-direction: column; gap: 14px; }
.dg h2 { font-size: 30px; font-weight: 400; color: #ef5350; letter-spacing: 1px; margin-bottom: 10px; }
.dgr { font-size: 15px; color: #ddd; }
/* нет связи */
.offline { position: fixed; inset: 0; z-index: 140; background: rgba(0, 0, 0, .7); display: flex; align-items: flex-end; }
.offline .panel { width: 100%; background: #19262e; padding: 18px 15px; display: flex; flex-direction: column; animation: up .25s ease-out; }

/* ===== 1.8: разметка оригинала ===== */
.bub b{font-weight:700}
.rh{display:block;font-weight:700;color:#FFA000;margin:2px 0}
.rh3{font-size:1.05em}.rh4{font-size:.95em;opacity:.9}
.lgn,.rlnk{font-weight:600;cursor:pointer}
.rlnk{color:#00897B;text-decoration:underline}
a.lnk{color:#1E88E5;word-break:break-all}
.dch{font-size:1.25em;line-height:1}
.bub code,.tview code,.evt code{font-family:monospace;background:rgba(0,0,0,.12);padding:0 3px;border-radius:3px}
u.ul{text-decoration:underline}
.tabs.scrollable{overflow-x:auto;scrollbar-width:none;justify-content:flex-start}
.tabs.scrollable::-webkit-scrollbar{display:none}
.tabs.scrollable>div{flex:0 0 auto;padding-left:16px;padding-right:16px}
.tview{white-space:pre-wrap;padding:16px;line-height:1.5;color:#ddd}
/* образы */
.chtag{margin-left:6px;font-size:.78em;color:#757575;font-weight:400;cursor:pointer}
.tg2{display:inline-block;font-size:11px;padding:1px 6px;border-radius:8px;background:#333;color:#FFA000;margin-left:4px}
.crow{display:flex;gap:10px;align-items:center}
.crow .av{width:42px;height:42px;flex:0 0 42px}
.signs{display:flex;flex-wrap:wrap;gap:6px}
.signs .chip{min-width:34px;text-align:center;font-size:16px}
.gtabs{display:flex;border:1px solid #FFA000;border-radius:6px;overflow:hidden}
.gtabs span{flex:1;text-align:center;padding:9px 0;font-size:18px;color:#FFA000;cursor:pointer}
.gtabs span.on{background:#FFA000;color:#121212}
/* локации */
.m.loc .bub{font-size:.92em}
.locb{margin-top:4px;color:#9e9e9e;white-space:pre-wrap}
.locv{white-space:pre-wrap;line-height:1.5;color:#ddd}
.locimg{height:140px;border-radius:6px;background:#222 center/cover;margin-bottom:8px}
.locrow{margin-bottom:14px;white-space:pre-wrap}
.locrow small{display:block;color:#9e9e9e;margin-top:2px}
.mapv{background:#000;overflow:auto}
.mapv img{width:100%;display:block}
/* опросы и задания */
.m.wid .bub{background:#242424;color:#e0e0e0;max-width:92%;width:100%;text-align:left;border:1px solid #333}
.spin.sm{width:18px;height:18px;margin:6px auto;border-width:2px}
.poll .pq{font-weight:600;margin-bottom:8px;color:#fff}
.poll .po{position:relative;display:flex;justify-content:space-between;align-items:center;padding:8px 10px;margin:5px 0;border:1px solid #444;border-radius:6px;overflow:hidden;cursor:pointer}
.poll .po.mine{border-color:#FFA000}
.poll .po .pb{position:absolute;left:0;top:0;bottom:0;background:rgba(255,160,0,.22);transition:width .3s}
.poll .po span,.poll .po b{position:relative}
.poll .pf{font-size:12px;color:#9e9e9e;margin-top:4px}
.job{cursor:pointer}
.job .jh{font-size:12px;color:#FFA000;text-transform:uppercase;letter-spacing:.5px}
.job .jt{font-weight:600;color:#fff;margin:4px 0}
.job .jb{color:#bdbdbd;white-space:pre-wrap;font-size:.92em}
.job .jr{margin-top:6px;color:#FFA000}
.job .js{margin-top:6px;font-size:12px;color:#9e9e9e}
/* таймы и профиль */
.taimrow{padding:10px 16px;color:#FFA000;cursor:pointer}
.ptabs{margin-top:4px}
.shop .tabs.ic div{font-size:15px}
.shop input[type=range]{width:100%}
.pbox input[type=range]{width:100%;margin:10px 0}
.bub strong,.helpi strong,.tview strong,.locv strong,.lore strong{font-weight:700;display:inline}
.role.bot{background:#263238;color:#80deea}
.botrow{align-items:center}
.botrow .av{width:40px;height:40px;flex:0 0 40px;margin-right:12px}
.botrow small{display:block}
.tres{padding:8px 0;border-bottom:1px solid #2c2c2c}
.tres div{color:#bdbdbd;font-size:13px;margin-top:3px;word-break:break-word}
body.gamemode .m.oocm{display:none}
.vhelp{font-size:12px;color:#9e9e9e;margin:-2px 0 8px}
.ignwarn{margin:6px 16px;padding:8px 10px;border-radius:6px;background:rgba(239,83,80,.12);color:#ef9a9a;font-size:13px}
.mlist{max-height:55vh;overflow:auto;margin-top:8px}.mlist .mi{padding:11px 4px;border-bottom:1px solid #2a2a2a;font-family:monospace;font-size:13px;color:#e0e0e0;cursor:pointer}.mlist .mi:active{background:#2a2a2a}

/* ===== 2.8: правки по отзывам ===== */
/* прозрачные пузыри — сквозь них видна комната */
/* мягкое появление новых сообщений */
@keyframes msgIn { from { opacity: .4; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.m.newin { animation: msgIn 210ms var(--ease-out); }
/* кнопка «↓ новые» */
.jumpnew { position: absolute; right: 14px; bottom: 92px; z-index: 6; background: #FFA000; color: #121212; border-radius: 18px; padding: 7px 14px; font-size: 14px; font-weight: 600; box-shadow: 0 3px 10px rgba(0,0,0,.45); }
/* бросок к посту */
.roll { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 7px; padding: 6px 10px; border-radius: 10px; background: rgba(0,0,0,.12); font-size: .92em; white-space: normal; }
.roll .rw { display: inline-flex; align-items: center; gap: 5px; }
.roll .rw svg { width: 18px; height: 18px; }
.roll .rr { font-weight: 700; }
.roll.ok .rr { color: #2e7d32; } .roll.bad .rr { color: #c62828; }
.roll.crit { background: rgba(255,160,0,.25); } .roll.crit .rr { color: #e65100; }
.roll.cfail { background: rgba(198,40,40,.18); } .roll.cfail .rr { color: #b71c1c; }
.roll.spin .rr { opacity: 0; } .roll.spin .rv { color: #555; }
@keyframes rollIn { from { transform: scale(.88); opacity: 0; } to { transform: none; opacity: 1; } }
.roll.reveal .rr { animation: rollIn var(--motion-panel) var(--ease-out); }
.chip.rollc { background: rgba(255,160,0,.18); color: #FFA000; border-color: #FFA000; }
.rollpick { padding: 2px 4px 12px; border-bottom: 1px solid #2a2a2a; margin-bottom: 10px; }
.rollpick .rph { font-weight: 600; color: #FFA000; margin-bottom: 8px; }
.rollpick .rph small { display: block; color: #9e9e9e; font-weight: 400; font-size: 12px; margin-top: 3px; }
.rollpick .rpb { display: flex; gap: 8px; }
.rollpick .rpb button { flex: 1; background: #2a2a2a; border: 1.5px solid #FFA000; border-radius: 12px; padding: 10px 4px; color: #eee; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 20px; }
.rollpick .rpb button svg { width: 24px; height: 24px; }
.rollpick .rpb span { font-size: 12px; line-height: 1.25; }
/* пункты комнаты в правой шторке */
.dmenu { padding: 0 6px 6px; }
.dmi { padding: 12px 10px; color: #e0e0e0; font-size: 15px; border-radius: 8px; }
.dmi:active { background: rgba(255,255,255,.06); }
/* запрет писать */
.inbar { position: relative; }
.inlock { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 14px; background: rgba(33,33,33,.97); color: #ef9a9a; font-size: 14px; }
/* ЛС: доставлено/прочитано */
.rc { margin-left: 4px; color: #888; letter-spacing: -2px; }
.rc.read { color: #1e88e5; }
/* онлайн на карточке */
.card .cnt .live { color: #69f0ae; }
.card .cnt .s2.live svg { stroke: #69f0ae; }
/* фоторедактор */
.pe { position: fixed; inset: 0; z-index: 100; background: #0d0d0d; display: flex; flex-direction: column; }
.pebar { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px; background: #1b1b1b; }
.pebar b { color: #eee; font-weight: 500; }
.pebtn { padding: 8px 14px; color: #bbb; font-size: 15px; }
.pebtn.acc { color: #121212; background: #FFA000; border-radius: 18px; font-weight: 600; }
.pestage { flex: 1; min-height: 0; position: relative; touch-action: none; }
.pestage canvas { display: block; touch-action: none; }
.petools { padding: 8px 14px 16px; background: #1b1b1b; }
.pechips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.petools label { display: flex; align-items: center; gap: 10px; color: #bbb; font-size: 13px; margin-top: 6px; }
.petools label input { flex: 1; accent-color: #FFA000; }

/* кулдаун костей */
.dicebtn { position: relative; }
.dicebtn.cd { border-color: #555; }
.dicebtn.cd svg { opacity: .25; }
.dicebtn.cd::after { content: attr(data-cd); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #FFA000; font-size: 16px; font-weight: 700; }

/* ===== 3.1 ===== */
/* журнал модерации */
.mlog { padding: 8px 12px 20px; display: flex; flex-direction: column; gap: 8px; }
.mlr { background: #262626; border-radius: 10px; padding: 9px 12px; }
.mlh { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.mlh b { font-weight: 500; color: #eee; }
.mlh span { color: #8a8a8a; font-size: 12px; white-space: nowrap; }
.mlb { font-size: 13px; color: #bbb; margin-top: 3px; }
.mla[data-u]:not([data-u=""]) { color: #FFA000; }
.mld { font-size: 13px; color: #9e9e9e; margin-top: 3px; word-break: break-word; }
.mltabs { margin: 6px 12px 0; }

/* ===== 3.3: чат и ЛС точно по оригиналу (MRP 0.139: chat_item_*, bg_message_*, control_panel) ===== */
.msgs { gap: 6px; }
.m .av { width: 52px; height: 52px; border: 1px solid rgba(255, 255, 255, .47); }
.m .col { max-width: calc(100% - 78px); }
.m .nm { font-size: 16px; padding: 0 10px 1px 2px; line-height: 1.25; }
.m.me .nm { padding: 0 2px 1px 10px; }
/* пузырь: белый 87%, скругление 16, острый угол со стороны аватарки */
.m .bub { background: rgba(255, 255, 255, .867); border-radius: 16px 16px 16px 0; margin-left: -16px; padding: 4px 10px 6px 21px; line-height: 1.3; }
.m.me .bub { border-radius: 16px 16px 0 16px; margin-left: 0; margin-right: -16px; padding: 4px 21px 6px 10px; }
.m.dice .bub, .m.helpim .bub { border-radius: 16px; }
/* системные сообщения: тот же белый пузырь, тёмно-серый текст по центру */
.m.info .bub { background: rgba(255, 255, 255, .867); border-radius: 16px; padding: 4px 14px 6px; margin: 4px; font-size: 15px; }
.m.wid .bub { background: #242424; }
.toname { font-size: .85em; }
.toname.off { text-decoration: line-through; }
.mtime { display: block; font-size: .75em; margin-top: 1px; }
/* шапка и панель ввода — полупрозрачный чёрный, как в оригинале */
.chat > .bar { background: rgba(0, 0, 0, .54); }
.chat > .inbar { background: rgba(0, 0, 0, .54); border-top: 1px solid rgba(255, 255, 255, .12); }
.chat .inbar textarea { color: #fff; min-height: 38px; }
.chat .inbar textarea::placeholder { color: #757575; }
.drawer { background: #161616; }
/* ЛС: янтарные пузыри, скругление 10 */
.chat.dm .m .bub { background: rgba(255, 193, 7, .87); border-radius: 10px; color: rgba(0, 0, 0, .87); }
.chat.dm .m .bub { margin-left: -16px; }
.chat.dm .m.me .bub { margin-left: 0; margin-right: -16px; }
.chat.dm .dmt { color: rgba(0, 0, 0, .55); }

/* ===== 3.4: как на скрине оригинала ===== */
.chbar .chttl { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding-left: 6px; cursor: pointer; }
.chbar .chttl b { font-weight: 500; font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.chbar .chttl small { font-size: 14px; color: rgba(255, 255, 255, .7); white-space: nowrap; }
.chbar .padbtn { width: 44px; height: 44px; border: 0; background: none; border-radius: 50%; }
.chbar .padbtn svg { width: 28px; height: 28px; fill: rgba(255, 255, 255, .55); }
.chbar .padbtn.cd svg { opacity: .3; }
.chbar .padbtn::after { font-size: 14px; }
/* кнопка «отправить» — белая стрелка без круга, поле ввода прозрачное */
.chat .inrow .send { background: none; width: 44px; }
.chat .inrow .send svg { fill: #fff; width: 28px; height: 28px; }
.chat .inrow textarea { background: transparent; border-radius: 0; padding: 10px 6px 8px 12px; }
.cpbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin: 2px -8px -8px; }
.cpst { background: rgba(255, 255, 255, .1); border-radius: 14px 14px 0 0; padding: 4px 14px 5px; font-size: 13px; min-width: 72px; }
.cpgo { flex: 1; font-size: 11px; color: #9e9e9e; text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cpfav { background: rgba(255, 255, 255, .1); border-radius: 14px 0 0 0; padding: 2px 16px 3px; font-size: 20px; color: #bdbdbd; line-height: 1.2; }
/* кости по центру */
.m.info.dice .bub { border: 0; color: #000; font-size: 16px; }
.m.info.dice .dnm { color: #000; }
.m.info.dice b { font-weight: 600; }
/* последние посетители */
.m.visline { justify-content: center; align-items: center; gap: 8px; padding: 2px 6px; }
.m.visline span { color: #fff; font-size: 14px; text-align: center; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); flex: 1; }
.visav { display: flex; flex-shrink: 0; }
.visav .av { width: 44px; height: 44px; border: 1px solid rgba(255, 255, 255, .47); margin-left: -8px; }
/* мне: весь пузырь жёлтый; личные отметки — тоже */
.m.tome .bub { background: var(--bubT, rgba(255, 193, 7, .87)); }
.m.dmstub .bub { background: rgba(255, 193, 7, .87); }
.m.dmstub .bub { cursor: pointer; font-family: serif; }
.chip.priv.on { background: rgba(255, 193, 7, .25); border-color: #FFC107; color: #FFC107; }

.chbar .padbtn.on { background: rgba(255, 160, 0, .18); }
.chbar .padbtn.on svg { fill: #FFA000; }

/* сердечко — слева рядом со статусом, подальше от кнопки отправки */
.cpbar { justify-content: flex-start; padding-inline-start: 5%; }
.cpfav { border-radius: 14px 14px 0 0; padding: 2px 14px 3px; }
.cpgo { margin-inline-end: clamp(12px, 6%, 60px); }

/* аватарки как в оригинале: отступ 6, текст начинается у края аватарки, имя чуть заходит на неё */
.chat .msgs { padding-left: 6px; padding-right: 6px; }
.m .bub { padding-left: 18px; }
.m.me .bub { padding-left: 10px; padding-right: 18px; }
.m .nm { margin-left: -6px; }
.m.me .nm { margin-left: 0; margin-right: -6px; }
.m.info .bub, .m.info .nm { margin-left: 4px; margin-right: 4px; }
/* ЛС: фон собеседника */
.chat.dm > .bar, .chat.dm > .msgs, .chat.dm > .inbar { position: relative; z-index: 1; }
.chat.dm > .bar { background: rgba(0, 0, 0, .54); }
.chat.dm > .inbar { background: rgba(0, 0, 0, .54); }
.chat .dmbg { top: 56px; }
.chat.dm .msgs { background: transparent; }
.m .av { width: 48px; height: 48px; margin-bottom: -5px; }
.m .col { padding-bottom: 0; }
/* как на скрине оригинала: пузырь заходит под аватарку всего на ~6px */
.m .bub, .chat.dm .m .bub { margin-left: -6px; padding-left: 12px; }
.m.me .bub, .chat.dm .m.me .bub { margin-left: 0; margin-right: -6px; padding-left: 10px; padding-right: 12px; }
.m .nm { margin-left: -2px; }
.m.me .nm { margin-right: -2px; }
.m .col { max-width: calc(100% - 64px); }

/* ===== 3.8: экономика, задания, рамки, анимации ===== */
/* переходы между экранами */
@keyframes scrIn { from { opacity: .82; } to { opacity: 1; } }
@keyframes scrBack { from { opacity: .86; } to { opacity: 1; } }
.screen.enter { animation: scrIn var(--motion-panel) var(--ease-out) both; }
.screen.reenter { animation: scrBack var(--motion-panel) var(--ease-out) both; }
/* всё чуть меньше */
.ib { width: 44px; height: 44px; }
.ib svg { width: 23px; height: 23px; }
.dlist .av { width: 40px; height: 40px; }
.m .av { width: 42px; height: 42px; margin-bottom: -4px; }
.visav .av { width: 36px; height: 36px; }
.chbar .padbtn svg { width: 25px; height: 25px; }
.chbar .chttl b { font-size: 18px; }
.chbar .chttl small { font-size: 13px; }
.bar h1 { font-size: 18px; }
/* рамки */
.av.fr { overflow: visible; position: relative; }
.av.fr::after { content: ''; position: absolute; pointer-events: none; background: center / contain no-repeat; }
.av.f1::after { inset: -6%; background-image: url('img/frames/f1.png'); }
.av.f2::after { inset: -8%; background-image: url('img/frames/f2.png'); }
.av.f3::after { inset: -5%; background-image: url('img/frames/f3.png'); }
.av.f4::after { inset: -9%; background-image: url('img/frames/f4.png'); }
.frgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.frc { position: relative; background: #242424; border: 1.5px solid #333; border-radius: 12px; padding: 14px 6px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.frc.on { border-color: #FFA000; }
.frc b { font-size: 13px; font-weight: 500; color: #eee; }
.frc .frprev { width: 58px; height: 58px; }
.frsale { position: absolute; top: -8px; right: -4px; background: #e53935; color: #fff; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 8px; transform: rotate(6deg); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.frpr { font-size: 13px; color: #FFA000; font-weight: 600; }
.frpr s { color: #888; font-weight: 400; margin-right: 3px; }
.frst { font-size: 12px; color: #9e9e9e; }
.frst.own { color: #FFA000; }
.frc.on .frst { color: #69f0ae; }
/* доска заданий */
.ib .qdot { position: absolute; top: 9px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: #FFA000; box-shadow: 0 0 0 2px var(--bar); }
.ib { position: relative; }
.qhead { padding: 14px 16px 6px; color: #bbb; font-size: 14px; }
.qhead b { display: block; color: #FFA000; margin-top: 6px; font-weight: 500; }
.qlist { padding: 8px 12px 20px; display: flex; flex-direction: column; gap: 10px; }
.qcard { display: flex; align-items: center; gap: 12px; background: #242424; border-radius: 14px; padding: 12px; border: 1.5px solid transparent; }
.qcard.done { border-color: #FFA000; }
.qcard.got { opacity: .6; }
.qi { font-size: 26px; width: 36px; text-align: center; }
.qb { flex: 1; min-width: 0; }
.qb b { font-weight: 500; font-size: 15px; color: #eee; display: block; }
.qbar { height: 6px; background: #333; border-radius: 3px; margin: 8px 0 4px; overflow: hidden; }
.qbar i { display: block; height: 100%; background: linear-gradient(90deg, #FFA000, #FFC107); border-radius: 3px; transition: width .4s; }
.qb span { font-size: 12px; color: #9e9e9e; }
.qr { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.qrw { color: #FFA000; font-weight: 600; white-space: nowrap; }
.qclaim { padding: 6px 12px; font-size: 13px; min-height: 0; }
.qok { font-size: 12px; color: #69f0ae; }
/* кошелёк */
.wcard { margin: 16px 12px 10px; padding: 20px; border-radius: 16px; background: linear-gradient(135deg, #3a2a00, #1e1e1e); border: 1px solid #5a4300; display: flex; flex-direction: column; align-items: center; }
.wcard span { color: #bbb; font-size: 13px; }
.wcard b { font-size: 34px; color: #FFC107; font-weight: 600; margin: 4px 0; }
.wcard small { color: #9e9e9e; }
.wbtns { display: flex; gap: 8px; padding: 0 12px 6px; }
.wbtns .btn { flex: 1; }
.wlog { padding: 0 12px 20px; display: flex; flex-direction: column; gap: 6px; }
.wrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #242424; border-radius: 10px; padding: 9px 12px; }
.wrow b { font-weight: 400; font-size: 14px; color: #ddd; display: block; }
.wrow span { font-size: 12px; color: #888; }
.wrow i { font-style: normal; font-weight: 600; white-space: nowrap; }
.wrow i.pl { color: #69f0ae; } .wrow i.mi { color: #ef9a9a; }

/* цвет пузырей из настроек сообщений (жёлтые «мне», личка, системные — без изменений) */
.chat:not(.dm) .m:not(.info):not(.tome):not(.dmstub):not(.helpim) .bub, .ms .m:not(.info) .bub { background: var(--bubO, rgba(255, 255, 255, .867)); }
.chat:not(.dm) .m.me:not(.info):not(.tome):not(.dmstub):not(.helpim):not(.x) .bub, .ms .m.me:not(.info) .bub { background: var(--bubM, rgba(255, 255, 255, .867)); }

/* длинные слова без пробелов («ааааааа», «хахахаха», ссылки) переносятся в столбик и не ломают чат */
.m .col { min-width: 0; }
.m .bub, .m .nm, .quote, .locb, .roll, .pbox, .ev, .evt, .evh, .mlr, .mld, .wrow b, .dmhead b, .chttl b, .pin, .qb b, .card h3, .card p, .bio, .tagline, .dw b, .drow b, .drow2 b, .tres, .toast, .banner {
  overflow-wrap: anywhere; word-break: normal;
}
.m .bub a { word-break: break-all; }

/* рамки «вязь» — толстые, кольцо начинается у края аватарки */
.av.f5::after { inset: -14%; background-image: url('img/frames/f5.png'); }
.av.f6::after { inset: -14%; background-image: url('img/frames/f6.png'); }
.av.f7::after { inset: -14%; background-image: url('img/frames/f7.png'); }
.av.f8::after { inset: -14%; background-image: url('img/frames/f8.png'); }
.av.f9::after { inset: -14%; background-image: url('img/frames/f9.png'); }
.av.f10::after { inset: -14%; background-image: url('img/frames/f10.png'); }
.av.f11::after { inset: -14%; background-image: url('img/frames/f11.png'); }
.av.f12::after { inset: -14%; background-image: url('img/frames/f12.png'); }
.frsale.new { background: #2e7d32; }

/* ник администратора — тёмно-красный, с лёгкой подсветкой для читаемости на тёмном фоне */
.adm { color: #B00000 !important; text-shadow: 0 0 2px rgba(255, 255, 255, .35), 0 1px 2px rgba(0, 0, 0, .5); font-weight: 600; }
/* цветовой круг */
.wheelbtn { width: 100%; margin-top: 10px; }
.cwheel { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 6px 0 4px; }
.cwwrap { position: relative; width: 240px; height: 240px; touch-action: none; }
.cwwrap canvas { display: block; border-radius: 50%; touch-action: none; }
.cwdot { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.5); pointer-events: none; }
.cwl { display: flex; align-items: center; gap: 10px; width: 100%; color: #bbb; font-size: 14px; }
.cwl input { flex: 1; accent-color: #FFA000; }
.cwrow { display: flex; align-items: center; gap: 12px; width: 100%; }
.cwprev { width: 40px; height: 40px; border-radius: 10px; border: 1px solid #555; flex-shrink: 0; }
.cwhex { flex: 1; color: #eee; font-weight: 500; letter-spacing: 1px; }
.cwok { min-width: 110px; }

/* ===== профиль как в оригинальном Мастер RP (ui_profile / form_profile_data / form_profile_bio) ===== */
.prof { background: #161616; }
.prof .pbg { position: absolute; left: 0; right: 0; top: 56px; bottom: 0; background: #161616 center / cover no-repeat; }
.prof .pbar { position: relative; z-index: 3; background: #161616; }
.prof .ptt { flex: 1; min-width: 0; display: flex; flex-direction: column; padding-left: 6px; }
.prof .ptt b { font-size: 19px; font-weight: 500; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prof .ptt small { font-size: 13px; color: rgba(255, 255, 255, .7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prof .pgrad { position: absolute; left: 0; right: 0; top: 56px; height: 60px; background: linear-gradient(to bottom, rgba(0, 0, 0, .47), rgba(0, 0, 0, 0)); z-index: 1; pointer-events: none; }
.prof .pavz { position: absolute; left: 0; right: 0; top: 116px; min-height: 160px; display: flex; align-items: center; justify-content: center; z-index: 2; }
.prof .pavw { position: relative; }
.prof .pav { width: 110px; height: 110px; border: 2px solid #fff; }
.prof .pst { position: absolute; left: 4px; top: 4px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.prof .avedit { position: absolute; right: -2px; bottom: -2px; }
.prof .pbot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; flex-direction: column; }
.prof .ptags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 6px; }
.prof .pdata { display: flex; align-items: flex-end; gap: 10px; padding: 18px 16px 4px; min-height: 24px; background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .47)); }
.prof .pdata .n { flex: 1; min-width: 0; font-size: 20px; font-weight: 500; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.prof .pdata .k { color: #FF9800; font-size: 18px; white-space: nowrap; }
.prof .pdata .tm { color: #FFC107; font-size: 15px; white-space: nowrap; background: rgba(0, 0, 0, .35); padding: 2px 8px; border-radius: 10px; }
.prof .pbio { position: relative; background: rgba(0, 0, 0, .47); border-top: 1px solid #FF9800; margin-top: 2px; min-height: 120px; padding: 6px 34px 10px 16px; cursor: pointer; }
.prof .pbt { color: #fff; font-size: 15px; line-height: 1.35; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.prof .ptg { display: block; color: #FFC107; font-weight: 500; margin-bottom: 2px; }
.prof .nx { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 30px; color: rgba(255, 255, 255, .8); }
.prof .pbtn { background: rgba(0, 0, 0, .47); min-height: 48px; display: flex; align-items: center; justify-content: center; color: #fff; text-transform: uppercase; font-size: 15px; font-weight: 500; letter-spacing: .5px; border-top: 1px solid rgba(255, 255, 255, .06); cursor: pointer; }
.prof .pbtn:active, .prof .pbio:active { background: rgba(0, 0, 0, .65); }
.pdtabs { margin: 8px 12px; }
.pdbody { padding: 6px 16px 24px; }
.ptg2 { color: #FFC107; font-weight: 500; margin-bottom: 8px; }

/* флуд и цитаты подстраиваются под цвет пузыря */
.m.me .ooc { color: var(--oocM, #546E7A); }
.m.tome .ooc, .m.me.tome .ooc { color: var(--oocT, #37474F); }
.m.tome .quote span { color: #37474F; }
.quote b { color: var(--qnO, #8a5a00); }
.m.me .quote b { color: var(--qnM, #8a5a00); }
.m.tome .quote b { color: var(--qnT, #5d3a00); }
.quote span { color: inherit; opacity: .8; }
.m.tome .quote { background: rgba(0, 0, 0, .08); }
.ms .ooc { color: var(--oocO, #546E7A); }

/* 4.9 */
.ms .m.tome .bub { background: var(--bubT, rgba(255, 193, 7, .87)) !important; }
.ms .m.tome .ooc { color: var(--oocT, #37474F); }
.pbox .chk { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 4px 0 10px; color: inherit; }
.pbox .chk input { width: 18px; height: 18px; }
.hint { font-size: 12px; opacity: .65; margin-top: 4px; }
.mtime { color: var(--oocO, #546E7A); }
.m.me .mtime { color: var(--oocM, #546E7A); }
.m.tome .mtime { color: var(--oocT, #37474F); }
.dmh { padding: 14px 10px 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #9e9e9e; border-top: 1px solid rgba(255,255,255,.08); margin-top: 6px; }
/* 4.9.4: фоны чата и лички без затемнения, как у игроков в оригинале; имена читаются за счёт тени */
.chat .chatbg::after { display: none; }
.chat .m .nm, .chat .typing, .chat .m.visline span { text-shadow: 0 0 3px rgba(0, 0, 0, .9), 0 1px 2px rgba(0, 0, 0, .9); }
.rahead { padding: 16px 20px 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--acc, #FFA000); }
.raic { width: 24px; text-align: center; font-size: 20px; flex: none; }
.sitem.danger { color: #ef5350; }
.rpchip { margin: 2px 16px 6px; display: inline-block; font-size: 13px; color: #FFD54F; }
.pbox .rpchk, .form .rpchk { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 2px 0 12px; }
.form .rpchk input { width: 18px; height: 18px; }
/* долгое нажатие на сообщение открывает наше меню — системное выделение и «Копировать» Android не нужны */
.chat:not(.dm) .m, .chat:not(.dm) .m *, .dgrid, .dgrid *, #send { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.chat .m a.lnk { -webkit-touch-callout: none; }
.edtag { font-size: .72em; opacity: .55; white-space: nowrap; }
.pbox textarea[rows='7'] { min-height: 150px; }
.chat .inrow .infob { width: 40px; height: 46px; flex-shrink: 0; font-size: 22px; background: none; border: 0; padding: 0; line-height: 46px; }
.chat .inrow .infob:active { transform: scale(.9); }

/* Browser layout and motion. */
:root {
  --motion-control: 150ms;
  --motion-panel: 260ms;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.4, 0, .2, 1);
}
html, body { overscroll-behavior-x: none; }
:root { scrollbar-color: #767676 #202020; }
* { scrollbar-width: thin; }
#app { position: absolute; inset: 0; overflow: hidden; }
.btn, .rpbtn, .btn-red { max-width: 100%; overflow-wrap: anywhere; }
.form > .btn { align-self: flex-start; }
.pickimg { flex-wrap: wrap; }
.pickimg .btn { flex: 0 1 auto; }
.aform { width: min(100%, 540px); margin-inline: auto; }
.welcome .mid p { max-width: 46ch; }
.shade { animation: fade var(--motion-panel) var(--ease-out) both; }
.sheet { max-height: 84dvh; overscroll-behavior: contain; animation: sheetEnter var(--motion-panel) var(--ease-out) both; }
.shade.closing { pointer-events: none; animation: sheetFadeOut 200ms var(--ease-in-out) both; }
.shade.closing .sheet { animation: sheetExit 200ms var(--ease-in-out) both; }
@keyframes sheetEnter { from { transform: translateY(22px); opacity: .7; } to { transform: none; opacity: 1; } }
@keyframes sheetFadeOut { from { opacity: var(--shade-close-opacity, 1); } to { opacity: 0; } }
@keyframes sheetExit {
  from { transform: var(--sheet-close-transform, none); opacity: var(--sheet-close-opacity, 1); }
  to { transform: translateY(22px); opacity: 0; }
}
.drawer { transition: transform var(--motion-panel) var(--ease-in-out); }
.dscrim { transition: opacity var(--motion-panel) var(--ease-in-out); }
.chat.ddrag .drawer, .chat.ddrag .dscrim { transition: none; }
.login .panel, .offline .panel { animation: sheetEnter var(--motion-panel) var(--ease-out) both; }
:is(.btn, .btn-red, .rpbtn, .ib, .card, .sheet .it, .cpst, .cpfav) {
  transition: background-color var(--motion-control) ease, filter var(--motion-control) ease;
}
:is(button, a):focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }

.chbar .chttl { align-items: stretch; text-align: left; }
.chbar .chttl small { overflow: hidden; text-overflow: ellipsis; }
.chbar .members-toggle[aria-expanded="true"] { background: rgba(255, 160, 0, .18); }
.members-toggle span { display: none; }
.chat:not(.dm) > :is(.msgs, .drawer, .dscrim) { touch-action: pan-y pinch-zoom; }
.chat > .msgs { min-height: 0; min-width: 0; overscroll-behavior-y: contain; }
.chat .dscroll { min-height: 0; overscroll-behavior: contain; }
.chat .inrow textarea { min-width: 0; }
.chat .bub { overflow-wrap: anywhere; }
.login .panel { min-height: 0; overflow-y: auto; }
.login .panel > * { flex-shrink: 0; }
.session-retry .btn-red { margin-top: 24px; }

.chat.members-wide {
  --members-width: clamp(240px, 24vw, 320px);
  display: grid;
  grid-template-columns: var(--members-width) minmax(0, 1fr);
  grid-template-rows: 56px auto minmax(0, 1fr) auto;
  transition: grid-template-columns var(--motion-panel) var(--ease-in-out);
}
.chat.members-wide.members-hidden { grid-template-columns: 0px minmax(0, 1fr); }
.members-wide > .chbar { grid-area: 1 / 1 / 2 / -1; }
.members-wide > .pin { grid-area: 2 / 2; }
.members-wide > .msgs { grid-area: 3 / 2; }
.members-wide > .inbar { grid-area: 4 / 2; }
.members-wide > #drawer {
  grid-area: 2 / 1 / 5 / 2;
  position: relative;
  inset: auto;
  width: auto;
  max-width: none;
  min-width: 0;
  min-height: 0;
  transform: none;
  transition: none;
  z-index: 2;
  box-shadow: none;
  border-right: 1px solid rgba(255, 255, 255, .12);
  overflow: hidden;
}
.members-wide > #drawer > .dscroll { min-width: calc(var(--members-width) - 1px); }
.members-wide > #drawer > .leave { min-width: calc(var(--members-width) - 1px - 2 * var(--leave-gutter)); }
.members-wide.members-hidden > #drawer { border-right-color: transparent; }
.members-wide > .jumpnew {
  grid-area: 3 / 2;
  position: relative;
  inset: auto;
  align-self: end;
  justify-self: end;
  margin: 0 14px 10px;
}

@media (min-width: 640px) {
  .screen { --screen-gutter: clamp(20px, 4vw, 64px); }
  .screen:not(.chat) > .scroll { scrollbar-gutter: stable both-edges; }
  .screen > .scroll > :is(.form, .slist, .plist, .pdbody, .tview, .dlg, .evl, .mlog, .ms) {
    width: min(100%, 720px);
    margin-inline: auto;
  }
  .screen > .scroll > .rooms { padding: 18px var(--screen-gutter) 96px; gap: 10px; }
  .screen:has(> .scroll > .rooms) > .fab { right: var(--screen-gutter); }
  #rtabs { padding-inline: var(--screen-gutter); gap: 8px; }
  #rtabs > div { flex: 0 0 auto; min-width: 96px; padding-inline: 20px; }
  .rooms > .card { height: auto; min-height: 112px; }
  .rooms .card .pic { width: clamp(148px, 32%, 240px); }
  .rooms .card .txt { padding: 14px 18px; }
  .rooms .card .txt p { flex: 0 1 auto; }
  .screen > .scroll > .form { padding-inline: 24px; }
  .screen > .scroll > .slist { padding-block: 8px 24px; }
  .screen:not(.chat) > .bar { padding-inline: var(--screen-gutter); }
  .prof :is(.ptags, .pdata, .pbio, .pbtn) { padding-inline: max(var(--screen-gutter), calc((100% - 840px) / 2)); }
  .prof .pbio { padding-right: max(calc(var(--screen-gutter) + 24px), calc((100% - 792px) / 2)); }
  .prof .nx { right: max(var(--screen-gutter), calc((100% - 840px) / 2)); }
  .screen.auth > .rpbtn { right: max(20px, calc((100% - 510px) / 2)); bottom: 20px; border-radius: 34px; }
  .login .panel, .offline .panel { width: min(100%, 520px); align-self: center; border-radius: 12px 12px 0 0; }
  .sheet { width: min(calc(100% - 32px), 560px); margin-inline: auto; }
  .pe { width: min(100%, 900px); margin-inline: auto; }
}

@media (min-width: 900px) {
  .chbar .members-toggle { width: auto; min-width: 44px; padding: 0 12px; gap: 6px; border-radius: 22px; }
  .members-toggle span { display: inline; font-size: 14px; }
  .chat:not(.dm) > .msgs { padding-inline: clamp(12px, 2vw, 32px); }
  .chat:not(.dm) .m { width: min(100%, 960px); margin-inline: auto; }
}

@media (hover: hover) {
  :is(.btn, .btn-red, .rpbtn, .ib):not(:disabled):hover { filter: brightness(1.15); }
  .rooms > .card:hover, .sheet .it:hover { background-color: #333; }
}

@media (pointer: fine) {
  .chat:not(.dm) .m .bub, .chat:not(.dm) .m .bub * { -webkit-user-select: text; user-select: text; }
}

@media (max-width: 420px) {
  .chbar .chttl { padding-left: 2px; }
  .chbar .chttl b { font-size: 16px; }
  .chbar .ib, .chbar .padbtn { width: 40px; }
  .welcome .foot { gap: 12px; padding-inline: 12px; flex-wrap: wrap; }
  .form { padding-inline: 14px; }
  .pickimg { gap: 8px; }
  .pickimg .btn { padding-inline: 10px; }
  .rpbtn { gap: 8px; font-size: 16px; letter-spacing: 1px; }
  .rooms .card .cnt { gap: 3px; left: 6px; font-size: 12px; }
  .rooms .card .cnt .s2 { margin-left: 2px; }
  .prof .pdata { flex-wrap: wrap; gap: 6px; }
  .prof .pdata .n { flex-basis: 100%; }
}

@media (max-height: 560px) {
  .welcome .title { padding-block: 10px; }
  .welcome .logo { width: 58px; margin: 8px 0 16px; }
  .welcome .foot { padding-bottom: 12px; }
  .login .panel { max-height: 78%; }
  .login .dimmed { min-height: 0; overflow: hidden; }
  .screen.prof { overflow-y: auto; }
  .prof .pavz { position: relative; inset: auto; min-height: 116px; flex-shrink: 0; }
  .prof .pav { width: 86px; height: 86px; }
  .prof .pbot { position: relative; inset: auto; margin-top: auto; flex-shrink: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
.pdedit { display: block; margin: 18px auto 8px; }
/* с рамкой белая обводка аватарки не нужна */
.av.fr { border: 0 !important; }
.fmthelp { margin: 14px 12px 20px; padding: 12px 14px; background: rgba(255,255,255,.06); border-radius: 12px; font-size: 14px; line-height: 1.6; color: #ddd; }
.fmthelp small { color: #9e9e9e; }
.bub code, .fmthelp code { font-family: monospace; background: rgba(0,0,0,.08); border-radius: 4px; padding: 0 3px; }
/* 5.4: новые рамки */
.av.w1::after, .av.w2::after, .av.w3::after, .av.w4::after { inset: -28%; }
.av.w1::after { background-image: url('img/frames/w1.png'); } .av.w2::after { background-image: url('img/frames/w2.png'); }
.av.w3::after { background-image: url('img/frames/w3.png'); } .av.w4::after { background-image: url('img/frames/w4.png'); }
.av.c1::after, .av.c2::after, .av.c3::after, .av.c4::after, .av.c5::after, .av.c6::after, .av.c7::after, .av.c8::after, .av.c9::after { inset: -12.5%; }
.av.c1::after { background-image: url('img/frames/c1.png'); }
.av.c2::after { background-image: url('img/frames/c2.png'); }
.av.c3::after { background-image: url('img/frames/c3.png'); }
.av.c4::after { background-image: url('img/frames/c4.png'); }
.av.c5::after { background-image: url('img/frames/c5.png'); }
.av.c6::after { background-image: url('img/frames/c6.png'); }
.av.c7::after { background-image: url('img/frames/c7.png'); }
.av.c8::after { background-image: url('img/frames/c8.png'); }
.av.c9::after { background-image: url('img/frames/c9.png'); }
.av.bday::after { inset: -41%; background-image: url('img/frames/bday.png'); }
.frset { margin: 18px 4px 8px; font-weight: 700; font-size: 15px; color: #FFD54F; }
.frsale.cheap { background: #2E7D32; } .frsale.col { background: #6A1B9A; }
