/* =========================================================
   BIBLE TRIVIA WITH SOLOMON
   Main Stylesheet
   ========================================================= */


/* =========================================================
   ROOT / GLOBAL
   ========================================================= */

:root {
  --bg-deep: #07111f;
  --bg-mid: #0c1c31;
  --bg-soft: #112844;

  --panel-dark: rgba(9, 23, 40, 0.94);
  --panel-mid: rgba(16, 40, 68, 0.94);

  --parchment: #f4ead2;
  --parchment-light: #fff8e8;
  --parchment-deep: #dcc79c;

  --gold: #d8b45b;
  --gold-bright: #f3d883;
  --gold-deep: #9a7429;

  --text-light: #f8f5eb;
  --text-soft: #d8deea;
  --text-dark: #162033;
  --text-muted: #8fa0b7;

  --success: #69d8a3;
  --success-bg: rgba(40, 140, 92, 0.16);

  --gentle-wrong: #f0c570;
  --gentle-wrong-bg: rgba(191, 128, 48, 0.16);

  --border-gold: rgba(216, 180, 91, 0.42);
  --border-soft: rgba(255, 255, 255, 0.12);

  --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.24);
  --shadow-card: 0 16px 36px rgba(0, 0, 0, 0.28);
  --shadow-gold: 0 0 30px rgba(216, 180, 91, 0.16);

  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;

  --max-width: 1180px;
}


* {
  box-sizing: border-box;
}


html {
  min-height: 100%;
  scroll-behavior: smooth;
}


body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  color: var(--text-light);

  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(57, 102, 160, 0.24),
      transparent 42%
    ),
    linear-gradient(
      180deg,
      var(--bg-mid) 0%,
      var(--bg-deep) 55%,
      #040b14 100%
    );

  overflow-x: hidden;
}


button,
input,
a {
  font: inherit;
}


button,
a {
  -webkit-tap-highlight-color: transparent;
}


button {
  cursor: pointer;
}


button:disabled {
  cursor: default;
}


a {
  color: inherit;
}


img {
  max-width: 100%;
  display: block;
}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 9999;

  padding: 10px 14px;

  color: var(--text-dark);
  background: var(--parchment-light);

  border-radius: 8px;

  transform: translateY(-180%);
  transition: transform 0.2s ease;
}


.skip-link:focus {
  transform: translateY(0);
}


button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 4px;
}


/* =========================================================
   BACKGROUND DECORATION
   ========================================================= */

.page-glow {
  position: fixed;
  z-index: -1;

  width: 420px;
  height: 420px;

  border-radius: 50%;

  filter: blur(70px);
  opacity: 0.18;

  pointer-events: none;
}


.page-glow-left {
  top: 18%;
  left: -190px;

  background: #2c72ba;
}


.page-glow-right {
  top: 52%;
  right: -210px;

  background: #d1a342;
}


/* =========================================================
   TOP BAR
   ========================================================= */

.trivia-topbar {
  position: sticky;
  top: 0;
  z-index: 50;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;

  min-height: 66px;

  padding:
    max(12px, env(safe-area-inset-top))
    24px
    12px;

  background: rgba(5, 15, 27, 0.94);

  border-bottom: 1px solid var(--border-gold);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}


.return-solomon-link,
.feedback-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  width: fit-content;

  text-decoration: none;
  font-weight: 700;
  font-size: 0.94rem;

  color: var(--gold-bright);

  transition:
    color 0.2s ease,
    transform 0.2s ease;
}


.return-solomon-link:hover,
.feedback-link:hover {
  color: #fff0b4;
  transform: translateY(-1px);
}


.feedback-link {
  justify-self: end;
}


.return-arrow {
  font-size: 1.2rem;
}


.topbar-title {
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
}


/* =========================================================
   MAIN LAYOUT
   ========================================================= */

.game-page {
  width: 100%;
  padding:
    34px
    20px
    max(42px, env(safe-area-inset-bottom));
}


.game-shell {
  width: min(100%, var(--max-width));
  margin: 0 auto;
}


/* =========================================================
   BRAND / TITLE AREA
   ========================================================= */

