@font-face {
  font-family: "Noto Sans KR";
  src: url("/assets/fonts/NotoSansKR-Black.woff2") format("woff2");
  /* Black(900) 단일 파일. 어떤 굵기를 요청해도 이 파일을 쓰게 해
     브라우저가 볼드를 덧씌워 글자가 뭉개지는 것을 막는다. */
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --shell-bg: rgba(17, 9, 14, 0.34);
  --shell-border: rgba(255, 244, 230, 0.16);
  --text-strong: #fff8ef;
  --text-soft: rgba(255, 243, 230, 0.82);
  --card-shadow: 0 28px 70px rgba(16, 5, 10, 0.38);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", "Malgun Gothic", sans-serif;
  color: var(--text-strong);
  background:
    linear-gradient(180deg, rgba(18, 7, 10, 0.28) 0%, rgba(16, 8, 11, 0.42) 100%),
    url("/assets/icons/lobby-stage.jpg") center center / cover no-repeat fixed;
}

body {
  overflow-x: hidden;
}

.lobby-page {
  min-height: 100vh;
  padding: clamp(10px, 1vw, 18px);
}

.lobby-shell {
  width: 100%;
  min-height: calc(100vh - clamp(20px, 2vw, 36px));
  margin: 0;
  padding: clamp(18px, 2vw, 32px);
  border-radius: 30px;
  border: 1px solid var(--shell-border);
  background: linear-gradient(180deg, rgba(38, 11, 16, 0.18), var(--shell-bg));
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(5px);
}

.lobby-header {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: clamp(150px, 19vh, 240px);
  padding-bottom: clamp(4px, 1vh, 12px);
}

.brand-logo {
  width: min(100%, 760px);
  display: flex;
  justify-content: center;
  align-items: center;
}

.brand-logo-wrap {
  position: relative;
  display: block;
  width: clamp(320px, 42vw, 760px);
  max-width: 100%;
  line-height: 0;
}

.brand-logo-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.28));
}

/* Korean tagline filling the logo's blank signboard (scales with the ~42vw logo). */
.brand-tagline {
  position: absolute;
  left: 50%;
  top: 70%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  font-family: "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-weight: 400;
  font-size: clamp(23px, 3.02vw, 55px);
  color: #4a2c14;
  line-height: 1;
  pointer-events: none;
}

.games-section {
  margin-top: 4px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(14px, 1.2vw, 22px);
}

.game-tile {
  min-width: 0;
}

.game-link {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 0.7vw, 12px);
  height: 100%;
  padding: clamp(10px, 0.8vw, 16px);
  border-radius: 28px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, rgba(255, 248, 240, 0.16), rgba(255, 248, 240, 0.08));
  border: 1px solid rgba(255, 246, 234, 0.16);
  box-shadow: 0 20px 48px rgba(10, 4, 8, 0.28);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.game-link:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 248, 238, 0.28);
  box-shadow: 0 26px 56px rgba(10, 4, 8, 0.34);
}

.game-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.visual-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.game-tile-rps .game-visual {
  background: linear-gradient(135deg, rgba(255, 177, 118, 0.94), rgba(255, 110, 134, 0.92));
}

.game-tile-rps .visual-glow {
  background:
    radial-gradient(circle at 24% 26%, rgba(255, 255, 255, 0.48), transparent 24%),
    radial-gradient(circle at 74% 72%, rgba(255, 255, 255, 0.2), transparent 28%);
}

.game-tile-balloon .game-visual {
  background: linear-gradient(135deg, rgba(107, 211, 255, 0.96), rgba(116, 255, 191, 0.9));
}

.game-tile-balloon .visual-glow {
  background:
    radial-gradient(circle at 24% 26%, rgba(255, 255, 255, 0.5), transparent 24%),
    radial-gradient(circle at 76% 74%, rgba(255, 255, 255, 0.18), transparent 28%);
}

.game-tile-hockey .game-visual {
  background: linear-gradient(135deg, rgba(126, 158, 244, 0.96), rgba(230, 96, 116, 0.92));
}

.game-tile-hockey .visual-glow {
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.46), transparent 26%),
    radial-gradient(circle at 72% 76%, rgba(255, 255, 255, 0.2), transparent 28%);
}

