:root{ --notice-h: 40px; }

/* 顶部固定提示框与 header 位置 */
.fixed-notice{position:fixed;top:0;left:0;right:0;height:var(--notice-h);display:flex;align-items:center;justify-content:center;padding:0 12px;background:linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.75));backdrop-filter:saturate(160%) blur(6px);border-bottom:1px solid var(--line);z-index:999;font-size:13px;color:#0f172a}
header{top:var(--notice-h)}

/* 高度与滚动体验修正 */
.container{min-height:100dvh}
.chatlog{-webkit-overflow-scrolling:touch;margin-top:0}
.file-board .file-scroll{-webkit-overflow-scrolling:touch}

/* 留言板布局：上方消息、下方输入（iMessage风） */
.message-board .board-body{display:flex;flex-direction:column;gap:10px}

/* 移动端优化 */
@media (max-width: 640px){
  header{padding:12px 14px}
  .container{box-shadow:none}
  .message-board,.file-board{margin:10px 10px;border-radius:16px}
  .board-head{padding:10px 12px}
  .board-body{padding:10px 12px}
  .chat-id input{min-width:120px}
  .chat-actions button{padding:10px 16px}
  .chat-input{min-height:72px;font-size:16px}
  .chatlog{max-height:none}
  .message-board .board-body{display:grid;grid-template-rows:1fr auto;gap:10px;max-height:calc(100dvh - var(--notice-h) - 120px)}
  .message-board .chatbox{position:sticky;bottom:calc(env(safe-area-inset-bottom,0px));background:linear-gradient(180deg,#fff, #fbfbfc);padding-bottom:calc(env(safe-area-inset-bottom,0px));border-top:1px solid var(--line)}
  .chatlog-item .imgs img{max-width:calc(100vw - 56px);max-height:50vh}
  .file-board .file-scroll{max-height:50dvh}
}

