@font-face {
  font-family: "Pilat";
  src: url("../fonts/Pilat-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0100-024F;
}

@font-face {
  font-family: "Pilat";
  src: url("../fonts/Pilat-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0100-024F;
}

@font-face {
  font-family: "Source Han Sans SC";
  src: url("../fonts/SourceHanSansSC-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+2E80-2EFF, U+3000-303F, U+31C0-31EF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF;
}

@font-face {
  font-family: "Source Han Sans SC";
  src: url("../fonts/SourceHanSansSC-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+2E80-2EFF, U+3000-303F, U+31C0-31EF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF;
}

* {
  box-sizing: border-box;
}

html {
  background: #f60000;
  color: #000;
  font-family: "Pilat", "Source Han Sans SC", sans-serif;
  font-weight: 400;
}

body {
  margin: 0;
  color: #000;
  background: #f60000;
  font-family: inherit;
  font-weight: 400;
  text-align: center;
}

.app {
  width: min(100%, 750px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 20px 8px;
  background: #f60000;
}

/* 页面最底部的 ICP 备案号（链接到工信部备案查询网站） */
.site-footer {
  padding: 8px 0 16px;
  font-size: 11px;
  line-height: 1.6;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
}

img,
canvas,
button {
  margin-right: auto;
  margin-left: auto;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

/* 抽过奖的人重新打开页面时，判断完之前先不显示画面（见 index.html 里的 restoring-record） */
.restoring-record .screen {
  visibility: hidden;
}

body.is-uploading,
body.is-uploading .app,
#screen-uploading {
  background: #f40001;
}

.tm {
    font-size: 0.6em;
    vertical-align: super;
    line-height: 1;
    font-family: Arial, Helvetica, sans-serif;
}

.tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.tutorial-overlay.is-visible {
  display: flex;
}

.tutorial-overlay img {
  display: block;
  width: auto;
  max-width: min(100%, 750px);
  max-height: calc(100vh - 48px);
  margin: auto;
  object-fit: contain;
  pointer-events: none;
}

h1,
h2 {
  margin: 0 0 20px;
  font-weight: 400;
}

p,
ol {
  margin: 0 0 20px;
  line-height: 1.6;
}

#home-title {
  margin-right: auto;
  margin-left: auto;
  display: flex;
  justify-content: center; 
}

#home-title img {
  display: block;
  width: 66.6%;
  margin: 0;
}

.live-copy {
  width: 90%;
  padding: 8px 20px;
  margin-right: auto;
  margin-left: auto;
  margin-bottom: 20px;
}

.top-01 {
  margin: 0;
  color: #ffffff;
  font-size: 32px;
  font-weight: 700;
}

.top-02 {
  font-size: 20px;
}

.top-02 p {
  margin: 0;
  color: #ffffff;
}

.top-02 p:first-child {
  text-align: left;
}

.top-02 p:last-child {
  text-align: right;
}

.live-main{
  position: relative;
  display: flex;
  justify-content: center; 
  background: url("../img-live/arrow-right.png") no-repeat;
  background-size: 50% auto;
  background-position: top 0px right 48px;
}

.live-main img {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 30%;
  height: auto; 
}

.live-main > p {
  margin-top: 64px;
  width: 94%;
  background-color: #fffcf9;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  font-size: 14px;
  text-align: left;
  padding: 13% 6px 16px 18%;
  border-radius: 16px;
}

.live-main-line {
  display: block;
  opacity: 0;
  transform: translateY(8px);
}

.live-main-line--final {
  margin-top: 1em;
}

#screen-home.active .live-main-line {
  animation: live-main-line-in 0.5s ease-out forwards;
}

#screen-home.active .live-main-line:nth-child(1) { animation-delay: 0.2s; }
#screen-home.active .live-main-line:nth-child(2) { animation-delay: 0.55s; }
#screen-home.active .live-main-line:nth-child(3) { animation-delay: 0.9s; }
#screen-home.active .live-main-line:nth-child(4) { animation-delay: 1.25s; }
#screen-home.active .live-main-line:nth-child(5) { animation-delay: 1.6s; }
#screen-home.active .live-main-line:nth-child(6) { animation-delay: 1.95s; }
#screen-home.active .live-main-line:nth-child(7) { animation-delay: 2.3s; }
#screen-home.active .live-main-line:nth-child(8) { animation-delay: 2.65s; }
#screen-home.active .live-main-line:nth-child(9) { animation-delay: 3s; }

@keyframes live-main-line-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  #screen-home.active .live-main-line {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

.liv-section {
  width: 94%;
  padding: 16px 32px;
  margin: 0 auto 20px;
  background-color: #fffcf9;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  border-radius: 16px;
}

.liv-section p {
  margin: 0;
  text-align: left;
}

.top-bottom{
  height: 80px;
  background: url("../img-live/top-bottom.png") bottom center no-repeat;
  background-size: 100% auto;
}

button {
  display: block;
  width: 100%;
  padding: 14px 18px;
  border: 0;
  border-radius: 4px;
  color: #fff;
  background: #c00;
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.screen-title {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 0 48px; /* 给左右装饰留空间 */
}

.screen-title-en {
  margin: 0;
  font-size: 14px;
  color: #FFFCF9;
}

.screen-title-ch {
  margin: 0;
  font-size: 40px;
  font-weight: 400;
  line-height: 1;
  color: #FFFCF9;
}

.screen-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 48px;
  background: url("../img-live/kuohao01.png") center / contain no-repeat;
}

.screen-title::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 48px;
  background: url("../img-live/kuohao02.png") center / contain no-repeat;
}

.bookguid {
  position: relative;
}

.bookguid img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.bookguid .gradient-button {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
}

.gradient-button {
  width: 260px;
  height: 52px;
  margin-right: auto;
  margin-left: auto;
  padding: 2px;
  border: none;
  border-radius: 38px;
  background: linear-gradient(
    to bottom,
    #ff9ada 0%,
    #5eb6f4 100%
  );
  box-shadow:
    0 -2px 6px #ef91cd,
    0 2px 6px #8cbfff;
  cursor: pointer;
}

.gradient-button__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 36px;
  color: #000000;
  background-color: #fffcf9;
  font-size: 16px;
  font-weight: 400;
  text-decoration: none;
}

