/* Host leaderboard — podium spotlight + cream sheet (projector) */
.host-leaderboard {
  --lb-orange-top: #feca57;
  --lb-orange-bottom: #ff9f43;
  --lb-amber: #c866da;
  --lb-ink: #5b1848;
  --lb-cream: #fff5fb;
  --lb-sheet: #fffafd;
  --lb-plinth: #f7c4e6;
  --lb-plinth-deep: #d96bb8;
  --lb-magenta: #b11980;
  --lb-pink: #fc7dba;
  --lb-glow: #ffb1ed;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  color: #fff;
  background: #7a2f7a;
  font-family: "Nunito", sans-serif;
}

.lango-host #screen-host-quiz-finished.host-leaderboard.active {
  position: relative;
  inset: auto;
  z-index: 20;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  padding: 0;
}

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

.host-leaderboard__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.host-leaderboard__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 160, 220, 0.34), transparent 42%),
    radial-gradient(circle at 50% 18%, transparent 28%, rgba(255, 140, 210, 0.12) 29%, transparent 31%),
    radial-gradient(circle at 50% 18%, transparent 38%, rgba(255, 140, 210, 0.1) 39%, transparent 41%),
    radial-gradient(circle at 50% 18%, transparent 48%, rgba(255, 140, 210, 0.08) 49%, transparent 51%),
    linear-gradient(180deg, rgba(90, 20, 70, 0.2), rgba(55, 12, 55, 0.45));
  pointer-events: none;
}

