/* MyTrivia Game - styles. Everything is prefixed mt- so it can't clash with the theme. */

.mt-app {
  --mt-navy: #0E1330;
  --mt-gold: #FFB020;
  --mt-blue: #2A47E0;
  --mt-blue-hover: #1A2FA8;
  --mt-bg: #F6F7FB;
  --mt-surface: #FFFFFF;
  --mt-surface-soft: #F3F5FB;
  --mt-border: #E3E6F0;
  --mt-input-border: #C9CEDE;
  --mt-text: #0E1330;
  --mt-text-body: #3A4160;
  --mt-text-muted: #545B78;
  --mt-text-on-dark: #C9CEE6;
  --mt-tint: #C9D2FF;
  --mt-tag-blue-bg: #EEF1FF;
  --mt-tag-gold-bg: #FFF4DB;
  --mt-tag-gold-text: #7A4F00;
  --mt-correct-bg: #E3F7EC;
  --mt-correct-border: #1E9E5A;
  --mt-correct-text: #0B5D33;
  --mt-wrong-bg: #FDECEC;
  --mt-wrong-border: #D64545;
  --mt-wrong-text: #8A1C1C;
  --mt-font-display: 'Space Grotesk', system-ui, sans-serif;
  --mt-font-body: 'Inter', system-ui, sans-serif;
  --mt-radius-pill: 999px;
  --mt-radius-card: 18px;
  --mt-radius-panel: 28px;
  --mt-radius-control: 12px;

  font-family: var(--mt-font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--mt-text);
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
  -webkit-font-smoothing: antialiased;
}
.mt-app *, .mt-app *::before, .mt-app *::after { box-sizing: border-box; }
.mt-hidden { display: none !important; }

/* ---------- text ---------- */
.mt-app .mt-eyebrow {
  font-family: var(--mt-font-body);
  font-size: 13px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--mt-blue); margin: 0 0 10px;
}
.mt-app .mt-title {
  font-family: var(--mt-font-display);
  font-size: clamp(30px, 5vw, 44px); font-weight: 700; letter-spacing: -0.01em; line-height: 1.1;
  color: var(--mt-navy); margin: 0 0 10px; padding: 0;
}
.mt-app .mt-title--sm { font-size: clamp(24px, 3.5vw, 30px); }
.mt-app .mt-sub { color: var(--mt-text-body); font-size: 17px; margin: 0 0 24px; }
.mt-app .mt-muted { color: var(--mt-text-muted); font-size: 14px; }
.mt-app a { color: var(--mt-blue); }
.mt-app a:hover { color: var(--mt-blue-hover); }

/* ---------- cards ---------- */
.mt-app .mt-card {
  background: var(--mt-surface); border: 1px solid var(--mt-border);
  border-radius: var(--mt-radius-panel); padding: 32px; margin: 0 auto 20px;
}
.mt-app .mt-card--narrow { max-width: 640px; }
.mt-app .mt-center { text-align: center; }

