
/* Source: public/style.css */
:root{color-scheme:light;--bg:#f6f3ee;--paper:#fff;--ink:#24211d;--muted:#817b72;--accent:#d46f55;--mine:#df8067;--line:#e7e0d7;--danger:#b33b36}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.hidden{display:none!important}.login-wrap{min-height:100dvh;display:grid;place-items:center;padding:max(24px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left))}.card{width:min(100%,390px);background:#fffffff0;padding:38px;border:1px solid var(--line);border-radius:24px;box-shadow:0 20px 55px #49382a18}.logo{width:52px;height:52px}.logo img{display:block;width:52px;height:52px;border-radius:14px}h1{margin:8px 0;font-family:Georgia,serif;font-weight:500}.muted{color:var(--muted);margin:0 0 28px}label{display:block;font-size:13px;color:var(--muted);margin:15px 0 6px}input,textarea,button{font:inherit}input[type=text],input[type=password],.card input{width:100%;border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin-top:7px;outline:none}.card input:focus,textarea:focus{border-color:var(--accent)}button{border:0;border-radius:12px;background:var(--accent);color:#fff;padding:12px 18px;cursor:pointer}.card button{width:100%;margin-top:10px}.error{min-height:20px;color:var(--danger);font-size:13px}.chat{height:100dvh;max-width:900px;margin:auto;background:var(--paper);display:grid;grid-template-rows:auto 1fr auto;box-shadow:0 0 60px #49382a12;position:relative}.chat header{padding:calc(15px + env(safe-area-inset-top)) max(22px,env(safe-area-inset-right)) 15px max(22px,env(safe-area-inset-left));border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center}.chat header h1{font-size:21px;margin:0}.chat header span{font-size:12px;color:var(--muted)}.typing{display:block;min-height:15px;color:var(--accent)!important}.quiet{background:transparent;color:var(--muted);padding:10px}#messages{overflow-y:auto;padding:20px;display:flex;flex-direction:column;gap:12px;background:linear-gradient(#fcfaf7,#f8f5f0);overscroll-behavior:contain}.message{max-width:76%;align-self:flex-start}.message.grouped{margin-top:-10px}.message.grouped .meta{display:none}.message.has-following .delivery-state{display:none}.message.has-following:not(.mine) .bubble{border-bottom-left-radius:5px}.message.grouped:not(.mine) .bubble{border-top-left-radius:5px}.message.has-following.mine .bubble{border-bottom-right-radius:5px}.message.grouped.mine .bubble{border-top-right-radius:5px}.date-separator{align-self:center;color:var(--muted);font-size:11px;background:#eee9e3cc;padding:4px 10px;border-radius:12px;margin:8px 0 3px}.message.mine{align-self:flex-end}.meta{font-size:11px;color:var(--muted);margin:0 6px 4px}.mine .meta{text-align:right}.bubble{background:#fff;border:1px solid var(--line);border-radius:7px 18px 18px;padding:10px 14px;white-space:pre-wrap;overflow-wrap:anywhere;box-shadow:0 3px 14px #49382a0d}.mine .bubble{background:var(--mine);border-color:var(--mine);color:#fff;border-radius:18px 7px 18px 18px}.bubble.image{padding:4px;background:#fff}.bubble img{display:block;max-width:100%;max-height:420px;border-radius:14px;cursor:zoom-in}.delivery-state{min-height:14px;margin:4px 7px 0;text-align:right;font-size:11px;color:var(--muted)}.message.pending{opacity:.68}.message.failed .delivery-state{color:var(--danger);cursor:pointer;font-weight:600}.message.media-error .bubble.image::after{content:'图片加载失败，稍后重试';display:block;color:var(--danger);padding:10px;font-size:12px}#composer{display:grid;grid-template-columns:auto 1fr auto;align-items:end;gap:9px;padding:12px max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));border-top:1px solid var(--line);background:var(--paper)}textarea{resize:none;max-height:120px;min-height:44px;border:1px solid var(--line);border-radius:18px;padding:10px 14px;outline:none;line-height:1.4}.photo{width:44px;height:44px;margin:0;border:1px solid var(--line);border-radius:50%;display:grid;place-items:center;color:var(--accent);font-size:25px;cursor:pointer}.photo input{display:none}.send{height:44px;min-width:64px}.new-messages{position:absolute;right:max(18px,env(safe-area-inset-right));bottom:calc(76px + env(safe-area-inset-bottom));padding:8px 13px;border-radius:18px;box-shadow:0 5px 18px #0002;z-index:2}#toast{position:fixed;left:50%;bottom:calc(82px + env(safe-area-inset-bottom));transform:translateX(-50%);background:#2d2925;color:#fff;padding:9px 15px;border-radius:10px;opacity:0;pointer-events:none;transition:.2s;z-index:40;white-space:nowrap;max-width:calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right) - 24px);overflow:hidden;text-overflow:ellipsis}#toast.show{opacity:1}.modal,.viewer{position:fixed;inset:0;background:#171310b8;display:grid;place-items:center;padding:20px;z-index:30}.preview-card{width:min(100%,520px);background:#fff;border-radius:20px;padding:14px}.preview-card img{display:block;width:100%;max-height:62vh;object-fit:contain;border-radius:14px;background:#f4f1ed}.preview-card p{color:var(--muted);font-size:13px;text-align:center}.modal-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.secondary{background:#eee9e3;color:var(--ink)}.viewer{background:#000e;padding:0;overflow:auto}.viewer img{max-width:100%;max-height:100%;object-fit:contain;touch-action:pinch-zoom}.viewer-close{position:fixed;right:max(14px,env(safe-area-inset-right));top:max(14px,env(safe-area-inset-top));z-index:2;width:44px;height:44px;padding:0;border-radius:50%;background:#0008;font-size:30px}.viewer-close:focus{outline:2px solid #fff}.reply-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px max(14px,env(safe-area-inset-right)) 8px max(14px,env(safe-area-inset-left));border-top:1px solid var(--line);background:#fff8f5}.reply-bar div{min-width:0;display:flex;flex-direction:column;border-left:3px solid var(--accent);padding-left:9px}.reply-bar strong{font-size:12px;color:var(--accent)}.reply-bar span{font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.reply-bar button{background:transparent;color:var(--muted);padding:4px 8px;font-size:22px}.reply-quote{display:flex;flex-direction:column;width:100%;text-align:left;background:#0000000d;color:inherit;border-left:3px solid currentColor;border-radius:8px;padding:6px 8px;margin:0 0 7px;opacity:.78}.reply-quote strong{font-size:11px}.reply-quote span{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.message-text{display:block}.bubble.image img{background:linear-gradient(100deg,#ece7e0 20%,#f7f4ef 38%,#ece7e0 56%);background-size:220% 100%;animation:image-loading 1.2s infinite}.bubble.image img.loading{filter:blur(10px);opacity:.6;min-width:150px;min-height:110px}.bubble.image img:not(.loading){animation:none}.action-sheet{position:fixed;inset:0;background:#0006;display:flex;align-items:flex-end;justify-content:center;z-index:50;padding:14px max(14px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left))}.action-sheet>div{width:min(100%,440px);display:grid;gap:8px;background:#fff;padding:12px;border-radius:18px}.action-sheet button{width:100%}.action-sheet .secondary{margin-top:4px}@keyframes image-loading{to{background-position:-220% 0}}@media(max-width:600px){.card{padding:28px 23px}.chat header{padding:calc(11px + env(safe-area-inset-top)) max(15px,env(safe-area-inset-right)) 11px max(15px,env(safe-area-inset-left))}#messages{padding:14px}.message{max-width:86%}.send{padding:10px 14px}.modal{padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}.preview-card{border-radius:18px}}

/* Source: public/reply-fix.css */
.reply-quote {
  background: rgba(238, 238, 238, 0.9);
  color: #555;
  border-left-color: #aaa;
  opacity: 1;
}

.reply-quote strong {
  color: #555;
}

.reply-quote span {
  color: #555;
}

.mine .reply-quote {
  background: rgba(238, 238, 238, 0.9);
  color: #555;
  border-left-color: #aaa;
}

.mine .reply-quote strong,
.mine .reply-quote span {
  color: #555;
}

/* Chat images are compact previews; tapping still opens the full-screen viewer. */
.bubble.image {
  width: min(300px, 48vw);
}

.bubble.image img {
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
}

@media (max-width: 600px) {
  .bubble.image {
    width: min(250px, 64vw);
  }

  .bubble.image img {
    max-height: 280px;
  }
}

/* Source: public/theme.css */
:root {
  --bg: #eef4f8;
  --paper: rgba(255, 255, 255, 0.58);
  --ink: #283640;
  --muted: #71808b;
  --accent: #789caf;
  --mine: rgba(160, 191, 207, 0.72);
  --line: rgba(255, 255, 255, 0.62);
  --danger: #a95f61;
  --glass: rgba(255, 255, 255, 0.54);
  --glass-strong: rgba(255, 255, 255, 0.72);
  --shadow: 0 18px 50px rgba(69, 94, 108, 0.12);
  --radius: 22px;
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 241, 217, 0.78) 0, rgba(255, 241, 217, 0) 34%),
    radial-gradient(circle at 88% 22%, rgba(188, 217, 232, 0.72) 0, rgba(188, 217, 232, 0) 38%),
    radial-gradient(circle at 44% 92%, rgba(211, 227, 236, 0.82) 0, rgba(211, 227, 236, 0) 42%),
    linear-gradient(145deg, #f7fafc 0%, #eaf2f7 50%, #f7f3ea 100%);
  background-attachment: fixed;
}

