:root {
  color-scheme: dark;
  --bg: #06111d;
  --panel: #0b1a29;
  --ink: #e5edf7;
  --muted: #8fa1b7;
  --line: #252c34;
  --accent: #151c24;
  --accent-hover: #202832;
  --accent-ink: #ffffff;
  --secondary: #111820;
  --own-bg: #151c24;
  --own-border: #303943;
  --passcode-bg: #111820;
  --passcode-ink: #edf2f7;
  --highlight: #ecc94b;
  --ok: #22FAAA;
  --danger: #f56565;
  --screen-bg-solid: #020912;
  --screen-bg: radial-gradient(circle 620px at 50% 0%, rgb(28 35 42 / 94%) 0%, rgb(11 16 22 / 96%) 48%, #030609 100%), #030609;
  --screen-bar: #303741;
  --brushed-metal-bg:
    repeating-linear-gradient(0deg, rgb(255 255 255 / 2.4%) 0 1px, rgb(0 0 0 / 2.1%) 1px 2px),
    linear-gradient(90deg, rgb(255 255 255 / 2%) 0%, rgb(255 255 255 / 6%) 50%, rgb(0 0 0 / 7%) 100%),
    linear-gradient(180deg, #3d444c 0%, #303741 48%, #242a32 100%);
  --status-header-gradient: var(--brushed-metal-bg);
  --composer-field-gradient: linear-gradient(180deg, #202833 0%, #151d27 100%);
  --menu-surface: var(--brushed-metal-bg);
  --menu-control: #111820;
  --menu-control-active: #030609;
  --actions-menu-overlap: 0px;
  --actions-menu-padding-x: 10px;
  --actions-menu-padding-top: calc(10px + var(--actions-menu-overlap));
  --actions-menu-padding-bottom: 14px;
  --actions-menu-duration: 260ms;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--screen-bg-solid);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--screen-bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

html:has(body.native-shell),
body.native-shell {
  width: 100%;
  height: 100%;
  min-height: 100%;
  max-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

html:has(body.native-shell) {
  background: var(--screen-bg-solid);
}

body.native-shell {
  position: fixed;
  inset: 0;
}

body.native-shell .app {
  width: 100%;
  height: 100%;
  min-height: 100%;
  max-height: 100%;
  overflow: hidden;
  place-items: stretch;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  background: linear-gradient(180deg, rgb(0 0 0 / 38%) 0%, rgb(0 0 0 / 0%) 11%, rgb(0 0 0 / 0%) 87%, rgb(0 0 0 / 40%) 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  font-size: 12px;
}

input,
textarea {
  font-size: 14px;
}

#messageInput {
  user-select: text;
  -webkit-user-select: text;
  -webkit-touch-callout: default;
}

input::placeholder,
textarea::placeholder {
  color: #4c5968;
  opacity: 1;
}

button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #d6dde6;
  cursor: pointer;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 700;
  transition: background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (hover: hover) and (pointer: fine) {
  button:hover:not(:disabled) {
    background: var(--accent-hover);
    box-shadow: 0 10px 24px rgb(0 0 0 / 26%);
  }
}

@media (hover: none), (pointer: coarse) {
  button:hover:not(:disabled) {
    background: var(--accent);
    box-shadow: none;
  }

  .actions button:hover:not(:disabled) {
    background: var(--menu-control);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 4%);
  }

  .composer button:hover:not(:disabled) {
    background: var(--menu-control);
    box-shadow: 0 12px 28px rgb(0 0 0 / 22%);
  }
}

.ghost {
  background: #2d3748;
  color: var(--ink);
}

.app {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
}

.panel {
  width: min(920px, 100%);
  background: var(--screen-bg);
  border: 1px solid rgb(92 101 113 / 22%);
  border-radius: 14px;
  box-shadow: 0 34px 100px rgb(0 0 0 / 56%);
}

.login {
  display: grid;
  align-content: center;
  gap: 20px;
  max-width: 440px;
  min-height: 420px;
  padding: 32px;
  background:
    radial-gradient(circle 420px at 50% 0%, rgb(50 57 66 / 70%) 0%, rgb(24 30 37 / 88%) 46%, #05080c 100%),
    var(--brushed-metal-bg);
  border-color: rgb(126 138 151 / 18%);
  box-shadow:
    0 34px 100px rgb(0 0 0 / 62%),
    inset 0 1px 0 rgb(255 255 255 / 4%);
}

.brand-lockup {
  position: relative;
  display: block;
}

.brand-wordmark {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 3px 7px rgb(0 0 0 / 18%));
  opacity: 0.94;
}

.brand-logo-image {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 3px 7px rgb(0 0 0 / 18%));
  opacity: 0.98;
}

.chat-brand .brand-logo-image {
  display: none;
  filter: drop-shadow(0 3px 7px rgb(0 0 0 / 18%));
  opacity: 0.98;
}

.deal-chat-mode .chat-brand .brand-logo-image {
  display: block;
}

.deal-chat-mode .chat-peer-title {
  display: none;
}

.chat-peer-title {
  display: flex;
  align-items: center;
  column-gap: 10px;
  min-height: 38px;
  color: var(--screen-bg-solid);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  filter: drop-shadow(0 3px 7px rgb(0 0 0 / 16%));
}

.chat-peer-status-dot {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #788491;
  box-shadow: 0 0 0 4px rgb(120 132 145 / 16%);
}

.chat-peer-title[data-state="active"] .chat-peer-status-dot,
.chat-peer-title[data-state="online"] .chat-peer-status-dot {
  background: var(--ok);
  box-shadow: 0 0 0 4px rgb(34 250 170 / 16%);
}

.chat-peer-title[data-state="away"] .chat-peer-status-dot {
  background: #facc15;
  box-shadow: 0 0 0 4px rgb(250 204 21 / 18%);
}

.chat-peer-title[data-state="offline"] .chat-peer-name {
  color: var(--screen-bg-solid);
}

.brand-dots {
  position: absolute;
  width: 11%;
  height: auto;
  left: calc(100% + 6px);
  top: -82%;
  transform: translateX(0);
  filter: none;
  opacity: 0.94;
}

.login-brand {
  width: min(176px, 58vw);
  margin: 0 auto 2px;
  visibility: hidden;
}

.chat-brand {
  width: auto;
  min-width: min(152px, 34vw);
  margin-left: 8px;
}

.copyright {
  margin: 0;
  color: #a0a8b2;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
  visibility: hidden;
}

.stack {
  display: grid;
  gap: 16px;
}

.login-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgb(92 101 113 / 28%);
  border-radius: 10px;
  background: var(--composer-field-gradient);
  color: var(--ink);
  outline: none;
}

input {
  min-height: 44px;
  padding: 0 12px;
}

#passkey,
#authCode,
#pinInput {
  -webkit-text-security: disc;
}

textarea {
  min-height: 58px;
  resize: vertical;
  padding: 12px;
}

input:focus,
textarea:focus {
  border-color: rgb(158 169 181 / 34%);
  box-shadow: 0 0 0 3px rgb(255 255 255 / 7%);
}

.kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 24px;
  font-size: 32px;
  line-height: 1.1;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
}

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

.login-status-wrap {
  display: grid;
  place-items: center;
  min-height: 38px;
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.login-status-text {
  display: block;
  max-width: 100%;
  color: #9faec1;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.login button {
  background: var(--menu-control);
  color: #d6dde6;
  box-shadow: 0 10px 24px rgb(0 0 0 / 30%);
}

.login button:hover:not(:disabled),
.login button:focus-visible {
  background: var(--menu-control);
  box-shadow: 0 12px 28px rgb(0 0 0 / 34%);
}

.login button:active:not(:disabled) {
  background: var(--menu-control-active);
}

.hidden {
  display: none;
}

html.session-restore-pending #loginPanel {
  visibility: hidden;
}

.panel.hidden {
  display: none;
}

.chat {
  position: relative;
  height: calc(100vh - 48px);
  height: calc(100dvh - 48px);
  display: grid;
  grid-template-areas:
    "topbar"
    "info"
    "messages"
    "composer";
  grid-template-rows: auto auto 1fr auto;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: var(--brushed-metal-bg);
  background-attachment: fixed, fixed, fixed;
}

.gallery-gate-word {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 0;
  left: 23px;
  right: auto;
  width: auto;
  opacity: 0;
  pointer-events: none;
  perspective: 420px;
  color: var(--screen-bg-solid);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  filter: drop-shadow(0 3px 7px rgb(0 0 0 / 16%));
}

.gallery-gate-word span {
  position: relative;
  display: inline-block;
  min-width: 0.62em;
  overflow: hidden;
  transform-origin: 50% 50%;
  transform-style: preserve-3d;
}

.chat.gallery-gate-animating .chat-brand .brand-logo-image,
.chat.gallery-gate-animating .chat-peer-name {
  opacity: 0;
}

.chat.gallery-gate-animating .gallery-gate-word {
  opacity: 1;
}

.chat.gallery-gate-animating .gallery-gate-word span {
  animation: gallery-letter-pirouette 520ms cubic-bezier(.2, .78, .22, 1) both;
  animation-delay: calc(var(--i) * 68ms);
}

@keyframes gallery-letter-pirouette {
  0% {
    transform: rotateX(0deg);
  }

  52% {
    transform: rotateX(180deg);
  }

  100% {
    transform: rotateX(360deg);
  }
}

.chat-brand {
  touch-action: pan-y;
}

.topbar {
  grid-area: topbar;
}

.info-panel {
  grid-area: info;
  display: none;
}

.messages-shell {
  grid-area: messages;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--screen-bg);
}

.messages-stage {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  transition: transform 180ms ease;
}

.messages {
  position: relative;
  flex: 1 1 auto;
  inset: auto;
  min-height: 0;
  z-index: 2;
}

.composer {
  grid-area: composer;
}

