/* ============================================================
   STEEZY GLOBAL HEADER + LIVE CHAT — v145
   Single authority for the site header on every URL.
   Game/page styles must not define these selectors.
   ============================================================ */
:root{
  --steezy-global-header-h:64px;
  --steezy-global-rail-w:52px;
  --steezy-global-menu-w:218px;
  --steezy-chat-w:348px;
  --steezy-nav-w:var(--steezy-global-rail-w);
}
body.steezy-global-shell.steezy-side-open{--steezy-nav-w:var(--steezy-global-menu-w)}

body.steezy-global-shell > .top-header.steezy-global-header{
  position:fixed;
  inset:0 0 auto 0;
  z-index:2147481000;
  width:auto;
  max-width:none;
  height:var(--steezy-global-header-h);
  min-height:var(--steezy-global-header-h);
  margin:0;
  padding:0 18px;
  box-sizing:border-box;
  display:grid;
  grid-template-columns:minmax(0,1fr) max-content minmax(0,1fr);
  align-items:center;
  gap:12px;
  overflow:visible;
  transform:none;
  background:#1a2f3d;
  border:0;
  border-bottom:1px solid #294654;
  border-radius:0;
  box-shadow:0 2px 14px rgba(0,0,0,.22);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  user-select:none;
}
body.steezy-global-shell > .top-header.steezy-global-header *,
body.steezy-global-shell > .top-header.steezy-global-header *::before,
body.steezy-global-shell > .top-header.steezy-global-header *::after{box-sizing:border-box}

body.steezy-global-shell > .top-header.steezy-global-header .th-left,
body.steezy-global-shell > .top-header.steezy-global-header .th-center,
body.steezy-global-shell > .top-header.steezy-global-header .th-right{
  position:static;
  inset:auto;
  transform:none;
  min-width:0;
  height:auto;
  margin:0;
  display:flex;
  align-items:center;
  overflow:visible;
}
body.steezy-global-shell > .top-header.steezy-global-header .th-left{
  grid-column:1;
  width:100%;
  justify-self:stretch;
  justify-content:flex-start;
  gap:10px;
}
body.steezy-global-shell > .top-header.steezy-global-header .th-center{
  grid-column:2;
  width:max-content;
  max-width:min(420px,45vw);
  justify-self:center;
  justify-content:center;
  gap:0;
  flex:0 1 auto;
}
body.steezy-global-shell > .top-header.steezy-global-header .th-right{
  grid-column:3;
  width:100%;
  justify-self:stretch;
  justify-content:flex-end;
  gap:8px;
  white-space:nowrap;
}

