/* ==========================================================================
   Jeevan Dharma - base stylesheet
   Responsive overrides live in responsive.css. Order:
   1. Tokens & reset
   2. Layout shell & screens
   3. Component styles (landing, quiz, result, account, modals)
   ========================================================================== */

@font-face {
  font-family: "Greyhound";
  src: url("../font/greyhoundbold.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Cinzel";
  src: url("../font/Cinzel-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Norma";
  src: url("../font/norma-compr.ttf") format("truetype");
  font-display: swap;
}

/* @font-face {
  font-family: "Norma";
  src: url("../font/Norma Gothic CG Demi Regular.otf") format("opentype");
  font-display: swap;
} */

:root {
  --app-height: 100svh;
  --app-height-fallback: 100vh;
  --design-width: 402;
  --design-height: 874;
  --game-action-button-height: clamp(48px, 8.3svh, 72px);
  --game-action-button-width: min(286px, calc(var(--game-action-button-height) * 3.972));
  --copy-shadow: 0 2px 0 rgba(0, 0, 0, 0.8), 0 4px 10px rgba(0, 0, 0, 0.45);
  --gold: #f4c36b;
  --cream: #fff6d8;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --frame-inset: clamp(28px, 5.5vw, 80px);
  --content-gutter: clamp(12px, 3.2vw, 28px);
  --device-max-width: 450px;
  --device-aspect: 2.174;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  min-height: var(--app-height-fallback);
  min-height: var(--app-height);
  overflow: hidden;
  color: #fff;
  background: url('../img/bg_new.webp??') repeat;
  background-size: 450px;
  font-family: "Greyhound", Georgia, serif;
  user-select: none;
  touch-action: manipulation;
}

html, body {
    touch-action: manipulation;
    overflow: hidden;
}
body {
  touch-action: pan-x pan-y;
}

/* body{
    background:
        url("../img/bg_new_v1.webp") repeat-x bottom center,
        linear-gradient(to bottom,#3b1f0d,#6a3b18,#3b1f0d);
} */

body{
    background:url("../img/bg_new_v1.webp");
    background-size:100% 100%;
    background-position:bottom top;
    background-repeat:no-repeat;
    background-color:#4a250f;
}

button {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
  -webkit-user-drag: none;
}

.page {
  min-height: 100vh;
  min-height: var(--app-height);
  display: block;
  padding: 0;
}

.device-frame {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: var(--app-height);
  overflow: hidden;
}

.app-shell {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #150905;
  isolation: isolate;
}

.screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.landing-screen,
.quiz-screen,
.result-screen,
.account-screen,
.podcast-screen {
  transition: opacity 360ms ease, transform 440ms ease, visibility 0s linear 440ms;
}

.landing-screen {
  z-index: 2;
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.quiz-screen,
.result-screen,
.account-screen,
.podcast-screen {
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  transform: translateX(8%) scale(1.02);
}

.app-shell[data-active-screen="quiz"] .landing-screen {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-8%) scale(0.985);
}

.app-shell[data-active-screen="quiz"] .quiz-screen {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
  transition-delay: 80ms, 80ms, 0s;
}

.app-shell[data-active-screen="result"] .landing-screen,
.app-shell[data-active-screen="result"] .quiz-screen {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-8%) scale(0.985);
}

.app-shell[data-active-screen="result"] .result-screen {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
  transition-delay: 80ms, 80ms, 0s;
}

.app-shell[data-active-screen="account"] .landing-screen,
.app-shell[data-active-screen="account"] .quiz-screen,
.app-shell[data-active-screen="account"] .result-screen {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-8%) scale(0.985);
}

.app-shell[data-active-screen="account"] .account-screen {
  z-index: 3;
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
  transition-delay: 80ms, 80ms, 0s;
}

.app-shell[data-active-screen="podcast"] .landing-screen,
.app-shell[data-active-screen="podcast"] .quiz-screen,
.app-shell[data-active-screen="podcast"] .result-screen,
.app-shell[data-active-screen="podcast"] .account-screen {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-8%) scale(0.985);
}

.app-shell[data-active-screen="podcast"] .podcast-screen {
  z-index: 3;
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
  transition-delay: 80ms, 80ms, 0s;
}

.landing-backdrop,
.landing-vignette {
  position: absolute;
  inset: 0;
}

.landing-backdrop {
  background: url("../img/landing_bg.jpg") center / cover no-repeat;
}

.landing-vignette {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.24) 0%, rgba(0, 0, 0, 0.02) 26%, rgba(0, 0, 0, 0.03) 60%, rgba(0, 0, 0, 0.65) 100%),
    radial-gradient(circle at 55% 36%, rgba(255, 239, 135, 0.16), transparent 19%);
  pointer-events: none;
}

.landing-content {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12.7% 0 12.3%;
}

.hero-copy {
  width: 100%;
  text-align: center;
}

.hero-logo {
  width: 79.1%;
  margin: 0 auto;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.65));
}

.hero-subtitle {
  margin: 11px 0 0;
  color: #f7efe6;
  font-family: "Norma", Impact, sans-serif;
  font-size: clamp(25px, 7.45vw, 34px);
  line-height: 1;
  letter-spacing: 1px;
  text-shadow: var(--copy-shadow);
}

.landing-message {
  width: 100%;
  margin: 0;
  padding-bottom: 0;
  text-align: center;
}

.landing-message h1 {
  margin: 0;
  font-family: "Norma", "Greyhound", serif;
  font-size: clamp(25px, 7.1vw, 32px);
  line-height: 1.18;
  color: #fff;
  text-shadow: var(--copy-shadow);
}

.landing-meter {
  position: relative;
  width: 94%;
  height: auto;
  display: grid;
  place-items: start center;
}

.reputation-line {
  display: block;
  width: 93.8%;
  margin-top: 0px;
}

.image-button {
  position: relative;
  display: block;
  width: min(var(--game-action-button-width), calc(100vw - 32px), 100%);
  height: var(--game-action-button-height);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  filter: drop-shadow(0 12px 12px rgba(0, 0, 0, 0.45));
  transition: transform 150ms ease, filter 150ms ease, opacity 150ms ease;
}

.image-button img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
}

.image-button span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-top: 1px;
  font-family: "Norma", Impact, sans-serif;
  font-size: clamp(25px, 7vw, 32px);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 2px 0 rgba(102, 31, 0, 0.9), 0 4px 8px rgba(42, 9, 0, 0.7);
}

.image-button:active {
  transform: scale(0.985);
}

.start-journey {
  margin: 4px auto 0;
}

.start-journey span {
  z-index: 2;
  display: grid;
  color: #fff4cd;
  font-family: "Norma", serif;
  font-size: clamp(22px, 5.8vw, 32px);
  text-shadow: var(--copy-shadow);
  pointer-events: none;
}



.quiz-content {
  position: relative;
  container-type: inline-size;
  height: 100%;
  display: flex;
  flex-direction: column;
  /* padding: 0 0 2.2%; */
  background: #15161c;
  /* background:
    linear-gradient(180deg, #1d0d05 0%, #3b1c0c 10%, #311508 100%); */
}
.quiz-frame{
  width: 100%;
            height: 100%;
            margin: 0;
            overflow: hidden;
            background: #3a0000;
            position: relative;
}

.quiz-frame::before {

            content: "";
            position: fixed;
            inset: 0;
            pointer-events: none;
            z-index: 1000;
            border-style: solid;
            border-width: 80px;
            border-image-slice: 50 60 50 60 fill;
            border-image-width: 50px;
            border-image-repeat: stretch;
            border-image-source: url("../img/frame.webp");
            box-sizing: border-box;
}

/* .quiz-content::before,
.quiz-content::after {
  content: "";
  position: absolute;
  z-index: 4;
  pointer-events: none;
} */

/* .quiz-content::before {
  inset: 0;
  background:
    url("../img/scene_border_left_right.webp") left bottom / 9px 90% no-repeat,
    url("../img/scene_border_left_right.webp") right bottom / 9px 90% no-repeat;
  background:
    url("../img/scene_border_left_right.webp") left bottom / 2.29cqw 90% no-repeat,
    url("../img/scene_border_left_right.webp") right bottom / 2.29cqw 90% no-repeat;
} */

/* .quiz-content::after {
  left: 0;
  right: 0;
  bottom: -3px;
  height: 15px;
  height: 3.58cqw;
  background: url("../img/scene_border_bottom.webp") center bottom / 100% 100% no-repeat;
} */

.result-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(214, 156, 55, 0.26), transparent 34%),
    /* linear-gradient(180deg, rgba(10, 4, 2, 0.28) 0%, rgba(14, 7, 4, 0.66) 48%, rgba(8, 3, 1, 0.94) 100%), */
    url("../img/landing_bg.jpg") center / cover no-repeat;
  filter: saturate(0.82) brightness(0.50);
}

