:root{
  --gt-bg:#d8d7dd;
  --gt-page-grad-top:#f3f4f8;
  --gt-page-grad-bot:#d9d8df;
  --gt-frame-top:#ededf3;
  --gt-frame-bot:#d2d0d8;
  --gt-frame-border:#7f8290;
  --gt-shadow:rgba(0,0,0,.22);
  --gt-panel:#f7f7fb;
  --gt-panel-border:#8a8c97;
  --gt-sky-top:#82d2ea;
  --gt-sky-bot:#90d9ef;
  --gt-menu-top:#7fd1ef;
  --gt-menu-bot:#68c6e7;
  --gt-menu-border:#5b6f7e;
  --gt-btn-top:#fafafb;
  --gt-btn-bot:#cdced8;
  --gt-btn-border:#7b7c86;
  --gt-chat-bg:#ffffff;
  --gt-chat-line:#d7d7df;
  --gt-text:#11151b;
  --gt-soft:#5c6877;
  --gt-link:#233c8f;
  --gt-link-hover:#d43b94;
  --gt-admin:#c41616;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:Arial, Helvetica, sans-serif;
  color:var(--gt-text);
  background:linear-gradient(var(--gt-page-grad-top), var(--gt-page-grad-bot));
}

a{ color:var(--gt-link); }
a:hover{ color:var(--gt-link-hover); }
.hidden{ display:none !important; }