.game-icon-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  padding: 0;
}

.game-meta {
  text-align: center;
  padding: 2px 4px 4px;
}

.game-meta h2 {
  margin: 0;
  font-family: "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-weight: 400;
  font-size: clamp(19px, 1.4vw, 29px);
  line-height: 1.12;
  letter-spacing: 0.6px;
  color: var(--text-strong);
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(0, 0, 0, 0.28);
}

/* Name-only tiles — subtitle hidden per lobby redesign. */
.game-meta p {
  display: none;
}

@media (max-width: 1480px) {
  .game-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .game-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  html,
  body {
    background-attachment: scroll;
  }

  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .lobby-page {
    padding: 8px;
  }

  .lobby-shell {
    min-height: calc(100vh - 16px);
    padding: 14px;
    border-radius: 22px;
  }

  .brand-logo-image {
    max-width: min(100%, 420px);
  }

  .game-grid {
    grid-template-columns: 1fr;
  }
}

.game-tile-math .game-visual {
  background: linear-gradient(135deg, rgba(40, 117, 75, 0.96), rgba(23, 75, 50, 0.94));
}

.game-tile-math .visual-glow {
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.38), transparent 25%),
    radial-gradient(circle at 76% 72%, rgba(233, 255, 189, 0.18), transparent 30%);
}

.math-board-icon {
  display: grid;
  place-items: center;
  align-content: center;
  gap: clamp(5px, 0.5vw, 10px);
  padding: clamp(16px, 1.2vw, 24px);
  border: clamp(7px, 0.65vw, 12px) solid #8b5738;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 24%),
    #075536;
  color: #f4ffff;
  font-family: "Comic Sans MS", "Segoe UI", "Malgun Gothic", sans-serif;
  font-weight: 900;
  text-align: center;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.18), 0 0 9px rgba(238, 255, 255, 0.38);
  box-shadow: inset 0 0 0 4px rgba(37, 145, 86, 0.56), 0 18px 28px rgba(0, 0, 0, 0.18);
}

.math-board-icon span {
  font-size: clamp(22px, 2vw, 42px);
  line-height: 1;
}

.math-board-icon strong {
  font-size: clamp(28px, 2.5vw, 54px);
  line-height: 1;
}
.game-tile-mole .game-visual {
  background: linear-gradient(135deg, rgba(139, 221, 80, 0.96), rgba(61, 173, 76, 0.94));
}

.game-tile-mole .visual-glow {
  background:
    radial-gradient(circle at 26% 24%, rgba(255, 255, 255, 0.4), transparent 25%),
    radial-gradient(circle at 78% 72%, rgba(255, 232, 100, 0.22), transparent 31%);
}

.game-tile-spot .game-visual {
  background: linear-gradient(135deg, rgba(109, 214, 105, 0.96), rgba(67, 164, 229, 0.94));
}

.game-tile-spot .visual-glow {
  background:
    radial-gradient(circle at 25% 24%, rgba(255, 255, 255, 0.45), transparent 26%),
    radial-gradient(circle at 76% 72%, rgba(255, 238, 102, 0.24), transparent 32%);
}

/* ---------------- member picker ---------------- */
.lobby-header {
  position: relative;
}

.member-chip {
  position: absolute;
  top: clamp(10px, 1.6vh, 22px);
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 26px;
  border-radius: 20px;
  border: 3px solid rgba(255, 233, 194, 0.85);
  background: linear-gradient(180deg, #a06a3e, #83552e);
  color: #fff6e2;
  font-family: "Noto Sans KR", "Malgun Gothic", sans-serif;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(10, 4, 8, 0.35);
  transition: transform 140ms ease;
}

/* 관리자용 터치 설정 안내 링크 — 이용자 눈에 덜 띄도록 작고 흐리게 */
.guide-chip {
  position: absolute;
  top: clamp(10px, 1.6vh, 22px);
  left: 0;
  padding: 8px 16px;
  border-radius: 14px;
  border: 2px solid rgba(255, 233, 194, 0.35);
  background: rgba(60, 30, 18, 0.35);
  color: rgba(255, 243, 230, 0.7);
  font-family: "Malgun Gothic", "Segoe UI", sans-serif;
  font-size: 15px;
  text-decoration: none;
}

.member-chip:hover {
  transform: translateY(-2px);
}

.member-chip-label {
  font-size: 14px;
  color: rgba(255, 233, 194, 0.85);
  letter-spacing: 1px;
}

.member-chip-name {
  font-size: clamp(20px, 1.5vw, 26px);
  line-height: 1;
}

.member-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 10, 6, 0.62);
  backdrop-filter: blur(3px);
}