.result-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  border-style: solid;
  border-width: 80px;
  border-image-slice: 50 60 50 60 fill;
  border-image-width: 50px;
  border-image-repeat: stretch;
  border-image-source: url("../img/frame.webp");
  box-sizing: border-box;
}

.result-content {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: clamp(18px, 5vw, 44px);
}

.result-panel {
  position: relative;
  width: min(88vw, 430px);
  max-height: calc(100% - 12px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: clamp(30px, 10vh, 30px) clamp(18px, 5vw, 15px) clamp(20px, 4vh, 15px);
  border-style: solid;
  border-width: 60px 20px 40px 20px;
  border-image-slice: 290 71 200 71 fill;
  border-image-width: 80px 20px 50px 20px;
  border-image-outset: 0px 0px 0px 0px;
  border-image-repeat: stretch stretch;
  border-image-source: url("../img/chapter_summary_bg.webp");
  box-sizing: border-box;
  /* background:
    linear-gradient(180deg, rgba(18, 31, 24, 0.96), rgba(7, 14, 10, 0.98)),
    repeating-linear-gradient(90deg, rgba(255, 212, 111, 0.04) 0 1px, transparent 1px 7px),
    #0d130e;
  box-shadow:
    inset 0 0 0 1px rgba(255, 207, 96, 0.32),
    inset 0 0 36px rgba(0, 0, 0, 0.72),
    0 24px 46px rgba(0, 0, 0, 0.62); */
  text-align: center;
}

/* .result-panel::before {
  content: "JD";
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 50%;
  display: grid;
  place-items: center;
  width: clamp(50px, 13vw, 66px);
  height: clamp(50px, 13vw, 66px);
  border: 2px solid #c58b2a;
  clip-path: polygon(50% 0, 94% 18%, 84% 82%, 50% 100%, 16% 82%, 6% 18%);
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 222, 116, 0.24), transparent 38%),
    linear-gradient(135deg, #1b2317, #6b4315);
  color: #ffe2a2;
  font-family: "Norma", serif;
  font-size: clamp(17px, 4vw, 24px);
  line-height: 1;
  text-shadow: var(--copy-shadow);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.55);
} */

/* .result-panel::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 10px;
  pointer-events: none;
  border: 1px solid rgba(211, 149, 42, 0.7);
  clip-path: polygon(8% 0, 92% 0, 100% 8%, 100% 92%, 92% 100%, 8% 100%, 0 92%, 0 8%);
} */

.result-panel h2 {
  position: relative;
  z-index: 3;
  margin: 0 0 10px;
  color: #f0b84f;
  font-family: "Norma", serif;
  font-size: clamp(31px, 7.4vw, 44px);
  line-height: 1;
  text-transform: uppercase;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.86),
    0 0 12px rgba(235, 155, 32, 0.2);
}

.result-panel p {
  margin: 0;
}

.result-panel #resultSummary {
  position: relative;
  z-index: 3;
  min-height: 44px;
  color: #ffe8b3;
  font-family: "Norma", serif;
  font-size: clamp(18px, 4.8vw, 24px);
  line-height: 1.12;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.7);
}

.result-stats {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: clamp(18px, 3vh, 24px) 0 14px;
}

.result-stat {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
  min-height: clamp(75px, 14vh, 92px);
  padding: 10px 12px;
  /* border: 1px solid #b87b24;
  clip-path: polygon(10% 0, 90% 0, 100% 14%, 100% 86%, 90% 100%, 10% 100%, 0 86%, 0 14%);
  background:
    linear-gradient(180deg, rgba(45, 36, 10, 0.9), rgba(7, 12, 8, 0.96)),
    #15160b;
  box-shadow:
    inset 0 0 0 1px rgba(255, 216, 100, 0.12),
    inset 0 -14px 20px rgba(0, 0, 0, 0.32); */
      border-style: solid;
      border-image-slice:27 27 27 27 fill;
      border-image-width:10px 10px 10px 10px;
      border-image-outset:0px 0px 0px 0px;
      border-image-repeat:stretch stretch;
      border-image-source: url("../img/summary_tile.webp");
      text-align: left;
}

.result-stat img {
  grid-row: 1 / 3;
  width: 42px;
  max-height: 46px;
  object-fit: contain;
  justify-self: center;
  filter: drop-shadow(0 5px 7px rgba(0, 0, 0, 0.7));
}

.result-stat span {
  color: #e6b84f;
  font-family: "Norma", serif;
  font-size: clamp(13px, 3vw, 17px);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
}

.result-stat strong,
.result-meta strong {
  color: #fff1c4;
  font-family: "Norma", serif;
  font-size: clamp(25px, 6vw, 34px);
  line-height: 1;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.7);
}

.result-meta {
  position: relative;
  z-index: 3;
  margin: 14px 0 0;
  color: #f0bd5c;
  font-family: "Norma", serif;
  font-size: clamp(17px, 4.2vw, 22px);
  line-height: 1;
}

.result-panel .image-button {
  position: relative;
  z-index: 3;
  display: block;
  width: min(var(--game-action-button-width), calc(100vw - 32px), 100%);
  height: var(--game-action-button-height);
  min-height: auto;
  margin: clamp(18px, 3vh, 24px) auto 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  clip-path: none;
  color: transparent;
}

.result-panel .image-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.result-panel .image-button span {
  display: none;
}

.result-panel .play-again,
.result-panel .share-journey {
  margin-left: auto;
  margin-right: auto;
}

.result-panel .play-again span,
.result-panel .share-journey span {
  font-size: clamp(16px, 4vw, 22px);
}

.quiz-header {
  flex-shrink: 0;
  position: relative;
  z-index: 6;
}

.quiz-body {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

/* .quiz-frame-corners {
  display: none;
} */

.play-panel {
  position: relative;
  border-style: solid;
  border-width: 0px;
  border-image-slice: 50 60 50 60 fill;
  border-image-width: 50px;
  border-image-repeat: stretch;
  /* border-image-source: url("../img/frame_question.webp"); */
  box-sizing: border-box;
}

.play-panel {
  z-index: 2;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  /* background: url('../img//question_bg_noise.jpg'); */
}

.chapter-title {
  position: relative;
  width: 100%;
  aspect-ratio: 392 / 64;
  margin: 0;
  line-height: 0;

    background:url('../img/bg_noise.jpg')
    /* linear-gradient(180deg, #1d0d05 0%, #3b1c0c 10%, #311508 100%); */
}

.chapter-title img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

.chapter-title h2 {
  position: absolute;
  inset: 0 8%;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--cream);
  font-family: "Norma", serif;
  font-size: clamp(20px, 5.4vw, 28px);
  padding-top: clamp(2px, 0.5vw, 4px);
  line-height: 1;
  text-align: center;
  text-shadow: 0 2px 0 #0b1119, 0 4px 6px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

.stats-strip {
  position: relative;
  width: 97%;
  margin-left:1.5%;
  aspect-ratio: 480 / 60;
  height: auto;
  margin-top: 0;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr 0.95fr 1.05fr;
  align-items: center;
  /* padding: 16px 4% 2.4% 4.2%; */
  z-index: 200;
}

.stats-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.stat-item {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #fff8d8;
  font-family: "Norma", Impact, sans-serif;
  font-size: clamp(22px, 5vw, 29px);
  line-height: 1;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.72), 0 2px 8px rgba(0, 0, 0, 0.5);
}

.stat-item img {
  flex: 0 0 auto;
}

.stat-item > span {
  display: inline-block;
  transition: color 220ms ease, transform 220ms ease, text-shadow 220ms ease;
}

.stat-item.stat-animate-up,
.stat-item.stat-animate-up > span {
  color: #22c55e;
}

.stat-item.stat-animate-up > span {
  transform: scale(1.14);
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.72),
    0 0 14px rgba(34, 197, 94, 0.75);
}

.stat-item.stat-animate-down,
.stat-item.stat-animate-down > span {
  color: #ef4444;
}

.stat-item.stat-animate-down > span {
  transform: scale(1.08);
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.72),
    0 0 14px rgba(239, 68, 68, 0.7);
}

.stat-item:nth-child(2) img,
.stat-item:nth-child(4) img {
  width: clamp(26px, 7.4vw, 32px);
}

.stat-item:nth-child(3) img {
  width: clamp(26px, 7.4vw, 32px);
}

.stat-wealth img {
  width: clamp(26px, 7.4vw, 32px);
}

.scene-wrap {
  position: relative;
  z-index: 1;
  container-type: inline-size;
  height: 30%;
  overflow: hidden;
  background: #25150f;
}



