/* 大家拍 — 现场胶卷 · 共享样式（浅色简洁大气，移动端优先） */
:root {
  --bg: #f7f5f0;          /* 暖米白 */
  --panel: #ffffff;
  --panel2: #f1eee7;
  --line: #e6e2d8;
  --text: #26241f;        /* 墨色 */
  --muted: #8d8a80;
  --accent: #d0492f;      /* 朱砂红 */
  --accent2: #2f7d5b;     /* 竹绿（解锁动作） */
  --ok: #2f9e5f;
  --danger: #d0492f;
  --radius: 14px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}
/* 细微纸感噪点 */
body::after {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 999;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 顶部胶片齿孔条（墨色，浅底上的一点胶片记忆） */
.film-strip {
  height: 26px; flex: none;
  background: #26241f;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  border-bottom: 1px solid var(--line);
}
.film-strip i {
  width: 9px; height: 12px; border-radius: 2px;
  background: var(--bg); opacity: .9;
}

header { padding: 22px 20px 6px; flex: none; }
.brand {
  font-size: 12px; letter-spacing: 4px; color: var(--accent);
  font-weight: 700;
}
.event-name {
  font-size: 24px; font-weight: 800; margin-top: 6px; line-height: 1.3;
  word-break: break-all;
}
.sub { font-size: 13px; color: var(--muted); margin-top: 4px; }

main { flex: 1; padding: 16px 20px 40px; }

/* 卡片 */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(38,36,31,.04);
}
.card h3 { font-size: 15px; margin-bottom: 12px; }

