/* GrowtopiaTools V85: small targeted repairs to V84. Existing art preserved. */
/* Rank-filter menu must escape its glass panel, rather than being clipped. */
body[data-theme="glass"] #content > .v84-rank-controls{
 position:relative!important;isolation:auto!important;overflow:visible!important;z-index:35!important;
 padding:9px 13px!important;margin:0 0 16px!important;min-height:66px!important;
}
body[data-theme="glass"] #content > .v84-rank-controls::before{z-index:-1;}
body[data-theme="glass"] #content > .v84-rank-controls .v5-toolbar{position:relative;overflow:visible!important;z-index:36!important;min-height:44px;padding:4px!important;align-items:center!important;}
body[data-theme="glass"] #content > .v84-rank-controls .v56-dc-picker{position:relative;z-index:50!important;}
body[data-theme="glass"] #content > .v84-rank-controls .v56-dc-options{z-index:60!important;max-height:min(340px,55vh);}
body[data-theme="glass"] #content > .v84-rank-columns{position:relative;z-index:1;}
/* Calendar: restore generous tile height and sprite size. Label sizes are set
   by measured available tile width in v85-fixes.js (no wrapping/truncation). */
body[data-theme="glass"] #content .calendar-panel .calendar-week .day-cell,
body[data-theme="glass"] #content .v5-compact-calendar.calendar-panel .calendar-week .day-cell{
 min-height:118px!important;padding:8px 5px 7px!important;gap:5px!important;overflow:hidden!important;
}
body[data-theme="glass"] #content .calendar-panel .calendar-week .day-cell .day-art,
body[data-theme="glass"] #content .v5-compact-calendar.calendar-panel .calendar-week .day-cell .day-art{min-height:44px!important;}
body[data-theme="glass"] #content .calendar-panel .calendar-week .day-cell .day-art>img,
body[data-theme="glass"] #content .v5-compact-calendar.calendar-panel .calendar-week .day-cell .day-art>img{
 width:43px!important;height:43px!important;max-width:43px!important;max-height:43px!important;
}
body[data-theme="glass"] #content .calendar-panel .calendar-week .day-cell .day-title,
body[data-theme="glass"] #content .v5-compact-calendar.calendar-panel .calendar-week .day-cell .day-title{
 display:block!important;-webkit-line-clamp:unset!important;line-clamp:unset!important;
 white-space:nowrap!important;overflow:hidden!important;text-overflow:clip!important;
 word-break:normal!important;overflow-wrap:normal!important;line-height:1.2!important;
 font-weight:790!important;letter-spacing:-.13px!important;min-height:16px!important;max-height:none!important;
 font-size:12px!important;text-align:center!important;
}
body[data-theme="glass"] #content .calendar-panel .calendar-week .day-cell .v5-cycle-label{
 position:relative;z-index:2;font-size:7.7px!important;padding:3px 4px!important;
 letter-spacing:.2px!important;line-height:1.1!important;min-height:16px!important;max-width:100%;
}
@media(max-width:780px){
 body[data-theme="glass"] #content .calendar-panel .calendar-week .day-cell,
 body[data-theme="glass"] #content .v5-compact-calendar.calendar-panel .calendar-week .day-cell{
  min-height:89px!important;padding:5px 3px!important;gap:2px!important;}
 body[data-theme="glass"] #content .calendar-panel .calendar-week .day-cell .day-art>img,
 body[data-theme="glass"] #content .v5-compact-calendar.calendar-panel .calendar-week .day-cell .day-art>img{
  width:30px!important;height:30px!important;max-width:30px!important;max-height:30px!important;}
 body[data-theme="glass"] #content .calendar-panel .calendar-week .day-cell .day-art,
 body[data-theme="glass"] #content .v5-compact-calendar.calendar-panel .calendar-week .day-cell .day-art{min-height:30px!important;}
}
/* Profile: give icons and values breathing room; avoid clipping at full width. */
body[data-theme="glass"] #modal-root .v5-profile-dialog .v73-profile-quickstats{gap:8px!important;min-width:0;}
body[data-theme="glass"] #modal-root .v5-profile-dialog .v73-profile-quickstats .v60-quickstat{
 grid-template-columns:28px minmax(0,1fr)!important;gap:10px!important;
 padding:9px 9px!important;min-width:0!important;overflow:hidden;}
