/* ============ 基础 ============ */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --green:        #07C160;
  --green-press:  #06AD56;
  --bubble:       #95EC69;
  --bg:           #EDEDED;
  --bar:          #F7F7F7;
  --white:        #FFFFFF;
  --text:         #191919;
  --text-2:       #7F7F7F;
  --text-3:       #9A9A9A;
  --text-4:       #C2C2C2;
  --line:         rgba(0, 0, 0, .08);
  --line-strong:  rgba(0, 0, 0, .14);
  --link:         #576B95;
  --red:          #FA5151;
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
}

html, body { height: 100%; }

body {
  margin: 0;
  background: #E9E9E9;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

[hidden] { display: none !important; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ico {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  display: block; flex: 0 0 auto;
}
.ico.sm { width: 17px; height: 17px; stroke-width: 1.9; }

button { font-family: inherit; cursor: pointer; }

/* ============ 外壳 ============ */
.app {
  position: relative;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

.shell { display: flex; flex-direction: column; height: 100%; min-height: 0; }

/* ============ 顶部导航 ============ */
.nav {
  flex: 0 0 auto;
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 6;
}

.nav-title {
  flex: 1;
  margin: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: .2px;
  color: var(--text);
}

.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 0; border-radius: var(--r-md);
  background: transparent;
  color: #2C2C2C;
}
.icon-btn:active { background: rgba(0, 0, 0, .06); }
.icon-btn .ico { width: 21px; height: 21px; }

/* 筛选按钮：非「全部」时右上角绿点提示当前有筛选 */
.filter-btn { position: relative; }
.filter-btn::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 2px var(--bg);   /* 与图标留出一圈底色，避免糊在一起 */
  opacity: 0;
  transform: scale(.4);
  transition: opacity .16s, transform .16s;
}
.filter-btn.on::after { opacity: 1; transform: none; }

/* ============ 内容区 ============ */
.content { position: relative; flex: 1 1 auto; min-height: 0; }

.pane { position: absolute; inset: 0; display: flex; flex-direction: column; }

/* ============ 消息流 ============ */
.msg-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 12px 16px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.msg-list { display: flex; flex-direction: column; }

.day-sep { text-align: center; margin: 14px 0 12px; }
.day-sep span {
  display: inline-block;
  font-size: 11.5px;
  color: var(--text-3);
  background: rgba(0, 0, 0, .035);
  padding: 2px 8px;
  border-radius: var(--r-sm);
}

.msg-row {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 14px;
  animation: rowIn .18s ease-out;
}

.msg-row.static { animation: none; }

@keyframes rowIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

.avatar {
  width: 34px; height: 34px;
  border-radius: 5px;
  background: var(--green);
  color: #fff;
  display: grid; place-items: center;
  flex: 0 0 auto;
}
.avatar .ico { width: 19px; height: 19px; stroke-width: 1.8; }

.bubble {
  position: relative;
  max-width: min(68%, 460px);
  background: var(--bubble);
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.5;
  padding: 9px 12px;
  border-radius: 6px;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.bubble::after {
  content: "";
  position: absolute;
  right: -5px; top: 12px;
  border: 5px solid transparent;
  border-left-color: var(--bubble);
  border-right-width: 0;
}

.bubble.flash { box-shadow: 0 0 0 2px rgba(7, 193, 96, .6); }
.msg-row.flash .bubble { box-shadow: 0 0 0 2px rgba(7, 193, 96, .55); transition: box-shadow .3s; }

/* 文件气泡 */
.bubble.file { background: transparent; padding: 0; max-width: min(80%, 340px); }
.bubble.file::after { display: none; }
.bubble.file.flash { background: rgba(7, 193, 96, .12); border-radius: 8px; }

.file-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border-radius: var(--r-md);
  padding: 11px 12px;
  min-width: 188px;
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .05), 0 1px 3px rgba(0, 0, 0, .04);
  cursor: pointer;
  transition: background .15s;
}
.file-card:active { background: #FAFAFA; }

.file-ext {
  width: 40px; height: 40px;
  border-radius: 7px;
  display: grid; place-items: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  flex: 0 0 auto;
  white-space: nowrap;
  overflow: hidden;
  text-transform: uppercase;
}

.file-meta { flex: 1; min-width: 0; }

.file-name {
  font-size: 14px;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.file-size { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }

.file-dl {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 6px;
  color: var(--text-2);
  flex: 0 0 auto;
}
.file-dl .ico { width: 18px; height: 18px; }
.file-card:hover .file-dl { color: var(--green); background: rgba(7, 193, 96, .08); }

.bar {
  height: 2px;
  background: #EDEDED;
  border-radius: 2px;
  margin-top: 7px;
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--green);
  transition: width .18s linear;
}

/* 列表顶部（更早消息区） */
.list-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 0 6px;
  font-size: 12px;
  color: var(--text-4);
}
.list-foot.top { padding: 10px 0 12px; }