.topbar,
.roomline,
.composer {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.topbar {
  position: relative;
  z-index: 10;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 0;
  background: transparent;
  box-shadow:
    0 12px 22px rgb(0 0 0 / 34%),
    0 4px 8px rgb(0 0 0 / 22%);
}

.actions {
  position: absolute;
  top: calc(100% - var(--actions-menu-overlap));
  left: 0;
  right: 0;
  z-index: 1;
  display: grid;
  gap: 7px;
  width: 100%;
  min-width: 0;
  padding: 0 var(--actions-menu-padding-x);
  border: 0;
  border-radius: 0 0 18px 18px;
  background: var(--menu-surface);
  background-attachment: fixed, fixed, fixed;
  box-shadow: none;
  isolation: isolate;
  height: 0;
  opacity: 0;
  overflow: hidden;
  backdrop-filter: none;
  pointer-events: none;
  visibility: hidden;
  transform: translateY(0);
  transition:
    height var(--actions-menu-duration) cubic-bezier(.2, .78, .22, 1),
    padding var(--actions-menu-duration) cubic-bezier(.2, .78, .22, 1),
    opacity 0s linear 0s,
    visibility 0s linear 0s;
}

.actions::before {
  display: none;
}

.actions.open {
  pointer-events: auto;
  visibility: visible;
  height: var(--actions-menu-height, 320px);
  padding: var(--actions-menu-padding-top) var(--actions-menu-padding-x) var(--actions-menu-padding-bottom);
  opacity: 1;
  transform: translateY(0);
  transition:
    height var(--actions-menu-duration) cubic-bezier(.2, .78, .22, 1),
    padding var(--actions-menu-duration) cubic-bezier(.2, .78, .22, 1),
    opacity 0s linear 0s,
    visibility 0s linear 0s;
}

.chat.actions-menu-closing .actions {
  visibility: visible;
  height: 0;
  padding: 0 var(--actions-menu-padding-x);
  opacity: 1;
  transform: translateY(0);
  transition:
    height var(--actions-menu-duration) cubic-bezier(.2, .78, .22, 1),
    padding var(--actions-menu-duration) cubic-bezier(.2, .78, .22, 1),
    opacity 0s linear var(--actions-menu-duration),
    visibility 0s linear var(--actions-menu-duration);
}

.actions button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  background: var(--menu-control);
  color: #d6dde6;
  border-radius: 10px;
  border: 1px solid rgb(126 138 151 / 10%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 4%);
  font-size: 11px;
  position: relative;
  z-index: 1;
  opacity: 1;
  backdrop-filter: none;
}

.actions button.hidden {
  display: none;
}

.client-version-text {
  width: 100%;
  min-height: 16px;
  padding: 2px 4px 0;
  color: rgb(255 255 255 / 92%);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  text-align: center;
  overflow-wrap: anywhere;
  cursor: default;
  user-select: none;
}

body.native-shell .actions .client-version-text {
  color: rgb(255 255 255 / 92%) !important;
}

.actions button:active:not(:disabled),
.actions button.pressed-control:not(:disabled),
.menu-btn:active:not(:disabled),
.menu-btn.pressed-control:not(:disabled) {
  background: var(--menu-control-active);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 3%);
  transform: translateY(1px);
}

.menu-btn {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 999px;
  background: var(--menu-control);
  box-shadow: 0 12px 28px rgb(0 0 0 / 22%);
  margin-left: auto;
}

.chat-brand {
  position: relative;
  z-index: 3;
}

.menu-btn:hover:not(:disabled),
.menu-btn:focus-visible {
  background: var(--menu-control);
  box-shadow: 0 12px 28px rgb(0 0 0 / 22%);
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #d6dde6;
}

.menu-icon {
  position: relative;
}

.menu-icon::before,
.menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-icon::before {
  top: -6px;
}

.menu-icon::after {
  top: 6px;
}

.btn-icon {
  display: inline-block;
  flex: 0 0 auto;
  line-height: 0;
  background: #d6dde6;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.btn-icon {
  width: 23px;
  height: 23px;
}

.mask-icon {
  width: 24px;
  height: 24px;
  background: url("/icons/mask-icon-white.png?v=2") center / contain no-repeat;
  -webkit-mask-image: none;
  mask-image: none;
}

.exit-icon {
  --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 4.75C4 3.8 4.8 3 5.75 3h6.5C13.2 3 14 3.8 14 4.75V7h-2V5H6v14h6v-2h2v2.25c0 1-.8 1.75-1.75 1.75h-6.5C4.8 21 4 20.2 4 19.25V4.75Zm11.3 3.55c.4-.4 1-.4 1.4 0l3 3c.4.4.4 1 0 1.4l-3 3c-.4.4-1 .4-1.4 0s-.4-1 0-1.4l1.3-1.3H10c-.6 0-1-.4-1-1s.4-1 1-1h6.6l-1.3-1.3c-.4-.4-.4-1 0-1.4Z'/%3E%3C/svg%3E");
  -webkit-mask-image: var(--icon);
  mask-image: var(--icon);
}

.reconnect-icon {
  --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.7 6.3A8 8 0 1 0 19.8 14h-2.1A6 6 0 1 1 16.2 7.8L13 11h8V3l-3.3 3.3Z'/%3E%3C/svg%3E");
  -webkit-mask-image: var(--icon);
  mask-image: var(--icon);
}

.clear-icon {
  --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-3.7 6.3c.4-.4 1-.4 1.4 0l2.3 2.3 2.3-2.3c.4-.4 1-.4 1.4 0s.4 1 0 1.4L13.4 12l2.3 2.3c.4.4.4 1 0 1.4s-1 .4-1.4 0L12 13.4l-2.3 2.3c-.4.4-1 .4-1.4 0s-.4-1 0-1.4l2.3-2.3-2.3-2.3c-.4-.4-.4-1 0-1.4Z'/%3E%3C/svg%3E");
  -webkit-mask-image: var(--icon);
  mask-image: var(--icon);
}

.gallery-icon {
  --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2Zm0 2v9.5l4-4 3 3 2-2 5.5 5.5H20V6H4Zm12 1.5a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z'/%3E%3C/svg%3E");
  -webkit-mask-image: var(--icon);
  mask-image: var(--icon);
}

.send-icon {
  --icon: url("/icons/send.png?v=1");
  -webkit-mask-image: var(--icon);
  mask-image: var(--icon);
}

.roomline input {
  flex: 1;
}

.status {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--passcode-ink);
  font-size: 12px;
}

.info-panel {
  position: relative;
  display: none;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--passcode-ink);
  min-height: 42px;
  padding: 8px 12px;
  box-shadow:
    0 15px 24px rgb(0 0 0 / 38%),
    0 4px 10px rgb(0 0 0 / 28%);
  z-index: 6;
}

.connection-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ok);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

.connection-indicator::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  display: none;
  background: var(--ok);
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17 8h-1V6a4 4 0 0 0-8 0v2H7a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2Zm-7-2a2 2 0 1 1 4 0v2h-4V6Zm3 10.7V18h-2v-1.3a2 2 0 1 1 2 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17 8h-1V6a4 4 0 0 0-8 0v2H7a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2Zm-7-2a2 2 0 1 1 4 0v2h-4V6Zm3 10.7V18h-2v-1.3a2 2 0 1 1 2 0Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.connection-indicator[data-state="connected"]::before {
  display: block;
}

.connection-indicator.hidden {
  display: none;
}

.connection-stack {
  align-self: center;
  justify-self: end;
  display: grid;
  grid-template-areas: "status";
  align-items: center;
  justify-items: end;
  min-height: 20px;
}

.connection-stack > * {
  grid-area: status;
}

.header-sync-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #7f94ab;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

.header-sync-indicator::before {
  content: "";
  width: 9px;
  height: 9px;
  border: 2px solid rgb(127 148 171 / 42%);
  border-top-color: var(--ok);
  border-radius: 999px;
  animation: sync-spin 780ms linear infinite;
}

.header-sync-indicator.hidden {
  display: none;
}

.connection-indicator[data-state="reconnecting"],
.connection-indicator[data-state="disconnected"] {
  color: var(--danger);
}

.sync-indicator {
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #7f94ab;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  opacity: 1;
  transition: opacity 160ms ease;
}

.sync-indicator[data-state="ready"] {
  color: var(--ok);
}

.sync-indicator::before {
  content: "";
  display: none;
  width: 10px;
  height: 10px;
  border: 2px solid rgb(127 148 171 / 42%);
  border-top-color: var(--ok);
  border-radius: 999px;
}

.sync-indicator[data-state="syncing"]::before {
  display: block;
  animation: sync-spin 780ms linear infinite;
}

.sync-indicator.hidden {
  opacity: 0;
}

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

.presence-panel,
.presence-list {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 0;
}

.presence-user {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 20px;
  color: #aeb8c5;
  font-size: 12px;
  font-weight: 700;
}

.messages-shell {
  border-top: 1px solid rgb(37 63 83 / 76%);
  box-shadow: inset 0 8px 16px rgb(0 0 0 / 14%);
}

.presence-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #788491;
  box-shadow: 0 0 0 3px rgb(120 132 145 / 14%);
}

.presence-user[data-state="active"] .presence-dot,
.presence-user[data-state="online"] .presence-dot {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgb(34 250 170 / 14%);
}

.presence-user[data-state="away"] .presence-dot {
  background: #facc15;
  box-shadow: 0 0 0 3px rgb(250 204 21 / 16%);
}

.presence-user[data-state="offline"] .presence-name {
  color: #aeb8c5;
}

.presence-user[data-state="active"] .presence-name,
.presence-user[data-state="online"] .presence-name {
  color: #aeb8c5;
}