button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.upload-steps {
  position: relative;
  width: min(72vw, 480px);
  margin: 20px auto 0;
}

.upload-step {
  position: relative;
  display: none;
  width: 100%;
  aspect-ratio: 1 / 1.6;
  margin-right: auto;
  margin-left: auto;
}

.upload-step.active {
  display: block;
}

.upload-frame,
.upload-slot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  transform: translate(-50%, -50%);
}

.upload-frame {
  z-index: 3;
  max-height: 100%;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}

.upload-slot {
  z-index: 2;
  height: 93.9%;
  overflow: hidden;
}

.upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-preview {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-slot.has-image .upload-preview {
  display: block;
}

.upload-change {
  position: absolute;
  bottom: 16px;
  left: 50%;
  z-index: 6;
  display: none;
  width: auto;
  min-width: 88px;
  padding: 8px 14px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 12px;
  line-height: 1;
}

.upload-slot.has-image .upload-change {
  display: block;
}

.upload-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(100%, 540px);
  margin-right: auto;
  margin-left: auto;
}

.upload-actions .gradient-button {
  flex: 1 1 0;
  width: auto;
  max-width: 260px;
  margin-top: 14px;
}

#generate-button[hidden],
#upload-next[hidden] {
  display: none;
}

.dec {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
}

.dec img {
  display: block;
  width: 100%;
  height: auto;
}

.loading-section01 {
  display: flex;
  align-items: center;
  margin: 0 auto;
  width: 90%;
  background-position: right 20px bottom;
  background-repeat: no-repeat;
  background-size: 20% auto;
}

.loading-section01 > div:first-child {
  flex: 0 0 20%;
  width: 20%;
}

.loading-section01 > div:first-child img {
  display: block;
  width: 100%;
  height: auto;
}

.loading-section02{
  width: 72%;
  height: auto;
  margin: 0 auto;
}

.loading-bottom{
  font-size: 14px;
  color: #FFFCF9;
  text-align: center;
  line-height: 1;
}

.loding-animation {
  position: relative;
  flex: 1 1 80%;
  height: 18px;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #fff;
}

.loding-animation::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(to right, #ff9ada 0%, #5eb6f4 100%);
  content: "";
}

#screen-uploading.active .loding-animation::before {
  animation: live-loading-progress 4s ease-in-out forwards;
}

