/* ============================================================
 * 随拍 Web · 共享样式（设计系统）
 * 浅色主题 / 移动端优先 / 桌面端手机壳
 * ============================================================ */

:root {
  /* 主色 */
  --brand: #FF6B35;
  --brand-dark: #E8551C;
  --brand-soft: #FFF1EB;

  /* 中性色 */
  --bg: #F5F6F8;
  --card: #FFFFFF;
  --line: #EDEFF2;
  --line-strong: #DFE3E9;

  /* 文字 */
  --t1: #1A1A1A;
  --t2: #8A8F99;
  --t3: #B4B9C2;

  /* 语义色 */
  --blue: #2B6BF3;
  --blue-soft: #EAF1FE;
  --purple: #7C4DFF;
  --purple-soft: #F1ECFF;
  --cyan: #00A6A6;
  --cyan-soft: #E3F7F7;
  --green: #16A34A;
  --green-soft: #E8F7EE;
  --red: #E23B3B;
  --red-soft: #FDECEC;
  --grey: #8A8F99;
  --grey-soft: #F0F1F4;

  /* 尺寸 */
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --shadow: 0 1px 2px rgba(20, 24, 32, .04), 0 6px 18px rgba(20, 24, 32, .05);
  --shadow-up: 0 -2px 12px rgba(20, 24, 32, .06);
  --nav-h: 52px;
  --bar-h: 60px;
  --phone-w: 390px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--t1);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { display: block; border: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
input, textarea, select { outline: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.hide { display: none !important; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ellipsis2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ellipsis3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.muted { color: var(--t2); }
.tiny { font-size: 11px; }
.small { font-size: 12px; }
.bold { font-weight: 600; }
.money { color: var(--brand); font-weight: 700; }
.flex { display: flex; }
.flex-1 { flex: 1; min-width: 0; }
.between { display: flex; align-items: center; justify-content: space-between; }
.center { display: flex; align-items: center; justify-content: center; }
.gap4 { gap: 4px; } .gap6 { gap: 6px; } .gap8 { gap: 8px; } .gap10 { gap: 10px; } .gap12 { gap: 12px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.p12 { padding: 12px; } .p16 { padding: 16px; }
.w100 { width: 100%; }

/* ============================================================
 * 手机壳（桌面浏览器下把移动端页面居中限制 390px）
 * ============================================================ */
.phone-frame {
  width: 100%;
  max-width: var(--phone-w);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

@media (min-width: 700px) {
  body.phone-page {
    background:
      radial-gradient(1200px 600px at 20% -10%, #FFE7DC 0%, transparent 60%),
      radial-gradient(900px 500px at 90% 110%, #E4ECFF 0%, transparent 60%),
      #EDEFF3;
    padding: 26px 0 40px;
  }
  body.phone-page::before {
    content: '随拍 · Web 演示端';
    position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
    font-size: 12px; color: #9AA0AA; letter-spacing: 2px;
  }
  body.phone-page::after {
    content: '桌面端预览 · 逻辑宽度 390px';
    position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%);
    font-size: 11px; color: #B4B9C2;
  }
  .phone-frame {
    min-height: 844px;
    height: calc(100vh - 140px);
    max-height: 880px;
    border-radius: 38px;
    box-shadow:
      0 0 0 10px #1F2126,
      0 0 0 11px #33363D,
      0 34px 70px rgba(16, 20, 28, .28);
    overflow: hidden;
  }
  /* 顶部刘海 */
  .phone-frame .notch {
    display: block;
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 150px; height: 26px; background: #1F2126;
    border-radius: 0 0 18px 18px; z-index: 90; pointer-events: none;
  }
}
.notch { display: none; }

/* 手机内部滚动容器 */
.phone-scroll {
  position: absolute; inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0;
}
.phone-scroll::-webkit-scrollbar { width: 0; }

/* ============================================================
 * 顶部导航
 * ============================================================ */
.appbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 12px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.appbar .title { font-size: 16px; font-weight: 600; flex: 1; text-align: center; }
.appbar .btn-back {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--t1); border-radius: 50%;
}
.appbar .btn-back:active { background: var(--grey-soft); }
.appbar-transparent { background: transparent; border-bottom: 0; backdrop-filter: none; }

/* ============================================================
 * 底部 tab bar
 * ============================================================ */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 70;
  display: flex; height: var(--nav-h);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar .tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; color: var(--t2); font-size: 10px;
}
.tabbar .tab .ico { font-size: 19px; line-height: 1; }
.tabbar .tab.on { color: var(--brand); font-weight: 600; }

/* ============================================================
 * 底部操作条 / 固定按钮
 * ============================================================ */
.actionbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 70;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: #fff; box-shadow: var(--shadow-up);
}
.has-tabbar { padding-bottom: calc(var(--nav-h) + 8px); }
.has-actionbar { padding-bottom: calc(var(--bar-h) + 16px); }

/* ============================================================
 * 按钮
 * ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 18px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
  font-size: 14px; font-weight: 600;
  transition: opacity .15s, transform .1s;
  user-select: none;
}
.btn:active { transform: scale(.98); opacity: .88; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-dark { background: var(--t1); color: #fff; }
.btn-ghost { background: transparent; color: var(--t2); border: 1px solid var(--line-strong); }
.btn-green { background: var(--green); color: #fff; }
.btn-red { background: var(--red-soft); color: var(--red); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12px; border-radius: 999px; }
.btn-xs { height: 26px; padding: 0 10px; font-size: 11px; }
.btn-lg { height: 48px; font-size: 16px; border-radius: 26px; }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .55; pointer-events: none; }
.btn.is-loading::after {
  content: ''; width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite; margin-left: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 按钮加载遮罩（不改变宽度） */
.btn-spin { position: relative; color: transparent !important; }
.btn-spin::after {
  content: ''; position: absolute; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid #fff; border-right-color: transparent; animation: spin .7s linear infinite;
}
.btn-ghost.btn-spin::after, .btn-red.btn-spin::after { border-color: var(--t2); border-right-color: transparent; }

/* ============================================================
 * 卡片 / 分区
 * ============================================================ */
.card {
  background: var(--card); border-radius: var(--r);
  box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px;
}
.card-flat { box-shadow: none; border: 1px solid var(--line); }
.card-tap:active { transform: scale(.995); opacity: .92; }

.section { margin: 12px; }
.section-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 700; margin: 4px 0 10px;
}
.section-title .more { font-size: 12px; font-weight: 400; color: var(--t2); }

.divider { height: 1px; background: var(--line); margin: 12px 0; }

/* ============================================================
 * 表单
 * ============================================================ */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 13px; color: var(--t2); margin-bottom: 6px; }
.field > label .req { color: var(--red); margin-left: 2px; }
.input, .textarea, .select {
  width: 100%; padding: 11px 12px;
  background: #F7F8FA; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; color: var(--t1); transition: border-color .15s, background .15s;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--brand); background: #fff; }
.textarea { min-height: 92px; resize: vertical; line-height: 1.6; }
.select { appearance: none; background-image: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hint { font-size: 11px; color: var(--t3); margin-top: 5px; }

/* 单元格（后台/详情用） */
.cell { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.cell:last-child { border-bottom: 0; }
.cell .k { width: 84px; flex: none; color: var(--t2); font-size: 13px; }
.cell .v { flex: 1; min-width: 0; font-size: 13px; word-break: break-all; }

/* ============================================================
 * 标签 / 徽章
 * ============================================================ */
.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 6px; background: var(--grey-soft); color: var(--grey);
  font-size: 11px; font-weight: 500; white-space: nowrap;
}
.tag-brand { background: var(--brand-soft); color: var(--brand); }
.tag-orange { background: var(--brand-soft); color: var(--brand); }
.tag-blue { background: var(--blue-soft); color: var(--blue); }
.tag-purple { background: var(--purple-soft); color: var(--purple); }
.tag-cyan { background: var(--cyan-soft); color: var(--cyan); }
.tag-green { background: var(--green-soft); color: var(--green); }
.tag-red { background: var(--red-soft); color: var(--red); }
.tag-grey { background: var(--grey-soft); color: var(--grey); }

.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px;
  border-radius: 999px; font-size: 12px; font-weight: 600;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-orange { background: var(--brand-soft); color: var(--brand); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-purple { background: var(--purple-soft); color: var(--purple); }
.badge-cyan { background: var(--cyan-soft); color: var(--cyan); }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-grey { background: var(--grey-soft); color: var(--grey); }

/* 风格 chip（可多选） */
.chip {
  display: inline-flex; align-items: center; height: 30px; padding: 0 12px;
  border-radius: 999px; background: #F1F3F6; color: var(--t2);
  font-size: 12px; white-space: nowrap; transition: all .15s;
}
.chip.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; box-shadow: inset 0 0 0 1px var(--brand); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* 横向滚动的筛选条 */
.scroll-x {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 12px 2px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.scroll-x::-webkit-scrollbar { display: none; }

/* ============================================================
 * 图片
 * ============================================================ */
.ph-cover {
  position: relative; width: 100%; aspect-ratio: 4/3;
  background: #E9EBEF; overflow: hidden; border-radius: var(--r-sm);
}
.ph-cover img { width: 100%; height: 100%; object-fit: cover; }
.ph-cover .ph-initial {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: #C3C8D0; font-weight: 600;
}
.avatar {
  position: relative; flex: none; overflow: hidden; border-radius: 50%;
  background: #E9EBEF; color: #C3C8D0;
  display: flex; align-items: center; justify-content: center; font-weight: 600;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
 * 摄影师卡片
 * ============================================================ */
.pcard {
  display: flex; gap: 12px; padding: 12px;
  background: var(--card); border-radius: var(--r); box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.pcard .cover { width: 104px; flex: none; }
.pcard .cover .ph-cover { aspect-ratio: 1/1; }
.pcard .info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pcard .name { font-size: 16px; font-weight: 700; }
.pcard .meta { font-size: 11px; color: var(--t2); margin-top: 3px; }
.pcard .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pcard .bottom { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; padding-top: 8px; }
.pcard .price { color: var(--brand); font-weight: 700; font-size: 16px; }
.pcard .price s { color: var(--t3); font-weight: 400; font-size: 12px; margin-left: 2px; }

/* ============================================================
 * 骨架屏 / 空状态 / 加载
 * ============================================================ */
.sk {
  background: linear-gradient(90deg, #EDEFF2 25%, #F6F7F9 37%, #EDEFF2 63%);
  background-size: 400% 100%;
  animation: skmove 1.3s ease infinite;
  border-radius: 6px;
}
@keyframes skmove { 0% { background-position: 100% 50% } 100% { background-position: 0 50% } }
.sk-card { height: 128px; border-radius: var(--r); margin-bottom: 12px; }
.sk-line { height: 12px; margin-bottom: 8px; }

.empty { padding: 56px 24px; text-align: center; color: var(--t2); }
.empty .emoji { font-size: 40px; margin-bottom: 10px; }
.empty .t { font-size: 14px; margin-bottom: 4px; }
.empty .d { font-size: 12px; color: var(--t3); }
.empty .btn { margin-top: 16px; }

.loadmore { padding: 14px 0 20px; text-align: center; font-size: 12px; color: var(--t3); }
.spinner {
  width: 18px; height: 18px; border-radius: 50%; margin: 0 auto 8px;
  border: 2px solid var(--line-strong); border-top-color: var(--brand);
  animation: spin .8s linear infinite;
}

/* 全屏 loading */
.mask-loading {
  position: absolute; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .7); backdrop-filter: blur(2px);
}
.mask-loading .box { text-align: center; font-size: 12px; color: var(--t2); }

/* ============================================================
 * Toast
 * ============================================================ */
.toast-wrap {
  position: absolute; top: 60px; left: 0; right: 0; z-index: 999;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
.toast {
  max-width: 78%; padding: 9px 16px; border-radius: 10px;
  background: rgba(28, 30, 34, .9); color: #fff; font-size: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  animation: toastIn .2s ease;
  word-break: break-all;
}
.toast.err { background: rgba(200, 40, 40, .94); }
.toast.ok { background: rgba(16, 130, 60, .94); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } }

/* ============================================================
 * 弹窗 confirm / prompt
 * ============================================================ */
.mask {
  position: absolute; inset: 0; z-index: 300;
  background: rgba(0, 0, 0, .45);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: fadeIn .18s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.dialog {
  width: 100%; max-width: 300px; background: #fff; border-radius: 16px;
  overflow: hidden; animation: popIn .2s ease;
}
@keyframes popIn { from { opacity: 0; transform: scale(.92); } }
.dialog .body { padding: 22px 20px 18px; text-align: center; }
.dialog .body .t { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.dialog .body .d { font-size: 13px; color: var(--t2); line-height: 1.6; }
.dialog .body .input { margin-top: 14px; text-align: left; }
.dialog .foot { display: flex; border-top: 1px solid var(--line); }
.dialog .foot > button {
  flex: 1; height: 46px; font-size: 15px; color: var(--t2);
}
.dialog .foot > button + button { border-left: 1px solid var(--line); color: var(--brand); font-weight: 600; }
.dialog .foot > button.danger { color: var(--red); }
.dialog .foot > button.cancel + button.confirm { color: var(--brand); }

/* ============================================================
 * 底部选择器
 * ============================================================ */
.sheet-mask {
  position: absolute; inset: 0; z-index: 320;
  background: rgba(0, 0, 0, .45);
  display: flex; align-items: flex-end;
  animation: fadeIn .18s ease;
}
.sheet {
  width: 100%; background: #fff; border-radius: 18px 18px 0 0;
  padding-bottom: env(safe-area-inset-bottom);
  animation: sheetIn .24s cubic-bezier(.2, .9, .3, 1);
  max-height: 78%; display: flex; flex-direction: column;
}
@keyframes sheetIn { from { transform: translateY(100%); } }
.sheet .sh-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px; border-bottom: 1px solid var(--line);
}
.sheet .sh-head .t { font-size: 15px; font-weight: 600; }
.sheet .sh-head .x { font-size: 20px; color: var(--t2); }
.sheet .sh-body { overflow-y: auto; padding: 8px 0; }
.sheet .sh-foot { padding: 10px 16px; border-top: 1px solid var(--line); }
.sheet .opt {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; font-size: 14px;
}
.sheet .opt.on { color: var(--brand); font-weight: 600; }
.sheet .opt.on::after { content: '✓'; font-weight: 700; }

/* 灯箱 */
.lightbox {
  position: absolute; inset: 0; z-index: 400;
  background: #0D0E10; display: flex; align-items: center; justify-content: center;
}
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox .lb-close {
  position: absolute; top: 14px; right: 16px; color: #fff; font-size: 26px;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
}
.lightbox .lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 60px; color: rgba(255, 255, 255, .8); font-size: 30px;
  display: flex; align-items: center; justify-content: center;
}
.lightbox .lb-prev { left: 4px; } .lightbox .lb-next { right: 4px; }
.lightbox .lb-idx { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; color: #aaa; font-size: 12px; }

/* ============================================================
 * 下拉刷新
 * ============================================================ */
.ptr {
  height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center;
  color: var(--t2); font-size: 12px; transition: height .2s;
}
.ptr.on { height: 44px; }

/* ============================================================
 * 定位栏
 * ============================================================ */
.locate {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px 8px;
}
.locate .ico { color: var(--brand); font-size: 15px; }
.locate .txt { font-size: 13px; font-weight: 600; }
.locate .locating { color: var(--t2); font-weight: 400; font-size: 12px; }

/* ============================================================
 * 详情页
 * ============================================================ */
.swiper { position: relative; width: 100%; aspect-ratio: 3/4; background: #E9EBEF; }
.swiper .track { display: flex; height: 100%; transition: transform .3s; }
.swiper .track > div { flex: none; width: 100%; height: 100%; }
.swiper .track img { width: 100%; height: 100%; object-fit: cover; }
.swiper .dots {
  position: absolute; bottom: 12px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 5px;
}
.swiper .dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .55); }
.swiper .dots i.on { width: 16px; background: #fff; }

.photo-head { display: flex; gap: 12px; align-items: flex-start; padding: 14px; }
.photo-head .avatar { width: 52px; height: 52px; font-size: 20px; }
.photo-head .nm { font-size: 18px; font-weight: 700; }
.photo-head .mt { font-size: 12px; color: var(--t2); margin-top: 4px; }

.kv-row { display: flex; gap: 10px; padding: 0 14px 14px; }
.kv {
  flex: 1; background: #F7F8FA; border-radius: 10px; padding: 10px 8px; text-align: center;
}
.kv .n { font-size: 17px; font-weight: 700; }
.kv .l { font-size: 11px; color: var(--t2); margin-top: 2px; }

/* 作品三列宫格 */
.works-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.works-grid .w { position: relative; aspect-ratio: 1/1; background: #E9EBEF; overflow: hidden; }
.works-grid .w img { width: 100%; height: 100%; object-fit: cover; }
.works-grid .w .ph-cover { aspect-ratio: 1/1; height: 100%; border-radius: 0; }
.works-grid .w .tagx {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 4px 3px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .55));
  color: #fff; font-size: 10px; z-index: 2; pointer-events: none;
}

/* 评价 */
.review { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.review:last-child { border-bottom: 0; }
.review .avatar { width: 34px; height: 34px; font-size: 13px; }
.stars { color: #FFB400; font-size: 12px; letter-spacing: 1px; }

/* ============================================================
 * 订单卡片
 * ============================================================ */
.ocard { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; }
.ocard .hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; border-bottom: 1px solid var(--line);
}
.ocard .bd { display: flex; gap: 12px; padding: 12px 14px; }
.ocard .bd .cover { width: 72px; flex: none; }
.ocard .bd .cover .ph-cover { aspect-ratio: 1/1; }
.ocard .ft { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 0 14px 12px; }

/* 订单状态 tab */
.seg { display: flex; gap: 4px; overflow-x: auto; padding: 8px 12px; background: #fff; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg .s {
  flex: none; height: 28px; padding: 0 13px; border-radius: 999px;
  background: #F1F3F6; color: var(--t2); font-size: 12px;
  display: inline-flex; align-items: center;
}
.seg .s.on { background: var(--t1); color: #fff; font-weight: 600; }

/* ============================================================
 * 聊天
 * ============================================================ */
.chat-wrap { display: flex; flex-direction: column; height: 100%; }
.chat-body { flex: 1; overflow-y: auto; padding: 12px; }
.chat-order-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; background: #fff; border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.msg { display: flex; gap: 8px; margin-bottom: 14px; align-items: flex-start; }
.msg .avatar { width: 34px; height: 34px; font-size: 13px; }
.msg .bub {
  max-width: 72%; padding: 9px 12px; border-radius: 10px;
  background: #fff; font-size: 14px; line-height: 1.5; word-break: break-word;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.msg.me { flex-direction: row-reverse; }
.msg.me .bub { background: var(--brand); color: #fff; }
.msg .time { font-size: 10px; color: var(--t3); margin-top: 4px; }
.msg.me .time { text-align: right; }
.msg.sys { justify-content: center; }
.msg.sys .bub { background: var(--grey-soft); color: var(--t2); font-size: 11px; box-shadow: none; padding: 5px 10px; border-radius: 999px; }
.chat-input {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: #fff; border-top: 1px solid var(--line); padding-bottom: calc(8px + env(safe-area-inset-bottom));
}
.chat-input .input { flex: 1; height: 38px; padding: 0 12px; border-radius: 19px; }
.chat-input .send { width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--brand); color: #fff; font-size: 15px; display: flex; align-items: center; justify-content: center; }

/* ============================================================
 * 登录
 * ============================================================ */
.login-hero { text-align: center; padding: 46px 24px 26px; }
.login-hero .logo {
  width: 66px; height: 66px; margin: 0 auto 14px; border-radius: 20px;
  background: linear-gradient(135deg, var(--brand), #FF9A6B);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: #fff; box-shadow: 0 10px 24px rgba(255, 107, 53, .3);
}
.login-hero h1 { font-size: 22px; margin: 0 0 6px; }
.login-hero p { margin: 0; font-size: 12px; color: var(--t2); }
.role-tabs { display: flex; gap: 8px; padding: 0 24px 18px; }
.role-tabs .r {
  flex: 1; height: 36px; border-radius: 10px; background: #F1F3F6;
  color: var(--t2); font-size: 13px; display: flex; align-items: center; justify-content: center;
}
.role-tabs .r.on { background: var(--t1); color: #fff; font-weight: 600; }

/* 身份切换浮标 */
.identity {
  position: absolute; top: 8px; right: 10px; z-index: 80;
}
.identity select {
  height: 28px; border-radius: 999px; padding: 0 8px; font-size: 11px;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .94); color: var(--t2);
}

/* ============================================================
 * 后台（admin）布局 —— 全宽
 * ============================================================ */
body.admin-page { background: var(--bg); }
/* 没有手机壳时（后台页），遮罩类组件改用 fixed 定位 */
body.no-phone .mask,
body.no-phone .sheet-mask,
body.no-phone .lightbox,
body.no-phone .mask-loading,
body.no-phone .toast-wrap { position: fixed; }
.admin-top {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 20px; background: #fff; border-bottom: 1px solid var(--line);
}
.admin-top .brand { font-size: 17px; font-weight: 700; }
.admin-top .brand em { color: var(--brand); font-style: normal; }
.admin-main { max-width: 1180px; margin: 0 auto; padding: 18px 20px 60px; }

.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 16px;
}
.stat .l { font-size: 12px; color: var(--t2); }
.stat .n { font-size: 26px; font-weight: 700; margin-top: 4px; letter-spacing: -.5px; }
.stat.hot .n { color: var(--brand); }
.stat.warn .n { color: var(--blue); }
.stat.good .n { color: var(--green); }

.admin-toolbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px;
}
.admin-toolbar .input, .admin-toolbar .select { width: auto; min-width: 150px; height: 36px; padding: 0 12px; }

.table-card { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  text-align: left; font-weight: 600; color: var(--t2); font-size: 12px;
  padding: 12px 14px; background: #FAFBFC; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: #FCFCFD; }
.reject-line {
  margin-top: 6px; padding: 5px 8px; border-radius: 6px;
  background: var(--red-soft); color: var(--red); font-size: 11px; line-height: 1.5;
}
.ops { display: flex; gap: 6px; flex-wrap: wrap; }

.drawer-mask { position: fixed; inset: 0; z-index: 500; background: rgba(0, 0, 0, .4); animation: fadeIn .18s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 501;
  width: 520px; max-width: 94vw; background: var(--bg);
  display: flex; flex-direction: column;
  box-shadow: -10px 0 40px rgba(0, 0, 0, .16);
  animation: slideIn .24s cubic-bezier(.2, .9, .3, 1);
}
@keyframes slideIn { from { transform: translateX(100%); } }
.drawer .dh {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 18px; background: #fff; border-bottom: 1px solid var(--line); flex: none;
}
.drawer .dh .t { font-size: 16px; font-weight: 600; }
.drawer .db { flex: 1; overflow-y: auto; padding: 16px 18px 30px; }
.drawer .df { flex: none; padding: 12px 18px; background: #fff; border-top: 1px solid var(--line); display: flex; gap: 10px; }

.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ''; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 2px; background: var(--line-strong); }
.timeline .ti { position: relative; padding-bottom: 16px; }
.timeline .ti::before {
  content: ''; position: absolute; left: -18px; top: 5px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--brand); border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line-strong);
}
.timeline .ti .when { font-size: 11px; color: var(--t3); }

.admin-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.admin-tabs .a {
  height: 34px; padding: 0 16px; border-radius: 999px; background: #fff;
  color: var(--t2); font-size: 13px; display: inline-flex; align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}
.admin-tabs .a.on { background: var(--t1); color: #fff; font-weight: 600; }

/* 摄影师工作台顶栏 */
.studio-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 70;
  padding: 14px 16px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.status-strip { padding: 14px; border-radius: var(--r); margin: 12px; }
.status-strip.draft { background: linear-gradient(120deg, #F3F4F6, #EDEFF2); }
.status-strip.pending { background: linear-gradient(120deg, #FFF3EC, #FFE6DA); }
.status-strip.approved { background: linear-gradient(120deg, #EAF8EF, #DDF3E5); }
.status-strip.rejected { background: linear-gradient(120deg, #FDECEC, #FBE0E0); }
.status-strip .st-t { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.status-strip .st-d { font-size: 12px; line-height: 1.6; }
.status-strip.rejected .st-t { color: var(--red); font-size: 17px; }
.status-strip.rejected .st-d { color: #A82525; font-size: 13px; font-weight: 500; }

.upload-box {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 92px; border: 1.5px dashed var(--line-strong); border-radius: 10px;
  background: #FAFBFC; color: var(--t2); font-size: 12px; text-align: center;
}
.upload-box:active { border-color: var(--brand); color: var(--brand); }
.upload-box.has-img { border-style: solid; padding: 0; overflow: hidden; position: relative; }
.upload-box.has-img img { width: 100%; height: 100%; object-fit: cover; }

.work-item {
  display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line);
}
.work-item:last-child { border-bottom: 0; }
.work-item .th { width: 62px; height: 62px; flex: none; border-radius: 8px; overflow: hidden; background: #E9EBEF; }
.work-item .th img { width: 100%; height: 100%; object-fit: cover; }
.work-item .th .ph-cover { aspect-ratio: 1/1; height: 100%; border-radius: 0; }

/* 支付成功 */
.pay-ok { padding: 40px 24px 20px; text-align: center; }
.pay-ok .ic {
  width: 74px; height: 74px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--green-soft); color: var(--green); font-size: 38px;
  display: flex; align-items: center; justify-content: center;
  animation: popIn .35s cubic-bezier(.2, 1.4, .4, 1);
}
.pay-ok h2 { font-size: 21px; margin: 0 0 8px; }
.pay-ok p { font-size: 13px; color: var(--t2); margin: 0; }

/* 金额明细行 */
.amt-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; font-size: 13px; }
.amt-row.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; font-size: 15px; font-weight: 700; }
.amt-row.total .v { color: var(--brand); font-size: 20px; }

/* 时长选择 */
.dur-row { display: flex; gap: 8px; }
.dur-row .d {
  flex: 1; height: 38px; border-radius: 9px; background: #F1F3F6; color: var(--t2);
  font-size: 13px; display: flex; align-items: center; justify-content: center;
}
.dur-row .d.on { background: var(--brand); color: #fff; font-weight: 600; }

/* radio 时段 */
.slot-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.slot-row label {
  display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px;
  border-radius: 9px; background: #F1F3F6; font-size: 13px; cursor: pointer;
}
.slot-row label.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; box-shadow: inset 0 0 0 1px var(--brand); }
.slot-row input { display: none; }

/* 时间线消息时间等宽 */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

/* 滚动条（桌面） */
@media (min-width: 700px) {
  .phone-scroll::-webkit-scrollbar { width: 0; }
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #D8DCE2; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