.host-leaderboard__container {
  position: relative;
  z-index: 1;
  width: min(100%, 1280px);
  height: 100%;
  margin: 0 auto;
  padding: var(--host-chrome-top, 96px) 24px 120px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.host-leaderboard__header {
  position: absolute;
  top: 22px;
  left: 36px;
  right: 22px;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto var(--host-utility-slot, 480px);
  align-items: center;
  gap: 16px;
  min-height: 64px;
  pointer-events: none;
}

.host-leaderboard__title {
  margin: 0;
  max-width: 14ch;
  justify-self: start;
  pointer-events: auto;
  font-size: clamp(32px, 3.6vw, 48px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.host-leaderboard__pulse {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  grid-column: 2;
  pointer-events: auto;
}

.host-leaderboard__pulse-chip {
  min-height: 44px;
  padding: 6px 12px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 245, 252, 0.95);
  color: var(--lb-ink);
  box-shadow: 0 4px 0 rgba(140, 40, 110, 0.14);
  font-variant-numeric: tabular-nums;
}

.host-leaderboard__pulse-chip strong {
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.host-leaderboard__pulse-chip span {
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  opacity: 0.72;
}

.host-leaderboard__stage {
  position: relative;
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.host-leaderboard__tommy {
  position: absolute;
  left: 10px;
  bottom: 42%;
  z-index: 4;
  width: min(132px, 13vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  pointer-events: none;
}

.host-leaderboard__tommy-img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 16px rgba(70, 15, 55, 0.3));
}

.host-leaderboard__tommy-caption {
  position: relative;
  z-index: 2;
  margin: 0 0 -2px;
  max-width: 12em;
  padding: 8px 12px;
  border: 3px solid #fff;
  border-radius: 18px;
  background: var(--lb-cream);
  color: var(--lb-ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-wrap: balance;
  filter: drop-shadow(0 4px 0 rgba(140, 40, 110, 0.16));
}

.host-leaderboard__tommy-caption::before,
.host-leaderboard__tommy-caption::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
}

.host-leaderboard__tommy-caption::before {
  bottom: -11px;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 11px solid #fff;
}

.host-leaderboard__tommy-caption::after {
  bottom: -7px;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 8px solid var(--lb-cream);
}

.host-leaderboard__main,
.host-leaderboard__board,
.host-leaderboard__board > div,
.host-leaderboard__arena {
  height: 100%;
  min-height: 0;
}

.host-leaderboard__arena {
  display: grid;
  grid-template-rows: minmax(280px, 1.2fr) minmax(160px, 0.8fr);
  gap: 0;
}

.host-leaderboard__spotlight {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 8px 6% 0 15%;
  min-height: 0;
}

.host-leaderboard__podium {
  margin: 0;
  padding: 0;
  width: min(760px, 100%);
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  grid-template-areas: "second first third";
  align-items: end;
  gap: 14px;
}

.host-leaderboard__podium-row {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  min-height: 0;
}

.host-leaderboard__podium-row--1 {
  grid-area: first;
}
.host-leaderboard__podium-row--2 {
  grid-area: second;
}
.host-leaderboard__podium-row--3 {
  grid-area: third;
}

.host-leaderboard__podium-person {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  text-align: center;
}

.host-leaderboard__crown {
  width: 36px;
  height: 28px;
  margin-bottom: -4px;
  background:
    linear-gradient(180deg, #ffe27a, #f0b420);
  clip-path: polygon(8% 100%, 0 35%, 22% 55%, 35% 10%, 50% 45%, 65% 10%, 78% 55%, 100% 35%, 92% 100%);
  filter: drop-shadow(0 3px 2px rgba(90, 20, 70, 0.28));
}

.host-leaderboard__avatar,
.host-leaderboard__ranking-avatar {
  border: 4px solid #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #f0a3d0, #b11980);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 4px 0 rgba(140, 35, 110, 0.26);
}

.host-leaderboard__avatar {
  width: clamp(58px, 6.5vw, 84px);
  aspect-ratio: 1;
  font-size: clamp(22px, 2.4vw, 32px);
}

.host-leaderboard__podium-row--1 .host-leaderboard__avatar {
  width: clamp(72px, 7.5vw, 96px);
  font-size: clamp(26px, 2.8vw, 36px);
  box-shadow:
    0 0 0 3px rgba(252, 125, 186, 0.65),
    0 5px 0 rgba(140, 35, 110, 0.26);
}

.host-leaderboard__name {
  max-width: 11ch;
  overflow: hidden;
  color: #fff;
  font-size: clamp(14px, 1.4vw, 17px);
  font-weight: 900;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 2px 0 rgba(80, 15, 60, 0.35);
}

.host-leaderboard__score-pill {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 245, 252, 0.94);
  box-shadow: 0 2px 0 rgba(120, 30, 90, 0.14);
}

.host-leaderboard__score-pill .host-leaderboard__score {
  color: var(--lb-ink);
  font-size: clamp(13px, 1.3vw, 15px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-shadow: none;
}

.host-leaderboard__plinth {
  width: 100%;
  border-radius: 14px 14px 8px 8px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, #ffe6f5 0%, var(--lb-plinth) 38%, var(--lb-plinth-deep) 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    0 8px 0 rgba(140, 40, 110, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.45);
}

.host-leaderboard__podium-row--1 .host-leaderboard__plinth {
  min-height: clamp(140px, 20vh, 190px);
  background:
    linear-gradient(180deg, #ffe27a 0%, #ffc44d 40%, #f09a28 100%);
}

.host-leaderboard__podium-row--2 .host-leaderboard__plinth {
  min-height: clamp(108px, 15vh, 148px);
  background:
    linear-gradient(180deg, #f7f4ee 0%, #e4d7c4 45%, #cbb89a 100%);
}

.host-leaderboard__podium-row--3 .host-leaderboard__plinth {
  min-height: clamp(84px, 12vh, 118px);
  background:
    linear-gradient(180deg, #f6d0a0 0%, #e0a56a 45%, #c47d38 100%);
}

.host-leaderboard__plinth-num {
  font-size: clamp(52px, 7vw, 84px);
  font-weight: 900;
  line-height: 1;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 3px 0 rgba(90, 20, 70, 0.22);
}

.host-leaderboard__podium-row--2 .host-leaderboard__plinth-num {
  color: rgba(255, 255, 255, 0.88);
}

.host-leaderboard__sheet {
  position: relative;
  z-index: 2;
  min-height: 0;
  margin-top: -6px;
  padding: 22px 18px 10px;
  border: 4px solid rgba(162, 89, 255, 0.45);
  border-radius: 28px 28px 18px 18px;
  background: var(--lb-sheet);
  box-shadow:
    0 -8px 28px rgba(120, 30, 90, 0.16),
    2px 4px 30px rgba(255, 177, 237, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.host-leaderboard__sheet-handle {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 48px;
  height: 5px;
  border-radius: 999px;
  background: rgba(177, 25, 128, 0.22);
  transform: translateX(-50%);
}

.host-leaderboard__rankings {
  margin: 0;
  padding: 8px 4px 0;
  list-style: none;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: thin;
  scrollbar-color: #c866da transparent;
}

.host-leaderboard__ranking-row {
  min-height: 58px;
  margin: 0;
  padding: 8px 12px;
  display: grid;
  grid-template-columns: 36px 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  color: var(--lb-ink);
  border-radius: 16px;
}

.host-leaderboard__ranking-row:nth-child(odd) {
  background: rgba(255, 200, 230, 0.35);
}

.host-leaderboard__ranking-rank {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(177, 25, 128, 0.14);
  color: rgba(120, 30, 90, 0.75);
  font-size: 14px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.host-leaderboard__ranking-avatar {
  width: 40px;
  aspect-ratio: 1;
  border-width: 3px;
  font-size: 16px;
}

.host-leaderboard__ranking-name {
  overflow: hidden;
  color: #5b1848;
  font-size: 17px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.host-leaderboard__ranking-row > .host-leaderboard__score,
.host-leaderboard__ranking-row > strong {
  color: #b11980;
  font-size: 16px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.host-leaderboard__footer {
  position: absolute;
  left: 36px;
  right: 36px;
  bottom: 28px;
  z-index: 8;
  min-height: 84px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  pointer-events: none;
}

.host-leaderboard__nav {
  pointer-events: auto;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 84px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow:
    0 0 0 1px rgba(116, 60, 155, 0.08) inset,
    0 16px 32px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.host-leaderboard__tabs {
  pointer-events: auto;
  justify-self: center;
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow:
    0 0 0 1px rgba(116, 60, 155, 0.08) inset,
    0 10px 22px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.host-leaderboard__tab {
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 245, 252, 0.92);
  color: var(--lb-ink);
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(120, 30, 90, 0.14);
}

.host-leaderboard__tab.is-active {
  color: #fff;
  background: linear-gradient(180deg, #8b5cf6 0%, #6d28d9 100%);
  box-shadow: 0 4px 0 rgba(88, 28, 135, 0.28);
}

.host-leaderboard__tab:focus-visible,
.host-leaderboard__back:focus-visible,
.host-leaderboard__next:focus-visible {
  outline: 4px solid #f5b430;
  outline-offset: 3px;
}

.host-leaderboard__next:not([hidden]) {
  animation: hostLeaderboardNextPulse 1.6s ease-in-out infinite;
}

.host-leaderboard__empty {
  height: 100%;
  margin: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 26px;
  font-weight: 900;
}

.host-leaderboard__empty--small {
  min-height: 64px;
  color: rgba(120, 30, 90, 0.65);
  font-size: 16px;
}

@keyframes hostLeaderboardNextPulse {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

@media (max-width: 980px) {
  .host-leaderboard__tommy {
    left: 4px;
    bottom: 42%;
    width: 96px;
  }
  .host-leaderboard__tommy-caption {
    font-size: 11px;
  }
  .host-leaderboard__spotlight {
    padding-left: 12%;
    padding-right: 4%;
  }
}

@media (max-width: 700px) {
  .host-leaderboard {
    overflow: auto;
  }
  .host-leaderboard__container {
    height: auto;
    min-height: 100%;
    padding: 12px;
  }
  .host-leaderboard__header {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    grid-template-columns: 1fr;
    justify-items: start;
    min-height: 0;
    pointer-events: auto;
  }
  .host-leaderboard__tommy {
    display: none;
  }
  .host-leaderboard__arena {
    grid-template-rows: auto minmax(200px, 1fr);
  }
  .host-leaderboard__spotlight {
    padding: 8px 0 0;
  }
  .host-leaderboard__footer {
    left: 16px;
    right: 16px;
    bottom: 16px;
    grid-template-columns: 1fr;
    justify-items: stretch;
  }
  .host-leaderboard__nav,
  .host-leaderboard__tabs {
    justify-self: stretch;
  }
  .host-leaderboard__next:not([hidden]) {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .host-leaderboard__next:not([hidden]) {
    animation: none;
  }
  .host-leaderboard__tab,
  .host-leaderboard__back,
  .host-leaderboard__next {
    transition: none;
  }
}

#app.lango-host {
  --host-chrome-top: 96px;
  --host-chrome-gutter: 280px;
  --host-chrome-chip-gutter: 168px;
  --host-utility-slot: 480px;
  --host-title-stroke: rgba(177, 25, 128, 0.88);
  --host-title-shadow:
    0 4px 0 rgba(116, 60, 155, 0.4),
    0 10px 22px rgba(15, 23, 42, 0.28);
}

#app.lango-host .host-utility-controls {
  overflow: visible;
  transition: opacity 180ms ease, visibility 180ms ease;
}

#app.lango-host:has(#screen-settings.active) #btn-host-settings {
  display: none;
}

#app.lango-host.is-host-chrome-compact .host-utility-dock {
  gap: 8px;
  min-height: 56px;
  padding: 6px;
}

#app.lango-host.is-host-chrome-compact .host-utility-meta,
#app.lango-host.is-host-chrome-compact .host-utility-actions {
  gap: 8px;
  min-height: 44px;
}

#app.lango-host.is-host-chrome-compact .course-class-label,
#app.lango-host.is-host-chrome-compact .host-persistent-room-code,
#app.lango-host.is-host-chrome-compact .host-online-count {
  min-height: 44px;
  padding: 6px 12px;
  gap: 8px;
}

#app.lango-host.is-host-chrome-compact .host-persistent-room-code__action {
  font-size: 8px;
  letter-spacing: 0.04em;
}

#app.lango-host .host-persistent-room-code__display {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 12px 7px;
}

#app.lango-host .host-persistent-room-code__display .host-persistent-room-code__digits {
  display: block;
  min-width: 72px;
  font-family: "Nunito", sans-serif;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-align: center;
}

#app.lango-host.is-host-chrome-compact .host-persistent-room-code__display .host-persistent-room-code__digits {
  min-width: 0;
  font-size: 18px;
}

#app.lango-host .host-persistent-room-code__display .host-persistent-room-code__action {
  display: block;
  min-width: 0;
  color: #c2410c;
  font-family: "DM Sans", sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
}

#app.lango-host #screen-waiting .waiting-room-code-hint {
  color: #c2410c;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#app.lango-host.is-host-chrome-compact .course-class-label__name {
  max-width: 120px;
  font-size: 18px;
}

#app.lango-host.is-host-chrome-compact .host-online-count__value {
  font-size: 18px;
}

#app.lango-host.is-host-chrome-compact .host-utility-btn {
  position: relative;
  width: 48px;
  height: 48px;
  padding: 0;
  justify-content: center;
}

#app.lango-host.is-host-chrome-compact .host-utility-btn-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

#app.lango-host.is-host-chrome-compact .host-leaderboard__header,
#app.lango-host.is-host-chrome-compact .host-fast-result-header {
  min-height: 56px;
}
#app.lango-host.is-host-chrome-compact .host-mcq-header,
#app.lango-host.is-host-chrome-compact .host-mcq-preview-header,
#app.lango-host.is-host-chrome-compact .host-mcq-result-header,
#app.lango-host.is-host-chrome-compact .host-video-header,
#app.lango-host.is-host-chrome-compact .host-buzzin-header,
#app.lango-host.is-host-chrome-compact .host-buzzin-feedback-header {
  padding-left: var(--host-chrome-gutter);
  padding-right: var(--host-chrome-gutter);
  box-sizing: border-box;
}

