/* Protected Sagroth2 Market window.
 * Only the surrounding dialog is styled here; NEVER inject this into Market.
 * Market owns its fixed canvas, internal scrolling, forms and standalone page.
 */
#account-tool[data-market-surface="sagroth"] {
  position:fixed; z-index:200; inset:0; display:grid; place-items:center; padding:18px;
}
#account-tool[data-market-surface="sagroth"] .account-tool-backdrop {
  position:absolute; inset:0; border:0; background:rgba(5,0,1,.78); backdrop-filter:blur(4px); cursor:default;
}
#account-tool[data-market-surface="sagroth"] .account-tool-window {
  width:min(1018px,calc(100vw - 24px)); height:min(699px,calc(100vh - 24px)); max-height:none;
  position:relative; z-index:1; display:grid; grid-template-rows:42px minmax(0,1fr);
  overflow:hidden; border:1px solid rgba(233,169,47,.58); border-radius:10px; background:#120104;
  box-shadow:0 28px 80px rgba(0,0,0,.72),inset 0 0 0 2px rgba(255,215,106,.06);
}
#account-tool[data-market-surface="sagroth"] .account-tool-window:focus { outline:none; }
#account-tool[data-market-surface="sagroth"] .account-tool-head {
  display:flex; align-items:center; gap:10px; padding:0 8px 0 14px;
  border-bottom:1px solid rgba(233,169,47,.36);
  background:linear-gradient(180deg,rgba(79,7,12,.98),rgba(30,2,5,.99)); color:#fff0d2;
  font-family:"Cinzel",serif; font-size:12px; letter-spacing:.08em;
}
#account-tool[data-market-surface="sagroth"] .account-tool-dot {
  width:8px; height:8px; border-radius:50%; background:#d53a3f; box-shadow:0 0 9px rgba(213,58,63,.72);
}
#account-tool[data-market-surface="sagroth"] .account-tool-close {
  width:32px; height:32px; display:grid; place-items:center; margin-left:auto; padding:0;
  border:1px solid rgba(233,169,47,.28); border-radius:6px; background:rgba(24,2,5,.82);
  color:#f6ddbd; font-size:22px; line-height:1; cursor:pointer;
}
#account-tool[data-market-surface="sagroth"] .account-tool-close:hover { border-color:#e9a92f; color:#fff4d2; }
#account-tool[data-market-surface="sagroth"] .platform-desktop-glyph { display:inline; }
#account-tool[data-market-surface="sagroth"] .platform-mobile-icon { display:none; }
#account-tool[data-market-surface="sagroth"] #account-tool-frame {
  display:block; width:100%; height:100%; min-width:0; min-height:0; border:0; background:#0e0103;
}
html.account-tool-open, body.account-tool-open { overflow:hidden!important; overscroll-behavior:none; }
@media(max-width:560px) {
  #account-tool[data-market-surface="sagroth"] { padding:5px; }
  #account-tool[data-market-surface="sagroth"] .account-tool-window { width:100%; height:calc(100vh - 10px); border-radius:7px; }
}
@media(max-width:820px) and (hover:none) and (pointer:coarse) {
  #account-tool[data-market-surface="sagroth"] .platform-desktop-glyph { display:none; }
  #account-tool[data-market-surface="sagroth"] svg.platform-mobile-icon { display:inline-block; width:1em; height:1em; max-width:1em; max-height:1em; overflow:visible; pointer-events:none; }
}