.security-panel {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  color: #9aa8b9;
  font-family: ui-monospace, SFMono-Regular, SFMono, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.security-copy {
  display: none;
  justify-items: end;
  gap: 2px;
}

.security-shield {
  content: "";
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  background: #9aa8b9;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2 4.5 5v5.8c0 4.6 3.1 8.9 7.5 10.2 4.4-1.3 7.5-5.6 7.5-10.2V5L12 2Zm3.7 7.7-4.4 4.4c-.4.4-1 .4-1.4 0l-1.8-1.8c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l1.1 1.1 3.7-3.7c.4-.4 1-.4 1.4 0s.4 1 0 1.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2 4.5 5v5.8c0 4.6 3.1 8.9 7.5 10.2 4.4-1.3 7.5-5.6 7.5-10.2V5L12 2Zm3.7 7.7-4.4 4.4c-.4.4-1 .4-1.4 0l-1.8-1.8c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l1.1 1.1 3.7-3.7c.4-.4 1-.4 1.4 0s.4 1 0 1.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.security-panel strong {
  margin-left: auto;
  color: #d4a64a;
  font-family: ui-monospace, SFMono-Regular, SFMono, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.security-copy span {
  color: #9aa8b9;
}

.security-sub {
  display: none;
  color: #a0aec0;
  font-family: ui-monospace, SFMono-Regular, SFMono, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.security-details {
  display: none;
  justify-items: end;
  gap: 2px;
  color: #7f8da0;
  font-family: ui-monospace, SFMono-Regular, SFMono, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
}

.security-details b {
  color: #a0aec0;
  font-weight: 800;
}

.security-details code {
  color: var(--highlight);
  font: inherit;
}

.room-meta,
.safety {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  padding: 4px 24px;
  background: transparent;
  color: var(--passcode-ink);
  font-size: 12px;
}

.safety {
  border-bottom: 0;
}

.room-meta span,
.safety span {
  display: inline-flex;
  gap: 12px;
  align-items: center;
}

.room-meta span::before,
.safety span::before {
  content: "";
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.safety span::before {
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23A0AEC0' d='M7 10V8a5 5 0 0 1 10 0v2h.5c.8 0 1.5.7 1.5 1.5v7c0 .8-.7 1.5-1.5 1.5h-11C5.7 20 5 19.3 5 18.5v-7c0-.8.7-1.5 1.5-1.5H7Zm2 0h6V8a3 3 0 0 0-6 0v2Zm3 3.2a1.3 1.3 0 0 0-.7 2.4v1.2c0 .4.3.7.7.7s.7-.3.7-.7v-1.2a1.3 1.3 0 0 0-.7-2.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.room-meta span::before {
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23A0AEC0' d='M4 11.2 12 4l8 7.2c.4.4.4 1 .1 1.4-.4.4-1 .4-1.4.1L18 12v7c0 .6-.4 1-1 1h-3.5v-5h-3v5H7c-.6 0-1-.4-1-1v-7l-.7.7c-.4.3-1 .3-1.4-.1-.3-.4-.3-1 .1-1.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.room-meta strong,
.safety strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  color: var(--highlight);
}

.safety.hidden {
  display: none;
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overflow-anchor: none;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  padding: 0 10px 26px;
  scroll-padding: 34px 18px 74px;
  background: transparent;
  scrollbar-width: none;
}

.messages::-webkit-scrollbar {
  display: none;
}

.messages-stage.is-pulling-sync {
  transition: none;
}

.jump-to-latest {
  position: absolute;
  right: 16px;
  bottom: 14px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid rgb(126 138 151 / 18%);
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  background: #d6dde6;
  color: #121a23;
  box-shadow:
    0 10px 22px rgb(0 0 0 / 26%),
    inset 0 1px 0 rgb(255 255 255 / 72%);
  font-family: inherit;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    background-color 160ms ease;
}

.jump-to-latest:hover,
.jump-to-latest:focus-visible {
  background: #f1f4f7;
}

.jump-to-latest.hidden {
  display: inline-flex;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px) scale(.94);
}

body.native-shell .jump-to-latest {
  display: none;
  right: max(16px, calc(env(safe-area-inset-right) + 16px));
  bottom: calc(86px + env(safe-area-inset-bottom) + var(--native-keyboard-inset, 0px));
  z-index: 20;
}

.day-section {
  display: grid;
  gap: 8px;
  min-width: 0;
  background: transparent;
}

.day-section:last-child::after {
  content: "";
  display: block;
  height: 36px;
}

.message-row {
  position: relative;
  display: grid;
  width: 100%;
  min-width: 0;
  scroll-margin: 18px;
}

.message-row.me {
  align-self: stretch;
}

.message {
  position: relative;
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgb(62 72 82 / 13%) 0%, rgb(26 34 43 / 18%) 48%, rgb(7 12 18 / 24%) 100%);
  color: #b8c5d4;
  overflow: hidden;
  overflow-wrap: anywhere;
  box-shadow: none;
}

.message-favorite-toggle {
  position: absolute;
  top: 9px;
  right: 15px;
  z-index: 3;
  display: none;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: #56616f;
  font-family: inherit;
  font-size: 16.8px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.message-row > .message:not(.concealed-message) + .message-favorite-toggle,
.message-row > .concealed-message.revealed + .message-favorite-toggle {
  display: inline-grid;
}

.message-favorite-toggle.active {
  color: #ffd84d;
  text-shadow: 0 0 14px rgb(255 216 77 / 24%);
}

.message-favorite-toggle:hover,
.message-favorite-toggle:focus-visible {
  background: rgb(255 216 77 / 10%);
  box-shadow: none;
  outline: none;
}

.message-favorite-toggle.pending {
  opacity: 0.62;
}

.message-row.has-message-favorite > .message:not(.concealed-message) .activity-summary,
.message-row.has-message-favorite > .concealed-message.revealed .activity-summary {
  padding-right: 72px;
}

.deal-chat-mode .composer,
.deal-chat-mode #panicBtn,
.deal-chat-mode #clearBtn,
.deal-chat-mode #reconnectBtn,
.deal-chat-mode #galleryBtn {
  display: none;
}

.deal-chat-mode .chat {
  grid-template-areas:
    "topbar"
    "messages";
  grid-template-rows: auto minmax(0, 1fr);
}

.deal-message {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 0;
  text-align: left;
  font-weight: 400;
}

.deal-chat-mode .deal-message:hover:not(:disabled) {
  background:
    linear-gradient(90deg, rgb(62 72 82 / 22%) 0%, rgb(26 34 43 / 34%) 48%, rgb(7 12 18 / 46%) 100%);
  box-shadow:
    inset 4px 0 0 rgb(74 103 132 / 34%),
    inset 0 1px 0 rgb(255 255 255 / 4%);
}

.deal-message .body {
  pointer-events: none;
}

.deal-message .activity-detail,
.deal-message .payload-text {
  font-weight: 400;
}

.deal-date-separator[data-day-bucket="today"] {
  color: var(--ok);
}

.deal-message-row[data-day-bucket="today"] .activity-author {
  color: var(--ok);
  text-shadow: 0 0 18px rgb(34 250 170 / 26%);
}

.concealed-message {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

.all-cards-open-mode .concealed-message,
.all-cards-open-mode .concealed-message .activity-dot {
  cursor: default;
}

.concealed-message:focus-visible {
  outline: none;
}

.concealed-message.revealed {
  user-select: none;
  -webkit-user-select: none;
}

.concealed-message.revealed::after {
  content: "";
  position: absolute;
  left: 182px;
  top: 45px;
  bottom: 20px;
  width: 1px;
  background: rgb(74 103 132 / 34%);
  pointer-events: none;
}

.activity-summary {
  display: grid;
  grid-template-columns: 54px 78px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 62px;
  padding: 10px 22px;
  color: #b8c5d4;
}

.deal-message .activity-summary {
  grid-template-columns: 54px 78px minmax(0, 1fr) 26px;
}

.activity-dot {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 1px solid rgb(164 174 185 / 34%);
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.activity-dot:focus-visible {
  outline: 2px solid rgb(99 184 238 / 62%);
  outline-offset: 2px;
}

.activity-dot::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #8294a8;
  box-shadow: none;
}

.message-row[data-read="true"] .activity-dot::after {
  background: #8294a8;
  box-shadow: none;
}

.message-row[data-direction="out"] .message {
  background:
    linear-gradient(270deg, rgb(50 67 80 / 14%) 0%, rgb(24 34 44 / 19%) 50%, rgb(7 12 18 / 25%) 100%);
  box-shadow:
    inset -4px 0 0 rgb(74 103 132 / 30%);
}

.message-row[data-direction="in"][data-read="true"] .message {
  background:
    linear-gradient(90deg, rgb(50 67 80 / 14%) 0%, rgb(24 34 44 / 19%) 50%, rgb(7 12 18 / 25%) 100%);
  box-shadow:
    inset 4px 0 0 rgb(74 103 132 / 30%);
}

.message-row[data-direction="out"] .activity-dot::after {
  background: #8294a8;
  box-shadow: none;
}

.message-row[data-direction="out"][data-read="true"] .activity-dot::after {
  background: #8294a8;
  box-shadow: none;
}

.message-row[data-direction="in"][data-read="true"] .activity-dot::after,
.message-row[data-direction="out"][data-status="seen"] .activity-dot::after {
  background: #63b8ee;
  box-shadow: 0 0 18px rgb(99 184 238 / 30%);
}

.message-row[data-payload-kind="image"][data-direction="in"][data-read="true"] .activity-dot::after,
.message-row[data-payload-kind="image"][data-direction="out"][data-status="seen"] .activity-dot::after {
  background: #ff9f2d;
  box-shadow: 0 0 18px rgb(255 159 45 / 34%);
}

.message-row[data-direction="in"][data-read="false"] .message,
.all-cards-open-mode .message-row[data-direction="in"][data-session-new="true"] .message {
  box-shadow:
    inset 4px 0 0 rgb(34 250 170 / 52%);
}

.message-row[data-direction="in"][data-read="false"] .activity-dot::after,
.all-cards-open-mode .message-row[data-direction="in"][data-session-new="true"] .activity-dot::after {
  background: var(--ok);
  box-shadow: 0 0 18px rgb(34 250 170 / 42%);
}

.deal-chat-mode .deal-message-row[data-day-bucket="today"] .activity-dot::after {
  background: var(--ok);
  box-shadow: 0 0 18px rgb(34 250 170 / 42%);
}

.date-separator {
  display: flex;
  align-items: center;
  gap: 14px;
  width: calc(100% + 20px);
  min-height: 24px;
  margin-inline: -10px;
  padding: 6px 32px;
  color: #7f91a5;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
  border: 0;
}

.messages-stage > .timeline-date-header {
  position: relative;
  z-index: 4;
  flex: 0 0 24px;
  width: 100%;
  height: 24px;
  min-height: 24px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  --timeline-date-offset: 0px;
}

.messages-stage > .timeline-date-header.hidden {
  display: flex;
  visibility: hidden;
}

.messages-stage > .timeline-date-header::before,
.messages-stage > .timeline-date-header::after {
  display: none;
}

.timeline-date-slide {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 24px;
  min-height: 24px;
  margin: 0;
  padding: 6px 32px;
  transform: translate3d(0, var(--timeline-date-offset), 0);
  will-change: transform;
}

.timeline-date-slide-next {
  top: 24px;
  bottom: auto;
}

/* Keep upcoming day markers visible in the timeline. Once a marker reaches
   the top edge, the separate transparent header takes over its label. */
.messages .date-separator {
  position: relative;
  top: auto;
  z-index: auto;
  width: 100%;
  height: 24px;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  visibility: visible;
}

.messages > .day-section:first-child > .date-separator,
.messages > .date-separator:first-child {
  height: 0;
}

.date-separator::before,
.date-separator::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgb(104 125 148 / 18%);
}

.date-separator-label {
  position: relative;
  display: block;
  justify-items: center;
  padding: 0 8px;
  background: transparent;
  text-align: center;
}

.date-separator-date {
  color: #687d94;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.date-separator[data-day-bucket="today"] {
  color: var(--ok);
}

.date-separator[data-day-bucket="today"]::before,
.date-separator[data-day-bucket="today"]::after {
  background: rgb(34 250 170 / 18%);
}

.date-separator[data-day-bucket="today"] > .date-separator-label .date-separator-date {
  color: var(--ok);
}

.activity-time {
  position: relative;
  display: block;
  color: #9aacc2;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 11px;
}

.activity-time-clock {
  display: block;
  font-size: 11px;
}

.activity-time-date,
.activity-time-day {
  display: none;
  position: absolute;
  left: 0;
  color: #74889f;
  font-size: 8px;
  line-height: 9px;
  white-space: nowrap;
}

.activity-time-date {
  top: 15px;
}

.activity-time-day {
  top: 25px;
}

.concealed-message.revealed .activity-time-date,
.concealed-message.revealed .activity-time-day {
  display: block;
}

.activity-content {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding-left: 18px;
  border-left: 1px solid rgb(74 103 132 / 34%);
}

.activity-author {
  color: #c9d3df;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.activity-detail {
  display: flex;
  gap: 5px;
  min-height: 10px;
  align-items: center;
  color: #8296ad;
  font-size: 10px;
}

.message-row[data-direction="in"][data-read="false"] .activity-author,
.all-cards-open-mode .message-row[data-direction="in"][data-session-new="true"] .activity-author {
  color: var(--ok);
}

.activity-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 999px;
  background: transparent;
  color: #071522;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  opacity: 0.86;
  cursor: pointer;
}

.activity-action::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 999px;
  background: #95a1ae;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 16%);
}

.activity-action:focus-visible {
  outline: 2px solid rgb(99 184 238 / 62%);
  outline-offset: 1px;
}

.activity-crypto {
  display: none;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

.activity-crypto::before {
  content: "";
  width: 14px;
  height: 14px;
  background: var(--highlight);
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 18 22' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.5 8H14V5a5 5 0 0 0-10 0v3h-.5A1.5 1.5 0 0 0 2 9.5v9A1.5 1.5 0 0 0 3.5 20h11a1.5 1.5 0 0 0 1.5-1.5v-9A1.5 1.5 0 0 0 14.5 8ZM6 5a3 3 0 0 1 6 0v3H6V5Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 18 22' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.5 8H14V5a5 5 0 0 0-10 0v3h-.5A1.5 1.5 0 0 0 2 9.5v9A1.5 1.5 0 0 0 3.5 20h11a1.5 1.5 0 0 0 1.5-1.5v-9A1.5 1.5 0 0 0 14.5 8ZM6 5a3 3 0 0 1 6 0v3H6V5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.activity-chevron {
  position: relative;
  z-index: 1;
  width: 13px;
  height: 13px;
  background: var(--screen-bar);
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.2 7.2a1 1 0 0 1 1.4 0L10 10.6l3.4-3.4a1 1 0 1 1 1.4 1.4l-4.1 4.1a1 1 0 0 1-1.4 0L5.2 8.6a1 1 0 0 1 0-1.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.2 7.2a1 1 0 0 1 1.4 0L10 10.6l3.4-3.4a1 1 0 1 1 1.4 1.4l-4.1 4.1a1 1 0 0 1-1.4 0L5.2 8.6a1 1 0 0 1 0-1.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 140ms ease;
}

.concealed-message.revealed .activity-chevron {
  transform: rotate(180deg);
}

.concealed-message.revealed[data-reveal="decoy"] .activity-action {
  background: transparent;
}

.concealed-message.revealed[data-reveal="decoy"] .activity-action::before {
  background: #b5bec9;
}

.message .body {
  display: none;
  margin: 0 72px 14px 200px;
  padding: 8px 0 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  font-size: 11px;
  line-height: 1.5;
}

.concealed-message.revealed .body {
  display: block;
  color: #8fa6bd;
}

.concealed-message[data-reveal="decoy"] .payload-text {
  color: #7d8da0;
}

.concealed-message[data-reveal="real"] .payload-text {
  color: #8fa6bd;
}

.payload-label {
  display: none;
  margin-bottom: 14px;
  color: #8498ae;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.payload-text {
  margin: 0;
  color: #8fa6bd;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  line-height: 1.42;
  overflow-wrap: normal;
  white-space: pre-wrap;
  word-break: normal;
}

.payload-text.is-decoding {
  overflow: hidden;
}

.payload-reveal-token {
  display: inline-block;
  white-space: nowrap;
}

.payload-reveal-char {
  position: relative;
  display: inline-block;
  color: transparent;
}

.payload-reveal-char::after {
  content: attr(data-mask);
  position: absolute;
  inset: 0;
  color: var(--payload-mask-color, #aab8c5);
}

.payload-reveal-char.is-revealed {
  color: inherit;
}

.payload-reveal-char.is-revealed::after {
  content: "";
}

.concealed-message .payload-text,
.concealed-message .payload-text span {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}

.incoming-status {
  display: inline-flex;
  align-items: center;
  min-height: 10px;
  padding-left: 0;
  color: #7f94ab;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.incoming-status[data-status="new"] {
  color: rgb(218 226 235 / 38%);
  font-weight: 700;
}

.incoming-status[data-status="new"]::before {
  content: none;
}

.incoming-status[data-read="false"] {
  display: none;
}

.receipt {
  display: inline-flex;
  align-items: center;
  min-height: 10px;
  padding-right: 0;
  color: #7f94ab;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.receipt::before {
  content: none;
}

.receipt[data-status="queued"]::before {
  content: none;
}

.receipt[data-status="delivered"]::before {
  content: none;
}

.receipt[data-status="seen"]::before {
  content: none;
}

.status-dots {
  gap: 4px;
  line-height: 1;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: transparent;
  flex: 0 0 auto;
}

.status-dot.is-filled {
  background: currentColor;
}

.receipt.status-dots {
  color: rgb(218 226 235 / 38%);
}

.incoming-status.status-dots[data-status="read"] {
  color: rgb(218 226 235 / 38%);
}

.system-message {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 2px 6px;
  color: #8794a6;
  font-size: 11px;
}

.system-message::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  opacity: 0.78;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23A0AEC0' d='M8.5 11a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Zm7-1a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM2 18.5C2 15.5 4.9 13 8.5 13S15 15.5 15 18.5c0 .8-.7 1.5-1.5 1.5h-10C2.7 20 2 19.3 2 18.5Zm13.8 1.5h4.7c.8 0 1.5-.7 1.5-1.5 0-2.7-2.5-4.9-5.6-5-.8 0-1.5.1-2.2.4 1.7 1.2 2.8 2.9 2.8 4.6 0 .5-.1 1-.3 1.5h-.9Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.system-text {
  font-weight: 400;
}

.system-time {
  font-weight: 400;
  opacity: 0.82;
}

.composer {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  border-bottom: 0;
  border-top: 1px solid rgb(86 96 108 / 42%);
  padding: 18px 24px 20px;
  background:
    var(--brushed-metal-bg);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 3%),
    0 -18px 32px rgb(0 6 13 / 70%),
    0 -7px 14px rgb(0 0 0 / 54%);
  z-index: 7;
}

.image-pending {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 0;
  color: var(--ok);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  font-weight: 800;
}

.image-pending.hidden,
.file-input,
.image-viewer.hidden,
.gallery-panel.hidden {
  display: none;
}

.image-pending button {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  border: 1px solid rgb(92 101 113 / 34%);
  border-radius: 999px;
  padding: 0;
  background: rgb(10 27 44 / 82%);
  box-shadow: none;
  color: #d6dde6;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
}

.image-pending button span {
  transform: translateY(-1px);
}

.image-pending-code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-field {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  height: 58px;
  min-height: 58px;
  border: 1px solid rgb(92 101 113 / 28%);
  border-radius: 999px;
  background: var(--composer-field-gradient);
  padding: 0 18px 0 8px;
}

.composer-field.has-pending-image,
.composer-field:has(.image-pending:not(.hidden)) {
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  padding-left: 8px;
}

.composer-field.has-pending-image .attach-btn,
.composer-field.has-pending-image .attach-menu,
.composer-field.has-pending-image textarea,
.composer-field:has(.image-pending:not(.hidden)) .attach-btn,
.composer-field:has(.image-pending:not(.hidden)) .attach-menu,
.composer-field:has(.image-pending:not(.hidden)) textarea {
  display: none;
}

.attach-btn {
  position: absolute;
  left: 8px;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  min-width: 36px;
  width: 36px;
  min-height: 36px;
  height: 36px;
  border: 1px solid rgb(92 101 113 / 34%);
  border-radius: 999px;
  background: rgb(10 27 44 / 82%);
  box-shadow: none;
  color: #d6dde6;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
}

.attach-btn.hidden {
  display: none;
}

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

.attach-menu {
  position: absolute;
  left: 8px;
  bottom: calc(100% + 10px);
  z-index: 6;
  display: grid;
  min-width: 128px;
  padding: 6px;
  border: 1px solid rgb(74 103 132 / 56%);
  border-radius: 8px;
  background: #0a1724;
  box-shadow: 0 18px 34px rgb(0 0 0 / 36%);
}

.attach-menu.hidden {
  display: none;
}

.attach-menu button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-width: 0;
  height: 36px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: #b8c5d4;
  font-size: 12px;
}

.attach-menu button span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attach-menu button:hover:not(:disabled),
.attach-menu button:focus-visible {
  background: rgb(80 88 98 / 26%);
}

.composer textarea {
  width: 100%;
  min-width: 0;
  height: 56px;
  min-height: 56px;
  max-height: 56px;
  padding: 18px 16px 14px 54px;
  border: 0;
  background: transparent;
  color: #a1adbb;
  font-size: 14px;
  line-height: 1.35;
  overflow-y: auto;
  resize: none;
}

.composer-field:has(.attach-btn.hidden) textarea {
  padding-left: 16px;
}

.composer textarea:focus {
  box-shadow: none;
}

.composer-field:focus-within {
  border-color: rgb(150 162 177 / 48%);
  box-shadow: 0 0 0 3px rgb(150 162 177 / 12%);
}

.composer button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 54px;
  width: 54px;
  min-height: 54px;
  height: 54px;
  aspect-ratio: 1;
  padding: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #46505c 0%, #323b46 100%);
  box-shadow: 0 12px 28px rgb(0 0 0 / 22%);
  color: #d6dde6;
  font-size: 0;
}

.composer .attach-btn {
  position: absolute;
  left: 8px;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  align-self: center;
  min-width: 36px;
  width: 36px;
  min-height: 36px;
  height: 36px;
  border: 1px solid rgb(92 101 113 / 34%);
  border-radius: 999px;
  background: linear-gradient(180deg, #46505c 0%, #323b46 100%);
  box-shadow: none;
  color: #d6dde6;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
}

.composer .attach-btn:active:not(:disabled),
.composer .attach-btn.pressed-control:not(:disabled) {
  transform: translateY(-50%);
}

.composer .image-pending button {
  min-width: 36px;
  width: 36px;
  min-height: 36px;
  height: 36px;
  border: 1px solid rgb(92 101 113 / 34%);
  border-radius: 999px;
  background: rgb(10 27 44 / 82%);
  box-shadow: none;
  color: #d6dde6;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
}

.composer .attach-menu button {
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  height: 36px;
  min-height: 36px;
  aspect-ratio: auto;
  padding: 0 10px;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: #b8c5d4;
  font-size: 12px;
}

.composer button .send-label {
  display: none;
}

.composer button .send-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 25px;
  height: 25px;
  margin: 0;
  transform: translate(-50%, -50%);
}

.composer button.composer-action {
  background: #0d1b2d;
}

.camera-icon,
.image-icon,
.gallery-icon {
  display: inline-block;
  width: 18px;
  min-width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask-image: var(--icon);
  mask-image: var(--icon);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.camera-icon {
  --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 5h2l1.2-1.6c.2-.3.5-.4.8-.4h2c.3 0 .6.1.8.4L15 5h2c1.7 0 3 1.3 3 3v8c0 1.7-1.3 3-3 3H7c-1.7 0-3-1.3-3-3V8c0-1.7 1.3-3 3-3Zm5 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm0-2a2 2 0 1 1 0-4 2 2 0 0 1 0 4Z'/%3E%3C/svg%3E");
}

.image-icon,
.gallery-icon {
  --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 4h14c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2Zm0 12.5L9 12l3 3.2 2-2.2 5 5V6H5v10.5ZM8.5 10a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z'/%3E%3C/svg%3E");
}

.payload-image-link {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ok);
  font: inherit;
  font-weight: inherit;
  text-decoration: none;
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #000;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  overflow: hidden;
  --image-viewer-keyboard-inset: 0px;
}

.image-viewer-frame {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 0;
  min-width: 0;
  padding: max(8px, env(safe-area-inset-top)) 8px 8px;
  overflow: hidden;
  touch-action: none;
}

.image-viewer img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  pointer-events: none;
  transform: translate3d(var(--image-pan-x, 0px), var(--image-pan-y, 0px), 0) scale(var(--image-scale, 1));
  transform-origin: center;
  will-change: transform;
}

