/* Profile, record and match layouts for the forest theme. */
body#gs-app.forest .overview-dialog[open] {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(940px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
}
.overview-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.overview-dialog-header h2 { margin: 0; }
.overview-dialog-header button { min-width: 40px; min-height: 40px; }
body#gs-app.forest .rank-badge .rank-emblem { outline: none; box-shadow: none; }
body#gs-app.forest .full-rank-ladder li { min-width: 0; }
body#gs-app.forest .full-rank-ladder .rank-badge { min-height: 38px; }
body#gs-app.forest .profile-overview-top :is(.rank-identity,.rank-target) {
  min-width: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 6px;
}
body#gs-app.forest .profile-overview-top .rank-main .rank-badge {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 10px;
  min-height: 38px;
  font-size: 13px;
  font-weight: 650;
  white-space: normal;
}
body#gs-app.forest .profile-overview-top .rank-main .rank-emblem {
  width: 62px;
  height: 33px;
  flex: 0 0 62px;
}
body#gs-app.forest .profile-overview-top .rank-main .rank-emblem img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
body#gs-app.forest .rating-plot { position: relative; }
body#gs-app.forest .rating-plot .rating-point-detail:not(:empty) {
  position: absolute;
  inset: auto 0 32px;
  z-index: 1;
  box-shadow: 0 4px 18px #152b2626;
}
body#gs-app.forest .rating-gridline { stroke: var(--line); }
body#gs-app.forest .overview-detail-wide { grid-template-columns: minmax(0,1fr); }
body#gs-app.forest .record-grid { grid-template-columns: repeat(3,minmax(0,1fr)); align-items: stretch; }
body#gs-app.forest .record-grid > .record-card {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  gap: 8px;
  min-width: 0;
}
body#gs-app.forest .record-grid .record-card > .tiny { min-height: 2.8em; }
body#gs-app.forest .record-card > .record-fresh { align-self: flex-start; }
body#gs-app.forest .record-card > .record-holders { margin: 0; }
body#gs-app.forest .record-card > .record-history { margin-top: auto; }
body#gs-app.forest .record-card > .home-record-match { margin-top: auto; }
body#gs-app.forest .compact-records .record-grid { grid-template-columns: minmax(0,1fr); }
body#gs-app.forest .compact-records .record-card > .tiny { min-height: 0; }
body#gs-app.forest .permanent-achievements { align-items: stretch; }
body#gs-app.forest .permanent-achievements .mission {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 5;
  gap: 8px;
  min-width: 0;
}
.permanent-achievements .mission > h3 { grid-row: 1; margin: 0; }
.permanent-achievements .mission > progress { grid-row: 3; }
.permanent-achievements .mission > progress + p { grid-row: 4; margin: 0; }
.permanent-achievements .mission > .achievement-evidence { grid-row: 5; }
body#gs-app.forest .comparison-dashboard > :is(.direct-meetings,details) { grid-column: 1 / -1; }
body#gs-app.forest .comparison-dashboard > .compare-identity:nth-child(3) { grid-column: 3; grid-row: 1; }
body#gs-app.forest .comparison-dashboard .compare-identity { position: static !important; }
body#gs-app.forest .comparison-dashboard > .comparison-content { min-width: 0; }
body#gs-app.forest details.community-session.session-redesigned > summary {
  grid-template-columns: minmax(142px,1fr) minmax(132px,1fr) 74px 164px 16px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}
body#gs-app.forest .session-redesigned .session-date {
  display: grid;
  grid-template-columns: 62px minmax(0,1fr);
  gap: 6px;
  align-items: center;
}
.session-latest-slot .badge { white-space: nowrap; }
.session-count,.session-date time,.session-score { white-space: nowrap; }
.phone-scoreboard { display: none; }

