:root {
  --bg: #f3f5fa;
  --panel: #ffffff;
  --panel2: #eef1f7;
  --border: #dbe0ea;
  --text: #1b1f27;
  --muted: #6b7280;
  --accent: #4f6cf7;
  --good: #159a56;
  --warn: #b9770a;
  --bad: #d23a26;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", sans-serif;
  line-height: 1.5;
}

.wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}

.wide { max-width: 980px; }

h1 { font-size: 20px; margin: 0 0 4px; }
.sub { color: var(--muted); font-size: 13px; margin: 0 0 20px; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(20, 30, 60, .06);
  border-radius: 12px;
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}
.topbar b { font-size: 18px; }

nav a { color: var(--accent); text-decoration: none; font-size: 13px; }
nav a:hover { text-decoration: underline; }

/* 숨겨진 플레이어 */
#yt { position: absolute; left: -9999px; width: 0; height: 0; }

.stage {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(20, 30, 60, .06);
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  margin-bottom: 16px;
}
.disc-row {
  position: relative;
  display: flex; justify-content: center; align-items: center;
  gap: 24px; margin-bottom: 10px;
}
.stage > .disc { margin: 0 auto 10px; }   /* 시작/종료 화면 단독 LP는 가운데 */
.disc-info { text-align: left; flex: 0 1 auto; min-width: 0; }
.disc-info .t { font-size: 18px; font-weight: 800; line-height: 1.3; }
.disc-info .a { color: var(--muted); font-size: 14px; margin-top: 3px; }
.disc-info .y { color: var(--muted); font-size: 12px; margin-top: 3px; }
/* 다음곡 버튼 — 정답 공개 후 '모르겠음/넘기기' 자리에 크고 눈에 띄게 등장 */
.next-main {
  background: var(--accent); border-color: var(--accent); color: #fff;
  font-weight: 800; font-size: 18px; padding: 15px 40px; border-radius: 14px;
  box-shadow: 0 6px 18px rgba(79, 108, 247, .38);
  animation: nextPulse 1.4s ease-in-out infinite;
}
.next-main:hover:not(:disabled) { background: #3d5ae8; border-color: #3d5ae8; }
@keyframes nextPulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(79, 108, 247, .30); transform: scale(1); }
  50% { box-shadow: 0 8px 26px rgba(79, 108, 247, .55); transform: scale(1.04); }
}

/* 라운드 중엔 심하게 블러 → 힌트/정답 시 해제.
   블러 적용은 즉시(transition 없음 — 새 곡 제목이 순간 노출되는 것 방지),
   해제만 부드럽게. */
.disc-info .t, .disc-info .a, .disc-info .y { transition: filter .4s ease; }
.disc-info .blurred {
  filter: blur(9px);
  user-select: none; pointer-events: none;
  transition: none;
}