.game-brand {
  position: relative;

  max-width: 840px;
  margin: 12px auto 34px;
  padding: 30px 24px 28px;

  text-align: center;

  background:
    linear-gradient(
      180deg,
      rgba(24, 51, 83, 0.95),
      rgba(9, 26, 45, 0.95)
    );

  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);

  box-shadow:
    var(--shadow-card),
    var(--shadow-gold);

  overflow: hidden;
}
.game-cross {
  display: block;
  width: min(180px, 42vw);
  height: auto;
  margin: 0 auto 18px;
  object-fit: contain;

  filter:
    drop-shadow(0 0 10px rgba(255, 188, 74, 0.38))
    drop-shadow(0 0 22px rgba(255, 143, 32, 0.22));
}


.game-brand::before,
.game-brand::after {
  content: "";
  position: absolute;

  width: 180px;
  height: 180px;

  border: 1px solid rgba(216, 180, 91, 0.22);
  border-radius: 50%;

  pointer-events: none;
}


.game-brand::before {
  top: -115px;
  left: -45px;
}


.game-brand::after {
  right: -55px;
  bottom: -125px;
}


.brand-eyebrow {
  margin-bottom: 10px;

  color: var(--gold-bright);

  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}


.game-title {
  margin: 0;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  color: var(--parchment-light);

  font-size: clamp(2.5rem, 7vw, 5.6rem);
  line-height: 0.94;

  letter-spacing: -0.035em;

  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.22),
    0 0 32px rgba(216, 180, 91, 0.14);
}


.game-title-small {
  display: block;

  margin-top: 12px;

  color: var(--gold-bright);

  font-size: 0.42em;
  font-style: italic;
  font-weight: 600;
  letter-spacing: 0.01em;
}


.game-subtitle {
  max-width: 650px;
  margin: 20px auto 0;

  color: var(--text-soft);

  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.65;
}


/* =========================================================
   SHARED SCREEN LAYOUT
   ========================================================= */

.game-screen {
  animation: screenFade 0.34s ease;
}


.game-screen[hidden] {
  display: none !important;
}


@keyframes screenFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.screen-heading {
  max-width: 720px;
  margin: 0 auto 28px;

  text-align: center;
}


.screen-kicker {
  margin: 0 0 8px;

  color: var(--gold-bright);

  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}


.screen-heading h2,
.completion-card h2,
.finale-card h2 {
  margin: 0;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  color: var(--parchment-light);

  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.06;
}


.screen-description {
  margin: 14px auto 0;

  color: var(--text-soft);

  font-size: 1.06rem;
  line-height: 1.6;
}


/* =========================================================
   WELCOME CARD
   ========================================================= */

.welcome-card {
  max-width: 720px;
  margin: 0 auto;

  padding: clamp(28px, 5vw, 48px);

  text-align: center;

  color: var(--text-dark);

  background:
    linear-gradient(
      180deg,
      var(--parchment-light),
      var(--parchment)
    );

  border: 1px solid rgba(216, 180, 91, 0.65);
  border-radius: var(--radius-xl);

  box-shadow:
    var(--shadow-soft),
    0 0 0 6px rgba(216, 180, 91, 0.045);
}


.solomon-medallion {
  display: grid;
  place-items: center;

  width: 86px;
  height: 86px;

  margin: -4px auto 22px;

  color: var(--gold-bright);

  background:
    radial-gradient(
      circle at 35% 28%,
      #214873,
      #0c2139 70%
    );

  border: 3px solid var(--gold);

  border-radius: 50%;

  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.22),
    inset 0 0 18px rgba(255, 255, 255, 0.05);
}


.medallion-crown {
  font-size: 2.7rem;
  line-height: 1;
}


.welcome-card h2 {
  margin: 0;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.08;

  color: #18253a;
}


.welcome-intro {
  max-width: 560px;
  margin: 16px auto 30px;

  color: #425069;

  font-size: 1.07rem;
  line-height: 1.65;
}


/* =========================================================
   NAME ENTRY
   ========================================================= */

.name-entry {
  max-width: 500px;
  margin: 0 auto;

  text-align: left;
}


.name-entry label {
  display: block;

  margin-bottom: 9px;

  color: #1b2b43;

  font-weight: 800;
}


