/* 게임방 공통 업그레이드 — game-room-upgrade.js와 함께 마지막에 불러온다. */

.game-top.gr-game-top {
  margin-bottom: 8px;
  gap: 10px;
}

.gr-sound-button {
  width: 40px;
  height: 36px;
  padding: 7px !important;
  display: inline-grid;
  place-items: center;
}

.gr-sound-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gr-sound-button[data-sound="off"] { color: #64748b; }

.gr-inline-speaker {
  display: inline-grid;
  width: 1em;
  height: 1em;
  margin-right: .28em;
  vertical-align: -.14em;
  place-items: center;
}

.gr-inline-speaker svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vs-spk.gr-inline-speaker {
  width: 1rem;
  height: 1rem;
  margin-right: 0;
  color: #54708e;
}

.q-lbtn .gr-inline-speaker { color: currentColor; }

.gr-energy {
  margin: 0 0 20px;
  padding: 11px 13px 12px;
  border: 1px solid #d7e0eb;
  border-radius: 12px;
  background: #f8fafc;
}

.gr-energy-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #334155;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.gr-energy-meta b {
  color: #1e3a5f;
  font-size: .88rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .08em;
}

.gr-energy-track {
  height: 14px;
  overflow: hidden;
  border: 1px solid #102a43;
  border-radius: 999px;
  background: #16283c;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .28);
}

.gr-energy-fill {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4a8fd8 0%, #82c7ee 56%, #e6f5ff 100%);
  box-shadow: inset 0 1px rgba(255, 255, 255, .6);
  transition: width .9s linear, background .25s ease;
}