button,
input,
textarea {
  border-radius: 18px;
}

button {
  background: linear-gradient(145deg, rgba(116, 157, 178, 0.92), rgba(137, 174, 192, 0.86));
  box-shadow: 0 7px 18px rgba(73, 112, 132, 0.16), inset 0 1px rgba(255, 255, 255, 0.45);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

button:active {
  transform: scale(0.97);
  box-shadow: 0 3px 10px rgba(73, 112, 132, 0.13);
}

.login-wrap::before,
.login-wrap::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(22px);
  pointer-events: none;
}

.login-wrap::before {
  width: 230px;
  height: 230px;
  left: -70px;
  top: 8%;
  background: rgba(185, 217, 231, 0.5);
}

.login-wrap::after {
  width: 270px;
  height: 270px;
  right: -95px;
  bottom: 3%;
  background: rgba(255, 234, 201, 0.48);
}

.card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 28px;
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(24px) saturate(125%);
  backdrop-filter: blur(24px) saturate(125%);
}

.card input {
  min-height: 48px;
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(123, 152, 168, 0.2);
  color: var(--ink);
  box-shadow: inset 0 1px 4px rgba(79, 105, 119, 0.06);
}

.card input:focus,
textarea:focus {
  border-color: rgba(102, 148, 172, 0.64);
  box-shadow: 0 0 0 4px rgba(128, 172, 194, 0.13);
}

