/* FunFernus Platform V6 — final alignment and responsive layer */
:root{
  --bg-primary:#090d0a;--bg-secondary:#0d120f;--surface:#121813;--surface-hover:#172019;
  --border:rgba(255,255,255,.09);--text-primary:#f6f8f5;--text-secondary:#97a099;
  --accent:#f5a33b;--success:#8dce55;--warning:#ffbd5a;--danger:#ff7772;
  --radius-sm:10px;--radius-md:14px;--radius-lg:20px;--radius-xl:26px;
  --space-xs:6px;--space-sm:10px;--space-md:14px;--space-lg:20px;--space-xl:28px;
}
html,body{max-width:100%;overflow-x:hidden}.platform-body{background:linear-gradient(180deg,#0b0f0c 0%,#090c0a 100%)!important}.platform-bg{background:linear-gradient(180deg,rgba(245,163,59,.035),transparent 34%,rgba(91,143,86,.025) 80%,transparent)!important}.app-content{max-width:1500px}.p-card{box-shadow:none!important}.p-btn{font-weight:750}.p-btn:disabled{opacity:.62;cursor:not-allowed}.p-btn.admin-access{background:linear-gradient(135deg,rgba(255,79,216,.18),rgba(123,97,255,.18));border-color:rgba(255,79,216,.35);color:#ffd7f5}.muted-copy{color:var(--text-secondary);line-height:1.55}.empty-state{min-height:240px;border:1px dashed rgba(255,255,255,.10);border-radius:var(--radius-lg);background:rgba(9,13,10,.25)}

/* Profile — everything below the banner except the avatar overlap. */
.profile-v6{max-width:1180px;margin:0 auto}.profile-cover-v6{width:100%;aspect-ratio:1920/620;max-height:330px;min-height:220px;border:1px solid var(--border);border-radius:var(--radius-xl);overflow:hidden;background:#101511}.profile-cover-v6 img{width:100%;height:100%;display:block;object-fit:cover;object-position:center}.profile-summary-v6{position:relative;display:grid;grid-template-columns:126px minmax(0,1fr) auto;gap:18px;align-items:end;margin-top:-54px;padding:0 24px}.profile-avatar-v6{width:126px;height:126px;padding:5px;border-radius:29px;background:#0b100d;border:1px solid rgba(255,255,255,.14)}.profile-avatar-v6 img{width:100%;height:100%;display:block;object-fit:cover;border-radius:23px}.profile-identity-v6{min-width:0;padding-top:62px}.profile-name-row-v6{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.profile-name-row-v6 h1{margin:0;font-size:clamp(28px,3.3vw,39px);line-height:1;letter-spacing:-.04em}.profile-status-v6{margin:8px 0 0;color:var(--text-secondary)}.profile-actions-v6{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding-bottom:4px;flex-wrap:wrap}.profile-counters-v6{display:flex;align-items:center;gap:3px;margin-top:12px}.profile-counters-v6 a{min-width:72px;padding:6px 9px;border-radius:11px;text-align:center;color:inherit;text-decoration:none}.profile-counters-v6 a:hover{background:rgba(255,255,255,.045)}.profile-counters-v6 strong,.profile-counters-v6 span{display:block}.profile-counters-v6 strong{font-size:15px}.profile-counters-v6 span{margin-top:2px;color:var(--text-secondary);font-size:9px}.profile-body-v6{display:grid;grid-template-columns:minmax(0,760px) 320px;gap:18px;margin-top:22px;align-items:start}.profile-main-v6,.profile-side-v6{min-width:0}.profile-side-v6{display:grid;gap:14px;position:sticky;top:92px}.profile-posts-v6{display:grid;gap:14px;margin-top:14px}

/* Composer and posts */
.compact-composer{padding:16px!important}.compact-composer textarea{min-height:82px!important;font-size:14px!important}.composer-visibility-label{display:none!important}.post-card{overflow:hidden;margin-bottom:14px;padding:0!important}.post-head{padding:15px 16px 10px}.post-head img{width:44px!important;height:44px!important;object-fit:cover!important;border-radius:13px!important}.post-body{padding:4px 16px 15px;font-size:14px;line-height:1.55}.post-media{margin:0 12px 10px;overflow:hidden;border-radius:15px}.post-media img{display:block;max-width:100%;width:100%;height:auto;max-height:720px;object-fit:cover}.post-actions{padding:9px 12px 12px;border-top:1px solid rgba(255,255,255,.06);gap:5px}.post-action{min-height:38px;border-radius:10px!important}

/* Feed — VK-like centered stream and quiet right menu. */
.feed-page-v6{max-width:1120px;margin:auto}.feed-heading-v6{width:min(760px,100%);margin-bottom:18px}.feed-heading-v6 h1{margin:0;font-size:31px}.feed-heading-v6 p{color:var(--text-secondary);margin:7px 0 0}.feed-layout-v5{grid-template-columns:minmax(0,760px) 270px!important;gap:20px!important;justify-content:center!important}.feed-main-v5{display:grid;gap:0}.feed-side-card-v5{padding:8px!important}.feed-side-card-v5 .feed-filter-label{padding:8px 11px 4px;color:#737d75;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.feed-side-card-v5 a{font-size:12px;text-decoration:none}.feed-side-card-v5 a.active{background:rgba(245,163,59,.10)!important;color:#ffc56b!important}.feed-side-card-v5 hr{margin:7px 6px!important}

/* Messenger — fixed media sizing and real 2-column app. */
.messenger-v5-page{max-width:1320px;margin:auto;height:calc(100dvh - var(--app-top) - 58px)!important;min-height:560px!important}.messenger-shell-v5{grid-template-columns:310px minmax(0,1fr)!important}.messenger-actions-v5 .icon-square-v5{display:grid;text-decoration:none}.conversation-avatar-v5,.conversation-item-v5>img{width:48px!important;height:48px!important;min-width:48px!important;max-width:48px!important;max-height:48px!important;object-fit:cover!important;border-radius:14px!important;display:block!important;flex-shrink:0!important}.conversation-meta-v5 b{min-width:20px;height:20px;padding:0 5px;display:grid;place-items:center;border-radius:10px;background:var(--accent);color:#161009;font-size:9px}.conversation-section-v5{padding:14px 10px 6px;color:#747d76;font-size:9px;text-transform:uppercase;letter-spacing:.08em;font-weight:800}.chat-header-v5{flex:none}.chat-head-person-v5{min-width:0}.chat-head-person-v5>img{width:42px!important;height:42px!important;min-width:42px!important;max-width:42px!important;max-height:42px!important;object-fit:cover!important;border-radius:12px!important;flex-shrink:0!important}.chat-head-person-v5 strong,.chat-head-person-v5 span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-head-person-v5 span{font-size:10px;color:var(--text-secondary);margin-top:2px}.chat-messages-v5{background:rgba(6,10,7,.30)}.message-line-v5{display:flex;width:100%;margin:3px 0}.message-line-v5.mine{justify-content:flex-end}.message-line-v5.theirs{justify-content:flex-start}.bubble-v5{width:fit-content;max-width:72%!important;min-width:68px;padding:9px 11px!important;border-radius:15px!important;overflow-wrap:anywhere}.message-line-v5.mine .bubble-v5{background:linear-gradient(135deg,rgba(245,163,59,.22),rgba(245,163,59,.11));border-color:rgba(245,163,59,.30)}.message-line-v5.theirs .bubble-v5{background:#151c17}.message-body-v5{color:#eef2ee!important;font-size:13px!important;line-height:1.45!important}.chat-compose-v5{flex:none}.chat-compose-v5 textarea{width:100%!important}.chat-compose-v5 .attach svg,.chat-compose-v5 .send svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.mobile-chat-back{width:42px;height:42px;place-items:center;border-radius:11px;border:1px solid var(--border);color:white;text-decoration:none}.messenger-empty-mini{padding:24px 12px;text-align:center;color:var(--text-secondary)}.messenger-empty-mini strong,.messenger-empty-mini span{display:block}.messenger-empty-mini strong{color:#e9ede9}.messenger-empty-mini span{font-size:10px;margin-top:4px}

/* Stats */
.stats-title-row{margin-bottom:14px}.stats-chart-card{position:relative;padding:16px!important}.server-mini-status-v5{width:max-content!important;display:flex!important;gap:0!important;margin:0 0 12px!important;border:0!important;background:linear-gradient(135deg,#e99120,#ffb64e)!important;color:#171008!important;border-radius:13px!important;padding:4px!important;box-shadow:0 10px 30px rgba(245,163,59,.12)}.server-mini-status-v5>div{padding:7px 12px!important;display:flex!important;align-items:center!important;gap:7px!important}.server-mini-status-v5 span{color:rgba(20,15,8,.68)!important;font-size:9px!important}.server-mini-status-v5 strong{color:#171008!important;font-size:12px!important}.server-mini-status-v5 i{background:rgba(15,11,7,.18)!important}.stats-modern-filter{align-items:center!important}.stats-search,.stats-sort-button{height:42px!important}.modern-player-grid{grid-template-columns:repeat(auto-fill,minmax(235px,1fr))!important;gap:12px!important}.modern-player-card{position:relative!important;min-height:174px!important;overflow:hidden!important;padding:0!important;border-radius:18px!important}.player-card-bg{position:absolute!important;inset:0!important;background-size:cover!important;background-position:center!important;opacity:.82!important}.player-card-overlay{position:absolute!important;inset:0!important;background:linear-gradient(180deg,rgba(5,8,6,.16),rgba(5,8,6,.92))!important}.player-card-content{position:relative!important;z-index:2!important;min-height:174px!important;height:100%!important;padding:14px!important;display:flex!important;align-items:flex-end!important;gap:10px!important}.player-head{width:58px!important;height:58px!important;min-width:58px!important;object-fit:cover!important;border-radius:13px!important;image-rendering:auto}.player-ident{min-width:0}.player-ident>strong{display:flex!important;align-items:center!important;gap:5px!important;font-size:13px!important}.player-playtime{display:block!important;margin-top:6px!important;font-size:11px!important;font-weight:800!important;color:#fff!important}.player-role-stack{margin-top:5px!important}

/* Bank */
.bank-empty-v5{min-height:340px!important;border-style:dashed!important;background:rgba(11,15,12,.40)!important}.bank-empty-icon-v5{cursor:pointer}.bank-confirm-card{width:min(440px,100%)!important}.confirm-bank-icon{margin:auto}.confirm-actions{display:flex;gap:8px;justify-content:flex-end}.business-add-card{border-radius:18px!important;background:rgba(255,255,255,.015)!important}.business-add-card:hover:not(:disabled){background:rgba(245,163,59,.05)!important}

/* Settings / collection */
.collection-v6{display:grid;gap:12px}.collection-tabs-v6,.cosmetic-tabs-v6,.admin-section-tabs-v6{display:flex;gap:6px;overflow-x:auto;padding:5px;border:1px solid var(--border);border-radius:14px;background:rgba(12,17,14,.72)}.collection-tabs-v6 button,.cosmetic-tabs-v6 a,.admin-section-tabs-v6 a{min-height:38px;padding:0 13px;border:0;border-radius:10px;background:transparent;color:var(--text-secondary);display:inline-flex;align-items:center;white-space:nowrap;text-decoration:none;cursor:pointer;font:inherit;font-size:11px;font-weight:750}.collection-tabs-v6 button.active,.cosmetic-tabs-v6 a.active,.admin-section-tabs-v6 a.active{background:rgba(245,163,59,.12);color:#ffd08a}.collection-grid-v6{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.collection-item-v6{display:grid;grid-template-columns:76px minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px;border:1px solid var(--border);border-radius:14px;background:rgba(255,255,255,.02)}.cosmetic-preview-v6{width:76px;height:48px;border-radius:10px;overflow:hidden;background:#0d120f}.cosmetic-preview-v6.avatar{width:54px;height:54px;border-radius:14px}.cosmetic-preview-v6 img{width:100%;height:100%;object-fit:cover}.collection-item-v6 strong,.collection-item-v6 span{display:block}.collection-item-v6 span{font-size:9px;color:var(--text-secondary);margin-top:3px}.collection-empty-v6{grid-column:1/-1;padding:24px;text-align:center;color:var(--text-secondary)}

/* Cosmetics shop */
.cosmetics-page-v6{max-width:1220px;margin:auto}.cosmetic-balance-v6{min-width:150px;padding:10px 14px;border:1px solid var(--border);border-radius:14px;background:rgba(245,163,59,.06)}.cosmetic-balance-v6 span,.cosmetic-balance-v6 strong{display:block}.cosmetic-balance-v6 span{font-size:9px;color:var(--text-secondary)}.cosmetic-balance-v6 strong{margin-top:3px}.cosmetic-tabs-v6{width:max-content;max-width:100%;margin-bottom:15px}.cosmetic-grid-v6{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.cosmetic-card-v6{padding:11px;display:grid;gap:10px;align-content:start}.cosmetic-card-media-v6{aspect-ratio:1920/780;overflow:hidden;border-radius:13px;background:#0d120f}.avatar-card .cosmetic-card-media-v6{aspect-ratio:1/1;max-width:180px}.cosmetic-card-media-v6 img{width:100%;height:100%;display:block;object-fit:cover}.cosmetic-card-copy-v6{display:flex;justify-content:space-between;gap:10px;align-items:start}.cosmetic-card-copy-v6 strong,.cosmetic-card-copy-v6 span{display:block}.cosmetic-card-copy-v6 span{font-size:9px;color:var(--text-secondary);margin-top:4px}.cosmetic-card-copy-v6 b{font-size:11px;color:#ffc56b;white-space:nowrap}.cosmetic-card-v6>p{margin:0;color:var(--text-secondary);font-size:10px;line-height:1.45}

/* Admin customization */
.admin-create-v6{padding:18px;margin-bottom:14px}.admin-cosmetic-grid-v6{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:11px}.admin-cosmetic-card-v6{padding:10px;display:grid;gap:9px}.admin-cosmetic-media-v6{aspect-ratio:1920/780;overflow:hidden;border-radius:12px}.admin-cosmetic-media-v6.avatar{width:100px;aspect-ratio:1}.admin-cosmetic-media-v6 img{width:100%;height:100%;object-fit:cover}.admin-cosmetic-card-v6 strong,.admin-cosmetic-card-v6 span,.admin-cosmetic-card-v6 b{display:block}.admin-cosmetic-card-v6 span{font-size:9px;color:var(--text-secondary);margin-top:3px}.admin-cosmetic-card-v6 b{font-size:11px;color:#ffc56b;margin-top:5px}.admin-upload-preview-v6:empty{display:none}.admin-upload-preview-v6 img{width:min(100%,420px);max-height:220px;object-fit:cover;border:1px solid var(--border);border-radius:14px}.bundle-selector-v6{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-height:360px;overflow:auto}.bundle-selector-v6 label{position:relative;display:grid;grid-template-columns:64px 1fr;gap:8px;align-items:center;padding:8px;border:1px solid var(--border);border-radius:12px;background:rgba(255,255,255,.02);cursor:pointer}.bundle-selector-v6 label:has(input:checked){border-color:rgba(245,163,59,.45);background:rgba(245,163,59,.07)}.bundle-selector-v6 input{position:absolute!important;right:7px!important;top:7px!important;opacity:1!important;pointer-events:auto!important}.bundle-selector-v6 img{width:64px;height:45px;object-fit:cover;border-radius:9px}.bundle-selector-v6 strong,.bundle-selector-v6 small{display:block}.bundle-selector-v6 small{color:var(--text-secondary);font-size:9px;margin-top:3px}

/* Never show native file buttons. */
input[type=file]{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;opacity:0!important}.file-picker-v5 span,.icon-upload-line{cursor:pointer}.p-field input,.p-field textarea,.p-field select,.stats-search{font-family:inherit}

@media(max-width:1050px){
 .profile-body-v6{grid-template-columns:1fr}.profile-side-v6{position:static;grid-template-columns:repeat(2,minmax(0,1fr))}.feed-layout-v5{grid-template-columns:minmax(0,760px)!important}.feed-side-v5{grid-row:1;position:static!important}.feed-side-card-v5{display:flex!important;overflow-x:auto!important}.feed-side-card-v5 hr,.feed-side-card-v5 .feed-filter-label{display:none}.feed-side-card-v5 a{width:auto!important;flex:0 0 auto}.cosmetic-grid-v6{grid-template-columns:repeat(2,minmax(0,1fr))}.bundle-selector-v6{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
 .app-content{padding-left:12px!important;padding-right:12px!important;overflow-x:hidden}.profile-cover-v6{aspect-ratio:1920/780;min-height:150px;max-height:none;border-radius:18px}.profile-summary-v6{grid-template-columns:88px minmax(0,1fr);gap:11px;padding:0 10px;margin-top:-37px;align-items:start}.profile-avatar-v6{width:88px;height:88px;padding:4px;border-radius:22px}.profile-avatar-v6 img{border-radius:17px}.profile-identity-v6{padding-top:42px}.profile-name-row-v6 h1{font-size:24px}.profile-actions-v6{grid-column:1/-1;justify-content:flex-start;padding:3px 0 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.profile-actions-v6 .p-btn{width:100%;min-width:0}.profile-actions-v6 .p-btn:last-child:nth-child(3){grid-column:1/-1}.profile-counters-v6{gap:0;margin-top:9px}.profile-counters-v6 a{min-width:0;padding:5px 7px}.profile-body-v6{margin-top:16px}.profile-side-v6{grid-template-columns:1fr}.profile-mini-card{padding:15px}
 .feed-heading-v6{margin-bottom:12px}.feed-heading-v6 h1{font-size:27px}.feed-layout-v5{display:flex!important;flex-direction:column!important}.feed-side-v5{order:-1;margin:0!important;width:100%}.feed-side-card-v5{border-radius:13px!important;padding:5px!important}.feed-main-v5{width:100%}.post-head{padding:12px}.post-body{padding:4px 12px 12px}.post-media{margin:0 8px 8px}.post-actions{padding:8px}
 .messenger-v5-page{height:calc(100dvh - var(--app-top) - 20px)!important;min-height:0!important}.messenger-page-head{height:44px;margin-bottom:7px}.messenger-shell-v5{display:block!important;height:calc(100% - 51px)!important;border-radius:16px!important}.conversation-column-v5,.chat-column-v5{height:100%!important}.messenger-shell-v5.has-chat .conversation-column-v5{display:none!important}.messenger-shell-v5:not(.has-chat) .chat-column-v5{display:none!important}.chat-head-person-v5>img{width:38px!important;height:38px!important;min-width:38px!important}.mobile-chat-back{display:grid!important}.bubble-v5{max-width:84%!important}.conversation-avatar-v5,.conversation-item-v5>img{width:46px!important;height:46px!important;min-width:46px!important}.chat-compose-v5{padding-bottom:calc(8px + env(safe-area-inset-bottom))!important}
 .modern-player-grid{grid-template-columns:1fr 1fr!important}.modern-player-card,.player-card-content{min-height:155px!important}.player-card-content{padding:11px!important}.player-head{width:50px!important;height:50px!important;min-width:50px!important}.stats-modern-filter{display:flex!important;flex-wrap:wrap!important}.stats-search{width:100%!important}.stats-period-tabs{max-width:100%;overflow-x:auto}.stats-sort-wrap{width:100%}.stats-sort-button{width:100%}.server-mini-status-v5{max-width:100%!important}
 .bank-empty-v5{min-height:300px!important;padding:24px 16px!important}.confirm-actions{display:grid;grid-template-columns:1fr 1fr}.confirm-actions .p-btn{width:100%}
 .settings-profile-grid{display:flex!important;flex-direction:column}.profile-preview-column{width:100%;order:-1}.profile-preview-card{max-width:none!important}.media-setting-row,.banner-setting-row{grid-template-columns:1fr!important}.collection-grid-v6{grid-template-columns:1fr}.collection-item-v6{grid-template-columns:64px minmax(0,1fr) auto}.cosmetic-grid-v6{grid-template-columns:1fr 1fr}.cosmetic-card-v6{padding:9px}.cosmetic-card-copy-v6{display:grid}.cosmetic-card-copy-v6 b{margin-top:4px}.bundle-selector-v6{grid-template-columns:1fr}.admin-cosmetic-grid-v6{grid-template-columns:1fr}
 .p-modal-card{overscroll-behavior:contain}.admin-create-v6{padding:14px}
}
@media(max-width:430px){
 .app-content{padding-left:9px!important;padding-right:9px!important}.profile-cover-v6{min-height:132px}.profile-summary-v6{grid-template-columns:78px minmax(0,1fr);margin-top:-31px}.profile-avatar-v6{width:78px;height:78px}.profile-identity-v6{padding-top:35px}.profile-name-row-v6 h1{font-size:21px}.profile-actions-v6{grid-template-columns:1fr}.profile-actions-v6 .p-btn:last-child:nth-child(3){grid-column:auto}.modern-player-grid{grid-template-columns:1fr!important}.cosmetic-grid-v6{grid-template-columns:1fr}.cosmetic-card-media-v6{max-height:180px}.collection-item-v6{grid-template-columns:58px minmax(0,1fr)}.collection-item-v6 .p-btn{grid-column:1/-1;width:100%}.ff-confirm-actions,.confirm-actions{grid-template-columns:1fr!important}.ff-confirm-actions .p-btn,.confirm-actions .p-btn{width:100%}.server-mini-status-v5{width:100%!important;justify-content:space-between!important}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

/* V6 admin edit controls */
.admin-card-actions-v6{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.admin-edit-modal-v6{width:min(760px,calc(100vw - 24px))!important;max-height:min(88dvh,820px)!important;overflow:auto!important}.admin-edit-modal-v6 .p-modal-body{overflow:visible!important}.admin-edit-modal-v6 .bundle-selector-v6{max-height:310px}.admin-cosmetic-card-v6 .p-btn{min-height:38px}
@media(max-width:560px){.admin-card-actions-v6{display:grid;grid-template-columns:1fr 1fr}.admin-card-actions-v6 .p-btn{width:100%}.admin-edit-modal-v6{width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px)!important}}
