* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --rose: #e05d7e; --rose-dark: #c94a68;
  --ink: #2b2b33; --sub: #8a8a96; --bg: #f4f4f7; --card: #fff; --line: #ececf1;
}
html, body { height: 100%; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #e9e9ef; min-height: 100vh;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
#phone {
  width: 100%; max-width: 430px; height: 100vh; max-height: 900px;
  background: var(--bg); position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 0 0 1px #ddd;
}
.screen { position: absolute; inset: 0; display: none; flex-direction: column; background: var(--bg); }
.screen.active { display: flex; }
.content { flex: 1; overflow-y: auto; padding: 14px 14px 24px; scrollbar-width: none; }
.content::-webkit-scrollbar { display: none; }

.header {
  background: var(--rose); color: #fff; padding: 18px 16px 14px;
  display: flex; align-items: center; gap: 10px; flex-shrink: 0; min-height: 58px;
}
.header .back { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 18px; flex-shrink: 0; }
.header .title { font-size: 17px; font-weight: 600; }
.header .subtitle { font-size: 12px; opacity: .85; }
.header .badge { margin-left: auto; background: rgba(255,255,255,.22); padding: 3px 12px; border-radius: 20px; font-size: 11px; cursor: pointer; white-space: nowrap; }
.header .badge.plain { cursor: default; }

