/* Daily Challenges mobile treatment — scope to V5 pages and narrow viewports.
   No source schedules, leaderboard calculations or desktop layout changes. */
.dc-mobile-sections,.dc-mobile-cal-hint{display:none}

/* 860px includes phones in landscape and the tablet/mobile shell breakpoint. */
@media(max-width:860px){
  /* Clear, reachable subnavigation with a stable active page indicator. */
  body[data-theme="glass"] #content .dc-mobile-sections{
    display:block!important;
    position:sticky;
    top:calc(var(--gtt-mobile-top,56px) + 2px);
    z-index:70;
    box-sizing:border-box;
    width:100%;
    min-width:0;
    max-width:100%;
    margin:0 0 13px;
    padding:5px;
    border:1px solid rgba(155,204,247,.29);
    border-radius:13px;
    background:linear-gradient(140deg,rgba(25,57,99,.96),rgba(9,27,55,.97));
    box-shadow:0 5px 18px rgba(1,10,28,.22);
    isolation:isolate;
  }
  body[data-theme="glass"] #content .dc-mobile-sections-track{
    box-sizing:border-box;
    display:flex;
    align-items:center;
    gap:5px;
    width:100%;
    min-width:0;
    max-width:100%;
    overflow-x:auto;
    overflow-y:hidden;
    overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    scroll-snap-type:x proximity;
    touch-action:pan-x;
  }
  body[data-theme="glass"] #content .dc-mobile-sections-track::-webkit-scrollbar{display:none}
  body[data-theme="glass"] #content .dc-mobile-section{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
    box-sizing:border-box;
    min-width:83px;
    min-height:42px;
    padding:10px 12px;
    border:1px solid transparent;
    border-radius:10px;
    background:transparent;
    color:#bdd3ed;
    font:750 12px/1.25 Inter,system-ui,sans-serif;
    white-space:nowrap;
    text-align:center;
    scroll-snap-align:center;
    touch-action:manipulation;
  }
  body[data-theme="glass"] #content .dc-mobile-section.is-current{
    border-color:rgba(153,210,255,.57);
    background:linear-gradient(135deg,rgba(92,163,229,.32),rgba(35,84,146,.42));
    box-shadow:inset 0 1px rgba(245,252,255,.14);
    color:#fff;
  }
  body[data-theme="glass"] #content .dc-mobile-section:focus-visible{
    outline:2px solid #9ddfff;outline-offset:-3px;
  }

  /* Desktop's wide page headings, title artwork and right-side actions
     must wrap naturally, never pushing any page past viewport width. */
  body[data-theme="glass"] #content,
  body[data-theme="glass"] #content > *{
    box-sizing:border-box;
    min-width:0;
    max-width:100%;
  }
  body[data-theme="glass"] #content .page-head{
    display:flex!important;
    flex-wrap:wrap;
    align-items:center!important;
    justify-content:flex-start;
    gap:8px 10px;
    min-width:0;
    max-width:100%;
    margin:0 0 13px;
  }
  body[data-theme="glass"] #content .page-head > div{min-width:0;flex:1 1 205px}
  body[data-theme="glass"] #content .page-head h1{
    margin:3px 0 5px;
    font-size:clamp(24px,6vw,30px);
    letter-spacing:-.75px;
    line-height:1.12;
    overflow-wrap:break-word;
  }
  body[data-theme="glass"] #content .page-head p{
    font-size:11px;
    line-height:1.45;
    max-width:100%;
  }
  body[data-theme="glass"] #content .page-head > .heading-link{
    margin:2px 0 0;
    min-height:40px;
    padding:10px 12px;
    font-size:11px;
    flex:0 0 auto;
  }

  /* Overview: each region is vertical and readable. The old cycle-status
     split was forcing all five completed challenge names into one column. */
  body[data-theme="glass"] #content .dc-unified-rotation{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    width:100%;
    max-width:100%;
    min-width:0;
    margin:0 0 12px;
    border-radius:15px;
    overflow:hidden;
  }
  body[data-theme="glass"] #content .dc-unified-rotation > .cycle-tracker{
    display:flex!important;
    flex-direction:column;
    align-items:stretch;
    width:100%;
    min-width:0;
    padding:14px 14px 12px!important;
    margin:0!important;
    gap:12px!important;
    border:0!important;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .cycle-clock{
    display:block;
    width:100%;
    min-width:0;
    padding:0 0 12px!important;
    border:0!important;
    border-bottom:1px solid rgba(162,207,248,.19)!important;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .tracker-eyebrow{
    font-size:10px;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .countdown{
    margin:7px 0 4px!important;
    font-size:clamp(32px,9vw,47px)!important;
    letter-spacing:-1.25px!important;
    line-height:1.07;
    white-space:nowrap;
    font-variant-numeric:tabular-nums;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .cycle-next-time{font-size:12px}
  body[data-theme="glass"] #content .dc-unified-rotation .tracker-help{
    margin:6px 0 0;
    font-size:10px;
    line-height:1.4;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .cycle-status,
  body[data-theme="glass"] #content .dc-unified-rotation .cycle-status:has(.v163-fresh-cycle){
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    width:100%;
    min-width:0;
    min-height:0!important;
    border:0!important;
    padding:0!important;
    gap:11px;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .cycle-count{
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:wrap;
    align-items:center;
    justify-content:space-between;
    width:100%;
    min-width:0;
    border:0!important;
    padding:0!important;
    margin:0!important;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .cycle-count > span{
    font-size:12px;
    font-weight:730;
    color:#c1d8f3;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .cycle-fraction{
    display:flex!important;
    align-items:baseline;
    margin:0!important;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .cycle-fraction strong{
    font-size:37px!important;
    letter-spacing:-1px;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .cycle-fraction em{
    font-size:24px!important;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .cycle-list,
  body[data-theme="glass"] #content .dc-unified-rotation .cycle-list.cycle-multi,
  body[data-theme="glass"] #content .dc-unified-rotation .cycle-list:not(.cycle-multi){
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-auto-flow:row!important;
    grid-auto-rows:auto!important;
    align-content:start!important;
    gap:8px 9px!important;
    width:100%;
    min-width:0;
    max-width:100%;
    max-height:none!important;
    overflow:visible!important;
    padding:0!important;
    margin:0!important;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .dc-completed-heading{
    grid-column:1/-1;
    margin:0 0 1px!important;
    min-width:0;
    font-size:12px!important;
    line-height:1.3;
    white-space:normal;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .cycle-completed,
  body[data-theme="glass"] #content .dc-unified-rotation .cycle-list.cycle-multi .cycle-completed{
    display:flex!important;
    flex-direction:row!important;
    justify-content:flex-start!important;
    align-items:center!important;
    box-sizing:border-box;
    gap:8px!important;
    min-width:0;
    min-height:44px!important;
    height:auto!important;
    margin:0!important;
    padding:4px 2px!important;
    text-align:left!important;
    font-size:11px!important;
    line-height:1.25;
    white-space:normal!important;
    border:0;
    transform:none!important;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .cycle-completed .v3-icon-capsule{
    flex:0 0 37px!important;
    width:37px!important;
    min-width:37px!important;
    height:37px!important;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .cycle-completed .v3-icon-capsule img{
    width:31px!important;height:31px!important;object-fit:contain;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .cycle-completed .v50-completed-name{
    display:block;
    min-width:0;
    overflow-wrap:break-word;
    white-space:normal!important;
    font-size:11px!important;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .cycle-empty.v163-fresh-cycle{
    grid-column:1/-1;
    min-height:90px!important;
  }

  /* A scheduled next challenge uses the same centered icon/name arrangement;
     multiple candidates become a compact two-column grid. */
  body[data-theme="glass"] #content .dc-unified-rotation > .possible-section{
    display:flex!important;
    flex-direction:column;
    gap:9px!important;
    padding:12px 14px 15px!important;
    margin:0!important;
    min-width:0;
    min-height:0!important;
    border:0!important;
    border-top:1px solid rgba(164,204,247,.2)!important;
    overflow:visible!important;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .possible-title{
    display:flex!important;
    flex-direction:row!important;
    justify-content:space-between!important;
    align-items:flex-start!important;
    flex-wrap:wrap;
    gap:6px;
    margin:0!important;
    padding:0!important;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .possible-title h2{
    font-size:15px!important;
    margin:0!important;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .possible-title p{
    max-width:100%;
    margin-top:3px!important;
    font-size:10px;
    line-height:1.35;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .possible-title .tag{
    font-size:9px;
    padding:4px 6px;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .possible-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-auto-rows:auto!important;
    width:100%;
    min-height:0!important;
    gap:8px!important;
    padding:0!important;
    margin:0!important;
    overflow:visible!important;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .possible-item{
    min-width:0;
    min-height:94px!important;
    height:auto!important;
    padding:10px 7px!important;
    gap:5px!important;
    overflow:hidden!important;
    transform:none!important;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .possible-item:only-child{
    grid-column:1/-1;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .possible-item .v3-icon-capsule{
    flex:0 0 48px!important;
    width:51px!important;
    min-width:51px!important;
    height:48px!important;
    border-radius:13px!important;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .possible-item .v3-icon-capsule img{
    width:39px!important;height:39px!important;
    max-width:39px!important;max-height:39px!important;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .possible-item b{
    font-size:11px!important;
    line-height:1.25;
    white-space:normal;
  }

  /* Calendar/Latest results have independent natural heights when stacked. */
  body[data-theme="glass"] #content .v5-overview-grid{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:12px!important;
    width:100%;
    max-width:100%;
  }
  body[data-theme="glass"] #content .v5-overview-grid > *,
  body[data-theme="glass"] #content .v5-overview-grid :is(.calendar-panel,.v5-results){
    min-width:0!important;
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    min-height:0!important;
    margin:0!important;
  }
  body[data-theme="glass"] #content .calendar-panel{
    min-width:0;
    max-width:100%;
    overflow:visible;
  }
  body[data-theme="glass"] #content .calendar-panel .calendar-content{
    display:flex!important;
    flex-direction:column!important;
    gap:12px!important;
    padding:10px 8px 12px!important;
    min-width:0;
  }
  body[data-theme="glass"] #content .calendar-panel .calendar-preview,
  body[data-theme="glass"] #content .calendar-panel .selected-pane{
    width:100%!important;
    min-width:0!important;
    max-width:100%;
    flex:0 0 auto!important;
  }
  body[data-theme="glass"] #content .calendar-panel .gttdc-inline-calendar-bar{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-rows:auto auto!important;
    align-items:center!important;
    row-gap:10px!important;
    column-gap:6px!important;
    padding:0 0 10px!important;
    margin:0 0 6px!important;
  }
  body[data-theme="glass"] #content .calendar-panel .gttdc-inline-calendar-title{
    grid-column:1!important;grid-row:1!important;
    min-width:0;
  }
  body[data-theme="glass"] #content .calendar-panel .gttdc-inline-calendar-title h2{
    font-size:12px!important;
    line-height:1.2!important;
  }
  body[data-theme="glass"] #content .calendar-panel .gttdc-inline-calendar-title small{
    display:none!important;
  }
  body[data-theme="glass"] #content .calendar-panel .dc-mobile-cal-hint{
    display:block!important;
    margin-top:3px;
    font-size:9px;
    line-height:1.25;
    color:#a5bfd9;
  }
  body[data-theme="glass"] #content .calendar-panel .gttdc-inline-calendar-actions{
    grid-column:2!important;grid-row:1!important;
    justify-self:end!important;
    display:flex!important;
    gap:3px!important;
    flex-wrap:wrap;
  }
  body[data-theme="glass"] #content .calendar-panel .gttdc-inline-calendar-actions .text-button{
    font-size:10px;
    min-height:34px!important;
    padding:5px 6px!important;
  }
  body[data-theme="glass"] #content .calendar-panel .gttdc-inline-calendar-bar > .v5-month-control{
    grid-column:1/-1!important;
    grid-row:2!important;
    justify-self:center!important;
    display:flex!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%;
    padding:0!important;
    margin:0!important;
  }
  body[data-theme="glass"] #content .calendar-panel .v5-calendar-jumps{
    display:flex!important;
    justify-content:center!important;
    align-items:center!important;
    flex-wrap:wrap!important;
    width:100%;
    min-width:0;
    gap:5px!important;
  }
  body[data-theme="glass"] #content .calendar-panel .month-control-buttons{
    display:flex!important;
    gap:3px!important;
    flex:0 0 auto!important;
  }
  body[data-theme="glass"] #content .calendar-panel .month-control-buttons button{
    min-width:32px!important;
    width:32px!important;
    height:38px!important;
    min-height:38px!important;
    padding:0!important;
  }
  body[data-theme="glass"] #content .calendar-panel :is(.cal-today,.v5-calendar-select){
    min-height:38px!important;
    font-size:11px;
    max-width:100%;
  }
  body[data-theme="glass"] #content .calendar-panel .calendar-week{
    display:grid!important;
    grid-template-columns:repeat(7,minmax(0,1fr))!important;
    gap:3px!important;
    min-width:0!important;
    width:100%;
  }
  body[data-theme="glass"] #content .calendar-panel .weekday{
    min-width:0;
    font-size:8px!important;
    line-height:1.15;
    padding:4px 0!important;
    text-align:center;
  }
  body[data-theme="glass"] #content .calendar-panel .day-cell{
    position:relative;
    box-sizing:border-box!important;
    min-width:0!important;
    min-height:64px!important;
    height:auto!important;
    padding:4px 2px!important;
    gap:3px!important;
    border-radius:8px!important;
    overflow:hidden!important;
    touch-action:manipulation;
  }
  body[data-theme="glass"] #content .calendar-panel .day-cell .day-top{
    font-size:9px!important;
  }
  body[data-theme="glass"] #content .calendar-panel .day-cell .day-top small{
    display:none!important;
  }
  body[data-theme="glass"] #content .calendar-panel .day-cell .day-art{
    display:flex;
    align-items:center;
    justify-content:center;
    min-width:0;
    min-height:26px;
    max-height:28px;
  }
  body[data-theme="glass"] #content .calendar-panel .day-cell .day-art img{
    max-width:26px!important;
    max-height:26px!important;
    width:26px!important;
    height:26px!important;
    object-fit:contain;
  }
  body[data-theme="glass"] #content .calendar-panel .day-cell .day-title,
  body[data-theme="glass"] #content .calendar-panel .day-cell .v86-random-subtitle{
    display:none!important;
  }
  body[data-theme="glass"] #content .calendar-panel .day-cell .possible-flag{
    max-width:100%;
    font-size:7px!important;
    line-height:1;
    padding:1px!important;
    white-space:nowrap;
    text-overflow:clip;
  }
  body[data-theme="glass"] #content .calendar-panel .day-cell .v5-cycle-label{
    display:none!important;
  }
  body[data-theme="glass"] #content .calendar-panel .day-cell:focus-visible{
    outline:2px solid #9ddfff;
    outline-offset:-2px;
  }

  /* Common search / sort controls: one full-width search followed by
     controls that wrap, never overflowing or being clipped. */
  body[data-theme="glass"] #content .dc-control-toolbar,
  body[data-theme="glass"] #content .v5-record-toolbar{
    display:flex!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    flex-wrap:wrap!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    padding:10px!important;
    box-sizing:border-box!important;
  }
  body[data-theme="glass"] #content .dc-control-toolbar > .v5-search,
  body[data-theme="glass"] #content .v161-player-directory .v161-directory-controls > .v161-growid-search{
    display:flex!important;
    flex:1 1 100%!important;
    order:0!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:44px!important;
    box-sizing:border-box!important;
  }
  body[data-theme="glass"] #content .dc-control-toolbar > :not(.v5-search){
    order:1!important;
    max-width:100%;
    min-width:0;
  }
  body[data-theme="glass"] #content :is(.dc-control-toolbar,.v161-directory-controls) :is(input,select){
    font-size:16px!important;
    min-width:0;
    max-width:100%;
    box-sizing:border-box;
  }
  body[data-theme="glass"] #content .v56-dc-picker,
  body[data-theme="glass"] #content .v5-select,
  body[data-theme="glass"] #content .v161-year-label{
    max-width:100%;
    min-width:0;
    flex:1 1 135px;
  }
  body[data-theme="glass"] #content .v5-toggle{
    max-width:100%;
    flex-wrap:wrap!important;
  }
  body[data-theme="glass"] #content .v5-main-panel,
  body[data-theme="glass"] #content .v84-rank-controls,
  body[data-theme="glass"] #content .v5-record-table,
  body[data-theme="glass"] #content .v161-player-directory{
    min-width:0;
    max-width:100%;
  }

  /* Catalog cards: full tappable rows, original icon dimensions and
     descriptions beside the icon instead of giant blank panels. */
  body[data-theme="glass"] #content .challenge-grid{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:9px!important;
  }
  body[data-theme="glass"] #content .v5-challenge-card{
    width:100%;
    min-width:0;
    min-height:0!important;
    gap:8px!important;
    padding:10px!important;
  }
  body[data-theme="glass"] #content .v5-challenge-card .dc-compact-card-top{
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    gap:10px!important;
    min-width:0;
  }
  body[data-theme="glass"] #content .v5-challenge-card .dc-compact-card-copy{
    min-width:0;
    overflow-wrap:break-word;
  }
  body[data-theme="glass"] #content .v5-challenge-card .card-count{
    min-height:26px;
    padding-top:7px;
  }

  /* Scoreboard/results: stacked columns and wrapping headers. */
  body[data-theme="glass"] #content .v5-results .v5-latest-head,
  body[data-theme="glass"] #content .v5-history-card-head,
  body[data-theme="glass"] #content .v161-section-head,
  body[data-theme="glass"] #content .v5-section-heading{
    display:flex!important;
    flex-wrap:wrap!important;
    gap:8px!important;
    min-width:0;
  }
  body[data-theme="glass"] #content .v161-double-scores,
  body[data-theme="glass"] #content .v5-history-grids,
  body[data-theme="glass"] #content .v5-record-columns,
  body[data-theme="glass"] #content .v161-feature-grid,
  body[data-theme="glass"] #content .v161-directory-grid{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:11px!important;
  }
  body[data-theme="glass"] #content .v5-results :is(.score-row,.score-head){
    grid-template-columns:30px minmax(0,1fr) auto!important;
    min-width:0!important;
    gap:5px!important;
  }
  body[data-theme="glass"] #content .v5-results :is(.player,.score){
    min-width:0;overflow-wrap:anywhere;
  }
  body[data-theme="glass"] #content .v5-history-card,
  body[data-theme="glass"] #content .v5-history-card-head,
  body[data-theme="glass"] #content .v5-history-identity,
  body[data-theme="glass"] #content .v5-history-col{
    min-width:0!important;max-width:100%;
  }
  body[data-theme="glass"] #content .v5-history-card-head .v47-history-head-actions{
    display:flex;flex-wrap:wrap;gap:7px;
    width:100%;
  }
  body[data-theme="glass"] #content .v5-history-card-head .heading-link{
    min-height:40px!important;font-size:11px!important;
  }
  body[data-theme="glass"] #content .v161-compare-inputs{
    display:flex!important;
    flex-wrap:wrap!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:10px!important;
    max-width:100%;
    padding:12px!important;
  }
  body[data-theme="glass"] #content .v161-compare-inputs > *{
    width:100%;min-width:0;max-width:100%;
  }
  body[data-theme="glass"] #content .v161-special-head,
  body[data-theme="glass"] #content .v161-special-row,
  body[data-theme="glass"] #content .v161-h2h-row,
  body[data-theme="glass"] #content .v161-compare-row{
    min-width:0;
    max-width:100%;
    overflow-wrap:anywhere;
  }
  body[data-theme="glass"] #content .v161-compare-select input{width:100%;min-height:44px;font-size:16px}
  body[data-theme="glass"] #content .v161-player-directory .v161-directory-controls{
    display:flex!important;flex-wrap:wrap!important;
    justify-content:flex-start!important;
    gap:8px!important;
  }
  body[data-theme="glass"] #content .v161-player-directory .v161-directory-controls > select{
    width:100%;min-height:44px;
  }

  /* Popups stay above the fixed thumb navigation; only their own content may
     scroll. Avoid desktop-width dialogs on narrow screens. */
  body[data-theme="glass"] :is(#modal-root .dialog,.dialog-backdrop .dialog){
    box-sizing:border-box;
    max-width:calc(100vw - 16px)!important;
    max-height:calc(100dvh - var(--gtt-mobile-top,56px) - 12px)!important;
    overflow-y:auto;
    overscroll-behavior:contain;
  }
  body[data-theme="glass"] #content :is(button,select,a,input){
    touch-action:manipulation;
  }
}

