/* My Merry Tree — Storybook Gift Edition (Direction A) */
:root {
  --night: #0f1b38;
  --night2: #1b2c58;
  --cream: #fbf5e8;
  --paper: #fffdf7;
  --paper2: #f4e8d1;
  --ink: #2a2132;
  --dim: #665c6d;
  --line: #e6d6b8;
  --berry: #e23d58;
  --berry-hi: #f66b82;
  --berry-d: #9b1c32;
  --gold: #f2c45a;
  --gold-d: #a8761c;
  --pine-ok: #1f6d48;
  --display: 'Fraunces', 'Cormorant Garamond', Georgia, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --card-sh: 0 1px 0 #fff inset, 0 2px 0 #e6d6b8, 0 12px 26px rgba(72, 44, 18, 0.08);
}

html, body {
  max-width: 100%;
  overflow-x: clip;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
}

/* Fix CJK & RTL typography: never machine-slant Chinese/Japanese/Korean/Arabic characters or squish glyphs */
h1, h2, h3, .dlg-title {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -.015em;
}
:lang(zh) :is(h1, h2, h3, em, .dlg-title, .brand),
:lang(ja) :is(h1, h2, h3, em, .dlg-title, .brand),
:lang(ko) :is(h1, h2, h3, em, .dlg-title, .brand),
:lang(ar) :is(h1, h2, h3, em, .dlg-title, .brand) {
  font-style: normal !important;
  letter-spacing: 0 !important;
}

/* Header: part of the starry night sky (strictly top-level site header only) */
body > header {
  background: var(--night2);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.navbar {
  height: 62px;
  gap: 28px;
}
.brand {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #fff;
  gap: 9px;
}
.brand-dot { color: var(--gold); }
.brandmark { width: 28px; height: 33px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.3)); }
.navbar nav { gap: 22px; font-size: 14.5px; font-weight: 600; color: rgba(255, 255, 255, 0.85); }
.navbar a:hover, .nav-right button:hover { color: var(--gold); }
.nav-right { gap: 14px; }
.nav-right button { color: rgba(255, 255, 255, 0.9); font-size: 13.5px; font-weight: 600; }
.nav-right i { background: rgba(255, 255, 255, 0.2); }
.find-tree-shortcut {
  color: var(--gold);
  border-bottom: 1px dashed rgba(242, 196, 90, 0.55);
  font-size: 13px;
}

