
      button, [role="button"], select, summary, input:not([type="checkbox"], [type="radio"]) { min-height: 2rem; }
      * { box-sizing: border-box; }
      html, body { height: 100%; }
      body {
        margin: 0;
        font-family: "Noto Serif SC", "Songti SC", serif;
        background: #141c33;
        color: #f5ead9;
        overflow: hidden;
      }

      /* ---------- Scene ---------- */
      #scene {
        position: fixed; inset: 0;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
      }
      #scene svg { display: block; width: 100%; height: 100%; }

      .plaque { cursor: pointer; }
      .plaque .hang {
        transform-box: fill-box;
        transform-origin: 50% 0%;
        animation: sway 5.2s ease-in-out infinite;
      }
      .plaque:hover .board { filter: brightness(1.12); }
      .plaque.glow .board { filter: drop-shadow(0 0 7px rgba(255,209,102,.85)); }
      .plaque.mine .board { stroke: #ffd98a; stroke-width: 2.4; }
      @keyframes sway {
        0%, 100% { transform: rotate(-2.6deg); }
        50% { transform: rotate(2.6deg); }
      }
      .lantern-glow { animation: flicker 3.4s ease-in-out infinite; }
      @keyframes flicker { 0%,100% { opacity: .85; } 50% { opacity: 1; } }
      .star { animation: twinkle 3s ease-in-out infinite; }
      @keyframes twinkle { 0%,100% { opacity: .25; } 50% { opacity: .95; } }
      /* SVG elements do not reliably honour the HTML hidden attribute.
         Keep every variant-toggled layer here so only the active scene renders. */
      #moonGroup[hidden], #moonPaleGroup[hidden], #moonGoldGroup[hidden],
      #sunGroup[hidden], #starsGroup[hidden], #templeGroup[hidden],
      #mountainFar[hidden], #mountainMid[hidden], #mountainNear[hidden],
      #hillFar[hidden], #hillMid[hidden], #hillNear[hidden], #horizonHaze[hidden],
      #lakeGroup[hidden], #cityGroup[hidden], #lanternStreetGroup[hidden],
      #willowStrandsGroup[hidden], #lanternLeft[hidden], #lanternRight[hidden],
      #christmasBackdrop[hidden], #christmasGround[hidden], #christmasTree[hidden]
      { display: none; }

      /* Theme-specific background motion. */
      .lake-shimmer { animation: shimmer 4.2s ease-in-out infinite alternate; }
      @keyframes shimmer { from { opacity: .18; } to { opacity: .55; } }
      .lake-mist { animation: mistDrift 12s ease-in-out infinite alternate; }
      @keyframes mistDrift { from { transform: translateX(-24px); } to { transform: translateX(24px); } }
      .lantern-sway {
        transform-box: fill-box; transform-origin: 50% 0%;
        animation: lanternSway 4.6s ease-in-out infinite;
      }
      @keyframes lanternSway {
        0%, 100% { transform: rotate(-3deg); }
        50% { transform: rotate(3deg); }
      }
      .lantern-glowpulse { animation: lanternPulse 3.2s ease-in-out infinite; }
      @keyframes lanternPulse { 0%, 100% { opacity: .24; } 50% { opacity: .5; } }

      /* ---------- Ambient layers ---------- */
      #petals, #fireflies, #fx { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
      #petals { z-index: 3; }
      #fireflies { z-index: 4; }
      #fx { z-index: 30; }
      .petal {
        position: absolute; top: -4vh;
        background: radial-gradient(ellipse at 35% 35%, #ffd7e4, #f2a7bf 70%);
        border-radius: 90% 6% 90% 6%;
        opacity: .85;
        animation: fall linear infinite;
      }
      /* Red maple sunset: same falling DOM, restyled as autumn leaves. */
      #petals.maple .petal {
        background: radial-gradient(ellipse at 30% 30%, #eda13c, #e2703a 62%, #d94f30 100%);
        border-radius: 4px 85% 4px 85%;
      }
      #petals.maple .petal:nth-child(3n) {
        background: radial-gradient(ellipse at 30% 30%, #e88a4a, #d94f30 70%);
      }
      #petals.maple .petal:nth-child(3n + 1) {
        background: radial-gradient(ellipse at 30% 30%, #f0b85c, #eda13c 70%);
      }
      /* Health: pale green light dust floating over the lake. */
      #petals.willow .petal {
        width: 6px !important; height: 6px !important;
        background: radial-gradient(circle, #eaffb0 0%, rgba(234,255,176,.5) 45%, transparent 72%);
        border-radius: 50%;
      }
      /* Career: gold ginkgo fans falling like rain. */
      #petals.ginkgo .petal {
        width: 12px !important; height: 13px !important;
        background: linear-gradient(180deg, #f7dd8f, #eec25e 62%, #dfa32e);
        border-radius: 2px;
        clip-path: polygon(0 0, 100% 0, 60% 100%, 40% 100%);
      }
      #petals.ginkgo .petal:nth-child(3n) { background: linear-gradient(180deg, #f2cd6b, #dfa32e); }
      /* Wealth: small gold coins. */
      #petals.lantern .petal {
        width: 12px !important; height: 12px !important;
        background: radial-gradient(circle at 35% 30%, #fff0ad, #f2c14e 62%, #c98f1f);
        border: 1px solid rgba(255, 236, 160, .7);
        border-radius: 50%;
      }
      /* Christmas: hide the petal shower and let dedicated snowflakes fall. */
      #petals.christmas .petal { display: none; }
      .snow {
        position: absolute; top: -6vh; display: none;
        border-radius: 50%;
        background: radial-gradient(circle, #ffffff 0%, #eaf3ff 48%, rgba(234,243,255,0) 74%);
        box-shadow: 0 0 6px rgba(234,243,255,.55);
        opacity: .9;
        animation: snowFall linear infinite;
      }
      #petals.christmas .snow { display: block; }
      @keyframes snowFall {
        0% { transform: translate3d(0, -6vh, 0); }
        25% { transform: translate3d(2.4vw, 26vh, 0); }
        50% { transform: translate3d(-1.8vw, 52vh, 0); }
        75% { transform: translate3d(1.6vw, 78vh, 0); }
        100% { transform: translate3d(0.4vw, 108vh, 0); }
      }
      /* Broadleaf-only ground details (stone path, grass) are hidden on Christmas. */
      #treeSvg.christmas .christmas-hide { display: none; }
      .christmas-light { animation: christmasTwinkle 2.6s ease-in-out infinite; }
      @keyframes christmasTwinkle {
        0%, 100% { opacity: .35; }
        50% { opacity: 1; }
      }
      .christmas-star { animation: christmasStar 3.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
      @keyframes christmasStar {
        0%, 100% { opacity: .82; filter: drop-shadow(0 0 8px rgba(255,229,150,.75)); }
        50% { opacity: 1; filter: drop-shadow(0 0 20px rgba(255,229,150,1)); }
      }
      @keyframes fall {
        0% { transform: translate3d(0, -4vh, 0) rotate(0deg); }
        25% { transform: translate3d(3.2vw, 26vh, 0) rotate(140deg); }
        50% { transform: translate3d(-1.6vw, 52vh, 0) rotate(250deg); }
        75% { transform: translate3d(2.6vw, 78vh, 0) rotate(330deg); }
        100% { transform: translate3d(0.6vw, 106vh, 0) rotate(430deg); }
      }
      .firefly {
        position: absolute; border-radius: 50%;
        background: radial-gradient(circle, #fff3b0 0%, rgba(255, 225, 130, .55) 45%, transparent 72%);
        animation: drift ease-in-out infinite alternate, glow 2.6s ease-in-out infinite;
      }
      @keyframes drift {
        from { transform: translate(0, 0); }
        to { transform: translate(var(--dx), var(--dy)); }
      }
      @keyframes glow { 0%,100% { opacity: .15; } 50% { opacity: .95; } }
      .spark {
        position: absolute; width: 7px; height: 7px; border-radius: 50%;
        background: radial-gradient(circle, #fff6cf, rgba(255, 214, 120, 0) 70%);
        animation: burst .9s ease-out forwards;
      }
      @keyframes burst {
        from { transform: translate(0,0) scale(1); opacity: 1; }
        to { transform: translate(var(--sx), var(--sy)) scale(.3); opacity: 0; }
      }
      /* Local petal shower when a paid plaque reaches its branch. */
      .ritual-petal {
        position: absolute; width: 11px; height: 15px;
        border-radius: 90% 6% 90% 6%;
        background: radial-gradient(ellipse at 35% 35%, #ffe3ec, #f0a7c1 72%);
        box-shadow: 0 0 6px rgba(255, 206, 224, .5);
        pointer-events: none; opacity: 0;
        animation: ritualPetalFall var(--pdur, 1600ms) ease-in forwards;
      }
      @keyframes ritualPetalFall {
        0% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(.6); }
        12% { opacity: .95; }
        100% {
          opacity: 0;
          transform: translate(var(--pdx, 40px), var(--pdy, 160px))
            rotate(var(--prot, 180deg)) scale(1);
        }
      }

      /* ---------- Flying plaque (ritual) ---------- */
      #flyPlaque {
        position: fixed; z-index: 25; width: 54px; pointer-events: none;
        display: none; filter: drop-shadow(0 10px 14px rgba(0,0,0,.45));
      }

      /* ---------- Avatar ---------- */
      #avatar {
        position: fixed; z-index: 6; width: 92px; height: 118px;
        left: 50%; bottom: 4.5vh;
        /* Climb vars are driven by the paid hang ritual only; defaults keep
           walking / flip / free-wish creation exactly as before. */
        transform: translateX(-50%) translateY(calc(-1 * var(--climb-y, 0px)))
          rotate(var(--climb-tilt, 0deg)) scale(var(--climb-scale, 1));
        pointer-events: auto; cursor: pointer;
        transition: none;
        -webkit-tap-highlight-color: transparent;
      }
      #avatar .bob { animation: bob 2.6s ease-in-out infinite; transform-origin: 50% 100%; }
      #avatar.walking .bob { animation: walkbob .34s ease-in-out infinite; }
      #avatar.climbing .bob { animation: walkbob .5s ease-in-out infinite; }
      #avatar.flip .fig { transform: scaleX(-1); }
      .fig { transform-origin: 50% 50%; transition: transform .18s; }
      @keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
      @keyframes walkbob { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-6px) rotate(2deg); } }
      #avatar .shadow {
        position: absolute; left: 50%; bottom: -4px; width: 62px; height: 12px;
        transform: translateX(-50%);
        background: radial-gradient(ellipse, rgba(5,8,20,.5), transparent 70%);
        border-radius: 50%;
      }
      /* The little person carries the paid plaque in hand while walking over
         to hang it. Purely decorative: absolute + pointer-events keeps the
         avatar's size and click target unchanged. */
      #avatar::after {
        content: ''; position: absolute; top: 54px; right: 6px;
        width: 20px; height: 30px; border-radius: 4px;
        background: var(--carry-color, #a97a4f);
        border: 2px solid var(--carry-edge, #6b4a2c);
        box-shadow: 0 3px 7px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,238,203,.28);
        transform: rotate(8deg) scale(.6); transform-origin: 50% 0;
        opacity: 0; pointer-events: none;
        transition: opacity .18s ease, transform .18s ease;
      }
      #avatar.carrying::after { opacity: 1; transform: rotate(8deg) scale(1); }
      /* Short reach as the plaque leaves the hand for the branch. */
      #avatar.hanging .fig { animation: hangReach .42s ease-out 1; transform-origin: 50% 80%; }
      @keyframes hangReach {
        0%, 100% { transform: rotate(0) translateY(0); }
        45% { transform: rotate(-7deg) translateY(-4px); }
      }

      /* ---------- Header ---------- */
      header {
        position: fixed; top: 0; left: 0; right: 0; z-index: 10;
        text-align: center; padding: 20px 16px 0; pointer-events: none;
      }
      /* Soft atmospheric scrim: only the centred header area is darkened, so
         the moon/tree and the top-right language switcher stay unobstructed. */
      header::before {
        content: ''; position: absolute; inset: 0 0 auto; height: 150px;
        z-index: -1; pointer-events: none;
        background: radial-gradient(ellipse 60% 100% at 50% 0%,
          rgba(12, 17, 34, .62) 0%, rgba(12, 17, 34, .32) 42%,
          rgba(12, 17, 34, .10) 62%, transparent 72%);
      }
      header h1 {
        /* Keep the centred title glyphs clear of the top-left pills and the
           top-right language switcher on desktop; mobile stacks them above. */
        max-width: calc(100% - 480px); margin-inline: auto;
        font-family: "Ma Shan Zheng", "Noto Serif SC", serif;
        font-size: clamp(40px, 7vw, 64px); font-weight: 400; letter-spacing: .14em;
        color: #fdf3dd;
        text-shadow: 0 1px 2px rgba(0,0,0,.95), 0 3px 12px rgba(0,0,0,.6),
                     0 2px 22px rgba(255, 176, 102, .45);
      }
      header p {
        margin: 6px 0 0; font-size: clamp(13px, 2.4vw, 16px); letter-spacing: .42em;
        color: rgba(216, 231, 255, .94);
        text-shadow: 0 1px 3px rgba(8, 12, 28, .95), 0 2px 12px rgba(8, 12, 28, .6);
      }
      /* Language switcher stays in the top-right on desktop and mobile. */
      .lang-switch {
        position: absolute; top: 18px; right: 16px; z-index: 11;
        display: inline-flex; gap: 3px; padding: 3px;
        background: rgba(16, 20, 38, .62); border: 1px solid rgba(255, 214, 150, .32);
        border-radius: 999px; backdrop-filter: blur(6px); pointer-events: auto;
      }
      .lang-select {
        font-family: inherit; cursor: pointer; min-height: 32px; max-width: 126px;
        border: 0; border-radius: 999px; padding: 5px 28px 5px 12px;
        background: transparent; color: #f7e8c9; font-size: 12px; font-weight: 600;
        letter-spacing: .04em; appearance: none;
        background-image: linear-gradient(45deg, transparent 50%, #f7e8c9 50%),
          linear-gradient(135deg, #f7e8c9 50%, transparent 50%);
        background-position: calc(100% - 13px) 14px, calc(100% - 8px) 14px;
        background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
      }
      .lang-select:focus-visible { outline: 2px solid #ffd98a; outline-offset: 2px; }
      .lang-select option { color: #1b2340; background: #fdf7e7; }

      /* ---------- Bottom bar ---------- */
      #bar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 12;
        display: flex; align-items: flex-end; justify-content: space-between;
        gap: 12px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
        pointer-events: none;
      }
      #bar > * { pointer-events: auto; }
      .count-chip {
        display: inline-flex; align-items: center; gap: 8px;
        background: rgba(16, 20, 38, .62); border: 1px solid rgba(255, 214, 150, .28);
        backdrop-filter: blur(6px);
        color: #f7e8c9; border-radius: 999px; padding: 9px 16px;
        font-family: inherit; font-size: 14px; letter-spacing: .06em; min-height: 40px;
        cursor: pointer; max-width: min(360px, calc(100vw - 32px));
      }
      .count-chip:hover { border-color: #ffd98a; }
      .count-chip:focus-visible { outline: 2px solid #ffd98a; outline-offset: 2px; }
      .count-chip b { color: #ffd98a; font-size: 17px; }
      .count-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: #ff9db4; box-shadow: 0 0 8px #ff9db4; flex: none; }
      .count-chip #countText { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .chip-chevron { font-size: 11px; line-height: 1; opacity: .8; flex: none; transition: transform .15s ease; }
      .count-chip[aria-expanded="true"] .chip-chevron { transform: rotate(180deg); }

      /* Quick switcher: anchored by JS above the chip, never a full-screen veil. */
      .tree-picker {
        position: fixed; z-index: 14; left: 16px; bottom: 72px;
        width: min(340px, calc(100vw - 24px)); max-height: 50vh;
        display: flex; flex-direction: column; box-sizing: border-box;
        background: rgba(16, 20, 38, .88); border: 1px solid rgba(255, 214, 150, .34);
        border-radius: 14px; backdrop-filter: blur(10px);
        box-shadow: 0 18px 46px rgba(0, 0, 0, .52);
        color: #f7e8c9; overflow: hidden; overflow-y: auto;
        overscroll-behavior: contain; animation: rise .18s ease-out;
      }
      .tree-picker[hidden] { display: none; }
      .tree-picker-title {
        padding: 10px 14px 8px; font-size: 13px; font-weight: 600;
        letter-spacing: .08em; color: #ffe6a3;
        border-bottom: 1px solid rgba(255, 214, 150, .18);
      }
      .tree-picker-list { overflow-y: auto; padding: 6px 8px 4px; scrollbar-width: thin; }
      .tree-picker-group { margin: 2px 0 4px; }
      .tree-picker-group h3 {
        margin: 6px 6px 4px; font-size: 11px; font-weight: 600;
        letter-spacing: .14em; color: #c8a874;
      }
      .tree-picker-row {
        display: grid; grid-template-columns: minmax(0, 1fr) auto;
        align-items: center; gap: 8px; width: 100%; min-height: 42px;
        margin: 2px 0; padding: 7px 9px; font-family: inherit; text-align: left;
        cursor: pointer; color: #f7e8c9;
        background: rgba(255, 255, 255, .04);
        border: 1px solid rgba(255, 214, 150, .14); border-radius: 9px;
      }
      .tree-picker-row:hover, .tree-picker-row:focus-visible {
        background: rgba(255, 214, 150, .12); border-color: rgba(255, 214, 150, .5);
      }
      .tree-picker-row:focus-visible { outline: 2px solid #ffd98a; outline-offset: 1px; }
      .tree-picker-row.current { border-color: #ffb45c; background: rgba(216, 78, 51, .24); }
      .tree-picker-row.full { opacity: .82; }
      .tree-picker-name { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; font-weight: 600; }
      .tree-picker-name-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .tree-picker-check { flex: none; color: #ffd98a; font-size: 13px; }
      .tree-picker-meta {
        display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
        font-size: 11px; color: #e8cfa4; white-space: nowrap;
      }
      .tree-picker-badge {
        padding: 1px 6px; border-radius: 999px; font-size: 10px; color: #ffe6a3;
        border: 1px solid rgba(255, 214, 150, .3);
      }
      .tree-picker-badge.full { border-color: rgba(255, 157, 180, .45); color: #ffb3c4; }
      .tree-picker-badge.current { border-color: #ffb45c; color: #ffd98a; }
      .tree-picker-empty { padding: 14px; font-size: 12px; color: #c8a874; text-align: center; }
      .tree-picker-footer {
        width: 100%; min-height: 38px; padding: 8px 12px; font-family: inherit;
        cursor: pointer; color: #ffe6a3; font-size: 12px; letter-spacing: .06em;
        text-decoration: underline; text-underline-offset: 3px;
        background: rgba(255, 255, 255, .03);
        border: 0; border-top: 1px solid rgba(255, 214, 150, .18);
      }
      .tree-picker-footer:hover, .tree-picker-footer:focus-visible {
        background: rgba(255, 214, 150, .12); outline: 2px solid #ffd98a; outline-offset: -2px;
      }
      /* The three bar actions share one size; only 挂愿望 is primary. */
      #myBtn, #findBtn, #wishBtn {
        font-family: inherit; cursor: pointer;
        font-size: 15px; font-weight: 600; letter-spacing: .12em; text-indent: .12em;
        padding: 13px 22px; min-width: 128px; min-height: 50px;
        border-radius: 999px; transition: transform .15s, box-shadow .15s;
      }
      #wishBtn {
        background: linear-gradient(180deg, #d84e33, #b73320);
        color: #fff6e6; border: 1px solid rgba(255, 220, 160, .55);
        box-shadow: 0 8px 26px rgba(183, 51, 32, .5), inset 0 1px 0 rgba(255,255,255,.25);
      }
      #wishBtn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(183, 51, 32, .6), inset 0 1px 0 rgba(255,255,255,.25); }
      #wishBtn:active { transform: translateY(0); }
      #wishBtn:disabled { opacity: .55; cursor: wait; transform: none; }
      .hint {
        font-size: 12.5px; color: rgba(247, 232, 201, .75); letter-spacing: .08em;
        text-shadow: 0 1px 6px rgba(0,0,0,.7); align-self: center;
      }
      @media (max-width: 640px) { .hint { display: none; } }

      /* ---------- Modal / popover shared ---------- */
      .veil {
        position: fixed; inset: 0; z-index: 40;
        background: rgba(8, 10, 24, .55); backdrop-filter: blur(3px);
        display: none; align-items: center; justify-content: center; padding: 18px;
      }
      .veil.open { display: flex; }
      .card {
        width: min(430px, 100%);
        background: linear-gradient(175deg, #fdf6e3, #f6e7c8);
        color: #4a3220; border-radius: 14px;
        border: 1px solid #d9b878;
        box-shadow: 0 24px 60px rgba(0,0,0,.5), inset 0 0 0 5px rgba(255,255,255,.35);
        padding: 26px 26px 22px; position: relative;
        animation: rise .28s ease-out;
      }
      @keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
      .card::before {
        content: ""; position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
        width: 9px; height: 9px; border-radius: 50%;
        background: #b73320; box-shadow: 0 0 0 3px rgba(183,51,32,.18);
      }
      .card h2 {
        margin: 8px 0 4px; text-align: center; font-size: 22px; font-weight: 900; letter-spacing: .18em;
      }
      .card .sub { text-align: center; font-size: 13px; color: #8a6a45; margin: 0 0 16px; letter-spacing: .1em; }
      .card label { display: block; font-size: 13.5px; font-weight: 600; letter-spacing: .1em; margin: 14px 0 6px; color: #6d4c2a; }
      .card textarea, .card input[type="text"] {
        width: 100%; font-family: inherit; color: #4a3220;
        background: rgba(255, 255, 255, .65); border: 1px solid #cdb083; border-radius: 8px;
        padding: 11px 12px; font-size: 16px; line-height: 1.55; resize: none;
      }
      .card textarea:focus, .card input[type="text"]:focus { outline: 2px solid #c8542f; outline-offset: 1px; }
      .charcount { text-align: right; font-size: 12px; color: #a5875f; margin-top: 4px; }
      .swatches { display: flex; gap: 10px; margin-top: 2px; }
      .swatch {
        width: 44px; height: 44px; border-radius: 10px; cursor: pointer; padding: 0;
        border: 2px solid rgba(0,0,0,.12);
      }
      .swatch[aria-checked="true"] { border-color: #4a3220; box-shadow: 0 0 0 3px rgba(200, 84, 47, .35); }
      #wishForm { max-height: 88vh; overflow-y: auto; }
      .swatches[hidden], .field-hint[hidden], .free-color[hidden],
      #treeChoiceSection[hidden] { display: none; }
      .free-color { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
      .swatch.locked {
        cursor: default; border-color: #6d4c2a;
        box-shadow: 0 0 0 3px rgba(169, 122, 79, .28);
      }
      .free-color-text { font-size: 13px; color: #6d4c2a; }
      .field-hint { margin: 6px 0 0; font-size: 12px; line-height: 1.5; color: #8a6a45; }
      .tree-choice-list {
        display: flex; flex-direction: column; gap: 6px; margin-top: 2px;
        max-height: 132px; overflow-y: auto; padding: 2px; scrollbar-width: thin;
      }
      .tree-choice-row {
        display: flex; align-items: center; gap: 9px; min-height: 40px;
        padding: 7px 9px; cursor: pointer;
        background: rgba(255,255,255,.6); border: 1px solid #cdb083; border-radius: 9px;
      }
      .tree-choice-row:focus-within { outline: 2px solid #c8542f; outline-offset: 1px; }
      .tree-choice-row input { flex: none; width: 16px; height: 16px; accent-color: #b73320; }
      .tree-choice-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
      .tree-choice-name {
        font-size: 13px; font-weight: 600; white-space: nowrap;
        overflow: hidden; text-overflow: ellipsis;
      }
      .tree-choice-meta { font-size: 11px; color: #8a6a45; }
      .tree-choice-status {
        flex: none; margin-left: auto; padding: 1px 6px; border-radius: 999px;
        font-size: 10px; color: #8a4b2c; border: 1px solid #c9a46f;
      }
      .tree-choice-status.full { border-color: #c98fa0; color: #a03d58; }
      .card .actions { display: flex; gap: 10px; margin-top: 22px; }
      .btn {
        flex: 1; font-family: inherit; cursor: pointer; border-radius: 999px;
        font-size: 16px; letter-spacing: .14em; padding: 12px 10px; min-height: 48px;
      }
      .btn.ghost { background: transparent; border: 1px solid #b99c6d; color: #6d4c2a; }
      .btn.primary {
        background: linear-gradient(180deg, #d84e33, #b73320); color: #fff6e6;
        border: 1px solid #93301f; font-weight: 600;
        box-shadow: 0 6px 16px rgba(183, 51, 32, .35);
      }

      /* ---------- Wish detail ---------- */
      #detailCard { text-align: center; max-height: 88vh; overflow-y: auto; }
      #detailCard .wish-text {
        font-size: clamp(21px, 5.4vw, 27px); font-weight: 900; line-height: 1.6;
        letter-spacing: .05em; margin: 14px 6px 8px; color: #59371c;
        white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
      }
      #detailCard .wish-from { font-size: 14px; color: #8a6a45; letter-spacing: .12em; }
      #detailCard .mine-badge {
        display: none; margin: 10px auto 0; width: fit-content;
        background: #b73320; color: #ffeecb; font-size: 12.5px; letter-spacing: .2em;
        padding: 5px 14px 5px 16px; border-radius: 999px;
      }
      #detailCard.mine .mine-badge { display: block; }
      #detailCard .close-row { margin-top: 20px; }
      #detailCard .close-row .btn { flex: none; width: 100%; }

      /* ---------- Toast ---------- */
      #toast {
        position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 16px);
        z-index: 50; background: rgba(20, 24, 44, .88); color: #ffeecb;
        border: 1px solid rgba(255, 214, 150, .4); border-radius: 999px;
        padding: 11px 24px; font-size: 15px; letter-spacing: .12em;
        opacity: 0; pointer-events: none; transition: opacity .35s, transform .35s;
        white-space: nowrap;
      }
      #toast.show { opacity: 1; transform: translate(-50%, 0); }

      @media (prefers-reduced-motion: reduce) {
        .plaque .hang, #avatar .bob, #avatar.hanging .fig, .petal, .snow, .firefly, .star,
        .lantern-glow, .lake-shimmer, .lake-mist, .lantern-sway, .lantern-glowpulse,
        .christmas-light, .christmas-star {
          animation: none !important;
        }
        #avatar::after { transition: none !important; }
      }

      /* ---------- Milestone 1 additions ---------- */
      #myBtn, #findBtn {
        background: rgba(16, 20, 38, .62); color: #f7e8c9;
        border: 1px solid rgba(255, 214, 150, .4);
        backdrop-filter: blur(6px);
      }
      #myBtn:hover, #findBtn:hover { border-color: #ffd98a; }
      .card.wide { width: min(560px, 100%); max-height: 86vh; overflow-y: auto; }
      .claim-row { display: flex; gap: 8px; margin: 12px 0; }
      .claim-row input {
        flex: 1; min-width: 0; font-family: inherit; font-size: 15px;
        color: #4a3220; background: rgba(255,255,255,.7);
        border: 1px solid #cdb083; border-radius: 8px; padding: 10px 12px;
      }
      .btn.small { flex: none; min-height: 44px; padding: 8px 16px; font-size: 14px; }
      .my-list { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
      .my-item {
        background: rgba(255,255,255,.55); border: 1px solid #d9c096;
        border-radius: 10px; padding: 12px 14px; font-size: 14px;
      }
      .my-item .wish-content { font-size: 17px; font-weight: 600; color: #59371c; line-height: 1.5; }
      .my-item .meta { color: #8a6a45; font-size: 12.5px; margin-top: 6px; line-height: 1.6; }
      .my-item .code { color: #a03d26; font-weight: 700; letter-spacing: .06em; }
      .my-item .tag { display: inline-block; border-radius: 999px; padding: 2px 10px; margin-left: 6px;
        background: #efe0bd; font-size: 12px; }
      .my-item .row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
      .my-item .row button {
        font-family: inherit; cursor: pointer; min-height: 36px; padding: 6px 12px;
        font-size: 13px; border-radius: 999px; border: 1px solid #b99c6d;
        background: transparent; color: #6d4c2a;
      }
      .my-item .row button.primary { background: #b73320; color: #ffeecb; border-color: #93301f; }
      .my-empty { text-align: center; color: #8a6a45; font-size: 14px; padding: 22px 6px; line-height: 1.8; }
      .plan-list { display: flex; flex-direction: column; gap: 6px; }
      .plan-option {
        display: flex; align-items: center; flex-wrap: wrap; gap: 4px 9px;
        font-size: 14px; color: #5c4029; min-height: 38px;
        padding: 6px 4px; cursor: pointer;
      }
      .plan-option input { accent-color: #b73320; width: 18px; height: 18px; flex: none; }
      .plan-option .price { margin-left: auto; color: #a03d26; font-size: 13px; font-weight: 700; }
      .plan-option .plan-features {
        flex-basis: 100%; padding-left: 27px; font-size: 11.5px;
        line-height: 1.45; color: #8a6a45;
      }
      .free-rule {
        background: #fff2d4; border: 1px solid #e0bb78; border-radius: 8px;
        padding: 9px 12px; margin: 10px 0 0; font-size: 12.5px; line-height: 1.6; color: #6d4c2a;
      }
      .my-item .rule-note { font-size: 12px; color: #a03d26; margin-top: 6px; letter-spacing: .04em; }
      .payment-notice {
        background: #fff2d4; border: 1px solid #e0bb78; border-radius: 8px;
        padding: 9px 12px; font-size: 12.5px; line-height: 1.6; color: #6d4c2a; margin: 10px 0 0;
      }
      .mine-link { display: none; width: 100%; margin-top: 12px; min-height: 40px; font-size: 14px; }
      #detailCard.mine .mine-link { display: block; }
      .claim-code { text-align: center; font-size: 20px; letter-spacing: .14em; color: #a03d26; font-weight: 700; }

      /* ---------- Locate a recovered wish ---------- */
      .detail-extra { display: none; gap: 8px; margin-top: 12px; }
      #detailCard.mine .detail-extra { display: flex; }
      .detail-extra .btn { min-height: 40px; font-size: 13px; padding: 9px 12px; }
      .detail-extra #detailMyLink { flex: 1; }
      .detail-extra #detailLocate { flex: none; width: 72px; }
      .plaque.found .board { stroke: #ffe6a3; stroke-width: 3.4; filter: drop-shadow(0 0 10px rgba(255,220,140,.95)); animation: foundPulse 1s ease-in-out infinite; }
      .found-ring {
        pointer-events: none; transform-box: fill-box; transform-origin: 50% 50%;
        animation: foundRing 1s ease-out infinite;
      }
      @keyframes foundPulse {
        0%, 100% { filter: drop-shadow(0 0 6px rgba(255, 220, 140, .65)); }
        50% { filter: drop-shadow(0 0 16px rgba(255, 220, 140, 1)); }
      }
      @keyframes foundRing {
        0% { opacity: .9; transform: scale(.65); }
        100% { opacity: 0; transform: scale(1.5); }
      }
      @media (prefers-reduced-motion: reduce) {
        .plaque.found .board { animation: none !important; filter: drop-shadow(0 0 10px rgba(255,220,140,.95)); }
        .found-ring { animation: none !important; opacity: .9; }
      }

      /* ---------- Paid hang: the plaque lights up as it settles ---------- */
      /* Placed after .found so the light-up wins during its 2.5s window. */
      .plaque.just-hung .board { animation: justHung 2.5s ease-out 1; }
      @keyframes justHung {
        0% { filter: drop-shadow(0 0 2px rgba(255, 214, 120, .35)) brightness(1); }
        14% { filter: drop-shadow(0 0 22px rgba(255, 228, 150, 1)) brightness(1.55); }
        32% { filter: drop-shadow(0 0 9px rgba(255, 205, 110, .8)) brightness(1.15); }
        55% { filter: drop-shadow(0 0 18px rgba(255, 228, 150, .95)) brightness(1.35); }
        100% { filter: drop-shadow(0 0 6px rgba(255, 214, 120, .5)) brightness(1); }
      }
      @media (prefers-reduced-motion: reduce) {
        .plaque.just-hung .board {
          animation: none !important;
          filter: drop-shadow(0 0 14px rgba(255, 220, 140, .95)) brightness(1.2);
        }
        .ritual-petal { display: none !important; }
      }

      /* ---------- Recovered wish: the content is the point ---------- */
      #recoveredCard { width: min(520px, 100%); max-height: 88vh; overflow-y: auto; outline: none; }
      #recoveredCard .recovered-text {
        font-size: clamp(21px, 5.6vw, 28px); font-weight: 900; line-height: 1.7;
        letter-spacing: .05em; color: #59371c; text-align: left;
        white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
        background: rgba(255,255,255,.55); border: 1px solid #e0c397;
        border-radius: 10px; padding: 18px 16px; margin: 12px 0 16px;
      }
      .recovered-meta {
        background: rgba(255,255,255,.42); border-radius: 10px;
        padding: 10px 14px; font-size: 13px; color: #8a6a45; line-height: 1.7;
      }
      .recovered-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; }
      .recovered-key { flex: none; color: #a5875f; }
      .recovered-copy {
        font-family: inherit; cursor: pointer; min-height: 32px; padding: 2px 10px;
        margin-left: 8px; border-radius: 999px; border: 1px solid #b99c6d;
        background: transparent; color: #6d4c2a; font-size: 12px;
      }
      .recovered-actions { flex-wrap: wrap; }
      .recovered-actions .btn { min-height: 46px; font-size: 14px; padding: 11px 12px; }
      .recovered-actions .btn[hidden] { display: none; }

      /* ---------- 还愿 wall & confirmation ---------- */
      .wall-card { max-height: 88vh; display: flex; flex-direction: column; }
      .wall-count { color: #a03d26 !important; font-weight: 700; }
      .wall-list { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; margin: 4px -4px 0; padding: 2px 4px; }
      .wall-item {
        background: linear-gradient(180deg, rgba(255, 251, 237, .82), rgba(255, 240, 206, .68));
        border: 1px solid #d9b477; border-radius: 12px; padding: 12px 14px;
        box-shadow: 0 2px 10px rgba(120, 74, 22, .08);
      }
      .wall-text {
        margin: 0; font-size: 17px; font-weight: 600; color: #59371c;
        line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
      }
      .wall-meta { margin-top: 6px; font-size: 12.5px; color: #8a6a45; }
      .wall-gratitude {
        margin: 8px 0 0; padding-top: 8px; border-top: 1px dashed #d9c096;
        font-size: 13px; color: #a03d26; white-space: pre-wrap; overflow-wrap: anywhere;
      }
      #wallEmpty { line-height: 1.8; }
      #fulfillCard { width: min(480px, 100%); max-height: 88vh; overflow-y: auto; }
      .fulfill-text {
        font-size: 18px; font-weight: 600; color: #59371c;
        white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
      }
      .fulfill-warnings { margin: 12px 0; padding-left: 20px; color: #a03d26; font-size: 13px; line-height: 1.7; }
      .check-row {
        display: flex !important; align-items: center; gap: 8px;
        margin: 14px 0 4px !important; font-weight: 600 !important;
      }
      .check-row input { width: 18px; height: 18px; accent-color: #b73320; }
      #fulfillName:disabled { opacity: .5; }
      #fulfillCard .actions { margin-top: 18px; }

      /* ---------- Fulfillment ritual ---------- */
      #treeSvg.fulfill-lit {
        filter: drop-shadow(0 0 18px rgba(255, 214, 120, .7)) brightness(1.12);
        transition: filter .6s ease-out;
      }
      #treeSvg.fulfill-instant { transition: none; }
      #fx.fulfill-burst::before {
        content: ''; position: absolute; inset: 0;
        background: radial-gradient(ellipse 55% 60% at 50% 62%,
          rgba(255, 220, 130, .22), transparent 70%);
        animation: fulfillGlow 3.4s ease-out 1 forwards;
      }
      #fx.fulfill-burst.paid::before {
        background: radial-gradient(ellipse 65% 70% at 50% 62%,
          rgba(255, 231, 160, .38), rgba(255, 190, 90, .12) 48%, transparent 74%);
      }
      @keyframes fulfillGlow {
        0% { opacity: 0; } 18% { opacity: 1; } 70% { opacity: .75; } 100% { opacity: 0; }
      }
      /* 4-6s of the ritual: the stone lanterns under the tree ignite. */
      #treeSvg.fulfill-lantern #lanternLeft .lantern-glow,
      #treeSvg.fulfill-lantern #lanternRight .lantern-glow {
        transform-box: fill-box; transform-origin: center;
        animation: lanternIgnite 2.4s ease-out forwards;
      }
      @keyframes lanternIgnite {
        0% { opacity: .85; transform: scale(1); }
        32% { opacity: 1; transform: scale(1.85); }
        100% { opacity: 1; transform: scale(1.35); }
      }
      #treeSvg.fulfill-lantern #lanternLeft > rect,
      #treeSvg.fulfill-lantern #lanternRight > rect {
        fill: #fff3c4; filter: drop-shadow(0 0 9px #ffd489);
      }
      .fulfill-leaf {
        position: absolute; width: 18px; height: 26px; z-index: 31;
        border-radius: 80% 0 80% 0;
        background: linear-gradient(135deg, #ffd98a, #e3a84a);
        box-shadow: 0 0 14px rgba(255, 214, 120, .9);
      }
      .fulfill-leaf.paid {
        background: linear-gradient(135deg, #fff0bd, #ffbf5c);
        box-shadow: 0 0 22px rgba(255, 224, 140, 1), 0 0 42px rgba(255, 190, 80, .6);
      }
      @media (prefers-reduced-motion: reduce) {
        #treeSvg.fulfill-lit { filter: drop-shadow(0 0 14px rgba(255, 220, 140, .95)) brightness(1.2); }
        #treeSvg.fulfill-lantern .lantern-glow { animation: none !important; opacity: 1; transform: scale(1.5); }
        #fx.fulfill-burst::before { animation: none !important; opacity: .8; }
        .fulfill-leaf { display: none !important; }
      }

      /* ---------- Share image modal (3:4 portrait preview) ---------- */
      #shareCard { width: min(460px, 100%); max-height: 92vh; overflow-y: auto; }
      #shareCard .sub { margin-bottom: 10px; }
      #shareGenerating[hidden] { display: none; }
      .share-preview {
        width: min(320px, 100%); margin: 0 auto;
        background: rgba(255,255,255,.35); border-radius: 12px; overflow: hidden;
      }
      .share-preview img {
        display: block; width: 100%; height: auto; max-width: 100%;
        aspect-ratio: 3 / 4; object-fit: contain;
      }
      .share-preview img[hidden] { display: none; }
      #shareCanvas { display: none; }
      #shareCard .actions .btn[disabled] { opacity: .55; cursor: default; }
      @media (max-width: 640px) {
        #shareCard { max-height: 88vh; padding: 18px 14px 14px; }
        .share-preview { width: 100%; }
      }
      @media (max-width: 720px) {
        header::before {
          height: 136px;
          background: radial-gradient(ellipse 88% 100% at 50% 0%,
            rgba(12, 17, 34, .66) 0%, rgba(12, 17, 34, .30) 48%, transparent 76%);
        }
        /* Keep the subtitle on one readable line in the narrow frame. */
        header p {
          font-size: clamp(11px, 3vw, 13px); letter-spacing: .22em;
          color: rgba(216, 231, 255, .94);
          text-shadow: 0 1px 3px rgba(8, 12, 28, .95), 0 2px 12px rgba(8, 12, 28, .6);
        }
      }
      @media (max-width: 640px) {
        header h1 { max-width: none; }
        #bar {
          display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
          gap: 8px; align-items: center;
        }
        #bar > * { min-width: 0; }
        #bar .hint { display: none; }
        .count-chip {
          grid-column: 1 / -1; justify-self: center; white-space: nowrap;
          max-width: 100%; min-width: 0;
        }
        .tree-picker { border-radius: 12px; }
        .tree-picker-row { min-height: 40px; padding: 6px 8px; }
        .tree-picker-meta { font-size: 10px; }
        #myBtn, #findBtn, #wishBtn {
          width: 100%; min-width: 0; padding: 10px 8px;
          font-size: 13px; letter-spacing: .04em; text-indent: 0;
          min-height: 46px; white-space: nowrap;
        }
        .card { padding: 22px 18px 18px; }
        #recoveredCard .recovered-text { padding: 14px 12px; font-size: 20px; }
        .recovered-actions .btn { min-height: 44px; }
        .my-item .row button, .archive-more button, .wall-card .btn,
        #fulfillCard .btn { min-height: 44px; }
        .wall-card, #fulfillCard { max-height: 86vh; }
        .wall-text, .fulfill-text { font-size: 16px; }
        .lang-switch { top: 12px; right: 10px; }
        .lang-switch button { min-width: 44px; min-height: 44px; padding: 5px 8px; font-size: 11px; }
        @media (max-width: 400px) {
          .count-chip { padding: 7px 12px; font-size: 12px; min-height: 36px; }
          #myBtn, #findBtn, #wishBtn { font-size: 12px; letter-spacing: 0; padding-inline: 6px; }
        }
      }

      /* ---------- v1.3 forest UI ---------- */
      .forest-btn {
        position: absolute; top: 18px; left: 16px; z-index: 11;
        font-family: inherit; cursor: pointer; pointer-events: auto;
        min-width: 80px; min-height: 34px; padding: 6px 12px;
        background: rgba(16, 20, 38, .62); color: #ffeecb;
        border: 1px solid rgba(255, 214, 150, .42); border-radius: 999px;
        backdrop-filter: blur(6px); font-size: 13px; font-weight: 600; letter-spacing: .1em;
      }
      .forest-btn:hover { border-color: #ffd98a; }
      .forest-btn:focus-visible { outline: 2px solid #ffd98a; outline-offset: 2px; }
      /* The wall pill sits beside 许愿林; on narrow screens both stay above
         the title so neither can cover its glyphs. */
      .wall-btn {
        position: absolute; top: 18px; left: 104px; z-index: 11;
        font-family: inherit; cursor: pointer; pointer-events: auto;
        min-width: 80px; min-height: 34px; padding: 6px 12px;
        background: rgba(16, 20, 38, .62); color: #ffe6a3;
        border: 1px solid rgba(255, 214, 150, .42); border-radius: 999px;
        backdrop-filter: blur(6px); font-size: 13px; font-weight: 600; letter-spacing: .1em;
      }
      .wall-btn:hover, .wall-btn.pulse {
        border-color: #ffd98a;
        box-shadow: 0 0 0 3px rgba(255, 214, 120, .28), 0 0 22px rgba(255, 209, 102, .7);
      }
      .wall-btn:focus-visible { outline: 2px solid #ffd98a; outline-offset: 2px; }
      .tree-notice {
        position: fixed; top: 108px; left: 50%; z-index: 11;
        transform: translateX(-50%); max-width: calc(100vw - 24px);
        background: rgba(16, 20, 38, .78); color: #ffe6a3;
        border: 1px solid rgba(255, 214, 150, .38); border-radius: 999px;
        padding: 7px 14px; font-size: 12px; line-height: 1.4; text-align: center;
        letter-spacing: .04em; backdrop-filter: blur(6px);
      }
      .tree-notice[hidden] { display: none; }

      .theme-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 2px; }
      .theme-pill {
        font-family: inherit; cursor: pointer; min-height: 36px; padding: 7px 13px;
        border-radius: 999px; border: 1px solid #c4a570;
        background: rgba(255,255,255,.55); color: #6d4c2a; font-size: 13px;
      }
      .theme-pill[aria-checked="true"] {
        background: linear-gradient(180deg, #d84e33, #b73320);
        border-color: #93301f; color: #fff6e6;
        box-shadow: 0 3px 10px rgba(183, 51, 32, .3);
      }

      .forest-card { max-height: 86vh; display: flex; flex-direction: column; }
      .forest-list { overflow-y: auto; margin: 4px -4px 0; padding: 2px 4px; }
      .forest-theme { margin-top: 12px; }
      .forest-theme h3 {
        margin: 0 0 7px; font-size: 15px; color: #8a4b2c;
        letter-spacing: .12em; border-bottom: 1px solid #e0c397; padding-bottom: 4px;
      }
      .forest-theme-empty { font-size: 12.5px; color: #a5875f; padding: 4px 2px; }
      .forest-tree {
        display: flex; align-items: center; justify-content: space-between; gap: 10px;
        width: 100%; min-height: 44px; margin-top: 5px; padding: 8px 12px;
        font-family: inherit; text-align: left; cursor: pointer;
        background: rgba(255,255,255,.55); border: 1px solid #d9c096;
        border-radius: 10px; color: #4a3220;
      }
      .forest-tree:hover { border-color: #c8542f; }
      .forest-tree.current { border-color: #b73320; background: #fff1d2; }
      .forest-tree.full { opacity: .78; }
      .forest-name { font-size: 15px; font-weight: 600; white-space: nowrap; }
      .forest-meta { font-size: 12px; color: #8a6a45; text-align: right; }

      .my-tabs {
        display: flex; gap: 6px; margin: 12px 0 4px; padding: 3px;
        background: rgba(255,255,255,.45); border-radius: 999px;
      }
      .my-tabs button {
        flex: 1; min-height: 38px; font-family: inherit; cursor: pointer;
        border: 0; border-radius: 999px; background: transparent;
        color: #8a6a45; font-size: 14px; font-weight: 600;
      }
      .my-tabs button.active {
        background: #b73320; color: #fff6e6;
        box-shadow: 0 2px 8px rgba(183, 51, 32, .3);
      }
      .archive-more { display: flex; justify-content: center; margin: 10px 0 0; }
      .archive-more[hidden] { display: none; }
      .archive-more button {
        font-family: inherit; cursor: pointer; min-height: 38px; padding: 7px 20px;
        border-radius: 999px; border: 1px solid #b99c6d;
        background: transparent; color: #6d4c2a; font-size: 13px;
      }

      @media (max-width: 640px) {
        .forest-btn { top: 12px; left: 10px; min-width: 72px; min-height: 44px; padding: 5px 9px; font-size: 12px; }
        .wall-btn { top: 12px; left: 90px; min-width: 72px; min-height: 44px; padding: 5px 9px; font-size: 12px; }
        /* The title stays large: move it below the pill row so neither top
           control can sit on top of its glyphs on narrow screens. */
        header { padding-top: 58px; }
        header::before { height: 172px; }
        .tree-notice { top: 140px; font-size: 11px; padding: 6px 10px; border-radius: 10px; }
        .forest-card .actions { flex-wrap: wrap; }
        .forest-card .actions .btn { min-height: 44px; font-size: 13px; }
        .forest-name { font-size: 14px; }
        .forest-meta { font-size: 11px; }
        #wishForm { max-height: 84vh; }
        .tree-choice-list { max-height: 118px; }
      }

      /* ---------- Milestone 2: mock checkout / payment return ---------- */
      body.mock-page {
        overflow: auto;
        min-height: 100%;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding: 40px 16px;
        background: radial-gradient(circle at 50% 0%, #2b2340 0%, #141c33 62%);
      }
      .mock-checkout {
        width: min(520px, calc(100vw - 32px));
        max-width: 100%;
        padding: 26px 24px 22px;
        border-radius: 18px;
        border: 1px solid rgba(233, 182, 120, .35);
        background: rgba(26, 31, 52, .94);
        box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
      }
      .mock-checkout h1 { margin: 0 0 6px; font-size: 24px; text-align: center; }
      .mock-checkout .sub { margin: 0 0 18px; text-align: center; font-size: 13px; color: #e0c8a0; }
      .mock-row {
        display: grid;
        grid-template-columns: 88px minmax(0, 1fr);
        gap: 8px;
        padding: 10px 0;
        border-top: 1px solid rgba(233, 182, 120, .16);
        font-size: 14px;
      }
      .mock-row span { color: #b9a789; }
      .mock-row b { font-weight: 600; overflow-wrap: anywhere; }
      .mock-row .mock-wish { color: #ffe6a3; }
      .mock-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 12px; }
      .mock-actions .btn { flex: 1 1 140px; min-height: 46px; }
      .mock-back { width: 100%; }
      .mock-foot { margin: 14px 0 0; font-size: 12px; color: #9e8e78; text-align: center; }
      #paymentCard:focus { outline: none; }
      .payment-badge {
        display: inline-block;
        padding: 4px 10px;
        margin-bottom: 10px;
        border: 1px solid rgba(233, 182, 120, .4);
        border-radius: 999px;
        color: #e9b678;
        font-size: 11px;
        letter-spacing: .08em;
      }
      #paymentMeta .recovered-row { overflow-wrap: anywhere; }
      #paymentConvert[hidden], #paymentRetry[hidden], #paymentPrefill[hidden] { display: none; }
      @media (max-width: 400px) {
        .mock-checkout { padding: 20px 16px 18px; }
        .mock-row { grid-template-columns: 72px minmax(0, 1fr); font-size: 13px; }
      }

      /* ---------- Public wish page / 点灯 ---------- */
      .public-wish {
        position: fixed; inset: 0; z-index: 30;
        display: flex; align-items: center; justify-content: center;
        padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
        pointer-events: none;
      }
      .public-wish[hidden] { display: none; }
      body.public-wish-page #bar,
      body.public-wish-page #avatar { display: none; }
      .public-wish-card {
        --lamp-glow: 0;
        pointer-events: auto;
        position: relative;
        width: min(440px, 100%);
        max-height: calc(100vh - 40px);
        overflow-y: auto;
        text-align: center;
        padding: 30px 26px 24px;
        border-radius: 18px;
        color: #4a3220;
        background: linear-gradient(172deg, #fdf7e7, #f4e2bf);
        border: 1px solid #dcb877;
        box-shadow:
          0 28px 70px rgba(0, 0, 0, .55),
          0 0 calc(4px + var(--lamp-glow) * 1.6px) rgba(255, 208, 110, .5);
        filter: brightness(calc(1 + var(--lamp-glow) * .012));
        transition: box-shadow .45s ease, filter .45s ease;
        animation: rise .3s ease-out;
      }
      .public-wish-card::before {
        content: ""; position: absolute; top: 11px; left: 50%; transform: translateX(-50%);
        width: 9px; height: 9px; border-radius: 50%;
        background: #b73320; box-shadow: 0 0 0 3px rgba(183, 51, 32, .18);
      }
      .public-wish-card.has-gold { border-color: #e7b452; }
      .public-wish-eyebrow {
        margin: 8px 0 0; font-size: 12px; letter-spacing: .16em;
        color: #9b7444; min-height: 1em;
      }
      .public-wish-text {
        margin: 12px 4px 10px; font-size: clamp(21px, 5.2vw, 27px);
        font-weight: 900; line-height: 1.6; letter-spacing: .05em; color: #59371c;
        white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
      }
      .public-wish-author {
        margin: 0 0 14px; font-size: 13px; color: #8a6a45; letter-spacing: .1em;
      }
      .public-lamp-meta {
        display: flex; align-items: center; justify-content: center; gap: 10px;
        min-height: 26px; margin-bottom: 12px;
      }
      .public-lamp-count { font-size: 14px; letter-spacing: .08em; color: #7c5427; }
      .public-gold-marker {
        padding: 2px 9px; border-radius: 999px; font-size: 11px; letter-spacing: .1em;
        color: #7a4d00; background: linear-gradient(180deg, #ffe6a0, #f0bf55);
        border: 1px solid #d29c2d;
      }
      .public-gold-marker[hidden] { display: none; }
      .public-lamp-note {
        margin: 0 0 14px; font-size: 12px; line-height: 1.5; color: #8a6a45;
      }
      .public-lamp-actions { display: flex; gap: 10px; align-items: stretch; }
      .lantern-btn {
        flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
        min-height: 56px; padding: 10px 14px;
        font-family: inherit; font-size: 15px; font-weight: 600; letter-spacing: .1em;
        color: #fff2cf; cursor: pointer;
        background: linear-gradient(180deg, #6d7887, #3d4652);
        border: 1px solid #9aa6b4; border-radius: 14px;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 20px rgba(20, 24, 38, .28);
      }
      .lantern-btn svg { width: 30px; height: 38px; flex: none; }
      .lantern-btn:hover:not(:disabled) { border-color: #ffd98a; box-shadow: 0 0 0 3px rgba(255, 214, 120, .22), 0 10px 24px rgba(20, 24, 38, .32); }
      .lantern-btn:focus-visible { outline: 2px solid #c8542f; outline-offset: 2px; }
      .lantern-btn:disabled { opacity: .72; cursor: default; color: #f4e3bb; }
      .lantern-btn.lit { background: linear-gradient(180deg, #e7b25c, #c58a2f); color: #3d2a12; border-color: #f4d58b; }
      .gold-lamp {
        flex: 1; display: inline-flex; flex-direction: column; align-items: center;
        justify-content: center; gap: 2px; min-height: 56px; padding: 8px 12px;
        font-size: 15px; letter-spacing: .08em; color: #4a3208;
        background: linear-gradient(180deg, #ffe6a0, #eec258);
        border: 1px solid #caa044; border-radius: 14px;
        box-shadow: 0 8px 20px rgba(170, 120, 30, .25), inset 0 1px 0 rgba(255, 255, 255, .5);
      }
      .gold-lamp small { font-size: 11px; letter-spacing: .04em; opacity: .8; }
      .gold-lamp:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 11px 24px rgba(170, 120, 30, .32), inset 0 1px 0 rgba(255, 255, 255, .5); }
      .gold-lamp:focus-visible { outline: 2px solid #c8542f; outline-offset: 2px; }
      .gold-lamp:disabled { opacity: .55; cursor: default; transform: none; }
      .gold-lamp[hidden], .lantern-btn[hidden] { display: none; }
      .public-back {
        display: inline-block; margin-top: 16px; font-size: 12.5px; letter-spacing: .1em;
        color: #8a6a45; text-decoration: underline; text-underline-offset: 3px;
      }
      .public-back:hover, .public-back:focus-visible { color: #b73320; }
      .lamp-spark {
        position: fixed; z-index: 70; width: 16px; height: 16px;
        border-radius: 50%; pointer-events: none;
        transform: translate(-50%, -50%);
        background: radial-gradient(circle, #fffbe6 0%, #ffd36b 42%, rgba(255, 196, 80, 0) 72%);
        box-shadow: 0 0 18px 7px rgba(255, 214, 120, .8);
      }
      .lamp-spark[hidden] { display: none; }
      .public-wish-card.lamp-flash { animation: lampFlash .72s ease-out; }
      @keyframes lampFlash {
        0% { box-shadow: 0 28px 70px rgba(0, 0, 0, .55), 0 0 0 rgba(255, 230, 150, 0); }
        35% { box-shadow: 0 28px 70px rgba(0, 0, 0, .45), 0 0 76px 18px rgba(255, 230, 150, .95); }
        100% { box-shadow: 0 28px 70px rgba(0, 0, 0, .55), 0 0 calc(4px + var(--lamp-glow) * 1.6px) rgba(255, 208, 110, .5); }
      }
      #lampGoldCard:focus { outline: none; }
      @media (max-width: 420px) {
        .public-wish-card { padding: 26px 18px 20px; border-radius: 15px; }
        .public-lamp-actions { flex-direction: column; }
        .lantern-btn, .gold-lamp { width: 100%; min-height: 52px; }
      }
      @media (prefers-reduced-motion: reduce) {
        .public-wish-card, .lamp-spark { animation: none !important; transition: none !important; }
      }

/* Lamp count in the plaque detail popover */
.wish-lamps {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 10px 0 2px; font-size: 14px; color: #8a5a2b;
  letter-spacing: .04em;
}
.wish-lamps::before { content: '✦'; color: #e0a73c; font-size: 13px; }
.wish-gold-marker {
  display: inline-flex; align-items: center; padding: 1px 8px;
  border-radius: 999px; font-size: 11px; font-weight: 700;
  color: #6d4a12; background: linear-gradient(180deg, #ffe8a6, #e9bf58);
  border: 1px solid rgba(170, 120, 30, .45);
}
.wish-gold-marker[hidden] { display: none; }

.public-lamp-status {
  margin: 8px 0 2px; padding: 8px 12px; border-radius: 10px;
  background: rgba(255, 214, 120, .18); border: 1px solid rgba(170, 120, 30, .35);
  color: #6d4a12; font-size: 13px; line-height: 1.5; text-align: center;
}
.public-lamp-status[hidden] { display: none; }
.lantern-btn.lighting {
  animation: lanternIgnite .9s ease-out 1;
  border-color: #ffd98a;
  box-shadow: 0 0 0 4px rgba(255, 214, 120, .2), 0 0 34px rgba(255, 196, 80, .85);
}
@keyframes lanternIgnite {
  0% { filter: brightness(1); }
  30% { filter: brightness(1.8); }
  100% { filter: brightness(1); }
}

.lamp-refresh {
  display: block; margin: 6px auto 2px; min-height: 36px; padding: 6px 14px;
  font-family: inherit; font-size: 12.5px; color: #6d4a12; cursor: pointer;
  background: rgba(255, 246, 225, .8); border: 1px solid rgba(170, 120, 30, .45);
  border-radius: 999px;
}
.lamp-refresh[hidden] { display: none; }
.lamp-refresh:disabled { opacity: .6; cursor: wait; }

.lamp-split { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: -4px 0 12px; }
.lamp-split-chip {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; letter-spacing: .06em; color: #7c5427;
  background: rgba(255, 246, 225, .8); border: 1px solid rgba(170, 120, 30, .3);
}
.lamp-split-chip.gold { color: #6d4a12; background: linear-gradient(180deg, #ffe8a6, #e9bf58); border-color: #d29c2d; }
.detail-lamp-split { margin: 2px 0 6px; }
.lamp-spark.gold {
  width: 22px; height: 22px;
  background: radial-gradient(circle, #fffbe6 0%, #ffd36b 38%, rgba(255, 170, 40, 0) 74%);
  box-shadow: 0 0 30px 13px rgba(255, 196, 80, .95), 0 0 60px 24px rgba(255, 170, 40, .5);
}
.public-wish-card.lamp-flash-gold { animation-duration: 1.2s; }

/* The public wish has its own plaque; lamp light lands here, not on the card. */
.public-plaque {
  position: relative; width: 76px; height: 104px; margin: 14px auto 8px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px;
  background: linear-gradient(160deg, #c79a63, #9b6b39 58%, #7d5228);
  border: 2px solid #7c5736;
  box-shadow: 0 10px 22px rgba(60, 30, 10, .32), 0 0 calc(4px + var(--lamp-glow, 0) * 1.8px) rgba(255, 208, 110, .55);
  transition: box-shadow .3s ease;
}
.public-plaque.gold {
  background: linear-gradient(160deg, #ffe39a, #d9a441 55%, #a97a26);
  border-color: #a97a26;
  box-shadow: 0 10px 24px rgba(120, 80, 10, .35), 0 0 calc(6px + var(--lamp-glow, 0) * 2.2px) rgba(255, 214, 100, .8);
}
.public-plaque::before {
  content: ""; position: absolute; top: -18px; left: 50%; width: 2px; height: 18px;
  background: #8f2b1c; transform: translateX(-50%);
}
.public-plaque-glyph {
  font-family: "Noto Serif SC", serif; font-weight: 900;
  font-size: 25px; color: #ffeecb; letter-spacing: .08em;
}
.public-plaque.lamp-flash { animation: plaqueLampFlash .78s ease-out; }
.public-plaque.lamp-flash-gold { animation-duration: 1.2s; }
@keyframes plaqueLampFlash {
  0% { filter: brightness(1); }
  28% { filter: brightness(2.1) drop-shadow(0 0 26px rgba(255, 228, 150, 1)); }
  100% { filter: brightness(1); }
}

.public-stage {
  position: fixed; inset: 0; z-index: 31; display: flex;
  align-items: center; justify-content: center; pointer-events: none;
}
.public-stage[hidden] { display: none; }
.stage-plaque {
  width: 120px; height: 164px; margin: 0;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5), 0 0 0 0 rgba(255, 220, 120, 0);
}
.stage-plaque .public-plaque-glyph { font-size: 40px; }

/* ---------- Server-rendered SEO landing content ---------- */
body.has-seo-landing { overflow-x: hidden; overflow-y: auto; }
#seo-landing {
  position: relative; z-index: 8; margin-top: 100vh;
  padding: 56px 20px 120px;
  background: linear-gradient(180deg, #0a1122 0%, #111b30 100%);
  color: #f2e6cf;
}
.seo-inner { max-width: 760px; margin: 0 auto; }
.seo-kicker { margin: 0 0 8px; color: #e0b45c; font-size: 12px; letter-spacing: .28em; text-transform: uppercase; }
#seo-landing h1, .seo-page h1 { margin: 0 0 18px; font-size: clamp(30px, 5vw, 44px); line-height: 1.25; color: #fdf3dd; }
#seo-landing h2, .seo-page h2 { margin: 34px 0 12px; font-size: 22px; color: #f3d38a; }
.seo-lede, #seo-landing p, .seo-page p { font-size: 16px; line-height: 1.8; color: #d7cbb6; }
.seo-steps { margin: 0; padding-left: 22px; color: #e7dcc7; line-height: 1.9; }
.seo-cta {
  display: inline-flex; margin-top: 18px; padding: 12px 24px; border-radius: 999px;
  background: linear-gradient(180deg, #d84e33, #b73320); color: #fff6e6;
  text-decoration: none; font-weight: 700;
}
.seo-small { margin-top: 26px; font-size: 13px; color: #9d907b; }
.seo-small a { color: #d7b872; }
body.seo-standalone { overflow-x: hidden; overflow-y: auto; background: #0a1122; }
.seo-page { max-width: 760px; margin: 0 auto; padding: 64px 20px 90px; }
.seo-page a { color: #e6c273; }