/* ---------- forms ---------- */
.mt-app .mt-field { margin-bottom: 18px; }
.mt-app .mt-label { display: block; font-size: 14px; font-weight: 600; color: var(--mt-text-body); margin: 0 0 6px; }
.mt-app .mt-input {
  display: block; width: 100%; min-height: 48px; padding: 12px 16px;
  font-family: var(--mt-font-body); font-size: 16px; color: var(--mt-text);
  background: var(--mt-surface); border: 1px solid var(--mt-input-border);
  border-radius: var(--mt-radius-control); box-shadow: none; margin: 0;
}
.mt-app textarea.mt-input { min-height: 96px; resize: vertical; }
.mt-app .mt-input::placeholder { color: #8A90AB; }
.mt-app .mt-input:focus { outline: 2px solid var(--mt-blue); outline-offset: 1px; border-color: var(--mt-blue); }
.mt-app .mt-input--code {
  text-align: center; font-family: var(--mt-font-display); font-weight: 700;
  font-size: 32px; letter-spacing: 0.3em; padding-left: calc(16px + 0.3em);
}
.mt-app .mt-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.mt-app .mt-readout {
  background: var(--mt-surface-soft); border: 1px solid var(--mt-border);
  border-radius: var(--mt-radius-control); padding: 12px 16px; margin: 0 0 18px;
  font-size: 15px; color: var(--mt-text-body);
}
.mt-app .mt-readout strong { color: var(--mt-navy); }
.mt-app .mt-readout.is-bad { background: var(--mt-wrong-bg); border-color: var(--mt-wrong-border); color: var(--mt-wrong-text); }

/* ---------- buttons ---------- */
.mt-app .mt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 15px 26px; margin: 0;
  font-family: var(--mt-font-body); font-size: 16px; font-weight: 600; line-height: 1.2;
  border: 2px solid transparent; border-radius: var(--mt-radius-pill);
  cursor: pointer; text-decoration: none; transition: opacity .15s ease, background .15s ease;
}
.mt-app .mt-btn:focus-visible, .mt-app .mt-pill:focus-visible, .mt-app .mt-chipbtn:focus-visible, .mt-app .mt-iconbtn:focus-visible {
  outline: 2px solid var(--mt-blue); outline-offset: 2px;
}
.mt-app .mt-btn:disabled { opacity: .5; cursor: not-allowed; }
.mt-app .mt-btn--block { display: flex; width: 100%; }
.mt-app .mt-btn--small { min-height: 44px; padding: 10px 18px; font-size: 15px; }
.mt-app .mt-btn--dark { background: var(--mt-navy); color: #fff; }
.mt-app .mt-btn--dark:hover:not(:disabled) { background: #1b2250; color: #fff; }
.mt-app .mt-btn--gold { background: var(--mt-gold); color: var(--mt-navy); }
.mt-app .mt-btn--gold:hover:not(:disabled) { opacity: .9; color: var(--mt-navy); }
.mt-app .mt-btn--ghost { background: transparent; border-color: var(--mt-navy); color: var(--mt-navy); }
.mt-app .mt-btn--ghost:hover:not(:disabled) { background: var(--mt-surface-soft); color: var(--mt-navy); }
.mt-app .mt-stage .mt-btn--ghost { border-color: var(--mt-text-on-dark); color: #fff; }
.mt-app .mt-stage .mt-btn--ghost:hover:not(:disabled) { background: rgba(255,255,255,.08); color: #fff; }
.mt-app .mt-btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* ---------- pills (toggle groups) ---------- */
.mt-app .mt-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.mt-app .mt-pill {
  min-height: 44px; padding: 10px 20px; margin: 0;
  font-family: var(--mt-font-body); font-size: 15px; font-weight: 600; color: var(--mt-text-body);
  background: var(--mt-surface-soft); border: 2px solid var(--mt-border); border-radius: var(--mt-radius-pill); cursor: pointer;
}
.mt-app .mt-pill:hover { border-color: var(--mt-input-border); }
.mt-app .mt-pill.is-active { background: var(--mt-navy); border-color: var(--mt-navy); color: #fff; }
.mt-app .mt-row { display: flex; flex-wrap: wrap; gap: 24px; }
.mt-app .mt-row > .mt-field { flex: 1 1 220px; }

/* ---------- messages ---------- */
.mt-app .mt-error {
  display: flex; align-items: flex-start; gap: 10px; margin: 16px 0 0; padding: 12px 16px;
  background: var(--mt-wrong-bg); border: 2px solid var(--mt-wrong-border); border-radius: var(--mt-radius-control);
  color: var(--mt-wrong-text); font-size: 15px;
}
.mt-app .mt-error svg { flex-shrink: 0; margin-top: 3px; }
.mt-app .mt-error .mt-btn { margin-left: auto; flex-shrink: 0; }
.mt-app .mt-ok {
  display: flex; align-items: flex-start; gap: 10px; margin: 16px 0 0; padding: 12px 16px;
  background: var(--mt-correct-bg); border: 2px solid var(--mt-correct-border); border-radius: var(--mt-radius-control);
  color: var(--mt-correct-text); font-size: 15px;
}
.mt-app .mt-ok svg { flex-shrink: 0; margin-top: 3px; }

.mt-app .mt-spinner {
  width: 44px; height: 44px; margin: 0 auto 20px; border-radius: 50%;
  border: 4px solid rgba(14,19,48,.12); border-top-color: var(--mt-blue); animation: mt-spin .9s linear infinite;
}
.mt-app .mt-stage .mt-spinner { border-color: rgba(255,255,255,.2); border-top-color: var(--mt-gold); }
@keyframes mt-spin { to { transform: rotate(360deg); } }

/* ---------- host bar ---------- */
.mt-app .mt-hostbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px;
  background: var(--mt-navy); color: #fff; border-radius: var(--mt-radius-card);
  padding: 14px 20px; margin: 0 0 20px;
}
.mt-app .mt-hostbar-label { font-size: 13px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--mt-text-on-dark); }
.mt-app .mt-hostbar-code { font-family: var(--mt-font-display); font-weight: 700; font-size: 30px; letter-spacing: .12em; color: var(--mt-gold); line-height: 1; margin-left: 10px; }
.mt-app .mt-hostbar-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--mt-text-on-dark); flex: 1 1 200px; }
.mt-app .mt-hostbar-links a { color: #fff; }
.mt-app .mt-hostbar-links a:hover { color: var(--mt-gold); }
.mt-app .mt-hostbar-topic { font-size: 14px; color: var(--mt-text-on-dark); }

/* ---------- roster ---------- */
.mt-app .mt-roster { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 20px; max-height: 340px; overflow-y: auto; }
.mt-app .mt-roster-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--mt-surface-soft); border: 1px solid var(--mt-border); border-radius: var(--mt-radius-control); padding: 10px 14px;
}
.mt-app .mt-roster-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mt-app .mt-roster-name { font-weight: 600; overflow-wrap: anywhere; }
.mt-app .mt-roster-note { font-size: 13px; color: var(--mt-text-muted); }
.mt-app .mt-empty { color: var(--mt-text-muted); text-align: center; padding: 22px 0; font-size: 15px; }
.mt-app .mt-tag {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 10px; border-radius: var(--mt-radius-pill); flex-shrink: 0;
}
.mt-app .mt-tag--team { background: var(--mt-tag-blue-bg); color: var(--mt-blue); }
.mt-app .mt-tag--individual { background: var(--mt-tag-gold-bg); color: var(--mt-tag-gold-text); }
.mt-app .mt-addrow { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 8px; }
.mt-app .mt-addrow .mt-field { flex: 1; margin-bottom: 0; }
.mt-app .mt-iconbtn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -6px -8px -6px 0;
  background: transparent; border: 0; border-radius: 50%; color: var(--mt-text-muted); cursor: pointer;
}
.mt-app .mt-iconbtn:hover { color: var(--mt-wrong-border); background: var(--mt-wrong-bg); }