@keyframes live-loading-progress {
  0% {
    width: 0;
  }

  12% {
    width: 18%;
  }

  24% {
    width: 20%;
  }

  42% {
    width: 52%;
  }

  56% {
    width: 54%;
  }

  76% {
    width: 82%;
  }

  88% {
    width: 84%;
  }

  100% {
    width: 100%;
  }
}

.photo-reveal {
  width: 100%;
}

.photo-fade {
  display: none;
  width: calc(100% + 40px);
  margin-right: -20px;
  margin-left: -20px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.photo-fade::-webkit-scrollbar {
  display: none;
}

.photo-fade .photo-three {
  width: max(100%, 720px);
}

.photo-fade .photo-three img {
  display: block;
  width: 100%;
  max-width: none;
}

.photo-fade.is-looping {
  display: flex;
  animation: fade-in 0.38s ease both;
  will-change: scroll-position;
}

.photo-fade.is-looping .photo-three {
  flex: 0 0 auto;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (min-width: 481px) {
  .photo-fade .photo-three {
    width: max(100%, 900px);
  }
}

.poster-layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  margin-top: 0;
}

#screen-poster {
  margin-top: -48px;
}

#poster-title {
  display: none;
}

.poster-tabs {
  position: fixed;
  top: 30%;
  left: max(0px, calc((100vw - 750px) / 2));
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 46px;
}

.poster-tabs:empty {
  display: none;
}

.poster-tab {
  color: #FFFCF9;
  border: 1px solid #fff;
  width: 46px;
  min-height: 40px;
  margin: 0;
  padding: 6px;
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: #f60000;
  font-size: 12px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.poster-tab.active {
  background: #fff;
  color: #f60000;
}

.poster-preview-wrap {
  flex: 0 1 520px;
  width: 100%;
  min-width: 0;
  margin-right: auto;
  margin-left: auto;
}

#poster-preview {
  display: block;
  width: 100%;
  height: auto;
  -webkit-touch-callout: default;
  user-select: auto;
}

.poster-save-tip {
  margin-top: 0px;
  text-align: center;
}

#poster-next {
  margin-top: 16px;
}

#poster-next[hidden] {
  display: none;
}

#screen-lottery-guide {
  min-height: calc(100vh - 56px);
  background-image: url("../img-live/dec-003.png");
  background-position: center bottom 8px;
  background-repeat: no-repeat;
  background-size: 100%;
  padding-bottom: 160px;
}

#prize-image {
  display: none;
  width: 100%;
  max-height: 420px;
  margin-bottom: 20px;
  object-fit: contain;
}

.hero-media {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  width: calc(100% + 40px);
  margin: 0 -20px;
}

.hero-image {
  display: block;
  width: 100%;
  height: auto;
}

.draw-area {
  position: absolute;
  top: 71.8%;
  left: 37.69%;
  z-index: 4;
  width: 40.64%;
  height: 12.58%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.prize-list-band {
  width: 100vw;
  min-height: calc(100vw * 578 / 780);
  margin-right: calc(50% - 50vw);
  margin-left: calc(50% - 50vw);
  padding: 0 20px 24px;
  background-image: url("../img/bk-redchange.png");
  background-position: top center;
  background-repeat: no-repeat;
  background-size: 100vw auto;
}

.connected-prizes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  width: 100%;
  margin: 0 auto 8px;
  gap: 8px;
}

.prize-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: center;
  padding: 24px;
}

.prize-modal.is-visible {
  display: grid;
}

.prize-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.prize-modal__content {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
}

.prize-modal__content img {
  display: block;
  width: 100%;
  height: auto;
}

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

.connected-prizes {
  display: block;
  width: 100%;
  padding: 0;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
}

.jiangpin-wrap {
  width: 100%;
  padding: 8px;
}

.jiangpin-line01 img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* flex-wrap 而不是固定列数：只有 1 个奖品时（大多数城市）会撑满一整行，跟以前一样；
   奖品多的城市（比如广州）会按 ~3 个一行自动换行，不用按城市区分模板。
   这里只放实体奖品（第 5 个开始），虚拟奖品（优惠券等）另外放 .jiangpin-line03，
   一个占一行，见 js/index.js 的 loadPrizeCatalog() 里按 physical 字段分组 */
.jiangpin-line02 {
  display: flex;
  flex-flow: row wrap;
  gap: 8px;
  margin-top: 8px;
}

