/* FileHelper — WeChat-inspired green skin.
   Palette intentionally mirrors WeChat: #07C160 primary, #EDEDED chat canvas. */

:root {
  --wx-green: #07c160;
  --wx-green-dark: #06ad56;
  --wx-green-darker: #059a4c;
  --wx-green-soft: #e8f8ef;
  --wx-header: #ededed;
  --wx-bg: #f5f5f5;
  --wx-chat-bg: #ededed;
  --wx-bubble-me: #95ec69;
  --wx-bubble-me-edge: #89e05f;
  --wx-bubble-you: #ffffff;
  --wx-text: #191919;
  --wx-text-sub: #888888;
  --wx-text-faint: #b2b2b2;
  --wx-line: #e3e3e3;
  --wx-danger: #fa5151;
  --wx-warn: #ffc300;
  --wx-blue: #576b95;
  --shadow-1: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-2: 0 6px 24px rgba(0, 0, 0, 0.14);
  --radius: 12px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  /* Width of the centred application column on very wide displays (ultrawide
     monitors, 4K desktops). Below --shell-breakpoint the app uses the full
     viewport, so phones and tablets behave exactly as before. */
  --shell-max: 1100px;
  --shell-breakpoint: 1180px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--wx-text);
  background: var(--wx-bg);
  overscroll-behavior-y: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

input,
textarea {
  font-family: inherit;
  font-size: inherit;
}

.hidden {
  display: none !important;
}

#app {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* On an ultrawide monitor a full-bleed chat is genuinely unpleasant to read:
   one line would run 3800px. Past --shell-breakpoint the whole app becomes a
   centred column with a slightly darker letterbox either side. */
@media (min-width: 1180px) {
  body {
    background: #e4e4e4;
  }

  #app {
    width: 100%;
    max-width: var(--shell-max);
    margin: 0 auto;
    background: var(--wx-bg);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 10px 40px rgba(0, 0, 0, 0.09);
  }

  /* inside a bounded column the inner 980px constraint is redundant */
  .input-row,
  .input-hint {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }
}

/* Below the breakpoint the centred shell does not apply at all, so the
   desktop rule above and the older tablet rule never fight. */
@media (min-width: 1180px) {
  .msg-body {
    max-width: min(72%, 660px);
  }
}

/* ------------------------------------------------------------- login view */

.login-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(170deg, #f7f7f7 0%, #ededed 100%);
}

.login-card {
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-2);
  padding: 32px 24px 24px;
  text-align: center;
}

.login-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 20px;
  background: var(--wx-green);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(7, 193, 96, 0.32);
}

.login-logo svg {
  width: 42px;
  height: 42px;
  fill: #fff;
}

.login-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.login-sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--wx-text-sub);
  line-height: 1.6;
}

.login-sub .slogan {
  color: var(--wx-green-dark);
  font-weight: 600;
}

.login-form {
  margin-top: 24px;
}

.pin-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--wx-line);
  border-radius: 10px;
  background: #fafafa;
  text-align: center;
  letter-spacing: 3px;
  font-size: 17px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.pin-input:focus {
  border-color: var(--wx-green);
  background: #fff;
}

.btn-primary {
  width: 100%;
  margin-top: 14px;
  padding: 13px 16px;
  border-radius: 10px;
  background: var(--wx-green);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  transition: background 0.15s, transform 0.05s;
}

.btn-primary:hover {
  background: var(--wx-green-dark);
}

.btn-primary:active {
  background: var(--wx-green-darker);
  transform: scale(0.995);
}

.btn-primary:disabled {
  background: #b9e6cb;
  cursor: default;
}

.login-error {
  margin-top: 12px;
  min-height: 18px;
  color: var(--wx-danger);
  font-size: 13px;
}

.login-foot {
  margin-top: 20px;
  font-size: 12px;
  color: var(--wx-text-faint);
}

.login-status {
  margin-top: 10px;
  font-size: 12px;
  color: var(--wx-text-sub);
}

/* ------------------------------------------------------------ chat header */

.chat-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--wx-chat-bg);
}

.chat-header {
  flex: none;
  height: 52px;
  padding: 0 10px;
  background: var(--wx-header);
  border-bottom: 1px solid #dcdcdc;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 5;
}

