/* ============================================================
   petit-student.css — 쁘띠바크 학생 화면 스타일 (접두사 pts-)
   교사 화면은 petit.css(pt-) — 접두사 충돌 금지.
   모바일 375px 우선 · 기존 토큰(--ink/--slate/--line/--surface/--paper)·btn 재사용.
   판정 색: ⭐금 / 🟢초록 / ❌붉음 / ⬜회색 / ✅청록 / ⏳슬레이트
   ============================================================ */

/* ── 레이아웃 ── */
.pts-stage { background: var(--paper); }
.pts-body { flex: 1; overflow-y: auto; padding: 16px 16px 48px; width: 100%; max-width: 560px; margin: 0 auto; }

/* ── 로비 ── */
.pts-lobby { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-1); padding: 28px 20px; text-align: center; }
.pts-lobby-badge { font-size: 44px; }
.pts-lobby-title { font-size: 19px; font-weight: 800; margin-top: 10px; }
.pts-lobby-sub { font-size: 13.5px; color: var(--slate); margin-top: 8px; line-height: 1.55; }
.pts-lobby-cats { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; text-align: left; }
.pts-lobby-cat { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px dashed var(--line); border-radius: var(--r-md); font-size: 15px; font-weight: 700; background: var(--paper); }
.pts-lobby-cat-no { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.pts-lobby-meta { font-size: 12px; color: var(--slate); margin-top: 16px; }

/* ── 상단: 초성 뱃지 + 타이머 ── */
.pts-head { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.pts-choseong {
  width: 88px; height: 88px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 50px; font-weight: 900; line-height: 1;
  color: #fff; background: var(--ink);
  border-radius: 26px; box-shadow: var(--sh-2);
  transform: rotate(-4deg);
}
.pts-choseong.sm { width: 60px; height: 60px; font-size: 32px; border-radius: 18px; }
.pts-choseong.xs { width: 32px; height: 32px; font-size: 17px; border-radius: 10px; transform: none; box-shadow: none; }
.pts-head-side { flex: 1; }
.pts-head-label { font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--slate); text-transform: uppercase; }
.pts-timer { font-size: 40px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: .02em; line-height: 1.1; color: var(--ink); }
.pts-timer.urgent { color: #c0392b; animation: ptsBlink 1s infinite; }
@keyframes ptsBlink { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* ── 상태 배너 ── */
.pts-banner { border-radius: var(--r-md); padding: 11px 14px; font-size: 13.5px; font-weight: 700; line-height: 1.5; margin-bottom: 12px; }
.pts-banner-write { background: var(--surface); color: var(--slate); box-shadow: var(--sh-1); }
.pts-banner-frozen { background: #fdeae2; color: #9c3b1d; border: 1.5px solid #f0b9a4; }
.pts-banner-locked { background: var(--ink); color: #fff; }
.pts-banner-spectate { background: #eef1f5; color: #5b6473; border: 1.5px dashed #c3ccd8; }

/* ── 카테고리 입력칸 ── */
.pts-cats { display: flex; flex-direction: column; gap: 10px; }
.pts-cat-row { display: block; background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-lg); padding: 10px 14px 12px; transition: border-color .15s, box-shadow .15s; }
.pts-cat-row:focus-within { border-color: var(--ink); box-shadow: var(--sh-1); }
.pts-cat-row.filled { border-color: #79b58a; }
.pts-cat-label { display: block; font-size: 12px; font-weight: 800; color: var(--slate); letter-spacing: .02em; }
.pts-cat-input { display: block; width: 100%; border: none; background: transparent; padding: 4px 0 0; font-size: 18px; font-weight: 800; color: var(--ink); }
.pts-cat-input:focus { outline: none; }
.pts-cat-input::placeholder { color: var(--line); font-weight: 600; font-size: 14px; }
.pts-cat-input:disabled { color: var(--slate); }

/* ── STOP 버튼 ── */
.pts-stop-wrap { margin-top: 16px; text-align: center; }
.pts-stop {
  width: 100%; padding: 18px; border: none; border-radius: var(--r-lg);
  font-size: 21px; font-weight: 900; letter-spacing: .02em; cursor: pointer;
  transition: transform .12s var(--ease), background .15s, box-shadow .15s;
}
.pts-stop.on { background: #e0472f; color: #fff; box-shadow: 0 6px 18px rgba(224, 71, 47, .38); animation: ptsPulse 1.15s var(--ease) infinite; }
.pts-stop.on:active { transform: scale(.96); animation: none; }
.pts-stop.off { background: var(--surface); color: var(--line); border: 2px dashed var(--line); cursor: not-allowed; }
@keyframes ptsPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 6px 18px rgba(224, 71, 47, .38); }
  50% { transform: scale(1.025); box-shadow: 0 8px 26px rgba(224, 71, 47, .55); }
}
.pts-stop-hint { font-size: 12.5px; font-weight: 700; color: var(--slate); margin-top: 8px; }

/* ── 판정(reveal) ── */
.pts-reveal-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.pts-reveal-guide { font-size: 14px; color: var(--slate); line-height: 1.55; }
.pts-reveal-guide b { color: var(--ink); }
.pts-judge-list { display: flex; flex-direction: column; gap: 10px; }
.pts-judge-card { background: var(--surface); border-radius: var(--r-lg); border-left: 5px solid var(--line); box-shadow: var(--sh-1); padding: 12px 14px; }
.pts-jc-unique   { border-left-color: #d99a06; }
.pts-jc-dup      { border-left-color: #3e9e5c; }
.pts-jc-accepted { border-left-color: #1f9e8e; }
.pts-jc-wrong    { border-left-color: #cf3f2a; }
.pts-jc-empty    { border-left-color: #b9bec7; }
.pts-jc-wait     { border-left-color: var(--line); }
.pts-judge-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pts-judge-cat { font-size: 12px; font-weight: 800; color: var(--slate); }
.pts-judge-ans { font-size: 19px; font-weight: 800; margin-top: 4px; word-break: break-all; }
.pts-judge-ans.empty { color: var(--line); font-weight: 600; font-size: 14px; }

/* 판정 뱃지 — ⭐금 / 🟢초록 / ✅청록 / ❌붉음 / ⬜회색 / ⏳슬레이트 */
.pts-badge { flex: none; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: var(--r-pill); white-space: nowrap; }
.pts-badge-unique   { background: #fbf0cf; color: #8a6400; }
.pts-badge-dup      { background: #e2f3e7; color: #23703c; }
.pts-badge-accepted { background: #dcf2ef; color: #14655b; }
.pts-badge-wrong    { background: #fbe4df; color: #a02c1b; }
.pts-badge-empty    { background: #eceef1; color: #7b828d; }
.pts-badge-wait     { background: var(--paper); color: var(--slate); border: 1px dashed var(--line); }

/* 우리 반 답 뭉치(클러스터) */
.pts-cluster { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.pts-cluster-chip { font-size: 12.5px; font-weight: 700; color: var(--slate); background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-pill); padding: 4px 11px; }
.pts-cluster-chip b { margin-left: 4px; color: var(--slate); font-weight: 800; }
.pts-cluster-chip.mine { color: var(--ink); border-color: var(--ink); background: #fbf0cf; }
.pts-cluster-chip.mine b { color: var(--ink); }

/* 인정 요청 */
.pts-appeal-btn { margin-top: 10px; border: 2px solid #cf3f2a; background: #fff; color: #cf3f2a; font-size: 13.5px; font-weight: 800; border-radius: var(--r-pill); padding: 7px 14px; cursor: pointer; transition: background .15s, transform .12s; }
.pts-appeal-btn:hover { background: #fbe4df; }
.pts-appeal-btn:active { transform: scale(.96); }
.pts-appeal-form { margin-top: 10px; }
.pts-appeal-input { width: 100%; border: 2px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; font-size: 14.5px; font-weight: 600; background: var(--paper); }
.pts-appeal-input:focus { outline: none; border-color: var(--ink); background: var(--surface); }
.pts-appeal-btns { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.pts-btn-sm { padding: 9px 16px; font-size: 13.5px; }
.pts-appeal-status { margin-top: 10px; font-size: 13px; font-weight: 800; border-radius: var(--r-md); padding: 8px 12px; }
.pts-ap-pending  { background: var(--paper); color: var(--slate); border: 1.5px dashed var(--line); }
.pts-ap-accepted { background: #dcf2ef; color: #14655b; }
.pts-ap-rejected { background: #eceef1; color: #7b828d; }

/* ── 결과(result)·마감(closed) ── */
.pts-score-card { background: var(--ink); color: #fff; border-radius: var(--r-xl); box-shadow: var(--sh-2); padding: 24px 20px; text-align: center; }
.pts-score-kicker { font-size: 12px; font-weight: 800; letter-spacing: .08em; opacity: .75; text-transform: uppercase; }
.pts-score-big { font-size: 46px; font-weight: 900; line-height: 1.15; margin-top: 4px; }
.pts-score-bonus { display: inline-block; margin-top: 6px; font-size: 12.5px; font-weight: 800; background: rgba(255, 255, 255, .16); border-radius: var(--r-pill); padding: 4px 12px; }
.pts-score-total { margin-top: 10px; font-size: 14px; opacity: .85; }
.pts-score-total b { font-size: 17px; }

/* 순위 라인 — result "이번 라운드 n등!" · closed "최종 n등" (점수 카드 안, 흰 글자) */
.pts-rank-line { margin-top: 12px; font-size: 16px; font-weight: 800; line-height: 1.35; }
.pts-rank-line b { font-size: 21px; }
.pts-rank-line.plain { font-size: 13.5px; font-weight: 700; opacity: .85; }
.pts-rank-sub { font-size: 12.5px; font-weight: 700; opacity: .75; }
.pts-rank-medal { display: block; font-size: 48px; line-height: 1.1; margin: 2px 0 4px;
  animation: ptsMedalPop .55s cubic-bezier(.34, 1.5, .64, 1) both; }
@keyframes ptsMedalPop {
  0% { transform: scale(.2) rotate(-14deg); opacity: 0; }
  70% { transform: scale(1.18) rotate(4deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.pts-unique-box { background: var(--surface); border: 2px solid #edd9a0; border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: 14px 16px; margin-top: 12px; }
.pts-unique-title { font-size: 13px; font-weight: 800; color: #8a6400; }
.pts-unique-row { display: flex; align-items: baseline; gap: 10px; font-size: 16px; margin-top: 8px; }
.pts-unique-cat { font-size: 12px; font-weight: 800; color: var(--slate); flex: none; }
.pts-unique-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pts-result-note { font-size: 13.5px; color: var(--slate); text-align: center; margin-top: 16px; line-height: 1.55; }
.pts-result-wait { font-size: 14px; font-weight: 800; color: var(--slate); text-align: center; margin-top: 20px; }

/* 마감 요약 */
.pts-sum-round { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: 12px 14px; margin-top: 12px; }
.pts-sum-head { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; margin-bottom: 6px; }
.pts-sum-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px dashed var(--line); font-size: 14px; }
.pts-sum-cat { flex: none; width: 72px; font-size: 12px; font-weight: 800; color: var(--slate); }
.pts-sum-ans { flex: 1; font-weight: 800; word-break: break-all; }
.pts-sum-ans.empty { color: var(--line); font-weight: 600; }

/* 375px 미만 미세 조정 */
@media (max-width: 374px) {
  .pts-choseong { width: 72px; height: 72px; font-size: 40px; }
  .pts-timer { font-size: 32px; }
}

/* ── STOP자 기준 1점제 (기획안 v1.1) — 뱃지·기준 표시·라운드 무효 ── */
.pts-badge-target  { background: #ffe3c4; color: #97501a; }   /* 🎯 기준과 일치 +1 */
.pts-badge-basewin { background: #efe0ff; color: #6d2f91; }   /* ✋⭐ 기준자 유일 +1 */
.pts-badge-zero    { background: #e3ecf7; color: #33608f; }   /* 🔵 유효하지만 0점 */
.pts-jc-target  { border-left-color: #e07b1f; }
.pts-jc-basewin { border-left-color: #9752c4; }
.pts-jc-zero    { border-left-color: #6f93bd; }
.pts-banner-base { background: #fdf1e2; color: #8a4a1a; border: 1.5px solid #ecc9a3; }
.pts-cluster-chip.base { color: #97501a; border-color: #e07b1f; background: #ffe9d2; }
.pts-cluster-chip.base b { color: #97501a; }
/* ≒ 기준 동일 인정 — 기준(주황)과 짝을 이루는 보라 톤(같은 답으로 묶임을 표시) */
.pts-cluster-chip.linked { color: #6a4bb0; border-color: #b79ae0; background: #f1eafc; }
.pts-cluster-chip.linked b { color: #6a4bb0; }
/* 라운드 무효 카드 — 점수 카드와 같은 자리, 어두운 경고 톤 */
.pts-void-card { background: #4a3f3a; }
.pts-void-big { font-size: 30px; font-weight: 900; margin: 6px 0 8px; }
.pts-void-why { font-size: 13.5px; line-height: 1.6; opacity: .92; margin: 0 0 6px; }
.pts-void-hint { font-size: 12.5px; font-weight: 800; background: rgba(255, 255, 255, .14); border-radius: var(--r-pill); display: inline-block; padding: 4px 12px; margin: 0 0 8px; }
.pts-void-chip { margin-left: 8px; font-size: 11.5px; font-weight: 800; color: #9c2b2b; background: #f6dcdc; border-radius: var(--r-pill); padding: 2px 9px; }
.pts-rule-line { font-size: 12.5px; font-weight: 700; opacity: .85; margin-top: 4px; }
/* 누적 점수·순위 상시 칩 (기획안 §4-2) */
.pts-top-score { margin-left: auto; margin-right: 12px; flex: none; font-size: 12.5px; font-weight: 800;
  color: #8a6400; background: #fbf0cf; border: 1.5px solid #ecd88f; border-radius: var(--r-pill); padding: 4px 12px; }
.pts-top-score em { font-style: normal; font-weight: 700; opacity: .7; }

/* ── 모둠방 판정자 UI (기획안 v1.2 §5) ── */
.pts-chip-judge { margin-left: 8px; display: inline-flex; gap: 4px; vertical-align: middle; }
.pts-chip-btn { border: 1.5px solid var(--line); background: var(--surface, #fff); border-radius: 8px;
  font-size: 12px; padding: 2px 7px; cursor: pointer; opacity: .55; }
.pts-chip-btn.on { opacity: 1; border-color: var(--ink); }
.pts-chip-btn:disabled { cursor: default; }
