/* Keep the dismiss action outside the history's scrollable content. */
.ar-report .ar-server-history{
 width:min(850px,calc(100vw - 24px));max-width:calc(100vw - 24px);
 height:min(860px,calc(100dvh - 24px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)));
 max-height:calc(100dvh - 24px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));
 padding:0;margin:auto;overflow:hidden;box-sizing:border-box;grid-template-rows:auto minmax(0,1fr);
}
.ar-report .ar-server-history[open]{display:grid}
.ar-server-history .ar-history-header{
 position:relative!important;inset:auto!important;z-index:1;min-width:0;width:auto!important;
 display:flex;align-items:flex-start;gap:16px;margin:0;padding:20px 24px 18px;
 border-bottom:1px solid var(--ar-line);background:var(--panel,#171d25)!important;
}
.ar-history-header>div{flex:1 1 auto;min-width:0}
.ar-history-header h2{overflow-wrap:anywhere}
.ar-report .ar-history-header .ar-detail-close{
 flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;gap:6px;
 width:auto;min-width:76px;min-height:44px;padding:10px 12px;margin:0;
 border-radius:9px;white-space:nowrap;touch-action:manipulation;
 color:var(--text);background:var(--ar-surface,#9d8d7d0c);cursor:pointer;
}
.ar-report .ar-history-header .ar-detail-close:hover{border-color:var(--ar-gold);background:#b59a701a}
.ar-history-body{min-height:0;min-width:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:20px 24px 24px;scrollbar-gutter:stable}
.ar-server-history .ar-history-list{max-height:none;overflow:visible}
.ar-server-history .ar-history-stats{grid-template-columns:minmax(0,1.3fr) repeat(2,minmax(0,1fr))}
.ar-server-history .ar-history-stats>div{min-width:0}
.ar-server-history .ar-trend-bars{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:9px;padding:0}
.ar-server-history .ar-trend-item{min-width:0;max-width:none}
.ar-server-history .ar-trend-item>b{white-space:nowrap}
@media(max-width:600px){
 .ar-server-history .ar-history-header{padding:16px;gap:10px}
 .ar-server-history .ar-history-header h2{font-size:25px;margin:5px 0}
 .ar-server-history .ar-history-header h2 span{font-size:18px;margin-left:6px}
 .ar-server-history .ar-history-header p{font-size:11px}
 .ar-history-body{padding:16px;scrollbar-gutter:auto}
 .ar-server-history .ar-history-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 12px}
 .ar-server-history .ar-history-stats>div:first-child{grid-column:1/-1}
 .ar-server-history .ar-history-stats b{font-size:26px;line-height:1.35}
 .ar-server-history .ar-history-stats b small{font-size:11px;margin:0 5px 0 2px}
 .ar-server-history .ar-history-stats span{font-size:10px}
 .ar-server-history .ar-trend-bars{gap:5px}
 .ar-server-history .ar-trend-item>b{font-size:17px}
 .ar-server-history .ar-trend-item small{font-size:9px}
 .ar-server-history .ar-trend-track{height:68px;border-radius:4px}
 .ar-server-history .ar-history-date{gap:8px;align-items:flex-start}
 .ar-server-history .ar-history-date>small{max-width:60%;text-align:right;white-space:normal}
 .ar-server-history .ar-history-share{width:100%;white-space:normal}
}