/* 加载更早：浮层提示，不参与布局，避免列表高度变化导致视口跳动 */
.msg-loading {
  position: absolute;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, .5);
  color: #fff;
  font-size: 12px;
  z-index: 5;
  pointer-events: none;
}
.msg-loading .spin { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }

.spin {
  width: 12px; height: 12px;
  border: 1.5px solid rgba(0, 0, 0, .12);
  border-top-color: var(--text-3);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 回到最新 */
.to-latest {
  position: absolute;
  right: 14px; bottom: 14px;
  width: 36px; height: 36px;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .96);
  color: #4A4A4A;
  display: grid; place-items: center;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .14);
  z-index: 4;
}
.to-latest .ico { width: 18px; height: 18px; }

/* ============ 空状态 ============ */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 20px;
  text-align: center;
}
.empty-ico { width: 46px; height: 46px; color: #CFCFCF; stroke-width: 1.3; }
.empty p { margin: 12px 0 4px; font-size: 15px; color: var(--text-2); }
.empty span { font-size: 13px; color: var(--text-4); }

/* ============ 输入区 ============ */
.composer {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bar);
  border-top: 1px solid var(--line);
}

.tool-btn {
  width: 32px; height: 32px;
  margin-bottom: 1px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--white);
  color: #3A3A3A;
  display: grid; place-items: center;
  flex: 0 0 auto;
}
.tool-btn:active { background: #EFEFEF; }
.tool-btn .ico { width: 18px; height: 18px; stroke-width: 1.9; }

.input-wrap {
  flex: 1 1 auto;
  min-width: 0;
  background: var(--white);
  border-radius: 6px;
  padding: 7px 10px;
}

#textInput {
  display: block;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  resize: none;
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  color: var(--text);
  max-height: 96px;
  overflow-y: auto;
}
#textInput::placeholder { color: #B9B9B9; }

.send-btn {
  height: 32px;
  padding: 0 14px;
  margin-bottom: 1px;
  border: 0;
  border-radius: 5px;
  background: var(--green);
  color: #fff;
  font-size: 14px;
  flex: 0 0 auto;
  transition: background .15s;
}
.send-btn:disabled { background: #DCDCDC; }

/* ============ 底部 Tab ============ */
.tabbar {
  flex: 0 0 auto;
  display: flex;
  background: var(--bar);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.tab {
  flex: 1;
  border: 0;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0 5px;
  font-size: 11px;
  color: var(--text-2);
}
.tab .ico { width: 22px; height: 22px; stroke-width: 1.6; }
.tab.active { color: var(--green); }

/* ============ 文件页 ============ */
.files-head { flex: 0 0 auto; padding: 12px 12px 10px; background: var(--bg); position: relative; }
.files-head::after {
  content: "";
  position: absolute;
  top: 34px; right: 0; bottom: 8px;
  width: 26px;
  background: linear-gradient(to right, rgba(237, 237, 237, 0), var(--bg));
  pointer-events: none;
}

.stats { font-size: 12px; color: var(--text-2); margin-bottom: 10px; }

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  padding: 5px 12px;
  border: 0;
  border-radius: 14px;
  background: var(--white);
  color: #565656;
  font-size: 13px;
  white-space: nowrap;
}
.chip.active { background: rgba(7, 193, 96, .13); color: var(--green); }

.files-scroll { flex: 1; overflow-y: auto; padding: 0 12px 18px; -webkit-overflow-scrolling: touch; }

.files-grid { display: block; }

/* 日期分组头（滚动时吸顶） */
.file-day {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 -12px;
  padding: 10px 12px 7px;
  background: var(--bg);
  font-size: 12.5px;
  color: var(--text-2);
  font-weight: 500;
}
.file-day .day-meta {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-4);
}
.file-day:first-child { padding-top: 8px; }

.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
}
.file-item .file-name { font-size: 14px; -webkit-line-clamp: 2; }
.file-item .file-dl:hover { color: var(--green); background: rgba(7, 193, 96, .08); }

