/* ─────────── 登录 ─────────── */
.login-remember { display: flex; align-items: center; gap: 8px; margin: -3px 0 14px; color: var(--text-dim); font-size: 12.5px; cursor: pointer; user-select: none; }
.login-remember input { display: none; }
.login-remember-box { width: 16px; height: 16px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 5px; background: var(--bg-elev); color: #1a1408; transition: background .15s, border-color .15s; }
.login-remember input:checked + .login-remember-box { background: var(--accent); border-color: var(--accent); }
.login-remember input:checked + .login-remember-box::after { content: "✓"; font-size: 11px; font-weight: 800; }
.login-remember span:last-child { line-height: 1.3; }
.auth-view {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1000px 520px at 50% -10%, rgba(217,167,96,.10), transparent 60%),
    var(--bg);
}
.auth-card {
  width: min(100%, 400px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px 28px;
  box-shadow: var(--shadow);
  text-align: center;
}
.auth-logo { margin: 0 auto 18px; display: grid; place-items: center; }
.auth-card h1 { font-size: 22px; margin-bottom: 6px; }
.auth-card .muted { font-size: 13.5px; margin-bottom: 26px; }
.auth-card .field { text-align: left; }
.auth-card .btn { margin-top: 4px; }
.auth-foot { margin-top: 22px; color: var(--text-faint); font-size: 11.5px; line-height: 1.7; }

/* ─────────── 布局 ─────────── */
.app {
  display: grid;
  grid-template-columns: 302px minmax(0, 1fr);
  height: 100vh; height: 100dvh;
  overflow: hidden;
}
.sidebar {
  display: flex; flex-direction: column; gap: 14px;
  padding: 20px 16px 16px;
  background: var(--bg-elev);
  border-right: 1px solid var(--border-soft);
  overflow: hidden;
}
.sidebar-head { display: flex; align-items: center; gap: 11px; padding: 0 6px 6px; }
.brand-mark { flex: 0 0 auto; display: grid; place-items: center; }
.brand-title { font-size: 15px; font-weight: 650; letter-spacing: .01em; }
.brand-sub { font-size: 11.5px; color: var(--text-faint); letter-spacing: .04em; }
.plus { font-size: 16px; margin-right: -2px; }

.sidebar-label {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 8px 0; font-size: 11.5px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint);
}
.sidebar-label span { font-weight: 650; }

.project-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 2px; }
.project-item {
  width: 100%; text-align: left; cursor: pointer;
  padding: 11px 13px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: transparent; color: inherit;
  transition: background .15s, border-color .15s;
}
.project-item:hover { background: var(--surface); }
.project-item.active { background: var(--surface); border-color: var(--border); }
.project-item-top { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.project-item-title {
  font-size: 14px; font-weight: 550; flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.project-item-sub {
  font-size: 12px; color: var(--text-faint);
  display: flex; gap: 8px; align-items: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto;
  background: var(--ok); box-shadow: 0 0 0 3px rgba(94,201,138,.14);
}
.status-dot.closed { background: var(--text-faint); box-shadow: 0 0 0 3px rgba(111,120,135,.14); }
.badge-new {
  font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px;
  background: var(--accent); color: #1a1408;
}
.sidebar-foot {
  display: flex; align-items: center; justify-content: center;
  padding-top: 10px; border-top: 1px solid var(--border-soft);
}
.sidebar-empty { padding: 18px 10px; text-align: center; color: var(--text-faint); font-size: 13px; }

.main { overflow-y: auto; padding: 26px 30px 70px; }

/* ─────────── 空状态 ─────────── */
.empty-state { text-align: center; padding: 14vh 20px 40px; }
.empty-art { display: flex; justify-content: center; opacity: .9; margin-bottom: 16px; }
.empty-state h2 { font-size: 20px; margin-bottom: 8px; }
.empty-state .muted { margin-bottom: 24px; }

/* ─────────── 项目头部 ─────────── */
.project-head {
  display: flex; align-items: flex-start; gap: 14px;
  margin-bottom: 22px; flex-wrap: wrap;
}
.project-head-main { flex: 1; min-width: 200px; }
.project-head h2 { font-size: 23px; margin-bottom: 5px; }
.project-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--text-dim); font-size: 13px; }
.project-meta span { display: inline-flex; align-items: center; gap: 6px; }
.project-head-actions { display: flex; gap: 8px; align-items: center; }
.back-btn { display: none; }

/* ─────────── 分享链接 ─────────── */
.share-card { background: linear-gradient(150deg, rgba(217,167,96,.07), var(--surface) 55%); }
.share-row { display: flex; gap: 8px; margin: 12px 0 9px; }
.share-row input { flex: 1; min-width: 0; font-size: 13.5px; color: var(--accent); font-family: ui-monospace, "SF Mono", Consolas, monospace; }

