/* === 留言板页面（/contact.html） ===
   公共表单控件样式见 form-page.css，此处仅保留本页布局与留言列表 */

.contact-wrap{flex:1;display:flex;flex-direction:column;align-items:center;gap:20px;padding:30px 20px}
.contact-card,
.notice-card,
.msg-card{background:var(--card);max-width:600px;width:100%;border-radius:var(--radius);padding:30px 32px 26px;box-shadow:var(--shadow-lg);border:1px solid var(--bd)}
.contact-card .card-head{margin-bottom:18px}
.row-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
textarea{min-height:140px}

/* 留言须知（移动端可折叠） */
.notice-card{padding:26px 24px 24px}
.notice-summary{display:flex;align-items:center;gap:10px;list-style:none;cursor:pointer}
.notice-summary::-webkit-details-marker{display:none}
.notice-summary .card-head-ico{width:38px;height:38px;border-radius:10px;font-size:15px}
.notice-title{margin:0;font-size:17px;font-weight:600;color:var(--text)}
.notice-caret{margin-left:auto;font-size:12px;color:var(--muted);transition:transform .2s}
.notice-card[open] .notice-summary{margin-bottom:16px}
.notice-card[open] .notice-caret{transform:rotate(180deg)}
.notice-list{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:12px}
.notice-list li{position:relative;padding-left:23px;font-size:13px;line-height:1.7;color:var(--text-2)}
.notice-list li>i{position:absolute;left:0;top:4px;font-size:11.5px;color:var(--pri)}
.notice-list li b{color:var(--text);font-weight:600}
.notice-tip{margin:16px 0 0;padding:10px 12px;border-radius:9px;background:rgba(var(--pri-rgb,59,130,246),.06);font-size:12.5px;line-height:1.65;color:var(--text-2)}

/* 验证码：风控判定需要时才展开 */
.captcha-gate{display:none}
.captcha-gate.is-open{display:block;animation:gateIn .2s ease-out}
@keyframes gateIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}

/* 蜜罐字段：移出视口，正常访客不可见 */
.hp-field{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;opacity:0;pointer-events:none}

/* 提交成功后的查询码 */
.msg-code{margin-top:8px;font-size:13px;color:var(--text-2)}
.msg-code strong{color:var(--text);letter-spacing:.5px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}
.msg-code a{color:var(--pri);text-decoration:none}
.msg-code a:hover{text-decoration:underline}