.scene-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  /* height: 100%; */
  display: block;
  /* object-fit: cover; */
  object-position: center center;
  transform-origin: center center;
  opacity: 1;
  transition: opacity 240ms ease;
}

.scene-wrap.is-scene-loading .scene-image {
  opacity: 0;
}

.scene-image.kenburns {
  animation: sceneKenBurns 14s ease-out forwards;
}

@keyframes sceneKenBurns {
  from { transform: scale(1); }
  to { transform: scale(1.07); }
}

/* .scene-wrap::before {
  content: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
 border-style: solid;
  border-width: 1px;
  border-image-slice: 50 60 50 60;
  border-image-width: 50px;
  border-image-repeat: stretch;
  border-image-source: url("../img/frame_question.webp");
  box-sizing: border-box; 
} */

/* .scene-wrap::after {
  content: none;
} */

.scene-wrap::before {
  inset: 0;
  background:
    url("../img/scene_border_left_right.webp") left top / 9px 100% no-repeat,
    url("../img/scene_border_left_right.webp") right top / 9px 100% no-repeat;
  background:
    url("../img/scene_border_left_right.webp") left top / 2.29cqw 100% no-repeat,
    url("../img/scene_border_left_right.webp") right top / 2.29cqw 100% no-repeat;
}

.scene-wrap::after {
  left: 0;
  right: 0;
  bottom: -3px;
  height: 15px;
  height: 3.58cqw;
  background: url("../img/scene_border_bottom.webp") center bottom / 100% 100% no-repeat;
}

.quiz-content {
  position: relative;
}

.quiz-content::after {
  content: "";
  position: absolute;
  z-index: 40;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  border: 3px solid rgba(253, 245, 209, 0.25);
  border-top-color: #FBA705;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
}

.quiz-screen.is-busy .quiz-content::after {
  opacity: 1;
  animation: spinnerTurn 800ms linear infinite;
}

@keyframes spinnerTurn {
  to { transform: rotate(360deg); }
}

.quiz-screen.is-busy .play-panel {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.quiz-screen.is-busy .choose-wisely {
  animation: none;
}

.quiz-screen.impact-active .quiz-body .scene-wrap,
.quiz-screen.impact-active .quiz-body .play-panel {
  display: none !important;
}

.quiz-screen.impact-active .quiz-body {
  background: transparent;
}

.quiz-screen.impact-active .impact-overlay {
  display: flex !important;
}

.question-area {
  position: relative;
  z-index: 2;
  container-type: inline-size;
  /* margin-top: 8px; */
  padding: 0 4.8%;
}

.question-area::before,
.question-area::after,
.choose-wisely::before,
.choose-wisely::after {
  content: "";
  position: absolute;
  z-index: 3;
  pointer-events: none;
  display: none;
}

.question-area::before,
.choose-wisely::before {
  inset: 0;
  background:
    url("../img/scene_border_left_right.webp") left top / 9px 100% no-repeat,
    url("../img/scene_border_left_right.webp") right top / 9px 100% no-repeat;
  background:
    url("../img/scene_border_left_right.webp") left top / 2.29cqw 100% no-repeat,
    url("../img/scene_border_left_right.webp") right top / 2.29cqw 100% no-repeat;
}

.question-area::after,
.choose-wisely::after {
  left: 0;
  right: 0;
  bottom: -3px;
  height: 15px;
  height: 3.58cqw;
  /* background: url("../img/scene_border_bottom.webp") center bottom / 100% 100% no-repeat; */
}



.question-area::after {
  display: block;
  left: -4.8%;
  right: -4.8%;
}

.question-card {
  position: relative;
  z-index: 1;
  width: calc(100% + 9.6%);
  margin: 0 -4.8% 13px;
  filter: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.42));
}

.question-card img {
  width: 100%;
  height: 130px;
  object-fit: fill;
}

.question-card p {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 14px 18px 12px;
  color: var(--cream);
  font-family: "Norma", serif;
  font-size: clamp(18px, 5.55vw, 26px);
  line-height: 1;
  text-align: center;
  /* text-shadow: 0 2px 0 rgba(71, 28, 3, 0.85), 0 3px 8px rgba(0, 0, 0, 0.55); */
  text-shadow: 0 2px 0 #0b1119, 0 4px 6px rgba(0, 0, 0, 0.6);
}

.question-card::after {
  content: "";
  position: absolute;

  left: 0;
  right: 0;
  bottom: 3px;

  /* height: 15px; */
  height: 0.58cqw;

  background: url("../img/question_border_bottom.webp") center bottom / 100% 100% no-repeat;
}

.impact-overlay {
  position: absolute;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  min-height: 0;
  box-sizing: border-box;
  padding: 14px;
  /* background: rgba(0, 0, 0, 0.72); */
  z-index: 20;
  opacity: 0;
  transition: opacity 180ms ease;
}

.impact-overlay.is-visible {
  opacity: 1;
}

.impact-overlay .impact-card {
  opacity: 0;
  transition: opacity 360ms ease;
}

.impact-overlay.is-visible .impact-card {
  opacity: 1;
}


.impact-card {
  z-index:500;
  width: min(420px, calc(100% - 8px));
  max-height: calc(100% - 8px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  /* padding: 28px 22px; */
  /* border-radius: 28px; */
  /* border: 1px solid rgba(255, 195, 90, 0.65); */
  /* background: #583F26; */
  /* box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65); */
  color: #f7e4b3;
  text-align: center;
  font-family: 'Norma', serif;
  
  border-style: solid;
  border-width: 50px;
  /* border-image-slice: 50 60 50 60 fill;
  border-image-width: 1;
  border-image-repeat: stretch; */
border-image-slice:145 122 195 136 fill;
border-image-width:30px 30px 50px 30px;
border-image-outset:0px 0px 0px 0px;
border-image-repeat:stretch stretch;
  border-image-source: url("../img/impact_bg.webp");
  box-sizing: border-box;

}

.impact-card h3 {
  margin: 0 0 12px;
  font-size: clamp(24px, 5vw, 32px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffd87a;
  font-family: "Norma", serif;
}

.impact-card p {
  margin: 0 0 22px;
  font-size: 1.5rem;
  line-height: 1.5;
  color: #f0d8b8;
}

.impact-stats {
  display: grid;
  gap: 10px;
  margin: 0 auto 18px;
  max-width: 320px;
  text-transform: uppercase;
}

.impact-stats div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 213, 131, 0.18);
  background: rgba(255, 255, 255, 0.06);
  font-size: 1.5rem;
  font-family: 'Norma', serif;
  color: #fff;
  border-image-slice:60 fill;
border-image-width:15px 15px 15px 15px;
border-image-outset:0px 0px 0px 0px;
border-image-repeat:stretch stretch;
border-image-source:url("../img/impact_border.webp");

}

.impact-stats div span {
  display: inline-flex;
  align-items: center;
  text-transform: uppercase;
  gap: 8px;
}

.impact-stats div:nth-child(1) {
  color: #FA4600;
}

.impact-stats div:nth-child(2) {
  color: #F07DF0;
}

.impact-stats div:nth-child(3) {
  color: #A1C036;
}

.impact-stats div:nth-child(4) {
  color: #DD7F01;
}

.impact-stats strong {
  display: inline-block;
  transition: color 160ms ease;
}

.impact-stats strong.is-positive {
  color: #8fe08a;
  text-shadow: 0 0 8px rgba(143, 224, 138, 0.45);
}

.impact-stats strong.is-negative {
  color: #ff8073;
  text-shadow: 0 0 8px rgba(255, 128, 115, 0.45);
}

.impact-stats strong.is-neutral {
  color: #cfc4a8;
}

.impact-stats strong.is-pop {
  animation: statPop 260ms ease-out;
}

@keyframes statPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.32); }
  100% { transform: scale(1); }
}

.impact-card .image-button {
  margin: 0 auto;
}

.quiz-options {
  position: relative;
  z-index: 1;
  width: 90%;
  margin-inline: auto;
  display: grid;
  gap: 10px;
}

.quiz-option {
  --option-scale: 1;
  position: relative;
  width: 100%;
  min-height: 52px;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--cream);
  filter: drop-shadow(0 5px 6px rgba(0, 0, 0, 0.48));
  opacity: 0;
  transform: translateY(10px) scale(var(--option-scale));
  transform-origin: center center;
  pointer-events: none;
  transition:
    transform 120ms ease-out,
    filter 120ms ease-out;
  will-change: transform;
}

.quiz-option.is-visible {
  animation: optionIn 140ms ease-out forwards;
}