#app.lango-host .host-mcq-result-container {
  padding-bottom: 80px;
}

#app.lango-host .host-mcq-countdown {
  top: 78px;
  right: calc(var(--host-chrome-gutter) + 24px);
}

#app.lango-host .section-exercise-overlay {
  z-index: 40;
  padding: var(--host-chrome-top) 36px 24px 0;
  align-items: stretch;
  justify-content: flex-end;
}

#app.lango-host .section-exercise-panel {
  height: auto;
  max-height: 100%;
  align-self: stretch;
}

#app.lango-host .section-exercise-panel-card,
#app.lango-host .section-exercise-panel .exercise-panel {
  height: 100%;
  max-height: 100%;
}

#app.lango-host .section-exercise-panel .exercise-panel-inner {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

#app.lango-host .section-exercise-panel .exercise-list-scroll {
  height: auto;
  flex: 1 1 auto;
  min-height: 0;
}

@media (prefers-reduced-motion: reduce) {
  #app.lango-host .host-utility-controls {
    transition: none;
  }
}

/* Shared projector chrome: display titles, optical buttons, result docks. */
#app.lango-host .host-mcq-title,
#app.lango-host .host-mcq-preview-title,
#app.lango-host .host-mcq-result-title,
#app.lango-host .host-video-title,
#app.lango-host .host-buzzin-title,
#app.lango-host .host-buzzin-feedback-title,
#app.lango-host .host-fast-result-title,
#app.lango-host .host-leaderboard__title,
#app.lango-host .class-page-title {
  color: #fff;
  -webkit-text-fill-color: #fff;
  -webkit-text-stroke: 0.075em var(--host-title-stroke);
  paint-order: stroke fill;
  text-shadow: var(--host-title-shadow);
}