.header-title {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.header-title .t1 {
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-title .t2 {
  font-size: 11px;
  color: var(--wx-text-sub);
  margin-top: 1px;
}

.header-title .t2 .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--wx-green);
  margin-right: 4px;
  vertical-align: 1px;
}

.header-title .t2 .dot.off {
  background: var(--wx-text-faint);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4c4c4c;
  flex: none;
}

.icon-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.icon-btn.active {
  background: var(--wx-green-soft);
  color: var(--wx-green-dark);
}

.icon-btn svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

/* ------------------------------------------------------------ chat canvas */

.chat-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column-reverse;
  padding: 12px 12px 4px;
  scrollbar-width: thin;
}

.chat-scroll::-webkit-scrollbar {
  width: 8px;
}

.chat-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.16);
  border-radius: 4px;
}

.msg-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 8px;
}

.day-sep,
.sys-sep {
  align-self: center;
  font-size: 12px;
  color: #fff;
  background: rgba(0, 0, 0, 0.16);
  border-radius: 4px;
  padding: 2px 8px;
  margin: 4px 0;
}

.empty-state {
  margin: auto;
  text-align: center;
  color: var(--wx-text-sub);
  padding: 40px 20px;
  width: 100%;
}

.empty-state .big {
  font-size: 15px;
  font-weight: 600;
  color: #6d6d6d;
}

.empty-state .small {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.8;
}

.empty-state code {
  background: #e2e2e2;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 12px;
}

.load-more {
  align-self: center;
  margin: 6px 0 10px;
  font-size: 12px;
  color: var(--wx-text-sub);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  padding: 4px 12px;
}

/* -------------------------------------------------------------- msg rows */

.msg-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  position: relative;
  padding: 2px 0;
}

.msg-row.me {
  flex-direction: row-reverse;
}

.avatar {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  user-select: none;
}

.msg-row.me .avatar {
  background: var(--wx-green);
}

.msg-row.you .avatar {
  background: #7d8794;
}

.msg-row.upload-row .avatar {
  background: var(--wx-green);
}

.msg-row.upload-row .file-icon {
  background: rgba(0, 0, 0, 0.06);
}

.msg-row.upload-row.is-failed .upload-bar > i {
  background: var(--wx-danger);
}

.msg-body {
  max-width: min(76%, 620px);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.msg-row.me .msg-body {
  align-items: flex-end;
}

.bubble {
  position: relative;
  padding: 9px 12px;
  border-radius: 6px;
  background: var(--wx-bubble-you);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.msg-row.me .bubble {
  background: var(--wx-bubble-me);
}

.bubble::after {
  content: "";
  position: absolute;
  top: 12px;
  width: 0;
  height: 0;
  border: 6px solid transparent;
}

.bubble.tail-left::after {
  left: -11px;
  border-right-color: var(--wx-bubble-you);
}

.bubble.tail-right::after {
  right: -11px;
  border-left-color: var(--wx-bubble-me);
}

.bubble a {
  color: var(--wx-blue);
  text-decoration: none;
  word-break: break-all;
}

.bubble a:hover {
  text-decoration: underline;
}

.bubble-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--wx-text-faint);
  padding: 0 3px;
}

.msg-row.me .bubble-footer {
  flex-direction: row-reverse;
}

/* ----------------------------------------------------------- file bubbles */

.file-card {
  padding: 0;
  overflow: hidden;
  min-width: 230px;
  max-width: 340px;
  cursor: pointer;
}

.file-card .file-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
}

.file-icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #5a5a5a;
  text-transform: uppercase;
  overflow: hidden;
}

.file-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.file-meta {
  min-width: 0;
  flex: 1;
}

.file-name {
  font-size: 14px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
}

.file-sub {
  margin-top: 3px;
  font-size: 11px;
  color: var(--wx-text-sub);
}

.thumb-wrap {
  display: block;
  position: relative;
  max-width: 300px;
  background: #dcdcdc;
  line-height: 0;
}

.thumb-wrap img {
  display: block;
  max-width: 300px;
  max-height: 340px;
  width: auto;
  height: auto;
}

.thumb-note {
  position: absolute;
  right: 6px;
  bottom: 6px;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font-size: 11px;
  border-radius: 4px;
  padding: 2px 6px;
  line-height: 1.4;
}

