:root {
  --theme: #ff5a36;
  --theme-deep: #e93f2b;
  --gold: #ffc84a;
  --gold-deep: #d99314;
  --ink: #2c1d19;
  --muted: #8f7269;
  --paper: #fffaf2;
  --line: rgba(139, 88, 62, .14);
  --shadow: 0 16px 44px rgba(150, 64, 38, .13);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html {
  background: #f6ede3;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 2%, rgba(255, 211, 106, .4), transparent 22rem),
    linear-gradient(180deg, #fff7e9 0, #f8eee5 42%, #f4ebe3 100%);
  overscroll-behavior-y: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 120;
}

.loading-screen {
  align-items: center;
  background: linear-gradient(160deg, #fff9ef 0%, #ffe9d6 55%, #ffd9bf 100%);
  display: flex;
  flex-direction: column;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 200;
  transition: opacity .35s ease, visibility .35s ease;
}

.loading-screen.done {
  opacity: 0;
  visibility: hidden;
}

.loading-mark {
  display: flex;
  gap: 8px;
  margin-bottom: 26px;
}

.loading-mark span {
  align-items: center;
  animation: loadingBounce 1.2s ease-in-out infinite;
  background: linear-gradient(145deg, #ff8e45, var(--theme));
  border: 2px solid #fff;
  border-radius: 16px;
  box-shadow: 0 10px 18px rgba(210, 77, 40, .2);
  color: white;
  display: flex;
  font-size: 25px;
  font-weight: 900;
  height: 50px;
  justify-content: center;
  width: 50px;
}

.loading-mark span:nth-child(2) { animation-delay: .1s; }
.loading-mark span:nth-child(3) { animation-delay: .2s; }
.loading-mark span:nth-child(4) { animation-delay: .3s; }

.loading-screen p {
  color: #a06e5b;
  font-size: 13px;
  margin: 15px 0 0;
}

.loading-dots {
  display: flex;
  gap: 7px;
}

.loading-dots i {
  animation: dotPulse 1s ease-in-out infinite alternate;
  background: var(--theme);
  border-radius: 50%;
  height: 7px;
  opacity: .35;
  width: 7px;
}

.loading-dots i:nth-child(2) { animation-delay: .22s; }
.loading-dots i:nth-child(3) { animation-delay: .44s; }

@keyframes loadingBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes dotPulse {
  from { opacity: .2; transform: scale(.75); }
  to { opacity: 1; transform: scale(1.15); }
}

.app {
  margin: 0 auto;
  max-width: 720px;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

.hero {
  background:
    radial-gradient(circle at 86% 18%, rgba(255, 246, 180, .72), transparent 14rem),
    linear-gradient(155deg, #ff8b42 0%, var(--theme) 48%, #e83238 100%);
  color: white;
  min-height: 386px;
  overflow: hidden;
  padding: calc(22px + var(--safe-top)) 20px 66px;
  position: relative;
}

.hero.has-banner {
  background: #2d1813;
  min-height: 425px;
  padding: 0;
}

.hero-banner {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

.hero.has-banner::after {
  background: linear-gradient(180deg, rgba(37, 12, 7, .05) 12%, rgba(40, 12, 6, .78) 100%);
  content: "";
  inset: 0;
  position: absolute;
}

.hero.has-banner .hero-content {
  padding-top: calc(136px + var(--safe-top));
  position: relative;
  z-index: 2;
}

.hero.has-banner .brand-pill {
  background: rgba(48, 17, 9, .42);
  border-color: rgba(255, 255, 255, .32);
}

.hero-pattern {
  background-image:
    radial-gradient(circle, rgba(255,255,255,.2) 1.2px, transparent 1.5px);
  background-size: 20px 20px;
  inset: 0;
  opacity: .42;
  position: absolute;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.brand-pill {
  align-items: center;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  gap: 7px;
  letter-spacing: .04em;
  padding: 7px 12px;
}

.brand-dot {
  animation: livePulse 1.4s ease-out infinite;
  background: #fff9b6;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(255, 249, 182, .7);
  height: 7px;
  width: 7px;
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 249, 182, .7); }
  75% { box-shadow: 0 0 0 7px rgba(255, 249, 182, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 249, 182, 0); }
}

.hero h1 {
  font-size: clamp(29px, 8.4vw, 44px);
  font-weight: 900;
  letter-spacing: -.035em;
  line-height: 1.14;
  margin: 18px 0 9px;
  max-width: 560px;
  text-shadow: 0 4px 18px rgba(120, 32, 15, .18);
}

.hero > .hero-content > p {
  font-size: 14px;
  margin: 0;
  opacity: .9;
}

.countdown-card {
  backdrop-filter: blur(16px);
  background: rgba(86, 24, 12, .18);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 20px;
  box-shadow: inset 0 1px rgba(255,255,255,.18), 0 16px 30px rgba(101, 28, 12, .12);
  margin-top: 26px;
  padding: 14px 16px 15px;
}

.countdown-label {
  font-size: 12px;
  letter-spacing: .08em;
  margin-bottom: 9px;
  opacity: .85;
}

.countdown-units {
  align-items: center;
  display: flex;
  gap: 10px;
}

.time-unit {
  align-items: baseline;
  display: flex;
  gap: 3px;
}

.time-unit strong {
  font-size: 27px;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  line-height: 1;
}

.time-unit span {
  font-size: 11px;
  opacity: .84;
}

.countdown-units > i {
  font-size: 19px;
  font-style: normal;
  opacity: .45;
}

.popularity {
  align-items: center;
  display: flex;
  font-size: 12px;
  gap: 8px;
  margin-top: 15px;
  opacity: .92;
}

.popularity strong {
  font-size: 15px;
}

.live-dot {
  animation: livePulse 1.4s ease-out infinite;
  background: #bfef8b;
  border-radius: 50%;
  height: 7px;
  width: 7px;
}

.hero-wave {
  background: #f8eee5;
  border-radius: 50% 50% 0 0 / 28px 28px 0 0;
  bottom: -1px;
  height: 32px;
  left: -4%;
  position: absolute;
  width: 108%;
  z-index: 3;
}

.main-content {
  margin-top: -15px;
  padding: 0 14px 36px;
  position: relative;
  z-index: 5;
}

.panel {
  background: rgba(255, 252, 247, .94);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 26px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
  padding: 21px 17px;
  position: relative;
}

.panel::before {
  background: linear-gradient(90deg, transparent, rgba(255, 194, 88, .85), transparent);
  content: "";
  height: 1px;
  left: 22%;
  position: absolute;
  top: 0;
  width: 56%;
}

.section-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.section-heading.compact {
  margin-bottom: 17px;
}

.section-kicker {
  color: var(--theme);
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.section-heading h2 {
  font-size: 20px;
  letter-spacing: -.025em;
  line-height: 1.25;
  margin: 0;
}

.progress-ring {
  align-items: center;
  background: conic-gradient(var(--theme) 0deg, rgba(255, 90, 54, .1) 0deg);
  border-radius: 50%;
  display: flex;
  height: 54px;
  justify-content: center;
  position: relative;
  transition: background .4s ease;
  width: 54px;
}

.progress-ring::after {
  background: #fffaf4;
  border-radius: 50%;
  content: "";
  height: 43px;
  position: absolute;
  width: 43px;
}

.progress-ring strong {
  font-size: 12px;
  position: relative;
  z-index: 1;
}

.progress-track {
  background: #f1e5db;
  border-radius: 999px;
  height: 6px;
  margin-bottom: 19px;
  overflow: hidden;
}

.progress-track i {
  background: linear-gradient(90deg, #ffae42, var(--theme));
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width .6s cubic-bezier(.34, 1.56, .64, 1);
  width: 0;
}

.letter-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
  perspective: 900px;
}

.letter-card {
  aspect-ratio: .78;
  background: transparent;
  border: 0;
  min-width: 0;
  padding: 0;
  position: relative;
  transform-style: preserve-3d;
}

.share-guide-steps {
  color: #6d5548;
  counter-reset: step;
  font-size: 13px;
  line-height: 1.9;
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.share-guide-steps li {
  counter-increment: step;
  padding-left: 30px;
  position: relative;
}

.share-guide-steps li::before {
  align-items: center;
  background: #ffe6d2;
  border-radius: 50%;
  color: #d8562c;
  content: counter(step);
  display: flex;
  font-size: 11px;
  font-weight: 700;
  height: 20px;
  justify-content: center;
  left: 0;
  position: absolute;
  top: 3px;
  width: 20px;
}

.share-guide-menu {
  background: #3f2b22;
  border-radius: 6px;
  color: #fff;
  display: inline-block;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1;
  padding: 3px 7px;
}

.share-guide-status {
  background: #f6efe8;
  border-radius: 12px;
  color: #8a6d5d;
  font-size: 12px;
  line-height: 1.6;
  margin-top: 16px;
  padding: 10px 12px;
  text-align: center;
}

.share-guide-status.ok {
  background: #e6f7ec;
  color: #1f8a4c;
}

.share-guide-status.warn {
  background: #fdeceb;
  color: #c03a2b;
}

.letter-count {
  align-items: center;
  background: linear-gradient(145deg, #ff8a3d, #ff4d2e);
  border: 2px solid #fffaf4;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(214, 74, 32, .34);
  color: #fff;
  display: flex;
  font-size: 11px;
  font-weight: 700;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1;
  min-width: 22px;
  padding: 0 5px;
  height: 20px;
  position: absolute;
  right: -5px;
  top: -5px;
  z-index: 3;
}

.letter-card-inner {
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform .65s cubic-bezier(.22, .8, .3, 1.1);
  width: 100%;
}

.letter-card.owned .letter-card-inner {
  animation: cardUnlock .65s cubic-bezier(.2, .85, .25, 1.25) both;
}

@keyframes cardUnlock {
  0% { transform: rotateY(180deg) scale(.9); }
  65% { transform: rotateY(198deg) scale(1.06); }
  100% { transform: rotateY(180deg) scale(1); }
}

.letter-face {
  backface-visibility: hidden;
  border-radius: 17px;
  height: 100%;
  inset: 0;
  overflow: hidden;
  position: absolute;
  width: 100%;
}

.letter-front {
  align-items: center;
  background:
    linear-gradient(145deg, rgba(255,255,255,.28), transparent 30%),
    linear-gradient(145deg, #d8c6b8, #c6aea0);
  border: 1px solid rgba(255,255,255,.6);
  box-shadow: inset 0 -8px 16px rgba(95, 58, 42, .08), 0 8px 16px rgba(98, 60, 41, .1);
  color: rgba(255,255,255,.85);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.letter-front::before {
  background-image: radial-gradient(rgba(255,255,255,.38) 1px, transparent 1px);
  background-size: 10px 10px;
  content: "";
  inset: 0;
  opacity: .45;
  position: absolute;
}

.letter-front span {
  font-size: 22px;
  font-weight: 900;
  position: relative;
  text-shadow: 0 2px 8px rgba(100, 55, 37, .16);
  z-index: 1;
}

.letter-front small {
  font-size: 8px;
  letter-spacing: .1em;
  margin-top: 3px;
  opacity: .75;
  position: relative;
  z-index: 1;
}

.letter-back {
  align-items: center;
  background:
    linear-gradient(145deg, rgba(255,255,255,.42), transparent 30%),
    linear-gradient(145deg, #ffd867 0%, #f6a72e 58%, #e1721c 100%);
  border: 2px solid rgba(255,255,255,.8);
  box-shadow: inset 0 0 0 3px rgba(194, 103, 15, .12), 0 10px 20px rgba(203, 93, 18, .22);
  color: #7b2b12;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform: rotateY(180deg);
}

.letter-back::before,
.letter-back::after {
  border: 1px solid rgba(139, 67, 15, .18);
  border-radius: 12px;
  content: "";
  inset: 5px;
  position: absolute;
}

.letter-back::after {
  border-radius: 50%;
  inset: auto auto -24px -24px;
  height: 52px;
  width: 52px;
}

.letter-back strong {
  font-size: clamp(31px, 10vw, 48px);
  font-weight: 900;
  line-height: 1;
  position: relative;
  text-shadow: 0 2px 0 rgba(255,255,255,.45);
  z-index: 1;
}

.letter-card.owned .letter-front,
.letter-card.owned .letter-back {
  display: block;
}

.letter-card .letter-back {
  display: none;
}

.letter-card.owned .letter-back {
  display: flex;
}

.letter-owned-mark {
  background: rgba(255,255,255,.76);
  border-radius: 999px;
  bottom: 5px;
  color: #9a4c1e;
  font-size: 7px;
  padding: 2px 5px;
  position: absolute;
  right: 5px;
  z-index: 2;
}

.draw-zone {
  border-top: 1px dashed var(--line);
  padding-top: 17px;
}

.quota-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.quota-row > span {
  color: var(--muted);
  font-size: 13px;
}

.quota-row strong {
  color: var(--theme);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.text-button {
  background: none;
  border: 0;
  color: var(--theme);
  font-size: 12px;
  padding: 4px;
}

.primary-button {
  background: linear-gradient(135deg, #ff9a3c 0%, #ff5b36 48%, #ee3738 100%);
  border: 0;
  border-radius: 18px;
  box-shadow: 0 13px 25px rgba(230, 70, 42, .27), inset 0 1px rgba(255,255,255,.45);
  color: #fff;
  display: flex;
  flex-direction: column;
  font-size: 19px;
  font-weight: 800;
  min-height: 60px;
  overflow: hidden;
  padding: 8px 20px;
  position: relative;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
  width: 100%;
}

.primary-button small {
  font-size: 10px;
  font-weight: 500;
  margin-top: 5px;
  opacity: .82;
}

.primary-button:active {
  box-shadow: 0 6px 14px rgba(230, 70, 42, .25);
  transform: scale(.985);
}

.primary-button:disabled {
  filter: grayscale(.72);
  opacity: .72;
}

.primary-button.share-state {
  background: linear-gradient(135deg, #ffb536, #f28421);
}

.primary-button.exchange-state {
  background: linear-gradient(135deg, #ffcf4a, #f59a24);
  color: #71300d;
}

.button-shine {
  animation: shineSweep 2.7s ease-in-out infinite;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.48) 48%, transparent 64%);
  inset: 0;
  position: absolute;
  transform: translateX(-100%);
}

@keyframes shineSweep {
  0%, 55% { transform: translateX(-100%); }
  80%, 100% { transform: translateX(100%); }
}

.primary-button > span, .primary-button > small {
  position: relative;
  z-index: 1;
}

.state-hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  margin: 10px 0 0;
  text-align: center;
}

.soft-badge {
  background: #fff0dd;
  border: 1px solid #ffe1bb;
  border-radius: 999px;
  color: #b96822;
  font-size: 11px;
  padding: 6px 10px;
}

.prize-list {
  display: grid;
  gap: 12px;
  grid-auto-columns: minmax(235px, 78%);
  grid-auto-flow: column;
  margin: 0 -17px;
  overflow-x: auto;
  padding: 1px 17px 9px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.prize-list::-webkit-scrollbar {
  display: none;
}

.prize-card {
  background: linear-gradient(145deg, #fff, #fff6e8);
  border: 1px solid #f3dfcc;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(118, 67, 42, .08);
  overflow: hidden;
  scroll-snap-align: start;
  transition: transform .18s ease;
}

.prize-card:active {
  transform: scale(.985);
}

.prize-image {
  align-items: center;
  background:
    radial-gradient(circle at 75% 18%, rgba(255,255,255,.75), transparent 32%),
    linear-gradient(145deg, #ffd26f, #ff8861);
  color: rgba(120, 50, 20, .75);
  display: flex;
  font-size: 25px;
  font-weight: 900;
  height: 116px;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.prize-image img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.prize-state {
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,.82);
  border-radius: 999px;
  color: #a24c21;
  font-size: 10px;
  font-weight: 700;
  padding: 5px 8px;
  position: absolute;
  right: 10px;
  top: 10px;
}

.prize-state.available {
  background: #fff4cf;
  color: #ad5d00;
}

.prize-state.sold_out,
.prize-state.redeemed,
.prize-state.quota_used,
.prize-state.offline,
.prize-state.expired {
  background: rgba(71, 55, 49, .75);
  color: white;
}

.prize-body {
  padding: 14px;
}

.prize-name {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 10px;
}

.prize-meta {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
}

.prize-value {
  color: var(--theme);
  font-size: 18px;
  font-weight: 900;
}

.prize-value small {
  font-size: 11px;
}

.prize-stock {
  color: var(--muted);
  font-size: 11px;
}

.prize-tap {
  align-items: center;
  color: #b16e42;
  display: flex;
  font-size: 11px;
  gap: 5px;
  margin-top: 12px;
}

.prize-tap::after {
  content: "›";
  font-size: 18px;
  line-height: 1;
}

.rules-content {
  color: #644b42;
  font-size: 13px;
  line-height: 1.82;
}

.rule-block {
  border-bottom: 1px dashed var(--line);
  margin-bottom: 14px;
  padding-bottom: 13px;
}

.rule-block:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.rule-block h3 {
  color: var(--ink);
  font-size: 14px;
  margin: 0 0 7px;
}

.rule-block p {
  margin: 0;
  white-space: pre-wrap;
}

.customer-service {
  background: #fff2df;
  border-radius: 14px;
  color: #9a572d;
  font-size: 12px;
  line-height: 1.6;
  margin-top: 15px;
  padding: 11px 13px;
}

.organizer-info {
  border-top: 1px dashed #f0dccb;
  color: #a3887a;
  font-size: 11px;
  line-height: 1.8;
  margin-top: 16px;
  padding-top: 12px;
  word-break: break-all;
}

.organizer-info strong {
  color: #8a6d5d;
  font-weight: 600;
}

.page-footer {
  color: #b09588;
  font-size: 10px;
  padding: 0 20px calc(28px + var(--safe-bottom));
  text-align: center;
}

body.modal-open {
  overflow: hidden;
}

.modal-mask {
  align-items: center;
  animation: fadeIn .2s ease both;
  background: rgba(37, 19, 13, .62);
  display: flex;
  height: 100vh;
  /* 微信内置浏览器工具栏会算进 100vh，用 dvh 让弹窗真正垂直居中 */
  height: 100dvh;
  inset: 0;
  justify-content: center;
  padding: 22px;
  padding-bottom: calc(22px + env(safe-area-inset-bottom));
  position: fixed;
  z-index: 140;
}

.modal-sheet {
  animation: modalIn .3s cubic-bezier(.2, .9, .3, 1.15) both;
  margin: auto;
  background: #fffaf4;
  border-radius: 26px;
  box-shadow: 0 28px 70px rgba(31, 13, 8, .28);
  max-height: min(88vh, 760px);
  max-width: 430px;
  overflow: auto;
  padding: 24px 20px 20px;
  position: relative;
  width: 100%;
}

.modal-sheet.wide {
  max-width: 560px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  align-items: center;
  background: #f4e9df;
  border: 0;
  border-radius: 50%;
  color: #8d6a5d;
  display: flex;
  font-size: 19px;
  height: 32px;
  justify-content: center;
  position: absolute;
  right: 14px;
  top: 14px;
  width: 32px;
  z-index: 2;
}

.modal-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.02em;
  margin: 0 34px 8px 0;
}

.modal-subtitle {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  margin: 0;
}

.reveal-stage {
  align-items: center;
  display: flex;
  height: 248px;
  justify-content: center;
  margin: 12px 0 0;
  perspective: 1000px;
}

.reveal-card {
  height: 192px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform .8s cubic-bezier(.2, .8, .25, 1.15);
  width: 148px;
}

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

.reveal-face {
  backface-visibility: hidden;
  border-radius: 22px;
  height: 100%;
  inset: 0;
  overflow: hidden;
  position: absolute;
  width: 100%;
}

.reveal-front {
  align-items: center;
  background:
    radial-gradient(circle, rgba(255,255,255,.32) 1px, transparent 1px) 0 0 / 12px 12px,
    linear-gradient(145deg, #f8bf51, #ef7b2a 62%, #d95431);
  border: 3px solid rgba(255,255,255,.88);
  box-shadow: 0 20px 38px rgba(182, 80, 22, .27), inset 0 0 0 5px rgba(138, 54, 15, .1);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.reveal-front strong {
  font-size: 48px;
  line-height: 1;
  text-shadow: 0 4px 10px rgba(114, 45, 13, .24);
}

.reveal-front small {
  font-size: 11px;
  letter-spacing: .16em;
  margin-top: 12px;
  opacity: .9;
}

.reveal-back {
  align-items: center;
  background:
    linear-gradient(145deg, rgba(255,255,255,.5), transparent 32%),
    linear-gradient(145deg, #fff2ad, #ffc447 60%, #f18b25);
  border: 3px solid #fff;
  box-shadow: 0 20px 38px rgba(182, 80, 22, .27), inset 0 0 0 6px rgba(176, 87, 14, .12);
  color: #793311;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform: rotateY(180deg);
}

.reveal-back strong {
  font-size: 76px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 3px 0 rgba(255,255,255,.55);
}

.reveal-back small {
  background: rgba(255,255,255,.72);
  border-radius: 999px;
  font-size: 10px;
  margin-top: 15px;
  padding: 5px 10px;
}

.reveal-status {
  color: var(--muted);
  font-size: 13px;
  min-height: 22px;
  text-align: center;
}

.reveal-status.success {
  color: var(--theme);
  font-weight: 800;
}

.reveal-status.repeat {
  color: #ac765d;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.modal-button {
  background: linear-gradient(135deg, #ff8d3b, var(--theme));
  border: 0;
  border-radius: 15px;
  color: white;
  flex: 1;
  font-size: 15px;
  font-weight: 800;
  min-height: 50px;
  padding: 10px 14px;
}

.modal-button.secondary {
  background: #f3e8de;
  color: #7e5d50;
}

.modal-button:disabled {
  filter: grayscale(.7);
  opacity: .65;
}

.reveal-result-actions {
  display: none;
}

/* 必须用 flex，覆盖 display:block 会让按钮退回 inline-block，导致宽度与高度错位 */
.reveal-result-actions.show {
  align-items: stretch;
  display: flex;
}

.share-options {
  display: grid;
  gap: 11px;
  margin-top: 20px;
}

.share-option {
  align-items: center;
  background: white;
  border: 1px solid #f0dfd1;
  border-radius: 18px;
  display: flex;
  gap: 13px;
  padding: 13px;
  text-align: left;
  width: 100%;
}

.share-option:active {
  background: #fff5e9;
  transform: scale(.99);
}

.share-icon {
  align-items: center;
  background: linear-gradient(145deg, #72d572, #22ac4c);
  border-radius: 15px;
  color: white;
  display: flex;
  flex: 0 0 auto;
  font-size: 22px;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.share-option.moments .share-icon {
  background: linear-gradient(145deg, #ffac5d, #f06d1e);
}

.share-option-copy {
  flex: 1;
  min-width: 0;
}

.share-option-copy strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.share-option-copy small {
  color: var(--muted);
  font-size: 11px;
}

.share-reward {
  color: var(--theme);
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.share-note {
  background: #f7eee7;
  border-radius: 14px;
  color: #967466;
  font-size: 11px;
  line-height: 1.65;
  margin-top: 15px;
  padding: 11px 12px;
}

.prize-detail-image {
  align-items: center;
  background: linear-gradient(145deg, #ffd576, #ff9562);
  border-radius: 20px;
  display: flex;
  font-size: 38px;
  height: 180px;
  justify-content: center;
  margin-bottom: 18px;
  overflow: hidden;
}

.prize-detail-image img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.detail-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin: 17px 0;
}

.detail-item {
  background: #f8eee6;
  border-radius: 14px;
  padding: 11px 12px;
}

.detail-item span {
  color: var(--muted);
  display: block;
  font-size: 10px;
  margin-bottom: 5px;
}

.detail-item strong {
  font-size: 13px;
}

.detail-section {
  border-top: 1px dashed var(--line);
  margin-top: 14px;
  padding-top: 13px;
}

.detail-section h3 {
  font-size: 13px;
  margin: 0 0 7px;
}

.detail-section p {
  color: #755a50;
  font-size: 12px;
  line-height: 1.7;
  margin: 0;
  white-space: pre-wrap;
}

.redeem-code {
  background: #2e1a13;
  border-radius: 16px;
  color: white;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: .12em;
  margin: 16px 0;
  padding: 17px;
  text-align: center;
}

.toast-root {
  display: flex;
  flex-direction: column;
  gap: 8px;
  left: 50%;
  pointer-events: none;
  position: fixed;
  top: calc(24px + var(--safe-top));
  transform: translateX(-50%);
  width: min(88vw, 420px);
  z-index: 220;
}

.toast {
  animation: toastIn .28s ease both;
  backdrop-filter: blur(12px);
  background: rgba(49, 28, 21, .88);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(32, 15, 10, .2);
  color: white;
  font-size: 13px;
  line-height: 1.45;
  padding: 11px 14px;
  text-align: center;
}

.toast.success {
  background: rgba(228, 73, 42, .93);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-8px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.empty-state {
  color: var(--muted);
  font-size: 12px;
  padding: 24px;
  text-align: center;
  width: 100%;
}

@media (min-width: 600px) {
  .main-content {
    padding-left: 18px;
    padding-right: 18px;
  }

  .panel {
    padding: 25px 22px;
  }

  .letter-grid {
    gap: 14px;
  }

  .prize-list {
    grid-auto-columns: minmax(250px, 46%);
    margin-left: -22px;
    margin-right: -22px;
    padding-left: 22px;
    padding-right: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- 奖品集字条件 ---------- */
.prize-requirement {
  align-items: center;
  background: #f7f4ef;
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: space-between;
  margin: 8px 0 10px;
  padding: 7px 10px;
}
.prize-requirement span { color: #6d655c; font-size: 11px; font-weight: 700; }
.prize-requirement em { color: #c74a31; font-size: 10px; font-style: normal; font-weight: 700; }
.prize-requirement em.locked { color: #a09990; }
.prize-requirement.unlocked { background: rgba(255, 90, 54, .1); }
.prize-requirement.unlocked span,
.prize-requirement.unlocked em { color: var(--theme, #ff5a36); }

/* ---------- 头部礼品中心入口 ---------- */
.hero-topline {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.gift-entry {
  align-items: center;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, .2);
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  flex: none;
  font-size: 12px;
  font-weight: 700;
  gap: 5px;
  padding: 6px 11px 6px 8px;
  position: relative;
  transition: transform .16s ease, background .16s ease;
}

.gift-entry:active {
  background: rgba(255, 255, 255, .32);
  transform: scale(.95);
}

.gift-entry-icon {
  font-size: 14px;
  line-height: 1;
}

.gift-entry-badge {
  align-items: center;
  background: #fff3b0;
  border-radius: 999px;
  color: #a2431a;
  display: flex;
  font-size: 10px;
  font-weight: 900;
  height: 16px;
  justify-content: center;
  min-width: 16px;
  padding: 0 4px;
  position: absolute;
  right: -4px;
  top: -6px;
}

/* ---------- 奖品区标题操作 ---------- */
.section-heading-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  justify-content: flex-end;
}

.ghost-button {
  background: #fff4e4;
  border: 1px solid #ffdcb4;
  border-radius: 999px;
  color: #b96822;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 11px;
  transition: transform .16s ease;
  white-space: nowrap;
}

.ghost-button:active {
  transform: scale(.95);
}

/* ---------- 礼品中心 ---------- */
.gift-sheet {
  padding-top: 22px;
}

.gift-sheet-head {
  margin-bottom: 14px;
  padding-right: 42px;
}

.gift-sheet-head .modal-title {
  margin: 2px 0 6px;
}

.gift-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gift-card {
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 15px;
}

.gift-card.verified {
  background: #f6fbf5;
  border-color: rgba(78, 158, 92, .22);
}

.gift-card.expired,
.gift-card.cancelled {
  opacity: .76;
}

.gift-card-head {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.gift-card-title h3 {
  font-size: 15px;
  margin: 0 0 4px;
}

.gift-card-time {
  color: var(--muted);
  font-size: 10px;
}

.gift-status {
  border-radius: 999px;
  flex: none;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 9px;
}

.gift-status.pending {
  background: #fff1d8;
  color: #bd6a13;
}

.gift-status.verified {
  background: #e3f6e6;
  color: #2f8340;
}

.gift-status.expired,
.gift-status.cancelled {
  background: #f0eae5;
  color: #8b7367;
}

.gift-qr {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 14px 0 12px;
}

.gift-qr-canvas {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(150, 64, 38, .08);
  padding: 10px;
  width: 168px;
}

.gift-qr-canvas svg {
  display: block;
  height: auto;
  width: 100%;
}

.gift-qr-fallback {
  color: var(--muted);
  font-size: 11px;
  padding: 46px 6px;
  text-align: center;
}

.gift-qr-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  letter-spacing: .14em;
}

.gift-qr-tip {
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.detail-grid.compact {
  margin: 10px 0;
}

.gift-reminder {
  color: #b96822;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.5;
  margin: 12px 0 9px;
  text-align: center;
}

.gift-verify-button {
  min-height: 46px;
  width: 100%;
}

.share-note.warning {
  background: #fff2e3;
  color: #a85f1c;
}

.redeem-code.compact {
  font-size: 17px;
  margin: 14px 0;
  padding: 13px;
}

.gift-empty {
  padding: 26px 10px;
}

.gift-empty-tip {
  color: var(--muted);
  font-size: 11px;
  margin-top: 6px;
}
