/* 金沙观澜横幅与会话列表底部操作区。 */
.sidebar { min-height: 0; }
.sidebar > .me, .sidebar > .search-bar, .sidebar > .search-result { flex-shrink: 0; }
.sidebar .search-bar input { min-width: 0; }
.sidebar .search-bar .btn { flex-shrink: 0; white-space: nowrap; }
.sidebar .conv-list { min-height: 0; padding-bottom: 12px; }
.jinsha-banner {
  position: relative;
  display: block;
  flex-shrink: 0;
  height: 160px;
  margin: 0 12px 6px;
  overflow: hidden;
  border: 1px solid #dfd7bd;
  border-radius: 14px;
  background: #f0e7cf;
  color: #203e3b;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.jinsha-banner-image { width: 100%; height: 100%; display: block; object-fit: cover; }
.jinsha-banner.image-only .jinsha-banner-copy { display: none; }
.jinsha-banner.image-only .jinsha-banner-image { object-fit: contain; }
.jinsha-banner-copy {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  padding: 18px 20px;
  background: linear-gradient(90deg, rgba(247, 242, 222, .94), rgba(247, 242, 222, .65) 42%, transparent 76%);
}
.jinsha-banner-eyebrow { font-size: 9px; font-weight: 600; letter-spacing: 2px; color: #716243; }
.jinsha-banner-title {
  margin: 7px 0 5px;
  font: 600 29px/1.2 "Songti SC", "SimSun", "Noto Serif CJK SC", serif;
  letter-spacing: 4px;
}
.jinsha-banner-subtitle { font-size: 11px; letter-spacing: 1.6px; color: #4d6159; }
.jinsha-banner-cta {
  display: inline-flex; gap: 16px; align-items: center;
  margin-top: 14px; padding: 5px 11px; border: 1px solid rgba(96, 99, 66, .38);
  border-radius: 999px; font-size: 10px; line-height: 1.4; background: rgba(255, 253, 241, .35);
}
.jinsha-banner:hover { border-color: #a49361; }
.jinsha-banner:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.sidebar-footer {
  flex-shrink: 0; gap: 8px;
  padding: 12px 12px max(12px, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border); background: var(--panel);
}
.sidebar-footer .btn { min-width: 0; min-height: 44px; white-space: nowrap; }
@media (max-width: 768px) {
  .jinsha-banner { height: clamp(148px, 44vw, 196px); }
  .jinsha-banner-title { font-size: clamp(29px, 8vw, 36px); }
  .jinsha-banner-copy { padding-left: 22px; }
  .jinsha-banner-subtitle { font-size: 12px; }
  .jinsha-banner-cta { font-size: 11px; }
  .keyboard-open .sidebar-footer { padding-bottom: 8px; }
}
/* 横屏或键盘占据空间时压缩横幅，给会话列表留出滚动区域。 */
@media (max-height: 600px) {
  .jinsha-banner { height: 108px; }
  .jinsha-banner-copy { padding-top: 10px; padding-bottom: 10px; }
  .jinsha-banner-title { margin: 3px 0; font-size: 25px; }
  .jinsha-banner-cta { margin-top: 6px; padding-top: 2px; padding-bottom: 2px; }
  .jinsha-banner-eyebrow { display: none; }
  .sidebar-footer { padding-top: 8px; }
}
.keyboard-open .jinsha-banner { height: 90px; }
.keyboard-open .jinsha-banner-copy { padding-top: 8px; padding-bottom: 8px; }
.keyboard-open .jinsha-banner-title { margin: 0 0 4px; font-size: 25px; }
.keyboard-open .jinsha-banner-eyebrow, .keyboard-open .jinsha-banner-cta { display: none; }

/* 自定义整图按原图比例撑开，覆盖手机、横屏和键盘状态的固定高度。 */
.jinsha-banner.image-only { height: auto; background: transparent; }
.jinsha-banner.image-only .jinsha-banner-image { height: auto; }
/* 横屏和软键盘打开时优先保留列表与底部导航。 */
@media (max-height: 600px) {
  .jinsha-banner.image-only .jinsha-banner-image { max-height: 108px; object-fit: contain; }
}
@media (max-height: 480px) {
  .jinsha-banner { display: none; }
}
.keyboard-open .jinsha-banner { display: none; }
