:root {
  --c1: #ff6b6b;       /* warm red */
  --c2: #4dabf7;       /* friendly blue */
  --c3: #ffd43b;       /* sunny yellow */
  --c4: #51cf66;       /* fresh green */
  --bg-grad: linear-gradient(135deg, #74b9ff 0%, #a29bfe 100%);
  --bg: #4a90e2;
  --panel: #ffffff;
  --panel-soft: #f7faff;
  --text: #1e293b;
  --text-on-bg: #ffffff;
  --muted: #64748b;
  --muted-on-bg: #e0e7ff;
  --accent: #4361ee;
  --shadow: 0 6px 20px rgba(31,55,128,0.12);
  --shadow-lg: 0 12px 32px rgba(31,55,128,0.18);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  background: var(--bg-grad) fixed;
  color: var(--text-on-bg);
  min-height: 100vh;
}
button {
  font-family: inherit;
  cursor: pointer;
}
input, select, textarea {
  font-family: inherit;
}

/* ====== Mute button (fixed top-right) ====== */
.mute-btn {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 9999;
  background: rgba(255,255,255,0.85);
  color: #4361ee;
  border: 1px solid rgba(255,255,255,0.6);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 12px rgba(31,55,128,0.18);
}
.mute-btn:hover { background: #ffffff; transform: translateY(-1px); }

/* ====== Brand corner (logo + company name, fixed bottom-right) ====== */
.brand-corner {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.92);
  color: #1e293b;
  padding: 8px 16px;
  border-radius: 999px;
  z-index: 9999;
  backdrop-filter: blur(6px);
  font-size: 14px;
  max-width: 50vw;
  box-shadow: 0 4px 14px rgba(31,55,128,0.18);
}
.brand-corner img {
  max-height: 36px;
  max-width: 80px;
  display: block;
}
.brand-corner .brand-name {
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #1e293b;
}
.brand-corner.empty { display: none; }

/* ====== Common card ====== */
.card {
  background: var(--panel);
  color: var(--text);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.card h2, .card h3 { color: var(--text); }
h1, h2, h3 { margin-top: 0; }

/* Title wrap (image or text) */
.title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.title-wrap img {
  max-height: 64px;
  max-width: 380px;
  border-radius: 8px;
  object-fit: contain;
}
.projector .title-wrap img { max-height: 7vh; max-width: 30vw; }
.participant .title-wrap { justify-content: center; flex-direction: column; }
.participant .title-wrap img { max-height: 80px; }

/* ====== Participant (smartphone) ====== */
.participant {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  gap: 14px;
}
.participant header {
  text-align: center;
  padding: 8px 0;
  color: #fff;
}
.participant header h1 {
  font-size: 22px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.participant .info {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(255,255,255,0.92);
  margin-top: 4px;
}
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; color: var(--muted); }
.field input, .field select, .field textarea {
  background: #f7faff;
  border: 2px solid #d8e4f9;
  color: var(--text);
  padding: 12px 14px;
  font-size: 16px;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
}
.btn {
  background: linear-gradient(135deg, #6c8eff, #4361ee);
  color: #fff;
  border: none;
  padding: 14px 22px;
  font-size: 16px;
  border-radius: 14px;
  font-weight: 700;
  box-shadow: 0 4px 0 #2c3eb8, 0 8px 18px rgba(67,97,238,0.3);
  transition: transform 0.05s, box-shadow 0.1s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #2c3eb8, 0 2px 8px rgba(67,97,238,0.2); }
.btn.secondary {
  background: linear-gradient(135deg, #adb5bd, #6c757d);
  box-shadow: 0 4px 0 #495057, 0 8px 18px rgba(73,80,87,0.2);
}
.btn.danger {
  background: linear-gradient(135deg, #ff8787, #fa5252);
  box-shadow: 0 4px 0 #c92a2a, 0 8px 18px rgba(250,82,82,0.3);
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn.block { width: 100%; }

.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}
.choice-btn {
  position: relative;
  border: none;
  border-radius: 18px;
  padding: 30px 14px;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  text-align: left;
  min-height: 110px;
  box-shadow: 0 6px 0 rgba(0,0,0,0.18), 0 8px 16px rgba(31,55,128,0.18);
  transition: transform 0.05s;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.choice-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,0.18), 0 4px 10px rgba(31,55,128,0.18); }
.choice-btn.c0 { background: linear-gradient(135deg, #ff8787, var(--c1)); }
.choice-btn.c1 { background: linear-gradient(135deg, #74c0fc, var(--c2)); }
.choice-btn.c2 { background: linear-gradient(135deg, #ffe066, var(--c3)); color: #2a2a2a; text-shadow: none; }
.choice-btn.c3 { background: linear-gradient(135deg, #8ce99a, var(--c4)); }
.choice-btn .num,
.choice-btn .num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.85);
  color: #222;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-weight: 800;
  font-size: 14px;
  margin-right: 8px;
  flex-shrink: 0;
}
.choice-btn[disabled] { opacity: 0.4; }
.choice-btn.selected { outline: 4px solid #fff; }

.result-card {
  text-align: center;
  padding: 28px 16px;
}
.result-card .big { font-size: 48px; font-weight: 900; }
.result-card.ok .big { color: #ffa940; }
.result-card.ok { background: linear-gradient(135deg, #fff9db, #ffec99); }
.result-card.ng .big { color: #fa5252; }
.result-card.ng { background: linear-gradient(135deg, #ffe3e3, #ffc9c9); }
.result-card .score { font-size: 28px; margin-top: 8px; font-weight: 700; }
.result-card .meta { color: var(--muted); margin-top: 6px; font-size: 13px; }

.rank-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.rank-list li {
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--panel-soft);
  margin-bottom: 6px;
  border-radius: 12px;
  color: var(--text);
  font-weight: 600;
}
.rank-list li.me { outline: 3px solid var(--accent); background: #fffbeb; }

/* ====== Admin ====== */
.admin {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  color: var(--text);
}
.admin .card { background: var(--panel); }
.admin .full { grid-column: 1 / -1; }
.admin h1, .admin h2, .admin h3 { color: var(--text); }
.admin h1 { font-size: 22px; margin-bottom: 16px; }
.admin .toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.admin .question-list {
  max-height: 60vh;
  overflow-y: auto;
}
.admin .q-item {
  background: var(--panel-soft);
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  color: var(--text);
}
.admin .q-item:hover { background: #eef4ff; }
.admin .q-item.active { outline: 2px solid var(--accent); background: #eef4ff; }
.admin .q-item .q-no {
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
}
.admin .field input, .admin .field select, .admin textarea {
  background: var(--panel-soft);
  border: 2px solid #d8e4f9;
  color: var(--text);
}
.admin textarea {
  width: 100%;
  min-height: 80px;
  border-radius: 10px;
  padding: 10px;
  font-size: 15px;
  outline: none;
}
.admin .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.admin .form-grid.form-grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}
@media (max-width: 900px) {
  .admin .form-grid.form-grid-3 { grid-template-columns: 1fr; }
}
.admin .stats {
  display: flex;
  gap: 12px;
  font-size: 14px;
}
.admin .stat-card {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border-radius: 12px;
  padding: 10px 14px;
  flex: 1;
  text-align: center;
}
.admin .stat-card .num { font-size: 24px; font-weight: 800; color: var(--accent); }
.admin .stat-card .lbl { color: var(--muted); font-size: 12px; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tabs button {
  background: var(--panel-soft);
  border: 2px solid #d8e4f9;
  color: var(--text);
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}
.tabs button:hover { background: #eef4ff; }
.tabs button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.tab { display: none; }
.tab.active { display: block; }

/* ====== Projector (designed for 1920x1080, scales with vh) ====== */
.projector {
  height: 100vh;
  width: 100vw;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  padding: 1.8vh 3.5vw;
  position: relative;
  overflow: hidden;
  color: var(--text-on-bg);
}
.projector header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5vh;
  flex-shrink: 0;
}
.projector header h1 { font-size: 3vh; margin: 0; text-shadow: 0 2px 6px rgba(0,0,0,0.18); }
.projector header .meta { color: rgba(255,255,255,0.92); font-size: 1.8vh; font-weight: 600; }
.projector .lobby {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5vw;
  flex: 1;
  align-items: center;
  min-height: 0;
}
.projector .lobby .qr {
  background: #fff;
  padding: 2vh 1.5vw;
  border-radius: 20px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.projector .lobby .qr img { width: 100%; max-width: min(40vw, 56vh); }
.projector .lobby .qr .url {
  color: #222;
  font-size: 2.4vh;
  font-weight: 700;
  margin-top: 1vh;
  word-break: break-all;
}
.projector .lobby .joined { overflow: hidden; }
.projector .lobby .joined h2 { font-size: 3.2vh; margin-bottom: 1.5vh; }
.projector .lobby .name-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8vh;
  max-height: 80vh;
  overflow: hidden;
  align-content: flex-start;
}
.projector .lobby .name-cloud .chip {
  background: rgba(255,255,255,0.95);
  color: var(--text);
  padding: 0.6vh 1.4vw;
  border-radius: 999px;
  font-size: 2vh;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.projector .question-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  gap: 1vh;
}
.projector .question-stage > div[style*="font-size:24px"] { font-size: 1.8vh !important; flex-shrink: 0; }
.projector .q-text {
  font-size: 4vh;
  font-weight: 800;
  text-align: center;
  margin: 1vh 0;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.18);
  max-height: 14vh;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  flex-shrink: 0;
  word-break: break-word;
}
.projector .q-image {
  max-height: 24vh;
  max-width: 70vw;
  margin: 0 auto;
  display: block;
  border-radius: 1.5vh;
  object-fit: contain;
  box-shadow: 0 0.6vh 1.6vh rgba(0,0,0,0.25);
  flex-shrink: 1;
  min-height: 0;
}
.projector .timer {
  font-size: 6vh;
  font-weight: 900;
  text-align: center;
  color: #ffe066;
  margin: 0.4vh 0;
  line-height: 1;
  text-shadow: 0 3px 10px rgba(0,0,0,0.3);
  flex-shrink: 0;
}
.projector .timer.urgent { color: #ffa8a8; animation: pulse 0.6s infinite alternate; }
@keyframes pulse {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}
.projector .answer-meta {
  display: flex;
  justify-content: center;
  gap: 3vw;
  font-size: 2vh;
  color: rgba(255,255,255,0.92);
  margin-bottom: 0.6vh;
  font-weight: 600;
  flex-shrink: 0;
}
.projector .choices-big {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5vh 1.5vw;
  margin-top: 1.2vh;
  flex-shrink: 0;
}
.projector .choice-big {
  border-radius: 1.5vh;
  padding: 1.2vh 1.4vw;
  font-size: 2.6vh;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 1vw;
  position: relative;
  overflow: hidden;
  min-height: 7vh;
}
.projector .choice-big {
  box-shadow: 0 0.8vh 1.6vh rgba(0,0,0,0.18);
}
.projector .choice-big.c0 { background: linear-gradient(135deg, #ff8787, var(--c1)); color: #fff; }
.projector .choice-big.c1 { background: linear-gradient(135deg, #74c0fc, var(--c2)); color: #fff; }
.projector .choice-big.c2 { background: linear-gradient(135deg, #ffe066, var(--c3)); color: #2a2a2a; }
.projector .choice-big.c3 { background: linear-gradient(135deg, #8ce99a, var(--c4)); color: #fff; }
.projector .choice-big.correct {
  /* keep outline INSIDE so neighboring cards / viewport edges don't clip it */
  box-shadow: inset 0 0 0 0.6vh #fff, 0 0 2.4vh rgba(255,255,255,0.6), 0 0.8vh 1.6vh rgba(0,0,0,0.3);
}
.projector .choice-big.wrong { opacity: 0.35; }
.projector .choice-big .count {
  margin-left: auto;
  background: rgba(0,0,0,0.3);
  padding: 0.3vh 1vw;
  border-radius: 999px;
  font-size: 2vh;
}

.projector .ranking {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2vw;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.projector .ranking > div { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.projector .ranking h2 { font-size: 3.2vh; margin-bottom: 1.2vh; flex-shrink: 0; }
.projector .ranking > div > div[id^="rank-"],
.projector .ranking > div > div[id^="end-"] { flex: 1; overflow: hidden; }
.projector .ranking .row {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.96);
  color: var(--text);
  padding: 1.1vh 1.2vw;
  border-radius: 1.2vh;
  margin-bottom: 0.7vh;
  font-size: 2.2vh;
  gap: 1vw;
  box-shadow: 0 0.4vh 1vh rgba(0,0,0,0.14);
}
.projector .ranking .row.r1 { background: linear-gradient(90deg, #ffd43b 0%, #fab005 100%); color: #5c3d00; }
.projector .ranking .row.r2 { background: linear-gradient(90deg, #e9ecef 0%, #adb5bd 100%); color: #212529; }
.projector .ranking .row.r3 { background: linear-gradient(90deg, #ffa94d 0%, #e8590c 100%); color: #fff; }
.projector .ranking .rank-no { width: 4vw; min-width: 50px; font-weight: 900; font-size: 2.8vh; color: var(--accent); }
.projector .ranking .row.r1 .rank-no, .projector .ranking .row.r2 .rank-no, .projector .ranking .row.r3 .rank-no { color: inherit; }
.projector .ranking .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.projector .ranking .team { color: var(--muted); font-size: 1.6vh; margin-right: 1vw; }
.projector .ranking .score { font-weight: 900; }

/* Reveal stage - correct answerers time ranking */
#stage-reveal .reveal-bottom {
  margin-top: 1vh;
  text-align: center;
  flex-shrink: 0;
}
#stage-reveal h2 {
  font-size: 2.6vh;
  margin: 0 0 0.8vh;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.18);
  display: inline-flex;
  align-items: center;
  gap: 0.6vw;
}
#stage-reveal .r-pill {
  background: rgba(255,255,255,0.92);
  color: var(--accent);
  font-weight: 800;
  border-radius: 999px;
  padding: 0.2vh 0.8vw;
  font-size: 2.2vh;
  margin-left: 0.4vw;
}
#stage-reveal .time-rank-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 70vw;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6vh 1.2vw;
  max-height: 14vh;
  overflow: hidden;
}
#stage-reveal .time-rank-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 0.6vw;
  background: rgba(255,255,255,0.96);
  color: var(--text);
  border-radius: 1vh;
  padding: 0.6vh 1vw;
  font-size: 1.9vh;
  box-shadow: 0 0.3vh 0.8vh rgba(0,0,0,0.15);
}
#stage-reveal .time-rank-item .tr-rank {
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  width: 2.6vh;
  height: 2.6vh;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6vh;
}
#stage-reveal .time-rank-item.rank-1 .tr-rank { background: #fab005; }
#stage-reveal .time-rank-item.rank-2 .tr-rank { background: #adb5bd; }
#stage-reveal .time-rank-item.rank-3 .tr-rank { background: #e8590c; }
#stage-reveal .time-rank-item .tr-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#stage-reveal .time-rank-item .tr-team { color: var(--muted); font-size: 1.4vh; }
#stage-reveal .time-rank-item .tr-time { font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
#stage-reveal .time-rank-item .tr-unit { font-size: 1.3vh; margin-left: 0.2vw; }
#stage-reveal .time-rank-item .tr-pt {
  background: linear-gradient(135deg, #ffd43b, #fab005);
  color: #5c3d00;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.2vh 0.7vw;
  font-size: 1.5vh;
}
#stage-reveal .time-rank-empty {
  text-align: center;
  color: rgba(255,255,255,0.85);
  font-size: 2vh;
  padding: 1vh;
  grid-column: 1 / -1;
  background: none;
  box-shadow: none;
}

.empty-msg {
  text-align: center;
  color: rgba(255,255,255,0.85);
  padding: 40px;
  font-size: 22px;
}
.admin .empty-msg { color: var(--muted); }

/* ====== SE editor (admin) ====== */
.se-row {
  background: var(--panel-soft);
  border: 1px solid #d8e4f9;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  display: grid;
  grid-template-columns: 130px 1fr auto auto auto;
  gap: 10px;
  align-items: center;
  color: var(--text);
}
.se-row .se-label {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}
.se-row input[type="text"] {
  width: 100%;
  background: #fff;
  border: 1.5px solid #d8e4f9;
  color: var(--text);
  padding: 7px 10px;
  font-size: 13px;
  border-radius: 8px;
}
.se-row input[type="file"] { font-size: 12px; max-width: 180px; }
.se-row .btn-test, .se-row .btn-clear {
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  color: #fff;
}
.se-row .btn-test { background: var(--accent); }
.se-row .btn-clear { background: #fa5252; }
.se-row .btn-test:hover, .se-row .btn-clear:hover { filter: brightness(1.1); }
@media (max-width: 900px) {
  .se-row { grid-template-columns: 1fr; }
}

/* ====== Choice editor (admin) ====== */
.choice-editor {
  background: var(--panel-soft);
  border: 1px solid #d8e4f9;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--text);
}
.choice-editor .badge {
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  margin-top: 6px;
}
.choice-editor .body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.choice-editor input[type="text"] {
  width: 100%;
  background: #fff;
  border: 1.5px solid #d8e4f9;
  color: var(--text);
  padding: 8px 10px;
  font-size: 14px;
  border-radius: 8px;
}
.choice-editor input[type="file"] { font-size: 12px; }
.choice-editor .preview-wrap { display: flex; align-items: center; gap: 8px; }
.choice-editor img.preview {
  max-height: 60px;
  max-width: 100px;
  border-radius: 6px;
  display: none;
}
.choice-editor .clear-img {
  background: #c0392b;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  display: none;
}

/* ====== Choice image rendering ====== */
.choice-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  text-align: center;
}
.choice-btn .num-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 32px;
  height: 32px;
  font-size: 16px;
  margin: 0;
}
.choice-btn img.choice-img {
  display: block;
  max-width: 100%;
  max-height: 60px;
  margin: 0 auto 6px;
  border-radius: 6px;
  background: rgba(255,255,255,0.15);
  object-fit: contain;
}
.choice-btn .label { display: block; font-size: 16px; }

/* No-q-image: bigger image-driven choices on participant */
#view-question.no-q-image .choices { gap: 8px; }
#view-question.no-q-image .choice-btn {
  padding: 12px 8px;
  min-height: 0;
}
#view-question.no-q-image .choice-btn img.choice-img {
  max-height: 130px;
  width: auto;
  margin-bottom: 4px;
}
#view-question.no-q-image .choice-btn .num-badge {
  width: 36px;
  height: 36px;
  font-size: 18px;
}

/* Projector choice: default (with q-image) */
.projector .choice-big {
  position: relative;
}
.projector .choice-big .num-badge {
  width: 4.2vh;
  height: 4.2vh;
  font-size: 2.4vh;
  margin-right: 0.6vw;
}
.projector .choice-big img.choice-img {
  max-height: 10vh;
  max-width: 12vw;
  border-radius: 1vh;
  background: rgba(255,255,255,0.2);
  margin-right: 0.6vw;
  object-fit: contain;
  flex-shrink: 0;
}
.projector .choice-big .label {
  flex: 1;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.25;
}

/* Projector no-q-image: huge image cards (like reference) */
.projector .no-q-image .choices-big {
  gap: 1.8vh 1.6vw;
  margin-top: 1.2vh;
  flex: 1;
  min-height: 0;
  flex-shrink: 1;
}
.projector .no-q-image .choice-big {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1vh 1vw;
  min-height: 0;
  border: 0.5vh solid rgba(255,255,255,0.18);
  text-align: center;
  gap: 0.8vh;
  overflow: hidden;
}
.projector .no-q-image .choice-big .num-badge {
  position: absolute;
  top: 1vh;
  left: 1vw;
  width: 4.5vh;
  height: 4.5vh;
  font-size: 2.6vh;
  margin: 0;
  z-index: 2;
  box-shadow: 0 0.4vh 0.6vh rgba(0,0,0,0.3);
}
.projector .no-q-image .choice-big img.choice-img {
  max-height: 22vh;
  max-width: 80%;
  border-radius: 1.5vh;
  margin: 0;
  background: rgba(255,255,255,0.05);
  flex-shrink: 1;
  min-height: 0;
}
.projector .no-q-image .choice-big .label {
  font-size: 2.4vh;
  font-weight: 700;
  flex: 0 0 auto;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: anywhere;
  text-align: center;
  padding: 0 0.4vw;
}

@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; }
  .projector .lobby { grid-template-columns: 1fr; }
  .projector .ranking { grid-template-columns: 1fr; }
  .projector .q-text { font-size: 32px; }
  .projector .choice-big { font-size: 22px; padding: 18px; }
  .projector .choices-big { grid-template-columns: 1fr; }
}
