/* ===== POPUP CONNEXION ===== */
.login-overlay{
  position:fixed;inset:0;
  background:rgba(0,0,0,0.85);
  z-index:200;
  display:flex;align-items:center;justify-content:center;
}
.login-box{
  background:#1a1a1a;
  border:1px solid #444;
  border-radius:10px;
  padding:36px 40px;
  min-width:320px;
  text-align:center;
}
.login-box h2{
  margin-bottom:24px;
  font-size:22px;
  color:#eee;
}
.login-box button{
  display:block;
  width:100%;
  margin:10px 0;
  padding:12px;
  background:#2a2a2a;
  border:1px solid #555;
  color:#fff;
  border-radius:6px;
  cursor:pointer;
  font-size:15px;
}
.login-box button:hover{background:#3a3a3a;border-color:#777}
.login-box input{
  width:100%;
  padding:10px 12px;
  margin:12px 0;
  background:#222;
  border:1px solid #555;
  color:#eee;
  border-radius:5px;
  font-size:15px;
}
.login-hidden{display:none !important}

/* ===== BLOC PROFIL ACCUEIL ===== */
.profile-stack{
  position:absolute;
  top:20px;
  bottom:150px;
  left:80px;
  z-index:15;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:8px;
  width:360px;
}
.profile-panel{
  position:relative;
  top:auto;
  left:auto;
  width:100%;
  min-width:0;
  max-width:none;
  box-sizing:border-box;
  background:#2a2a2a;
  border:1px solid #444;
  border-radius:8px;
  padding:14px 14px 12px;
}
.profile-compact{
  display:flex;
  align-items:flex-start;
  gap:14px;
}
.profile-info-col{
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:4px;
  min-width:0;
  flex:1;
  min-height:120px;
}
.profile-line1{
  display:flex;
  align-items:baseline;
  gap:8px;
  min-width:0;
}
.profile-pseudo{
  color:#eee;
  font-weight:bold;
  font-size:18px;
  text-transform:none;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.profile-line-title{
  min-width:0;
  line-height:1.2;
}
.profile-title-text{
  color:#c9a227;
  font-style:italic;
  font-size:14px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  min-width:0;
  display:block;
}
.profile-title-text.is-empty{
  color:#777;
  font-style:normal;
}
.profile-line2{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:auto;
}
.profile-level{
  color:#eee;
  font-weight:bold;
  font-size:16px;
  white-space:nowrap;
  flex-shrink:0;
}
.profile-line2 .profile-xp-track{
  flex:1;
  height:10px;
  background:#1a1a1a;
  border-radius:5px;
  overflow:hidden;
  border:1px solid #444;
}
.profile-avatar-col{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  flex-shrink:0;
}
.profile-avatar-frame{
  width:120px;
  height:120px;
  border-radius:8px;
  border:2px solid #555;
  background:#111;
  overflow:hidden;
}
.profile-avatar-frame img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:none;
}
.profile-mail-btn{
  position:relative;
  width:40px;
  height:32px;
  padding:0;
  background:#1a1a1a;
  border:1px solid #555;
  border-radius:6px;
  color:#f0d78c;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}
.profile-mail-btn svg{ width:20px; height:20px; }
.profile-mail-btn:hover{ border-color:#c9a227; background:#2a2210; }
.profile-icon-row{
  display:flex;
  gap:6px;
  align-items:center;
}
.profile-wallet{
  display:flex;
  flex-direction:column;
  gap:6px;
  width:100%;
  box-sizing:border-box;
  background:#2a2a2a;
  border:1px solid #444;
  border-radius:8px;
  padding:10px 14px;
  color:#eee;
  font-size:14px;
  font-weight:bold;
}
.wallet-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px 16px;
  align-items:center;
}
.wallet-row{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:22px;
}
.wallet-colon{ color:#aaa; font-weight:normal; }
.wallet-row img{
  width:22px;
  height:22px;
  object-fit:contain;
  flex-shrink:0;
}
.wallet-slot{ min-height:22px; }
.wallet-extra-id{ color:#c9a227; font-size:12px; }
.mail-badge{
  position:absolute;
  top:-6px;
  right:-6px;
  min-width:16px;
  height:16px;
  padding:0 4px;
  border-radius:8px;
  background:#a33;
  color:#fff;
  font-size:10px;
  line-height:16px;
  font-family:Georgia, serif;
}

.mail-overlay{
  position:fixed;inset:0;
  background:rgba(0,0,0,.82);
  z-index:500;
  display:none;
  align-items:center;
  justify-content:center;
}
.mail-overlay.visible{ display:flex; }
.mail-box{
  width:680px;
  height:520px;
  max-width:94vw;
  max-height:84vh;
  background:#1a1510;
  border:1px solid #555;
  border-radius:12px;
  padding:16px 16px 10px;
  display:flex;
  flex-direction:column;
  color:#eee;
  box-sizing:border-box;
}
.mail-layout{
  display:flex;
  gap:14px;
  min-height:0;
  flex:1;
  overflow:hidden;
  align-items:stretch;
}
.mail-nav{
  display:flex;
  flex-direction:column;
  gap:8px;
  width:132px;
  flex-shrink:0;
}
.mail-pane{ flex:1; min-width:0; min-height:0; display:flex; flex-direction:column; overflow:hidden; }
#mailInboxView, #mailComposeView, #mailReplyView{
  flex:1;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.mail-list{
  overflow-y:auto;
  overflow-x:hidden;
  flex:1;
  min-height:0;
  max-height:none;
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-bottom:0;
  padding-right:4px;
  scrollbar-width:thin;
  scrollbar-color:#c9a227 rgba(0,0,0,.3);
}
.mail-close-btn{
  align-self:flex-end;
  margin:10px 0 0;
  padding:5px 12px;
  background:transparent;
  border:1px solid #444;
  color:#888;
  border-radius:6px;
  cursor:pointer;
  font-size:12px;
  font-family:Georgia, serif;
}
.mail-close-btn:hover{
  color:#ccc;
  border-color:#666;
}
.mail-nav button{
  width:100%;
  margin:0;
  padding:10px 8px;
  background:#2a2a2a;
  border:1px solid #555;
  color:#ddd;
  border-radius:6px;
  cursor:pointer;
  font-size:13px;
  font-family:Georgia, serif;
}
.mail-nav button.is-active,
.mail-nav button:hover{
  border-color:#c9a227;
  color:#f0d78c;
  background:#2a2210;
}
.mail-pane{ flex:1; min-width:0; min-height:0; display:flex; flex-direction:column; overflow:hidden; }
.mail-pane label{
  display:block;
  text-align:left;
  color:#aaa;
  font-size:12px;
  margin-top:8px;
}
.mail-pane input,
.mail-pane select,
.mail-pane textarea{
  width:100%;
  box-sizing:border-box;
  margin:6px 0;
  padding:8px 10px;
  background:#222;
  border:1px solid #555;
  color:#eee;
  border-radius:6px;
  font-family:Georgia, serif;
  font-size:14px;
}
.mail-pane textarea{ resize:vertical; min-height:80px; }
.mail-suggest-wrap{ position:relative; }
.mail-suggest{
  position:absolute;
  left:0; right:0; top:100%;
  z-index:5;
  background:#1c1c1c;
  border:1px solid #c9a227;
  border-radius:6px;
  max-height:180px;
  overflow-y:auto;
  box-shadow:0 8px 18px rgba(0,0,0,.45);
}
.mail-suggest-item{
  display:flex;
  align-items:center;
  gap:8px;
  width:100%;
  margin:0;
  padding:8px 10px;
  background:transparent;
  border:0;
  border-bottom:1px solid #333;
  color:#eee;
  text-align:left;
  cursor:pointer;
  font-family:Georgia, serif;
  font-size:14px;
}
.mail-suggest-item:hover{ background:#2a2210; color:#f0d78c; }
.mail-suggest-item img,
.mail-suggest-ph{
  width:28px;
  height:28px;
  border-radius:4px;
  object-fit:cover;
  background:#111;
  border:1px solid #555;
  flex-shrink:0;
}
.mail-suggest-empty{
  padding:8px 10px;
  color:#888;
  font-size:13px;
}
.mail-av{
  width:42px;
  height:42px;
  border-radius:6px;
  background:#111;
  border:1px solid #555;
  overflow:hidden;
  flex-shrink:0;
  align-self:flex-start;
}
.mail-av img{ width:100%; height:100%; object-fit:cover; display:block; }
.mail-item{ position:relative; padding-right:36px; }
.mail-del{
  position:absolute;
  top:6px;
  right:8px;
  width:22px;
  height:22px;
  padding:0;
  margin:0;
  border-radius:4px;
  border:1px solid #555;
  background:#1a1a1a;
  color:#ccc;
  cursor:pointer;
  font-size:16px;
  line-height:18px;
}
.mail-del:hover{ border-color:#c44; color:#f88; background:#2a1515; }
.mail-reply-btn{
  margin-top:8px;
  padding:6px 12px;
  background:#2a2210;
  border:1px solid #555;
  color:#f0d78c;
  border-radius:6px;
  cursor:pointer;
  font-size:13px;
}
.mail-reply-head{ color:#ccc; margin:0 0 8px; }
.mail-reply-head strong{ color:#f0d78c; }
.mail-thread{
  margin-top:12px;
  max-height:32vh;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:8px;
  padding-right:4px;
}
.mail-thread-item{
  background:#222;
  border:1px solid #444;
  border-radius:8px;
  padding:8px 10px;
  text-align:left;
}
.mail-thread-item.is-mine{ border-color:#555; background:#1c1c1c; }
.mail-thread-meta{ color:#888; font-size:11px; margin-bottom:4px; }
.mail-thread-item p{ margin:0; color:#ddd; font-size:13px; white-space:pre-wrap; }

.mail-toast{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:800;
  width:min(340px, calc(100vw - 32px));
  background:#1a1510;
  border:1px solid #c9a227;
  border-radius:10px;
  padding:14px 32px 14px 14px;
  display:flex;
  align-items:center;
  gap:12px;
  box-shadow:0 10px 30px rgba(0,0,0,.5);
  cursor:pointer;
}
.mail-toast-av{
  width:48px;
  height:48px;
  border-radius:8px;
  background:#111;
  border:1px solid #555;
  overflow:hidden;
  flex-shrink:0;
}
.mail-toast-av img{ width:100%; height:100%; object-fit:cover; }
.mail-toast p{
  margin:0;
  color:#fff;
  font-size:14px;
  line-height:1.35;
}
.mail-toast strong{
  color:#f0d78c;
  font-weight:bold;
}
.mail-toast-x{
  position:absolute;
  top:6px;
  right:8px;
  width:22px;
  height:22px;
  padding:0;
  border:0;
  background:transparent;
  color:#aaa;
  font-size:18px;
  cursor:pointer;
  line-height:20px;
}
.mail-toast-x:hover{ color:#fff; }
.mail-box h2{
  margin:0 0 14px;
  text-align:center;
  color:#f0d78c;
}
.mail-list{
  overflow-y:auto;
  overflow-x:hidden;
  flex:1;
  min-height:0;
  max-height:none;
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-bottom:0;
  padding-right:4px;
  scrollbar-width:thin;
  scrollbar-color:#c9a227 rgba(0,0,0,.3);
}
.mail-empty{ color:#888; text-align:center; }
.mail-item{
  background:#222;
  border:1px solid #444;
  border-radius:8px;
  padding:10px 12px;
  text-align:left;
  display:flex;
  align-items:stretch;
  gap:10px;
}
.mail-main{ flex:1; min-width:0; }
.mail-claim{
  flex-shrink:0;
  align-self:center;
  width:auto !important;
  margin:0 !important;
  padding:8px 12px !important;
  background:#2a2210;
  border:1px solid #c9a227;
  color:#f0d78c;
  border-radius:6px;
  cursor:pointer;
  font-size:13px;
}
.mail-claim:hover{ background:#3a3018; }
.mail-claimed{
  flex-shrink:0;
  align-self:center;
  color:#888;
  font-size:12px;
  font-style:italic;
}
.chest-list{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  justify-content:center;
  min-height:80px;
  margin-bottom:12px;
}
.chest-item{
  width:110px;
  background:#1a1a1a;
  border:1px solid #555;
  border-radius:8px;
  color:#eee;
  cursor:pointer;
  padding:8px 6px 10px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
}
.chest-item:hover{ border-color:#c9a227; }
.chest-item img{
  width:84px;
  height:112px;
  object-fit:contain;
}
.chest-item span{
  font-size:11px;
  text-align:center;
  color:#c9b27a;
  line-height:1.2;
}
.mail-item.is-unread{ border-color:#c9a227; }
.mail-item header{
  display:flex;
  justify-content:space-between;
  gap:8px;
  margin-bottom:6px;
  color:#f0d78c;
}
.mail-date{ color:#888; font-size:12px; }
.mail-item p{ margin:0; color:#ddd; font-size:14px; white-space:pre-wrap; }
.mail-res{ margin:8px 0 0; padding-left:18px; color:#c9a227; font-size:13px; }

.admin-box{
  min-width:min(760px,96vw) !important;
  max-width:920px;
  max-height:86vh;
  overflow:auto;
  text-align:left;
}
.admin-nav{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:12px;
}
.admin-nav button{
  width:auto !important;
  flex:1 1 140px;
  margin:0 !important;
  font-size:13px !important;
  padding:10px 8px !important;
}
.admin-nav button.is-active{
  border-color:#c9a227;
  color:#f0d78c;
  background:#2a2210;
}
.srv-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin:4px 0 12px;
  color:#f0d78c;
  letter-spacing:.06em;
}
.srv-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.srv-cell{
  background:#1c1c1c;
  border:1px solid #333;
  border-radius:8px;
  padding:10px 12px;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.srv-lab{ color:#888; font-size:11px; letter-spacing:.04em; text-transform:uppercase; }
.srv-val{ color:#eee; font-size:15px; }
.srv-note{ color:#666; font-size:11px; font-weight:normal; }
.srv-led{ font-weight:bold; }
.srv-led.is-ok{ color:#6e6; }
.srv-led.is-warn{ color:#e8c84a; }
.srv-led.is-bad{ color:#f66; }
.srv-hint{ color:#666; font-size:12px; margin:12px 0 0; }
#adminView{ min-height:120px; }
.admin-commands{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:8px;
}
.admin-cmd{
  width:100% !important;
  margin:0 !important;
  padding:12px !important;
  background:#2a2218;
  border:1px solid #c9a227;
  color:#f0d78c;
  border-radius:6px;
  cursor:pointer;
  font-size:15px !important;
}
.admin-cmd:hover{ background:#3a3218; }
.admin-cmd.is-on{
  background:#2a1515;
  border-color:#a33;
  color:#f66;
}
.admin-players{ display:flex; flex-direction:column; gap:8px; margin-top:10px; }
.admin-player{
  display:flex;
  align-items:center;
  gap:10px;
  background:#222;
  border:1px solid #444;
  border-radius:8px;
  padding:8px;
}
.admin-player-av{
  width:40px;height:40px;border-radius:6px;
  background:#111;border:1px solid #555;overflow:hidden;flex-shrink:0;
}
.admin-player-av img{ width:100%;height:100%;object-fit:cover; }
.admin-player-meta{ display:flex;flex-direction:column;gap:2px;min-width:0; }
.admin-player-meta strong{ color:#eee; }
.admin-player-meta span{ color:#aaa;font-size:12px; }
.admin-player-dates{ color:#888 !important; font-size:11px !important; }
.admin-led{
  width:10px;
  height:10px;
  border-radius:50%;
  background:#a33;
  box-shadow:0 0 6px #a33;
  flex-shrink:0;
}
.admin-led.is-on{
  background:#3c3;
  box-shadow:0 0 7px #3c3;
}
.admin-wl{
  width:36px !important;
  min-width:36px;
  margin:0 0 0 auto !important;
  padding:6px 0 !important;
  background:#1a2a1a;
  border:1px solid #3a3;
  color:#6e6;
  border-radius:6px;
  cursor:pointer;
  font-weight:bold;
}
.admin-wl.is-off{
  background:#2a1515;
  border-color:#a33;
  color:#f66;
}
.admin-mute{
  width:auto !important;
  min-width:52px;
  margin:0 6px 0 8px !important;
  padding:6px 8px !important;
  background:#2a2218;
  border:1px solid #c9a227;
  color:#f0d78c;
  border-radius:6px;
  cursor:pointer;
  font-size:11px;
  font-weight:bold;
}
.admin-mute.is-on{
  background:#2a1515;
  border-color:#a33;
  color:#f66;
}
.admin-reset{
  width:auto !important;
  min-width:44px;
  margin:0 4px 0 8px !important;
  padding:6px 8px !important;
  background:#1a1a2a;
  border:1px solid #668;
  color:#cde;
  border-radius:6px;
  cursor:pointer;
  font-size:11px;
  font-weight:bold;
}
.admin-reset:hover{
  border-color:#f0d78c;
  color:#f0d78c;
}
.admin-temp-pass{
  font-family: Consolas, "Courier New", monospace;
  font-size:22px;
  letter-spacing:.08em;
  color:#f0d78c;
  background:#111;
  border:1px solid #555;
  border-radius:8px;
  padding:10px 12px;
  margin:8px 0;
  user-select:all;
}
.admin-logs{
  margin-top:10px;
  max-height:52vh;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.admin-log{
  background:#1c1c1c;
  border:1px solid #333;
  border-radius:6px;
  padding:8px 10px;
  color:#ddd;
  font-size:12px;
  text-align:left;
  white-space:pre-wrap;
  font-family:Consolas, "Courier New", monospace;
}
.admin-res-head{
  display:flex;justify-content:space-between;align-items:center;
  margin:10px 0 6px;color:#ccc;
}
#btnAdminResAdd{
  width:36px !important;margin:0 !important;padding:6px !important;
}
.admin-res-row{
  display:flex;gap:6px;margin-bottom:6px;align-items:center;
}
.admin-res-row select, .admin-res-row input{
  flex:1;margin:0 !important;
}
.admin-res-row button{ width:36px !important;margin:0 !important;padding:6px !important; }
#adminSendBody{
  width:100%;min-height:70px;background:#222;border:1px solid #555;
  color:#eee;border-radius:6px;padding:8px;font-family:Georgia,serif;
}
.profile-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:14px;
  color:#ccc;
  text-transform:uppercase;
  letter-spacing:1px;
}
.profile-row span:last-child{
  color:#eee;
  font-weight:bold;
  text-transform:none;
  letter-spacing:0;
}
.profile-avatar-wrap{
  display:flex;
  align-items:center;
  gap:12px;
  margin-top:6px;
}
.profile-avatar-wrap img{
  width:120px;
  height:120px;
  object-fit:cover;
  border-radius:8px;
  border:2px solid #555;
  background:#111;
}
.profile-avatar-wrap label{
  font-size:12px;
  color:#aaa;
  cursor:pointer;
  text-decoration:underline;
}
.profile-avatar-wrap input[type="file"]{display:none}

/* Popup booster */
.booster-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.88);
  z-index:250;
  display:none;
  align-items:center;
  justify-content:center;
}
.booster-box{
  background:#1a1a1a;
  border:1px solid #555;
  border-radius:12px;
  padding:28px 24px 24px;
  max-width: min(1100px, 96vw);
  width: 100%;
  text-align:center;
}
.booster-box h2{
  margin-bottom: 18px;
  font-size: 24px;
  color:#eee;
  letter-spacing: 2px;
}
#boosterCardsRow{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:center;
  min-height: 200px;
  margin-bottom: 20px;
}
.booster-card-reveal{
  animation: boosterPop 0.35s ease-out;
}
@keyframes boosterPop{
  from{ opacity:0; transform: scale(0.6) translateY(12px); }
  to{ opacity:1; transform: scale(1) translateY(0); }
}
#btnBoosterContinue{
  display:none;
  margin: 0 auto;
  padding: 12px 36px;
  background:#2a2a2a;
  border:1px solid #888;
  color:#fff;
  font-size:16px;
  border-radius:6px;
  cursor:pointer;
}
#btnBoosterContinue:hover{
  background:#3a3a3a;
  border-color:#aaa;
}

/* Jauge XP profil (entre Niveau et Collection) */
.profile-xp-row{
  margin: 6px 0 10px;
  padding: 0 2px;
}
.profile-xp-track{
  height: 8px;
  background: #2a2a2a;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #444;
}
.profile-xp-fill{
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #c9a227, #e8c84a);
  border-radius: 4px;
  transition: width 0.6s ease;
}
.profile-xp-label{
  margin-top: 4px;
  font-size: 11px;
  color: #aaa;
  text-align: right;
}

.profile-title {
  font-size: 12px;
  color: #c9a227;
  font-style: italic;
  text-align: right;
}

.profile-title-btn{
  background: none;
  border: none;
  color: #c9a227;
  font-style: italic;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  text-align: right;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-title-btn.is-empty{
  color: #777;
  font-style: normal;
}
.profile-title-btn:hover{
  color: #e8c84a;
  text-decoration: underline;
}

.titles-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.titles-box{
  width: 360px;
  max-height: 70vh;
  background: #1a1a1a;
  border: 1px solid #555;
  border-radius: 10px;
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
}
.titles-box h2{
  margin: 0 0 12px;
  color: #f0d78c;
  font-size: 18px;
  text-align: center;
}
.titles-list{
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 46vh;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #c9a227 rgba(0,0,0,0.3);
}
.titles-item{
  text-align: left;
  background: #222;
  border: 1px solid #444;
  color: #ddd;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
.titles-item:hover{
  border-color: #c9a227;
  color: #f0d78c;
}
.titles-item.is-selected{
  border-color: #c9a227;
  background: #2a2218;
  color: #f0d78c;
}
.titles-close{
  margin-top: 12px;
  padding: 8px;
  background: #2a2218;
  border: 1px solid #555;
  color: #ccc;
  border-radius: 6px;
  cursor: pointer;
}

.home-chat{
  width:100%;
  box-sizing:border-box;
  background:#2a2a2a;
  border:1px solid #444;
  border-radius:8px;
  padding:8px;
  display:flex;
  flex-direction:column;
  gap:6px;
  max-height:220px;
  margin-top:auto;
  margin-bottom:auto;
  flex-shrink:0;
}
.home-chat-log{
  flex:1;
  min-height:110px;
  max-height:150px;
  overflow:auto;
  background:#1a1a1a;
  border:1px solid #333;
  border-radius:6px;
  padding:6px 8px;
  font-size:12px;
  line-height:1.35;
  color:#ddd;
}
.home-chat-line{ margin:0 0 4px; word-break:break-word; }
.home-chat-line.is-system{ color:#c9a227; font-style:italic; }
.home-chat-name{
  display:inline;
  padding:0;
  margin:0;
  width:auto;
  background:none;
  border:0;
  color:#8ec8ff;
  cursor:pointer;
  font:inherit;
  font-weight:bold;
}
.home-chat-name:hover{ text-decoration:underline; color:#cde8ff; }
.home-chat-form{ display:flex; gap:6px; }
.home-chat-form input{
  flex:1;
  min-width:0;
  padding:7px 8px;
  background:#111;
  border:1px solid #444;
  color:#eee;
  border-radius:5px;
  font-size:13px;
}
.home-chat-form button{
  width:auto;
  margin:0;
  padding:7px 12px;
  background:#2a2218;
  border:1px solid #c9a227;
  color:#f0d78c;
  border-radius:5px;
  cursor:pointer;
}
.home-chat-err{ color:#c66; font-size:11px; min-height:14px; margin:0; }
.community-box{ width:420px; height:auto; max-height:80vh; }
.community-list{
  overflow:auto;
  max-height:56vh;
  display:flex;
  flex-direction:column;
  gap:6px;
  margin:10px 0;
}
.community-row{
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  text-align:left;
  background:#222;
  border:1px solid #444;
  border-radius:8px;
  padding:8px;
  color:#eee;
  cursor:pointer;
}
.community-row:hover{ border-color:#c9a227; background:#2a2218; }
.community-meta{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.community-meta strong{ font-size:14px; }
.community-meta span{ color:#aaa; font-size:12px; }
.player-card-box{ width:360px; height:auto; text-align:center; }
.player-card-av{
  width:120px; height:120px;
  margin:0 auto 10px;
  border-radius:8px;
  border:2px solid #555;
  background:#111;
  overflow:hidden;
}
.player-card-av img{ width:100%; height:100%; object-fit:cover; }
.player-card-box h3{ margin:0 0 6px; color:#eee; }
.player-card-title{ color:#c9a227; font-style:italic; margin:0 0 12px; }
.player-card-title.is-empty{ color:#777; font-style:normal; }
.player-card-xp{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 0 14px;
}
.player-card-xp .profile-xp-track{ flex:1; height:10px; background:#1a1a1a; border:1px solid #444; border-radius:5px; overflow:hidden; }
.player-card-xp .profile-xp-fill{ height:100%; background:#c9a227; width:0; }