/* ============================================================
   留名网 V2026 — 全站样式（现代版）
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html, body { max-width: 100%; overflow-x: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #3a3a3a;
  background: #f4f1e8;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
a { color: #2f9e44; text-decoration: none; }
a:hover { color: #e64980; text-decoration: underline; }
img { border: 0; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* ---------- 顶部导航 ---------- */
.siteHeader {
  background: #fff;
  border-top: 3px solid #2f9e44;
  border-bottom: 1px solid #e5e0d0;
  padding: 12px 20px 0;
  box-shadow: 0 1px 8px rgba(0,0,0,.05);
  position: sticky; top: 0; z-index: 999;
}
.siteHeader .logo { display: inline-flex; align-items: center; gap: 10px; vertical-align: middle; }
.logoMark {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, #2f9e44, #69bd45);
  color: #fff; font-size: 22px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px rgba(47,158,68,.35);
}
.logoText { font-size: 22px; font-weight: 700; color: #2b2b2b; display: inline-flex; flex-direction: column; line-height: 1.1; }
.logoText small { font-size: 11px; color: #9a9484; font-weight: 400; letter-spacing: 1px; }
.nav { display: inline-flex; gap: 6px; margin-left: 28px; vertical-align: middle; }
.nav a {
  padding: 8px 16px; border-radius: 20px; font-size: 15px;
  color: #555; transition: all .18s;
}
.nav a:hover { background: #eef7ee; text-decoration: none; color: #2f9e44; }
.nav a.on { background: #2f9e44; color: #fff; }
.searchForm { float: right; margin-top: 6px; display: flex; gap: 6px; }
.searchInput {
  width: 160px; padding: 7px 12px; border: 1px solid #d8d2c0; border-radius: 20px;
  font-size: 13px; background: #faf9f4; outline: none; transition: border .18s;
}
.searchInput:focus { border-color: #2f9e44; }
.searchBtn {
  border: 0; background: #2f9e44; color: #fff; padding: 7px 14px;
  border-radius: 20px; font-size: 13px;
}
.searchBtn:hover { background: #268a39; }
.slogan { clear: both; padding: 8px 0 10px; font-size: 12px; color: #a09a88; }

/* ---------- 首页留言墙 ---------- */
#wall {
  position: relative; height: 640px; margin: 18px auto; width: 96%; max-width: 1200px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.5) 0, transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,.4) 0, transparent 45%),
    linear-gradient(160deg, #f8f5ea 0%, #efeadb 60%, #e8e2cf 100%);
  border: 1px solid #e0dac6;
  box-shadow: inset 0 0 60px rgba(160,140,90,.10), 0 4px 20px rgba(0,0,0,.06);
  overflow: hidden;
}
#wall::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(0,0,0,.028) 1px, transparent 1px);
  background-size: 18px 18px;
}
.note {
  position: absolute; width: 132px; padding: 7px 9px 9px;
  border-radius: 4px 4px 10px 4px;
  box-shadow: 0 4px 10px rgba(60,50,20,.18);
  cursor: grab; user-select: none; touch-action: none;
  transition: box-shadow .15s, transform .15s;
  font-size: 11.5px; line-height: 1.5;
}
.note:active { cursor: grabbing; box-shadow: 0 10px 24px rgba(60,50,20,.3); }
.note:hover { transform: scale(1.03); z-index: 9999 !important; }
.note .Num { font-size: 10px; color: rgba(0,0,0,.45); display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; }
.note .closeBtn {
  border: 0; background: rgba(0,0,0,.08); color: rgba(0,0,0,.5); width: 16px; height: 16px;
  border-radius: 50%; font-size: 11px; line-height: 1; cursor: pointer; flex: none;
}
.note .closeBtn:hover { background: rgba(0,0,0,.18); color: #000; }
.note .Detail .ico { font-size: 20px; vertical-align: -3px; margin-right: 3px; }
.note .Head { font-weight: 700; font-size: 12px; color: rgba(0,0,0,.75); }
.note .Detail { word-break: break-all; }
/* 便签内文字最多 4 行，超出省略（完整内容见"字条列表"页） */
.note .Detail {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4;
  overflow: hidden;
}
.note .Sign { text-align: right; font-weight: 700; margin-top: 5px; color: rgba(0,0,0,.65); }
.note .Date { text-align: right; font-size: 10px; color: rgba(0,0,0,.4); }
/* 6 种便签颜色 —— 对应原站 Style0~5 */
.style0 { background: linear-gradient(180deg,#fff9c9,#ffef9e); }
.style1 { background: linear-gradient(180deg,#ffe1ea,#ffc9da); }
.style2 { background: linear-gradient(180deg,#d9f1ff,#c2e6ff); }
.style3 { background: linear-gradient(180deg,#ddf5d8,#c9eec1); }
.style4 { background: linear-gradient(180deg,#f0e2ff,#e3ccff); }
.style5 { background: linear-gradient(180deg,#ffe9d2,#ffdcba); }
/* 便签轻微错落旋转 */
.note:nth-child(3n)   { transform: rotate(-1.6deg); }
.note:nth-child(3n):hover { transform: rotate(0) scale(1.03); }
.note:nth-child(4n+1) { transform: rotate(1.4deg); }
.note:nth-child(4n+1):hover { transform: rotate(0) scale(1.03); }

/* 墙底状态条 */
#wallBar {
  width: 96%; max-width: 1200px; margin: 0 auto 10px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: 13px; color: #6b6455;
}
.shout { background: #fff; border-radius: 20px; padding: 6px 14px; border: 1px solid #e5e0d0; }
.shout b { color: #e64980; }
.wallTip { text-align: center; font-size: 12px; color: #b3ac99; margin: -2px 0 14px; }

/* 分页条 */
.pageBar { font-size: 13px; }
.pageBar a, .pageBar strong {
  display: inline-block; padding: 4px 9px; margin: 0 1px;
  border-radius: 6px; background: #fff; border: 1px solid #e0dac6;
}
.pageBar strong { background: #2f9e44; color: #fff; border-color: #2f9e44; }
.pageBar a:hover { border-color: #2f9e44; text-decoration: none; }
.pageBar .gotoInput { width: 46px; padding: 4px 6px; border: 1px solid #d8d2c0; border-radius: 6px; text-align: center; }
.pageBar .gotoBtn { border: 1px solid #2f9e44; background: #fff; color: #2f9e44; border-radius: 6px; padding: 4px 10px; }
.pageBar .gotoBtn:hover { background: #2f9e44; color: #fff; }

/* ---------- 列表 / 搜索结果 ---------- */
.container { width: 96%; max-width: 1100px; margin: 18px auto; flex: 1; }
.noteTable {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
  font-size: 14px;
}
.noteTable th {
  background: #2f9e44; color: #fff; font-weight: 500;
  padding: 10px 12px; text-align: left; white-space: nowrap;
}
.noteTable td { padding: 9px 12px; border-bottom: 1px solid #f0ede2; vertical-align: top; }
.noteTable tr:nth-child(even) td { background: #faf9f3; }
.noteTable tr:hover td { background: #f2f8ef; }
.tid { color: #9a9484; font-variant-numeric: tabular-nums; }
.tdate { white-space: nowrap; color: #8b8574; font-size: 13px; }
.tsend { white-space: nowrap; }
/* 注意：不要在 <td> 上直接用 display:flex —— 会破坏表格宽度计算，
   导致整个表格塌缩、按钮被压成竖排单字。因此改为 td 内部再包一层。 */
.tableFoot { padding: 12px; }
.tableFootInner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.btnDiy {
  display: inline-block; background: linear-gradient(135deg,#2f9e44,#69bd45); color: #fff;
  padding: 8px 18px; border-radius: 20px; font-size: 14px;
  white-space: nowrap; flex-shrink: 0;
}
.btnDiy:hover { text-decoration: none; filter: brightness(1.06); color: #fff; }
.totalInfo { color: #8b8574; font-size: 13px; white-space: nowrap; }
.pageBarWrap { flex: 1 1 240px; min-width: 0; }
.emptyTip { padding: 40px; text-align: center; color: #9a9484; background: #fff; border-radius: 12px; }

/* ---------- 发表字条 ---------- */
.addWrap { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.addForm {
  flex: 1 1 480px; background: #fff; border-radius: 14px; padding: 22px 26px;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.addForm h2 { font-size: 17px; color: #2f9e44; margin-bottom: 16px; }
.addForm table { width: 100%; border-collapse: collapse; }
.addForm th {
  width: 110px; text-align: right; padding: 9px 12px 9px 0; font-weight: 500;
  color: #6b6455; font-size: 14px; vertical-align: middle; white-space: nowrap;
}
.addForm td { padding: 9px 0; font-size: 14px; }
.addForm input[type=text], .addForm textarea {
  border: 1px solid #d8d2c0; border-radius: 8px; padding: 8px 10px; font-size: 14px;
  background: #faf9f4; outline: none; transition: border .18s;
}
.addForm input[type=text]:focus, .addForm textarea:focus { border-color: #2f9e44; background: #fff; }
.addForm textarea { width: 100%; resize: vertical; }
.red { color: #e64980; }
.charLeft { font-size: 12px; color: #9a9484; }
.charLeft b { color: #e64980; }
.colorBlocks { display: flex; gap: 8px; }
.colorBlock { width: 34px; height: 34px; border-radius: 8px; cursor: pointer; border: 2px solid transparent; box-shadow: 0 2px 5px rgba(0,0,0,.12); transition: transform .12s, border .12s; }
.colorBlock:hover { transform: scale(1.1); }
.colorBlock.sel { border-color: #3a3a3a; transform: scale(1.1); }
.colorBlock.c0 { background:#ffef9e; } .colorBlock.c1 { background:#ffc9da; }
.colorBlock.c2 { background:#c2e6ff; } .colorBlock.c3 { background:#c9eec1; }
.colorBlock.c4 { background:#e3ccff; } .colorBlock.c5 { background:#ffdcba; }
.iconGrid { display: flex; flex-wrap: wrap; gap: 6px; max-width: 420px; }
.iconOpt {
  width: 38px; height: 38px; font-size: 20px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; cursor: pointer; background: #faf9f4; border: 2px solid transparent; transition: all .12s;
}
.iconOpt:hover { background: #eef7ee; }
.iconOpt.sel { border-color: #2f9e44; background: #eef7ee; }
.captchaRow { display: flex; align-items: center; gap: 8px; }
.captchaImg { border-radius: 8px; border: 1px solid #d8d2c0; background: #fff; cursor: pointer; }
.btnSubmit {
  background: linear-gradient(135deg,#2f9e44,#69bd45); color: #fff; border: 0;
  padding: 10px 34px; border-radius: 22px; font-size: 15px;
  box-shadow: 0 3px 10px rgba(47,158,68,.35); transition: filter .15s;
}
.btnSubmit:hover { filter: brightness(1.08); }

/* 预览区 */
.previewSide { flex: 1 1 300px; max-width: 380px; }
.declare {
  background: #fffbe8; border: 1px solid #f0e4ae; border-radius: 12px;
  padding: 14px 16px; font-size: 12px; color: #8a7a3a; line-height: 1.7; margin-bottom: 16px;
}
.previewLabel { font-size: 13px; color: #9a9484; margin-bottom: 8px; }
#previewNote {
  position: relative; width: 240px; padding: 10px 12px 12px;
  border-radius: 4px 4px 10px 4px; font-size: 13px; line-height: 1.6;
  box-shadow: 0 6px 16px rgba(60,50,20,.2);
  transform: rotate(2deg);
}
#previewNote .Num { font-size: 11px; color: rgba(0,0,0,.45); margin-bottom: 4px; }
#previewNote .ico { font-size: 30px; vertical-align: -5px; margin-right: 4px; }
#previewNote .Head { font-weight: 700; color: rgba(0,0,0,.75); }
#previewNote .Sign { text-align: right; font-weight: 700; margin-top: 6px; color: rgba(0,0,0,.65); }
#previewNote .Date { text-align: right; font-size: 11px; color: rgba(0,0,0,.4); }

/* ---------- 排行榜 ---------- */
.rankWrap { width: 96%; max-width: 1100px; margin: 20px auto 42px; }
.rankHead { margin-bottom: 16px; }
.rankHead h2 { font-size: 21px; color: #2b2b2b; margin-bottom: 5px; }
.rankHead p { font-size: 13px; color: #9a9484; }
.rankGrid {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 18px; align-items: start;
}
.rankCard {
  background: #fff; border: 1px solid #efe9d8; border-radius: 16px;
  padding: 4px 20px 8px; box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.rankCard h3 {
  display: flex; align-items: center; gap: 7px;
  padding: 14px 0 12px; margin-bottom: 2px; border-bottom: 1px solid #f1ecdd;
  font-size: 15.5px; color: #2b2b2b;
}
.rankCard .rankIco { font-size: 17px; line-height: 1; }
.rankSub { margin-left: auto; font-size: 11px; font-weight: 400; color: #b3ac96; letter-spacing: .5px; }
.rankItem {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 4px; border-bottom: 1px dashed #eee8d8; color: inherit;
}
.rankItem:last-child { border-bottom: 0; }
.rankItem:hover { text-decoration: none; background: #fdfbf3; }
.rankNo {
  flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 8px;
  background: #f2eee1; color: #9a9484; font-size: 12.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.rankNo.n1 { background: linear-gradient(135deg,#f7c948,#e8a72c); color: #fff; box-shadow: 0 2px 6px rgba(232,167,44,.4); }
.rankNo.n2 { background: linear-gradient(135deg,#c9ced6,#9aa3ad); color: #fff; }
.rankNo.n3 { background: linear-gradient(135deg,#e0a878,#c07f4d); color: #fff; }
.rankMain { flex: 1 1 auto; min-width: 0; }
.rankText {
  display: block; font-size: 14px; line-height: 1.62; color: #3a3a3a;
  word-break: break-word; overflow-wrap: anywhere;
}
.rankPick { color: #2f6b3a; margin-right: 5px; }
.rankMeta { display: block; margin-top: 3px; font-size: 11.5px; color: #a8a190; }
.rankCnt { flex: none; font-size: 13px; font-weight: 700; white-space: nowrap; margin-top: 1px; }
.rankCnt i { font-style: normal; font-weight: 400; font-size: 10.5px; margin-left: 2px; }
.rankCnt-reply { color: #2f9e44; }
.rankCnt-like { color: #e64980; }
.rankEmpty { font-size: 13px; color: #a8a190; padding: 18px 0 20px; }

/* 操作结果提示 */
.notice {
  width: 96%; max-width: 1100px; margin: 24px auto; padding: 40px; text-align: center;
  background: #fff; border-radius: 14px; box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.notice h2 { color: #2f9e44; margin-bottom: 10px; }
.notice p { color: #8b8574; margin-bottom: 18px; }

/* ---------- 页脚 ---------- */
.siteFooter {
  margin-top: auto; text-align: center; padding: 26px 10px 30px;
  background: linear-gradient(180deg, #efe9d8, #e6dfc9);
  border-top: 1px solid #ddd5be; font-size: 12px; color: #8b8574;
}
.siteFooter .links a { margin: 0 6px; }

/* ---------- 便签放大查看层 ---------- */
body.mbOpen { overflow: hidden; }
.noteModal {
  position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.noteModal[hidden] { display: none; }
.mbBack { position: absolute; left: 0; top: 0; right: 0; bottom: 0; background: rgba(38,32,20,.58); }
@supports ((-webkit-backdrop-filter: blur(3px)) or (backdrop-filter: blur(3px))) {
  .mbBack { -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
}
.mbCard {
  position: relative; width: 100%; max-width: 440px; max-height: 84vh; overflow: auto;
  padding: 28px 30px 24px; border-radius: 6px 6px 20px 6px;
  box-shadow: 0 26px 70px rgba(0,0,0,.42);
  font-size: 16px; line-height: 1.85; color: #3a3a3a;
  animation: mbIn .2s ease-out;
}
@keyframes mbIn {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
.mbCard .mbBody { font-size: 16px; }
.mbCard .Num { font-size: 12.5px; color: rgba(0,0,0,.45); margin-bottom: 12px; }
.mbCard .ico { font-size: 34px; vertical-align: -6px; margin-right: 6px; }
.mbCard .Head { font-size: 19px; font-weight: 700; color: rgba(0,0,0,.78); }
.mbCard .Detail { font-size: 16px; word-break: break-word; overflow-wrap: anywhere; }
.mbCard .Sign { text-align: right; font-weight: 700; margin-top: 18px; color: rgba(0,0,0,.66); font-size: 15px; }
.mbCard .Date { text-align: right; font-size: 12px; color: rgba(0,0,0,.42); }
.mbClose {
  position: absolute; right: 10px; top: 10px; width: 30px; height: 30px; border: 0;
  border-radius: 50%; background: rgba(0,0,0,.09); color: rgba(0,0,0,.55);
  font-size: 14px; line-height: 1; cursor: pointer;
}
.mbClose:hover { background: rgba(0,0,0,.2); color: #000; }
.mbHint { margin-top: 14px; text-align: center; font-size: 11px; color: rgba(0,0,0,.32); }

/* 放大层内的点赞（只有赞，没有踩；每人每条一次） */
.mbLike { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.mbLikeBtn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid #efc2d1; background: #fff; color: #d6336c;
  border-radius: 20px; padding: 7px 16px; font-size: 14px; cursor: pointer;
  font-family: inherit; line-height: 1.2; transition: background .15s, border-color .15s;
}
.mbLikeBtn:hover { background: #fff0f5; border-color: #e64980; }
.mbLikeBtn:disabled { opacity: .6; cursor: default; }
.mbLikeBtn.on { background: #e64980; border-color: #e64980; color: #fff; opacity: 1; }
.mbLikeBtn.on .mbLikeNum { color: #fff; }
.mbLikeBtn .mbLikeIco { font-size: 15px; line-height: 1; }
.mbLikeNum { font-size: 13px; color: #d6336c; min-width: 10px; text-align: left; }
.mbLikeBtn.pop .mbLikeIco { display: inline-block; -webkit-animation: likePop .5s ease; animation: likePop .5s ease; }
@keyframes likePop {
  0% { transform: scale(1); }
  35% { transform: scale(1.55) rotate(-12deg); }
  70% { transform: scale(.9); }
  100% { transform: scale(1); }
}
.mbLikeTip { font-size: 11.5px; color: rgba(0,0,0,.4); }

/* 放大层内的回复区 */
.mbRel { margin-top: 20px; padding-top: 14px; border-top: 1px dashed rgba(0,0,0,.18); }
.mbRelTitle { font-size: 13.5px; font-weight: 700; color: rgba(0,0,0,.55); margin-bottom: 8px; }
.mbRelTitle span { color: #e64980; }
/* 回复列表不单独滚动：让整个卡片统一滚动，避免手机里"嵌套滚动"卡手 */
.mbRelList { overflow: visible; }
.mbRelItem { padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,.07); }
.mbRelItem:last-child { border-bottom: 0; }
.mbRelMeta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 11.5px; color: rgba(0,0,0,.42); margin-bottom: 2px; }
.mbRelMeta b { color: #2f6b3a; font-weight: 600; font-size: 12.5px; }
.mbRelBody { font-size: 14px; line-height: 1.65; color: #3a3a3a; white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }
.mbRelEmpty { font-size: 12.5px; color: rgba(0,0,0,.35); padding: 4px 0 10px; }
.mbRelForm { margin-top: 10px; }
.mbRelName, .mbRelKey, .mbRelText {
  border: 1px solid #d8d2c0; border-radius: 8px; padding: 7px 10px;
  font-size: 13px; background: #fffdf6; outline: none; font-family: inherit;
}
.mbRelName { width: 100%; margin-bottom: 6px; }
.mbRelText { width: 100%; resize: vertical; min-height: 54px; font-size: 13.5px; line-height: 1.6; }
.mbRelName:focus, .mbRelKey:focus, .mbRelText:focus { border-color: #2f9e44; background: #fff; }
.mbRelRow { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.mbCapImg { border-radius: 6px; border: 1px solid #e0dac6; cursor: pointer; flex: none; background: #fff; }
.mbRelKey { width: 80px; flex: none; }
.mbRelBtn {
  border: 0; background: #2f9e44; color: #fff; padding: 8px 20px;
  border-radius: 18px; font-size: 13.5px; margin-left: auto; flex: none;
}
.mbRelBtn:hover { background: #268a39; }
.mbRelBtn:disabled { opacity: .55; cursor: default; }
.mbRelMsg { font-size: 12px; margin-top: 6px; min-height: 15px; }
.mbRelMsg.isOk { color: #2f6b3a; }
.mbRelMsg.isErr { color: #d6336c; }

/* ---------- 后台管理 ---------- */
.loginWrap {
  width: 94%; max-width: 360px; margin: 70px auto; background: #fff;
  padding: 26px 24px 22px; border-radius: 14px; box-shadow: 0 2px 14px rgba(0,0,0,.07);
}
.loginWrap h2 { font-size: 17px; color: #2f9e44; margin-bottom: 16px; text-align: center; }
.loginWrap input[type=password] {
  width: 100%; padding: 10px 12px; border: 1px solid #d8d2c0; border-radius: 8px;
  font-size: 15px; background: #faf9f4; outline: none; margin-bottom: 12px;
}
.loginWrap input[type=password]:focus { border-color: #2f9e44; background: #fff; }
.loginWrap .btnSubmit { width: 100%; padding: 10px 0; }
.loginErr { color: #e64980; font-size: 13px; margin-bottom: 10px; text-align: center; }

.mgmt { max-width: 1180px; }
.mgmtHead { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 12px; }
.mgmtHead h2 { font-size: 18px; color: #2f6b3a; }
.mgmtStats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: #8b8574; }
.mgmtStats b { color: #e64980; font-variant-numeric: tabular-nums; }
.mgmtMsg { padding: 9px 14px; border-radius: 8px; font-size: 13.5px; margin-bottom: 12px; }
.mgmtMsg.isOk  { background: #eef7ee; color: #2f6b3a; border: 1px solid #cfe6cf; }
.mgmtMsg.isErr { background: #fdeef3; color: #b3245a; border: 1px solid #f6cfdd; }
.mgmtBar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px;
  background: #fff; padding: 10px 12px; border-radius: 12px; box-shadow: 0 1px 8px rgba(0,0,0,.05);
}
.mgmtTab {
  padding: 6px 14px; border-radius: 16px; font-size: 13.5px; color: #6b6455;
  background: #f6f4ec; border: 1px solid #e5e0d0;
}
.mgmtTab:hover { text-decoration: none; color: #2f9e44; }
.mgmtTab.on { background: #2f9e44; color: #fff; border-color: #2f9e44; }
.mgmtSearch { display: flex; gap: 6px; flex: 1 1 220px; min-width: 0; }
.mgmtSearch input[type=text] {
  flex: 1; min-width: 0; padding: 6px 12px; border: 1px solid #d8d2c0; border-radius: 16px;
  font-size: 13px; background: #faf9f4; outline: none;
}
.mgmtSearch input[type=text]:focus { border-color: #2f9e44; background: #fff; }
.mgmtSearch button {
  border: 0; background: #2f9e44; color: #fff; padding: 6px 14px; border-radius: 16px; font-size: 13px;
}
.mgmtLogout { margin-left: auto; font-size: 13px; color: #a09a88; }
.mgmtHint { font-size: 12.5px; color: #9a9484; }
.mgmtHint a { margin-left: 6px; }
.mgmtTableWrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  background: #fff; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.mgmtTable { width: 100%; min-width: 780px; border-collapse: collapse; font-size: 13.5px; }
.mgmtTable th {
  background: #2f9e44; color: #fff; font-weight: 500; text-align: left;
  padding: 9px 10px; white-space: nowrap; font-size: 13px;
}
.mgmtTable td { padding: 9px 10px; border-bottom: 1px solid #f0ede2; vertical-align: top; }
.mgmtTable tr:nth-child(even) td { background: #faf9f3; }
.mgmtTable tr:hover td { background: #f2f8ef; }
.mgmtTable .cChk { width: 34px; }
.mgmtTable .cId { width: 64px; }
.mgmtTable .cPick { width: 100px; }
.mgmtTable .cSend { width: 100px; }
.mgmtTable .cTime { width: 150px; }
.mgmtTable th.cNote { width: 180px; }
.mgmtTable td.cNote { font-size: 12.5px; color: #8b8574; line-height: 1.5; }
.mgmtTable .mOrphan { color: #c2b9a3; }
.mRelBadge {
  display: inline-block; margin-top: 2px; padding: 0 6px; border-radius: 8px;
  font-size: 11px; color: #2f9e44; background: #eef7ee;
}
.mRelBadge:hover { text-decoration: none; background: #dcefdc; }
.mLikeBadge {
  display: inline-block; margin-top: 2px; padding: 0 6px; border-radius: 8px;
  font-size: 11px; color: #d6336c; background: #fdeef3; white-space: nowrap;
}
.mgmtTable .cAct { width: 116px; text-align: right; }
.mgmtTable .mInfo { line-height: 1.65; word-break: break-word; }
.mgmtTable .mDelAt { font-size: 11.5px; color: #b3ac99; }
.mgmtBar2 {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 12px 0 6px;
}
.btnDanger {
  border: 0; background: #e64980; color: #fff; padding: 6px 14px; border-radius: 16px;
  font-size: 13px; white-space: nowrap;
}
.btnDanger:hover { background: #cf3a6e; }
.btnGhost {
  border: 1px solid #2f9e44; background: #fff; color: #2f9e44; padding: 5px 12px;
  border-radius: 16px; font-size: 12.5px; margin-right: 4px; white-space: nowrap;
}
.btnGhost:hover { background: #2f9e44; color: #fff; }
.mgmtPager { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 14px 0 24px; font-size: 13px; }
.mgmtPager a, .mgmtPager strong {
  display: inline-block; padding: 4px 10px; border-radius: 8px; background: #fff;
  border: 1px solid #e0dac6;
}
.mgmtPager strong { background: #2f9e44; color: #fff; border-color: #2f9e44; }
.mgmtPager a:hover { border-color: #2f9e44; text-decoration: none; }
.mgmtDots { color: #b3ac99; padding: 0 2px; }
.mgmtCount { margin-left: auto; color: #9a9484; font-size: 12.5px; }

/* ============================================================
   响应式
   ============================================================ */

/* ---- 平板 ---- */
@media (max-width: 900px) {
  .container { width: 94%; }
}

/* ---- 手机 / 小屏（<=760px，覆盖主流程表宽度）---- */
@media (max-width: 760px) {
  /* 头部 */
  .siteHeader { padding: 10px 12px 0; }
  .logoText { font-size: 19px; }
  .nav { margin-left: 0; display: flex; flex-wrap: wrap; margin-top: 6px; gap: 4px; }
  .nav a { padding: 6px 12px; font-size: 14px; }
  .searchForm { float: none; margin: 8px 0 10px; display: flex; }
  .searchInput { flex: 1; width: auto; min-width: 0; }
  .slogan { display: none; }

  /* 首页便签：两列网格。列宽必须用 minmax(0,1fr) —— 便签里的 -webkit-box 多行截断
     会让 min-content 变成"整行文本宽"，普通 1fr 会被内容撑破，导致整页横向溢出 */
  #wall {
    height: auto; min-height: 300px; width: 94%; margin: 14px auto;
    display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    gap: 8px; padding: 8px; align-content: start;
  }
  /* 手机上便签不再拖拽（已是静态网格），必须恢复触摸滚动，
     否则 touch-action:none 会让手指按在便签上时整个页面滑不动 */
  .note {
    position: static !important; width: auto; min-width: 0; min-height: 118px;
    font-size: 11px; transform: none !important; overflow: hidden;
    touch-action: auto; cursor: default;
  }
  .note .Head, .note .Detail { overflow-wrap: anywhere; word-break: break-word; min-width: 0; }
  .note:hover { transform: none !important; }
  .note .Head, .note .Detail { overflow-wrap: anywhere; word-break: break-word; }
  #wallBar { width: 94%; font-size: 12px; }

  /* 发表页：单列，标签在输入框上方 */
  .addForm { flex: 1 1 100%; min-width: 0; padding: 16px 14px; }
  .addForm table, .addForm tbody, .addForm tr, .addForm th, .addForm td { display: block; width: 100%; }
  .addForm th { text-align: left; padding: 8px 0 3px; }
  .addForm td { padding: 0 0 10px; }
  .addForm textarea { min-height: 90px; }
  .colorBlocks { flex-wrap: wrap; gap: 6px; }
  .colorBlock { width: 30px; height: 30px; }
  .iconGrid { max-width: 100%; gap: 4px; }
  .iconOpt { width: 34px; height: 34px; font-size: 18px; }
  .previewSide { flex: 1 1 100%; max-width: 100%; }
  #previewNote { width: 100%; max-width: 280px; }
  .btnSubmit { width: 100%; }

  /* 结果提示页 */
  .notice { width: 94%; padding: 26px 18px; }

  /* 排行榜：两栏改单栏 */
  .rankWrap { width: 94%; margin: 16px auto 30px; }
  .rankHead h2 { font-size: 19px; }
  .rankHead p { font-size: 12.5px; }
  .rankGrid { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .rankCard { padding: 2px 14px 6px; }
  .rankItem { padding: 11px 2px; gap: 9px; }
  .rankText { font-size: 13.5px; }
  .rankCnt { font-size: 12.5px; }
  .rankCnt i { display: none; }

  /* 列表页：表格转卡片（窄屏下五列表格必然挤压） */
  .noteTable { display: block; background: transparent; box-shadow: none; border-radius: 0; font-size: 14px; }
  .noteTable tbody { display: block; }
  .noteTable tr {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 8px;
    background: #fff; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
  }
  .noteTable tr:nth-child(even) td, .noteTable tr:hover td { background: transparent; }
  .noteTable tr:first-child { display: none; }              /* 表头行隐藏 */
  .noteTable td { display: block; padding: 0; border: 0; }
  .noteTable td.tid { order: 1; font-size: 12px; color: #9a9484; }
  .noteTable td.tid::before { content: "#"; }
  .noteTable td.tsend { order: 2; font-size: 12px; color: #6b6455; }
  .noteTable td.tdate { order: 3; margin-left: auto; font-size: 11px; }
  .noteTable td:nth-child(4) { display: none; }             /* 接收者 */
  .noteTable td:nth-child(2) { order: 4; flex: 0 0 100%; line-height: 1.65; }

  /* 分页行不参与卡片样式 */
  .noteTable tr.footRow { background: transparent; box-shadow: none; padding: 0; margin: 0 0 10px; }
  .noteTable tr.footRow td { display: block; }
  .tableFootInner { gap: 8px; }
  .pageBarWrap { flex: 1 1 100%; }
  .pageBar a, .pageBar strong { padding: 3px 7px; font-size: 12px; }
  .pageBar .gotoInput { width: 40px; }

  /* 便签放大层：小屏留足边距，内容多了自身滚动 */
  .noteModal { padding: 14px; }
  .mbCard { max-width: none; max-height: 82vh; padding: 24px 20px 18px; font-size: 15px; }
  .mbCard .Detail, .mbCard .mbBody { font-size: 15px; }
  .mbCard .Head { font-size: 18px; }
  .mbCard .ico { font-size: 30px; }
  .mbRelBtn { margin-left: 0; flex: 1 1 80px; }
  .mbLike { gap: 8px; margin-top: 16px; }
  .mbLikeBtn { padding: 7px 15px; font-size: 15px; }
  .mbLikeTip { flex: 1 1 100%; }

  /* 后台管理 */
  .mgmt { width: 94%; }
  .mgmtLogout { margin-left: 0; }
  .mgmtCount { margin-left: 0; flex: 0 0 100%; }
  .loginWrap { margin: 40px auto; }

  /* 后台表格 → 卡片（窄屏不要横向拖动看表） */
  .mgmtTableWrap { overflow: visible; background: transparent; box-shadow: none; }
  .mgmtTable { display: block; min-width: 0; font-size: 14px; }
  .mgmtTable tr:first-child { display: none; }            /* 表头行 */
  .mgmtTable tr {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 8px;
    position: relative; background: #fff; border-radius: 12px;
    padding: 12px 14px 12px 42px; margin-bottom: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
  }
  .mgmtTable tr:nth-child(even) td, .mgmtTable tr:hover td { background: transparent; }
  .mgmtTable td { display: block; padding: 0; border: 0; }
  .mgmtTable .cChk, .mgmtTable .cId, .mgmtTable .cPick,
  .mgmtTable .cSend, .mgmtTable .cTime, .mgmtTable .cAct, .mgmtTable .cNote { width: auto; }
  .mgmtTable .cChk { position: absolute; left: 13px; top: 14px; }
  .mgmtTable .cId { order: 1; font-size: 12px; color: #9a9484; }
  .mgmtTable .cId::before { content: "#"; }
  .mgmtTable .cPick { order: 2; font-size: 12.5px; color: #6b6455; }
  .mgmtTable .cNote { order: 2; flex: 0 0 100%; font-size: 12px; color: #9a9484; }
  .mgmtTable .cSend { order: 3; font-size: 12.5px; color: #6b6455; }
  .mgmtTable .cSend::before { content: "· "; }
  .mgmtTable .cTime { order: 4; margin-left: auto; font-size: 11.5px; text-align: right; }
  .mgmtTable .mInfo { order: 5; flex: 0 0 100%; line-height: 1.65; }
  .mgmtTable .cAct { order: 6; flex: 0 0 100%; text-align: right; margin-top: 8px; }
  .mgmtTable .cAct .btnDanger, .mgmtTable .cAct .btnGhost { padding: 5px 14px; }
}

/* ---- 小手机（≤420px）：导航四个入口压成一行，别让"排行榜"单独掉到第二行 ---- */
@media (max-width: 420px) {
  .nav { gap: 2px; }
  .nav a { padding: 6px 8px; font-size: 12.5px; }
}

/* ---- 超小屏 ---- */
@media (max-width: 340px) {
  .note { width: 100%; min-height: 0; }
  .nav a { padding: 6px 6px; font-size: 12px; }
}
