/* 客人揀相頁(明亮版) */
.login { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; max-width: 380px; margin: 0 auto; padding: 24px; text-align: center; }
.login .mark { width: 60px; height: 60px; border-radius: 50%; border: 1px solid var(--gold-line); background: var(--gold-bg); color: var(--gold-text); display: grid; place-items: center; margin: 0 auto 22px; box-shadow: var(--shadow); }
.login h1 { font-size: 40px; line-height: 1.15; margin-bottom: 8px; }
.login input { text-align: center; font-size: 28px; letter-spacing: .5em; padding-left: calc(14px + .5em); margin: 26px 0 12px; font-variant-numeric: tabular-nums; }
.login .err { min-height: 22px; color: var(--danger); font-size: 14px; margin-bottom: 8px; }
.login.shake input { animation: shake .35s; border-color: var(--danger); }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

.top { padding: 10px 16px 12px; padding-top: calc(12px + env(safe-area-inset-top)); position: sticky; top: 0; z-index: 10; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top .line { display: flex; align-items: center; gap: 10px; }
.top h1 { font-size: 24px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meter { height: 4px; background: var(--line); border-radius: 4px; margin-top: 10px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--gold); width: 0; transition: width .35s var(--ease); }
.meter.full i { background: var(--heart); }
.counter { font-variant-numeric: tabular-nums; }
.counter.bump { animation: shake .35s; }

.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; }
.hint { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; padding: 16px 16px 4px; max-width: 1180px; margin: 0 auto; }
.hint svg { color: var(--heart); flex: none; }

.gal { columns: 2; column-gap: 8px; max-width: 1180px; margin: 0 auto; padding: 8px 16px 130px; }
@media (min-width: 700px) { .gal { columns: 3; column-gap: 12px; } }
@media (min-width: 1100px) { .gal { columns: 4; } }
.tile { position: relative; break-inside: avoid; margin-bottom: 8px; border-radius: 14px; overflow: hidden; cursor: pointer; box-shadow: 0 2px 10px rgba(160,110,0,.12); }
@media (min-width: 700px) { .tile { margin-bottom: 12px; } }
.tile img { display: block; width: 100%; height: auto; }
.tile.sel::after { content: ""; position: absolute; inset: 0; border-radius: 14px; box-shadow: inset 0 0 0 4px var(--heart); pointer-events: none; }
.tile .hb { position: absolute; right: 4px; top: 4px; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; color: #fff; filter: drop-shadow(0 1px 4px rgba(0,0,0,.55)); }
.tile .hb:hover { background: transparent; }
.tile.sel .hb { color: var(--heart); filter: drop-shadow(0 1px 3px rgba(255,255,255,.9)); }
.tile .hb svg { width: 26px; height: 26px; }
.tile.sel .hb svg { fill: currentColor; }
.tile .nt { position: absolute; left: 8px; bottom: 8px; background: var(--chip); color: var(--text); border-radius: 999px; padding: 3px 9px; display: flex; align-items: center; gap: 4px; font-size: 12px; }
.tile .nt svg { width: 14px; height: 14px; }
.tile .no { position: absolute; left: 8px; top: 8px; font-size: 11px; background: var(--chip); color: var(--text); border-radius: 999px; padding: 1px 8px; font-variant-numeric: tabular-nums; }
.ro .tile:not(.sel) { opacity: .5; }

.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; }
.dock .t { flex: 1; line-height: 1.3; }
.dock .t b { font-size: 18px; font-variant-numeric: tabular-nums; }
.dock .t small { display: block; color: var(--muted); font-size: 12px; }
.dock button.primary { min-width: 120px; min-height: 48px; }
.dock .saved { color: var(--ok); margin-top: 2px; }
.dock .saved:empty { display: none; }