body[data-theme="glass"] #modal-root .v5-profile-dialog .v73-profile-quickstats .v60-quickstat-icon{min-width:28px;}
body[data-theme="glass"] #modal-root .v5-profile-dialog .v73-profile-quickstats .v60-quickstat-icon img{width:28px!important;height:28px!important;}
body[data-theme="glass"] #modal-root .v5-profile-dialog .v73-profile-quickstats .v60-stat-text{min-width:0;padding-left:1px;}
body[data-theme="glass"] #modal-root .v5-profile-dialog .v73-profile-quickstats .v60-stat-text b{font-size:20px!important;letter-spacing:-.55px!important;max-width:100%;}
body[data-theme="glass"] #modal-root .v5-profile-dialog .v73-profile-quickstats .v60-stat-text small{font-size:8.2px!important;}
body[data-theme="glass"] #modal-root .v73-percent-icon{width:28px;height:28px;font-size:19px;}
@media(min-width:931px) and (max-width:1200px){
 body[data-theme="glass"] #modal-root .v5-profile-dialog .v73-profile-quickstats .v60-quickstat{grid-template-columns:24px minmax(0,1fr)!important;gap:6px!important;padding:6px!important;}
 body[data-theme="glass"] #modal-root .v5-profile-dialog .v73-profile-quickstats .v60-stat-text b{font-size:17px!important;}
}
@media(max-width:600px){body[data-theme="glass"] #modal-root .v5-profile-dialog .v73-profile-quickstats .v60-quickstat{gap:5px!important;padding:6px!important;}}
/* Highest scores section, NOT the high-level stat cards. Respect game sprites. */
body[data-theme="glass"] #content .v5-record-table{
 background:linear-gradient(145deg,rgba(53,85,133,.31),rgba(15,35,67,.61))!important;
 border-color:rgba(160,204,255,.30)!important;
}
body[data-theme="glass"] #content .v5-record-columns{padding:12px 19px 9px!important;}
body[data-theme="glass"] #content .v5-record-row{
 margin:5px 11px!important;padding:8px 12px!important;min-height:61px!important;
 background:linear-gradient(105deg,rgba(90,137,200,.14),rgba(11,31,59,.25))!important;
 border:1px solid rgba(169,213,255,.20)!important;border-radius:11px!important;
 box-shadow:inset 0 1px rgba(255,255,255,.055);
}
body[data-theme="glass"] #content .v5-record-row.v85-record-set{border-left:3px solid rgba(248,197,94,.78)!important;}
body[data-theme="glass"] #content .v5-record-row:hover{background:linear-gradient(105deg,rgba(129,181,249,.25),rgba(43,85,138,.22))!important;border-color:rgba(181,222,255,.58)!important;}
body[data-theme="glass"] #content .v5-record-row .v5-record-dc{display:flex;align-items:center;gap:10px!important;min-width:0;}
body[data-theme="glass"] #content .v5-record-row .v5-record-dc img{width:38px!important;height:38px!important;flex-shrink:0;image-rendering:pixelated;}
body[data-theme="glass"] #content .v5-record-row .v5-record-dc span{font-size:13px!important;font-weight:810;}
body[data-theme="glass"] #content .v85-record-winner{display:flex!important;align-items:center;gap:8px!important;min-width:0;}
body[data-theme="glass"] #content .v85-record-badge{display:inline-grid;place-items:center;flex:0 0 24px;}
body[data-theme="glass"] #content .v85-record-badge img{width:24px!important;height:28px!important;object-fit:contain;image-rendering:pixelated;}
body[data-theme="glass"] #content .v85-record-winner-text{display:flex;flex-direction:column;gap:3px;min-width:0;}
body[data-theme="glass"] #content .v85-record-winner-text small{font-size:8px;color:#e3bd77;font-weight:860;letter-spacing:.65px;}
body[data-theme="glass"] #content .v85-record-winner-text button{color:#ffdc93!important;font-weight:840!important;font-size:12px;white-space:normal;}
body[data-theme="glass"] #content .v5-record-row>b{font-size:15px;color:#ffdf9d!important;font-variant-numeric:tabular-nums;}
body[data-theme="glass"] #content .v5-record-row .v47-record-date{color:#bcd2ec!important;}
@media(max-width:800px){body[data-theme="glass"] #content .v5-record-row{padding:7px!important;gap:7px!important;}body[data-theme="glass"] #content .v85-record-badge{display:none;}body[data-theme="glass"] #content .v5-record-row .v5-record-dc img{width:27px!important;height:27px!important;}body[data-theme="glass"] #content .v85-record-winner-text small{font-size:7px;}}
/* History: match Records/Rankings panel saturation, no gray disconnected boxes. */
body[data-theme="glass"] #content .v5-main-panel:has(.v5-history-cards){
 background:linear-gradient(145deg,rgba(44,78,129,.28),rgba(14,35,68,.58))!important;
 border-color:rgba(161,206,255,.29)!important;
}
body[data-theme="glass"] #content .v5-history-cards{background:transparent!important;}
body[data-theme="glass"] #content .v5-history-card{
 background:linear-gradient(140deg,rgba(64,108,164,.18),rgba(14,35,69,.48))!important;
 border:1px solid rgba(169,211,255,.22)!important;box-shadow:inset 0 1px rgba(255,255,255,.07);
}
body[data-theme="glass"] #content .v5-history-card-head{background:linear-gradient(125deg,rgba(130,180,245,.085),transparent 80%);}
body[data-theme="glass"] #content .v5-history-minirow{background:rgba(9,27,55,.46)!important;border-color:rgba(157,203,255,.12)!important;}
/* Fix root problem: scrollbar was sitting ON the curved right edge. Make the
   inner scrolling track a few px from the frame without moving the frame. */