#app.lango-host .host-video-title {
  width: auto;
  max-width: 100%;
}

#app.lango-host #screen-host-quiz-results .host-mcq-result-title {
  font-size: clamp(54px, 5.4vw, 68px);
  letter-spacing: 0.045em;
  line-height: 1.05;
  color: #fff;
  -webkit-text-fill-color: #fff;
  -webkit-text-stroke: 0.075em #ff6ec7;
  paint-order: stroke fill;
  text-shadow:
    0 4px 0 #743c9b,
    0 7px 0 rgba(177, 25, 128, 0.55),
    0 0 22px rgba(255, 190, 235, 0.65),
    0 0 10px rgba(254, 202, 87, 0.4);
}

#app.lango-host #screen-host-quiz-results .host-mcq-correct-board-header h3 {
  color: #c9469a;
  -webkit-text-fill-color: #c9469a;
  -webkit-text-stroke: 0.03em #fff;
  paint-order: stroke fill;
  text-shadow: 1px 2px 0 #743c9b;
}

#app.lango-host .host-mcq-footer:not(.host-mcq-result-footer),
#app.lango-host .host-mcq-result-footer,
#app.lango-host .host-mcq-preview-footer,
#app.lango-host .host-video-footer,
#app.lango-host .host-buzzin-footer,
#app.lango-host .host-fast-result-footer {
  transform: none;
  transform-origin: initial;
}

