:root {
  --bg: #ededed;
  --panel: #f7f7f7;
  --mine: #95ec69;
  --theirs: #fff;
  --sys: #b2b2b2;
  --text: #111;
  --muted: #888;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); }
.app { display: flex; flex-direction: column; height: 100%; max-width: 720px; margin: 0 auto; background: var(--panel); }
.top { padding: 12px 16px; background: #393a3e; color: #fff; }
.top .title { font-weight: 600; }
.top .sub { font-size: 12px; opacity: .85; margin-top: 2px; }
.msgs { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; }
.row.mine { justify-content: flex-end; }
.row.system { justify-content: center; }
.bubble { max-width: 78%; padding: 8px 12px; border-radius: 8px; background: var(--theirs); box-shadow: 0 1px 1px rgba(0,0,0,.06); white-space: pre-wrap; word-break: break-word; line-height: 1.45; font-size: 15px; }
.row.mine .bubble { background: var(--mine); }
.row.system .bubble { background: transparent; box-shadow: none; color: var(--sys); font-size: 12px; max-width: 92%; text-align: center; }
.meta { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.bubble img, .bubble video { display: block; max-width: 100%; border-radius: 6px; }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 10px; background: #f5f5f5; border-top: 1px solid #e5e5e5; }
.composer textarea { flex: 1; resize: none; border: 1px solid #ddd; border-radius: 8px; padding: 10px; font: inherit; max-height: 120px; }
.composer button, .icon-btn { border: 0; background: #07c160; color: #fff; border-radius: 8px; padding: 10px 14px; font: inherit; cursor: pointer; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: #ddd; color: #333; font-size: 22px; }

/* 如何发截图 · 常驻 + 可折叠 */
.shot-bar {
  background: #fafafa;
  border-top: 1px solid #e8e8e8;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.shot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.shot-title {
  font-size: 12px;
  font-weight: 600;
  color: #333;
}
.shot-fold {
  border: 0;
  background: transparent;
  color: #888;
  font: inherit;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
}
.shot-fold:hover { background: #eee; color: #333; }
.shot-body { display: flex; flex-direction: column; gap: 6px; }
.shot-bar.is-collapsed { gap: 0; padding: 6px 10px; }
.shot-bar.is-collapsed .shot-body { display: none; }
.shot-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #444;
  line-height: 1.4;
}
.shot-os {
  font-weight: 600;
  color: #333;
  min-width: 7.5em;
  flex-shrink: 0;
}
.shot-keys { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.shot-keys .plus { color: #999; font-size: 11px; }
.shot-desc { color: #666; }
.shot-desc kbd {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid #ccc;
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #f7f7f7;
  font-size: 11px;
  font-family: inherit;
  color: #333;
  min-height: auto;
}
kbd {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  border: 1px solid #cfcfcf;
  border-bottom-width: 2px;
  border-radius: 5px;
  background: linear-gradient(#fff, #f3f3f3);
  font-size: 11px;
  font-family: inherit;
  color: #222;
  min-height: 22px;
}
.win-key {
  background: linear-gradient(#2b2b2b, #111);
  color: #fff;
  border-color: #333;
  font-weight: 600;
}
.win-key .win-svg { display: block; flex-shrink: 0; }
.shot-mobile { display: none; }

@media (max-width: 640px) {
  .shot-desktop { display: none; }
  .shot-mobile { display: flex; }
  .shot-bar { padding: 6px 10px; }
}

/* payment bubble */
.pay-bubble .pay-head { font-weight: 600; margin-bottom: 4px; }
.pay-bubble .pay-desc { font-size: 12px; color: #666; margin-bottom: 6px; }
.pay-bubble .pay-qr { max-width: 200px !important; margin: 6px 0; background: #fff; padding: 6px; border-radius: 8px; }
.pay-bubble .pay-tip { font-size: 12px; color: #888; }
.pay-bubble .pay-paid {
  display: inline-block; margin-top: 6px; padding: 4px 10px; border-radius: 999px;
  background: #dcfce7; color: #166534; font-weight: 600; font-size: 13px;
}
