:root {
  --design-width: 941;
  --design-height: 1672;
  --stage-width: min(100vw, 430px);
  --stage-height: calc(var(--stage-width) * var(--design-height) / var(--design-width));
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 48% 0%, rgba(75, 235, 255, 0.34), transparent 24rem),
    linear-gradient(180deg, #0784f6 0%, #0057d7 45%, #003aaf 100%);
}

button {
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  max-width: none;
}

.app {
  min-height: 100vh;
}

.home-screen {
  position: relative;
  width: var(--stage-width);
  height: var(--stage-height);
  margin: 0 auto;
  overflow: hidden;
  isolation: isolate;
  transform: translateZ(0);
}

.home-bg {
  position: absolute;
  top: 0;
  left: -9.19%;
  z-index: 0;
  width: 118.46%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.home-logo,
.year-layer,
.title-layer,
.slogan-layer,
.floating-robot,
.tip-shield {
  position: absolute;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.home-logo {
  z-index: 2;
  top: calc(41 / var(--design-height) * 100%);
  left: calc(54 / var(--design-width) * 100%);
  width: calc(141 / var(--design-width) * 100%);
  height: calc(141 / var(--design-height) * 100%);
}

.music-button {
  position: absolute;
  z-index: 5;
  top: calc(41 / var(--design-height) * 100%);
  left: calc(652 / var(--design-width) * 100%);
  width: calc(289 / var(--design-width) * 100%);
  height: calc(96 / var(--design-height) * 100%);
  transition: transform 0.16s ease, filter 0.16s ease;
  touch-action: manipulation;
}

.music-button img,
.info-panel img,
.start-button img,
.rules-entry img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.music-button span {
  position: absolute;
  top: 50%;
  left: 42%;
  width: 47%;
  color: #ffffff;
  font-size: clamp(11px, calc(var(--stage-width) * 25 / 941), 14px);
  font-weight: 700;
  line-height: 1;
  text-align: center;
  transform: translateY(-50%);
  text-shadow: 0 2px 6px rgba(0, 41, 135, 0.56);
}

.year-layer {
  z-index: 2;
  top: calc(215 / var(--design-height) * 100%);
  left: calc(242 / var(--design-width) * 100%);
  width: calc(458 / var(--design-width) * 100%);
  height: calc(153 / var(--design-height) * 100%);
}

.title-layer {
  z-index: 3;
  top: calc(284 / var(--design-height) * 100%);
  left: calc(22 / var(--design-width) * 100%);
  width: calc(897 / var(--design-width) * 100%);
  height: calc(299 / var(--design-height) * 100%);
}

.title-sweep {
  position: absolute;
  z-index: 4;
  top: calc(340 / var(--design-height) * 100%);
  left: calc(36 / var(--design-width) * 100%);
  width: calc(870 / var(--design-width) * 100%);
  height: calc(130 / var(--design-height) * 100%);
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: screen;
}

.title-sweep::before {
  position: absolute;
  top: -36%;
  left: -22%;
  width: 9%;
  height: 175%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.98), rgba(122, 250, 255, 0.9), transparent);
  filter: blur(3px);
  transform: skewX(-18deg);
  animation: titleSweep 3.2s ease-in-out infinite;
}

.slogan-layer {
  z-index: 2;
  top: calc(487 / var(--design-height) * 100%);
  left: calc(91 / var(--design-width) * 100%);
  width: calc(759 / var(--design-width) * 100%);
  height: calc(190 / var(--design-height) * 100%);
}

.floating-robot {
  z-index: 3;
  will-change: transform;
}

.robot-left {
  top: calc(685 / var(--design-height) * 100%);
  left: calc(91 / var(--design-width) * 100%);
  width: calc(310 / var(--design-width) * 100%);
  height: calc(310 / var(--design-height) * 100%);
  animation: floatLeft 3.8s ease-in-out infinite;
}

.robot-right {
  top: calc(696 / var(--design-height) * 100%);
  left: calc(597 / var(--design-width) * 100%);
  width: calc(288 / var(--design-width) * 100%);
  height: calc(288 / var(--design-height) * 100%);
  animation: floatRight 4.2s ease-in-out infinite;
}

.info-panel {
  position: absolute;
  z-index: 4;
  top: calc(967 / var(--design-height) * 100%);
  left: calc(56 / var(--design-width) * 100%);
  width: calc(829 / var(--design-width) * 100%);
  height: calc(207 / var(--design-height) * 100%);
}

.activity-date {
  position: absolute;
  top: calc(108 / 207 * 100%);
  left: calc(137 / 829 * 100%);
  width: calc(254 / 829 * 100%);
  color: #ffffff;
  font-size: clamp(10px, calc(var(--stage-width) * 23 / 941), 13px);
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
  text-shadow: 0 2px 7px rgba(0, 43, 130, 0.55);
}

.start-button {
  position: absolute;
  z-index: 5;
  top: calc(1149 / var(--design-height) * 100%);
  left: calc(86 / var(--design-width) * 100%);
  width: calc(770 / var(--design-width) * 100%);
  height: calc(193 / var(--design-height) * 100%);
  border-radius: 999px;
  transition: transform 0.16s ease, filter 0.16s ease;
  touch-action: manipulation;
}

.rules-entry {
  position: absolute;
  z-index: 5;
  top: calc(1364 / var(--design-height) * 100%);
  left: calc(154 / var(--design-width) * 100%);
  width: calc(633 / var(--design-width) * 100%);
  height: calc(78 / var(--design-height) * 100%);
  border-radius: 999px;
  transition: transform 0.16s ease, filter 0.16s ease;
  touch-action: manipulation;
}

.cta-hit::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  content: "";
  opacity: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.28), transparent 58%),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.62), transparent);
  transform: translateX(-60%);
  transition: opacity 0.12s ease, transform 0.32s ease;
  pointer-events: none;
}