.gr-energy.is-warning .gr-energy-fill {
  background: linear-gradient(90deg, #b66a20, #e6b15b 64%, #fce1a4);
}

.gr-energy.is-danger .gr-energy-fill {
  background: linear-gradient(90deg, #a63b35, #d4695e 64%, #f4b5a6);
}

.gr-energy.is-danger .gr-energy-meta b { color: #a63b35; }
.gr-energy.is-paused { border-color: #d5b36a; background: #fffaf0; }
.gr-energy.is-paused .gr-energy-meta::after { content: '정답 확인 중'; color: #94652c; font-size: .72rem; }

.gm-body .q-trans-btn,
.gm-body #qTrans { display: none !important; }

.q-reveal .gr-reveal-example {
  display: grid;
  gap: 4px;
  margin: 10px 0 12px;
  padding: 9px 10px;
  border-top: 1px solid #f2cfaa;
  border-bottom: 1px solid #f2cfaa;
  color: #4b5563;
  font-size: .92rem;
  line-height: 1.5;
}

.q-reveal .gr-reveal-example b {
  color: #9a5b24;
  font-size: .72rem;
  letter-spacing: .08em;
}

.game-result.gr-result-upgrade { padding-top: 16px; }

.gr-finish-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 7px;
  color: #1e3a5f;
}

.gr-finish-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.game-result.gr-result-upgrade .gr-title {
  margin-top: 0;
  color: #1e3a5f;
  letter-spacing: -.02em;
}

.gr-rank-prompt {
  max-width: 520px;
  margin: 22px auto 0;
  padding: 16px;
  border: 1px solid #cddbe9;
  border-radius: 14px;
  background: #f8fbff;
  text-align: left;
}

.gr-rank-prompt h3 {
  margin: 0;
  color: #1e3a5f;
  font-size: 1rem;
}

.gr-rank-prompt > p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: .84rem;
  line-height: 1.5;
}

.gr-rank-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 13px;
}

.gr-rank-choice {
  min-height: 68px;
  padding: 11px 10px;
  border: 1px solid #b9cadc;
  border-radius: 10px;
  background: #fff;
  color: #1e3a5f;
  text-align: left;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.gr-rank-choice:hover:not(:disabled),
.gr-rank-choice:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  border-color: #4779aa;
  box-shadow: 0 5px 14px rgba(30, 58, 95, .13);
}

.gr-rank-choice.is-private { border-style: dashed; }
.gr-rank-choice b,
.gr-rank-choice span { display: block; }
.gr-rank-choice b { font-size: .9rem; }
.gr-rank-choice span { margin-top: 4px; color: #64748b; font-size: .73rem; line-height: 1.3; }
.gr-rank-choice:disabled { opacity: .58; cursor: wait; }
.gr-rank-prompt.is-status { text-align: center; }
.gr-rank-prompt.is-error { border-color: #dd9d91; background: #fff7f5; }
.gr-rank-prompt:focus { outline: none; }
.gr-rank-prompt.is-pending-close {
  border-color: #c9a65e;
  box-shadow: 0 0 0 3px rgba(201, 166, 94, .14);
}
.gr-rank-prompt-status { color: #a44a3d !important; font-weight: 700; }

.gr-rank-layer {
  position: fixed;
  z-index: 1100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 20, 35, .74);
  animation: gr-rank-fade .16s ease both;
}

.gr-rank-card {
  width: min(100%, 380px);
  max-height: calc(100dvh - 36px);
  padding: 26px 23px 22px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(221, 232, 242, .55);
  border-radius: 18px;
  background: linear-gradient(160deg, #183758, #0c2137 72%);
  box-shadow: 0 24px 65px rgba(0, 0, 0, .4);
  color: #f5f9fc;
  text-align: center;
}

.gr-rank-card.has-reward { width: min(100%, 430px); }
.gr-rank-card:focus { outline: none; }
.gr-review-card .gr-rank-icon { color: #a9c6df; }
.gr-review-card .gr-rank-copy { margin-bottom: 2px; }

.gr-rank-icon {
  width: 38px;
  height: 38px;
  margin: 0 auto 8px;
  color: #f0c66a;
}

.gr-rank-icon svg { width: 100%; height: 100%; }
.gr-rank-eyebrow { margin: 0; color: #a9c6df; font-size: .68rem; font-weight: 800; letter-spacing: .14em; }
.gr-rank-card h2 { margin: 7px 0 0; font-size: 1.45rem; letter-spacing: -.03em; }
.gr-rank-copy { margin: 5px 0 17px; color: #c1d0de; font-size: .84rem; }

.gr-rank-viewport {
  position: relative;
  height: 82px;
  overflow: hidden;
  border-top: 1px solid rgba(223, 236, 247, .28);
  border-bottom: 1px solid rgba(223, 236, 247, .28);
  background: rgba(4, 15, 28, .38);
}

.gr-rank-viewport::before,
.gr-rank-viewport::after {
  position: absolute;
  z-index: 2;
  right: 0;
  left: 0;
  height: 21px;
  content: '';
  pointer-events: none;
}

.gr-rank-viewport::before { top: 0; background: linear-gradient(#102a45, transparent); }
.gr-rank-viewport::after { bottom: 0; background: linear-gradient(transparent, #102a45); }
.gr-rank-track { will-change: transform; }

.gr-rank-slot {
  height: 82px;
  display: grid;
  place-items: center;
  color: #8eaac3;
  font-family: Georgia, 'Noto Serif KR', serif;
  font-size: 2.6rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.gr-rank-slot.is-final { color: #fff3c3; text-shadow: 0 0 18px rgba(240, 198, 106, .45); }
.gr-rank-final { margin: 14px 0 0; color: #f4cc72; font-size: 1.45rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.gr-rank-note { min-height: 20px; margin: 6px 0 16px; color: #c2d0dc; font-size: .8rem; }
.gr-rank-close { min-width: 132px; padding: 10px 20px; border: 1px solid #f0c66a; border-radius: 8px; background: #f0c66a; color: #173452; font-weight: 900; cursor: pointer; }
.gr-rank-close:hover, .gr-rank-close:focus-visible { background: #fff0b8; }
.gr-rank-card.is-landed .gr-rank-final { animation: gr-rank-land .42s ease both; }

/* 순위 룰렛이 멈춘 뒤 나오는 관왕 벨트 획득 안내. 화려한 게임풍 대신 오래된 상패처럼 표현한다. */
.gr-belt-event {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 14px 0 0;
  padding: 11px 12px;
  border: 1px solid rgba(240, 198, 106, .76);
  border-left: 4px solid #e8b84d;
  border-radius: 8px;
  background: rgba(250, 235, 187, .12);
  color: #f9e5a8;
  text-align: left;
  animation: gr-belt-rise .42s ease both;
}
.gr-belt-event-mark { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #f0c66a; border-radius: 50%; color: #fff0b8; font-family: Georgia, 'Noto Serif KR', serif; font-size: 15px; font-weight: 800; }
.gr-belt-event-new { position: absolute; top: -7px; right: 2px; padding: 3px 6px; border: 1px solid #f1ca74; border-radius: 2px; background: #9b3e35; box-shadow: 0 2px 5px rgba(0, 0, 0, .22); color: #fff4d2; font-family: Georgia, 'Noto Serif KR', serif; font-size: .58rem; font-weight: 800; letter-spacing: .09em; line-height: 1; transform: rotate(3deg); }
.gr-belt-event-kicker { display: block; margin-bottom: 2px; color: #e9c56d; font-family: Georgia, serif; font-size: .58rem; font-weight: 800; letter-spacing: .1em; }.gr-belt-event strong { display: block; color: #fff4c9; font-size: .81rem; line-height: 1.35; }.gr-belt-event p { margin: 3px 0 0; color: #d6e0ea; font-size: .73rem; line-height: 1.5; word-break: keep-all; }
@keyframes gr-belt-rise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

/* 로그인 안내. 게임 시작을 막는 이유를 alert 대신 한 화면에서 설명한다. */
.gr-access-layer {
  position: fixed;
  z-index: 1120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 20, 35, .68);
  animation: gr-rank-fade .16s ease both;
}

.gr-access-layer:focus { outline: none; }

.gr-rank-layer:focus { outline: none; }

.gr-access-card {
  width: min(100%, 390px);
  padding: 27px 24px 23px;
  border: 1px solid #d4dfeb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(4, 18, 34, .3);
  color: #172f4b;
  text-align: center;
}

.gr-access-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border: 1px solid #b89851;
  border-radius: 50%;
  color: #7a5a20;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.gr-access-card h2 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -.025em;
}

.gr-access-card > p {
  margin: 9px 0 0;
  color: #5f6f80;
  font-size: .88rem;
  line-height: 1.65;
  word-break: keep-all;
}

.gr-access-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.gr-access-actions button {
  min-width: 104px;
  min-height: 42px;
  padding: 9px 17px;
  border-radius: 8px;
  font: inherit;
  font-size: .86rem;
  font-weight: 800;
  cursor: pointer;
}

.gr-access-close {
  border: 1px solid #ccd6e0;
  background: #fff;
  color: #4e6175;
}

.gr-access-primary {
  border: 1px solid #173d64;
  background: #173d64;
  color: #fff;
  box-shadow: 0 5px 12px rgba(23, 61, 100, .18);
}

.gr-access-actions button:hover,
.gr-access-actions button:focus-visible { transform: translateY(-1px); }

/* 순위 릴이 멈춘 뒤 나타나는 캐시 수령 영역 */
.gr-reward-panel {
  margin: 15px 0 13px;
  padding: 16px 15px 14px;
  border: 1px solid rgba(240, 198, 106, .68);
  border-radius: 11px;
  background: rgba(255, 249, 229, .08);
  box-shadow: inset 0 1px rgba(255, 255, 255, .08);
  text-align: left;
  animation: gr-reward-rise .25s ease both;
}

.gr-reward-kicker {
  display: block;
  color: #f0cd7b;
  font-family: Georgia, 'Noto Serif KR', serif;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
}

.gr-reward-message {
  margin: 7px 0 0;
  color: #f7fafc;
  font-size: .9rem;
  font-weight: 650;
  line-height: 1.62;
  word-break: keep-all;
}

.gr-reward-actions {
  display: grid;
  grid-template-columns: minmax(88px, .8fr) minmax(130px, 1.2fr);
  gap: 8px;
  margin-top: 13px;
}

.gr-reward-actions button {
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 8px;
  font: inherit;
  font-size: .84rem;
  font-weight: 850;
  cursor: pointer;
}

.gr-reward-later {
  border: 1px solid rgba(213, 227, 239, .36);
  background: transparent;
  color: #c5d3df;
}

.gr-reward-claim {
  border: 1px solid #f0c66a;
  background: #f0c66a;
  color: #173452;
  box-shadow: 0 5px 13px rgba(0, 0, 0, .18);
}

.gr-reward-actions button:hover:not(:disabled),
.gr-reward-actions button:focus-visible:not(:disabled) { transform: translateY(-1px); }
.gr-reward-actions button:disabled { opacity: .62; cursor: wait; }

.gr-reward-status {
  min-height: 1.25em;
  margin: 7px 0 0;
  color: #ffc5b7;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.4;
}

.gr-reward-panel.is-review {
  border-color: rgba(174, 198, 221, .48);
  background: rgba(157, 184, 209, .09);
  text-align: center;
}

.gr-reward-panel.is-review strong,
.gr-reward-success-title {
  display: block;
  color: #eef6fd;
  font-size: .92rem;
}

.gr-reward-panel.is-review p,
.gr-reward-success-copy {
  margin: 6px 0 0;
  color: #bed0df;
  font-size: .8rem;
  line-height: 1.55;
  word-break: keep-all;
}

.gr-reward-panel.is-success {
  border-color: rgba(135, 205, 168, .58);
  background: rgba(83, 161, 121, .11);
  text-align: center;
}

@keyframes gr-rank-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes gr-rank-land { 0% { transform: scale(.65); opacity: 0; } 66% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@keyframes gr-reward-rise { from { transform: translateY(7px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (max-width: 640px) {
  .game-top.gr-game-top { gap: 7px; }
  .game-top.gr-game-top .g-progress { display: none; }
  .game-top.gr-game-top .g-count { min-width: 42px; font-size: .72rem; }
  .gr-energy { margin-bottom: 15px; padding: 10px 11px; }
  .gr-energy-track { height: 13px; }
  .gr-rank-choices { grid-template-columns: 1fr; }
  .gr-rank-card { padding: 23px 18px 19px; }
  .gr-access-card { padding: 24px 19px 20px; }
  .gr-reward-panel { padding: 14px 13px 12px; }
  .gr-reward-message { font-size: .86rem; }
}

@media (prefers-reduced-motion: reduce) {
  .gr-energy-fill,
  .gr-rank-choice,
  .gr-rank-layer,
  .gr-rank-card.is-landed .gr-rank-final,
  .gr-access-layer,
  .gr-reward-panel { transition: none; animation: none; }
}

/* 순위 확인: 홈페이지의 청회색·네이비 톤을 유지하되, 게임 슬롯 느낌 대신
   기록표 한 장을 넘기는 듯한 가벼운 리더보드 UI로 정리한다. */
.gr-rank-layer {
  background: rgba(31, 51, 76, .26);
  backdrop-filter: blur(5px);
}
.gr-rank-card {
  border-color: #d8e2ea;
  border-radius: 15px;
  background: #fbfcfd;
  box-shadow: 0 26px 70px rgba(24, 43, 66, .2), 0 1px 0 rgba(255, 255, 255, .96) inset;
  color: #243b53;
}
.gr-rank-icon { width: 31px; height: 31px; margin-bottom: 7px; color: #315d88; }
.gr-rank-eyebrow { color: #6b8196; letter-spacing: .11em; }
.gr-rank-card h2 { color: #223c58; font-size: 1.38rem; }
.gr-rank-copy { color: #718196; }
.gr-rank-viewport {
  height: 90px;
  border: 1px solid #d4e0e9;
  border-radius: 11px;
  background: #f3f7fa;
  box-shadow: inset 0 1px 5px rgba(42, 70, 98, .07);
}
.gr-rank-viewport::before { height: 29px; background: linear-gradient(#e7eff5, transparent); }
.gr-rank-viewport::after { height: 29px; background: linear-gradient(transparent, #e7eff5); }
.gr-rank-slot {
  height: 90px;
  color: #91a3b4;
  font-family: 'Noto Sans KR', 'Segoe UI', sans-serif;
  font-size: 2.7rem;
  font-weight: 800;
  letter-spacing: -.06em;
}
.gr-rank-slot.is-final {
  color: #244f78;
  text-shadow: 0 2px 10px rgba(71, 103, 136, .18);
}
.gr-rank-marker {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: 13px;
  left: 13px;
  height: 0;
  transform: translateY(-50%);
  border-top: 1px solid rgba(49, 93, 136, .48);
  background: none;
  box-shadow: none;
  color: transparent;
  pointer-events: none;
}
.gr-rank-marker::before {
  position: absolute;
  top: -12px;
  left: 50%;
  padding: 4px 8px;
  border: 1px solid #315d88;
  border-radius: 999px;
  background: #fbfcfd;
  color: #fff;
  content: '나의 위치';
  color: #315d88;
  font-size: .57rem;
  font-weight: 800;
  letter-spacing: .02em;
  transform: translateX(-50%);
}
.gr-rank-final { color: #244f78; font-size: 1.36rem; }
.gr-rank-note { color: #718096; }
.gr-rank-close {
  border-color: #315d88;
  background: #315d88;
  color: #fff;
  box-shadow: 0 5px 13px rgba(49, 93, 136, .18);
}
.gr-rank-close:hover, .gr-rank-close:focus-visible { background: #274e75; }
.gr-rank-card .gr-reward-panel {
  border-color: #b7ccdc;
  background: #f7fbfe;
  box-shadow: inset 0 1px rgba(255, 255, 255, .9), 0 5px 14px rgba(31, 55, 80, .08);
}
.gr-rank-card .gr-reward-kicker { color: #476788; }
.gr-rank-card .gr-reward-message { color: #314d69; }
.gr-rank-card .gr-reward-later { border-color: #b8c9d8; background: #fff; color: #65788d; }
.gr-rank-card .gr-reward-claim { border-color: #d0a94f; background: #e8bd61; color: #243b53; box-shadow: 0 5px 13px rgba(50, 73, 96, .12); }
.gr-rank-card .gr-reward-status { color: #a44a3d; }
.gr-rank-card .gr-belt-event { border-color: #cfb16b; background: #fffaf0; color: #6b542e; }
.gr-rank-card .gr-belt-event strong { color: #5e4828; }
.gr-rank-card .gr-belt-event p { color: #77694f; }

/* 지급 완료는 밝은 순위 카드 위에서도 즉시 읽혀야 한다. */
.gr-rank-card .gr-reward-panel.is-success {
  border-color: #80b99a;
  background: #edf8f0;
  box-shadow: inset 0 1px rgba(255, 255, 255, .96), 0 6px 15px rgba(35, 102, 67, .1);
}
.gr-rank-card .gr-reward-panel.is-success .gr-reward-success-title { color: #17623c; }
.gr-rank-card .gr-reward-panel.is-success .gr-reward-success-copy { color: #24533c; font-weight: 700; }

/* 실제 기록을 중심으로 순위를 빠르게 굴린 뒤, 내 앞뒤 다섯 자리까지 고정해 보여 준다. */
.gr-rank-card.gr-rank-board-card,
.gr-rank-card.gr-rank-board-card.has-reward {
  width: min(100%, 660px);
  padding: 24px 24px 20px;
  text-align: left;
}

.gr-rank-board-card .gr-rank-icon,
.gr-rank-board-card .gr-rank-eyebrow,
.gr-rank-board-card h2,
.gr-rank-board-card .gr-rank-copy { text-align: center; }
.gr-rank-board-card .gr-rank-icon { margin-right: auto; margin-left: auto; }
.gr-rank-board-card .gr-rank-copy { margin-bottom: 13px; }

.gr-rank-reveal {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: 'kicker rank' 'total rank';
  gap: 2px 14px;
  align-items: center;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #cbd9e5;
  border-left: 4px solid #315d88;
  border-radius: 9px;
  background: linear-gradient(100deg, #f5f9fc, #edf4f8);
  box-shadow: inset 0 1px rgba(255,255,255,.9);
}
.gr-rank-reveal span:first-child {
  grid-area: kicker;
  color: #60778d;
  font-size: .69rem;
  font-weight: 800;
  letter-spacing: .1em;
}
.gr-rank-reveal strong {
  grid-area: rank;
  align-self: stretch;
  display: grid;
  place-items: center;
  min-width: 74px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #315d88;
  color: #fff;
  font-family: Georgia, 'Noto Serif KR', serif;
  font-size: 1.38rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.04em;
}
.gr-rank-reveal strong.is-rolling {
  background: linear-gradient(#244d74, #315d88 48%, #244d74);
  box-shadow: inset 0 8px 9px rgba(13, 38, 63, .28), inset 0 -8px 9px rgba(13, 38, 63, .28);
  animation: gr-rank-slot-shift .09s linear infinite;
}
@keyframes gr-rank-slot-shift { 50% { transform: translateY(1px); } }
.gr-rank-reveal span:last-child {
  grid-area: total;
  color: #718399;
  font-size: .76rem;
}

.gr-nearby-board {
  margin-top: 2px;
  overflow: hidden;
  border: 1px solid #cfdae4;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 5px 17px rgba(37, 61, 86, .06);
  opacity: .42;
  transform: translateY(7px);
  transition: opacity .36s ease, transform .42s cubic-bezier(.2,.75,.25,1);
}
.gr-nearby-board:focus-visible { outline: 3px solid rgba(49, 93, 136, .34); outline-offset: 2px; }
.gr-rank-board-card.is-revealed .gr-nearby-board { opacity: 1; transform: translateY(0); }
.gr-nearby-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 13px 9px;
  border-bottom: 1px solid #dce6ee;
  background: #f4f8fb;
}
.gr-nearby-heading strong { color: #284967; font-size: .84rem; letter-spacing: -.01em; }
.gr-nearby-heading span { color: #73869a; font-size: .69rem; font-weight: 700; }
.gr-nearby-columns,
.gr-nearby-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 82px 55px;
  gap: 8px;
  align-items: center;
}
.gr-nearby-columns {
  min-height: 29px;
  padding: 0 13px;
  border-bottom: 1px solid #e2eaf0;
  color: #8798a8;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .04em;
}
.gr-nearby-columns span:nth-child(3),
.gr-nearby-columns span:nth-child(4) { text-align: right; }
.gr-nearby-list {
  max-height: min(432px, calc(100dvh - 390px));
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: #b4c6d5 transparent;
  scrollbar-width: thin;
}
.gr-nearby-row {
  position: relative;
  min-height: 38px;
  padding: 0 13px;
  border-bottom: 1px solid #edf2f6;
  color: #41576b;
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
}
.gr-nearby-row:last-child { border-bottom: 0; }
.gr-nearby-row.is-mine {
  z-index: 1;
  margin: 2px 0;
  border-top: 1px solid #9db7cf;
  border-bottom: 1px solid #9db7cf;
  background: #eaf2f8;
  color: #183e61;
  box-shadow: inset 3px 0 #315d88;
  font-weight: 800;
}
.gr-nearby-row.is-empty { color: #b2c0cb; background: #fbfcfd; }
.gr-nearby-row.is-empty .gr-nearby-rank,
.gr-nearby-row.is-empty .gr-nearby-name,
.gr-nearby-row.is-empty .gr-nearby-score,
.gr-nearby-row.is-empty .gr-nearby-time { color: #b7c3cd; font-weight: 600; }
.gr-nearby-rank { color: #6c8297; font-weight: 800; }
.gr-nearby-row.is-mine .gr-nearby-rank { color: #24577f; }
.gr-nearby-name {
  overflow: hidden;
  min-width: 0;
  color: #304a62;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gr-nearby-row.is-anonymous .gr-nearby-name { color: #6f8190; letter-spacing: .09em; }
.gr-nearby-name em {
  display: inline-flex;
  margin-left: 6px;
  padding: 1px 5px 2px;
  border: 1px solid #7294b1;
  border-radius: 3px;
  color: #315d88;
  font-size: .6rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .04em;
  vertical-align: 1px;
}
.gr-nearby-score,
.gr-nearby-time { text-align: right; white-space: nowrap; }
.gr-nearby-score { color: #334f69; font-weight: 700; }
.gr-nearby-time { color: #71879a; font-size: .74rem; }
.gr-rank-board-card .gr-rank-note { margin: 10px 0 14px; text-align: center; }
.gr-rank-board-card .gr-rank-close { display: block; margin: 0 auto; }

@media (max-width: 640px) {
  .gr-rank-card.gr-rank-board-card,
  .gr-rank-card.gr-rank-board-card.has-reward { padding: 20px 14px 16px; }
  .gr-rank-reveal { padding: 10px 11px; }
  .gr-nearby-columns,
  .gr-nearby-row { grid-template-columns: 42px minmax(0, 1fr) 67px 45px; gap: 5px; }
  .gr-nearby-columns,
  .gr-nearby-row { padding-right: 10px; padding-left: 10px; }
  .gr-nearby-row { min-height: 31px; font-size: .74rem; }
  .gr-nearby-list { max-height: min(392px, calc(100dvh - 378px)); }
  .gr-nearby-score { font-size: .71rem; }
  .gr-nearby-time { font-size: .68rem; }
}

@media (prefers-reduced-motion: reduce) {
  .gr-nearby-board { transition: none; }
  .gr-rank-reveal strong.is-rolling { animation: none; }
}
