/* player app — mobile first */
body { height: 100dvh; overflow: hidden; }
.screen { display: none; height: 100dvh; padding: max(16px, env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom)); }
.screen.active { display: flex; flex-direction: column; }
.hidden { display: none !important; }
.dim { color: var(--fg-dim); }

/* join */
.join-wrap { margin: auto; width: min(360px, 92vw); display: flex; flex-direction: column; gap: 14px; text-align: center; }
.logo { font-size: 56px; }
.brand { font-size: 22px; letter-spacing: .14em; margin: 0; font-weight: 900; }
.brand span { color: var(--acc2); }
.join-wrap h2 { margin: 2px 0 8px; font-weight: 700; color: var(--fg-dim); font-size: 16px; }
.join-wrap input {
  background: var(--panel); border: 1.5px solid var(--panel-bd); border-radius: 14px;
  color: var(--fg); font-size: 22px; font-weight: 800; text-align: center; padding: 14px;
  outline: none; transition: border-color .15s;
}
.join-wrap input:focus { border-color: var(--acc); }
/* [엔지니어 2026-06-19] placeholder(팔찌번호 등)가 길어서 짤리는 문제 — placeholder만 작게+한 줄 맞춤 (입력값은 22px 유지) */
.join-wrap input::placeholder { font-size: 15px; font-weight: 600; letter-spacing: normal; text-transform: none; opacity: .75; }
#inCode { letter-spacing: .35em; text-transform: uppercase; }
.join-err { min-height: 22px; color: var(--bad); font-weight: 700; }

/* generic centered screen */
.center-wrap { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; width: 100%; }
.avatar { font-size: 72px; line-height: 1; }
.big-msg { font-size: 17px; max-width: 280px; }
.gain { font-size: 40px; font-weight: 900; color: var(--good); }
.rank-big { font-size: 54px; font-weight: 900; color: var(--acc2); }

