/* 게임 공통 — 머리글·점수 줄·끝 화면·명예의 전당·이니셜 고르기·자랑하기 (고기 등급 합치기·고기 굽기 10점 같이 씀)
   assets/hall.js와 짝. 클래스 이름 gr-는 처음 만든 고기 등급 합치기에서 온 것. 페이지 <main>에 class="gr"를 붙여 씀 */
.gr [hidden] { display: none !important; }

.gr-head { padding-top: 12px; }
.gr-head h1 { font-size: 28px; font-weight: 700; letter-spacing: -1px; line-height: 1.3; }
.gr-head p { color: var(--sub); font-size: 14.5px; margin-top: 4px; line-height: 1.55; }

/* 점수 줄 (상자 없이 글자만) */
.gr-score { display: flex; gap: 22px; align-items: flex-end; margin-top: 20px; }
.gr-score small { display: block; color: var(--sub); font-size: 12.5px; line-height: 1.3; }
.gr-score > div > b { display: block; white-space: nowrap; font-size: 24px; font-weight: 700; letter-spacing: -.6px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.gr-score .gr-now { margin-left: auto; text-align: right; min-width: 0; }
.gr-now span { display: inline-flex; align-items: center; gap: 4px; line-height: 1.6; white-space: nowrap; }
.gr-now span b { font-size: 15px; font-weight: 600; letter-spacing: -.3px; }
.gr-now img { width: 26px; height: 26px; }

.gr-acts { margin-top: 18px; }
.gr-acts .btn.confirm { background: var(--text); color: var(--bg); }

/* 끝 화면 */
.gr-end { margin-top: 24px; }
.gr-end h2 { font-size: 24px; font-weight: 700; letter-spacing: -.8px; line-height: 1.35; }
.gr-end-score { font-size: 17px; margin-top: 6px; }
.gr-end-score b { font-weight: 700; }
.gr-end-tier { display: flex; align-items: center; gap: 6px; color: var(--body); font-size: 15px; margin-top: 4px; }
.gr-end-tier img { width: 30px; height: 30px; }
.gr-end > .btn { margin-top: 22px; }
.gr-save { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.gr-new { color: var(--accent); font-size: 20px; font-weight: 700; letter-spacing: -.5px; }
.gr-save-q { font-size: 16px; margin-top: 2px; }
.gr-init-label { display: block; color: var(--sub); font-size: 13px; margin-top: 16px; }
/* 오락실식 이니셜 고르기: 3칸, 칸마다 위·아래 버튼 (자판 안 뜸) */
.gr-pick { display: flex; justify-content: center; gap: 12px; margin-top: 8px; }
.gr-col { display: flex; flex-direction: column; align-items: center; width: 76px; border-radius: 14px; padding: 2px 0; }
.gr-col.on { background: var(--soft); }
.gr-col button {
  display: flex; align-items: center; justify-content: center; width: 64px; height: 48px;
  background: none; border: 0; padding: 0; color: var(--text); cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.gr-col button:active { opacity: .6; }
.gr-col button svg { width: 26px; height: 26px; }
.gr-col .ch {
  width: 64px; height: 64px; font-size: 44px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
  border-bottom: 3px solid var(--line); border-radius: 0;
}
.gr-col.on .ch { border-bottom-color: var(--accent); color: var(--accent); }
.gr-col button:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; border-radius: 10px; }
.gr-init-help { color: var(--sub); font-size: 13px; margin: 8px 0 14px; text-align: center; }
.gr-init-help.bad { color: var(--accent); font-weight: 600; }
.gr-save .links { justify-content: flex-start; }

/* 명예의 전당 */
.gr-hall-msg { color: var(--sub); font-size: 15px; }
.gr-rank { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.gr-rank li { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-bottom: 1px solid var(--line); min-height: 56px; }
.gr-rank .n { flex: none; width: 26px; font-size: 15px; font-weight: 700; color: var(--sub); }
.gr-rank li:first-child .n { color: var(--accent); }
.gr-rank .who { flex: 1; min-width: 0; }
.gr-rank .who b { font-size: 17px; font-weight: 700; letter-spacing: 2px; }
.gr-rank .who small { display: block; font-size: 12.5px; color: var(--sub); line-height: 1.4; }
.gr-rank .mine { color: var(--accent); font-weight: 700; margin-right: 6px; }
.gr-rank .pts { flex: none; font-size: 17px; font-weight: 700; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.gr-rank .brag { flex: none; background: none; border: 0; padding: 0 2px; min-height: 44px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.gr-rank li.hl { background: var(--soft); border-radius: 10px; }
.gr-rank li.hl .who b, .gr-rank li.hl .pts { color: var(--accent); }

/* 자랑하기 */
.gr-brag { margin-top: 20px; }
.gr-brag-line { font-size: 20px; font-weight: 700; letter-spacing: -.4px; margin-bottom: 12px; }
.gr-brag .btn + .btn { margin-top: 10px; }
.gr-brag .links { justify-content: flex-start; }

/* 친구가 연 자랑 링크 */
.gr-proof { margin-top: 6px; background: var(--soft); border-radius: 12px; padding: 14px 16px; }
.gr-proof .ok { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--accent); }
.gr-proof .ok svg { flex: none; width: 22px; height: 22px; }
.gr-proof .rec { font-size: 18px; font-weight: 700; letter-spacing: -.3px; margin-top: 6px; }
.gr-proof .was { color: var(--body); font-size: 14.5px; margin-top: 2px; }
.gr-proof .go { display: inline-flex; align-items: center; min-height: 40px; font-size: 14.5px; font-weight: 600; color: var(--text); text-underline-offset: 3px; }

/* 알림은 화면 위쪽에 (아래쪽 이니셜 입력·버튼을 가리지 않게) */
.gr ~ .toast { top: calc(12px + env(safe-area-inset-top)); bottom: auto; }

@media (max-width: 359px) {
  .wrap.gr { padding-left: 20px; padding-right: 20px; }
  .gr-score { gap: 16px; }
  .gr-score > div > b { font-size: 21px; }
  .gr-pick { gap: 6px; }
}