.image-viewer-actions {
  position: fixed;
  right: 0;
  bottom: var(--image-viewer-keyboard-inset);
  left: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 0;
  background: rgb(0 0 0 / 86%);
  backdrop-filter: blur(18px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.image-viewer.controls-hidden .image-viewer-actions {
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px);
}

.image-viewer > .image-close-btn {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  z-index: 2;
  background: rgb(0 0 0 / 56%);
  backdrop-filter: blur(12px);
}

body.native-shell .image-viewer.label-focused .image-viewer-actions {
  padding-bottom: 2px;
}

.image-label-field {
  display: block;
  min-width: 0;
  height: 40px;
  color: #9aa6b3;
  font-size: 9px;
}

.image-label-field input {
  width: 100%;
  min-width: 0;
  height: 40px;
  min-height: 40px;
  border-color: rgb(255 255 255 / 16%);
  border-radius: 999px;
  background: rgb(255 255 255 / 9%);
  color: #f2f5f8;
  font-size: 13px;
  padding: 0 16px;
}

.image-label-field input::placeholder {
  color: rgb(214 221 230 / 46%);
}

.image-label-field input:disabled {
  border-color: rgb(255 255 255 / 10%);
  background: rgb(255 255 255 / 5%);
  color: rgb(214 221 230 / 42%);
  cursor: default;
  opacity: 1;
  -webkit-text-fill-color: rgb(214 221 230 / 42%);
}

.image-save-status {
  position: absolute;
  right: 98px;
  bottom: calc(100% + 6px);
  max-width: min(180px, 48vw);
  color: #ffbf47;
  font-size: 10px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-viewer-actions button,
.gallery-header button,
.gallery-open {
  border-radius: 6px;
}

.gallery-header button {
  border: 0;
  background: var(--menu-control);
  color: #d6dde6;
  box-shadow: 0 1px 0 rgb(0 0 0 / 32%);
}

.gallery-header button:hover:not(:disabled),
.gallery-header button:focus-visible {
  background: var(--menu-control);
}

.gallery-header button:active:not(:disabled) {
  background: var(--menu-control-active);
}

.image-action-btn {
  display: grid;
  place-items: center;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 999px;
  background: rgb(255 255 255 / 10%);
  box-shadow: none;
  color: #f2f5f8;
}

.image-viewer-actions .image-action-btn {
  border-radius: 999px;
}

.image-label-confirm-btn {
  color: var(--ok);
}

.image-label-confirm-btn:disabled {
  opacity: 0.34;
}

.image-label-confirm-btn span {
  --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m9.2 17.4-4.6-4.6 1.8-1.8 2.8 2.8 8.4-8.4 1.8 1.8-10.2 10.2Z'/%3E%3C/svg%3E");
}

.image-action-btn span {
  width: 19px;
  height: 19px;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.image-action-btn:disabled {
  opacity: 0.38;
}

.image-label-field[hidden],
.image-action-btn[hidden] {
  display: none;
}

.image-action-btn:hover:not(:disabled),
.image-action-btn:focus-visible {
  background: rgb(255 255 255 / 18%);
  box-shadow: none;
}

.image-save-btn span {
  --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 3a1 1 0 0 1 1 1v8.59l2.3-2.3a1 1 0 1 1 1.4 1.42l-4 4a1 1 0 0 1-1.4 0l-4-4a1 1 0 1 1 1.4-1.42l2.3 2.3V4a1 1 0 0 1 1-1ZM5 17a1 1 0 0 1 1 1v1h12v-1a1 1 0 1 1 2 0v2a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1Z'/%3E%3C/svg%3E");
}

.image-close-btn span {
  --icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.3 5.3a1 1 0 0 1 1.4 0L12 9.6l4.3-4.3a1 1 0 1 1 1.4 1.4L13.4 11l4.3 4.3a1 1 0 0 1-1.4 1.4L12 12.4l-4.3 4.3a1 1 0 0 1-1.4-1.4l4.3-4.3-4.3-4.3a1 1 0 0 1 0-1.4Z'/%3E%3C/svg%3E");
}

.gallery-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 28;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(920px, calc(100vw - 48px));
  height: calc(100vh - 48px);
  height: calc(100dvh - 48px);
  max-height: calc(100dvh - 48px);
  transform: translate(-50%, -50%);
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: var(--screen-bg);
  box-shadow: 0 34px 100px rgb(0 0 0 / 56%);
  color: #b8c5d4;
}

.gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid rgb(126 138 151 / 22%);
}

body.native-shell .gallery-header {
  padding-top: calc(16px + env(safe-area-inset-top));
}

.gallery-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgb(126 138 151 / 16%);
}