.quiz-option.is-ready {
  pointer-events: auto;
  filter: brightness(1) drop-shadow(0 6px 8px rgba(0, 0, 0, 0.52));
}

.quiz-option.is-selected {
  --option-scale: 1.04;
  filter: brightness(1.5) drop-shadow(0 6px 8px rgba(0, 0, 0, 0.52));
}

.quiz-option.is-ready:active {
  --option-scale: 0.985;
  transition-duration: 120ms;
}

.quiz-option::after {
  content: ">";
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 24px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #f39501;
  font-family: "Norma", serif;
  font-size: 26px;
  font-weight: bolder;
  line-height: 1;
  text-shadow:
    0 2px 0 rgba(95, 43, 0, 0.9),
    0 4px 7px rgba(0, 0, 0, 0.75),
    0 0 9px rgba(255, 191, 45, 0.5);
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.62));
  opacity: 0;
  transform: translateY(-50%) scale(0.45) rotate(-16deg);
  pointer-events: none;
}

.quiz-option.is-selected::after {
  animation: tickPop 180ms cubic-bezier(0.2, 1.1, 0.35, 1) forwards;
}

.quiz-option::after {
  content: "\2713";
}

.quiz-option img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  -webkit-box-shadow: 0px 10px 13px -7px #000000, 5px 33px 25px -20px #000000; 
box-shadow: 0px 10px 13px -7px #000000, 5px 33px 25px -20px #000000;
}

.quiz-option span {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 50px;
  padding: 5px 64px 5px 26px;
  font-family: "Norma", serif;
  font-size: clamp(18px, 4vw, 22px);
  line-height: 1.05;
  text-align: left;
  /* text-shadow: 0 2px 0 rgba(20, 10, 0, 0.8), 0 3px 7px rgba(0, 0, 0, 0.55); */
  text-shadow: 0 2px 0 #0b1119, 0 4px 6px rgba(0, 0, 0, 0.6);
  transform: translateY(1px);
  white-space: normal;
}

.choose-wisely {
  container-type: inline-size;
  width: min(var(--game-action-button-width), calc(100vw - 32px), 100%);
  height: var(--game-action-button-height);
  margin: auto auto 10px;
  z-index: 3;
}

.choose-wisely img {
  position: relative;
  z-index: 1;
}

.choose-wisely span {
  z-index: 2;
  font-size: clamp(20px, 5.6vw, 28px);
}

.choose-wisely.is-disabled {
  opacity: 0.58;
  filter: grayscale(0.16) brightness(0.82);
  pointer-events: none;
}

.choose-wisely.is-enabled {
  opacity: 1;
  pointer-events: auto;
  animation: choosePulse 1.6s ease-in-out infinite;
}

@keyframes choosePulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(251, 167, 5, 0));
  }
  50% {
    transform: scale(1.025);
    filter: drop-shadow(0 0 14px rgba(251, 167, 5, 0.6));
  }
}

@keyframes optionIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(var(--option-scale));
  }
}

@keyframes tickPop {
  0% {
    opacity: 0;
    transform: translateY(-50%) scale(0.45) rotate(-16deg);
  }

  68% {
    opacity: 1;
    transform: translateY(-50%) scale(1.22) rotate(5deg);
  }

  100% {
    opacity: 1;
    transform: translateY(-50%) scale(1) rotate(0deg);
  }
}








/* Landing menu/auth UI */
.landing-screen {
  --panel-bg: rgba(17, 13, 8, 0.82);
  --panel-line: rgba(219, 143, 28, 0.72);
  --panel-glow: rgba(255, 190, 64, 0.24);
  font-family: "Norma", serif;
}

.landing-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  border-style: solid;
  border-width: 80px;
  border-image-slice: 50 60 50 60 fill;
  border-image-width: 50px;
  border-image-repeat: stretch;
  border-image-source: url("../img/frame.webp");
  box-sizing: border-box;
}

.landing-screen button,
.landing-screen input,
.landing-screen select,
.landing-screen textarea {
  font-family: "Norma", Georgia, serif;
}

.landing-content {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: max(14px, var(--safe-top)) 22px max(28px, var(--safe-bottom));
}

.landing-left > br {
  display: none;
}

.landing-topbar,
.landing-main,
.landing-feature-strip {
  position: relative;
  z-index: 2;
}

.landing-topbar {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
  margin-top: 0;
  padding-right: 0;
}

.online-pill,

.landing-secondary-actions button,
.mobile-action-deck button,
.landing-feature-strip button,
.landing-feature-strip div,
.player-card,
.auth-card,
.landing-panel {
  border-style: solid;
  border-width: clamp(18px, 5.6vw, 26px);
  border-image-slice: 100 fill;
  border-image-width: clamp(18px, 5.6vw, 26px);
  border-image-outset: 0;
  border-image-repeat: stretch stretch;
  border-image-source: url("../img/popup_frame.png");
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.45));
  color: #fff3ca;
}

.online-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: clamp(14px, 1.25vw, 20px);
  text-shadow: var(--copy-shadow);
}

.online-pill span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #72d64a;
  box-shadow: 0 0 10px rgba(113, 233, 70, 0.9);
}

.landing-actions {
  display: flex;
  gap: clamp(8px, 1.3vw, 5px);
}

.landing-icon-button {
  min-width: clamp(56px, 6.4vw, 86px);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #fff0bf;
  cursor: pointer;
  text-align: center;
  text-shadow: var(--copy-shadow);
}

.landing-icon-button[hidden] {
  display: none;
}

.landing-icon-button strong {
  display: grid;
  place-items: center;
  width: clamp(46px, 4.5vw, 45px);
  height: clamp(46px, 4.5vw, 45px);
  margin: 0 auto 5px;
  /* border: 2px solid #b46c18;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, rgba(255, 216, 104, 0.2), rgba(9, 8, 7, 0.94) 68%); */
  color: #ffc75a;
  font-size: clamp(20px, 2.2vw, 32px);
  line-height: 1;
}

.signin-button strong {
  color: #2f5fb9;
  /* background: radial-gradient(circle at 38% 30%, #fff, #dfe6ff 58%, #101010 60%); */
}

.account-button strong {
  color: #fff;
  /* background: radial-gradient(circle at 38% 30%, #4f86e8, #2f5fb9 58%, #1a3f7a 100%); */
  border-color: #d4a63a;
}

.settings-button strong img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.podcast-button strong img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.landing-icon-button span {
  display: block;
  font-size: clamp(11px, 1.05vw, 16px);
  line-height: 1.1;
}

.landing-main {
  /* width: 100%; */
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.landing-left {
  display: grid;
  grid-template-rows:
    minmax(138px, 24svh)
    minmax(110px, 1fr)
    auto
    minmax(12px, 2.4svh)
    auto
    minmax(8px, 1.2svh)
    auto
    minmax(18px, 4svh);
  align-items: center;
  justify-items: center;
  gap: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
}

.hero-copy,
.landing-message {
  width: 100%;
  text-align: center;
}

.hero-copy {
  grid-row: 1;
  align-self: end;
}

.hero-logo {
  width: min(335px, 84vw);
  margin: 0 auto;
}

.hero-subtitle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80%;
  min-height: 44px;
  margin-top: -6px;
  border: 1px solid rgba(230, 154, 34, 0.75);
  background: linear-gradient(180deg, rgba(14, 36, 36, 0.86), rgba(8, 21, 22, 0.88));
  color: #fff2c8;
  font-family: "Norma", serif;
  font-size: clamp(25px, 2.3vw, 40px);
  text-transform: uppercase;
}

.landing-message {
  grid-row: 3;
  width: 100%;
  align-self: end;
  margin: 0;
  padding-bottom: 0;
  text-align: center;
}

.landing-message h1 {
  margin: 0;
  color: #FAFAD9;
  font-family: "Norma", "Greyhound", serif;
  font-size: clamp(25px, 7.1vw, 34px);
  line-height: 1.18;
  text-shadow: var(--copy-shadow);
}

.landing-meter {
  grid-row: 5;
  position: relative;
  width: min(336px, 84vw);
  height: auto;
  display: grid;
  place-items: center;
}

.reputation-line {
  width: 100%;
}

.start-journey {
  grid-row: 7;
  align-self: start;
  margin: 0 auto;
}

body.is-firebase-signed-in .auth-card {
  display: none;
}

body.is-firebase-signed-in .signin-button {
  display: none;
}

body:not(.is-firebase-signed-in) .account-button {
  display: none;
}

body.is-firebase-signed-in .start-journey {
  min-height: auto;
  padding: 0;
  border: 0;
  clip-path: none;
  background: transparent;
  box-shadow: none;
}

body.is-firebase-signed-in .start-journey img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.auth-card [hidden] {
  display: none !important;
}

