/* ===== 全站文字规范（唯一出处）：灰阶 6 档 + 线 + 主色两档 + 危险 + 地点金 ===== */
  :root {
    --t1: #1f2329;        /* 主文字：标题、正文主体 */
    --t2: #4e5969;        /* 次深：数字、需压过说明的句子 */
    --t3: #646a73;        /* 次要文字：说明、副标题（最常用） */
    --t4: #8a9299;        /* 辅助：时间、计数、占位说明 */
    --t5: #a9b0b6;        /* 弱化：提示、禁用 */
    --t6: #c3cad0;        /* 占位线、箭头、小点 */
    --line: #eef1f3;      /* 分割线 */
    --brand: #14b8c4;     /* 主色（图标、强调块） */
    --brand-deep: #0b6b74;/* 主色深（可点文字、链接） */
    --danger: #d0453a;    /* 危险、错误、删除 */
    --gold: #a06a12;      /* 同城地点标签 */
  }
/* 页面样式：base.css（拆分自原 style.css） */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
  html, body { height: 100%; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: #eef1f3; color:  var(--t1, #1f2329);
    display: flex; align-items: center; justify-content: center;
  }
  .phone {
    width: 100%; height: 100%;
    background: #fff; display: flex; flex-direction: column;
    position: relative; overflow: hidden;
  }
  @media (min-width: 480px) {
    body { padding: 24px; }
    .phone {
      max-width: 390px; height: 844px; max-height: 92vh;
      border-radius: 36px; border: 10px solid #1f2329;
      box-shadow: 0 24px 60px rgba(15, 40, 45, .18);
    }
  }


  .tag {
    font-size: var(--fs12, 12px); font-weight: 500; color:  var(--t3, #646a73); background: #f2f5f7;
    border-radius: 999px; padding: 3px 10px; flex-shrink: 0;
  }
  /* 分类（受控词表）：白底 + 1px 浅灰描边 + 深灰字。
     青色只留给「可点 / 当前选中」，分类是元数据，不参与抢色 */
  .tag.on {
    color:  var(--t2, #4e5969); background: #fff; font-weight: 500;
    box-shadow: inset 0 0 0 1px #dfe4e8;
  }
  .tag-row { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }

  .d-nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 10px; border-bottom: 1px solid #eef1f3; flex-shrink: 0;
  }
  .d-back {
    width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent;
    color:  var(--t1, #1f2329); display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-family: inherit;
  }
  .d-back:active { background: #f2f4f5; }
  .d-label { font-size: var(--fs15, 15px); font-weight: 600; color:  var(--t1, #1f2329); position: absolute; left: 50%; transform: translateX(-50%); }
  .d-nav { position: relative; }
  .d-body { flex: 1; overflow-y: auto; padding: 14px 14px 20px; -webkit-overflow-scrolling: touch; min-height: 0; }

  /* ===== 媒体：一律 contain，不裁不拉伸 =====
     横屏（r ≥ 1.45）：满宽优先，撞到高度上限 195 就停，多余宽度留白居中
     竖 / 方（r < 1.45）：卡片右侧固定高，宽度 = 高 × r */
  .media.land {
    position: relative; max-width: min(100%, calc(195px * var(--r)));
    aspect-ratio: var(--r); margin: 0 auto 8px;
    border-radius: 8px; overflow: hidden; background: #f2f4f5;
  }
  .media.land img, .media.land video {
    width: 100%; height: 100%; object-fit: contain; display: block; background: #f2f4f5;
  }
  /* 播放按钮：箭头纯白，圆底收小、半透明，只作提示不压画面 */
  .media.land .play, .slot .play {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    border-radius: 50%; background: rgba(0, 0, 0, .42);
    border: 1px solid rgba(255, 255, 255, .5);
    box-shadow: 0 1px 5px rgba(0, 0, 0, .22);
    display: flex; align-items: center; justify-content: center; color: #fff;
  }
  .media.land .play svg, .slot .play svg, .media.row .cell .play svg { fill: #fff; color: #fff; }
  .media.land .play { width: 26px; height: 26px; }
  .slot .play { width: 20px; height: 20px; }
  .media.land .play svg { width: 11px; height: 11px; }
  .slot .play svg { width: 9px; height: 9px; }
  .media.land .dur, .slot .dur {
    position: absolute; right: 6px; bottom: 6px; font-size: var(--fs10, 10px); color: #fff;
    background: rgba(0, 0, 0, .62); border-radius: 4px; padding: 1px 5px; line-height: 1.4;
  }
  .slot .dur { right: 5px; bottom: 5px; font-size: var(--fs10, 10px); }
  /* 多图角标 */
  .badge {
    position: absolute; right: 5px; bottom: 5px; font-size: var(--fs10, 10px); font-weight: 600;
    color: #fff; background: rgba(0, 0, 0, .6); border-radius: 4px; padding: 2px 5px;
  }
  /* 多图：两张 / 三张（最多三张）标题下横排 */
  .media.row { display: flex; gap: 6px; justify-content: center; align-items: center; margin: 2px 0 8px; }
  .media.row .cell {
    position: relative; flex: 0 0 auto; border-radius: 8px; overflow: hidden; background: #f2f4f5;
  }
  .media.row .cell img, .media.row .cell video {
    width: 100%; height: 100%; object-fit: contain; display: block; background: #f2f4f5;
  }
  .media.row .cell .play {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 18px; height: 18px; border-radius: 50%; background: rgba(0, 0, 0, .42);
    border: 1px solid rgba(255, 255, 255, .5);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
    display: flex; align-items: center; justify-content: center; color: #fff;
  }
  .media.row .cell .play svg { width: 9px; height: 9px; }
  .media.row .cell .dur {
    position: absolute; right: 5px; bottom: 5px; font-size: var(--fs10, 10px); color: #fff;
    background: rgba(0, 0, 0, .62); border-radius: 4px; padding: 1px 4px; line-height: 1.4;
  }
  /* 右置版式：左文右图 */
  .cbody { display: flex; gap: 12px; align-items: flex-start; }
  .cleft { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
  .slot {
    position: relative; flex-shrink: 0;
    width: calc(var(--h) * var(--r)); height: var(--h);
    border-radius: 8px; overflow: hidden; background: #f2f4f5;
  }
  .slot img, .slot video {
    width: 100%; height: 100%; object-fit: contain; display: block; background: #f2f4f5;
  }
  .meta { display: flex; align-items: center; gap: 10px; font-size: var(--fs12, 12px); color:  var(--t4, #8a9299); }
  .meta .author { flex-shrink: 0; color:  var(--t3, #646a73); }
  .meta .dot { width: 3px; height: 3px; border-radius: 50%; background: #c9cfd4; flex-shrink: 0; }
  .meta .cmt { flex-shrink: 0; }
  .meta .share { flex-shrink: 0; color:  var(--t3, #646a73); cursor: pointer; padding: 4px 0; }

  /* ===== Toast ===== */
  .toast {
    position: absolute; left: 50%; bottom: 100px; transform: translateX(-50%) translateY(8px);
    background: rgba(31, 35, 41, .88); color: #fff; font-size: var(--fs13, 13px);
    padding: 8px 16px; border-radius: 18px; z-index: 300; white-space: nowrap;
    opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  }
  .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
  .empty {
    position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
    font-size: var(--fs13, 13px); color:  var(--t4, #8a9299); flex-direction: column; gap: 8px;
  }
  .empty.show { display: flex; }

  /* 页头左侧占位：让中间标题真正居中（以前写在各页 style 里） */
  .hdr-spacer { width: 44px; }


  /* ===== 全站组件：发布类型选择（首页「+」与发布页「更换」共用同一份样式） =====
     用 .on 控制显隐，不用 hidden：类里带 transition/transform，hidden 容易与 display 规则打架 */
  .pick-mask {
    position: absolute; inset: 0; background: rgba(0, 0, 0, .45);
    opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 260;
  }
  .pick-mask.on { opacity: 1; pointer-events: auto; }
  .pick-box {
    position: absolute; left: 50%; top: 50%; width: 300px; max-width: calc(100% - 48px);
    transform: translate(-50%, -48%) scale(.96); opacity: 0; pointer-events: none;
    background: #fff; border-radius: 16px; padding: 22px 16px 8px;
    box-shadow: 0 16px 44px rgba(0, 0, 0, .2); z-index: 261;
    transition: opacity .2s ease, transform .2s ease;
  }
  .pick-box.on { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
  .pick-close {
    position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; border: 0;
    background: transparent; color:  var(--t5, #a9b0b6); display: flex; align-items: center; justify-content: center;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .pick-title { margin: 0 0 6px; text-align: center; font-size: var(--fs16, 16px); font-weight: 600; color:  var(--t1, #1f2329); }
  .pick-sub { margin: 0 0 16px; text-align: center; font-size: var(--fs12, 12px); color:  var(--t4, #8a9299); }
  .pick-opt {
    display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
    background: #f5f6f8; border: 0; border-radius: 12px; padding: 12px; margin-bottom: 10px;
    font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .pick-opt:active { background: #eceff2; }
  .pick-ico {
    flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px;
    background: #14b8c4; color: #fff; display: flex; align-items: center; justify-content: center;
  }
  .pick-ico.chat { background: #eaf7f9; color:  var(--brand-deep, #0b6b74); }
  .pick-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .pick-name { font-size: var(--fs14, 14px); font-weight: 600; color:  var(--t1, #1f2329); }
  .pick-desc { font-size: var(--fs12, 12px); line-height: 16px; color:  var(--t4, #8a9299); }
  .pick-cancel {
    width: 100%; height: 42px; border: 0; background: transparent;
    font-family: inherit; font-size: var(--fs13, 13px); color:  var(--t4, #8a9299); cursor: pointer;
  }

  /* 统一的「默认隐藏」语义，页面里不再写 style="display:none" */
  /* 必须 !important：各页会有 .xxx{display:flex} 之类规则，与 [hidden] 同权重但后加载会赢 */
  [hidden] { display: none !important; }