.file-item .file-more {
  opacity: 0;
  display: grid;
  background: none;
}
.file-item:hover .file-more { opacity: 1; }
@media (hover: none) {
  .file-item .file-more { display: grid; opacity: .5; }
}

/* ============ 搜索 ============ */
.search-layer {
  position: absolute;
  inset: 0;
  background: var(--bg);
  z-index: 20;
  display: flex;
  flex-direction: column;
}

.search-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: var(--bg);
}

.search-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border-radius: 6px;
  padding: 0 9px;
  height: 34px;
  color: var(--text-3);
}
.search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--text);
}
.search-field input::-webkit-search-cancel-button { display: none; }

.text-btn {
  border: 0;
  background: none;
  color: var(--link);
  font-size: 15px;
  padding: 6px 4px;
  flex: 0 0 auto;
}

.results { flex: 1; overflow-y: auto; padding: 4px 12px 18px; }

.result {
  background: var(--white);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background .15s;
}
.result:active { background: #FAFAFA; }

.result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-3);
  margin-bottom: 6px;
}

.result-kind {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(0, 0, 0, .04);
  color: var(--text-2);
}

.result-text {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

mark { background: rgba(7, 193, 96, .26); color: #0B6B39; border-radius: 2px; padding: 0 1px; }

.search-empty {
  padding: 60px 20px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-3);
}
.search-tip { padding: 24px 8px; font-size: 13px; color: var(--text-3); text-align: center; }

/* ============ 上下文菜单 ============ */
.ctx-menu {
  position: fixed;
  z-index: 60;
  min-width: 132px;
  padding: 4px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .16);
  animation: popIn .12s ease-out;
}
@keyframes popIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

.ctx-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 6px;
  background: none;
  font-size: 14.5px;
  color: var(--text);
  text-align: left;
}
.ctx-item:active { background: #F2F2F2; }
.ctx-item .ico { width: 17px; height: 17px; color: var(--text-2); }
.ctx-item .ico.check { color: var(--green); }
.ctx-item .ico.check.off { visibility: hidden; }
.ctx-item.checked { color: var(--green); font-weight: 500; }
.ctx-item.danger { color: var(--red); }
.ctx-item.danger .ico { color: var(--red); }

/* ============ 弹窗 ============ */
.modal {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .45);
  animation: fadeIn .16s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.dialog {
  width: 82%;
  max-width: 300px;
  background: var(--white);
  border-radius: var(--r-lg);
  overflow: hidden;
  animation: popIn .16s ease-out;
}

.dialog-body {
  padding: 26px 22px 22px;
  text-align: center;
  font-size: 15px;
  line-height: 1.55;
  color: #3A3A3A;
}

.dialog-actions { display: flex; border-top: 1px solid var(--line); }

.dialog-actions button {
  flex: 1;
  padding: 14px;
  border: 0;
  background: none;
  font-size: 16px;
  color: var(--text);
}
.dialog-actions button + button { border-left: 1px solid var(--line); }
.dialog-actions .danger { color: var(--red); }
.dialog-actions button:active { background: #F2F2F2; }

/* ============ Toast ============ */
.toast {
  position: absolute;
  left: 50%;
  bottom: 120px;
  transform: translate(-50%, 8px);
  padding: 9px 18px;
  border-radius: var(--r-md);
  background: rgba(0, 0, 0, .76);
  color: #fff;
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 70;
  max-width: 76%;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ 拖拽上传 ============ */
.drop-zone {
  position: absolute;
  inset: 0;
  z-index: 45;
  background: rgba(237, 237, 237, .92);
  display: grid;
  place-items: center;
}
.drop-inner {
  border: 2px dashed var(--green);
  border-radius: 16px;
  padding: 40px 56px;
  color: var(--green);
  font-size: 16px;
  background: rgba(7, 193, 96, .04);
}

/* ============ 登录 ============ */
.login {
  position: absolute;
  inset: 0;
  z-index: 55;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
}

.login-inner { width: 100%; max-width: 336px; text-align: center; }

.logo {
  width: 64px; height: 64px;
  margin: 0 auto 20px;
  border-radius: 16px;
  background: var(--green);
  display: grid; place-items: center;
  box-shadow: 0 8px 20px rgba(7, 193, 96, .26);
}
.logo .ico { width: 34px; height: 34px; color: #fff; stroke-width: 1.5; }

.login-title { margin: 0; font-size: 21px; font-weight: 500; letter-spacing: .3px; }
.login-sub { margin: 9px 0 32px; font-size: 13.5px; color: var(--text-3); }

.login-form { text-align: left; }

.field {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 12px;
  background: #F5F5F5;
  border-radius: var(--r-md);
  margin-bottom: 14px;
}
.field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--text);
}
.field input::placeholder { color: #B0B0B0; }

.field-eye {
  border: 0;
  background: none;
  color: var(--link);
  font-size: 13px;
  padding: 4px 0 4px 10px;
  flex: 0 0 auto;
}

.btn-primary {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--green);
  color: #fff;
  font-size: 16px;
  letter-spacing: .5px;
  transition: background .15s;
}
.btn-primary:active { background: var(--green-press); }

.login-hint { min-height: 18px; margin: 10px 0 0; font-size: 13px; color: var(--red); }

.login-foot {
  position: absolute;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  left: 0; right: 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-4);
}

.msg-time {
  align-self: flex-end;
  margin: 0 5px 3px 0;
  font-size: 10.5px;
  line-height: 1;
  color: #ADADAD;
  white-space: nowrap;
  flex: 0 0 auto;
}

/* ============ 行内更多按钮 ============ */
.row-more {
  width: 24px; height: 24px;
  margin: 0 2px 0 0;
  align-self: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .05);
  color: var(--text-2);
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity .15s, background .15s;
}
.row-more .ico { width: 15px; height: 15px; stroke-width: 2.2; }
.msg-row:hover .row-more { opacity: 1; }
.row-more:active { background: rgba(0, 0, 0, .12); }
.file-item { cursor: pointer; }