#app.lango-host #screen-host-quiz-results .host-mcq-result-footer {
  position: absolute;
  left: 36px;
  right: auto;
  top: auto;
  bottom: 28px;
  z-index: 8;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#app.lango-host .host-fast-result-footer {
  position: absolute;
  left: 36px;
  right: auto;
  top: auto;
  bottom: 28px;
  z-index: 8;
  width: auto;
  min-height: 84px;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow:
    0 0 0 1px rgba(116, 60, 155, 0.08) inset,
    0 16px 32px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

#app.lango-host .host-mcq-result-footer .host-mcq-footer-btn,
#app.lango-host .host-mcq-result-footer .host-mcq-next-btn,
#app.lango-host .host-fast-result-button,
#app.lango-host .host-leaderboard__back,
#app.lango-host .host-leaderboard__next {
  min-height: 64px;
  min-width: 168px;
  padding: 4px 16px 2px;
  border: 0;
  border-radius: 999px;
  font-family: "Nunito", sans-serif;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.02em;
  text-shadow: none;
  white-space: nowrap;
  cursor: pointer;
}

#app.lango-host #screen-host-quiz-results .host-mcq-result-footer .host-mcq-footer-btn:not(.host-mcq-next-btn) {
  color: #fff;
  background: linear-gradient(180deg, #d8b4fe 0%, #a855f7 38%, #9333ea 72%, #7e22ce 100%);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.38),
    inset 0 -5px 0 rgba(76, 29, 149, 0.42),
    0 10px 0 #5b21b6,
    0 16px 26px rgba(88, 28, 135, 0.38);
  text-shadow: 0 2px 0 rgba(76, 29, 149, 0.45);
}

#app.lango-host #screen-host-quiz-results .host-mcq-result-footer .host-mcq-next-btn {
  color: #fff;
  background: linear-gradient(180deg, #ffe082 0%, #ffc947 40%, #ff9f43 78%, #f97316 100%);
  box-shadow:
    inset 0 4px 0 rgba(255, 255, 255, 0.42),
    inset 0 -6px 0 rgba(234, 88, 12, 0.38),
    0 11px 0 #c2410c,
    0 18px 30px rgba(249, 115, 22, 0.42);
  text-shadow: 0 2px 0 rgba(194, 65, 12, 0.4);
}

#app.lango-host .host-fast-result-button--back,
#app.lango-host .host-leaderboard__back {
  color: #4c1d95;
  background: linear-gradient(180deg, #f5e9ff 0%, #e9d5ff 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.7),
    0 6px 0 rgba(124, 58, 237, 0.22),
    0 10px 16px rgba(88, 28, 135, 0.16);
}

#app.lango-host .host-fast-result-button--next,
#app.lango-host .host-leaderboard__next {
  color: #fff;
  background: linear-gradient(180deg, #feca57 0%, #ff9f43 100%);
  box-shadow:
    inset 0 -3px 3px rgba(0, 0, 0, 0.1),
    inset 0 0 0 4px rgba(255, 255, 255, 0.5),
    0 8px 0 rgba(217, 119, 6, 0.85),
    0 12px 20px rgba(255, 140, 42, 0.28);
}

#app.lango-host button.waiting-dashboard-btn,
#app.lango-host button.waiting-start-session-btn,
#app.lango-host button.class-back-btn,
#app.lango-host button.host-mcq-preview-footer-btn,
#app.lango-host button.host-mcq-footer-btn,
#app.lango-host button.host-video-footer-btn,
#app.lango-host button.host-buzzin-footer-btn,
#app.lango-host button.host-fast-result-button,
#app.lango-host button.host-leaderboard__back,
#app.lango-host button.host-leaderboard__next,
#app.lango-host button#btn-host-quiz-done {
  display: grid;
  grid-template-columns: minmax(36px, 1fr) auto minmax(36px, 1fr);
  align-items: center;
  justify-content: stretch;
  justify-items: stretch;
  gap: 0 8px;
  height: auto;
  min-height: 64px;
  padding: 4px 16px 2px;
  line-height: 1;
  box-sizing: border-box;
}

#app.lango-host button.waiting-dashboard-btn > .host-btn-face,
#app.lango-host button.waiting-dashboard-btn > .waiting-dashboard-face,
#app.lango-host button.class-back-btn > .host-btn-face,
#app.lango-host button.host-mcq-preview-footer-btn > .host-btn-face,
#app.lango-host button.host-mcq-footer-btn > .host-btn-face,
#app.lango-host button.host-video-footer-btn > .host-btn-face,
#app.lango-host button.host-buzzin-footer-btn > .host-btn-face,
#app.lango-host button.host-fast-result-button > .host-btn-face,
#app.lango-host button.host-leaderboard__back > .host-btn-face,
#app.lango-host button#btn-host-quiz-done > .host-btn-face {
  grid-column: 1;
  justify-self: start;
  align-self: center;
}