/* ---------- dark stage (game, lobby, scoreboard) ---------- */
.mt-app .mt-stage {
  background: var(--mt-navy); color: #fff; border-radius: var(--mt-radius-panel);
  padding: 28px; margin: 0 0 20px;
}
.mt-app .mt-stage .mt-title { color: #fff; }
.mt-app .mt-stage .mt-eyebrow { color: var(--mt-gold); }
.mt-app .mt-stage .mt-sub { color: var(--mt-text-on-dark); }
.mt-app .mt-topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 20px; }
.mt-app .mt-topbar-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.mt-app .mt-chip {
  font-size: 13px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  background: var(--mt-gold); color: var(--mt-navy); padding: 5px 14px; border-radius: var(--mt-radius-pill);
}
.mt-app .mt-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.mt-app .mt-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.25); }
.mt-app .mt-dot.is-done { background: var(--mt-text-on-dark); }
.mt-app .mt-dot.is-current { background: var(--mt-gold); }
.mt-app .mt-count { font-family: var(--mt-font-display); font-weight: 700; font-size: 18px; color: var(--mt-text-on-dark); }
.mt-app .mt-lb { display: flex; flex-wrap: wrap; gap: 8px; }
.mt-app .mt-lb-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; font-size: 15px;
  background: rgba(255,255,255,.08); border-radius: var(--mt-radius-pill);
}
.mt-app .mt-lb-rank { font-family: var(--mt-font-display); font-weight: 700; color: var(--mt-gold); }
.mt-app .mt-lb-score { font-family: var(--mt-font-display); font-weight: 700; }