/* --------------------------------------------------------- upload bubbles */

.upload-card {
  min-width: 260px;
  max-width: 360px;
  padding: 11px 12px;
}

.upload-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.upload-bar {
  margin-top: 9px;
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.upload-bar > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: var(--wx-green-dark);
  transition: width 0.2s ease;
}

.upload-card.failed .upload-bar > i {
  background: var(--wx-danger);
}

.upload-card.done .upload-bar > i {
  background: var(--wx-green);
}

.upload-note {
  margin-top: 7px;
  font-size: 11px;
  color: var(--wx-text-sub);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.upload-note .err {
  color: var(--wx-danger);
}

.upload-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

.mini-btn {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.06);
  color: #444;
}

.mini-btn:hover {
  background: rgba(0, 0, 0, 0.1);
}

.mini-btn.primary {
  background: var(--wx-green);
  color: #fff;
}

.mini-btn.primary:hover {
  background: var(--wx-green-dark);
}

/* ------------------------------------------------------------- input bar */

.chat-input {
  flex: none;
  background: #f7f7f7;
  border-top: 1px solid var(--wx-line);
  padding: 10px 12px calc(10px + var(--safe-bottom));
  position: relative;
  z-index: 4;
}

.input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.input-row .icon-btn {
  width: 40px;
  height: 40px;
  flex: none;
}

.input-box {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 9px;
  padding: 6px 12px;
  border: 1px solid #e0e0e0;
  min-height: 44px;
}

.input-box:focus-within {
  border-color: var(--wx-green);
  box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.12);
}

/* The explicit width matters: without it the textarea keeps its intrinsic
   `cols=20` width (about 20 characters) and the composer looks pinched on
   wide screens such as a folded-out phone or a tablet. */
#text-input {
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  border: 0;
  outline: none;
  resize: none;
  background: transparent;
  min-height: 24px;
  max-height: 148px;
  padding: 2px 0;
  line-height: 1.5;
  font-size: 17px;
  overflow-y: auto;
}

.send-btn {
  flex: none;
  height: 40px;
  padding: 0 18px;
  border-radius: 9px;
  background: var(--wx-green);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
}

.send-btn:hover {
  background: var(--wx-green-dark);
}

.send-btn:disabled {
  background: #c8e9d5;
  cursor: default;
}

.input-hint {
  margin: 8px 2px 0;
  font-size: 11px;
  color: var(--wx-text-faint);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------- selection mode */

.select-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
}

.select-count {
  flex: 1;
  font-size: 14px;
  color: #444;
}

.select-bar .danger {
  background: var(--wx-danger);
}

.select-bar .danger:disabled {
  background: #f3c4c4;
}

.msg-check {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid #c4c4c4;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
}

.msg-check svg {
  width: 14px;
  height: 14px;
  fill: #fff;
  opacity: 0;
}

.msg-row.selected .msg-check {
  background: var(--wx-green);
  border-color: var(--wx-green);
}

.msg-row.selected .msg-check svg {
  opacity: 1;
}

.select-mode .msg-row {
  cursor: pointer;
}

.select-mode .msg-row.selected .bubble {
  outline: 2px solid var(--wx-green);
  outline-offset: -2px;
}

/* ------------------------------------------------------------ drop overlay */

.drop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 193, 96, 0.09);
  backdrop-filter: blur(2px);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.drop-overlay .box {
  background: #fff;
  border: 2px dashed var(--wx-green);
  border-radius: 18px;
  padding: 34px 42px;
  text-align: center;
  box-shadow: var(--shadow-2);
}

.drop-overlay .box .t1 {
  font-size: 18px;
  font-weight: 600;
  color: var(--wx-green-dark);
}

.drop-overlay .box .t2 {
  margin-top: 6px;
  font-size: 13px;
  color: var(--wx-text-sub);
}

/* ------------------------------------------------------------------ toast */

.toast-host {
  position: fixed;
  left: 50%;
  bottom: calc(90px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: max-content;
  max-width: 90vw;
}

.toast {
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 8px;
  box-shadow: var(--shadow-2);
  animation: toast-in 0.18s ease;
  word-break: break-all;
}

.toast.error {
  background: rgba(200, 40, 40, 0.92);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------------------------------------------ modal */

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-2);
}

