/* Space of Steresia Reborn 0.2.5 : ergonomie, avatars encadrables, tchat et statistiques. */
/* Portrait du commandant : conserver 3:4, afficher le cadre et non un cercle. */
body.sos-b .rb-avatar{width:63px!important;height:84px!important;aspect-ratio:3/4!important;border-radius:9px!important;overflow:visible!important;border:0!important;background:transparent!important;display:inline-flex;align-items:center;justify-content:center}
body.sos-b .rb-mavatar{width:57px!important;height:76px!important;aspect-ratio:3/4!important;border-radius:8px!important;overflow:visible!important;border:0!important;display:inline-flex;align-items:center;justify-content:center}
body.sos-b .rb-avatar-inner{width:100%!important;height:100%!important;aspect-ratio:3/4!important;display:inline-flex!important;position:relative;overflow:visible;flex:none}
body.sos-b .rb-avatar .sos60-avatar>img:not(.sos60-frame-art),body.sos-b .rb-mavatar .sos60-avatar>img:not(.sos60-frame-art){position:absolute!important;inset:6%!important;width:88%!important;height:88%!important;object-fit:cover!important;object-position:center top!important;border-radius:6px!important}
body.sos-b .rb-avatar .sos60-frame-art,body.sos-b .rb-mavatar .sos60-frame-art{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:fill!important;z-index:2;pointer-events:none}
body.sos-b .rb-avatar .sos60-placeholder,body.sos-b .rb-mavatar .sos60-placeholder{inset:6%;font-size:24px;border-radius:6px}
body.sos-b .rb-avatar .sos60-frame-fallback,body.sos-b .rb-mavatar .sos60-frame-fallback{border-width:3px;border-radius:8px}
body.sos-b .rb-mhead{align-items:center}
/* Chat : panneau toujours au-dessus des feuilles, overlays et navigation. */
body.sos-b #chatPanel{z-index:120!important;position:fixed!important;inset:0!important;display:flex!important;flex-direction:column!important;box-sizing:border-box!important;width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)!important;border:0!important;border-radius:0!important;overflow:hidden!important;background:#0c1427!important;box-shadow:0 16px 48px rgba(0,0,0,.5);color:#e7efff!important;--panel2:#1b2944;--mut:#a9bdd7;--line:#30405f;--ink:#e7efff}
body.sos-b #chatPanel[hidden]{display:none!important}
body.sos-b #chatPanel .chat-list{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overscroll-behavior:contain}
body.sos-b #chatPanel .chat-tabs{flex:none;scrollbar-width:thin}
body.sos-b #chatPanel .chat-tabs button{font-size:12px;padding:0 9px}
body.sos-b #chatPanel .chat-close{flex:none;color:#fff;min-width:40px;min-height:40px}
body.sos-b #chatPanel .chat-compose{flex:0 0 auto;padding-bottom:max(10px,env(safe-area-inset-bottom))}
body.sos-b #chatFab{z-index:52!important}
body.sos-b.chat-open #chatFab,body.sos-b #chatFab[hidden]{display:none!important}
@media(min-width:900px){body.sos-b #chatPanel{inset:auto 20px 20px auto!important;width:min(460px,calc(100vw - 40px))!important;max-width:min(460px,calc(100vw - 40px))!important;height:min(690px,calc(100dvh - 40px))!important;max-height:calc(100dvh - 40px)!important;padding:0!important;border:1px solid #3b5377!important;border-radius:18px!important}}
/* Deux espaces explicitement distincts pour les signalements et le carnet. */
.chat-feedback-switch{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:6px 0}
.chat-feedback-switch button{background:#1a2840;border:1px solid #344b69;color:#bcd4e9;border-radius:9px;min-height:38px;font:700 12px system-ui,sans-serif;cursor:pointer}
.chat-feedback-switch button.on{background:#274560;border-color:#69c9e0;color:#fff}
.chat-feedback-hint{font-size:12px;line-height:1.5;color:#bbcae0;margin:8px 0 12px}
.chat-feedback-form{display:grid;gap:9px;padding:12px;background:#121f37;border:1px solid #344966;border-radius:13px}
.chat-feedback-form label{display:grid;gap:5px;color:#d5e4fa;font-size:12px;font-weight:700}
.chat-feedback-form input,.chat-feedback-form textarea{width:100%;box-sizing:border-box;padding:10px;border:1px solid #425b7b;border-radius:8px;background:#0b1529;color:#f3f6ff;font:14px/1.4 system-ui,sans-serif}
.chat-feedback-form textarea{min-height:92px;resize:vertical;font:14px/1.4 system-ui,sans-serif}
.chat-feedback-form .btn{justify-self:start;min-height:39px}
.chat-feedback-history{font-size:14px;margin:17px 4px 8px;color:#fff}
.chat-feedback-item{border:1px solid #334a68;background:#13213a;border-radius:11px;padding:11px;margin:8px 0;overflow-wrap:anywhere}
.chat-feedback-item p{margin:8px 0;color:#e5edfc;font-size:13px;white-space:pre-wrap;line-height:1.45}
.chat-feedback-row,.chat-feedback-foot{display:flex;align-items:center;justify-content:space-between;gap:10px}
.chat-feedback-row b{font-size:14px}
.chat-feedback-status{background:#264059;padding:3px 6px;border-radius:6px;color:#b9e8ff;white-space:nowrap}
.chat-feedback-admin{border-left:3px solid #55cae7;padding-left:10px;color:#aadfee!important}
.chat-feedback-foot{font-size:11px;color:#a7b9d1}
.chat-feedback-foot button{cursor:pointer;border:0;background:none;color:#ffb6b6;text-decoration:underline}
/* Statistiques lisibles sur PC et mobile, sans tableau dense. */
.sos025-stats-intro p{margin:0 0 12px;font-size:13px}
.sos025-stats-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0 18px}
.sos025-stats-summary>div{display:flex;flex-direction:column;gap:5px;min-width:0;padding:16px 12px;background:linear-gradient(150deg,#1b2b48,#111a30);border:1px solid #374763;border-radius:15px}
.sos025-stats-summary small,.sos025-stats-summary span{font-size:11px;line-height:1.3;color:#aabbd2}
.sos025-stats-summary strong{font-size:clamp(19px,3vw,26px);line-height:1.2;color:#f6deae;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.sos025-stats-section{margin:12px 0;padding:16px;background:linear-gradient(150deg,#151f37,#0d1729);border:1px solid #2d425b;border-radius:16px;min-width:0}
.sos025-stats-section h3{font-size:17px;margin:0 0 12px;color:#f1f5ff}
.sos025-stats-section p{font-size:13px;line-height:1.55}
.sos025-faction-list{display:grid;gap:15px}
.sos025-faction-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px;font-size:13px}
.sos025-faction-head span{white-space:nowrap;font-variant-numeric:tabular-nums;color:#d5e2f5}
.sos025-track{height:8px;border-radius:8px;background:#283650;overflow:hidden}
.sos025-track i{display:block;height:100%;border-radius:inherit;min-width:0}
.sos025-stats-heading{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.sos025-stats-heading>span{font-size:11px;color:#aabbd2;white-space:nowrap}
.sos025-ranklist{display:grid;gap:5px;list-style:none;margin:0;padding:0}
.sos025-rank{display:flex;align-items:center;gap:10px;background:#1a2941;border:1px solid #314765;border-radius:11px;padding:11px 9px;min-width:0}
.sos025-rank.mine{border-color:#e5b879;background:rgba(245,183,86,.09)}
.sos025-place{flex:0 0 30px;height:30px;display:grid;place-items:center;background:#30425d;border-radius:9px;color:#f3e0b8;font-size:13px;font-weight:800}
.sos025-rankname{flex:1;min-width:0;display:grid;gap:3px;overflow-wrap:anywhere}
.sos025-rankname b{font-size:13px}.sos025-rankname small{font-size:11px}
.sos025-rank>strong{font-size:14px;color:#fff;white-space:nowrap;font-variant-numeric:tabular-nums}
.sos025-rank>strong small{font-size:10px;color:#9fb5ce;font-weight:500}
.sos025-npc{color:#eab0f8;font-size:10px;padding:2px 4px;border:1px solid #6e4883;border-radius:4px;width:max-content}
@media(max-width:480px){.sos025-stats-summary{gap:6px}.sos025-stats-summary>div{padding:11px 8px}.sos025-stats-section{padding:12px}.sos025-rank{padding:9px 7px;gap:6px}}