#app.lango-host button.waiting-dashboard-btn > .host-btn-label,
#app.lango-host button.waiting-start-session-btn > span,
#app.lango-host button.class-back-btn > span:not(.host-btn-face),
#app.lango-host button.host-mcq-preview-footer-btn > .host-btn-label,
#app.lango-host button.host-mcq-footer-btn > .host-btn-label,
#app.lango-host button.host-video-footer-btn > .host-btn-label,
#app.lango-host button.host-buzzin-footer-btn > .host-btn-label,
#app.lango-host button.host-buzzin-footer-btn > span:not(.host-btn-face),
#app.lango-host button.host-fast-result-button > .host-btn-label,
#app.lango-host button.host-leaderboard__back > .host-btn-label,
#app.lango-host button#btn-host-quiz-done > .host-btn-label,
#app.lango-host button.host-leaderboard__next > .host-btn-label {
  grid-column: 2;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

#app.lango-host button.host-mcq-preview-footer-btn > img,
#app.lango-host button.host-mcq-footer-btn > img,
#app.lango-host button.host-video-footer-btn > img,
#app.lango-host button.host-buzzin-footer-btn > img,
#app.lango-host button.host-fast-result-button > img,
#app.lango-host button.host-leaderboard__next > img {
  grid-column: 3;
  justify-self: end;
  align-self: center;
}

#app.lango-host button.exercise-cancel-btn,
#app.lango-host button.exercise-start-btn,
#app.lango-host .host-leaderboard__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: auto;
  padding: 3px 18px 1px;
  line-height: 1;
}

#app.lango-host .host-mcq-preview-next-btn:disabled,
#app.lango-host .host-mcq-next-btn:disabled,
#app.lango-host .waiting-start-session-btn:disabled,
#app.lango-host .exercise-start-btn:disabled {
  cursor: default;
  opacity: 1;
  filter: none;
  transform: none;
  color: #fff;
  background: linear-gradient(180deg, #f6d48a 0%, #f0b57a 100%);
  box-shadow:
    inset 0 -2px 2px rgba(0, 0, 0, 0.08),
    inset 0 0 0 4px rgba(255, 255, 255, 0.35),
    0 6px 0 rgba(217, 119, 6, 0.38),
    0 10px 16px rgba(255, 140, 42, 0.16);
}

#app.lango-host .host-leaderboard__next[hidden] {
  display: none;
}

#app.lango-host .host-fast-result-button--next[hidden] {
  display: none;
}

#app.lango-host .host-leaderboard__next:not([hidden]) {
  animation: hostLeaderboardNextPulse 1.6s ease-in-out infinite;
}

#app.lango-host #screen-host-quiz-results .host-mcq-result-footer .host-btn-face {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  background: linear-gradient(180deg, #f3e8ff 0%, #c084fc 55%, #9333ea 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    inset 0 -3px 0 rgba(91, 33, 182, 0.35),
    0 4px 0 rgba(91, 33, 182, 0.55);
}

#app.lango-host .host-fast-result-button .host-btn-face,
#app.lango-host .host-leaderboard__back .host-btn-face {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}

#app.lango-host .host-mcq-result-footer .host-btn-icon,
#app.lango-host .host-fast-result-button img,
#app.lango-host .host-leaderboard__back .host-btn-icon,
#app.lango-host .host-leaderboard__next .host-btn-icon {
  width: 22px;
  height: 22px;
}

/* Room QR modal — opened from header / waiting room code. */
#app.lango-host .host-room-qr-modal {
  position: fixed;
  inset: 0;
  z-index: 145;
  display: grid;
  place-items: center;
  padding: 24px;
}

#app.lango-host .host-room-qr-modal[hidden] {
  display: none !important;
}

#app.lango-host .host-room-qr-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 159, 67, 0.24), transparent 44%),
    rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#app.lango-host .host-room-qr-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(360px, calc(100vw - 32px));
  padding: 28px 24px 22px;
  border-radius: 28px;
  border: 1px solid rgba(255, 159, 67, 0.34);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 247, 237, 0.96) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.72) inset,
    0 24px 48px rgba(15, 23, 42, 0.22);
  text-align: center;
}

#app.lango-host .host-room-qr-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #9a3412;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

#app.lango-host .host-room-qr-modal__eyebrow {
  margin: 0;
  color: #c2410c;
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#app.lango-host .host-room-qr-modal__code {
  margin: 8px 0 18px;
  color: #b11980;
  font-family: "Nunito", sans-serif;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1;
}

#app.lango-host .host-room-qr-modal__qr {
  display: block;
  width: 200px;
  height: 200px;
  margin: 0 auto 12px;
  border-radius: 16px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

#app.lango-host .host-room-qr-modal__desc {
  margin: 0 0 16px;
  color: #7c2d12;
  font-family: "Nunito", sans-serif;
  font-size: 15px;
  font-weight: 800;
}