.cta-hit:active {
  transform: scale(0.94);
  filter: brightness(1.18) saturate(1.08) drop-shadow(0 0 14px rgba(55, 244, 255, 0.82));
}

.cta-hit:active::before {
  opacity: 1;
  transform: translateX(60%);
}

.music-button:active {
  transform: scale(0.95);
  filter: brightness(1.12) drop-shadow(0 0 10px rgba(55, 244, 255, 0.65));
}

.tip-shield {
  z-index: 3;
  top: calc(1478 / var(--design-height) * 100%);
  left: calc(208 / var(--design-width) * 100%);
  width: calc(24 / var(--design-width) * 100%);
  height: calc(27 / var(--design-height) * 100%);
}

.home-tip {
  position: absolute;
  z-index: 3;
  top: calc(1481 / var(--design-height) * 100%);
  left: calc(246 / var(--design-width) * 100%);
  width: calc(472 / var(--design-width) * 100%);
  margin: 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(10px, calc(var(--stage-width) * 20 / 941), 12px);
  line-height: 1.4;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
}

.organizer {
  position: absolute;
  z-index: 3;
  top: calc(1581 / var(--design-height) * 100%);
  left: calc(285 / var(--design-width) * 100%);
  width: calc(372 / var(--design-width) * 100%);
  margin: 0;
  color: #ffffff;
  font-size: clamp(10px, calc(var(--stage-width) * 23 / 941), 13px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: clamp(1.5px, calc(var(--stage-width) * 3.4 / 941), 2.4px);
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 38, 126, 0.5);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.toast {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 8%;
  max-width: 78%;
  padding: 9px 14px;
  border: 1px solid rgba(91, 238, 255, 0.42);
  border-radius: 999px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  background: rgba(0, 29, 104, 0.76);
  box-shadow: 0 10px 24px rgba(0, 22, 88, 0.35);
  transform: translateX(-50%);
}

.toast[hidden],
.modal[hidden],
.home-screen[hidden],
.quiz-screen[hidden],
.result-screen[hidden],
.result-screen-v2[hidden],
.lottery-screen[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  background: rgba(0, 17, 57, 0.72);
  backdrop-filter: blur(2px);
}

.rules-dialog {
  position: relative;
  width: min(78vw, 350px);
  padding: 28px 25px 24px;
  border: 1px solid rgba(78, 236, 255, 0.9);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 0%, rgba(70, 238, 255, 0.26), transparent 15rem),
    linear-gradient(180deg, rgba(17, 117, 235, 0.96), rgba(0, 52, 176, 0.98));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16) inset,
    0 0 28px rgba(49, 244, 255, 0.7),
    0 22px 70px rgba(0, 22, 90, 0.55);
}

.rules-dialog h2 {
  margin: 4px 42px 22px;
  color: #ffffff;
  font-size: clamp(24px, 7vw, 32px);
  line-height: 1.1;
  letter-spacing: 2px;
  text-align: center;
  text-shadow: 0 3px 8px rgba(0, 42, 135, 0.46);
}

.close-rules {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
  background: radial-gradient(circle, #1386f5, #073eae);
  box-shadow: 0 0 14px rgba(81, 239, 255, 0.78), inset 0 0 0 1px rgba(255, 255, 255, 0.66);
}

.rules-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rules-list li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  border-bottom: 1px solid rgba(108, 229, 255, 0.25);
  color: #ffffff;
  font-size: clamp(16px, 4.7vw, 22px);
  font-weight: 800;
  line-height: 1.35;
}

.rules-list li:last-child {
  border-bottom: 0;
}

.rules-list i {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  font-style: normal;
  font-size: 16px;
  background: linear-gradient(180deg, #4cf4ff, #0b73e7);
  box-shadow: 0 0 10px rgba(76, 244, 255, 0.72);
}

.know-button {
  width: 100%;
  min-height: 56px;
  margin-top: 22px;
  border-radius: 999px;
  color: #ffffff;
  font-size: clamp(22px, 6.4vw, 30px);
  font-weight: 900;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #31bfff, #4aefe5);
  box-shadow: 0 0 18px rgba(68, 232, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.62);
  text-shadow: 0 2px 6px rgba(0, 70, 150, 0.42);
}

.analysis-dialog {
  width: min(86vw, 390px);
}

.analysis-list {
  display: grid;
  gap: 12px;
  max-height: min(54vh, 430px);
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

.analysis-list::-webkit-scrollbar {
  width: 0;
}

.analysis-item {
  padding: 12px 12px 13px;
  border: 1px solid rgba(103, 229, 255, .32);
  border-radius: 12px;
  color: #fff;
  background: rgba(0, 56, 174, .42);
  box-shadow: inset 0 0 18px rgba(81, 232, 255, .08);
}

.analysis-item h3 {
  margin: 0 0 8px;
  font-size: clamp(15px, 4vw, 18px);
  line-height: 1.38;
}

.analysis-item p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, .88);
  font-size: clamp(13px, 3.6vw, 16px);
  line-height: 1.45;
}

.analysis-item b {
  color: #7dffff;
}

.analysis-empty {
  margin: 6px 0 0;
  color: #fff;
  font-size: clamp(17px, 4.8vw, 22px);
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
}

.quiz-screen {
  position: relative;
  width: var(--stage-width);
  height: var(--stage-height);
  margin: 0 auto;
  overflow: hidden;
  background: #006de9;
}

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

.quiz-top {
  position: absolute;
  z-index: 2;
  top: calc(28 / var(--design-height) * 100%);
  left: calc(45 / var(--design-width) * 100%);
  display: flex;
  align-items: center;
  width: calc(850 / var(--design-width) * 100%);
  height: calc(92 / var(--design-height) * 100%);
}

.quiz-logo {
  width: calc(74 / 850 * 100%);
  aspect-ratio: 1;
}

.quiz-title-mini {
  width: calc(393 / 850 * 100%);
  margin-left: 14px;
}

