/* Live Quiz pages: /join (players), /live/host/:sid (host screen), /live (My
   Live Quizzes) and /live/edit/:id (the editor). Loaded after style.css;
   reuses its tokens (--accent, --ink, …). On the game screens every answer
   colour carries white text at >= 4.5:1 and comes with a shape
   (live-common.js SHAPES); the editor uses neither (letters A-H). */
.live-main { padding-top: 0; }
.live-wrap { width: 100%; max-width: 560px; }
.live-wrap-host { max-width: 1200px; }
.live-card { text-align: center; }
.live-card h1 { font-size: clamp(1.3rem, 4vw, 1.8rem); margin: 0 0 8px; }
.live-sub { color: var(--ink-soft); margin: 0 0 18px; }
.live-pin-input, .live-nick-input {
  width: 100%;
  font: inherit;
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  padding: 14px 12px;
  border: 2px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
}
.live-pin-input { letter-spacing: 0.25em; }
.live-nick-input { font-size: 1.25rem; font-weight: 700; }
.live-pin-input:focus, .live-nick-input:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.live-big-btn { width: 100%; font-size: 1.1rem; padding: 15px 20px; }
.live-status {
  position: sticky; top: 0; z-index: 20;
  background: var(--warn-bg); color: var(--warn);
  text-align: center; font-weight: 700; padding: 8px 12px; border-radius: 0 0 10px 10px; margin: 0 auto 10px; max-width: 560px;
}
.live-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--ink-soft); font-weight: 700; font-size: 0.9rem; margin-bottom: 10px; }
.live-qtitle { font-size: clamp(1.15rem, 3.5vw, 1.6rem); margin: 0 0 10px; line-height: 1.25; overflow-wrap: break-word; }
.live-qimage { display: block; max-width: 100%; max-height: 32vh; margin: 0 auto 12px; border-radius: 12px; object-fit: contain; }
.live-timer { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--ink); background: #eef2f6; border-radius: 999px; padding: 4px 12px; min-width: 3.2em; text-align: center; }
.live-timer.is-low { background: var(--danger-bg); color: var(--danger); }
.live-timerbar { height: 6px; background: #eef2f6; border-radius: 99px; overflow: hidden; margin-bottom: 14px; }
.live-timerbar > span { display: block; height: 100%; background: var(--accent); width: 100%; transition: width 0.25s linear; }

/* ---------- Answer tiles (player, host) ---------- */
.live-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.live-options.live-n2 .live-option { min-height: 110px; }
.live-options-one { grid-template-columns: 1fr; max-width: 360px; margin: 0 auto; }
@media (max-width: 340px) { .live-options { grid-template-columns: 1fr; } }
.live-option {
  position: relative;
  display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 8px;
  min-height: 86px; padding: 12px; border: 3px solid transparent; border-radius: 14px;
  color: #fff; font: inherit; font-weight: 700; font-size: 1.05rem; text-align: left; cursor: pointer;
  overflow-wrap: break-word; hyphens: auto; min-width: 0;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.18);
}
.live-option:not(:disabled):active { transform: translateY(2px); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18); }
.live-option:disabled { cursor: default; }
.live-option:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.live-option .live-optrow { display: flex; align-items: center; gap: 10px; min-width: 0; }
.live-option .live-optlabel { min-width: 0; }
.live-shape { width: 1.7em; height: 1.7em; flex: none; fill: #fff; }
.live-option img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: rgba(255, 255, 255, 0.15); }
.live-option.is-selected { border-color: #fff; box-shadow: 0 0 0 3px var(--ink); }
.live-option.is-dim { opacity: 0.35; }
.live-option.is-correct { box-shadow: 0 0 0 4px var(--success); border-color: #fff; opacity: 1; }
.live-option.is-correct::after { content: "✓"; position: absolute; top: 6px; right: 10px; font-size: 1.4rem; }
.live-c0 { background: #c8102e; } .live-c1 { background: #1d4ed8; } .live-c2 { background: #a16207; } .live-c3 { background: #15803d; }
.live-c4 { background: #7c3aed; } .live-c5 { background: #0f766e; } .live-c6 { background: #be185d; } .live-c7 { background: #475569; }

.live-answered { margin-top: 14px; font-weight: 700; color: var(--accent); }
.live-verdict { border-radius: 14px; padding: 14px 12px; margin: 6px 0 10px; color: #fff; }
.live-verdict.is-correct { background: #15803d; }
.live-verdict.is-incorrect, .live-verdict.is-none { background: #c8102e; }
.live-verdict .live-result { font-size: clamp(1.6rem, 6vw, 2.4rem); font-weight: 800; margin: 0; }
.live-verdict .live-points { margin: 4px 0 0; }
.live-points { font-size: 1.3rem; font-weight: 800; }
.live-rankline { color: var(--ink-soft); font-weight: 700; margin-top: 6px; }
.live-correct-list { text-align: left; margin: 10px 0 8px; }
.live-correct-list p { margin: 0; font-weight: 700; color: var(--success); }

.live-board { list-style: none; padding: 0; margin: 12px 0 0; text-align: left; }
.live-board li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #f8fafc; margin-bottom: 6px; font-weight: 700; }
.live-board li.is-me { background: #f0fdfa; outline: 2px solid var(--accent); }
.live-board .live-rank { width: 2em; text-align: center; color: var(--ink-soft); flex: none; }
.live-board .live-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.live-board .live-score { font-variant-numeric: tabular-nums; }

.live-podium { display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin: 18px 0 8px; }
.live-podium > div { flex: 1; max-width: 200px; background: #eef2f6; border-radius: 12px 12px 0 0; padding: 10px 8px; text-align: center; font-weight: 800; overflow-wrap: anywhere; }
.live-podium .p1 { min-height: 150px; background: #fef3c7; }
.live-podium .p2 { min-height: 115px; }
.live-podium .p3 { min-height: 90px; background: #fde7d6; }
.live-podium .live-medal { font-size: 1.8rem; display: block; }
.live-podium .live-pscore { display: block; color: var(--ink-soft); font-size: 0.9rem; margin-top: 4px; }

/* ---------- Host screen: meant for a projector / shared screen ---------- */
.live-host-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
@media (max-width: 820px) { .live-host-grid { grid-template-columns: 1fr; } }
.live-joinbox { text-align: center; }
.live-joinbox .live-joinurl { font-size: clamp(1.1rem, 2.6vw, 1.6rem); font-weight: 800; margin: 0; }
.live-pin { font-size: clamp(2.4rem, 4.6vw, 3.6rem); font-weight: 900; letter-spacing: 0.04em; white-space: nowrap; margin: 4px 0; font-variant-numeric: tabular-nums; }
.live-qr { background: #fff; padding: 8px; border-radius: 12px; display: inline-block; width: 100%; max-width: 240px; }
.live-qr svg { display: block; width: 100%; height: auto; }
.live-players { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.live-player { display: inline-flex; align-items: center; gap: 4px; background: #eef2f6; border-radius: 999px; padding: 6px 6px 6px 12px; font-weight: 700; max-width: 100%; overflow-wrap: anywhere; }
.live-player.is-offline { opacity: 0.55; }
.live-player button { border: none; background: none; cursor: pointer; font: inherit; color: var(--ink-soft); width: 28px; height: 28px; border-radius: 50%; }
.live-player button:hover { background: #dfe5ec; color: var(--danger); }
.live-count { font-size: 1.1rem; font-weight: 800; }
.live-qbar { font-size: clamp(1.4rem, 3.2vw, 2.4rem); line-height: 1.2; text-align: center; margin: 0 0 14px; padding: 16px; border-radius: 12px; background: #f8fafc; box-shadow: inset 0 -3px 0 var(--border); overflow-wrap: break-word; }
.live-stage { display: grid; grid-template-columns: 110px minmax(0, 1fr) 110px; gap: 14px; align-items: center; margin-bottom: 14px; }
.live-stage-img { display: block; width: 100%; max-height: 42vh; object-fit: contain; border-radius: 12px; justify-self: center; }
.live-stage-img.is-empty { min-height: 40px; }
.live-ring {
  --left: 1;
  width: 96px; height: 96px; border-radius: 50%; justify-self: center;
  display: grid; place-items: center;
  background: conic-gradient(var(--accent-2) calc(var(--left) * 360deg), #e4e7ec 0);
}
.live-ring.is-low { background: conic-gradient(var(--danger) calc(var(--left) * 360deg), #e4e7ec 0); }
.live-ring > span { width: 76px; height: 76px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 2rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.live-stage-count { text-align: center; }
.live-stage-count strong { display: block; font-size: 2.4rem; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.live-stage-count span { color: var(--ink-soft); font-weight: 700; }
@media (max-width: 640px) {
  .live-stage { grid-template-columns: 1fr 1fr; }
  .live-stage-img { grid-column: 1 / -1; grid-row: 2; }
  .live-stage-img.is-empty { display: none; }
}
.live-host-q .live-option { min-height: 96px; font-size: 1.25rem; cursor: default; }
.live-chart { display: flex; justify-content: center; align-items: flex-end; gap: 14px; height: 200px; margin: 0 0 16px; }
.live-chart-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; width: 76px; height: 100%; background: none !important; }
.live-chart-n { font-weight: 900; font-size: 1.3rem; margin-bottom: 4px; }
.live-chart-bar { width: 100%; border-radius: 8px 8px 0 0; }
.live-chart-key { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; padding: 6px 0; border-radius: 0 0 8px 8px; color: #fff; font-weight: 900; }
.live-chart-key .live-shape { width: 22px; height: 22px; }
.live-chart-col:not(.is-correct) { opacity: 0.45; }
.live-chart-col.live-c0 .live-chart-bar, .live-chart-col.live-c0 .live-chart-key { background: #c8102e; }
.live-chart-col.live-c1 .live-chart-bar, .live-chart-col.live-c1 .live-chart-key { background: #1d4ed8; }
.live-chart-col.live-c2 .live-chart-bar, .live-chart-col.live-c2 .live-chart-key { background: #a16207; }
.live-chart-col.live-c3 .live-chart-bar, .live-chart-col.live-c3 .live-chart-key { background: #15803d; }
.live-chart-col.live-c4 .live-chart-bar, .live-chart-col.live-c4 .live-chart-key { background: #7c3aed; }
.live-chart-col.live-c5 .live-chart-bar, .live-chart-col.live-c5 .live-chart-key { background: #0f766e; }
.live-chart-col.live-c6 .live-chart-bar, .live-chart-col.live-c6 .live-chart-key { background: #be185d; }
.live-chart-col.live-c7 .live-chart-bar, .live-chart-col.live-c7 .live-chart-key { background: #475569; }
@media (max-width: 640px) { .live-chart { height: 150px; gap: 6px; } .live-chart-col { width: 40px; } }
.live-hostbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 16px; }
.live-settings { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 16px; }
.live-settings label { font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }

/* ---------- /live: My Live Quizzes ---------- */
.live-hero h1 { margin: 0 0 6px; font-size: clamp(1.5rem, 4vw, 2rem); }
.live-hero .live-sub { margin-bottom: 10px; }
.live-steps { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.live-list-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.live-quizlist { list-style: none; padding: 0; margin: 12px 0 0; }
.live-quizrow { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.live-quizrow-main { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.live-quiztitle { font-weight: 800; font-size: 1.08rem; color: var(--ink); overflow-wrap: anywhere; }
.live-results { margin-top: 10px; }
.live-sessions { list-style: none; padding: 0; margin: 0; }
.live-sessions li { border-top: 1px solid var(--border); padding: 10px 0 4px; }
.live-sessions .btn-row { margin-top: 6px; }
.live-report { margin-top: 10px; overflow-x: auto; }
.live-report table { border-collapse: collapse; width: 100%; font-size: 0.88rem; }
.live-report th, .live-report td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.live-report h3 { font-size: 0.95rem; margin: 14px 0 6px; }

/* ---------- /live/edit/:id: the editor ----------
   Built from the normal VotePoll pieces (.card, the generic input/select/
   textarea rules, .btn variants, .tri-toggle, .correct-toggle, .remove-btn,
   .thumb, .alert) and given Live Quiz energy with the brand blues only:
   Navy (--bg-1), Blue #0A84FF, Light Blue #4DA3FF, plus --success/--warn.
   Answers are told apart by a letter (A-H), never by a rainbow colour.
   White on #0A84FF is ~3.6:1, so it only carries large bold text (badge
   letters); smaller white text sits on navy or --accent-2. */
.live-edit-page {
  --lq-navy: var(--bg-1);
  --lq-blue: #0a84ff;
  --lq-light: #4da3ff;
  --lq-tint: #f4f8ff;
  --lq-tint-2: #e8f1ff;
  --lq-line: #cfe0fa;
  --lq-glow: rgba(10, 132, 255, 0.22);
  --lq-lift: 0 10px 24px -14px rgba(11, 37, 87, 0.45);
  --lq-ease: 0.18s ease;
  --lq-success-ink: #15803d; /* --success darkened for small white/green text (>= 4.5:1) */
}
.live-editbar { gap: 10px; flex-wrap: wrap; padding: 10px clamp(10px, 2vw, 24px); }
.live-editbar-logo { height: 34px; }
input.live-title-input { flex: 1 1 220px; width: auto; min-width: 0; max-width: 520px; font-weight: 700; }
.live-title-input:focus { outline: 2px solid #fff; outline-offset: 1px; }
.live-editbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.live-savestatus { color: #fff; font-size: 0.85rem; font-weight: 600; }
.live-savestatus.is-error { background: var(--danger-bg); color: var(--danger); padding: 3px 8px; border-radius: 8px; }
.live-editor-main { display: block; padding: 8px clamp(10px, 2vw, 24px) 48px; }
.live-editor-main > .card.center { max-width: 560px; margin: 20px auto; }
.live-hostproblems { max-width: 1400px; margin: 0 auto 12px; }
.live-hostproblems ul { margin: 6px 0 0; padding-left: 1.2em; }
.live-editor { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; max-width: 1400px; margin: 0 auto; align-items: start; }
.live-editor :is(input, select, textarea) { transition: border-color var(--lq-ease), box-shadow var(--lq-ease); }
.live-editor :is(input, select, textarea):focus { outline: none; border-color: var(--lq-blue); box-shadow: 0 0 0 4px var(--lq-glow); }
.live-editor .btn { transition: transform var(--lq-ease), box-shadow var(--lq-ease), background-color var(--lq-ease), opacity var(--lq-ease); }

/* Question list (sidebar) */
.live-qlist-wrap.card { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; padding: 12px; margin: 0; }
.live-qlist { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.live-qitem {
  width: 100%; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 4px 10px; align-items: start;
  padding: 10px; border-radius: 12px; border: 1.5px solid var(--lq-line); background: var(--lq-tint);
  cursor: pointer; text-align: left; font: inherit; color: var(--ink);
  transition: border-color var(--lq-ease), background-color var(--lq-ease), box-shadow var(--lq-ease), transform var(--lq-ease);
}
.live-qitem:hover { border-color: var(--lq-blue); transform: translateY(-1px); box-shadow: var(--lq-lift); }
.live-qitem.is-current {
  border-color: var(--lq-navy); color: #fff;
  background: linear-gradient(135deg, var(--lq-navy), #123b85);
  box-shadow: 0 8px 20px -10px rgba(10, 132, 255, 0.75);
}
.live-qitem-num {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--lq-navy); color: #fff; font-weight: 800; font-size: 0.9rem;
}
.live-qitem.is-current .live-qitem-num { background: var(--lq-blue); font-size: 1.15rem; }
.live-qitem-text { font-size: 0.88rem; font-weight: 700; line-height: 1.3; padding-top: 5px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.live-qitem-row { grid-column: 2; display: flex; align-items: center; gap: 6px; }
.live-qitem-row img { width: 40px; height: 28px; object-fit: cover; border-radius: 6px; border: 1px solid var(--lq-line); background: #fff; }
.live-qitem-time { font-size: 0.72rem; font-weight: 700; color: var(--lq-navy); background: var(--lq-tint-2); border-radius: 999px; padding: 2px 8px; }
.live-qitem.is-current .live-qitem-time { background: rgba(255, 255, 255, 0.16); color: #fff; }
.live-qitem-warn, .live-qitem-ok { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 0.75rem; font-weight: 900; color: #fff; }
.live-qitem-warn { background: var(--warn); }
.live-qitem-ok { background: var(--success); }
.live-qitem.is-current :is(.live-qitem-ok, .live-qitem-warn) { box-shadow: 0 0 0 2px #fff; }
.btn.live-addq { width: 100%; background: linear-gradient(135deg, var(--accent-2), var(--bg-2)); box-shadow: 0 8px 18px -10px rgba(10, 132, 255, 0.8); }
.btn.live-addq:hover:not(:disabled) { opacity: 1; transform: translateY(-1px); box-shadow: 0 12px 22px -10px rgba(10, 132, 255, 0.9); }

/* Selected question: a white card with a brand-blue top stripe */
.live-qcard { min-width: 0; margin: 0; background: linear-gradient(90deg, var(--lq-navy), var(--lq-blue) 60%, var(--lq-light)) top / 100% 5px no-repeat, var(--card); }
.live-qtools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.live-qtools-title { display: inline-flex; align-items: baseline; gap: 2px; }
.live-qnum { font-size: 1.3rem; font-weight: 800; color: var(--lq-navy); }
.live-qof { font-weight: 600; color: var(--ink-soft); }
.live-qtools-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.live-qtools .btn-secondary { background: var(--lq-tint-2); color: var(--lq-navy); }
.live-qtools .btn-secondary:hover:not(:disabled) { opacity: 1; background: var(--lq-line); }
.live-qtools .btn-danger-text { color: var(--danger); }
textarea.live-qtext {
  min-height: 0; resize: none; padding: 18px 20px; border-radius: 14px;
  font-size: clamp(1.25rem, 2.6vw, 1.75rem); font-weight: 800; line-height: 1.3; color: var(--lq-navy);
  border: 2px solid var(--lq-line); background: linear-gradient(180deg, #fff, var(--lq-tint));
  box-shadow: inset 0 -3px 0 var(--lq-tint-2);
}
textarea.live-qtext::placeholder { color: #7c93b8; }
textarea.live-qtext:hover { border-color: var(--lq-light); }
.live-section-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 10px; font-size: 0.82rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--lq-navy); }
.live-section-title::before { content: ""; align-self: center; width: 4px; height: 14px; border-radius: 2px; background: var(--lq-blue); }
.live-section-note { font-size: 0.8rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink-soft); }
.live-qmid { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: 18px; margin: 18px 0 20px; align-items: stretch; }

/* Timer & points panel */
.live-qsettings { display: grid; gap: 12px; align-content: start; padding: 14px; border-radius: 14px; background: var(--lq-tint); border: 1.5px solid var(--lq-line); }
.live-qsettings .live-section-title { margin-bottom: 0; }
.live-field { display: grid; gap: 6px; margin: 0; color: var(--lq-navy); }
div.live-field > span:first-child { font-weight: 600; font-size: 0.88rem; }
.live-field input { max-width: 8em; }
.live-field-row { display: flex; gap: 8px; align-items: center; font-weight: 400; color: var(--ink-soft); }

/* Points presets: the shared segmented control (.tri-toggle), navy when chosen */
.live-presets { width: max-content; max-width: 100%; border-color: var(--lq-line); background: #fff; }
.live-presets button { font-size: 0.82rem; padding: 8px 12px; min-height: 38px; color: var(--lq-navy); transition: background-color var(--lq-ease), color var(--lq-ease); }
.live-presets button + button { border-left-color: var(--lq-line); }
.live-presets button:hover:not(.is-on) { background: var(--lq-tint-2); }
.live-presets button.is-on { background: var(--lq-navy); color: #fff; }
.live-presets button:focus-visible { box-shadow: inset 0 0 0 2px var(--lq-blue); }
.live-ppreview { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1.5px solid var(--lq-line); }
.live-ppreview .hint { margin: 0; }
.live-pgraph { display: block; width: 100%; height: 64px; }
.live-pgraph :is(polyline, polygon) { vector-effect: non-scaling-stroke; }
.live-pgraph .area { fill: rgba(77, 163, 255, 0.22); stroke: none; }
.live-pgraph polyline { fill: none; stroke: var(--lq-blue); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.live-pgraph .axis { stroke: var(--lq-line); stroke-width: 1.5; }

/* Question picture: an inviting drop zone */
.live-media { display: flex; flex-direction: column; min-width: 0; }
.live-qimage-box {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 220px; width: 100%; border-radius: 14px; border: 2px dashed var(--lq-light);
  background: radial-gradient(circle at 50% 38%, rgba(77, 163, 255, 0.2), transparent 62%), var(--lq-tint);
  padding: 16px; font: inherit; color: var(--ink-soft); text-align: center;
  transition: border-color var(--lq-ease), background-color var(--lq-ease), box-shadow var(--lq-ease);
}
button.live-qimage-box { cursor: pointer; }
button.live-qimage-box:hover, .live-qimage-box.is-drag { border-color: var(--lq-blue); border-style: solid; background-color: var(--lq-tint-2); box-shadow: 0 0 0 4px var(--lq-glow); }
.live-qimage-icon {
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--lq-blue); box-shadow: 0 8px 18px -8px rgba(10, 132, 255, 0.6);
  transition: transform var(--lq-ease);
}
button.live-qimage-box:hover .live-qimage-icon, .live-qimage-box.is-drag .live-qimage-icon { transform: scale(1.08); }
.live-qimage-box .live-picicon { width: 30px; height: 30px; }
.live-qimage-add { color: var(--accent-2); font-weight: 800; font-size: 1.02rem; }
.live-qimage-box .hint { margin: 0; }
.live-qimage-box.has-image { border-style: solid; border-color: var(--lq-line); background: #fff; }
.live-qimage-box img { max-width: 100%; max-height: 300px; border-radius: 10px; object-fit: contain; }
.live-qimage-actions { display: flex; gap: 8px; }
.live-picicon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }

/* Answers: tinted cards in two columns, a letter badge in the brand blues */
.live-ans-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.live-ans {
  display: grid; gap: 8px; padding: 12px 12px 8px; min-width: 0;
  border: 2px solid var(--lq-line); border-radius: 14px; background: var(--lq-tint);
  box-shadow: 0 2px 6px -3px rgba(11, 37, 87, 0.18);
  transition: border-color var(--lq-ease), background-color var(--lq-ease), box-shadow var(--lq-ease), transform var(--lq-ease);
}
.live-ans:hover, .live-ans:focus-within { border-color: var(--lq-blue); box-shadow: var(--lq-lift); transform: translateY(-1px); }
.live-ans.is-drag { border-style: dashed; border-color: var(--lq-blue); box-shadow: 0 0 0 4px var(--lq-glow); }
.live-ans.is-correct { border-color: var(--success); background: #effbf3; box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.16), 0 8px 20px -14px rgba(22, 163, 74, 0.7); animation: live-correct-in 0.25s ease-out; }
@keyframes live-correct-in { from { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0.28); } }
.live-ans-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.live-ans-letter {
  flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  font-weight: 800; font-size: 1.25rem; background: var(--lq-navy); color: #fff;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18);
  transition: background-color var(--lq-ease), color var(--lq-ease);
}
.live-ans:nth-child(3n + 2) .live-ans-letter { background: var(--lq-blue); }
.live-ans:nth-child(3n) .live-ans-letter { background: var(--lq-light); color: var(--lq-navy); }
.live-ans.is-correct .live-ans-letter { background: var(--success); color: #fff; }
input.live-ans-text { flex: 1; min-width: 0; font-weight: 600; border-color: var(--lq-line); }
.live-ans .remove-btn { background: none; border: none; border-radius: 8px; color: var(--ink-soft); cursor: pointer; font-size: 1.2rem; line-height: 1; padding: 4px 8px; flex: none; min-width: 36px; min-height: 36px; transition: color var(--lq-ease), background-color var(--lq-ease); }
.live-ans .remove-btn:hover { color: var(--danger); background: var(--danger-bg); }
.live-ans-foot { justify-content: space-between; margin-left: 50px; padding-top: 6px; min-height: 40px; border-top: 1.5px dashed var(--lq-line); }
.live-ans.is-correct .live-ans-foot { border-top-color: rgba(22, 163, 74, 0.3); }
.live-ans-pic { padding-left: 4px; color: var(--accent-2); }
.live-ans-imgdel { white-space: nowrap; }
.live-ans-img { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.live-ans-img .thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; border: 1.5px solid var(--lq-line); background: #fff; flex: none; }
.live-ans-correct { min-height: 34px; padding: 0 10px; border-radius: 999px; border: 1.5px solid transparent; transition: background-color var(--lq-ease), color var(--lq-ease), border-color var(--lq-ease); }
.live-ans-correct:hover { border-color: var(--success); color: var(--lq-success-ink); background: #fff; }
.live-ans-correct:has(input:checked) { background: var(--lq-success-ink); color: #fff; border-color: var(--lq-success-ink); }
.live-ans-correct:has(input:checked) input { accent-color: #fff; }
/* The answer card has room for the word: keep "Correct" on narrow screens
   too (style.css swaps it for a bare ✓ in the cramped create-form rows). */
.live-ans-correct span { font-size: inherit; }
.live-ans-correct span::after { content: none; }
.btn.live-addans { margin-top: 10px; color: var(--accent-2); }
.live-qproblems { margin: 12px 0 0; padding: 10px 14px; font-size: 0.88rem; border: 1px solid #fde68a; border-radius: 12px; }
@media (max-width: 900px) {
  .live-qmid { grid-template-columns: 1fr; }
  .live-qimage-box { min-height: 150px; }
}
@media (max-width: 760px) {
  .live-editor { grid-template-columns: 1fr; }
  .live-qlist-wrap.card { position: static; max-height: none; display: flex; gap: 8px; overflow-x: auto; padding: 10px; }
  .live-qlist { display: flex; margin: 0; }
  .live-qlist li { flex: 0 0 160px; }
  .btn.live-addq { flex: 0 0 auto; width: auto; white-space: nowrap; }
  .live-ans-grid { grid-template-columns: 1fr; }
  .live-ans-foot { margin-left: 0; }
  .live-editor-main { padding: 6px 10px 40px; }
  input.live-title-input { order: 3; flex-basis: 100%; max-width: none; }
}