/* ─────────── 拖拽上传 ─────────── */
.dropzone {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 26px 18px; text-align: center;
  background: var(--bg-elev);
  transition: border-color .18s, background .18s;
}
.dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); }
.dz-icon { font-size: 24px; color: var(--accent); margin-bottom: 6px; }
.dz-text { font-size: 14px; color: var(--text-dim); }
.dz-hint { font-size: 12px; color: var(--text-faint); margin-top: 6px; }

.upload-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.upload-row { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.upload-name { flex: 0 0 auto; max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-dim); }
.upload-track { flex: 1; height: 5px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.upload-bar { height: 100%; width: 0; border-radius: 999px; background: var(--accent); transition: width .2s; }
.upload-bar.err { background: var(--danger); }
.upload-status { flex: 0 0 auto; width: 62px; text-align: right; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.upload-row--total .upload-stop { flex: 0 0 auto; padding: 3px 10px; font-size: 12px; }
.upload-row.done .upload-status { color: var(--ok); }
.upload-row.err .upload-status { color: var(--danger); }

/* ─────────── 照片网格 ─────────── */
.photo-grid {
  display: grid; gap: 10px; margin-top: 16px;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
}
.photo-cell {
  position: relative; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--bg-elev); border: 1px solid var(--border-soft);
  aspect-ratio: 4 / 3;
}
.photo-cell img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.photo-cell .sel-tag {
  position: absolute; top: 8px; left: 8px;
  font-size: 10.5px; font-weight: 650; padding: 2px 7px; border-radius: 999px;
  background: rgba(10,12,15,.88); color: var(--accent);
  border: 1px solid rgba(217,167,96,.4);
}
.photo-del {
  position: absolute; top: 7px; right: 7px;
  width: 27px; height: 27px; border-radius: 8px; border: 0;
  background: rgba(10,12,15,.86); color: #fff; cursor: pointer;
  font-size: 14px; line-height: 1;
  opacity: 0; transition: opacity .16s, background .16s;
}
.photo-cell:hover .photo-del { opacity: 1; }
.photo-del:hover { background: var(--danger); }
.photo-name {
  position: absolute; inset: auto 0 0 0; padding: 16px 8px 7px;
  font-size: 10.5px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.75));
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0; transition: opacity .16s;
}
.photo-cell:hover .photo-name { opacity: 1; }

/* ─────────── 选片记录 ─────────── */
.sub-item {
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 15px; margin-bottom: 11px; background: var(--bg-elev);
}
.sub-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.sub-name { font-weight: 600; font-size: 14.5px; }
.sub-time { color: var(--text-faint); font-size: 12px; margin-left: auto; }
.sub-contact { color: var(--text-faint); font-size: 12.5px; }
.sub-note {
  margin: 9px 0 0; padding: 9px 12px; border-radius: 9px;
  background: var(--surface); border-left: 2.5px solid var(--accent);
  color: var(--text-dim); font-size: 13px; white-space: pre-wrap;
}
.sub-thumbs { display: grid; gap: 6px; margin-top: 11px; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
.sub-thumbs img { aspect-ratio: 1; width: 100%; object-fit: cover; border-radius: 7px; cursor: zoom-in; background: var(--surface); }
/* 选片记录里的照片批注清单 */
.sub-pins { margin-top: 10px; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--bg); overflow: hidden; }
.sub-pins > summary { cursor: pointer; padding: 9px 12px; font-size: 12.5px; color: var(--text-dim); list-style: none; display: flex; align-items: center; gap: 6px; user-select: none; }
.sub-pins > summary::-webkit-details-marker { display: none; }
.sub-pins > summary::before { content: "▸"; font-size: 10px; transition: transform .15s; }
.sub-pins[open] > summary::before { transform: rotate(90deg); }
.sub-pins > summary:hover { color: var(--text); }
.sub-pins > summary b { color: var(--accent); font-variant-numeric: tabular-nums; }
.sub-pin-list { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.sub-pin-photo { border-left: 2px solid rgba(255,255,255,.12); padding-left: 10px; }
.sub-pin-name { font-size: 12px; color: var(--text-faint); margin-bottom: 4px; word-break: break-all; }
.sub-pin-row { display: flex; gap: 7px; font-size: 12.5px; color: var(--text-dim); line-height: 1.65; }
.sub-pin-no { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 2px; border-radius: 50%; background: rgba(255,255,255,.12); color: var(--text); font-size: 10.5px; line-height: 17px; text-align: center; }
.sub-pin-text.empty { color: var(--text-faint); font-style: italic; }

.sub-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sub-empty { padding: 26px 10px; text-align: center; color: var(--text-faint); font-size: 13.5px; }
.sub-empty-art { font-size: 26px; margin-bottom: 8px; opacity: .6; }

/* ─────────── 移动端 ─────────── */
@media (max-width: 880px) {
  .app { grid-template-columns: 1fr; height: auto; min-height: 100vh; min-height: 100dvh; overflow: visible; }
  .sidebar { height: auto; min-height: 100vh; min-height: 100dvh; border-right: 0; padding: 22px 18px calc(20px + var(--safe-b)); }
  .main { display: none; padding: 0; }
  .app.detail-open .sidebar { display: none; }
  .app.detail-open .main { display: block; padding: 0 0 calc(50px + var(--safe-b)); }
  .back-btn { display: inline-flex; }
  .project-head {
    position: sticky; top: 0; z-index: 20;
    gap: 10px; padding: calc(12px + var(--safe-t)) 16px 12px;
    margin-bottom: 14px;
    background: rgba(12,14,17,.98);
    border-bottom: 1px solid var(--border-soft);
  }
  .project-head h2 { font-size: 17px; }
  .project-head-actions { width: 100%; order: 3; }
  .project-head-actions .btn { flex: 1; }
  .card { margin: 0 14px 14px; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 7px; }
  .photo-del { opacity: 1; }
  .share-row { flex-wrap: wrap; }
  .share-row input { flex: 1 1 100%; }
  .share-row .btn { flex: 1; }
  .empty-state { padding: 18vh 20px 40px; }
}
/* ─────────── 导出到修图软件 ─────────── */
.export-card { background: linear-gradient(150deg, rgba(255,255,255,.035), var(--surface) 60%); }
.export-meta {
  padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 12px;
  background: var(--bg-elev); border: 1px solid var(--border-soft);
  font-size: 13px; color: var(--text-dim); line-height: 1.9;
}
.export-meta .k { color: var(--text-faint); }
.export-meta b { color: var(--text); font-variant-numeric: tabular-nums; }
.export-meta .empty { color: var(--text-faint); }
.export-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.export-help { margin-top: 14px; border-top: 1px solid var(--border-soft); padding-top: 12px; }
.export-help summary { cursor: pointer; font-size: 13px; color: var(--text-dim); user-select: none; }
.export-help summary:hover { color: var(--text); }
.export-help > div { padding-top: 12px; font-size: 13px; color: var(--text-dim); line-height: 1.85; }
.export-help p { margin: 0 0 10px; }
.export-help code {
  background: var(--bg-elev); border: 1px solid var(--border-soft);
  padding: 1px 5px; border-radius: 4px; font-size: 12px; color: var(--text);
}
.export-help pre {
  margin: 6px 0 10px; padding: 11px 13px; overflow-x: auto;
  background: var(--bg-elev); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); font-size: 12px; color: var(--text);
}
.export-map { border-left: 2.5px solid var(--border); padding-left: 11px; }