/* 胶卷计数器 */
.counter {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(38,36,31,.04);
}
.counter .label { font-size: 13px; color: var(--muted); }
.counter .nums { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.counter .nums b { color: var(--accent); }
.counter .nums span { color: var(--muted); font-size: 15px; font-weight: 600; }

/* 取景器 */
.viewfinder {
  position: relative;
  border: 2px dashed #d8d3c6;
  border-radius: var(--radius);
  background: var(--panel);
  min-height: 300px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; margin-bottom: 18px;
  overflow: hidden;
}
.viewfinder .vf-icon { font-size: 44px; }
.viewfinder .vf-text { font-size: 14px; color: var(--muted); text-align: center; padding: 0 24px; line-height: 1.6; }
.vf-corner { position: absolute; width: 26px; height: 26px; border: 3px solid var(--accent); opacity: .85; }
.vf-corner.tl { top: 12px; left: 12px; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.vf-corner.tr { top: 12px; right: 12px; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.vf-corner.bl { bottom: 12px; left: 12px; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
.vf-corner.br { bottom: 12px; right: 12px; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }

/* 快门 */
.shutter-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 8px; }
.shutter {
  width: 84px; height: 84px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8a6e 0%, var(--accent) 50%, #a0331e 100%);
  border: 5px solid #26241f;
  box-shadow: 0 0 0 4px var(--line), 0 6px 22px rgba(208,73,47,.28);
  cursor: pointer; transition: transform .12s ease;
  flex: none;
}
.shutter:active { transform: scale(.9); }
.shutter:disabled { filter: grayscale(1); opacity: .4; cursor: default; }
.shutter-hint { font-size: 12px; color: var(--muted); letter-spacing: 2px; }

/* 倒计时 */
.countdown {
  text-align: center;
  background: linear-gradient(135deg, rgba(208,73,47,.08), rgba(157,120,30,.08));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px; margin-bottom: 14px;
}
.countdown .cd-label { font-size: 12px; color: var(--muted); letter-spacing: 2px; margin-bottom: 8px; }
.countdown .cd-time { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent); }
.countdown .cd-until { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* 通用按钮 */
.btn {
  display: block; width: 100%;
  padding: 14px; border: 0; border-radius: 12px;
  background: var(--panel2); color: var(--text);
  font-size: 15px; font-weight: 700; cursor: pointer;
  text-align: center; text-decoration: none;
  transition: opacity .15s;
}
.btn:active { opacity: .75; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn + .btn { margin-top: 10px; }
.btn:disabled { opacity: .4; cursor: default; }

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input, .field select {
  width: 100%; padding: 13px 14px;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font-size: 15px; outline: none;
}
.field input:focus { border-color: var(--accent); }
.preset-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.preset-row button {
  padding: 7px 12px; font-size: 12px;
  background: var(--panel2); color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
}
.preset-row button.on { color: var(--accent); border-color: var(--accent); }

/* 相册瀑布流 */
.gallery { column-count: 2; column-gap: 10px; }
@media (min-width: 440px) { .gallery { column-count: 3; } }
.shot { break-inside: avoid; margin-bottom: 10px; position: relative; }
.shot img {
  width: 100%; display: block; border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel2);
}
.shot .who {
  position: absolute; left: 8px; bottom: 8px;
  font-size: 11px; padding: 3px 8px; border-radius: 999px;
  background: rgba(38,36,31,.6); color: #fff; backdrop-filter: blur(4px);
}

/* 全屏看图（看照片保持暗场，聚焦画面） */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(20,19,16,.95);
  display: none; align-items: center; justify-content: center; flex-direction: column;
  padding: 20px;
}
.lightbox.on { display: flex; }
.lightbox img { max-width: 100%; max-height: 78vh; border-radius: 8px; }
.lightbox .lb-tip { margin-top: 14px; font-size: 13px; color: #a5a196; }
.lightbox .lb-who { margin-top: 6px; font-size: 13px; color: #ffb09e; }
.lightbox .lb-close {
  margin-top: 18px; padding: 10px 44px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.45); background: transparent; color: #fff;
  font-size: 15px; letter-spacing: 2px; cursor: pointer;
}
.lightbox .lb-close:active { background: rgba(255,255,255,.15); }

/* 弹层（昵称/提示） */
.modal-mask {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(38,36,31,.45); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; padding: 28px;
}
.modal-mask.on { display: flex; }
.modal {
  width: 100%; max-width: 360px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 22px;
}
.modal h3 { font-size: 17px; margin-bottom: 8px; }
.modal p { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 14px; }

/* 快门闪光 & 封存提示 */
#flash { position: fixed; inset: 0; background: #fff; z-index: 1200; opacity: 0; pointer-events: none; }
#flash.go { animation: flashA .5s ease-out; }
@keyframes flashA { 0% {opacity: 1;} 100% {opacity: 0;} }
#toast {
  position: fixed; left: 50%; bottom: 15%; transform: translateX(-50%) translateY(20px);
  z-index: 1100; padding: 12px 22px; border-radius: 999px;
  background: rgba(38,36,31,.92); color: #fff; border: 1px solid rgba(255,255,255,.08);
  font-size: 14px; opacity: 0; pointer-events: none; transition: all .3s;
  white-space: nowrap;
}
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 主办方后台 */
.qr-hint {
  text-align: center; font-size: 20px; font-weight: 700; color: var(--ink);
  margin: 6px 0 2px; letter-spacing: 1px;
}
.qr-hint::before, .qr-hint::after { content: '·'; color: var(--accent); margin: 0 10px; }
.qr-box { text-align: center; padding: 8px 0 2px; }
.qr-box img { width: 220px; height: 220px; background: #fff; padding: 10px; border-radius: 12px; border: 1px solid var(--line); }
.qr-tip { text-align: center; font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.9; }

/* 代理体系 */
.inline-row { display: flex; gap: 8px; align-items: stretch; }
.inline-row input { flex: 1; min-width: 0; }
.btn.sm { padding: 8px 14px; font-size: 13px; flex: none; }
.agent-code {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 1px;
  color: var(--accent); background: rgba(208,73,47,.07);
  border: 1px dashed rgba(208,73,47,.4); border-radius: 6px; padding: 1px 8px;
}
.agent-badge {
  font-size: 12px; color: var(--muted); margin: 4px 0 0;
  padding: 3px 10px; background: var(--panel2); border-radius: 8px; display: inline-block;
}
/* 代理推广中心：四格统计 */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 4px; }
.stat {
  text-align: center; background: var(--panel2); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 4px 10px;
}
.stat b { display: block; font-size: 20px; color: var(--ink); }
.stat:nth-child(2) b, .stat:nth-child(4) b { color: var(--accent); }
.stat span { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
.link-row {
  display: flex; gap: 8px; align-items: center; margin-bottom: 10px;
  background: var(--panel2); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px;
}
.link-row .lk {
  flex: 1; font-size: 12px; color: var(--muted);
  word-break: break-all; line-height: 1.5;
}
.link-row button {
  flex: none; padding: 8px 14px; font-size: 12px; font-weight: 700;
  background: var(--accent); color: #fff; border: 0; border-radius: 8px; cursor: pointer;
}
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stat { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; }
.stat .v { font-size: 22px; font-weight: 800; color: var(--accent); }
.stat .k { font-size: 11px; color: var(--muted); margin-top: 3px; }
.event-item { border-bottom: 1px solid var(--line); padding: 14px 0; }
.event-item:last-child { border-bottom: 0; padding-bottom: 0; }
.event-item .ei-name { font-weight: 700; font-size: 15px; }
.event-item .ei-meta { font-size: 12px; color: var(--muted); margin: 4px 0 10px; }
.event-item .ei-actions { display: flex; gap: 8px; }
.event-item .ei-actions a, .event-item .ei-actions button {
  flex: 1; padding: 9px; font-size: 13px; border-radius: 9px; text-align: center;
  border: 1px solid var(--line); background: var(--panel2); color: var(--text);
  text-decoration: none; cursor: pointer; font-weight: 600;
}
.event-item .ei-actions button.unlock { border-color: var(--accent2); color: var(--accent2); }

.empty { text-align: center; color: var(--muted); font-size: 13px; padding: 30px 0; }
footer { flex: none; text-align: center; padding: 14px 0 22px; font-size: 11px; color: #b5b1a6; letter-spacing: 2px; }

/* 商业化：场次标识 / 提示 / 收款 */
.hint { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.6; }
.hint b { color: var(--text); font-weight: 500; }
.tier-line { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 8px; flex-wrap: wrap; }
.tier-tag {
  font-size: 12px; padding: 2px 9px; border-radius: 6px;
  background: var(--panel2); color: var(--muted); border: 1px solid var(--line);
}
.tier-tag.pro { background: var(--accent); color: #fff; border-color: var(--accent); }
.big-word { font-size: 19px; font-weight: 500; color: var(--text); letter-spacing: 1px; }
.tier-tag.pro + .big-word { color: var(--accent); }
.tier-note { font-size: 12px; color: var(--muted); }
.event-item .ei-actions button.upgrade { border-color: var(--accent); color: var(--accent); }
.pay-id {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel2); border: 1px dashed var(--accent);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 12px;
  font-size: 13px;
}
.pay-id b { letter-spacing: 1px; }
.pay-id button {
  margin-left: auto; padding: 6px 12px; font-size: 12px; font-weight: 700;
  background: var(--accent); color: #fff; border: 0; border-radius: 8px; cursor: pointer;
}