.quiz-music-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-left: auto;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #61e7ff, #0b67df 62%, #0849bc);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55), 0 0 15px rgba(74,229,255,.55);
}

.quiz-music-button::before {
  content: "\266A";
  color: #ffffff;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0, 45, 140, .45);
  transform: translateY(-1px);
}

.quiz-music-button.music-off {
  filter: saturate(.7) brightness(.86);
}

.quiz-music-button.music-off::after {
  position: absolute;
  width: 34px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 2px 6px rgba(0, 45, 140, .36);
  content: "";
  transform: rotate(-38deg);
}

.music-button.music-off {
  filter: saturate(.72) brightness(.9);
}

.quiz-music-button span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.quiz-badge {
  position: absolute;
  top: calc(51 / var(--design-height) * 100%);
  left: calc(552 / var(--design-width) * 100%);
  z-index: 3;
  min-width: calc(139 / var(--design-width) * 100%);
  padding: 7px 14px;
  border-radius: 999px;
  color: #fff;
  font-size: clamp(10px, calc(var(--stage-width) * 20 / 941), 12px);
  background: #0b68e9;
}

.quiz-status {
  position: absolute;
  z-index: 2;
  top: calc(143 / var(--design-height) * 100%);
  left: calc(44 / var(--design-width) * 100%);
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: calc(16 / var(--design-width) * 100vw);
  width: calc(853 / var(--design-width) * 100%);
}

.timer-card,
.progress-card {
  min-height: calc(var(--stage-width) * 154 / 941);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.timer-card {
  display: grid;
  align-content: center;
  justify-items: center;
}

.timer-card span {
  font-size: clamp(13px, calc(var(--stage-width) * 30 / 941), 16px);
}

.timer-card strong {
  margin-top: 6px;
  font-size: clamp(30px, calc(var(--stage-width) * 58 / 941), 38px);
}

.progress-card {
  display: grid;
  align-content: center;
  justify-items: center;
}

.progress-card strong {
  font-size: clamp(19px, calc(var(--stage-width) * 40 / 941), 25px);
  letter-spacing: 1px;
}

.progress-card b {
  color: #e7de91;
  font-size: 1.22em;
}

.progress-dots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  width: 64%;
  margin-top: 14px;
}

.progress-dots span {
  height: 9px;
  border-radius: 999px;
  background: rgba(133, 186, 255, .55);
}