.logo img {
  box-shadow: 0 9px 24px rgba(75, 111, 128, 0.18);
}

.chat {
  background: rgba(255, 255, 255, 0.38);
  border-left: 1px solid rgba(255, 255, 255, 0.65);
  border-right: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 0 70px rgba(72, 100, 114, 0.1);
  -webkit-backdrop-filter: blur(20px) saturate(118%);
  backdrop-filter: blur(20px) saturate(118%);
}

.chat header {
  background: rgba(255, 255, 255, 0.54);
  border-bottom-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 5px 22px rgba(76, 102, 115, 0.06);
  -webkit-backdrop-filter: blur(24px) saturate(125%);
  backdrop-filter: blur(24px) saturate(125%);
  z-index: 3;
}

.chat header h1 {
  color: #334550;
  letter-spacing: 0.01em;
}

.quiet {
  background: rgba(255, 255, 255, 0.48);
  color: #667984;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.65);
}

#messages {
  padding-top: 28px;
  padding-bottom: 28px;
  background: transparent;
  gap: 14px;
}

.date-separator {
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.58);
  color: #71808a;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.bubble {
  padding: 11px 15px;
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(255, 255, 255, 0.78);
  border-radius: 9px var(--radius) var(--radius) var(--radius);
  color: #31414b;
  box-shadow: 0 8px 24px rgba(67, 93, 106, 0.08), inset 0 1px rgba(255, 255, 255, 0.66);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  backdrop-filter: blur(18px) saturate(120%);
}

.mine .bubble {
  background: linear-gradient(145deg, rgba(159, 193, 210, 0.78), rgba(139, 178, 198, 0.72));
  border-color: rgba(255, 255, 255, 0.42);
  border-radius: var(--radius) 9px var(--radius) var(--radius);
  color: #203640;
  box-shadow: 0 9px 25px rgba(70, 112, 132, 0.13), inset 0 1px rgba(255, 255, 255, 0.42);
}

.meta,
.delivery-state {
  color: #7e8b94;
}

.reply-quote,
.mine .reply-quote {
  background: rgba(83, 101, 111, 0.1);
  border-left-color: rgba(77, 99, 111, 0.45);
  color: #4c5b63;
  box-shadow: none;
}

.reply-quote strong,
.reply-quote span,
.mine .reply-quote strong,
.mine .reply-quote span {
  color: #4c5b63;
}

.bubble.image {
  background: rgba(255, 255, 255, 0.5);
}

.bubble.image img {
  border-radius: 18px;
}

.reply-bar {
  background: rgba(248, 251, 252, 0.68);
  border-top-color: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

#composer {
  padding-top: 16px;
  background: rgba(255, 255, 255, 0.55);
  border-top-color: rgba(255, 255, 255, 0.74);
  box-shadow: 0 -8px 28px rgba(75, 101, 114, 0.06);
  -webkit-backdrop-filter: blur(24px) saturate(125%);
  backdrop-filter: blur(24px) saturate(125%);
}

textarea {
  min-height: 52px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.52);
  border-color: rgba(117, 147, 163, 0.2);
  color: var(--ink);
  box-shadow: inset 0 1px 5px rgba(72, 98, 112, 0.06);
}

textarea::placeholder,
input::placeholder {
  color: #91a0a9;
}

.photo {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.46);
  border-color: rgba(255, 255, 255, 0.76);
  border-radius: 18px;
  color: #678b9d;
  box-shadow: 0 6px 18px rgba(73, 105, 121, 0.08), inset 0 1px rgba(255, 255, 255, 0.72);
}

.send {
  height: 48px;
  border-radius: 18px;
  color: #f9fcfd;
}

#toast,
.preview-card,
.action-sheet > div {
  background: rgba(248, 251, 252, 0.82);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(24px) saturate(125%);
  backdrop-filter: blur(24px) saturate(125%);
}

.modal,
.action-sheet {
  background: rgba(73, 91, 101, 0.22);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.secondary {
  background: rgba(222, 231, 235, 0.72);
  color: #52636d;
}

@media (max-width: 600px) {
  .card {
    border-radius: 26px;
  }

  #messages {
    padding: 20px 16px 24px;
  }

  #composer {
    gap: 8px;
    padding-top: 12px;
  }

  textarea {
    min-height: 48px;
    padding: 12px 15px;
  }

  .photo,
  .send {
    height: 46px;
  }

  .photo {
    width: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  button {
    transition: none;
  }
}