.name-entry input {
  width: 100%;
  min-height: 54px;

  padding: 0 16px;

  color: #162033;
  background: #fffefa;

  border: 2px solid #cbb786;
  border-radius: var(--radius-sm);

  font-size: 1rem;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}


.name-entry input:focus {
  border-color: var(--gold-deep);

  box-shadow: 0 0 0 4px rgba(216, 180, 91, 0.18);

  outline: none;
}


.field-help {
  margin: 8px 0 0;

  color: #68748a;

  font-size: 0.88rem;
}


/* =========================================================
   PARENT NOTICE
   ========================================================= */

.parent-note {
  max-width: 560px;
  margin: 24px auto 26px;
  padding: 15px 17px;

  color: #3c4b62;
  background: rgba(213, 194, 150, 0.25);

  border: 1px solid rgba(154, 116, 41, 0.28);
  border-radius: var(--radius-sm);

  font-size: 0.88rem;
  line-height: 1.55;

  text-align: left;
}


.parent-note strong {
  color: #26354a;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.primary-game-btn,
.secondary-game-btn,
.quiet-btn {
  border: 0;

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}


.primary-game-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  min-height: 54px;

  padding: 0 24px;

  color: #172233;

  background:
    linear-gradient(
      180deg,
      #f5dd93,
      #d2aa50
    );

  border: 1px solid #f1d988;
  border-radius: 999px;

  font-weight: 900;

  box-shadow:
    0 10px 24px rgba(102, 74, 19, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}


.primary-game-btn:hover {
  transform: translateY(-2px);

  box-shadow:
    0 14px 26px rgba(102, 74, 19, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}


.primary-game-btn:active {
  transform: translateY(0);
}


.button-arrow {
  font-size: 1.12rem;
}


.secondary-game-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 50px;

  padding: 0 22px;

  color: var(--gold-bright);
  background: rgba(255, 255, 255, 0.04);

  border: 1px solid var(--border-gold);
  border-radius: 999px;

  font-weight: 800;
}


.secondary-game-btn:hover {
  background: rgba(216, 180, 91, 0.09);
  border-color: rgba(243, 216, 131, 0.7);

  transform: translateY(-1px);
}


.link-button {
  text-decoration: none;
}


.compact-btn {
  min-height: 50px;
}


.quiet-btn {
  padding: 9px 12px;

  color: var(--text-soft);
  background: transparent;

  border: 1px solid var(--border-soft);
  border-radius: 999px;

  font-weight: 700;
}


.quiet-btn:hover {
  color: var(--gold-bright);
  border-color: var(--border-gold);
}


/* =========================================================
   CROWN PROGRESS CARD
   ========================================================= */

.crown-progress-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 20px;

  max-width: 780px;

  margin: 0 auto 30px;
  padding: 18px 22px;

  background:
    linear-gradient(
      135deg,
      rgba(26, 56, 92, 0.94),
      rgba(11, 30, 52, 0.94)
    );

  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);

  box-shadow: var(--shadow-card);
}


.crown-display {
  position: relative;

  display: grid;
  place-items: center;

  min-width: 92px;
  min-height: 76px;
}


.crown-symbol {
  color: var(--gold);

  font-size: 4.4rem;
  line-height: 1;

  text-shadow: 0 0 22px rgba(216, 180, 91, 0.22);
}


.crown-jewels {
  position: absolute;

  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px;

  width: 72px;

  bottom: 15px;
}


.crown-jewel {
  width: 7px;
  height: 7px;

  background: #3f526b;

  border-radius: 50%;

  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);

  transition:
    background 0.35s ease,
    transform 0.35s ease,
    box-shadow 0.35s ease;
}


.crown-jewel.earned {
  background: var(--gold-bright);

  transform: scale(1.18);

  box-shadow:
    0 0 9px rgba(243, 216, 131, 0.9);
}


.crown-progress-copy {
  display: grid;
  gap: 5px;
}


.crown-progress-copy strong {
  color: var(--parchment-light);

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size: 1.25rem;
}


.crown-progress-copy span {
  color: var(--text-soft);

  font-size: 0.94rem;
  line-height: 1.45;
}


/* =========================================================
   LEVEL GRID
   ========================================================= */

.level-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}