/* Even at 320px, preserve the 2-column completed grid when there are icons,
   while keeping calendar tap targets and navigation inside the viewport. */
@media(max-width:380px){
  body[data-theme="glass"] #content .dc-mobile-section{min-width:79px;padding-inline:9px}
  body[data-theme="glass"] #content .dc-unified-rotation .cycle-completed{
    gap:5px!important;font-size:10px!important;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .cycle-completed .v3-icon-capsule{
    flex-basis:33px!important;min-width:33px!important;width:33px!important;height:33px!important;
  }
  body[data-theme="glass"] #content .dc-unified-rotation .cycle-completed .v3-icon-capsule img{
    width:28px!important;height:28px!important;
  }
  body[data-theme="glass"] #content .calendar-panel .calendar-content{padding-inline:5px!important}
  body[data-theme="glass"] #content .calendar-panel .calendar-week{gap:2px!important}
  body[data-theme="glass"] #content .calendar-panel .day-cell{
    min-height:60px!important;
    padding:3px 1px!important;
  }
  body[data-theme="glass"] #content .calendar-panel .day-cell .day-art img{
    width:22px!important;height:22px!important;max-width:22px!important;max-height:22px!important;
  }
}

/* On landscape phones avoid sticky subnav occupying gameplay or short height. */
@media(max-width:860px) and (orientation:landscape) and (max-height:600px){
  body[data-theme="glass"] #content .dc-mobile-sections{position:relative;top:auto;}
}
@media(prefers-reduced-motion:reduce){
  body[data-theme="glass"] #content .dc-mobile-sections-track{scroll-behavior:auto!important}
}