/* Source: public/final-ui.css */
:root {
  color-scheme: light;
  --message-radius: 22px;
  --panel-radius: 28px;
  --compact-radius: 12px;
}

/* Keep search dialog visually identical to the calendar dialog. */
.search-modal{align-items:center!important;padding:16px!important}
.search-modal .search-form input{font-size:16px!important}
.search-form button{width:36px!important;min-width:36px!important;height:36px!important;padding:0!important;border-radius:50%!important;background:rgba(151,187,205,.38)!important;color:#4e7183!important;box-shadow:0 4px 12px rgba(75,101,115,.07),inset 0 1px rgba(255,255,255,.7)!important;display:grid;place-items:center}.search-form button svg{width:21px;height:21px;stroke-width:1.8}
.search-form button{width:40px!important;min-width:40px;padding:0!important;display:grid;place-items:center}.search-form button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.search-modal .search-card{width:min(100%,390px)!important;max-width:390px!important;padding:22px!important;border:1px solid rgba(123,154,169,.22)!important;border-radius:22px!important;background:linear-gradient(135deg,rgba(248,252,253,.72),rgba(227,241,247,.54),rgba(248,252,253,.72))!important;box-shadow:0 24px 70px rgba(42,57,65,.16),inset 0 1px rgba(255,255,255,.68)!important;-webkit-backdrop-filter:blur(24px) saturate(125%);backdrop-filter:blur(24px) saturate(125%);animation:glass-drift 16s ease-in-out infinite alternate!important}
.search-modal .calendar-heading h2{font-family:Georgia,serif!important;font-size:21px!important;font-weight:500!important}.search-modal .calendar-heading p{display:block!important}.search-modal .search-form{margin-top:18px!important}.search-modal .search-form input{height:auto!important;padding:11px 13px!important;border:1px solid rgba(123,154,169,.22)!important;border-radius:14px!important;background:rgba(255,255,255,.48)!important}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  background-color: #f8fafb;
}

body {
  background-size: 112% 112%;
  animation: ambient-shift 22s ease-in-out infinite alternate;
}

.bubble,
.mine .bubble {
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  font-size: 15px;
  font-weight: 380;
  line-height: 1.56;
  letter-spacing: 0.015em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  -webkit-backdrop-filter: blur(22px) saturate(116%);
  backdrop-filter: blur(22px) saturate(116%);
  animation: message-in 180ms ease-out both;
}

.bubble::before {
  position: absolute;
  inset: -45% 18% auto -22%;
  z-index: 0;
  height: 90%;
  content: "";
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 70%);
  filter: blur(7px);
  opacity: 0.72;
  pointer-events: none;
  transform: rotate(-10deg);
  animation: liquid-glow 9s ease-in-out infinite alternate;
}

.bubble > * {
  position: relative;
  z-index: 1;
}

.bubble {
  background: radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.32), transparent 58%), linear-gradient(145deg, rgba(255, 255, 255, 0.48), rgba(235, 244, 248, 0.22));
  box-shadow: 0 8px 26px rgba(67, 93, 106, 0.055), 0 1px 3px rgba(67, 93, 106, 0.035), inset 0 1px rgba(255, 255, 255, 0.42);
}

.mine .bubble {
  background: radial-gradient(circle at 78% 0%, rgba(232, 247, 253, 0.28), transparent 58%), linear-gradient(145deg, rgba(174, 205, 219, 0.46), rgba(145, 185, 204, 0.32));
  border-color: rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(18px) saturate(110%);
  backdrop-filter: blur(18px) saturate(110%);
  box-shadow: 0 7px 24px rgba(67, 107, 127, 0.064), 0 1px 3px rgba(67, 107, 127, 0.034), inset 0 1px rgba(255, 255, 255, 0.29);
}

.mine .bubble::before {
  opacity: 0.61;
}

@keyframes liquid-glow {
  from { transform: translate3d(-3%, -2%, 0) rotate(-10deg); opacity: 0.56; }
  to { transform: translate3d(9%, 5%, 0) rotate(-4deg); opacity: 0.78; }
}

.message.has-following .bubble,
.message.grouped .bubble,
.message.has-following.mine .bubble,
.message.grouped.mine .bubble,
.message.has-following:not(.mine) .bubble,
.message.grouped:not(.mine) .bubble {
  border-radius: var(--message-radius) !important;
}

.message-highlight .bubble {
  animation: quote-highlight 900ms ease-out;
}

.reply-quote,
.mine .reply-quote {
  display: flex;
  align-items: baseline;
  width: max-content;
  max-width: 86%;
  margin: 3px 0 0;
  padding: 5px 9px;
  border: 0;
  border-radius: var(--compact-radius);
  background: rgba(105, 119, 127, 0.12);
  color: #53616a;
  box-shadow: none;
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.reply-quote strong {
  flex: 0 0 auto;
  margin-right: 2px;
  color: inherit;
  font-size: inherit;
  font-weight: 500;
}

.reply-quote span {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
}

.chat {
  width: 100%;
  height: 100dvh;
  min-height: -webkit-fill-available;
  overflow: hidden;
}

.chat header {
  padding: calc(10px + env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) 9px max(22px, env(safe-area-inset-left));
  border-bottom: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 241, 216, 0.28), transparent 48%),
    linear-gradient(120deg, rgba(224, 239, 247, 0.46), rgba(247, 250, 251, 0.2) 55%, rgba(205, 226, 237, 0.34));
  box-shadow: 0 10px 30px rgba(78, 108, 123, 0.05);
  -webkit-backdrop-filter: blur(32px) saturate(140%);
  backdrop-filter: blur(32px) saturate(140%);
}