.level-card {
  position: relative;

  min-height: 190px;

  padding: 24px;

  text-align: left;

  color: var(--text-light);

  background:
    linear-gradient(
      145deg,
      rgba(22, 53, 88, 0.97),
      rgba(9, 28, 49, 0.97)
    );

  border: 1px solid rgba(216, 180, 91, 0.28);
  border-radius: var(--radius-lg);

  box-shadow: var(--shadow-card);

  overflow: hidden;

  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}


.level-card::before {
  content: "";

  position: absolute;
  inset: 0;

  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(216, 180, 91, 0.13),
      transparent 38%
    );

  pointer-events: none;
}


.level-card:not(:disabled):hover {
  transform: translateY(-4px);

  border-color: rgba(243, 216, 131, 0.7);

  box-shadow:
    0 22px 38px rgba(0, 0, 0, 0.32),
    0 0 28px rgba(216, 180, 91, 0.08);
}


.level-number,
.level-name,
.level-focus,
.level-status {
  position: relative;
  z-index: 1;

  display: block;
}


.level-number {
  margin-bottom: 8px;

  color: var(--gold-bright);

  font-size: 0.77rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}


.level-name {
  margin-bottom: 10px;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  color: var(--parchment-light);

  font-size: 1.48rem;
  font-weight: 700;
  line-height: 1.14;
}


.level-focus {
  max-width: 94%;

  color: var(--text-soft);

  font-size: 0.94rem;
  line-height: 1.5;
}


.level-status {
  margin-top: 20px;

  color: #a9d9c3;

  font-size: 0.84rem;
  font-weight: 800;
}


.level-card.locked {
  color: #9ca9b8;

  background:
    linear-gradient(
      145deg,
      rgba(18, 33, 50, 0.74),
      rgba(7, 20, 34, 0.74)
    );

  border-color: rgba(255, 255, 255, 0.07);

  box-shadow: none;

  opacity: 0.7;
}


.level-card.locked .level-number,
.level-card.locked .level-name,
.level-card.locked .level-focus,
.level-card.locked .level-status {
  color: #8996a7;
}


.level-card.completed {
  border-color: rgba(216, 180, 91, 0.62);

  box-shadow:
    var(--shadow-card),
    0 0 20px rgba(216, 180, 91, 0.11);
}


.level-card.completed .level-status {
  color: var(--gold-bright);
}


.final-level:not(.locked) {
  background:
    linear-gradient(
      145deg,
      rgba(61, 47, 89, 0.96),
      rgba(19, 30, 55, 0.96)
    );
}


/* =========================================================
   QUESTION STATUS
   ========================================================= */

.question-status {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;

  margin-bottom: 14px;
}


.question-progress-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  color: var(--text-soft);

  font-size: 0.92rem;
  font-weight: 700;
}


.star-counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  min-width: 54px;

  justify-content: center;

  padding: 8px 12px;

  color: var(--gold-bright);
  background: rgba(216, 180, 91, 0.08);

  border: 1px solid rgba(216, 180, 91, 0.28);
  border-radius: 999px;

  font-weight: 900;
}


/* =========================================================
   PROGRESS BAR
   ========================================================= */

.progress-track {
  width: 100%;
  height: 9px;

  margin-bottom: 24px;

  background: rgba(255, 255, 255, 0.08);

  border-radius: 999px;

  overflow: hidden;
}


.progress-fill {
  width: 10%;
  height: 100%;

  background:
    linear-gradient(
      90deg,
      var(--gold-deep),
      var(--gold-bright)
    );

  border-radius: inherit;

  box-shadow: 0 0 16px rgba(243, 216, 131, 0.3);

  transition: width 0.35s ease;
}


/* =========================================================
   QUESTION CARD
   ========================================================= */

.question-card {
  padding: clamp(24px, 4vw, 42px);

  color: var(--text-dark);

  background:
    linear-gradient(
      180deg,
      var(--parchment-light),
      var(--parchment)
    );

  border: 1px solid rgba(216, 180, 91, 0.68);
  border-radius: var(--radius-xl);

  box-shadow:
    var(--shadow-soft),
    0 0 0 6px rgba(216, 180, 91, 0.035);
}


.question-level-name {
  margin-bottom: 14px;

  color: #89651f;

  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}


