* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #333;
  min-height: 100vh;
  padding: 20px;
}

.quiz-container {
  max-width: 700px;
  margin: 0 auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  overflow: hidden;
}

.quiz-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px 30px;
  text-align: center;
}

.quiz-header h1 {
  font-size: 28px;
  margin-bottom: 10px;
}

.quiz-header p {
  font-size: 14px;
  opacity: 0.9;
}

.device-settings-button { display:grid; flex:0 0 44px; place-content:center; gap:7px; width:44px; height:44px; margin-left:auto; padding:0; border:1px solid #bbb; border-radius:8px; background:#fff; }
.device-settings-button span { display:block; width:22px; height:3px; border-radius:3px; background:#333; }
.device-settings-button:hover { border-color:#006747; background:#f4faf7; }
.device-settings-dialog { width:min(620px, calc(100% - 28px)); max-height:calc(100vh - 40px); overflow:auto; padding:24px; border:0; border-radius:12px; box-shadow:0 20px 70px rgba(0,0,0,.28); }
.device-settings-dialog::backdrop { background:rgba(0,0,0,.48); }
.device-settings-heading { display:flex; justify-content:space-between; gap:20px; }
.device-settings-heading h2, .device-settings-section h3 { margin:0 0 6px; }
.device-settings-heading p, .device-settings-section p { margin:0; color:#666; line-height:1.4; }
.device-settings-close { align-self:flex-start; padding:2px 10px; border:0; background:transparent; color:#555; font-size:30px; }
.device-settings-section { margin-top:20px; padding-top:18px; border-top:1px solid #ddd; }
.device-code-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; margin-top:12px; }
.device-code-row input { min-width:0; padding:11px 12px; border:1px solid #bbb; border-radius:5px; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:16px; letter-spacing:.06em; text-transform:uppercase; }
.device-code-row button, .device-secondary-button { background:#006747; color:#ffb81c; }
.device-secondary-button { margin-top:10px; padding:8px 12px; }
.device-settings-message { min-height:20px; margin-top:12px; color:#006747; font-weight:600; }
.device-settings-message.error { color:#a5142b; }
.linked-device-summary { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-top:22px; padding-top:18px; border-top:1px solid #ddd; }
.device-danger-button { border-color:#a5142b; background:#fff; color:#a5142b; }
.linked-device-list { display:grid; gap:8px; margin-top:12px; }
.linked-device-item { display:grid; grid-template-columns:34px minmax(0,1fr); gap:10px; align-items:center; padding:10px 12px; border:1px solid #ddd; border-radius:7px; background:#fff; }
.linked-device-item.current { border-color:#006747; background:#f2faf6; }
.linked-device-icon { color:#006747; font-size:25px; text-align:center; }
.linked-device-item strong, .linked-device-item small { display:block; }
.linked-device-item small { margin-top:2px; color:#777; }

@media (max-width:640px) {
  .device-settings-button { flex-basis:38px; width:38px; height:38px; }
  .device-settings-dialog { padding:18px; }
  .device-code-row { grid-template-columns:1fr; }
  .linked-device-summary { align-items:stretch; flex-direction:column; }
}

#quizContent,
#loadingMessage,
#noQuestionsMessage {
  padding: 30px;
}

#loadingMessage,
#noQuestionsMessage {
  text-align: center;
}

#loadingMessage p,
#noQuestionsMessage p {
  font-size: 16px;
  color: #666;
  margin-bottom: 20px;
}

#quizForm {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.questions-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.question-block {
  padding: 20px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #f9f9f9;
}

.question-block h3 {
  color: #667eea;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.question-text {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 15px;
  color: #333;
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.answer-option {
  display: flex;
  align-items: center;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
}

.answer-option:hover {
  border-color: #667eea;
  background: #f5f7ff;
}

.answer-option input[type="radio"] {
  margin-right: 12px;
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: #667eea;
}

.answer-option span {
  flex: 1;
  font-size: 14px;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: #667eea;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #5568d3;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: #999;
  color: white;
}

.btn-secondary:hover {
  background: #777;
}

/* Results */
.results-summary {
  padding: 22px 0;
}

.results-summary h2 {
  color: #667eea;
  margin-bottom: 20px;
}

.score {
  grid-area: score;
  font-size: 22px;
  font-weight: bold;
  color: #333;
  margin: 0;
  text-align: center;
  padding: 10px 14px;
  background: transparent;
}

.results-actions {
  display: grid;
  grid-template-areas: "share score rate";
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: 14px 0;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
}

.whatsapp-share-actions {
  grid-area: share;
  display: flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
}

.whatsapp-share-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: fit-content;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid #128c4a;
  border-radius: 6px;
  background: #25d366;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.whatsapp-compact-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid #128c4a;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  text-decoration: none;
}

.whatsapp-compact-button .whatsapp-logo {
  width: 24px;
  height: 24px;
}

.whatsapp-logo {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  overflow: visible;
}

.whatsapp-logo circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.whatsapp-logo path {
  fill: currentColor;
}

.whatsapp-logo .whatsapp-tail {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.whatsapp-share-button:hover,
.whatsapp-share-button:focus-visible,
.whatsapp-compact-button:hover,
.whatsapp-compact-button:focus-visible {
  background: #fff;
  color: #128c4a;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}

.question-rating-section {
  margin: 20px 0 30px;
}

.question-rating-toggle {
  grid-area: rate;
  display: block;
  justify-self: end;
  margin: 0;
  padding: 10px 16px;
  border: 2px solid #ffb81c;
  background: #006747;
  color: #ffb81c;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 0 0 0 rgba(0, 103, 71, 0.5);
  animation: rating-button-pulse 1.8s ease-out infinite;
}

@media (max-width: 640px) {
  .results-actions {
    grid-template-areas:
      "score score"
      "share rate";
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .whatsapp-share-button,
  .question-rating-toggle {
    width: 100%;
    min-height: 44px;
    justify-content: center;
    padding: 9px 10px;
    font-size: 14px;
  }

  .whatsapp-share-actions {
    width: 100%;
  }

  .whatsapp-share-actions .whatsapp-share-button {
    flex: 1;
    width: auto;
  }
}

.question-rating-toggle:hover,
.question-rating-toggle:focus-visible {
  border-color: #ffca4f;
  background: #004f37;
  color: #ffca4f;
}

@keyframes rating-button-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 103, 71, 0.5);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(0, 103, 71, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 103, 71, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .question-rating-toggle {
    animation: none;
  }
}

.question-rating-panel {
  margin-top: 16px;
  padding: 22px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
}

.question-rating-panel h2 {
  margin: 0 0 6px;
}

.question-rating-panel > p {
  margin: 0 0 18px;
  color: #666;
}

.question-rating-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 48px;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid #e2e2e2;
}

.question-rating-text {
  font-weight: 600;
  line-height: 1.35;
}

.question-rating-options {
  display: flex;
  gap: 6px;
}

.question-rating-options button {
  padding: 8px 10px;
  border-color: #ccc;
  background: white;
  color: #333;
}

.question-rating-options button.selected {
  border-color: #667eea;
  background: #667eea;
  color: white;
}

.question-rating-status {
  color: #667eea;
  font-size: 11px;
}

@media (max-width: 640px) {
  .question-rating-panel {
    padding: 14px;
  }

  .question-rating-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .question-rating-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .question-rating-options button {
    padding: 8px 4px;
  }
}

.result-item {
  padding: 15px;
  border-radius: 4px;
  border-left: 4px solid;
}

.result-item.correct {
  border-left-color: #28a745;
  background: #d4edda;
}

.result-item.incorrect {
  border-left-color: #dc3545;
  background: #f8d7da;
}

.result-indicator {
  font-weight: 600;
  margin-bottom: 8px;
}

.result-item.correct .result-indicator {
  color: #155724;
}

.result-item.incorrect .result-indicator {
  color: #721c24;
}

.result-text {
  font-size: 14px;
  margin: 5px 0;
}

.result-item.correct .result-text {
  color: #155724;
}

.result-item.incorrect .result-text {
  color: #721c24;
}

.percentile-comparison {
  margin: 12px auto 0;
  color: #555;
  font-size: 15px;
  line-height: 1.45;
  text-align: center;
}

.percentile-comparison strong {
  color: #667eea;
  font-size: 18px;
}

footer {
  padding: 20px 30px;
  background: #f9f9f9;
  border-top: 1px solid #e0e0e0;
  text-align: center;
}

@media (max-width: 600px) {
  .quiz-header {
    padding: 30px 20px;
  }

  .quiz-header h1 {
    font-size: 22px;
  }

  #quizContent,
  #loadingMessage,
  #noQuestionsMessage {
    padding: 20px;
  }

  .question-block {
    padding: 15px;
  }

  .answer-option {
    padding: 10px;
  }

  .btn {
    width: 100%;
  }
}

.mobile-results-dialog {
    width: min(94vw, 560px);
    max-height: 92dvh;
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
    overflow: auto;
}

.mobile-results-dialog::backdrop {
    background: rgba(0, 0, 0, 0.58);
}

.mobile-results-dialog.has-question-invite {
    overflow: visible;
    background: transparent;
    box-shadow: none;
}

.mobile-results-dialog.has-question-invite .mobile-results-form {
    max-height: 92vh;
    max-height: 92dvh;
    border-radius: 14px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
    overflow: auto;
}

.mobile-results-form {
    position: relative;
    padding: 24px 18px 22px;
    background: #fff;
}

.mobile-results-form > h2 {
    margin: 0 42px 6px;
    color: #222;
    font-size: 28px;
    text-align: center;
}

.mobile-results-close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #333;
    font-size: 30px;
    line-height: 1;
}

.mobile-results-close:hover,
.mobile-results-close:focus-visible {
    background: #eee;
    color: #111;
}

.mobile-results-score {
    margin: 0 0 8px;
    color: #222;
    font-size: 30px;
    font-weight: 800;
    text-align: center;
}
.mobile-results-score span {
    display: block;
    color: #555;
    font-size: .62em;
    font-weight: 500;
}
.mobile-results-score strong {
    display: block;
    margin-top: 4px;
    color: #222;
    font: inherit;
}

.mobile-results-histogram {
    margin: 4px 0 16px;
    padding: 14px 0;
    border-top: 0;
}

.mobile-results-histogram h2 {
    margin: 0 0 8px;
    font-size: 20px;
    text-align: center;
}

.mobile-results-histogram .histogram-chart {
    min-height: 210px;
}

.mobile-results-histogram .histogram-y-axis {
    height: 185px;
}

.mobile-results-histogram .histogram-plot {
    height: 215px;
}

.mobile-results-histogram .score-histogram-key {
    margin: 10px 0 0;
    font-size: 12px;
    text-align: center;
}

.mobile-results-share .whatsapp-share-actions {
    width: 100%;
}

.mobile-results-share .whatsapp-share-button {
    flex: 1;
    width: 100%;
    min-height: 48px;
    justify-content: center;
}

.mobile-results-share .whatsapp-compact-button {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
}

@media (min-width: 641px) {
    .mobile-results-dialog {
        display: none;
    }
}

.quiz-history {
    margin-top: 28px;
    padding: 28px;
    border: 1px solid #dedede;
    border-radius: 10px;
    background: #fff;
}

.quiz-history-heading {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    margin-bottom: 22px;
}

.quiz-history-heading h2,
.quiz-history-heading p {
    margin: 0;
}

.quiz-history-heading p {
    margin-top: 5px;
    color: #777;
    font-size: 14px;
}

.quiz-history-heading > strong {
    color: #667eea;
    font-size: 34px;
    white-space: nowrap;
}

.quiz-history-heading > strong span {
    margin-left: 5px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
}

.quiz-history-scores {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 26px;
}

.quiz-history-score {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 42px;
    gap: 12px;
    align-items: center;
}

.quiz-history-score span {
    color: #666;
    font-size: 13px;
    font-weight: 600;
    text-align: right;
}

.quiz-history-score strong {
    font-size: 14px;
    text-align: right;
}

.quiz-history-score-track {
    height: 18px;
    overflow: hidden;
    border-radius: 9px;
    background: #eef0f7;
}

.quiz-history-score-track div {
    height: 100%;
    min-width: 0;
    border-radius: 9px;
    background: #667eea;
}

.quiz-history-attempts h3 {
    margin: 0 0 8px;
}

.quiz-history-attempt {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) 70px 60px;
    gap: 14px;
    padding: 9px 4px;
    border-bottom: 1px solid #eee;
}

.quiz-history-attempt strong,
.quiz-history-attempt span:last-child {
    text-align: right;
}

.quiz-history-more {
    padding: 8px 4px 0;
    color: #888;
    font-size: 24px;
    line-height: 1;
    text-align: center;
}

@media (max-width: 500px) {
    .quiz-history {
        padding: 20px 14px;
    }

    .quiz-history-heading {
        align-items: flex-start;
        flex-direction: column;
    }

}
.answers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 15px;
}

.answer-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70px;
  padding: 16px;
  border: 2px solid #ccc;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  font-weight: 600;
  transition: all 0.15s ease;
}

.answer-button input {
  display: none;
}

.answer-button:has(input:checked) {
  border: 5px solid #000;
}

.answer-button.correct-answer {
  background: #d8f5dd;
  border: 2px solid #28a745;
}

.answer-button.selected-correct-answer {
  background: #d8f5dd;
  border: 5px solid #28a745;
}

.answer-button.wrong-answer {
  background: #f8d7da;
  border: 2px solid #dc3545;
}

.answer-button input:disabled + span {
  cursor: default;
}


.display-list .question-list {
    background: transparent;
    border: none;
    padding: 12px 0;
    margin-bottom: 18px;
}

.display-list .question-list h3 {
    color: #333;
    text-transform: none;
    font-size: 18px;
    font-weight: 700;
}


.quiz-date-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 20px 30px;
    background: #f9f9f9;
    border-bottom: 1px solid #e0e0e0;
}

.quiz-date-selector label {
    font-weight: 600;
}

.quiz-date-selector input[type="date"] {
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.quiz-date-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.quiz-date-label {
    font-weight: 600;
}

.quiz-calendar-open {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    min-width: 170px;
    gap: 14px;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: #111;
    font-size: 14px;
}

.quiz-calendar-dialog {
    width: min(94vw, 410px);
    padding: 0;
    border: 0;
    border-radius: 16px;
    box-shadow: 0 18px 55px rgba(0, 0, 0, .28);
}

.quiz-calendar-dialog::backdrop { background: rgba(0, 0, 0, .48); }
.quiz-calendar-shell { padding: 20px; background: #fff; }
.quiz-calendar-header { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; gap: 6px; position: relative; }
.quiz-calendar-header h2 { margin: 0; text-align: center; font-size: 21px; }
.quiz-calendar-nav { padding: 7px; border-radius: 50%; font-size: 25px; line-height: 1; }
.quiz-calendar-nav:disabled { opacity: .25; cursor: default; }
.quiz-calendar-close { position: absolute; right: -12px; top: -17px; padding: 2px 8px; border: 0; background: transparent; color: #555; font-size: 27px; }
.quiz-calendar-weekdays,
.quiz-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.quiz-calendar-weekdays { margin: 18px 0 7px; color: #777; font-size: 11px; font-weight: 700; text-align: center; }
.quiz-calendar-day { aspect-ratio: 1; padding: 0; border: 1px solid transparent; border-radius: 50%; background: transparent; color: #aaa; font-weight: 700; }
.quiz-calendar-day.is-available { color: #333; border-color: #ddd; background: #f5f5f5; }
.quiz-calendar-day.is-unanswered { color: #155a35; border: 2px solid #e2ae13; background: #fff4bd; box-shadow: 0 0 0 2px rgba(226,174,19,.13); }
.quiz-calendar-day.is-completed { color: #fff; border-color: #168443; background: #168443; }
.quiz-calendar-day.is-selected { outline: 3px solid #111; outline-offset: 2px; }
.quiz-calendar-day:disabled { cursor: default; }
.quiz-calendar-empty { aspect-ratio: 1; }
.quiz-calendar-key { display: flex; justify-content: center; gap: 20px; margin-top: 17px; color: #555; font-size: 12px; }
.quiz-calendar-key span { display: inline-flex; align-items: center; gap: 6px; }
.quiz-calendar-key i { width: 13px; height: 13px; border-radius: 50%; }
.quiz-calendar-key-unanswered { border: 2px solid #e2ae13; background: #fff4bd; }
.quiz-calendar-key-completed { background: #168443; }

.display-one-at-a-time {
    max-width: 820px;
    margin: 0 auto;
}

.timed-quiz-progress {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 18px 0 10px;
    color: #555;
}

.timed-quiz-progress strong { color: #111; }
.timed-question {
    position: relative;
    overflow: hidden;
    min-height: 320px;
    padding: 36px 28px 30px;
    border: 1px solid #ddd;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .07);
}

.timed-question[hidden], .timed-answers[hidden] { display: none !important; }
.timed-answer-clock {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 9px;
    background: linear-gradient(90deg,
        #000 0%,
        #000 16%,
        #ffb81c 18%,
        #ffb81c 28%,
        #fff 30%,
        #fff 33%,
        #de3831 35%,
        #de3831 53%,
        #007749 55%,
        #007749 79%,
        #002395 81%,
        #002395 100%
    );
}

.timed-answer-clock span {
    position: absolute;
    top: 0;
    right: 0;
    display: block;
    width: 0;
    height: 100%;
    background: #e4e4e4;
}

.timed-question .question-text {
    font-size: clamp(20px, 3vw, 28px);
    line-height: 1.35;
}

.timed-reading-status {
    margin: 28px 0;
    min-height: 38px;
    padding: 8px 0;
    color: #777;
    font-weight: 700;
    text-align: center;
}

.timed-reading-dots { display: inline-flex; align-items: center; gap: 9px; min-height: 22px; }
.timed-reading-dots i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #999;
    animation: timed-reading-dot 1.5s ease-in-out infinite;
}
.timed-reading-dots i:nth-child(2) { animation-delay: .25s; }
.timed-reading-dots i:nth-child(3) { animation-delay: .5s; }
.timed-reading-expired { color: #666; }

@keyframes timed-reading-dot {
    0%, 100% { opacity: .2; transform: scale(.82); }
    50% { opacity: .9; transform: scale(1); }
}

.timed-answers { margin-top: 24px; }
.timed-question-result {
    min-height: 0;
    margin-bottom: 22px;
    padding-top: 24px;
}
.timed-question-result .timed-answers { margin-top: 18px; }
.timed-question-result .answer-button.correct-answer,
.timed-question-result .answer-button.selected-correct-answer,
.timed-question-result .answer-button.correct-answer:has(input:checked) {
    background: #d8f5dd;
    border-color: #28a745;
}
.timed-question-result .answer-button.selected-correct-answer,
.timed-question-result .answer-button.correct-answer:has(input:checked) {
    border-width: 5px;
}
.timed-question-result .answer-button.wrong-answer,
.timed-question-result .answer-button.wrong-answer:has(input:checked) {
    background: #f8d7da;
    border-color: #dc3545;
}
.timed-question-result .answer-button.wrong-answer:has(input:checked) { border-width: 5px; }
.timed-result-bonus { margin: 22px 0 0; }
.timed-result-bonus-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 7px;
    color: #666;
    font-size: 13px;
}
.timed-result-bonus-heading strong { color: #8a6500; font-size: 14px; }
.timed-result-bonus-track {
    position: relative;
    width: 100%;
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: linear-gradient(90deg,
        #000 0%,
        #000 16%,
        #ffb81c 18%,
        #ffb81c 28%,
        #fff 30%,
        #fff 33%,
        #de3831 35%,
        #de3831 53%,
        #007749 55%,
        #007749 79%,
        #002395 81%,
        #002395 100%
    );
}
.timed-result-bonus-unearned {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    background: #e4e4e4;
}
.bonus-score { margin: 0; color: #8a6500; font-weight: 800; }
.timed-score-total {
    grid-area: score;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 22px;
    text-align: center;
}
.timed-score-total .bonus-score {
    color: #666;
    font-size: .72em;
    font-weight: 500;
}
.timed-score-total strong {
    color: #222;
    font-size: 1em;
    font-weight: 800;
}

@media (max-width: 640px) {
    .timed-quiz-progress { align-items: flex-start; font-size: 13px; }
    .timed-question { min-height: 360px; padding: 30px 16px 22px; }
    .timed-question .answers-grid { grid-template-columns: 1fr; }
}
.list-answers {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.list-answer {
    display: grid;
    grid-template-columns: 26px 22px minmax(0, 1fr);
    grid-template-rows: auto;
    align-items: center;
    column-gap: 10px;
    padding: 8px 0;
    cursor: pointer;
}

.answer-marker {
    grid-column: 1;
    grid-row: 1;
    width: 26px;
    min-height: 22px;
    text-align: center;
    font-size: 20px;
    line-height: 1;
    font-weight: 700;
}

.list-answer input[type="radio"] {
    grid-column: 2;
    grid-row: 1;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #667eea;
    cursor: pointer;
}

.list-answer-text {
    grid-column: 3;
    grid-row: 1;
    font-size: 16px;
    line-height: 1.4;
}

.list-correct-answer {
    color: #155724;
    font-weight: 700;
}

.list-wrong-answer {
    color: #721c24;
    font-weight: 700;
}

.list-correct-answer .answer-marker {
    color: #28a745;
}

.correct-answer-details {
    margin-top: 7px;
    padding-top: 7px;
    border-top: 1px solid rgba(35, 154, 69, 0.35);
    color: #37533e;
    font-size: 0.9em;
    font-weight: 400;
    line-height: 1.45;
    white-space: pre-line;
}

.correct-answer-image {
    display: block;
    width: auto;
    max-width: min(100%, 420px);
    max-height: 300px;
    margin: 0 auto 8px;
    object-fit: contain;
    border-radius: 8px;
}

.correct-answer-details a {
    color: #006747;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.correct-answer-details a:hover,
.correct-answer-details a:focus-visible {
    color: #004b34;
    text-decoration-thickness: 2px;
}

.answer-button .correct-answer-details {
    width: 100%;
}

.list-answer .correct-answer-details {
    grid-column: 3;
    grid-row: 2;
    margin-top: 4px;
    padding-top: 4px;
}

.list-wrong-answer .answer-marker {
    color: #dc3545;
}

.score-histogram {
    margin-top: 40px;
    padding: 30px;
    border-top: 1px solid #e0e0e0;
}

.score-histogram h2 {
    margin-bottom: 8px;
    color: #333;
}

.score-histogram-note,
.score-histogram-key {
    color: #666;
    margin-bottom: 20px;
}


.histogram-y-axis {
    height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: right;
    color: #666;
    font-size: 12px;
    padding-bottom: 30px;
}

.histogram-plot {
    position: relative;
    height: 250px;
    min-width: 0;
}

.histogram-grid-lines {
    position: absolute;
    inset: 0 0 30px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}

.histogram-grid-lines span {
    display: block;
    border-top: 1px solid #e5e5e5;
}

.histogram-bars {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(11, minmax(0, 1fr));
    gap: 6px;
    border-left: 1px solid #aaa;
    border-bottom: 1px solid #aaa;
}

.histogram-column {
    display: grid;
    grid-template-rows: minmax(0, 1fr) 30px;
    min-width: 0;
}

.histogram-bar-area {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 0;
}

.histogram-bar {
    width: 72%;
    min-height: 2px;
    background: #999;
    border-radius: 4px 4px 0 0;
}

.histogram-bar.user-score {
    background: #667eea;
}

.histogram-label {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #555;
}

.histogram-wrapper {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.histogram-y-title {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 12px;
    min-width: 28px;
}

.histogram-chart {
    flex: 1;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    min-height: 260px;
}

.histogram-x-title {
    margin-top: 12px;
    text-align: center;
    color: #666;
    font-size: 12px;
}

.timed-line-chart-wrap { width: 100%; overflow: hidden; }
.timed-line-chart-wrap svg { display: block; width: 100%; height: auto; min-height: 250px; }
.timed-line-grid { stroke: #e4e4e4; stroke-width: 1; }
.timed-line-axis { stroke: #999; stroke-width: 1.5; }
.timed-results-line {
    fill: none;
    stroke: #168443;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.timed-results-point { fill: #168443; }
.timed-user-point { fill: #000; stroke: #fff; stroke-width: 3; }
.timed-line-x-label,
.timed-line-y-label {
    fill: #666;
    font: 12px Arial, sans-serif;
    text-anchor: middle;
}
.timed-line-y-label { text-anchor: end; }
.timed-user-key-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 6px;
    border-radius: 50%;
    background: #000;
    vertical-align: -1px;
}
.timed-score-line-chart .score-histogram-key { text-align: center; }

@media (max-width: 640px) {
    .mobile-results-histogram.timed-score-line-chart { padding-top: 5px; }
    .mobile-results-histogram .timed-line-chart-wrap svg { min-height: 190px; }
    .mobile-results-histogram.timed-score-line-chart .score-histogram-note { margin-bottom: 4px; text-align: center; }
}

@media (max-width: 600px) {
    .score-histogram {
        padding: 20px 10px;
    }

    .histogram-wrapper {
        gap: 6px;
    }

    .histogram-chart {
        flex: 1;
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 6px;
    }

    .histogram-bars {
        gap: 3px;
    }

    .histogram-label {
        font-size: 10px;
    }


}
.leaderboard-settings-button {
    width: 44px; height: 44px; flex: 0 0 44px; padding: 0; border-radius: 50%;
    background: #fff; color: #006747; border: 2px solid #006747; font-size: 22px;
}
.leaderboard-settings-dialog { width: min(760px, calc(100% - 28px)); max-height: calc(100vh - 36px); padding: 24px; border: 0; border-radius: 16px; box-shadow: 0 24px 70px rgba(0,0,0,.3); }
.leaderboard-settings-dialog::backdrop { background: rgba(0,0,0,.55); }
.leaderboard-settings-dialog .device-settings-message:empty { display: none; }
.leaderboard-settings-dialog .device-settings-heading + .device-settings-message + .device-settings-section { margin-top: 0; padding-top: 10px; border-top: 1px solid #ddd; }
.leaderboard-admin-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; }
.leaderboard-admin-heading h3 { margin: 0; }
.leaderboard-admin-heading button { padding: 7px 12px; }
.leaderboard-dialog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.leaderboard-dialog-grid[hidden] { display: none !important; }
.leaderboard-dialog-grid form { display: grid; gap: 12px; }
.leaderboard-dialog-grid form[hidden] { display: none !important; }
.leaderboard-settings-dialog.invitation-join-mode #myLeaderboardsSection,
.leaderboard-settings-dialog.invitation-join-mode #leaderboardAdminHeading,
.leaderboard-settings-dialog.invitation-join-mode #createLeaderboardForm,
.leaderboard-settings-dialog.invitation-join-mode #requestLeaderboardForm,
.leaderboard-settings-dialog.invitation-join-mode #leaderboardRequestPending,
.leaderboard-settings-dialog.invitation-join-mode #leaderboardInviteResult { display: none !important; }
.leaderboard-settings-dialog.invitation-join-mode #leaderboardInviteCodeField { display: none !important; }
.leaderboard-settings-dialog.invitation-join-mode .leaderboard-dialog-grid { grid-template-columns: minmax(0, 1fr); }
.leaderboard-invitation-welcome { display: none; }
.leaderboard-settings-dialog.invitation-join-mode { position: fixed; inset: 0; width: min(580px, calc(100% - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); margin: auto; padding: 0; border-radius: 22px; background: #fffdf6; overflow: auto; }
.leaderboard-settings-dialog.invitation-join-mode .leaderboard-invitation-welcome { position: relative; display: grid; grid-template-columns: 94px minmax(0,1fr); gap: 17px; align-items: center; padding: 24px 48px 22px 24px; background: linear-gradient(135deg,#fff4bd 0%,#f8cf4d 100%); overflow: hidden; }
.leaderboard-settings-dialog.invitation-join-mode .leaderboard-invitation-welcome::before,
.leaderboard-settings-dialog.invitation-join-mode .leaderboard-invitation-welcome::after { content: ''; position: absolute; border: 8px solid rgba(255,255,255,.38); border-radius: 50%; }
.leaderboard-settings-dialog.invitation-join-mode .leaderboard-invitation-welcome::before { top: -48px; right: 45px; width: 82px; height: 82px; }
.leaderboard-settings-dialog.invitation-join-mode .leaderboard-invitation-welcome::after { right: -17px; bottom: 42px; width: 42px; height: 42px; }
.leaderboard-invitation-logo { position: relative; z-index: 1; display: grid; place-items: center; width: 94px; height: 94px; border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: 0 7px 20px rgba(93,70,0,.16); }
.leaderboard-invitation-logo img { width: 80px; height: 80px; object-fit: contain; }
.leaderboard-invitation-heading { position: relative; z-index: 1; }
.leaderboard-invitation-heading > span { display: block; margin-bottom: 5px; color: #006747; font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.leaderboard-invitation-heading h2 { margin: 0; color: #173f31; font-size: 27px; line-height: 1.08; }
.leaderboard-invitation-heading p { margin: 7px 0 0; color: #385247; font-size: 15px; font-weight: 700; }
.leaderboard-invitation-story { position: relative; z-index: 1; grid-column: 1 / -1; margin: 2px 0 0; padding: 12px 14px; border-radius: 11px; background: rgba(255,255,255,.72); color: #365348; font-size: 15px; line-height: 1.45; }
.leaderboard-settings-dialog.invitation-join-mode > .device-settings-heading { position: absolute; z-index: 4; top: 10px; right: 10px; }
.leaderboard-settings-dialog.invitation-join-mode > .device-settings-heading > div { display: none; }
.leaderboard-settings-dialog.invitation-join-mode .device-settings-close { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 50%; background: rgba(255,255,255,.74); color: #315347; }
.leaderboard-settings-dialog.invitation-join-mode #leaderboardSettingsMessage { margin: 0 22px; padding-top: 14px; }
.leaderboard-settings-dialog.invitation-join-mode #leaderboardAdminForms { padding: 20px 22px 24px; }
.leaderboard-settings-dialog.invitation-join-mode #joinLeaderboardForm { gap: 13px; margin: 0; padding: 18px; border: 1px solid #d9e7e0; border-radius: 14px; background: #fff; box-shadow: 0 7px 22px rgba(0,103,71,.08); }
.leaderboard-settings-dialog.invitation-join-mode #joinLeaderboardForm h3 { margin-bottom: 1px; color: #244b3d; }
.leaderboard-settings-dialog.invitation-join-mode #joinLeaderboardForm input { border: 2px solid #cbded5; border-radius: 10px; }
.leaderboard-settings-dialog.invitation-join-mode #joinLeaderboardForm input:focus { outline: 0; border-color: #1a825f; box-shadow: 0 0 0 4px rgba(0,103,71,.11); }
.leaderboard-settings-dialog.invitation-join-mode #joinLeaderboardForm button { padding: 14px 18px; border: 0; border-radius: 11px; background: #006747; color: #fff; font-size: 16px; font-weight: 800; }
.leaderboard-dialog-grid label { display: grid; gap: 6px; font-weight: 700; }
.leaderboard-dialog-grid input:not([type="checkbox"]), .leaderboard-invite-result input { width: 100%; box-sizing: border-box; padding: 11px; border: 1px solid #bbb; border-radius: 6px; font-size: 16px; }
.leaderboard-history-choice { display: flex !important; align-items: center; gap: 8px !important; font-weight: 400 !important; }
.leaderboard-request-pending { margin: 14px 0 0; padding: 10px 12px; border-radius: 7px; background: #fff8df; color: #735800; font-weight: 700; }
.leaderboard-dialog-grid .leaderboard-request-warning { padding: 9px 11px; border-left: 4px solid #d39b00; background: #fff8df; color: #735800; }
.leaderboard-invite-result { margin-top: 18px; padding: 16px; border: 2px solid #006747; border-radius: 10px; background: #f1fff8; }
.leaderboard-invite-result input { margin: 8px 0; }
.recovery-phrase-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; gap: 8px; }
.recovery-phrase-section + .recovery-phrase-section .recovery-phrase-form { grid-template-columns: minmax(0, 1fr) auto; }
.recovery-phrase-form input { min-width: 0; padding: 11px; border: 1px solid #aaa; border-radius: 6px; font-size: 16px; }
.recovery-phrase-section small { display: block; margin-top: 8px; color: #555; }
.my-leaderboards-list { display: grid; gap: 8px; }
.my-leaderboard-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #ddd; }
.my-leaderboard-item:first-child { border-top: 0; }
.my-leaderboard-item small { display: block; margin-top: 2px; color: #666; }
.my-leaderboard-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.my-leaderboard-actions button { padding: 7px 10px; font-size: 12px; }
.my-leaderboard-actions .leaderboard-whatsapp-invite { display: inline-flex; align-items: center; gap: 6px; border-color: #128c4a; background: #128c4a; color: #fff; }
.leaderboard-whatsapp-invite .whatsapp-logo { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.private-leaderboards { margin: 14px 0 24px; border: 1px solid #d9dfdc; border-radius: 12px; overflow: hidden; background: #fff; }
.private-leaderboards-toolbar { display: flex; align-items: stretch; padding: 0; background: #e8eeeb; border-bottom: 1px solid #d1d9d5; }
.leaderboard-tabs { display: flex; flex: 1; gap: 0; flex-wrap: nowrap; min-width: 0; }
.leaderboard-tabs button { flex: 1 1 0; min-width: 0; padding: 13px 16px; border: 0; border-right: 1px solid #cbd4d0; border-radius: 0; background: #e8eeeb; color: #25332d; font-size: 15px; font-weight: 700; text-align: center; }
.leaderboard-tabs button.active { background: #006747; color: #fff; }
.leaderboard-selected-date { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; min-width: 112px; padding: 0 14px; color: #3d4944; font-size: 13px; font-weight: 700; white-space: nowrap; }
.private-leaderboards-toolbar button { padding: 9px 14px; }
.private-leaderboard-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 15px 16px 8px; }
.private-leaderboard-heading h3 { margin: 0; }
.private-leaderboard-heading span { color: #666; font-size: 13px; }
.private-leaderboard-table { width: 100%; border-collapse: collapse; }
.private-leaderboard-table th, .private-leaderboard-table td { padding: 10px 16px; border-top: 1px solid #e6e6e6; text-align: left; }
.private-leaderboard-table th:not(:nth-child(2)), .private-leaderboard-table td:not(:nth-child(2)) { text-align: right; }
.private-leaderboard-table tr.is-current { background: #ecfff5; }
.private-leaderboard-table .leaderboard-ellipsis td { padding: 3px 16px; color: #888; text-align: center !important; font-size: 20px; line-height: 1; }
.private-leaderboard-empty { padding: 20px 16px; color: #666; }
@media (max-width: 640px) {
    .leaderboard-settings-button { width: 40px; height: 40px; flex-basis: 40px; }
    .leaderboard-settings-dialog { padding: 16px; }
    .leaderboard-dialog-grid { grid-template-columns: 1fr; }
    .recovery-phrase-form { grid-template-columns: 1fr; }
    .my-leaderboard-item { align-items: flex-start; }
    .private-leaderboards-toolbar { align-items: stretch; }
    .leaderboard-tabs { width: 100%; }
    .leaderboard-tabs button { padding: 11px 8px; font-size: 13px; }
    .leaderboard-selected-date { min-width: 88px; padding: 0 8px; font-size: 12px; }
    .private-leaderboard-table th, .private-leaderboard-table td { padding: 9px 8px; font-size: 13px; }
    .leaderboard-settings-dialog.invitation-join-mode .leaderboard-invitation-welcome { grid-template-columns: 74px minmax(0,1fr); gap: 13px; padding: 19px 42px 17px 16px; }
    .leaderboard-invitation-logo { width: 74px; height: 74px; }
    .leaderboard-invitation-logo img { width: 64px; height: 64px; }
    .leaderboard-invitation-heading h2 { font-size: 23px; }
    .leaderboard-invitation-heading p { font-size: 14px; }
    .leaderboard-invitation-story { padding: 11px 12px; font-size: 14px; }
    .leaderboard-settings-dialog.invitation-join-mode #leaderboardSettingsMessage { margin: 0 16px; }
    .leaderboard-settings-dialog.invitation-join-mode #leaderboardAdminForms { padding: 16px; }
    .leaderboard-settings-dialog.invitation-join-mode #joinLeaderboardForm { padding: 15px; }
}
.leaderboard-toggle { align-self: center; margin-left: auto; padding: 9px 14px; border: 1px solid #006747; border-radius: 999px; background: #fff; color: #006747; font-size: 14px; font-weight: 700; white-space: nowrap; }
.leaderboard-toggle[hidden] { display: none !important; }
.leaderboard-toggle[aria-expanded="true"] { background: #006747; color: #fff; }

.respondent-question-button { display: none; }
.respondent-question-dialog { position: fixed; inset: 0; width: min(540px, calc(100% - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); margin: auto; padding: 0; border: 0; border-radius: 22px; background: #fffdf6; box-shadow: 0 28px 80px rgba(0,0,0,.32); overflow: auto; }
.respondent-question-dialog::backdrop { background: rgba(18,43,34,.62); backdrop-filter: blur(2px); }
.respondent-question-dialog form { position: relative; padding: 0; }
.respondent-question-dialog h2, .respondent-question-dialog p { margin: 0; }
.respondent-question-welcome { position: relative; display: grid; grid-template-columns: 96px minmax(0,1fr); gap: 18px; align-items: center; padding: 24px 48px 22px 24px; background: linear-gradient(135deg,#fff4bd 0%,#f8cf4d 100%); overflow: hidden; }
.respondent-question-welcome::before, .respondent-question-welcome::after { content: ''; position: absolute; border-radius: 50%; border: 8px solid rgba(255,255,255,.38); }
.respondent-question-welcome::before { width: 82px; height: 82px; top: -50px; right: 44px; }
.respondent-question-welcome::after { width: 42px; height: 42px; right: -18px; bottom: -18px; }
.respondent-question-logo-wrap { position: relative; z-index: 1; display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; background: rgba(255,255,255,.9); box-shadow: 0 7px 20px rgba(93,70,0,.16); }
.respondent-question-logo-wrap img { width: 82px; height: 82px; object-fit: contain; }
.respondent-question-kicker { display: block; margin-bottom: 5px; color: #006747; font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.respondent-question-welcome h2 { color: #173f31; font-size: 27px; line-height: 1.08; }
.respondent-question-welcome p { margin-top: 7px; color: #385247; font-size: 15px; }
.respondent-question-body { display: grid; gap: 12px; padding: 24px; }
.respondent-question-dialog label { color: #27493c; font-weight: 800; }
.respondent-question-dialog textarea { min-height: 150px; padding: 14px; border: 2px solid #cbded5; border-radius: 12px; background: #fff; color: #18372b; font: inherit; line-height: 1.45; resize: vertical; transition: border-color .2s, box-shadow .2s; }
.respondent-question-dialog textarea:focus { outline: 0; border-color: #1a825f; box-shadow: 0 0 0 4px rgba(0,103,71,.11); }
.respondent-question-dialog textarea::placeholder { color: #91a39b; }
.respondent-question-close { position: absolute; z-index: 3; top: 11px; right: 12px; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.72); color: #315347; font-size: 28px; line-height: 1; }
.respondent-question-close:hover { background: #fff; color: #006747; }
.respondent-question-message { min-height: 20px; color: #167044; font-weight: 700; }
.respondent-question-message.error { color: #ad1f34; }
.respondent-question-dialog .respondent-question-submit { width: 100%; padding: 14px 18px; border: 0; border-radius: 12px; background: #006747; color: #fff; font-size: 16px; font-weight: 850; box-shadow: 0 6px 16px rgba(0,103,71,.2); }
.respondent-question-dialog .respondent-question-submit:hover { background: #07543d; color: #fff; }

@keyframes respondent-question-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 5px 18px rgba(212,166,0,.35); }
    50% { transform: scale(1.08); box-shadow: 0 7px 28px rgba(244,196,48,.7); }
}

@keyframes respondent-question-arrive {
    0% {
        right: calc(50vw - 62px);
        bottom: calc(50vh - 22px);
        transform: scale(.82);
        opacity: 0;
    }
    28% {
        transform: scale(1.06);
        opacity: 1;
    }
    100% {
        right: 14px;
        bottom: max(14px, env(safe-area-inset-bottom));
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes respondent-question-results-arrive {
    0% {
        right: calc(50vw - 62px);
        bottom: calc(50vh - 22px);
        transform: scale(.78);
        opacity: 0;
    }
    24% {
        transform: scale(1.08);
        opacity: 1;
    }
    68% {
        transform: scale(.98);
    }
    100% {
        right: 14px;
        bottom: max(14px, env(safe-area-inset-bottom));
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 640px) {
    .respondent-question-button:not([hidden]) {
        position: fixed;
        z-index: 50;
        right: 14px;
        bottom: max(14px, env(safe-area-inset-bottom));
        display: block;
        padding: 12px 17px;
        border: 2px solid #fff;
        border-radius: 999px;
        background: #f4c430;
        color: #006747;
        font-size: 14px;
        font-weight: 800;
        animation:
            respondent-question-arrive .9s cubic-bezier(.2,.78,.25,1) both,
            respondent-question-pulse 1.6s ease-in-out .9s infinite;
    }
    .mobile-results-dialog .respondent-question-button.over-mobile-results:not([hidden]) {
        display: block;
        z-index: 20;
        animation:
            respondent-question-results-arrive 1.15s cubic-bezier(.18,.82,.24,1) both,
            respondent-question-pulse 1.6s ease-in-out 1.15s infinite;
    }
    .respondent-question-button.respondent-question-docked:not([hidden]) {
        animation: respondent-question-pulse 1.6s ease-in-out infinite;
    }
    .respondent-question-welcome { grid-template-columns: 76px minmax(0,1fr); gap: 13px; padding: 20px 42px 18px 16px; }
    .respondent-question-logo-wrap { width: 76px; height: 76px; }
    .respondent-question-logo-wrap img { width: 66px; height: 66px; }
    .respondent-question-welcome h2 { font-size: 23px; }
    .respondent-question-welcome p { font-size: 14px; }
    .respondent-question-body { padding: 18px 16px 16px; }
    .respondent-question-dialog textarea { min-height: 132px; }
}

@media (prefers-reduced-motion: reduce) {
    .respondent-question-button { animation: none !important; }
}

.daily-message-dialog .respondent-question-welcome { background: linear-gradient(135deg,#ffe2dc,#ee8f8a); padding-right: 24px; }
.daily-message-dialog .respondent-question-kicker { color: #8b2835; }
.daily-message-dialog .respondent-question-welcome h2 { color: #642331; }
.daily-message-content { line-height: 1.6; overflow-wrap: anywhere; }
.daily-message-content p + p { margin-top: 12px; }
.daily-message-dialog .respondent-question-body { gap: 24px; }
.daily-message-dialog .respondent-question-submit { background: #9b3444; }
.quiz-question-image{display:block;width:auto;max-width:100%;max-height:460px;margin:12px auto 18px;object-fit:contain;border-radius:10px;background:#f5f5f5}

/* Bullet lists inside question wording */
.question-text ul,
h3 ul,
.question-rating-text ul {
  display: inline-block;
  margin: 6px 0 2px;
  padding-left: 1.3em;
  text-align: left;
  vertical-align: top;
  list-style: disc;
}

.question-text li,
h3 li,
.question-rating-text li {
  margin: 2px 0;
}

/* ===== Step-by-step modes: 5 Swipeable, 6 Game Show, 7 Confidence ===== */
.step-quiz {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  background: #fff;
  border: 1px solid #e6e6e9;
  border-radius: 18px;
}

.step-quiz .question-block {
  padding: 0;
  background: transparent;
  border: 0;
}

.step-quiz-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #6b6e75;
  font-size: 14px;
}

.step-quiz-progress {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 5px;
  margin-top: 10px;
}

.step-progress-segment {
  height: 6px;
  padding: 0;
  background: #e1e2e5;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.step-progress-segment.is-answered { background: #3c8a5c; }
.step-progress-segment.is-current { outline: 2px solid #9fb6aa; outline-offset: 1px; }

.step-quiz .question-text {
  margin: 4px 0 14px;
  color: #1d1f23;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.step-answers {
  display: grid;
  gap: 10px;
}

.step-quiz .step-answers .answer-button {
  align-items: flex-start;
  min-height: 52px;
  padding: 14px 16px;
  font-weight: 500;
  text-align: left;
  border: 1.5px solid #cfd1d6;
  border-radius: 12px;
}

.step-quiz .step-answers .answer-button:has(input:checked) {
  border: 2px solid #1d1f23;
  background: #f4f5f7;
}

.step-quiz-footer {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  color: #6b6e75;
  font-size: 14px;
  text-align: center;
}

.step-nav {
  width: 44px;
  height: 44px;
  color: #1d1f23;
  background: none;
  border: 0;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.step-nav:hover:not(:disabled) { background: #f0f1f3; }
.step-nav:disabled { opacity: .25; cursor: default; }

.step-question-number {
  display: block;
  margin-bottom: 8px;
  color: #6b6e75;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Confidence mode */
.step-quiz-confidence .question-text {
  font-size: 18px;
  text-align: left;
}

.confidence-answers .answer-button {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  min-height: 0;
  padding: 8px 0;
  background: none;
  border: 0;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
}

.step-quiz .confidence-answers .answer-button,
.step-quiz .confidence-answers .answer-button:has(input:checked) {
  min-height: 0;
  padding: 8px 4px;
  background: none;
  border: 0;
  border-radius: 8px;
}


.confidence-radio {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: 1.5px solid #c9cbd0;
  border-radius: 50%;
  background: #fff;
}

.answer-button:has(input:checked) .confidence-radio {
  border: 7px solid #1d1f23;
}

.confidence-picker {
  margin: 22px 0 0;
  padding: 16px;
  min-width: 0;
  background: #f3f4fb;
  border: 1px solid #dfe2f2;
  border-radius: 14px;
}

.confidence-picker legend {
  float: left;
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  color: #3a3f8f;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.confidence-options {
  clear: both;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.confidence-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 74px;
  padding: 12px 10px;
  text-align: center;
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 10px;
  cursor: pointer;
  transition: all .15s ease;
}

.confidence-option input { display: none; }
.confidence-option strong { font-size: 15px; font-weight: 700; }
.confidence-option small { color: #6b6e75; font-size: 12px; }
.confidence-option:hover { border-color: #8f95c9; }
.confidence-option:has(input:checked) { border: 4px solid #000; padding: 10px 8px; }

.confidence-stakes[hidden] { display: none; }

.confidence-stakes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #e6e6e9;
  border-radius: 12px;
}

.confidence-stakes small { display: block; color: #6b6e75; }
.confidence-stakes strong { font-size: 30px; }
.confidence-stake-win { color: #2c6b35; }
.confidence-stake-lose { color: #93302a; }

/* Game Show mode */
.step-quiz-gameshow {
  color: #fff;
  background: #000000;
  border-color: #000000;
}

.step-quiz-gameshow .step-quiz-heading { color: #c9d3f5; letter-spacing: .04em; text-transform: uppercase; }
.step-quiz-gameshow .step-quiz-tag { color: #FFB612; font-weight: 800; }

.gs-question {
  margin-bottom: 14px;
  padding: 18px;
  background: #001a6e;
  border: 1.5px solid rgba(255, 255, 255, .55);
  border-radius: 20px;
}

.step-quiz-gameshow .question-text {
  margin: 0;
  color: #fff;
}

.gs-answers {
  display: grid;
  gap: 12px;
}

.step-quiz-gameshow .gs-answer,
.step-quiz-gameshow .gs-answer:has(input:checked) {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 54px;
  padding: 12px 22px;
  color: #fff;
  background: #001a6e;
  border: 1.5px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  font-weight: 500;
  text-align: left;
}

.gs-letter { color: #FFB612; font-weight: 800; }

.step-quiz-gameshow .gs-answer.is-selected,
.step-quiz-gameshow .gs-answer.is-selected:has(input:checked) { background: #00309c; border-color: #FFB612; }
.step-quiz-gameshow .gs-answer.is-locked,
.step-quiz-gameshow .gs-answer.is-locked:has(input:checked) {
  color: #000000;
  background: #FFB612;
  border-color: #FFB612;
  animation: gs-lock-pulse .9s ease;
}
.step-quiz-gameshow .gs-answer.is-locked .gs-letter { color: #000000; }
.step-quiz-gameshow .gs-answer.is-eliminated { visibility: hidden; }

@keyframes gs-lock-pulse {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.03); box-shadow: 0 0 22px rgba(255, 182, 18, .7); }
}

.gs-lock-in {
  display: block;
  margin: 16px auto 0;
  padding: 11px 28px;
  color: #000000;
  background: #FFB612;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

.gs-lock-in:disabled { opacity: .4; cursor: default; }

.step-quiz-gameshow .step-quiz-footer {
  display: block;
}

.gs-lifelines {
  display: flex;
  justify-content: center;
  gap: 26px;
}

.gs-lifeline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #e3e8fb;
  background: none;
  border: 0;
  font-size: 15px;
  cursor: pointer;
}

.gs-lifeline-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #FFB612;
  border: 2px solid #FFB612;
  border-radius: 50%;
  font-weight: 800;
}

.gs-lifeline:disabled { cursor: default; opacity: .35; }
.gs-lifeline.is-used .gs-lifeline-icon { text-decoration: line-through; }

.gs-status {
  min-height: 1.3em;
  margin: 10px 0 0;
  color: #FFB612;
  font-size: 14px;
  text-align: center;
}

/* Results for step modes */
.step-quiz-results .step-question {
  padding-bottom: 16px;
  border-bottom: 1px solid #e6e6e9;
}

.step-quiz-gameshow.step-quiz-results .step-question { border-bottom-color: rgba(255, 255, 255, .2); }
.step-quiz-gameshow .step-question-number { color: #c9d3f5; }
.step-quiz-gameshow .gs-answer.correct-answer,
.step-quiz-gameshow .gs-answer.correct-answer:has(input:checked) { color: #fff; background: #007A4D; border-color: #ffffff; }
.step-quiz-gameshow .gs-answer.selected-correct-answer:has(input:checked) { border-width: 3px; }
.step-quiz-gameshow .gs-answer.correct-answer .gs-letter,
.step-quiz-gameshow .gs-answer.wrong-answer .gs-letter { color: #fff; }
.step-quiz-gameshow .gs-answer.wrong-answer,
.step-quiz-gameshow .gs-answer.wrong-answer:has(input:checked) { color: #fff; background: #DE3831; border-color: #ffffff; border-width: 3px; }
.step-quiz-gameshow .correct-answer-details { color: #eef1fb; }

.step-quiz .confidence-answers .answer-button.correct-answer,
.step-quiz .confidence-answers .answer-button.correct-answer:has(input:checked) { background: #d8f5dd; border-radius: 8px; }
.step-quiz .confidence-answers .answer-button.wrong-answer,
.step-quiz .confidence-answers .answer-button.wrong-answer:has(input:checked) { background: #f8d7da; border-radius: 8px; }
.step-quiz .step-answers .answer-button.correct-answer,
.step-quiz .step-answers .answer-button.correct-answer:has(input:checked) { background: #d8f5dd; border-color: #28a745; }
.step-quiz .step-answers .answer-button.wrong-answer,
.step-quiz .step-answers .answer-button.wrong-answer:has(input:checked) { background: #f8d7da; border-color: #dc3545; }

.step-result-line {
  margin: 10px 0 0;
  font-weight: 700;
}

.step-result-line.is-positive { color: #2c6b35; }
.step-result-line.is-negative { color: #93302a; }
.step-result-line.is-zero { color: #7b7f88; }
.step-quiz-gameshow .step-result-line.is-positive { color: #FFB612; }
.step-quiz-gameshow .step-result-line.is-zero { color: #c9d3f5; }

@media (max-width: 600px) {
  .confidence-options { grid-template-columns: 1fr; }
  .confidence-option { flex-direction: row; justify-content: space-between; min-height: 0; text-align: left; }
  .confidence-option small { white-space: nowrap; text-align: right; }
  .step-quiz { padding: 14px; border-radius: 14px; }
  .step-quiz .question-text { font-size: 19px; }
  .confidence-stakes strong { font-size: 24px; }
}

/* Game Show sudden death: reveal after lock-in */
.gs-lock-in[hidden] { display: none; }

.step-quiz-gameshow .gs-answer.gs-reveal-correct,
.step-quiz-gameshow .gs-answer.gs-reveal-correct:has(input:checked) {
  color: #fff;
  background: #007A4D;
  border-color: #ffffff;
  animation: gs-reveal-flash .9s ease;
}

.step-quiz-gameshow .gs-answer.gs-reveal-wrong,
.step-quiz-gameshow .gs-answer.gs-reveal-wrong:has(input:checked) {
  color: #fff;
  background: #DE3831;
  border-color: #ffffff;
  animation: gs-reveal-shake .5s ease;
}

.step-quiz-gameshow .gs-answer.gs-reveal-correct .gs-letter,
.step-quiz-gameshow .gs-answer.gs-reveal-wrong .gs-letter { color: #fff; }

@keyframes gs-reveal-flash {
  0%, 50% { box-shadow: 0 0 0 rgba(0, 170, 100, 0); }
  25%, 75% { box-shadow: 0 0 24px rgba(0, 170, 100, .8); }
}

@keyframes gs-reveal-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* Game Show: South African flag colours */
.step-quiz-gameshow {
  position: relative;
  overflow: hidden;
  padding-top: 26px;
  background: #002395;
  border-color: #002395;
}

.step-quiz-gameshow::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 8px;
  background: linear-gradient(90deg,
    #DE3831 0 22%, #ffffff 22% 26%, #007A4D 26% 48%, #FFB612 48% 54%,
    #000000 54% 72%, #ffffff 72% 76%, #002395 76% 100%);
}

.step-quiz-gameshow .gs-question {
  background: #000000;
  border: 2px solid #FFB612;
}

.step-quiz-gameshow .gs-answer:hover:not(.is-locked):not(.gs-reveal-correct):not(.gs-reveal-wrong) {
  border-color: #FFB612;
}

.step-quiz-gameshow .gs-lifeline-icon { background: #000000; }
.step-quiz-gameshow .step-result-line.is-positive { color: #FFB612; }

/* Game Show: Springbok look — light grey card, bottle-green answers, gold letters */
.step-quiz-gameshow {
  color: #1d1f23;
  background: #eef0f2;
  border-color: #dcdfe3;
}

.step-quiz-gameshow .step-quiz-heading { color: #4b5058; }
.step-quiz-gameshow .step-quiz-tag { color: #0b4d2c; }
.step-quiz-gameshow .step-question-number { color: #4b5058; }

.step-quiz-gameshow .gs-answer,
.step-quiz-gameshow .gs-answer:has(input:checked) {
  color: #ffffff;
  background: #0b4d2c;
  border: 1.5px solid #0b4d2c;
}

.step-quiz-gameshow .gs-letter { color: #FFB612; }

.step-quiz-gameshow .gs-answer:hover:not(.is-locked):not(.gs-reveal-correct):not(.gs-reveal-wrong) {
  border-color: #FFB612;
}

.step-quiz-gameshow .gs-answer.is-selected,
.step-quiz-gameshow .gs-answer.is-selected:has(input:checked) {
  color: #ffffff;
  background: #8f6800; /* dark gold: keeps white text readable */
  border: 3px solid #0b4d2c;
}

.step-quiz-gameshow .gs-answer.is-selected .gs-letter { color: #ffffff; }

.step-quiz-gameshow .gs-answer.is-locked,
.step-quiz-gameshow .gs-answer.is-locked:has(input:checked) {
  color: #0b4d2c;
  background: #FFB612;
  border-color: #FFB612;
}

.step-quiz-gameshow .gs-answer.is-locked .gs-letter { color: #0b4d2c; }

.step-quiz-gameshow .gs-answer.gs-reveal-correct,
.step-quiz-gameshow .gs-answer.gs-reveal-correct:has(input:checked),
.step-quiz-gameshow .gs-answer.correct-answer,
.step-quiz-gameshow .gs-answer.correct-answer:has(input:checked) {
  color: #ffffff;
  background: #1a9e57;
  border: 3px solid #FFB612;
}

.step-quiz-gameshow .gs-answer.gs-reveal-wrong,
.step-quiz-gameshow .gs-answer.gs-reveal-wrong:has(input:checked),
.step-quiz-gameshow .gs-answer.wrong-answer,
.step-quiz-gameshow .gs-answer.wrong-answer:has(input:checked) {
  color: #ffffff;
  background: #DE3831;
  border: 3px solid #a3241e;
}

.step-quiz-gameshow .gs-answer.gs-reveal-correct .gs-letter,
.step-quiz-gameshow .gs-answer.correct-answer .gs-letter,
.step-quiz-gameshow .gs-answer.gs-reveal-wrong .gs-letter,
.step-quiz-gameshow .gs-answer.wrong-answer .gs-letter { color: #ffffff; }

.step-quiz-gameshow .gs-lifeline { color: #1d1f23; }
.step-quiz-gameshow .gs-lifeline-icon { color: #FFB612; background: #0b4d2c; border-color: #0b4d2c; }
.step-quiz-gameshow .gs-lock-in { color: #0b4d2c; }
.step-quiz-gameshow .gs-status { color: #0b4d2c; font-weight: 600; }
.step-quiz-gameshow.step-quiz-results .step-question { border-bottom-color: #dcdfe3; }
.step-quiz-gameshow .step-result-line.is-positive { color: #0b4d2c; }
.step-quiz-gameshow .step-result-line.is-zero { color: #6b6e75; }
.step-quiz-gameshow .correct-answer-details { color: #ffffff; }

/* Game Show money ladder (horizontal) */
.gs-ladder {
  display: flex;
  gap: 6px;
  margin: 12px 0 4px;
  padding: 2px 2px 6px;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: thin;
}

.gs-ladder-step {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 64px;
  padding: 6px 8px;
  color: #4b5058;
  background: #ffffff;
  border: 1.5px solid #d3d7dc;
  border-radius: 10px;
}

.gs-ladder-number { font-size: 10px; letter-spacing: .04em; }
.gs-ladder-step strong { font-size: 13px; font-weight: 800; white-space: nowrap; }
.gs-ladder-step:last-child strong { color: #8f6800; }

.gs-ladder-step.is-current {
  color: #ffffff;
  background: #8f6800;
  border-color: #0b4d2c;
  box-shadow: 0 0 0 2px #0b4d2c;
}

.gs-ladder-step.is-current strong { color: #ffffff; }
.gs-ladder-step.is-won { color: #ffffff; background: #0b4d2c; border-color: #0b4d2c; }
.gs-ladder-step.is-won strong { color: #FFB612; }
.gs-ladder-step.is-lost { color: #ffffff; background: #DE3831; border-color: #DE3831; }
.gs-ladder-step.is-lost strong { color: #ffffff; text-decoration: line-through; }

@media (max-width: 600px) {
  .gs-ladder-step { min-width: 58px; padding: 5px 6px; }
  .gs-ladder-step strong { font-size: 12px; }
}

/* Safe haven steps on the Game Show ladder */
.gs-ladder-step.is-safe-haven { border: 2px solid #FFB612; }
.gs-ladder-step.is-safe-haven strong::after { content: " ★"; color: #8f6800; }
.gs-ladder-step.is-safe-haven.is-won strong::after,
.gs-ladder-step.is-safe-haven.is-current strong::after { color: #FFB612; }

.gs-lifeline-icon-fifty {
  width: 44px;
  font-size: 11px;
  letter-spacing: -.02em;
  border-radius: 999px;
}

/* Larger Game Show lifelines */
.step-quiz-gameshow .gs-lifelines { gap: 40px; margin-top: 6px; }
.step-quiz-gameshow .gs-lifeline { gap: 6px; font-size: 16px; font-weight: 700; }
.step-quiz-gameshow .gs-lifeline-icon {
  width: 60px;
  height: 60px;
  border-width: 3px;
  font-size: 26px;
}
.step-quiz-gameshow .gs-lifeline-icon-fifty {
  width: 92px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
}
.step-quiz-gameshow .gs-lifeline:not(:disabled):hover .gs-lifeline-icon { transform: scale(1.06); }
.step-quiz-gameshow .gs-lifeline-icon { transition: transform .15s ease; }

/* Ladder fits the screen: one row of equal steps; short amounts (2K … 1M) when narrow, two rows on phones */
.step-quiz-gameshow .gs-ladder {
  display: grid;
  grid-template-columns: repeat(var(--gs-steps, 10), minmax(0, 1fr));
  gap: 5px;
  overflow: visible;
  padding: 2px 0 4px;
}

.step-quiz-gameshow .gs-ladder-step {
  min-width: 0;
  padding: 7px 2px;
  border-radius: 8px;
}

.step-quiz-gameshow .gs-ladder-step strong { font-size: 12px; }
.gs-ladder-short { display: none; }

@media (max-width: 900px) {
  .gs-ladder-full { display: none; }
  .gs-ladder-short { display: inline; }
  .step-quiz-gameshow .gs-ladder-step strong { font-size: 13px; }
}

@media (max-width: 520px) {
  .step-quiz-gameshow .gs-ladder { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .step-quiz-gameshow .gs-ladder-step { padding: 6px 2px; }
}

.gs-ladder-step.is-safe-haven .gs-ladder-short::after { content: " ★"; color: #8f6800; }
.gs-ladder-step.is-safe-haven.is-won .gs-ladder-short::after,
.gs-ladder-step.is-safe-haven.is-current .gs-ladder-short::after { color: #FFB612; }
.gs-ladder-step:last-child .gs-ladder-short { color: #8f6800; }
.gs-ladder-step.is-won:last-child strong,
.gs-ladder-step.is-current:last-child strong { color: #FFB612; }

/* Safe havens: star as a background watermark instead of after the amount */
.gs-ladder-step.is-safe-haven strong::after,
.gs-ladder-step.is-safe-haven .gs-ladder-short::after { content: none; }

.gs-ladder-step { position: relative; overflow: hidden; }
.gs-ladder-step strong { position: relative; z-index: 1; }

.gs-ladder-step.is-safe-haven::before {
  content: "★";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #FFB612;
  font-size: 40px;
  line-height: 1;
  opacity: .35;
  pointer-events: none;
}

.gs-ladder-step.is-safe-haven.is-won::before,
.gs-ladder-step.is-safe-haven.is-current::before { opacity: .3; }

/* Safe haven watermark: 20% smaller, clearer, and fully inside the step */
.step-quiz-gameshow .gs-ladder-step { min-height: 40px; justify-content: center; }
.gs-ladder-step.is-safe-haven::before { font-size: 32px; opacity: .45; }
.gs-ladder-step.is-safe-haven.is-won::before,
.gs-ladder-step.is-safe-haven.is-current::before { opacity: .38; }

/* Game Show: Stop & take */
.gs-walk[hidden] { display: none; }
.gs-walk {
  display: block;
  margin: 18px auto 0;
  padding: 12px 26px;
  color: #ffffff;
  background: #DE3831;
  border: 0;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}
.gs-walk:hover { background: #c22d27; }
.gs-walk-amount { color: #FFB612; }

/* Game Show: Ask the Audience chart */
.gs-audience {
  margin-top: 14px;
  padding: 12px 16px 10px;
  background: #ffffff;
  border: 1px solid #dcdfe3;
  border-radius: 14px;
  text-align: center;
}
.gs-audience-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  grid-auto-flow: column;
  gap: 14px;
  height: 140px;
  align-items: end;
}
.gs-audience-bar {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  gap: 4px;
}
.gs-audience-value { color: #0b4d2c; font-size: 13px; font-weight: 800; }
.gs-audience-fill {
  width: 70%;
  max-width: 48px;
  background: linear-gradient(#FFB612, #8f6800);
  border-radius: 6px 6px 0 0;
}
.gs-audience-bar strong { color: #0b4d2c; font-size: 15px; }
.gs-audience small { display: block; margin-top: 6px; color: #6b6e75; font-size: 12px; }

@media (max-width: 520px) {
  .step-quiz-gameshow .gs-lifelines { gap: 18px; }
  .step-quiz-gameshow .gs-lifeline-icon { width: 54px; height: 54px; font-size: 22px; }
  .step-quiz-gameshow .gs-lifeline-icon-fifty { width: 80px; font-size: 18px; }
  .step-quiz-gameshow .gs-lifeline { font-size: 14px; }
}
