/* Daily Challenge details — narrow phones, 15 Nov 2026.
   The desktop four-column scoreboards previously enforced 325–370px
   minimum row widths inside a modal whose CONTENT area can be only 260px.
   Fix layout rather than hiding an overflowing table behind scrollbars.
   Scope to the Liquid Glass challenge dialog, not standalone Archives. */
@media screen and (max-width:620px) {
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog {
   box-sizing:border-box!important;
   min-width:0!important;
   overflow-x:hidden!important;
 }
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog :is(.v5-cd-sticky,.v5-modal-body,.v5-cd-leaderboard,
 .v5-alltime-grid,.v5-allhistory,.v5-history-details,.v5-history-details-body) {
   box-sizing:border-box!important;
   min-width:0!important;
   max-width:100%!important;
 }
 /* All six sections are visible and tappable without a native horizontal
    scrollbar (Holders, Scoring, Trends, Records, Latest, History). */
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog .v5-cd-jumpnav {
   display:grid!important;
   grid-template-columns:repeat(3,minmax(0,1fr))!important;
   grid-template-rows:auto auto!important;
   align-items:stretch!important;
   justify-content:stretch!important;
   gap:5px!important;
   width:100%!important;
   min-width:0!important;
   max-width:100%!important;
   margin:8px 0 0!important;
   padding:8px 0 10px!important;
   overflow:visible!important;
   white-space:normal!important;
   scrollbar-width:none!important;
   scroll-snap-type:none!important;
 }
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog .v5-cd-jumpnav::-webkit-scrollbar {
   display:none!important;
 }
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog .v5-cd-jumpnav > button {
   box-sizing:border-box!important;
   flex:none!important;
   min-width:0!important;
   max-width:100%!important;
   width:100%!important;
   min-height:35px!important;
   margin:0!important;
   padding:7px 3px!important;
   white-space:normal!important;
   overflow-wrap:anywhere!important;
   font-size:11px!important;
   line-height:1.15!important;
   text-align:center!important;
 }
 /* Records: rank at left, name on first row, score+date and original
    reward icons below. A 4-column header is misleading on narrow cards. */
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog .v5-alltime-grid {
   display:grid!important;
   grid-template-columns:minmax(0,1fr)!important;
   gap:12px!important;
   width:100%!important;
 }
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog .v5-alltime-block {
   box-sizing:border-box!important;
   display:block!important;
   width:100%!important;
   min-width:0!important;
   max-width:100%!important;
   margin:0!important;
   padding:11px 9px!important;
   overflow:hidden!important;
 }
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog .v5-alltime-block .v5-alltime-head {
   display:none!important;
 }
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog .v5-alltime-block .v5-alltime-row {
   box-sizing:border-box!important;
   display:grid!important;
   grid-template-columns:38px minmax(0,1fr) 72px!important;
   grid-template-rows:auto auto!important;
   column-gap:7px!important;
   row-gap:4px!important;
   align-items:center!important;
   width:100%!important;
   max-width:100%!important;
   min-width:0!important;
   min-height:77px!important;
   padding:9px 8px!important;
   margin:5px 0!important;
   overflow:hidden!important;
 }
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog .v5-alltime-row > :first-child {
   grid-column:1!important;
   grid-row:1 / 3!important;
   min-width:0!important;
 }
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog .v5-alltime-row > button:nth-child(2) {
   grid-column:2 / 4!important;
   grid-row:1!important;
   justify-self:stretch!important;
   display:block!important;
   min-width:0!important;
   width:100%!important;
   max-width:100%!important;
   overflow:hidden!important;
   text-overflow:ellipsis!important;
   white-space:nowrap!important;
   text-align:left!important;
 }
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog .v5-alltime-row > .v5-alltime-score {
   grid-column:2!important;
   grid-row:2!important;
   justify-self:start!important;
   align-items:flex-start!important;
   text-align:left!important;
   min-width:0!important;
   max-width:100%!important;
   gap:3px!important;
 }
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog .v5-alltime-row .v5-alltime-score :is(b,small) {
   display:block!important;
   text-align:left!important;
   white-space:nowrap!important;
   max-width:100%!important;
 }
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog .v5-alltime-row .v5-alltime-score small {
   font-size:9px!important;
 }
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog .v5-alltime-row > .v5-rewards {
   grid-column:3!important;
   grid-row:2!important;
   justify-self:end!important;
 }
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog .v5-alltime-row > .v47-admin-row-actions {
   grid-column:1 / -1!important;
   grid-row:auto!important;
   justify-self:end!important;
 }
 /* Latest and expanded History share the exact same scoreboard renderer.
    Its old min-width:370px rule must be neutralized for BOTH sections. */
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog :is(.v5-cd-latest-inner,.v5-history-details-body)
 .v5-scoreboard-rewards {
   box-sizing:border-box!important;
   display:block!important;
   width:100%!important;
   max-width:100%!important;
   min-width:0!important;
   overflow:hidden!important;
 }
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog .v5-history-details-body .v5-scoreboard-rewards {
   padding:3px 2px!important;
   margin:6px 0 14px!important;
 }
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog :is(.v5-cd-latest-inner,.v5-history-details-body)
 .v5-scoreboard-rewards .score-head {
   display:none!important;
 }
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog :is(.v5-cd-latest-inner,.v5-history-details-body)
 .v5-scoreboard-rewards .score-row {
   box-sizing:border-box!important;
   display:grid!important;
   grid-template-columns:38px minmax(0,1fr) 72px!important;
   grid-template-rows:auto auto!important;
   align-items:center!important;
   column-gap:7px!important;
   row-gap:4px!important;
   width:100%!important;
   max-width:100%!important;
   min-width:0!important;
   min-height:72px!important;
   padding:9px 8px!important;
   margin:4px 0!important;
   overflow:hidden!important;
 }
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog :is(.v5-cd-latest-inner,.v5-history-details-body)
 .v5-scoreboard-rewards .score-row > :first-child {
   grid-column:1!important;
   grid-row:1 / 3!important;
   min-width:0!important;
 }
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog :is(.v5-cd-latest-inner,.v5-history-details-body)
 .v5-scoreboard-rewards .score-row > .player {
   grid-column:2 / 4!important;
   grid-row:1!important;
   min-width:0!important;
   width:100%!important;
   max-width:100%!important;
   overflow:hidden!important;
   text-overflow:ellipsis!important;
   white-space:nowrap!important;
   text-align:left!important;
   font-size:12px!important;
 }
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog :is(.v5-cd-latest-inner,.v5-history-details-body)
 .v5-scoreboard-rewards .score-row > .num {
   grid-column:2!important;
   grid-row:2!important;
   min-width:0!important;
   justify-self:start!important;
   text-align:left!important;
   font-size:13px!important;
 }
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog :is(.v5-cd-latest-inner,.v5-history-details-body)
 .v5-scoreboard-rewards .score-row > .v5-rewards {
   grid-column:3!important;
   grid-row:2!important;
   justify-self:end!important;
 }
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog :is(.v5-cd-latest-inner,.v5-history-details-body)
 .v5-scoreboard-rewards .score-row > .v47-admin-row-actions {
   grid-column:1 / -1!important;
   grid-row:auto!important;
 }
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog :is(.v5-alltime-row,.score-row) .v5-rewards {
   box-sizing:border-box!important;
   display:flex!important;
   flex-wrap:nowrap!important;
   align-items:center!important;
   justify-content:flex-end!important;
   gap:1px!important;
   width:72px!important;
   max-width:100%!important;
   min-width:0!important;
   overflow:hidden!important;
 }
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog :is(.v5-alltime-row,.score-row) .v5-rewards .dc-score-sprite {
   box-sizing:border-box!important;
   flex:0 1 23px!important;
   width:23px!important;
   height:23px!important;
   max-width:23px!important;
   min-width:0!important;
   object-fit:contain!important;
 }
}
/* Extra-small browser zoom / split screen: do not make even the compact
   right-side rewards column wider than the visible card can accommodate. */
@media screen and (max-width:350px) {
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog
 :is(.v5-alltime-row,.v5-scoreboard-rewards .score-row) {
   grid-template-columns:34px minmax(0,1fr) 66px!important;
   column-gap:5px!important;
   padding:7px 6px!important;
 }
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog :is(.v5-alltime-row,.score-row) .v5-rewards {
   width:66px!important;
 }
 body[data-theme="glass"]:not([data-dc-skin="growtopia"])
 #modal-root .v5-challenge-dialog :is(.v5-alltime-row,.score-row) .v5-rewards .dc-score-sprite {
   flex-basis:21px!important;
   width:21px!important;
   height:21px!important;
 }
}

/* A fixed Workbench mobile tab bar has a higher z-index than the challenge
   backdrop. Hide it only WHILE this dialog is open, so bottom score rows,
   taps and the modal scrollbar are never obstructed. The normal bottom
   navigation automatically returns when the dialog is closed. */
@media screen and (max-width:620px) {
 html[data-gtt-design-mode="workbench"]
 body:has(#modal-root .v5-challenge-dialog)
 #gtt-mobile-navigation {
   display:none!important;
   pointer-events:none!important;
 }
}