body.steezy-global-shell > .top-header.steezy-global-header .site-menu-btn{
  position:static;
  width:38px;height:38px;min-width:38px;flex:0 0 38px;
  margin:0;padding:0;
  display:inline-flex;align-items:center;justify-content:center;
  border:0;border-radius:7px;
  background:transparent;color:#9eb4c2;box-shadow:none;
  font:900 1.05rem/1 Inter,system-ui,sans-serif;
}
body.steezy-global-shell > .top-header.steezy-global-header .site-menu-btn:hover{background:#244454;color:#fff}

body.steezy-global-shell > .top-header.steezy-global-header .th-brand{
  display:inline-flex;align-items:center;flex:0 0 auto;
  color:#fff;text-decoration:none;white-space:nowrap;line-height:1;
}
body.steezy-global-shell > .top-header.steezy-global-header .th-brand-s{
  display:inline-block;
  font-family:Georgia,'Times New Roman',serif;
  font-size:2.18rem;line-height:.8;font-weight:900;font-style:italic;letter-spacing:-5px;
  transform:skewX(-8deg) translateY(-1px);
  text-shadow:0 3px 18px rgba(0,0,0,.45);
}
body.steezy-global-shell > .top-header.steezy-global-header .th-brand-word{
  margin-left:5px;
  font-family:Georgia,'Times New Roman',serif;
  font-size:1.38rem;line-height:1;font-weight:900;font-style:italic;letter-spacing:-1.4px;
  text-shadow:0 3px 18px rgba(0,0,0,.45);
}

body.steezy-global-shell > .top-header.steezy-global-header .cur-dd{position:relative;min-width:0;max-width:100%}
body.steezy-global-shell > .top-header.steezy-global-header .cur-dd-btn{
  position:static;
  width:auto;min-width:145px;max-width:250px;height:46px;
  padding:0 12px;margin:0;
  display:flex;align-items:center;justify-content:center;gap:7px;
  border:0;border-radius:8px 0 0 8px;
  background:#102531;color:#eaf3f8;box-shadow:none;
  font:900 .78rem/1 Inter,system-ui,sans-serif;white-space:nowrap;
}
body.steezy-global-shell > .top-header.steezy-global-header .cur-dd-active-amount{
  min-width:38px;overflow:visible;text-overflow:clip;white-space:nowrap;
}
body.steezy-global-shell > .top-header.steezy-global-header .site-wallet-btn{
  position:static;flex:0 0 auto;
  width:auto;min-width:74px;height:46px;
  padding:0 18px;margin:0;
  border:0;border-radius:0 8px 8px 0;
  background:#1475e1;color:#fff;
  font:900 .78rem/1 Inter,system-ui,sans-serif;
}
body.steezy-global-shell > .top-header.steezy-global-header .site-wallet-btn:hover{background:#2386ee}

/* Currency dropdown is now global too; no page owns a second copy. */
body.steezy-global-shell > .top-header.steezy-global-header .cur-dd-menu{
  display:none;
  position:absolute;
  top:calc(100% + 7px);left:50%;right:auto;
  transform:translateX(-50%);
  min-width:205px;
  padding:6px;
  border:1px solid #365365;
  border-radius:10px;
  background:#102331;
  box-shadow:0 16px 36px rgba(0,0,0,.45);
  z-index:2147481200;
}
body.steezy-global-shell > .top-header.steezy-global-header .cur-dd.open .cur-dd-menu{display:block}
body.steezy-global-shell > .top-header.steezy-global-header .cur-dd-menu > button,
body.steezy-global-shell > .top-header.steezy-global-header .cur-dd-item{
  width:100%;min-height:38px;padding:0 10px;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  border:0;border-radius:7px;background:transparent;color:#e7f0f6;
  font:800 .75rem/1 Inter,system-ui,sans-serif;text-align:left;
}
body.steezy-global-shell > .top-header.steezy-global-header .cur-dd-menu > button:hover,
body.steezy-global-shell > .top-header.steezy-global-header .cur-dd-item:hover{background:#213846}
body.steezy-global-shell > .top-header.steezy-global-header .cur-dd-menu .gc{color:#fbbf24}
body.steezy-global-shell > .top-header.steezy-global-header .cur-dd-menu .sb{color:#4ade80}

body.steezy-global-shell > .top-header.steezy-global-header .th-login,
body.steezy-global-shell > .top-header.steezy-global-header .th-register,
body.steezy-global-shell > .top-header.steezy-global-header .th-user-btn{
  position:static;transform:none;
  font-family:Inter,system-ui,sans-serif;
}
body.steezy-global-shell > .top-header.steezy-global-header .th-login{
  height:40px;min-height:40px;padding:0 13px;
  border-radius:7px;border:1px solid #365365;
  background:#203b4b;color:#eaf3f8;
  font-size:.73rem;font-weight:900;
}
body.steezy-global-shell > .top-header.steezy-global-header .th-register{background:#1475e1;border-color:#1475e1;color:#fff}

body.steezy-global-shell > .top-header.steezy-global-header .simple-user-wrap,
body.steezy-global-shell > .top-header.steezy-global-header .simple-home-user-wrap{
  position:relative;min-width:0;margin-left:auto;overflow:visible;
}
body.steezy-global-shell > .top-header.steezy-global-header .th-user-btn{
  width:auto;max-width:min(300px,36vw);
  height:44px;min-height:44px;
  padding:0 11px;margin:0;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  overflow:visible;
  border:1px solid #365365;border-radius:9px;
  background:#203b4b;color:#edf6fb;box-shadow:none;
  font-size:.76rem;font-weight:900;line-height:1;
}
body.steezy-global-shell > .top-header.steezy-global-header .th-user-btn:hover{background:#294b5e;border-color:#55788d}
body.steezy-global-shell > .top-header.steezy-global-header .th-user-btn > #headerUser,
body.steezy-global-shell > .top-header.steezy-global-header .th-user-btn > #homeUserName,
body.steezy-global-shell > .top-header.steezy-global-header .th-user-btn > #stickyHeaderUserName{
  min-width:0;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
body.steezy-global-shell > .top-header.steezy-global-header .th-caret{flex:0 0 auto;color:#8fa9b9;font-size:.70rem}

body.steezy-global-shell > .top-header.steezy-global-header .steezy-header-rank-icon{
  display:none;
  width:32px;height:32px;min-width:32px;max-width:32px;flex:0 0 32px;
  margin:0;padding:0;object-fit:contain;object-position:center;
  visibility:hidden;opacity:0;border:0;border-radius:0;background:transparent;
  filter:drop-shadow(0 3px 5px rgba(0,0,0,.48));
}
body.steezy-global-shell > .top-header.steezy-global-header .steezy-header-rank-icon.has-rank{
  display:block;visibility:visible;opacity:1;
}

body.steezy-global-shell > .top-header.steezy-global-header .simple-user-menu{
  display:none;
  position:absolute;top:calc(100% + 7px);right:0;left:auto;
  min-width:155px;padding:6px;
  border:1px solid #365365;border-radius:9px;
  background:#102331;box-shadow:0 16px 36px rgba(0,0,0,.45);
  z-index:2147481200;
}
body.steezy-global-shell > .top-header.steezy-global-header .simple-user-wrap.open .simple-user-menu,
body.steezy-global-shell > .top-header.steezy-global-header .simple-home-user-wrap.open .simple-user-menu{display:block}
body.steezy-global-shell > .top-header.steezy-global-header .simple-user-menu button{
  width:100%;height:36px;padding:0 11px;border:0;border-radius:7px;
  background:transparent;color:#e7f0f6;font-weight:800;text-align:left;
}
body.steezy-global-shell > .top-header.steezy-global-header .simple-user-menu button:hover{background:#213846}

/* Vault entry inside the shared account dropdown. */
body.steezy-global-shell > .top-header.steezy-global-header .simple-user-menu .steezy-vault-menu-btn{
  display:flex;align-items:center;gap:8px;margin-bottom:4px;padding-bottom:2px;
  border-bottom:1px solid rgba(126,165,188,.16);
}
body.steezy-global-shell > .top-header.steezy-global-header .simple-user-menu .steezy-vault-menu-btn span{
  width:18px;color:#b9d4e3;text-align:center;font-size:.78rem;
}

/* Shared account overlays must never be clipped by the header. */
body.steezy-global-shell .home-vip-overlay,
body.steezy-global-shell .vip-overlay,
body.steezy-global-shell .sticky-wallet-overlay,
body.steezy-global-shell .steezy-vault-overlay{z-index:2147483400 !important}

/* Live-chat toggle. */
body.steezy-global-shell > .top-header.steezy-global-header .steezy-chat-toggle{
  position:relative;
  width:44px;height:44px;min-width:44px;max-width:44px;flex:0 0 44px;
  padding:0;margin:0;
  display:inline-flex;align-items:center;justify-content:center;
  overflow:visible;
  border:1px solid #365365;border-radius:8px;
  background:#203b4b;color:#dbe9f1;box-shadow:none;
}
body.steezy-global-shell > .top-header.steezy-global-header .steezy-chat-toggle[hidden]{display:none}
body.steezy-global-shell > .top-header.steezy-global-header .steezy-chat-toggle:hover,
body.steezy-global-shell.steezy-chat-open > .top-header.steezy-global-header .steezy-chat-toggle{background:#294b5e;border-color:#55788d;color:#fff}
.steezy-chat-icon{position:relative;display:block;width:20px;height:22px;flex:0 0 20px;border:2px solid currentColor;border-radius:2px}
.steezy-chat-icon::before{content:'';position:absolute;left:7px;top:0;bottom:0;width:2px;background:currentColor}
.steezy-chat-icon::after{content:'';position:absolute;left:11px;top:4px;width:4px;height:2px;border-radius:2px;background:currentColor;box-shadow:0 5px 0 currentColor,0 10px 0 currentColor}
.steezy-chat-unread{display:none;position:absolute;right:-5px;top:-5px;min-width:18px;height:18px;padding:0 4px;align-items:center;justify-content:center;border:2px solid #1a2f3d;border-radius:10px;background:#ef4444;color:#fff;font:900 9px/1 Arial,sans-serif}
.steezy-chat-unread.show{display:flex}

/* The chat rail owns the entire right edge, including the header row: no blank top gap. */
body.steezy-global-shell > .steezy-chat-panel{
  position:fixed;
  top:0;right:0;bottom:0;left:auto;
  z-index:2147481600;
  width:var(--steezy-chat-w);max-width:100vw;
  display:flex;flex-direction:column;box-sizing:border-box;overflow:hidden;
  background:#102331;border-left:1px solid #294654;box-shadow:-14px 0 32px rgba(0,0,0,.20);
  color:#dce9f1;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  transform:translateX(100%);visibility:hidden;pointer-events:none;
  transition:transform .20s cubic-bezier(.22,.7,.24,1),visibility .20s linear;
}
body.steezy-global-shell.steezy-chat-open > .steezy-chat-panel{transform:translateX(0);visibility:visible;pointer-events:auto}
.steezy-chat-head{min-height:64px;padding:0 10px 0 15px;display:flex;align-items:center;justify-content:space-between;gap:12px;box-sizing:border-box;border-bottom:1px solid #294654;background:#132a38}
.steezy-chat-head > div{min-width:0;display:flex;flex-direction:column;gap:2px}
.steezy-chat-head strong{color:#f4f8fb;font-size:.90rem;font-weight:900}
.steezy-chat-head span{color:#7f9aaa;font-size:.64rem;font-weight:700}
.steezy-chat-close{width:36px;height:36px;flex:0 0 36px;border:0;border-radius:7px;background:transparent;color:#a9bfcd;font-size:1.45rem;line-height:1;cursor:pointer}
.steezy-chat-close:hover{background:#203b4b;color:#fff}
.steezy-chat-feed{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;padding:8px 10px 12px;box-sizing:border-box;scrollbar-width:thin;scrollbar-color:#365565 transparent}
.steezy-chat-feed::-webkit-scrollbar{width:6px}.steezy-chat-feed::-webkit-scrollbar-thumb{background:#365565;border-radius:8px}
.steezy-chat-empty{margin:18px 8px;padding:14px 12px;border:1px solid rgba(126,165,188,.14);border-radius:9px;background:rgba(21,46,60,.56);color:#809baa;text-align:center;font-size:.72rem;font-weight:700;line-height:1.45}
.steezy-chat-message{display:grid;grid-template-columns:32px minmax(0,1fr);gap:8px;padding:7px 5px;border-radius:8px}
.steezy-chat-message:hover{background:rgba(255,255,255,.025)}.steezy-chat-message.mine{background:rgba(32,99,139,.10)}
.steezy-chat-avatar{width:30px;height:30px;margin-top:0;display:flex;align-items:center;justify-content:center;overflow:visible;color:#829baa;font-size:.78rem;font-weight:1000}
.steezy-chat-avatar img{display:block;width:30px;height:30px;object-fit:contain;filter:drop-shadow(0 2px 4px rgba(0,0,0,.42))}
.steezy-chat-avatar.is-unranked{border:1px solid #3b596a;border-radius:50%;background:#1d3949;color:#8fa9b9;font-size:.72rem}
.steezy-chat-message-body{min-width:0}
.steezy-chat-message-meta{display:flex;align-items:baseline;gap:7px;min-width:0;margin-bottom:2px}
.steezy-chat-message-meta strong{min-width:0;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#a9bfd0;font-size:.70rem;font-weight:900}
.steezy-chat-message.mine .steezy-chat-message-meta strong{color:#9ed7fb}
.steezy-chat-message-meta time{margin-left:auto;color:#587585;font-size:.56rem;font-weight:700;white-space:nowrap}
.steezy-chat-message-text{color:#e4edf2;font-size:.74rem;line-height:1.38;font-weight:620;overflow-wrap:anywhere;white-space:pre-wrap}
.steezy-chat-status{min-height:18px;padding:0 12px 4px;color:#7592a3;font-size:.61rem;font-weight:700}.steezy-chat-status.error{color:#fb8b96}
.steezy-chat-compose{display:grid;grid-template-columns:minmax(0,1fr) 68px;gap:7px;padding:9px 10px;border-top:1px solid #294654;background:#102331}
.steezy-chat-compose input{width:100%;height:42px;min-width:0;padding:0 11px;border:1px solid #365565;border-radius:8px;outline:0;background:#0d202c;color:#eaf3f8;font-size:.74rem;font-weight:650}
.steezy-chat-compose input::placeholder{color:#6f8998}.steezy-chat-compose input:focus{border-color:#3e8cc1;box-shadow:0 0 0 2px rgba(62,140,193,.12)}
.steezy-chat-compose button{height:42px;border:0;border-radius:8px;background:#1475e1;color:#fff;font-size:.73rem;font-weight:900;cursor:pointer}.steezy-chat-compose button:hover{background:#2386ee}.steezy-chat-compose button:disabled,.steezy-chat-compose input:disabled{opacity:.55;cursor:not-allowed}
.steezy-chat-foot{min-height:34px;padding:0 12px;display:flex;align-items:center;gap:6px;border-top:1px solid rgba(41,70,84,.72);color:#7894a4;font-size:.61rem;font-weight:750;background:#0d202c}
.steezy-chat-online-dot{width:7px;height:7px;border-radius:50%;background:#22c55e;box-shadow:0 0 8px rgba(34,197,94,.32)}.steezy-chat-limit{margin-left:auto;color:#587585}

/* Desktop chat is a real rail. It reduces the site header and page viewport instead of covering the game. */
@media(min-width:980px){
  body.steezy-global-shell.steezy-chat-open > .top-header.steezy-global-header{right:var(--steezy-chat-w)}
  body.steezy-global-shell.steezy-chat-open #steezyHomeViewport,
  body.steezy-global-shell.steezy-chat-open #steezyPageViewport{
    width:calc(100vw - var(--steezy-nav-w,52px) - var(--steezy-chat-w)) !important;
    max-width:calc(100vw - var(--steezy-nav-w,52px) - var(--steezy-chat-w)) !important;
  }
}
@media(max-width:1050px){
  body.steezy-global-shell > .top-header.steezy-global-header{padding-left:8px;padding-right:8px;gap:6px}
  body.steezy-global-shell > .top-header.steezy-global-header .th-brand-word{display:none}
  body.steezy-global-shell > .top-header.steezy-global-header .th-brand-s{font-size:1.7rem}
  body.steezy-global-shell > .top-header.steezy-global-header .th-center{max-width:42vw}
  body.steezy-global-shell > .top-header.steezy-global-header .cur-dd-btn{min-width:128px;height:42px;padding:0 8px}
  body.steezy-global-shell > .top-header.steezy-global-header .site-wallet-btn{height:42px;padding:0 10px}
}
@media(max-width:979px){:root{--steezy-chat-w:min(360px,100vw)}body.steezy-global-shell > .steezy-chat-panel{box-shadow:-18px 0 40px rgba(0,0,0,.38)}}
@media(max-width:760px){
  body.steezy-global-shell > .top-header.steezy-global-header .site-wallet-btn{width:38px;min-width:38px;padding:0;font-size:0}
  body.steezy-global-shell > .top-header.steezy-global-header .site-wallet-btn::after{content:'$';font-size:.84rem;font-weight:1000}
}
@media(max-width:620px){
  body.steezy-global-shell > .top-header.steezy-global-header .th-user-btn{height:42px;min-height:42px;padding:0 8px;gap:5px;max-width:140px}
  body.steezy-global-shell > .top-header.steezy-global-header .steezy-header-rank-icon{width:28px;height:28px;min-width:28px;max-width:28px;flex-basis:28px}
  body.steezy-global-shell > .top-header.steezy-global-header .th-user-btn > #headerUser,
  body.steezy-global-shell > .top-header.steezy-global-header .th-user-btn > #homeUserName,
  body.steezy-global-shell > .top-header.steezy-global-header .th-user-btn > #stickyHeaderUserName{max-width:68px}
  body.steezy-global-shell > .top-header.steezy-global-header .steezy-chat-toggle{width:38px;height:42px;min-width:38px;max-width:38px;flex-basis:38px}
  .steezy-chat-icon{width:18px;height:20px;flex-basis:18px}
  body.steezy-global-shell > .steezy-chat-panel{width:100vw;max-width:100vw;border-left:0}
  .steezy-chat-message-meta strong{max-width:54vw}
}