.question-text {
  max-width: 900px;
  margin: 0 0 28px;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  color: #152239;

  font-size: clamp(1.65rem, 4vw, 2.65rem);
  line-height: 1.2;
}


/* =========================================================
   ANSWER GRID
   ========================================================= */

.answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}


.answer-btn {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;

  min-height: 76px;

  padding: 12px 16px;

  color: #1b2940;
  background: rgba(255, 255, 255, 0.68);

  border: 2px solid #d2c19b;
  border-radius: var(--radius-md);

  text-align: left;

  box-shadow:
    0 6px 14px rgba(58, 45, 24, 0.05);

  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}


.answer-btn:hover:not(:disabled) {
  transform: translateY(-2px);

  background: #fffefa;
  border-color: #b89448;

  box-shadow:
    0 8px 18px rgba(58, 45, 24, 0.1);
}


.answer-letter {
  display: grid;
  place-items: center;

  width: 38px;
  height: 38px;

  color: var(--gold-bright);
  background: #193352;

  border-radius: 50%;

  font-size: 0.92rem;
  font-weight: 900;
}


.answer-text {
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.35;
}


.answer-btn.correct-answer {
  color: #17382a;
  background: rgba(105, 216, 163, 0.22);

  border-color: #58b98b;

  box-shadow:
    0 0 0 3px rgba(105, 216, 163, 0.12);
}


.answer-btn.correct-answer .answer-letter {
  color: #102b20;
  background: var(--success);
}


.answer-btn.incorrect-answer {
  color: #55421a;
  background: rgba(240, 197, 112, 0.23);

  border-color: #c79c48;
}


.answer-btn.incorrect-answer .answer-letter {
  color: #34240c;
  background: var(--gentle-wrong);
}


.answer-btn:disabled {
  opacity: 0.92;
}


/* =========================================================
   SOLOMON RESPONSE
   ========================================================= */

.solomon-response {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;

  margin-top: 20px;
  padding: 20px 22px;

  background:
    linear-gradient(
      145deg,
      rgba(17, 44, 73, 0.96),
      rgba(8, 25, 44, 0.96)
    );

  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);

  box-shadow: var(--shadow-card);

  animation: responsePop 0.28s ease;
}