/* Avoid four competing utility buttons squeezing "Overview" to "Ove…".
   The redundant Player shortcut lives in the new Players DC tab and the
   bottom More menu; login, settings and site search remain in the header. */
@media(max-width:860px){
 html[data-gtt-design-mode="workbench"] body:has(#content .dc-mobile-sections)
   #wb2-shell .gtt-players-shortcut{
   display:none!important;
 }
 html[data-gtt-design-mode="workbench"] body:has(#content .dc-mobile-sections)
   #gtt-mobile-navigation .gtt-mobile-tab-label{
   font-size:10px!important;
   line-height:1.15!important;
   white-space:nowrap!important;
   letter-spacing:-.15px;
 }
 /* A focused input on a phone must remain visible above the keyboard;
    the existing mobile shell already hides its bottom tab bar while typing. */
 body[data-theme="glass"] #content .dc-mobile-sections-track{
   overscroll-behavior-x:contain;
 }
 body[data-theme="glass"] #content .calendar-panel :is(.v47-picker,.v56-dc-picker,.v5-month-control,.v5-calendar-jumps){
   overflow:visible!important;
   position:relative;
   z-index:12;
 }
}

/* Rank/Records/History-specific overflow: keep both ranking lists visible
   while retaining all five rank/stat fields at narrow widths. */