.gtHeader{ max-width:1360px; margin:14px auto 10px; padding:0 12px; }
.gtHeaderInner{
  display:flex; align-items:center; gap:16px; justify-content:space-between;
  background:linear-gradient(var(--gt-frame-top), var(--gt-frame-bot));
  border:2px solid var(--gt-frame-border); border-radius:20px;
  padding:10px 14px; box-shadow:0 12px 30px var(--gt-shadow);
}
.gtBrand{ display:flex; align-items:center; text-decoration:none; }
.gtBrandText{
  font-size:32px; font-weight:900; letter-spacing:.6px; color:#f6c744;
  text-shadow:1px 1px 0 #7e5f0a, 2px 2px 0 rgba(255,255,255,.2);
  font-style:italic; line-height:1;
}
.gtNav{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.gtNavBtn, .navbar a{
  text-decoration:none; color:#1a2631; font-weight:800; font-size:14px;
  padding:9px 12px; border-radius:12px; border:1px solid rgba(0,0,0,.14);
  background:linear-gradient(var(--gt-btn-top), var(--gt-btn-bot));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
}
.gtNavBtn:hover, .navbar a:hover, .navbar a.active{ color:#000; filter:brightness(1.03); }
.gtUserPill{
  display:flex; gap:8px; align-items:center; font-size:14px; font-weight:700;
  background:#f7f7fb; border:1px solid rgba(0,0,0,.1); border-radius:999px; padding:9px 14px;
}
.gtUserPillLabel{ color:var(--gt-soft); }
.gtUserPillName{ color:#111; }
.count-badge{
  display:inline-flex; align-items:center; justify-content:center;
  min-width:18px; height:18px; padding:0 5px; border-radius:999px;
  background:#d72828; color:#fff; font-size:11px; margin-left:5px;
}

.gt-page--lobby{ min-height:100vh; }
.gt-lobby-shell{ max-width:1360px; margin:0 auto; padding:0 12px 18px; }
.gt-lobby-frame{
  background:linear-gradient(var(--gt-frame-top), var(--gt-frame-bot));
  border:3px solid var(--gt-frame-border); border-radius:26px;
  box-shadow:0 18px 34px rgba(0,0,0,.18); overflow:hidden;
  min-height:calc(100vh - 118px);
}

.gt-lobby-frame{
  display:flex; flex-direction:column;
}
.gt-lobby-main{
  flex:1; min-height:0; display:flex; flex-direction:column;
}
.gt-lobby-topbar{
  height:58px; display:flex; align-items:center; justify-content:space-between;
  padding:0 24px; background:linear-gradient(var(--gt-sky-top), var(--gt-sky-bot));
  border-bottom:3px solid var(--gt-frame-border);
}
.gt-lobby-title{
  font-size:30px; font-weight:900; letter-spacing:.6px; color:#f6c744;
  text-shadow:1px 1px 0 #7e5f0a, 2px 2px 0 rgba(255,255,255,.2);
  font-style:italic;
}
.gt-lobby-clock{
  min-width:92px; text-align:center; font-size:20px; font-weight:900; color:#25475d;
}
.gt-lobby-grid{
  display:grid; grid-template-columns: 320px 270px 1fr; gap:12px;
  flex:1; min-height:0; padding:14px 14px 8px;
}
.gt-lobby-left, .gt-lobby-middle, .gt-lobby-right{ min-height:0; }
.gt-lobby-left{
  display:flex; flex-direction:column; gap:12px;
}
.gt-character-stage{
  flex:1; min-height:0;
  background:linear-gradient(#ececf1, #d8d7de); border:3px solid var(--gt-panel-border);
  border-radius:18px; display:flex; align-items:flex-end; justify-content:center; padding:16px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.4);
}
.gt-character-portrait-wrap{
  width:265px; max-width:100%; height:100%; display:flex; align-items:flex-end; justify-content:center;
}
.gt-character-portrait{
  max-width:100%; max-height:100%; object-fit:contain; display:block;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.18));
}
.gt-play-wrap{
  display:flex; align-items:center; justify-content:center;
}
.gt-play-button{
  display:inline-flex; align-items:center; gap:14px; text-decoration:none; color:#111;
  font-size:24px; font-weight:900;
}
.gt-play-button__icon{
  width:64px; height:64px; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center;
  background:radial-gradient(circle at 35% 30%, #fff 0 24%, #c9c9d3 52%, #7f7f87 100%);
  border:3px solid #8b8b96; box-shadow:inset 0 1px 0 rgba(255,255,255,.85), 0 6px 10px rgba(0,0,0,.18);
  color:#f1d45a; text-shadow:1px 1px 0 #6e5a00; font-size:32px; padding-left:3px;
}
.gt-play-button__text{ font-size:26px; color:#111; }

.gt-lobby-middle{
  display:flex; align-items:flex-end;
}
.gt-menu-panel{
  width:100%; background:linear-gradient(var(--gt-menu-top), var(--gt-menu-bot));
  border:3px solid var(--gt-menu-border); border-radius:18px;
  box-shadow:0 10px 18px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.45);
  padding:10px;
}
.gt-menu-inner{ display:flex; flex-direction:column; gap:8px; }
.gt-menu-link{
  display:block; text-decoration:none; color:#111; font-weight:900; font-size:18px;
  padding:4px 10px; border-radius:8px; text-shadow:0 1px 0 rgba(255,255,255,.35);
}
.gt-menu-link:hover{ background:rgba(255,255,255,.22); color:#111; }
.gt-menu-link--button{
  appearance:none; background:none; border:0; cursor:pointer; text-align:left; width:100%; font-family:inherit;
}

.gt-lobby-right{
  display:grid; grid-template-rows: minmax(0, 1fr) 190px; gap:12px; min-height:0;
}
.gt-chat-panel, .gt-players-panel{
  background:linear-gradient(var(--gt-frame-top), #dfdee6);
  border:3px solid var(--gt-panel-border); border-radius:18px;
  overflow:hidden; min-height:0;
}
.gt-chat-toolbar, .gt-players-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:9px 12px; background:linear-gradient(#f9f9fc, #d9d8e1);
  border-bottom:2px solid #9a9ca8;
}
.gt-chat-room, .gt-players-head span:first-child{ font-weight:900; font-size:18px; }
.gt-chat-badge-wrap{ display:flex; align-items:center; gap:8px; font-size:13px; }
.gt-chat-badge-label{ color:var(--gt-soft); font-weight:700; }
.role-badge{
  display:inline-flex; align-items:center; min-height:24px; padding:3px 10px; border-radius:999px;
  background:#ecebf2; border:1px solid rgba(0,0,0,.12); font-size:12px; font-weight:900;
}
.role-badge.is-gtadmin{ color:#6a4e00; background:linear-gradient(#ffe894, #d9ad2a); border-color:#9d7720; box-shadow:inset 0 1px 0 rgba(255,255,255,.8), 0 0 8px rgba(255,215,64,.18); }
.role-badge.role-moderator{ color:#fff; background:#2847a5; }
.role-badge.role-clan_leader{ color:#fff; background:#7b3ff2; }
.gt-chat-body{
  height:calc(100% - 102px); min-height:180px; overflow-y:auto; background:var(--gt-chat-bg);
  padding:10px 12px; scrollbar-gutter: stable;
}
.gt-chat-input-row{
  height:52px; display:grid; grid-template-columns: 42px 1fr 78px; gap:8px; align-items:center;
  padding:8px; border-top:2px solid #b5b6bf; background:#f4f4f8;
}
.gt-emoji-btn, .gt-send-btn{
  height:36px; border-radius:10px; border:1px solid rgba(0,0,0,.16); cursor:pointer; font-weight:900;
  background:linear-gradient(var(--gt-btn-top), var(--gt-btn-bot));
}
.gt-emoji-btn{ font-size:18px; }
.gt-chat-input{
  width:100%; height:36px; border-radius:10px; border:1px solid #9d9eaa; outline:none;
  padding:0 12px; font-size:14px; background:#fff; color:#111;
}
.gt-chat-input:focus{ box-shadow:0 0 0 2px rgba(92,171,228,.22); }
.gt-players-count{
  min-width:28px; height:28px; display:inline-flex; align-items:center; justify-content:center;
  border-radius:999px; background:#6fc9ea; border:1px solid #618496; font-weight:900;
}
.gt-players-list{
  height:calc(100% - 50px); overflow-y:auto; background:#fff; padding:10px;
}
.player-row{
  display:flex; align-items:center; gap:10px; padding:8px 6px; border-bottom:1px solid var(--gt-chat-line);
  cursor:pointer;
}
.player-row:hover{ background:#f6f7fc; }
.status-dot{ width:10px; height:10px; border-radius:50%; background:#31c257; box-shadow:0 0 0 1px #0e8230; flex:0 0 auto; }
.player-name{ font-weight:800; }
.player-name.role-admin, .chat-user-link.is-gtadmin, .name.is-gtadmin{ color:var(--gt-admin); }
.chat-user-link.is-system, .name.is-system{ color:#c41616; font-weight:900; }
.player-name.role-moderator, .chat-user-link.role-moderator, .name.role-moderator{ color:#2647a8; }
.player-name.role-clan_leader, .chat-user-link.role-clan_leader, .name.role-clan_leader{ color:#7b3ff2; }
.player-meta{ margin-left:auto; color:var(--gt-soft); font-size:12px; }
.hint{ color:var(--gt-soft); padding:10px 4px; }

.msg{ margin:0 0 8px; }
.msg .bubble{
  display:block; background:#fff; color:#111; line-height:1.35; font-size:14px;
  border-bottom:1px solid var(--gt-chat-line); padding:0 0 8px;
}
.msg.mine .bubble{ background:#fffef8; }
.msg.mention-me .bubble{ background:#fff8ee; }
.chat-user-link{
  color:inherit; font-weight:900; text-decoration:none; cursor:pointer;
}
.chat-user-link:hover{ text-decoration:underline; color:var(--gt-link-hover); }
.time{ color:#7a808a; font-size:12px; margin-left:4px; }

.wrap{ max-width:1100px; margin:0 auto; padding:0 18px 24px; }
.panel{ background: linear-gradient(var(--gt-frame-top), var(--gt-frame-bot)); border:2px solid var(--gt-frame-border); border-radius:22px; box-shadow:0 14px 30px var(--gt-shadow); overflow:hidden; }
.head{ background:linear-gradient(#9ad8ee,#64c7e6); border-bottom:2px solid var(--gt-frame-border); padding:16px 18px; font-size:28px; font-weight:900; }
.body{ padding:24px 20px; background:#f6f7fb; }
.body p{ font-size:18px; margin:0 0 14px; }
.btnrow{ display:flex; gap:10px; flex-wrap:wrap; margin-top:20px; }
.btnx{ text-decoration:none; color:#1a2731; font-weight:800; font-size:16px; padding:10px 14px; border-radius:12px; background:linear-gradient(var(--gt-btn-top), var(--gt-btn-bot)); border:2px solid var(--gt-btn-border); box-shadow: inset 0 1px 0 rgba(255,255,255,.75); }


.gt-lobby-footer{
  flex:0 0 auto;
  padding: 0 18px 12px;
}
.gt-lobby-footer__line{
  height:1px;
  background:linear-gradient(90deg, rgba(122,126,138,0), rgba(122,126,138,.45) 14%, rgba(122,126,138,.45) 86%, rgba(122,126,138,0));
  margin-bottom:7px;
}
.gt-lobby-footer__text{
  text-align:center;
  font-size:14px;
  font-weight:900;
  font-style:italic;
  letter-spacing:.2px;
  color:#f6c744;
  text-shadow:
    0 1px 0 #fff0a7,
    0 2px 0 #b88c17,
    1px 3px 0 #7e5f0a,
    0 0 10px rgba(246,199,68,.18);
}
.gt-lobby-footer__copy,
.gt-lobby-footer__sep,
.gt-lobby-footer__email-label{
  color:#f6c744;
}
.gt-lobby-footer__sep{
  margin:0 9px;
}
.gt-lobby-footer__email-label{
  margin-right:4px;
}
.gt-lobby-footer__link{
  color:#f6c744;
  text-decoration:none;
}
.gt-lobby-footer__link:hover{
  color:#ffd96b;
  text-decoration:underline;
}

@media (max-width: 1160px){
  .gt-lobby-grid{ grid-template-columns: 280px 230px 1fr; }
  .gt-menu-link{ font-size:16px; }
}

@media (max-width: 980px){
  .gtHeaderInner{ flex-direction:column; align-items:stretch; }
  .gt-lobby-frame{ min-height:auto; }
  .gt-lobby-grid{ height:auto; grid-template-columns:1fr; }
  .gt-lobby-middle{ align-items:stretch; }
  .gt-lobby-right{ grid-template-rows:minmax(340px, auto) 220px; }
  .gt-character-stage{ min-height:360px; }
  .gt-lobby-footer{ padding: 4px 14px 12px; }
  .gt-lobby-footer__text{ font-size:13px; line-height:1.4; }
}


/* === Site-wide style alignment + narrower lobby === */
.gtHeader,
.gt-lobby-shell,
.wrap,
.forum-wrap,
.page-wrap{
  max-width: 1080px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.gtHeader{
  padding: 0 8px !important;
}

.gtHeaderInner{
  flex-wrap: nowrap !important;
  gap: 10px !important;
  padding: 9px 12px !important;
}

.gtBrand{
  flex: 0 0 auto !important;
}

.gtBrandText{
  font-size: 28px !important;
  line-height: .96 !important;
}

.gtNav{
  flex-wrap: nowrap !important;
  gap: 5px !important;
  min-width: 0 !important;
  overflow: hidden !important;
  flex: 1 1 auto !important;
}

.gtNavBtn,
.navbar a{
  font-size: 13px !important;
  padding: 8px 9px !important;
  white-space: nowrap !important;
}

.gtUserPill{
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  padding: 8px 12px !important;
}

.gt-lobby-shell{
  padding: 0 8px 18px !important;
}

.gt-lobby-frame{
  min-height: auto !important;
  height: auto !important;
}

.gt-lobby-topbar{
  height: 60px !important;
  padding: 0 18px !important;
}

.gt-lobby-title{
  font-size: 24px !important;
}

.gt-lobby-clock{
  min-width: 82px !important;
  font-size: 18px !important;
}

.gt-lobby-grid{
  grid-template-columns: 270px 220px minmax(0, 1fr) !important;
  gap: 12px !important;
  padding: 12px !important;
  height: auto !important;
  align-items: start !important;
}

.gt-character-stage{
  height: 390px !important;
  min-height: 390px !important;
  padding: 8px 14px !important;
}

.gt-character-portrait-wrap{
  width: 230px !important;
}

.gt-play-wrap{
  min-height: 56px !important;
}

.gt-play-button{
  gap: 10px !important;
}

.gt-play-button__icon{
  width: 52px !important;
  height: 52px !important;
  font-size: 26px !important;
}

.gt-play-button__text{
  font-size: 18px !important;
}

.gt-lobby-middle{
  min-height: 446px !important;
  align-items: center !important;
}

.gt-menu-panel{
  padding: 10px !important;
}

.gt-menu-inner{
  gap: 4px !important;
}

.gt-menu-link{
  font-size: 16px !important;
  line-height: 1.04 !important;
  padding: 2px 8px !important;
}

.gt-lobby-right{
  grid-template-rows: 392px 92px !important;
  gap: 8px !important;
  align-self: start !important;
}

.gt-chat-toolbar,
.gt-players-head{
  padding: 7px 10px !important;
}

.gt-chat-room,
.gt-players-head span:first-child{
  font-size: 16px !important;
}

.gt-chat-badge-wrap{
  gap: 6px !important;
  font-size: 12px !important;
}

.role-badge{
  min-height: 22px !important;
  padding: 2px 8px !important;
  font-size: 11px !important;
}

.gt-chat-body{
  height: auto !important;
  min-height: 0 !important;
  padding: 8px 10px !important;
}

.msg{
  margin: 0 0 4px !important;
}

.msg .bubble{
  line-height: 1.2 !important;
  font-size: 13px !important;
  padding: 0 0 4px !important;
}

.gt-chat-input-row{
  height: 40px !important;
  grid-template-columns: 30px 1fr 56px !important;
  gap: 5px !important;
  padding: 5px 6px !important;
}

.gt-emoji-btn,
.gt-send-btn{
  height: 26px !important;
  font-size: 13px !important;
}

.gt-chat-input{
  height: 26px !important;
  padding: 0 8px !important;
  font-size: 12px !important;
}

.gt-players-count{
  min-width: 22px !important;
  height: 22px !important;
  font-size: 11px !important;
}

.gt-players-list{
  height: calc(100% - 34px) !important;
  padding: 6px 8px !important;
}

.player-row{
  padding: 4px !important;
  gap: 8px !important;
}

.player-meta,
.time,
.hint{
  font-size: 11px !important;
}

/* Shared page chrome for non-lobby pages */
.wrap,
.forum-wrap,
.page-wrap{
  padding-left: 12px !important;
  padding-right: 12px !important;
}

.page-wrap{
  margin: 0 auto !important;
  padding-top: 0 !important;
  padding-bottom: 24px !important;
}

.card.chrome-card,
.panel{
  background: linear-gradient(var(--gt-frame-top), var(--gt-frame-bot)) !important;
  border: 2px solid var(--gt-frame-border) !important;
  border-radius: 22px !important;
  box-shadow: 0 14px 30px var(--gt-shadow) !important;
  overflow: hidden !important;
}

.page-card-head,
.head{
  background: linear-gradient(#9ad8ee,#64c7e6) !important;
  border-bottom: 2px solid var(--gt-frame-border) !important;
  color: #111 !important;
  padding: 16px 18px !important;
  font-size: 28px !important;
  font-weight: 900 !important;
}

.page-card-body,
.body{
  padding: 24px 20px !important;
  background: #f6f7fb !important;
  color: #111 !important;
}

.btn,
.btnx{
  text-decoration: none !important;
  color: #1a2731 !important;
  font-weight: 800 !important;
  font-size: 16px !important;
  padding: 10px 14px !important;
  border-radius: 12px !important;
  background: linear-gradient(var(--gt-btn-top), var(--gt-btn-bot)) !important;
  border: 2px solid var(--gt-btn-border) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75) !important;
  display: inline-flex !important;
  align-items: center !important;
}


.gt-chat-panel{
  display:grid !important;
  grid-template-rows:auto minmax(0, 1fr) auto !important;
}

.gt-players-panel{
  display:grid !important;
  grid-template-rows:auto minmax(0, 1fr) !important;
}

.gt-play-mode-wrap{
  margin-top: 4px !important;
  text-align: center !important;
}

.gt-play-mode-head{
  margin: 0 0 4px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #444 !important;
}

.gt-play-mode-options{
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 14px !important;
  flex-wrap: wrap !important;
}

.gt-play-mode-option{
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #222 !important;
  line-height: 1 !important;
}

.gt-play-mode-option input{
  margin: 0 !important;
}

.gt-play-mode-option span{
  display: inline-block !important;
}

@media (max-width: 1180px){
  .gtHeader,
  .gt-lobby-shell,
  .wrap,
  .forum-wrap,
  .page-wrap{
    max-width: 1020px !important;
  }
  .gt-lobby-grid{
    grid-template-columns: 250px 205px minmax(0, 1fr) !important;
  }
  .gt-character-stage{
    height: 370px !important;
    min-height: 370px !important;
  }
  .gt-character-portrait-wrap{
    width: 214px !important;
  }
}

@media (max-width: 980px){
  .gtHeaderInner{
    flex-wrap: wrap !important;
  }
  .gtNav{
    flex-wrap: wrap !important;
    overflow: visible !important;
  }
  .gt-lobby-grid{
    grid-template-columns: 1fr !important;
  }
  .gt-lobby-middle{
    min-height: 0 !important;
    align-items: stretch !important;
  }
  .gt-lobby-right{
    grid-template-rows: minmax(280px, auto) 110px !important;
  }
}


/* improved speech bubble */
.gtSpeechBubble{
  border:2px solid #333;
  border-radius:14px;
  padding:6px 10px;
  background:#fff;
  box-shadow:0 3px 8px rgba(0,0,0,.25);
  animation:gtBubbleAnim 3.2s forwards;
}

@keyframes gtBubbleAnim{
  0%{opacity:0; transform:translateY(8px)}
  12%{opacity:1}
  80%{opacity:1}
  100%{opacity:0}
}


/* GTAdmin gold treatment */
@keyframes gtAdminSparkle {
  0%   { text-shadow: 0 0 0 rgba(255,215,64,.0), 0 0 0 rgba(255,255,255,0); }
  25%  { text-shadow: 0 0 6px rgba(255,215,64,.35), 0 0 10px rgba(255,255,255,.15); }
  50%  { text-shadow: 0 0 10px rgba(255,215,64,.55), 0 0 16px rgba(255,255,255,.22); }
  75%  { text-shadow: 0 0 6px rgba(255,215,64,.35), 0 0 10px rgba(255,255,255,.15); }
  100% { text-shadow: 0 0 0 rgba(255,215,64,.0), 0 0 0 rgba(255,255,255,0); }
}
.gt-gold-admin,
.player-name.role-admin,
.chat-user-link.is-gtadmin,
.name.is-gtadmin,
#gtUserName.gt-gold-admin,
.clan-name.gt-gold-admin,
.gtadmin-inline{
  color:#d4a72c !important;
  font-weight:900 !important;
  text-shadow:0 0 6px rgba(255,215,64,.28);
  animation:gtAdminSparkle 2.4s ease-in-out infinite;
}
.gt-gold-admin::selection,
.player-name.role-admin::selection,
.chat-user-link.is-gtadmin::selection,
.name.is-gtadmin::selection{ background:#fff1b8; color:#6a4e00; }
.chat-user-link.is-system::selection,
.name.is-system::selection{ background:#ffd1d1; color:#7c0000; }


/* === Lobby layout tidy pass: restore top alignment, visible players, scrollable chat === */
.gt-lobby-frame{
  height: calc(100vh - 150px) !important;
  min-height: 660px !important;
  max-height: 760px !important;
}

.gt-lobby-grid{
  height: calc(100% - 60px) !important;
  grid-template-columns: 235px 165px minmax(0, 1fr) !important;
  align-items: stretch !important;
}

.gt-lobby-left,
.gt-lobby-middle,
.gt-lobby-right{
  min-height: 0 !important;
  align-self: stretch !important;
}

.gt-character-stage{
  height: 320px !important;
  min-height: 320px !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  padding-top: 10px !important;
}

.gt-character-portrait-wrap{
  width: 180px !important;
}

.gt-character-portrait{
  max-height: 292px !important;
  width: auto !important;
}

.gt-lobby-middle{
  min-height: 320px !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  padding-top: 44px !important;
}

.gt-menu-panel{
  width: 100% !important;
}

.gt-menu-link{
  font-size: 15px !important;
  line-height: 1.06 !important;
}

.gt-play-wrap{
  min-height: 50px !important;
  margin-top: 6px !important;
}

.gt-play-mode-wrap{
  margin-top: 2px !important;
}

.gt-lobby-right{
  min-height: 0 !important;
  grid-template-rows: minmax(0, 1fr) 98px !important;
  gap: 8px !important;
}

.gt-chat-panel,
.gt-players-panel{
  min-height: 0 !important;
  overflow: hidden !important;
}

.gt-chat-body{
  min-height: 0 !important;
  height: auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-gutter: stable !important;
}

.gt-chat-input-row{
  flex: 0 0 auto !important;
  min-height: 40px !important;
}

.gt-players-panel{
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
}

.gt-players-list{
  min-height: 0 !important;
  height: auto !important;
  overflow-y: auto !important;
}

@media (max-width: 1180px){
  .gt-lobby-grid{
    grid-template-columns: 220px 155px minmax(0, 1fr) !important;
  }
  .gt-character-stage{
    height: 300px !important;
    min-height: 300px !important;
  }
  .gt-character-portrait-wrap{
    width: 168px !important;
  }
}


/* === Lobby balance pass: larger character + slightly taller players panel === */
.gt-lobby-grid{
  grid-template-columns: 255px 170px minmax(0, 1fr) !important;
}

.gt-character-stage{
  height: 360px !important;
  min-height: 360px !important;
  padding-top: 8px !important;
}

.gt-character-portrait-wrap{
  width: 205px !important;
}

.gt-character-portrait{
  max-height: 334px !important;
}

.gt-lobby-middle{
  min-height: 360px !important;
  padding-top: 40px !important;
}

.gt-lobby-right{
  grid-template-rows: minmax(0, 1fr) 116px !important;
}

.gt-players-list{
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

@media (max-width: 1180px){
  .gt-lobby-grid{
    grid-template-columns: 235px 160px minmax(0, 1fr) !important;
  }
  .gt-character-stage{
    height: 338px !important;
    min-height: 338px !important;
  }
  .gt-character-portrait-wrap{
    width: 188px !important;
  }
  .gt-character-portrait{
    max-height: 312px !important;
  }
  .gt-lobby-middle{
    min-height: 338px !important;
  }
  .gt-lobby-right{
    grid-template-rows: minmax(0, 1fr) 110px !important;
  }
}


/* compact shared header */
.gtHeader--compact{ max-width:1080px !important; }
.gtHeaderInner--compact{
  min-height:64px;
  padding:10px 12px;
}
.gtHeaderLeft, .gtHeaderRight{
  display:flex;
  align-items:center;
  gap:10px;
}
.gtBackBtn, .gtHeaderUtility{
  appearance:none;
  text-decoration:none;
  color:#1a2631;
  font-weight:900;
  font-size:14px;
  line-height:1;
  padding:10px 14px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.14);
  background:linear-gradient(var(--gt-btn-top), var(--gt-btn-bot));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
  cursor:pointer;
}
.gtBackBtn:hover, .gtHeaderUtility:hover{ filter:brightness(1.03); color:#111; }
@media (max-width: 980px){
  .gtHeaderInner--compact{ flex-direction:row !important; flex-wrap:wrap; justify-content:space-between; }
  .gtBrandText{ font-size:26px; }
  .gtHeaderRight{ width:100%; justify-content:flex-end; }
}


.gt-feedback-wrap{
  display:flex;
  justify-content:center;
}
.gt-feedback-button{
  appearance:none;
  border:2px solid #8b8b96;
  border-radius:14px;
  padding:10px 16px;
  background:linear-gradient(#f9f9fc, #d9d8e1);
  color:#111;
  font-weight:900;
  font-size:16px;
  cursor:pointer;
  box-shadow:0 6px 10px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.8);
}
.gt-feedback-button:hover{ filter:brightness(1.03); }
.gt-feedback-modal{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.38);
  padding:16px;
}
.gt-feedback-modal.hidden{ display:none; }
.gt-feedback-card{
  width:min(520px, 100%);
  background:linear-gradient(#f8f8fc, #e2e1e9);
  border:3px solid var(--gt-panel-border);
  border-radius:18px;
  padding:18px;
  box-shadow:0 18px 36px rgba(0,0,0,.24);
}
.gt-feedback-title{
  font-size:24px;
  font-weight:900;
  color:#111;
}
.gt-feedback-copy{
  margin-top:6px;
  color:#444;
  font-size:14px;
  font-weight:700;
}
.gt-feedback-text{
  width:100%;
  min-height:170px;
  margin-top:12px;
  border:2px solid #a5a7b2;
  border-radius:14px;
  padding:12px;
  font:inherit;
  resize:vertical;
  box-sizing:border-box;
  background:#fff;
  color:#111;
}
.gt-feedback-actions{
  margin-top:12px;
  display:flex;
  justify-content:flex-end;
  gap:10px;
}
.gt-feedback-cancel,
.gt-feedback-send{
  appearance:none;
  border:2px solid #8b8b96;
  border-radius:12px;
  padding:10px 14px;
  font-weight:900;
  cursor:pointer;
}
.gt-feedback-cancel{ background:#f2f2f5; color:#111; }
.gt-feedback-send{ background:linear-gradient(#f9f9fc, #d9d8e1); color:#111; }
.gt-feedback-status{
  min-height:20px;
  margin-top:10px;
  color:#25475d;
  font-weight:800;
}


.gt-chat-room-wrap{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.gt-mini-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 6px;border-radius:999px;background:linear-gradient(180deg,#f4d66e,#d19b2f);color:#2a1500;font-weight:900;font-size:11px;box-shadow:0 2px 8px rgba(0,0,0,.25);vertical-align:middle;}
.gt-mini-badge[hidden]{display:none !important;}
.gt-mentions-panel[hidden]{display:none !important;}
.gt-menu-link--with-badge{display:flex;align-items:center;justify-content:center;gap:8px;}
.gt-mentions-toggle{appearance:none;border:1px solid rgba(0,0,0,.14);background:linear-gradient(var(--gt-btn-top), var(--gt-btn-bot));color:#18212a;padding:6px 10px;border-radius:999px;font-weight:900;cursor:pointer;display:inline-flex;align-items:center;gap:8px;box-shadow:inset 0 1px 0 rgba(255,255,255,.78);}
.gt-mentions-toggle:hover{filter:brightness(1.03);}
.gt-chat-panel{position:relative;}
.gt-mentions-panel{position:absolute;top:56px;right:14px;width:min(390px,calc(100% - 28px));max-height:360px;display:flex;flex-direction:column;background:linear-gradient(#f7f7fb,#e3e2ea);border:2px solid var(--gt-panel-border);border-radius:18px;box-shadow:0 18px 40px rgba(0,0,0,.28);z-index:30;overflow:hidden;}
.gt-mentions-panel__head{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:2px solid #a7a9b4;background:linear-gradient(#fafafc,#d9d8e1);font-weight:900;color:#202a34;}
.gt-mentions-panel__close{appearance:none;border:1px solid rgba(0,0,0,.12);background:linear-gradient(var(--gt-btn-top), var(--gt-btn-bot));color:#1b232c;font-size:20px;line-height:1;cursor:pointer;border-radius:10px;min-width:34px;height:30px;box-shadow:inset 0 1px 0 rgba(255,255,255,.75);}
.gt-mentions-panel__close:hover{filter:brightness(1.03);}
.gt-mentions-panel__list{display:flex;flex-direction:column;gap:10px;padding:12px;overflow:auto;background:#f3f3f8;}
.gt-mentions-panel__empty{padding:16px 14px 18px;color:#5c6877;font-weight:700;background:#f3f3f8;}
.gt-mention-item{appearance:none;border:1px solid #b8bbc6;background:linear-gradient(#ffffff,#f1f1f7);color:#16202a;border-radius:14px;padding:11px 12px;text-align:left;cursor:pointer;display:flex;flex-direction:column;gap:6px;box-shadow:0 3px 10px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.85);}
.gt-mention-item:hover{background:linear-gradient(#fffdf5,#f7efd0);border-color:#d1b15b;}
.gt-mention-item.is-unread{border-color:#d1ad47;background:linear-gradient(#fff8de,#f5e2a7);box-shadow:0 3px 12px rgba(171,126,19,.16), inset 0 1px 0 rgba(255,255,255,.9);}
.gt-mention-item__head{display:flex;align-items:center;justify-content:space-between;gap:10px;}
.gt-mention-item__name{font-weight:900;color:#7a174f;}
.gt-mention-item__time{font-size:12px;color:#5f6670;white-space:nowrap;}
.gt-mention-item__text{font-size:13px;color:#1d2731;line-height:1.4;word-break:break-word;}
.msg.mention-jump .bubble{outline:2px solid rgba(244,214,110,.85);box-shadow:0 0 0 4px rgba(244,214,110,.18);}


/* === Presence list polish === */
.player-row{display:grid;grid-template-columns:10px 42px minmax(0,1fr);align-items:center;gap:10px;padding:10px 12px;border-radius:14px;cursor:pointer;transition:background .15s ease, transform .15s ease;}
.player-row:hover{background:rgba(255,255,255,.62);transform:translateY(-1px);}
.player-avatar{width:42px;height:42px;border-radius:50%;object-fit:cover;border:2px solid rgba(0,0,0,.14);background:#fff;box-shadow:inset 0 1px 0 rgba(255,255,255,.75);}
.player-main{min-width:0;display:flex;flex-direction:column;gap:3px;}
.player-meta{display:flex;align-items:center;gap:6px;min-height:18px;color:#5b6571;font-size:12px;font-weight:800;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
.player-meta-link{color:#6d517a;}
.player-tag{display:inline-flex;align-items:center;justify-content:center;min-height:18px;padding:0 7px;border-radius:999px;background:rgba(255,255,255,.86);border:1px solid rgba(0,0,0,.08);color:#4c5561;font-size:11px;font-weight:900;}
.player-clan-emblem{width:16px;height:16px;border-radius:4px;object-fit:cover;border:1px solid rgba(0,0,0,.12);background:#fff;}