.landing-secondary-actions,
.mobile-action-deck {
  display: flex;
  gap: 14px;
  margin-top: 16px;
}

.landing-secondary-actions button,
.mobile-action-deck button,
.landing-feature-strip button,
.guest-button,
.google-signin,
.landing-list button {
  cursor: pointer;
}

.landing-secondary-actions button,
.mobile-action-deck button,
.landing-feature-strip button {
  min-height: 48px;
  padding: 9px 18px;
  color: #ffe7a5;
  font-size: clamp(15px, 1.2vw, 19px);
  text-transform: uppercase;
}

.landing-secondary-actions span,
.mobile-action-deck span,
.landing-feature-strip button span {
  margin-right: 9px;
  color: #ffc75a;
}

.landing-side {
  display: none;
}

body:not(.is-firebase-signed-in) .landing-main {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
}

body:not(.is-firebase-signed-in) .landing-left {
  align-items: center;
}

.player-card,
.auth-card {
  position: relative;
  padding: clamp(16px, 1.8vw, 24px);
}

.player-card {
  display: none;
  grid-template-columns: 76px 1fr;
  gap: 14px 18px;
}

body.is-firebase-signed-in .player-card {
  display: grid;
}

.player-avatar {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 2px solid #d89426;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 28%, #eee7d0, #1b1d1c 66%);
  color: #211b14;
  font-size: 38px;
}

.player-info {
  position: relative;
  min-width: 0;
}

.player-info h2,
.auth-card h2,
.landing-panel h2 {
  margin: 0;
  color: #ffe6a4;
  font-size: clamp(22px, 1.8vw, 30px);
  line-height: 1;
  text-shadow: var(--copy-shadow);
}

.profile-signout {
  position: absolute;
  top: -4px;
  right: 0;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 208, 100, 0.75);
  background: rgba(20, 12, 4, 0.72);
  color: #ffd064;
  font-size: 13px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
}

.profile-signout[hidden] {
  display: none;
}

.player-info p,
.auth-card p {
  margin: 10px 0 0;
  color: #fff3cf;
  font-size: 16px;
}

.xp-track {
  height: 9px;
  margin-top: 8px;
  border: 1px solid #9e6a25;
  background: #111;
}

.xp-track span {
  display: block;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, #61c741, #d7e86a);
}

.wallet-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.wallet-row div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  border: 1px solid rgba(221, 150, 43, 0.8);
  color: #ffe78e;
  font-size: clamp(17px, 1.4vw, 22px);
  background: rgba(8, 8, 8, 0.54);
}

.wallet-row img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.auth-card {
  text-align: center;
}

.google-signin,
.guest-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin-top: 16px;
  border: 2px solid #d28a1f;
  color: #fff6dc;
  font-size: clamp(16px, 1.35vw, 21px);
  text-transform: uppercase;
  text-shadow: var(--copy-shadow);
}

.google-signin {
  background: linear-gradient(180deg, #a51e16, #5c0d08);
}

.google-signin:disabled {
  opacity: 0.65;
  cursor: wait;
}

.google-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-right: 10px;
  border-radius: 50%;
  background: #fff;
  color: #4285f4;
  font-family: "Norma", serif;
  font-weight: 700;
  text-shadow: none;
}

.guest-button {
  background: linear-gradient(180deg, rgba(42, 39, 31, 0.92), rgba(12, 12, 11, 0.96));
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  color: #f7d37b;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(238, 173, 59, 0.85), transparent);
}

.mobile-action-deck {
  display: none;
}

.landing-feature-strip {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.landing-feature-strip button {
  display: none;
}

.landing-feature-strip div {
  min-height: 78px;
  padding: 13px 18px 12px;
  border-left-width: 0;
}

.landing-feature-strip div:first-of-type {
  border-left-width: 1px;
}

.landing-feature-strip strong,
.landing-feature-strip span {
  display: block;
}

.landing-feature-strip strong {
  color: #ffd66f;
  font-size: clamp(14px, 1.2vw, 18px);
  text-transform: uppercase;
}

.landing-feature-strip span {
  margin-top: 6px;
  color: #fff4d0;
  font-family: "Norma", serif;
  font-size: clamp(12px, 1vw, 16px);
  line-height: 1.28;
}

.landing-panels {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

.landing-panels::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.34);
  opacity: 0;
  transition: opacity 180ms ease;
}

.landing-panels.has-active-panel,
.landing-panels:has(.landing-panel.is-active) {
  pointer-events: auto;
}

.landing-panels.has-active-panel::before,
.landing-panels:has(.landing-panel.is-active)::before {
  opacity: 1;
}

.landing-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  right: auto;
  width: min(350px, calc(100vw - 36px));
  max-height: min(680px, calc(100% - 84px));
  padding: 8px 6px 14px;
  overflow: auto;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -46%) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
}

.landing-panel.is-active {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
  transition-delay: 0s;
}

.landing-panel header {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(220, 157, 62, 0.38);
  padding-bottom: 12px;
}

.landing-panel header button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  color: #ffd26a;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  text-transform: uppercase;
  text-shadow: var(--copy-shadow);
}

.landing-panel header button:first-child {
  font-size: 38px;
}

.landing-panel header button:last-child {
  justify-self: end;
  font-family: "Norma", serif;
  font-size: 22px;
  font-weight: 700;
}

.landing-panel h2 {
  text-align: center;
  text-transform: uppercase;
}

.landing-list {
  display: grid;
  gap: 8px;
}

.landing-list button,
.leaderboard-list li,
.landing-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(212, 142, 39, 0.48);
  background: rgba(11, 10, 9, 0.58);
  color: #fff1c9;
  text-align: left;
  font-size: 16px;
}

.landing-list em {
  color: #ffd574;
  font-style: normal;
  white-space: nowrap;
}

.setting-toggle b {
  position: relative;
  width: 40px;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(90deg, #46372a, #6a5340);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  transition: background 160ms ease, filter 160ms ease;
}

.setting-toggle b::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f6dba0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.45);
  transition: transform 160ms ease;
}

.setting-toggle.is-on b {
  /* background: linear-gradient(90deg, #ffea04, #8c7c03); */
background: linear-gradient(90deg, #BF6B04, #BF6B04);
}

.setting-toggle.is-on b::after {
  transform: translateX(20px);
}

.setting-toggle:active b {
  filter: brightness(1.2);
}

.landing-summary {
  margin-bottom: 12px;
  justify-content: center;
  color: #ffe5a5;
}

.landing-summary strong {
  margin-left: 10px;
  color: #fff;
}

.leaderboard-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style-position: inside;
}

.leaderboard-list li strong {
  color: #ffd66f;
}

#impactTitle {
  max-width: 150px;
}




/* My Account screen */
.account-screen {
  font-family: "Norma", Georgia, serif;
  letter-spacing: 2px;
  
}

.account-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(214, 156, 55, 0.2), transparent 34%),
    url("../img/landing_bg.jpg") center / cover no-repeat;
  filter: saturate(0.72) brightness(0.42);
}

.account-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  border-style: solid;
  border-width: 80px;
  border-image-slice: 50 60 50 60 fill;
  border-image-width: 50px;
  border-image-repeat: stretch;
  border-image-source: url("../img/frame.webp");
  box-sizing: border-box;
}

.account-content {
  position: relative;
  z-index: 2;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: clamp(54px, 12vw, 72px) clamp(18px, 5.2vw, 28px) clamp(24px, 5vw, 36px);
  -webkit-overflow-scrolling: touch;

  border-image-slice:70 70 75 70 fill;
border-image-width:20px 20px 20px 20px;
border-image-outset:0px 0px 0px 0px;
border-image-repeat:stretch stretch;
border-image-source:url("../img/account_bg.webp");
  /* Firefox */
  scrollbar-width: none;
  
  /* IE and Edge */
  -ms-overflow-style: none;
}

.account-content::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.account-back {
  position: absolute;
  top: clamp(54px, 12vw, 72px);
  left: clamp(18px, 5.2vw, 28px);
  z-index: 6;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f0c45f;
  font-size: 42px;
  line-height: 0.8;
  cursor: pointer;
  text-shadow: var(--copy-shadow);
}

.account-brand {
  text-align: center;
  margin-bottom: 10px;
}

.account-brand-logo {
  width: min(290px, 64vw);
  margin: 0 auto;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.65));
}

.account-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 18px;
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 92px;
  height: 98px;
  /* border: 2px solid #d89426; */
  /* border-radius: 50%;
  background: radial-gradient(circle at 50% 28%, #eee7d0, #1b1d1c 66%); */
  color: #211b14;
  font-size: 22px;
  font-weight: 700;
  overflow: hidden;
  flex: 0 0 auto;
}

