:root {
  --primary-red: #E11344;
  --dark-red: #CC282A;
  --light-peach: #FDD7AB;
  --orange-dots: #E35927;
  --bg-cream: #FFF8F3;
  --text-dark: #1A0E12;
  --text-muted: #6B6B6B;
  --white: #FFFFFF;
  --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --app-height: 100dvh;
  --shell-pad-x: clamp(1rem, 4vw, 3rem);
  --shell-pad-y: clamp(0.8rem, 1.5vh, 1.2rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; width: 100%; max-width: 100%; min-height: 100%; overflow-x: hidden; overflow-y: auto; }
body { font-family: 'Plus Jakarta Sans', sans-serif; background: linear-gradient(135deg, #FFF8F3 0%, #FFEFE5 50%, #FFE8E8 100%); color: var(--text-dark); width: 100%; max-width: 100%; min-height: 100vh; min-height: 100svh; min-height: 100dvh; min-height: var(--app-height); overflow-x: hidden; overflow-y: auto; display: flex; flex-direction: column; }

@supports (overflow: clip) {
  html,
  body { overflow-x: clip; }
}

img, video, canvas, svg, iframe { max-width: 100%; }
button, input, select, textarea { max-width: 100%; font: inherit; }

::selection { background: var(--primary-red); color: white; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-cream); }
::-webkit-scrollbar-thumb { background: var(--primary-red); border-radius: 10px; }

.preloader { position: fixed; inset: 0; background: var(--bg-cream); z-index: 9999; display: flex; align-items: center; justify-content: center; transition: opacity 0.6s ease, visibility 0.6s ease; }
.preloader.hidden { opacity: 0; visibility: hidden; }

.loader-logo-wrapper { width: 180px; height: 90px; display: flex; align-items: center; justify-content: center; animation: heartbeat 1.2s ease-in-out infinite; }
.loader-logo { max-width: 100%; max-height: 100%; width: auto; height: auto; aspect-ratio: 1 / 1; object-fit: contain; filter: none; }

/* Universal anti-stretch safeguard for Micro Labs logo */
img[src*="microlab.png"] {
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
}

@keyframes heartbeat { 0%, 100% { transform: scale(1); } 25% { transform: scale(1.1); } 50% { transform: scale(1); } }

.main-wrapper { position: relative; flex: 1 0 auto; display: flex; flex-direction: column; width: 100%; max-width: 100%; min-height: 100vh; min-height: 100svh; min-height: 100dvh; min-height: var(--app-height); overflow-x: hidden; overflow-y: visible; }

@supports (overflow: clip) {
  .main-wrapper { overflow-x: clip; }
}

.bg-shapes { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; width: 100%; max-width: 100%; min-height: 100vh; min-height: 100svh; min-height: 100dvh; min-height: var(--app-height); }
.shape { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.35; animation: float 18s ease-in-out infinite; transition: transform 0.3s ease-out; }
.shape-1 { width: 400px; height: 400px; background: var(--primary-red); top: -100px; left: -100px; }
.shape-2 { width: 350px; height: 350px; background: var(--orange-dots); bottom: -80px; right: -80px; animation-delay: -6s; }
.shape-3 { width: 250px; height: 250px; background: var(--light-peach); top: 40%; left: 45%; animation-delay: -10s; }

.grid-overlay { position: absolute; inset: 0; background-image: linear-gradient(rgba(225, 19, 68, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(225, 19, 68, 0.03) 1px, transparent 1px); background-size: 40px 40px; mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%); }

@keyframes float { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(30px, -20px) scale(1.05); } 66% { transform: translate(-20px, 20px) scale(0.95); } }

.hero-title { position: relative; }

.bg-icon-plus { position: absolute; top: -30px; left: -50px; width: 45px; height: 45px; opacity: 0; transition: opacity 0.8s ease-in-out; pointer-events: none; z-index: 0; filter: drop-shadow(0px 8px 12px rgba(225, 19, 68, 0.35)); }
.bg-icon-plus.show-icon { opacity: 0.8; }

.bg-wave { position: absolute; bottom: -45px; width: 140px; height: auto; pointer-events: none; z-index: 1; }
.bg-wave-left { left: -130px; }
.bg-wave-right { right: -130px; }

.side-heart { position: absolute; right: 150px; top: 50%; transform: translateY(-50%); max-width: 320px; z-index: 1; opacity: 0.8; pointer-events: none; }
.side-brain { position: absolute; left: 150px; top: 50%; transform: translateY(-50%); max-width: 320px; z-index: 1; opacity: 0.8; pointer-events: none; }
.top-bar { display: flex; justify-content: space-between; align-items: center; padding: max(var(--shell-pad-y), env(safe-area-inset-top)) max(var(--shell-pad-x), env(safe-area-inset-right)) var(--shell-pad-y) max(var(--shell-pad-x), env(safe-area-inset-left)); position: relative; z-index: 2; min-width: 0; }
.home-page .top-bar { justify-content: center; }
.home-page .top-bar .awareness-container { margin-inline: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.65rem; }
.home-page .top-bar .awareness-tag { margin-inline: auto; }
.brand-logo-img { height: 45px; max-height: 48px; width: auto; aspect-ratio: 1 / 1; object-fit: contain; transition: var(--transition); }
.quiz-page .brand-logo-img { height: clamp(68px, 7.6vh, 85px); max-height: 88px; width: auto; aspect-ratio: 1 / 1; }
.thanks-page .brand-logo-img { height: clamp(64px, 7.2vh, 80px); max-height: 84px; width: auto; aspect-ratio: 1 / 1; }
.brand-logo-img:hover { transform: scale(1.05); }

.awareness-tag { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(225, 19, 68, 0.08); color: var(--primary-red); padding: 0.5rem 1rem; border-radius: 50px; font-size: 0.85rem; font-weight: 600; border: 1px solid rgba(225, 19, 68, 0.15); backdrop-filter: blur(10px); transition: var(--transition); }
.awareness-tag:hover { background: rgba(225, 19, 68, 0.15); transform: translateY(-2px); }

/* Clot Image Styles */
.desktop-clot-wrap { display: flex; justify-content: center; align-items: center; margin-top: 0.15rem; }
.desktop-clot-img { width: clamp(80px, 7vw, 110px); height: auto; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(225, 19, 68, 0.18)); transition: transform 0.3s ease; }
.desktop-clot-img:hover { transform: scale(1.05); }
.mobile-clot-wrap { display: none; }

/* ===== Language Selection Overlay & Card (index.html) ===== */
.lang-screen-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 8, 14, 0.78);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  padding: clamp(1rem, 3vh, 2.5rem) clamp(1rem, 3vw, 2.5rem);
  transition: opacity 0.38s ease, visibility 0.38s ease;
}