.disc {
  position: relative; overflow: hidden;
  width: 150px; height: 150px; margin: 0;
  flex: none;
  border-radius: 50%;
  background: repeating-radial-gradient(circle at center, #2a2e3a 0 6px, #23262f 6px 12px);
  border: 6px solid #12141a;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; color: var(--muted);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
/* 중앙 라벨 구멍 */
.disc::after {
  content: ''; position: absolute; z-index: 3;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--panel); border: 2px solid #12141a;
}
.disc.spin { animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.disc-art {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  filter: blur(5px) brightness(.92);
  transition: filter .5s ease;
}
.disc-art.clear { filter: none; }
.disc-emoji { position: relative; z-index: 2; }
.disc-art:not(.hidden) + .disc-emoji { display: none; }

.clips {
  display: flex; gap: 22px; flex-wrap: wrap; justify-content: center;
  margin-bottom: 16px;
}
button {
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--panel2);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 10px;
  transition: background .12s, border-color .12s;
}
button:hover:not(:disabled) { background: #e3e8f2; border-color: #c3cad8; }
button:disabled { opacity: .45; cursor: not-allowed; }

.clip-btn { min-width: 62px; font-weight: 600; }

.clip-score {
  font-size: 14px; font-weight: 700; color: var(--accent);
  margin: 4px 0 8px;
}
/* OST 모드 안내 (곡이 아니라 작품명 맞추기) */
.ost-note {
  font-size: 14px; font-weight: 700; color: var(--warn);
  background: #fff6e6; border: 1px solid #f0d38a; border-radius: 10px;
  padding: 8px 12px; margin: 0 0 12px; text-align: center;
}
/* 이지모드 힌트 버튼 (초성/가수 공개) — 온라인은 전원 눌러야 공개 */
.hints { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin: 0 0 12px; }
.hints:empty { display: none; }
.hint-btn { min-width: 96px; font-weight: 600; }
.hint-btn.voting { border-color: var(--warn); color: var(--warn); border-style: dashed; }
.hint-btn.used { border-color: var(--accent); color: var(--accent); }
.hint-btn.used::before { content: '✓ '; }

/* 힌트: 전곡듣기/30초 재생 시 자동 공개 (버튼 없음) — OST 곡명 등 하단 표시용 */
.hint-output { font-size: 13px; color: var(--text); min-height: 0; margin: 8px 0 10px; }
.hint-output div { padding: 1px 0; }

.win-msg {
  font-size: 17px; font-weight: 800; color: var(--good);
  margin: 4px 0 12px;
}
.win-msg.warn { color: var(--warn); }
.clip-btn.used { border-color: var(--accent); }
.clip-btn.playing { background: var(--accent); border-color: var(--accent); color: #fff; }
/* iOS 첫 곡: 탭 유도용 강조 (제스처 안에서 소리 재생돼야 하므로) */
.clip-btn.pulse { border-color: var(--accent); color: var(--accent); animation: clipPulse 1.1s ease-in-out infinite; }
@keyframes clipPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(79,108,247,.5); }
  50% { box-shadow: 0 0 0 9px rgba(79,108,247,0); }
}

.answer-row { display: flex; gap: 8px; margin-bottom: 10px; }

/* 팀별 입력칸 */
#answer-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 2px; }
/* 입력칸 바로 아래 안내 공란 (항상 자리 유지) */
.answer-msg {
  min-height: 20px; margin: 0 0 8px;
  font-size: 13px; font-weight: 700; color: var(--warn);
}
.ans-row { display: flex; align-items: center; gap: 8px; position: relative; }
/* 오답 시 입력줄 전체를 덮는 붉은 오버레이 (2초간 입력 차단) */
.wrong-overlay {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  background: rgba(210, 58, 38, .38);          /* 기본은 더 투명하게 */
  color: #fff; font-weight: 800; font-size: 16px; letter-spacing: 2px;
  border-radius: 10px;
  overflow: hidden; cursor: not-allowed;
}
.wrong-overlay span { position: relative; z-index: 2; text-shadow: 0 1px 3px rgba(0,0,0,.35); }
/* 남은 시간 바: 오른쪽 끝이 왼쪽으로 줄어듦 (2초) */
.wrong-overlay .bar {
  position: absolute; left: 0; top: 0; bottom: 0; width: 100%;
  background: rgba(210, 58, 38, .55);
  animation: wrongbar 2s linear forwards;
}
@keyframes wrongbar { from { width: 100%; } to { width: 0; } }
/* 페널티 중 클릭 → 흰색 번쩍 */
.wrong-overlay.flash { animation: wrongflash .3s ease; }
@keyframes wrongflash {
  0% { background: rgba(255, 255, 255, .85); }
  100% { background: rgba(210, 58, 38, .38); }
}
.ans-name {
  display: flex; align-items: center; gap: 6px;
  min-width: 86px; max-width: 86px; font-weight: 700; font-size: 14px;
  justify-content: flex-end; text-align: right; white-space: nowrap;
}
.ans-name .dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.ans-row input { flex: 1; min-width: 0; }
.ans-row.solved input { border-color: var(--good); color: var(--good); }
.ans-tag { font-weight: 700; font-size: 13px; white-space: nowrap; }
.ans-tag.good { color: var(--good); }
.ans-tag.bad { color: var(--bad); }
.ans-tag.warn { color: var(--warn); }
#rv-accept { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; }
#rv-accept button { font-size: 13px; padding: 8px 12px; border-color: var(--good); color: var(--good); }
input[type=text], input[type=number] {
  font: inherit;
  flex: 1;
  background: var(--panel2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  min-width: 0;
}
input:focus { outline: none; border-color: var(--accent); }

.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
/* 시작 버튼 크게 */
#start-btn { font-size: 19px; font-weight: 800; padding: 15px 52px; border-radius: 13px; }
.btn-ghost { background: transparent; }

.minor-row { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 40px; }
.minor-row button { font-size: 13px; padding: 8px 12px; color: var(--muted); }
.minor-row .next-main { color: #fff; }   /* 다음 곡 텍스트는 흰색 (muted 오버라이드) */
#skip-btn { color: #ff3b30; border-color: #ff3b30; font-weight: 700; }
#skip-btn:hover:not(:disabled) { background: #ffe5e2; border-color: #ff3b30; }
#skip-btn.voting { background: #ffe5e2; border-style: dashed; opacity: .8; }   /* 넘기기 투표 대기 */

.feedback { min-height: 24px; margin: 12px 0 0; font-weight: 600; }
.feedback.good { color: var(--good); }
.feedback.warn { color: var(--warn); }
.feedback.bad { color: var(--bad); }

.reveal {
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-top: 14px;
  text-align: left;
}
.reveal .t { font-size: 17px; font-weight: 700; }
.reveal .a { color: var(--muted); }

.hidden { display: none !important; }

/* --- admin table --- */
table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; }
td input { padding: 5px 7px; font-size: 13px; }
.cell-start input { width: 64px; }
.row-actions button { padding: 5px 9px; font-size: 12px; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(20, 30, 60, .06);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.card h2 { font-size: 15px; margin: 0 0 10px; }
.field { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.hint { color: var(--muted); font-size: 12px; margin: 4px 0 0; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }

.pill { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11px; background: var(--panel2); color: var(--muted); border: 1px solid var(--border); }
.pill.no { color: var(--bad); border-color: var(--bad); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--panel2); border: 1px solid var(--border);
  padding: 10px 18px; border-radius: 10px; font-size: 14px;
  opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 50;
}
.toast.show { opacity: 1; }

/* 게임 안내 팝업 (볼륨/정답 등) → 화면 상단(Round 표시 근처)에 작게 잠깐 떴다 사라짐. */
.game-pop {
  position: fixed; top: 12px; left: 50%;
  transform: translate(-50%, -10px) scale(.95);
  background: var(--accent, #4f8cff); color: #fff;
  padding: 8px 16px; border-radius: 12px;
  font-size: 13px; font-weight: 800; line-height: 1.3; text-align: center;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
  opacity: 0; pointer-events: none; z-index: 60;
  transition: opacity .22s ease, transform .22s ease;
}
.game-pop.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.game-pop.correct { background: var(--good); }

/* --- teams --- */
.team-select { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.team-select button {
  min-width: 42px; font-weight: 700;
}
.team-select button.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.scoreboard {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  margin-bottom: 16px;
}
.team-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(20, 30, 60, .06);
  font-weight: 600; font-variant-numeric: tabular-nums;
}
.team-chip .dot { width: 11px; height: 11px; border-radius: 50%; }
.team-chip .sc { color: var(--muted); font-weight: 700; }
.team-chip.current {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(79, 108, 247, .25);
}
.team-chip.current .sc { color: var(--text); }
.team-chip.winner { background: #fff8e1; border-color: var(--warn); }

/* --- 온라인 참가자 아이디 버튼 스트립 --- */
.players-strip {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
  align-items: center; margin: 30px 0 16px;
}
.player-card {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(20, 30, 60, .06);
  font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums;
  transition: transform .25s ease;
}
.player-card.me { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(79, 108, 247, .25); }
.player-card .dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.player-card .pname { color: var(--text); }
.player-card .me-tag { color: var(--accent); }
.player-card .pscore { color: var(--muted); font-weight: 800; }
.player-card.solved { border-color: var(--good); background: #f0fbf5; }
.player-card.solved .pscore { color: var(--good); }

/* 말풍선: 버튼 바로 위에 잠깐 */
.player-card .bubble {
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translate(-50%, 6px) scale(.9);
  background: var(--text); color: #fff;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  max-width: 180px; overflow: hidden; text-overflow: ellipsis;
  padding: 5px 10px; border-radius: 12px;
  opacity: 0; pointer-events: none; z-index: 5;
  transition: opacity .18s ease, transform .18s ease;
}
.player-card .bubble::after {
  content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--text);
}
.player-card .bubble.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* 오답: 버튼이 주욱 내려갔다 오면서 "오답!" */
.player-card .oops {
  position: absolute; left: 50%; top: -16px; transform: translateX(-50%);
  font-size: 12px; font-weight: 800; color: var(--bad);
  opacity: 0; white-space: nowrap; pointer-events: none;
}
.player-card.wrong { animation: playerDrop 1.4s ease; }
.player-card.wrong .oops { animation: oopsShow 1.4s ease; }
@keyframes playerDrop {
  0% { transform: translateY(0); }
  25% { transform: translateY(24px); }
  55% { transform: translateY(24px); }
  100% { transform: translateY(0); }
}
@keyframes oopsShow {
  0%, 100% { opacity: 0; }
  25%, 70% { opacity: 1; }
}

/* --- 메인 하단 메뉴 --- */
.start-footer { margin-top: 26px; text-align: center; }
.footer-link {
  display: inline-block; color: var(--muted); font-size: 13px;
  text-decoration: none; padding: 8px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--panel2);
}
.footer-link:hover { color: var(--accent); border-color: var(--accent); }

/* --- 관리자 비밀번호 게이트 --- */
.admin-gate {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
}
.admin-gate .gate-box {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px 24px; text-align: center;
  box-shadow: 0 8px 30px rgba(20,30,60,.12); width: 300px; max-width: 90vw;
}
.admin-gate h2 { margin: 0 0 14px; }
.admin-gate input { width: 100%; margin-bottom: 10px; text-align: center; }
.admin-gate .gate-box button { width: 100%; }
.admin-gate .gate-msg { color: var(--bad); font-size: 13px; min-height: 18px; margin: 8px 0 0; }

.turn-banner {
  font-size: 15px; font-weight: 700; margin: 0 0 4px;
}

.mode-select button.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* 난이도 큰 버튼 */
.diff-select { display: flex; gap: 10px; justify-content: center; }
.diff-select button {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 12px 22px; min-width: 150px; border-radius: 12px;
}
.diff-select button b { font-size: 16px; }
.diff-select button span { font-size: 12px; color: var(--muted); }
.diff-select button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.diff-select button.active span { color: rgba(255,255,255,.85); }

.team-names {
  display: flex; flex-direction: column; gap: 6px; align-items: center;
  margin-top: 10px;
}
.team-names .row { display: flex; align-items: center; gap: 8px; }
.team-names .dot { width: 12px; height: 12px; border-radius: 50%; }
.team-names label { font-size: 13px; color: var(--muted); min-width: 46px; }
.team-names input { width: 160px; padding: 6px 10px; font-size: 14px; }

.live-history {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(20, 30, 60, .06);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
}
.live-history h3 { font-size: 13px; color: var(--muted); margin: 0 0 8px; font-weight: 600; }
.live-history .lh-row {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.live-history .lh-row:last-child { border-bottom: none; }
.live-history .lh-title { flex: 1; }
.live-history .lh-round {
  min-width: 20px; text-align: right;
  color: var(--muted); font-size: 12px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.live-history .lh-artist { color: var(--muted); font-size: 12px; }

/* --- 시작 화면: 로컬 | 온라인 2열 --- */
.setup-tabs { display: none; }   /* 데스크탑: 탭 숨기고 2열 모두 표시 */
.setup-cols { display: flex; gap: 12px; margin: 8px 0 14px; align-items: stretch; }
.setup-col {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: var(--panel2); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 12px;
}
.col-head { font-size: 15px; font-weight: 800; }
.setup-col .hint { margin: 2px 0 0; }

/* --- 온라인 대결 로비 --- */
.online-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; }
.code-join { display: flex; gap: 6px; justify-content: center; }
.online-box #code-input { width: 90px; text-transform: uppercase; }
.online-sep { color: var(--muted); font-size: 12px; }

/* --- 테마: 가로 스크롤 박스 (3행 그리드) --- */
.theme-scroll {
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--panel); padding: 10px; overflow-x: auto;
  min-width: 0; max-width: 100%;   /* flex 자식이 max-content로 부풀지 않게 */
}
.theme-grid {
  display: grid; grid-auto-flow: column;
  grid-template-rows: repeat(3, auto);
  grid-auto-columns: max-content; gap: 8px; width: max-content;
  justify-content: start;
}
.room-code {
  font-size: 18px; letter-spacing: 3px; color: var(--accent);
  background: var(--panel); border: 1px dashed var(--accent);
  border-radius: 8px; padding: 2px 8px;
}
#online-status { font-size: 14px; }
.ans-row.remote input { background: var(--panel2); color: var(--muted); }

/* --- 온라인: 답변 로그 / 들은 표기 / 힌트 투표 / 정답 인정 타이머 --- */
.attempt-log { max-width: 480px; margin: 6px auto 0; text-align: left; }
.attempt-log .att-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; padding: 2px 0; color: var(--muted);
}
.attempt-log .att-name { font-weight: 600; color: var(--text); }
.attempt-log .att-text { flex: 1; color: var(--text); }
.attempt-log .att-mark { font-size: 12px; }

.listen-note { font-size: 13px; color: var(--warn); min-height: 18px; margin: 4px 0 0; }
/* 온라인 넘기기 합의 대기 메세지 (넘기기 버튼 아래 · 클립/힌트 투표에 안 지워짐) */
.skip-note { font-size: 13px; color: #ff3b30; font-weight: 700; min-height: 0; margin: 8px 0 0; text-align: center; }
.skip-note:empty { margin: 0; }
/* 테마 칩의 곡 수 — 테마 라벨(.hint)과 같은 크기로 */
.theme-grid .tcount { font-size: 12px; opacity: .55; font-weight: 400; margin-left: 3px; }
.clip-btn.opp-used { box-shadow: 0 0 0 2px var(--warn) inset; }
/* 10초+ 합의 대기: 내가 눌러둔 클립 표시 */
.clip-btn.voting { border-color: var(--warn); color: var(--warn); border-style: dashed; }

.accept-wait { font-size: 13px; color: var(--muted); }
.accept-timer {
  width: 100%; max-width: 320px; margin: 10px auto 0;
  height: 8px; border-radius: 4px; background: var(--panel2);
  position: relative;
}
.accept-timer .bar {
  height: 100%; width: 100%; border-radius: 4px;
  background: var(--accent); transition: width .1s linear;
}
.accept-timer .sec {
  position: absolute; right: -36px; top: -3px;
  font-size: 12px; color: var(--muted);
}

/* ===== 모바일 최적화 ===== */
@media (max-width: 480px) {
  .stage { padding: 20px 12px; border-radius: 14px; }

  /* LP를 작게 + 좌우 여백 축소해 긴 제목이 한 글자씩 세로로 쌓이지 않게 */
  .disc { width: 96px; height: 96px; border-width: 5px; font-size: 30px; }
  .disc-row { padding-left: 0; gap: 14px; }
  .disc-info .t { font-size: 16px; }
  .disc-info .a { font-size: 13px; }

  /* 재생 버튼 간격 */
  .clips { gap: 12px; margin-bottom: 12px; }
  .clip-btn { min-width: 54px; padding: 9px 12px; }

  /* 넘기기/다음곡 줄: 과한 상단 여백 줄이기 */
  .minor-row { margin-top: 28px; }
  .next-main { width: 100%; font-size: 16px; padding: 13px; }

  .ans-name { min-width: 66px; max-width: 66px; font-size: 13px; }

  /* 시작 화면: 로컬/온라인 → 탭으로 하나씩 (버튼만 보이고 고른 쪽 패널만) */
  .setup-tabs { display: flex; gap: 8px; justify-content: center; margin: 8px 0 10px; }
  .setup-tabs button { flex: 1 1 0; font-weight: 700; padding: 11px; }
  .setup-tabs button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
  .setup-cols { flex-direction: column; gap: 10px; }
  .setup-cols.show-local .online-col { display: none; }
  .setup-cols.show-online .local-col { display: none; }

  /* 시작화면 LP 제거 → 타이틀에 헤드폰만 (예: 노래 맞추기🎧) */
  #start-screen > .disc { display: none; }
  #start-screen h1::after { content: '🎧'; }

  /* 게임모드: 테마/아이돌/가수/드라마·영화 맞추기를 한 줄에 */
  #mode-select { flex-wrap: nowrap; gap: 5px; }
  #mode-select button {
    font-size: 13px; padding: 8px 7px; min-width: 0;
    white-space: nowrap; flex: 0 1 auto;
  }

  /* 테마: 3줄 그리드 + 칩 폰트를 게임모드와 동일하게 */
  .theme-grid { grid-template-rows: repeat(3, auto); }
  #theme-select button { font-size: 13px; padding: 8px 10px; }

  /* 난이도: 이지/노멀/하드 3버튼을 한눈에 (한 줄 균등) */
  .diff-select { gap: 6px; }
  .diff-select button {
    flex: 1 1 0; min-width: 0; padding: 9px 6px; gap: 2px;
  }
  .diff-select button b { font-size: 14px; }
  .diff-select button span { font-size: 10px; white-space: nowrap; }
}
