/* ==========================================================================
   DESKTOP VIEWS — shared quality for Day / Week / Month / Year / Agenda / My Week
   Scoped to desktop UI only (mobile untouched).
   ========================================================================== */
@media (min-width: 901px) {
  /* Compact upcoming — more room for calendar grid */
  body.category-page--games:has(.gc-app--desktop-ui) {
    --gc-upcoming-poster-h: clamp(4.75rem, 7.5vh, 6rem) !important;
    --gc-upcoming-card-w: calc(var(--gc-upcoming-poster-h) * 2 / 3) !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-upcoming-wrap--desktop .gc-upcoming__head--outside {
    margin: 0 0 0.22rem !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-upcoming-wrap--desktop .gc-upcoming--fit {
    padding: 0.38rem 0.45rem 0.4rem !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-upcoming-wrap--desktop .gc-upcoming-card__platforms--strip {
    min-height: 0.85rem !important;
    max-height: 0.9rem !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-app--desktop-ui {
    gap: 0.28rem !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-body {
    margin-bottom: 0.35rem !important;
  }

  /* ── View tabs — clickable grid layout (no absolute overlap) ─── */
  body.category-page--games:has(.gc-app--desktop-ui) .gc-toolbar--pro .gc-toolbar__bar--head {
    align-items: start !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-toolbar--pro .gc-toolbar__head-side--start {
    grid-column: 1 !important;
    grid-row: 1 !important;
    z-index: 6 !important;
    pointer-events: auto !important;
    isolation: isolate !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-toolbar--pro .gc-toolbar__head-center {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    justify-self: center !important;
    align-self: center !important;
    z-index: 2 !important;
    pointer-events: none !important;
    width: max-content !important;
    max-width: min(520px, 72vw) !important;
    margin: 0.12rem auto 0 !important;
    padding: 0 !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-toolbar--pro .gc-toolbar__actions {
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
    z-index: 3 !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-toolbar--pro .gc-toolbar__view--head,
  body.category-page--games:has(.gc-app--desktop-ui) .gc-toolbar--pro .gc-toolbar__view--head .gc-view-bar {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 2 !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-toolbar--pro .gc-toolbar__view--head .gc-segmented--scale.glass::before,
  body.category-page--games:has(.gc-app--desktop-ui) .gc-toolbar--pro .gc-toolbar__view--head .gc-segmented--scale.glass::after {
    display: none !important;
    content: none !important;
    pointer-events: none !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-toolbar--pro .gc-toolbar__view--head .gc-segmented--scale .gc-segmented__indicator::after {
    pointer-events: none !important;
  }

  /* Desktop scale tabs — no sliding indicator (blocks clicks in some browsers) */
  body.category-page--games:has(.gc-app--desktop-ui) .gc-segmented--scale-desktop .gc-segmented__indicator {
    display: none !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-segmented--scale-desktop .gc-segment--active {
    background: linear-gradient(
      168deg,
      rgba(255, 255, 255, 0.26) 0%,
      rgba(255, 255, 255, 0.1) 44%,
      rgba(100, 210, 255, 0.16) 100%
    ) !important;
    border: 1px solid rgba(255, 255, 255, 0.32) !important;
    border-radius: 999px !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.42),
      0 4px 16px rgba(0, 0, 0, 0.3),
      0 0 14px rgba(100, 210, 255, 0.14) !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-toolbar--pro .gc-toolbar__view--head .gc-segmented--scale {
    flex: 0 1 auto !important;
    max-width: 100% !important;
    min-height: 36px !important;
    padding: 0.2rem !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.045) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(28px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(190%) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.1),
      0 10px 36px -14px rgba(0, 0, 0, 0.45) !important;
    position: relative !important;
    isolation: isolate !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-toolbar--pro .gc-toolbar__view--head .gc-segmented--scale .gc-segmented__indicator {
    pointer-events: none !important;
    z-index: 0 !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-toolbar--pro .gc-toolbar__view--head .gc-segmented--scale .gc-segment {
    position: relative !important;
    z-index: 3 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 0.62rem !important;
    color: rgba(255, 255, 255, 0.52) !important;
    font-weight: 650 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    background: transparent !important;
    border: 0 !important;
    cursor: pointer !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-toolbar--pro .gc-toolbar__view--head .gc-segmented--scale .gc-segment--active {
    color: #fff !important;
    font-weight: 800 !important;
    background: transparent !important;
    text-shadow: 0 1px 10px rgba(100, 210, 255, 0.35) !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-toolbar--pro .gc-toolbar__view--head .gc-segmented--scale.gc-segmented--ios .gc-segmented__indicator {
    background: linear-gradient(
      168deg,
      rgba(255, 255, 255, 0.26) 0%,
      rgba(255, 255, 255, 0.1) 44%,
      rgba(100, 210, 255, 0.16) 100%
    ) !important;
    border: 1px solid rgba(255, 255, 255, 0.32) !important;
    backdrop-filter: blur(20px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(190%) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.42),
      inset 0 -1px 0 rgba(0, 0, 0, 0.2),
      0 4px 16px rgba(0, 0, 0, 0.3),
      0 0 14px rgba(100, 210, 255, 0.14) !important;
  }

  /* ── Poster ratio 2:3 — all calendar surfaces ────────────────── */
  body.category-page--games:has(.gc-app--desktop-ui) .gc-body .gc-cover--poster-month-trio,
  body.category-page--games:has(.gc-app--desktop-ui) .gc-body .gc-cover--poster-month-lg,
  body.category-page--games:has(.gc-app--desktop-ui) .gc-body .gc-cover--poster-row,
  body.category-page--games:has(.gc-app--desktop-ui) .gc-body .gc-cover--poster-panel,
  body.category-page--games:has(.gc-app--desktop-ui) .gc-body .gc-cover--poster-upcoming,
  body.category-page--games:has(.gc-app--desktop-ui) .gc-upcoming-wrap--desktop .gc-cover--poster-upcoming {
    aspect-ratio: 2 / 3 !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    min-width: 0 !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-body .gc-cover--poster-row {
    width: 3.5rem !important;
    height: auto !important;
    flex: 0 0 3.5rem !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-body .gc-cover--poster-row .gc-cover__img,
  body.category-page--games:has(.gc-app--desktop-ui) .gc-body .gc-cover--poster-row .gc-cover__fallback {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: unset !important;
    object-fit: cover !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-app--pair-grid-desktop .gc-day-pair__art > .gc-cover,
  body.category-page--games:has(.gc-app--desktop-ui) .gc-app--pair-grid-desktop .gc-day-pair__art > .gc-cover--placeholder {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: unset !important;
    min-height: 0 !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-app--pair-grid-desktop .gc-day-pair__art .gc-cover__img,
  body.category-page--games:has(.gc-app--desktop-ui) .gc-app--pair-grid-desktop .gc-day-pair__art .gc-cover__fallback {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: unset !important;
    object-fit: cover !important;
    object-position: center top !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-app--pair-grid-desktop .gc-day--layout-spotlight .gc-day-spotlight__art {
    width: min(100%, calc(100% * 2 / 3)) !important;
    height: auto !important;
    max-height: 100% !important;
    aspect-ratio: 2 / 3 !important;
    padding-bottom: 0 !important;
    margin-inline: auto !important;
  }

  /* ── Week view columns ───────────────────────────────────────── */
  body.category-page--games:has(.gc-app--desktop-ui) .gc-app--week-pro .gc-grid--week-pro {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 0 !important;
    min-height: clamp(14rem, 42vh, 24rem) !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-app--week-pro .gc-week-col {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    min-height: 0 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-app--week-pro .gc-week-col:nth-child(7n) {
    border-right: none !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-app--week-pro .gc-week-col__head {
    flex: 0 0 auto !important;
    padding: 0.45rem 0.35rem 0.35rem !important;
    text-align: center !important;
    font-size: 0.62rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    color: rgba(255, 255, 255, 0.45) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-app--week-pro .gc-week-col .gc-day {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    overflow: hidden !important;
  }

  /* ── Agenda + My Week — glass shell ──────────────────────────── */
  body.category-page--games:has(.gc-app--desktop-ui) .gc-body > .gc-agenda,
  body.category-page--games:has(.gc-app--desktop-ui) .gc-body > .gc-myweek--desktop {
    width: 100% !important;
    border-radius: var(--gc-desktop-card-radius, 20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    background: rgba(12, 13, 22, 0.94) !important;
    background-image: linear-gradient(
      168deg,
      rgba(255, 255, 255, 0.05) 0%,
      rgba(255, 255, 255, 0.01) 45%,
      rgba(255, 255, 255, 0.02) 100%
    ) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.07),
      0 24px 60px -24px rgba(0, 0, 0, 0.58) !important;
    backdrop-filter: blur(36px) saturate(170%) !important;
    -webkit-backdrop-filter: blur(36px) saturate(170%) !important;
    overflow: hidden !important;
    padding: 0.85rem 1rem 1.1rem !important;
    box-sizing: border-box !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-myweek--desktop .gc-myweek__actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.45rem !important;
    margin-bottom: 0.65rem !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-body .gc-agenda__day-head {
    padding: 0.55rem 0.25rem 0.4rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-body .gc-agenda__day-head time {
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-body .gc-agenda__items {
    gap: 0.35rem !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-body .gc-agenda__item {
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.03) !important;
    padding: 0.65rem 0.85rem !important;
    gap: 0.75rem !important;
    transition: background 0.2s ease, border-color 0.2s ease !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-body .gc-agenda__item:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(100, 210, 255, 0.22) !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-body .gc-agenda__item > .gc-cover--poster-row,
  body.category-page--games:has(.gc-app--desktop-ui) .gc-body .gc-agenda__item > .gc-cover {
    width: 3.5rem !important;
    height: auto !important;
    aspect-ratio: 2 / 3 !important;
    flex-shrink: 0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-body .gc-agenda__item > .gc-cover--poster-row .gc-cover__img,
  body.category-page--games:has(.gc-app--desktop-ui) .gc-body .gc-agenda__item > .gc-cover .gc-cover__img {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: unset !important;
    object-fit: cover !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-body .gc-agenda__title {
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
  }

  /* ── Year grid ───────────────────────────────────────────────── */
  body.category-page--games:has(.gc-app--desktop-ui) .gc-app--year-pro .gc-grid--year {
    gap: 0.65rem !important;
    padding: 0.85rem !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-app--year-pro .gc-year-month {
    border-radius: 14px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.03) !important;
    overflow: hidden !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-app--year-pro .gc-year-month:hover {
    border-color: rgba(100, 210, 255, 0.2) !important;
    box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.45) !important;
  }

  /* ── Day view grid ─────────────────────────────────────────── */
  body.category-page--games:has(.gc-app--desktop-ui) .gc-desktop-day--v2 .gc-desktop-day__grid {
    gap: 0.75rem !important;
    padding: 0.85rem 1rem 1.1rem !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-desktop-day--v2 .gc-desktop-day-card__poster {
    width: 4.5rem !important;
    aspect-ratio: 2 / 3 !important;
    height: auto !important;
    flex-shrink: 0 !important;
  }

  /* Upcoming strip — enforce portrait posters */
  body.category-page--games:has(.gc-app--desktop-ui) .gc-upcoming-wrap--desktop .gc-upcoming-card__poster > .gc-cover,
  body.category-page--games:has(.gc-app--desktop-ui) .gc-upcoming-wrap--desktop .gc-upcoming-card__poster > .gc-cover--poster-upcoming {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 2 / 3 !important;
    min-height: 0 !important;
  }

  /* Week view — today ring on day number */
  body.category-page--games:has(.gc-app--desktop-ui) .gc-app--week-pro .gc-day--today .gc-day__num {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    isolation: isolate !important;
    overflow: visible !important;
    width: 1.58rem !important;
    height: 1.58rem !important;
    min-width: 1.58rem !important;
    min-height: 1.58rem !important;
    border-radius: 50% !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    font-size: 0.76rem !important;
    font-weight: 800 !important;
    background: rgba(10, 12, 20, 0.9) !important;
    border: none !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
  }

  body.category-page--games:has(.gc-app--desktop-ui) .gc-app--week-pro .gc-day--today .gc-day__num::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    top: -4px !important;
    right: -4px !important;
    bottom: -4px !important;
    left: -4px !important;
    border-radius: 50% !important;
    padding: 2.5px !important;
    box-sizing: border-box !important;
    --gc-day-rim-angle: 0deg;
    background: conic-gradient(
      from var(--gc-day-rim-angle),
      rgba(0, 220, 255, 0.98) 0deg,
      rgba(90, 150, 255, 0.94) 52deg,
      rgba(175, 100, 255, 0.92) 104deg,
      rgba(255, 90, 180, 0.9) 156deg,
      rgba(255, 140, 60, 0.88) 208deg,
      rgba(255, 215, 80, 0.86) 260deg,
      rgba(80, 235, 160, 0.9) 312deg,
      rgba(0, 220, 255, 0.98) 360deg
    ) !important;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) !important;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) !important;
    -webkit-mask-composite: xor !important;
    mask-composite: exclude !important;
    filter: drop-shadow(0 0 6px rgba(100, 210, 255, 0.38)) !important;
    animation: gc-day-rim-spin 5.5s linear infinite !important;
    will-change: --gc-day-rim-angle !important;
    z-index: -1 !important;
    pointer-events: none !important;
  }

  @media (prefers-reduced-motion: reduce) {
    body.category-page--games:has(.gc-app--desktop-ui) .gc-app--month-pro .gc-grid--month:not(.gc-grid--month-compact) .gc-day--today .gc-day__num::before,
    body.category-page--games:has(.gc-app--desktop-ui) .gc-app--week-pro .gc-day--today .gc-day__num::before {
      animation: none !important;
      will-change: auto !important;
    }
  }
}