@media (max-width: 1180px) {
  body#gs-app.forest .record-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 1050px) {
  body#gs-app.forest details.community-session.session-redesigned > summary {
    grid-template-columns: minmax(0,1fr) minmax(0,auto) 16px;
  }
  body#gs-app.forest .session-redesigned > summary > .session-date { grid-column: 1; grid-row: 1; }
  body#gs-app.forest .session-redesigned > summary > .session-count { grid-column: 1; grid-row: 2; }
  body#gs-app.forest .session-redesigned > summary > .session-mode-pills { grid-column: 2; grid-row: 1; justify-self: end; }
  body#gs-app.forest .session-redesigned > summary > .session-avatar-group { grid-column: 2; grid-row: 2; justify-self: end; }
  body#gs-app.forest .session-redesigned > summary::after { grid-column: 3; grid-row: 1 / 3; }
}
@media (max-width: 900px) {
  body#gs-app.forest .sidebar {
    justify-content: flex-start;
    align-items: stretch;
    padding-bottom: calc(82px + env(safe-area-inset-bottom));
    overscroll-behavior: contain;
  }
  body#gs-app.forest .sidebar > * { flex-shrink: 0; }
  body#gs-app.forest .sidebar .secondary-nav { margin-top: 16px; padding-top: 10px; }
  body#gs-app.forest .sidebar .mobile-menu { align-self: flex-start; }
}
@media (max-width: 750px) {
  body#gs-app.forest .record-grid,
  body#gs-app.forest .overview-dialog .full-rank-ladder { grid-template-columns: minmax(0,1fr); }
  body#gs-app.forest .profile-overview-top .rank-main .rank-badge { flex-wrap: wrap; gap: 4px; }
  body#gs-app.forest .session-redesigned .session-date { display: flex; flex-wrap: wrap; }
  body#gs-app.forest .session-latest-slot:empty { display: none; }
  body#gs-app.forest .desktop-scoreboard { display: none; }
  body#gs-app.forest .phone-scoreboard { display: block; margin: 8px 0; }
  body#gs-app.forest .phone-score-row { border-top: 1px solid var(--line); }
  body#gs-app.forest .phone-score-row > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 44px;
    padding: 6px 4px;
    list-style: none;
  }
  .phone-score-row > summary::-webkit-details-marker { display: none; }
  .phone-score-row > summary > strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
  .phone-score-row > summary > strong::after { content: ' ›'; color: var(--pine); }
  .phone-score-row[open] > summary > strong::after { content: ' ⌄'; }
  .phone-score-row .mini-avatar { width: 26px; height: 26px; }
  .phone-score-row dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 6px 0; }
  .phone-score-row dl > div { padding: 8px; background: #f4f8f2; border-radius: 6px; }
  .phone-score-row dd { margin: 0; font-weight: 700; }
  .phone-score-row > a { display: inline-block; padding: 6px 0; }
}
.phone-score-head { display: flex; justify-content: space-between; color: var(--muted); padding: 4px; }
.achievement-evidence a { display: block; margin-block: 4px; }
body#gs-app.forest .permanent-achievements .mission > :is(small,p):nth-child(2):not(.achievement-evidence) { grid-row: 2; }
body#gs-app.forest .record-card > .record-holders[hidden] { display: none; }
body#gs-app.forest .record-holders > span { overflow-wrap: anywhere; }
body#gs-app.forest .rating-plot svg { display: block; width: 100%; }
body#gs-app.forest .comparison-dashboard .extended-compare-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
body#gs-app.forest .comparison-dashboard > .compare-identity:nth-child(3) { align-self: start; }
@media (max-width: 650px) {
  body#gs-app.forest .comparison-dashboard > .compare-identity:nth-child(3) { grid-column: 2; }
  body#gs-app.forest .comparison-dashboard .extended-compare-grid { grid-template-columns: minmax(0,1fr); }
}

