.gr-dialog {
  --gr-ink: #20222d;
  --gr-muted: #606778;
  --gr-line: #e6e8ee;
  --gr-accent: #c8193b;
  --gr-ease: cubic-bezier(.22,.75,.22,1);
  position: fixed;
  inset: var(--gr-top, 0) auto auto var(--gr-left, 0);
  width: var(--gr-width, 100vw);
  height: var(--gr-height, 100dvh);
  max-width: 100vw;
  max-height: 100dvh;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  border: 0;
  overflow: hidden;
  overflow: clip;
  overscroll-behavior: none;
  background: transparent;
  color: var(--gr-ink);
  font-family: inherit;
  text-align: start;
}
.gr-dialog[open] { display: flex; align-items: flex-end; justify-content: center; }
.gr-dialog::backdrop { background: transparent; }
.gr-dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #192136;
  opacity: 0;
  transition: opacity 210ms ease-out;
  pointer-events: none;
}
.gr-dialog[data-shown="true"]::before { opacity: .43; }
html:has(.gr-dialog[open]), body:has(.gr-dialog[open]) { overscroll-behavior: none; }

.gr-sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: min(81%, 640px);
  max-height: calc(100% - max(10px, env(safe-area-inset-top, 0px)));
  min-height: 0;
  box-sizing: border-box;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow: hidden;
  border-radius: 23px 23px 0 0;
  background: #fff;
  box-shadow: 0 -3px 28px #20233116;
  transform: translateY(0);
}
.gr-dialog[data-shown="enter"] .gr-sheet,
.gr-dialog[data-shown="false"] .gr-sheet {
  transform: translateY(calc(100% + 24px));
}
.gr-dialog[data-shown="false"] .gr-sheet {
  transition: transform 230ms cubic-bezier(.35,0,.65,.25);
}
.gr-dialog[data-shown="true"] .gr-sheet {
  transform: translateY(var(--gr-pull, 0px));
  transition: transform 285ms var(--gr-ease);
}
.gr-dialog[data-dragging] .gr-sheet { transition: none; }
.gr-sheet::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 34px;
  height: 4px;
  border-radius: 8px;
  transform: translateX(-50%);
  background: #d3d6df;
  pointer-events: none;
}
.gr-head {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 65px;
  box-sizing: border-box;
  padding: 17px 49px 5px;
  touch-action: none;
}
.gr-head h2 {
  outline: none;
  margin: 0;
  font-size: clamp(17px, 5vw, 21px);
  font-weight: 750;
  letter-spacing: -.5px;
  line-height: 1.16;
  text-align: center;
}
.gr-dialog button { font: inherit; }
.gr-dialog .gr-close {
  position: absolute;
  top: 17px;
  left: 6px;
  width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: var(--gr-ink);
  cursor: pointer;
}
.gr-close::before, .gr-close::after {
  content: "";
  position: absolute;
  left: calc(50% - 9px);
  top: calc(50% - 1px);
  width: 18px;
  height: 2px;
  border-radius: 3px;
  background: currentColor;
  transform: rotate(45deg);
}
.gr-close::after { transform: rotate(-45deg); }
.gr-dialog .gr-close:active { background: #edf0f5; }
.gr-dialog button:focus-visible, .gr-page:focus-visible {
  outline: 2px solid #495783;
  outline-offset: -3px;
}
.gr-tabs {
  position: relative;
  display: grid;
  flex: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 4px 16px 10px;
  padding: 4px;
  border-radius: 13px;
  background: #edf0f6;
}
.gr-tabs::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  bottom: 4px;
  width: calc(50% - 4px);
  border-radius: 10px;
  background: var(--gr-ink);
  transform: translateX(0);
  transition: transform 245ms var(--gr-ease);
}
.gr-dialog[data-game="courier"] .gr-tabs::before { transform: translateX(100%); }
.gr-dialog .gr-tab {
  position: relative;
  min-width: 0;
  min-height: 40px;
  padding: 5px 2px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  color: #555d70;
  font-size: clamp(12px, 3.5vw, 14px);
  font-weight: 680;
  line-height: 1.2;
  cursor: pointer;
  transition: color 160ms ease;
}
.gr-dialog .gr-tab[aria-selected="true"] { color: #fff; }
.gr-dialog .gr-tab[aria-selected="true"]:focus-visible { outline-color: #b6c4ee; }

.gr-viewport { flex: 1; min-height: 0; overflow: hidden; overflow: clip; }
.gr-track { display: flex; width: 100%; height: 100%; transition: transform 245ms var(--gr-ease); }
.gr-dialog[data-game="courier"] .gr-track { transform: translateX(-100%); }
.gr-page {
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
  box-sizing: border-box;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 0 var(--gr-list-gutter, 16px) 14px;
}
.gr-table { width: 100%; border-spacing: 0; table-layout: fixed; font-variant-numeric: tabular-nums; }
.gr-table th, .gr-table td { text-align: left; }
.gr-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 32px;
  padding: 0 0 1px;
  border-bottom: 1px solid var(--gr-line);
  background: #fff;
  color: var(--gr-muted);
  font-size: 11px;
  font-weight: 570;
  line-height: 1.2;
}
.gr-table thead th:first-child { width: 46px; }
.gr-table thead th:last-child { width: 68px; text-align: right; }
.gr-table tbody td, .gr-table tbody th {
  height: 45px;
  box-sizing: border-box;
  padding: 6px 0;
  border-bottom: 1px solid var(--gr-line);
  line-height: 1.3;
}
.gr-table tbody tr:last-child > * { border-bottom-color: transparent; }
.gr-position {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  min-height: 26px;
  border-radius: 8px;
  color: var(--gr-muted);
  font-size: 13px;
  font-weight: 550;
}
.gr-table tbody tr:first-child .gr-position { background: #fbeef1; color: var(--gr-accent); font-weight: 750; }
.gr-table .gr-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 620;
}
.gr-player { display: flex; align-items: center; gap: 8px; min-width: 0; }
.gr-avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(145deg, #f1f3f5, #d7dce1);
  color: #565e6d;
  font-size: 13px;
  line-height: 1;
  font-weight: 650;
}
.gr-avatar img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}
.gr-avatar img.gr-photo-ready { opacity: 1; }
.gr-player-name { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gr-table tbody td:last-child {
  text-align: right;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -.3px;
}
.gr-status {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--gr-muted);
  font-size: 14px;
  text-align: center;
}
.gr-status[hidden], .gr-dialog .gr-retry[hidden] { display: none; }
.gr-dialog .gr-retry {
  padding: 8px 14px;
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: #edf0f6;
  color: var(--gr-ink);
  font-size: 14px;
  font-weight: 650;
}
@media (max-height: 460px) {
  .gr-sheet { height: 93%; }
  .gr-head { min-height: 53px; }
  .gr-dialog .gr-close { top: 10px; }
  .gr-tabs { margin-block: 0 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .gr-dialog::before, .gr-dialog[data-shown] .gr-sheet, .gr-sheet, .gr-tabs::before, .gr-dialog .gr-tab, .gr-track { transition: none; }
}
.gr-lane {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  min-width: 0;
}
.gr-lane .gr-page { width: 100%; }
.gr-lane {
  --gr-list-gutter:16px;
  --gr-self-height:30px;
}
.gr-lane:is([data-self-state="inline"], [data-self-state="pinned"]) .gr-page {
  padding-bottom: calc(var(--gr-self-height) + 7px);
  scroll-padding-bottom: var(--gr-self-height);
}
.gr-lane .gr-table thead th { z-index: 4; }
.gr-self-dock {
  position: absolute;
  z-index: 3;
  inset: auto 0 0;
  height: var(--gr-self-height);
  pointer-events: none;
  visibility: hidden;
}
.gr-lane[data-self-state="pinned"] .gr-self-dock { visibility: visible; }
.gr-lane[data-self-state="pinned"] .gr-self-inline { visibility: hidden; }
.gr-table tr.gr-self-reveal .gr-name { overflow: visible; }
.gr-table tr.gr-self-reveal .gr-player-name { position: relative; z-index: 1; }
.gr-self-line {
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
  box-sizing:border-box;
  height:var(--gr-self-height);
  padding-inline:var(--gr-list-gutter);
  background:#edf0f6;
  color:var(--gr-ink);
  text-align:start;
  font-size:13px;
  line-height:1.15;
  font-weight:650;
  letter-spacing:normal;
}
.gr-self-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.gr-self-rank { color:#565e6d; font-variant-numeric:tabular-nums; white-space:nowrap; }
.gr-self-score { flex:none; font-weight:700; font-variant-numeric:tabular-nums; }
