/* Signal-Chat-Archiv Viewer — Stefan ↔ Alessandra
   SANDY · 2026-05-31 · Plain CSS, kein Framework. */

:root {
  --topbar-h: 56px;
  --sidebar-w: 240px;
  --radius: 18px;
  --bubble-pad: 10px 14px;
  --gap: 8px;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  --font-msg: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* Themes */
body[data-theme="dark"] {
  --bg: #0f1419;
  --bg-elev: #181d23;
  --bg-elev-2: #1e242c;
  --border: #283038;
  --text: #e5e9ef;
  --text-dim: #95a0ad;
  --text-faint: #5d6874;
  --accent: #3b82f6;          /* Signal-Blau */
  --me-bg: #1d4e89;           /* Stefan — outgoing */
  --me-text: #ffffff;
  --her-bg: #234a42;          /* Alessandra — incoming, mintgrün dunkel */
  --her-text: #e8f6f1;
  --quote-bar: #6ea8ff;
  --datesep-bg: #20262e;
  --datesep-text: #b1bcc9;
  --hl: #ffeb3b;
  --hl-text: #1a1a1a;
  --shadow: 0 1px 2px rgba(0,0,0,.4);
}
body[data-theme="light"] {
  --bg: #f1f4f8;
  --bg-elev: #ffffff;
  --bg-elev-2: #fbfcfe;
  --border: #dde2ea;
  --text: #1a2230;
  --text-dim: #5a6677;
  --text-faint: #8a96a8;
  --accent: #2b6cb0;
  --me-bg: #d7f0fd;           /* Stefan — outgoing (hell-blau wie iMessage Gegenüber) */
  --me-text: #0a2638;
  --her-bg: #d8f0e4;          /* Alessandra — incoming, mintgrün hell */
  --her-text: #143d33;
  --quote-bar: #2b6cb0;
  --datesep-bg: #e5ebf3;
  --datesep-text: #4f5b6b;
  --hl: #ffeb3b;
  --hl-text: #1a1a1a;
  --shadow: 0 1px 2px rgba(20, 30, 50, .08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* Universeller [hidden]-Override — schlägt display:flex etc. */
[hidden] { display: none !important; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.45;
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== Login-Stage ===== */
.login-stage {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  padding: 20px;
  z-index: 200;
}
body[data-stage="app"] .login-stage { display: none; }
.login-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px 24px;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  display: flex; flex-direction: column; gap: 14px;
  color: var(--text);
}
.login-mark { color: var(--accent); align-self: center; margin-bottom: 4px; }
.login-title { margin: 0; font-size: 22px; font-weight: 600; text-align: center; letter-spacing: -.01em; }
.login-sub { margin: 0 0 8px; font-size: 14px; color: var(--text-dim); text-align: center; }
.login-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-dim); }
.login-field input {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
  font-size: 15px;
}
.login-field input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.login-btn {
  background: var(--accent); color: #fff;
  border: 0; border-radius: 10px;
  padding: 12px 14px; font: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; margin-top: 4px;
  transition: filter .15s, transform .05s;
}
.login-btn:hover { filter: brightness(1.08); }
.login-btn:active { transform: translateY(1px); }
.login-btn:disabled { opacity: .5; cursor: not-allowed; }
.login-error {
  background: rgba(220, 53, 69, .12);
  border: 1px solid rgba(220, 53, 69, .35);
  color: #ff8a8a;
  font-size: 13px; padding: 8px 12px; border-radius: 8px;
  text-align: center; margin: 0;
}
body[data-theme="light"] .login-error { color: #b03030; }
.login-info {
  background: rgba(59, 130, 246, .12);
  border: 1px solid rgba(59, 130, 246, .35);
  color: var(--text);
  font-size: 13px; padding: 8px 12px; border-radius: 8px;
  text-align: center; margin: 0;
  line-height: 1.45;
}
.login-forgot {
  margin: 8px 0 0; text-align: center; font-size: 13px; color: var(--text-dim);
}
.login-forgot a {
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px dashed var(--text-faint);
  padding-bottom: 1px;
}
.login-forgot a:hover { color: var(--text); border-bottom-color: var(--text-dim); }

body[data-stage="login"] .topbar,
body[data-stage="login"] .layout,
body[data-stage="forgot"] .topbar,
body[data-stage="forgot"] .layout,
body[data-stage="reset"] .topbar,
body[data-stage="reset"] .layout { display: none !important; }
body[data-stage="app"] #loginStage,
body[data-stage="forgot"] #loginStage,
body[data-stage="reset"] #loginStage { display: none; }
body[data-stage="app"] #forgotStage,
body[data-stage="login"] #forgotStage,
body[data-stage="reset"] #forgotStage { display: none; }
body[data-stage="app"] #resetStage,
body[data-stage="login"] #resetStage,
body[data-stage="forgot"] #resetStage { display: none; }

/* ===== Load-More-Banner ===== */
.load-more {
  align-self: center;
  display: block;
  margin: 14px auto;
  padding: 8px 18px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.load-more:hover { background: var(--bg-elev); color: var(--text); }
.load-more.loading { color: var(--text-faint); cursor: progress; }

/* ===== Attachment-Platzhalter mit Datum (MICK-Vorschlag) ===== */
.att-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  color: var(--text-dim);
  font-size: 12px; text-align: center;
  padding: 10px;
  background: repeating-linear-gradient(45deg, var(--bg-elev-2) 0 8px, var(--bg-elev) 8px 16px);
  border-radius: inherit;
  line-height: 1.4;
}
.att-placeholder .ic { font-size: 28px; margin-bottom: 6px; }
.att-placeholder .lbl { color: var(--text); font-weight: 500; margin-bottom: 2px; }
.att-placeholder .when { color: var(--text-faint); font-size: 11px; }

/* ===== Topbar ===== */
.topbar {
  position: fixed; inset: 0 0 auto 0;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 14px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}
.topbar .title { flex: 0 1 auto; min-width: 0; }
.topbar .title .t1 {
  font-weight: 600; font-size: 15px; line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar .title .t1 .amp { color: var(--accent); margin: 0 4px; font-weight: 400; }
.topbar .title .t2 {
  font-size: 12px; color: var(--text-dim); line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar .search {
  flex: 1 1 auto; max-width: 480px;
  display: flex; align-items: center; gap: 6px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--text-dim);
}
.topbar .search:focus-within { border-color: var(--accent); }
.topbar .search input {
  flex: 1; min-width: 0;
  background: transparent; border: 0; outline: 0;
  color: var(--text);
  font: inherit;
  padding: 4px 0;
}
.topbar .search input::placeholder { color: var(--text-faint); }
.search-count {
  font-size: 11px; font-variant-numeric: tabular-nums;
  color: var(--text-dim); padding: 0 4px; white-space: nowrap;
}
.iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; cursor: pointer;
  width: 36px; height: 36px; border-radius: 50%;
  color: var(--text-dim);
  flex: 0 0 auto;
  transition: background .15s, color .15s;
}
.iconbtn:hover { background: var(--bg-elev-2); color: var(--text); }
.iconbtn.search-clear { width: 26px; height: 26px; }
.theme-toggle .i-sun { display: none; }
body[data-theme="light"] .theme-toggle .i-moon { display: none; }
body[data-theme="light"] .theme-toggle .i-sun { display: inline; }

.menu-toggle { display: none; }
@media (max-width: 840px) {
  .menu-toggle { display: inline-flex; }
}

/* ===== Layout (Sidebar + Chat) ===== */
.layout {
  position: fixed; inset: var(--topbar-h) 0 0 0;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
}

/* ===== Sidebar ===== */
.sidebar {
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 14px 12px 24px;
  display: flex; flex-direction: column; gap: 18px;
}
.sb-title {
  text-transform: uppercase; letter-spacing: .06em;
  font-size: 11px; font-weight: 600; color: var(--text-faint);
  margin-bottom: 8px; padding: 0 4px;
}
.year-nav { display: flex; flex-direction: column; gap: 2px; }
.year-row {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px; border-radius: 8px;
  cursor: pointer; user-select: none;
  color: var(--text);
}
.year-row:hover { background: var(--bg-elev-2); }
.year-row .y { font-weight: 600; font-variant-numeric: tabular-nums; }
.year-row .n { margin-left: auto; font-size: 11px; color: var(--text-dim); }
.year-row .caret { width: 14px; opacity: .55; transition: transform .15s; }
.year-row.open .caret { transform: rotate(90deg); }
.month-list { display: none; padding: 2px 0 6px 22px; }
.year-row.open + .month-list { display: block; }
.month-row {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 8px; border-radius: 6px;
  font-size: 13px; color: var(--text-dim);
  cursor: pointer;
}
.month-row:hover { background: var(--bg-elev-2); color: var(--text); }
.month-row .n { margin-left: auto; font-size: 10px; font-variant-numeric: tabular-nums; }

.stat-row {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 4px;
  font-size: 13px; color: var(--text-dim);
}
.stat-row b { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.s-me { background: var(--accent); }
.dot.s-her { background: #d63384; }
.dot.s-att { background: #7c3aed; }

.ann-box {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px; color: var(--text-dim);
  line-height: 1.45;
}
.ann-box .ann-date { color: var(--text); font-weight: 600; margin-bottom: 4px; }

/* Sidebar Mobile */
@media (max-width: 840px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: var(--topbar-h); left: 0; bottom: 0;
    width: 82%; max-width: 320px;
    transform: translateX(-100%);
    transition: transform .22s ease;
    z-index: 40;
    box-shadow: 4px 0 16px rgba(0,0,0,.25);
  }
  body[data-sidebar="open"] .sidebar { transform: translateX(0); }
}

/* ===== Chat-Main ===== */
.chat {
  position: relative;
  overflow-y: auto;
  scroll-behavior: smooth;
  outline: 0;
}
.load-hint, .empty-hint {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-dim);
  font-size: 14px;
  text-align: center;
}
.viewport {
  list-style: none; margin: 0; padding: 18px 14px 80px;
  display: flex; flex-direction: column; gap: var(--gap);
  max-width: 920px; margin: 0 auto;
}
.scroll-pad { /* virtual-scroll Platzhalter */
  pointer-events: none;
}

/* ===== Date-Separator ===== */
.date-sep {
  align-self: center;
  background: var(--datesep-bg);
  color: var(--datesep-text);
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
  padding: 4px 12px; border-radius: 999px;
  margin: 14px 0 6px;
}

/* ===== Bubbles ===== */
.msg {
  display: flex; flex-direction: column;
  max-width: 78%;
  position: relative;
}
.msg.me   { align-self: flex-end;  }
.msg.her  { align-self: flex-start; }

.bubble {
  padding: var(--bubble-pad);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  word-wrap: break-word; overflow-wrap: anywhere;
  white-space: pre-wrap;
  font-family: var(--font-msg);
  font-size: 15px;
  line-height: 1.4;
}
.msg.me .bubble  { background: var(--me-bg);  color: var(--me-text);  border-bottom-right-radius: 4px; position: relative; }
.msg.her .bubble { background: var(--her-bg); color: var(--her-text); border-bottom-left-radius: 4px; border: 1px solid transparent; position: relative; }
body[data-theme="dark"]  .msg.her .bubble { border-color: #2f5d54; }
body[data-theme="light"] .msg.her .bubble { border-color: #bae0cf; }
body[data-theme="light"] .msg.me  .bubble { border: 1px solid #b6deff; }

/* === Sprechblasen-Spitze (Tail) === */
.msg.me .bubble::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: -7px;
  width: 14px;
  height: 18px;
  background: var(--me-bg);
  /* Spitze in Richtung Sprecher: nach rechts unten */
  clip-path: polygon(0 0, 100% 100%, 0 100%);
  pointer-events: none;
}
body[data-theme="light"] .msg.me .bubble::after {
  /* Im Light-Mode passt der border zur me-bg — Tail erbt das via background-color */
  background: var(--me-bg);
}

.msg.her .bubble::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -7px;
  width: 14px;
  height: 18px;
  background: var(--her-bg);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}

/* === Auroras (subliminale Sender-Glows an Chat-Rändern) === */
.chat { position: relative; isolation: isolate; }
.aurora {
  position: fixed;
  top: var(--topbar-h);
  bottom: 0;
  width: 100px;
  pointer-events: none;
  z-index: 1;                /* hinter Bubbles, vor Chat-Hintergrund */
  opacity: 0.55;
  filter: blur(28px);
  background-size: 100% 220%;
  mix-blend-mode: screen;    /* Glow-Effekt auf dunklem Hintergrund */
}
.aurora-her {
  /* Alessandra spricht links → Aurora-Mint links, ab Sidebar-Rand */
  left: var(--sidebar-w);
  background-image: linear-gradient(180deg,
    transparent 0%,
    var(--aurora-her-color) 18%,
    transparent 42%,
    var(--aurora-her-color) 68%,
    transparent 100%);
  animation: aurora-flow 17s ease-in-out infinite;
}
.aurora-me {
  /* Stefan spricht rechts → Aurora-Blau rechts */
  right: 0;
  background-image: linear-gradient(180deg,
    transparent 6%,
    var(--aurora-me-color) 26%,
    transparent 50%,
    var(--aurora-me-color) 78%,
    transparent 100%);
  animation: aurora-flow 14s ease-in-out infinite reverse;
}
@keyframes aurora-flow {
  0%   { background-position: 0   0%; }
  50%  { background-position: 0 100%; }
  100% { background-position: 0   0%; }
}
body[data-theme="dark"] {
  --aurora-me-color: #3b82f6;
  --aurora-her-color: #5fa8ad;
}
body[data-theme="light"] {
  --aurora-me-color: #2b6cb0;
  --aurora-her-color: #2f8c84;
}
body[data-theme="light"] .aurora {
  mix-blend-mode: multiply;   /* Glow auf Hellem als sanfter Tint */
  opacity: 0.22;
}
/* Bubbles + Banner über der Aurora */
.viewport, .load-hint, .empty-hint, .load-more { position: relative; z-index: 2; }

/* === Vertikale Sender-Namen am Bildrand === */
.side-name {
  position: fixed;
  top: var(--topbar-h);
  bottom: 0;
  width: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  opacity: 0.78;
  pointer-events: none;
  z-index: 3;
  font-family: var(--font-ui);
  user-select: none;
  /* Schatten für Lesbarkeit gegen die Aurora */
  text-shadow:
    0 0 6px var(--bg),
    0 0 14px var(--bg),
    0 0 22px var(--bg);
}
.side-her {
  left: var(--sidebar-w);     /* Alessandra links, nach Sidebar */
  color: var(--aurora-her-color);
}
.side-me {
  /* Stefan rechts — Scrollbar-Breite einrechnen, sonst wird er überdeckt */
  right: calc(env(safe-area-inset-right, 0px) + 18px);
  color: var(--aurora-me-color);
}
body[data-theme="light"] .side-name {
  opacity: 0.6;
  font-weight: 700;
  text-shadow:
    0 0 6px var(--bg),
    0 0 14px var(--bg);
}

/* Mobile: keine Sidebar → Aurora + Name auf 0 setzen, schmaler */
@media (max-width: 840px) {
  .aurora-her { left: 0; }
  .side-her   { left: 0; }
  .aurora { width: 60px; }
  .side-name { width: 48px; font-size: 24px; letter-spacing: 0.32em; }
  .side-me { right: 14px; }
}
@media (max-width: 520px) {
  .aurora { width: 40px; opacity: 0.45; filter: blur(18px); }
  .side-name { width: 32px; font-size: 18px; letter-spacing: 0.24em; opacity: 0.6; }
  .side-me { right: 10px; }
}

.quote {
  display: block;
  border-left: 3px solid var(--quote-bar);
  padding: 4px 10px;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-dim);
  background: rgba(255,255,255,.04);
  border-radius: 6px 6px 6px 0;
  white-space: pre-wrap;
  font-style: italic;
  opacity: .9;
}
body[data-theme="light"] .quote { background: rgba(0,0,0,.04); }
.msg.me .quote { color: rgba(255,255,255,.85); background: rgba(255,255,255,.12); }
body[data-theme="light"] .msg.me .quote {
  color: rgba(10, 38, 56, .78);
  background: rgba(43, 108, 176, .08);
  border-left-color: var(--quote-bar);
}

.meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 3px;
  padding: 0 6px;
}
.msg.me .meta { justify-content: flex-end; }

.reactions {
  position: absolute; bottom: -10px;
  display: flex; gap: 4px;
  font-size: 12px;
}
.msg.me .reactions { right: 8px; }
.msg.her .reactions { left: 8px; }
.reactions .react {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 7px;
  box-shadow: var(--shadow);
}

/* ===== Attachments ===== */
.atts {
  display: grid; gap: 4px; margin-top: 6px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  align-items: start;
}
.atts.single { grid-template-columns: 1fr; }
.att {
  display: block; position: relative;
  border-radius: 12px; overflow: hidden;
  background: var(--bg-elev-2);
  cursor: pointer;
  max-height: 360px;
}
/* Single-Attachment: Bild proportional, max-Cap, kein Beschnitt */
.atts.single .att {
  max-width: 360px;
  width: max-content;
}
.atts.single .att img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
}
/* Multi-Attachments im Raster: einheitliche Kachelhöhe, aber Bild contain
   damit nichts oben/unten beschnitten wird (Letterbox in Tiles-Farbe) */
.atts:not(.single) .att {
  aspect-ratio: 1 / 1;
}
.atts:not(.single) .att img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
/* Platzhalter füllt seinen Container immer voll */
.att .att-placeholder {
  min-height: 140px;
}
.att-missing {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  color: var(--text-faint);
  font-size: 12px; text-align: center;
  background: repeating-linear-gradient(45deg, var(--bg-elev-2) 0 8px, var(--bg-elev) 8px 16px);
}
.att-missing .ic { font-size: 24px; margin-bottom: 4px; }

.att.file {
  aspect-ratio: auto;
  padding: 10px 12px;
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
  border: 1px solid var(--border);
}
.att.file .fic { font-size: 22px; }
.att.file .fn { color: var(--text); word-break: break-all; }

/* Klickbarer Datei-Platzhalter (Generic File) */
.att-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: filter .12s, transform .08s;
}
.att-link:hover { filter: brightness(1.08); }
.att-link:hover .att-placeholder .lbl { text-decoration: underline; text-underline-offset: 3px; }
.att-link:active { transform: scale(0.985); }