/* 留言列表 */
.msg-card{padding:26px 32px}
.msg-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.msg-card-head h2{margin:0;font-size:18px;color:var(--text)}
.msg-card-head .sub{margin:3px 0 0;font-size:12.5px;color:var(--muted)}
.msg-count{padding:3px 10px;border-radius:999px;background:rgba(var(--pri-rgb,59,130,246),.08);color:var(--pri);font-size:12px;font-weight:600;white-space:nowrap}
.msg-item{display:flex;gap:12px;padding:16px 0;border-top:1px dashed var(--bd)}
.msg-item:first-of-type{border-top:0;margin-top:10px;padding-top:0}
.msg-avatar{width:36px;height:36px;flex-shrink:0;border-radius:50%;background:rgba(var(--pri-rgb,59,130,246),.1);color:var(--pri);display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:600}
.msg-main{flex:1;min-width:0}
.msg-meta{display:flex;align-items:baseline;justify-content:space-between;gap:12px;font-size:12px;color:var(--muted)}
.msg-nick{font-size:14px;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.msg-body{margin-top:5px;font-size:14px;line-height:1.75;color:var(--text-2);word-break:break-word}
.msg-body.is-clamped{max-height:147px;overflow:hidden}
.msg-toggle{margin-top:6px;padding:0;border:0;background:none;color:var(--pri);font-size:12.5px;font-weight:500;cursor:pointer}
.msg-toggle:hover{text-decoration:underline}
.msg-reply{margin-top:9px;padding:10px 12px;border-left:3px solid var(--pri);border-radius:6px;background:rgba(var(--pri-rgb,59,130,246),.06);font-size:13.5px;line-height:1.7;color:var(--text-2);word-break:break-word}
.msg-reply-tag{display:block;margin-bottom:3px;font-size:12px;color:var(--pri)}
.msg-notice{display:flex;gap:8px;align-items:flex-start;margin-top:14px;padding:10px 12px;border-radius:9px;background:rgba(var(--pri-rgb,59,130,246),.06);border:1px solid rgba(var(--pri-rgb,59,130,246),.14);font-size:13px;line-height:1.7;color:var(--text-2);word-break:break-word}
.msg-notice i{color:var(--pri);margin-top:4px;flex-shrink:0}
.msg-list{display:flex;flex-direction:column;min-height:0}
.msg-empty{margin:auto 0;text-align:center;padding:28px 0 12px;color:var(--muted)}
.msg-empty i{display:block;margin-bottom:10px;font-size:26px;color:var(--bd-2)}
.msg-empty p{margin:0 0 4px;font-size:13.5px}
.msg-empty span{font-size:12.5px}
.pager{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin-top:20px}
.pager a,.pager span{min-width:32px;height:32px;padding:0 8px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--bd);border-radius:8px;font-size:13px;color:var(--text-2);text-decoration:none}
.pager a:hover{border-color:var(--pri);color:var(--pri)}
.pager .on{background:var(--pri);border-color:var(--pri);color:#fff}
.pager .gap{border-color:transparent;color:var(--muted)}
.pager-more{display:block;width:100%;margin-top:16px;padding:10px;border:1px dashed var(--bd-2);border-radius:9px;background:transparent;color:var(--text-2);font-size:13px;cursor:pointer;transition:border-color .15s,color .15s}
.pager-more:hover{border-color:var(--pri);color:var(--pri)}
.pager-more[hidden]{display:none}
.pager-more[disabled]{opacity:.6;cursor:default}

/* 留言状态查询页 */
.status-wrap{flex:1;display:flex;align-items:flex-start;justify-content:center;padding:30px 20px}
.status-card{background:var(--card);width:100%;max-width:640px;border-radius:var(--radius);padding:30px 32px 26px;box-shadow:var(--shadow-lg);border:1px solid var(--bd)}
.status-card .card-head{margin-bottom:18px}
.status-result{margin-top:18px;padding-top:16px;border-top:1px dashed var(--bd)}
.status-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.status-badge{padding:3px 10px;border-radius:999px;font-size:12px;font-weight:600}
.status-badge.ok{background:rgba(34,197,94,.12);color:#16a34a}
.status-badge.warn{background:rgba(245,158,11,.14);color:#d97706}
.status-badge.wait{background:rgba(var(--pri-rgb,59,130,246),.1);color:var(--pri)}
body.dark .status-badge.ok{background:rgba(34,197,94,.16);color:#86efac}
body.dark .status-badge.warn{background:rgba(245,158,11,.16);color:#fcd34d}
.status-time{font-size:12px;color:var(--muted)}
.status-label{margin-bottom:4px;font-size:12px;color:var(--muted)}
.status-hint{margin:12px 0 0;font-size:12.5px;line-height:1.65;color:var(--muted)}

/* 桌面端：左 1/3 留言须知，右 2/3 留言板，下方通栏留言列表；左右卡片等高 */
@media(min-width:900px){
  .contact-wrap{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);grid-template-areas:"notice form" "list list";align-items:stretch;gap:22px;max-width:1180px;margin:0 auto;width:100%}
  .notice-card{grid-area:notice;max-width:none;display:flex;flex-direction:column}
  /* 须知条目在富余高度中居中，提示条贴底，避免中部大片空白 */
  .notice-card .notice-list{flex:1;justify-content:center;gap:16px;padding:4px 0}
  .notice-card .notice-tip{margin-top:auto}
  /* 桌面固定展开，不显示折叠箭头 */
  .notice-summary{pointer-events:none}
  .notice-caret{display:none}
  .contact-card{grid-area:form;max-width:none;display:flex;flex-direction:column}
  .contact-card .back{margin-top:auto;padding-top:16px}
  .msg-card{grid-area:list;max-width:none}
}

@media(max-width:640px){
  .contact-card,.notice-card,.msg-card{padding:22px 18px;border-radius:10px}
  .notice-card{padding:20px 18px}
  .status-card{padding:22px 18px;border-radius:10px}
  .msg-card-head h2{font-size:17px}
  .row-2{grid-template-columns:1fr}
  .msg-avatar{width:32px;height:32px;font-size:13px}
}