.account-avatar.has-photo {
  background-size: cover;
  background-position: center;
}

.account-avatar.has-photo span {
  display: none;
}

.account-username {
  margin: 0;
  color: #FAFAD9;
  font-size: clamp(18px, 4.8vw, 22px);
  line-height: 1.1;
  text-shadow: var(--copy-shadow);
  -webkit-text-stroke: 0.3px #5F5F3B;
}

.account-section-title {
  margin: 0 0 10px;
  color: #fff;
  font-size: clamp(14px, 3.8vw, 16px);
  font-weight: 400;
  text-shadow: var(--copy-shadow);
  -webkit-text-stroke: 0.3px #5F5F3B;
}

.account-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.account-stat-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 74px;
  padding: 10px 12px;
  border-style: solid;
  border-width: 18px 12px;
  border-image-slice: 40 28 fill;
  border-image-width: 18px 12px;
  border-image-repeat: stretch;
  border-image-source: url("../img/summary_tile.webp");
  box-sizing: border-box;
}

.account-stat-card img {
  width: 45px;
  height: 45px;
  object-fit: contain;
  flex: 0 0 auto;
}

.account-stat-copy {
  min-width: 0;
}

.account-stat-copy span {
  display: block;
  color: #f0c45f;
  font-family: "Cinzel", serif;
  font-weight: bolder;
   --_space: ;

  background-image: linear-gradient(
    180deg var(--_space),
    #faf8e4 0%,
    #f2e48c 50%,
    #e9c46a 100%
  );
  background-clip: text;
  color: transparent;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: clamp(11px, 4vw, 18px);
  letter-spacing: 0.4px;
  line-height: 1.1;
}

.account-stat-copy strong {
  display: block;
  margin-top: 4px;
  color: #E0D7C2;
  -webkit-text-stroke: 0.1px #E8CF9C;
  font-size: clamp(28px, 7.4vw, 34px);
  line-height: 1;
  font-weight: 700;
  text-shadow: var(--copy-shadow);
}

.badges-intro {
  margin: 14px 0 16px;
  display: grid;
  gap: 3px;
}

.badges-intro p {
  margin: 0;
}

.account-badges-block {
  display: grid;
  gap: 12px;
}

.age-accordion {
  display: grid;
  gap: 8px;
}

.age-accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.age-accordion-trigger:disabled,
.age-accordion.is-locked .age-accordion-trigger {
  cursor: not-allowed;
}

.age-accordion.is-denied .age-accordion-lock img {
  animation: lockShake 400ms ease;
}

@keyframes lockShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

.age-accordion-icon {
  width: 10px;
  height: 10px;
  border-right: 2px solid #f0c45f;
  border-bottom: 2px solid #f0c45f;
  transform: rotate(45deg);
  transition: transform 320ms cubic-bezier(0.4, 0, 0.2, 1);
  flex: 0 0 auto;
  margin-right: 4px;
}

.age-accordion.is-expanded .age-accordion-icon {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.age-accordion.is-locked .age-accordion-icon {
  opacity: 0.35;
}

.age-accordion-panel {
  position: relative;
  padding: 10px 10px 12px;
  border-style: solid;
  border-image-slice: 27 27 27 27;
  border-image-width: 20px 20px 20px 20px;
  border-image-outset: 0;
  border-image-repeat: stretch stretch;
  border-image-source: url("../img/secondary_param_border.webp");
  box-sizing: border-box;
  overflow: hidden;
}

.age-accordion-panel-inner {
  position: relative;
  overflow: hidden;
  transition: height 420ms cubic-bezier(0.4, 0, 0.2, 1);
}

.age-accordion-body--expanded,
.age-accordion-body--collapsed {
  transition: opacity 320ms ease, transform 320ms ease, visibility 320ms ease;
}

.age-accordion.is-expanded .age-accordion-body--collapsed {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
}

.age-accordion.is-collapsed .age-accordion-body--expanded {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
}

.age-accordion.is-expanded .age-accordion-body--expanded,
.age-accordion.is-collapsed .age-accordion-body--collapsed {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.age-accordion-lock {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  pointer-events: none;
  transition: background 220ms ease;
}

.age-accordion.is-denied .age-accordion-lock {
  background: rgba(0, 0, 0, 0.78);
}

.age-accordion-lock[hidden] {
  display: none !important;
}

.age-accordion.is-locked .age-accordion-lock:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.age-accordion-lock-hint {
  max-width: 92%;
  color: #ffe6a4;
  font-family: "Norma", Georgia, serif;
  font-size: clamp(13px, 3.8vw, 16px);
  font-weight: bolder;
  line-height: 1.3;
  text-align: center;
  text-shadow:
    0 2px 3px rgba(0, 0, 0, 0.95),
    0 1px 1px #000,
    0 0 10px rgba(0, 0, 0, 0.85);
  opacity: 0;
  transition: opacity 220ms ease;
}

.age-accordion.is-denied .age-accordion-lock-hint {
  opacity: 1;
}

.age-accordion.is-locked .age-accordion-panel {
  min-height: 88px;
}

.age-accordion.is-locked .age-accordion-body--collapsed {
  opacity: 0.42;
  filter: saturate(0.55);
}

.age-accordion-lock img {
  width: 96%;
  max-width: 50px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.55));
}

.badge-grid.badge-grid--compact {
  padding: 4px 2px 2px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 8px;
}

/* .badge-grid--compact .secondary-param-icon {
  width: 36px;
  height: 40px;
} */

.badge-grid.badge-grid--compact .badge-item > span {
  font-size: clamp(10px, 3.2vw, 20px);
  line-height: 1.3;
}

.secondary-param-icon {
  position: relative;
  /* width: 42px;
  height: 46px; */
  flex: 0 0 auto;
}

.secondary-param-icon__bg,
.secondary-param-icon__ico {
  display: block;
  pointer-events: none;
  user-select: none;
}

.secondary-param-icon__bg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.secondary-param-icon__ico {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  object-fit: contain;
}

.badge-item .secondary-param-icon {
  margin: 0 auto;
}

.badge-progress-list {
  display: grid;
  gap: 12px;
  margin-top: 8px;
  padding: 0px 25px 0px 25px;
}

.badge-progress-row {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 20px;
  align-items: start;
}

.badge-progress-row .secondary-param-icon {
  width: 60px;
  height: 60px;
}

.badge-progress-copy {
  min-width: 0;
}

.badge-progress-meta {
  /* display: grid; */
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
}

.badge-progress-meta strong {
  /* color: #fff; */
   --_space: ;

  background-image: linear-gradient(
    180deg var(--_space),
    /* #E4C25D 0%,
    #B77200 25%,
    #E58E0F 50%,
    #B77200 75%,
    #865301 100% */
    #DEAE3F 0%,
    #EAB03C 4%,
    #DB9F29 8%,
    #F1BE61 15%,
    #DBA127 21%,
    #BA8429 26%,
    #C98B14 34%,
    #E4A024 42%,
    #DC9B32 50%,
    #B27103 60%,
    #CF8B24 66%,
    #B27008 72%,
    #BF740C 79%,
    #DEA117 91%,
    #EEC03A 100%
  );
  background-clip: text;
  color: transparent;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: clamp(12px, 3.2vw, 14px);
  min-width: 34px;
  margin-left: 5px;
  /* text-shadow: var(--copy-shadow); */
}

.badge-progress-bar {
  position: relative;
  width: 100%;
  min-width: 0;
  height: clamp(20px, 5.4vw, 26px);
}

.badge-progress-bar__outer {
  position: absolute;
  inset: 0;
  background: url("../img/outer_bar.webp") center / 100% 100% no-repeat;
  pointer-events: none;
}

.badge-progress-bar__fill-wrap {
  position: absolute;
  left: 6.8%;
  right: 6.8%;
  top: 22%;
  bottom: 22%;
  overflow: hidden;
}

.badge-progress-bar__fill {
  height: 100%;
  width: calc(var(--progress, 0) * 1%);
  max-width: 100%;
  overflow: hidden;
  transition: width 680ms cubic-bezier(0.22, 1, 0.36, 1);
}

.badge-progress-bar.is-animating .badge-progress-bar__fill {
  transition: none;
  width: 0;
}

.badge-progress-bar__fill::before {
  content: "";
  display: block;
  height: 100%;
  width: calc(100% * 100 / max(var(--progress, 1), 1));
  background: url("../img/progress_filler.webp") left center / 100% 100% no-repeat;
}

.badge-progress-bar[style*="--progress: 0"] .badge-progress-bar__fill,
.badge-progress-bar[style*="--progress:0"] .badge-progress-bar__fill {
  width: 0;
}