/* Tactile 3D Buttons */
.btn {
  border-radius: 14px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 15px;
  min-height: 46px;
  padding: 10px 20px;
  transition: transform .12s ease, filter .15s ease, box-shadow .12s ease;
}
.btn.berry, .btn.dark {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--berry-hi) 0%, var(--berry) 55%, #c52642 100%);
  border: 1px solid var(--berry-d);
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52), inset 0 -2px 0 rgba(0, 0, 0, 0.14), 0 4px 0 var(--berry-d), 0 10px 20px rgba(226, 61, 88, 0.3);
}
.btn.berry::after {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  top: 2px;
  height: 40%;
  border-radius: 10px 10px 40% 40%;
  background: linear-gradient(rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.btn.berry:hover, .btn.dark:hover { filter: brightness(1.05); color: #fff; }
.btn.berry:active, .btn.dark:active {
  transform: translateY(3px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 0 var(--berry-d);
}
.btn.gold {
  background: linear-gradient(180deg, #ffe7a3 0%, var(--gold) 58%, #d9a030 100%);
  border: 1px solid var(--gold-d);
  color: #3d280a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 4px 0 var(--gold-d), 0 8px 18px rgba(0, 0, 0, 0.2);
}
.btn.gold:hover { filter: brightness(1.04); }
.btn.gold:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 1px 0 var(--gold-d); }
.btn.outline {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  backdrop-filter: blur(6px);
}
.btn.outline:hover { background: rgba(255, 255, 255, 0.18); }
.btn.soft-btn {
  background: linear-gradient(180deg, #fff, #f2e8d5);
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 var(--line);
  min-height: 42px;
  font-size: 14px;
}
.btn.soft-btn:hover { border-color: #d4b98a; background: linear-gradient(180deg, #fff, #f7ecd8); }
.btn.wide { width: 100%; }
.btn.big { min-height: 54px; font-size: 17px; border-radius: 15px; }

/* Starry Night Hero & Festive Scenery */
.night {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  padding-bottom: 64px;
  background:
    radial-gradient(2px 2px at 9% 15%, rgba(255, 255, 255, 0.65) 50%, transparent 52%),
    radial-gradient(2px 2px at 83% 9%, rgba(255, 255, 255, 0.7) 50%, transparent 52%),
    radial-gradient(1.5px 1.5px at 37% 25%, rgba(255, 255, 255, 0.55) 50%, transparent 52%),
    radial-gradient(2px 2px at 92% 39%, rgba(255, 255, 255, 0.5) 50%, transparent 52%),
    radial-gradient(1.5px 1.5px at 14% 72%, rgba(255, 255, 255, 0.45) 50%, transparent 52%),
    radial-gradient(ellipse at 50% 95%, rgba(242, 196, 90, 0.14), transparent 58%),
    linear-gradient(180deg, var(--night2) 0%, #142248 56%, var(--night) 100%);
}
.night .sky, .bottom-gilt { display: none; }
.xdeco {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.xsnow {
  position: absolute;
  left: 0;
  right: 0;
  top: -320px;
  height: calc(100% + 320px);
}
.xs1 {
  background-image:
    radial-gradient(2.4px 2.4px at 24px 34px, #fff 50%, transparent 52%),
    radial-gradient(2px 2px at 148px 116px, rgba(255,255,255,.85) 50%, transparent 52%),
    radial-gradient(2.8px 2.8px at 240px 210px, rgba(255,255,255,.8) 50%, transparent 52%),
    radial-gradient(1.8px 1.8px at 92px 268px, rgba(255,255,255,.75) 50%, transparent 52%);
  background-size: 320px 320px;
  opacity: .45;
  animation: mmtSnow1 26s linear infinite;
}
.xs2 {
  background-image:
    radial-gradient(1.6px 1.6px at 44px 62px, #fff 50%, transparent 52%),
    radial-gradient(1.4px 1.4px at 172px 24px, rgba(255,255,255,.8) 50%, transparent 52%),
    radial-gradient(1.8px 1.8px at 122px 174px, rgba(255,255,255,.7) 50%, transparent 52%);
  background-size: 210px 210px;
  opacity: .35;
  animation: mmtSnow2 18s linear infinite;
}
@keyframes mmtSnow1 { to { transform: translateY(320px); } }
@keyframes mmtSnow2 { to { transform: translateY(210px); } }
.xlights { position: absolute; left: 0; right: 0; top: 0; display: block; opacity: .92; }
.xb ellipse { filter: drop-shadow(0 0 5px currentColor); animation: mmtTwinkle 2.6s ease-in-out infinite; }
.xb0 ellipse { color: #ff5468; }
.xb1 ellipse { color: #ffd257; animation-delay: .65s; }
.xb2 ellipse { color: #52d896; animation-delay: 1.3s; }
.xb3 ellipse { color: #6ec0ff; animation-delay: 1.95s; }
@keyframes mmtTwinkle { 0%, 100% { opacity: 1; } 50% { opacity: .48; } }
.xhills {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 124px;
  display: block;
}

/* Homepage Hero: Left Tree Board + Right Cream Cardstock Creation Panel */
.hero {
  padding: 42px 0 32px;
  min-height: 0;
}
.hero-kicker {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: .14em;
}
.hero h1,
.hero h1.owner-title {
  font: 700 clamp(30px, 3.3vw, 44px)/1.16 var(--display);
  letter-spacing: -.015em;
  color: #fff;
  margin: 8px 0 12px;
  max-width: none;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.hero h1 em {
  display: inline-block;
  color: #ffd573;
  font-weight: 700;
  font-style: normal;
}
:lang(zh) .hero--home h1 em { display: block; }

/* Compact Starry Countdown Pill */
.countdown {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid rgba(242, 196, 90, 0.32);
  background: rgba(12, 21, 48, 0.55);
  backdrop-filter: blur(8px);
  max-width: 100%;
}
.countdown .caption {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: none;
  font-size: 10.5px;
  letter-spacing: .08em;
  color: #ffe39e;
  line-height: 1.2;
}
.countdown .caption .ico { display: inline-block; margin: 0; width: 14px; height: 14px; color: var(--gold); }
.countdown .digits { gap: 8px; }
.countdown .digits div { display: inline-flex; align-items: baseline; gap: 3px; min-width: 0; }
.countdown .digits strong { font: 700 20px/1 var(--display); color: #fff; }
.countdown .digits small { display: inline; font-size: 10.5px; color: rgba(255, 255, 255, 0.75); margin: 0; }
.countdown .digits b { margin: 0; font-size: 14px; color: rgba(255, 255, 255, 0.45); align-self: center; }

@media (min-width: 940px) {
  .hero--home {
    max-width: 1140px;
    display: grid;
    grid-template-columns: minmax(0, 560px) minmax(370px, 430px);
    grid-template-areas:
      "hd side"
      "stage side";
    justify-content: center;
    align-items: center;
    column-gap: 42px;
    row-gap: 14px;
    padding: 40px 0 36px;
  }
  .hero--home .intro-block { display: contents; }
  .hero--home .hero-head { grid-area: hd; }
  .hero--home .showcase { grid-area: stage; max-width: 560px; margin: 0; }
  .hero--home .hero-card { grid-area: side; align-self: center; }
}

/* Warm Wooden-Framed Storybook Tree Stage */
.showcase { max-width: 560px; }
.stage {
  height: clamp(390px, 34vw, 475px);
  border-radius: 22px;
  border: 8px solid transparent;
  background:
    linear-gradient(180deg, #1d2e5c, #0f1b38) padding-box,
    repeating-linear-gradient(92deg, rgba(255,255,255,.06) 0 2px, transparent 2px 7px, rgba(0,0,0,.08) 7px 9px, transparent 9px 14px) border-box,
    linear-gradient(135deg, #a86f3e, #7c4b27 52%, #543018) border-box;
  box-shadow: 0 18px 40px rgba(5, 10, 26, 0.55), 0 0 0 1px #3d2312, inset 0 0 0 1px rgba(0, 0, 0, 0.35), inset 0 3px 12px rgba(0, 0, 0, 0.45);
}
.stage[data-tree-style="frost"] {
  background:
    linear-gradient(180deg, #163354, #09152b) padding-box,
    linear-gradient(135deg, #9ec3df, #5982a6 52%, #314f6e) border-box;
  box-shadow: 0 18px 40px rgba(5, 12, 28, 0.55), 0 0 0 1px #27435e, inset 0 2px 10px rgba(0, 0, 0, 0.4);
}
.stage[data-tree-style="gala"] {
  background:
    radial-gradient(ellipse at 42% 36%, #f4e7dc, #d7c3b0 72%, #b49a84) padding-box,
    linear-gradient(135deg, #e7c6ba, #be8f82 52%, #8e6158) border-box;
  box-shadow: 0 18px 40px rgba(10, 14, 30, 0.45), 0 0 0 1px #7d544c;
}
.stage-rim, .stage::before, .studio-note { display: none !important; }
.stage-header { inset: 14px 16px auto; }
.stage-badge {
  background: rgba(12, 22, 48, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff2cf;
  font-size: 9.5px;
  letter-spacing: .1em;
  padding: 5px 10px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.stage-badge span { background: #57d69a; box-shadow: 0 0 6px #57d69a; }
.collection-tools .tree-style-entry {
  background: rgba(12, 22, 48, 0.76);
  border: 1px solid rgba(242, 196, 90, 0.45);
  color: #ffe299;
  font-weight: 600;
  backdrop-filter: blur(6px);
}
.stage-tools button {
  background: rgba(12, 22, 48, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  backdrop-filter: blur(6px);
}
.stage-tools button:hover { background: rgba(34, 52, 98, 0.9); }
.stage-foot { inset: auto 14px 12px; }
.rotate-pill, .gift-count {
  background: rgba(12, 22, 48, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  padding: 5px 12px;
  backdrop-filter: blur(6px);
}
.gift-count { color: #ffe094; font-weight: 700; }

/* Warm Cream Cardstock Creation Panel (Zero-Modal Onboarding) */
.hero-card {
  background: linear-gradient(180deg, #fffefb 0%, var(--paper) 45%, var(--paper2) 100%);
  color: var(--ink);
  border-radius: 22px;
  padding: 22px 22px 18px;
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(0, 0, 0, 0.04), 0 3px 0 #d6c4a0, 0 18px 40px rgba(6, 11, 28, 0.48);
}
.hero-card .card-lead {
  color: #32283a;
  font-size: 15.5px;
  line-height: 1.52;
  margin: 0 0 14px;
  max-width: none;
  font-weight: 500;
}
.hero-make-form {
  display: grid;
  gap: 11px;
}
.hero-field {
  display: block;
  margin: 0;
}
.hero-field > span {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--dim);
  margin-bottom: 4px;
}
.hero-field input[type="text"],
.hero-field select {
  width: 100%;
  min-height: 45px;
  padding: 10px 13px;
  border: 1.5px solid #dfd1b6;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.05);
}
.hero-field input[type="text"]:focus,
.hero-field select:focus {
  outline: none;
  border-color: var(--gold-d);
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.04), 0 0 0 3px rgba(242, 196, 90, 0.38);
}

/* Style Chips (Free vs Paid Tier + Live Price clearly shown) */
.style-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.style-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 52px;
  padding: 7px 6px 6px;
  border-radius: 12px;
  border: 1.5px solid #dfd1b6;
  background: linear-gradient(180deg, #fff, #f2e8d6);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 #dfd1b6;
  cursor: pointer;
  min-width: 0;
}
.style-chip--paid {
  background: linear-gradient(180deg, #fffdf7, #f7ebd2);
  border-color: #e2cca0;
}
.chip-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  max-width: 100%;
}
.chip-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chip-tier {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chip-tier b { font-weight: 800; }
.chip-tier--free {
  color: var(--pine-ok);
  background: #e4f5ec;
  padding: 1px 7px;
  border-radius: 999px;
}
.chip-tier--paid {
  color: #8c5c10;
}
.style-chip[aria-pressed="true"] {
  border-color: var(--berry);
  background: linear-gradient(180deg, #fff, #ffe4ea);
  color: var(--berry-d);
  box-shadow: 0 0 0 1.5px var(--berry), 0 2px 0 var(--berry-d);
}
.style-chip[aria-pressed="true"] .chip-tier--paid {
  color: var(--berry-d);
}
.hero-paid-note {
  margin: 8px 0 0;
  padding: 7px 10px;
  border-radius: 10px;
  background: #fff6df;
  border: 1px solid #ead39c;
  color: #704c10;
  font-size: 12px;
  line-height: 1.45;
}
.hero-paid-note[hidden] { display: none !important; }
.chip-dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.chip-classic { background: #1f7a4f; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.chip-frost { background: #5aa9e6; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.chip-gala { background: #df8b96; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }

/* Subtle Collapsible Timezone Row */
.tz-details {
  font-size: 12.5px;
  color: var(--dim);
  border-radius: 10px;
}
.tz-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 2px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.tz-details summary::-webkit-details-marker { display: none; }
.tz-details summary b { color: var(--ink); font-weight: 600; }
.tz-details summary .ico { width: 14px; height: 14px; transition: transform .18s ease; }
.tz-details[open] summary .ico { transform: rotate(180deg); }
.tz-details-body {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #e6d8be;
}
.tz-rule {
  margin: 7px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--dim);
}
#hero-form-error:empty { display: none; }
#hero-form-error { margin: 0; }

/* Card Secondary Links & Green Checkmark Trust Line */
.hero-card-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid rgba(216, 198, 163, 0.55);
  font-size: 13.5px;
}
.card-sub-btn, .card-sub-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 0;
  padding: 2px 4px;
  color: var(--berry-d);
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.card-sub-btn .ico { width: 15px; height: 15px; }
.card-sub-btn:hover, .card-sub-link:hover { color: var(--berry); }
.dot-sep { color: #b9a98d; }
.card-quiet {
  justify-content: center;
  margin-top: 7px;
  color: var(--pine-ok);
  font-size: 12.5px;
  font-weight: 600;
}
.trust-tick { font-weight: 800; }

/* Shared Tree & Comparison Hero Polish + Prominent Owner Invite Card */
.hero--tree .lead, .hero--cmp .lead { color: rgba(255, 255, 255, 0.86); }
.hero--tree .quiet, .hero--cmp .quiet { color: rgba(255, 255, 255, 0.74); }
.hero--tree .tree-stats {
  background: rgba(12, 22, 48, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 10px 14px;
}

.owner-invite-card {
  margin: 14px 0 12px;
  padding: 18px 18px 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, #fffefb 0%, var(--paper) 55%, var(--paper2) 100%);
  color: var(--ink);
  border: 1.5px solid #e2cba1;
  box-shadow: inset 0 1px 0 #fff, 0 3px 0 #d5bd91, 0 16px 34px rgba(5, 10, 28, 0.42);
  display: grid;
  gap: 11px;
}
.owner-invite-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.owner-invite-title {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.owner-code-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fdf2da;
  border: 1px solid #e2c58a;
  font-size: 11.5px;
  font-weight: 700;
  color: #7d5310;
}
.owner-code-pill kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 24px;
  padding: 0 5px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #dcc088;
  box-shadow: 0 2px 0 #d6b676;
  font-family: var(--display);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--berry-d);
}
.owner-invite-quote {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px dashed #dec69a;
  color: #3a2d40;
  font-size: 14px;
  line-height: 1.52;
  font-weight: 500;
}
.owner-invite-link-row {
  display: flex;
  align-items: center;
  gap: 7px;
}
.owner-share-url-input {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  padding: 8px 11px;
  border-radius: 11px;
  border: 1.5px solid #dfd1b6;
  background: #fff;
  color: #463a4d;
  font-size: 12.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.owner-link-btn {
  flex: none;
  min-height: 40px !important;
  padding: 7px 12px !important;
  font-size: 12.5px !important;
  white-space: nowrap;
}
.owner-invite-btns {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 9px;
}
.owner-invite-btns .btn {
  min-height: 46px;
  font-size: 14px;
  padding: 9px 14px;
  justify-content: center;
}
body.is-tree-owner [data-act="hang"],
body.is-tree-owner .hero--tree .actions,
body.is-tree-owner .hero--tree .intro-block > .quiet {
  display: none !important;
}

.peek-direct-wrap {
  margin: 12px 0 8px;
}
.peek-direct-wrap .btn {
  justify-content: center;
  gap: 8px;
}
.peek-direct-wrap .btn b,
.owner-peek-cta b {
  font-weight: 800;
}

/* Owner Visitors & Friends' Gifts Board (#owner-activity) */
.owner-activity-sec[hidden] {
  display: none !important;
}
.owner-activity-sec {
  background: var(--cream);
  padding: 52px 0 64px;
  border-top: 1px solid var(--line);
}
.owner-activity-wrap {
  width: min(1060px, 92%);
}
.owner-activity-head h2 {
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.16;
  color: var(--ink);
  margin: 0 0 8px;
}
.owner-rule-tip {
  margin: 0 0 22px;
  color: var(--dim);
  font-size: 14.5px;
  line-height: 1.5;
}
.owner-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.owner-metric-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-radius: 18px;
  border: 1.5px solid var(--line);
  background: linear-gradient(180deg, #fffdf9, #f7ecda);
  box-shadow: var(--card-sh);
}
.owner-metric-card .metric-icon {
  flex: none;
  width: 50px;
  height: 50px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-size: 25px;
  background: linear-gradient(180deg, #fff8e6, #f4dfb4);
  border: 1px solid #e1c58c;
  box-shadow: inset 0 1px 0 #fff;
}
.owner-metric-card small {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--dim);
  letter-spacing: .04em;
}
.owner-metric-card strong {
  display: block;
  font: 700 30px/1.1 var(--display);
  color: var(--ink);
  margin: 2px 0 3px;
}
.owner-metric-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--dim);
}
.owner-gifts-board {
  border-radius: 20px;
  border: 1.5px solid var(--line);
  background: linear-gradient(180deg, #fffefb, #fbf3e4);
  box-shadow: var(--card-sh);
  padding: 14px;
}
.owner-gifts-list {
  display: grid;
  gap: 10px;
}
.owner-gift-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 15px;
  border: 1px solid #e7d9be;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.owner-gift-row:hover {
  border-color: #d3b47d;
  box-shadow: 0 6px 16px rgba(72, 44, 18, 0.06);
}
.owner-gift-row.is-unlocked {
  background: linear-gradient(90deg, #fff, #f4fbf7);
  border-color: #bfe0cd;
}
.owner-gift-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
  background: none;
  border: 0;
  padding: 0;
  text-align: start;
  cursor: pointer;
}
.owner-gift-badge {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--wr, #9d403b);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.12);
}
.owner-gift-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.owner-gift-badge b {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.owner-gift-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.owner-gift-meta strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.owner-gift-meta small {
  font-size: 13px;
  color: var(--dim);
}
.owner-gift-actions {
  flex: none;
}
.owner-peek-cta {
  min-height: 42px;
  padding: 8px 15px;
  font-size: 13.5px;
  white-space: nowrap;
}
.owner-gifts-empty {
  text-align: center;
  padding: 32px 18px;
}
.owner-gifts-empty > span {
  display: block;
  font-size: 34px;
  margin-bottom: 8px;
}
.owner-gifts-empty p {
  margin: 0 0 16px;
  font-size: 15px;
  color: var(--dim);
}
.owner-empty-btns {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Visual Tree Style & Keepsake Showcase (#shop) */
.shop {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 68px 0;
}
.shop .wrap { width: min(1160px, 92%); }
.shop-head { max-width: 680px; margin-bottom: 30px; }
.shop-kicker, .faq-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--berry);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.shop-kicker::before, .faq-kicker::before {
  content: "";
  width: 22px;
  height: 2.5px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--berry));
}
.shop h2, .faq-sec h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 10px;
}
.shop-head p { color: var(--dim); font-size: 15.5px; }
.style-showcase {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.style-showcase-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #fffdf9, #f9f0de);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--card-sh);
  transition: transform .18s ease;
}
.style-showcase-card:hover { transform: translateY(-3px); }
.style-showcase-gala {
  background: linear-gradient(180deg, #fffcf9, #faece6 58%, #f6e1d7);
  border: 1.5px solid #d9a79d;
  box-shadow: 0 18px 42px rgba(108, 52, 58, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.style-showcase-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 430 / 441;
  object-fit: contain;
  display: block;
  background: #10251e;
}
.style-showcase-card:nth-child(2) img { background: #192c48; }
.style-showcase-gala img { background: #3b2820; }
.style-showcase-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
  padding: 18px 20px 20px;
}
.style-pill {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  background: #f3e6cc;
  color: #7c561a;
}
.style-pill.free-pill { background: #e3f5eb; color: #1b6b45; }
.style-pill.gala-pill {
  background: linear-gradient(135deg, #fce3e8, #f7d9c4);
  color: #7c2438;
  border: 1px solid rgba(196, 122, 128, 0.35);
}
.style-pill .price:empty { display: none; }
.style-showcase-body h3 { font-size: 22px; margin: 2px 0 0; color: var(--ink); }
.style-showcase-body p { font-size: 14.5px; line-height: 1.55; color: var(--dim); flex: 1; margin-bottom: 8px; }
.showcase-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.showcase-actions .btn {
  flex: 1 1 auto;
  min-height: 42px;
  font-size: 13.5px;
  padding: 8px 14px;
}
.shop .products {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.shop .products button {
  padding: 16px 20px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fffdf9, #f8efdd);
  box-shadow: var(--card-sh);
  font-weight: 700;
  color: var(--ink);
}
.shop .products button:hover { border-color: #d6b884; transform: translateY(-1px); }
.shop .products .ico { color: var(--berry); }
.shop .products .price { color: var(--berry-d); font-weight: 800; font-size: 15px; }

/* Warm Ticket-Style Tree Code Lookup (#find-tree) */
.code-band {
  background: var(--cream);
  border: 0;
  padding: 46px 0 12px;
}
.code-band .wrap { width: min(1160px, 92%); }
.code-band-inner { padding: 0; display: block; }
.code-band-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 30px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #fffdf8, #f5e8ce);
  box-shadow: var(--card-sh);
}
.code-band h2 { font-family: var(--display); font-size: clamp(22px, 2.4vw, 29px); color: var(--ink); }
.code-band p { color: var(--dim); font-size: 15px; }
.code-fields input {
  border: 1.5px solid #d5c3a1;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  height: 48px;
}

/* Merged Warm-Card FAQ (#faq) */
.faq-sec {
  padding: 56px 0 68px;
  background: var(--cream);
}
.wrap-narrow {
  width: min(780px, 92%);
  margin-inline: auto;
}
.faq-cards { margin-top: 22px; }
.faq-cards details {
  background: linear-gradient(180deg, #fffdf8, #fbf3e4);
  border: 1px solid var(--line);
  border-radius: 15px;
  margin: 11px 0;
  box-shadow: var(--card-sh);
  overflow: hidden;
}
.faq-cards summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 20px;
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  list-style: none;
}
.faq-cards summary::-webkit-details-marker { display: none; }
.faq-cards summary .ico { flex: none; width: 18px; height: 18px; color: var(--berry); transition: transform .2s ease; }
.faq-cards details[open] summary .ico { transform: rotate(180deg); }
.faq-cards details p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--dim);
  font-size: 15px;
  line-height: 1.65;
}

/* Starry Final CTA & Footer */
.final-cta {
  position: relative;
  background:
    radial-gradient(2px 2px at 14% 24%, rgba(255,255,255,.65) 50%, transparent 52%),
    radial-gradient(2px 2px at 78% 18%, rgba(255,255,255,.7) 50%, transparent 52%),
    radial-gradient(1.5px 1.5px at 88% 72%, rgba(255,255,255,.55) 50%, transparent 52%),
    linear-gradient(165deg, var(--night2), var(--night));
  color: #fff;
  padding: 68px 20px;
  text-align: center;
}
.final-cta .kicker { justify-content: center; color: var(--gold); }
.final-cta h2 {
  color: #fff;
  font-size: clamp(30px, 3.8vw, 44px);
  max-width: 640px;
  margin: 12px auto 24px;
}
.final-cta-sub {
  margin: 14px 0 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
}
footer {
  background: #0b142b;
  color: rgba(255, 255, 255, 0.78);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 32px 0;
}
footer .brand { color: #fff; font-size: 20px; }
footer a { color: var(--gold); }
footer a:hover, footer button:hover { color: #ffe59e; }

/* Dialogs: Warm Cream Cardstock */
dialog {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fffefb, #f8efe0);
  color: var(--ink);
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(8, 14, 34, 0.55);
  max-height: 88vh;
  max-height: 89dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
dialog::backdrop {
  background: rgba(12, 20, 44, 0.72);
  backdrop-filter: blur(6px);
}
.dialog-top { border-bottom: 1px solid var(--line); }

.snapshot-preview-img {
  display: block;
  width: 100%;
  max-width: 340px;
  height: auto;
  margin: 12px auto;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(8, 14, 34, 0.25);
  -webkit-touch-callout: default;
  user-select: auto;
}

/* Instagram / Facebook / WeChat / Mobile WebView Avatar Uploader Polish */
.signature-photo .photo-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  border: 1.5px dashed #d5be93;
  background: #fffdf7;
  cursor: pointer;
  min-height: 52px;
  overflow: hidden;
  -webkit-tap-highlight-color: rgba(217, 56, 86, 0.12);
}
.signature-photo .photo-label:hover {
  border-color: var(--berry);
  background: #fff6f8;
}
.signature-photo .pick-photo {
  border: 0;
  background: none;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--berry-d);
  pointer-events: none;
}
.signature-photo #avatar-sample {
  pointer-events: none;
}
.signature-photo .photo-label input[type="file"] {
  position: absolute;
  left: 0;
  top: 0;
  right: auto;
  bottom: auto;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  opacity: 0.01;
  pointer-events: none;
  font-size: 16px;
}

/* Mobile Responsive & Zero-Overflow Guarantee (<= 939px & <= 700px) */
@media (max-width: 939px) {
  .hero--home {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 0 28px;
  }
  .hero--home .intro-block { display: contents; }
  .hero--home .hero-head { order: 0; text-align: center; width: 100%; }
  .hero--home .hero-kicker { justify-content: center; }
  .hero--home .showcase { order: 1; width: 100%; max-width: 520px; margin-inline: auto; }
  .hero--home .hero-card { order: 2; width: 100%; max-width: 520px; margin-inline: auto; }
  .hero--home .mobile-actions,
  .hero--home .mobile-growth { display: none !important; }
  .style-showcase { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .shop .products { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .code-band-card { flex-direction: column; align-items: stretch; padding: 22px 20px; }
}

@media (max-width: 700px) {
  .mobile-tree-shell > header {
    background: var(--night2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  /* Fix horizontal overflow: keep navbar compact & inside 100% width */
  .mobile-tree-shell .navbar {
    width: calc(100% - 28px) !important;
    max-width: 100%;
    height: 54px;
    gap: 8px !important;
  }
  .mobile-tree-shell .navbar .brand {
    font-size: 18px !important;
    letter-spacing: -.02em !important;
    gap: 6px !important;
    min-width: 0;
  }
  .mobile-tree-shell .navbar .brandmark { width: 22px; height: 26px; }
  .mobile-tree-shell .navbar .find-tree-shortcut { display: none !important; }
  .mobile-tree-shell .nav-right { gap: 6px !important; min-width: 0; }
  .mobile-tree-shell .nav-right .locale-btn {
    min-height: 34px;
    padding: 5px 8px !important;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    font-size: 11.5px !important;
  }
  .mobile-tree-shell .nav-right .locale-btn span { max-width: 68px; }
  .mobile-tree-shell .navbar .login {
    min-height: 34px;
    padding: 5px 8px;
    font-size: 11.5px !important;
    max-width: 82px;
  }

  .mobile-tree-shell .night {
    min-height: 0 !important;
    padding-bottom: 48px;
    background:
      radial-gradient(2px 2px at 14% 12%, rgba(255,255,255,.65) 50%, transparent 52%),
      radial-gradient(2px 2px at 84% 18%, rgba(255,255,255,.65) 50%, transparent 52%),
      linear-gradient(180deg, var(--night2) 0%, #142248 56%, var(--night) 100%) !important;
  }
  .xlights { display: none; }
  .xhills { height: 74px; }

  .mobile-tree-shell .hero {
    width: calc(100% - 28px) !important;
    max-width: 100%;
    padding: 12px 0 16px !important;
  }
  .mobile-tree-shell .hero--home .hero-kicker { display: none !important; }
  .mobile-tree-shell .hero--home .hero-card .lead { display: block !important; text-align: start; font-size: 14.5px; margin-bottom: 12px; }
  .mobile-tree-shell .hero h1 {
    font-size: clamp(24px, 6.8vw, 32px) !important;
    line-height: 1.18 !important;
    margin: 2px 0 8px !important;
    color: #fff !important;
  }
  .mobile-tree-shell .countdown {
    margin-inline: auto !important;
    padding: 5px 12px !important;
    border: 1px solid rgba(242, 196, 90, 0.35) !important;
    background: rgba(12, 21, 48, 0.55) !important;
  }
  .mobile-tree-shell .showcase {
    width: 100% !important;
    margin-inline: 0 !important;
  }
  .mobile-tree-shell .stage {
    height: clamp(275px, 42svh, 350px) !important;
    border-radius: 18px !important;
    border: 6px solid transparent !important;
    background:
      linear-gradient(180deg, #1d2e5c, #0f1b38) padding-box,
      linear-gradient(135deg, #a86f3e, #7c4b27 52%, #543018) border-box !important;
    box-shadow: 0 12px 28px rgba(5, 10, 26, 0.5), inset 0 2px 8px rgba(0, 0, 0, 0.4) !important;
  }
  .hero-card {
    padding: 16px 16px 14px;
    border-radius: 18px;
  }
  .style-chips { gap: 5px; }
  .style-chip { font-size: 11.5px; padding: 6px 5px; min-height: 38px; }
  .mobile-tree-shell.is-tree-owner #tree-extra {
    order: 3 !important;
    width: 100% !important;
    max-width: 520px !important;
    margin-inline: auto !important;
  }
  .mobile-tree-shell.is-tree-owner .mobile-actions { order: 4 !important; }
  .mobile-tree-shell.is-tree-owner .mobile-growth { order: 5 !important; }
  .owner-invite-card { padding: 14px 14px 13px; border-radius: 16px; margin: 10px 0 8px; }
  .owner-invite-btns { grid-template-columns: 1fr; gap: 8px; }
  .owner-activity-sec { padding: 32px 0 42px; }
  .owner-metrics-grid { grid-template-columns: 1fr; gap: 10px; }
  .owner-gift-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .owner-gift-actions .btn { width: 100%; justify-content: center; }
  /* Prevent iOS Safari / Instagram / Facebook / WeChat forced viewport zoom on focus */
  input:not(#account-code):not(#tree-code-input):not([type="range"]):not([type="radio"]):not([type="checkbox"]),
  select,
  textarea,
  .owner-share-url-input,
  #share-url {
    font-size: 16px !important;
  }
}

@media (max-width: 420px) {
  .mobile-tree-shell .navbar .login span { display: none; }
  .mobile-tree-shell .navbar .login { min-width: 34px; justify-content: center; padding: 5px; }
  .countdown { border-radius: 16px; padding: 6px 12px; gap: 4px 10px; }
}

@media (max-width: 700px) {

  /* Mobile Bottom Tab Bar */
  .mobile-tabs {
    background: rgba(14, 24, 52, 0.96) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
  }
  .mobile-tabs button { color: rgba(255, 255, 255, 0.68) !important; }
  .mobile-tabs button.is-active,
  .mobile-tabs button[aria-current="page"],
  .mobile-tabs button[aria-selected="true"] {
    color: var(--gold) !important;
    background: rgba(242, 196, 90, 0.1) !important;
  }
  body.mobile-view-active { background: var(--night) !important; }
  main .mobile-view:not([hidden]) {
    background: linear-gradient(180deg, var(--night2), var(--night)) !important;
  }
  .mv-card { background: rgba(255, 255, 255, 0.07) !important; border-color: rgba(255, 255, 255, 0.16) !important; }
  .mv-action {
    background: linear-gradient(180deg, var(--berry-hi), var(--berry)) !important;
    border-color: var(--berry-d) !important;
    color: #fff !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .xsnow, .xb ellipse { animation: none !important; }
}