.gallery-tab {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgb(126 138 151 / 18%);
  border-radius: 8px;
  background: rgb(8 12 17 / 42%);
  box-shadow: none;
  color: #8296ad;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.gallery-tab.active {
  border-color: rgb(34 250 170 / 32%);
  background: rgb(34 250 170 / 8%);
  color: var(--ok);
}

.gallery-tab:hover,
.gallery-tab:focus-visible {
  background: rgb(34 250 170 / 10%);
  color: var(--ok);
  box-shadow: none;
}

.gallery-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.gallery-header h2 {
  display: grid;
  gap: 4px;
  justify-items: start;
  margin: 0;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.gallery-count {
  margin-left: 0;
  color: #8296ad;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  text-transform: none;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: max-content;
  gap: 10px;
  justify-content: start;
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
  background: transparent;
}

.gallery-grid.hidden,
.gallery-messages.hidden {
  display: none;
}

.gallery-messages {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: max-content;
  gap: 10px;
  align-content: start;
  min-height: 0;
  padding: 12px;
  overflow-y: auto;
  background: transparent;
  scrollbar-width: none;
}

.gallery-messages::-webkit-scrollbar {
  display: none;
}

.gallery-message-card {
  position: relative;
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
  padding: 14px 64px 16px 16px;
  border: 1px solid rgb(126 138 151 / 14%);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgb(34 46 58 / 26%), rgb(8 12 17 / 54%));
  color: #b8c5d4;
  overflow: hidden;
}