@keyframes responsePop {
  from {
    opacity: 0;
    transform: translateY(7px) scale(0.99);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


.response-icon {
  display: grid;
  place-items: center;

  width: 52px;
  height: 52px;

  color: var(--gold-bright);
  background: rgba(216, 180, 91, 0.11);

  border: 1px solid rgba(216, 180, 91, 0.32);
  border-radius: 50%;

  font-size: 1.45rem;
}


.response-copy h3 {
  margin: 0 0 6px;

  color: var(--parchment-light);

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size: 1.4rem;
}


.response-copy p {
  margin: 0;

  color: var(--text-soft);

  line-height: 1.55;
}


.response-scripture {
  margin-top: 8px !important;

  color: var(--gold-bright) !important;

  font-size: 0.88rem;
  font-weight: 700;
}


.solomon-response.correct-response {
  border-color: rgba(105, 216, 163, 0.42);
}


.solomon-response.correct-response .response-icon {
  color: #9bf0c5;
  background: var(--success-bg);

  border-color: rgba(105, 216, 163, 0.4);
}


.solomon-response.gentle-response {
  border-color: rgba(240, 197, 112, 0.42);
}


.solomon-response.gentle-response .response-icon {
  color: #f2d792;
  background: var(--gentle-wrong-bg);

  border-color: rgba(240, 197, 112, 0.4);
}


/* =========================================================
   NEXT QUESTION
   ========================================================= */

.next-question-wrap {
  margin-top: 18px;

  text-align: center;
}


/* =========================================================
   COMPLETION CARD
   ========================================================= */

.completion-card,
.finale-card {
  max-width: 790px;
  margin: 0 auto;

  padding: clamp(30px, 5vw, 52px);

  text-align: center;

  background:
    linear-gradient(
      145deg,
      rgba(20, 49, 81, 0.97),
      rgba(7, 25, 44, 0.97)
    );

  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);

  box-shadow:
    var(--shadow-soft),
    var(--shadow-gold);
}


.completion-celebration {
  position: relative;

  width: 170px;
  height: 115px;

  margin: 0 auto 14px;
}


.completion-crown {
  position: absolute;
  inset: 10px 0 auto;

  color: var(--gold-bright);

  font-size: 5.5rem;
  line-height: 1;

  text-shadow:
    0 0 24px rgba(243, 216, 131, 0.3);

  animation: crownGlow 1.7s ease-in-out infinite alternate;
}


@keyframes crownGlow {
  from {
    transform: scale(1);
    filter: brightness(1);
  }

  to {
    transform: scale(1.035);
    filter: brightness(1.12);
  }
}


.celebration-star {
  position: absolute;

  color: var(--gold-bright);

  font-size: 1.1rem;

  animation: twinkle 1.7s ease-in-out infinite alternate;
}


.star-one {
  left: 15px;
  top: 12px;
}


.star-two {
  right: 16px;
  top: 23px;

  animation-delay: 0.25s;
}


.star-three {
  left: 76px;
  top: -4px;

  animation-delay: 0.5s;
}


@keyframes twinkle {
  from {
    opacity: 0.45;
    transform: scale(0.86);
  }

  to {
    opacity: 1;
    transform: scale(1.18);
  }
}


.completion-card > p:not(.screen-kicker) {
  max-width: 590px;
  margin: 15px auto 0;

  color: var(--text-soft);

  line-height: 1.6;
}


/* =========================================================
   RESULT BADGE
   ========================================================= */

.result-badge,
.jewel-earned {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;

  max-width: 520px;

  margin: 24px auto 0;
  padding: 16px 18px;

  text-align: left;

  background: rgba(255, 255, 255, 0.045);

  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
}


.result-badge-icon,
.earned-jewel-icon {
  display: grid;
  place-items: center;

  width: 48px;
  height: 48px;

  color: var(--gold-bright);
  background: rgba(216, 180, 91, 0.12);

  border: 1px solid rgba(216, 180, 91, 0.34);
  border-radius: 50%;

  font-size: 1.4rem;
}


.result-badge strong,
.jewel-earned strong {
  display: block;

  margin-bottom: 4px;

  color: var(--parchment-light);
}


.result-badge span:last-child,
.jewel-earned span:last-child {
  color: var(--text-soft);

  font-size: 0.9rem;
}


/* =========================================================
   COMPLETION ACTIONS
   ========================================================= */

.completion-actions,
.final-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;

  margin-top: 30px;
}


/* =========================================================
   FINAL SCREEN
   ========================================================= */

.finale-card {
  position: relative;

  overflow: hidden;
}


.finale-card::before {
  content: "";

  position: absolute;
  inset: -20%;

  z-index: 0;

  background:
    radial-gradient(
      circle at center,
      rgba(216, 180, 91, 0.14),
      transparent 48%
    );

  pointer-events: none;
}


.finale-card > * {
  position: relative;
  z-index: 1;
}


.finale-stars {
  display: flex;
  justify-content: center;
  gap: 12px;

  margin-bottom: 10px;

  color: var(--gold-bright);

  font-size: 1.15rem;
}


.finale-stars span:nth-child(2),
.finale-stars span:nth-child(4) {
  transform: translateY(-8px);
}


.final-crown {
  margin-bottom: 18px;

  color: var(--gold-bright);

  font-size: clamp(5rem, 12vw, 8rem);
  line-height: 0.9;

  text-shadow:
    0 0 36px rgba(243, 216, 131, 0.3);
}


.finale-lead {
  max-width: 620px;
  margin: 18px auto 0;

  color: var(--text-soft);

  font-size: 1.07rem;
  line-height: 1.65;
}


.final-solomon-message {
  max-width: 620px;

  margin: 28px auto 0;
  padding: 20px 22px;

  text-align: left;

  background: rgba(255, 255, 255, 0.045);

  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}


.final-solomon-message strong {
  color: var(--gold-bright);
}


.final-solomon-message p {
  margin: 8px 0 0;

  color: var(--text-soft);

  line-height: 1.6;
}


/* =========================================================
   FOOTER
   ========================================================= */

.trivia-footer {
  padding: 34px 12px 6px;

  text-align: center;

  color: var(--text-muted);

  font-size: 0.84rem;
}


.trivia-footer p {
  margin: 0 0 9px;
}


.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}


