/* Aurora Wedding 共用設計系統(明亮版):奶油底 + 陽光琥珀色,襯線標題,SVG 圖示 */
:root {
  --bg: #fffaf0; --surface: #ffffff; --surface-2: #fff4d9; --line: #ecdcb2;
  --text: #3b2f18; --muted: #7a6945;
  --gold: #f5a800; --gold-hover: #ffb81f; --gold-ink: #3a2600; --gold-text: #9a5f00;
  --gold-bg: #fff1c9; --gold-line: #f2cf75;
  --ok: #12805c; --ok-bg: #e0f6ec; --ok-line: #9edcc0;
  --heart: #ff4d6d; --heart-bg: #ffe5ea; --heart-line: #ffb3c1;
  --danger: #c93a32; --glass: rgba(255,250,240,.9); --chip: rgba(255,255,255,.9);
  --shadow: 0 6px 24px rgba(160,110,0,.14); --r: 14px; --ease: cubic-bezier(.2,.8,.2,1);
  --serif: "Cormorant Garamond", "Noto Serif TC", "Songti TC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang HK", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); }
body { min-height: 100dvh; background: radial-gradient(900px 420px at 88% -8%, #ffe9a9 0%, rgba(255,233,169,0) 70%), radial-gradient(700px 380px at -5% 105%, #ffe2c4 0%, rgba(255,226,196,0) 70%), var(--bg); background-attachment: fixed; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: .01em; margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); transition: background .2s, border-color .2s, transform .15s var(--ease), box-shadow .2s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
button:hover { border-color: var(--gold-line); background: var(--surface-2); }
button:active { transform: scale(.97); }
button.primary { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); font-weight: 600; box-shadow: 0 3px 12px rgba(245,168,0,.35); }
button.primary:hover { background: var(--gold-hover); }
button.ghost { background: transparent; border-color: transparent; }
button.ghost:hover { background: var(--surface-2); }
button.danger { color: var(--danger); }
button.icon { width: 44px; padding: 0; }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
input, textarea, select { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 48px; transition: border-color .2s, box-shadow .2s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245,168,0,.22); }
input:disabled { background: var(--surface-2); color: var(--muted); }
::placeholder { color: #a99a76; }
textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
label.field { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i.fill { fill: currentColor; }
.muted { color: var(--muted); font-size: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; }
.hidden { display: none !important; }
.center { text-align: center; padding: 64px 20px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 20px 16px 120px; }

.bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top)); background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.bar h1 { font-size: 22px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.badge { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 12px; font-size: 13px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.badge.gold { color: var(--gold-text); border-color: var(--gold-line); background: var(--gold-bg); }
.badge.ok { color: var(--ok); border-color: var(--ok-line); background: var(--ok-bg); }

/* 彈出層 */
.modal { position: fixed; inset: 0; z-index: 80; background: rgba(70,45,0,.35); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease; }
.sheet { width: 100%; max-width: 520px; max-height: 90dvh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 24px 24px 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); animation: rise .28s var(--ease); box-shadow: var(--shadow); }
@media (min-width: 700px) { .modal { align-items: center; } .sheet { border-radius: 24px; } }
.sheet h2 { font-size: 26px; margin-bottom: 8px; }
.sheet p { margin: 8px 0; color: var(--muted); }
.list { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin: 12px 0; background: var(--surface); }
.list > div { padding: 14px 16px; min-height: 48px; border-bottom: 1px solid var(--line); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.list > div:last-child { border-bottom: 0; }
.list > div:hover { background: var(--surface-2); }

.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--text); color: #fffaf0; padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 120; animation: rise .25s var(--ease); max-width: 90vw; box-shadow: var(--shadow); }
.toast.warn { background: #b45309; color: #fff; }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; } }

/* 兩步確認 */
.steps { display: flex; gap: 6px; margin-bottom: 14px; }
.steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.steps i.on { background: var(--gold); }
.cd { position: relative; overflow: hidden; width: 100%; }
.cd .fill { position: absolute; inset: 0; background: rgba(255,255,255,.45); transform-origin: left; transform: scaleX(0); }
.cd.run .fill { animation: fillbar 8s linear forwards; }
.cd span { position: relative; }
@keyframes fillbar { to { transform: scaleX(1); } }
.warn-box { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r); background: var(--gold-bg); border: 1px solid var(--gold-line); color: #6b4300; margin: 14px 0; font-size: 15px; }
.done { text-align: center; padding: 18px 0 6px; }
.done .ring { width: 72px; height: 72px; border-radius: 50%; background: var(--ok-bg); border: 1px solid var(--ok-line); color: var(--ok); display: grid; place-items: center; margin: 0 auto 14px; }
.done .ring svg { width: 34px; height: 34px; stroke-width: 2.4; }


.banner { margin: 14px 16px 0; padding: 14px 16px; border-radius: var(--r); background: var(--ok-bg); border: 1px solid var(--ok-line); color: var(--ok); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.banner .grow { min-width: 160px; }

/* ====================================================================
   Apple 風格層(依 UI UX Pro Max「Liquid Glass」):半透明玻璃導航、大圓角、
   SF 字體、彈性(spring)動畫、過場動畫。所有動畫都尊重「減少動態效果」,
   「減少透明度」時會變返不透明。
   ==================================================================== */
:root { --spring: cubic-bezier(.34,1.56,.64,1); --out: cubic-bezier(.22,1,.36,1); --r: 22px; --glass-bg: rgba(255,251,240,.66); --glass-line: rgba(255,255,255,.8); }
h1, h2, h3 { font-family: var(--sans); font-weight: 700; letter-spacing: -.022em; }
.brand .wm { font-family: var(--serif); font-weight: 600; letter-spacing: .02em; }
.bar, .top, .dock { background: var(--glass-bg); -webkit-backdrop-filter: blur(28px) saturate(1.8); backdrop-filter: blur(28px) saturate(1.8); border-color: rgba(236,220,178,.55); box-shadow: inset 0 1px 0 var(--glass-line), 0 6px 30px rgba(160,110,0,.07); }
.bar h1 { font-size: 20px; }
button { transition: transform .4s var(--spring), background .25s, border-color .25s, box-shadow .25s; }
button:active { transform: scale(.94); transition-duration: .12s; }
button.primary { background: linear-gradient(180deg, #ffc23a, #f5a800); border-color: #e89c00; box-shadow: 0 4px 14px rgba(245,168,0,.38), inset 0 1px 0 rgba(255,255,255,.55); }
button.primary:hover { background: linear-gradient(180deg, #ffcb55, #ffb312); }
input, textarea, select { border-radius: 14px; }
.sheet { background: rgba(255,253,246,.84); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); border: 1px solid var(--glass-line); border-radius: 30px 30px 0 0; box-shadow: 0 -12px 60px rgba(120,80,0,.22), inset 0 1px 0 #fff; position: relative; animation: sheetIn .6s var(--spring); }
.sheet::before { content: ""; position: absolute; top: 8px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 3px; background: rgba(90,60,0,.18); }
.sheet h2 { margin-top: 6px; }
@media (min-width: 700px) { .sheet { border-radius: 30px; animation-name: popSheet; } .sheet::before { display: none; } }
.modal { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: fade .3s var(--out); }
.list { border-radius: 18px; }
.badge { transition: background .3s, color .3s, transform .4s var(--spring); }
.toast { animation: toastIn .55s var(--spring); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 24px) scale(.9); } }
@keyframes sheetIn { from { opacity: 0; transform: translateY(56px) scale(.97); } }
@keyframes popSheet { from { opacity: 0; transform: translateY(16px) scale(.92); } }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } }
@keyframes popIn { from { opacity: 0; transform: translateY(18px) scale(.94); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes heartPop { 0% { transform: scale(.55); } 55% { transform: scale(1.45); } 100% { transform: scale(1); } }
@keyframes tick { 0% { transform: scale(1.4); } 100% { transform: scale(1); } }
@keyframes slideInR { from { opacity: 0; transform: translateX(46px) scale(.97); } }
@keyframes slideInL { from { opacity: 0; transform: translateX(-46px) scale(.97); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes frameIn { from { opacity: 0; transform: scale(.78); } }
@keyframes turnR { from { opacity: 0; transform: translateX(40px) scale(.985); } }
@keyframes turnL { from { opacity: 0; transform: translateX(-40px) scale(.985); } }
@keyframes floaty { 50% { transform: translateY(-5px); } }
@keyframes confetti { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)); } }
/* 過場:每次換畫面,內容淡入 + 輕輕上浮 */
#app > * { animation: viewIn .55s var(--out) backwards; }
/* 列表 / 相片 / 縮圖:依次彈入 */
.albums > *, .tiles > *, .gal > *, .bk-thumbs > *, .bk-strip > * { animation: popIn .6s var(--spring) backwards; }
.albums > :nth-child(1), .tiles > :nth-child(1), .gal > :nth-child(1), .bk-thumbs > :nth-child(1), .bk-strip > :nth-child(1) { animation-delay: 45ms; }
.albums > :nth-child(2), .tiles > :nth-child(2), .gal > :nth-child(2), .bk-thumbs > :nth-child(2), .bk-strip > :nth-child(2) { animation-delay: 90ms; }
.albums > :nth-child(3), .tiles > :nth-child(3), .gal > :nth-child(3), .bk-thumbs > :nth-child(3), .bk-strip > :nth-child(3) { animation-delay: 135ms; }
.albums > :nth-child(4), .tiles > :nth-child(4), .gal > :nth-child(4), .bk-thumbs > :nth-child(4), .bk-strip > :nth-child(4) { animation-delay: 180ms; }
.albums > :nth-child(5), .tiles > :nth-child(5), .gal > :nth-child(5), .bk-thumbs > :nth-child(5), .bk-strip > :nth-child(5) { animation-delay: 225ms; }
.albums > :nth-child(6), .tiles > :nth-child(6), .gal > :nth-child(6), .bk-thumbs > :nth-child(6), .bk-strip > :nth-child(6) { animation-delay: 270ms; }
.albums > :nth-child(7), .tiles > :nth-child(7), .gal > :nth-child(7), .bk-thumbs > :nth-child(7), .bk-strip > :nth-child(7) { animation-delay: 315ms; }
.albums > :nth-child(8), .tiles > :nth-child(8), .gal > :nth-child(8), .bk-thumbs > :nth-child(8), .bk-strip > :nth-child(8) { animation-delay: 360ms; }
.albums > :nth-child(9), .tiles > :nth-child(9), .gal > :nth-child(9), .bk-thumbs > :nth-child(9), .bk-strip > :nth-child(9) { animation-delay: 405ms; }
.albums > :nth-child(10), .tiles > :nth-child(10), .gal > :nth-child(10), .bk-thumbs > :nth-child(10), .bk-strip > :nth-child(10) { animation-delay: 450ms; }
.albums > :nth-child(11), .tiles > :nth-child(11), .gal > :nth-child(11), .bk-thumbs > :nth-child(11), .bk-strip > :nth-child(11) { animation-delay: 495ms; }
.albums > :nth-child(12), .tiles > :nth-child(12), .gal > :nth-child(12), .bk-thumbs > :nth-child(12), .bk-strip > :nth-child(12) { animation-delay: 540ms; }
.albums > :nth-child(13), .tiles > :nth-child(13), .gal > :nth-child(13), .bk-thumbs > :nth-child(13), .bk-strip > :nth-child(13) { animation-delay: 585ms; }
.albums > :nth-child(14), .tiles > :nth-child(14), .gal > :nth-child(14), .bk-thumbs > :nth-child(14), .bk-strip > :nth-child(14) { animation-delay: 630ms; }
.albums > :nth-child(15), .tiles > :nth-child(15), .gal > :nth-child(15), .bk-thumbs > :nth-child(15), .bk-strip > :nth-child(15) { animation-delay: 630ms; }
.albums > :nth-child(16), .tiles > :nth-child(16), .gal > :nth-child(16), .bk-thumbs > :nth-child(16), .bk-strip > :nth-child(16) { animation-delay: 630ms; }

.album { transition: transform .45s var(--spring), box-shadow .3s; }
.album:hover { transform: translateY(-5px) scale(1.012); }
.album:active { transform: scale(.98); }
.login .mark { animation: popIn .7s var(--spring) backwards, floaty 5s ease-in-out 1s infinite; }
.counter { display: inline-block; }
.counter.tick { animation: tick .5s var(--spring); }
.meter i, .prog i { transition: width .7s var(--out); }
.tile { background: linear-gradient(110deg, #fff0cc 30%, #fffaf0 50%, #fff0cc 70%) 0 0 / 200% 100%; animation: popIn .6s var(--spring) backwards, shimmer 1.5s linear infinite; transition: transform .45s var(--spring), box-shadow .3s; }
.tile.ready { animation: popIn .6s var(--spring) backwards; background: var(--surface-2); }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tile img { opacity: 0; transform: scale(1.05); transition: opacity .6s var(--out), transform .9s var(--out); }
.tile img.ld { opacity: 1; transform: none; }
.tile .hb.pop svg { animation: heartPop .55s var(--spring); }
.lb .stage img.in-r { animation: slideInR .42s var(--out); }
.lb .stage img.in-l { animation: slideInL .42s var(--out); }
.abk-stage img { animation: popIn .6s var(--spring) backwards; }
.done .ring { animation: popIn .7s var(--spring) backwards; }
.done .ring svg path { stroke-dasharray: 26; stroke-dashoffset: 26; animation: draw .6s .3s var(--out) forwards; }
.done h2, .done p { animation: viewIn .6s .35s var(--out) backwards; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.confetti i { position: absolute; left: 50%; top: 42%; width: 8px; height: 13px; border-radius: 3px; background: var(--c); opacity: 0; animation: confetti 1.2s var(--out) forwards; animation-delay: var(--d); }
.banner { animation: popIn .6s var(--spring) backwards; }
.frame.fresh { animation: frameIn .5s var(--spring); }
.bk-page.turn-r { animation: turnR .5s var(--out); }
.bk-page.turn-l { animation: turnL .5s var(--out); }
.hd { animation: popIn .35s var(--spring) backwards; }
.bk-th { transition: transform .4s var(--spring), border-color .2s; }
.bk-th:hover { transform: scale(1.06); }
.bk-th.armed { transform: scale(1.08); }
/* iOS 風格分段控制 */
.seg { background: rgba(120,90,20,.09); padding: 4px; border-radius: 18px; gap: 4px; }
.segbtn { border: 0; background: transparent; border-radius: 14px; transition: background .3s var(--out), box-shadow .3s var(--out), transform .4s var(--spring); }
.segbtn:hover { background: rgba(255,255,255,.5); }
.segbtn.on { background: #fff; border: 0; box-shadow: 0 3px 12px rgba(120,80,0,.2); }
.presets button { transition: transform .4s var(--spring), background .25s, border-color .25s; }
@media (prefers-reduced-transparency: reduce) { .bar, .top, .dock, .sheet, .toast, .modal { -webkit-backdrop-filter: none; backdrop-filter: none; } .bar, .top, .dock { background: var(--bg); } .sheet { background: var(--surface); } }

.static > * { animation: none !important; }

/* 語言切換 */
.lang { display: inline-flex; flex: none; background: rgba(120,90,20,.1); border-radius: 999px; padding: 2px; gap: 2px; }
.langbtn { min-height: 30px; padding: 0 11px; font-size: 13px; border: 0; background: transparent; border-radius: 999px; color: var(--muted); }
.langbtn.on { background: #fff; color: var(--text); box-shadow: 0 1px 5px rgba(120,80,0,.22); font-weight: 600; }
.lang-corner { position: fixed; top: calc(12px + env(safe-area-inset-top)); right: 14px; z-index: 30; }

/* Logo */
.logo { height: 34px; width: auto; display: block; user-select: none; }
.logo-lg { width: min(260px, 70vw); height: auto; display: block; margin: 0 auto 22px; animation: popIn .7s var(--spring) backwards; }
.brand { align-items: center; }

/* 篩選 / 尺寸 chips(三個網站共用) */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { min-height: 36px; padding: 0 14px; font-size: 14px; color: var(--muted); }
.chip.on { color: var(--gold-text); border-color: var(--gold-line); background: var(--gold-bg); }