.tabbar { height: 60px; background: #fff; border-top: 1px solid var(--line); display: flex; flex-shrink: 0; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; color: #b6b6c0; font-size: 10px; }
.tab svg { width: 22px; height: 22px; }
.tab.active { color: var(--rose); }

.card { background: var(--card); border-radius: 14px; padding: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.section-title { font-size: 15px; font-weight: 600; color: var(--ink); margin: 18px 2px 10px; display: flex; align-items: center; justify-content: space-between; }
.section-title .more { font-size: 12px; color: var(--sub); font-weight: 400; cursor: pointer; }

.search { background: #fff; border-radius: 22px; padding: 10px 16px; display: flex; align-items: center; gap: 8px; color: #b6b6c0; box-shadow: 0 2px 6px rgba(0,0,0,.05); margin-bottom: 6px; }
.search input { border: none; outline: none; flex: 1; font-size: 14px; background: transparent; color: var(--ink); }

.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cat { border-radius: 16px; padding: 22px 16px; color: #fff; cursor: pointer; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.cat:active { transform: scale(.97); }
.cat .name { font-size: 17px; font-weight: 600; }
.cat .count { font-size: 12px; opacity: .85; }
.cat .dot { position: absolute; right: -18px; top: -18px; width: 70px; height: 70px; background: rgba(255,255,255,.16); border-radius: 50%; }

.cust { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.04); }
.cust:active { background: #fafafa; }
.avatar { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; font-weight: 600; }
.cust .info { flex: 1; min-width: 0; }
.cust .name { font-size: 15px; font-weight: 600; color: var(--ink); }
.cust .meta { font-size: 12px; color: var(--sub); margin-top: 3px; }

.ph { background: repeating-linear-gradient(45deg,#fafafa,#fafafa 8px,#f4f4f6 8px,#f4f4f6 16px); border: 1.5px dashed #d4d4dd; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #b0b0bb; gap: 6px; }
.ph svg { width: 26px; height: 26px; opacity: .6; }
.ph .t { font-size: 12px; }
img.photo { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 10px; }

.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl-item { position: relative; margin-bottom: 18px; }
.tl-item::before { content: ''; position: absolute; left: -22px; top: 22px; width: 12px; height: 12px; border-radius: 50%; background: var(--rose); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--rose); }
.tl-date { font-size: 12px; color: var(--sub); margin-bottom: 6px; }
.tl-body { display: flex; gap: 10px; align-items: stretch; }
.tl-photo { width: 92px; height: 92px; flex-shrink: 0; border-radius: 10px; overflow: hidden; background: #eee; }
.tl-photo img { width: 100%; height: 100%; object-fit: cover; }
.tl-info { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.tl-info .stage { font-size: 14px; font-weight: 600; color: var(--ink); }
.tl-info .note { font-size: 12px; color: var(--sub); margin-top: 4px; }
.tl-del { font-size: 12px; color: #c0392b; align-self: flex-start; cursor: pointer; }

.cmp-photo-box { position: relative; border-radius: 12px; overflow: hidden; background: #eee; }
.cmp-photo-box img { width: 100%; height: 300px; object-fit: cover; display: block; }
.cmp-photo-box .wm { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 6px; }
.divider { display: flex; align-items: center; gap: 10px; margin: 10px 2px; color: #b0b0bb; font-size: 11px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: #dcdce4; }

.wall-item { background: #fff; border-radius: 14px; padding: 12px; margin-bottom: 14px; box-shadow: 0 2px 6px rgba(0,0,0,.04); }
.wall-item .head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.wall-item .head .who { font-size: 13px; font-weight: 600; color: var(--ink); }
.wall-item .head .when { font-size: 11px; color: var(--sub); }
.wall-duo { display: flex; flex-direction: column; gap: 10px; }
.wall-photo { position: relative; height: 170px; border-radius: 10px; overflow: hidden; background: #eee; }
.wall-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wall-tag { position: absolute; bottom: 8px; left: 8px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 5px; }

/* 选对比照片 */
.pick-item {
  display: flex; align-items: center; gap: 12px; background: #fff;
  border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.04); position: relative; border: 2px solid transparent;
}
.pick-item.sel { border-color: var(--rose); }
.pick-item .info { flex: 1; }
.pick-badge {
  position: absolute; top: -7px; right: 12px; background: var(--rose); color: #fff;
  font-size: 11px; font-weight: 600; padding: 2px 10px; border-radius: 10px;
}

.btn { background: var(--rose); color: #fff; border: none; border-radius: 24px; padding: 13px; font-size: 15px; font-weight: 600; width: 100%; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn:active { background: var(--rose-dark); }
.btn.ghost { background: #fdeef2; color: var(--rose); }
.btn:disabled { background: #d8d8e0; }

.field { margin-bottom: 16px; }
.field label { font-size: 13px; color: var(--ink); font-weight: 600; display: block; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 16px; border-radius: 20px; background: #fff; color: var(--sub); border: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.chip.on { background: var(--rose); color: #fff; border-color: var(--rose); }
.stepper { display: inline-flex; align-items: center; gap: 14px; background: #fff; border-radius: 10px; padding: 6px 12px; border: 1px solid var(--line); }
.stepper button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 18px; cursor: pointer; color: var(--ink); }
.stepper .val { font-size: 16px; font-weight: 600; color: var(--ink); min-width: 24px; text-align: center; }
.row { display: flex; align-items: center; justify-content: space-between; }
input[type="date"], select, input[type="text"], input[type="password"] { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; width: 100%; color: var(--ink); background: #fff; }
input[type="date"] { width: 150px; }
.switch { position: relative; width: 46px; height: 26px; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: #d8d8e0; border-radius: 26px; transition: .2s; cursor: pointer; }
.slider::before { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .slider { background: var(--rose); }
.switch input:checked + .slider::before { transform: translateX(20px); }

.login-hero { padding: 36px 20px 10px; text-align: center; }
.login-hero .logo { width: 72px; height: 72px; border-radius: 20px; background: var(--rose); margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; }
.login-hero h1 { font-size: 20px; color: var(--ink); }
.login-hero p { font-size: 13px; color: var(--sub); margin-top: 6px; }
.note-banner { background: #fff7e6; color: #8a6d3b; border-radius: 10px; padding: 10px 12px; font-size: 12px; margin-bottom: 12px; line-height: 1.6; }
.err-msg { color: #c0392b; font-size: 13px; margin-top: 10px; text-align: center; }
.empty { text-align: center; color: #b0b0bb; font-size: 13px; padding: 40px 0; }
.toast { position: absolute; left: 50%; bottom: 90px; transform: translateX(-50%); background: rgba(0,0,0,.8); color: #fff; padding: 10px 18px; border-radius: 22px; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 99; }
.toast.show { opacity: 1; }
.fab { position: absolute; right: 18px; bottom: 80px; width: 52px; height: 52px; border-radius: 50%; background: var(--rose); color: #fff; font-size: 26px; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 6px 16px rgba(224,93,126,.4); z-index: 50; }
