/* 不用 inset、flex gap：老安卓系统 WebView（Chrome 84 以下）、iOS 14.5 以下不认 */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  display: flex; flex-direction: column;
  font: 15px/1.5 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #4a3a2a; background: #f6efe2;
  -webkit-text-size-adjust: 100%;
}
.list { flex: 1; overflow-y: auto; padding: 12px; -webkit-overflow-scrolling: touch; }
/* 游戏面板自带标题和关闭按钮，页面不再放顶栏；保留天数作为列表最上面的一行小字 */
.keep { text-align: center; color: #b3a088; font-size: 12px; margin-bottom: 4px; }
.keep:empty { display: none; }
.hint { text-align: center; color: #a08a70; font-size: 13px; margin: 8px 0; }
.time { text-align: center; color: #b3a088; font-size: 12px; margin: 10px 0 4px; }
.row { display: flex; margin: 6px 0; }
.row.me { justify-content: flex-end; }
.who { flex: none; width: 36px; height: 36px; border-radius: 50%; background: #c08040; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; margin-right: 8px; }
.bubble { max-width: 72%; padding: 8px 12px; border-radius: 10px; background: #fffaf2;
  box-shadow: 0 1px 2px rgba(120, 80, 30, .15); white-space: pre-wrap; word-break: break-word; }
.row.me .bubble { background: #ffe2a8; }
.bubble img, .bubble video { display: block; max-width: 100%; max-height: 260px; border-radius: 6px; }
.bubble img { cursor: zoom-in; }
.bubble .cap { margin-top: 6px; }
.bubble.sending { opacity: .6; }
.input {
  flex: none; display: flex; align-items: flex-end; padding: 8px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
}
.input > * + * { margin-left: 6px; }
.input textarea {
  flex: 1; min-height: 38px; max-height: 120px; resize: none; padding: 8px 10px; overflow-y: hidden;
  border: 1px solid #d8c4a0; border-radius: 8px; font: inherit; color: inherit; background: #fff;
}
.input button { flex: none; height: 38px; padding: 0 12px; border: 0; border-radius: 8px; font: inherit; cursor: pointer; }
.input .tool { background: #fff8ec; color: #8c5a2b; border: 1px solid #d8c4a0; }
.input .send { background: #c0701f; color: #fff; }
.input button:disabled { opacity: .5; }
.expired { flex: none; padding: 14px 16px; text-align: center; color: #8c5a2b; }
.input, .expired { background: #efe4d0; border-top: 1px solid #e0d0b4; }
.viewer { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0, 0, 0, .85); display: flex; align-items: center; justify-content: center; z-index: 10; }
.viewer img { max-width: 100%; max-height: 100%; }
.toast { position: fixed; left: 50%; top: 40%; transform: translateX(-50%); max-width: 80%;
  padding: 10px 16px; border-radius: 8px; background: rgba(40, 30, 20, .88); color: #fff; font-size: 14px; z-index: 20; text-align: center; }
[hidden] { display: none !important; }
