/* 수업 세션 시작 화면(games/*-live/index.html) 모양 — 2026-10-24 새 모양(시안 tools/session-preview.html, 첫 화면 portal-home.css와 같은 색·글꼴).
   구성·문구는 예전 그대로(진행 안내 → 진행 중인 세션 → 세 칸 또는 두 칸), 예전 class 이름에 새 모양을 입힌다.
   진행 창(host.html 다섯 개)도 2026-10-25부터 이 파일을 먼저 읽고, 진행 창 칸은 shared/session-host.css가 입힌다(예전 bingsoo-live/lobby.css는 안 씀).
   동작(bingsoo-live/lobby.js, pythagoras-race-live/session-tools.js)이 쓰는 id·hidden·.hidden은 그대로 둔다. */
:root {
  --ink: #1b2440;
  --ink-2: #4a5470;
  --ink-3: #7a8299;
  --blue: #1a68e6;
  --blue-dark: #1456c2;
  --orange: #f28c28;
  --cream: #fbf7f0;
  --cream-2: #f4ede1;
  --line: #e7e0d3;
  --red: #d6455d;
  --radius: 18px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden], .hidden { display: none !important; }
body {
  font-family: Pretendard, -apple-system, 'Malgun Gothic', sans-serif;
  background: var(--cream); color: var(--ink);
  word-break: keep-all; overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* 머리줄(로고만. 「게임 목록」 링크는 첫 화면을 공개할 때 넣는다) */
.nav { background: rgba(251, 247, 240, 0.86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.nav .wrap { display: flex; align-items: center; height: 68px; }
.nav-home { display: block; }  /* 로고를 누르면 첫 화면으로(2026-10-25) */
.nav-logo { display: block; height: 38px; width: auto; }
/* 머리줄 오른쪽 바로 가기: 게임 목록(첫 화면) · 이 게임 사용 설명서(guide/) — 시작 페이지에만 있고 진행 창에는 없다 */
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 20px; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.nav-links a { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.nav-links a:hover { color: var(--ink); }
.nav-links svg, .hero-guide svg { width: 18px; height: 18px; flex: none; }
/* 첫머리 설명 아래 「이 게임 사용 설명서」 단추 */
.hero-guide {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 20px;
  padding: 10px 16px; border-radius: 12px; border: 2px solid var(--blue);
  background: #fff; color: var(--blue); font-weight: 700; font-size: 15px;
  transition: background 0.2s, transform 0.15s;
}
.hero-guide:hover { background: #f2f7ff; transform: translateY(-1px); }

/* 첫머리: 왼쪽 게임 소개, 오른쪽 그림 */
.hero { padding: 44px 0 36px; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips span { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--cream-2); color: var(--ink-2); }
.chips .grade { background: #e6efff; color: var(--blue); }
.hero h1 { margin: 14px 0 12px; font-size: clamp(30px, 3.8vw, 44px); line-height: 1.22; font-weight: 800; letter-spacing: -1px; }
.hero .lead { font-size: 17px; line-height: 1.65; color: var(--ink-2); }
.hero-art img {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 20px; border: 4px solid #fff; box-shadow: 0 18px 40px rgba(27, 36, 64, 0.18);
}

/* 처음이신가요? 진행 안내 */
.live-guide { margin-bottom: 32px; }
.live-guide-head h2 { font-size: clamp(20px, 2.4vw, 24px); font-weight: 800; letter-spacing: -0.5px; }
.live-guide-lead { margin-top: 6px; color: var(--ink-2); font-size: 15px; }
.live-guide-lead strong { color: var(--ink); }
.live-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.live-step { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.live-step-num {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800;
}
.live-step strong { display: block; font-size: 16px; font-weight: 800; }
.live-step p { font-size: 14.5px; color: var(--ink-2); line-height: 1.6; margin-top: 4px; }

/* 세션이 열려 있을 때만 나오는 띠 */
.live-active-banner {
  display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap;
  background: #fff; border: 2px solid var(--blue); border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 24px;
}
.live-active-text { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.live-active-text::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px #dcfce7; }
.live-active-label { font-weight: 800; }
.live-active-code { font-family: ui-monospace, Consolas, monospace; font-weight: 800; font-size: 18px; letter-spacing: 2px; color: var(--blue); }
.admin-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 14px; border-radius: 12px; font-weight: 700; font-size: 14px; white-space: nowrap;
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.admin-btn:hover { border-color: #cfc5b3; }
.admin-btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.admin-btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.admin-btn-exit { color: var(--red); border-color: #f1c4cc; }
.live-active-banner .live-status { flex-basis: 100%; }

/* 세 칸(또는 두 칸): 수업 세션 · 함께 풀기 · 혼자 플레이 */
.live-main-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.live-card { display: flex; flex-direction: column; background: #fff; border: 2px solid var(--line); border-radius: 22px; padding: 24px 22px 22px; }
.live-card-session { border-color: var(--blue); }
.live-card-badge { align-self: flex-start; font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #e6efff; color: var(--blue); }
.live-card-badge-muted { background: var(--cream-2); color: var(--ink-2); }
.live-card-title { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; margin-top: 12px; }
.live-card-desc { font-size: 15px; color: var(--ink-2); line-height: 1.65; margin-top: 8px; }
.live-card-desc strong { color: var(--ink); }
.live-card-points { list-style: none; margin: 14px 0 22px; display: grid; gap: 6px; }
.live-card-points li { font-size: 14.5px; color: var(--ink); line-height: 1.5; padding-left: 22px; position: relative; }
.live-card-points li::before { content: '✓'; position: absolute; left: 0; color: var(--blue); font-weight: 800; }
.live-card-points-muted li { color: var(--ink-2); }
.live-card-points-muted li::before { color: var(--ink-3); }
.btn-play-game {
  margin-top: auto; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 14px 18px; border-radius: 14px; border: 0; font-weight: 700; font-size: 16px;
  background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(26, 104, 230, 0.25);
  transition: background 0.2s, transform 0.15s;
}
.btn-play-game:hover { background: var(--blue-dark); transform: translateY(-1px); }
.btn-play-game:disabled { opacity: 0.6; cursor: wait; transform: none; }
.btn-play-outline { background: #fff; color: var(--blue); border: 2px solid var(--blue); box-shadow: none; }
.btn-play-outline:hover { background: #f2f7ff; }
.live-status { font-size: 14px; color: var(--ink-2); margin-top: 10px; min-height: 1em; }
.live-status:empty { display: none; }

/* 맨 아래 줄: 이름 · 만든 사람 · 이메일 · 이용약관 · 개인정보처리방침(첫 화면과 같음) */
.site-footer { background: var(--ink); color: #c9cfdf; font-size: 14px; padding: 26px 0; margin-top: 48px; }
.site-footer .wrap { display: flex; gap: 8px 22px; align-items: center; flex-wrap: wrap; }
.foot-brand { font-size: 19px; font-weight: 800; color: #fff; letter-spacing: -0.3px; }
.foot-mail { color: #c9cfdf; }
.foot-mail:hover { color: #fff; text-decoration: underline; }
.foot-terms, .foot-privacy { color: #9aa3bb; }
.foot-terms:hover, .foot-privacy:hover { color: #fff; }
.foot-terms { margin-left: auto; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .live-steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav-logo { height: 32px; }
  .nav-links { gap: 14px; font-size: 14px; }
  .hero { padding: 24px 0 28px; }
  .live-active-text { margin-right: 0; width: 100%; }
}