#app.lango-host .host-room-qr-modal__copy {
  min-width: 140px;
}

/* Lucky draw — ceremonial overlay in host chrome, not a split modal. */
#app.lango-host .host-buzzin-lucky-draw {
  z-index: 140;
}

#app.lango-host .host-buzzin-lucky-draw__backdrop {
  background:
    radial-gradient(circle at 50% 42%, rgba(177, 25, 128, 0.28), transparent 42%),
    rgba(42, 12, 55, 0.58);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#app.lango-host .host-buzzin-lucky-draw__dialog {
  width: min(680px, calc(100% - 72px));
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: none;
  box-shadow: none;
  transform: scale(0.94) translateY(16px);
  opacity: 0;
  animation: hostBuzzinLuckyDrawIn 420ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#app.lango-host .host-buzzin-lucky-draw__header {
  display: none;
}

#app.lango-host .host-buzzin-lucky-draw__title {
  margin: 0 0 22px;
  color: #fff;
  background: none;
  -webkit-text-fill-color: #fff;
  -webkit-text-stroke: 0.075em rgba(177, 25, 128, 0.88);
  paint-order: stroke fill;
  font-family: "Nunito", sans-serif;
  font-size: 56px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  text-align: center;
  text-wrap: balance;
  text-shadow:
    0 4px 0 rgba(116, 60, 155, 0.4),
    0 10px 22px rgba(15, 23, 42, 0.28);
}

#app.lango-host .host-buzzin-lucky-draw__body {
  min-height: 0;
  padding: 36px 40px 32px;
  gap: 28px;
  border: 4px solid #fc7dba;
  border-radius: 40px;
  background:
    linear-gradient(180deg, rgba(255, 250, 253, 0.96) 0%, rgba(255, 236, 247, 0.94) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.7) inset,
    0 0 28px rgba(255, 177, 237, 0.55),
    0 28px 56px rgba(88, 28, 135, 0.28);
}

#app.lango-host .host-buzzin-lucky-draw__wheel-wrap {
  position: relative;
  width: 268px;
  height: 268px;
}

#app.lango-host .host-buzzin-lucky-draw__pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  z-index: 3;
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 26px solid #ff9f43;
  filter: drop-shadow(0 5px 0 rgba(217, 119, 6, 0.82));
  transform: translateX(-50%);
}

#app.lango-host .host-buzzin-lucky-draw__wheel {
  width: 248px;
  height: 248px;
  margin-top: 18px;
  padding: 14px;
  border-radius: 50%;
  background:
    conic-gradient(
      from 0deg,
      #feca57 0 12.5%,
      #ff9f43 12.5% 25%,
      #b11980 25% 37.5%,
      #743c9b 37.5% 50%,
      #fc7dba 50% 62.5%,
      #feca57 62.5% 75%,
      #ff9f43 75% 87.5%,
      #b11980 87.5% 100%
    );
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, 0.72),
    0 10px 0 rgba(177, 25, 128, 0.22),
    0 18px 28px rgba(116, 60, 155, 0.28);
}

#app.lango-host .host-buzzin-lucky-draw__wheel.is-spinning {
  animation: hostBuzzinLuckyDrawSpin 640ms linear infinite;
}

#app.lango-host .host-buzzin-lucky-draw__wheel.is-spinning .host-buzzin-lucky-draw__wheel-face {
  animation: hostBuzzinLuckyDrawSpin 640ms linear infinite reverse;
}

#app.lango-host .host-buzzin-lucky-draw__wheel-face {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #fff 0%, #fff5fb 46%, #f5d0ea 100%);
  box-shadow:
    inset 0 8px 16px rgba(255, 255, 255, 0.7),
    inset 0 -10px 18px rgba(177, 25, 128, 0.12);
}

#app.lango-host .host-buzzin-lucky-draw__wheel.is-revealed .host-buzzin-lucky-draw__wheel-face {
  background: transparent;
  box-shadow: none;
}

#app.lango-host .host-buzzin-lucky-draw__avatar {
  font-size: 64px;
  text-shadow: 0 3px 0 rgba(88, 28, 135, 0.28);
  box-shadow:
    inset 0 0 0 5px rgba(255, 255, 255, 0.55),
    0 10px 20px rgba(88, 28, 135, 0.22);
}

#app.lango-host .host-buzzin-lucky-draw__name {
  min-width: 280px;
  min-height: 64px;
  padding: 14px 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 245, 252, 0.96);
  color: #5b1848;
  font-size: 36px;
  letter-spacing: 0.02em;
  text-shadow: none;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.8),
    0 6px 0 rgba(177, 25, 128, 0.16);
}

#app.lango-host .host-buzzin-lucky-draw.is-spinning .host-buzzin-lucky-draw__name {
  color: rgba(91, 24, 72, 0.55);
  letter-spacing: 0.08em;
}

