/* 게임 선반 — shelf.js가 붙인다. 픽셀 글꼴(Galmuri, OFL) + 계단식 테두리 */
@font-face { font-family: 'Galmuri11'; src: url('/assets/fonts/Galmuri11.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Galmuri11'; font-weight: 700; src: url('/assets/fonts/Galmuri11-Bold.woff2') format('woff2'); font-display: swap; }

.rg-side, .rg-bottom { font-family: 'Galmuri11', -apple-system, 'Apple SD Gothic Neo', sans-serif; color: #1F2420; -webkit-font-smoothing: none; }
.rg-head { font-size: 14px; font-weight: 700; color: #7A7F78; margin: 0 2px 10px; letter-spacing: 1px; }

/* 세로형 큰 카드: 아이콘 → 종류 → 이름 → 설명 → 내 기록 → 버튼 */
.rg-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  text-decoration: none; color: inherit;
  background: #FFFDF7; border: 3px solid #1F2420; box-shadow: 0 4px 0 #1F2420;
  padding: 16px 14px 14px; margin-bottom: 16px; transition: transform .08s;
}
a.rg-card:hover { transform: translateY(-3px); box-shadow: 0 7px 0 #1F2420; }
a.rg-card:active { transform: translateY(4px); box-shadow: none; }
.rg-card.here { background: #E4F3DC; }

.rg-icon { width: 100%; height: 110px; display: flex; align-items: center; justify-content: center; background: #F6F3EC; border: 3px solid #1F2420; overflow: hidden; }
.rg-icon img { height: 96px; width: auto; image-rendering: pixelated; }
.rg-icon img[src$="card.png"] { image-rendering: auto; }   /* 기계 그림은 크게 그려 줄이는 그림 */
.rg-txt { background: #1F2420; color: #9BE07A; font-weight: 700; font-size: 32px; letter-spacing: 1px; }

.rg-kind { margin-top: 12px; font-size: 12px; font-weight: 700; color: #3E9B3A; letter-spacing: 1px; }
.rg-name { margin-top: 4px; font-size: 24px; font-weight: 700; line-height: 1.2; }
.rg-desc { margin-top: 8px; font-size: 14px; line-height: 1.5; color: #3A403B; word-break: keep-all; }
.rg-prog { margin-top: 8px; font-size: 13px; color: #2B6E28; }
.rg-go { margin-top: 12px; width: 100%; padding: 10px 0; font-size: 17px; font-weight: 700; background: #3E9B3A; color: #fff; border: 3px solid #1F2420; }
.rg-card.here .rg-go { background: #FFFDF7; color: #7A7F78; }

/* 준비 중: 작은 한 줄 */
.rg-soon { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 10px; border: 3px dashed #B4B2A9; color: #7A7F78; }
.rg-soon .rg-q { flex: 0 0 34px; height: 34px; display: flex; align-items: center; justify-content: center; border: 2px dashed #B4B2A9; font-size: 20px; font-weight: 700; }
.rg-soon b { display: block; font-size: 16px; font-weight: 700; color: #5F5E5A; }
.rg-soon small { display: block; font-size: 12px; margin-top: 2px; }
.rg-soon > span:nth-child(2) { flex: 1; min-width: 0; }
.rg-soon i { font-style: normal; font-size: 12px; font-weight: 700; white-space: nowrap; }

/* 휴대폰·좁은 화면: 홈 맨 아래 */
.rg-side { display: none; }
.rg-bottom { margin: 12px 0 16px; }
.rg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.rg-grid .rg-card { margin-bottom: 4px; }
.rg-soonlist { margin-top: 10px; }

/* PC: 가운데 게임(최대 480px) 양옆에 세로로 */
@media (min-width: 1080px) {
  .rg-bottom { display: none; }
  .rg-side { display: block; position: fixed; top: 24px; width: 240px; max-height: calc(100vh - 48px); overflow-y: auto; z-index: 2; padding-bottom: 8px; scrollbar-width: none; }
  .rg-side::-webkit-scrollbar { display: none; }
  .rg-left { left: calc(50% - 240px - 36px - 240px); }
  .rg-right { left: calc(50% + 240px + 36px); }
}
/* 게임 판 위에서는 숨긴다 */
body:has(#game.active) .rg-side, body:has(#game.active) .rg-bottom { display: none; }