@media (max-width: 600px) {
  .chat header {
    padding: calc(6px + env(safe-area-inset-top)) max(15px, env(safe-area-inset-right)) 5px max(15px, env(safe-area-inset-left));
  }
}

.mine .reply-quote {
  margin-left: auto;
}

.meta {
  margin-bottom: 4px;
}

.message.grouped {
  margin-top: -9px;
}

.message.has-following .delivery-state,
.message .delivery-state:empty {
  display: none;
}

#composer {
  display: block;
  padding: 8px max(7px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(7px, env(safe-area-inset-left));
  border: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.compose-glass {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 5px 8px 5px 15px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: var(--panel-radius);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 12px 34px rgba(76, 104, 118, 0.1), inset 0 1px rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(28px) saturate(128%);
  backdrop-filter: blur(28px) saturate(128%);
  transition: min-height 220ms ease, padding 220ms ease, border-radius 220ms ease;
}

.compose-glass:focus-within,
.compose-glass.is-expanded {
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 15px;
  min-height: 111px;
  padding: 16px 12px 7px;
  border-radius: var(--panel-radius);
}

#composer .message-input {
  width: 100%;
  height: 38px;
  min-height: 38px;
  padding: 8px 2px;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  line-height: 1.4;
}

.message-input:empty::before {
  content: attr(data-placeholder);
  color: #91a0a9;
  pointer-events: none;
}

.compose-glass:not(:focus-within):not(.is-expanded) .message-input {
  height: 38px !important;
}

.compose-glass:focus-within .message-input,
.compose-glass.is-expanded .message-input {
  height: 36px;
  padding-top: 0;
}

.compose-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.image-picker {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0;
  cursor: pointer;
  clip-path: none;
}

.compose-glass:focus-within .compose-actions,
.compose-glass.is-expanded .compose-actions {
  justify-content: space-between;
}

.photo {
  position: relative;
  overflow: hidden;
  width: 38px;
  height: 38px;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.46);
  color: #50636e;
  box-shadow: 0 4px 12px rgba(75, 101, 115, 0.07), inset 0 1px rgba(255, 255, 255, 0.7);
  font-size: 22px;
  opacity: 0;
  width: 0;
  pointer-events: none;
  transform: scale(0.82);
  transition: opacity 160ms ease, transform 180ms ease, width 180ms ease;
}

.compose-glass:focus-within .photo,
.compose-glass.is-expanded .photo {
  width: 38px;
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.send {
  display: grid;
  place-items: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background: rgba(155, 180, 192, 0.16);
  color: rgba(78, 104, 117, 0.46);
  box-shadow: 0 4px 12px rgba(75, 101, 115, 0.07), inset 0 1px rgba(255, 255, 255, 0.7);
  font-size: 21px;
  line-height: 1;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.compose-glass.has-text .send {
  background: rgba(151, 187, 205, 0.38);
  color: #4e7183;
  box-shadow: 0 4px 12px rgba(75, 101, 115, 0.07), inset 0 1px rgba(255, 255, 255, 0.7);
}

.send span {
  transform: translateY(-1px);
}

.photo svg,
.send svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.photo svg {
  transform: translateY(0.5px);
}

.message-actions {
  position: absolute;
  top: var(--menu-y);
  right: auto;
  bottom: auto;
  left: var(--menu-x);
  z-index: 50;
  display: flex;
  padding: 0;
  background: transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -100%) scale(0.94);
  transition: opacity 140ms ease, transform 160ms ease, visibility 160ms;
}

.message .bubble,
.message .bubble * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.message {
  position: relative;
}

.message.menu-open {
  z-index: 60;
}

.bubble.image img {
  -webkit-user-drag: none;
}

.message-actions.open {
  width: auto;
  padding: 3px;
  gap: 0;
  border: 0;
  border-radius: var(--compact-radius);
  background: rgba(36, 40, 43, 0.9);
  box-shadow: 0 7px 18px rgba(25, 31, 34, 0.2);
  -webkit-backdrop-filter: blur(16px) saturate(110%);
  backdrop-filter: blur(16px) saturate(110%);
  white-space: nowrap;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -100%) scale(1);
}

.message-actions.below {
  transform: translateX(-50%) scale(1);
}

.message-actions.open::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 0;
  height: 0;
  border-right: 6px solid transparent;
  border-left: 6px solid transparent;
  border-top: 6px solid rgba(36, 40, 43, 0.9);
  transform: translateX(-50%);
}

.message-actions.open.below::after {
  top: -5px;
  bottom: auto;
  border-top: 0;
  border-bottom: 6px solid rgba(36, 40, 43, 0.9);
}