/* quiz */
.quiz-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.quiz-timer { flex: 1; height: 10px; background: var(--panel); border-radius: 99px; overflow: hidden; }
#quizTimerBar { height: 100%; width: 100%; background: linear-gradient(90deg, var(--good), var(--acc2), var(--bad)); transition: width .25s linear; }
.quiz-hint { text-align: center; color: var(--fg-dim); font-weight: 700; margin: 8px 0 14px; }
/* [엔지니어 2026-06-23] (Ben) 한·영 병기로 길어진 질문 — 폰트 축소로 오버플로우 방지 */
.quiz-question { text-align: center; font-weight: 900; font-size: clamp(15px, 4.6vw, 21px); line-height: 1.25; margin: 6px 0 12px; word-break: break-word; max-height: 30vh; overflow-y: auto; }
/* [엔지니어 2026-06-16] AI vs 인간 좌/우 선택 버튼 (Ben) */
.ai-choice-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-content: stretch; }
.ai-choice-btn { border-radius: 22px; color: #fff; font-weight: 900; font-size: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 200px; box-shadow: 0 8px 22px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.25); transition: transform .08s; line-height: 1.2; }
.ai-choice-btn:active { transform: scale(.95); }
.ai-choice-btn .ai-arrow { font-size: 54px; }
.ai-choice-btn.ai-l { background: linear-gradient(180deg,#4dd4ff,#2a8fe0); }
.ai-choice-btn.ai-r { background: linear-gradient(180deg,#ff9f6b,#ee6a3b); }
#quizAnswer { flex: 1; display: flex; flex-direction: column; }
.ans-grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: stretch; }
.ans-grid.two { grid-template-columns: 1fr; }
.ans-btn {
  border-radius: 20px; color: #fff; font-size: 44px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .08s;
  min-height: 64px; overflow: hidden;
}
.ans-btn:active { transform: scale(.95); }
/* [엔지니어 2026-06-16] 보기 텍스트가 있으면: 도형은 작게 왼쪽, 텍스트 크게 — 모바일에서 읽고 풀게 */
/* [엔지니어 2026-06-23] (Ben) 한·영 병기로 길어진 보기 — 폰트 축소 + 줄바꿈으로 4개 다 보이게 */
.ans-btn.has-text {
  flex-direction: row; gap: 10px; justify-content: flex-start;
  padding: 10px 14px; text-align: left;
}
.ans-btn.has-text .ans-shape { font-size: 22px; flex: 0 0 auto; opacity: .9; }
.ans-btn.has-text .ans-text { font-size: clamp(13px, 4vw, 18px); line-height: 1.2; font-weight: 800; word-break: break-word; }

/* duck */
.cheer-btn { font-size: 28px; padding: 26px 44px; border-radius: 26px; }
#cheerBurst { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.heart { position: absolute; bottom: 90px; font-size: 28px; animation: floatUp 1.3s ease-out forwards; }
@keyframes floatUp { to { transform: translateY(-50vh) scale(1.6); opacity: 0; } }
.winner-list { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-direction: column; gap: 8px; max-height: 40vh; overflow: auto; width: min(320px, 88vw); }
.winner-list li { background: var(--panel); border: 1px solid var(--panel-bd); border-radius: 12px; padding: 10px 14px; font-weight: 800; font-size: 18px; }
.winner-list li.first { background: linear-gradient(180deg, rgba(255,199,61,.25), rgba(255,199,61,.08)); border-color: rgba(255,199,61,.5); }

/* bingo */
/* [엔지니어 2026-06-23] (Ben) 빙고 화면 배경 — 밋밋하던 단색 대신 화사한 그라데이션 + 드리프트 도트 */
#s-bingo {
  position: relative;
  /* [엔지니어 2026-06-23] 보드 폭 — dvh로 높이까지 맞추되 max()로 하한(짧은/가로 화면에서 0↓ 붕괴 방지) */
  --bw: min(92vw, max(210px, 100dvh - 150px));
  background:
    radial-gradient(900px 520px at 12% -6%, rgba(255,67,50,.22), transparent 60%),
    radial-gradient(820px 600px at 96% 106%, rgba(255,183,61,.20), transparent 60%),
    linear-gradient(165deg, #18233f, #0b1020 72%);
}
#s-bingo::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,.06) 2px, transparent 2.6px);
  background-size: 54px 54px; opacity: .5; animation: bDrift 16s linear infinite;
}
#s-bingo > * { position: relative; z-index: 1; }
@keyframes bDrift { to { background-position: 54px 54px; } }
.bingo-head { display: flex; gap: 10px; justify-content: center; margin-bottom: 6px; }
/* [엔지니어 2026-06-23] (Ben) 4x4/5x5 word 빙고가 게스트 화면에서 짤리던 문제 — dvh 기준으로 높이까지 맞춰
   보드를 항상 화면 안에 들어오게 + 칸 글자를 보드 칸 크기(--bn)에 비례 축소(워드는 더 작게+줄바꿈). */
.bingo-grid { display: grid; gap: 8px; margin: 4px auto auto; width: var(--bw, min(92vw, 60vh)); --bn: 5; }
.bingo-cell {
  aspect-ratio: 1; border-radius: 14px; font-weight: 900;
  font-size: calc((var(--bw, 60vh) - (var(--bn,5) - 1) * 8px) / var(--bn,5) * 0.42);
  background: var(--panel); border: 1.5px solid var(--panel-bd); color: var(--fg);
  display: flex; align-items: center; justify-content: center; transition: transform .1s;
  overflow: hidden; padding: 2px; text-align: center;
}
.bingo-cell:active { transform: scale(.93); }
.bingo-cell.daub { background: linear-gradient(180deg, #ffd36a, #f3a72b); color: #3a2702; border-color: transparent; }
.bingo-cell.free { background: linear-gradient(180deg, #58d6ad, #1fa97c); color: #053524; border-color: transparent; }
.bingo-banner {
  position: fixed; left: 50%; top: 16%; transform: translateX(-50%);
  background: linear-gradient(180deg, #ffd36a, #f3a72b); color: #3a2702;
  font-size: 34px; font-weight: 900; padding: 18px 34px; border-radius: 22px;
  box-shadow: 0 14px 50px rgba(243, 167, 43, .5); z-index: 40;
}
/* [엔지니어 2026-06-16] N빙고 펄스 + 5초 배치 카운트다운 바 */
.bingo-banner.line-pop { animation: linePop .5s cubic-bezier(.2,1.5,.4,1) both; }
@keyframes linePop { 0% { transform: translateX(-50%) scale(.4); opacity: 0; } 60% { transform: translateX(-50%) scale(1.15); opacity: 1; } 100% { transform: translateX(-50%) scale(1); } }
.bingo-arrbar { width: var(--bw, min(92vw, 60vh)); height: 12px; margin: 4px auto; background: rgba(255,255,255,.12); border-radius: 999px; overflow: hidden; }
#bingoArrBar { height: 100%; width: 100%; background: linear-gradient(90deg, #58d6ad, #ffd36a); border-radius: 999px; transition: width .12s linear; }

/* tap battle */
.countdown { font-size: 80px; font-weight: 900; color: var(--acc2); min-height: 90px; }
.tap-score { font-size: 76px; font-weight: 900; color: var(--acc2); font-variant-numeric: tabular-nums; }
.tap-btn {
  width: min(72vw, 340px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8ba0, #e8244d 70%);
  color: #fff; font-size: 34px; font-weight: 900;
  box-shadow: 0 14px 50px rgba(232, 36, 77, .5), inset 0 4px 10px rgba(255,255,255,.3), inset 0 -10px 24px rgba(0,0,0,.25);
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.tap-btn:active { transform: scale(.93); }

/* connection bar */
.conn-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 99;
  background: var(--bad); color: #fff; text-align: center;
  font-size: 13px; font-weight: 800; padding: 6px;
}

/* generic choice screen */
.gen-choice { flex: 1; display: flex; flex-direction: column; }
.gen-choice .ans-grid { flex: 1; }
.ans-btn.picked { outline: 4px solid #fff; outline-offset: -4px; }
.ans-btn.dim-btn { opacity: .3; }
.gbtn-ox-o { background: linear-gradient(180deg, #4a90f4, #2566d8); }
.gbtn-ox-x { background: linear-gradient(180deg, #f0506e, #d62a4d); }
.gbtn-rps { background: linear-gradient(180deg, #3c4a6b, #232e49); font-size: 56px !important; }
.gbtn-hl-high { background: linear-gradient(180deg, #34d186, #16a85f); }
.gbtn-hl-low { background: linear-gradient(180deg, #4a90f4, #2566d8); }
.gbtn-poll { background: linear-gradient(180deg, #3c4a6b, #232e49); font-size: 20px !important; padding: 10px; }
.gbtn-plain { background: linear-gradient(180deg, #3c4a6b, #232e49); }

/* number input */
.num-input {
  width: min(70vw, 280px); background: var(--panel); border: 2px solid var(--panel-bd);
  border-radius: 16px; color: var(--fg); font-size: 36px; font-weight: 900;
  text-align: center; padding: 14px; outline: none;
}
.num-input:focus { border-color: var(--acc); }

/* tap zone (reaction / stoptimer / bomb) */
.tap-zone { flex: 1; display: flex; border-radius: 24px; }
.tap-zone-inner { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.tz-emoji { font-size: 84px; }
.tz-title { font-size: 24px; font-weight: 900; max-width: 80vw; }
.tz-timer { font-size: 64px; font-weight: 900; color: var(--acc2); font-variant-numeric: tabular-nums; min-height: 70px; }
.tz-btn { font-size: 26px; padding: 22px 40px; border-radius: 22px; }
.tap-zone.tz-red { background: radial-gradient(80% 70% at 50% 45%, rgba(232,58,95,.5), rgba(232,58,95,.12)); }
.tap-zone.tz-green { background: radial-gradient(80% 70% at 50% 45%, rgba(31,191,117,.55), rgba(31,191,117,.12)); }
.tap-zone.tz-done { background: radial-gradient(80% 70% at 50% 45%, rgba(255,67,50,.4), rgba(255,67,50,.1)); }
.tap-zone.tz-stop { background: radial-gradient(80% 70% at 50% 45%, rgba(255,183,61,.25), transparent); }
.tap-zone.tz-bomb { background: radial-gradient(80% 70% at 50% 45%, rgba(232,58,95,.55), rgba(120,20,40,.25)); animation: bombPulse .7s ease-in-out infinite; }
@keyframes bombPulse { 0%,100% { box-shadow: inset 0 0 0 0 rgba(255,93,115,.0); } 50% { box-shadow: inset 0 0 60px 10px rgba(255,93,115,.35); } }

/* word bingo cells — 보드 칸 크기에 비례(줄바꿈 허용)해 4x4/5x5 에서도 단어가 칸 안에 들어오게 */
.bingo-cell.word { font-size: calc((var(--bw, 60vh) - (var(--bn,5) - 1) * 8px) / var(--bn,5) * 0.21); padding: 2px; word-break: break-word; line-height: 1.08; }
.bingo-cell.sel { border-color: var(--acc2); box-shadow: 0 0 0 3px rgba(255,183,61,.45); transform: scale(1.05); }

/* ===== Draw contest (그림그리기 대회) ===== */
.draw-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; width: 100%; gap: 10px; }
.draw-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.draw-prompt { font-weight: 900; font-size: clamp(15px, 4.6vw, 21px); line-height: 1.2; }
.draw-timer { font-weight: 900; font-size: 18px; white-space: nowrap; color: var(--acc2, #ffb73d); }
.draw-timer.urgent { color: #ff5d73; animation: bombPulse 1s infinite; }
.draw-canvas-box { flex: 1; min-height: 0; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 6px 24px rgba(0,0,0,.35); touch-action: none; }
#drawCanvas { display: block; touch-action: none; }
.draw-tools { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: center; }
.draw-sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer; }
.draw-sw.sel { border-color: #ffb73d; box-shadow: 0 0 0 3px rgba(255,183,61,.4); transform: scale(1.12); }
.draw-size { flex: 1; min-width: 90px; max-width: 180px; }
.draw-actions { display: flex; gap: 8px; align-items: center; }
.draw-actions .btn.big { flex: 1; }
/* gallery */
.draw-gal-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 2px; align-content: start; }
.draw-card { background: var(--panel); border: 1px solid var(--panel-bd); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
/* [엔지니어 2026-06-22] (Ben) 프리뷰가 잘리지 않게 contain — 기기마다 캔버스 비율 달라도 전체가 제대로 보임 */
.dr-thumb { position: relative; width: 100%; aspect-ratio: 1; background: #fff; display: block; cursor: zoom-in; }
.dr-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.dr-zoom { position: absolute; right: 5px; bottom: 5px; font-size: 13px; background: rgba(0,0,0,.55); color: #fff; border-radius: 8px; padding: 2px 6px; pointer-events: none; }
.draw-card-ph { width: 100%; aspect-ratio: 1; display: grid; place-items: center; font-size: 40px; background: #1b2335; }
.draw-card-name { font-size: 12px; font-weight: 800; padding: 4px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.draw-react { display: flex; gap: 6px; padding: 0 8px 8px; }
.dr-btn { flex: 1; border: 1px solid var(--panel-bd); background: #182033; color: #fff; border-radius: 10px; padding: 8px 0; font-size: 15px; font-weight: 800; cursor: pointer; }
.dr-btn.dr-heart:active { background: #4a1f2c; }
.dr-btn.dr-fire:active { background: #4a331a; }
.dr-btn.pop { transform: scale(1.18); transition: transform .12s; }
.draw-res-img { width: min(70vw, 320px); aspect-ratio: 1; margin: 4px auto; border-radius: 14px; overflow: hidden; background: #fff; display: grid; place-items: center; font-size: 60px; box-shadow: 0 6px 24px rgba(0,0,0,.4); }
.draw-res-img img { width: 100%; height: 100%; object-fit: contain; }
.winner-list li.me-rank { background: rgba(47,123,233,.18); border-color: rgba(47,123,233,.5); }

/* draw gallery — single heart + hearts-left banner (Ben: 하트 하나, 3개, 꼭 누르게) */
.draw-gal-msg { font-weight: 900; font-size: clamp(13px, 3.8vw, 17px); line-height: 1.25; }
.draw-gal-msg .dgb-hearts { font-size: 1.15em; letter-spacing: 1px; }
.draw-gal-msg.nag { color: #ffd0db; animation: dgbNag 1.1s ease-in-out infinite; }
.draw-gal-msg.done { color: #7be2a0; animation: none; }
@keyframes dgbNag { 0%,100% { transform: scale(1); opacity: .92; } 50% { transform: scale(1.04); opacity: 1; } }
.dr-heart-btn { width: 100%; border: 0; background: #3a1622; color: #fff; padding: 11px 0; font-size: 16px; font-weight: 900; cursor: pointer; border-top: 1px solid var(--panel-bd); display: flex; align-items: center; justify-content: center; gap: 5px; }
.dr-heart-btn:active { background: #5a1f30; }
.dr-heart-btn .dr-like { font-size: 12px; font-weight: 900; letter-spacing: .3px; color: #ff9bb3; }
.dr-heart-btn.pop { transform: scale(1.12); transition: transform .15s; }
.dr-heart-btn.spent { opacity: .4; filter: grayscale(.5); }

/* [엔지니어 2026-06-22] (Ben) 그림 크게보기 라이트박스 */
.dr-lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.9); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; cursor: zoom-out; }
.dr-lightbox.hidden { display: none; }
.dr-lightbox img { max-width: 94vw; max-height: 78vh; object-fit: contain; background: #fff; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.dr-lb-hint { color: rgba(255,255,255,.8); font-weight: 800; font-size: 14px; }

/* [엔지니어 2026-06-19] 플레이어 폰 화면 고정 (Ben) — 더블탭 줌/핀치/스크롤 바운스로
   그리기·하트·연타 중 화면이 커지거나 움직이거나 꺼지는 이슈 방지. (플레이어 전용 — 호스트 그리드엔 미적용) */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.screen { touch-action: none; }
.draw-gal-grid, .winner-list { touch-action: pan-y; }   /* 내부 세로 스크롤만 허용 */
input, textarea { -webkit-user-select: text; user-select: text; }   /* 입력은 선택 가능 */

/* [엔지니어 2026-06-22] 퀴즈: 질문 먼저, 보기는 잠시 후 공개 (Ben) — 대기 중 보기 숨김 */
#ansGrid.q-pending-p { opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .35s, transform .35s; }
/* [엔지니어 2026-06-23] (Ben) 게스트 3-2-1 카운트다운 — 호스트 신호등과 구분(동기화 혼선 방지) */
.q-count-p { display: flex; justify-content: center; align-items: center; flex: 1; }
.q-count-p.hidden { display: none; }
.q-count-p #quizCountNum { font-size: clamp(90px, 38vw, 200px); font-weight: 900; line-height: 1; color: var(--acc2);
  text-shadow: 0 6px 30px rgba(0,0,0,.5); display: inline-block; }
.q-count-p #quizCountNum.qc-pop { animation: qcPop .5s cubic-bezier(.2,1.5,.4,1); }
@keyframes qcPop { 0% { transform: scale(.4); opacity: .2; } 55% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
#ansGrid { transition: opacity .35s ease, transform .35s ease; }

/* [엔지니어 2026-06-22] 게스트 신원 배지(상단) + 내 게임기록 + 종료금지 경고 (Ben) */
.me-bar { position: fixed; top: 0; left: 0; z-index: 60; display: flex; gap: 4px; align-items: center;
  background: rgba(8,11,20,.82); backdrop-filter: blur(6px); border-bottom-right-radius: 14px;
  padding: 6px 14px; font-size: 12px; font-weight: 800; max-width: 92vw; }
.me-bar.hidden { display: none; }
.me-id b { color: #fff; }
.me-tag { color: var(--acc2); margin-left: 8px; }
.me-warn { color: #ff8ba0; margin-left: 10px; white-space: nowrap; }
.my-games { width: min(330px, 90vw); margin-top: 8px; }
.my-games-h { font-size: 13px; font-weight: 800; color: var(--fg-dim); margin-bottom: 8px; text-align: center; }
.my-games-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; max-height: 30vh; overflow: auto; }
.my-games-list li { display: flex; justify-content: space-between; align-items: center; background: var(--panel); border: 1px solid var(--panel-bd); border-radius: 10px; padding: 8px 14px; font-weight: 700; font-size: 15px; }
.my-games-list li b { color: var(--acc2); font-size: 17px; }
.dont-close-box { margin-top: 14px; max-width: 300px; font-size: 13px; font-weight: 800; color: #ffd6d6; background: rgba(255,93,115,.14); border: 1px solid rgba(255,93,115,.42); border-radius: 12px; padding: 10px 14px; line-height: 1.45; text-align: center; }

/* [엔지니어 2026-06-24] 폼 수집 (Ben) — 게스트 입력 오버레이 */
/* [엔지니어 2026-06-24] (Ben) 폼 화면 게임테마 리디자인 — 글래스 카드/아이콘 필드/그라데이션 */
.form-overlay { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: radial-gradient(120% 120% at 50% 0%, rgba(255,67,50,.16), rgba(8,11,20,.95) 62%);
  backdrop-filter: blur(9px); animation: fcFade .25s ease; }
.form-overlay.hidden { display: none; }
@keyframes fcFade { from { opacity: 0; } to { opacity: 1; } }
.form-card { position: relative; width: min(450px, 94vw); padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 11px;
  border-radius: 22px; overflow: hidden; animation: fcPop .44s cubic-bezier(.18,1.25,.4,1) both;
  box-shadow: 0 26px 72px rgba(0,0,0,.55); }
.form-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--acc), var(--acc2)); }
@keyframes fcPop { from { opacity: 0; transform: translateY(20px) scale(.93); } to { opacity: 1; transform: none; } }
.fc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.fc-emoji { font-size: 34px; line-height: 1; filter: drop-shadow(0 3px 9px rgba(255,67,50,.5)); animation: fcWiggle 2.6s ease-in-out infinite; }
@keyframes fcWiggle { 0%,100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg) scale(1.07); } }
.fc-htext { flex: 1; min-width: 0; }
.form-card h2 { margin: 0; font-size: 21px; font-weight: 900; display: flex; align-items: baseline; gap: 8px; }
.fc-en { font-size: 11.5px; font-weight: 800; color: var(--acc2); letter-spacing: .05em; text-transform: uppercase; }
.form-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--fg-dim); }
.form-time-pill { align-self: flex-start; font-size: 14px; font-weight: 800; background: rgba(255,67,50,.16);
  border: 1px solid rgba(255,67,50,.45); color: #ffb4a6; padding: 5px 13px; border-radius: 999px; white-space: nowrap;
  animation: fcPulse 1.1s ease-in-out infinite; }
.form-time-pill b { color: #fff; }
@keyframes fcPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,67,50,0); } 50% { box-shadow: 0 0 0 6px rgba(255,67,50,.13); } }
.f-field { display: flex; align-items: center; gap: 10px; background: var(--bg2, #1c2438); border: 1.5px solid var(--panel-bd);
  border-radius: 14px; padding: 0 14px; transition: border-color .18s, box-shadow .18s, background .18s; }
.f-field:focus-within { border-color: var(--acc); background: rgba(255,67,50,.06); box-shadow: 0 0 0 4px rgba(255,67,50,.14); }
.f-ic { font-size: 18px; opacity: .9; flex: 0 0 auto; }
.form-card input { background: transparent; border: 0; color: var(--fg); padding: 15px 0; font-size: 16px; width: 100%; }
.form-card input:focus { outline: none; }
.form-card input::placeholder { color: var(--fg-dim); }
.fc-submit { margin-top: 6px; background: linear-gradient(135deg, var(--acc), var(--acc2)); color: #fff; font-weight: 900;
  border: 0; box-shadow: 0 12px 30px rgba(255,67,50,.42); transition: transform .12s, box-shadow .12s, filter .12s; }
.fc-submit:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(255,67,50,.52); filter: brightness(1.05); }
.fc-submit:active { transform: translateY(0) scale(.98); }
.form-msg { min-height: 20px; font-size: 14px; text-align: center; color: #ffd9c9; font-weight: 700; }

/* [엔지니어 2026-06-24] (Ben) 입장 화면 안내 — 텔레그램만 공개 */
.join-note { font-size: 12.5px; color: var(--fg-dim); margin-top: 6px; line-height: 1.5; text-align: center; }
.join-note b { color: var(--acc); }


/* [엔지니어 2026-06-25] (Ben) 게스트 결과 배너 — 내 등수/당첨여부 크게 */
.over-result { width: min(390px, 92vw); border-radius: 20px; padding: 18px 20px 20px; margin-bottom: 10px; text-align: center;
  animation: fcPop .5s cubic-bezier(.18,1.25,.4,1) both; }
.over-result.hidden { display: none; }
.over-result.won { background: linear-gradient(160deg, rgba(255,183,61,.22), rgba(255,67,50,.10)); border: 1.5px solid var(--acc2); box-shadow: 0 16px 50px rgba(255,183,61,.28); }
.over-result.lost { background: var(--panel); border: 1px solid var(--panel-bd); }
.over-result .or-emoji { font-size: 50px; line-height: 1; }
.over-result .or-big { font-size: 30px; font-weight: 900; margin-top: 4px; color: var(--acc2); }
.over-result .or-big span { font-size: 13px; letter-spacing: .12em; opacity: .8; vertical-align: middle; }
.over-result .or-big.lose { color: var(--fg-dim); font-size: 24px; }
.over-result .or-rank { font-size: 15px; margin-top: 8px; color: var(--fg); font-weight: 700; }
.over-result .or-rank b { color: var(--acc2); font-size: 18px; }


/* [엔지니어 2026-06-25] (Ben) 게스트 레이스 관전뷰 */
.gr-board { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; font-size: 13px; font-weight: 800; color: var(--acc2); margin-bottom: 6px; min-height: 18px; }
.gr-board span { white-space: nowrap; }
.gr-canvas { width: min(460px, 94vw); height: 190px; background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.12)); border: 1px solid var(--panel-bd); border-radius: 14px; }
.gr-me { font-size: 15px; font-weight: 800; color: var(--fg); margin: 8px 0 4px; min-height: 20px; }
.gr-me b { color: var(--acc2); font-size: 19px; }