.jiangpin-line02[hidden] {
  display: none;
}

.jiangpin-line02 img {
  display: block;
  flex: 1 1 30%;
  min-width: 0;
  height: auto;
  object-fit: contain;
}

/* 虚拟奖品（优惠券等）：跟其他城市的"饮料"一样，一个奖品占一整行 */
.jiangpin-line03 {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.jiangpin-line03[hidden] {
  display: none;
}

.jiangpin-line03 img {
  display: block;
  width: 100%;
  height: auto;
}

.activity-detail-trigger {
  position: fixed;
  top: 20%;
  right: max(0px, calc((100vw - 750px) / 2));
  z-index: 30;
  width: 30px;
  min-height: 112px;
  margin: 0;
  padding: 14px 8px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background: #fff;
  color: #f60000;
  font-size: 12px;
  letter-spacing: 0;
  writing-mode: vertical-rl;
  text-orientation: upright;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.activity-detail-popup {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.activity-detail-popup.is-visible {
  display: flex;
}

.activity-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
}

.activity-detail-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 620px);
  max-height: min(78vh, 680px);
  overflow-y: auto;
  padding: 28px 22px 24px;
  border-radius: 8px;
  background: #fff;
  color: #111;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.activity-detail-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 2;
  width: 26px;
  height: 26px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f60000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
}

.activity-detail-close::before,
.activity-detail-close::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1.5px;
  border-radius: 2px;
  background: #fff;
  content: "";
}

.activity-detail-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.activity-detail-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.activity-detail-panel h2 {
  margin: 0 28px 16px 0;
  color: #111;
  font-size: 20px;
}

.activity-detail-copy {
  color: #111;
  font-size: 14px;
  line-height: 1.7;
  text-align: left;
}

.activity-detail-copy p {
  margin: 0 0 10px;
}

body.is-locked {
  overflow: hidden;
}

.choujiang-start{
  width: 90%;
}

.section-title-small{
  margin-bottom: 12px;
  color: #FFFFFF;
  font-size: 14px;
  line-height: 1;
}

/* ─── 中奖结果页 ───────────────────────────────────────────────── */
.prize-congrats {
  margin-top: 20px;
  color: #fff;
  font-size: 16px;
}

.prize-note {
  width: 84%;
  margin: 16px auto 0;
  color: #fff;
  font-size: 13px;
  line-height: 1.6;
}

/* ─── 实物奖品：工作人员滑动确认已领取 ──────────────────────────── */
.claim-slider {
  width: 84%;
  margin: 20px auto 0;
}

.claim-slider[hidden] {
  display: none;
}

.claim-slider__track {
  position: relative;
  height: 52px;
  border-radius: 26px;
  background: linear-gradient(to bottom, #ff9ada 0%, #5eb6f4 100%);
  box-shadow: 0 -2px 6px #ef91cd, 0 2px 6px #8cbfff;
  overflow: hidden;
  touch-action: none;
}

.claim-slider__fill {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: 0;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.claim-slider__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  pointer-events: none;
}

.claim-slider__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: #fffcf9 url('../img-live/arrow-right.png') no-repeat center / 16px auto;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: grab;
  touch-action: none;
}

.claim-slider__thumb:active {
  cursor: grabbing;
}

.claim-status {
  width: 84%;
  margin: 20px auto 0;
  padding: 14px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

.claim-status[hidden] {
  display: none;
}

/* ─── 虚拟奖品（优惠券等）：点击直接跳转领取链接，不需要工作人员确认 ──────── */
.coupon-claim-button {
  display: block;
  width: 84%;
  margin: 20px auto 0;
  padding: 14px;
  border: none;
  border-radius: 26px;
  background: linear-gradient(to right, #ff9ada 0%, #5eb6f4 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

.coupon-claim-button[hidden] {
  display: none;
}

/* ─── 抽奖中 loading ────────────────────────────────────────────── */
.draw-loading {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.58);
}

.draw-loading.is-visible {
  display: grid;
}

.draw-loading__text {
  min-width: 148px;
  padding: 14px 22px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
}

/* ─── Toast ─────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  z-index: 96;
  padding: 10px 20px;
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
  transition: all 0.3s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.dec0715 img {
    width: 80%;
    margin-top: 20px;
}

.dec0715 {
    width: 100%;
    margin: 0 auto;
}