.modal-title {
  padding: 20px 20px 6px;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
}

.modal-body {
  padding: 6px 20px 18px;
  font-size: 14px;
  color: #555;
  text-align: center;
  line-height: 1.7;
}

.modal-body .mono {
  font-weight: 700;
  color: var(--wx-danger);
  letter-spacing: 1px;
}

.modal-body .warn-count {
  color: var(--wx-text);
  font-weight: 600;
}

.modal-input {
  width: 100%;
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid var(--wx-line);
  border-radius: 8px;
  outline: none;
  text-align: center;
}

.modal-input:focus {
  border-color: var(--wx-green);
}

.modal-actions {
  display: flex;
  border-top: 1px solid var(--wx-line);
}

.modal-actions button {
  flex: 1;
  padding: 14px 10px;
  font-size: 16px;
  color: #444;
}

.modal-actions button + button {
  border-left: 1px solid var(--wx-line);
}

.modal-actions button.primary {
  color: var(--wx-green-dark);
  font-weight: 600;
}

.modal-actions button.danger {
  color: var(--wx-danger);
  font-weight: 600;
}

.modal-actions button:disabled {
  color: var(--wx-text-faint);
}

/* ------------------------------------------------------------ action sheet */

.modal.sheet .modal-title {
  padding: 18px 20px 10px;
}

.sheet-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px 16px;
}

.sheet-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f7f7f7;
  font-size: 15px;
  text-align: left;
  transition: background 0.15s;
}

.sheet-item:hover {
  background: #efefef;
}

.sheet-item.danger {
  color: var(--wx-danger);
}

.sheet-item .sheet-hint {
  font-size: 11px;
  color: var(--wx-text-sub);
}

.sheet-item.danger .sheet-hint {
  color: #e58b8b;
}

/* --------------------------------------------------------- layout probe */
/* Shown only with ?debug=1: reports the numbers behind any "too cramped" or
   "too wide" complaint on an unfamiliar device. */

.layout-probe {
  position: fixed;
  left: 8px;
  bottom: 8px;
  z-index: 99;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font: 11px/1.5 ui-monospace, Menlo, Consolas, monospace;
  padding: 6px 9px;
  border-radius: 6px;
  pointer-events: none;
  white-space: pre;
  max-width: 92vw;
}

/* ------------------------------------------------------------ lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 95;
  display: flex;
  flex-direction: column;
}

.lightbox-bar {
  flex: none;
  height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  color: #fff;
  font-size: 14px;
}

.lightbox-bar .name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lightbox-bar a,
.lightbox-bar button {
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
}

.lightbox-body {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.lightbox-body img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* --------------------------------------------------------------- spinner */

.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  height: 18px;
}

.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--wx-text-faint);
  animation: blink 1.1s infinite;
}

.typing i:nth-child(2) {
  animation-delay: 0.18s;
}

.typing i:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes blink {
  0%,
  60%,
  100% {
    opacity: 0.3;
  }
  30% {
    opacity: 1;
  }
}

@media (max-width: 560px) {
  .msg-body {
    max-width: 82%;
  }
  .login-card {
    padding: 26px 18px 20px;
  }
  .chat-scroll {
    padding: 10px 8px 4px;
  }
  .chat-input {
    padding: 8px 8px calc(8px + var(--safe-bottom));
  }
  .input-box {
    padding: 5px 10px;
    min-height: 42px;
  }
  #text-input {
    font-size: 16px;
  }
  .send-btn {
    padding: 0 14px;
  }
}

/* Tablets and unfolded foldables: keep the composer roomy but bounded so a
   very wide screen does not stretch one line of text across the whole panel. */
@media (min-width: 900px) {
  .chat-input,
  .chat-header {
    padding-left: max(18px, env(safe-area-inset-left, 0px));
    padding-right: max(18px, env(safe-area-inset-right, 0px));
  }
  .input-row,
  .input-hint {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
  }
  .input-hint {
    margin-top: 8px;
  }
  .chat-scroll {
    padding-left: 20px;
    padding-right: 20px;
  }
  .msg-body {
    max-width: min(70%, 720px);
  }
  /* thumbnails get a little more room on a big panel */
  .thumb-wrap img {
    max-width: 360px;
    max-height: 420px;
  }
}
