/* 雪山农夫 · 相册  —  米白/墨色/一点点绿，靠留白和大图撑质感 */
:root{
  --bg:#F7F4EF;
  --card:#FFFFFF;
  --ink:#14150F;
  --ink2:#5C5F55;
  --ink3:#9A9C93;
  --line:#E4E0D8;
  --green:#2F6B4F;
  --green2:#245742;
  --gold:#B8945A;
  --r:16px;
  --sh:0 1px 2px rgba(20,21,15,.05), 0 8px 24px -12px rgba(20,21,15,.14);
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0}
body{
  background:var(--bg);color:var(--ink);
  font:400 15px/1.6 -apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  -webkit-font-smoothing:antialiased;
  padding-bottom:env(safe-area-inset-bottom);
}

/* ---------- 顶栏 ---------- */
.bar{
  position:sticky;top:0;z-index:50;
  background:rgba(247,244,239,.88);
  -webkit-backdrop-filter:saturate(180%) blur(14px);
  backdrop-filter:saturate(180%) blur(14px);
  border-bottom:1px solid var(--line);
  padding-top:env(safe-area-inset-top);
}
.bar-in{
  max-width:1080px;margin:0 auto;height:58px;
  display:flex;align-items:center;justify-content:space-between;padding:0 18px;
}
.logo{
  font:600 16px/1 "Songti SC","Noto Serif CJK SC",serif;
  letter-spacing:.14em;display:flex;align-items:baseline;gap:8px;
}
.logo i{
  font:500 9px/1 ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.22em;color:var(--ink3);font-style:normal;
}
.bar-r{display:flex;align-items:center;gap:12px}
.count{
  font:500 12px/1 ui-monospace,SFMono-Regular,Menlo,monospace;
  color:var(--ink3);letter-spacing:.06em;
}
.zipbtn{
  display:inline-flex;align-items:center;gap:6px;
  height:34px;padding:0 14px;border:0;border-radius:999px;
  background:var(--ink);color:#fff;font-size:13px;font-weight:500;
  cursor:pointer;transition:transform .12s,opacity .2s;
}
.zipbtn:active{transform:scale(.96)}
.zipbtn svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round}
.zipbtn[disabled]{opacity:.4;pointer-events:none}

/* ---------- 主体 ---------- */
.main{max-width:1080px;margin:0 auto;padding:26px 18px 40px}

.hd{margin-bottom:22px}
.hd h1{
  margin:0 0 6px;font:600 27px/1.25 "Songti SC","Noto Serif CJK SC",serif;
  letter-spacing:.03em;
}
.hd .sub{margin:0;color:var(--ink2);font-size:13.5px}