.gallery-message-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px 12px;
  min-width: 0;
}

.gallery-message-sender {
  color: var(--ok);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.gallery-message-time {
  color: #71869d;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 9px;
  white-space: nowrap;
}

.gallery-message-text {
  margin: 0;
  color: #9eb0c3;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  user-select: text;
  -webkit-user-select: text;
}

.gallery-message-remove {
  position: absolute;
  top: 5px;
  right: 6px;
  display: inline-grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: #ffd84d;
  font-size: 16px;
  line-height: 1;
}

.gallery-message-remove:hover,
.gallery-message-remove:focus-visible {
  background: rgb(255 216 77 / 10%);
  color: #ffd84d;
  box-shadow: none;
  outline: none;
}

.gallery-message-state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px;
  color: #8296ad;
  font-size: 12px;
}

.gallery-message-state.error {
  color: #f38b96;
}

.gallery-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  place-items: center;
  align-content: center;
  gap: 14px;
  background: var(--screen-bg);
  color: #aeb8c5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.gallery-loading.hidden {
  display: none;
}

.gallery-unlock {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  background: var(--screen-bg);
}

.gallery-unlock.hidden {
  display: none;
}

.gallery-unlock-code {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  align-items: center;
  justify-content: center;
  width: min(236px, 100%);
  min-height: 14px;
  color: var(--pin-mask-ink);
  font-family: "SFMono-Regular", "SF Mono", Consolas, "Liberation Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  overflow: hidden;
  white-space: nowrap;
  text-align: center;
}

.gallery-unlock-code span {
  display: inline-block;
  width: 0.62em;
  transition: color 120ms ease, text-shadow 120ms ease;
}

.gallery-unlock-code .is-unlocked {
  color: var(--ok);
  text-shadow: 0 0 9px rgb(34 250 170 / 82%);
}

.gallery-loading-mark {
  width: 34px;
  height: 34px;
  border: 2px solid rgb(255 255 255 / 16%);
  border-top-color: var(--ok);
  border-radius: 999px;
  animation: gallery-loading-spin 780ms linear infinite;
}

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

.gallery-section-heading {
  grid-column: 1 / -1;
  color: #8296ad;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.gallery-section-divider {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 0;
}

.gallery-item {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 6px;
  align-items: stretch;
  width: 100%;
  aspect-ratio: 1;
  min-width: 0;
  padding: 10px;
  border: 0;
  border-radius: 6px;
  background: rgb(8 12 17 / 58%);
  cursor: pointer;
  overflow: hidden;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.gallery-item::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  width: 0;
  height: 2px;
  background: #ff9f2d;
  opacity: 0;
}

.gallery-grid.is-item-opening .gallery-item {
  pointer-events: none;
}

.gallery-panel.is-item-opening .gallery-header {
  pointer-events: none;
}

.gallery-item.is-opening::after {
  opacity: 1;
}

.gallery-item.is-opening-active::after {
  width: 88%;
  transition: width 900ms cubic-bezier(.2, .72, .2, 1);
}

.gallery-item.is-opening-complete::after {
  width: 100%;
  transition-duration: 150ms;
}

@media (max-width: 720px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gallery-messages {
    grid-template-columns: minmax(0, 1fr);
  }
}

.gallery-item.has-thumbnail {
  background-image:
    linear-gradient(rgb(0 0 0 / 86%), rgb(0 0 0 / 86%)),
    var(--gallery-thumb);
  background-position: center;
  background-size: cover;
}

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

.gallery-item.selected {
  background-color: rgb(107 18 28 / 84%);
  box-shadow: none;
}

.gallery-item.has-thumbnail.selected {
  background-image:
    linear-gradient(rgb(107 18 28 / 78%), rgb(107 18 28 / 78%)),
    var(--gallery-thumb);
}

.action-confirm {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgb(0 0 0 / 78%);
}

.action-confirm.hidden {
  display: none;
}

.action-confirm-box {
  display: grid;
  gap: 16px;
  width: min(320px, 100%);
  padding: 18px;
  border: 1px solid rgb(92 101 113 / 38%);
  border-radius: 10px;
  background: #071522;
  box-shadow: 0 22px 70px rgb(0 0 0 / 56%);
}

.action-confirm-box p {
  margin: 0;
  color: #d6dde6;
  font-size: 13px;
  font-weight: 700;
}

.action-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.action-confirm-yes {
  background: #6b121c;
  color: #ffe8eb;
}

.gallery-delete-selected {
  background: #6b121c;
  color: #ffe8eb;
}

.gallery-delete-selected:hover:not(:disabled),
.gallery-delete-selected:focus-visible {
  background: #8a1c2a;
}

.gallery-delete-selected.hidden {
  display: none;
}

.gallery-confirm {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgb(0 0 0 / 78%);
}

.gallery-confirm.hidden {
  display: none;
}

.gallery-confirm-box {
  display: grid;
  gap: 16px;
  width: min(320px, 100%);
  padding: 18px;
  border: 1px solid rgb(92 101 113 / 38%);
  border-radius: 10px;
  background: #071522;
  box-shadow: 0 22px 70px rgb(0 0 0 / 56%);
}

.gallery-confirm-box p {
  margin: 0;
  color: #d6dde6;
  font-size: 13px;
  font-weight: 700;
}

.gallery-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.gallery-confirm-delete {
  background: #6b121c;
  color: #ffe8eb;
}

.gallery-item:focus-visible {
  outline: 2px solid rgb(67 196 127 / 72%);
  outline-offset: 2px;
}

