/* ============================================================
 * 婚礼共享相册 · 样式（奶油白 × 香槟金）
 * ============================================================ */
:root {
  --bg: #fbf7f1;
  --card: #ffffff;
  --ink: #4a3d33;
  --ink-soft: #8a7a6b;
  --gold: #c9a26b;
  --gold-deep: #a97f45;
  --gold-soft: #f3e7d3;
  --line: #eadfcd;
  --ok: #5c8a5e;
  --bad: #c0564f;
  --radius: 18px;
  --shadow: 0 8px 28px rgba(120, 96, 62, .10);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background:
    radial-gradient(1200px 500px at 50% -200px, #f7ead6 0%, transparent 60%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.6;
}

.serif { font-family: "Noto Serif SC", "Songti SC", "SimSun", serif; }

.wrap { max-width: 860px; margin: 0 auto; padding: 20px 16px 60px; }

/* ---------------- 顶部 ---------------- */
.hero { text-align: center; padding: 34px 10px 10px; }
.hero .florals { font-size: 1.5rem; letter-spacing: .6em; text-indent: .6em; }
.hero h1 { font-size: 1.9rem; letter-spacing: .18em; margin: 8px 0 4px; color: var(--ink); }
.hero .sub { color: var(--ink-soft); font-size: .92rem; letter-spacing: .35em; text-indent: .35em; }
.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 18px auto 22px; max-width: 420px; color: var(--gold);
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.divider::after { background: linear-gradient(90deg, var(--gold), transparent); }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 18px;
}
.card-title {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px; font-size: 1.02rem; font-weight: 700;
}
.card-title .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: none; }

/* ---------------- 表单 ---------------- */
label.fld { display: block; margin-bottom: 12px; font-size: .9rem; color: var(--ink-soft); }
label.fld b { color: var(--ink); font-weight: 600; display: block; margin-bottom: 5px; }
input[type="text"], input[type="password"], input[type="date"], input[type="number"],
textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf9;
  padding: 11px 13px;
  font-size: .95rem;
  color: var(--ink);
  font-family: inherit;
  outline: none;
  transition: border .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 107, .18);
}
textarea { resize: vertical; min-height: 76px; }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.check { display: flex; align-items: center; gap: 8px; font-size: .92rem; color: var(--ink); cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--gold-deep); }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: none; cursor: pointer; font-family: inherit;
  border-radius: 999px; font-size: .98rem; font-weight: 600;
  padding: 12px 26px;
  background: linear-gradient(135deg, #d9b47c, var(--gold-deep));
  color: #fff;
  box-shadow: 0 6px 16px rgba(169, 127, 69, .30);
  transition: transform .12s, box-shadow .12s, opacity .12s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }
.btn-ghost {
  background: #fff; color: var(--gold-deep);
  border: 1px solid var(--gold);
  box-shadow: none;
}
.btn-danger { background: linear-gradient(135deg, #d4796f, var(--bad)); box-shadow: 0 6px 16px rgba(192, 86, 79, .25); }
.btn-sm { padding: 7px 15px; font-size: .86rem; }

/* ---------------- 密码门 ---------------- */
.gate { max-width: 400px; margin: 7vh auto 0; text-align: center; }
.gate .lock-ico { font-size: 2.6rem; }
.gate h2 { margin: 10px 0 4px; letter-spacing: .12em; }
.gate p.hint { color: var(--ink-soft); font-size: .88rem; margin-bottom: 18px; }
.pin-row { display: flex; gap: 9px; justify-content: center; margin-bottom: 16px; }
.pin-row input {
  width: 46px; height: 56px; text-align: center; font-size: 1.5rem;
  border: 1px solid var(--line); border-radius: 12px; background: #fffdf9;
  color: var(--ink); font-weight: 700; outline: none;
}
.pin-row input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 107, .18); }
.pin-row.shake { animation: shake .4s; }
@keyframes shake {
  20% { transform: translateX(-7px); } 40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); } 80% { transform: translateX(5px); }
}
.gate .msg { min-height: 24px; font-size: .88rem; color: var(--bad); margin-bottom: 10px; }
.gate-foot { margin-top: 26px; font-size: .8rem; color: var(--ink-soft); }