.header-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 3px;
}

.menu-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.header-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  width: 190px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 16px;
  background: linear-gradient(135deg, rgb(246, 251, 253), rgb(229, 242, 248), rgb(246, 251, 253));
  background-size: 180% 180%;
  box-shadow: 0 16px 45px rgba(40, 55, 63, 0.14), inset 0 1px rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
  backdrop-filter: blur(24px) saturate(135%);
  animation: glass-drift 16s ease-in-out infinite alternate;
}

.header-menu button {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 10px;
  border-radius: 11px;
  background: transparent;
  color: #40525c;
  box-shadow: none;
  text-align: left;
  font-size: 14px;
}

.header-menu button:hover,
.header-menu button:focus-visible {
  background: rgba(128, 164, 182, 0.14);
  outline: none;
}

.header-menu svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-menu button.active {
  color: #456b7e;
}

.header-menu small {
  color: var(--muted);
  font-size: 12px;
}

.header-menu button.active small {
  color: #456b7e;
}

.header-menu .logout-menu {
  margin-top: 4px;
  border-top: 1px solid rgba(111, 143, 159, 0.14);
  border-radius: 0 0 11px 11px;
  color: #956266;
}

.history-banner {
  position: absolute;
  top: calc(72px + env(safe-area-inset-top));
  left: 0;
  z-index: 8;
  width: 100%;
  padding: 8px 14px;
  border-radius: 0;
  background: rgba(139, 174, 192, 0.18);
  color: #456b7e;
  box-shadow: none;
  font-size: 13px;
}

.calendar-modal {
  align-items: center;
}

.calendar-card {
  width: min(100%, 390px);
  padding: 22px;
  border: 1px solid rgba(123, 154, 169, 0.22);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(248, 252, 253, 0.72), rgba(227, 241, 247, 0.54), rgba(248, 252, 253, 0.72));
  background-size: 180% 180%;
  box-shadow: 0 24px 70px rgba(42, 57, 65, 0.16), inset 0 1px rgba(255, 255, 255, 0.68);
  -webkit-backdrop-filter: blur(24px) saturate(125%);
  backdrop-filter: blur(24px) saturate(125%);
  animation: glass-drift 16s ease-in-out infinite alternate;
}

.calendar-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.calendar-heading h2 {
  margin: 0 0 6px;
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: 500;
}

.calendar-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.calendar-heading .quiet {
  margin: -10px -10px 0 0;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
  font-size: 24px;
}

.calendar-nav {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 8px;
  margin: 22px 0 14px;
}

.calendar-nav strong {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
}

.calendar-nav button {
  width: 42px;
  height: 38px;
  padding: 0;
  border-radius: 12px;
  background: rgba(128, 164, 182, 0.14);
  color: #456b7e;
  box-shadow: none;
  font-size: 25px;
}

.calendar-nav button:disabled {
  opacity: 0.28;
  cursor: default;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.calendar-weekdays {
  margin-bottom: 6px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.calendar-day {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: #b4bcc0;
  box-shadow: none;
  font-size: 14px;
}

.calendar-day.available {
  background: rgba(117, 158, 179, 0.18);
  color: #345f74;
  font-weight: 650;
  cursor: pointer;
}

.calendar-day.available:hover,
.calendar-day.available:focus-visible {
  background: #759eb3;
  color: #fff;
  outline: none;
}

.calendar-day:disabled {
  opacity: 0.58;
  cursor: default;
}

.calendar-day.blank {
  pointer-events: none;
}

.calendar-legend {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.calendar-legend span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(117, 158, 179, 0.5);
}

.preview-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 220px;
  overflow: hidden;
  border-radius: var(--message-radius);
  background: rgba(226, 236, 241, 0.56);
  touch-action: pan-y;
}

.preview-stage #previewImage {
  max-height: 62vh;
  background: transparent;
}

.preview-nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background: rgba(36, 45, 50, 0.42);
  color: #fff;
  transform: translateY(-50%);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.preview-nav.previous { left: 8px; }
.preview-nav.next { right: 8px; }
.preview-nav:disabled { opacity: 0; pointer-events: none; }

.preview-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.delete-image {
  padding: 7px 10px;
  background: transparent;
  color: #9a5d60;
  box-shadow: none;
  font-size: 12px;
}

.message-actions button {
  width: auto;
  min-width: 58px;
  margin: 0;
  padding: 8px 11px;
  border-radius: 9px;
  background: transparent;
  color: rgba(255, 255, 255, 0.94);
  box-shadow: none;
  font-size: 13px;
}