.gallery-open {
  display: block;
  min-width: 0;
  padding: 0;
  color: #8296ad;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 9px;
  font-weight: 800;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-item-top {
  display: grid;
  grid-template-rows: auto auto;
  justify-items: start;
  gap: 3px;
  min-width: 0;
}

.gallery-favorite {
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: #56616f;
  font-size: 12px;
  line-height: 1;
}

.gallery-favorite.active {
  color: #ffd84d;
}

.gallery-favorite:hover,
.gallery-favorite:focus-visible {
  background: rgb(255 216 77 / 12%);
  box-shadow: none;
  outline: none;
}

.gallery-favorite:disabled {
  opacity: 0.55;
}

.gallery-item-meta {
  color: #8296ad;
  font-size: 9px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-item-date {
  color: #6f849c;
  font-size: 8px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-item-label {
  color: var(--ok);
  font-size: 10px;
  font-weight: 700;
  overflow-wrap: anywhere;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.gallery-item-info {
  align-self: end;
  display: grid;
  gap: 3px;
  min-width: 0;
}

.gallery-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px;
  color: #8296ad;
  font-size: 12px;
}

.composer button:hover:not(:disabled),
.composer button:focus-visible {
  background: var(--accent-hover);
  box-shadow: 0 10px 24px rgb(0 0 0 / 26%);
  color: #d6dde6;
}

.composer button:active:not(:disabled),
.composer button.pressed-control:not(:disabled) {
  background: var(--menu-control-active);
  box-shadow: 0 8px 18px rgb(0 0 0 / 28%);
  color: #d6dde6;
  transform: none;
}

.composer button .btn-icon,
.composer button:hover:not(:disabled) .btn-icon,
.composer button:focus-visible .btn-icon,
.composer button:active:not(:disabled) .btn-icon {
  background: #fff;
}

@media (hover: none), (pointer: coarse) {
  .composer button:hover:not(:disabled),
  .composer button:focus-visible {
    background: var(--menu-control);
    box-shadow: 0 12px 28px rgb(0 0 0 / 22%);
    transform: none;
  }

  .composer button:active:not(:disabled),
  .composer button.pressed-control:not(:disabled) {
    background: var(--menu-control-active);
    box-shadow: 0 8px 18px rgb(0 0 0 / 28%);
    transform: none;
  }
}

.composer .attach-btn,
.composer .attach-btn:hover:not(:disabled),
.composer .attach-btn:focus-visible,
.composer .attach-btn:active:not(:disabled),
.composer .attach-btn.pressed-control:not(:disabled) {
  transform: translateY(-50%) !important;
}

.cover {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  place-items: center;
  padding: 24px;
  background: var(--screen-bg);
}

.cover.visible {
  display: grid;
}

.privacy-snapshot .cover {
  display: grid !important;
}

.birthday-curtain {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #030507;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transform: translateY(0);
  transition: transform 260ms ease, opacity 220ms ease;
}

.birthday-curtain.hidden {
  display: none;
}

.birthday-curtain.is-dismissing {
  opacity: 0;
  transform: translateY(-100%);
}

.birthday-curtain-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center;
  pointer-events: none;
  -webkit-user-drag: none;
}

@media (orientation: landscape) {
  .birthday-curtain-image {
    object-fit: contain;
    background: #030507;
  }
}

.pin-lock {
  position: relative;
  display: grid;
  justify-items: center;
  grid-template-rows: auto auto 28px;
  gap: 18px;
  width: min(260px, 100%);
  padding: 32px 24px;
  color: var(--muted);
  --pin-mask-ink: rgb(188 190 193 / 82%);
  --pin-mask-ink-soft: rgb(188 190 193 / 48%);
}

.mask-logo {
  position: relative;
  display: block;
  width: min(172px, 54vw);
  height: auto;
  margin-bottom: 12px;
}

.mask-labyrinth {
  display: block;
  width: 77px;
  height: auto;
  margin-bottom: 10px;
  filter: drop-shadow(0 3px 7px rgb(0 0 0 / 18%));
  opacity: 0.98;
  pointer-events: none;
  user-select: none;
}

.mask-labyrinth.hidden {
  display: none;
}

.mask-logo-image {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 3px 7px rgb(0 0 0 / 18%));
  opacity: 0.98;
}

.mask-logo-neon {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.mask-logo.has-new .mask-logo-gray {
  opacity: 0;
}

.mask-logo.has-new .mask-logo-neon {
  opacity: 0.98;
}

.mask-logo.is-decoy {
  width: 51px;
  height: 51px;
}

.mask-logo.is-decoy.has-new .mask-logo-gray {
  opacity: 0;
}

.mask-logo.is-decoy.has-new .mask-logo-neon {
  opacity: 0.98;
}

.mask-logo.is-decoy .mask-logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mask-labyrinth.is-decoy {
  width: 62px;
}

.pin-dots {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  align-items: center;
  justify-content: center;
  width: min(236px, 100%);
  min-height: 14px;
  color: var(--pin-mask-ink);
  font-family: "SFMono-Regular", "SF Mono", Consolas, "Liberation Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  overflow: hidden;
  white-space: nowrap;
  text-align: center;
  text-shadow: 0 0 7px rgb(34 250 170 / 14%);
}

.mask-connection-status {
  display: none;
  margin: -3px 0 0;
  color: #718096;
  font-size: 11px;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
}

.pin-attempts {
  justify-self: stretch;
  width: 100%;
  min-height: 20px;
  margin: 0;
  color: var(--pin-mask-ink);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 20px;
  text-align: center;
  transform-origin: center;
  white-space: pre-line;
}

.pin-attempts.hidden {
  display: block;
  visibility: hidden;
}

.pin-status-text {
  display: inline-block;
}

.pin-dots.is-empty {
  visibility: hidden;
}

.pin-dots.is-decoy-pin {
  gap: 7px;
  justify-content: center;
  min-width: 96px;
}

.pin-dot-circle {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--pin-mask-ink);
  box-shadow: none;
}

.pin-hash-char {
  display: inline-block;
  width: 0.62em;
  color: var(--pin-mask-ink);
  transition: color 220ms ease, text-shadow 220ms ease, opacity 120ms ease;
}

.pin-dots.is-entering .pin-hash-char {
  color: var(--pin-mask-ink);
  text-shadow: none;
}

.pin-dots.is-entering .pin-hash-char.is-current-entry {
  color: #f04b55;
  text-shadow: 0 0 7px rgb(240 75 85 / 62%);
}

.pin-dots.is-animating .pin-hash-char.is-active {
  color: var(--pin-mask-ink);
  text-shadow: 0 0 6px rgb(188 190 193 / 30%);
}

.pin-dots.is-animating .pin-hash-char.is-colored {
  text-shadow: 0 0 8px currentColor;
}

.pin-dots.is-animating .pin-hash-char.is-unlocked {
  color: #22FAAA;
  opacity: 1;
  text-shadow: 0 0 9px rgb(34 250 170 / 82%);
  transition-duration: 120ms;
}

.mask-logo.is-decoy ~ .pin-dots {
  color: var(--pin-mask-ink);
}

.pin-keypad {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 64px;
  row-gap: 28px;
  width: 100%;
  margin-top: 4px;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}

.pin-keypad,
.pin-keypad * {
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -webkit-user-select: none !important;
  user-select: none !important;
}

.pin-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: calc(100% + 32px);
  min-width: 44px;
  min-height: 56px;
  margin: -8px -16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: rgb(0 0 0 / 0.001);
  box-shadow: none;
  color: var(--pin-mask-ink);
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  contain: layout paint;
}

.pin-key span {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  pointer-events: none;
  color: inherit;
  -webkit-text-fill-color: currentColor;
  transform: translateZ(0) scale(1);
  transition: color 35ms linear, transform 35ms linear;
  will-change: transform;
}

.pin-key span::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 34px;
  height: 34px;
  background: transparent;
  box-shadow: none;
  opacity: 0;
  transform: scale(0.72);
  transition: background-color 35ms linear, box-shadow 35ms linear, opacity 35ms linear, transform 35ms linear;
  will-change: opacity, transform;
}

.pin-key.pressed {
  background: transparent;
  color: var(--pin-mask-ink);
  -webkit-text-fill-color: currentColor;
  text-shadow: none;
}

.pin-key:hover:not(:disabled),
.pin-key:focus-visible,
.pin-key:active:not(:disabled) {
  background-color: transparent;
  box-shadow: none;
  color: var(--pin-mask-ink);
}

.pin-key.pressed:hover:not(:disabled),
.pin-key.pressed:focus-visible,
.pin-key.pressed:active:not(:disabled) {
  background-color: transparent;
  color: var(--pin-mask-ink);
  -webkit-text-fill-color: currentColor;
}

.pin-key.pin-feedback-active {
  color: #000;
  -webkit-text-fill-color: currentColor;
}

.pin-key.pin-feedback-active span {
  transform: translateZ(0) scale(1.12);
}

.pin-key.pin-feedback-active span::before {
  background: var(--ok);
  box-shadow: 0 0 14px rgb(34 250 170 / 44%);
  opacity: 1;
  transform: scale(1);
}

.pin-key.pin-feedback-active.pin-feedback-red span::before {
  background: #f04b55;
  box-shadow: 0 0 14px rgb(240 75 85 / 38%);
  opacity: 1;
  transform: scale(1);
}

.pin-key.pin-feedback-active:hover:not(:disabled),
.pin-key.pin-feedback-active:focus-visible,
.pin-key.pin-feedback-active:active:not(:disabled),
.pin-key.pin-feedback-active.pressed {
  color: #000;
  -webkit-text-fill-color: currentColor;
}

.pin-key-action {
  justify-content: center;
  font-size: 14px;
}

.pin-status-ok {
  color: var(--pin-mask-ink);
}

.pin-status-error {
  color: #f04b55;
}

.pin-status-shake .pin-status-text {
  animation: pin-status-shake 260ms ease;
  text-shadow: 0 0 10px rgb(240 75 85 / 28%);
}

.pin-attempts.pin-status-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.pin-attempts.pin-status-loading::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 1px solid rgb(188 190 193 / 32%);
  border-top-color: var(--pin-mask-ink);
  border-radius: 999px;
  animation: sync-spin 820ms linear infinite;
}

@keyframes pin-status-shake {
  0%,
  100% {
    transform: translateX(0);
  }

  18% {
    transform: translateX(-5px);
  }

  36% {
    transform: translateX(5px);
  }

  54% {
    transform: translateX(-4px);
  }

  72% {
    transform: translateX(4px);
  }
}

.cover.pin-unlocking .pin-dots,
.cover.pin-unlocking .pin-key {
  filter: brightness(1.18);
}

.pin-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

body.native-shell .pin-lock {
  width: min(248px, 64vw);
  min-height: 100vh;
  min-height: 100dvh;
  padding: 28vh 0 max(22px, env(safe-area-inset-bottom));
}

@media (max-width: 900px), (hover: none), (pointer: coarse) {
  .cover {
    place-items: stretch center;
    padding: 0;
  }

  .pin-lock {
    display: block;
    width: min(246px, 64vw);
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 0;
  }

  .mask-logo {
    display: block;
    position: absolute;
    top: 32vh;
    top: 32dvh;
    left: 50%;
    transform: translateX(-50%);
    width: min(172px, 100%);
    height: auto;
    margin: 0;
  }

  .mask-logo.is-decoy {
    width: 51px;
    height: 51px;
    top: calc(32vh - 20px);
    top: calc(32dvh - 20px);
  }

  .mask-labyrinth {
    position: absolute;
    top: calc(32vh - 95px);
    top: calc(32dvh - 95px);
    left: 50%;
    width: min(77px, 32vw);
    height: auto;
    margin: 0;
    transform: translateX(-50%);
  }

  .mask-labyrinth.is-decoy {
    width: min(62px, 26vw);
  }

  .pin-dots {
    position: absolute;
    top: calc(32vh + 46px);
    top: calc(32dvh + 46px);
    left: 50%;
    transform: translateX(-50%);
  }

  .gallery-unlock-code {
    font-size: 11px;
  }

  .pin-attempts {
    position: absolute;
    top: calc(32vh + 66px);
    top: calc(32dvh + 66px);
    left: 50%;
    width: 100%;
    transform: translateX(-50%);
    font-size: 11px;
  }

  .pin-keypad {
    display: grid;
    position: absolute;
    top: 50vh;
    top: 50dvh;
    left: 50%;
    transform: translateX(-50%);
    column-gap: 58px;
    row-gap: 38px;
    margin-top: 0;
  }

  .pin-key {
    width: calc(100% + 44px);
    min-height: 42px;
    margin: -12px -22px;
    font-size: 13px;
  }

  .pin-key-action {
    font-size: 11px;
  }
}

@media (max-width: 720px) {
  body.native-shell .topbar {
    padding-top: calc(10px + env(safe-area-inset-top));
  }
}