/* ---------- 上传区 ---------- */
.up{margin-bottom:8px}
.up-in{
  border:1.5px dashed var(--line);border-radius:var(--r);
  background:var(--card);
  padding:34px 20px;text-align:center;cursor:pointer;
  transition:border-color .2s,background .2s,transform .12s;
}
.up-in:hover{border-color:var(--green);background:#FCFBF8}
.up-in.drag{border-color:var(--green);background:#EFF5F1;transform:scale(.995)}
.up-in:active{transform:scale(.995)}
.up-ico{
  width:30px;height:30px;margin:0 auto 12px;display:block;
  fill:none;stroke:var(--green);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;
}
.up-t{margin:0 0 6px;font-size:15px;font-weight:500}
.up-s{margin:0;font-size:12.5px;color:var(--ink3)}

/* 进度 */
.prog{height:3px;border-radius:3px;background:var(--line);overflow:hidden;opacity:0;margin:10px 0 0;transition:opacity .2s}
.prog.on{opacity:1}
.prog-in{height:100%;width:0;background:var(--green);transition:width .25s ease}
.prog-t{margin:7px 0 0;font-size:12.5px;color:var(--green);height:0;overflow:hidden;transition:height .2s}
.prog-t.on{height:20px}

/* ---------- 相册墙 ---------- */
.wall{
  margin-top:22px;
  display:grid;gap:10px;
  grid-template-columns:repeat(2,1fr);
}
@media(min-width:640px){ .wall{grid-template-columns:repeat(3,1fr);gap:12px} }
@media(min-width:900px){ .wall{grid-template-columns:repeat(4,1fr);gap:14px} }

.ph{
  position:relative;border-radius:12px;overflow:hidden;background:#EDEAE4;
  aspect-ratio:3/4;box-shadow:var(--sh);
  animation:in .32s cubic-bezier(.22,1,.36,1);
}
@keyframes in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.ph img{
  width:100%;height:100%;object-fit:cover;display:block;
  transition:transform .4s ease;
}
.ph:active img{transform:scale(1.03)}
.ph .nm{
  position:absolute;left:0;right:0;bottom:0;
  padding:16px 10px 8px;color:#fff;font-size:11.5px;line-height:1.35;
  background:linear-gradient(to top,rgba(0,0,0,.62),rgba(0,0,0,0));
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.ph .del{
  position:absolute;top:6px;right:6px;width:26px;height:26px;
  border-radius:50%;border:0;background:rgba(0,0,0,.45);
  color:#fff;display:none;align-items:center;justify-content:center;cursor:pointer;
  -webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);
}
.ph .del svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}
.ph.manage .del{display:flex}
.ph.new::after{
  content:"新";position:absolute;top:6px;left:6px;
  background:var(--green);color:#fff;font-size:10px;padding:2px 6px;border-radius:5px;
}

/* 空态 */
.empty{padding:40px 0;text-align:center;color:var(--ink3);font-size:13.5px}
.empty p{margin:0}

/* ---------- 底部操作 ---------- */
.foot-act{
  margin-top:26px;display:flex;flex-direction:column;gap:10px;align-items:stretch;
}
.big{
  height:50px;border:0;border-radius:14px;background:var(--green);color:#fff;
  font-size:15.5px;font-weight:600;cursor:pointer;letter-spacing:.02em;
  box-shadow:0 8px 20px -10px rgba(47,107,79,.7);
  transition:transform .12s,background .2s;
}
.big:active{transform:scale(.98);background:var(--green2)}
.big span{font-weight:400;opacity:.8;font-size:13px;margin-left:4px}
.link{
  height:44px;display:flex;align-items:center;justify-content:center;
  border:1px solid var(--line);border-radius:14px;background:#fff;
  color:var(--ink);font-size:14px;text-decoration:none;
}
.link:active{background:#F2EFE9}

.tip{margin:22px 0 0;font-size:12px;color:var(--ink3);line-height:1.7;text-align:center}

/* ---------- 灯箱 ---------- */
.lb{
  position:fixed;inset:0;z-index:200;background:rgba(10,10,9,.96);
  display:none;align-items:center;justify-content:center;
}
.lb.on{display:flex}
.lb img{max-width:94vw;max-height:82vh;object-fit:contain;border-radius:6px;display:block}
.lb-x{
  position:absolute;top:calc(14px + env(safe-area-inset-top));right:14px;
  width:38px;height:38px;border-radius:50%;border:0;background:rgba(255,255,255,.14);
  color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;
}
.lb-x svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.lb-nav{
  position:absolute;top:50%;transform:translateY(-50%);
  width:42px;height:42px;border-radius:50%;border:0;background:rgba(255,255,255,.1);
  color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;
}
.lb-nav svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.lb-prev{left:10px}.lb-next{right:10px}
.lb-bar{
  position:absolute;left:0;right:0;bottom:0;
  padding:16px 18px calc(16px + env(safe-area-inset-bottom));
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  color:#fff;font-size:13px;
  background:linear-gradient(to top,rgba(0,0,0,.8),rgba(0,0,0,0));
}
#lbTitle{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:.85}
.lb-acts{display:flex;gap:8px;flex-shrink:0}
.lb-a{
  height:34px;padding:0 14px;border-radius:999px;border:1px solid rgba(255,255,255,.28);
  background:rgba(255,255,255,.1);color:#fff;font-size:13px;cursor:pointer;
  display:inline-flex;align-items:center;text-decoration:none;
}
.lb-a:active{background:rgba(255,255,255,.22)}

/* ---------- toast ---------- */
.toast{
  position:fixed;left:50%;bottom:calc(30px + env(safe-area-inset-bottom));
  transform:translate(-50%,14px);z-index:300;
  background:rgba(20,21,15,.92);color:#fff;font-size:13.5px;
  padding:10px 18px;border-radius:999px;opacity:0;pointer-events:none;
  transition:opacity .22s,transform .22s;max-width:82vw;text-align:center;
}
.toast.on{opacity:1;transform:translate(-50%,0)}