/* Keep the overview identity within the full profile scroll area. */
body#gs-app.forest .polished-overview > .overview-body { min-width: 0; }
body#gs-app.forest .overview-identity .profile-hero { height: auto; }
@media (min-width: 901px) {
  body#gs-app.forest .polished-overview {
    display: grid;
    grid-template-columns: clamp(170px, 18vw, 250px) minmax(0, 1fr);
    align-items: start;
    gap: 16px;
  }
  body#gs-app.forest .polished-overview > .overview-identity {
    position: sticky;
    top: 16px;
    grid-row: 1;
  }
}
body#gs-app.forest .profile-overview-top {
  grid-template-columns: minmax(0,1.3fr) minmax(0,1fr);
}
body#gs-app.forest .profile-overview-top > .overview-navigation { grid-column: 1 / -1; }
body#gs-app.forest .profile-overview-top > .rank-progress { grid-column: 1; }
body#gs-app.forest .profile-overview-top > .overview-side { grid-column: 2; grid-row: 2; }
@media (min-width: 651px) and (max-width: 1180px) {
  body#gs-app.forest .profile-overview-top { grid-template-columns: minmax(0, 1fr); }
  body#gs-app.forest .profile-overview-top > .overview-side { grid-column: 1; grid-row: 3; }
}
body#gs-app.forest .profile-overview-top .rank-main {
  grid-template-rows: auto auto auto auto;
  align-items: stretch;
}
body#gs-app.forest .profile-overview-top .rank-main > :is(.rank-identity,.rank-target) {
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;
  padding-top: 0;
  border-top: 0;
}
body#gs-app.forest .profile-overview-top .rank-main > .rank-target {
  padding-left: 12px;
  border-left: 1px solid var(--line);
}
body#gs-app.forest .profile-overview-top .rank-main .tiny {
  margin: 0;
  font-size: 10px;
  line-height: 1.4;
}
body#gs-app.forest .profile-overview-top .rank-main .rank-badge {
  align-items: center;
  align-content: center;
}
body#gs-app.forest .profile-overview-top .rank-main .rank-caption {
  min-width: 0;
  overflow-wrap: anywhere;
}

body#gs-app.forest .community-stat-grid { align-items: stretch; }
body#gs-app.forest .community-stat-grid[hidden] { display: none; }
body#gs-app.forest .community-stat-grid > .card { margin-block: 0; min-width: 0; }
body#gs-app.forest .home-records-panel .record-grid { gap: 6px; margin-block: 8px; }
body#gs-app.forest .home-records-panel .record-grid > .record-card {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  justify-items: start;
  text-align: left;
  min-height: 0;
  padding: 8px 10px;
  gap: 3px 8px;
}
body#gs-app.forest .home-records-panel .record-card > .record-holders {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  padding: 0;
}
body#gs-app.forest .home-records-panel .record-card > .record-date { margin: 0; }
body#gs-app.forest .home-records-panel .record-card > .home-record-match { grid-column: 1; margin: 0; }
body#gs-app.forest .home-records-panel .record-card > .record-history { grid-column: 1 / -1; }
body#gs-app.forest .home-records-panel .record-card .home-record-value { font-size: 12px; line-height: 1.35; }
body#gs-app.forest .compact-community-row.rivalry-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) max-content minmax(0,1fr);
  gap: 8px;
}
.rivalry-row > .player-link:last-child { justify-self: end; }
.rivalry-row .player-badge { overflow-wrap: anywhere; }
body#gs-app.forest details.community-session.session-redesigned > summary {
  grid-template-columns: minmax(140px,1fr) minmax(110px,1fr) 84px 16px;
  min-height: 48px;
}
body#gs-app.forest details.community-session.session-redesigned > summary::after {
  grid-column: 4;
  grid-row: 1;
}
body#gs-app.forest .session-mode-pills .badge { white-space: nowrap; }
@media (max-width: 1050px) {
  body#gs-app.forest details.community-session.session-redesigned > summary {
    grid-template-columns: minmax(0,1fr) max-content 16px;
  }
  body#gs-app.forest details.community-session.session-redesigned > summary::after {
    grid-column: 3;
    grid-row: 1 / 3;
  }
}
.account-entry[hidden] { display: none !important; }
.account-desktop { white-space: nowrap; }
body#gs-app.forest .nav .account-mobile { display: none; }
@media (max-width: 900px) {
  body#gs-app.forest .nav .account-mobile { display: flex; order: -1; }
  .account-desktop { display: none; }
}
.account-form { display: grid; gap: 12px; max-width: 500px; }
.account-form label { display: grid; gap: 4px; min-width: 0; }
.account-form button { justify-self: start; }
.account-form p:empty { display: none; }
.account-link-form { padding-block: 12px; border-bottom: 1px solid var(--line); }
.account-appearance-preview { display: grid; grid-template-columns: minmax(0,1fr) 72px; align-items: end; gap: 10px; }
.account-appearance-preview .banner-image { width: 100%; height: 105px; object-fit: cover; border-radius: 8px; }
.account-appearance-preview :is(.avatar-image,.avatar-art) { width: 72px; height: 72px; border-radius: 8px; }
@media (max-width: 750px) {
  body#gs-app.forest .profile-overview-top .rank-main .rank-badge {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    align-content: start;
    justify-items: start;
  }
}