.sheet-toolbar {
  display: flex;
  gap: 20px;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid #d5dce3;
  background: var(--ok);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.formula-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 14px;
  border-bottom: 1px solid #d5dce3;
  background: #fbfcfd;
  color: #475467;
  font-size: 13px;
}

.formula-bar span {
  color: var(--ok);
  font-style: italic;
  font-weight: 800;
}

.formula-bar b {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-weight: 600;
}

.sheet-scroll {
  min-height: 0;
  overflow: auto;
}

.spreadsheet {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  table-layout: fixed;
  color: #1f2937;
  font-size: 13px;
}

.spreadsheet th,
.spreadsheet td {
  height: 36px;
  padding: 0 10px;
  border: 1px solid #d7dee7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spreadsheet thead th,
.spreadsheet tbody th {
  background: #eef2f6;
  color: #667085;
  font-weight: 700;
  text-align: center;
}

.spreadsheet thead th:first-child,
.spreadsheet tbody th {
  width: 46px;
}

.spreadsheet td {
  background: #ffffff;
}

.actuarial-sheet td:nth-child(n + 4):nth-child(-n + 10) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.spreadsheet tr:nth-child(even) td {
  background: #fbfcfd;
}

.spreadsheet .cell-title {
  color: var(--ok);
  font-size: 15px;
  font-weight: 800;
}

.spreadsheet .positive {
  color: var(--ok);
  font-weight: 800;
}

.spreadsheet .negative {
  color: #9f2d20;
  font-weight: 800;
}

.spreadsheet .selected {
  position: relative;
  outline: 2px solid var(--ok);
  outline-offset: -2px;
  background: #edf7f0;
}

.sheet-tabs {
  display: flex;
  gap: 4px;
  align-items: end;
  min-height: 38px;
  padding: 0 12px;
  border-top: 1px solid #d5dce3;
  background: #f2f4f7;
}

.sheet-tabs span {
  padding: 8px 18px;
  border: 1px solid #d5dce3;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  background: #e8edf2;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

.sheet-tabs .active {
  background: #ffffff;
  color: var(--ok);
}

@media (max-width: 720px) {
  .app {
    padding: 0;
  }

  .panel {
    min-height: 100vh;
    min-height: 100dvh;
    border-radius: 0;
  }

  .login {
    max-width: none;
    min-height: 100vh;
  }

  .login-fields {
    grid-template-columns: 1fr;
  }

  .chat {
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    border-radius: 0;
  }

  body.native-shell .chat {
    height: 100%;
    max-height: 100%;
  }

  .gallery-panel {
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    transform: none;
    border-radius: 0;
  }

  .topbar,
  .roomline,
  .composer {
    padding: 12px;
  }

  .topbar {
    gap: 14px;
    align-items: center;
    padding: 10px;
  }

  .chat-brand {
    width: min(183px, 48vw);
  }

  .menu-btn {
    display: inline-flex;
    margin-left: auto;
  }

  .actions {
    position: absolute;
    top: calc(100% - var(--actions-menu-overlap));
    left: 0;
    right: 0;
    z-index: 1;
    display: grid;
    gap: 7px;
    width: 100%;
    min-width: 0;
    padding: 0 var(--actions-menu-padding-x);
    border: 0;
    border-radius: 0 0 18px 18px;
    background: var(--menu-surface);
    background-attachment: fixed, fixed, fixed;
    box-shadow: none;
  }

  .actions.open {
    pointer-events: auto;
    visibility: visible;
    height: var(--actions-menu-height, 320px);
    padding: var(--actions-menu-padding-top) var(--actions-menu-padding-x) var(--actions-menu-padding-bottom);
    transform: translateY(0);
    clip-path: none;
  }

  .actions button {
    width: 100%;
    min-height: 44px;
    justify-content: flex-start;
    padding: 0 12px;
    gap: 10px;
    border-radius: 10px;
    border: 1px solid rgb(126 138 151 / 10%);
    background: var(--menu-control);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 4%);
    font-size: 11px;
    color: #d6dde6;
  }

  .btn-icon {
    width: 22px;
    height: 22px;
    color: var(--accent-ink);
  }

  .roomline,
  .composer {
    align-items: stretch;
  }

  .info-panel {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin: 0;
    min-height: 40px;
    padding: 7px 12px;
  }

  .security-panel {
    display: none;
    justify-content: flex-start;
    min-width: 0;
    font-size: 9px;
  }

  .composer {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
    align-items: center;
  }

  .composer-field {
    height: 54px;
    min-height: 54px;
    border-radius: 999px;
    background: var(--composer-field-gradient);
    padding: 0 18px 0 7px;
  }

  .composer-field.has-pending-image,
  .composer-field:has(.image-pending:not(.hidden)) {
    padding-left: 7px;
  }

  .composer textarea {
    height: 52px;
    min-height: 52px;
    max-height: 52px;
    padding: 17px 16px 13px 54px;
    line-height: 18px;
  }

  .composer-field:has(.attach-btn.hidden) textarea {
    padding-left: 16px;
  }

  .composer button {
    width: 46px;
    min-width: 46px;
    height: 46px;
    min-height: 46px;
    max-height: 46px;
    aspect-ratio: 1;
    padding: 0;
    gap: 0;
    border-radius: 999px;
    font-size: 0;
    color: transparent;
  }

  .composer button .btn-icon {
    width: 22px;
    height: 22px;
    background: #d6dde6;
  }

  .message-row {
    width: 100%;
    min-width: 0;
  }

  .message-favorite-toggle {
    top: 9px;
    right: 3px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    font-size: 16px;
  }

  .message-row.has-message-favorite > .message:not(.concealed-message) .activity-summary,
  .message-row.has-message-favorite > .concealed-message.revealed .activity-summary {
    padding-right: 58px;
  }

  .activity-summary {
    grid-template-columns: 40px 56px minmax(0, 1fr);
    gap: 8px;
    min-height: 62px;
    padding: 11px 12px;
  }

  .deal-message .activity-summary {
    grid-template-columns: 40px 56px minmax(0, 1fr) 34px;
  }

  .date-separator {
    gap: 8px;
    padding: 6px 12px;
  }

  .activity-dot {
    width: 34px;
    height: 34px;
  }

  .activity-time {
    font-size: 11px;
  }

  .activity-time-clock {
    font-size: 11px;
  }

  .activity-time-date,
  .activity-time-day {
    display: none;
    position: absolute;
    left: 0;
    font-size: 8px;
    line-height: 9px;
    white-space: nowrap;
  }

  .concealed-message.revealed .activity-time-date,
  .concealed-message.revealed .activity-time-day {
    display: block;
  }

  .activity-content {
    gap: 3px;
    padding-left: 10px;
  }

  .concealed-message.revealed::after {
    left: 124px;
  }

  .activity-author {
    font-size: 12px;
  }

  .activity-action {
    width: 34px;
    height: 34px;
    min-width: 34px;
  }

  .activity-action::before {
    inset: 6px;
  }

  .activity-crypto {
    display: none;
  }

  .message .body {
    margin: 0 44px 12px 134px;
    padding: 8px 0 12px;
  }

  .cover.unlocked {
    display: none;
  }

  .login input,
  .login button {
    border-radius: 999px;
  }

  .login input {
    min-height: 48px;
    padding: 0 18px;
    background: linear-gradient(180deg, #171f28 0%, #0d141c 100%);
  }

  .sheet-toolbar {
    gap: 12px;
    overflow-x: auto;
  }

  .sheet-tabs span {
    padding-inline: 12px;
  }
}

.chat.actions-menu-open .topbar {
  background: transparent;
}

.chat.actions-menu-open .actions {
  position: absolute;
  top: calc(100% - var(--actions-menu-overlap));
  left: 0;
  right: 0;
  width: 100%;
  padding: var(--actions-menu-padding-top) var(--actions-menu-padding-x) var(--actions-menu-padding-bottom);
  border: 0;
  border-radius: 0 0 18px 18px;
  background: var(--menu-surface);
  background-attachment: fixed, fixed, fixed;
  box-shadow: none;
}

.chat.actions-menu-closing .actions {
  padding: 0 var(--actions-menu-padding-x);
}

body.native-shell .chat.actions-menu-open .topbar {
  background: transparent !important;
}

body.native-shell .menu-btn {
  border: 1px solid rgb(126 138 151 / 10%) !important;
  box-shadow: 0 12px 28px rgb(0 0 0 / 22%) !important;
}

body.native-shell .actions {
  background: var(--menu-surface) !important;
  background-attachment: fixed, fixed, fixed !important;
  opacity: 0 !important;
}

body.native-shell .actions::before {
  display: none !important;
}

body.native-shell .actions.open {
  opacity: 1 !important;
}

body.native-shell .chat.actions-menu-closing .actions {
  visibility: visible !important;
  height: 0 !important;
  padding: 0 var(--actions-menu-padding-x) !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
}

body.native-shell .actions button {
  border: 1px solid rgb(126 138 151 / 10%) !important;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 4%) !important;
}

body.native-shell .actions button:active:not(:disabled),
body.native-shell .actions button.pressed-control:not(:disabled),
body.native-shell .menu-btn:active:not(:disabled),
body.native-shell .menu-btn.pressed-control:not(:disabled) {
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 3%) !important;
}

body.native-shell .chat.actions-menu-open .actions {
  position: absolute !important;
  top: calc(100% - var(--actions-menu-overlap)) !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  padding: var(--actions-menu-padding-top) var(--actions-menu-padding-x) var(--actions-menu-padding-bottom) !important;
  border: 0 !important;
  border-radius: 0 0 18px 18px !important;
  background: var(--menu-surface) !important;
  background-attachment: fixed, fixed, fixed !important;
  box-shadow: none !important;
}

body.native-shell .chat.actions-menu-closing .actions {
  height: 0 !important;
  padding: 0 var(--actions-menu-padding-x) !important;
}
