/* ============================================================
   创想智脑 · 留言入口模块（+号扩展箱）
   版本: v1.0 2026-08-20
   设计: 灰色过渡风格（浅灰底/深灰字/按压态渐变），图标+汉字标注
   原则: 自包含、不依赖外部CDN、不与宿主页面样式冲突（全部 ly- 前缀）
   ============================================================ */

#ly-root, #ly-root * { box-sizing: border-box; margin: 0; padding: 0; font-family: "PingFang SC","Microsoft YaHei",-apple-system,sans-serif; }

/* ---------- +号按钮（悬浮在聊天工具栏附近） ---------- */
.ly-plus-btn {
  position: fixed; right: 14px; bottom: 86px; z-index: 9990;
  width: 46px; height: 46px; border-radius: 50%;
  background: #5b6b7f; color: #fff;
  border: none; cursor: pointer;
  font-size: 26px; font-weight: 700; line-height: 46px; text-align: center;
  box-shadow: 0 2px 10px rgba(61,74,92,.28);
  transition: transform .15s, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.ly-plus-btn:active { transform: scale(.92); background: #3d4a5c; }
.ly-plus-btn.ly-open { background: #3d4a5c; transform: rotate(45deg); }

/* ---------- 扩展箱面板 ---------- */
.ly-panel-mask {
  position: fixed; inset: 0; z-index: 9991;
  background: rgba(0,0,0,.18);
  opacity: 1; transition: opacity .18s;
}
.ly-panel {
  position: fixed; left: 12px; right: 12px; bottom: 76px; z-index: 9992;
  max-width: 520px; margin: 0 auto;
  background: #f2f3f5; border: 1px solid #e0e3e9; border-radius: 16px;
  padding: 14px 14px 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,.16);
  animation: lyUp .18s ease-out;
}
@keyframes lyUp { from { transform: translateY(14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.ly-panel-title { font-size: 12.5px; color: #9aa1ab; padding: 0 4px 10px; }
.ly-grid { display: flex; gap: 10px; }
.ly-cell {
  flex: 1; background: #e8eaee; border: 1px solid #e0e3e9; border-radius: 12px;
  padding: 12px 6px 10px; text-align: center; cursor: pointer;
  transition: transform .12s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.ly-cell:active { transform: scale(.96); background: #dde0e6; }
.ly-cell-icon {
  width: 40px; height: 40px; margin: 0 auto 6px; border-radius: 50%;
  background: #9aa1ab; color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.ly-cell-icon svg { width: 20px; height: 20px; fill: #fff; }
.ly-cell-name { font-size: 14px; font-weight: 600; color: #3d4a5c; }
.ly-cell-desc { font-size: 11px; color: #9aa1ab; margin-top: 2px; }

/* ---------- 全屏页面（提交留言 / 我的留言） ---------- */
.ly-page {
  position: fixed; inset: 0; z-index: 9995;
  background: #f7f8fa;
  display: flex; flex-direction: column;
  animation: lyPageIn .2s ease-out;
}
@keyframes lyPageIn { from { transform: translateX(24px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.ly-page-head {
  background: #fff; border-bottom: 1px solid #e3e7ee;
  padding: 12px 14px; display: flex; align-items: center; gap: 10px;
  position: sticky; top: 0;
}
.ly-back {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid #e0e3e9;
  background: #f2f3f5; color: #3d4a5c; font-size: 17px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.ly-page-title { font-size: 16.5px; font-weight: 600; color: #22262e; }
.ly-page-body { flex: 1; overflow-y: auto; padding: 14px; -webkit-overflow-scrolling: touch; }

/* ---------- 表单 ---------- */
.ly-label { font-size: 13.5px; font-weight: 600; color: #3d4a5c; margin: 14px 0 7px; }
.ly-types { display: flex; gap: 8px; }
.ly-type {
  flex: 1; text-align: center; padding: 9px 0; border-radius: 10px;
  background: #eceef2; border: 1.5px solid #e0e3e9;
  font-size: 13.5px; color: #5a6472; cursor: pointer;
  transition: all .15s;
}
.ly-type.ly-on { background: #5b6b7f; border-color: #5b6b7f; color: #fff; font-weight: 600; }
.ly-input, .ly-textarea {
  width: 100%; border: 1px solid #e0e3e9; border-radius: 10px;
  background: #fff; padding: 11px 12px; font-size: 14.5px; color: #22262e;
  outline: none; transition: border-color .15s;
}
.ly-input:focus, .ly-textarea:focus { border-color: #5b6b7f; }
.ly-textarea { min-height: 130px; resize: none; line-height: 1.65; }
.ly-submit {
  margin-top: 22px; width: 100%; padding: 13px 0; border: none; border-radius: 12px;
  background: #5b6b7f; color: #fff; font-size: 15.5px; font-weight: 600; cursor: pointer;
  transition: background .15s, transform .12s;
}
.ly-submit:active { background: #3d4a5c; transform: scale(.98); }
.ly-submit[disabled] { background: #b9bec7; cursor: not-allowed; }
.ly-tip { font-size: 12.5px; color: #9aa1ab; margin-top: 10px; text-align: center; line-height: 1.7; }

/* ---------- 留言列表 ---------- */
.ly-card {
  background: #fff; border: 1px solid #e3e7ee; border-radius: 12px;
  padding: 13px 14px; margin-bottom: 10px; cursor: pointer;
  transition: transform .12s;
}
.ly-card:active { transform: scale(.985); }
.ly-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ly-card-title { font-size: 15px; font-weight: 600; color: #22262e; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ly-badge { flex-shrink: 0; font-size: 11.5px; font-weight: 600; border-radius: 6px; padding: 2px 8px; }
.ly-badge-0 { background: #eceef2; color: #9aa1ab; }   /* 已提交 */
.ly-badge-1 { background: #e8effd; color: #1d4ed8; }   /* 处理中 */
.ly-badge-2 { background: #eaf7ee; color: #15803d; }   /* 已采纳 */
.ly-badge-3 { background: #eaf7ee; color: #15803d; }   /* 已回复 */
.ly-card-meta { font-size: 12px; color: #9aa1ab; margin-top: 7px; display: flex; gap: 10px; }
.ly-card-sum { font-size: 13px; color: #5a6472; margin-top: 6px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ly-empty { text-align: center; color: #9aa1ab; font-size: 13.5px; padding: 60px 20px; line-height: 2; }
.ly-empty .ly-go { color: #5b6b7f; font-weight: 600; }

/* ---------- 详情与回复 ---------- */
.ly-detail-title { font-size: 17px; font-weight: 700; color: #22262e; line-height: 1.5; }
.ly-detail-meta { font-size: 12px; color: #9aa1ab; margin: 8px 0 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.ly-detail-content { font-size: 14.5px; color: #22262e; line-height: 1.8; white-space: pre-wrap; background: #fff; border: 1px solid #e3e7ee; border-radius: 12px; padding: 14px; }
.ly-reply-box { margin-top: 14px; background: #eef3f9; border-left: 4px solid #5b6b7f; border-radius: 0 12px 12px 0; padding: 12px 14px; }
.ly-reply-who { font-size: 12.5px; font-weight: 700; color: #3d4a5c; margin-bottom: 5px; }
.ly-reply-text { font-size: 14px; color: #22262e; line-height: 1.75; white-space: pre-wrap; }
.ly-reply-time { font-size: 11.5px; color: #9aa1ab; margin-top: 6px; }

/* ---------- 轻提示 ---------- */
.ly-toast {
  position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%);
  z-index: 9999; background: rgba(34,38,46,.88); color: #fff;
  font-size: 13.5px; border-radius: 10px; padding: 9px 18px;
  animation: lyUp .18s ease-out; max-width: 80%; text-align: center;
}

/* ---------- 登录小卡（首次使用留言，验证身份） ---------- */
.ly-login-card { background: #fff; border: 1px solid #e3e7ee; border-radius: 14px; padding: 20px 16px; margin-top: 30px; }
.ly-login-title { font-size: 15.5px; font-weight: 700; color: #22262e; text-align: center; }
.ly-login-sub { font-size: 12.5px; color: #9aa1ab; text-align: center; margin: 8px 0 16px; line-height: 1.7; }
.ly-code-row { display: flex; gap: 8px; }
.ly-code-row .ly-input { flex: 1; }
.ly-code-btn { flex-shrink: 0; width: 108px; border: 1px solid #5b6b7f; background: #fff; color: #5b6b7f; border-radius: 10px; font-size: 13px; cursor: pointer; }
.ly-code-btn[disabled] { border-color: #b9bec7; color: #b9bec7; cursor: not-allowed; }

@media (min-width: 640px) {
  .ly-page { max-width: 560px; left: 50%; transform: translateX(-50%); box-shadow: 0 0 40px rgba(0,0,0,.12); }
  @keyframes lyPageIn { from { transform: translateX(calc(-50% + 24px)); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
}