/* A shared track and fill for SVG bars and native progress indicators. */
body#gs-app.forest {
  --chart-bar-track: #e2e9e3;
  --chart-bar-fill: #1c5947;
}
.chart-bar-track { fill: var(--chart-bar-track, #e2e9e3); }
.chart-bar-fill { fill: var(--chart-bar-fill, #1c5947); }

body#gs-app.forest .desktop-scoreboard > .match-scoreboard {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
}
body#gs-app.forest .match-scoreboard .score-player-column { width: 29%; }
body#gs-app.forest .desktop-scoreboard .match-scoreboard :is(th,td):first-child { width: auto; }
body#gs-app.forest .desktop-scoreboard .match-scoreboard :is(th,td):not(:first-child) {
  padding-inline: 6px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.score-heading { display: inline-block; position: relative; }
body#gs-app.forest .score-heading > .metric-help {
  position: absolute;
  left: calc(100% + 3px);
  top: 50%;
  transform: translateY(-50%);
}
body#gs-app.forest .match-score-pair {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  text-align: center;
}

.community-stat-panels { display: grid; }
body#gs-app.forest .community-stat-panels > .community-stat-grid {
  grid-area: 1 / 1;
  min-width: 0;
}
body#gs-app.forest .community-stat-panels > .community-stat-grid[hidden] {
  display: grid !important;
  visibility: hidden;
  pointer-events: none;
}
body#gs-app.forest .home-records-panel .record-card > .record-fresh { display: none; }
body#gs-app.forest .home-community-row > #community {
  display: grid;
  align-self: stretch;
}
body#gs-app.forest .home-community-row > #community > .card { height: auto; }
body#gs-app.forest .compact-community-row.rivalry-row {
  grid-template-columns: minmax(0,1fr) 72px minmax(0,1fr);
  align-items: center;
}
.rivalry-row > strong { text-align: center; white-space: nowrap; }
body#gs-app.forest .home-community-row .overview-dialog-link { margin-top: 8px; }
body#gs-app.forest .rivalry-row > .player-link:last-child { justify-self: start; }
.rivalry-row > .player-link { min-width: 0; }

/* Anchor the score to the banner midpoint independently of the map label. */
body#gs-app.forest .competitive-detail .match-score-overlay {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-content: center;
  gap: 12px;
}
body#gs-app.forest .match-map-label {
  grid-column: 1;
  min-width: 0;
  text-align: left;
  overflow-wrap: anywhere;
}
body#gs-app.forest .competitive-detail .match-score-pair {
  grid-column: 2;
  justify-self: center;
  width: auto;
  min-width: 0;
}
@media (max-width: 650px) {
  body#gs-app.forest .competitive-detail .match-score-overlay {
    grid-template-columns: minmax(0,1fr);
    gap: 6px;
  }
  body#gs-app.forest .competitive-detail .match-score-pair {
    grid-column: 1;
    max-width: 100%;
    gap: 8px;
  }
  body#gs-app.forest .competitive-detail .match-map-label { justify-self: start; }
}

/* Raster, sprite and SVG artwork share the same name column. */
.weapon-art-slot {
  --weapon-slot-width: 96px;
  --weapon-slot-height: 48px;
  display: grid;
  place-items: center;
  width: var(--weapon-slot-width);
  height: var(--weapon-slot-height);
  max-width: 100%;
  flex: none;
}
body#gs-app.forest .weapon-art-slot .weapon-icon {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
body#gs-app.forest .weapon-art-slot .weapon-render {
  height: auto;
  aspect-ratio: 2 / 1;
}
body#gs-app.forest .weapon-art-slot .weapon-flame {
  width: 30px;
  height: 36px;
}
.weapon-name > strong { min-width: 0; overflow-wrap: anywhere; }
.score-player-details .weapon-name { min-width: 138px; }
.favorite-weapon .weapon-art-slot { --weapon-slot-width: 112px; --weapon-slot-height: 56px; }
.favorite-weapon > div { min-width: 0; max-width: 100%; }
@media (max-width: 750px) {
  .weapon-art-slot { --weapon-slot-width: 64px; --weapon-slot-height: 34px; }
  body#gs-app.forest .mobile-weapon > summary {
    grid-template-columns: 64px minmax(0,1fr) auto;
  }
}