.progress-dots span.done {
  background: linear-gradient(180deg, #7bffff, #12b7f5);
  box-shadow: 0 0 9px rgba(68,240,255,.72);
}

.question-card {
  position: absolute;
  z-index: 2;
  top: calc(322 / var(--design-height) * 100%);
  left: calc(38 / var(--design-width) * 100%);
  display: flex;
  flex-direction: column;
  width: calc(865 / var(--design-width) * 100%);
  height: calc(var(--stage-width) * 1032 / 941);
  padding: calc(var(--stage-width) * 42 / 941) calc(var(--stage-width) * 40 / 941) calc(var(--stage-width) * 84 / 941);
  border: 1px solid rgba(87,241,255,.8);
  border-radius: 24px;
  background: rgba(0, 99, 226, .6);
  box-shadow: inset 0 0 28px rgba(58,237,255,.2), 0 0 20px rgba(57,232,255,.35);
}

.quiz-robot {
  position: absolute;
  top: calc(30 / 930 * 100%);
  right: calc(52 / 865 * 100%);
  width: calc(235 / 865 * 100%);
  pointer-events: none;
}

.question-type {
  display: inline-grid;
  align-self: flex-start;
  min-width: 78px;
  height: 34px;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(180deg, #31bfff, #0d75e4);
}

.question-card h2 {
  flex: 0 1 auto;
  width: 64%;
  min-height: 0;
  max-height: calc(var(--stage-width) * 420 / 941);
  margin: 12px 0 8px;
  overflow-y: auto;
  padding-right: 3px;
  overscroll-behavior: contain;
  color: #fff;
  font-size: clamp(20px, calc(var(--stage-width) * 35 / 941), 28px);
  line-height: 1.32;
}

.question-card h2::-webkit-scrollbar {
  width: 0;
}

.question-card h2.question-compact {
  max-height: calc(var(--stage-width) * 420 / 941);
  font-size: clamp(16px, calc(var(--stage-width) * 28 / 941), 22px);
  line-height: 1.22;
}

.question-card h2.question-tiny {
  max-height: calc(var(--stage-width) * 420 / 941);
  font-size: clamp(14px, calc(var(--stage-width) * 24 / 941), 18px);
  line-height: 1.16;
}

.answer-list {
  display: grid;
  flex: 0 1 auto;
  gap: clamp(6px, calc(var(--stage-width) * 13 / 941), 10px);
  max-height: calc(var(--stage-width) * 650 / 941);
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
  overscroll-behavior: contain;
}

.answer-list::-webkit-scrollbar {
  width: 0;
}

.answer-option {
  display: grid;
  grid-template-columns: 46px 1fr 28px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: clamp(48px, calc(var(--stage-width) * 74 / 941), 60px);
  padding: 7px 14px 7px 12px;
  border: 2px solid transparent;
  border-radius: 16px;
  color: #082b7d;
  font-weight: 800;
  text-align: left;
  background: linear-gradient(180deg, #ffffff, #edf7ff);
  box-shadow: 0 4px 14px rgba(0, 45, 126, .18);
}

.answer-letter {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #0c348a;
  font-size: 22px;
  background: linear-gradient(180deg, #ffffff, #e8f2ff);
  box-shadow: 0 3px 8px rgba(0, 45, 126, .18);
}

.answer-text {
  font-size: clamp(13px, calc(var(--stage-width) * 20 / 941), 17px);
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.answer-check {
  width: 24px;
  height: 24px;
  border: 2px solid #8ca1bd;
  border-radius: 50%;
}

.answer-option.selected {
  border-color: #35ecff;
  box-shadow: 0 0 15px rgba(49, 236, 255, .62);
}

.answer-option.selected .answer-letter,
.answer-option.correct .answer-letter {
  color: #fff;
  background: linear-gradient(180deg, #19c3ff, #006de7);
}

.answer-option.selected .answer-check,
.answer-option.correct .answer-check {
  border-color: transparent;
  background: linear-gradient(180deg, #34c8ff, #006fe8);
  position: relative;
}

.answer-option.selected .answer-check::after,
.answer-option.correct .answer-check::after {
  position: absolute;
  left: 7px;
  top: -1px;
  width: 7px;
  height: 13px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  content: "";
  transform: rotate(45deg);
}

.answer-list.option-count-4 .answer-option.selected .answer-check::after,
.answer-list.option-count-4 .answer-option.correct .answer-check::after,
.answer-list.option-count-5 .answer-option.selected .answer-check::after,
.answer-list.option-count-5 .answer-option.correct .answer-check::after,
.answer-list.option-count-6 .answer-option.selected .answer-check::after,
.answer-list.option-count-6 .answer-option.correct .answer-check::after {
  left: 6px;
  top: -1px;
  width: 6px;
  height: 11px;
}

.answer-option.wrong {
  border-color: #ffb2b2;
}

.multi-tip {
  min-height: 22px;
  margin: 10px 0 0;
  color: rgba(255,255,255,.9);
  font-size: 14px;
  text-align: center;
}

.answer-list.option-count-4,
.answer-list.option-count-5,
.answer-list.option-count-6 {
  gap: clamp(5px, calc(var(--stage-width) * 9 / 941), 8px);
}

.answer-list.option-count-4 .answer-option,
.answer-list.option-count-5 .answer-option,
.answer-list.option-count-6 .answer-option {
  grid-template-columns: 40px 1fr 24px;
  min-height: clamp(42px, calc(var(--stage-width) * 58 / 941), 52px);
  padding: 5px 12px 5px 10px;
}

.answer-list.option-count-4 .answer-letter,
.answer-list.option-count-5 .answer-letter,
.answer-list.option-count-6 .answer-letter {
  width: 33px;
  height: 33px;
  font-size: 19px;
}

.answer-list.option-count-4 .answer-text,
.answer-list.option-count-5 .answer-text,
.answer-list.option-count-6 .answer-text {
  font-size: clamp(12px, calc(var(--stage-width) * 18 / 941), 15px);
  line-height: 1.16;
}

.answer-list.option-count-4 .answer-check,
.answer-list.option-count-5 .answer-check,
.answer-list.option-count-6 .answer-check {
  width: 21px;
  height: 21px;
}

.answer-list.answer-dense {
  gap: clamp(4px, calc(var(--stage-width) * 8 / 941), 7px);
}

.answer-list.answer-dense .answer-option {
  min-height: clamp(40px, calc(var(--stage-width) * 54 / 941), 50px);
  padding-top: 4px;
  padding-bottom: 4px;
}

.answer-list.answer-dense .answer-text {
  font-size: clamp(11px, calc(var(--stage-width) * 17 / 941), 14px);
  line-height: 1.14;
}

.answer-list.answer-extra-dense .answer-option {
  min-height: clamp(38px, calc(var(--stage-width) * 50 / 941), 46px);
}

.answer-list.answer-extra-dense .answer-letter {
  width: 30px;
  height: 30px;
  font-size: 17px;
}

.answer-list.answer-extra-dense .answer-text {
  font-size: clamp(10px, calc(var(--stage-width) * 15 / 941), 13px);
  line-height: 1.12;
}

.answer-list.answer-extra-dense .answer-check {
  width: 19px;
  height: 19px;
}

.answer-list.answer-extra-dense .answer-option.selected .answer-check::after,
.answer-list.answer-extra-dense .answer-option.correct .answer-check::after {
  left: 5px;
  top: -1px;
  width: 5px;
  height: 10px;
}

.quiz-actions {
  position: absolute;
  z-index: 4;
  top: calc(1412 / var(--design-height) * 100%);
  left: calc(86 / var(--design-width) * 100%);
  display: flex;
  justify-content: space-between;
  width: calc(770 / var(--design-width) * 100%);
}

.nav-button {
  width: 42%;
  min-height: 54px;
  border-radius: 999px;
  color: #fff;
  font-size: clamp(18px, calc(var(--stage-width) * 34 / 941), 24px);
  font-weight: 800;
  background: linear-gradient(180deg, rgba(71,209,255,.9), rgba(17,104,225,.85));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5), 0 0 18px rgba(53,233,255,.38);
}

.nav-button.next {
  background: linear-gradient(180deg, #27f0ff, #0879e7);
}

.nav-button.prev {
  background: linear-gradient(180deg, rgba(106, 220, 255, .78), rgba(38, 131, 224, .7));
}

.nav-button:disabled {
  opacity: .72;
  filter: saturate(.9);
}

.quiz-organizer {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: calc(46 / var(--design-height) * 100%);
  width: 100%;
  margin: 0;
  text-align: center;
  font-size: clamp(13px, calc(var(--stage-width) * 28 / 941), 16px);
  text-shadow: 0 2px 8px rgba(0, 38, 126, 0.5);
}

.result-screen {
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
  background:
    radial-gradient(circle at top, rgba(60, 225, 255, 0.36), transparent 24rem),
    linear-gradient(180deg, #047df2, #003aab);
}

.result-card {
  width: min(100%, 390px);
  padding: 28px 22px;
  border: 1px solid rgba(87, 231, 255, 0.68);
  border-radius: 20px;
  color: #fff;
  text-align: center;
  background: rgba(0, 73, 192, 0.76);
  box-shadow: 0 18px 46px rgba(0, 24, 92, 0.3);
}

.result-kicker {
  margin: 0 0 8px;
  color: #8df7ff;
  font-weight: 800;
}

.result-card h1 {
  margin: 0;
  font-size: 34px;
}

.result-card strong {
  display: block;
  margin-top: 12px;
  font-size: 24px;
}

.result-card p {
  line-height: 1.6;
}

.result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}

.result-stats span {
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.1);
}

.result-primary,
.result-secondary {
  width: 100%;
  min-height: 50px;
  margin-top: 10px;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
}

.result-primary {
  background: linear-gradient(180deg, #2cf3ff, #0876e7);
}

.result-primary:disabled {
  opacity: .5;
}

.result-secondary {
  border: 1px solid rgba(255,255,255,.5);
}

.result-screen-v2 {
  position: relative;
  width: var(--stage-width);
  height: var(--stage-height);
  margin: 0 auto;
  overflow: hidden;
  color: #fff;
  background: #006de9;
  isolation: isolate;
}

.result-bg,
.result-top,
.result-robot,
.result-score-label,
.result-score-number,
.result-status-text,
.result-sub-text,
.result-stat-grid,
.result-main-button,
.result-share-button,
.result-bottom-actions,
.result-organizer {
  position: absolute;
  z-index: 2;
}

.result-bg {
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.result-bg-fail,
.result-screen-v2.failed .result-bg-pass,
.result-screen-v2.failed .result-robot-pass,
.result-screen-v2.passed .result-bg-fail,
.result-screen-v2.passed .result-robot-fail {
  display: none;
}

.result-screen-v2.failed .result-bg-fail,
.result-screen-v2.failed .result-robot-fail {
  display: block;
}

.result-top {
  top: calc(5 / var(--design-height) * 100%);
  left: calc(30 / var(--design-width) * 100%);
  display: flex;
  align-items: center;
  width: calc(872 / var(--design-width) * 100%);
  height: calc(131 / var(--design-height) * 100%);
}

.result-logo {
  width: calc(99 / 872 * 100%);
  aspect-ratio: 1;
  object-fit: contain;
}

.result-title-mini {
  width: calc(393 / 872 * 100%);
  margin-left: calc(-15 / 872 * 100%);
}

.result-badge {
  display: grid;
  min-width: calc(145 / 872 * 100%);
  height: calc(var(--stage-width) * 42 / 941);
  margin-left: calc(8 / 872 * 100%);
  place-items: center;
  border: 1px solid rgba(139, 232, 255, .86);
  border-radius: 999px;
  color: #fff;
  font-size: clamp(10px, calc(var(--stage-width) * 20 / 941), 13px);
  font-weight: 700;
  background: rgba(18, 107, 232, .86);
}

.result-music-button {
  width: calc(var(--stage-width) * 74 / 941);
  height: calc(var(--stage-width) * 74 / 941);
  margin-left: auto;
}

.result-robot {
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.result-robot-pass {
  top: calc(397 / var(--design-height) * 100%);
  left: calc(67 / var(--design-width) * 100%);
  width: calc(245 / var(--design-width) * 100%);
}

.result-robot-fail {
  top: calc(389 / var(--design-height) * 100%);
  left: calc(126 / var(--design-width) * 100%);
  width: calc(170 / var(--design-width) * 100%);
}

.result-score-label {
  top: calc(314 / var(--design-height) * 100%);
  left: 0;
  width: 100%;
  margin: 0;
  color: #fff;
  font-size: clamp(24px, calc(var(--stage-width) * 45 / 941), 35px);
  font-weight: 900;
  text-align: center;
  text-shadow: 0 3px 10px rgba(0, 54, 160, .55);
}

.result-score-number {
  top: calc(398 / var(--design-height) * 100%);
  left: 0;
  width: 100%;
  color: #ffd700;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-shadow: 0 4px 8px rgba(0, 28, 104, .38);
}

.result-score-number span {
  font-size: clamp(94px, calc(var(--stage-width) * 190 / 941), 150px);
}

.result-score-number em {
  margin-left: 8px;
  color: #fff;
  font-size: clamp(34px, calc(var(--stage-width) * 65 / 941), 52px);
  font-style: normal;
}

.result-status-text {
  top: calc(660 / var(--design-height) * 100%);
  left: 0;
  width: 100%;
  margin: 0;
  color: #fff;
  font-size: clamp(20px, calc(var(--stage-width) * 42 / 941), 34px);
  font-weight: 900;
  text-align: center;
  text-shadow: 0 3px 10px rgba(0, 44, 126, .45);
}

.result-screen-v2.failed .result-status-text {
  display: none;
}

.result-sub-text {
  top: calc(780 / var(--design-height) * 100%);
  left: 0;
  width: 100%;
  margin: 0;
  font-size: clamp(14px, calc(var(--stage-width) * 30 / 941), 22px);
  text-align: center;
}

.result-stat-grid {
  top: calc(900 / var(--design-height) * 100%);
  left: calc(124 / var(--design-width) * 100%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: calc(698 / var(--design-width) * 100%);
  height: calc(var(--stage-width) * 122 / 941);
  align-items: end;
  text-align: center;
}

.result-stat-grid span {
  display: grid;
  gap: 4px;
  border-right: 1px solid rgba(255, 255, 255, .28);
}

.result-stat-grid span:last-child {
  border-right: 0;
}

.result-stat-grid i {
  color: rgba(255, 255, 255, .88);
  font-size: clamp(11px, calc(var(--stage-width) * 23 / 941), 15px);
  font-style: normal;
}

.result-stat-grid b {
  font-size: clamp(19px, calc(var(--stage-width) * 36 / 941), 27px);
}

.result-main-button {
  top: calc(1095 / var(--design-height) * 100%);
  left: calc(111 / var(--design-width) * 100%);
  width: calc(722 / var(--design-width) * 100%);
  height: calc(var(--stage-width) * 149 / 941);
  overflow: hidden;
  border-radius: 999px;
  color: #1267dc;
  font-size: clamp(28px, calc(var(--stage-width) * 58 / 941), 45px);
  font-weight: 900;
  background: url("./assets/result-share-panel.png") center / 100% 100% no-repeat;
  text-shadow: 0 2px 8px rgba(255,255,255,.45);
}

.result-screen-v2.passed .result-main-button {
  color: transparent;
}

.result-screen-v2.failed .result-main-button {
  color: rgba(50, 68, 103, .78);
  background:
    linear-gradient(180deg, rgba(240, 244, 250, .84), rgba(138, 154, 178, .78));
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.25), 0 0 14px rgba(37, 224, 255, .3);
}

.result-share-button {
  top: calc(1310 / var(--design-height) * 100%);
  left: calc(112 / var(--design-width) * 100%);
  display: grid;
  align-content: center;
  width: calc(722 / var(--design-width) * 100%);
  height: calc(var(--stage-width) * 106 / 941);
  overflow: hidden;
  border-radius: 22px;
  color: #fff;
  text-align: center;
}

.result-share-button span {
  font-size: clamp(14px, calc(var(--stage-width) * 28 / 941), 22px);
  font-weight: 800;
}

.result-share-button small {
  margin-top: 8px;
  font-size: clamp(10px, calc(var(--stage-width) * 20 / 941), 13px);
}

.result-main-button::before,
.result-share-button::before {
  position: absolute;
  top: -30%;
  left: -28%;
  width: 12%;
  height: 160%;
  content: "";
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.92), rgba(105,244,255,.76), transparent);
  filter: blur(2px);
  transform: skewX(-18deg);
  pointer-events: none;
}

.result-screen-v2.passed .result-main-button::before,
.result-screen-v2.failed .result-share-button::before {
  animation: resultSweep 2.9s ease-in-out infinite;
}

.result-bottom-actions {
  top: calc(1461 / var(--design-height) * 100%);
  left: calc(141 / var(--design-width) * 100%);
  display: flex;
  justify-content: space-between;
  width: calc(658 / var(--design-width) * 100%);
}

.result-small-button {
  width: 48.5%;
  min-height: calc(var(--stage-width) * 73 / 941);
  border-radius: 999px;
  color: #fff;
  font-size: clamp(13px, calc(var(--stage-width) * 28 / 941), 18px);
  font-weight: 800;
  background: linear-gradient(180deg, #28cbff, #086ee4);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45), 0 0 14px rgba(50,219,255,.35);
}

.result-organizer {
  left: 0;
  bottom: calc(26 / var(--design-height) * 100%);
  width: 100%;
  margin: 0;
  font-size: clamp(12px, calc(var(--stage-width) * 26 / 941), 16px);
  text-align: center;
}

.lottery-screen {
  position: relative;
  width: var(--stage-width);
  height: var(--stage-height);
  margin: 0 auto;
  overflow: hidden;
  color: #fff;
  background: #006de9;
  isolation: isolate;
}

.lottery-bg,
.lottery-top,
.lottery-prize-label,
.lottery-cards,
.lottery-result,
.lottery-share,
.lottery-rules,
.lottery-organizer {
  position: absolute;
  z-index: 2;
}

.lottery-bg {
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.lottery-top {
  top: calc(1 / var(--design-height) * 100%);
  left: calc(33 / var(--design-width) * 100%);
  display: flex;
  align-items: center;
  width: calc(875 / var(--design-width) * 100%);
  height: calc(131 / var(--design-height) * 100%);
}

.lottery-logo {
  width: calc(99 / 875 * 100%);
  aspect-ratio: 1;
  object-fit: contain;
}

.lottery-title-mini {
  width: calc(393 / 875 * 100%);
  margin-left: calc(-8 / 875 * 100%);
}

.lottery-badge {
  display: grid;
  min-width: calc(143 / 875 * 100%);
  height: calc(var(--stage-width) * 45 / 941);
  margin-left: calc(18 / 875 * 100%);
  place-items: center;
  border: 1px solid rgba(139, 232, 255, .86);
  border-radius: 999px;
  font-size: clamp(10px, calc(var(--stage-width) * 20 / 941), 13px);
  font-weight: 800;
  background: rgba(18, 107, 232, .86);
}

.lottery-music-button {
  width: calc(var(--stage-width) * 74 / 941);
  height: calc(var(--stage-width) * 74 / 941);
  margin-left: auto;
}

.lottery-cards {
  top: calc(504 / var(--design-height) * 100%);
  left: calc(179 / var(--design-width) * 100%);
  display: grid;
  grid-template-columns: repeat(2, calc(var(--stage-width) * 272 / 941));
  gap: calc(var(--stage-width) * 43 / 941) calc(var(--stage-width) * 43 / 941);
  perspective: 900px;
}

.lottery-prize-label {
  top: calc(431 / var(--design-height) * 100%);
  left: calc(260 / var(--design-width) * 100%);
  width: calc(210 / var(--design-width) * 100%);
  margin: 0;
  color: #fff;
  font-size: clamp(14px, calc(var(--stage-width) * 30 / 941), 20px);
  font-weight: 900;
  line-height: 1.2;
  text-align: left;
  text-shadow: 0 2px 8px rgba(0, 48, 150, .5);
  white-space: nowrap;
}

.lottery-card {
  position: relative;
  width: calc(var(--stage-width) * 272 / 941);
  height: calc(var(--stage-width) * 323 / 941);
  overflow: hidden;
  border-radius: 12px;
  transform-style: preserve-3d;
  touch-action: manipulation;
}

.lottery-card::before {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  border-radius: 14px;
  content: "";
  background: linear-gradient(105deg, transparent 0 36%, rgba(255,255,255,.88) 48%, rgba(108,245,255,.82) 52%, transparent 64% 100%);
  opacity: 0;
  mix-blend-mode: screen;
  transform: translateX(-115%);
  pointer-events: none;
  animation: cardSweep 2.7s ease-in-out infinite;
}

.lottery-card:nth-child(2)::before {
  animation-delay: .25s;
}

.lottery-card:nth-child(3)::before {
  animation-delay: .5s;
}

.lottery-card:nth-child(4)::before {
  animation-delay: .75s;
}

.lottery-card.is-open::before,
.lottery-card.is-locked::before {
  animation: none;
}

.card-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.card-face img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.card-front .fail-face,
.lottery-card.no-prize .card-front .prize-face {
  display: none;
}

.lottery-card.no-prize .card-front .fail-face {
  display: block;
}

.card-front {
  transform: rotateY(180deg);
}

.card-front b {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14%;
  color: #c72a2e;
  font-size: clamp(17px, calc(var(--stage-width) * 35 / 941), 25px);
  font-weight: 900;
  text-align: center;
}

.lottery-card.no-prize .card-front {
  background: transparent;
  border: 0;
}

.lottery-card.no-prize .card-front b {
  display: none;
}

.lottery-result {
  display: none;
}

.lottery-share {
  top: calc(1207 / var(--design-height) * 100%);
  left: calc(109 / var(--design-width) * 100%);
  width: calc(723 / var(--design-width) * 100%);
  height: calc(var(--stage-width) * 139 / 941);
  overflow: hidden;
  border-radius: 999px;
  color: transparent;
  background: url("./assets/lottery-rules-panel.png") center / 100% 100% no-repeat;
}

.lottery-share.is-used {
  width: calc(723 / var(--design-width) * 100%);
  left: calc(109 / var(--design-width) * 100%);
  color: transparent;
  background-image: url("./assets/lottery-used-button.png");
}

.lottery-rules {
  top: calc(1393 / var(--design-height) * 100%);
  left: calc(136 / var(--design-width) * 100%);
  width: calc(453 / var(--design-width) * 100%);
  min-height: calc(var(--stage-width) * 136 / 941);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: url("./assets/lottery-share-button.png") center / 100% 100% no-repeat;
}

.lottery-rules strong {
  display: none;
}

.lottery-rules p {
  display: none;
}

.lottery-organizer {
  left: 0;
  bottom: calc(48 / var(--design-height) * 100%);
  width: 100%;
  margin: 0;
  font-size: clamp(12px, calc(var(--stage-width) * 27 / 941), 16px);
  text-align: center;
}

@keyframes titleSweep {
  0%,
  22% {
    left: -22%;
    opacity: 0;
  }

  34% {
    opacity: 0.98;
  }

  66% {
    opacity: 0.86;
  }

  82%,
  100% {
    left: 112%;
    opacity: 0;
  }
}

@keyframes resultSweep {
  0%,
  24% {
    left: -28%;
    opacity: 0;
  }

  36% {
    opacity: .95;
  }

  68% {
    opacity: .78;
  }

  88%,
  100% {
    left: 116%;
    opacity: 0;
  }
}

@keyframes cardSweep {
  0%,
  28% {
    opacity: 0;
    transform: translateX(-115%);
  }

  44% {
    opacity: .95;
  }

  70% {
    opacity: .72;
  }

  88%,
  100% {
    opacity: 0;
    transform: translateX(115%);
  }
}

@keyframes floatLeft {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(0, -2.2%, 0);
  }
}

@keyframes floatRight {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(0, 2.4%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .title-sweep::before,
  .robot-left,
  .robot-right {
    animation: none;
  }
}

@media (min-width: 431px) {
  .home-screen {
    box-shadow: 0 0 42px rgba(0, 29, 115, 0.34);
  }
}

@media (max-width: 360px) {
  .rules-dialog {
    width: min(86vw, 340px);
    padding: 26px 20px 22px;
  }

  .rules-list li {
    grid-template-columns: 30px 1fr;
    gap: 10px;
  }
}

/* ========== 证书页 ========== */
.certificate-screen {
  position: relative;
  width: var(--stage-width);
  height: var(--stage-height);
  margin: 0 auto;
  overflow: hidden;
  isolation: isolate;
  transform: translateZ(0);
}

.cert-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* 顶部 LOGO（Figma 4:74 - x:31, y:24, 141×141） */
.cert-logo {
  position: absolute;
  left: 3.29%;            /* 31/941 */
  top: 1.44%;             /* 24/1672 */
  width: 14.98%;          /* 141/941 */
  aspect-ratio: 1 / 1;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  z-index: 1;
}

/* 2026 年份（Figma 4:64 - x:284, y:59, 374×125） */
.cert-year {
  position: absolute;
  left: 30.18%;           /* 284/941 */
  top: 3.53%;             /* 59/1672 */
  width: 39.74%;          /* 374/941 */
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  z-index: 1;
}

/* "数智赋能 全民共享" 标题（Figma 4:63 - x:104, y:115, 733×245） */
.cert-title {
  position: absolute;
  left: 11.05%;           /* 104/941 */
  top: 6.88%;             /* 115/1672 */
  width: 77.9%;           /* 733/941 */
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  z-index: 1;
}

/* 顶部横幅（Figma 4:62 - x:160, y:281, w:621, h:156） */
.cert-ribbon {
  position: absolute;
  left: 17%;              /* 160/941 */
  top: 16.81%;            /* 281/1672 */
  width: 65.99%;          /* 621/941 */
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  z-index: 1;
}

/* 证书正文 + "解锁:数字素养进阶成就" 徽章（Figma 4:49, PNG 实际包含上下文案） */
.cert-badge-text {
  position: absolute;
  left: 13.6%;            /* 128/941 */
  top: 49%;               /* 下移：让出头像 + 昵称的位置 */
  width: 72.8%;           /* 685/941 */
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  z-index: 1;
}

.cert-avatar {
  position: absolute;
  left: 43.46%;       /* 409/941 */
  top: 36.18%;        /* 605/1672 */
  width: 13.07%;      /* 123/941 */
  aspect-ratio: 123 / 125;
  border-radius: 50%;
  overflow: hidden;
  background: #d9e7ff;
  box-shadow: 0 calc(var(--stage-width) * 6 / 941) calc(var(--stage-width) * 18 / 941) rgba(0, 50, 150, 0.25);
  z-index: 2;
}

.cert-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cert-nickname {
  position: absolute;
  left: 50%;
  top: 45%;           /* 头像底端（~43.7%）下方 */
  transform: translateX(-50%);
  margin: 0;
  padding: calc(var(--stage-width) * 5 / 941) calc(var(--stage-width) * 18 / 941);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  font-size: calc(var(--stage-width) * 22 / 941);
  font-weight: 700;
  color: #0e3aa0;
  letter-spacing: 0.06em;
  text-align: center;
  white-space: nowrap;
  z-index: 3;
}

/* "·2026· 鄂尔多斯市全民数字素养与技能提升月"（Figma 4:50 文本图层，PNG 没切） */
.cert-bottom-text {
  position: absolute;
  left: 0;
  right: 0;
  top: 72.5%;          /* 微调：略向上挪 */
  margin: 0;
  text-align: center;
  font-weight: 700;
  color: #0053e2;
  letter-spacing: 0.25em;
  line-height: 1.55;
  z-index: 2;
  pointer-events: none;
}

.cert-bottom-text em {
  display: block;
  font-style: normal;
  font-size: calc(var(--stage-width) * 20 / 941);
  margin-bottom: calc(var(--stage-width) * 4 / 941);
}

.cert-bottom-text span {
  display: block;
  font-size: calc(var(--stage-width) * 20 / 941);
}

.cert-nickname span {
  color: #2255b8;
  font-weight: 500;
}

.cert-share-hit {
  /* 透明热区：覆盖整个电子证书白框（点击任意位置触发分享/保存逻辑），
     视觉里的"立即分享"按钮 + "长按图片可保存到相册"提示语已在 cert-bg 内绘制 */
  position: absolute;
  left: 6%;
  top: 22.5%;
  width: 88%;
  height: 56%;
  border-radius: calc(var(--stage-width) * 24 / 941);
  background: transparent;
  z-index: 4;
}

.cert-share-hit:active {
  background: rgba(255, 255, 255, 0.08);
}

/* 证书页右上音乐按钮（复用 .quiz-music-button 样式，仅做位置微调） */
.cert-music-button {
  position: absolute;
  top: 1.6%;
  right: 3%;
  z-index: 5;
}

/* ========== 海报弹层 ========== */
.poster-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: rgba(0, 0, 0, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 18px;
}

.poster-modal[hidden] {
  display: none;
}

.poster-modal-inner {
  position: relative;
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.poster-close {
  position: absolute;
  right: -2px;
  top: -42px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 22px;
  line-height: 34px;
  text-align: center;
}

.poster-hint {
  margin: 0;
  text-align: center;
  color: #fff;
  font-size: 14px;
  opacity: 0.9;
}

.poster-result {
  width: 100%;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.poster-result img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.42);
}

.poster-loading {
  margin: 0;
  color: #fff;
  font-size: 14px;
  opacity: 0.85;
}

/* ========== 离屏海报源（html2canvas 用，保持原始 941×1672 尺寸） ========== */
.poster-source {
  position: fixed;
  left: -10000px;
  top: 0;
  width: 941px;
  height: 1672px;
  pointer-events: none;
  background: transparent;
}

.poster-source-bg {
  position: absolute;
  inset: 0;
  width: 941px;
  height: 1672px;
  display: block;
}

/* 海报分层（按 Figma 海报 frame 4:4 节点坐标） */
.poster-source-logo {
  position: absolute;
  left: 48px;      /* 4:76 */
  top: 27px;
  width: 141px;
  height: 141px;
}
.poster-source-year {
  position: absolute;
  left: 279px;     /* 4:68 */
  top: 71px;
  width: 385px;
  height: auto;
}
.poster-source-title {
  position: absolute;
  left: 95px;      /* 4:67 */
  top: 129px;
  width: 752px;
  height: auto;
}
.poster-source-ribbon {
  position: absolute;
  left: 153px;     /* 4:66 */
  top: 299px;
  width: 637px;
  height: auto;
}
.poster-source-badge {
  position: absolute;
  left: 128px;     /* 4:37 */
  top: 880px;       /* 下移 */
  width: 685px;
  height: auto;
}

.poster-source-bottom-text {
  position: absolute;
  left: 0;
  right: 0;
  top: 1260px;     /* 继续下移 */
  margin: 0;
  text-align: center;
  font-weight: 700;
  color: #0053e2;
  letter-spacing: 5px;
  line-height: 1.55;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}
.poster-source-bottom-text em {
  display: block;
  font-style: normal;
  font-size: 20px;
  margin-bottom: 4px;
}
.poster-source-bottom-text span {
  display: block;
  font-size: 20px;
}

.poster-source-avatar {
  position: absolute;
  left: 409px;
  top: 612px;
  width: 123px;
  height: 125px;
  border-radius: 50%;
  overflow: hidden;
  background: #d9e7ff;
}

.poster-source-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.poster-source-nickname {
  position: absolute;
  left: 0;
  right: 0;
  top: 738px;          /* 微调：略向下挪 */
  margin: 0;
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  color: #0e3aa0;
  letter-spacing: 0.06em;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.poster-source-nickname span {
  color: #2255b8;
  font-weight: 500;
}

/* 二维码：通过扫描 poster-bg.png 像素得到的真实占位框坐标 (x:261-370, y:1447-1557) */
.poster-source-qr {
  position: absolute;
  left: 256px;
  top: 1442px;
  width: 122px;
  height: 122px;
  background: #ffffff;
  padding: 6px;
  border-radius: 4px;
}

.poster-source-qr canvas,
.poster-source-qr img {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