.badge-progress-label {
  display: block;
  margin-top: 4px;
  margin-left:5px;
  font-family: "Cinzel", serif;
  font-weight: bolder;
  /* color: #f0c45f; */
  --_space: ;

  background-image: linear-gradient(
    180deg var(--_space),
    #faf8e4 0%,
    #f2e48c 50%,
    #e9c46a 100%
  );
  background-clip: text;
  color: transparent;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: clamp(10px, 3.2vw, 16px);
  letter-spacing: 0.3px;
}

.badge-age {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid rgba(240, 196, 95, 0.75);
  color: #F3DEAC;
  font-weight:bolder;
  font-size: clamp(11px, 5vw, 18px);
  line-height: 1;
  background: #281C0C;
  flex: 0 0 auto;
}

.badge-row-title {
  margin: 0;
  color: #fff;
  text-align: center;
  font-size: clamp(11px, 2.9vw, 13px);
  line-height: 1.25;
}

.badge-row-quote {
  margin: 4px 0 0;
  color: #FAFAD9;
  font-size: clamp(10px, 2.6vw, 14px);
  /* font-style: italic; */
  line-height: 1.25;
  text-align: center;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px 4px;
}

.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.badge-item > span {
  font-family: "Cinzel", serif;
  font-weight: bolder;
  /* color: #f0c45f; */
  --_space: ;

  background-image: linear-gradient(
    180deg var(--_space),
    #faf8e4 0%,
    #f2e48c 50%,
    #e9c46a 100%
  );
  background-clip: text;
  color: transparent;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: clamp(10px, 3.2vw, 12px);
  line-height: 1.3;
  text-align: center;
  letter-spacing: 0.2px;
}

.account-signout {
  display: block;
  width: 100%;
  margin-top: 18px;
  min-height: 44px;
  background: rgba(8, 8, 8, 0.72);
  color: #ffd064;
  font-size: 15px;
  font-weight: bolder;
  text-transform: uppercase;
  cursor: pointer;
  border-style: solid;
  border-width: 1px;
  border-image-slice: 27 27 27 27;
  border-image-width: 12px;
  border-image-outset: 0;
  border-image-repeat: stretch stretch;
  border-image-source: url("../img/secondary_param_border.webp");
}

.account-delete-progress {
  display: block;
  width: 100%;
  margin-top: 18px;
  min-height: 44px;
  background: rgba(8, 8, 8, 0.72);
  color: #ff9c8f;
  font-size: 15px;
  font-weight: bolder;
  text-transform: uppercase;
  cursor: pointer;
  border-style: solid;
  border-width: 1px;
  border-image-slice: 27 27 27 27;
  border-image-width: 12px;
  border-image-outset: 0;
  border-image-repeat: stretch stretch;
  border-image-source: url("../img/secondary_param_border.webp");
}

.account-delete-progress:active {
  filter: brightness(1.25);
}

.delete-progress-warning {
  margin-top: clamp(10px, 2.6vw, 14px);
  margin-bottom: clamp(36px, 9vw, 46px);
}

.quit-confirm-modal .progress-save-title,
.delete-progress-modal .progress-save-title {
  font-size: clamp(18px, 4.8vw, 24px);
  padding: 0 26px;
}

.delete-progress-modal .progress-save-option,
.quit-confirm-modal .progress-save-option,
.signout-confirm-modal .progress-save-option {
  justify-content: center;
  text-align: center;
}

.progress-save-option--danger {
  border-color: rgba(255, 128, 115, 0.45);
}

.progress-save-option--danger span {
  color: #ff9c8f;
}

.account-signout[hidden] {
  display: none;
}


/* Podcasts screen */
.podcast-screen {
  font-family: "Norma", Georgia, serif;
  letter-spacing: 2px;
}

.podcast-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(214, 156, 55, 0.2), transparent 34%),
    url("../img/landing_bg.jpg") center / cover no-repeat;
  filter: saturate(0.72) brightness(0.42);
}

.podcast-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  border-style: solid;
  border-width: 80px;
  border-image-slice: 50 60 50 60 fill;
  border-image-width: 50px;
  border-image-repeat: stretch;
  border-image-source: url("../img/frame.webp");
  box-sizing: border-box;
}

.podcast-content {
  position: relative;
  z-index: 2;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: clamp(54px, 12vw, 72px) clamp(18px, 5.2vw, 28px) clamp(24px, 5vw, 36px);
  -webkit-overflow-scrolling: touch;

  border-image-slice: 70 70 75 70 fill;
  border-image-width: 20px 20px 20px 20px;
  border-image-outset: 0px 0px 0px 0px;
  border-image-repeat: stretch stretch;
  border-image-source: url("../img/account_bg.webp");
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.podcast-content::-webkit-scrollbar {
  display: none;
}

.podcast-back {
  position: absolute;
  top: clamp(54px, 12vw, 72px);
  left: clamp(18px, 5.2vw, 28px);
  z-index: 6;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f0c45f;
  font-size: 42px;
  line-height: 0.8;
  cursor: pointer;
  text-shadow: var(--copy-shadow);
}

.podcast-title-logo {
  width: min(180px, 44vw);
}

.podcast-list {
  display: grid;
  gap: 14px;
  margin-top: 6px;
}

.podcast-status {
  margin: 18px 0 0;
  color: #e0d7c2;
  font-size: clamp(13px, 3.6vw, 15px);
  text-align: center;
  letter-spacing: 0.5px;
}

.podcast-status--error {
  color: #ff9c8f;
}

.podcast-item {
  display: grid;
  grid-template-columns: clamp(64px, 20vw, 88px) 1fr;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  padding: 10px;
  border-style: solid;
  border-width: 0px;
  border-image-slice: 30;
  border-image-width: 10px;
  border-image-outset: 0;
  border-image-repeat: stretch;
  border-image-source: url("../img/podcast_frame.png");
  box-sizing: border-box;
  cursor: pointer;
  text-align: left;
  background: transparent;
}

.podcast-item:active {
  filter: brightness(1.12);
}

.podcast-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
}

.podcast-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.podcast-thumb-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.podcast-thumb-play span {
  display: grid;
  place-items: center;
  width: 62%;
  aspect-ratio: 1 / 1;
  max-width: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0.82;
}

.podcast-thumb-play svg {
  width: 48%;
  height: 48%;
  margin-left: 2px;
  fill: #ffc75a;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.65));
}

.podcast-right {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.podcast-meta {
  min-width: 0;
}

.podcast-title {
  margin: 0 0 4px;
  color: #fff6d8;
  font-family: "Norma", serif;
  font-size: clamp(14px, 3.8vw, 17px);
  line-height: 1.25;
  text-shadow: var(--copy-shadow);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.podcast-subtitle {
  margin: 0;
  color: #cbb98b;
  font-size: clamp(11px, 3.2vw, 13px);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.podcast-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 246, 216, 0.16);
}

.podcast-type,
.podcast-duration,
.podcast-views {
  color: #cbb98b;
  font-size: clamp(10px, 2.8vw, 12px);
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.podcast-type {
  text-transform: uppercase;
  color: #ffc75a;
}

.podcast-duration {
  flex: 1 1 auto;
  text-align: center;
}

.podcast-player-dialog {
  width: min(460px, 100%);
  border-width: 14px;
  border-image-slice: 20;
  border-image-width: 14px;
  border-image-source: url("../img/podcast_frame.png");
}

.podcast-player-media {
  position: relative;
  width: 100%;
  min-height: 160px;
  margin-bottom: 14px;
  background: #000;
  box-sizing: border-box;
  overflow: hidden;
}

.podcast-player-dialog .progress-save-close {
  top: 0;
  right: 0;
}

.podcast-embed-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.podcast-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.podcast-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.podcast-audio-art {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.podcast-audio-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.podcast-audio {
  display: none;
}

.podcast-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.5) 70%, transparent);
}

.podcast-controls-play,
.podcast-controls-mute,
.podcast-controls-fullscreen {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffd77a;
  cursor: pointer;
}

.podcast-controls-play svg,
.podcast-controls-mute svg,
.podcast-controls-fullscreen svg {
  width: 18px;
  height: 18px;
}