/* 燈箱(淺色背景,相更自然) */
.lb { position: fixed; inset: 0; z-index: 70; background: #fffdf7; display: flex; flex-direction: column; animation: fade .2s; }
.lb .hd { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top)); }
.lb .hd span { font-variant-numeric: tabular-nums; color: var(--muted); }
.lb .stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.lb .stage img { max-width: 100%; max-height: 100%; object-fit: contain; -webkit-touch-callout: none; box-shadow: 0 8px 30px rgba(120,80,0,.2); }
.lb .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; background: var(--chip); box-shadow: var(--shadow); }
.lb .nav.l { left: 8px; } .lb .nav.r { right: 8px; }
@media (hover: none) { .lb .nav { display: none; } }
.burst { position: absolute; left: 50%; top: 50%; width: 110px; height: 110px; margin: -55px 0 0 -55px; color: var(--heart); pointer-events: none; opacity: 0; }
.burst svg { width: 100%; height: 100%; fill: currentColor; filter: drop-shadow(0 4px 14px rgba(120,60,0,.35)); }
.burst.go { animation: burst .7s var(--ease); }
.burst.off { color: #8a7a56; }
@keyframes burst { 0% { opacity: 0; transform: scale(.4); } 25% { opacity: 1; transform: scale(1.15); } 70% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.05) translateY(-14px); } }
.lb .ft { padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(rgba(255,253,247,0), #fffdf7 30%); }
.lb .ft .r1 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.lb .ft .tip { flex: 1; font-size: 13px; color: var(--muted); }
.lb .like { min-width: 108px; }
.lb .like.on { color: var(--heart); border-color: var(--heart-line); background: var(--heart-bg); }
.lb .like.on svg { fill: currentColor; }
.lb .ft input { min-height: 46px; }

/* 相簿成品 */
.abk-stage { position: relative; display: flex; justify-content: center; align-items: center; padding: 16px; min-height: 40dvh; touch-action: pan-y; }
.abk-stage img { width: 100%; max-width: 1200px; height: auto; background: #fff; border-radius: 3px; box-shadow: var(--shadow); }
.abk-stage .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; background: var(--chip); box-shadow: var(--shadow); }
.abk-stage .nav.l { left: 24px; } .abk-stage .nav.r { right: 24px; }
@media (hover: none) { .abk-stage .nav { display: none; } }
.dots { display: flex; justify-content: center; gap: 8px; padding: 6px 16px 14px; flex-wrap: wrap; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); cursor: pointer; }
.dots i.on { background: var(--gold); transform: scale(1.3); }

/* 大油畫 */
.tile .pt { position: absolute; left: 8px; bottom: 36px; background: var(--gold); color: var(--gold-ink); border-radius: 999px; padding: 3px 10px; display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; box-shadow: 0 2px 8px rgba(245,168,0,.45); }
.tile .pt svg { width: 14px; height: 14px; }
.tile.paint::before { content: ""; position: absolute; inset: 0; border-radius: 14px; box-shadow: inset 0 0 0 3px var(--gold); pointer-events: none; z-index: 1; }
.lb .paintbtn { min-width: 0; padding: 0 14px; }
.lb .paintbtn.on { color: var(--gold-text); border-color: var(--gold-line); background: var(--gold-bg); }
.lb .paintbtn.on svg { fill: currentColor; }
.lb .ft .r1 { flex-wrap: wrap; }

/* 篩選 / 不要 / 下載 / 大油畫預覽 */
.chips.cl { max-width: 1180px; margin: 0 auto; padding: 4px 16px 0; }
.chips.cl .chip .cnt { margin-left: 6px; font-size: 12px; opacity: .7; }
.tile .xb { position: absolute; right: 6px; bottom: 6px; width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: 50%; background: var(--chip); color: var(--text); border: 0; opacity: .85; }
.tile .xb svg { width: 16px; height: 16px; }
.tile.rej { opacity: .45; }
.tile.rej .xb { background: #e02840; color: #fff; opacity: 1; }
.hint.dl { gap: 10px; flex-wrap: wrap; }
.hint.dl .ghost { min-height: 34px; margin-left: auto; color: var(--gold-text); }
.cdbig { font: 600 22px var(--sans); font-variant-numeric: tabular-nums; color: var(--gold-text); margin: 4px 0 8px; }
.dlopt { width: 100%; justify-content: flex-start; margin-top: 8px; min-height: 52px; border-radius: 16px; }
.paintbar { display: flex; align-items: center; gap: 12px; max-width: 1180px; margin: 10px auto 0; padding: 10px 14px; border: 1px solid var(--gold-line); background: var(--gold-bg); border-radius: var(--r); }
.paintbar img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.lb .ft .rejbtn.on { color: #e02840; border-color: #ffb3bd; background: #ffe9ec; }
.lb .ft .dlone, .lb .ft .rejbtn, .lb .ft .paintedit { min-height: 40px; padding: 0 14px; font-size: 14px; }
.pv { position: fixed; inset: 0; z-index: 75; background: #f4ece0; display: flex; flex-direction: column; animation: fade .25s; }
.pv .hd { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; padding-top: calc(8px + env(safe-area-inset-top)); }
.pv-wall { flex: 1; min-height: 0; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 30%, #fffdf8, #eadfcd 75%); }
.pv-canvas { position: relative; overflow: hidden; background: #ddd; cursor: grab; touch-action: none; box-shadow: 0 24px 48px rgba(80,50,10,.35), 0 3px 6px rgba(80,50,10,.3); border-radius: 2px; }
.pv-canvas.drag { cursor: grabbing; }
.pv-canvas img { position: absolute; max-width: none; user-select: none; pointer-events: none; }
.pv-edge { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25), inset 10px 0 14px -8px rgba(0,0,0,.35), inset -10px 0 14px -8px rgba(0,0,0,.35), inset 0 10px 14px -8px rgba(0,0,0,.3), inset 0 -12px 16px -8px rgba(0,0,0,.4); background: linear-gradient(120deg, rgba(255,255,255,.07), transparent 40%); }
.pv-info { text-align: center; padding: 8px 0 0; }
.pv-ctl { display: grid; gap: 10px; padding: 10px 14px calc(14px + env(safe-area-inset-bottom)); }
.pv-ctl input[type=range] { flex: 1; min-height: 0; padding: 0; accent-color: var(--gold); border: 0; background: transparent; box-shadow: none; }