/* ============ 搜索结果中的文件 ============ */
.result-file { display: flex; align-items: center; gap: 10px; }
.result-file .file-ext { width: 34px; height: 34px; font-size: 9.5px; }
.result-file-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.result-file-meta .result-text { -webkit-line-clamp: 1; font-size: 14px; }
.result-file-meta .file-size { margin-top: 0; }

@media (hover: none) {
  .row-more { display: none; }
  .bubble .file-dl { display: none; }
}

/* ============ 响应式 ============ */
@media (min-width: 640px) {
  .msg-scroll { padding: 14px 18px 20px; }
  .bubble { font-size: 15.5px; }
}

/* 文件页：桌面端自适应多列（最多 3 列），移动端保持单列 */
@media (min-width: 768px) {
  .files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 8px;
    align-items: stretch;
  }
  .file-day {
    grid-column: 1 / -1;
    margin: 0;
    padding: 10px 0 7px;
  }
  .file-day:first-child { padding-top: 8px; }
  .file-item { margin-bottom: 0; height: 100%; }
}

@media (min-width: 900px) {
  body { background: #E4E4E4; }
  .app { box-shadow: 0 0 0 1px rgba(0, 0, 0, .05), 0 16px 48px rgba(0, 0, 0, .10); }
}

@media (hover: none) {
  .file-card:hover .file-dl { color: var(--text-2); background: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============ 设置页 ============ */
.settings-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px calc(28px + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
}

.setting-card {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-bottom: 14px;
}
.setting-label {
  font-size: 13.5px;
  color: var(--text-2);
  margin-bottom: 10px;
}
.setting-value { font-size: 15px; color: var(--text); }
.setting-card .field { background: #F5F5F5; margin-bottom: 10px; }
.setting-card .btn-primary { margin-top: 4px; }
.setting-card .login-hint { margin-bottom: 0; }

.setting-btn {
  display: block;
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--white);
  font-size: 15.5px;
  color: var(--text);
}
.setting-btn.danger { color: var(--red); }
.setting-btn:active { background: #F2F2F2; }

.settings-foot {
  margin: 22px 0 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-4);
}

/* ============ 上传状态 ============ */
.cancel-up {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .06);
  color: var(--text-2);
  font-size: 12px;
  line-height: 1;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.cancel-up:active { background: rgba(0, 0, 0, .14); }

.msg-row.sending { opacity: .72; }

.msg-row.failed { flex-wrap: wrap; }
.msg-row.failed .fail-tip { order: 5; }
.fail-tip {
  width: 100%;
  text-align: right;
  padding-right: 44px;
  margin-top: -6px;
  font-size: 11.5px;
  color: var(--red);
}
.link-btn {
  border: 0;
  background: none;
  color: var(--link);
  font-size: 11.5px;
  padding: 0 2px;
}
.link-btn:hover { text-decoration: underline; }
