/* ============================================================
   cy.rzyou.com/new · 新版论坛前端（组件样式）
   页面骨架 / 断点 / 对齐统一在 layout.css
   ============================================================ */

:root{
  --bg:#f5f5f7;
  --card:#fff;
  --text:#1a1a1a;
  --text-2:#6b6b73;
  --text-3:#9a9aa3;
  --line:#ededf0;
  --brand:#ff2442;
  --brand-soft:#fff1f3;
  --blue:#3b7cff;
  --radius:14px;
  --shadow:0 1px 2px rgba(16,24,40,.04), 0 4px 12px rgba(16,24,40,.04);
  --safe-b:env(safe-area-inset-bottom,0px);
  --tabh:54px;
}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
body{
  background:var(--bg);color:var(--text);
  font:15px/1.6 -apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  overscroll-behavior-y:none;
}
a{color:inherit;text-decoration:none}
img{display:block;max-width:100%}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}
input,textarea{font:inherit;color:inherit}
::selection{background:var(--brand-soft)}

/* 外框：宽度与对齐见 layout.css */
.app{min-height:100vh;background:var(--bg);position:relative}
.app-main{min-width:0}

/* ---------------- 顶栏 ---------------- */
.topbar{
  position:sticky;top:0;z-index:30;
  background:rgba(245,245,247,.86);
  backdrop-filter:saturate(180%) blur(16px);
  -webkit-backdrop-filter:saturate(180%) blur(16px);
  padding:10px 14px 0;
}
.tb-row{display:flex;align-items:center;gap:10px;height:40px}
.tb-logo{
  font-size:17px;font-weight:800;letter-spacing:-.3px;white-space:nowrap;
  display:flex;align-items:center;gap:6px;
}
.tb-logo i{
  width:22px;height:22px;border-radius:7px;display:grid;place-items:center;
  background:linear-gradient(135deg,#ff5c72,#ff2442);color:#fff;
  font-size:12px;font-style:normal;font-weight:800;
}
.tb-search{
  flex:1;display:flex;align-items:center;gap:7px;height:34px;
  background:#fff;border-radius:17px;padding:0 12px;
  box-shadow:inset 0 0 0 1px var(--line);
  color:var(--text-3);font-size:13.5px;
}
.tb-search svg{width:15px;height:15px;flex:none;opacity:.5}
.tb-icon{
  width:34px;height:34px;border-radius:50%;display:grid;place-items:center;
  color:var(--text-2);position:relative;
}
.tb-icon svg{width:20px;height:20px}
.tb-dot{position:absolute;top:6px;right:7px;width:7px;height:7px;border-radius:50%;
  background:var(--brand);box-shadow:0 0 0 2px var(--bg)}

/* 分类 tabs */
.tabs{
  display:flex;gap:18px;overflow-x:auto;scrollbar-width:none;
  padding:8px 2px 10px;margin:0 -2px;
}
.tabs::-webkit-scrollbar{display:none}
.tabs a{
  position:relative;font-size:14.5px;color:var(--text-2);white-space:nowrap;
  padding:2px 0;transition:color .16s;
}
.tabs a.on{color:var(--text);font-weight:700}
.tabs a.on::after{
  content:"";position:absolute;left:50%;bottom:-4px;transform:translateX(-50%);
  width:18px;height:3px;border-radius:2px;background:var(--brand);
}

/* 加载 / 空态 */
.loading{padding:50px 0;text-align:center;color:var(--text-3);font-size:13px}
.spinner{
  width:22px;height:22px;margin:0 auto 10px;border-radius:50%;
  border:2.5px solid #e3e5ea;border-top-color:var(--brand);
  animation:spin .7s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* ---------------- 底部导航 ---------------- */
.tabbar{
  position:fixed;left:0;right:0;bottom:0;z-index:40;
  height:calc(var(--tabh) + var(--safe-b));
  padding-bottom:var(--safe-b);
  background:rgba(255,255,255,.94);
  backdrop-filter:saturate(180%) blur(16px);
  -webkit-backdrop-filter:saturate(180%) blur(16px);
  border-top:1px solid var(--line);
  display:flex;align-items:center;
}
.tabbar a{
  flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:2px;height:100%;color:var(--text-3);font-size:10.5px;
}
.tabbar a svg{width:22px;height:22px}
.tabbar a.on{color:var(--text);font-weight:700}
.tabbar .compose{
  flex:none;width:52px;
}
.tabbar .compose span{
  width:42px;height:32px;border-radius:10px;display:grid;place-items:center;
  background:linear-gradient(135deg,#ff5c72,#ff2442);color:#fff;
  box-shadow:0 4px 12px rgba(255,36,66,.34);
}
.tabbar .compose svg{width:19px;height:19px}

/* ---------------- 详情页 ---------------- */
.page{min-height:100vh}
.navbar{
  position:sticky;top:0;z-index:30;height:48px;display:flex;align-items:center;
  padding:0 6px;gap:4px;
  background:rgba(245,245,247,.9);backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}
.navbar .back{
  width:38px;height:38px;border-radius:50%;display:grid;place-items:center;
}
.navbar .back svg{width:21px;height:21px}
.navbar .ttl{flex:1;font-size:15px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:8px}
.navbar .act{display:flex;gap:2px}

.article{background:#fff;padding:16px 16px 4px}
.article h1{margin:0 0 10px;font-size:19px;line-height:1.42;font-weight:700;letter-spacing:-.2px}
.byline{display:flex;align-items:center;gap:8px;padding-bottom:14px}
.byline .av{width:36px;height:36px;border-radius:50%;object-fit:cover;background:linear-gradient(135deg,#dfe3ea,#c6ccd6)}
.byline .who{flex:1;min-width:0}
.byline .who b{display:block;font-size:14px;font-weight:600}
.byline .who span{font-size:11.5px;color:var(--text-3)}
.badge-mod{
  display:inline-flex;align-items:center;gap:3px;margin-left:5px;
  padding:1px 6px;border-radius:5px;font-size:10px;font-weight:700;
  background:var(--brand-soft);color:var(--brand);vertical-align:1px;
}
.article .body{
  font-size:15.5px;line-height:1.78;color:var(--text);word-break:break-word;
  padding-bottom:14px;white-space:pre-wrap;
}
.article .body img{border-radius:10px;margin:10px 0}
.article .stat{
  display:flex;gap:18px;padding:12px 0;border-top:1px solid var(--line);
  font-size:12.5px;color:var(--text-3);
}

/* 回复 */
.secttl{
  margin:16px 0 8px;padding:0 16px;
  font-size:13px;font-weight:700;color:var(--text-2);
}
.replies{background:#fff;padding:2px 0}
.reply{display:flex;gap:10px;padding:13px 16px;border-bottom:1px solid #f6f6f8}
.reply:last-child{border-bottom:0}
.reply .av{width:32px;height:32px;border-radius:50%;object-fit:cover;flex:none;background:linear-gradient(135deg,#dfe3ea,#c6ccd6)}
.reply .rc{flex:1;min-width:0}
.reply .rh{display:flex;align-items:center;gap:6px;margin-bottom:3px}
.reply .rh b{font-size:13px;font-weight:600}
.reply .rh span{font-size:11px;color:var(--text-3)}
.reply .rt{font-size:14px;line-height:1.66;color:var(--text);white-space:pre-wrap;word-break:break-word}

/* 底部输入条 */
.composer{
  position:fixed;left:0;right:0;bottom:0;z-index:40;
  padding:8px 12px calc(8px + var(--safe-b));
  background:var(--composer-bg,rgba(255,255,255,.96));
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);border-top:1px solid var(--line);
  display:flex;align-items:center;gap:8px;
}
.composer .fake{
  flex:1;height:36px;border-radius:18px;
  background:var(--composer-input,#f3f3f5);
  border:1px solid var(--composer-input-line,transparent);
  display:flex;align-items:center;padding:0 14px;color:var(--text-3);font-size:13.5px;
}
.composer .ic{width:34px;height:34px;display:grid;place-items:center;color:var(--text-2)}
.composer .ic svg{width:21px;height:21px}

/* ---------------- 用户主页 ---------------- */
.profile-hero{
  position:relative;height:132px;
  background:linear-gradient(135deg,#ff9aa8,#ff2442 60%,#c9184a);
  overflow:hidden;
}
.profile-hero::after{
  content:"";position:absolute;inset:0;
  background:radial-gradient(circle at 78% 18%, rgba(255,255,255,.42), transparent 46%),
             radial-gradient(circle at 12% 88%, rgba(255,255,255,.22), transparent 52%);
}
.profile-card{
  margin:-46px 12px 0;position:relative;z-index:2;
  background:#fff;border-radius:18px;padding:14px 15px 15px;
  box-shadow:var(--shadow);
}
.pc-top{display:flex;align-items:flex-start;gap:12px}
.pc-av{
  width:66px;height:66px;border-radius:50%;object-fit:cover;flex:none;
  border:3px solid #fff;box-shadow:0 2px 10px rgba(16,24,40,.12);
  background:linear-gradient(135deg,#dfe3ea,#c6ccd6);
  margin-top:-32px;
}
.pc-main{flex:1;min-width:0;padding-top:2px}
.pc-name{font-size:17px;font-weight:750;letter-spacing:-.2px;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.pc-sub{margin-top:3px;font-size:12px;color:var(--text-3)}
.pc-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.chip{
  padding:3px 9px;border-radius:8px;font-size:11.5px;
  background:#f4f5f7;color:var(--text-2);
}
.chip.gender-m{background:#eaf2ff;color:#2b6bdc}
.chip.gender-f{background:#ffeef3;color:#d6336c}
.chip.const{background:#f3eeff;color:#7048c4}
.pc-bio{
  margin-top:11px;font-size:13.5px;line-height:1.65;color:var(--text-2);
  white-space:pre-wrap;word-break:break-word;
}
.pc-nums{
  display:flex;gap:22px;margin-top:12px;padding-top:12px;
  border-top:1px solid var(--line);
}
.pc-nums div{line-height:1.3}
.pc-nums b{display:block;font-size:16px;font-weight:750}
.pc-nums span{font-size:11px;color:var(--text-3)}

/* 语音介绍 */
.voice{
  margin-top:12px;display:flex;align-items:center;gap:10px;
  padding:9px 12px;border-radius:12px;background:linear-gradient(120deg,#f6f2ff,#eef5ff);
}
.voice .play{
  width:32px;height:32px;border-radius:50%;flex:none;display:grid;place-items:center;
  background:linear-gradient(135deg,#8f7bff,#5b8cff);color:#fff;
}
.voice .play svg{width:15px;height:15px}
.voice .wave{flex:1;display:flex;align-items:center;gap:2px;height:22px}
.voice .wave i{width:2.5px;border-radius:2px;background:#b9c4dd}

/* 我的 */
.mine-list{background:#fff;margin-top:10px}
.mine-item{
  display:flex;align-items:center;gap:11px;padding:14px 16px;
  border-bottom:1px solid #f6f6f8;font-size:14.5px;
}
.mine-item:last-child{border-bottom:0}
.mine-item .mi{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;
  background:#f4f5f7;color:var(--text-2)}
.mine-item .mi svg{width:17px;height:17px}
.mine-item .arr{margin-left:auto;color:#c8c8d0;font-size:17px}

/* 发帖页 */
.form{background:#fff;padding:6px 16px 16px}
.form input.t{
  width:100%;border:0;outline:0;font-size:17px;font-weight:650;
  padding:14px 0 10px;
}
.form textarea.b{
  width:100%;min-height:190px;border:0;outline:0;resize:none;
  font-size:15px;line-height:1.75;
}
.form .hint{font-size:12px;color:var(--text-3);padding:6px 0}
.picker{display:flex;gap:8px;padding:10px 0 4px;flex-wrap:wrap}
.picker button{
  padding:6px 13px;border-radius:9px;font-size:13px;
  background:#f4f5f7;color:var(--text-2);
}
.picker button.on{background:var(--brand-soft);color:var(--brand);font-weight:650}
.submit{
  margin:18px 16px;height:46px;width:calc(100% - 32px);border-radius:12px;
  background:linear-gradient(135deg,#ff5c72,#ff2442);color:#fff;
  font-size:15.5px;font-weight:700;
  box-shadow:0 6px 18px rgba(255,36,66,.28);
}
.submit:disabled{opacity:.5;box-shadow:none}

/* 板块页 */
.forum-card{
  margin:10px 12px;background:#fff;border-radius:var(--radius);
  padding:14px 15px;box-shadow:var(--shadow);
  display:flex;align-items:center;gap:12px;
}
.forum-ic{
  width:44px;height:44px;border-radius:12px;flex:none;display:grid;place-items:center;
  font-size:20px;
}
.forum-card .fn{font-size:15px;font-weight:650}
.forum-card .fs{font-size:11.5px;color:var(--text-3);margin-top:2px}
.forum-card .fa{margin-left:auto;color:#c8c8d0}

/* toast */
.toast{
  position:fixed;left:50%;bottom:calc(88px + var(--safe-b));transform:translateX(-50%) translateY(8px);
  z-index:90;padding:9px 16px;border-radius:10px;
  background:rgba(24,24,28,.9);color:#fff;font-size:13px;
  opacity:0;pointer-events:none;transition:all .22s;
  backdrop-filter:blur(8px);
}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* 骨架屏 */
.sk{background:#eceef2;border-radius:8px;animation:sk 1.2s ease-in-out infinite}
@keyframes sk{0%,100%{opacity:1}50%{opacity:.55}}

@media(prefers-reduced-motion:reduce){
  *{animation-duration:.001ms !important;transition-duration:.001ms !important}
}

/* 天气卡容器（导航下方，宽度随内容区，不限制卡片本身样式） */
.wx-frame{width:100%}
.wx-frame .wx-host{width:100%}
@media(min-width:1024px){
  .wx-frame{padding:2px 26px 8px}
}

/* 记录页 iframe（独立部署的 /new/record/） */
.notes-frame{
  width:100%;border:0;display:block;background:transparent;
  min-height:calc(100vh - 66px);
}

/* 日历页容器（与天气卡同宽对齐） */
.cal-stage{
  display:block;
}
.cal-stage[hidden]{display:none !important}
@media(min-width:1024px){
  .cal-stage{padding:8px 26px 40px}
}
/* 日历外面包一层卡，和帖子卡 / 天气卡统一成同一个「中间卡片层」 */
.cal-card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:14px 16px 18px;
}
@media(min-width:1024px){
  .cal-card{border-radius:16px;padding:18px 22px 24px}
}

/* ============================================================
   PC 端（>=1024px）：顶部导航 + 多列瀑布流
   移动端（<1024px）完全保持原样
   ============================================================ */

/* 板块卡片：两端共用（PC 只改间距和 hover） */
.forum-grid{display:grid;gap:12px;padding:10px 14px 24px;grid-template-columns:1fr}
.forum-tile{
  background:#fff;border-radius:16px;padding:16px 18px;
  box-shadow:var(--shadow);cursor:pointer;
  display:flex;flex-direction:column;gap:12px;
  transition:transform .16s ease,box-shadow .16s ease;
}
.forum-tile:active{transform:scale(.99)}
.ft-top{display:flex;align-items:center;gap:12px}
.ft-ic{
  width:46px;height:46px;border-radius:13px;flex:none;
  display:grid;place-items:center;font-size:21px;
}
.ft-name{font-size:15.5px;font-weight:750;letter-spacing:-.2px}
.ft-meta{font-size:12px;color:var(--text-3);margin-top:3px;line-height:1.5}
.ft-latest{border-top:1px solid var(--line);padding-top:11px;display:flex;flex-direction:column;gap:7px}
.ft-item{display:flex;align-items:center;gap:7px;font-size:12.5px;color:var(--text-2);overflow:hidden}
.ft-item i{width:4px;height:4px;border-radius:50%;background:#d5d8df;flex:none}
.ft-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ft-item em{font-style:normal;color:var(--text-3);font-size:11.5px;margin-left:auto;white-space:nowrap;flex:none}
.ft-empty{font-size:13px;color:var(--text-3);padding:4px 0}

@media(min-width:1024px){
  /* ---------- 板块页：网格卡片 ---------- */
  .forum-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:16px;
  }
  .forum-tile{
    background:#fff;border-radius:16px;padding:20px 22px;
    box-shadow:var(--shadow);cursor:pointer;
    display:flex;flex-direction:column;gap:14px;
    transition:transform .16s ease,box-shadow .16s ease;
  }
  .forum-tile:hover{transform:translateY(-2px);box-shadow:0 10px 28px rgba(16,24,40,.10)}
  .ft-top{display:flex;align-items:center;gap:13px}
  .ft-ic{
    width:50px;height:50px;border-radius:14px;flex:none;
    display:grid;place-items:center;font-size:23px;
  }
  .ft-name{font-size:16.5px;font-weight:750;letter-spacing:-.2px}
  .ft-meta{font-size:12.5px;color:var(--text-3);margin-top:4px}
  .ft-latest{border-top:1px solid var(--line);padding-top:12px;display:flex;flex-direction:column;gap:8px}
  .ft-item{
    display:flex;align-items:center;gap:8px;
    font-size:13px;color:var(--text-2);
    overflow:hidden;
  }
  .ft-item i{
    width:4px;height:4px;border-radius:50%;background:#d5d8df;flex:none;
  }
  .ft-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .ft-item em{font-style:normal;color:var(--text-3);font-size:11.5px;margin-left:auto;white-space:nowrap;flex:none}
  .ft-empty{font-size:13px;color:var(--text-3);padding:4px 0}

  /* ---------- 详情页 ---------- */
  .navbar{
    height:58px;padding:0 26px;
    background:rgba(255,255,255,.92);border-bottom:1px solid var(--line);
  }
  .navbar .ttl{font-size:16px}
  .article{padding:28px 36px 6px}
  .article h1{font-size:26px;line-height:1.42}
  .article .body{font-size:16.5px;line-height:1.86}
  .byline{padding-bottom:18px}
  .byline .av{width:42px;height:42px}
  .secttl{padding:0;margin:24px auto 10px;max-width:760px}
  .replies{padding:6px 0 34px}
  .reply{padding:16px 36px}
  .composer{padding:10px 18px 12px}

  /* ---------- 用户页 ---------- */
  .profile-hero{height:200px}
  .profile-card{max-width:760px;margin:-58px auto 0;padding:22px 26px}

  /* ---------- 发帖 / 我的 ---------- */
  .form{max-width:760px;margin:0 auto;padding:12px 36px 20px}
  .submit{display:block;max-width:688px;margin:20px auto 44px}
  .mine-list{max-width:760px;margin:16px auto 40px;border-radius:14px;overflow:hidden;
    box-shadow:var(--shadow)}

  /* 各页统一的内容容器（居中） */
  .page-wrap{max-width:760px;margin:0 auto;width:100%}
}


/* ============================================================
   记录 · 站内浮窗
   ============================================================ */
.nt-win{
  position:fixed;z-index:260;display:flex;flex-direction:column;
  min-width:360px;min-height:300px;overflow:hidden;
  background:var(--card-solid, var(--card));
  border:1px solid var(--line);
  border-radius:14px;
  box-shadow:0 24px 70px rgba(0,0,0,.46), 0 0 0 1px rgba(255,255,255,.04) inset;
  backdrop-filter:blur(18px) saturate(150%);
  -webkit-backdrop-filter:blur(18px) saturate(150%);
}
.nt-win.nt-win-max{border-radius:10px}
.nt-win.nt-win-minimized .nt-win-body,
.nt-win.nt-win-minimized .nt-win-grip{display:none}
.nt-win.nt-win-minimized{height:auto !important;min-height:0}

.nt-win-bar{
  display:flex;align-items:center;gap:8px;flex:none;
  height:40px;padding:0 8px 0 12px;
  background:rgba(255,255,255,.04);
  border-bottom:1px solid var(--line);
  cursor:move;user-select:none;touch-action:none;
}
.nt-win-ico{font-size:14px;line-height:1}
.nt-win-title{font-size:13.5px;font-weight:700;letter-spacing:.2px}
.nt-win-hint{font-size:11px;color:var(--text-3);margin-left:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nt-win-min,.nt-win-close{
  width:26px;height:26px;border-radius:7px;flex:none;
  display:grid;place-items:center;font-size:13px;line-height:1;
  color:var(--text-2);cursor:pointer;
}
.nt-win-min{margin-left:auto}
.nt-win-min:hover{background:rgba(255,255,255,.08)}
.nt-win-close:hover{background:#e5484d;color:#fff}

.nt-win-body{flex:1;min-height:0;position:relative;background:#0B1424}
.nt-win-body iframe{width:100%;height:100%;border:0;display:block;background:transparent}

.nt-win-grip{
  position:absolute;right:0;bottom:0;width:18px;height:18px;
  cursor:nwse-resize;touch-action:none;z-index:2;
  background:linear-gradient(135deg,transparent 50%,rgba(255,255,255,.22) 50%);
  border-bottom-right-radius:13px;
}
.nt-win-grip::after{
  content:"";position:absolute;right:3px;bottom:3px;width:7px;height:7px;
  border-right:2px solid rgba(255,255,255,.4);
  border-bottom:2px solid rgba(255,255,255,.4);
}

/* 浅色模式下浮窗底色 */
:root[data-theme="light"] .nt-win-body{background:#f4f6fa}
:root[data-theme="light"] .nt-win-min:hover{background:rgba(0,0,0,.06)}

@media (max-width:620px){
  .nt-win-hint{display:none}
  .nt-win{min-width:0}
}


/* ============================================================
   发帖页 · 富文本编辑器
   ============================================================ */
.compose{
  max-width:1080px;margin:0 auto;width:100%;
  padding:18px 16px 40px;
}
/* 1140 - 两侧各 30 = 编辑框正好 1080 */
@media(min-width:1024px){
  .compose{max-width:1140px;padding:24px 30px 60px}
}

/* 版块选择 */
.cp-forum{
  display:flex;align-items:center;gap:12px;flex-wrap:wrap;
  margin-bottom:16px;
}
.cp-label{
  font-size:13px;color:var(--text-3);font-weight:600;flex:none;
}
.cp-fpick{display:flex;gap:8px;flex-wrap:wrap}
.cp-fpick button{
  display:inline-flex;align-items:center;gap:6px;
  height:36px;padding:0 14px;border-radius:10px;
  background:var(--card);border:1px solid var(--line);
  color:var(--text-2);font-size:13.5px;font-weight:600;cursor:pointer;
  transition:all .16s ease;
}
.cp-fpick button .emo{font-size:15px;line-height:1}
.cp-fpick button:hover{border-color:var(--brand);color:var(--text)}
.cp-fpick button.on{
  background:var(--brand-soft);border-color:var(--brand);
  color:var(--brand);font-weight:700;
}
:root[data-theme="star"] .cp-fpick button.on{
  background:rgba(255,36,66,.18);border-color:rgba(255,92,114,.55);
  box-shadow:0 0 0 1px rgba(255,92,114,.2);
}

/* 标题 */
.cp-titlebox{
  display:flex;align-items:center;gap:12px;
  padding:2px 4px 14px;
  border-bottom:1px solid var(--line);
  margin-bottom:14px;
}
.cp-title{
  flex:1;min-width:0;border:0;background:transparent;outline:none;
  font-size:23px;font-weight:750;letter-spacing:-.4px;
  color:var(--text);font-family:inherit;
  padding:6px 0;
}
@media(min-width:1024px){ .cp-title{font-size:26px} }
.cp-title::placeholder{color:var(--text-3);font-weight:600;opacity:.75}
.cp-tcount{
  flex:none;font-size:11.5px;color:var(--text-3);
  font-variant-numeric:tabular-nums;
}

/* 编辑器卡片 */
.cp-editor-wrap{
  position:relative;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
  box-shadow:var(--shadow);
}
:root[data-theme="star"] .cp-editor-wrap{
  background:rgba(7,18,40,.88);
  border-color:rgba(126,170,250,.16);
  backdrop-filter:blur(14px) saturate(140%);
  -webkit-backdrop-filter:blur(14px) saturate(140%);
  box-shadow:0 8px 30px rgba(0,6,26,.42);
}
.cp-editor-wrap:focus-within{
  border-color:rgba(255,92,114,.5);
  box-shadow:0 0 0 3px rgba(255,36,66,.10);
}

/* 工具栏 */
.cp-toolbar{
  display:flex;align-items:center;gap:2px;flex-wrap:wrap;
  padding:8px 10px;
  border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.02);
}
:root[data-theme="star"] .cp-toolbar{
  background:rgba(255,255,255,.035);
  border-bottom-color:rgba(126,170,250,.12);
}
.cp-toolbar button{
  width:32px;height:32px;border-radius:7px;
  display:grid;place-items:center;
  color:var(--text-2);background:transparent;border:0;cursor:pointer;
  font-size:14px;transition:background .14s,color .14s;
}
.cp-toolbar button:hover{background:rgba(255,255,255,.09);color:var(--text)}
.cp-toolbar button:active{background:rgba(255,92,114,.22);color:var(--brand)}
.cp-toolbar button svg{width:17px;height:17px}
.cp-toolbar b,.cp-toolbar i,.cp-toolbar u,.cp-toolbar s{font-size:14px;line-height:1}
.cp-div{
  width:1px;height:18px;margin:0 5px;flex:none;
  background:var(--line);
}

/* 编辑区 */
.cp-body{
  min-height:300px;
  padding:16px 18px 20px;
  font-size:15.5px;line-height:1.8;
  color:var(--text);
  outline:none;
  word-break:break-word;
}
/* PC：编辑区 1080×720 的书写区 */
@media(min-width:1024px){
  .cp-body{
    min-height:720px;
    font-size:16px;line-height:1.85;
    padding:24px 26px 28px;
  }
}
.cp-body:empty::before{
  content:attr(data-ph);
  color:var(--text-3);opacity:.7;pointer-events:none;
}
.cp-body img{max-width:100%;border-radius:10px;margin:8px 0;display:block}
.cp-body blockquote{
  margin:10px 0;padding:10px 14px;
  border-left:3px solid var(--brand);
  background:rgba(255,92,114,.07);
  border-radius:0 8px 8px 0;
  color:var(--text-2);
}
.cp-body pre{
  margin:10px 0;padding:12px 14px;
  background:rgba(0,0,0,.28);
  border:1px solid var(--line);
  border-radius:9px;overflow-x:auto;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:13px;line-height:1.65;
}
:root[data-theme="light"] .cp-body pre{background:#f3f4f7}
.cp-body a{color:var(--brand);text-decoration:underline;text-underline-offset:2px}
.cp-body ul,.cp-body ol{padding-left:24px;margin:8px 0}
.cp-body li{margin:3px 0}

/* 底部统计 */
.cp-foot{
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;padding:9px 16px;
  border-top:1px solid var(--line);
  font-size:11.5px;color:var(--text-3);
}
.cp-cnt{font-variant-numeric:tabular-nums;flex:none}

/* 操作区 */
.cp-actions{
  display:flex;align-items:center;justify-content:space-between;
  gap:14px;flex-wrap:wrap;
  margin-top:18px;
}
.cp-left,.cp-right{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.cp-right{margin-left:auto}
.cp-note{font-size:11.5px;color:var(--text-3)}
.cp-btn{
  height:40px;padding:0 20px;border-radius:11px;
  font-size:14px;font-weight:650;cursor:pointer;
  border:1px solid transparent;transition:all .16s ease;
  display:inline-flex;align-items:center;gap:6px;
}
.cp-btn.ghost{
  background:var(--card);border-color:var(--line);color:var(--text-2);
}
.cp-btn.ghost:hover{border-color:var(--brand);color:var(--text)}
.cp-btn.primary{
  background:linear-gradient(135deg,#ff5c72,#ff2442);
  color:#fff;box-shadow:0 6px 18px rgba(255,36,66,.28);
  min-width:104px;justify-content:center;
}
.cp-btn.primary:hover{box-shadow:0 8px 24px rgba(255,36,66,.4)}
.cp-btn.primary:disabled{opacity:.6;cursor:not-allowed;box-shadow:none}

/* 表情面板 */
.emoji-pop{
  position:absolute;left:10px;top:48px;z-index:20;
  width:min(320px,calc(100% - 20px));
  display:grid;grid-template-columns:repeat(10,1fr);gap:2px;
  padding:8px;border-radius:11px;
  background:var(--card-solid,var(--card));
  border:1px solid var(--line);
  box-shadow:0 16px 40px rgba(0,0,0,.4);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}
.emoji-pop button{
  height:30px;border:0;background:transparent;border-radius:6px;
  font-size:17px;cursor:pointer;line-height:1;
}
.emoji-pop button:hover{background:rgba(255,255,255,.1)}

/* 弹层 */
.cp-mask{
  position:fixed;inset:0;z-index:300;
  background:rgba(2,6,18,.62);
  display:grid;place-items:center;padding:20px;
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
}
.cp-dialog{
  width:min(460px,100%);
  background:var(--card-solid,#101a2c);
  border:1px solid var(--line);
  border-radius:15px;
  box-shadow:0 30px 80px rgba(0,0,0,.6);
  overflow:hidden;
}
.cp-preview-dlg{width:min(760px,100%);max-height:86vh;display:flex;flex-direction:column}
.cp-dlg-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 18px;border-bottom:1px solid var(--line);
  font-size:14.5px;font-weight:700;
}
.cp-dlg-x{
  width:28px;height:28px;border-radius:7px;border:0;background:transparent;
  color:var(--text-2);cursor:pointer;font-size:14px;
}
.cp-dlg-x:hover{background:rgba(255,255,255,.08)}
.cp-dlg-body{padding:18px;overflow-y:auto}
.cp-field{display:block;margin-bottom:14px}
.cp-field span{display:block;font-size:12.5px;color:var(--text-3);margin-bottom:6px}
.cp-field input{
  width:100%;height:40px;border-radius:9px;
  border:1px solid var(--line);background:rgba(0,0,0,.22);
  color:var(--text);padding:0 12px;font:inherit;font-size:13.5px;outline:none;
}
.cp-field input:focus{border-color:var(--brand)}
.cp-or{
  text-align:center;font-size:11.5px;color:var(--text-3);
  margin:12px 0;position:relative;
}
.cp-or::before,.cp-or::after{
  content:"";position:absolute;top:50%;width:calc(50% - 22px);height:1px;
  background:var(--line);
}
.cp-or::before{left:0}.cp-or::after{right:0}
.cp-upload{
  display:flex;align-items:center;justify-content:center;
  height:74px;border-radius:10px;cursor:pointer;
  border:1px dashed var(--line);
  color:var(--text-2);font-size:13px;
  transition:all .16s;
}
.cp-upload:hover{border-color:var(--brand);color:var(--brand);background:rgba(255,92,114,.06)}
.cp-dlg-tip{margin-top:12px;font-size:11.5px;color:var(--text-3);text-align:center}
.cp-dlg-foot{
  display:flex;justify-content:flex-end;gap:10px;
  padding:14px 18px;border-top:1px solid var(--line);
}
.cp-pv-title{font-size:22px;line-height:1.45;margin:0 0 14px;font-weight:750}
.cp-pv-body{font-size:15.5px;line-height:1.8;color:var(--text-2)}
.cp-pv-body img{max-width:100%;border-radius:10px}