.lang-screen-overlay.lang-fade-out {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.lang-card {
  position: relative;
  width: min(92vw, 440px);
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
  padding: clamp(1.8rem, 3.8vh, 2.4rem) clamp(1.4rem, 3.2vw, 2.2rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.lang-card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
}

.lang-logo-wrap {
  margin-bottom: 0.15rem;
}

.lang-logo-img {
  height: clamp(62px, 5.2vw, 74px);
  max-height: 78px;
  width: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.lang-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 800;
  color: #1e293b;
  margin: 0;
  line-height: 1.2;
}

.lang-selector-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.custom-lang-select-box {
  position: relative;
  width: 100%;
}

.lang-dropdown {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 0.78rem 2.8rem 0.78rem 1.2rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(0.95rem, 1.2vw, 1.08rem);
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.lang-dropdown:focus {
  outline: none;
  border-color: var(--primary-red);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(225, 19, 68, 0.15);
}

.select-chevron {
  position: absolute;
  right: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 0.95rem;
  pointer-events: none;
}

.lang-actions {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 0.25rem;
}

.lang-confirm-btn {
  width: 100%;
  max-width: 270px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 0.7rem 1.4rem;
  margin: 0 auto;
  border-radius: 50px;
}

.lang-confirm-btn .btn-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: 0.8px;
  line-height: 1;
}

.lang-confirm-btn .icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.lang-confirm-btn .icon-circle i {
  font-size: 0.95rem;
  margin: 0;
}

.hero-pending {
  opacity: 0;
  transform: translateY(22px);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.quiz-ribbon-wrapper { position: relative; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; margin-top: 1rem; }
.quiz-ribbon { background: linear-gradient(90deg, #D31027 0%, #EA384D 100%); color: var(--white); padding: 0.6rem 3rem 0.6rem 4rem; position: relative; display: flex; align-items: center; box-shadow: 0 10px 20px rgba(225, 19, 68, 0.2); clip-path: polygon(0 0, 100% 0, calc(100% - 22px) 50%, 100% 100%, 0 100%); min-height: 55px; }
.ribbon-text { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 1.3rem; letter-spacing: 1.5px; text-transform: uppercase; text-shadow: 1px 1px 2px rgba(0,0,0,0.2); }
.ribbon-icon { position: absolute; left: -20px; top: 50%; transform: translateY(-50%); background: #CC282A; border: 3px solid var(--white); width: 60px; height: 60px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--white); box-shadow: -2px 5px 15px rgba(0,0,0,0.2); z-index: 2; }

.sparkle-left, .sparkle-right { position: absolute; color: #F6C844; font-size: 1.5rem; animation: float-sparkle 2.5s ease-in-out infinite alternate; z-index: 1; }
.sparkle-left { left: -45px; top: -15px; }
.sparkle-right { right: -25px; bottom: -5px; font-size: 1.1rem; animation-delay: 1s; }

@keyframes float-sparkle { 0% { transform: translateY(0) scale(1); opacity: 0.7; } 100% { transform: translateY(-10px) scale(1.2); opacity: 1; filter: drop-shadow(0 0 8px rgba(246, 200, 68, 0.6)); } }

.hero-content { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: clamp(0.5rem, 1.5vh, 1.5rem) max(clamp(1rem, 4vw, 2rem), env(safe-area-inset-right)) max(clamp(1rem, 2vh, 2rem), env(safe-area-inset-bottom)) max(clamp(1rem, 4vw, 2rem), env(safe-area-inset-left)); position: relative; z-index: 1; min-width: 0; }
.hero-title { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: clamp(2rem, 4.5vw, 3.8rem); line-height: 1.1; letter-spacing: 0; margin-bottom: clamp(1rem, 2.5vh, 2rem); color: var(--text-dark); }
.gradient-text { background: linear-gradient(135deg, var(--primary-red) 0%, var(--orange-dots) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.info-card { background: transparent; border-radius: 20px; padding: 1.5rem 2.5rem; margin-bottom: 4rem; position: relative; border: none; transition: var(--transition); }
.info-card:hover { transform: translateY(-5px); }
.animated-bg-layer { position: absolute; inset: 0; border-radius: 20px; overflow: hidden; box-shadow: 0 15px 50px rgba(225, 19, 68, 0.12); z-index: 0; }
.animated-bg-layer::before { content: ''; position: absolute; top: 50%; left: 50%; width: 1000px; height: 1000px; background: conic-gradient(transparent 0deg, transparent 180deg, var(--primary-red) 180deg, var(--orange-dots) 360deg); transform: translate(-50%, -50%) rotate(0deg); animation: rotateBorder 4s linear infinite; z-index: 0; }
.animated-bg-layer::after { content: ''; position: absolute; inset: 3px; background: var(--white); border-radius: 17px; z-index: 1; }

@keyframes rotateBorder { 0% { transform: translate(-50%, -50%) rotate(0deg); } 100% { transform: translate(-50%, -50%) rotate(360deg); } }

.info-row { position: relative; z-index: 2; display: flex; align-items: stretch; gap: 1.5rem; flex-wrap: wrap; justify-content: center; min-width: 0; }
.info-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; min-width: 130px; position: relative; }
.info-label { font-size: 0.9rem; color: var(--text-dark); font-weight: 800; text-align: center; text-transform: uppercase; line-height: 1.3; overflow-wrap: anywhere; }

.badge-wrapper { position: absolute; bottom: -3.5rem; left: 50%; transform: translateX(-50%); display: flex; gap: 0.8rem; align-items: center; justify-content: center; width: max-content; z-index: 3; }
.bottom-badge { width: 50px; height: 50px; border-radius: 50%; background: var(--white); box-shadow: 0 4px 10px rgba(0,0,0,0.15); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 1.15rem; gap: 1px; }
.choice-badge-label { font-family: 'Poppins', sans-serif; font-size: 0.62rem; font-weight: 800; line-height: 1; text-transform: uppercase; letter-spacing: 0.3px; }
.choice-badge-label.label-yes { color: #28a745; }
.choice-badge-label.label-no { color: #CC282A; }
.bottom-badge.icon-pink { font-size: 1.4rem; }
.icon-pink { color: #E85B81; }
.icon-green { color: #28a745; }
.icon-red { color: #CC282A; }
.icon-purple { color: #8E44AD; }
.info-num { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 2.5rem; color: var(--primary-red); line-height: 1; }
.divider { width: 1px; height: 40px; background: linear-gradient(transparent, rgba(225, 19, 68, 0.3), transparent); align-self: center; }

.info-card-clock-wrap { display: none; }
.info-card-clock-img { width: auto; height: auto; object-fit: contain; }

.disclaimer-text { font-size: clamp(0.85rem, 1.2vw, 1rem); color: var(--text-muted); max-width: 600px; margin: 0 auto clamp(1rem, 2.5vh, 2.2rem); line-height: 1.5; overflow-wrap: break-word; }
.disclaimer-text strong { color: var(--primary-red); }

.cta-wrapper { margin-bottom: clamp(1rem, 2vh, 1.8rem); position: relative; display: inline-block; }
.btn-start-quiz { background: linear-gradient(180deg, #FF3344 0%, #D80027 100%); color: white; border: none; padding: 0.6rem 0.8rem 0.6rem 2.2rem; border-radius: 50px; display: inline-flex; align-items: center; gap: 1.5rem; position: relative; transition: all 0.3s ease; cursor: pointer; box-shadow: 0 12px 25px rgba(225, 19, 68, 0.4), inset 0 4px 6px rgba(255, 255, 255, 0.5), inset 0 -4px 6px rgba(0, 0, 0, 0.2); }
.btn-start-quiz::after { content: ''; position: absolute; top: 6px; left: 15px; width: 20px; height: 8px; background: rgba(255, 255, 255, 0.6); border-radius: 10px; transform: rotate(-10deg); filter: blur(1px); }
.btn-start-quiz:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(225, 19, 68, 0.5), inset 0 4px 6px rgba(255, 255, 255, 0.6), inset 0 -4px 6px rgba(0, 0, 0, 0.2); }
.btn-start-quiz:active { transform: translateY(2px); box-shadow: 0 5px 15px rgba(225, 19, 68, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.3), inset 0 -2px 4px rgba(0, 0, 0, 0.2); }
.btn-text { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 1.4rem; letter-spacing: 1px; text-shadow: 1px 1px 2px rgba(0,0,0,0.3); z-index: 1; }
.icon-circle { width: 45px; height: 45px; border-radius: 50%; background: rgba(180, 0, 20, 0.4); display: flex; align-items: center; justify-content: center; box-shadow: inset 0 2px 5px rgba(0,0,0,0.3); z-index: 1; }
.icon-circle i { color: white; font-size: 1.2rem; margin-left: 4px; }
.cta-wrapper::before, .cta-wrapper::after { content: ''; position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 50 L0 50 M30 30 L10 15 M30 70 L10 85' stroke='%23FF3344' stroke-width='8' stroke-linecap='round' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; }
.cta-wrapper::before { left: -50px; }
.cta-wrapper::after { right: -50px; transform: translateY(-50%) scaleX(-1); }

.emergency-info { display: inline-flex; align-items: center; gap: 0.6rem; background: rgba(225, 19, 68, 0.05); padding: 0.8rem 1.5rem; border-radius: 50px; border: 1px dashed rgba(225, 19, 68, 0.3); color: var(--text-dark); font-size: 0.95rem; max-width: 100%; overflow-wrap: break-word; }
.emergency-info i { color: var(--primary-red); animation: pulse-icon 1.5s ease-in-out infinite; }
.emergency-info strong { color: var(--primary-red); font-weight: 700; }

@keyframes pulse-icon { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }

.footer-section { display: flex; justify-content: center; align-items: center; padding: var(--shell-pad-y) max(var(--shell-pad-x), env(safe-area-inset-right)) max(var(--shell-pad-y), env(safe-area-inset-bottom)) max(var(--shell-pad-x), env(safe-area-inset-left)); border-top: 1px solid rgba(225, 19, 68, 0.1); position: relative; z-index: 2; backdrop-filter: blur(10px); min-width: 0; width: 100%; }
.footer-center { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.footer-center span { display: block; font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; text-align: center; }
.footer-right { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.footer-right span { display: block; font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; text-align: center; }
.footer-logo-img { height: clamp(48px, 3.4vw, 56px); width: auto; aspect-ratio: 1 / 1; object-fit: contain; flex-shrink: 0; }

.mobile-organs-row { display: none; }
.mobile-organ-img { width: 55px; height: auto; aspect-ratio: 1 / 1; object-fit: contain; opacity: 0.9; filter: drop-shadow(0 5px 15px rgba(225, 19, 68, 0.2)); }

.quiz-header { padding: 0; position: relative; z-index: 2; width: min(calc(100vw - 2rem), 560px); margin: 0 auto clamp(1.2rem, 2.4vh, 1.55rem); }
.level-badge { display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #ff3354 0%, #d80b3c 100%); color: white; padding: 0.54rem 1.3rem; border-radius: 15px; font-family: 'Poppins', sans-serif; font-size: clamp(0.92rem, 1.15vw, 1.08rem); font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase; margin-bottom: clamp(1rem, 2vh, 1.3rem); box-shadow: 0 10px 24px rgba(225, 19, 68, 0.24), inset 0 3px 5px rgba(255,255,255,0.35), inset 0 -3px 6px rgba(115,0,30,0.2); }
.quiz-stepper { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); align-items: center; width: min(calc(100vw - 2rem), clamp(480px, 32vw, 580px)); margin: 0 auto; }
.quiz-stepper::before { content: ''; position: absolute; left: calc(100% / 12); right: calc(100% / 12); top: 50%; height: 5px; transform: translateY(-50%); border-radius: 999px; background: linear-gradient(90deg, rgba(225, 19, 68, 0.25), rgba(72,72,72,0.28)); z-index: 0; }
.step-dot { position: relative; z-index: 1; justify-self: center; display: inline-flex; align-items: center; justify-content: center; width: clamp(34px, 3vw, 46px); aspect-ratio: 1; border-radius: 50%; background: linear-gradient(180deg, #b9b9b9, #777); color: white; border: 3px solid rgba(255,255,255,0.9); box-shadow: 0 4px 10px rgba(0,0,0,0.18), inset 0 3px 4px rgba(255,255,255,0.35); font-family: 'Poppins', sans-serif; font-size: clamp(1rem, 1.5vw, 1.25rem); font-weight: 900; line-height: 1; }
.step-dot.active,
.step-dot.completed { background: linear-gradient(180deg, #ff3354, #d40a3a); box-shadow: 0 8px 18px rgba(225,19,68,0.28), inset 0 3px 4px rgba(255,255,255,0.4); }
.quiz-progress-track { display: none; }
.progress-track { width: 100%; max-width: 500px; height: 6px; background: rgba(225, 19, 68, 0.1); border-radius: 10px; margin: 0 auto; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary-red), var(--orange-dots)); border-radius: 10px; transition: width 0.5s ease; }
.scroll-to-bottom-btn { display: none; }

.quiz-content-wrapper { flex: 1 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: clamp(1.2rem, 3vw, 3.2rem); align-items: center; padding: 0 max(clamp(1.5rem, 4vw, 4rem), env(safe-area-inset-right)) max(clamp(1rem, 2vh, 2rem), env(safe-area-inset-bottom)) max(clamp(1.5rem, 4vw, 4rem), env(safe-area-inset-left)); position: relative; z-index: 1; min-height: 0; width: 100%; max-width: 100%; overflow: visible; }
.left-stage { display: flex; flex-direction: column; align-items: stretch; gap: clamp(1rem, 2.4vh, 1.8rem) !important; justify-self: end; min-width: 0; width: min(100%, 430px); max-width: 100%; }
.quiz-pad-card { position: relative; width: 100%; padding: clamp(3.2rem, 6vh, 4.3rem) clamp(1.4rem, 2.4vw, 2rem) clamp(1.2rem, 2.4vh, 1.8rem); border-radius: 28px; background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(255,250,247,0.98) 100%); border: 3px solid rgba(225, 19, 68, 0.85); box-shadow: -13px 12px 0 #d80b3c, -20px 26px 34px rgba(225,19,68,0.16), 0 24px 38px rgba(225,19,68,0.22), inset 0 0 0 7px rgba(255, 226, 225, 0.72), inset 0 0 0 11px rgba(255,255,255,0.78); transform: rotate(-2deg); transform-origin: center bottom; overflow: visible; backface-visibility: hidden; -webkit-font-smoothing: antialiased; }
.quiz-pad-card::before { content: ''; position: absolute; inset: 12px; border-radius: 22px; border: 2px solid rgba(225,19,68,0.12); pointer-events: none; }
.quiz-pad-card::after { content: ''; position: absolute; left: 18px; bottom: 10px; right: 18px; height: 13px; border-radius: 0 0 18px 18px; background: linear-gradient(180deg, rgba(225,19,68,0.12), rgba(225,19,68,0.34)); pointer-events: none; }
.pad-clip { position: absolute; top: -28px; left: 50%; transform: translateX(-50%); width: clamp(110px, 11vw, 150px); height: clamp(48px, 5vw, 60px); border-radius: 22px 22px 14px 14px; background: linear-gradient(180deg, #e6485d 0%, #be2337 100%); box-shadow: 0 8px 14px rgba(143,0,26,0.25), inset 0 4px 5px rgba(255,255,255,0.28), inset 0 -5px 6px rgba(87,0,20,0.18); z-index: 3; }
.pad-clip::before { content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 15px; height: 15px; border-radius: 50%; background: #7e1222; box-shadow: inset 0 2px 2px rgba(0,0,0,0.25); }
.question-card { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, rgba(255,247,247,0.95), rgba(255,238,238,0.92)); border-radius: 18px; padding: clamp(1rem, 1.9vh, 1.35rem) clamp(1rem, 1.8vw, 1.35rem); margin-top: 0; margin-bottom: clamp(1.2rem, 2.4vh, 1.7rem); box-shadow: inset 0 0 0 2px rgba(225,19,68,0.14), 0 10px 22px rgba(225,19,68,0.08); border: 1px solid rgba(225,19,68,0.12); }
.question-card::before { content: none; }

.balance-loss-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  border: 0;
  max-width: none;
  width: 100%;
  transition: transform 0.3s ease;
  overflow: visible;
  gap: clamp(0.7rem, 1.5vh, 1.2rem);
}
.balance-loss-card::after { display: none; }
.balance-loss-card:hover { transform: none; }

.symptom-desc-wrap {
  width: 100%;
  text-align: center;
}
.symptom-desc-wrap p {
  color: var(--text-dark);
  font-size: clamp(0.96rem, 1.25vw, 1.3rem);
  line-height: 1.45;
  margin: 0 auto clamp(0.55rem, 1.1vh, 0.85rem);
  max-width: 320px;
  font-weight: 700;
}
.balance-loss-card p {
  color: var(--text-dark);
  font-size: clamp(0.96rem, 1.25vw, 1.3rem);
  line-height: 1.45;
  margin: 0 auto clamp(0.55rem, 1.1vh, 0.85rem);
  max-width: 320px;
  font-weight: 700;
}

.symptom-badge-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.b-icon {
  width: clamp(56px, 4.8vw, 74px);
  height: clamp(56px, 4.8vw, 74px);
  background: linear-gradient(180deg, #ff3354, #d80b3c);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 900;
  font-size: clamp(1.8rem, 2.4vw, 2.5rem);
  margin: 0 auto clamp(0.45rem, 0.9vh, 0.75rem);
  box-shadow: 0 10px 20px rgba(225,19,68,0.22), inset 0 4px 5px rgba(255,255,255,0.28);
}
.balance-loss-card h4 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.35rem, 1.9vw, 2.1rem);
  color: var(--primary-red);
  margin-bottom: 0;
  letter-spacing: 0.6px;
  font-weight: 900;
  overflow-wrap: anywhere;
}
.pad-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 270px);
  height: 14px;
  margin: 0 auto;
  background: linear-gradient(90deg, transparent 0 12%, rgba(225,19,68,0.18) 12% 88%, transparent 88%);
}
.pad-divider::before,
.pad-divider::after { content: none; }

.center-stage { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; align-self: start; gap: 0; min-height: 0; min-width: 0; margin-top: 0; }
.quiz-question-title { font-family: 'Poppins', sans-serif; font-size: clamp(0.95rem, 1.25vw, 1.25rem); font-weight: 500; color: var(--text-dark); text-align: left; max-width: 520px; margin: 0; line-height: 1.34; overflow-wrap: break-word; white-space: pre-line; }
.quiz-question-title strong { font-weight: 800; }
.emergency-call-highlight { color: var(--primary-red, #e11344) !important; font-weight: 800; }
.befast-call-highlight { color: var(--primary-red, #e11344) !important; font-weight: 800; display: inline-block; }
.question-card.question-refresh { animation: questionFade 0.2s ease-out; }
@keyframes questionFade { 0% { opacity: 0.5; } 100% { opacity: 1; } }
.video-stage { position: relative; width: clamp(210px, 24vw, 384px); aspect-ratio: 9 / 16; background: #ffffff; border: 0; outline: 5px solid var(--primary-red); border-radius: 26px; overflow: hidden; box-shadow: 0 22px 44px rgba(225, 19, 68, 0.28); display: flex; justify-content: center; align-items: center; }
#quizVideo { width: 100%; height: 100%; object-fit: cover; background: #ffffff; transition: opacity 0.18s ease; will-change: opacity; }
#quizVideo.is-switching { /* removed opacity 0 to prevent black flash during video transitions */ }

.quiz-video-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
  z-index: 2;
  border-radius: inherit;
  background: #ffffff;
}

.quiz-video-poster.is-active {
  opacity: 1;
  visibility: visible;
}

/* ===== Video Subtitle Overlay ===== */
.video-subtitle-overlay {
  position: absolute;
  left: 50%;
  bottom: clamp(12px, 2.6vh, 22px);
  transform: translateX(-50%);
  width: calc(100% - 20px);
  max-width: 92%;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  z-index: 15;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.video-subtitle-overlay[hidden] {
  display: none !important;
  opacity: 0;
  visibility: hidden;
}

.video-subtitle-text {
  display: inline-block;
  background: rgba(18, 10, 14, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: clamp(0.78rem, 1.1vw, 0.95rem);
  line-height: 1.32;
  text-align: center;
  padding: 0.38rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 10px rgba(225, 19, 68, 0.2);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

.quiz-actions { position: relative; display: flex; flex-direction: column; justify-content: center; gap: clamp(1rem, 2.6vh, 1.8rem); justify-self: start; width: min(100%, 520px); min-width: 0; }

.options-prompt-banner {
  position: absolute;
  left: 50%;
  bottom: calc(100% + clamp(0.85rem, 1.8vh, 1.35rem));
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: min(100%, 380px);
  height: auto;
  min-height: clamp(52px, 6.2vh, 66px);
  padding: 0.4rem clamp(1.6rem, 2.4vw, 2.4rem);
  border-radius: 13px;
  color: white;
  font-family: 'Poppins', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  text-shadow: 0 1px 1px rgba(80,0,24,0.22);
  pointer-events: none;
  background: linear-gradient(180deg, #f34259 0%, #e51a48 100%);
  box-shadow: 0 7px 14px rgba(225,19,68,0.14);
}
.options-prompt-banner::before { content: none; }
.options-prompt-banner::after {
  content: '';
  position: absolute;
  right: -42px;
  top: 50%;
  width: 36px;
  height: 40px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 60 70' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 35 H1 M20 16 L9 6 M20 54 L9 64' stroke='%23ff4b54' stroke-width='7' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.options-prompt-banner i {
  position: absolute;
  left: clamp(-4rem, -4.2vw, -2.9rem);
  top: 50%;
  bottom: auto;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(48px, 5vw, 68px);
  aspect-ratio: 1;
  color: #f22942;
  font-size: clamp(2.35rem, 3.4vw, 3.25rem);
  text-shadow: -2px 0 #fff, 0 2px #fff, 2px 0 #fff, 0 -2px #fff, 0 5px 8px rgba(166,0,42,0.18);
  filter: drop-shadow(0 5px 8px rgba(166,0,42,0.18));
  transform: translateY(-50%) rotate(-16deg);
}
.options-prompt-banner span,
.options-prompt-banner .prompt-text {
  position: relative;
  z-index: 1;
  white-space: normal;
  text-align: center;
  line-height: 1.15;
  font-size: clamp(0.96rem, 1.55vw, 1.38rem);
  font-weight: 800;
  display: block;
}

/* ===== Question Option Media with Dialogue Box Buttons ===== */
.character-options-container {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  user-select: none;
  background: #ffffff;
  border-radius: 18px;
}

.stopwatch-options-video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 14px 28px rgba(225, 19, 68, 0.16));
  pointer-events: none;
  user-select: none;
  border-radius: 18px;
  background: #ffffff;
}

.speech-bubble-overlay {
  position: absolute;
  left: 70.2%;
  top: 33.5%;
  transform: translate(-50%, -50%);
  width: 44%;
  height: 27%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1.2vw, 14px);
  padding: 0;
  z-index: 25;
  box-sizing: border-box;
  pointer-events: auto;
}

.character-options-container.stopwatch-options-active .speech-bubble-overlay {
  left: 70.2%;
  top: 33.5%;
  width: 44%;
  height: 27%;
  flex-direction: row;
}

.speech-bubble-btn {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  max-width: 100%;
  height: 78%;
  min-height: 0;
  max-height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 0.7vw, 8px);
  border-radius: 999px;
  border: none;
  cursor: pointer;
  color: #ffffff;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(0.85rem, 1.2vw, 1.15rem);
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
  padding: 0 clamp(6px, 1vw, 14px);
  pointer-events: auto;
  position: relative;
  z-index: 30;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.speech-bubble-btn i {
  font-size: clamp(1.05rem, 1.5vw, 1.4rem);
  flex-shrink: 0;
  pointer-events: none;
}

.speech-bubble-btn .btn-bubble-text {
  pointer-events: none;
}

.btn-bubble-yes {
  background: linear-gradient(180deg, #38d45c 0%, #1fab3c 55%, #13832c 100%);
  box-shadow: 0 4px 10px rgba(19, 131, 44, 0.35), inset 0 2px 3px rgba(255,255,255,0.4), inset 0 -2px 4px rgba(0,0,0,0.2);
}

.btn-bubble-yes:hover {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.08);
  box-shadow: 0 6px 14px rgba(19, 131, 44, 0.45), inset 0 2px 3px rgba(255,255,255,0.45);
}

.btn-bubble-yes:active {
  transform: translateY(1px) scale(0.98);
}

.btn-bubble-no {
  background: linear-gradient(180deg, #ff3b59 0%, #e61435 55%, #b50520 100%);
  box-shadow: 0 4px 10px rgba(181, 5, 32, 0.35), inset 0 2px 3px rgba(255,255,255,0.4), inset 0 -2px 4px rgba(0,0,0,0.2);
}

.btn-bubble-no:hover {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.08);
  box-shadow: 0 6px 14px rgba(181, 5, 32, 0.45), inset 0 2px 3px rgba(255,255,255,0.45);
}

.btn-bubble-no:active {
  transform: translateY(1px) scale(0.98);
}

[hidden] {
  display: none !important;
}

/* ===== Emergency Level (Level 6) Layout & Elements ===== */
body.emergency-active .center-stage {
  align-self: start !important;
  justify-content: flex-start !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  margin-top: 0 !important;
}

body.emergency-active .video-stage {
  aspect-ratio: 1 / 1 !important;
  width: clamp(280px, 24vw, 370px) !important;
  height: clamp(280px, 24vw, 370px) !important;
  max-height: calc(100vh - 240px) !important;
  margin: clamp(1.2rem, 3vh, 2.2rem) auto 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent;
  border: 0;
  outline: 5px solid var(--primary-red);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 22px 44px rgba(225, 19, 68, 0.28);
}

body.emergency-active .emergency-main-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
}

/* Emergency elements hidden by default on earlier levels */
#finishEmergencyBtn,
.emergency-continue-btn,
#emergencyMessageCard,
.emergency-message-card {
  display: none;
}

body:not(.emergency-active) #finishEmergencyBtn,
body:not(.emergency-active) .emergency-continue-btn,
body:not(.emergency-active) #emergencyMessageCard,
body:not(.emergency-active) .emergency-message-card,
#finishEmergencyBtn[hidden],
.emergency-continue-btn[hidden],
#emergencyMessageCard[hidden],
.emergency-message-card[hidden],
body.emergency-active .options-prompt-banner,
body.emergency-active .character-options-container,
body.emergency-active #characterOptions,
.character-options-container[hidden],
#characterOptions[hidden],
.options-prompt-banner[hidden] {
  display: none !important;
}

body.emergency-active #emergencyMessageCard:not([hidden]),
body.emergency-active .emergency-message-card:not([hidden]) {
  display: block !important;
}

.emergency-message-card {
  width: 100%;
  max-width: min(100%, 460px);
  margin: 0 auto;
  background: linear-gradient(180deg, #ffffff 0%, #fff9f9 100%);
  border: 2px solid rgba(225, 19, 68, 0.15);
  border-radius: 20px;
  padding: clamp(1.1rem, 2.2vh, 1.55rem) clamp(1.2rem, 2vw, 1.8rem);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.9), 0 12px 28px rgba(225, 19, 68, 0.1), 0 4px 10px rgba(0, 0, 0, 0.04);
  text-align: center;
  position: relative;
  z-index: 1;
}

.emergency-message-card p {
  font-family: 'Poppins', sans-serif;
  color: #3b1d24;
  font-size: clamp(0.92rem, 1.15vw, 1.08rem);
  line-height: 1.6;
  margin: 0;
  font-weight: 500;
}

.emergency-message-card p strong {
  color: var(--primary-red);
  font-weight: 800;
}

/* Finish Button (ONLY visible in Level 6 Ambulance / Emergency Level) */
body.emergency-active .emergency-continue-btn:not([hidden]),
body.emergency-active #finishEmergencyBtn:not([hidden]) {
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center !important;
  width: auto !important;
  min-width: clamp(190px, 18vw, 240px) !important;
  max-width: 260px !important;
  padding: 0.65rem 1.6rem !important;
  margin: 0.9rem auto 0 !important;
  gap: 0.85rem !important;
  border-radius: 50px !important;
  color: #ffffff !important;
  cursor: pointer;
  box-shadow: 0 12px 25px rgba(225, 19, 68, 0.4), inset 0 4px 6px rgba(255, 255, 255, 0.5), inset 0 -4px 6px rgba(0, 0, 0, 0.2) !important;
  transition: all 0.3s ease;
}

.emergency-continue-btn,
.emergency-continue-btn:hover,
.emergency-continue-btn:focus,
.emergency-continue-btn:active,
.emergency-continue-btn:visited,
#finishEmergencyBtn,
#finishEmergencyBtn:hover,
#finishEmergencyBtn:focus,
#finishEmergencyBtn:active,
#finishEmergencyBtn:visited {
  text-decoration: none !important;
  color: #ffffff !important;
}

.emergency-continue-btn:hover,
#finishEmergencyBtn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(225, 19, 68, 0.5), inset 0 4px 6px rgba(255, 255, 255, 0.6), inset 0 -4px 6px rgba(0, 0, 0, 0.2) !important;
}

.emergency-continue-btn:active,
#finishEmergencyBtn:active {
  transform: translateY(1px);
}

.emergency-continue-btn .btn-text,
#finishEmergencyBtn .btn-text {
  text-decoration: none !important;
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.1rem, 1.35vw, 1.28rem);
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1;
  color: #ffffff !important;
}

.emergency-continue-btn .icon-circle,
#finishEmergencyBtn .icon-circle {
  width: 32px;
  height: 32px;
  background: #ffffff !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2) !important;
  margin: 0 !important;
  transition: transform 0.3s ease;
}

.emergency-continue-btn .icon-circle i,
#finishEmergencyBtn .icon-circle i {
  color: var(--primary-red) !important;
  font-size: 0.95rem !important;
  margin: 0 !important;
  display: inline-block !important;
  line-height: 1 !important;
}

.emergency-continue-btn:hover .icon-circle,
#finishEmergencyBtn:hover .icon-circle {
  transform: translateX(3px);
}

.feedback-modal { --modal-main: #e11344; --modal-dark: #9f052d; --modal-soft: #fff0ef; --modal-glow: rgba(225,19,68,0.42); position: fixed; inset: 0; background: rgba(22, 9, 16, 0.76); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 9999; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; padding: max(1.2rem, env(safe-area-inset-top)) max(1.2rem, env(safe-area-inset-right)) max(1.2rem, env(safe-area-inset-bottom)) max(1.2rem, env(safe-area-inset-left)); overflow-x: hidden; overflow-y: auto; }
.feedback-modal.modal-success { --modal-main: #28a745; --modal-dark: #0c7b29; --modal-soft: #effff3; --modal-glow: rgba(40,167,69,0.42); }
.feedback-modal.modal-golden { --modal-main: #ff9d00; --modal-dark: #b94a00; --modal-soft: #fffdf2; --modal-glow: rgba(255,157,0,0.48); }
.feedback-modal.show { opacity: 1; visibility: visible; }
.modal-content-box { position: relative; isolation: isolate; width: min(88vw, 880px); min-height: clamp(500px, 72vh, 640px); padding: clamp(8.4rem, 16vh, 10.4rem) clamp(2.5rem, 5vw, 4.2rem) clamp(1.4rem, 2.8vh, 2rem); text-align: center; color: #45131d; background: transparent; transform: scale(0.86) translateY(18px); transition: transform 0.42s cubic-bezier(0.175, 0.885, 0.32, 1.18); filter: drop-shadow(0 26px 48px rgba(0,0,0,0.28)); }
.modal-content-box::before { content: ''; position: absolute; inset: 0; z-index: -1; border: 8px solid #fff7f3; border-radius: 36px; background: linear-gradient(180deg, rgba(255,255,255,0.98), var(--modal-soft)); box-shadow: 0 0 0 8px var(--modal-main), inset 0 0 0 2px rgba(255,255,255,0.65), inset 0 0 0 18px color-mix(in srgb, var(--modal-main) 7%, transparent); pointer-events: none; clip-path: polygon(5% 6%, 50% 9%, 94% 5%, 100% 18%, 97% 87%, 88% 87%, 84% 96%, 50% 94%, 16% 96%, 12% 88%, 4% 88%, 0 20%); }
.modal-content-box::after { content: none; display: none; }
.feedback-modal.show .modal-content-box { transform: scale(1) translateY(0); }
.modal-beacon { position: absolute; left: 50%; top: 9%; transform: translate(-50%, -68%); width: clamp(86px, 10vw, 120px); height: clamp(86px, 10vw, 120px); z-index: 5; pointer-events: none; }
.modal-beacon::after { content: ''; position: absolute; left: 12%; right: 12%; top: 50%; height: 18%; border-radius: 4px 4px 8px 8px; background: linear-gradient(180deg, #4c4c4c, #151515); box-shadow: inset 0 4px 5px rgba(255,255,255,0.18), 0 3px 6px rgba(0,0,0,0.4); }
.modal-beacon::before { content: ''; position: absolute; left: 50%; top: 0; width: 64%; height: 50%; transform: translateX(-50%); border-radius: 50% 50% 0 0; background: radial-gradient(circle at 35% 40%, rgba(255,255,255,0.95) 0 9%, transparent 10%), radial-gradient(circle at 50% 100%, color-mix(in srgb, var(--modal-main) 60%, white) 0%, var(--modal-main) 55%, var(--modal-dark) 100%); border: 4px solid rgba(255,255,255,0.92); border-bottom: none; box-shadow: 0 0 26px var(--modal-glow), 0 0 80px var(--modal-glow), inset 0 6px 8px rgba(255,255,255,0.36); animation: modal-beacon-pulse 0.95s ease-in-out infinite alternate; }
.modal-beacon span {
  position: absolute; left: -34%; right: -34%; top: -34%; height: 88%;
  border-radius: 50% 50% 0 0;
  background: repeating-conic-gradient(from 270deg at 50% 100%, color-mix(in srgb, var(--modal-main) 35%, transparent) 0deg 5deg, transparent 6deg 24deg);
  filter: blur(1px); opacity: 0.72; overflow: hidden;
  clip-path: inset(0 0 0 0); transform-origin: 50% 100%;
  animation: modal-rays 1.4s ease-in-out infinite alternate; z-index: -1;
}
@keyframes modal-beacon-pulse { from { filter: brightness(0.95); } to { filter: brightness(1.18); } }
@keyframes modal-rays { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
.modal-character-img { position: absolute; left: clamp(-4.8rem, -5.2vw, -2.5rem); bottom: clamp(0.6rem, 1.8vh, 1.4rem); width: clamp(140px, 17vw, 210px); z-index: 1; filter: drop-shadow(0 14px 18px rgba(120,0,32,0.22)); pointer-events: none; }
.modal-ribbon { position: absolute; left: clamp(2.8rem, 7vw, 5rem); right: clamp(2.8rem, 7vw, 5rem); top: clamp(3.1rem, 6.3vh, 4.3rem); min-height: clamp(68px, 8vh, 90px); display: flex; align-items: center; justify-content: center; padding: 0 clamp(3rem, 7vw, 5rem); background: linear-gradient(180deg, color-mix(in srgb, var(--modal-main) 92%, #ffffff 8%), var(--modal-dark)); border-radius: 12px; box-shadow: 0 10px 16px color-mix(in srgb, var(--modal-main) 26%, transparent), inset 0 4px 5px rgba(255,255,255,0.25), inset 0 -5px 7px rgba(0,0,0,0.14); clip-path: polygon(0 0, 94% 0, 100% 50%, 94% 100%, 0 100%, 4% 50%); z-index: 2; }
.modal-ribbon h3 { position: relative; z-index: 1; color: white; font-family: 'Poppins', sans-serif; font-size: clamp(1.75rem, 4.2vw, 3.5rem); font-weight: 900; line-height: 1; margin: 0; letter-spacing: 0; text-shadow: 0 4px 0 rgba(74,0,22,0.3); }
.modal-icon { position: absolute; right: clamp(0.55rem, 1.4vw, 1rem); top: 50%; transform: translateY(-50%); display: flex; align-items: center; justify-content: center; width: clamp(40px, 4.4vw, 58px); aspect-ratio: 1; color: #fff; font-size: clamp(1.5rem, 3vw, 2.2rem); text-shadow: 0 3px 0 rgba(80,0,24,0.22); }
.modal-message-wrap { position: relative; z-index: 1; max-width: 560px; margin: clamp(0.9rem, 2.4vh, 1.5rem) auto clamp(0.9rem, 2.2vh, 1.4rem); }
.modal-message-wrap p { color: #4b1824; font-size: clamp(0.98rem, 1.9vw, 1.42rem); line-height: 1.48; font-weight: 600; margin: 0 auto; white-space: pre-line; }
.modal-next-btn { position: relative; z-index: 1; margin: 0 auto; min-width: clamp(250px, 32vw, 390px); justify-content: center; background: linear-gradient(180deg, #ffd23c 0%, #ff9d00 100%); color: #5a160b; box-shadow: 0 10px 0 #b94a00, 0 18px 28px rgba(127,50,0,0.24), inset 0 5px 8px rgba(255,255,255,0.45), inset 0 -5px 8px rgba(115,45,0,0.18); }
.modal-next-btn:hover { color: #5a160b; transform: translateY(-4px); box-shadow: 0 13px 0 #b94a00, 0 24px 34px rgba(127,50,0,0.28), inset 0 5px 8px rgba(255,255,255,0.52), inset 0 -5px 8px rgba(115,45,0,0.2); }
.modal-next-btn .btn-text { font-size: clamp(1.4rem, 3vw, 2.2rem); color: inherit; }

/* ===== Game Intro Modal Styling ===== */
.game-intro-modal-box {
  min-height: clamp(390px, 58vh, 500px);
  padding: clamp(6.8rem, 13vh, 8.2rem) clamp(2rem, 5vw, 3.6rem) clamp(1.8rem, 3.5vh, 2.6rem);
}

.feedback-modal.modal-golden .game-intro-modal-box::before {
  border-color: #fffdf5;
  box-shadow: 0 0 0 8px var(--modal-main), 0 0 28px var(--modal-glow), inset 0 0 0 2px rgba(255, 255, 255, 0.7), inset 0 0 0 18px rgba(255, 157, 0, 0.09);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), #fffdf2);
}

.game-intro-ribbon {
  padding: 0 clamp(1.2rem, 3.5vw, 2.8rem) !important;
}

.feedback-modal.modal-golden .game-intro-ribbon {
  background: linear-gradient(180deg, #ffd23c 0%, #ff9d00 55%, #df6500 100%) !important;
  box-shadow: 0 10px 18px rgba(185, 74, 0, 0.32), inset 0 4px 6px rgba(255, 255, 255, 0.55), inset 0 -5px 8px rgba(115, 45, 0, 0.25) !important;
}

.game-intro-ribbon h3 {
  font-size: clamp(1.2rem, 2.8vw, 2.2rem) !important;
  white-space: nowrap !important;
}

.feedback-modal.modal-golden .game-intro-ribbon h3 {
  color: #5a160b !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45), 0 2px 4px rgba(115, 45, 0, 0.22) !important;
  letter-spacing: 0.5px !important;
}

.ribbon-game-icon {
  margin-right: clamp(0.35rem, 1vw, 0.6rem);
  color: #5a160b;
  font-size: 0.92em;
  vertical-align: -1px;
}

.game-intro-message-wrap {
  display: flex !important;
  flex-direction: column !important;
  gap: clamp(0.7rem, 1.8vh, 1.15rem) !important;
  margin: clamp(1.2rem, 2.6vh, 1.8rem) auto clamp(1.4rem, 2.8vh, 2rem) !important;
  max-width: 580px !important;
}

.game-intro-message-wrap p {
  margin: 0 !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
}

.game-intro-time {
  font-size: clamp(1.05rem, 2vw, 1.42rem) !important;
  font-weight: 700 !important;
  color: #b94a00 !important;
  line-height: 1.35 !important;
}

.intro-icon-stopwatch {
  margin-right: 0.38rem;
  color: #d97706;
  font-size: 1.05em;
  vertical-align: -1px;
}

.game-intro-sub {
  font-size: clamp(0.96rem, 1.75vw, 1.25rem) !important;
  font-weight: 600 !important;
  color: #4a2c14 !important;
  line-height: 1.4 !important;
}

.game-intro-ready {
  font-size: clamp(1.02rem, 1.9vw, 1.35rem) !important;
  font-weight: 800 !important;
  color: #2b1404 !important;
  line-height: 1.35 !important;
}

.intro-icon-rocket {
  margin-right: 0.38rem;
  color: #ff9d00;
  font-size: 1.05em;
  vertical-align: -1px;
}

.game-intro-start-btn {
  min-width: clamp(230px, 28vw, 340px) !important;
}

.feedback-modal.modal-golden .modal-shield {
  background: linear-gradient(160deg, #ffd23c 0%, #ff9d00 50%, #b94a00 100%) !important;
  box-shadow: 0 14px 24px rgba(185, 74, 0, 0.32), inset 0 0 0 8px rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
  text-shadow: 0 3px 0 rgba(115, 45, 0, 0.45) !important;
}


/* ===== BE-FAST 6-Sign Indicator Row inside Popup ===== */
.modal-befast-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(8px, 1.3vw, 16px);
  width: 100%;
  max-width: 680px;
  margin: clamp(1rem, 2.2vh, 1.6rem) auto 0;
  padding: 0.2rem 0.5rem 0;
  position: relative;
  z-index: 4;
}

.modal-befast-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: clamp(44px, 5.5vw, 64px);
  min-width: 0;
  text-align: center;
  transition: all 0.3s ease;
}

/* Inactive items: Black and white / monochrome slate appearance */
.modal-befast-item:not(.active) {
  filter: grayscale(100%);
  opacity: 0.65;
}

.modal-befast-item:not(.active) .modal-befast-letter {
  background: linear-gradient(145deg, #7a828e, #4b525d) !important;
  color: #ffffff !important;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.14), inset 0 1px 2px rgba(255, 255, 255, 0.22) !important;
}

/* Extra space after E (item 2) */
.modal-befast-item:nth-child(2) {
  margin-right: clamp(14px, 2.4vw, 28px);
}

.modal-befast-item.active {
  opacity: 1;
  width: clamp(82px, 14vw, 120px);
  filter: none !important;
}

.modal-befast-letter {
  width: clamp(42px, 4.2vw, 54px);
  height: clamp(42px, 4.2vw, 54px);
  aspect-ratio: 1;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.35rem, 1.9vw, 1.85rem);
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(0,0,0,0.16), inset 0 2px 3px rgba(255,255,255,0.28);
  transition: all 0.3s ease;
}

.modal-befast-item.active .modal-befast-letter {
  filter: none !important;
  box-shadow: 0 0 0 3.5px #ffd23c, 0 8px 20px rgba(225, 19, 68, 0.42), inset 0 2px 4px rgba(255,255,255,0.45);
  transform: scale(1.12) translateY(-2px);
}

.modal-befast-name {
  display: none;
  font-size: clamp(0.72rem, 0.95vw, 0.88rem);
  font-weight: 800;
  color: #4b1824;
  line-height: 1.2;
  white-space: normal;
  word-break: normal;
  text-align: center;
  letter-spacing: 0.1px;
}

.modal-befast-item.active .modal-befast-name {
  display: block;
  color: var(--primary-red);
  font-weight: 900;
  font-size: clamp(0.88rem, 1.2vw, 1.08rem) !important;
  line-height: 1.22 !important;
  text-shadow: 0 1px 3px rgba(225, 19, 68, 0.18);
  margin-top: 3px;
}

.modal-shield { position: absolute; right: clamp(-1.2rem, -1vw, -0.4rem); bottom: clamp(0.5rem, 1.8vh, 1.2rem); z-index: 3; display: flex; align-items: center; justify-content: center; width: clamp(78px, 10vw, 125px); aspect-ratio: 1; color: white; font-size: clamp(2.2rem, 5vw, 4rem); background: linear-gradient(160deg, color-mix(in srgb, var(--modal-main) 80%, #ffffff 20%), var(--modal-dark)); clip-path: polygon(50% 0, 94% 18%, 86% 78%, 50% 100%, 14% 78%, 6% 18%); box-shadow: 0 14px 22px color-mix(in srgb, var(--modal-main) 24%, transparent), inset 0 0 0 8px rgba(255,255,255,0.14); text-shadow: 0 4px 0 rgba(80,0,24,0.22); }

@media (max-width: 900px) {
  .modal-content-box { width: min(92vw, 680px); min-height: clamp(470px, 68vh, 560px); padding: clamp(7.8rem, 16vh, 9rem) clamp(1.6rem, 5vw, 3rem) clamp(1.4rem, 3.5vh, 2rem); }
  .modal-character-img { left: clamp(-3.4rem, -5vw, -1.2rem); width: clamp(145px, 25vw, 210px); }
  .modal-ribbon { left: clamp(1.5rem, 6vw, 3rem); right: clamp(1.5rem, 6vw, 3rem); }
  .modal-message-wrap { max-width: 460px; }
  .modal-next-btn { min-width: clamp(220px, 44vw, 320px); }
  .modal-befast-row { max-width: 560px; gap: 8px; margin-top: 1.1rem; }
  .modal-befast-letter { width: 42px; font-size: 1.35rem; }
  .modal-befast-name { font-size: 0.64rem; line-height: 1.18; }
  .modal-befast-item.active .modal-befast-name { font-size: 0.84rem !important; line-height: 1.2 !important; }
  .modal-shield { width: clamp(68px, 12vw, 95px); }
}

@media (max-width: 767px) {
  .feedback-modal { padding: max(1rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left)); }
  .modal-content-box { width: min(93vw, 420px); min-height: 375px; padding: 6.2rem 0.85rem 1rem; border-radius: 24px; }
  .modal-content-box::before { inset: 0; border-width: 5px; border-radius: 24px; box-shadow: 0 0 0 6px var(--modal-main), inset 0 0 0 2px rgba(255,255,255,0.65), inset 0 0 0 12px color-mix(in srgb, var(--modal-main) 6%, transparent); clip-path: polygon(4% 5%, 50% 8%, 96% 5%, 100% 18%, 97% 90%, 86% 90%, 82% 98%, 50% 96%, 18% 98%, 14% 91%, 4% 91%, 0 20%); }
  .modal-beacon { width: 68px; height: 68px; top: 8%; transform: translate(-50%, -67%); }
  .modal-character-img { left: -0.8rem; bottom: 0.4rem; width: clamp(80px, 23vw, 92px); opacity: 0.85; z-index: 1; }
  .modal-ribbon { left: 0.9rem; right: 0.9rem; top: 2.75rem; min-height: 46px; padding: 0 1.8rem 0 1.25rem; border-radius: 9px; }
  .modal-ribbon h3 { font-size: clamp(1.08rem, 6.5vw, 1.52rem); text-shadow: 0 2px 0 rgba(74,0,22,0.25); }
  .modal-icon { right: 0.38rem; width: 32px; font-size: 1.25rem; }
  .modal-message-wrap { max-width: 100%; margin-top: 0.5rem; margin-bottom: 0.65rem; padding-inline: 0.2rem; }
  .modal-message-wrap p { font-size: clamp(0.78rem, 3.55vw, 0.91rem); line-height: 1.35; }
  .modal-next-btn {
    min-width: min(100%, 175px) !important;
    max-width: 190px !important;
    min-height: 38px !important;
    padding: 0.26rem 0.75rem !important;
    border-radius: 50px !important;
    box-shadow: 0 6px 0 #b94a00, 0 10px 18px rgba(127,50,0,0.2), inset 0 3px 5px rgba(255,255,255,0.45) !important;
  }
  .modal-next-btn .btn-text {
    font-size: clamp(0.84rem, 3.8vw, 0.96rem) !important;
  }
  .game-intro-modal-box {
    min-height: 320px !important;
    padding: 5.4rem 0.85rem 1.2rem !important;
  }
  .game-intro-ribbon {
    left: 0.6rem !important;
    right: 0.6rem !important;
    padding: 0 0.8rem !important;
    top: 2.3rem !important;
    min-height: 42px !important;
  }
  .game-intro-ribbon h3 {
    font-size: clamp(0.88rem, 4.3vw, 1.15rem) !important;
  }
  .game-intro-message-wrap {
    gap: 0.5rem !important;
    margin: 0.6rem auto 1rem !important;
  }
  .game-intro-time {
    font-size: clamp(0.82rem, 3.8vw, 0.98rem) !important;
  }
  .game-intro-sub {
    font-size: clamp(0.76rem, 3.4vw, 0.9rem) !important;
  }
  .game-intro-ready {
    font-size: clamp(0.82rem, 3.8vw, 0.96rem) !important;
  }
  .game-intro-start-btn {
    min-width: min(100%, 195px) !important;
    max-width: 220px !important;
  }
  .modal-befast-row {
    max-width: 320px;
    gap: 4px;
    margin-top: clamp(1rem, 3vh, 1.45rem) !important;
    padding: 0;
    z-index: 4;
    align-items: start;
  }
  .modal-befast-letter {
    width: 28px;
    font-size: 0.92rem;
    border-radius: 6px;
  }
  .modal-befast-name {
    font-size: 0.54rem;
    line-height: 1.14;
    letter-spacing: 0;
    white-space: normal;
  }
  .modal-befast-item.active {
    transform: none;
    width: clamp(62px, 19vw, 84px) !important;
  }
  .modal-befast-item.active .modal-befast-name {
    font-size: clamp(0.72rem, 2.4vw, 0.86rem) !important;
    line-height: 1.2 !important;
    font-weight: 900 !important;
  }
  .modal-befast-item.active .modal-befast-letter { transform: scale(1.12) translateY(-2px); }
  .modal-shield { right: -0.1rem; bottom: 0.05rem; width: clamp(56px, 16vw, 66px); font-size: clamp(1.6rem, 4.8vw, 1.9rem); }
  .thanks-home-btn {
    min-width: min(100%, 260px);
    max-width: 300px;
    padding: 0.55rem 1.2rem !important;
    gap: 10px !important;
  }
  .thanks-home-btn .btn-text {
    font-size: clamp(1.02rem, 4.2vw, 1.22rem);
  }
  .thanks-home-btn .icon-circle {
    position: static !important;
    transform: none !important;
    width: 38px;
    height: 38px;
  }
  .thanks-home-btn .icon-circle i {
    font-size: 1.05rem;
    margin: 0 !important;
  }
}

.thanks-home-btn {
  text-decoration: none;
  width: fit-content;
  min-width: min(100%, 280px);
  max-width: calc(100vw - 2rem);
  box-sizing: border-box;
  margin: 0 auto;
  position: relative;
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: clamp(12px, 1.5vw, 18px) !important;
  padding: 0.65rem 1.6rem !important;
  text-align: center;
}

.thanks-home-btn:hover {
  color: #fff;
}

.thanks-home-btn .btn-text {
  text-align: center;
  margin: 0;
  display: inline-block;
  width: auto;
  min-width: 0;
  flex: 0 1 auto;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.thanks-home-btn .icon-circle {
  position: static !important;
  transform: none !important;
  width: 44px;
  height: 44px;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  flex-shrink: 0;
}

.thanks-home-btn .icon-circle i {
  color: #ffffff !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  font-size: 1.2rem;
  text-align: center;
}

.certificate-wrapper { justify-content: flex-start; min-height: 100vh; min-height: 100svh; min-height: 100dvh; min-height: var(--app-height); }
.certificate-content { position: relative; z-index: 1; flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; width: min(100%, 900px); margin: 0 auto; padding: clamp(0.6rem, 1.5vh, 1.2rem) clamp(1rem, 4vw, 2rem) clamp(1rem, 2vh, 1.8rem); gap: clamp(0.8rem, 1.8vh, 1.35rem); overflow: visible; }
.certificate-title { position: relative; z-index: 2; font-family: 'Poppins', sans-serif; font-size: clamp(2.2rem, 5.3vw, 4.2rem); font-weight: 900; line-height: 1.05; color: #5a1325; margin: 0; text-transform: uppercase; text-shadow: 0 5px 0 rgba(130,0,32,0.18), 0 14px 24px rgba(225,19,68,0.14); letter-spacing: 0; }
.certificate-thank-img { position: relative; z-index: 1; width: clamp(210px, 28vw, 370px); height: auto; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(225,19,68,0.18)); }
.certificate-actions { position: relative; z-index: 2; width: 100%; display: flex; justify-content: center; }
.certificate-download-btn { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(0.85rem, 1.8vw, 1.35rem); width: min(100%, 620px); min-height: clamp(76px, 10vh, 96px); padding: clamp(0.75rem, 1.6vh, 1rem) clamp(0.9rem, 2vw, 1.45rem); border-radius: 18px; color: #fff; text-decoration: none; background: radial-gradient(circle at 18% 12%, rgba(255,255,255,0.2), transparent 24%), linear-gradient(180deg, #2ec54f 0%, #13a734 55%, #0c8627 100%); box-shadow: inset 0 5px 7px rgba(255,255,255,0.26), inset 0 -8px 12px rgba(0,0,0,0.15), 0 14px 22px rgba(22,134,48,0.22); overflow: hidden; transition: transform 0.22s ease, filter 0.22s ease; }
.certificate-download-btn::before { content: ''; position: absolute; left: 15px; right: 15px; top: 8px; height: 30%; border-radius: 16px 16px 50% 50%; background: linear-gradient(180deg, rgba(255,255,255,0.26), rgba(255,255,255,0)); pointer-events: none; }
.certificate-download-btn:hover { color: #fff; transform: translateY(-3px); filter: brightness(1.03) saturate(1.04); }
.certificate-btn-icon,
.certificate-btn-badge { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: clamp(44px, 5vw, 60px); aspect-ratio: 1; border-radius: 18px; background: rgba(255,255,255,0.18); color: #fff; font-size: clamp(1.3rem, 2.55vw, 1.82rem); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.24), inset 0 5px 8px rgba(255,255,255,0.14), inset 0 -5px 8px rgba(0,0,0,0.12); }
.certificate-btn-badge { color: #fff4c9; font-size: clamp(1.12rem, 2.2vw, 1.55rem); }
.certificate-btn-copy { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; text-align: left; }
.certificate-btn-copy strong { font-family: 'Poppins', sans-serif; font-size: clamp(1.15rem, 2.4vw, 1.85rem); font-weight: 900; line-height: 1.05; text-transform: uppercase; }
.certificate-btn-copy small { margin-top: 0.25rem; font-size: clamp(0.85rem, 1.45vw, 1.08rem); font-weight: 600; opacity: 0.94; }
.certificate-home-btn { position: relative; z-index: 2; display: inline-flex; align-items: center; justify-content: center; gap: 0.85rem; min-width: min(100%, 300px); min-height: 54px; padding: 0.7rem 1.35rem; border-radius: 18px; border: 2px solid rgba(225,19,68,0.14); background: rgba(255,255,255,0.72); color: #351f24; text-decoration: none; font-family: 'Poppins', sans-serif; font-size: clamp(1rem, 1.6vw, 1.28rem); font-weight: 800; box-shadow: 0 9px 18px rgba(225,19,68,0.12), inset 0 0 0 1px rgba(255,255,255,0.85); transition: transform 0.22s ease, background 0.22s ease; text-transform: uppercase; }
.certificate-home-btn:hover { color: #351f24; background: rgba(255,255,255,0.9); transform: translateY(-2px); }
.certificate-home-btn i { font-size: 1.1em; }
.certificate-confetti { position: absolute; inset: clamp(0.4rem, 1.4vh, 1rem) 0 auto; height: clamp(110px, 18vh, 170px); pointer-events: none; z-index: 0; }
.certificate-confetti span { position: absolute; display: block; border-radius: 999px; background: #ff8a3b; opacity: 0.95; }
.certificate-confetti span:nth-child(1) { left: 10%; top: 30%; width: 9px; height: 28px; transform: rotate(-35deg); }
.certificate-confetti span:nth-child(2) { left: 15%; top: 66%; width: 11px; height: 22px; background: #1d87d5; transform: rotate(58deg); }
.certificate-confetti span:nth-child(3) { left: 21%; top: 56%; width: 11px; height: 11px; background: #f7bd21; transform: rotate(45deg); }
.certificate-confetti span:nth-child(4) { right: 21%; top: 60%; width: 12px; height: 12px; background: #e11344; transform: rotate(42deg); }
.certificate-confetti span:nth-child(5) { right: 15%; top: 32%; width: 9px; height: 28px; background: #ff8a3b; transform: rotate(36deg); }
.certificate-confetti span:nth-child(6) { right: 10%; top: 68%; width: 10px; height: 10px; background: #dd1aa1; }

/* Mobile & Tablet */
@media (max-width: 1032px) {
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
  }

  .desktop-clot-wrap {
    display: none !important;
  }

  .home-page .mobile-clot-wrap {
    display: block !important;
    position: absolute;
    left: max(1.2rem, env(safe-area-inset-left));
    top: max(0.9rem, env(safe-area-inset-top));
    z-index: 10;
  }

  .mobile-clot-img {
    width: clamp(52px, 8vw, 76px);
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 3px 8px rgba(225, 19, 68, 0.16));
  }
}

@media (max-width: 767px) {
  html[data-page="quiz"] {
    background: #fff0eb;
  }
  .home-page #startQuizBtn {
    overflow: hidden;
    isolation: isolate;
  }
  body.quiz-page,
  body.quiz-page .main-wrapper {
    background: #fff0eb !important;
  }
  body.quiz-page .bg-shapes {
    display: none;
  }
  .scroll-to-bottom-btn {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(180deg, #ff3354 0%, #d80b3c 100%);
    box-shadow: 0 8px 20px rgba(135, 0, 34, 0.32), inset 0 3px 4px rgba(255, 255, 255, 0.3);
    cursor: pointer;
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .scroll-to-bottom-btn i {
    font-size: 1.15rem;
    line-height: 1;
    animation: scroll-down-nudge 1.4s ease-in-out infinite;
  }
  .scroll-to-bottom-btn:active {
    transform: scale(0.94);
    box-shadow: 0 4px 12px rgba(135, 0, 34, 0.28), inset 0 3px 5px rgba(80, 0, 24, 0.2);
  }
  .scroll-to-bottom-btn.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px) scale(0.88);
  }
  html[data-page="quiz"],
  body.quiz-page {
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    height: var(--app-height, 100dvh);
    max-height: 100dvh;
    max-height: var(--app-height, 100dvh);
    overflow: hidden !important;
    overscroll-behavior: none;
    touch-action: pan-x pan-y;
  }
  body.quiz-page .main-wrapper {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
  }
  body.quiz-page .scroll-to-bottom-btn {
    display: none !important;
  }
  html:not([data-page="quiz"]),
  body:not(.quiz-page),
  body:not(.quiz-page) .main-wrapper {
    overflow-y: auto;
    height: auto;
    max-height: none;
  }
  body.quiz-page .quiz-content-wrapper {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: space-evenly !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    gap: clamp(0.2rem, 0.8vh, 0.5rem) !important;
    padding-top: max(clamp(0.6rem, 1.8vh, 1.2rem), calc(env(safe-area-inset-top) + 0.4rem)) !important;
    padding-bottom: max(clamp(0.3rem, 0.8vh, 0.6rem), env(safe-area-inset-bottom)) !important;
    padding-left: max(0.6rem, env(safe-area-inset-left)) !important;
    padding-right: max(0.6rem, env(safe-area-inset-right)) !important;
  }
  .quiz-page .top-bar { display: none; }
  .center-stage { display: contents; }
  .quiz-header,
  .quiz-stepper,
  .quiz-progress-track { display: none !important; }
  .quiz-page .quiz-level-ribbon { display: none !important; }

  body.quiz-page .left-stage {
    order: 1 !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: min(100%, clamp(290px, 86vw, 385px)) !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }
  body.quiz-page .quiz-pad-card .balance-loss-card { display: none !important; }
  body.quiz-page .quiz-pad-card {
    position: relative !important;
    width: 100% !important;
    margin-inline: auto !important;
    padding: clamp(1.35rem, 2.6vh, 2.1rem) clamp(0.75rem, 2.4vw, 1.25rem) clamp(0.45rem, 1.1vh, 0.8rem) !important;
    border-radius: clamp(16px, 2.4vw, 22px) !important;
    border-width: 2px !important;
    box-shadow: -5px 7px 0 #d80b3c, -8px 14px 20px rgba(225,19,68,0.12), 0 12px 22px rgba(225,19,68,0.16), inset 0 0 0 4px rgba(255, 226, 225, 0.72), inset 0 0 0 7px rgba(255,255,255,0.78) !important;
    transform: translateX(3px) rotate(-1.5deg) !important;
    transform-origin: center bottom !important;
    backface-visibility: hidden !important;
    -webkit-font-smoothing: antialiased !important;
    overflow: visible !important;
  }
  body.quiz-page .quiz-pad-card .question-card {
    padding: clamp(0.3rem, 0.7vh, 0.6rem) clamp(0.45rem, 1.5vw, 0.8rem) !important;
    margin-bottom: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  body.quiz-page .quiz-pad-card::before,
  body.quiz-page .quiz-pad-card::after,
  body.quiz-page .question-card::before,
  body.quiz-page .question-card::after { display: none !important; }
  body.quiz-page .pad-clip {
    top: clamp(-16px, -2.2vh, -14px) !important;
    width: clamp(84px, 22vw, 110px) !important;
    height: clamp(30px, 4vh, 40px) !important;
    border-radius: 14px 14px 9px 9px !important;
  }
  body.quiz-page .pad-clip::before {
    top: 5px !important;
    width: 8px !important;
    height: 8px !important;
  }
  body.quiz-page .b-icon { width: 48px; height: 48px; font-size: 1.55rem; margin-bottom: 0.4rem; }
  body.quiz-page .balance-loss-card h4 { font-size: 1.18rem; margin-bottom: 0; line-height: 1.12; }
  body.quiz-page .pad-divider { width: min(100%, 180px); height: 12px; margin-bottom: 0.4rem; }
  body.quiz-page .balance-loss-card p { font-size: 0.82rem; line-height: 1.34; max-width: 235px; margin-bottom: 0.35rem; }
  body.quiz-page .quiz-question-title {
    margin-bottom: 0 !important;
    font-size: clamp(0.72rem, min(2.1vw, 1.6vh), 0.94rem) !important;
    line-height: 1.24 !important;
    text-align: left !important;
  }
  body.quiz-page .video-stage {
    order: 2 !important;
    flex: 1 1 auto !important;
    align-self: center !important;
    aspect-ratio: 9 / 16 !important;
    height: clamp(190px, 42vh, 375px) !important;
    max-height: clamp(210px, 44vh, 390px) !important;
    width: auto !important;
    max-width: min(56vw, 230px) !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    border-radius: clamp(16px, 2.2vh, 24px) !important;
    outline-width: clamp(3px, 0.4vw, 4.5px) !important;
    box-shadow: 0 14px 28px rgba(225, 19, 68, 0.24) !important;
    overflow: hidden !important;
    background: #ffffff !important;
  }
  body.quiz-page #quizVideo {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    background: #ffffff !important;
  }
  body.quiz-page .video-subtitle-overlay {
    bottom: clamp(6px, 1.4vh, 12px) !important;
    width: calc(100% - 10px) !important;
    max-width: 96% !important;
  }
  body.quiz-page .video-subtitle-text {
    font-size: clamp(0.66rem, 2.4vw, 0.78rem) !important;
    padding: 0.26rem 0.55rem !important;
    border-radius: 8px !important;
    line-height: 1.22 !important;
  }
  body.emergency-active .quiz-content-wrapper {
    justify-content: space-evenly !important;
    gap: 0 !important;
    padding-top: max(clamp(0.6rem, 1.5vh, 1.2rem), env(safe-area-inset-top)) !important;
    padding-bottom: max(clamp(0.6rem, 1.5vh, 1.2rem), env(safe-area-inset-bottom)) !important;
  }
  body.emergency-active .left-stage {
    margin: 0 auto !important;
  }
  body.emergency-active .video-stage {
    aspect-ratio: 1 / 1 !important;
    height: clamp(155px, 28vh, 235px) !important;
    max-height: 28vh !important;
    width: auto !important;
    max-width: min(66vw, 235px) !important;
    margin: 0 auto !important;
  }
  body.emergency-active .emergency-continue-btn:not([hidden]),
  body.emergency-active #finishEmergencyBtn:not([hidden]) {
    min-width: clamp(180px, 48vw, 230px) !important;
    max-width: 240px !important;
    padding: clamp(0.44rem, 1.1vh, 0.6rem) 1.2rem !important;
    font-size: clamp(0.9rem, 2.3vw, 1.05rem) !important;
    margin: 0 auto !important;
  }
  .emergency-message-card {
    max-width: min(100%, clamp(285px, 86vw, 360px)) !important;
    padding: clamp(0.7rem, 1.5vh, 1rem) clamp(0.85rem, 2.4vw, 1.2rem) !important;
    border-radius: 14px !important;
  }
  .emergency-message-card p {
    font-size: clamp(0.76rem, min(2.2vw, 1.6vh), 0.88rem) !important;
    line-height: 1.38 !important;
  }
  body.emergency-active .options-prompt-banner,
  body.emergency-active .character-options-container,
  body.emergency-active #characterOptions,
  body.emergency-active #optionsStopwatchVideo,
  body.emergency-active .speech-bubble-overlay,
  body.quiz-page .character-options-container[hidden],
  body.quiz-page .options-prompt-banner[hidden],
  body.quiz-page #characterOptions[hidden] {
    display: none !important;
  }
  body.quiz-page .quiz-actions {
    order: 3 !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: min(100%, clamp(260px, min(86vw, 44vh), 340px)) !important;
    min-height: 0 !important;
    align-self: center !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding-top: clamp(26px, 3.4vh, 34px) !important;
    overflow: visible !important;
    gap: 0 !important;
    margin: 0 auto !important;
  }
  body.emergency-active .quiz-actions {
    padding-top: 0 !important;
    gap: clamp(0.5rem, 1.4vh, 0.85rem) !important;
    max-width: min(100%, clamp(285px, 86vw, 360px)) !important;
    margin: 0 auto !important;
  }
  body.emergency-active .center-stage { display: contents !important; }
  body.quiz-page .options-prompt-banner {
    position: absolute !important;
    top: 0 !important;
    bottom: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: min(calc(100% - 20px), clamp(190px, 62vw, 255px)) !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: clamp(28px, 3.6vh, 36px) !important;
    padding: clamp(0.12rem, 0.3vh, 0.24rem) clamp(0.4rem, 1.4vw, 0.7rem) !important;
    border-radius: 8px !important;
    z-index: 10 !important;
  }
  body.quiz-page .options-prompt-banner span,
  body.quiz-page .options-prompt-banner .prompt-text {
    font-size: clamp(0.62rem, min(2vw, 1.5vh), 0.78rem) !important;
    line-height: 1.15 !important;
  }
  body.quiz-page .options-prompt-banner::after {
    right: -13px !important;
    width: clamp(11px, 2.8vw, 15px) !important;
    height: clamp(16px, 3.5vw, 20px) !important;
  }
  body.quiz-page .options-prompt-banner i {
    left: clamp(-24px, -5vw, -28px) !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) rotate(-16deg) !important;
    width: clamp(20px, 5vw, 26px) !important;
    font-size: clamp(1.1rem, 3vw, 1.35rem) !important;
    text-shadow: -1.5px 0 #fff, 0 1.5px #fff, 1.5px 0 #fff, 0 -1.5px #fff, 0 4px 6px rgba(166,0,42,0.16) !important;
  }
  body.quiz-page .character-options-container:not([hidden]) {
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 auto !important;
  }
  body.quiz-page .stopwatch-options-video {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    border-radius: clamp(10px, 1.6vh, 15px) !important;
    filter: drop-shadow(0 8px 18px rgba(225, 19, 68, 0.14)) !important;
    display: block !important;
    background: #ffffff !important;
  }
  body.quiz-page .character-options-container.stopwatch-options-active .speech-bubble-overlay {
    position: absolute !important;
    left: 70.2% !important;
    top: 33.5% !important;
    transform: translate(-50%, -50%) !important;
    width: 44% !important;
    height: 27% !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: clamp(4px, 1.2vw, 8px) !important;
    padding: 0 !important;
    z-index: 25 !important;
    box-sizing: border-box !important;
    pointer-events: auto !important;
  }
  body.quiz-page .speech-bubble-btn {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 80% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    font-size: clamp(0.74rem, min(3vw, 2.2vh), 0.95rem) !important;
    gap: clamp(3px, 1vw, 6px) !important;
    padding: 0 clamp(4px, 1.2vw, 10px) !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  body.quiz-page .speech-bubble-btn i {
    font-size: clamp(0.74rem, min(3vw, 2.2vh), 0.95rem) !important;
  }
  .home-page .mobile-clot-wrap {
    left: max(0.85rem, env(safe-area-inset-left)) !important;
    top: max(0.75rem, env(safe-area-inset-top)) !important;
  }
  .mobile-clot-img {
    width: clamp(45px, 11vw, 62px) !important;
  }
  .certificate-wrapper { min-height: 100vh; min-height: 100svh; min-height: 100dvh; min-height: var(--app-height); max-height: none; overflow-y: visible; }
  .certificate-content { flex: 1; justify-content: center; padding: 1rem clamp(1rem, 5vw, 2rem) 2rem; }
  .top-bar { padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) 1rem max(1rem, env(safe-area-inset-left)); flex-direction: column; align-items: center; justify-content: center; width: 100%; max-width: 100%; gap: 0.8rem; text-align: center; }
  .brand-logo { display: flex; justify-content: center; align-items: center; width: 100%; }
  .quiz-ribbon-wrapper {
    width: min(calc(100% - 0.5rem), 352px);
    padding-left: 34px;
    box-sizing: border-box;
    overflow: visible;
  }
  .quiz-ribbon {
    width: 100%;
    justify-content: center;
    padding: 0.45rem 1.1rem 0.45rem 0.9rem;
    min-height: 42px;
    clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 50%, 100% 100%, 0 100%);
  }
  .ribbon-text {
    max-width: 100%;
    font-size: clamp(0.64rem, 2.7vw, 0.8rem);
    line-height: 1.18;
    letter-spacing: 0.25px;
    text-align: center;
    overflow-wrap: anywhere;
  }
  .ribbon-icon { width: 48px; height: 48px; font-size: 1.42rem; left: 0; }
  .sparkle-left { left: -4px; font-size: 1.05rem; }
  .sparkle-right { right: 0; font-size: 0.85rem; }
  .hero-content { padding: 1.5rem max(0.5rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(0.5rem, env(safe-area-inset-left)); width: 100%; max-width: 100%; }
  .side-heart, .side-brain { display: none; }
  .mobile-organs-row { display: flex; justify-content: center; align-items: center; gap: 35px; margin-top: -0.8rem; margin-bottom: 0.3rem; width: 100%; }
  .info-card {
    padding: 1.2rem 1rem 2.8rem 1rem;
    width: 100%;
    max-width: min(100%, 355px);
    margin: 0 auto 3.5rem;
    position: relative;
  }
  .mobile-organ-img { width: clamp(80px, 20vw, 100px); height: auto; aspect-ratio: 1 / 1; }
  .info-row {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: clamp(0.7rem, 2.6vw, 1.2rem);
    justify-content: center;
    align-items: center;
    width: 100%;
    padding-left: clamp(54px, 15vw, 68px);
    padding-right: clamp(4px, 1.2vw, 10px);
    box-sizing: border-box;
  }
  .info-item {
    min-width: auto;
    width: auto;
    gap: 0.35rem;
    padding: 0 clamp(0.2rem, 1vw, 0.4rem);
  }
  .info-card-clock-wrap {
    position: absolute;
    left: clamp(8px, 2.2vw, 14px);
    right: auto;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 3;
  }
  .info-card-clock-img {
    width: clamp(58px, 16vw, 70px);
    height: auto;
    max-height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(225, 19, 68, 0.22));
  }
  .info-num { font-size: 1.5rem; }
  .info-label { font-size: clamp(0.66rem, 2.6vw, 0.76rem); line-height: 1.2; letter-spacing: 0; }
  .divider {
    display: block;
    width: 1px;
    height: 36px;
    margin: 0;
    align-self: center;
    background: linear-gradient(transparent, rgba(225, 19, 68, 0.3), transparent);
  }
  .badge-wrapper { bottom: -2.8rem; gap: 0.4rem; }
  .choice-badge-label { font-size: 0.54rem; }
  .bottom-badge { width: 38px; height: 38px; font-size: 0.95rem; }
  .footer-section { flex-direction: column; gap: 1.5rem; text-align: center; padding: 1.5rem max(1rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); width: 100%; max-width: 100%; }
  .footer-right { text-align: center; align-items: center; width: 100%; }
  .disclaimer-text { font-size: 0.9rem; }
  .quiz-question-title { margin-bottom: 0; font-size: clamp(0.76rem, 2.2vw, 0.98rem); line-height: 1.28; text-align: left; }
  .quiz-btn:hover { transform: none; box-shadow: inset 0 5px 7px rgba(255,255,255,0.26), inset 0 -7px 12px rgba(0,0,0,0.14); }
  .quiz-btn:active { transform: scale(0.98); }
  .quiz-btn { grid-template-columns: 40px minmax(0, 1fr) clamp(58px, 18vw, 72px); gap: 0.55rem; padding: 0.75rem 0.55rem 0.75rem 0.78rem; min-height: 84px; border-radius: 18px; overflow: visible; isolation: isolate; transform: translateZ(0); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
  .quiz-btn::before { left: 11px; right: 11px; top: 7px; height: 24%; border-radius: 14px 14px 45% 45%; z-index: 0; }
  .quiz-btn i { z-index: 2; width: 40px; border-radius: 13px; font-size: 1.35rem; }
  .btn-content { z-index: 2; display: flex !important; visibility: visible; opacity: 1; color: #fff; transform: translateZ(0); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
  .option-character-wrap { z-index: 2; width: clamp(58px, 18vw, 72px); border-width: 4px; }
  .btn-title { display: block; visibility: visible; opacity: 1; color: #fff; font-size: clamp(0.95rem, 4.1vw, 1.15rem); }
  .btn-subtext { display: block; visibility: visible; opacity: 0.96; color: #fff; font-size: clamp(0.76rem, 3.4vw, 0.9rem); }
  .awareness-tag { font-size: 0.7rem; padding: 0.4rem 0.8rem; }
  .hero-title { font-size: 1.6rem; margin-bottom: 1rem; }
  .btn-start-quiz { padding: 0.5rem 0.6rem 0.5rem 1.5rem; gap: 1rem; }
  .btn-text { font-size: 1.1rem; }
  .icon-circle { width: 35px; height: 35px; }
  .icon-circle i { font-size: 0.9rem; margin-left: 3px; }
  .cta-wrapper::before, .cta-wrapper::after { width: 30px; height: 30px; }
  .cta-wrapper::before { left: -35px; }
  .cta-wrapper::after { right: -35px; }
  .bg-icon-plus { width: 25px; height: 25px; top: -15px; left: -25px; }
  .bg-wave { width: 60px; bottom: -10px; }
  .bg-wave-left { left: -15px; }
  .bg-wave-right { right: -15px; }
  .certificate-download-btn { width: min(100%, 342px); }
  .emergency-info { flex-direction: column; text-align: center; gap: 0.4rem; padding: 1rem; border-radius: 15px; }
}

@keyframes scroll-down-nudge {
  0%, 100% { transform: translateY(-2px); }
  50% { transform: translateY(3px); }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-to-bottom-btn,
  .scroll-to-bottom-btn i {
    animation: none;
    transition: none;
  }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1032px) {
  /* 1. Viewport Locking for Quiz Page (Industry Standard Zero-Scroll Screen Fit) */
  html[data-page="quiz"],
  body.quiz-page {
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    height: var(--app-height, 100dvh);
    max-height: 100dvh;
    max-height: var(--app-height, 100dvh);
    overflow: hidden !important;
    overscroll-behavior: none;
    touch-action: pan-x pan-y;
  }

  body.quiz-page .main-wrapper {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
  }

  body.quiz-page .scroll-to-bottom-btn {
    display: none !important;
  }

  html:not([data-page="quiz"]),
  body:not(.quiz-page),
  body:not(.quiz-page) .main-wrapper {
    overflow-y: auto;
    height: auto;
    max-height: none;
  }

  /* 2. Top Bar on Tablet */
  body.quiz-page .top-bar {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: max(clamp(0.4rem, 1vh, 0.75rem), env(safe-area-inset-top)) max(clamp(1.2rem, 3vw, 2.4rem), env(safe-area-inset-right)) clamp(0.2rem, 0.5vh, 0.35rem) max(clamp(1.2rem, 3vw, 2.4rem), env(safe-area-inset-left));
  }

  body.quiz-page .brand-logo-img {
    height: clamp(38px, 4.4vh, 50px);
    max-height: 52px;
    width: auto;
    aspect-ratio: 1 / 1;
  }

  body.quiz-page .awareness-tag {
    padding: clamp(0.3rem, 0.7vh, 0.44rem) clamp(0.7rem, 1.4vw, 1rem);
    font-size: clamp(0.74rem, 1.1vw, 0.84rem);
  }

  /* 3. Emergency Mode Elements Visibility */
  body.emergency-active .options-prompt-banner,
  body.emergency-active .character-options-container,
  body.emergency-active #characterOptions,
  body.emergency-active #optionsStopwatchVideo,
  body.emergency-active .speech-bubble-overlay,
  body.quiz-page .character-options-container[hidden],
  body.quiz-page .options-prompt-banner[hidden],
  body.quiz-page #characterOptions[hidden] {
    display: none !important;
  }

  /* 4. Common Tablet Card & Header Styling */
  .balance-loss-card { max-width: 100%; width: 100%; }
  .quiz-pad-card {
    position: relative;
    width: 100%;
    margin-inline: auto;
    border-radius: 22px;
    box-shadow: -8px 9px 0 #d80b3c, -12px 18px 26px rgba(225,19,68,0.14), 0 16px 28px rgba(225,19,68,0.18), inset 0 0 0 5px rgba(255, 226, 225, 0.72), inset 0 0 0 8px rgba(255,255,255,0.78);
    transform: rotate(-1.5deg);
    transform-origin: center bottom;
    overflow: visible;
  }

  /* 5. Tablet Portrait Layout (Default for 768px-1032px) */
  body.quiz-page .quiz-content-wrapper {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    justify-content: center;
    align-items: center;
    justify-items: center;
    column-gap: clamp(1.2rem, 2.5vw, 2.2rem);
    row-gap: clamp(0.5rem, 1.1vh, 1.1rem);
    padding: 0.3rem clamp(1.2rem, 3vw, 2.4rem) max(clamp(0.5rem, 1vh, 0.9rem), env(safe-area-inset-bottom));
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
    box-sizing: border-box;
  }

  body.quiz-page .center-stage {
    display: contents;
  }

  body.quiz-page .quiz-header {
    order: -3;
    grid-column: 1 / -1;
    justify-self: center;
    width: min(100%, clamp(360px, 50vw, 480px));
    margin: 0 auto clamp(0.15rem, 0.5vh, 0.4rem);
    text-align: center;
  }

  body.quiz-page .level-badge {
    padding: 0.38rem 0.95rem;
    font-size: clamp(0.8rem, 1.35vw, 0.94rem);
    margin-bottom: clamp(0.35rem, 0.8vh, 0.65rem);
    border-radius: 12px;
  }

  body.quiz-page .quiz-stepper {
    width: 100%;
  }

  body.quiz-page .step-dot {
    width: clamp(28px, 3.4vh, 36px);
    font-size: clamp(0.85rem, 1.25vw, 1.02rem);
    border-width: 2.5px;
  }

  body.quiz-page .left-stage {
    order: 1;
    grid-column: 1;
    justify-self: end;
    width: 100%;
    max-width: clamp(310px, 45vw, 385px);
    align-items: center;
    gap: 0 !important;
    min-height: 0;
  }

  body.quiz-page .quiz-pad-card {
    padding: clamp(2rem, 3vh, 2.7rem) clamp(0.95rem, 2vw, 1.35rem) clamp(0.55rem, 1.1vh, 0.85rem);
  }

  body.quiz-page .pad-clip {
    top: clamp(-22px, -2.6vh, -18px);
    width: clamp(100px, 14vw, 122px);
    height: clamp(36px, 4.4vh, 44px);
    border-radius: 18px 18px 11px 11px;
  }

  body.quiz-page .quiz-pad-card .question-card {
    padding: clamp(0.55rem, 1vh, 0.8rem) clamp(0.65rem, 1.4vw, 0.95rem);
    margin-bottom: clamp(0.6rem, 1.3vh, 0.95rem);
    border-radius: 14px;
  }

  body.quiz-page .quiz-question-title {
    font-size: clamp(0.8rem, 1.3vw, 0.96rem);
    line-height: 1.3;
    margin-bottom: 0;
  }

  body.quiz-page .b-icon {
    width: clamp(46px, 5vh, 56px);
    height: clamp(46px, 5vh, 56px);
    font-size: clamp(1.4rem, 2vh, 1.7rem);
    margin-bottom: clamp(0.3rem, 0.6vh, 0.5rem);
  }

  body.quiz-page .balance-loss-card h4 {
    font-size: clamp(1.15rem, 1.75vw, 1.38rem);
    margin-bottom: 0.3rem;
    line-height: 1.15;
  }

  body.quiz-page .pad-divider {
    width: min(100%, 200px);
    height: 10px;
    margin-bottom: clamp(0.3rem, 0.6vh, 0.5rem);
  }

  body.quiz-page .balance-loss-card p {
    font-size: clamp(0.82rem, 1.18vw, 0.94rem);
    line-height: 1.35;
    max-width: 275px;
    margin-bottom: 0;
  }

  body.quiz-page .video-stage {
    order: 2;
    grid-column: 2;
    justify-self: start;
    align-self: center;
    aspect-ratio: 9 / 16;
    height: clamp(200px, 27vh, 295px);
    width: auto;
    max-width: clamp(125px, 19vw, 175px);
    border-radius: 20px;
    outline-width: 3.5px;
    box-shadow: 0 14px 28px rgba(225, 19, 68, 0.22);
    background: #ffffff;
  }

  body.quiz-page #quizVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #ffffff;
  }

  body.quiz-page .video-subtitle-overlay {
    bottom: clamp(8px, 1.8vh, 15px) !important;
    max-width: 94% !important;
  }

  body.quiz-page .video-subtitle-text {
    font-size: clamp(0.72rem, 1.25vw, 0.84rem) !important;
    padding: 0.32rem 0.7rem !important;
  }

  body.quiz-page .quiz-actions {
    order: 3;
    grid-column: 1 / -1;
    justify-self: center;
    width: 100%;
    max-width: min(100%, clamp(280px, 44vh, 380px));
    padding-top: clamp(32px, 4.2vh, 44px);
    margin: 0 auto;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  body.quiz-page .options-prompt-banner {
    position: absolute;
    top: 0;
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    width: min(calc(100% - 24px), 255px);
    min-height: clamp(30px, 4vh, 38px);
    padding: 0.22rem 0.8rem;
    border-radius: 9px;
  }

  body.quiz-page .options-prompt-banner span,
  body.quiz-page .options-prompt-banner .prompt-text {
    font-size: clamp(0.72rem, 1.05vw, 0.84rem);
    line-height: 1.15;
  }

  body.quiz-page .options-prompt-banner i {
    left: -26px;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%) rotate(-16deg);
    font-size: 1.45rem;
    width: 26px;
  }

  body.quiz-page .options-prompt-banner::after {
    right: -17px;
    width: 15px;
    height: 20px;
  }

  body.quiz-page .character-options-container {
    width: 100%;
    max-width: clamp(260px, 38vh, 360px);
    margin: 0 auto;
    position: relative;
  }

  body.quiz-page .stopwatch-options-video {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 15px;
    filter: drop-shadow(0 10px 20px rgba(225, 19, 68, 0.16));
    background: #ffffff;
  }

  body.quiz-page .speech-bubble-overlay {
    left: 70.2%;
    top: 33.5%;
    transform: translate(-50%, -50%);
    width: 44% !important;
    height: 27% !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: clamp(4px, 1vw, 8px) !important;
  }

  body.quiz-page .speech-bubble-btn {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 80% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    font-size: clamp(0.78rem, min(1.8vw, 1.6vh), 0.98rem) !important;
    letter-spacing: 0.3px !important;
    border-radius: 999px !important;
    gap: clamp(3px, 0.8vw, 6px) !important;
    padding: 0 clamp(4px, 1vw, 10px) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body.quiz-page .speech-bubble-btn i {
    font-size: clamp(0.78rem, min(1.8vw, 1.6vh), 0.98rem) !important;
  }

  /* Emergency in Tablet Portrait */
  body.emergency-active .center-stage {
    display: contents !important;
  }

  body.emergency-active .left-stage {
    grid-column: 1;
    justify-self: end;
    align-self: center;
  }

  body.emergency-active .video-stage {
    grid-column: 2;
    justify-self: start;
    align-self: center;
    aspect-ratio: 1 / 1 !important;
    height: clamp(170px, 22vh, 235px) !important;
    width: clamp(170px, 22vh, 235px) !important;
    max-width: none !important;
  }

  body.emergency-active .quiz-actions {
    grid-column: 1 / -1;
    justify-self: center;
    align-items: center;
    padding-top: 0 !important;
    gap: clamp(0.55rem, 1.3vh, 0.95rem) !important;
    max-width: min(100%, clamp(300px, 52vw, 420px)) !important;
    margin-top: clamp(0.3rem, 0.8vh, 0.7rem) !important;
  }

  body.emergency-active .emergency-message-card {
    max-width: 100% !important;
    padding: clamp(0.75rem, 1.5vh, 1.05rem) clamp(0.9rem, 1.8vw, 1.3rem) !important;
    border-radius: 14px !important;
  }

  body.emergency-active .emergency-message-card p {
    font-size: clamp(0.8rem, 1.2vw, 0.94rem) !important;
    line-height: 1.38 !important;
  }

  body.emergency-active .emergency-continue-btn:not([hidden]),
  body.emergency-active #finishEmergencyBtn:not([hidden]) {
    padding: clamp(0.45rem, 1vh, 0.6rem) 1.4rem !important;
    min-width: clamp(180px, 26vw, 230px) !important;
    font-size: clamp(0.92rem, 1.25vw, 1.05rem) !important;
  }

  /* 6. Certificate & Home Page Styles for Tablet */
  .certificate-wrapper { min-height: 100vh; min-height: 100svh; min-height: 100dvh; min-height: var(--app-height); max-height: none; overflow-y: visible; }
  .certificate-content { flex: 1; justify-content: center; padding: 1rem clamp(1rem, 5vw, 2rem) 2rem; }
  .side-heart, .side-brain { display: none; }
  .mobile-organs-row { display: flex; justify-content: center; align-items: center; gap: clamp(40px, 8vw, 80px); margin: -0.4rem 0 0.5rem; width: 100%; }
  .mobile-organ-img { width: clamp(100px, 15vw, 135px); height: auto; aspect-ratio: 1 / 1; }
  .info-card {
    padding: 1.5rem 1.8rem 1.6rem;
    min-height: 118px;
    margin-bottom: 3.5rem;
    width: min(92vw, 560px);
    max-width: min(92vw, 560px);
    position: relative;
  }
  .info-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: clamp(1.3rem, 3vw, 2.2rem);
    align-items: center;
    justify-content: center;
    width: 100%;
    padding-left: clamp(84px, 13vw, 110px);
    padding-right: clamp(10px, 2vw, 20px);
    box-sizing: border-box;
  }
  .info-card-clock-wrap {
    position: absolute;
    left: clamp(16px, 2.6vw, 26px);
    right: auto;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 3;
  }
  .info-card-clock-img {
    width: clamp(80px, 11vw, 100px);
    height: auto;
    max-height: 86px;
    object-fit: contain;
    filter: drop-shadow(0 6px 16px rgba(225, 19, 68, 0.22));
  }
  .bottom-badge { width: 42px; height: 42px; font-size: 1.1rem; }
  .badge-wrapper { bottom: -3.2rem; }
  .bg-icon-plus { width: 35px; height: 35px; left: -35px; }
}

/* Tablet Landscape Overrides (Orientation Landscape or Min Aspect Ratio 1.15) */
@media (min-width: 768px) and (max-width: 1032px) and (orientation: landscape),
       (min-width: 768px) and (max-width: 1032px) and (min-aspect-ratio: 1.15/1) {
  body.quiz-page .quiz-content-wrapper {
    grid-template-columns: minmax(0, 1.15fr) auto minmax(0, 1.05fr);
    align-items: center;
    justify-content: center;
    justify-items: center;
    gap: clamp(0.8rem, 2vw, 1.8rem);
    padding: 0 max(clamp(1rem, 2.5vw, 2rem), env(safe-area-inset-right)) max(clamp(0.4rem, 1vh, 0.85rem), env(safe-area-inset-bottom)) max(clamp(1rem, 2.5vw, 2rem), env(safe-area-inset-left));
  }

  body.quiz-page .center-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(0.3rem, 0.8vh, 0.6rem);
    min-height: 0;
  }

  body.quiz-page .quiz-header {
    order: 0;
    grid-column: auto;
    width: min(100%, clamp(240px, 30vw, 340px));
    margin: 0 auto;
  }

  body.quiz-page .level-badge {
    padding: 0.32rem 0.85rem;
    font-size: clamp(0.72rem, 1vw, 0.85rem);
    margin-bottom: clamp(0.3rem, 0.7vh, 0.5rem);
    border-radius: 10px;
  }

  body.quiz-page .quiz-stepper {
    width: 100%;
  }

  body.quiz-page .step-dot {
    width: clamp(24px, 3.2vh, 32px);
    font-size: clamp(0.78rem, 1.1vh, 0.92rem);
    border-width: 2px;
  }

  body.quiz-page .left-stage {
    order: 0;
    grid-column: auto;
    width: 100%;
    max-width: clamp(290px, 34vw, 370px);
    justify-self: end;
  }

  body.quiz-page .quiz-pad-card {
    padding: clamp(1.8rem, 3.6vh, 2.6rem) clamp(0.85rem, 1.8vw, 1.35rem) clamp(0.5rem, 1.1vh, 0.85rem);
    border-radius: 20px;
  }

  body.quiz-page .pad-clip {
    top: clamp(-20px, -2.5vh, -16px);
    width: clamp(96px, 12vw, 120px);
    height: clamp(34px, 4vh, 42px);
    border-radius: 16px 16px 10px 10px;
  }

  body.quiz-page .quiz-pad-card .question-card {
    padding: clamp(0.45rem, 0.9vh, 0.7rem) clamp(0.6rem, 1.2vw, 0.9rem);
    margin-bottom: clamp(0.5rem, 1.1vh, 0.85rem);
    border-radius: 13px;
  }

  body.quiz-page .quiz-question-title {
    font-size: clamp(0.76rem, 1.05vw, 0.92rem);
    line-height: 1.26;
  }

  body.quiz-page .b-icon {
    width: clamp(40px, 5vh, 50px);
    height: clamp(40px, 5vh, 50px);
    font-size: clamp(1.3rem, 2vh, 1.55rem);
    margin-bottom: clamp(0.2rem, 0.5vh, 0.4rem);
  }

  body.quiz-page .balance-loss-card h4 {
    font-size: clamp(1.05rem, 1.3vw, 1.25rem);
    margin-bottom: 0.25rem;
    line-height: 1.15;
  }

  body.quiz-page .pad-divider {
    width: min(100%, 190px);
    height: 9px;
    margin-bottom: clamp(0.25rem, 0.5vh, 0.45rem);
  }

  body.quiz-page .balance-loss-card p {
    font-size: clamp(0.74rem, 0.95vw, 0.85rem);
    line-height: 1.3;
    max-width: 250px;
  }

  body.quiz-page .video-stage {
    order: 0;
    grid-column: auto;
    justify-self: center;
    aspect-ratio: 9 / 16;
    height: clamp(180px, 38vh, 275px);
    width: auto;
    max-width: clamp(115px, 16vw, 160px);
    border-radius: 18px;
    outline-width: 3px;
    box-shadow: 0 12px 24px rgba(225, 19, 68, 0.2);
    margin: 0 auto;
    background: #ffffff;
  }

  body.quiz-page .quiz-actions {
    order: 0;
    grid-column: auto;
    width: 100%;
    max-width: clamp(260px, 32vw, 360px);
    padding-top: clamp(26px, 3.8vh, 38px);
    margin: 0 auto;
    justify-self: start;
  }

  body.quiz-page .options-prompt-banner {
    width: min(calc(100% - 24px), 230px);
    min-height: clamp(28px, 3.8vh, 36px);
    padding: 0.2rem 0.65rem;
    border-radius: 8px;
  }

  body.quiz-page .options-prompt-banner span,
  body.quiz-page .options-prompt-banner .prompt-text {
    font-size: clamp(0.66rem, 0.88vw, 0.78rem);
    line-height: 1.15;
  }

  body.quiz-page .options-prompt-banner i {
    left: -24px;
    font-size: 1.35rem;
    width: 24px;
  }

  body.quiz-page .options-prompt-banner::after {
    right: -15px;
    width: 13px;
    height: 18px;
  }

  body.quiz-page .character-options-container {
    max-width: clamp(250px, 38vh, 340px);
  }

  body.quiz-page .stopwatch-options-video {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 13px;
    filter: drop-shadow(0 8px 18px rgba(225, 19, 68, 0.15));
    background: #ffffff;
  }

  body.quiz-page .speech-bubble-overlay {
    left: 70.2%;
    top: 33.5%;
    transform: translate(-50%, -50%);
    gap: clamp(3px, 0.7vh, 8px) !important;
    width: 44% !important;
    height: 27% !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body.quiz-page .speech-bubble-btn {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 80% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    font-size: clamp(0.74rem, 1.1vw, 0.92rem) !important;
    letter-spacing: 0.3px !important;
    border-radius: 999px !important;
    gap: clamp(2px, 0.5vw, 6px) !important;
    padding: 0 clamp(4px, 0.8vw, 9px) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body.quiz-page .speech-bubble-btn i {
    font-size: clamp(0.74rem, 1.1vw, 0.92rem) !important;
  }

  /* Emergency in Tablet Landscape */
  body.emergency-active .quiz-content-wrapper {
    grid-template-columns: minmax(0, 1.15fr) auto minmax(0, 1.05fr) !important;
  }

  body.emergency-active .center-stage {
    display: flex !important;
  }

  body.emergency-active .video-stage {
    aspect-ratio: 1 / 1 !important;
    height: clamp(160px, 32vh, 230px) !important;
    width: clamp(160px, 32vh, 230px) !important;
    max-width: none !important;
    margin: 0 auto !important;
  }

  body.emergency-active .quiz-actions {
    padding-top: 0 !important;
    gap: clamp(0.5rem, 1.2vh, 0.85rem) !important;
    max-width: clamp(230px, 28vw, 310px) !important;
  }

  body.emergency-active .emergency-message-card {
    max-width: 100% !important;
    padding: clamp(0.65rem, 1.4vh, 0.95rem) clamp(0.75rem, 1.5vw, 1.1rem) !important;
    border-radius: 13px !important;
  }

  body.emergency-active .emergency-message-card p {
    font-size: clamp(0.74rem, 0.98vw, 0.86rem) !important;
    line-height: 1.36 !important;
  }

  body.emergency-active .emergency-continue-btn:not([hidden]),
  body.emergency-active #finishEmergencyBtn:not([hidden]) {
    padding: clamp(0.42rem, 0.9vh, 0.55rem) 1.2rem !important;
    min-width: clamp(165px, 20vw, 210px) !important;
    font-size: clamp(0.88rem, 1.15vw, 1rem) !important;
  }
}

@media (min-width: 1033px) {
  .home-page .side-brain {
    top: 54%;
  }

  html,
  body {
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    height: var(--app-height);
    min-height: 0;
    overflow-y: hidden;
  }

  .main-wrapper {
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    height: var(--app-height);
    min-height: 0;
    overflow-y: hidden;
  }

  .hero-content,
  .quiz-content-wrapper,
  .certificate-content {
    flex: 1 1 auto;
    min-height: 0;
  }
}

/* Small Desktop */
@media (min-width: 1033px) and (max-width: 1199px) {
  .hero-title { font-size: clamp(1.8rem, 3.8vw, 2.8rem); margin-bottom: 1rem; }
  .info-card { padding: 1rem 1.8rem; margin-bottom: 1rem; }
  .info-num { font-size: 2rem; }
  .disclaimer-text { margin-bottom: 1rem; font-size: 0.85rem; }
  .cta-wrapper { margin-bottom: 1rem; }
  .emergency-info { padding: 0.5rem 1.2rem; font-size: 0.85rem; }
  .video-stage { width: clamp(185px, 24vh, 245px); }
}

/* Medium Desktop */
@media (min-width: 1200px) and (max-width: 1399px) {
  .hero-title { font-size: clamp(1.8rem, 3.8vw, 2.8rem); margin-bottom: 1rem; }
  .info-card { padding: 1rem 1.8rem; margin-bottom: 1rem; }
  .info-num { font-size: 2rem; }
  .disclaimer-text { margin-bottom: 1rem; font-size: 0.85rem; }
  .cta-wrapper { margin-bottom: 1rem; }
  .emergency-info { padding: 0.5rem 1.2rem; font-size: 0.85rem; }
  .video-stage { width: clamp(190px, 24vh, 250px); }
}

/* ===== Small Laptop Screen (Width 1033px - 1399px) ===== */
@media (min-width: 1033px) and (max-width: 1399px) {
  /* 1. Need Urgent Medical Attention? reduced font size */
  .options-prompt-banner {
    min-width: min(100%, 285px);
    height: auto;
    min-height: 42px;
    padding: 0.35rem 1rem;
  }
  .options-prompt-banner span,
  .options-prompt-banner .prompt-text {
    font-size: clamp(0.82rem, 1.05vw, 0.98rem) !important;
    line-height: 1.18 !important;
  }
  .options-prompt-banner i {
    position: absolute !important;
    left: -36px !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) rotate(-16deg) !important;
    width: 36px !important;
    font-size: 1.7rem !important;
  }

  /* 2. Yes and No buttons row inside the board */
  .speech-bubble-btn {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 78% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    font-size: clamp(0.85rem, 1.15vw, 1.15rem) !important;
    gap: 6px !important;
    padding: 0 clamp(6px, 1vw, 14px) !important;
  }
  .speech-bubble-btn i {
    font-size: clamp(0.85rem, 1.15vw, 1.15rem) !important;
  }

  /* 3. Popup modal BE-FAST section reduced size */
  .modal-befast-row {
    max-width: 500px !important;
    gap: clamp(6px, 1vw, 10px) !important;
    margin: clamp(0.8rem, 1.8vh, 1.2rem) auto 0 !important;
    padding: 0.2rem 0.3rem 0 !important;
  }
  .modal-befast-letter {
    width: clamp(34px, 3.2vw, 42px) !important;
    font-size: clamp(1.1rem, 1.4vw, 1.35rem) !important;
    border-radius: 9px !important;
  }
  .modal-befast-name {
    font-size: clamp(0.56rem, 0.72vw, 0.68rem) !important;
    line-height: 1.16 !important;
  }
  .modal-befast-item.active .modal-befast-name {
    font-size: clamp(0.82rem, 1.05vw, 0.96rem) !important;
    line-height: 1.2 !important;
  }
  .modal-befast-item {
    gap: 4px !important;
  }

  /* 4. Popup modal Next Level button reduced size */
  .modal-next-btn {
    min-width: clamp(180px, 18vw, 240px) !important;
    max-width: 260px !important;
    padding: 0.42rem 1.4rem !important;
  }
  .modal-next-btn .btn-text {
    font-size: clamp(1rem, 1.35vw, 1.25rem) !important;
  }
}

@media (min-width: 1033px) and (max-height: 760px) {
  .top-bar,
  .footer-section { --shell-pad-y: 0.52rem; }
  .brand-logo-img { height: 38px; width: auto; aspect-ratio: 1 / 1; }
  .quiz-page .brand-logo-img { height: clamp(56px, 6.4vh, 70px); max-height: 72px; width: auto; aspect-ratio: 1 / 1; }
  .thanks-page .brand-logo-img { height: clamp(54px, 6.2vh, 68px); max-height: 70px; width: auto; aspect-ratio: 1 / 1; }
  .awareness-tag { padding: 0.42rem 0.85rem; font-size: 0.8rem; }
  .hero-content { padding-top: 0.25rem; padding-bottom: 0.55rem; }
  .side-heart,
  .side-brain { max-width: clamp(200px, 16vw, 245px); top: 51%; }
  .side-heart { right: clamp(90px, 10vw, 140px); }
  .side-brain { left: clamp(90px, 10vw, 140px); }
  .hero-title { font-size: clamp(1.62rem, 3vw, 2.28rem); margin-bottom: 0.5rem; line-height: 1.08; }
  .quiz-ribbon-wrapper { margin-top: 0.2rem; margin-bottom: 0.5rem; }
  .quiz-ribbon { min-height: 44px; padding: 0.42rem 2.25rem 0.42rem 3.1rem; }
  .ribbon-text { font-size: 1.03rem; letter-spacing: 1px; }
  .ribbon-icon { width: 46px; height: 46px; font-size: 1.35rem; left: -12px; }
  .info-card { padding: 0.7rem 1.45rem 1rem; margin-bottom: 2rem; }
  .info-row { gap: 0.8rem; }
  .info-item { min-width: 113px; gap: 0.24rem; }
  .info-num { font-size: 1.6rem; }
  .info-label { font-size: 0.74rem; line-height: 1.18; }
  .divider { height: 32px; }
  .badge-wrapper { bottom: -2rem; gap: 0.45rem; }
  .choice-badge-label { font-size: 0.52rem; }
  .bottom-badge { width: 34px; height: 34px; font-size: 0.85rem; }
  .disclaimer-text,
  .cta-wrapper { margin-bottom: 0.5rem; }
  .disclaimer-text { max-width: 530px; font-size: 0.78rem; line-height: 1.35; }
  .btn-start-quiz { padding: 0.4rem 0.5rem 0.4rem 1.5rem; gap: 0.9rem; }
  .btn-text { font-size: 1.03rem; }
  .icon-circle { width: 34px; height: 34px; }
  .icon-circle i { font-size: 0.9rem; }
  .cta-wrapper::before,
  .cta-wrapper::after { width: 28px; height: 28px; }
  .cta-wrapper::before { left: -34px; }
  .cta-wrapper::after { right: -34px; }
  .emergency-info { padding: 0.42rem 1rem; font-size: 0.78rem; }
  .footer-section { min-height: 62px; }
  .footer-heart-icon { width: 38px; height: 38px; font-size: 1rem; }
  .footer-text h5 { font-size: 0.85rem; }
  .footer-text p { font-size: 0.72rem; }
  .footer-logo-img { height: 44px; width: auto; aspect-ratio: 1 / 1; }
  .quiz-header { width: min(calc(100vw - 2rem), clamp(400px, 32vw, 470px)); padding: 0; margin-bottom: 0.95rem; }
  .level-badge { margin-bottom: 1rem; }
  .quiz-stepper { width: 100%; }
  .quiz-content-wrapper { gap: clamp(0.8rem, 1.6vw, 1.5rem); padding-top: 0; padding-bottom: 1rem; }
  .left-stage { width: min(100%, clamp(390px, 29vw, 430px)); gap: 1rem !important; }
  .video-stage { width: clamp(210px, 34vh, 260px); }
  .quiz-pad-card { padding-top: 3rem; padding-bottom: 1rem; }
  .quiz-pad-card .balance-loss-card { padding: 0; }
  .quiz-pad-card .b-icon { width: 52px; height: 52px; font-size: 1.6rem; margin-bottom: 0.7rem; }
  .quiz-pad-card .balance-loss-card h4 { font-size: 1.25rem; margin-bottom: 0.45rem; }
  .quiz-pad-card .balance-loss-card p { font-size: 0.88rem; line-height: 1.35; }
  .quiz-pad-card .question-card { margin-top: 0; margin-bottom: 0.85rem; padding: 0.8rem; }
  .quiz-pad-card .quiz-question-title { font-size: 0.82rem; line-height: 1.25; }
  .quiz-btn { gap: 0.75rem; padding: 0.85rem 0.75rem 0.85rem 1rem; min-height: 98px; }
  .quiz-btn i { width: 52px; font-size: 1.55rem; }
  .quiz-actions { width: min(100%, clamp(390px, 30vw, 450px)); }
  .option-character-wrap { width: clamp(84px, 7.5vw, 108px); border-width: 5px; }
}

@media (min-width: 1033px) and (max-width: 1599px) and (max-height: 760px) {
  .quiz-content-wrapper { gap: clamp(0.7rem, 1.15vw, 1.15rem); }
  .left-stage { width: min(100%, clamp(365px, 26vw, 405px)); }
  .video-stage { width: clamp(245px, 40vh, 295px); }

  .quiz-pad-card {
    min-height: clamp(360px, 56vh, 420px);
    padding-top: 3.45rem;
    padding-bottom: 1.35rem;
    padding-left: clamp(1.2rem, 1.8vw, 1.65rem);
    padding-right: clamp(1.2rem, 1.8vw, 1.65rem);
  }

  .quiz-pad-card .b-icon {
    width: 56px;
    height: 56px;
    font-size: 1.78rem;
    margin-bottom: 0.75rem;
  }

  .quiz-pad-card .balance-loss-card h4 {
    font-size: 1.38rem;
    margin-bottom: 0.5rem;
  }

  .quiz-pad-card .balance-loss-card p {
    font-size: 0.96rem;
    line-height: 1.38;
    max-width: 300px;
  }

  .quiz-pad-card .question-card {
    margin-top: 0;
    margin-bottom: 0.95rem;
    padding: 0.9rem 0.85rem;
  }

  .quiz-pad-card .quiz-question-title {
    font-size: 0.9rem;
    line-height: 1.28;
  }

  .options-prompt-banner {
    min-width: min(100%, 285px);
    height: auto;
    min-height: 42px;
    padding: 0.35rem 1rem;
    bottom: calc(100% + 0.78rem);
    border-radius: 10px;
  }

  .options-prompt-banner span,
  .options-prompt-banner .prompt-text {
    font-size: clamp(0.82rem, 1.05vw, 0.98rem) !important;
    line-height: 1.18 !important;
  }

  .options-prompt-banner::after {
    right: -28px;
    width: 25px;
    height: 29px;
  }

  .options-prompt-banner i {
    position: absolute !important;
    left: -36px !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) rotate(-16deg) !important;
    width: 36px !important;
    font-size: 1.7rem !important;
  }

  .speech-bubble-btn {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 78% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    font-size: clamp(0.85rem, 1.15vw, 1.15rem) !important;
    gap: 6px !important;
    padding: 0 clamp(6px, 1vw, 14px) !important;
  }

  .speech-bubble-btn i {
    font-size: clamp(0.85rem, 1.15vw, 1.15rem) !important;
  }

  .modal-content-box {
    width: min(78vw, 760px);
    min-height: clamp(430px, 62vh, 520px);
    padding: clamp(7.6rem, 16vh, 9rem) clamp(2.4rem, 5vw, 3.6rem) clamp(1.35rem, 3vh, 2rem);
  }

  .modal-content-box::before {
    border-width: 7px;
    border-radius: 32px;
  }

  .modal-beacon {
    width: clamp(76px, 8vw, 100px);
    height: clamp(76px, 8vw, 100px);
  }

  .modal-character-img {
    left: clamp(-5.4rem, -5.2vw, -4.1rem);
    width: clamp(170px, 18vw, 235px);
    bottom: clamp(0.9rem, 2vh, 1.5rem);
  }

  .modal-ribbon {
    left: clamp(2.4rem, 6vw, 4.2rem);
    right: clamp(2.4rem, 6vw, 4.2rem);
    top: clamp(2.8rem, 5.5vh, 3.6rem);
    min-height: clamp(58px, 7vh, 72px);
    padding: 0 clamp(2.4rem, 5vw, 4rem);
  }

  .modal-ribbon h3 {
    font-size: clamp(1.9rem, 3.4vw, 2.95rem);
  }

  .modal-message-wrap {
    max-width: 500px;
    margin-top: clamp(1rem, 3vh, 1.55rem);
    margin-bottom: clamp(1rem, 2vh, 1.45rem);
  }

  .modal-message-wrap p {
    font-size: clamp(1rem, 1.65vw, 1.22rem);
    line-height: 1.45;
  }

  .modal-next-btn {
    min-width: clamp(180px, 18vw, 240px) !important;
    max-width: 260px !important;
    padding: 0.42rem 1.4rem !important;
  }

  .modal-next-btn .btn-text {
    font-size: clamp(1rem, 1.35vw, 1.25rem) !important;
  }

  .modal-shield {
    width: clamp(70px, 8vw, 96px);
    right: clamp(-1rem, -0.8vw, -0.3rem);
  }

  .modal-befast-row {
    max-width: 500px !important;
    gap: clamp(6px, 1vw, 10px) !important;
    margin: clamp(0.8rem, 1.8vh, 1.2rem) auto 0 !important;
    padding: 0.2rem 0.3rem 0 !important;
  }

  .modal-befast-letter {
    width: clamp(34px, 3.2vw, 42px) !important;
    font-size: clamp(1.1rem, 1.4vw, 1.35rem) !important;
    border-radius: 9px !important;
  }

  .modal-befast-name {
    font-size: clamp(0.56rem, 0.72vw, 0.68rem) !important;
    line-height: 1.16 !important;
  }

  .modal-befast-item.active .modal-befast-name {
    font-size: clamp(0.82rem, 1.05vw, 0.96rem) !important;
    line-height: 1.2 !important;
  }

  .modal-befast-item {
    gap: 4px !important;
  }
}

@media (min-width: 1033px) and (max-height: 700px) {
  .top-bar,
  .footer-section { --shell-pad-y: 0.5rem; }
  .brand-logo-img { height: 36px; width: auto; aspect-ratio: 1 / 1; }
  .quiz-page .brand-logo-img { height: clamp(50px, 6vh, 64px); max-height: 66px; width: auto; aspect-ratio: 1 / 1; }
  .thanks-page .brand-logo-img { height: clamp(48px, 5.8vh, 62px); max-height: 64px; width: auto; aspect-ratio: 1 / 1; }
  .awareness-tag { padding: 0.38rem 0.8rem; font-size: 0.78rem; }
  .hero-content { padding-top: 0.2rem; padding-bottom: 0.45rem; }
  .side-heart,
  .side-brain { max-width: clamp(190px, 18vw, 235px); top: 51%; }
  .side-heart { right: clamp(70px, 10vw, 135px); }
  .side-brain { left: clamp(70px, 10vw, 135px); }
  .quiz-ribbon-wrapper { margin-top: 0.1rem; margin-bottom: 0.45rem; }
  .quiz-ribbon { min-height: 44px; padding: 0.45rem 2.4rem 0.45rem 3.2rem; }
  .ribbon-text { font-size: 1.05rem; letter-spacing: 1px; }
  .ribbon-icon { width: 50px; height: 50px; font-size: 1.45rem; left: -14px; }
  .sparkle-left { left: -32px; top: -10px; font-size: 1.1rem; }
  .sparkle-right { right: -18px; bottom: -2px; font-size: 0.9rem; }
  .hero-title { font-size: clamp(1.75rem, 3.2vw, 2.35rem); margin-bottom: 0.55rem; line-height: 1.08; }
  .bg-icon-plus { width: 30px; height: 30px; top: -16px; left: -34px; }
  .info-card { padding: 0.7rem 1.6rem 1.05rem; margin-bottom: 2.05rem; }
  .info-row { gap: 0.85rem; }
  .info-item { min-width: 118px; gap: 0.25rem; }
  .info-num { font-size: 1.65rem; }
  .info-label { font-size: 0.78rem; line-height: 1.18; }
  .divider { height: 32px; }
  .badge-wrapper { bottom: -2.05rem; gap: 0.45rem; }
  .choice-badge-label { font-size: 0.52rem; }
  .bottom-badge { width: 34px; height: 34px; font-size: 0.85rem; }
  .bg-wave { width: 90px; bottom: -18px; }
  .bg-wave-left { left: -82px; }
  .bg-wave-right { right: -82px; }
  .disclaimer-text { max-width: 520px; font-size: 0.78rem; line-height: 1.35; margin-bottom: 0.55rem; }
  .cta-wrapper { margin-bottom: 0.45rem; }
  .btn-start-quiz { padding: 0.42rem 0.5rem 0.42rem 1.55rem; gap: 0.95rem; }
  .btn-text { font-size: 1.05rem; }
  .icon-circle { width: 36px; height: 36px; }
  .icon-circle i { font-size: 0.9rem; }
  .cta-wrapper::before,
  .cta-wrapper::after { width: 28px; height: 28px; }
  .cta-wrapper::before { left: -34px; }
  .cta-wrapper::after { right: -34px; }
  .emergency-info { padding: 0.43rem 1rem; font-size: 0.78rem; }
  .footer-section { min-height: 58px; }
  .footer-heart-icon { width: 36px; height: 36px; font-size: 1rem; }
  .footer-text h5 { font-size: 0.82rem; }
  .footer-text p { font-size: 0.72rem; }
  .footer-logo-img { height: 40px; width: auto; aspect-ratio: 1 / 1; }
}

@media (min-width: 1033px) and (max-height: 640px) {
  .brand-logo-img { height: 32px; width: auto; aspect-ratio: 1 / 1; }
  .quiz-page .brand-logo-img { height: clamp(44px, 5.5vh, 56px); max-height: 58px; width: auto; aspect-ratio: 1 / 1; }
  .thanks-page .brand-logo-img { height: clamp(42px, 5.2vh, 54px); max-height: 56px; width: auto; aspect-ratio: 1 / 1; }
  .awareness-tag { font-size: 0.72rem; }
  .side-heart,
  .side-brain { max-width: clamp(170px, 16vw, 205px); }
  .hero-title { font-size: clamp(1.55rem, 2.9vw, 2.1rem); margin-bottom: 0.45rem; }
  .quiz-ribbon { min-height: 40px; }
  .ribbon-text { font-size: 0.95rem; }
  .ribbon-icon { width: 44px; height: 44px; font-size: 1.25rem; }
  .info-card { padding: 0.6rem 1.35rem 0.95rem; margin-bottom: 1.9rem; }
  .info-num { font-size: 1.5rem; }
  .info-label { font-size: 0.72rem; }
  .bottom-badge { width: 32px; height: 32px; font-size: 0.9rem; }
  .disclaimer-text { font-size: 0.74rem; margin-bottom: 0.45rem; }
  .btn-start-quiz { padding: 0.38rem 0.45rem 0.38rem 1.4rem; }
  .btn-text { font-size: 0.95rem; }
  .icon-circle { width: 32px; height: 32px; }
  .emergency-info { padding: 0.36rem 0.9rem; font-size: 0.72rem; }
  .footer-section { min-height: 52px; }
}

@media (max-height: 560px) {
  .feedback-modal { align-items: flex-start; }
  .modal-content-box { margin: auto 0; }
  .modal-message-wrap p { margin-bottom: 1rem; }
}

.certificate-page .certificate-content { max-width: 900px; }

@media (max-width: 1032px) {
  .certificate-page .certificate-content { justify-content: flex-start; padding-top: clamp(1.2rem, 4vh, 2.2rem); gap: clamp(0.8rem, 2vh, 1.2rem); }
  .certificate-page .certificate-title { font-size: clamp(2rem, 7vw, 3.25rem); }
  .certificate-page .certificate-thank-img { width: clamp(190px, 40vw, 320px); }
  .certificate-page .certificate-download-btn { width: min(100%, 560px); min-height: 82px; }
}

@media (max-width: 767px) {
  .certificate-page .certificate-content { padding: 1rem max(1rem, env(safe-area-inset-right)) max(1.4rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); gap: 0.85rem; }
  .certificate-page .certificate-title { font-size: clamp(1.85rem, 10vw, 2.7rem); line-height: 1.08; text-shadow: 0 3px 0 rgba(130,0,32,0.14), 0 10px 18px rgba(225,19,68,0.12); }
  .certificate-page .certificate-thank-img { width: clamp(180px, 62vw, 270px); }
  .certificate-page .certificate-download-btn { grid-template-columns: 30px minmax(0, 1fr) 30px; width: min(100%, 342px); min-height: 74px; padding: 0.68rem 0.85rem; border-radius: 16px; gap: 0.5rem; }
  .certificate-page .certificate-btn-icon,
  .certificate-page .certificate-btn-badge { width: 30px; border-radius: 10px; font-size: 0.95rem; }
  .certificate-page .certificate-btn-copy strong { font-size: clamp(0.88rem, 4.35vw, 1.02rem); white-space: nowrap; }
  .certificate-page .certificate-btn-copy small { font-size: clamp(0.72rem, 3.4vw, 0.86rem); }
  .certificate-page .certificate-home-btn { min-width: min(100%, 250px); min-height: 48px; font-size: 0.95rem; border-radius: 15px; }
  .certificate-page .certificate-confetti { inset: 0.35rem 0 auto; height: 100px; }
  .certificate-page .certificate-confetti span:nth-child(1) { left: 2%; }
  .certificate-page .certificate-confetti span:nth-child(2) { left: 7%; }
  .certificate-page .certificate-confetti span:nth-child(3) { left: 11%; }
  .certificate-page .certificate-confetti span:nth-child(4) { right: 11%; }
  .certificate-page .certificate-confetti span:nth-child(5) { right: 7%; }
  .certificate-page .certificate-confetti span:nth-child(6) { right: 2%; }
}

@media (min-width: 1033px) and (max-height: 760px) {
  .certificate-page .certificate-content { gap: 0.55rem; padding-top: 0.35rem; padding-bottom: 0.6rem; }
  .certificate-page .certificate-title { font-size: clamp(2rem, 4.6vw, 3.35rem); }
  .certificate-page .certificate-thank-img { width: clamp(190px, 24vw, 300px); }
  .certificate-page .certificate-download-btn { min-height: 70px; width: min(100%, 540px); padding-top: 0.65rem; padding-bottom: 0.65rem; }
  .certificate-page .certificate-btn-icon,
  .certificate-page .certificate-btn-badge { width: 48px; }
  .certificate-page .certificate-btn-copy strong { font-size: clamp(1.05rem, 2vw, 1.5rem); }
  .certificate-page .certificate-btn-copy small { font-size: clamp(0.78rem, 1.25vw, 0.94rem); }
  .certificate-page .certificate-home-btn { min-height: 46px; font-size: 1rem; }
  .certificate-page .certificate-confetti { height: 105px; }
}

/* Popup: BE-FAST 6-sign sequence display across screen sizes */
@media (min-width: 1033px) and (max-width: 1399px) {
  .modal-befast-row {
    max-width: 580px !important;
    gap: clamp(6px, 1vw, 12px) !important;
  }
  .modal-befast-item {
    width: clamp(40px, 4.5vw, 56px) !important;
  }
  .modal-befast-item.active {
    width: clamp(78px, 13vw, 108px) !important;
  }
  .modal-befast-item:nth-child(2) {
    margin-right: clamp(12px, 2vw, 22px) !important;
  }
  .modal-befast-letter {
    width: clamp(38px, 3.8vw, 48px) !important;
    height: clamp(38px, 3.8vw, 48px) !important;
    font-size: clamp(1.2rem, 1.6vw, 1.55rem) !important;
  }
  .modal-befast-name {
    display: none !important;
    font-size: clamp(0.6rem, 0.78vw, 0.72rem) !important;
  }
  .modal-befast-item.active .modal-befast-name {
    display: block !important;
    font-size: clamp(0.82rem, 1.05vw, 0.96rem) !important;
    line-height: 1.2 !important;
  }
}

@media (min-width: 768px) and (max-width: 1032px) {
  .modal-befast-row {
    max-width: 560px !important;
    gap: clamp(6px, 1.2vw, 11px) !important;
  }
  .modal-befast-item {
    width: clamp(38px, 5.2vw, 52px) !important;
    gap: 4px !important;
  }
  .modal-befast-item.active {
    width: clamp(74px, 14vw, 100px) !important;
  }
  .modal-befast-item:nth-child(2) {
    margin-right: clamp(10px, 2vw, 18px) !important;
  }
  .modal-befast-letter {
    width: clamp(36px, 4.4vw, 46px) !important;
    height: clamp(36px, 4.4vw, 46px) !important;
    font-size: clamp(1.15rem, 1.6vw, 1.45rem) !important;
    border-radius: 10px !important;
  }
  .modal-befast-name {
    display: none !important;
    font-size: clamp(0.58rem, 0.8vw, 0.68rem) !important;
    line-height: 1.15 !important;
  }
  .modal-befast-item.active .modal-befast-name {
    display: block !important;
    font-size: clamp(0.78rem, 1.1vw, 0.92rem) !important;
    line-height: 1.2 !important;
  }
}

@media (max-width: 767px) {
  .modal-befast-row {
    gap: clamp(4px, 1.2vw, 7px) !important;
    max-width: 100% !important;
    padding: 0.2rem 0.2rem 0 !important;
  }
  .modal-befast-item {
    width: clamp(34px, 9vw, 42px) !important;
    gap: 3px !important;
  }
  .modal-befast-item.active {
    width: clamp(62px, 19vw, 84px) !important;
  }
  .modal-befast-item:nth-child(2) {
    margin-right: clamp(8px, 2.2vw, 14px) !important;
  }
  .modal-befast-letter {
    width: clamp(32px, 8.5vw, 38px) !important;
    height: clamp(32px, 8.5vw, 38px) !important;
    font-size: clamp(1.05rem, 3.2vw, 1.28rem) !important;
    border-radius: 8px !important;
  }
  .modal-befast-name {
    display: none !important;
  }
  .modal-befast-item.active .modal-befast-name {
    display: block !important;
    font-size: clamp(0.72rem, 2.4vw, 0.86rem) !important;
    line-height: 1.2 !important;
    font-weight: 900 !important;
  }
}

.thanks-wrapper { justify-content: flex-start; min-height: 100vh; min-height: 100svh; min-height: 100dvh; min-height: var(--app-height); }
.thanks-top-bar { display: grid; grid-template-columns: 1fr auto; gap: 1rem; }
.thanks-top-bar .brand-logo { justify-self: start; }
.thanks-top-bar .awareness-tag { justify-self: end; }
.thanks-content { position: relative; z-index: 1; flex: 1 1 auto; width: min(100%, 1220px); margin: 0 auto; padding: clamp(0.25rem, 0.8vh, 0.7rem) clamp(1rem, 4vw, 2rem) clamp(0.7rem, 1.4vh, 1.1rem); display: flex; flex-direction: column; align-items: center; gap: clamp(0.55rem, 1.2vh, 0.85rem); }
.thanks-card { position: relative; width: min(100%, 1080px); padding: clamp(1.35rem, 2.8vh, 2rem) clamp(1.4rem, 3vw, 3.2rem) clamp(0.8rem, 1.6vh, 1.15rem); border-radius: 32px; border: 5px solid rgba(255,255,255,0.95); background: linear-gradient(180deg, rgba(255,255,255,0.86), rgba(255,248,247,0.94)); box-shadow: 0 0 0 2px rgba(225,19,68,0.07), 0 18px 32px rgba(225,19,68,0.12), inset 0 0 0 2px rgba(225,19,68,0.05); text-align: center; overflow: hidden; }
.thanks-card::before,
.thanks-card::after { content: ''; position: absolute; inset: 0; pointer-events: none; background-repeat: no-repeat; opacity: 0.42; }
.thanks-card::before { background-image: radial-gradient(circle, rgba(225,19,68,0.16) 0 2px, transparent 3px), radial-gradient(circle, rgba(225,19,68,0.08) 0 1px, transparent 2px); background-size: 26px 26px, 42px 42px; background-position: 4% 10%, 92% 22%; mask-image: linear-gradient(90deg, black 0 16%, transparent 32% 68%, black 84% 100%); -webkit-mask-image: linear-gradient(90deg, black 0 16%, transparent 32% 68%, black 84% 100%); }
.thanks-card::after { background-image: linear-gradient(135deg, transparent 0 42%, rgba(225,19,68,0.16) 43% 48%, transparent 49%), linear-gradient(45deg, transparent 0 42%, rgba(255,128,151,0.22) 43% 48%, transparent 49%); background-size: 42px 42px, 34px 34px; background-position: 98% 58%, 1% 74%; }
.thanks-card h1 { position: relative; z-index: 1; margin: 0 0 0.25rem; font-family: 'Poppins', sans-serif; color: #4b1022; font-size: clamp(1.55rem, 2.6vw, 2.3rem); font-weight: 900; line-height: 1.1; }
.thanks-card p { position: relative; z-index: 1; margin: 0 auto clamp(0.75rem, 1.6vh, 1.1rem); color: #321320; font-size: clamp(0.9rem, 1.25vw, 1.08rem); font-weight: 700; line-height: 1.32; }
.thanks-card p strong { color: var(--primary-red); font-weight: 900; }
.thanks-confetti { position: absolute; left: 50%; top: 1.35rem; width: min(88%, 900px); height: 86px; transform: translateX(-50%); pointer-events: none; z-index: 0; }
.thanks-confetti span { position: absolute; width: 9px; height: 24px; border-radius: 999px; background: #f2a51e; transform: rotate(-35deg); }
.thanks-confetti span:nth-child(1) { left: 2%; top: 9%; }
.thanks-confetti span:nth-child(2) { left: 7%; top: 66%; height: 20px; background: #2a80b9; transform: rotate(55deg); }
.thanks-confetti span:nth-child(3) { left: 12%; top: 42%; height: 12px; background: #e11344; transform: rotate(38deg); }
.thanks-confetti span:nth-child(4) { right: 12%; top: 10%; background: #f7cf37; transform: rotate(32deg); }
.thanks-confetti span:nth-child(5) { right: 7%; top: 68%; height: 18px; background: #d83ab9; transform: rotate(-64deg); }
.thanks-confetti span:nth-child(6) { right: 2%; top: 42%; height: 10px; background: #43a9c5; transform: rotate(-18deg); }
.befast-row { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(0.45rem, 1.35vw, 1rem); align-items: start; margin: 0 auto clamp(0.75rem, 1.7vh, 1.05rem); max-width: 880px; }
.befast-item { display: grid; grid-template-rows: auto 82px auto; justify-items: center; align-items: start; min-width: 0; }
.befast-letter { width: clamp(58px, 5.8vw, 88px); aspect-ratio: 1; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-family: 'Poppins', sans-serif; font-size: clamp(2.2rem, 4.2vw, 3.9rem); font-weight: 900; line-height: 1; box-shadow: 0 10px 15px rgba(0,0,0,0.12), inset 0 6px 8px rgba(255,255,255,0.16), inset 0 -8px 10px rgba(0,0,0,0.12); }
.befast-blue { background: linear-gradient(145deg, #0d3770, #062557); }
.befast-red { background: linear-gradient(145deg, #f21e34, #c90627); }
.befast-item h2 { min-height: 82px; margin: 0.45rem 0 0.45rem; display: flex; align-items: flex-start; justify-content: center; text-align: center; color: #0c2e61; font-family: 'Poppins', sans-serif; font-size: clamp(0.68rem, 0.88vw, 0.84rem); font-weight: 900; line-height: 1.22; }
.befast-item:nth-child(even) h2,
.befast-item:nth-child(4) h2,
.befast-item:nth-child(6) h2 { color: var(--primary-red); }
.befast-icon { width: clamp(42px, 4.7vw, 62px); aspect-ratio: 1; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #eaf2fa; color: #0d3770; font-size: clamp(1.25rem, 2.1vw, 1.8rem); box-shadow: inset 0 0 0 1px rgba(13,55,112,0.06); }
.befast-soft-red { background: #ffe1dd; color: var(--primary-red); }
.befast-svg-icon { width: 58%; height: 58%; object-fit: contain; filter: invert(19%) sepia(98%) saturate(3941%) hue-rotate(337deg) brightness(92%) contrast(99%); }
.stroke-initiative-img { position: relative; z-index: 1; display: block; width: min(100%, 820px); margin: 0 auto; height: auto; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(184,100,16,0.12)); }
.thanks-character { position: fixed; right: clamp(1rem, 3vw, 3rem); bottom: clamp(0.4rem, 1.8vh, 1.5rem); z-index: 2; width: clamp(120px, 13vw, 210px); height: auto; pointer-events: none; filter: drop-shadow(0 12px 20px rgba(225,19,68,0.18)); }
.thanks-disclaimer { width: min(100%, 1120px); border-radius: 14px; border: 1px solid rgba(225,19,68,0.18); background: rgba(255,255,255,0.72); box-shadow: 0 10px 24px rgba(225,19,68,0.09), inset 0 0 0 1px rgba(255,255,255,0.82); padding: clamp(0.7rem, 1.25vh, 0.95rem) clamp(1rem, 2.4vw, 1.35rem); color: #151515; font-size: clamp(0.7rem, 0.82vw, 0.82rem); line-height: 1.28; }
.thanks-disclaimer h2 { color: var(--primary-red); font-family: 'Poppins', sans-serif; font-size: clamp(0.95rem, 1.25vw, 1.08rem); font-weight: 900; margin: 0 0 0.55rem; }
.thanks-disclaimer ul { list-style: none; padding: 0; margin: 0 0 0.5rem; display: grid; gap: 0.25rem; }
.thanks-disclaimer li { position: relative; padding-left: 1.55rem; }
.thanks-disclaimer li::before { content: '\f3ed'; position: absolute; left: 0; top: 0.05rem; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: #ec496b; font-size: 0.88rem; }
.thanks-disclaimer p { margin: 0 0 0.2rem; }
.thanks-disclaimer a { color: #064ee4; text-decoration: underline; }
.thanks-disclaimer span { color: #111; margin-left: 0.2rem; }
.generate-certificate-btn { position: relative; z-index: 3; margin-top: clamp(0.1rem, 0.6vh, 0.35rem); min-width: min(100%, 330px); justify-content: center; text-decoration: none; padding: 0.58rem 0.65rem 0.58rem 1.45rem; gap: 0.9rem; }
.generate-certificate-btn:hover { color: #fff; }
.generate-certificate-btn .btn-text { font-size: clamp(0.98rem, 1.45vw, 1.25rem); }
.generate-certificate-btn .icon-circle { width: 40px; height: 40px; }
.generate-certificate-btn .icon-circle i { margin-left: 0; font-size: 1rem; }

@media (max-width: 1032px) {
  .thanks-card { border-radius: 26px; padding-inline: clamp(1rem, 4vw, 1.6rem); }
  .befast-row { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: 700px; }
  .befast-letter { width: clamp(58px, 8vw, 76px); font-size: clamp(2.15rem, 5vw, 3.35rem); }
  .befast-item h2 { font-size: clamp(0.58rem, 1.45vw, 0.78rem); }
  .befast-icon { width: clamp(40px, 6vw, 56px); font-size: clamp(1.1rem, 2.5vw, 1.55rem); }
  .stroke-initiative-img { width: min(100%, 720px); max-height: 82px; }
}

@media (max-width: 767px) {
  .thanks-top-bar { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .thanks-top-bar .brand-logo,
  .thanks-top-bar .awareness-tag { justify-self: center; }
  .thanks-content { padding: 0.45rem 0.8rem 1.25rem; }
  .thanks-character { position: static; order: -1; width: clamp(94px, 28vw, 112px); margin: -0.15rem auto 0.2rem; display: block; }
  .thanks-card { padding: 1.45rem 0.9rem 1rem; border-width: 4px; }
  .thanks-card h1 { font-size: clamp(1.45rem, 7vw, 1.9rem); }
  .thanks-card p { font-size: 0.9rem; }
  .thanks-confetti { display: none; }
  .befast-row { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.28rem; max-width: 100%; }
  .befast-item { grid-template-rows: auto 52px auto; }
  .befast-item h2 { min-height: 52px; margin: 0.35rem 0 0.35rem; font-size: clamp(0.45rem, 1.75vw, 0.58rem); line-height: 1.18; }
  .befast-letter { width: clamp(38px, 11vw, 48px); border-radius: 7px; font-size: clamp(1.55rem, 7.6vw, 2.1rem); }
  .befast-icon { width: clamp(30px, 8.8vw, 38px); font-size: clamp(0.82rem, 4.2vw, 1.05rem); }
  .stroke-initiative-img { max-height: 56px; }
  .thanks-disclaimer { font-size: 0.76rem; }
  .generate-certificate-btn { min-width: min(100%, 292px); padding: 0.5rem 0.55rem 0.5rem 1.1rem; }
  .generate-certificate-btn .btn-text { font-size: 0.96rem; }
  .generate-certificate-btn .icon-circle { width: 34px; height: 34px; }
}

@media (min-width: 1033px) {
  .thanks-page,
  .thanks-page .main-wrapper { overflow-y: hidden; }
  .stroke-initiative-img { max-height: 76px; }
}

@media (min-width: 1033px) and (max-height: 760px) {
  .thanks-content { gap: 0.55rem; padding-top: 0.2rem; padding-bottom: 0.55rem; }
  .thanks-card { padding-top: 1.1rem; padding-bottom: 0.65rem; }
  .thanks-card h1 { font-size: clamp(1.45rem, 2.4vw, 2rem); }
  .thanks-card p { font-size: clamp(0.82rem, 1.1vw, 0.98rem); margin-bottom: 0.6rem; }
  .befast-row { margin-bottom: 0.55rem; }
  .befast-letter { width: clamp(52px, 5vw, 76px); font-size: clamp(2rem, 3.6vw, 3.35rem); }
  .befast-item { grid-template-rows: auto 62px auto; }
  .befast-item h2 { min-height: 62px; margin: 0.32rem 0 0.32rem; font-size: clamp(0.6rem, 0.78vw, 0.74rem); }
  .befast-icon { width: clamp(38px, 4vw, 52px); font-size: clamp(1.05rem, 1.75vw, 1.48rem); }
  .stroke-initiative-img { max-height: 64px; }
  .thanks-disclaimer { padding-top: 0.6rem; padding-bottom: 0.6rem; font-size: clamp(0.64rem, 0.75vw, 0.74rem); line-height: 1.22; }
  .thanks-disclaimer h2 { margin-bottom: 0.35rem; }
  .thanks-disclaimer ul { gap: 0.16rem; margin-bottom: 0.32rem; }
  .thanks-character { width: clamp(105px, 10vw, 150px); }
  .generate-certificate-btn { padding-top: 0.42rem; padding-bottom: 0.42rem; min-width: 285px; }
  .generate-certificate-btn .btn-text { font-size: 1rem; }
  .generate-certificate-btn .icon-circle { width: 34px; height: 34px; }
}

/* Large Desktop */
@media (min-width: 1400px) {
}

/* ===== Quiz Initialization: Prevent Flash of Untranslated / Old Content ===== */
html.quiz-initializing #questionTitle,
html.quiz-initializing #symptomTitle,
html.quiz-initializing #symptomText,
html.quiz-initializing #levelBadge,
html.quiz-initializing .options-prompt-banner,
html.quiz-initializing .speech-bubble-overlay {
  opacity: 0 !important;
  visibility: hidden !important;
}

#questionTitle,
#symptomTitle,
#symptomText,
#levelBadge,
.options-prompt-banner,
.speech-bubble-overlay {
  transition: opacity 0.14s ease-out;
}
