/* Live Quiz — โทน "Broadsheet" (หนังสือพิมพ์) จากดีไซน์ซิสเต็ม */

:root {
  --color-bg: #f3f2f2;
  --color-surface: #eae9e9;
  --color-text: #201e1d;
  --color-accent: #0088b0;
  --color-accent-2: #d6006c;
  --color-divider: color-mix(in srgb, #201e1d 16%, transparent);

  --color-neutral-300: #d7d3d3;
  --color-neutral-700: #605d5d;
  --color-neutral-900: #2d2b2b;

  --color-accent-100: #e9f8ff;
  --color-accent-200: #cbeeff;
  --color-accent-700: #006786;
  --color-accent-800: #004961;

  --color-accent-2-700: #aa0b56;

  --color-process-yellow: #edbb00;

  --shadow-sm: 0 1px 2px color-mix(in srgb, #2d2b2b 14%, transparent);
  --shadow-lg: 0 12px 32px color-mix(in srgb, #2d2b2b 22%, transparent);

  /* ชื่อย่อที่หน้าจอทุกเฟสใช้ */
  --bg: var(--color-bg);
  --surface: var(--color-surface);
  --ink: var(--color-text);
  --cyan: var(--color-accent);
  --c700: var(--color-accent-700);
  --mag: var(--color-accent-2);
  --m700: var(--color-accent-2-700);
  --yel: var(--color-process-yellow);
  --div: var(--color-neutral-300);
  --mut: var(--color-neutral-700);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: 'Source Serif 4', serif;
  font-size: 15px;
  line-height: 1.55;
}

button, input { font-family: inherit; }

a { color: var(--color-accent-700); text-underline-offset: 3px; }
a:hover { color: var(--color-accent-800); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

@keyframes eqbar {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

/* นักวิ่งบนกระดานคะแนน — เด้งตัวตอนกำลังวิ่ง */
@keyframes runbob {
  0%, 100% { transform: scaleX(-1) translateY(0) rotate(-3deg); }
  50% { transform: scaleX(-1) translateY(-5px) rotate(4deg); }
}
.runner-live { animation: runbob 0.32s ease-in-out infinite; }

/* โพเดียม: แท่นดันขึ้นจากพื้น + ชื่อเด้งตาม + คอนเฟตติสีหมึกพิมพ์ */
@keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes popin {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes confetti {
  to { transform: translateY(110vh) rotate(660deg); }
}

/* ปุ่มเปิด/ปิดเสียง มุมขวาบน */
#muteBtn {
  position: fixed; top: 3px; right: 24px; z-index: 30;
  background: transparent; border: none; cursor: pointer;
  font: 600 15px 'Source Serif 4', serif; font-style: italic;
  color: var(--c700); text-decoration: underline; text-underline-offset: 4px;
  padding: 4px;
}

/* รายการคำถามในหน้าแก้ไข */
.qitem:not(.sel):hover { background: var(--surface) !important; }