.podcast-controls-volume {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.podcast-controls-volume-slider {
  width: 0;
  min-width: 0;
  opacity: 0;
  margin-left: 0;
  transition: width 200ms ease, opacity 200ms ease, margin-left 200ms ease;
}

.podcast-controls-volume:hover .podcast-controls-volume-slider,
.podcast-controls-volume:focus-within .podcast-controls-volume-slider,
.podcast-controls-volume.is-expanded .podcast-controls-volume-slider {
  width: 50px;
  opacity: 1;
  margin-left: 4px;
}

.podcast-controls-time {
  flex: 0 0 auto;
  color: #f0dfb8;
  font-family: "Norma", serif;
  font-size: 12px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.podcast-controls-seek,
.podcast-controls-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
}

.podcast-controls-seek {
  flex: 1 1 auto;
  width: auto;
}

.podcast-controls-seek::-webkit-slider-thumb,
.podcast-controls-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffd77a;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.podcast-controls-seek::-moz-range-thumb,
.podcast-controls-volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: #ffd77a;
  cursor: pointer;
}

.podcast-controls-seek::-moz-range-track,
.podcast-controls-volume-slider::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: transparent;
}

.podcast-player-media:fullscreen {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.podcast-player-media:-webkit-full-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.podcast-player-media:fullscreen .podcast-video,
.podcast-player-media:-webkit-full-screen .podcast-video {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
}

.podcast-player-media:fullscreen .podcast-controls,
.podcast-player-media:-webkit-full-screen .podcast-controls {
  padding-bottom: 16px;
}

.podcast-player-title {
  margin: 0 0 6px;
  color: #fff6d8;
  font-family: "Norma", serif;
  font-size: clamp(16px, 4.4vw, 20px);
  line-height: 1.3;
  text-shadow: var(--copy-shadow);
}

.podcast-player-meta {
  margin: 0;
  color: #cbb98b;
  font-size: clamp(12px, 3.4vw, 14px);
  letter-spacing: 0.4px;
}


/* Progress save modal */
.progress-save-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: clamp(18px, 5vw, 28px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 240ms ease, visibility 0s linear 240ms;
}

.progress-save-modal.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.progress-save-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.progress-save-dialog {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: clamp(10px, 2.6vw, 16px) clamp(6px, 1.8vw, 12px) clamp(12px, 3vw, 18px);
  border-style: solid;
  border-width: clamp(20px, 6.4vw, 30px);
  border-image-slice: 100 fill;
  border-image-width: clamp(20px, 6.4vw, 30px);
  border-image-outset: 0;
  border-image-repeat: stretch stretch;
  border-image-source: url("../img/podcast_frame.png");
  box-sizing: border-box;
  filter: drop-shadow(0 16px 26px rgba(0, 0, 0, 0.55));
  text-align: center;
}

.progress-save-close {
  position: absolute;
  z-index: 2;
  top: 2px;
  right: 2px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.progress-save-close img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.progress-save-title {
  margin: 0 0 clamp(22px, 5vw, 30px);
  font-family: "Norma", Georgia, serif;
  font-size: clamp(24px, 6.4vw, 32px);
  line-height: 1.08;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.progress-save-title,
.landing-panel h2 {
  width: fit-content;
  margin-inline: auto;
  color: #EECF55;
  background: linear-gradient(180deg, #EECF55 0%, #BE6802 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.55));
}

.progress-save-actions {
  display: grid;
  gap: 14px;
}

.progress-save-option {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 10px 14px;
  border: 1px solid rgba(240, 196, 95, 0.82);
  background: rgba(8, 8, 8, 0.55);
  color: #fff;
  font-family: "Norma", Georgia, serif;
  font-size: clamp(16px, 4.2vw, 20px);
  text-align: left;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease;
}

.progress-save-option:hover {
  background: rgba(20, 14, 8, 0.82);
  border-color: #f0c45f;
}

.progress-save-option strong {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: transparent;
  font-weight: 400;
}

.progress-save-option strong img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.progress-save-note {
  margin: clamp(18px, 4vw, 24px) 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-family: "Norma", Georgia, serif;
  font-size: clamp(15px, 4vw, 18px);
  line-height: 1.35;
}

.quiz-pause-button {
  position: absolute;
  z-index: 7;
  top: 50%;
  right: clamp(30px, 9vw, 36px);
  transform: translateY(-50%);
  display: grid;
  grid-auto-flow: column;
  place-content: center;
  column-gap: clamp(3px, 1vw, 5px);
  width: clamp(30px, 8vw, 38px);
  height: clamp(30px, 8vw, 38px);
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  border: 1px solid rgba(253, 245, 209, 0.5);
  border-radius: 50%;
  background: rgba(30, 16, 8, 0.65);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  line-height: 0;
  transition: transform 150ms ease, filter 150ms ease;
}

.quiz-pause-button:hover {
  filter: brightness(1.2);
}

.quiz-pause-button:active {
  transform: translateY(-50%) scale(0.9);
}

.quiz-pause-button span {
  display: block;
  width: clamp(3px, 0.9vw, 4px);
  height: clamp(11px, 3vw, 14px);
  border-radius: 2px;
  background: #FDF5D1;
}

.result-pause-button {
  top: clamp(48px, 13vw, 62px);
  transform: none;
  z-index: 6;
}

.result-pause-button:active {
  transform: scale(0.9);
}

.pause-menu-modal .landing-list {
  margin-top: clamp(16px, 4vw, 22px);
}

.pause-menu-modal .setting-toggle span,
.pause-quit-button span {
  font-family: "Norma", Georgia, serif;
}

.pause-quit-button img {
  width: clamp(24px, 6.5vw, 30px);
  height: auto;
  flex-shrink: 0;
}

.leave-game-modal .progress-save-option {
  justify-content: center;
  text-align: center;
}

.leave-game-modal [data-leave-confirm] {
  border-color: rgba(255, 128, 115, 0.45);
}

.leave-game-modal [data-leave-confirm] span {
  color: #ff9c8f;
}

.chapter-progress {
  position: absolute;
  z-index: 4;
  left: 20cqw;
  right: 20cqw;
  bottom: 2cqw;
  pointer-events: none;
}

.chapter-progress-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2cqw;
  margin-bottom: 1.4cqw;
}

.chapter-progress-label,
.question-progress {
  font-family: "Norma", Georgia, serif;
  color: #FDF5D1;
  font-size: clamp(10px, 3.4cqw, 16px);
  line-height: 1.2;
  white-space: nowrap;
  text-shadow:
    0 2px 3px rgba(0, 0, 0, 0.95),
    0 1px 1px rgba(0, 0, 0, 0.9),
    0 0 8px rgba(0, 0, 0, 0.7);
}

.chapter-progress-track {
  height: clamp(6px, 2.4cqw, 12px);
  border-radius: 999px;
  background: rgba(20, 12, 8, 0.4);
  border: 1px solid rgba(253, 245, 209, 0.35);
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.6),
    0 2px 6px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.chapter-progress-fill {
  position: relative;
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(251, 167, 5, 0.45) 0%, rgba(224, 136, 2, 0.45) 50%, rgba(201, 119, 1, 0.45) 100%);
  box-shadow: 0 0 6px rgba(251, 167, 5, 0.3);
  overflow: hidden;
  transition: width 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.chapter-progress-fill.no-transition {
  transition: none;
}

.chapter-progress-fill::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -45%;
  width: 38%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  opacity: 0;
  pointer-events: none;
}

.chapter-progress-fill.is-shine::after {
  animation: progressShine 750ms ease-out 500ms;
}

@keyframes progressShine {
  0% { left: -45%; opacity: 1; }
  100% { left: 110%; opacity: 0; }
}

.rotate-lock {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px;
  background: #120b07;
  text-align: center;
}

.rotate-lock p {
  margin: 0;
  color: #f0c45f;
  font-family: "Norma", Georgia, serif;
  font-size: clamp(20px, 4vh, 26px);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rotate-lock-sub {
  color: rgba(255, 243, 202, 0.75);
  font-family: "Norma", Georgia, serif;
  font-size: clamp(13px, 2.6vh, 16px);
}

.rotate-lock-phone {
  width: 30px;
  height: 52px;
  border: 3px solid #f0c45f;
  border-radius: 7px;
  box-shadow: 0 0 14px rgba(240, 196, 95, 0.35);
  animation: rotatePhone 1.8s ease-in-out infinite;
}

@keyframes rotatePhone {
  0%, 25% { transform: rotate(90deg); }
  65%, 100% { transform: rotate(0deg); }
}

/* Portrait-only: block play on touch devices held in landscape */
@media (orientation: landscape) and (pointer: coarse) {
  .rotate-lock {
    display: flex;
  }

  .device-frame {
    visibility: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scene-image.kenburns,
  .choose-wisely.is-enabled,
  .chapter-progress-fill.is-shine::after,
  .impact-stats strong.is-pop,
  .age-accordion.is-denied .age-accordion-lock img,
  .quiz-option.is-visible,
  .quiz-option.is-selected::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .scene-image,
  .impact-overlay .impact-card,
  .chapter-progress-fill {
    transition-duration: 0.01ms !important;
  }
}