#app.lango-host .host-buzzin-lucky-draw.is-revealed .host-buzzin-lucky-draw__name {
  color: #fff;
  background: linear-gradient(180deg, #feca57 0%, #ff9f43 100%);
  text-shadow: 0 2px 0 rgba(146, 64, 14, 0.28);
  box-shadow:
    inset 0 -3px 3px rgba(0, 0, 0, 0.1),
    inset 0 0 0 4px rgba(255, 255, 255, 0.5),
    0 8px 0 rgba(217, 119, 6, 0.85),
    0 12px 20px rgba(255, 140, 42, 0.28);
}

#app.lango-host .host-buzzin-lucky-draw.is-revealed .host-buzzin-lucky-draw__wheel {
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, 0.86),
    0 0 28px rgba(254, 202, 87, 0.7),
    0 10px 0 rgba(177, 25, 128, 0.22),
    0 18px 28px rgba(116, 60, 155, 0.28);
}

@media (prefers-reduced-motion: reduce) {
  #app.lango-host .host-buzzin-lucky-draw__wheel.is-spinning .host-buzzin-lucky-draw__wheel-face {
    animation: none;
  }
}

#app.lango-host #screen-host-quiz-results .host-mcq-result-footer button.host-mcq-footer-btn,
#app.lango-host #screen-host-quiz-results .host-mcq-result-footer button.host-mcq-next-btn {
  min-height: 70px;
  min-width: 210px;
  padding: 6px 22px 4px;
  font-size: 28px;
}

#app.lango-host #screen-host-quiz-results .host-mcq-result-footer .host-mcq-footer-btn:hover:not(:disabled),
#app.lango-host #screen-host-quiz-results .host-mcq-result-footer .host-mcq-next-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  filter: brightness(1.06);
}

#app.lango-host #screen-host-quiz-results .host-mcq-result-footer .host-mcq-footer-btn:active:not(:disabled),
#app.lango-host #screen-host-quiz-results .host-mcq-result-footer .host-mcq-next-btn:active:not(:disabled) {
  transform: translateY(4px);
  filter: brightness(0.98);
  transition-duration: 80ms;
}

#app.lango-host:has(#screen-section.active) button.course-toolbar-back,
#app.lango-host button.course-toolbar-back {
  height: auto;
  min-height: 64px;
  padding: 4px 16px 2px;
  line-height: 1;
}

#app.lango-host .section-exercise-panel button.exercise-cancel-btn,
#app.lango-host .section-exercise-panel button.exercise-start-btn,
#app.lango-host button.host-leaderboard__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
}

#app.lango-host .section-exercise-panel button.exercise-cancel-btn {
  height: auto;
  min-height: 64px;
  padding: 4px 22px 2px;
}

#app.lango-host .section-exercise-panel button.exercise-start-btn {
  height: auto;
  min-height: 90px;
  padding: 6px 32px 4px;
}

#app.lango-host .host-join-toast {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  max-width: min(420px, calc(100vw - 48px));
  margin: 0;
  padding: 8px 16px 8px 8px;
  border: 1px solid rgba(45, 212, 191, 0.42);
  border-radius: 999px;
  pointer-events: none;
  color: #0f766e;
  font-family: "Nunito", sans-serif;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(236, 254, 255, 0.95) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.7) inset,
    0 10px 22px rgba(15, 118, 110, 0.18);
}

#app.lango-host .host-join-toast[hidden] {
  display: none !important;
}

#app.lango-host .host-join-toast__avatar {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 2px solid #2dd4bf;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    circle at 32% 28%,
    rgba(255, 255, 255, 0.82),
    hsl(var(--waiting-avatar-hue, 270) 72% 72%) 42%,
    hsl(calc(var(--waiting-avatar-hue, 270) + 34) 68% 54%)
  );
  box-shadow:
    0 0 0 3px rgba(45, 212, 191, 0.2),
    0 4px 10px rgba(15, 23, 42, 0.12);
}

#app.lango-host .host-join-toast__shine {
  position: absolute;
  left: 16%;
  top: 14%;
  width: 40%;
  height: 28%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

#app.lango-host .host-join-toast__initials {
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(50, 20, 80, 0.28);
}

#app.lango-host .host-join-toast__copy {
  margin: 0;
  min-width: 0;
  color: #134e4a;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app.lango-host.is-host-chrome-compact .host-join-toast {
  min-height: 48px;
  padding: 6px 14px 6px 6px;
  gap: 8px;
}

#app.lango-host.is-host-chrome-compact .host-join-toast__avatar {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

#app.lango-host.is-host-chrome-compact .host-join-toast__copy {
  font-size: 17px;
}

html[dir="rtl"] #app.lango-host .host-join-toast {
  padding: 8px 8px 8px 16px;
}

.join-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.join-preview-actions .btn {
  flex: 1 1 auto;
}