@media(max-width:860px){
 body[data-theme="glass"] #content .v84-rank-columns,
 body[data-theme="glass"] #content .v5-metric-grid,
 body[data-theme="glass"] #content .v196-record-grid{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:10px!important;
  min-width:0!important;
  max-width:100%!important;
 }
 body[data-theme="glass"] #content .v84-rank-panel,
 body[data-theme="glass"] #content .v5-metric-card,
 body[data-theme="glass"] #content .v196-record-card{
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
 }
 body[data-theme="glass"] #content .v5-ranking-head,
 body[data-theme="glass"] #content .v5-ranking-row{
  display:grid!important;
  grid-template-columns:30px minmax(0,1fr) repeat(3,minmax(29px,36px))!important;
  gap:4px!important;
  align-items:center!important;
  min-width:0!important;
  max-width:100%!important;
 }
 body[data-theme="glass"] #content .v5-ranking-head{
  padding-inline:6px!important;
  font-size:8px!important;
 }
 body[data-theme="glass"] #content .v5-ranking-row{
  box-sizing:border-box;
  padding:7px 6px!important;
  min-height:49px!important;
  font-size:11px!important;
 }
 body[data-theme="glass"] #content .v5-ranking-row .v84-ranked-name{
  display:flex;flex-direction:column;
  min-width:0;
  max-width:100%;
  overflow-wrap:anywhere;
 }
 body[data-theme="glass"] #content .v5-ranking-row .v84-ranked-name b{
  min-width:0;max-width:100%;
  font-size:11px!important;
  overflow-wrap:anywhere;
 }
 body[data-theme="glass"] #content .v5-ranking-row strong{
  min-width:0;
  font-size:11px!important;
  text-align:right;
  font-variant-numeric:tabular-nums;
 }
 body[data-theme="glass"] #content .v5-ranking-head .v5-ranking-stat-label{
  display:flex;flex-direction:column;
  align-items:center;justify-content:center;
  gap:2px;
  min-width:0;
  font-size:8px!important;
  overflow-wrap:normal;
 }
 body[data-theme="glass"] #content .v5-ranking-head .v5-ranking-stat-label img{
  max-width:18px;max-height:18px;
 }
 body[data-theme="glass"] #content .v196-record-card .v196-record-body{
  display:flex!important;
  flex-direction:row!important;
  align-items:flex-start!important;
  gap:9px!important;
  min-width:0;
  padding:11px!important;
 }
 body[data-theme="glass"] #content .v196-record-card .v196-record-icon{
  flex:0 0 42px;
  width:42px!important;
  min-width:42px;
  height:42px!important;
  padding:4px!important;
 }
 body[data-theme="glass"] #content .v196-record-card .v196-record-main{
  flex:1 1 auto!important;
  width:100%;
  min-width:0!important;
 }
 body[data-theme="glass"] #content .v196-record-card .v196-record-stats{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(60px,.35fr)!important;
  gap:6px!important;
  min-width:0;
 }
 body[data-theme="glass"] #content .v196-record-card .v196-record-player{
  min-width:0;
 }
 body[data-theme="glass"] #content .v196-record-card .v196-record-date{
  grid-column:1/-1;
 }
 body[data-theme="glass"] #content .v196-record-card :is(.v196-record-holders,.v196-record-title){
  overflow-wrap:anywhere;
  min-width:0;
 }
 body[data-theme="glass"] #content .v5-category-tabs{
  display:flex!important;
  gap:5px!important;
  flex-wrap:wrap!important;
  max-width:100%;
  padding:8px!important;
 }
 body[data-theme="glass"] #content .v5-category-tabs button{
  min-height:38px;
  flex:1 1 auto;
  padding:6px 9px!important;
  font-size:10px!important;
  white-space:normal!important;
 }
 body[data-theme="glass"] #content .v5-metric-card .v5-metric-list,
 body[data-theme="glass"] #content .v5-history-col{
  overflow:visible!important;
 }
 body[data-theme="glass"] #content .v5-history-minirow{
  grid-template-columns:27px minmax(0,1fr) minmax(42px,auto) auto!important;
  gap:5px!important;
  max-width:100%;
 }
 body[data-theme="glass"] #content .v5-history-minirow button{
  min-width:0;
  overflow-wrap:anywhere;
 }
 body[data-theme="glass"] #content .v161-pagination{
  display:flex!important;
  flex-wrap:wrap!important;
  justify-content:center!important;
  align-items:center;
  gap:8px!important;
  max-width:100%;
 }
 body[data-theme="glass"] #content .v161-pagination button{
  min-height:40px!important;
 }
 body[data-theme="glass"] #content :is(.v161-special-head,.v161-special-row){
  display:grid!important;
  grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr) minmax(0,.85fr)!important;
  gap:5px!important;
  padding-inline:7px!important;
  font-size:10px!important;
 }
 body[data-theme="glass"] #content .v161-opponents{
  min-width:0;
  max-width:100%;
  gap:9px!important;
 }
 body[data-theme="glass"] #content .v161-h2h-row{
  grid-template-columns:minmax(0,1fr) auto auto!important;
  gap:5px!important;
  font-size:10px!important;
 }
 body[data-theme="glass"] #content .v161-h2h-row > :last-child{
  display:none;
 }
}