body[data-theme="glass"] #sidebar.side.sidebar .v44-nav-stack{
 margin-right:5px!important;padding-right:10px!important;scrollbar-gutter:stable!important;
}
body[data-theme="glass"] :is(#sidebar .v44-nav-stack,#content .v5-ranking-list,#content .v5-history-cards,#modal-root .dialog){
 scrollbar-width:thin;scrollbar-color:rgba(166,207,255,.38) rgba(9,29,57,.15);
}
body[data-theme="glass"] :is(#sidebar .v44-nav-stack,#content .v5-ranking-list,#content .v5-history-cards,#modal-root .dialog)::-webkit-scrollbar{width:5px;}
body[data-theme="glass"] :is(#sidebar .v44-nav-stack,#content .v5-ranking-list,#content .v5-history-cards,#modal-root .dialog)::-webkit-scrollbar-thumb{background:rgba(166,207,255,.38);border-radius:8px;}
body[data-theme="glass"] :is(#sidebar .v44-nav-stack,#content .v5-ranking-list,#content .v5-history-cards,#modal-root .dialog)::-webkit-scrollbar-track{background:rgba(8,25,51,.15);border-radius:8px;}
/* Prioritize the month grid over the detail sidebar, so a readable label can
   actually fit instead of shrinking to microscopic text. At medium widths the
   detail panel moves below the grid rather than squeezing 7 columns. */
@media(min-width:1381px){
 body[data-theme="glass"] #content .calendar-panel:not(.v5-compact-calendar) .calendar-content{
  grid-template-columns:minmax(0,1fr) minmax(290px,315px)!important;
  gap:16px!important;padding:17px!important;
 }
}
@media(max-width:1380px){
 body[data-theme="glass"] #content .calendar-panel:not(.v5-compact-calendar) .calendar-content{
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:16px!important;padding:14px!important;
 }
 body[data-theme="glass"] #content .calendar-panel .calendar-week{gap:4px!important;}
}