/* ---------------- 上传区 ---------------- */
.drop {
  border: 2px dashed var(--gold);
  border-radius: 16px;
  background: linear-gradient(180deg, #fffdf8, #fdf6ea);
  padding: 26px 16px;
  text-align: center;
  cursor: pointer;
  transition: background .15s;
}
.drop:hover, .drop.over { background: #faf0dd; }
.drop .big { font-size: 1.9rem; }
.drop b { display: block; margin-top: 6px; color: var(--ink); }
.drop span { font-size: .84rem; color: var(--ink-soft); }

.file-list { margin-top: 14px; display: grid; gap: 9px; }
.file-item {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 13px;
  padding: 8px 12px; background: #fffdf9;
}
.file-item .fi-thumb {
  width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none;
  background: var(--gold-soft); display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; overflow: hidden;
}
.file-item .fi-main { flex: 1; min-width: 0; }
.file-item .fi-name { font-size: .88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-item .fi-meta { font-size: .76rem; color: var(--ink-soft); }
.file-item .fi-state { font-size: .8rem; color: var(--ink-soft); flex: none; }
.file-item.done { border-color: #cfe3cf; background: #f6fbf5; }
.file-item.done .fi-state { color: var(--ok); }
.file-item.error { border-color: #eccfcc; background: #fdf6f5; }
.file-item.error .fi-state { color: var(--bad); }
.fi-x {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  border: none; background: #f1e7d8; color: var(--ink-soft);
  cursor: pointer; font-size: .8rem; line-height: 1;
}
.fi-x:hover { background: var(--gold-soft); color: var(--bad); }

/* 进度条 */
.prog { height: 9px; border-radius: 99px; background: var(--gold-soft); overflow: hidden; margin: 12px 0 6px; }
.prog > i { display: block; height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, #d9b47c, var(--gold-deep)); transition: width .25s; }
.prog-txt { font-size: .84rem; color: var(--ink-soft); text-align: center; }

/* ---------------- Tab ---------------- */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tab {
  flex: 1; padding: 11px 8px; text-align: center; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  font-size: .94rem; font-weight: 600; color: var(--ink-soft); font-family: inherit;
}
.tab.on { background: linear-gradient(135deg, #d9b47c, var(--gold-deep)); color: #fff; border-color: transparent; }

/* ---------------- 照片墙 ---------------- */
.wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.wall-item { position: relative; border-radius: 14px; overflow: hidden; background: var(--gold-soft); cursor: pointer; aspect-ratio: 1; }
.wall-item img, .wall-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.wall-item .wi-kind {
  position: absolute; left: 8px; top: 8px; font-size: .72rem;
  background: rgba(0,0,0,.45); color: #fff; border-radius: 99px; padding: 2px 9px;
}
.wall-item .wi-like {
  position: absolute; right: 8px; bottom: 8px;
  background: rgba(255,255,255,.92); border: none; border-radius: 99px;
  padding: 3px 10px; font-size: .8rem; cursor: pointer; color: var(--ink);
  display: flex; align-items: center; gap: 4px; font-family: inherit;
}
.wall-item .wi-like.liked { color: var(--bad); }
.wall-item .wi-up {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 18px 9px 7px; font-size: .76rem; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.empty { text-align: center; color: var(--ink-soft); padding: 40px 0; font-size: .92rem; }

/* ---------------- 统计卡 ---------------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 10px; text-align: center; box-shadow: var(--shadow);
}
.stat b { display: block; font-size: 1.45rem; color: var(--gold-deep); }
.stat span { font-size: .78rem; color: var(--ink-soft); }

/* ---------------- 管理端画廊 ---------------- */
.gal-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  border-radius: 999px; padding: 7px 16px; font-size: .88rem; cursor: pointer; font-family: inherit; font-weight: 600;
}
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.gal-bar .spacer { flex: 1; }

.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 13px; }
.gal-item {
  background: #fff; border: 1px solid var(--line); border-radius: 15px;
  overflow: hidden; cursor: pointer; display: flex; flex-direction: column;
  transition: box-shadow .15s, transform .15s;
}
.gal-item:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.gi-media { position: relative; aspect-ratio: 1; background: var(--gold-soft); }
.gi-media img, .gi-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.gi-media .gi-kind {
  position: absolute; left: 8px; top: 8px; font-size: .72rem;
  background: rgba(0,0,0,.45); color: #fff; border-radius: 99px; padding: 2px 9px;
}
.gi-media .gi-kind + .gi-kind { top: auto; bottom: 8px; }
.gal-item.gal-pending .gi-media { outline: 2px dashed #c9a86a; outline-offset: -3px; }
.gi-body .gi-time b { color: var(--ink); }
.gi-media .gi-like {
  position: absolute; right: 8px; top: 8px; font-size: .78rem;
  background: rgba(255,255,255,.92); border-radius: 99px; padding: 2px 9px; color: var(--ink);
}
.gi-body { padding: 9px 11px 11px; font-size: .78rem; color: var(--ink-soft); }
.gi-body .gi-up { font-weight: 700; color: var(--ink); font-size: .84rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gi-body .gi-time { margin-top: 2px; }

/* ---------------- 灯箱 ---------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(30, 24, 18, .88);
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
}
.lightbox.hidden { display: none; }
.lb-stage { max-width: min(94vw, 900px); max-height: 72vh; display: flex; align-items: center; justify-content: center; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 72vh; border-radius: 12px; background: #000; }
.lb-panel {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: #fffdf9; border-radius: 20px 20px 0 0;
  padding: 16px 18px calc(14px + env(safe-area-inset-bottom));
  max-width: 760px; margin: 0 auto;
}
.lb-panel .lb-title { font-weight: 700; margin-bottom: 4px; }
.lb-panel .lb-meta { font-size: .8rem; color: var(--ink-soft); margin-bottom: 8px; }
.lb-panel .lb-msg { font-size: .9rem; background: var(--gold-soft); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; }
.lb-panel .lb-msg::before { content: "💌 留言："; color: var(--gold-deep); font-weight: 700; }
.lb-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.lb-close {
  position: fixed; top: 14px; right: 16px; z-index: 61;
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.16); color: #fff; font-size: 1.15rem; cursor: pointer;
}
.lb-heart.on { background: #fdeceb; color: var(--bad); border-color: #f2c7c3; }

/* ---------------- 弹窗 ---------------- */
.modal-mask { position: fixed; inset: 0; z-index: 70; background: rgba(30,24,18,.55); display: flex; align-items: center; justify-content: center; padding: 18px; }
.modal-mask.hidden { display: none; }
.modal { background: #fff; border-radius: 18px; padding: 22px; max-width: 420px; width: 100%; text-align: center; }
.modal h3 { margin-bottom: 8px; }
.modal p { font-size: .9rem; color: var(--ink-soft); margin-bottom: 16px; }
.modal .m-actions { display: flex; gap: 10px; justify-content: center; }

/* ---------------- 二维码 ---------------- */
.qr-box { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.qr-frame { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.qr-frame img, .qr-frame canvas { display: block; }
.qr-side { flex: 1; min-width: 220px; font-size: .88rem; color: var(--ink-soft); }
.qr-side .url { word-break: break-all; color: var(--gold-deep); font-weight: 600; margin: 6px 0 12px; }

/* ---------------- 过期横幅 ---------------- */
.notice {
  border-radius: 14px; padding: 14px 16px; font-size: .9rem; margin-bottom: 16px;
  background: #fdf3e4; border: 1px solid #efd9b0; color: #7c5a1e;
}
.notice.bad { background: #fdeceb; border-color: #f2c7c3; color: #8c3f39; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(20px);
  background: rgba(58, 48, 38, .94); color: #fff; border-radius: 99px;
  padding: 11px 22px; font-size: .9rem; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s; z-index: 99; max-width: 86vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { background: rgba(70, 110, 72, .96); }
.toast.err { background: rgba(150, 60, 54, .96); }

/* ---------------- 成功页 ---------------- */
.done-box { text-align: center; padding: 30px 10px; }
.done-box .big-ico { font-size: 3rem; }
.done-box h2 { margin: 12px 0 6px; }
.done-box p { color: var(--ink-soft); font-size: .92rem; margin-bottom: 18px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 560px) {
  .wrap { padding: 14px 12px 50px; }
  .hero h1 { font-size: 1.5rem; }
  .fld-row { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat b { font-size: 1.15rem; }
  .pin-row input { width: 42px; height: 52px; }
  .wall-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 9px; }
  .gal-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .card { padding: 16px; }
  .lb-panel { padding: 14px; }
}

/* ---------------- 文案微调新增 ---------------- */
.drop .hd-hint {
  color: var(--gold-deep, #b48a4e);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
}

.privacy-note {
  margin: 22px 4px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(244, 236, 226, .55);
  border: 1px dashed rgba(180, 138, 78, .35);
  color: var(--ink-soft, #8a7a66);
  font-size: .74rem;
  line-height: 1.7;
  text-align: center;
}

/* ---------------- 多租户新增 ---------------- */
.code-input {
  width: 100%;
  max-width: 260px;
  padding: 12px 14px;
  font-size: 1.25rem;
  letter-spacing: .35em;
  text-align: center;
  text-transform: uppercase;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
  font-family: inherit;
  margin-bottom: 14px;
}
.code-input:focus { border-color: var(--gold); }

.hero-names {
  font-size: 1.02rem;
  color: var(--gold-deep);
  letter-spacing: .12em;
  margin-bottom: 2px;
  min-height: 1.4em;
}

.foot-links {
  margin: 18px 0 0;
  text-align: center;
  font-size: .74rem;
}
.foot-links a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px dotted var(--line); }
