:root {
  color-scheme: light;
  --paper: #f8ecd9;
  --paper-light: #fff8ea;
  --paper-deep: #ead5b7;
  --forest: #244d36;
  --forest-dark: #173d2b;
  --forest-soft: #4d7555;
  --berry: #a33f35;
  --berry-dark: #7f2e2b;
  --gold: #d59a31;
  --ink: #3e2c20;
  --muted: #806c59;
  --line: rgba(111, 75, 42, 0.2);
  --shadow: 0 18px 55px rgba(73, 49, 29, 0.2);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: #efe1ca;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 14%, rgba(255, 251, 238, 0.92), transparent 27%),
    radial-gradient(circle at 86% 22%, rgba(255, 248, 230, 0.88), transparent 25%),
    linear-gradient(180deg, #f5e9d6 0%, #ead8bd 100%);
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  opacity: 0.11;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='180' height='180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.74' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.3'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.winter-corner {
  position: fixed;
  z-index: 0;
  top: 0;
  width: min(34vw, 430px);
  height: 170px;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 12% 6%, #fff 0 11%, transparent 12%),
    radial-gradient(ellipse at 30% 8%, #f9f5e8 0 12%, transparent 13%),
    linear-gradient(154deg, transparent 35%, #34543a 36% 40%, transparent 41%),
    linear-gradient(166deg, transparent 40%, #52714c 41% 44%, transparent 45%),
    linear-gradient(12deg, transparent 55%, #2f5037 56% 60%, transparent 61%);
  filter: drop-shadow(0 6px 5px rgba(74, 76, 53, 0.15));
}

.winter-corner-left {
  left: 0;
}

.winter-corner-right {
  right: 0;
  transform: scaleX(-1);
}

.campaign-heading {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100% - 40px));
  margin: 14px auto 18px;
  text-align: center;
}

.ribbon-title {
  position: relative;
  min-height: 60px;
  display: grid;
  place-items: center;
  padding: 8px 70px 13px;
  color: var(--forest-dark);
  font-family: inherit;
  font-size: clamp(27px, 3vw, 42px);
  letter-spacing: 0.08em;
  background:
    linear-gradient(100deg, transparent 0 6%, #eacb9a 7% 14%, #f7dfb4 15% 85%, #eacb9a 86% 93%, transparent 94%),
    linear-gradient(#fff4d4, #eac38e);
  clip-path: polygon(0 20%, 9% 20%, 12% 5%, 19% 17%, 81% 17%, 88% 5%, 91% 20%, 100% 20%, 94% 55%, 100% 82%, 78% 82%, 75% 100%, 25% 100%, 22% 82%, 0 82%, 6% 55%);
  filter: drop-shadow(0 5px 6px rgba(111, 69, 31, 0.18));
}

.ribbon-title::after {
  display: none;
}

.title-bow {
  position: relative;
  z-index: 2;
  width: 72px;
  height: 28px;
  display: block;
  margin: -10px auto -2px;
  background: var(--berry);
  clip-path: polygon(48% 40%, 8% 10%, 0 52%, 39% 70%, 29% 100%, 50% 74%, 71% 100%, 61% 70%, 100% 52%, 92% 10%, 52% 40%, 50% 0%);
  filter: drop-shadow(0 3px 2px rgba(83, 35, 30, 0.2));
}

.campaign-heading p {
  margin: 8px 0 0;
  color: #6f3b2d;
  font-family: inherit;
  font-size: 20px;
  letter-spacing: 0.1em;
}

.campaign-heading i {
  padding: 0 12px;
  color: var(--gold);
  font-style: normal;
}

.phone-shell {
  position: relative;
  z-index: 2;
  width: min(460px, calc(100% - 28px));
  min-height: 760px;
  margin: 0 auto;
  overflow: hidden;
  border: 6px solid rgba(255, 250, 237, 0.9);
  border-radius: 36px;
  background:
    linear-gradient(rgba(255, 249, 236, 0.9), rgba(249, 236, 215, 0.94)),
    var(--paper);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(126, 86, 50, 0.15);
}

.phone-shell::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: "";
  opacity: 0.09;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='p'%3E%3CfeTurbulence baseFrequency='.55' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.app-header {
  position: relative;
  z-index: 5;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  color: #fff7e5;
  background: linear-gradient(145deg, #244e36, #173b2a);
  box-shadow: inset 0 -1px rgba(255, 255, 255, 0.08);
}

.app-header::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 14px;
  content: "";
  background: radial-gradient(ellipse at 50% 0, var(--forest-dark) 0 45%, transparent 47%) 0 0 / 28px 14px repeat-x;
  opacity: 0.96;
}

.header-icon {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 246, 222, 0.24);
  border-radius: 50%;
  color: #fff4d9;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 27px;
  transition: 180ms ease;
}

.header-icon:disabled {
  opacity: 0.24;
  cursor: default;
}

.header-icon:not(:disabled):hover,
.header-icon[aria-pressed="true"] {
  border-color: rgba(255, 219, 139, 0.65);
  background: rgba(216, 163, 58, 0.17);
}

.music-toggle {
  font-size: 16px;
}

.music-toggle[aria-pressed="true"] span {
  animation: note-float 1.35s ease-in-out infinite;
}

@keyframes note-float {
  50% { transform: translateY(-3px) rotate(7deg); }
}

.mini-brand {
  display: grid;
  gap: 2px;
  text-align: center;
}

.mini-brand span {
  color: rgba(255, 244, 218, 0.56);
  font-size: 7px;
  letter-spacing: 0.24em;
}

.mini-brand strong {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.13em;
}

.step-nav {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 17px 6px;
}

.step-dot {
  min-width: 49px;
  display: grid;
  gap: 2px;
  justify-items: center;
  padding: 0;
  border: 0;
  color: #9b8268;
  background: transparent;
  cursor: pointer;
}

.step-dot b {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(101, 73, 46, 0.22);
  border-radius: 50%;
  background: rgba(255, 251, 238, 0.7);
  font-size: 8px;
}

.step-dot span {
  font-size: 9px;
}

.step-dot.active,
.step-dot.done {
  color: var(--forest);
}

.step-dot.active b {
  border-color: var(--forest);
  color: #fff9e8;
  background: var(--forest);
  box-shadow: 0 0 0 3px rgba(45, 86, 58, 0.1);
}

.step-dot.done b {
  border-color: rgba(43, 82, 56, 0.45);
  background: rgba(55, 98, 66, 0.1);
}

.step-line {
  width: 38px;
  height: 1px;
  margin: -12px -5px 0;
  background: rgba(111, 76, 46, 0.2);
}

.app-screen {
  position: relative;
  z-index: 2;
  padding: 6px 14px 22px;
  animation: screen-in 430ms var(--ease) both;
}

.app-screen[hidden] {
  display: none !important;
}

@keyframes screen-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

.screen-title {
  position: relative;
  min-height: 82px;
  display: grid;
  place-items: center;
  padding: 3px 45px 7px;
  text-align: center;
}

.screen-title h1 {
  margin: 0;
  color: var(--berry-dark);
  font-family: inherit;
  font-size: clamp(27px, 7.2vw, 34px);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: 0.02em;
}

.title-spark,
.title-rays {
  position: absolute;
  color: var(--gold);
  font-family: serif;
}

.title-spark {
  top: 17px;
  left: 38px;
  font-size: 19px;
}

.title-rays {
  right: 24px;
  bottom: 16px;
  font-size: 24px;
  transform: rotate(-25deg);
}

.compact-title {
  min-height: 62px;
  padding-inline: 25px;
}

.compact-title h1 {
  font-size: clamp(27px, 7vw, 34px);
}

.tree-scene,
.final-tree-scene {
  position: relative;
  width: 100%;
  height: 382px;
  overflow: hidden;
  border: 1px solid rgba(91, 74, 49, 0.12);
  border-radius: 26px 26px 12px 12px;
  background: #dfe4d2;
  box-shadow: inset 0 0 35px rgba(42, 76, 50, 0.09), 0 8px 24px rgba(87, 59, 35, 0.09);
}

#treeCanvas,
#finalTreeCanvas,
.tree-ornaments,
.final-ornaments {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.tree-ornaments,
.final-ornaments {
  z-index: 2;
  pointer-events: none;
}

.tree-ornament {
  position: absolute;
  width: var(--size, 30px);
  height: calc(var(--size, 30px) * 1.12);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
  transform: translate(-50%, -50%) rotate(var(--rotation, 0deg));
  transform-origin: 50% 4%;
  filter: drop-shadow(0 4px 3px rgba(57, 36, 21, 0.35));
  animation: ornament-sway 4.8s ease-in-out infinite alternate;
}

.tree-ornament::before {
  position: absolute;
  top: -10px;
  left: 50%;
  width: 1px;
  height: 12px;
  content: "";
  background: rgba(194, 151, 63, 0.8);
}

.tree-ornament svg,
.decoration-option svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.tree-ornament.selected {
  z-index: 8;
  filter: drop-shadow(0 0 8px rgba(255, 211, 102, 0.9));
  scale: 1.16;
}

.tree-ornament.selected::after {
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  width: max-content;
  padding: 4px 7px;
  border: 1px solid rgba(107, 72, 40, .18);
  border-radius: 999px;
  color: #5d422d;
  content: "双击删除";
  background: rgba(255, 245, 218, .94);
  box-shadow: 0 4px 10px rgba(57, 36, 21, .18);
  font-size: 9px;
  line-height: 1;
  transform: translateX(-50%);
}

.tree-ornament.dragging {
  z-index: 10;
  cursor: grabbing;
  animation: none;
  scale: 1.18;
}

@keyframes ornament-sway {
  from { transform: translate(-50%, -50%) rotate(calc(var(--rotation, 0deg) - 1.5deg)); }
  to { transform: translate(-50%, -50%) rotate(calc(var(--rotation, 0deg) + 1.5deg)); }
}

.tree-photo-placeholder {
  position: absolute;
  z-index: 3;
  top: 44%;
  left: 51%;
  width: 61px;
  height: 74px;
  display: grid;
  place-items: center;
  padding: 5px;
  overflow: hidden;
  border: 5px solid #fff4d9;
  border-radius: 4px;
  color: #8a725b;
  background: linear-gradient(150deg, #e9dfc8, #c9c7b2);
  box-shadow: 0 5px 9px rgba(56, 39, 24, 0.28);
  cursor: pointer;
  transform: translate(-50%, -50%) rotate(-3deg);
}

.tree-photo-placeholder::before {
  position: absolute;
  top: -16px;
  left: 50%;
  width: 1px;
  height: 18px;
  content: "";
  background: #b98d3c;
}

.tree-photo-placeholder img {
  width: calc(100% + 10px);
  height: calc(100% + 10px);
  object-fit: cover;
}

.tree-photo-placeholder span {
  font-size: 24px;
}

.placement-tip {
  position: absolute;
  z-index: 7;
  right: 12px;
  bottom: 12px;
  padding: 7px 10px;
  border: 1px solid rgba(80, 67, 44, 0.16);
  border-radius: 999px;
  color: rgba(62, 49, 35, 0.7);
  background: rgba(255, 247, 226, 0.82);
  backdrop-filter: blur(8px);
  font-size: 10px;
  box-shadow: 0 4px 12px rgba(78, 55, 32, 0.1);
  transition: 220ms ease;
}

.tree-scene.placement-ready {
  cursor: crosshair;
}

.tree-scene.placement-ready .placement-tip {
  color: #fff9e7;
  background: rgba(38, 79, 53, 0.9);
}

.paper-section {
  margin-top: 12px;
}

.paper-section h2,
.interaction-card h2 {
  margin: 0 0 8px 4px;
  color: #59402c;
  font-size: 13px;
  font-weight: 600;
}

.paper-section h2 small,
.interaction-card h2 small {
  color: #9a8168;
  font-size: 8px;
  font-weight: 400;
}

.tree-style-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tree-style {
  position: relative;
  min-height: 92px;
  display: grid;
  gap: 3px;
  place-items: center;
  padding: 7px 4px 6px;
  border: 1px solid rgba(104, 73, 42, 0.16);
  border-radius: 12px;
  color: #6a523d;
  background: rgba(255, 250, 236, 0.62);
  cursor: pointer;
  transition: 180ms ease;
}

.tree-style:hover,
.tree-style.active {
  border-color: var(--forest);
  background: rgba(250, 245, 226, 0.92);
  box-shadow: inset 0 0 0 1px rgba(35, 79, 52, 0.12);
}

.tree-style b {
  font-size: 11px;
  font-weight: 500;
}

.tree-style i {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 18px;
  height: 18px;
  display: none;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--forest);
  font-size: 10px;
  font-style: normal;
}

.tree-style.active i {
  display: grid;
}

.mini-tree {
  position: relative;
  width: 55px;
  height: 58px;
  display: block;
  border-radius: 48% 48% 20% 20%;
  background:
    radial-gradient(circle at 30% 34%, #efc552 0 2px, transparent 3px),
    radial-gradient(circle at 67% 58%, #a63e36 0 3px, transparent 4px),
    radial-gradient(circle at 48% 71%, #f3d47b 0 2px, transparent 3px),
    conic-gradient(from -40deg at 50% 10%, transparent 0 17%, var(--tree-main) 18% 82%, transparent 83%);
  filter: drop-shadow(0 4px 3px rgba(49, 38, 26, 0.18));
}

.mini-tree::before {
  position: absolute;
  top: -3px;
  left: 50%;
  color: #d8a33c;
  content: "★";
  font-size: 14px;
  transform: translateX(-50%);
}

.mini-tree::after {
  position: absolute;
  right: 9px;
  bottom: 6px;
  left: 9px;
  height: 10px;
  content: "";
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
}

.classic-tree { --tree-main: #2e6544; }
.cream-tree { --tree-main: #e8dfc3; }
.berry-tree { --tree-main: #9e413a; }

.decoration-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.decoration-option {
  min-height: 70px;
  display: grid;
  gap: 2px;
  place-items: center;
  padding: 7px 4px 5px;
  border: 1px solid rgba(105, 73, 42, 0.15);
  border-radius: 11px;
  color: #66503d;
  background: rgba(255, 250, 237, 0.68);
  cursor: grab;
  transition: 180ms var(--ease);
}

.decoration-option svg {
  width: 35px;
  height: 39px;
  filter: drop-shadow(0 3px 2px rgba(64, 40, 23, 0.2));
}

.decoration-option span {
  font-size: 10px;
}

.decoration-option:hover,
.decoration-option.active {
  border-color: rgba(42, 83, 55, 0.68);
  background: rgba(242, 237, 214, 0.96);
  transform: translateY(-2px);
}

.music-card {
  width: 100%;
  min-height: 47px;
  display: grid;
  grid-template-columns: 34px 1fr 28px;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  padding: 5px 9px;
  border: 1px solid rgba(105, 73, 42, 0.18);
  border-radius: 12px;
  color: #4d3b2d;
  text-align: left;
  background: rgba(255, 250, 237, 0.78);
  cursor: pointer;
}

.music-card > span:nth-child(2) {
  display: grid;
  gap: 2px;
}

.music-card b { font-size: 11px; }
.music-card small { color: #957a61; font-size: 8px; }
.music-card i { color: var(--forest); font-size: 18px; font-style: normal; }

.music-note {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--forest);
  background: #e8e4ca;
  font-size: 17px;
}

.primary-action,
.secondary-action {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 15px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  color: #fff9e9;
  background: linear-gradient(145deg, #315f40, #1c482f);
  box-shadow: 0 9px 20px rgba(35, 72, 47, 0.21), inset 0 1px rgba(255, 255, 255, 0.15);
  cursor: pointer;
  font-size: 15px;
  letter-spacing: 0.06em;
  transition: 220ms var(--ease);
}

.primary-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(35, 72, 47, 0.27);
}

.primary-action > span:last-child { font-size: 24px; }
.send-icon { font-size: 24px !important; transform: rotate(-25deg); }

.memory-polaroid {
  position: relative;
  width: calc(100% - 42px);
  margin: 6px auto 17px;
  padding: 13px 13px 8px;
  border: 1px solid rgba(111, 75, 43, 0.2);
  background: #fff6e5;
  box-shadow: 0 10px 22px rgba(84, 55, 31, 0.14);
  transform: rotate(-1.3deg);
}

.tape {
  position: absolute;
  top: -12px;
  left: 50%;
  width: 76px;
  height: 25px;
  background: rgba(221, 177, 100, 0.55);
  clip-path: polygon(3% 8%, 100% 0, 94% 92%, 0 100%);
  transform: translateX(-50%) rotate(1deg);
}

.photo-drop {
  width: 100%;
  height: 232px;
  display: block;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: #806b55;
  background:
    linear-gradient(145deg, rgba(248, 208, 156, 0.55), rgba(124, 154, 156, 0.4)),
    #d9d7c5;
  cursor: pointer;
}

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

.photo-empty {
  height: 100%;
  display: grid;
  gap: 8px;
  place-items: center;
  align-content: center;
  font-size: 11px;
}

.photo-empty b {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(87, 67, 47, 0.45);
  border-radius: 50%;
  font-size: 25px;
  font-weight: 400;
}

.caption-line {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 8px 1px;
}

.caption-line input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #4d3828;
  text-align: center;
  background: transparent;
  font-family: inherit;
  font-size: 18px;
}

.caption-line span {
  color: var(--berry);
  font-size: 20px;
}

.voice-card,
.play-voice-card {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 10px 2px;
  padding: 10px 12px;
  border: 1px solid rgba(105, 73, 42, 0.16);
  border-radius: 14px;
  background: rgba(255, 250, 238, 0.75);
  box-shadow: 0 4px 12px rgba(75, 54, 34, 0.07);
}

.record-button,
.play-voice-card button {
  flex: 0 0 auto;
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, #be5947, #96382f);
  cursor: pointer;
}

.record-button.recording {
  animation: record-pulse 1.1s ease-in-out infinite;
}

@keyframes record-pulse {
  50% { box-shadow: 0 0 0 7px rgba(167, 60, 50, 0.12); }
}

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

.voice-copy b,
.play-voice-card b { font-size: 11px; font-weight: 500; }
.record-time,
.play-voice-card i { color: #725a46; font-size: 10px; font-style: normal; }

.waveform {
  height: 23px;
  display: flex;
  gap: 3px;
  align-items: center;
  margin-top: 3px;
}

.waveform i {
  width: 2px;
  height: calc(5px + (var(--n, 1) * 2px));
  border-radius: 999px;
  background: var(--berry);
}

.waveform i:nth-child(3n) { height: 18px; }
.waveform i:nth-child(4n) { height: 12px; }
.waveform i:nth-child(5n) { height: 21px; }

.interaction-card {
  margin-top: 16px;
}

.interaction-card label {
  min-height: 49px;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 7px;
  align-items: center;
  margin: 7px 0;
  padding: 7px 11px;
  border: 1px solid rgba(105, 73, 42, 0.16);
  border-radius: 12px;
  background: rgba(255, 250, 238, 0.72);
  font-size: 12px;
}

.interaction-card label > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--forest);
  background: #e6e5cc;
  font-size: 17px;
}

.interaction-card input[type="checkbox"] {
  width: 19px;
  height: 19px;
  accent-color: var(--forest);
}

.photo-choices {
  display: grid;
  grid-template-columns: 0.9fr 1.18fr 0.9fr;
  gap: 9px;
  align-items: center;
  margin: 10px 0 5px;
}

.photo-choice {
  position: relative;
  height: 150px;
  padding: 6px;
  overflow: visible;
  border: 1px solid rgba(107, 76, 45, 0.18);
  background: #fff7e6;
  box-shadow: 0 7px 15px rgba(79, 55, 34, 0.12);
  cursor: pointer;
  transform: rotate(var(--photo-r, 0deg));
  transition: 220ms var(--ease);
}

.photo-choice:nth-child(2) { height: 170px; }

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

.photo-choice[aria-checked="true"] {
  z-index: 2;
  border: 3px solid var(--forest);
  transform: rotate(0) translateY(-5px);
}

.photo-choice[aria-checked="true"]::after {
  position: absolute;
  right: -7px;
  bottom: -7px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 3px solid #fff7e6;
  border-radius: 50%;
  color: white;
  content: "✓";
  background: var(--forest);
  font-size: 14px;
}

.guess-hint {
  margin: 12px 0 19px;
  color: #765a43;
  text-align: center;
  font-size: 11px;
}

.guess-hint span { color: var(--gold); }

.torn-note {
  position: relative;
  min-height: 118px;
  display: grid;
  place-items: center;
  padding: 22px 28px;
  background: #fff3d9;
  clip-path: polygon(0 7%, 7% 4%, 13% 8%, 21% 3%, 29% 7%, 37% 4%, 45% 8%, 54% 3%, 64% 7%, 73% 4%, 82% 8%, 91% 4%, 100% 7%, 98% 94%, 90% 97%, 83% 93%, 74% 98%, 65% 94%, 55% 97%, 46% 93%, 36% 98%, 26% 94%, 16% 98%, 7% 94%, 1% 97%);
  filter: drop-shadow(0 5px 8px rgba(75, 53, 33, 0.11));
}

.torn-note p {
  margin: 0;
  text-align: center;
  font-family: inherit;
  font-size: 22px;
  line-height: 1.55;
}

.paper-bow {
  position: absolute;
  top: -24px;
  left: 50%;
  color: var(--berry);
  font-size: 39px;
  transform: translateX(-50%);
}

.play-voice-card {
  margin-top: 14px;
}

.play-voice-card > span {
  min-width: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}

.voice-bars {
  width: 100%;
  height: 20px;
  background: repeating-linear-gradient(90deg, #b54c3e 0 2px, transparent 2px 5px);
  mask-image: linear-gradient(0deg, transparent 5%, #000 25% 75%, transparent 95%);
  opacity: 0.74;
}

.wish-form {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.wish-form > label {
  color: #654b38;
  font-size: 12px;
}

.wish-form > input,
.name-row input {
  width: 100%;
  min-height: 47px;
  padding: 0 12px;
  border: 1.5px solid var(--forest-soft);
  border-radius: 8px;
  outline: 0;
  color: #453325;
  background: rgba(255, 250, 235, 0.72);
  font-size: 15px;
}

.wish-form input:focus {
  border-color: var(--forest-dark);
  box-shadow: 0 0 0 3px rgba(42, 81, 55, 0.09);
}

.name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.name-row label {
  display: grid;
  gap: 4px;
  color: #8b725a;
  font-size: 9px;
}

.name-row input {
  min-height: 41px;
}

.final-title h1 {
  font-size: 28px;
}

.final-tree-scene {
  height: 520px;
}

.final-ornaments {
  z-index: 3;
}

.final-ornaments .tree-ornament {
  pointer-events: none;
}

.name-tag {
  position: absolute;
  z-index: 5;
  padding: 6px 11px;
  border: 1px solid rgba(112, 76, 43, 0.18);
  border-radius: 999px;
  color: #4d392a;
  background: rgba(255, 244, 216, 0.92);
  box-shadow: 0 3px 8px rgba(66, 44, 26, 0.15);
  font-size: 10px;
  transform: rotate(var(--tag-r));
}

.creator-tag { top: 32%; left: 10%; --tag-r: -7deg; }
.friend-tag { top: 32%; right: 9%; --tag-r: 6deg; }

.final-photos {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
}

.final-photo {
  position: absolute;
  width: 82px;
  height: 92px;
  padding: 5px 5px 12px;
  overflow: hidden;
  border: 1px solid rgba(90, 64, 39, 0.16);
  background: #fff5dc;
  box-shadow: 0 7px 14px rgba(58, 39, 24, 0.25);
  transform: translate(-50%, -50%) rotate(var(--photo-r));
}

.final-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.final-photo:nth-child(1) { top: 44%; left: 50%; --photo-r: 2deg; }
.final-photo:nth-child(2) { top: 59%; left: 34%; --photo-r: -5deg; }
.final-photo:nth-child(3) { top: 61%; left: 67%; --photo-r: 6deg; }

.wish-plaque {
  position: absolute;
  z-index: 6;
  right: 16%;
  bottom: 8%;
  left: 16%;
  min-height: 78px;
  display: grid;
  gap: 5px;
  place-items: center;
  padding: 12px 20px;
  border: 3px solid #d5b573;
  border-radius: 9px;
  color: #543a27;
  text-align: center;
  background: #fff0cf;
  box-shadow: 0 5px 12px rgba(68, 47, 29, 0.18), inset 0 0 0 2px rgba(255, 251, 228, 0.8);
  transform: rotate(-1deg);
}

.wish-plaque small {
  color: #8a6b4d;
  font-size: 9px;
}

.wish-plaque strong {
  font-family: inherit;
  font-size: 24px;
  font-weight: 400;
}

.thank-you {
  margin: 18px 0 4px;
  color: var(--berry-dark);
  text-align: center;
  font-family: inherit;
  font-size: 22px;
}

.save-action {
  margin-top: 10px;
}

.secondary-action {
  min-height: 43px;
  margin-top: 7px;
  border: 0;
  color: var(--forest);
  background: transparent;
  box-shadow: none;
  font-size: 12px;
}

.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  max-width: calc(100vw - 32px);
  padding: 10px 15px;
  border: 1px solid rgba(255, 247, 221, 0.22);
  border-radius: 999px;
  color: #fff9e8;
  background: rgba(28, 67, 44, 0.94);
  box-shadow: 0 8px 25px rgba(43, 39, 30, 0.22);
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: 260ms var(--ease);
}

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

.campaign-footer {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin: 18px auto 26px;
  color: #6e5139;
  font-size: 11px;
  letter-spacing: 0.15em;
}

.campaign-footer span {
  width: 90px;
  height: 1px;
  background: #c89e5b;
}

.campaign-footer b { color: var(--gold); }

/* Refined interactive cards */
.five-steps .step-line {
  width: 24px;
  margin-inline: -4px;
}

.five-steps .step-dot {
  min-width: 44px;
}

.tree-scene,
.final-tree-scene {
  background: #183824;
}

.tree-scene {
  height: 520px;
}

.painted-tree {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
  filter: none;
  pointer-events: none;
}

[data-theme="cream"] > .painted-tree {
  filter: none;
}

[data-theme="berry"] > .painted-tree {
  filter: none;
}

.tree-scene > canvas,
.final-tree-scene > canvas {
  opacity: 0;
}

.tree-scene::after,
.final-tree-scene::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 17% 18%, rgba(255, 236, 147, .65) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 27%, rgba(255, 248, 207, .72) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 25% 74%, rgba(255, 255, 255, .64) 0 1px, transparent 2px),
    linear-gradient(180deg, transparent 62%, rgba(246, 231, 203, .12));
  background-size: 63px 67px, 91px 79px, 75px 86px, 100% 100%;
  animation: snowfall 8s linear infinite;
}

@keyframes snowfall {
  to { background-position: 10px 67px, -12px 79px, 8px 86px, 0 0; }
}

.tree-ornaments,
.final-ornaments,
.tree-photo-placeholder,
.placement-tip,
.name-tag,
.final-photos,
.wish-plaque {
  z-index: 4;
}

.memory-toolbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 5px 2px 16px;
  padding: 12px 13px 12px 15px;
  border: 1px solid rgba(151, 110, 60, .16);
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 12%, rgba(214, 164, 63, .16), transparent 29%),
    rgba(255, 249, 234, .78);
  box-shadow: 0 8px 18px rgba(81, 55, 31, .08), inset 0 0 0 1px rgba(255,255,255,.55);
}

.memory-toolbar::before {
  position: absolute;
  top: -9px;
  left: 18px;
  content: "✽";
  color: #a5473d;
  font-size: 19px;
  transform: rotate(-18deg);
}

.memory-toolbar > div {
  display: grid;
  gap: 1px;
}

.memory-toolbar b {
  color: var(--forest-dark);
  font-size: 17px;
}

.memory-toolbar span {
  color: #8c755e;
  font-size: 10px;
}

.memory-toolbar button,
.memory-entry-actions button,
.quiz-card header > button,
.recommended-questions button,
.save-custom-question,
.share-actions button {
  border: 1px solid rgba(45, 83, 55, .2);
  border-radius: 999px;
  color: #fff9e9;
  background: linear-gradient(145deg, #3d704d, #214c34);
  box-shadow: 0 5px 11px rgba(34, 68, 45, .18), inset 0 1px rgba(255,255,255,.16);
  cursor: pointer;
  transition: 180ms var(--ease);
}

.memory-toolbar button {
  min-height: 38px;
  padding: 0 15px;
  white-space: nowrap;
  font-size: 12px;
}

.memory-toolbar button::before {
  content: "✦";
  margin-right: 6px;
  color: #f0cf75;
}

.memory-toolbar button:disabled {
  color: #786a5b;
  background: #e6dcc9;
  box-shadow: none;
  cursor: default;
}

.memory-card-list {
  display: grid;
  gap: 18px;
}

.memory-entry {
  position: relative;
  padding: 13px 10px 11px;
  border: 1px solid rgba(117, 80, 43, .12);
  border-radius: 22px;
  background: rgba(255, 249, 235, .58);
  box-shadow: 0 11px 24px rgba(73, 50, 30, .09);
}

.memory-entry::before,
.memory-entry::after {
  position: absolute;
  z-index: 3;
  content: "";
  pointer-events: none;
}

.memory-entry::before {
  top: -9px;
  right: 18px;
  width: 44px;
  height: 22px;
  background: rgba(220, 181, 111, .52);
  clip-path: polygon(5% 7%, 100% 0, 94% 92%, 0 100%);
  transform: rotate(4deg);
}

.memory-entry::after {
  right: -3px;
  bottom: 52px;
  width: 46px;
  height: 52px;
  opacity: .8;
  background: radial-gradient(circle at 50% 12%, #b4483d 0 8%, transparent 9%), radial-gradient(ellipse at 40% 35%, #567553 0 20%, transparent 21%), radial-gradient(ellipse at 65% 51%, #385e43 0 22%, transparent 23%);
  transform: rotate(18deg);
}

.memory-entry .memory-polaroid {
  width: calc(100% - 24px);
  margin-bottom: 9px;
}

.memory-entry.favorite {
  box-shadow: 0 12px 28px rgba(115, 82, 36, .14), 0 0 0 2px rgba(213, 154, 49, .22);
}

.memory-empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #766652;
  background: linear-gradient(145deg, #e6d8be, #c8d2c1);
}

.memory-empty b {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(55, 83, 60, .5);
  border-radius: 50%;
  color: var(--forest);
  font-size: 26px;
  font-weight: 400;
}

.memory-empty em {
  font-style: normal;
  font-size: 12px;
}

.change-photo {
  position: absolute;
  right: 10px;
  bottom: 9px;
  padding: 5px 9px;
  border-radius: 999px;
  color: white;
  background: rgba(30, 66, 43, .78);
  backdrop-filter: blur(4px);
  font-size: 9px;
}

.photo-drop {
  position: relative;
  border-radius: 8px;
}

.memory-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 11px;
}

.memory-meta label {
  display: grid;
  gap: 4px;
  color: #7f6b58;
  font-size: 10px;
}

.memory-meta input {
  width: 100%;
  min-height: 39px;
  padding: 0 10px;
  border: 1px solid rgba(47, 82, 56, .18);
  border-radius: 11px;
  outline: 0;
  color: #493629;
  background: rgba(255, 253, 242, .82);
}

.memory-meta input:focus,
.custom-question-builder input:focus {
  border-color: #4f7858;
  box-shadow: 0 0 0 3px rgba(61, 107, 73, .09);
}

.memory-entry-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 11px 0;
}

.memory-entry-actions button {
  min-height: 34px;
  padding: 0 13px;
  font-size: 10px;
}

.memory-entry-actions button:last-child:not(:first-child) {
  border-color: rgba(145, 68, 58, .18);
  color: #8a463e;
  background: rgba(255, 244, 227, .8);
  box-shadow: none;
}

.privacy-note,
.screen-intro {
  margin: 10px 8px 14px;
  color: #8b755f;
  font-size: 10px;
  line-height: 1.65;
  text-align: center;
}

.quiz-setup,
.quiz-answer {
  display: grid;
  gap: 13px;
}

.quiz-card {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border: 1px solid rgba(111, 74, 38, .12);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0, rgba(213, 154, 49, .13), transparent 34%),
    rgba(255, 249, 234, .78);
  box-shadow: 0 9px 20px rgba(76, 53, 32, .08), inset 0 0 0 1px rgba(255,255,255,.55);
}

.quiz-card::after {
  position: absolute;
  right: -14px;
  bottom: -14px;
  width: 58px;
  height: 58px;
  content: "";
  opacity: .45;
  background: radial-gradient(circle at 50% 10%, #bd4f42 0 7%, transparent 8%), radial-gradient(ellipse at 35% 45%, #4e7554 0 19%, transparent 20%), radial-gradient(ellipse at 67% 55%, #2d5c3d 0 22%, transparent 23%);
  transform: rotate(-18deg);
}

.quiz-card header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 9px;
  align-items: center;
}

.quiz-card header > b {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50% 45% 50% 42%;
  color: #fff8e8;
  background: var(--berry);
  box-shadow: 0 4px 8px rgba(125, 47, 42, .2);
  font-size: 11px;
}

.quiz-card h2 {
  margin: 0;
  color: #4c3729;
  font-size: 14px;
  line-height: 1.5;
}

.quiz-card header > button {
  min-height: 31px;
  padding: 0 10px;
  color: #5d4b39;
  background: rgba(244, 226, 194, .78);
  box-shadow: none;
  font-size: 9px;
}

.quiz-options {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 12px;
}

.quiz-options button {
  min-height: 44px;
  padding: 7px 6px;
  border: 1px solid rgba(67, 98, 72, .16);
  border-radius: 13px;
  color: #5b4938;
  background: rgba(255, 253, 242, .88);
  box-shadow: 0 3px 8px rgba(73, 52, 32, .05);
  cursor: pointer;
  font-size: 10px;
  line-height: 1.35;
  transition: 160ms var(--ease);
}

.quiz-options button::before {
  content: "○";
  display: block;
  margin-bottom: 2px;
  color: #b59b72;
  font-size: 13px;
}

.quiz-options button.selected {
  border-color: #466f50;
  color: #fff9e8;
  background: linear-gradient(145deg, #507a59, #28513a);
  box-shadow: 0 5px 11px rgba(42, 81, 55, .2);
}

.quiz-options button.selected::before {
  content: "✽";
  color: #f1ce72;
}

.question-picker {
  position: relative;
  z-index: 2;
  margin-top: 13px;
  padding: 13px;
  border: 1px solid rgba(160, 116, 57, .18);
  border-radius: 16px;
  background: #f7ead2;
  animation: screen-in 240ms var(--ease) both;
}

.picker-ribbon {
  margin-bottom: 9px;
  color: #704c31;
  text-align: center;
  font-size: 11px;
}

.picker-ribbon span { color: var(--gold); }

.recommended-questions {
  display: grid;
  gap: 7px;
}

.recommended-questions button {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  border-radius: 12px;
  color: #514131;
  text-align: left;
  background: rgba(255, 252, 239, .9);
  box-shadow: 0 3px 7px rgba(72, 50, 31, .05);
}

.recommended-questions i {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  border: 1px solid #b39363;
  border-radius: 50%;
  background: #fffaf0;
}

.recommended-questions span {
  font-size: 10px;
  line-height: 1.45;
}

.custom-divider {
  position: relative;
  margin: 14px 0 10px;
  color: #8b7257;
  text-align: center;
  font-size: 9px;
}

.custom-divider::before {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
  content: "";
  background: rgba(123, 89, 52, .18);
}

.custom-divider span {
  position: relative;
  padding: 0 9px;
  background: #f7ead2;
}

.custom-question-builder > label,
.custom-options label {
  display: grid;
  gap: 4px;
  color: #7b654f;
  font-size: 9px;
}

.custom-question-builder input {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid rgba(60, 95, 68, .18);
  border-radius: 11px;
  outline: 0;
  color: #48382b;
  background: rgba(255,253,244,.92);
}

.custom-options {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.custom-options label {
  grid-template-columns: 24px 1fr;
  align-items: center;
}

.custom-options b {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: #a74a3e;
  font-size: 9px;
}

.save-custom-question {
  width: 100%;
  min-height: 40px;
  margin-top: 9px;
}

.quiz-section-title {
  position: relative;
  margin: 18px 0 11px;
  color: var(--berry-dark);
  text-align: center;
  font-size: 17px;
}

.quiz-section-title::before,
.quiz-section-title::after {
  content: "✦";
  margin: 0 8px;
  color: var(--gold);
  font-size: 11px;
}

.photo-choices {
  grid-template-columns: repeat(auto-fit, minmax(94px, 1fr));
}

.photo-choice,
.photo-choice:nth-child(2) {
  height: 190px;
  padding-bottom: 42px;
  border-radius: 3px;
}

.photo-choice img {
  height: 100%;
}

.photo-choice > span {
  position: absolute;
  right: 5px;
  bottom: 7px;
  left: 5px;
  display: grid;
  gap: 1px;
  color: #513c2c;
  font-size: 10px;
}

.photo-choice > span small {
  color: #957a60;
  font-size: 8px;
}

.no-photo-choice {
  grid-column: 1 / -1;
  padding: 28px 22px;
  border: 1px dashed rgba(60, 93, 67, .25);
  border-radius: 18px;
  color: #7d6a57;
  text-align: center;
  background: rgba(255, 249, 235, .65);
  font-size: 11px;
  line-height: 1.7;
}

.result-card {
  position: relative;
  display: grid;
  place-items: center;
  margin: 18px 0 8px;
  padding: 20px 22px 18px;
  overflow: hidden;
  border: 1px solid rgba(146, 105, 53, .2);
  border-radius: 24px;
  text-align: center;
  background: linear-gradient(150deg, #fff8e7, #f1ddba);
  box-shadow: 0 13px 26px rgba(82, 57, 33, .12), inset 0 0 0 2px rgba(255,255,255,.44);
}

.result-card::before,
.result-card::after {
  position: absolute;
  content: "✽";
  color: #a6443a;
  font-size: 28px;
}

.result-card::before { top: 8px; left: 14px; transform: rotate(-20deg); }
.result-card::after { right: 14px; bottom: 8px; transform: rotate(24deg); }

.result-kicker {
  color: #7b684f;
  font-size: 8px;
  letter-spacing: .18em;
}

.score-ring {
  width: 94px;
  height: 94px;
  display: grid;
  grid-template-columns: auto auto;
  place-content: center;
  align-items: end;
  margin: 10px 0 5px;
  border: 7px solid #d7aa54;
  border-radius: 50%;
  color: var(--forest-dark);
  background: #fff9eb;
  box-shadow: 0 0 0 5px rgba(218, 171, 83, .15);
}

.score-ring strong { font-size: 36px; line-height: 1; }
.score-ring small { margin-bottom: 3px; font-size: 12px; }
.result-card h2 { margin: 5px 0; color: var(--berry-dark); font-size: 25px; }
.result-card p { margin: 3px 0 12px; color: #6d5844; font-size: 11px; line-height: 1.65; }

.score-track {
  width: 84%;
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(111, 83, 51, .12);
}

.score-track i {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b6a49, #d0a04b);
  transition: width 1s var(--ease);
}

.share-card {
  position: relative;
  margin: 15px 0 4px;
  padding: 21px 15px 15px;
  overflow: hidden;
  border: 1px solid rgba(72, 108, 77, .2);
  border-radius: 24px;
  text-align: center;
  background:
    radial-gradient(circle at 0 100%, rgba(61, 102, 69, .13), transparent 34%),
    rgba(255, 249, 233, .78);
  box-shadow: 0 10px 23px rgba(72, 51, 31, .09);
}

.share-stars { color: var(--gold); font-size: 12px; }
.share-card h2 { margin: 7px 0 5px; color: var(--forest-dark); font-size: 17px; }
.share-card > p { margin: 0 auto 13px; max-width: 320px; color: #7d6853; font-size: 10px; line-height: 1.65; }

.share-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.share-actions button { min-height: 40px; font-size: 10px; }
.share-actions button:last-child { color: var(--forest); background: #f3e6ca; box-shadow: none; }

.one-yuan-action {
  width: 100%;
  min-height: 62px;
  display: grid;
  grid-template-columns: 55px 1fr 20px;
  gap: 9px;
  align-items: center;
  margin-top: 10px;
  padding: 7px 12px;
  border: 2px solid #d7aa55;
  border-radius: 18px;
  color: #fff8e8;
  text-align: left;
  background: linear-gradient(145deg, #a8473c, #7f302e);
  box-shadow: 0 8px 18px rgba(127, 48, 46, .22), inset 0 1px rgba(255,255,255,.18);
  cursor: pointer;
}

.one-yuan-action > b {
  display: grid;
  place-items: center;
  align-self: stretch;
  border-right: 1px solid rgba(255,255,255,.24);
  color: #f8d477;
  font-size: 23px;
}

.one-yuan-action > span { display: grid; gap: 2px; font-size: 14px; font-weight: 700; }
.one-yuan-action small { color: rgba(255,248,229,.72); font-size: 8px; font-weight: 400; }
.one-yuan-action i { font-style: normal; font-size: 25px; }

body.payment-open { overflow: hidden; }

.payment-modal {
  position: fixed;
  z-index: 110;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(246, 207, 118, .14), transparent 32%),
    rgba(4, 27, 18, .82);
  backdrop-filter: blur(13px);
  transition: opacity 260ms ease;
}

.payment-modal[hidden] { display: none; }
.payment-modal.visible { opacity: 1; }

.payment-card {
  position: relative;
  width: min(92vw, 390px);
  padding: 27px 24px 22px;
  overflow: hidden;
  border: 1px solid rgba(179, 131, 62, .32);
  border-radius: 30px 13px 28px 16px / 18px 29px 15px 30px;
  text-align: center;
  background:
    radial-gradient(circle at 0 100%, rgba(44, 100, 66, .12), transparent 34%),
    linear-gradient(155deg, #fffaf0, #f1dfbe);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .48), inset 0 0 0 2px rgba(255,255,255,.52);
  transform: translateY(18px) scale(.97);
  transition: transform 320ms cubic-bezier(.2,.8,.2,1);
}

.payment-modal.visible .payment-card { transform: translateY(0) scale(1); }

.payment-card::before,
.payment-card::after {
  position: absolute;
  content: "❦";
  color: rgba(45, 92, 58, .26);
  font-size: 58px;
  line-height: 1;
}

.payment-card::before { top: 8px; left: -15px; transform: rotate(-27deg); }
.payment-card::after { right: -14px; bottom: 35px; transform: rotate(151deg); }

.payment-close {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(63, 90, 61, .2);
  border-radius: 50%;
  color: #315c3e;
  background: rgba(255, 251, 239, .72);
  box-shadow: none;
  font-size: 22px;
  cursor: pointer;
}

.payment-kicker {
  display: block;
  margin-bottom: 7px;
  color: #9d6d30;
  font-size: 11px;
  letter-spacing: .12em;
}

.payment-card h2 {
  position: relative;
  margin: 0;
  color: #214c35;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: .04em;
}

.payment-card > p {
  margin: 8px 20px 14px;
  color: #725d47;
  font-size: 14px;
  line-height: 1.6;
}

.payment-qr-frame {
  position: relative;
  z-index: 1;
  width: min(100%, 280px);
  margin: 0 auto;
  padding: 8px;
  border: 1px solid rgba(35, 112, 67, .2);
  border-radius: 20px 8px 22px 11px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(35, 74, 48, .14), 0 0 0 5px rgba(255,255,255,.38);
  transform: rotate(-.35deg);
}

.payment-qr-frame img {
  display: block;
  width: 100%;
  max-height: 48vh;
  border-radius: 13px 5px 15px 8px;
  object-fit: contain;
}

.payment-owner {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin: 13px 0;
  color: #315840;
}

.payment-owner > i {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #08b968;
  font-style: normal;
  font-weight: 700;
}

.payment-owner span { display: grid; gap: 2px; text-align: left; }
.payment-owner b { font-size: 14px; }
.payment-owner small { color: #8b7863; font-size: 11px; }

.payment-complete {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fffdf2;
  background: linear-gradient(145deg, #2f7048, #194a32);
  box-shadow: 0 10px 20px rgba(24, 74, 47, .22), inset 0 1px rgba(255,255,255,.18);
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
}

.payment-note {
  position: relative;
  z-index: 1;
  display: block;
  margin: 10px 10px 0;
  color: #927c65;
  font-size: 11px;
  line-height: 1.5;
}

.memory-toolbar button:hover,
.memory-entry-actions button:hover,
.quiz-options button:hover,
.recommended-questions button:hover,
.share-actions button:hover,
.one-yuan-action:hover {
  transform: translateY(-1px);
}

/* Softer, more artistic photo treatment */
.memory-polaroid {
  overflow: visible;
  border: 0;
  border-radius: 18px 8px 22px 11px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.38), transparent 45%),
    #fff6e5;
  box-shadow: 0 14px 26px rgba(74, 49, 28, .13), 0 0 0 1px rgba(130, 88, 48, .11);
}

.memory-polaroid::after {
  position: absolute;
  z-index: 2;
  right: -5px;
  bottom: -6px;
  width: 42px;
  height: 35px;
  content: "";
  opacity: .48;
  pointer-events: none;
  background:
    radial-gradient(circle at 55% 20%, #b8463c 0 7%, transparent 8%),
    radial-gradient(ellipse at 36% 52%, #547552 0 20%, transparent 21%),
    radial-gradient(ellipse at 69% 62%, #315f41 0 22%, transparent 23%);
  transform: rotate(20deg);
}

.photo-drop {
  border-radius: 24px 10px 27px 14px / 17px 25px 13px 28px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45);
  clip-path: polygon(1% 3%, 97% 0, 100% 93%, 96% 99%, 4% 97%, 0 91%);
}

.photo-drop img {
  transform: scale(1.025) rotate(-.35deg);
  filter: saturate(.9) contrast(.96) sepia(.045);
}

.photo-choice,
.photo-choice:nth-child(2) {
  border: 0;
  border-radius: 20px 8px 23px 11px / 11px 22px 9px 25px;
  box-shadow: 0 10px 19px rgba(74, 50, 29, .14), 0 0 0 1px rgba(123, 82, 43, .12);
  clip-path: polygon(2% 1%, 97% 3%, 100% 94%, 95% 100%, 3% 97%, 0 6%);
}

.photo-choice img {
  border-radius: 14px 5px 15px 7px;
  filter: saturate(.9) contrast(.97) sepia(.04);
}

.photo-choice[aria-checked="true"] {
  border: 0;
  box-shadow: 0 12px 22px rgba(39, 76, 51, .2), 0 0 0 3px var(--forest);
}

.final-photo {
  border: 0;
  border-radius: 18px 6px 20px 9px / 9px 19px 7px 22px;
  clip-path: polygon(2% 1%, 97% 3%, 100% 92%, 94% 100%, 4% 97%, 0 7%);
  box-shadow: 0 10px 18px rgba(42, 31, 20, .29), 0 0 0 1px rgba(255,255,255,.52);
}

.final-photo img {
  border-radius: 11px 4px 13px 6px;
  filter: saturate(.9) sepia(.04);
}

/* Immersive light-up and 3D rotation mode */
.showcase-launch {
  width: calc(100% - 8px);
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 10px auto 14px;
  border: 1px solid rgba(206, 157, 63, .42);
  border-radius: 999px;
  color: #fff5d9;
  background:
    linear-gradient(90deg, rgba(255,255,255,.08), transparent 34% 66%, rgba(255,255,255,.06)),
    linear-gradient(145deg, #274f37, #123322);
  box-shadow: 0 8px 18px rgba(30, 67, 43, .2), inset 0 1px rgba(255,255,255,.13);
  cursor: pointer;
  font-size: 12px;
  letter-spacing: .04em;
}

.showcase-launch span { color: #f2cf72; animation: showcase-spark 1.8s ease-in-out infinite; }
.showcase-launch i { font-style: normal; font-size: 21px; transition: transform 180ms var(--ease); }
.showcase-launch:hover i { transform: translateX(3px); }
.final-showcase-launch { margin-top: 11px; }

@keyframes showcase-spark {
  50% { opacity: .45; transform: scale(.75) rotate(45deg); }
}

.showcase-open {
  overflow: hidden;
}

.tree-showcase {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  place-items: center;
  padding: 28px 18px 24px;
  overflow: hidden;
  color: #fff8e8;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(48, 100, 64, .35), transparent 47%),
    radial-gradient(circle at 50% 105%, rgba(213, 166, 76, .15), transparent 36%),
    linear-gradient(160deg, #102a1c, #06160f 72%);
  opacity: 0;
  transition: opacity 320ms ease;
}

.tree-showcase.visible { opacity: 1; }

.showcase-close {
  position: absolute;
  z-index: 8;
  top: max(18px, env(safe-area-inset-top));
  right: 18px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  color: #fff8e8;
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-size: 27px;
  font-weight: 300;
}

.showcase-copy {
  position: relative;
  z-index: 5;
  margin-top: 4px;
  text-align: center;
}

.showcase-copy span {
  color: rgba(226, 207, 162, .68);
  font-size: 10px;
  letter-spacing: .14em;
}

.showcase-copy h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 4px 0 0;
  font-size: clamp(25px, 6vw, 34px);
  font-weight: 600;
  letter-spacing: .14em;
  text-shadow: 0 3px 16px rgba(0,0,0,.4);
}

.showcase-copy h2::before,
.showcase-copy h2::after {
  color: #d8bb78;
  content: "❦";
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  opacity: .82;
}

.showcase-copy h2::after { transform: scaleX(-1); }

.showcase-stage {
  --tree-rotation: 0deg;
  position: relative;
  width: min(82vw, 560px);
  height: min(70vh, 760px);
  display: grid;
  place-items: center;
  perspective: 1100px;
  touch-action: none;
  cursor: grab;
}

.showcase-stage.dragging { cursor: grabbing; }

.tree-volume {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  perspective: 1200px;
  pointer-events: none;
}

.tree-volume-shell {
  position: relative;
  width: min(100%, 570px);
  height: 100%;
  transform: rotateX(1.5deg) rotateY(var(--tree-rotation)) scale(.94);
  transform-origin: 50% 56%;
  transform-style: preserve-3d;
  transition: transform 420ms cubic-bezier(.2,.8,.2,1), opacity 260ms ease;
}

.tree-volume-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  backface-visibility: hidden;
  filter: brightness(.3) saturate(.68) drop-shadow(0 24px 30px rgba(0,0,0,.56));
  opacity: .68;
  transition: filter 1.1s ease, opacity 1.1s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.volume-back {
  opacity: .24;
  transform: translateZ(var(--volume-back-z, -46px)) scale(.955);
  filter: brightness(.2) saturate(.52) blur(1.2px) drop-shadow(0 28px 34px rgba(0,0,0,.72));
}

.volume-core {
  z-index: 3;
  transform: translateZ(var(--volume-core-z, 8px));
}

.volume-wing {
  z-index: 2;
  opacity: .28;
  transform-origin: 50% 54%;
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, .12) 10%, #000 23%, #000 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, .12) 10%, #000 23%, #000 100%);
  filter: brightness(.62) saturate(.82) blur(.25px) drop-shadow(0 24px 26px rgba(0,0,0,.42));
}

.volume-wing-left {
  transform: translate3d(-10px, 1px, var(--volume-wing-z, -2px)) scale(.982);
}

.volume-wing-right {
  transform: translate3d(10px, 1px, var(--volume-wing-z, -2px)) scale(.982);
}

.showcase-loading {
  position: absolute;
  z-index: 4;
  display: none;
  place-items: center;
  gap: 8px;
  color: rgba(255, 248, 229, .78);
  text-align: center;
  letter-spacing: .08em;
}

.showcase-loading span {
  color: #f2cf72;
  font-size: 25px;
  animation: showcase-spark 1.2s ease-in-out infinite;
}

.showcase-loading b { font-size: 12px; font-weight: 500; }
.tree-showcase.is-loading .showcase-loading { display: grid; }
.tree-showcase.is-loading .showcase-volume { opacity: 0; }
.tree-showcase.is-loading .showcase-controls { opacity: .38; pointer-events: none; }

.tree-showcase.lights-on .tree-volume-image,
.final-tree-volume .tree-volume-image {
  filter: brightness(1.03) saturate(1.02) drop-shadow(0 26px 38px rgba(0,0,0,.58)) drop-shadow(0 0 16px rgba(255,196,82,.18));
  opacity: 1;
}

.tree-showcase.lights-on .volume-back,
.final-tree-volume .volume-back {
  opacity: .34;
  filter: brightness(.48) saturate(.78) blur(.9px) drop-shadow(0 30px 40px rgba(0,0,0,.72));
}

.tree-showcase.lights-on .volume-wing,
.final-tree-volume .volume-wing {
  opacity: .42;
  filter: brightness(.8) saturate(.9) blur(.18px) drop-shadow(0 20px 26px rgba(0,0,0,.4));
}

.tree-showcase.lights-on .tree-volume[data-theme="cream"] .volume-wing,
.final-tree-volume[data-theme="cream"] .volume-wing {
  opacity: .38;
  filter: brightness(.9) saturate(.74) blur(.18px) drop-shadow(0 18px 22px rgba(74, 58, 38, .26));
}

.tree-showcase.lights-on .tree-volume[data-theme="berry"] .volume-wing,
.final-tree-volume[data-theme="berry"] .volume-wing {
  opacity: .4;
  filter: brightness(.76) saturate(.9) blur(.18px) drop-shadow(0 18px 22px rgba(45, 8, 12, .3));
}

.showcase-stage.auto .tree-volume-shell {
  animation: tree-auto-rotate 10s ease-in-out infinite;
}

@keyframes tree-auto-rotate {
  0%, 100% { transform: rotateX(1.5deg) rotateY(-16deg) scale(.94); }
  50% { transform: rotateX(1deg) rotateY(16deg) scale(.96); }
}

.volume-ornaments,
.volume-photos {
  position: absolute;
  z-index: 12;
  inset: 0;
  transform-style: preserve-3d;
}

.volume-ornament {
  position: absolute;
  z-index: 2;
  width: var(--volume-size, 32px);
  height: calc(var(--volume-size, 32px) * 1.12);
  transform: translate(-50%, -50%) translateZ(var(--volume-depth, 80px)) rotateZ(var(--volume-rotation, 0deg));
  transform-origin: 50% 4%;
  transform-style: preserve-3d;
  filter: drop-shadow(0 7px 6px rgba(24, 13, 7, .58));
  animation: volume-ornament-sway 4.7s ease-in-out infinite alternate;
}

.volume-ornament::before {
  position: absolute;
  z-index: -1;
  top: -14px;
  left: 50%;
  width: .8px;
  height: 17px;
  content: "";
  opacity: .7;
  background: linear-gradient(180deg, rgba(210, 173, 98, 0), rgba(210, 173, 98, .38) 38%, rgba(210, 173, 98, .74));
  border-radius: 999px;
  box-shadow: none;
  transform: rotate(var(--cord-angle, 0deg));
  transform-origin: 50% 100%;
}

.volume-ornament svg { display: block; width: 100%; height: 100%; overflow: visible; }

@keyframes volume-ornament-sway {
  from { transform: translate(-50%, -50%) translateZ(var(--volume-depth, 80px)) rotateY(-2deg) rotateZ(calc(var(--volume-rotation, 0deg) - 1.5deg)); }
  to { transform: translate(-50%, -50%) translateZ(var(--volume-depth, 80px)) rotateY(2deg) rotateZ(calc(var(--volume-rotation, 0deg) + 1.5deg)); }
}

.volume-photo {
  position: absolute;
  width: 78px;
  height: 91px;
  padding: 5px 5px 12px;
  border: 1px solid rgba(109, 74, 39, .3);
  border-radius: 5px;
  background: #fff4d9;
  box-shadow: 0 12px 18px rgba(20, 11, 6, .52), inset 0 0 0 1px rgba(255,255,255,.8);
  transform: translate(-50%, -50%) translateZ(var(--photo-depth, 110px)) rotateZ(var(--photo-rotation, 0deg));
  transform-style: preserve-3d;
}

.volume-photo i {
  position: absolute;
  z-index: -1;
  top: -17px;
  left: 50%;
  width: .8px;
  height: 18px;
  opacity: .7;
  background: linear-gradient(180deg, rgba(210, 173, 98, 0), rgba(210, 173, 98, .42) 42%, rgba(210, 173, 98, .76));
  border-radius: 999px;
  transform: rotate(var(--cord-angle, 0deg));
  transform-origin: 50% 100%;
}

.volume-photo img { width: 100%; height: 100%; border-radius: 2px; object-fit: cover; }

.volume-photo-empty {
  display: grid;
  place-items: center;
  color: #8b7155;
  background:
    linear-gradient(135deg, rgba(255,255,255,.72), transparent 48%),
    #e9dfc6;
}

.volume-photo-empty b {
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: .08em;
}

.final-tree-scene {
  height: 570px;
  perspective: 1200px;
  background:
    radial-gradient(ellipse at 50% 48%, rgba(226, 183, 87, .22), transparent 43%),
    linear-gradient(160deg, #153825, #071d13 78%);
}

.final-greeting {
  position: absolute;
  z-index: 12;
  top: 13px;
  right: 0;
  left: 0;
  display: grid;
  gap: 1px;
  justify-items: center;
  color: #fff4d6;
  text-shadow: 0 3px 12px rgba(0,0,0,.55);
}

.final-greeting span { color: #d8bb78; font-size: 7px; letter-spacing: .2em; }
.final-greeting strong { font-size: 25px; font-weight: 500; letter-spacing: .16em; }

.final-tree-volume {
  position: absolute;
  z-index: 3;
  top: 48px;
  right: 0;
  bottom: 34px;
  left: 0;
  width: auto;
  height: auto;
}

.final-tree-shell {
  width: 100%;
  height: 100%;
  animation: final-tree-turn 8s ease-in-out infinite;
}

@keyframes final-tree-turn {
  0%, 100% { transform: rotateX(1.5deg) rotateY(-7deg) scale(.92); }
  50% { transform: rotateX(1deg) rotateY(7deg) scale(.94); }
}

.final-tree-volume .volume-photo {
  width: 63px;
  height: 74px;
  padding: 4px 4px 10px;
}

.final-tree-volume .volume-ornament { filter: drop-shadow(0 5px 4px rgba(24, 13, 7, .52)); }
.final-tree-scene .name-tag { z-index: 10; }
.final-tree-scene .wish-plaque { z-index: 13; bottom: 3%; }

.showcase-aura {
  position: absolute;
  z-index: 1;
  width: 76%;
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: .06;
  background: radial-gradient(circle, rgba(255,220,140,.86), rgba(255,190,68,.25) 42%, transparent 70%);
  filter: blur(14px);
  transform: scale(.65);
  transition: opacity 1.4s ease, transform 1.4s ease;
}

.tree-showcase.lights-on .showcase-aura {
  opacity: .58;
  transform: scale(1.08);
  animation: aura-pulse 3s ease-in-out infinite;
}

@keyframes aura-pulse {
  50% { opacity: .42; transform: scale(1); }
}

.showcase-floor {
  position: absolute;
  z-index: 2;
  bottom: 3%;
  width: 74%;
  height: 7%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,221,151,.28), rgba(0,0,0,.15) 55%, transparent 73%);
  filter: blur(8px);
}

.showcase-snow {
  position: absolute;
  z-index: 0;
  inset: -80px 0 0;
  opacity: .5;
  pointer-events: none;
  background-image:
    radial-gradient(circle, #fff 0 1px, transparent 1.7px),
    radial-gradient(circle, rgba(255,248,223,.9) 0 1.4px, transparent 2px);
  background-size: 62px 78px, 93px 111px;
  animation: showcase-snow 9s linear infinite;
}

@keyframes showcase-snow {
  to { transform: translate3d(17px, 80px, 0); }
}

.showcase-controls {
  position: relative;
  z-index: 5;
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
}

.showcase-controls button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  color: #fff8e7;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(9px);
  box-shadow: inset 0 1px rgba(255,255,255,.12);
  cursor: pointer;
}

.showcase-controls button:first-child,
.showcase-controls button:last-child {
  padding: 0;
  font-size: 20px;
}

#autoRotateButton[aria-pressed="true"] {
  border-color: rgba(222,181,91,.55);
  color: #f4d88e;
  background: rgba(181,127,48,.18);
}

.tree-showcase > p {
  position: relative;
  z-index: 5;
  margin: 11px 0 0;
  color: rgba(255,248,229,.62);
  font-size: 10px;
}

@media (min-width: 900px) {
  .phone-shell {
    margin-bottom: 0;
  }
}

@media (max-width: 560px) {
  body {
    background: var(--paper);
  }

  .winter-corner,
  .campaign-heading,
  .campaign-footer {
    display: none;
  }

  .phone-shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .app-header {
    padding-top: max(10px, env(safe-area-inset-top));
  }

  .app-screen {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 380px) {
  .step-line { width: 25px; }
  .step-dot { min-width: 43px; }
  .tree-scene { height: 470px; }
  .photo-drop { height: 210px; }
  .decoration-option span { font-size: 9px; }
  .final-tree-scene { height: 470px; }
}

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