/* Keep record/reward icon strips fluid instead of the fixed 10×27px desktop
   certificate grid, which spills over a 320px phone. */
@media(max-width:860px){
 body[data-theme="glass"] #content .v5-metric-card .v48-metric-dcs,
 body[data-theme="glass"] #content .v5-metric-card .v63-icon-set{
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:wrap!important;
  grid-template-columns:none!important;
  grid-auto-columns:auto!important;
  width:auto!important;
  max-width:100%!important;
  min-width:0!important;
  gap:3px!important;
  justify-content:flex-start!important;
 }
 body[data-theme="glass"] #content .v5-metric-card :is(.v5-metric-champion,.v5-metric-row){
  min-width:0!important;
  max-width:100%!important;
 }
 body[data-theme="glass"] #content .v161-h2h-summary{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center;
  gap:8px!important;
  min-width:0!important;
 }
 body[data-theme="glass"] #content .v161-h2h-summary > span{
  flex:1 1 130px;
  min-width:0;
  overflow-wrap:anywhere;
 }
 body[data-theme="glass"] #content .v161-player-directory .v161-pagination{
  margin-top:12px;
 }
}

/* Small directional cue only while more tabs remain to the right.
   It never blocks touch or click events in the scrollable navigation. */
@media(max-width:860px){
 body[data-theme="glass"] #content .dc-mobile-sections.dc-can-scroll-more::after{
  content:'›';
  position:absolute;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  top:5px;bottom:5px;right:4px;
  width:25px;
  padding-right:4px;
  border-radius:0 9px 9px 0;
  color:#d4efff;
  font-size:23px;
  font-weight:500;
  background:linear-gradient(90deg,transparent,rgba(10,32,64,.96) 58%);
  pointer-events:none;
 }
}
@media(max-width:420px){
 /* Put the three date selectors + Today on the first line, and BOTH arrow
    groups together on line two instead of leaving two orphan arrows. */
 body[data-theme="glass"] #content .calendar-panel .v5-calendar-jumps{
  justify-content:center!important;
  gap:5px!important;
  row-gap:6px!important;
 }
 body[data-theme="glass"] #content .calendar-panel .v5-calendar-jumps
   > :not(.month-control-buttons){
  order:0!important;
 }
 body[data-theme="glass"] #content .calendar-panel .v5-calendar-jumps
   > .month-control-buttons{
  order:1!important;
 }
}