/* ─────────── 照片上的标记 ─────────── */
.mark-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 1px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 650;
  color: #141414;
}
.mark-pill.selected { background: var(--mark-selected); }
.mark-pill.must { background: var(--mark-must); }
.mark-pill.alt { background: var(--mark-alt); }
.mark-pill.retouch { background: var(--mark-retouch); color: #101820; }
.tile-marks { position: absolute; top: 8px; left: 8px; z-index: 2; display: flex; gap: 4px; flex-wrap: wrap; }
.tile-stars-sm {
  position: absolute; left: 9px; bottom: 7px; z-index: 2;
  font-size: 11px; letter-spacing: .5px; color: #ffd479; text-shadow: 0 1px 3px rgba(0,0,0,.9);
}
.tile-note-sm {
  position: absolute; right: 8px; bottom: 7px; z-index: 3;
  width: 24px; height: 24px; padding: 0; border-radius: 7px;
  display: grid; place-items: center;
  font-size: 12px; color: #e6e6e6; cursor: pointer;
  background: rgba(0, 0, 0, .64); border: 1px solid rgba(255, 255, 255, .2);
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.tile-note-sm:hover { background: var(--accent); border-color: var(--accent); color: #1a1a1a; transform: scale(1.08); }
.photo-cell.has-note::before { content: none; }
.sub-note-per-photo { color: #ffd479; }

/* 选片记录里每条照片的小标记 */
.sub-thumb-wrap { position: relative; }
.sub-thumb-wrap .mark-pill {
  position: absolute; left: 4px; top: 4px; transform: scale(.8); transform-origin: left top;
}
/* 缩略图右下角：批注条数角标 */
.sub-thumb-wrap .thumb-pins {
  position: absolute; right: 4px; bottom: 4px; z-index: 2;
  padding: 1px 6px; border-radius: 999px; font-size: 10px; line-height: 1.5;
  background: rgba(0, 0, 0, .68); color: #ffd479;
  border: 1px solid rgba(255, 212, 121, .5); white-space: nowrap;
}
.sub-thumb-wrap .thumb-note {
  position: absolute; right: 4px; top: 4px; z-index: 2;
  width: 18px; height: 18px; padding: 0; border-radius: 5px;
  display: grid; place-items: center; font-size: 10px;
  background: rgba(0, 0, 0, .62); border: 1px solid rgba(255, 255, 255, .18);
  color: #ffd479; cursor: pointer;
  transition: background .15s, color .15s;
}
.sub-thumb-wrap .thumb-note:hover { background: var(--accent); border-color: var(--accent); color: #1a1a1a; }
/* ─────────── 选片记录里的统计与缩略图标记 ─────────── */
.sub-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sub-stat {
  display: inline-flex; align-items: baseline; gap: 4px;
  padding: 3px 10px; border-radius: 999px; font-size: 11.5px;
  background: var(--surface); border: 1px solid var(--border-soft); color: var(--text-faint);
}
.sub-stat b { font-size: 13px; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; }
.sub-stat.selected b { color: var(--mark-selected); }
.sub-stat.must b { color: var(--mark-must); }
.sub-stat.alt b { color: var(--mark-alt); }
.sub-stat.retouch b { color: var(--mark-retouch); }
.sub-thumbs .sub-thumb-wrap { position: relative; }
.thumb-stars {
  position: absolute; left: 4px; bottom: 4px;
  font-size: 9.5px; letter-spacing: 0; color: #ffd479;
  text-shadow: 0 1px 3px rgba(0,0,0,.95);
}

/* ─────────── 水印设置 ─────────── */
.wm-editor { display: flex; flex-direction: column; gap: 16px; }

/* 总开关（仿 iOS 拨杆） */
.wm-switch { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; }
.wm-switch input { display: none; }
.wm-switch-track {
  flex: 0 0 auto; position: relative; width: 38px; height: 22px; border-radius: 99px;
  margin-top: 1px; background: var(--surface-3); transition: background .18s;
}
.wm-switch-track::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--text-faint); transition: transform .18s, background .18s;
}
.wm-switch input:checked + .wm-switch-track { background: var(--mark-selected); }
.wm-switch input:checked + .wm-switch-track::after { transform: translateX(16px); background: #fff; }
.wm-switch-text b { display: block; font-size: 14px; font-weight: 600; }
.wm-switch-text small { color: var(--text-faint); font-size: 12px; }

/* 类型分段 */
.wm-tabs { display: flex; gap: 3px; padding: 3px; border-radius: 9px; background: var(--bg-elev); border: 1px solid var(--border-soft); }
.wm-tabs button {
  flex: 1; padding: 7px; border: 0; border-radius: 7px; cursor: pointer;
  background: transparent; color: var(--text-dim); font-size: 13px;
  transition: background .15s, color .15s;
}
.wm-tabs button:hover { color: var(--text); }
.wm-tabs button.on { background: var(--surface-2); color: var(--text); }

.wm-sub input[type="text"] {
  width: 100%; padding: 9px 12px; background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 14px;
}

/* 分组卡片 */
.wm-section {
  display: flex; flex-direction: column; gap: 10px; padding: 12px 14px;
  border-radius: 10px; background: var(--bg-elev); border: 1px solid var(--border-soft);
}
.wm-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.wm-section-head > span { font-size: 12.5px; color: var(--text-dim); }
.wm-presets { display: flex; gap: 4px; flex-wrap: wrap; }
.wm-preset {
  padding: 3px 9px; border-radius: 6px; font-size: 11.5px; cursor: pointer;
  background: transparent; border: 1px solid var(--border); color: var(--text-faint);
  transition: background .15s, color .15s, border-color .15s;
}
.wm-preset:hover { color: var(--text); border-color: var(--text-faint); }

/* 「标签 + 滑条 + 数值」一行 */
.wm-ctrl { display: grid; grid-template-columns: 30px 1fr 46px; align-items: center; gap: 10px; }
.wm-ctrl-label { font-size: 12px; color: var(--text-faint); }
.wm-ctrl-val { font-size: 12.5px; color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; margin: 0; padding: 0; border-radius: 99px;
  background: var(--surface-3); outline: none;
}
input[type="range"]:disabled { opacity: .35; }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 15px; height: 15px;
  border: 0; border-radius: 50%; background: var(--text); cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}
input[type="range"]::-moz-range-thumb {
  width: 15px; height: 15px; border: 0; border-radius: 50%; background: var(--text); cursor: pointer;
}

.wm-mini-check { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-faint); cursor: pointer; }
.wm-mini-check input { width: 14px; height: 14px; accent-color: var(--accent); }
.wm-upload-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* 预览：小而精致，像一张照片卡 */
.wm-preview-wrap { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.wm-preview {
  position: relative; width: min(100%, 300px); aspect-ratio: 3 / 2;
  border-radius: 10px; overflow: hidden; border: 1px solid var(--border);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .4);
}
.wm-preview-img {
  position: absolute; inset: 0;
  background: linear-gradient(152deg, #3c4652 0%, #6d6355 46%, #2b3037 100%);
}
.wm-preview-img.has-photo { background-size: cover; background-position: center; }
.wm-preview-cap { font-size: 11px; color: var(--text-faint); letter-spacing: .05em; }

/* ─────────── 单张照片预览（后台） ─────────── */
.modal-mask.img-preview-mask { padding: 20px; background: rgba(4, 5, 7, .95); }
.img-preview {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  max-width: 100%; max-height: 100%;
}
.img-preview img {
  max-width: min(1500px, 94vw); max-height: 84vh;
  object-fit: contain; border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
  background: var(--bg-elev);
}
.img-preview-meta {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: min(1500px, 94vw); max-width: 100%;
}
.img-preview-name {
  max-width: 90vw; font-size: 12.5px; color: var(--text-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.img-preview-meta .note-tags { justify-content: center; margin: 0; }
.img-preview-meta .note-text {
  width: min(640px, 100%); margin-top: 2px;
  padding: 10px 14px; font-size: 13px; line-height: 1.7;
}
.img-preview-close {
  position: fixed; top: 18px; right: 20px; z-index: 1;
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center; font-size: 16px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
  color: var(--text); cursor: pointer; transition: background .15s;
}
.img-preview-close:hover { background: rgba(255, 255, 255, .18); }

/* ─────────── 客户备注弹窗 ─────────── */
.note-photo { font-size: 12.5px; color: var(--text-faint); margin-bottom: 9px; }
.note-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 11px; }
.note-stars { color: #ffd479; font-size: 13px; letter-spacing: .5px; }
.note-text {
  padding: 12px 15px; border-radius: 9px;
  background: var(--bg-elev); border-left: 3px solid var(--accent);
  color: var(--text); font-size: 13.5px; line-height: 1.8; white-space: pre-wrap;
}

/* ─────────── 项目表单里的「照片水印」子模块 ─────────── */
.wm-sub { border: 1px solid var(--border-soft); border-radius: 10px; background: var(--bg-elev); overflow: hidden; margin-bottom: 12px; }
.wm-sub > summary {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  cursor: pointer; user-select: none; font-size: 13.5px; color: var(--text);
  list-style: none; transition: background .15s;
}
.wm-sub > summary::-webkit-details-marker { display: none; }
.wm-sub > summary::marker { content: ""; }
.wm-sub > summary:hover { background: var(--surface); }
.wm-sub-state { font-size: 11.5px; color: var(--text-faint); padding: 1px 8px; border-radius: 999px; background: var(--surface-2); }
.wm-sub-state.on { color: var(--mark-selected); }
.wm-sub > summary::after { content: "▾"; margin-left: auto; color: var(--text-faint); font-size: 11px; transition: transform .18s; }
.wm-sub[open] > summary::after { transform: rotate(180deg); }
.wm-sub[open] > summary { border-bottom: 1px solid var(--border-soft); }
.wm-sub-body { display: flex; flex-direction: column; gap: 13px; padding: 14px; }

/* ─────────── 照片批量管理 ─────────── */
.batch-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 14px; margin-top: 14px;
  border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border);
}
.batch-count { font-size: 13px; color: var(--text-dim); }
.batch-count b { color: var(--accent); font-size: 15px; font-variant-numeric: tabular-nums; }
.batch-sep { flex: 1; }
.batch-bar .btn-danger:disabled { opacity: .4; cursor: not-allowed; }

#batchToggleBtn.is-on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* 选择框 */
.pick-box {
  position: absolute; top: 8px; left: 8px; z-index: 5;
  width: 22px; height: 22px; border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, .7); background: rgba(0, 0, 0, .58);
  display: none; place-items: center; color: transparent; font-size: 13px; font-weight: 700;
  pointer-events: none;
}
.photo-cell.batch-mode .pick-box { display: grid; left: auto; right: 8px; }
.photo-cell.batch-mode { cursor: pointer; }
.photo-cell.batch-mode .photo-del { display: none; }
.photo-cell.is-picked { outline: 2px solid var(--accent); outline-offset: -2px; }
.photo-cell.is-picked::after {
  content: ""; position: absolute; inset: 0; background: rgba(217, 167, 96, .18); pointer-events: none;
}
.photo-cell.is-picked .pick-box {
  background: var(--accent); border-color: var(--accent); color: #1a1a1a;
}
.photo-cell.is-picked .pick-box::after { content: "✓"; }
.photo-cell.batch-mode .tile-marks,
.photo-cell.batch-mode .tile-stars-sm,
.photo-cell.batch-mode .tile-note-sm { opacity: .35; }

/* ─────────── 已有照片时上传区收成细条 ─────────── */
.dropzone.is-compact {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 10px 16px; text-align: left;
}
.dropzone.is-compact .dz-icon { font-size: 16px; margin: 0; line-height: 1; }
.dropzone.is-compact .dz-text { font-size: 13px; }
.dropzone.is-compact .dz-hint { display: none; }

/* ─────────── 照片分类 ─────────── */
.cat-chip {
  position: absolute; top: 8px; left: 8px; z-index: 4;
  padding: 2px 8px; border-radius: 5px;
  font-size: 10.5px; font-weight: 600; line-height: 1.5;
  background: rgba(0, 0, 0, .74); color: #e8e8e8;
  border: 1px solid rgba(255, 255, 255, .16);
  pointer-events: none;
  max-width: calc(100% - 60px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.photo-cell.has-cat .tile-marks { top: 34px; }
.cat-bar {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  margin-top: 14px; padding: 9px 12px;
  border-radius: var(--radius-sm); background: var(--bg-elev); border: 1px solid var(--border-soft);
}
.cat-bar-label { font-size: 12px; color: var(--text-faint); margin-right: 2px; }
.cat-pill {
  padding: 4px 11px; border-radius: 999px; font-size: 12.5px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-dim);
  transition: background .15s, color .15s, border-color .15s;
}
.cat-pill:hover { color: var(--text); }
.cat-pill.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.cat-pill b { font-weight: 600; opacity: .7; margin-left: 3px; }

.img-preview-pic { position: relative; display: inline-block; line-height: 0; }
.img-preview-pins { position: absolute; inset: 0; pointer-events: none; }
.pin-badge {
  position: absolute; bottom: 7px; left: 50%; transform: translateX(-50%); z-index: 4;
  padding: 2px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 600;
  background: var(--accent); color: #1a1a1a; pointer-events: none; white-space: nowrap;
}
/* 框选批注（与客户页同一套视觉） */
.pin-anchor { position: absolute; display: flex; align-items: flex-start; gap: 6px; transform: translate(-13px, -13px); width: max-content; }
.pin-anchor > .pin-mark { position: static; margin: 0; flex: 0 0 auto; }
.pin-anchor > .pin-label { margin-top: 4px; }
.pin-box { position: absolute; box-sizing: border-box; border: 2px solid var(--accent); border-radius: 4px; background: rgba(90,140,255,.14); }
/* 框选的「序号 + 说明」：同一个 flex 容器，自动按内容排开（两位数也不会互相压） */
.pin-box > .pin-head {
  position: absolute; left: -3px; top: -3px; transform: translateY(-100%);
  display: inline-flex; align-items: center; gap: 6px;
  width: max-content; pointer-events: none;
}
.pin-box > .pin-head > b {
  flex: 0 0 auto;
  min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box; white-space: nowrap; line-height: 1;
  font-variant-numeric: tabular-nums;
  background: #15171b; border: 2px solid var(--pin-c, #ffd479);
  color: #fff; font-size: 12.5px; font-weight: 800;
  text-shadow: 0 1px 2px rgba(0,0,0,.7);
  box-shadow: 0 0 0 1px rgba(0,0,0,.38), 0 3px 9px rgba(0,0,0,.45);
}
/* 靠近顶部或右侧：整组挪到框的左侧，与框顶对齐，避免被裁 / 压住画面 */
.pin-box.is-right > .pin-head,
.pin-box.is-top > .pin-head { left: auto; right: calc(100% + 5px); top: 0; transform: none; }
/* 连左边也没空间：整组放回框内左上角 */
.pin-box.is-top.is-left > .pin-head { left: 0; right: auto; top: 0; transform: none; }
.pin-label { max-width: min(110px, 24vw); padding: 3px 8px; border-radius: 6px; background: rgba(10,12,16,.84); border: 1px solid rgba(255,255,255,.18); color: #fff; font-size: 11.5px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; word-break: break-word;  width: max-content;}
.pin-anchor.is-right { flex-direction: row-reverse; transform: translate(calc(-100% + 13px), -13px); }
/* 图钉贴顶时圆点整体下移，保证完整可见 */
.pin-anchor.is-top { transform: translate(-13px, 0); }
.pin-anchor.is-top.is-right { transform: translate(calc(-100% + 13px), 0); }
.pin-kind { flex: 0 0 auto; font-size: 11px; padding: 1px 6px; border-radius: 999px; color: var(--text-faint); background: rgba(255,255,255,.06); border: 1px solid var(--border-soft); }
.pin-list-row { display: flex; gap: 9px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--border-soft); }
.pin-list-row:last-child { border-bottom: 0; }
.pin-list-no {
  width: 21px; height: 21px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  background: var(--accent); color: #1a1a1a;
}
.pin-list-text { flex: 1; font-size: 13px; line-height: 1.7; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.pin-list-text.empty { color: var(--text-faint); }
.img-preview-meta .pin-list {
  width: min(640px, 100%); text-align: left; margin-top: 4px;
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: 12px; padding: 4px 14px;
}

/* 分层分类确认弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.52); display: flex; align-items: center; justify-content: center; z-index: 1200; }
.modal-box { width: min(92vw, 420px); background: #1e1e1e; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 18px; box-shadow: 0 18px 50px rgba(0,0,0,.5); color: #eee; }
.modal-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.modal-sub { font-size: 12px; color: #9a9a9a; margin-bottom: 12px; }
.modal-field { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; }
.modal-field select { flex: 1; background: rgba(255,255,255,.06); color: #eee; border: 1px solid rgba(255,255,255,.16); border-radius: 7px; padding: 7px 8px; font-size: 13px; outline: none; }
.modal-preview { font-size: 12px; color: #b9d8a8; background: rgba(120,200,120,.08); border: 1px solid rgba(120,200,120,.18); border-radius: 7px; padding: 8px 10px; margin-bottom: 14px; line-height: 1.5; }
.modal-row { display: flex; justify-content: flex-end; gap: 8px; }

.modal-folder-list { max-height: 150px; overflow: auto; margin-bottom: 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; }
.modal-folder-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 10px; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,.06); }
.modal-folder-item:last-child { border-bottom: none; }
.modal-folder-item .mf-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-folder-item .mf-count { color: #9a9a9a; font-size: 12px; flex: none; }
.modal-row .btn { white-space: nowrap; }

/* 同名冲突弹窗（颜色区分危险程度） */
.modal-box--warn { border-color: rgba(240,180,80,.35); box-shadow: 0 18px 50px rgba(0,0,0,.55), 0 0 0 1px rgba(240,180,80,.12) inset; }
.dup-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.dup-warn-icon { flex: none; width: 24px; height: 24px; border-radius: 50%; background: #d98b2b; color: #1a1a1a; font-weight: 700; font-size: 15px; line-height: 24px; text-align: center; }
.dup-card { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 8px; padding: 10px 12px; font-size: 13px; line-height: 1.7; margin-bottom: 14px; word-break: break-all; }
.dup-file { font-weight: 600; color: #f0c674; }
.dup-cat { color: #b9d8a8; }
.dup-existing { color: #9a9a9a; font-size: 12px; }
.dup-counter { color: #8a8a8a; font-size: 12px; margin-top: 4px; }
.modal-row--stack { flex-wrap: wrap; }
.btn-dup-danger { background: #b3402f; border-color: #b3402f; color: #fff; }
.btn-dup-danger:hover { background: #c8523f; border-color: #c8523f; }
.btn-dup-warn { background: #a97a26; border-color: #a97a26; color: #fff; }
.btn-dup-warn:hover { background: #bd8b30; border-color: #bd8b30; }
.btn-dup-safe { background: #2f7d4f; border-color: #2f7d4f; color: #fff; }
.btn-dup-safe:hover { background: #39935e; border-color: #39935e; }

/* 水印大小模式切换（按比例 / 固定像素） */
.wm-size-mode { display: inline-flex; gap: 0; margin: 0 0 10px; border: 1px solid var(--border, rgba(255,255,255,.14)); border-radius: 8px; overflow: hidden; }
.wm-size-mode button { background: transparent; border: 0; color: var(--text-dim, #9a9a9a); font-size: 12px; padding: 6px 14px; cursor: pointer; }
.wm-size-mode button + button { border-left: 1px solid var(--border, rgba(255,255,255,.14)); }
.wm-size-mode button.on { background: rgba(255,255,255,.12); color: var(--text, #eee); font-weight: 600; }
.wm-size-mode button:hover:not(.on) { background: rgba(255,255,255,.06); }

/* 导出区：主按钮 + 其它导出折叠菜单 */
.export-more { position: relative; }
.export-more > summary {
  list-style: none; cursor: pointer;
  padding: 8px 12px; border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--border); color: var(--text-dim); font-size: 13px;
  background: transparent; user-select: none;
}
.export-more > summary::-webkit-details-marker { display: none; }
.export-more > summary:hover { color: var(--text); background: var(--surface-2, rgba(255,255,255,.05)); }
.export-more[open] > summary { color: var(--text); background: var(--surface-2, rgba(255,255,255,.05)); }
.export-more-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40;
  display: flex; flex-direction: column; gap: 4px; min-width: 180px;
  padding: 8px; border-radius: 10px;
  background: var(--bg-elev, #1e1e1e); border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
}
.export-more-menu .btn { justify-content: flex-start; text-align: left; width: 100%; }

/* 购买订单 */
.orders-entry { display: flex; align-items: center; justify-content: space-between; }
.orders-entry .pill { margin-left: 8px; }
.order-list { display: flex; flex-direction: column; gap: 12px; }
.order-empty { padding: 30px 10px; color: var(--text-faint); text-align: center; font-size: 13px; }
.order-item { padding: 14px 15px; border: 1px solid var(--border-soft); border-radius: 12px; background: var(--bg-elev); }
.order-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.order-studio { font-size: 14px; font-weight: 650; color: var(--text); }
.order-meta { margin-top: 5px; color: var(--text-faint); font-size: 12px; line-height: 1.55; word-break: break-all; }
.order-status { flex: 0 0 auto; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 650; background: rgba(255,255,255,.08); color: var(--text-dim); }
.order-status.pending { color: #ffd479; background: rgba(255,212,121,.12); }
.order-status.activated { color: #78d29f; background: rgba(95,185,138,.14); }
.order-status.rejected { color: #e8877f; background: rgba(226,104,95,.13); }
.order-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.order-actions .btn { min-height: 32px; }
@media (max-width: 700px) {
  .order-head { flex-direction: column; }
  .orders-entry { width: 100%; }
}

/* 水印编辑器 v2 */
.wm-sub-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; }
.wm-sub-icon { width: 20px; height: 20px; display: inline-grid; place-items: center; border-radius: 6px; background: rgba(217,167,96,.13); color: #e5b96f; font-size: 12px; font-style: normal; }
.wm-sub-body { display: flex; flex-direction: column; gap: 14px; align-items: stretch; padding: 16px; }
.wm-controls { display: flex; flex-direction: column; gap: 14px; width: 100%; min-width: 0; }
.wm-subhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.wm-subhead > span { color: var(--text-dim); font-size: 12px; font-weight: 600; }
.wm-panel { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--border-soft); border-radius: 12px; background: rgba(255,255,255,.015); }
.wm-switch { padding: 11px 12px; border: 1px solid var(--border-soft); border-radius: 12px; background: rgba(255,255,255,.02); }
.wm-switch-track { width: 40px; height: 23px; margin-top: 0; background: #36383f; }
.wm-switch-track::after { top: 3px; left: 3px; width: 17px; height: 17px; background: #b8b9c0; }
.wm-switch input:checked + .wm-switch-track { background: #4f9f74; }
.wm-switch input:checked + .wm-switch-track::after { transform: translateX(17px); }
.wm-tabs { padding: 4px; border-radius: 11px; background: rgba(255,255,255,.035); border-color: rgba(255,255,255,.08); }
.wm-tabs button { padding: 8px 10px; border-radius: 8px; font-weight: 600; }
.wm-tabs button.on { background: rgba(255,255,255,.13); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.wm-editor input[type="text"] { background: #111216; border-color: rgba(255,255,255,.12); border-radius: 10px; }
.wm-section { gap: 12px; padding: 13px 14px; border-radius: 12px; background: rgba(255,255,255,.018); border-color: rgba(255,255,255,.075); }
.wm-section-head > span { font-size: 12px; font-weight: 650; letter-spacing: .03em; color: var(--text); }
.wm-presets { gap: 5px; }
.wm-preset { padding: 4px 10px; border-radius: 7px; background: rgba(255,255,255,.025); }
.wm-preset:hover { background: rgba(255,255,255,.08); }
.wm-ctrl { grid-template-columns: 34px minmax(0, 1fr) 50px; gap: 11px; }
.wm-ctrl-label { font-size: 11.5px; letter-spacing: .04em; }
.wm-ctrl-val { font-size: 11.5px; color: #dedee3; background: rgba(255,255,255,.055); border-radius: 6px; padding: 3px 5px; }
.wm-sub input[type="range"] { height: 5px; border-radius: 99px; background: linear-gradient(90deg, rgba(255,255,255,.32), rgba(255,255,255,.12)); }
.wm-sub input[type="range"]::-webkit-slider-thumb { width: 16px; height: 16px; background: #ededed; border: 3px solid #2a2c32; box-shadow: 0 2px 7px rgba(0,0,0,.55); }
.wm-sub input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; background: #ededed; border: 3px solid #2a2c32; box-shadow: 0 2px 7px rgba(0,0,0,.55); }
.wm-size-mode { border-radius: 9px; overflow: hidden; border-color: rgba(255,255,255,.12); }
.wm-size-mode button { padding: 7px 14px; }
.wm-preview-wrap { position: static; width: 100%; max-width: 360px; margin: 0 auto; padding: 12px; border: 1px solid rgba(255,255,255,.09); border-radius: 14px; background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012)); }
.wm-preview-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-dim); font-size: 11.5px; }
.wm-preview-head b { padding: 2px 7px; border-radius: 999px; background: rgba(95,185,138,.12); color: #78d29f; font-size: 10px; font-weight: 650; }
.wm-preview { width: 100%; max-width: none; border-radius: 12px; border-color: rgba(255,255,255,.12); box-shadow: 0 12px 30px rgba(0,0,0,.38); }
.wm-preview-cap { text-align: center; line-height: 1.5; }
@media (max-width: 760px) {
  .wm-sub-body { grid-template-columns: 1fr; }
  .wm-preview-wrap { position: static; }
}

/* ══════════ iPhone 窄屏压缩（≤430px）══════════ */
@media (max-width: 430px) {
  .sidebar { padding: 16px 13px calc(16px + var(--safe-b)); }
  .project-head { gap: 8px; padding: calc(10px + var(--safe-t)) 13px 10px; margin-bottom: 11px; }
  .project-head h2 { font-size: 16px; }
  .project-head-actions .btn { min-height: 34px; font-size: 12.5px; padding: 0 10px; }
  .card { margin: 0 12px 12px; }
  .card-title { font-size: 13.5px; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 6px; }
  .dz-hint { font-size: 11px; }
  .upload-row { font-size: 12px; gap: 8px; }
  .export-meta { font-size: 12px; }
}
