/* Phone refinement: the desktop scroll composition remains in styles.css.
   Restore the original fixed wallpaper; concentrate contrast and blur on local glass. */
.mobile-only, .chip small { display: none; }
[hidden] { display: none !important; }
.reply-receipt { padding: 22px; text-align: center; color: var(--cream); }
.reply-receipt > svg { width: 30px; height: 30px; color: var(--gold-bright); margin: 0 auto 12px; }
.reply-receipt h3 { font: 700 23px/1.5 var(--font-serif); }
.reply-receipt p { margin: 12px 0; }
.reply-receipt .receipt-disclaimer { font-size: 13px; color: var(--gold-bright); }
.receipt-edit { display: block; margin: 12px auto 0; min-height: 44px; text-decoration: underline; text-underline-offset: 5px; }
.rsvp-form.has-receipt > :not(.reply-receipt) { display: none; }
.field-error { color: #ffd1bf; font-size: 13px; margin-top: 6px; }
.field:has([aria-invalid="true"]) { outline: 1px solid #ffd1bf; outline-offset: 2px; }
.mobile-primary { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 12px 18px; border-radius: 12px; background: var(--vermilion); color: var(--cream); font-size: 14px; font-weight: 600; }
.mobile-primary svg { width: 18px; height: 18px; flex-shrink: 0; }
.guest-sheet { border: 0; background: #1d171c; color: #f6eddf; padding: 8px 24px 28px; width: min(100%, 480px); max-height: 85dvh; border-radius: 24px 24px 0 0; margin: auto auto 0; overscroll-behavior: contain; box-shadow: 0 -12px 60px rgba(0,0,0,.2); }
.guest-sheet::backdrop { background: rgba(12,9,13,.7); backdrop-filter: blur(5px); }
.guest-sheet[open] { animation: sheet-enter .28s var(--ease-out); }
.sheet-handle { width: 34px; height: 4px; border-radius: 4px; background: #786365; margin: 4px auto 20px; }
.sheet-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.sheet-header h2 { font: 700 24px/1.4 var(--font-serif); }
.sheet-header button { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(228,201,140,.22); border-radius: 50%; flex-shrink: 0; }
.sheet-header svg { width: 20px; height: 20px; }
.sheet-content { display: grid; gap: 16px; }
.sheet-content p { color: #d6c5b4; font-size: 14px; line-height: 1.85; }
.sheet-content textarea, .sheet-content input { width: 100%; padding: 14px; border: 1px solid #746052; border-radius: 12px; background: #191316; color: #f6eddf; font: 16px/1.6 var(--font-sans); resize: vertical; }
.sheet-links { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.sheet-links a { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; border-bottom: 1px solid rgba(228,201,140,.2); }
.sheet-links a span { font: 20px var(--font-serif); color: #e4c98c; }
@keyframes sheet-enter { from { opacity: .4; transform: translateY(36px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 740px), (max-width: 1024px) and (max-height: 500px) {
  :root {
    --m-text: #f6eddf;
    --m-muted: #e4d5c4;
    --gold-bright: #eed5a3;
    --m-line: rgba(228,201,140,.22);
    --m-red: #a33b30;
    --m-panel: rgba(24,18,26,.88);
    --m-backdrop: none;
    --m-radius: 24px;
    --m-control: 18px;
    --m-glint: linear-gradient(145deg, rgba(255,238,215,.065), transparent 38%, rgba(220,159,130,.035));
    --m-shadow: inset 0 1px 0 rgba(255,241,218,.18), inset 0 -1px 0 rgba(255,221,187,.035), 0 12px 32px rgba(21,12,19,.18);
    --m-ease: cubic-bezier(.2,.8,.2,1);
    --m-gutter: 24px;
    --m-dock: calc(82px + env(safe-area-inset-bottom));
  }
  html { scroll-padding-top: calc(94px + env(safe-area-inset-top)); scrollbar-width: none; overflow-x: hidden; }
  html::-webkit-scrollbar { display: none; }
  body { color: var(--m-text); line-height: 1.8; overflow-x: hidden; }
  body.has-sheet { overflow: hidden; }
  button, a, input, textarea, select, summary { -webkit-tap-highlight-color: transparent; }
  button, a, summary { touch-action: manipulation; }
  input, textarea { caret-color: var(--gold-bright); }
  :focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 5px; }
  button:disabled { opacity: .5; cursor: not-allowed; }
  .mobile-only { display: flex; }

  /* Near-solid fallback first. The glass layer never filters its text or images.
     六幕标题卡与表单等信息块统一玻璃面板（液态玻璃对 .scene-head 自动接管）。 */
  .invite-card, .scene-head, .rsvp-intro, .schedule, .venue, .story-timeline, .tips-card,
  .rsvp-form, .site-footer, .chapter-copy,
  .site-header, .side-nav, .guest-sheet {
    background-color: var(--m-panel);
    background-image: var(--m-glint);
    border: 1px solid var(--m-line);
    border-radius: var(--m-radius);
    box-shadow: var(--m-shadow);
    -webkit-backdrop-filter: var(--m-backdrop);
    backdrop-filter: var(--m-backdrop);
  }
  @supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
    :root { --m-panel: rgba(24,18,26,.62); --m-backdrop: blur(18px) saturate(1.2); }
    .site-header, .side-nav, .guest-sheet { --m-backdrop: blur(24px) saturate(1.3); }
  }

  .cover { padding: 40px 24px calc(40px + env(safe-area-inset-bottom)); overflow-y: auto; scrollbar-width: none; }
  .cover::-webkit-scrollbar, .guest-sheet::-webkit-scrollbar { display: none; }
  /* Keep the same video, saturation and fixed positioning. Scale only masks blur edges. */
  .cover-video, .cover-video.is-ambient { opacity: 1; filter: blur(2px) saturate(1.18); transform: scale(1.025); }
  .cover-calligraphy { display: none; }
  .invite-card { width: 100%; max-width: 352px; padding: 30px 22px 22px; --m-radius: 24px; }
  .invite-card::before { border-radius: 15px; inset: 9px; border-color: rgba(245,219,176,.2); }
  .cover-slip { width: min(40%, 128px); margin: 12px auto 0; padding: 5px 5px 20px; animation-delay: .18s; }
  .cover-slip::before { width: 36px; height: 13px; top: -7px; }
  .invite-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; letter-spacing: .13em; }
  .cover-title { font-size: clamp(36px,10.5vw,46px); line-height: 1.4; margin: 28px 0 18px; letter-spacing: .08em; }
  .cover-title i { margin-left: 12px; font-size: 22px; color: var(--gold-bright); }
  .invite-line { font-size: 14px; letter-spacing: .16em; }
  .invite-date { font-size: 11px; letter-spacing: .03em; margin-top: 12px; }
  .wax-seal { margin-top: 25px; padding-bottom: 0; }
  .wax-hint { font-size: 12px; letter-spacing: .2em; margin-top: 18px; }
  .cover-music { position: relative; justify-content: center; align-items: center; gap: 9px; min-height: 44px; margin: 22px 0 0; font-size: 12px; color: var(--m-muted); cursor: pointer; }
  .cover-music input { appearance: none; -webkit-appearance: none; width: 34px; height: 20px; border-radius: 999px; background: rgba(255,231,193,.14); border: 1px solid var(--m-line); position: relative; cursor: pointer; transition: background .2s ease, border-color .2s ease; margin: 0; }
  .cover-music input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #cbb6a4; transition: transform .2s ease, background .2s ease; }
  .cover-music input:checked { background: rgba(228,201,140,.32); border-color: var(--gold); }
  .cover-music input:checked::after { transform: translateX(14px); background: var(--gold-bright); }
  .cover-music:has(input:checked) { color: var(--gold-bright); }
  .cover-music svg { width: 14px; height: 14px; }
  .site-header { top: calc(10px + env(safe-area-inset-top)); left: 12px; right: 12px; --m-radius: 28px; transform: none !important; }
  .header-inner { min-height: 62px; padding: 8px 12px 8px 18px; gap: 12px; }
  .brand { gap: 3px; align-items: flex-start; flex-direction: column; }
  .brand-mark { font-size: 20px; line-height: 1.2; color: var(--m-text); }
  .brand-mark span { color: #d24b3e; }
  .header-date { font-size: 9px; letter-spacing: .14em; color: var(--m-muted); font-variant-numeric: tabular-nums; }
  .header-actions { gap: 5px; }
  .icon-button { height: 44px; width: 44px; border: 1px solid rgba(255,233,207,.1); background: rgba(255,239,219,.06); color: var(--m-text); -webkit-backdrop-filter: none; backdrop-filter: none; opacity: 1; }
  .icon-button svg { width: 19px; height: 19px; }
  .site-nav { display: none; }
  .menu-button { display: grid; }
  /* The original atmosphere stays behind the content, never across form fields. */
  .sun-arc { display: block; z-index: 1; }
  #heroTitle:focus, #receiptTitle:focus { outline: none; }
  .scene-details .petals { display: block; z-index: -1; }
  /* 竖排诗词与照片卡相撞，手机端隐藏；诗词改为各幕题引（.scene-epigraph） */
  .poem-layer { display: none; }
  .scroll-progress { top: auto; bottom: 0; z-index: 42; height: 2px; background: var(--gold); }
  .side-nav { top: auto; height: auto; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); transform: none; width: auto; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 3px; padding: 5px; --m-radius: 999px; transition: transform .3s var(--m-ease), opacity .2s ease; }
  .chip { position: relative; z-index: 1; width: 100%; height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; border-radius: 26px; color: var(--m-muted); background: none; box-shadow: none; transform: none; }
  .chip > span { font: 600 18px/1.1 var(--font-serif); color: inherit; }
  .chip small { display: block; font: 500 10px/1.2 var(--font-sans); letter-spacing: .06em; }
  .chip.is-active { color: #fff2db; background: rgba(255,230,185,.14); box-shadow: inset 0 1px 0 rgba(255,242,219,.22); transform: none; }
  .chip[data-target="rsvp"].is-active { color: #fff1dd; background: linear-gradient(160deg, #af4436, #9e2b22); }
  /* A single sliding highlight; older engines keep the ordinary active pill. */
  @supports selector(:has(*)) {
    .side-nav::before { content: ''; position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 22px) / 5); border-radius: 26px; background: linear-gradient(155deg, rgba(255,233,193,.13), rgba(242,202,149,.06)); box-shadow: inset 0 1px 0 rgba(255,245,224,.3), inset 0 0 0 1px rgba(255,231,193,.12), 0 3px 12px rgba(0,0,0,.08); transform: translateX(calc(var(--dock-index, 0) * (100% + 3px))); transition: transform .42s var(--m-ease); pointer-events: none; }
    .side-nav:has(.chip:nth-child(1).is-active) { --dock-index: 0; }
    .side-nav:has(.chip:nth-child(2).is-active) { --dock-index: 1; }
    .side-nav:has(.chip:nth-child(3).is-active) { --dock-index: 2; }
    .side-nav:has(.chip:nth-child(4).is-active) { --dock-index: 3; }
    .side-nav:has(.chip:nth-child(5).is-active) { --dock-index: 4; }
    .side-nav:has(.chip.is-active) .chip.is-active { background: transparent; box-shadow: none; }
  }
  .chip::before, .chip::after { display: none; }
  body.is-typing .side-nav { opacity: 0; transform: translateY(120px); pointer-events: none; }
  /* 灯箱欣赏照片时，底部章节坞让位 */
  body:has(.lightbox.is-open) .side-nav { opacity: 0; transform: translateY(120px); pointer-events: none; }
  .scene { min-height: 0; padding: 18px var(--m-gutter) calc(var(--m-dock) + 18px); gap: 18px; justify-content: flex-start; overflow: visible; color: var(--m-text); scroll-margin-top: 0; }
  .reveal, .reveal-curtain, [data-split], [data-split].anim-fallback {
    opacity: 1 !important;
    visibility: visible;
    transform: none !important;
    filter: none !important;
    clip-path: none !important;
  }
  .reveal-curtain img { transform: none !important; }
  .scene-hero, .scene-story, .scene-details, .scene-moments, .scene-rsvp { background: transparent; }
  .scene-hero { padding-top: calc(88px + env(safe-area-inset-top)); }
  .scene-rsvp { padding-bottom: calc(var(--m-dock) + 28px); }
  .scene-head, .rsvp-intro { padding: 16px 18px 18px; }
  .scene-head h2, .rsvp-intro h2 { font: 700 clamp(26px,7.2vw,32px)/1.38 var(--font-serif); letter-spacing: .01em; color: var(--m-text); text-wrap: balance; text-shadow: 0 2px 26px rgba(23,19,24,.78), 0 1px 6px rgba(23,19,24,.42); }
  .scene-head h2 em, .rsvp-intro h2 em { color: var(--gold-bright); }
  .kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 11px; letter-spacing: .25em; color: var(--gold-bright); text-shadow: 0 1px 10px rgba(23,19,24,.6); }
  .kicker::before { content: ''; width: 26px; height: 1px; background: linear-gradient(90deg, var(--gold-bright), rgba(228,201,140,0)); }
  .lede, .rsvp-intro > p { font-size: 13.5px; line-height: 1.85; color: var(--m-muted); margin-top: 8px; max-width: 34em; text-shadow: 0 1px 12px rgba(23,19,24,.55); }
  /* 幕题引：经典诗句以横排小字开场（替代被隐藏的竖排诗词层） */
  .scene-epigraph { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; margin: 0 0 10px; font: 500 12px/1.7 var(--font-serif); letter-spacing: .12em; color: rgba(236,220,198,.85); text-shadow: 0 1px 12px rgba(23,19,24,.6); }
  .scene-epigraph cite { font: 400 10px/1 var(--font-sans); font-style: normal; letter-spacing: .1em; color: rgba(228,201,140,.52); }
  /* 窄屏让整句诗一行放下，出处另起一行，避免句尾孤字 */
  @media (max-width: 419px) {
    .scene-epigraph { font-size: 11px; letter-spacing: .05em; }
  }
  .hero-stage { display: grid; grid-template-columns: minmax(0,1fr); gap: 16px; }
  .hero-frame { width: min(68%, 236px); max-width: none; margin: 0 auto; order: 0; transform: rotate(-1.4deg); padding: 10px 10px 8px; border-radius: 22px; background: rgba(242,223,199,.9); border: 1px solid rgba(255,242,221,.65); box-shadow: inset 0 1px 0 rgba(255,255,255,.65), 0 16px 40px rgba(0,0,0,.2); }
  .hero-frame img { aspect-ratio: 2/3; width: 100%; height: auto; object-fit: contain; border-radius: 0; }
  .hero-frame figcaption { background: transparent; border: 0; font-size: 10px; letter-spacing: .05em; color: #655443; padding: 9px 0 2px; text-align: center; }
  .mobile-primary { background: linear-gradient(160deg, #af4436, #9f372e); min-height: 50px; flex: 1; border: 1px solid rgba(255,203,162,.22); border-radius: 999px; box-shadow: inset 0 1px 0 rgba(255,226,193,.16), 0 6px 16px rgba(64,17,20,.14); }
  /* 合并进标题块的倒计时：开放排版，数字带投影（显式 block，覆盖 .mobile-only 的 flex） */
  .hero-countdown { display: block; margin-top: 12px; border-top: 1px solid var(--m-line); padding-top: 10px; }
  .hero-merged-meta { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; font-family: var(--font-sans); font-style: normal; font-size: 12px; letter-spacing: .14em; color: var(--gold-bright); text-shadow: 0 1px 10px rgba(23,19,24,.6); }
  .hero-merged-meta span { color: var(--m-muted); font-variant-numeric: tabular-nums; letter-spacing: .08em; white-space: nowrap; }
  .hero-countdown .countdown-label { margin-top: 8px; text-shadow: 0 1px 10px rgba(23,19,24,.55); }
  .hero-countdown .countdown-num { font-size: 26px; text-shadow: 0 2px 18px rgba(23,19,24,.6); }
  .countdown-label { font-size: 11px; color: var(--m-muted); letter-spacing: .15em; }
  .countdown-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; margin-top: 8px; }
  .countdown-cell { display: flex; justify-content: center; align-items: baseline; gap: 3px; padding: 0 4px; border-radius: 0; background: none; border: 0; box-shadow: none; min-width: 0; }
  .countdown-cell + .countdown-cell { border-left: 1px solid var(--m-line); }
  .countdown-num { color: var(--m-text); font-size: 26px; font-variant-numeric: tabular-nums; }
  .countdown-unit { color: var(--m-muted); font-size: 11px; }
  .story-spread { display: grid; gap: 28px; }
  /* 章节：拍立得居中，文案紧贴成一组，避免左右错位留白 */
  .chapter { display: block; padding: 0; overflow: visible; background: none; border: 0; border-radius: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .chapter .frame { width: min(86%, 280px); margin: 0 auto 14px; padding: 10px 10px 36px; border-radius: 4px; background: rgba(242,223,199,.94); border: 1px solid rgba(255,242,221,.55); box-shadow: 0 18px 38px rgba(0,0,0,.24); }
  .chapter-red .frame { transform: rotate(-1.5deg); }
  .chapter-kraft .frame { transform: rotate(1.4deg); }
  .chapter .frame img { border-radius: 0; width: 100%; height: auto; aspect-ratio: 2/3; object-fit: contain; }
  .chapter-copy { min-width: 0; padding: 16px 18px 18px; --m-radius: 20px; }
  .chapter-copy h3 { font-size: 21px; line-height: 1.6; color: var(--m-text); margin-top: 10px; text-shadow: 0 1px 12px rgba(23,19,24,.55); }
  .chapter-copy > p { font-size: 13.5px; line-height: 1.9; color: var(--m-muted); text-shadow: 0 1px 10px rgba(23,19,24,.5); }
  .chapter-copy > p + p { margin-top: 8px; }
  .chapter-copy .chapter-tag { font-size: 10px; color: var(--gold-bright); padding: 0; border: 0; letter-spacing: .12em; }
  /* 小事记：无年份的情感时间线，承接两章之后 */
  .story-timeline { display: block; padding: 24px 20px 22px; }  .timeline-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; font: 600 12px/1 var(--font-serif); letter-spacing: .26em; color: var(--gold-bright); }
  .timeline-head::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--m-line), rgba(228,201,140,0)); }
  .timeline-list { display: grid; list-style: none; }
  .timeline-list li { position: relative; display: grid; grid-template-columns: 15px minmax(0,1fr); column-gap: 14px; padding-bottom: 20px; }
  .timeline-list li:last-child { padding-bottom: 0; }
  .timeline-list li::before { content: ''; position: absolute; left: 7px; top: 18px; bottom: 2px; width: 1px; background: linear-gradient(180deg, rgba(228,201,140,.38), rgba(228,201,140,.07)); }
  .timeline-list li:last-child::before { display: none; }
  .tl-mark { width: 9px; height: 9px; margin-top: 7px; justify-self: center; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #eed5a3, #c9a15b); box-shadow: 0 0 0 3px rgba(228,201,140,.14); }
  .timeline-list strong { font: 600 15px/1.6 var(--font-serif); letter-spacing: .04em; color: var(--m-text); }
  .timeline-list p { margin-top: 4px; font-size: 12.5px; line-height: 1.85; color: var(--m-muted); }
  .details-layout { gap: 30px; }
  .schedule { gap: 0; padding: 4px 22px; }
  .schedule::before, .schedule li::after { display: none; }
  .schedule li { display: block; padding: 0; border: 0; border-bottom: 1px solid rgba(255,225,180,.22); background: none; box-shadow: none; border-radius: 0; }
  .schedule li.is-highlight { background: rgba(228,201,140,.05); border-color: var(--m-line); border-radius: 14px; }
  .schedule li.is-highlight .schedule-entry strong { color: var(--gold-bright); }
  .schedule li.is-highlight .schedule-entry strong::after { content: '吉时'; display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 999px; background: rgba(158,43,34,.5); border: 1px solid rgba(228,201,140,.32); font-size: 10px; letter-spacing: .14em; color: #ffe9b8; vertical-align: 2px; }
  .schedule li:last-child { border-bottom: 0; }
  .schedule-entry summary { display: grid; grid-template-columns: 56px minmax(0,1fr) 18px; gap: 16px; align-items: center; padding: 20px 0; min-height: 64px; cursor: pointer; list-style: none; }
  .schedule-entry summary::-webkit-details-marker { display: none; }
  .schedule-entry time { font-size: 24px; color: var(--gold-bright); letter-spacing: -.03em; }
  .schedule-entry strong { font: 500 15px/1.7 var(--font-sans); color: var(--m-text); }
  .schedule-entry summary svg { width: 17px; height: 17px; color: var(--gold-bright); transition: transform .2s ease; }
  .schedule-entry[open] summary svg { transform: rotate(180deg); }
  .schedule-entry p { margin: -4px 26px 20px 72px; color: var(--m-muted); font-size: 13px !important; line-height: 1.85; }
  .schedule-hint { font-size: 12px; color: var(--m-muted); margin-top: -12px; padding: 8px 14px; border-radius: 999px; background: var(--m-panel); width: fit-content; }
  .venue { padding: 26px 22px; }
  .venue-kicker { font-size: 11px; }
  .venue h3 { font-size: 25px; margin: 12px 0; color: var(--m-text); }
  .venue-address { font-size: 13px; line-height: 1.9; color: var(--m-muted); }
  .venue-notes { font-size: 12px; color: var(--m-muted); margin-top: 16px; }
  .venue-actions { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
  .venue-actions .btn-on-dark { font-size: 12px; min-height: 48px; padding: 10px 8px; gap: 5px; border-radius: 999px; background: rgba(255,224,188,.07); border-color: var(--m-line); box-shadow: inset 0 1px 0 rgba(255,237,208,.08); }
  .venue-actions svg { width: 15px; height: 15px; }
  /* 赴约小贴士：venue 卡之后的手风琴 */
  .tips-card { display: block; padding: 2px 20px 6px; }
  .tips-card summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; cursor: pointer; list-style: none; font: 600 14px/1.6 var(--font-serif); letter-spacing: .12em; color: var(--gold-bright); }
  .tips-card summary::-webkit-details-marker { display: none; }
  .tips-title { display: flex; align-items: center; gap: 10px; }
  .tips-title svg { width: 16px; height: 16px; }
  .tips-chev { width: 16px; height: 16px; transition: transform .2s ease; }
  .tips-card[open] .tips-chev { transform: rotate(180deg); }
  .tips-list { display: grid; padding-bottom: 14px; }
  .tips-list li { display: grid; grid-template-columns: 62px minmax(0,1fr); column-gap: 14px; padding: 11px 0; border-top: 1px dashed rgba(228,201,140,.16); }
  .tips-list strong { font: 500 13px/1.8 var(--font-sans); color: var(--m-text); white-space: nowrap; }
  .tips-list span { font-size: 12.5px; line-height: 1.85; color: var(--m-muted); }
  .frame-wall { width: calc(100% + var(--m-gutter) * 2); margin: 0 calc(-1 * var(--m-gutter)); padding: 4px var(--m-gutter) 8px; display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--m-gutter); touch-action: pan-x pan-y pinch-zoom; }
  .frame-wall .frame { flex: 0 0 78%; min-width: 0; max-width: none; margin: 0; align-self: start; padding: 10px; border-radius: 22px; background: rgba(242,223,199,.94); border: 1px solid rgba(255,243,224,.65); scroll-snap-align: center; transform: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 12px 24px rgba(0,0,0,.14); opacity: 1; }
  .frame-wall .frame img { aspect-ratio: 2/3; height: auto; width: 100%; object-fit: contain; border-radius: 0; }
  .frame-mat { border-radius: 0; overflow: hidden; }
  .frame-label { color: #514135; font-size: 12px; padding: 13px 6px 6px; background: none; }
  /* 工具条贴着照片墙下方，不再单独占一张玻璃卡 */
  .gallery-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 2px 4px 0; width: 100%; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .gallery-position { font: 14px var(--font-display); color: var(--m-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .gallery-position b { font-size: 24px; color: var(--gold-bright); font-weight: 500; }
  .gallery-dots { display: flex; gap: 0; }
  .gallery-dots button { display: grid; place-items: center; width: 24px; height: 44px; }
  .gallery-dots button::after { content: ''; width: 17px; height: 5px; background: #8d7662; border-radius: 999px; transform: scaleX(.2941); transition: transform .2s ease, background .2s ease; }
  .gallery-dots button[aria-pressed="true"]::after { transform: scaleX(1); background: var(--gold-bright); }
  .photo-like { display: flex; align-items: center; gap: 6px; min-height: 44px; color: var(--m-muted); font-size: 11px; white-space: nowrap; }
  .photo-like svg { width: 18px; height: 18px; }
  .photo-like[aria-pressed="true"] { color: #f2b1a3; }
  .photo-like[aria-pressed="true"] svg { fill: currentColor; }
  .gallery-hint { justify-content: flex-start; align-items: center; gap: 8px; font-size: 11px; color: var(--m-muted); margin-top: 6px; padding: 0; background: none; text-shadow: 0 1px 10px rgba(23,19,24,.5); }
  .gallery-hint svg { width: 15px; height: 15px; }
  .field input, .field select, .field textarea { font-size: 16px; min-height: 50px; padding: 12px 14px 12px 38px; color: var(--m-text); border-radius: var(--m-control); background: rgba(15,12,16,.3); border-color: rgba(242,215,183,.3); box-shadow: inset 0 1px 3px rgba(0,0,0,.08); }
  .field input::placeholder, .field textarea::placeholder { color: #cbbcac; opacity: 1; }
  .field > svg { left: 12px; width: 17px; height: 17px; }
  /* 家书融入请柬卡：正文空间收紧（夹照已占位，题下间距再收一点） */
  .invite-card .letter-salutation {
    margin-top: 12px;
    font-size: 13.5px;
    letter-spacing: .04em;
  }
  .invite-card .letter-body {
    margin-top: 9px;
    font-size: 12.5px;
    line-height: 1.95;
    text-indent: 2em;
  }
  .invite-card .invite-date {
    margin-top: 12px;
  }
  .rsvp-wrap { gap: 28px; }
  .rsvp-intro .rsvp-note { font-size: 12px; line-height: 1.85; color: var(--m-muted); align-items: flex-start; text-shadow: 0 1px 10px rgba(23,19,24,.5); }
  .rsvp-note svg { flex-shrink: 0; margin-top: 4px; }
  .rsvp-form { padding: 26px 18px; gap: 22px; }
  .rsvp-form::before, .rsvp-form::after { display: none; }
  .reply-progress { font-size: 12px; color: var(--gold-bright); border-bottom: 1px solid var(--m-line); padding-bottom: 14px; }
  .form-row { display: grid; grid-template-columns: minmax(0,1fr); gap: 20px; }
  fieldset.form-group { border: 0; padding: 0; margin: 0; min-width: 0; }
  .form-group label, .form-group legend { font-size: 13px; color: var(--m-text); margin-bottom: 9px; }
  .label-hint { color: var(--m-muted); font-size: 11px; margin-left: 5px; }
  .guest-stepper { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--m-line); border-radius: 999px; padding: 5px; gap: 10px; background: rgba(15,12,16,.16); }
  .guest-stepper button { width: 44px; height: 44px; display: grid; place-items: center; background: rgba(255,228,190,.1); border-radius: 50%; color: var(--gold-bright); }
  .guest-stepper svg { width: 17px; height: 17px; }
  .guest-stepper output { color: var(--m-text); font-size: 15px; font-variant-numeric: tabular-nums; }
  .choice-cards { gap: 10px; }
  .choice-card-inner { padding: 16px 10px; border-radius: 22px; min-height: 112px; background: rgba(255,231,198,.035); border-color: var(--m-line); transition: background .2s ease, border-color .2s ease, box-shadow .2s ease; }
  .choice-card-inner > svg { width: 22px; height: 22px; margin-bottom: 8px; }
  .choice-card-inner strong { font-size: 15px; }
  .choice-card-inner > span { font-size: 11px; margin-top: 6px; color: var(--m-muted); }
  .choice-card input:checked + .choice-card-inner { background: rgba(176,71,52,.28); border-color: #e0aa86; box-shadow: inset 0 1px 0 rgba(255,224,190,.12); }
  .choice-card input:focus-visible + .choice-card-inner { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
  .field textarea { min-height: 112px; padding: 14px; line-height: 1.7; }
  .rsvp-form .btn-submit { color: var(--m-text); min-height: 52px; font-size: 15px; border-radius: 999px; margin-top: 0; background: linear-gradient(160deg, #af4436, #9f372e); border: 1px solid rgba(255,203,162,.22); box-shadow: inset 0 1px 0 rgba(255,226,193,.18), 0 6px 16px rgba(64,17,20,.14); }
  .form-note { font-size: 12px; line-height: 1.8; color: var(--m-muted); }
  .reply-receipt { padding: 8px 0; }
  .reply-receipt .mobile-primary { width: 100%; font-size: 13px; }
  .site-footer { margin-top: 28px; padding: 26px 22px; }
  .footer-inner { display: flex; flex-direction: column; gap: 14px; }
  .footer-mark { color: var(--gold-bright); font-size: 22px; border: 0; }
  .footer-thanks { color: var(--m-muted); font-size: 12px; }
  .footer-date { display: block; font-size: 10px; color: var(--m-muted); }
  .back-to-top { display: flex; min-height: 44px; align-items: center; gap: 8px; font-size: 12px; color: var(--gold-bright); }
  .toast { width: calc(100% - 40px); max-width: 390px; bottom: calc(var(--m-dock) + 12px); font-size: 13px; border-radius: 24px; color: var(--m-text); background: var(--m-panel); border: 1px solid var(--m-line); -webkit-backdrop-filter: var(--m-backdrop); backdrop-filter: var(--m-backdrop); box-shadow: var(--m-shadow); }
  .toast-msg { overflow-wrap: anywhere; }
  .lightbox { background: rgba(16,12,17,.9); -webkit-backdrop-filter: var(--m-backdrop); backdrop-filter: var(--m-backdrop); padding: calc(80px + env(safe-area-inset-top)) 20px calc(120px + env(safe-area-inset-bottom)); }
  .lightbox-frame { width: 100%; max-width: 440px; }
  .lightbox-frame img { max-width: 100%; max-height: calc(100dvh - 220px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); height: auto; width: auto; object-fit: contain; margin: 0 auto; border-radius: 3px; touch-action: pinch-zoom; }
  .lightbox-frame figcaption { color: var(--m-muted); line-height: 1.8; font-size: 13px; margin-top: 20px; }
  .lightbox-close, .lightbox-nav { border: 1px solid var(--m-line); background: rgba(255,232,200,.08); box-shadow: inset 0 1px 0 rgba(255,238,214,.12); }
  .lightbox-close { width: 48px; height: 48px; right: 18px; top: calc(18px + env(safe-area-inset-top)); }
  .lightbox-nav { width: 48px; height: 48px; top: auto; bottom: calc(30px + env(safe-area-inset-bottom)); transform: none; }
  .lightbox-nav.is-prev { left: calc(50% - 85px); }
  .lightbox-nav.is-next { right: calc(50% - 85px); }
  .lightbox-count { bottom: calc(40px + env(safe-area-inset-bottom)); font-size: 12px; }
  .lightbox-count b { font-size: 18px; }
  .guest-sheet { scrollbar-width: none; width: min(calc(100% - 16px), 480px); max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); margin: auto auto calc(8px + env(safe-area-inset-bottom)); padding: 10px 22px 26px; --m-radius: 24px; }
  .guest-sheet::backdrop { background: rgba(12,9,13,.48); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
  .sheet-handle { width: 36px; background: rgba(244,225,198,.36); margin-bottom: 18px; }
  .sheet-header button { background: rgba(255,232,200,.07); }
  .sheet-content p { color: var(--m-muted); }
  .sheet-content textarea, .sheet-content input { border-radius: var(--m-control); background: rgba(15,12,16,.3); border-color: var(--m-line); }
  .sheet-links { gap: 8px; }
  .sheet-links a { min-height: 60px; padding: 16px 12px; border: 1px solid rgba(248,223,187,.13); border-radius: 18px; background: rgba(255,232,200,.04); font-size: 14px; }
  .sheet-links a span { font-size: 18px; }
  .mobile-primary, .chip, .photo-like, .guest-stepper button, .btn-submit, .icon-button, .sheet-header button, .sheet-links a, .venue-actions .btn-on-dark { transition: transform .28s var(--m-ease), background-color .2s ease, box-shadow .2s ease; }
  .mobile-primary:active, .chip:active, .photo-like:active, .guest-stepper button:active, .btn-submit:active, .icon-button:active, .sheet-header button:active, .sheet-links a:active, .venue-actions .btn-on-dark:active { transform: scale(.96); }

  /* Native dialog retains the top layer while its closing transition runs. */
  @supports (transition-behavior: allow-discrete) {
    .guest-sheet { opacity: 0; transform: translateY(44px); transition: opacity .25s ease, transform .38s var(--m-ease), display .38s allow-discrete, overlay .38s allow-discrete; }
    .guest-sheet[open] { opacity: 1; transform: translateY(0); animation: none; }
    .guest-sheet::backdrop { background: rgba(12,9,13,0); transition: background .25s ease, display .38s allow-discrete, overlay .38s allow-discrete; }
    .guest-sheet[open]::backdrop { background: rgba(12,9,13,.48); }
    @starting-style {
      .guest-sheet[open] { opacity: 0; transform: translateY(44px); }
      .guest-sheet[open]::backdrop { background: rgba(12,9,13,0); }
    }
  }
  @media (prefers-reduced-transparency: reduce) {
    :root { --m-panel: rgba(24,18,26,.94); --m-backdrop: none; }
    .site-header, .side-nav, .guest-sheet { --m-backdrop: none; }
  }
}
@media (max-width: 359px) {
  :root { --m-gutter: 18px; }
  .gallery-tools { gap: 6px; }
  .chapter { gap: 14px; }
  .chapter-copy h3 { font-size: 17px; }
}
@media (max-height: 600px) and (max-width: 1024px) {
  .cover { justify-content: flex-start; }
  .invite-card { margin: auto; padding-top: 20px; }
  .cover-title { font-size: 32px; margin: 12px 0; }
  .wax-seal { margin-top: 16px; }
  .cover-music { margin-top: 10px; }
}
@media (min-width: 741px) and (max-width: 1024px) and (max-height: 500px) {
  .chip { height: 46px; }
  .lightbox { padding: 20px 80px 64px; }
  .lightbox-frame img { max-height: calc(100dvh - 140px); }
  .lightbox-close { top: 14px; }
  .lightbox-nav { top: 50%; bottom: auto; transform: translateY(-50%); }
  .lightbox-nav.is-prev { left: 18px; }
  .lightbox-nav.is-next { right: 18px; }
  .lightbox-count { bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .guest-sheet[open] { animation: none; }
}
/* Shared interaction feedback and non-script fallback. */
body.has-sheet { overflow: hidden; }
.guest-sheet { max-width: 100%; }
#receiptSummary { white-space: pre-line; overflow-wrap: anywhere; line-height: 1.9; }
.lightbox-status { color: #e4c98c; font-size: 13px; line-height: 1.8; text-align: center; }
.no-js .mobile-only, .no-js .side-nav, .no-js .header-actions, .no-js #rsvpForm { display: none !important; }
.no-js .reveal, .no-js .reveal-curtain, .no-js .schedule li { opacity: 1; visibility: visible; transform: none; clip-path: none; }
.no-js-note { padding: 20px; border: 1px solid currentColor; line-height: 1.8; }
@media (max-width: 740px), (max-width: 1024px) and (max-height: 500px) {
  .gallery-tools { display: grid; grid-template-columns: 1fr 1fr; row-gap: 0; }
  .gallery-dots { grid-column: 1 / -1; grid-row: 2; justify-content: center; }
  .gallery-dots button { width: 44px; height: 44px; }
  .photo-like { justify-self: end; }
  .no-js .schedule li { padding: 18px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sun-arc, .scene-details .petals { display: none; }
  .guest-sheet, .guest-sheet[open] { transform: none; }
}

/* --- Merged into host cards: sections, not nested cards --- */
.scene-head .gallery-hint {
  background: none; border: 0; border-radius: 0; box-shadow: none;
  padding: 0; margin: 13px 0 0; justify-content: flex-start;
}