/* ---------- question card ---------- */
.mt-app .mt-qcard {
  background: var(--mt-surface); color: var(--mt-text); border-radius: 20px; padding: 28px;
  box-shadow: 0 30px 60px rgba(0,0,0,.35);
}
.mt-app .mt-qlabel { font-size: 13px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--mt-blue); margin-bottom: 8px; }
.mt-app .mt-qtext { font-family: var(--mt-font-display); font-weight: 700; font-size: 24px; line-height: 1.25; color: var(--mt-navy); margin: 0 0 22px; }
.mt-app .mt-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .mt-app .mt-choices { grid-template-columns: 1fr; } }
.mt-app .mt-choice {
  display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 14px 16px;
  background: var(--mt-surface-soft); border: 2px solid transparent; border-radius: var(--mt-radius-control);
  font-size: 17px; font-weight: 500; color: var(--mt-navy);
}
.mt-app .mt-choice-letter {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 1px solid var(--mt-input-border);
  font-family: var(--mt-font-display); font-weight: 700; font-size: 14px; color: var(--mt-navy);
}
.mt-app .mt-choice-text { flex: 1; overflow-wrap: anywhere; }
.mt-app .mt-choice.is-correct { background: var(--mt-correct-bg); border-color: var(--mt-correct-border); color: var(--mt-correct-text); }
.mt-app .mt-choice.is-correct .mt-choice-letter { border-color: var(--mt-correct-border); color: var(--mt-correct-text); }
.mt-app .mt-choice.is-dim { opacity: .55; }
.mt-app .mt-choice-flag { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; flex-shrink: 0; }

.mt-app .mt-reveal { margin-top: 18px; }
.mt-app .mt-fact { margin: 0 0 12px; padding-left: 14px; border-left: 3px solid var(--mt-gold); color: var(--mt-text-body); font-size: 16px; }
.mt-app .mt-source { display: flex; gap: 10px; align-items: baseline; margin: 0; font-size: 14px; color: var(--mt-text-muted); }
.mt-app .mt-source-label { font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }

/* ---------- scoring ---------- */
.mt-app .mt-score { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--mt-border); }
.mt-app .mt-score-title { font-size: 14px; font-weight: 600; color: var(--mt-text-body); margin: 0 0 12px; }
.mt-app .mt-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.mt-app .mt-chipbtn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 18px; margin: 0;
  font-family: var(--mt-font-body); font-size: 16px; font-weight: 600; color: var(--mt-navy);
  background: var(--mt-surface-soft); border: 2px solid var(--mt-border); border-radius: var(--mt-radius-pill); cursor: pointer;
}
.mt-app .mt-chipbtn-box {
  display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--mt-input-border); background: #fff; color: #fff;
}
.mt-app .mt-chipbtn.is-marked { background: var(--mt-correct-bg); border-color: var(--mt-correct-border); color: var(--mt-correct-text); }
.mt-app .mt-chipbtn.is-marked .mt-chipbtn-box { background: var(--mt-correct-border); border-color: var(--mt-correct-border); }
.mt-app .mt-chip-pts { font-size: 13px; font-weight: 600; color: var(--mt-text-muted); }
.mt-app .mt-chipbtn.is-marked .mt-chip-pts { color: var(--mt-correct-text); }
.mt-app .mt-controls { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* ---------- standings ---------- */
.mt-app .mt-rank-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--mt-border); }
.mt-app .mt-rank-row:last-child { border-bottom: 0; }
.mt-app .mt-rank-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.mt-app .mt-rank-num { font-family: var(--mt-font-display); font-weight: 700; font-size: 24px; color: var(--mt-tint); width: 34px; flex-shrink: 0; }
.mt-app .mt-rank-num.is-top { color: var(--mt-blue); }
.mt-app .mt-rank-name { font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.mt-app .mt-rank-score { font-family: var(--mt-font-display); font-weight: 700; font-size: 22px; }
.mt-app .mt-stage .mt-rank-row { border-bottom-color: rgba(255,255,255,.15); }
.mt-app .mt-stage .mt-rank-num { color: var(--mt-text-on-dark); }
.mt-app .mt-stage .mt-rank-num.is-top { color: var(--mt-gold); }
.mt-app .mt-stage .mt-rank-name, .mt-app .mt-stage .mt-rank-score { color: #fff; }

/* ---------- answer key ---------- */
.mt-app .mt-key-item { padding: 14px 0; border-bottom: 1px solid var(--mt-border); }
.mt-app .mt-key-item:last-child { border-bottom: 0; }
.mt-app .mt-key-q { font-weight: 600; margin: 0 0 4px; }
.mt-app .mt-key-a { color: var(--mt-correct-text); font-weight: 600; margin: 0 0 4px; }
.mt-app .mt-key-s { font-size: 14px; color: var(--mt-text-muted); margin: 0; }
.mt-app .mt-section-title { font-family: var(--mt-font-display); font-weight: 700; font-size: 22px; margin: 28px 0 8px; color: var(--mt-navy); }

/* ---------- overlay ---------- */
.mt-app .mt-overlay { position: fixed; inset: 0; background: rgba(14,19,48,.8); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 99999; }
.mt-app .mt-modal { position: relative; width: 100%; max-width: 480px; max-height: 80vh; overflow-y: auto; background: var(--mt-navy); color: #fff; border-radius: var(--mt-radius-panel); padding: 28px; }
.mt-app .mt-modal .mt-iconbtn { position: absolute; top: 12px; right: 12px; margin: 0; color: var(--mt-text-on-dark); }
.mt-app .mt-modal .mt-iconbtn:hover { color: #fff; background: rgba(255,255,255,.1); }

/* ---------- TV display ---------- */
.mt-app .mt-tv { padding: clamp(20px, 3vw, 40px); min-height: 60vh; }
.mt-app .mt-tv .mt-qtext { font-size: clamp(28px, 3.4vw, 46px); }
.mt-app .mt-tv .mt-choice { font-size: clamp(18px, 2vw, 26px); min-height: 64px; }
.mt-app .mt-tv .mt-fact { font-size: clamp(16px, 1.6vw, 22px); }
.mt-app .mt-tv .mt-source { font-size: clamp(14px, 1.3vw, 18px); }
.mt-app .mt-lobby { text-align: center; }
.mt-app .mt-lobby-code { font-family: var(--mt-font-display); font-weight: 700; font-size: clamp(64px, 12vw, 140px); letter-spacing: .12em; color: var(--mt-gold); line-height: 1; margin: 8px 0 12px; padding-left: .12em; }
.mt-app .mt-lobby-how { font-size: clamp(18px, 2vw, 26px); color: var(--mt-text-on-dark); margin: 0 0 28px; }
.mt-app .mt-lobby-how strong { color: #fff; }
.mt-app .mt-lobby-names { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }
.mt-app .mt-lobby-names .mt-lb-chip { font-size: clamp(16px, 1.6vw, 22px); padding: 8px 18px; }

/* ---------- category suggestion form ---------- */
.mt-app .mt-suggest { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: start; }
@media (max-width: 760px) { .mt-app .mt-suggest { grid-template-columns: 1fr; gap: 24px; } }
.mt-app .mt-ideas-label { font-size: 14px; font-weight: 600; color: var(--mt-text-body); margin: 20px 0 8px; }
.mt-app .mt-ideas { display: flex; flex-wrap: wrap; gap: 8px; }
.mt-app .mt-idea {
  min-height: 44px; padding: 8px 16px; margin: 0; font-family: var(--mt-font-body); font-size: 14px; font-weight: 600;
  color: var(--mt-navy); background: var(--mt-surface-soft); border: 1px solid var(--mt-border); border-radius: var(--mt-radius-pill); cursor: pointer;
}
.mt-app .mt-idea:hover { border-color: var(--mt-blue); color: var(--mt-blue); }

@media (max-width: 520px) {
  .mt-app { padding: 16px; }
  .mt-app .mt-card { padding: 24px 20px; }
  .mt-app .mt-stage { padding: 20px 16px; }
  .mt-app .mt-qcard { padding: 20px 16px; }
}

/* ================= motion ================= */

@keyframes mt-rise  { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes mt-fade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes mt-pop   { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes mt-ring  { 0% { opacity: .8; transform: scale(1); } 100% { opacity: 0; transform: scale(1.14); } }
@keyframes mt-dim   { from { opacity: 1; } to { opacity: .55; } }
@keyframes mt-dot   { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.5); } }
@keyframes mt-chip-in { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes mt-draw  { to { stroke-dashoffset: 0; } }
@keyframes mt-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
@keyframes mt-bounce { 0%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-14px); } }
@keyframes mt-fall  {
  0%   { transform: translate3d(0, -30px, 0) rotate(0deg); opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translate3d(var(--dx), 105vh, 0) rotate(var(--rot)); opacity: 0; }
}

/* screens fade in */
.mt-app .mt-card, .mt-app .mt-stage { animation: mt-fade .35s ease both; }

/* a new question card rises into place; answers follow one by one */
.mt-app .mt-enter { animation: mt-rise .5s cubic-bezier(.2, .8, .2, 1) both; }
.mt-app .mt-in {
  animation: mt-rise .45s cubic-bezier(.2, .8, .2, 1) both;
  animation-delay: calc(var(--i, 0) * 90ms + 150ms);
}

/* the reveal: right answer pops with a ring, the rest settle back */
.mt-app .mt-choice { position: relative; }
.mt-app .mt-choice.is-correct.mt-anim { animation: mt-pop .6s ease; }
.mt-app .mt-choice.is-correct.mt-anim::after {
  content: ""; position: absolute; inset: -3px; pointer-events: none;
  border: 3px solid var(--mt-correct-border); border-radius: calc(var(--mt-radius-control) + 3px);
  animation: mt-ring .9s ease-out forwards;
}
.mt-app .mt-choice.is-dim.mt-anim { animation: mt-dim .5s ease both; }

/* progress and scoreboard */
.mt-app .mt-dot.is-current { animation: mt-dot 1.6s ease-in-out infinite; }
.mt-app .mt-lb-score { display: inline-block; }
.mt-app .mt-lb-score.is-bump { animation: mt-pop .7s ease; }
.mt-app .mt-winner-tag {
  background: var(--mt-gold); color: var(--mt-navy); font-size: 12px; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase; padding: 3px 12px; border-radius: var(--mt-radius-pill);
  animation: mt-pop .6s 1.2s ease both;
}

/* TV lobby */
.mt-app .mt-lobby-code { animation: mt-breathe 3.5s ease-in-out infinite; }
.mt-app .mt-lobby-names .mt-lb-chip.is-new { animation: mt-chip-in .45s cubic-bezier(.3, 1.5, .5, 1) both; }

/* buttons and chips respond to touch */
.mt-app .mt-btn, .mt-app .mt-pill, .mt-app .mt-chipbtn, .mt-app .mt-idea { transition: opacity .15s ease, background .15s ease, border-color .15s ease, transform .12s ease; }
.mt-app .mt-btn:hover:not(:disabled) { transform: translateY(-1px); }
.mt-app .mt-btn:active:not(:disabled), .mt-app .mt-pill:active, .mt-app .mt-chipbtn:active, .mt-app .mt-idea:active { transform: scale(.97); }
.mt-app .mt-chipbtn-box svg { animation: mt-pop .35s ease-out; }

/* sign-up success: circle pops, check draws itself */
.mt-app .mt-success { display: block; width: 72px; height: 72px; margin: 0 0 16px; color: var(--mt-correct-border); }
.mt-app .mt-success circle { fill: var(--mt-correct-bg); stroke: var(--mt-correct-border); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: mt-pop .5s ease both; }
.mt-app .mt-success path { fill: none; stroke: currentColor; stroke-width: 5; stroke-dasharray: 40; stroke-dashoffset: 40; animation: mt-draw .5s .25s ease-out forwards; }

/* "writing questions" loading dots */
.mt-app .mt-bounce { display: flex; justify-content: center; gap: 10px; margin: 0 0 22px; }
.mt-app .mt-bounce span { width: 14px; height: 14px; border-radius: 50%; background: var(--mt-gold); animation: mt-bounce 1s ease-in-out infinite; }
.mt-app .mt-bounce span:nth-child(2) { animation-delay: .15s; }
.mt-app .mt-bounce span:nth-child(3) { animation-delay: .3s; }

/* confetti (brand accent colors) */
.mt-app .mt-confetti { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 99998; }
.mt-app .mt-confetti-piece { position: absolute; top: 0; border-radius: 2px; animation: mt-fall 3s ease-in forwards; will-change: transform; }

/* anyone who asks their device for less motion gets none */
@media (prefers-reduced-motion: reduce) {
  .mt-app *, .mt-app *::before, .mt-app *::after {
    animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .mt-app .mt-confetti { display: none; }
}

/* ================= QR code ================= */
.mt-app .mt-qr { background: #FFFFFF; border-radius: 20px; padding: 12px; width: clamp(220px, 26vw, 360px); flex-shrink: 0; }
.mt-app .mt-qr-svg { display: block; width: 100%; height: auto; }
.mt-app .mt-qr-caption { text-align: center; font-family: var(--mt-font-display); font-weight: 700; font-size: clamp(16px, 1.6vw, 22px); color: var(--mt-navy); padding: 6px 0 2px; }
.mt-app .mt-qr--small { width: 150px; padding: 8px; border: 1px solid var(--mt-border); border-radius: var(--mt-radius-card); }
.mt-app .mt-qr-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; background: var(--mt-surface-soft); border: 1px solid var(--mt-border); border-radius: var(--mt-radius-card); padding: 16px; margin: 0 0 22px; }
.mt-app .mt-qr-side { flex: 1 1 220px; }
.mt-app .mt-qr-side .mt-eyebrow { margin-bottom: 4px; }
.mt-app .mt-qr-side .mt-muted { margin: 0 0 12px; }
.mt-app .mt-modal--qr { max-width: 460px; text-align: center; }
.mt-app .mt-modal--qr .mt-qr { width: 100%; margin: 12px auto 16px; }
.mt-app .mt-lobby-code--sm { font-size: 56px; animation: none; margin: 0; }

/* TV lobby: QR on the left, code and instructions on the right */
.mt-app .mt-lobby-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(24px, 4vw, 64px); margin: 12px 0 28px; }
.mt-app .mt-lobby-info { text-align: center; }
.mt-app .mt-lobby-info .mt-lobby-how { margin-bottom: 0; }

/* the TV QR is the big one: people scan it from across the room */
.mt-app .mt-lobby-grid .mt-qr { width: clamp(240px, 30vw, 520px); }

/* host: pick a submitted category */
.mt-app .mt-sugg { margin-bottom: 18px; }
.mt-app .mt-sugg .mt-ideas { margin-bottom: 0; }
.mt-app .mt-sugg-detail { margin: 10px 0 0; }
.mt-app .mt-idea.is-active { background: var(--mt-navy); border-color: var(--mt-navy); color: #fff; }
.mt-app .mt-idea-count { margin-left: 8px; font-size: 12px; font-weight: 600; opacity: .7; }