.member-overlay[hidden] {
  display: none;
}

.member-panel {
  width: min(92vw, 1080px);
  max-height: 86vh;
  overflow-y: auto;
  padding: clamp(22px, 3vw, 40px);
  border-radius: 30px;
  border: 4px solid #b2793f;
  background: #fdf2d6;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.member-panel-title {
  margin: 0 0 22px;
  text-align: center;
  font-family: "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-weight: 400;
  font-size: clamp(28px, 2.4vw, 42px);
  color: #6b4318;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.member-grid-empty {
  grid-column: 1 / -1;
  padding: 40px 10px;
  text-align: center;
  font-family: "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 22px;
  color: #8a6a42;
}

.member-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 20px 12px;
  border-radius: 18px;
  border: 3px solid #d9a44e;
  background: #ffffff;
  font-family: "Noto Sans KR", "Malgun Gothic", sans-serif;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease;
}

.member-tile:hover {
  transform: translateY(-3px);
}

.member-tile.is-active {
  border-color: #2e9650;
  background: #eefaf0;
}

.member-tile-name {
  font-size: 26px;
  color: #4a2c14;
  line-height: 1.1;
}

.member-tile-code {
  font-size: 14px;
  color: #a0866a;
}

.member-panel-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
}

.member-action-btn {
  padding: 14px 34px;
  border-radius: 18px;
  border: 3px solid rgba(255, 233, 194, 0.9);
  background: linear-gradient(180deg, #a06a3e, #83552e);
  color: #fff6e2;
  font-family: "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 22px;
  cursor: pointer;
}

.member-action-close {
  background: linear-gradient(180deg, #8a8a8a, #6b6b6b);
}

.member-action-yes {
  background: linear-gradient(180deg, #3fae63, #2b8a4a);
}

/* 초성 필터 탭 */
.member-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
}

.member-tab {
  min-width: 56px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 3px solid #d9a44e;
  background: #ffffff;
  font-family: "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 22px;
  color: #6b4318;
  cursor: pointer;
}

.member-tab.is-active {
  background: #8d5a34;
  border-color: #8d5a34;
  color: #fff6e2;
}

/* 번호 키패드 */
.member-pad-display {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 84px;
  margin: 0 auto 18px;
  max-width: 420px;
  border-radius: 18px;
  border: 3px solid #d9a44e;
  background: #ffffff;
}

.member-pad-value {
  font-family: "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 48px;
  letter-spacing: 6px;
  color: #4a2c14;
}

.member-pad-hint {
  font-family: "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 24px;
  color: #b09a7c;
}

.member-pad-grid {
  display: grid;
  grid-template-columns: repeat(3, 132px);
  gap: 12px;
  justify-content: center;
}

.member-pad-key {
  height: 96px;
  border-radius: 18px;
  border: 3px solid #d9a44e;
  background: #ffffff;
  font-family: "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 40px;
  color: #4a2c14;
  cursor: pointer;
  transition: transform 100ms ease;
}

.member-pad-key:active {
  transform: scale(0.94);
}

.member-pad-key.is-del {
  font-size: 26px;
  background: #f3e3c8;
}

.member-pad-key.is-ok {
  font-size: 30px;
  background: linear-gradient(180deg, #3fae63, #2b8a4a);
  border-color: #2b8a4a;
  color: #ffffff;
}

/* 선택 확인 */
.member-confirm {
  text-align: center;
  padding: 24px 0 8px;
}

.member-confirm-name {
  font-family: "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 64px;
  color: #2b8a4a;
  line-height: 1.1;
}

.member-confirm-question {
  font-family: "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 32px;
  color: #6b4318;
  margin: 10px 0 26px;
}

.member-confirm-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
}