.footer-links a {
  color: #c4ae71;

  text-decoration: none;
}


.footer-links a:hover {
  color: var(--gold-bright);
  text-decoration: underline;
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;

    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;

    transition-duration: 0.001ms !important;
  }

}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 860px) {

  .trivia-topbar {
    grid-template-columns: 1fr 1fr;
  }

  .topbar-title {
    display: none;
  }

  .level-grid {
    grid-template-columns: 1fr;
  }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 640px) {

  .trivia-topbar {
    min-height: 60px;

    padding-left: 14px;
    padding-right: 14px;

    gap: 10px;
  }


  .return-solomon-link,
  .feedback-link {
    font-size: 0.82rem;
  }


  .feedback-link {
    text-align: right;
  }


  .game-page {
    padding:
      22px
      12px
      max(34px, env(safe-area-inset-bottom));
  }


  .game-brand {
    margin-top: 4px;
    margin-bottom: 22px;

    padding: 24px 16px 22px;

    border-radius: 22px;
  }


  .brand-eyebrow {
    font-size: 0.67rem;
    letter-spacing: 0.12em;
  }


  .game-title {
    font-size: clamp(2.4rem, 15vw, 4.25rem);
  }


  .game-title-small {
    margin-top: 9px;
  }


  .game-subtitle {
    font-size: 0.98rem;
  }


  .welcome-card,
  .question-card,
  .completion-card,
  .finale-card {
    border-radius: 22px;
  }


  .welcome-card {
    padding: 28px 18px;
  }


  .solomon-medallion {
    width: 72px;
    height: 72px;
  }


  .medallion-crown {
    font-size: 2.25rem;
  }


  .crown-progress-card {
    grid-template-columns: 1fr;

    text-align: center;
  }


  .crown-progress-copy {
    justify-items: center;
  }


  .level-card {
    min-height: 170px;

    padding: 21px;
  }


  .question-status {
    grid-template-columns: auto 1fr auto;
    gap: 8px;
  }


  .question-progress-copy {
    display: grid;
    gap: 1px;

    font-size: 0.75rem;
    text-align: center;
  }


  .question-progress-copy span[aria-hidden="true"] {
    display: none;
  }


  .quiet-btn {
    padding: 8px 10px;

    font-size: 0.79rem;
  }


  .star-counter {
    min-width: 48px;

    padding: 7px 9px;

    font-size: 0.84rem;
  }


  .question-card {
    padding: 24px 16px;
  }


  .question-text {
    margin-bottom: 22px;

    font-size: clamp(1.55rem, 8vw, 2.05rem);
  }


  .answer-grid {
    grid-template-columns: 1fr;
    gap: 11px;
  }


  .answer-btn {
    min-height: 68px;

    grid-template-columns: 38px 1fr;

    padding: 10px 13px;
  }


  .answer-letter {
    width: 35px;
    height: 35px;
  }


  .solomon-response {
    grid-template-columns: 1fr;

    padding: 18px;

    text-align: center;
  }


  .response-icon {
    margin: 0 auto;
  }


  .completion-actions,
  .final-actions {
    display: grid;
    grid-template-columns: 1fr;
  }


  .completion-actions > *,
  .final-actions > * {
    width: 100%;
  }


  .result-badge,
  .jewel-earned {
    grid-template-columns: 1fr;

    text-align: center;
  }


  .result-badge-icon,
  .earned-jewel-icon {
    margin: 0 auto;
  }

}


/* =========================================================
   VERY SMALL DEVICES
   ========================================================= */

@media (max-width: 390px) {

  .return-solomon-link span:last-child {
    display: none;
  }


  .return-solomon-link {
    min-width: 38px;
    justify-content: center;

    font-size: 1.1rem;
  }


  .feedback-link {
    font-size: 0.76rem;
  }


  .game-title {
    font-size: 2.55rem;
  }


  .level-name {
    font-size: 1.32rem;
  }

}

 


/* =========================================================
   FORCE HIDDEN GAME ELEMENTS TO STAY HIDDEN
   Prevents unused answer buttons from carrying over
   between multiple-choice and true/false questions.
   ========================================================= */

.answer-btn[hidden],
#fill-blank-wrap[hidden] {
  display: none !important;
}