.message-actions button + button {
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.message-actions button:disabled {
  opacity: 0.4;
}
.reactions{display:flex;gap:4px;flex-wrap:wrap;margin-top:5px}.reaction-chip,.reaction-picker button{border:0;border-radius:999px;background:rgba(255,255,255,.48);padding:3px 8px;font:500 12px/1 system-ui;color:#476070}.reaction-picker{position:absolute;z-index:8;display:flex;gap:3px;padding:6px;border-radius:16px;background:rgba(245,250,252,.94);box-shadow:0 8px 24px rgba(60,90,110,.16);bottom:100%;right:0}.reaction-picker button{font-size:18px;padding:5px;background:transparent}.pin-badge{font-size:11px;color:#66818e;margin:3px 8px}.message.pinned .bubble{box-shadow:0 0 0 1px rgba(112,166,187,.28),0 8px 22px rgba(77,128,151,.12)}
/* Message actions use the same quiet glass language as the header menu. */
.message-actions.open{padding:4px;gap:2px;border:1px solid rgba(255,255,255,.72);border-radius:15px;background:linear-gradient(135deg,rgba(248,252,253,.96),rgba(226,240,246,.94),rgba(248,252,253,.96));box-shadow:0 10px 26px rgba(68,105,122,.18),0 2px 6px rgba(68,105,122,.08);-webkit-backdrop-filter:blur(18px) saturate(115%);backdrop-filter:blur(18px) saturate(115%)}
.message-actions.open::after{border-top-color:rgba(231,243,248,.96)}.message-actions.open.below::after{border-bottom-color:rgba(231,243,248,.96)}
.message-actions button{min-width:54px;padding:7px 9px;border-radius:11px;color:#516b78;font:500 12px/1.1 system-ui,sans-serif;letter-spacing:.01em}.message-actions button+button{border-left:1px solid rgba(126,158,171,.16)}.message-actions button:hover,.message-actions button:focus-visible{background:rgba(255,255,255,.62);color:#345765;outline:none}.message-actions button:disabled{color:#8ea0a8}
.header-menu>button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.search-card{width:min(92vw,430px);padding:20px;border-radius:24px;background:linear-gradient(145deg,rgba(248,252,253,.97),rgba(229,242,248,.95));box-shadow:0 18px 50px rgba(55,92,110,.2);-webkit-backdrop-filter:blur(22px);backdrop-filter:blur(22px)}.search-form{display:flex;gap:8px;margin-top:16px}.search-form input{flex:1;min-width:0;border:1px solid rgba(126,158,171,.2);border-radius:14px;padding:11px 13px;background:rgba(255,255,255,.72);color:#405865;font:400 14px system-ui;outline:none}.search-form input:focus{border-color:rgba(102,157,180,.55);box-shadow:0 0 0 3px rgba(117,177,201,.12)}.search-form button{border:0;border-radius:13px;padding:0 16px;background:#789eaf;color:#fff;font-size:13px}.search-results{display:grid;gap:7px;margin-top:14px;max-height:48vh;overflow:auto;color:#67808d;font-size:13px}.search-result{display:grid;text-align:left;gap:3px;border:0;border-radius:14px;padding:10px 12px;background:rgba(255,255,255,.48);color:#506a77}.search-result span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.search-result small{color:#91a3ab;font-size:11px}.search-result:hover{background:rgba(255,255,255,.8)}
.message-actions.open{max-width:calc(100vw - 24px);overflow:hidden}.reaction-picker{max-width:calc(100vw - 28px);flex-wrap:wrap;justify-content:center}.pinned-banner{display:block;margin:6px auto 10px;padding:7px 14px;border:1px solid rgba(255,255,255,.6);border-radius:999px;background:rgba(241,248,251,.8);color:#587381;font-size:12px;box-shadow:0 5px 16px rgba(75,117,135,.1)}
.reaction-picker{display:grid;grid-template-columns:repeat(5,1fr);width:min(220px,calc(100vw - 32px));max-width:calc(100vw - 32px);box-sizing:border-box;gap:2px;padding:5px}.reaction-picker button{min-width:0}
.reaction-picker{transform-origin:bottom right;animation:reaction-pop 160ms cubic-bezier(.2,.8,.25,1) both}@keyframes reaction-pop{from{opacity:0;transform:translateY(5px) scale(.94)}to{opacity:1;transform:translateY(0) scale(1)}}
.pinned-banner{width:calc(100% - 24px);box-sizing:border-box;margin:6px auto 10px;border-color:rgba(255,255,255,.42);background:rgba(255,255,255,.22);box-shadow:0 6px 18px rgba(75,117,135,.08);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
.search-card{width:min(100%,390px);padding:22px;border:1px solid rgba(123,154,169,.22);border-radius:22px;background:linear-gradient(135deg,rgba(248,252,253,.72),rgba(227,241,247,.54),rgba(248,252,253,.72));background-size:180% 180%;box-shadow:0 24px 70px rgba(42,57,65,.16),inset 0 1px rgba(255,255,255,.68);-webkit-backdrop-filter:blur(24px) saturate(125%);backdrop-filter:blur(24px) saturate(125%);animation:glass-drift 16s ease-in-out infinite alternate}.search-form input{background:rgba(255,255,255,.48);border-color:rgba(123,154,169,.22)}.search-form button{background:rgba(120,158,175,.82);box-shadow:0 4px 12px rgba(81,125,143,.15)}
.search-modal{align-items:flex-start;padding:calc(72px + env(safe-area-inset-top)) 0 0;background:transparent;pointer-events:none}.search-modal .search-card{width:100%;max-width:none;padding:10px 14px 12px;border:0;border-radius:0 0 18px 18px;background:rgba(244,250,252,.94);box-shadow:0 5px 18px rgba(67,105,121,.12);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);animation:none;pointer-events:auto}.search-modal .calendar-heading{display:flex;align-items:center;gap:10px}.search-modal .calendar-heading h2{font-family:system-ui,sans-serif;font-size:15px;font-weight:550;margin:0}.search-modal .calendar-heading p{display:none}.search-modal .calendar-heading .quiet{font-size:22px}.search-modal .search-form{margin-top:8px}.search-modal .search-form input{height:36px;padding:8px 12px;border:0;border-radius:12px;background:rgba(224,239,245,.64);box-shadow:inset 0 1px rgba(255,255,255,.65)}.search-modal .search-form button{height:36px;padding:0 14px;border-radius:12px;background:#789eaf}.search-modal .search-results{max-height:38vh;margin-top:8px}.search-modal .search-result{background:rgba(255,255,255,.55)}

.photo,
.send,
.compose-glass.has-text .send {
  color: #58707d;
}

.new-messages {
  bottom: calc(66px + env(safe-area-inset-bottom));
  background: rgba(128, 164, 182, 0.7);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

#chatView:has(.compose-glass:focus-within) .new-messages {
  bottom: calc(125px + env(safe-area-inset-bottom));
}

@keyframes message-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes quote-highlight {
  0%, 100% { filter: brightness(1); }
  35% { filter: brightness(0.9); }
}

@keyframes ambient-shift {
  from { background-position: 0% 0%; }
  to { background-position: 4% 3%; }
}

@keyframes glass-drift {
  from { background-position: 0% 35%; }
  to { background-position: 100% 65%; }
}

@media (prefers-reduced-motion: reduce) {
  body,
  .bubble {
    animation: none;
  }

  .compose-glass,
  .photo,
  .send,
  .bubble::before {
    transition: none;
    animation: none;
  }

  .chat header,
  .header-menu,
  .calendar-card {
    animation: none;
  }
}

/* Source: public/ios-layout-fix.css */
/* Edge-to-edge PWA shell: floating glass chrome over a full-screen message layer. */
.chat {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  overflow: hidden;
}

.chat header {
  position: absolute;
  z-index: 10;
  top: 0;
  right: 0;
  left: 0;
  border: 0;
  background: linear-gradient(120deg, rgba(248, 250, 251, 0.97), rgba(240, 248, 251, 0.93), rgba(248, 250, 251, 0.97));
  background-size: 180% 180%;
  box-shadow: 0 7px 20px rgba(76, 102, 115, 0.1), 0 1px 0 rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  backdrop-filter: blur(18px) saturate(120%);
  animation: glass-drift 16s ease-in-out infinite alternate;
}

#messages {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding-top: calc(92px + env(safe-area-inset-top));
  padding-bottom: calc(70px + env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
}

#composer {
  position: absolute;
  z-index: 10;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
}

.reply-bar {
  position: absolute;
  z-index: 11;
  right: 0;
  bottom: calc(66px + env(safe-area-inset-bottom));
  left: 0;
}

#chatView:has(.compose-glass:focus-within) #messages {
  padding-bottom: calc(130px + env(safe-area-inset-bottom));
}

#chatView:has(.compose-glass:focus-within) .reply-bar {
  bottom: calc(125px + env(safe-area-inset-bottom));
}

.message {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.message.mine {
  align-items: flex-end;
}

.message .bubble,
.message.mine .bubble {
  width: fit-content;
  max-width: 100%;
}

.reply-quote,
.mine .reply-quote {
  box-sizing: border-box;
  display: -webkit-box;
  width: fit-content;
  max-width: min(100%, calc(100vw - 44px));
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.reply-quote strong {
  display: inline;
  max-width: none;
  overflow: visible;
  white-space: normal;
}

.reply-quote span {
  display: inline;
  max-width: 100%;
  overflow: visible;
  white-space: normal;
}

.message .bubble.image,
.message.mine .bubble.image {
  width: min(182px, 34vw) !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
  border-radius: var(--message-radius) !important;
  isolation: isolate;
  contain: paint;
  transform: translateZ(0);
  -webkit-mask: linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0);
}

.bubble.image img {
  width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: contain;
  background: transparent !important;
  box-shadow: none !important;
  animation: none !important;
  border-radius: inherit !important;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.message .bubble.image.is-loading,
.message.mine .bubble.image.is-loading {
  aspect-ratio: 4 / 3;
  background: linear-gradient(105deg, rgba(218, 230, 236, 0.72) 20%, rgba(244, 249, 251, 0.9) 42%, rgba(218, 230, 236, 0.72) 64%) !important;
  background-size: 220% 100% !important;
  animation: image-placeholder 1.25s ease-in-out infinite !important;
}

.bubble.image.is-loading img {
  width: 100%;
  height: 100%;
  opacity: 0;
}

@keyframes image-placeholder {
  to { background-position: -220% 0; }
}

@media (max-width: 600px) {
  .message .bubble.image,
  .message.mine .bubble.image {
    width: min(154px, 41vw) !important;
  }

  .bubble.image img {
    max-height: 250px;
  }
}
