:root {
  --cream: #f5efe2;
  --paper: #fffdf5;
  --ink: #3d3428;
  --sepia: #a8936f;
  --accent: #b3562e;
  --danger: #b3402e;
  --ok: #5d7a4a;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
}
header {
  padding: 18px 20px 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
header h1 { font-size: 22px; letter-spacing: 2px; font-weight: 700; }
header h1 span { color: var(--accent); }
header .sub { font-size: 12px; color: var(--sepia); letter-spacing: 3px; }
.btn {
  border: none; border-radius: 999px; padding: 12px 22px;
  font-size: 15px; letter-spacing: 2px; cursor: pointer;
  background: var(--ink); color: var(--paper);
}
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--sepia); }
.btn.primary { background: var(--accent); color: #fff; }
.btn:active { transform: scale(0.97); }
input {
  width: 100%; padding: 14px 16px; border: 1px solid #d8cdb5;
  border-radius: 12px; background: var(--paper); font-size: 16px; color: var(--ink);
  outline: none;
}
input:focus { border-color: var(--accent); }

/* ---- 登录页 ---- */
.auth-wrap { padding: 40px 28px; text-align: center; }
.auth-logo { font-size: 34px; letter-spacing: 6px; margin-bottom: 6px; }
.auth-tag { color: var(--sepia); font-size: 13px; letter-spacing: 4px; margin-bottom: 36px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.auth-form .err { color: var(--danger); font-size: 13px; min-height: 18px; }
.auth-switch { margin-top: 20px; font-size: 13px; color: var(--sepia); }
.auth-switch a { color: var(--accent); cursor: pointer; }

/* ---- 影集 ---- */
.album { padding: 6px 16px 80px; }
.album .empty { text-align: center; color: var(--sepia); padding: 60px 20px; font-size: 14px; letter-spacing: 2px; line-height: 2; }
.roll-card {
  background: var(--paper); border-radius: 6px; padding: 14px 14px 12px;
  margin-bottom: 22px; box-shadow: 0 4px 16px rgba(61,52,40,.10);
  cursor: pointer; transition: transform .12s;
}
.roll-card:active { transform: scale(.985); }
.roll-card .cover { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 3px; background: #eee5d2; }
.roll-card .meta { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.roll-card .roll-id { font-size: 12px; color: var(--sepia); font-family: monospace; }
.roll-card .count { font-size: 13px; }
.roll-card .story { font-size: 13px; color: #6b5d48; line-height: 1.7; margin-top: 8px; font-style: italic; }
.badge { font-size: 11px; padding: 3px 10px; border-radius: 999px; letter-spacing: 1px; }
.badge.undeveloped { background: #e8e2d4; color: #7a715e; }
.badge.developing { background: #f3e2c0; color: #8a6a2a; }
.badge.developed { background: #dfe8d8; color: var(--ok); }
.album-actions { display: flex; gap: 10px; margin: 18px 16px; }

/* ---- 胶卷详情 ---- */
.detail { padding-bottom: 80px; }
.detail .story-box {
  margin: 14px 16px; padding: 16px; background: var(--paper); border-radius: 8px;
  font-size: 14px; line-height: 1.9; color: #5c4f3c; box-shadow: 0 2px 10px rgba(61,52,40,.08);
}
.detail .story-box .t { color: var(--sepia); font-size: 11px; letter-spacing: 3px; margin-bottom: 6px; }
.photo-swipe {
  position: relative; overflow: hidden; margin: 12px 16px; border-radius: 8px;
  background: #111; touch-action: pan-y;
}
.photo-swipe .track { display: flex; will-change: transform; }
.photo-swipe .slide { flex: 0 0 100%; position: relative; }
.photo-swipe .slide img { width: 100%; display: block; }
.photo-swipe .slide .polaroid {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px;
  background: rgba(20,16,10,.62); color: #f3ecda; font-size: 12.5px;
  letter-spacing: 1px; text-align: center; font-style: italic;
}
.photo-swipe .desc {
  position: absolute; left: 0; right: 0; top: 0; padding: 10px 12px;
  background: linear-gradient(rgba(0,0,0,.45), transparent); color: #efe6d2; font-size: 12px;
}
.slide .play-btn {
  position: absolute; right: 12px; bottom: 44px; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.6); background: rgba(0,0,0,.35); color: #fff;
  font-size: 15px; cursor: pointer;
}
.detail .ops { display: flex; gap: 10px; padding: 6px 16px 20px; }
.detail .ops .btn { flex: 1; font-size: 13px; padding: 11px 8px; }

/* ---- 相机页 ---- */
.cam-wrap { position: relative; height: 100vh; background: #111; overflow: hidden; display: flex; flex-direction: column; }
.cam-video { width: 100%; flex: 1; object-fit: cover; }
.cam-hud { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px 30px; text-align: center; }
.cam-shutter {
  width: 74px; height: 74px; border-radius: 50%; border: 3px solid #fff;
  background: rgba(255,255,255,.12); cursor: pointer; margin: 0 auto;
  position: relative;
}
.cam-shutter::after {
  content: ""; position: absolute; inset: 8px; border-radius: 50%;
  background: #f5efe2; transition: background .1s;
}
.cam-shutter:active::after { background: var(--accent); }
.cam-hint { color: #d9cfba; font-size: 12px; letter-spacing: 2px; margin-top: 12px; }
.cam-hint .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #c9b58a; margin-right: 6px; }
.cam-status { position: absolute; top: 14px; left: 14px; color: #e8dfc9; font-size: 12px; letter-spacing: 1px; background: rgba(0,0,0,.4); padding: 6px 12px; border-radius: 999px; }
.cam-back { position: absolute; top: 12px; right: 12px; color: #fff; font-size: 13px; background: rgba(0,0,0,.4); padding: 8px 14px; border-radius: 999px; cursor: pointer; letter-spacing: 1px; }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }

/* 冲洗中遮罩 */
.cam-develop {
  position: absolute; inset: 0; background: #140b07; color: #d96a3a;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  opacity: 0; pointer-events: none; transition: opacity .3s; text-align: center;
}
.cam-develop.show { opacity: 1; pointer-events: auto; }
.cam-develop .glow { width: 60px; height: 60px; border-radius: 50%; background: radial-gradient(circle, #e0814a 0%, #7a2e10 70%); box-shadow: 0 0 40px 14px rgba(224,129,74,.35); animation: pulse 2s infinite; }
.cam-develop .txt { letter-spacing: 4px; font-size: 16px; }
.cam-develop .sub { font-size: 12px; color: #b98a6a; letter-spacing: 2px; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.12); opacity: 1; } }

/* ---- 绑定页 ---- */
.bind-wrap { padding: 60px 28px; text-align: center; }
.bind-roll { background: var(--paper); padding: 18px; border-radius: 8px; margin: 24px 0; box-shadow: 0 4px 14px rgba(61,52,40,.1); }
.bind-roll .r { font-family: monospace; font-size: 13px; color: var(--sepia); }
.bind-roll .badge { margin-top: 8px; display: inline-block; }

/* 通用 */
.spin { width: 22px; height: 22px; border: 2px solid #cbb; border-top-color: var(--accent); border-radius: 50%; animation: r .7s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes r { to { transform: rotate(360deg); } }
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%);
  background: var(--ink); color: var(--paper); padding: 12px 22px; border-radius: 999px;
  font-size: 13px; letter-spacing: 1px; opacity: 0; transition: opacity .25s; z-index: 99; pointer-events: none;
}
.toast.show { opacity: 1; }