/* ===== Search highlight ===== */
mark.hl { background: var(--hl); color: var(--hl-text); border-radius: 3px; padding: 0 2px; }

/* ===== Links in Bubbles ===== */
.bubble a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.bubble a:hover { text-decoration-thickness: 2px; }
.msg.me .bubble a { color: rgba(255,255,255,0.96); }
body[data-theme="light"] .msg.me .bubble a { color: var(--me-text); }
.msg.her .bubble a { color: var(--her-text); }

/* ===== Lightbox ===== */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 24px;
}
.lightbox[hidden] { display: none; }
.backdrop[hidden] { display: none; }
.lb-stage { max-width: 100%; max-height: 100%; text-align: center; }
.lb-stage img { max-width: 90vw; max-height: 80vh; border-radius: 6px; box-shadow: 0 8px 32px rgba(0,0,0,.6); }
.lb-cap { color: #ccc; font-size: 12px; margin-top: 8px; }
.lb-close { position: absolute; top: 16px; right: 16px; color: #fff; background: rgba(255,255,255,.12); }
.lb-close:hover { background: rgba(255,255,255,.22); color: #fff; }

/* ===== Backdrop (Mobile-Sidebar) ===== */
.backdrop {
  position: fixed; inset: var(--topbar-h) 0 0 0;
  background: rgba(0,0,0,.4);
  z-index: 35;
}

/* ===== Anniversary-Highlight ===== */
.anniv-banner {
  align-self: center;
  background: linear-gradient(90deg, #d63384 0%, #9333ea 100%);
  color: #fff;
  font-size: 12px; font-weight: 600;
  padding: 6px 14px; border-radius: 999px;
  margin: 14px 0 4px;
  box-shadow: 0 2px 8px rgba(214, 51, 132, .35);
}

/* ===== Small screens ===== */
@media (max-width: 520px) {
  .topbar { padding: 0 8px; gap: 8px; }
  .topbar .title .t1 { font-size: 14px; }
  .topbar .title .t2 { font-size: 11px; }
  .topbar .search { max-width: none; }
  .msg { max-width: 88%; }
  .bubble { font-size: 14.5px; }
  .viewport { padding: 14px 8px 80px; }
}
