.roomie-chat {
  --chat-canvas: #F6F8F8;
  --chat-header: rgba(255, 255, 255, 0.88);
  --chat-panel: #FFFFFF;
  --chat-subtle: #F0F4F5;
  --chat-subtle-hover: #E8F7EE;
  --chat-messages: linear-gradient(180deg, rgba(241, 246, 244, 0.92), rgba(247, 249, 249, 0.96));
  --chat-incoming: #FFFFFF;
  --chat-incoming-text: #28333A;
  --chat-outgoing: linear-gradient(145deg, #DFF7E9 0%, #D2F1E2 100%);
  --chat-outgoing-text: #163A2A;
  --chat-support: #F1F6FD;
  --chat-support-text: #25384D;
  --chat-border: rgba(31, 57, 69, 0.075);
  --chat-muted: #68777C;
  --chat-meta: #738087;
  --chat-meta-outgoing: #527564;
  --chat-date: rgba(255, 255, 255, 0.76);
  --chat-voice: #F0F4F5;
  --chat-voice-control: #E1F5E9;
  --chat-voice-control-text: #198A57;
  --chat-voice-wave: #B4C2C5;
  --chat-voice-wave-played: #239B65;
  --chat-voice-time: #52636A;
  --chat-shared: rgba(255, 255, 255, 0.9);
  --chat-shared-text: #263A33;
  --chat-shared-muted: #64756D;
  --chat-shared-action: #F0F8F3;
  --chat-shared-action-text: #176D49;
  --chat-read: #526F9C;
  --chat-read-outgoing: #316F9C;
  --chat-header-border: rgba(28, 47, 60, 0.08);
  --chat-shadow: rgba(31, 50, 65, 0.035);
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(45, 205, 112, 0.045), transparent 44%),
    var(--chat-canvas);
}

[data-theme="dark"] .roomie-chat {
  --chat-canvas: #0D1117;
  --chat-header: rgba(13, 17, 23, 0.94);
  --chat-panel: #21262D;
  --chat-subtle: #1C2128;
  --chat-subtle-hover: #26332E;
  --chat-messages: linear-gradient(180deg, #161B22, #1A2027);
  --chat-incoming: #242B33;
  --chat-incoming-text: #E6EDF3;
  --chat-outgoing: linear-gradient(145deg, #214A36 0%, #1C3D30 100%);
  --chat-outgoing-text: #E8FFF1;
  --chat-support: #24364A;
  --chat-support-text: #E6EDF3;
  --chat-border: rgba(255, 255, 255, 0.09);
  --chat-muted: #AAB6C2;
  --chat-meta: #AAB6C2;
  --chat-meta-outgoing: #A7D6BA;
  --chat-date: rgba(33, 38, 45, 0.94);
  --chat-voice: #303943;
  --chat-voice-control: #254535;
  --chat-voice-control-text: #78E0A7;
  --chat-voice-wave: #73818C;
  --chat-voice-wave-played: #5AD18F;
  --chat-voice-time: #C3CDD5;
  --chat-shared: #29333B;
  --chat-shared-text: #E6EDF3;
  --chat-shared-muted: #AAB6C2;
  --chat-shared-action: #263A30;
  --chat-shared-action-text: #8CE2B0;
  --chat-read: #A9C8FA;
  --chat-read-outgoing: #A9C8FA;
  --chat-header-border: rgba(255, 255, 255, 0.09);
  --chat-shadow: rgba(0, 0, 0, 0.2);
}

.roomie-chat__header {
  z-index: 2;
  min-height: 68px;
  padding: 10px clamp(14px, 3vw, 28px);
  border-bottom: 1px solid var(--chat-header-border);
  background: var(--chat-header);
  box-shadow: 0 5px 20px var(--chat-shadow);
  backdrop-filter: blur(18px);
}

.roomie-chat__header > button:first-child {
  width: 40px !important;
  height: 40px !important;
  border: 0 !important;
  border-radius: 13px !important;
  background: var(--chat-subtle) !important;
}

.roomie-chat__header > button:first-child:hover {
  background: var(--chat-subtle-hover) !important;
}

.roomie-chat__header > div[style*="flex: 1"] > div:first-child {
  font-size: 15px !important;
  letter-spacing: -0.015em;
}

.roomie-chat__messages {
  padding: 20px 16px 18px;
  background: var(--chat-messages);
  overscroll-behavior: contain;
  scrollbar-color: rgba(65, 100, 81, 0.24) transparent;
  scrollbar-width: thin;
}

.roomie-chat__date {
  width: fit-content;
  align-self: center;
  margin: 10px auto 8px !important;
  padding: 5px 11px;
  color: var(--chat-muted) !important;
  border: 1px solid var(--chat-border);
  border-radius: 999px;
  background: var(--chat-date);
  font-size: 10px !important;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.roomie-chat__messages > .message-bubble {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
}

.roomie-chat__messages > .message-bubble > .bubble-wrap {
  width: 100%;
}

.roomie-chat__bubble {
  max-width: min(72%, 610px) !important;
  min-width: 42px;
  color: var(--chat-incoming-text);
  border: 1px solid var(--chat-border);
  border-radius: 18px 18px 18px 6px;
  background: var(--chat-incoming);
  box-shadow: 0 3px 11px rgba(30, 50, 60, 0.045);
}

.roomie-chat__bubble.is-mine {
  color: var(--chat-outgoing-text);
  border: 1px solid var(--chat-border);
  border-radius: 18px 18px 6px 18px;
  background: var(--chat-outgoing);
  box-shadow: 0 3px 12px rgba(35, 134, 88, 0.075);
}

.roomie-chat__bubble.is-support {
  color: var(--chat-support-text);
  border-color: rgba(78, 129, 194, 0.18);
  background: var(--chat-support);
}

.roomie-chat__bubble.is-mine .chat-voice-message {
  color: var(--chat-incoming-text);
  background: var(--chat-incoming);
}

.roomie-chat__bubble:not(.is-mine) .chat-voice-message {
  color: var(--chat-incoming-text);
  background: var(--chat-voice);
}

.roomie-chat__bubble.is-mine .chat-voice-player__toggle,
.roomie-chat__bubble:not(.is-mine) .chat-voice-player__toggle {
  color: var(--chat-voice-control-text);
  background: var(--chat-voice-control);
}

.roomie-chat__bubble.is-mine .chat-voice-player__bar,
.roomie-chat__bubble:not(.is-mine) .chat-voice-player__bar {
  background: var(--chat-voice-wave);
}

.roomie-chat__bubble.is-mine .chat-voice-player__bar.is-played,
.roomie-chat__bubble:not(.is-mine) .chat-voice-player__bar.is-played {
  background: var(--chat-voice-wave-played);
}

.roomie-chat__bubble.is-mine .chat-voice-player__time,
.roomie-chat__bubble:not(.is-mine) .chat-voice-player__time {
  color: var(--chat-voice-time);
}

.roomie-chat__meta {
  color: var(--chat-meta) !important;
  font-size: 10px;
  font-weight: 550;
}

.roomie-chat__bubble.is-mine .roomie-chat__meta {
  color: var(--chat-meta-outgoing) !important;
}

.roomie-chat__read {
  color: var(--chat-read);
}

.roomie-chat__bubble.is-mine .roomie-chat__read {
  color: var(--chat-read-outgoing);
}

.roomie-chat__bubble.is-mine .chat-shared-card {
  color: var(--chat-shared-text);
  border-color: var(--chat-border);
  background: var(--chat-shared);
  box-shadow: none;
}

.roomie-chat__bubble.is-mine .chat-shared-card__heading small {
  color: var(--chat-shared-muted);
}

.roomie-chat__bubble.is-mine .chat-shared-card__action {
  color: var(--chat-shared-action-text);
  border-color: var(--chat-border);
  background: var(--chat-shared-action);
}

.roomie-chat__composer {
  z-index: 3;
  gap: 9px !important;
  padding: 12px clamp(12px, 3vw, 26px) calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--chat-header-border);
  background: var(--chat-header);
  box-shadow: 0 -8px 25px var(--chat-shadow);
  backdrop-filter: blur(18px);
}

.roomie-chat__attach {
  width: 42px !important;
  height: 42px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: var(--chat-subtle) !important;
}

.roomie-chat__attach:hover:not(:disabled) {
  background: var(--chat-subtle-hover) !important;
}

.roomie-chat__input {
  flex: 1;
  min-width: 0;
  max-height: 110px;
  padding: 11px 16px;
  color: var(--text);
  border: 1px solid var(--chat-border);
  border-radius: 18px;
  outline: 0;
  background: var(--chat-subtle);
  font: 14px/1.45 var(--font);
  resize: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.roomie-chat__input:focus {
  border-color: rgba(39, 189, 112, 0.55);
  background: var(--chat-panel);
  box-shadow: 0 0 0 3px rgba(39, 189, 112, 0.1);
}

.roomie-chat__composer > button:last-child {
  width: 44px !important;
  height: 44px !important;
  border-radius: 15px !important;
}

.roomie-chat__composer > button:last-child:not(:disabled) {
  background: linear-gradient(135deg, #27BD70 0%, #169F80 100%) !important;
  box-shadow: 0 6px 15px rgba(22, 159, 110, 0.22) !important;
}

@media (min-width: 900px) {
  .roomie-chat__messages { padding-right: 28px; padding-left: 28px; }
}

@media (max-width: 520px) {
  .roomie-chat__header {
    min-height: 62px;
    gap: 10px !important;
  }

  .roomie-chat__messages {
    padding: 16px 12px;
  }

  .roomie-chat__bubble {
    max-width: 84% !important;
  }

  .roomie-chat__composer {
    gap: 7px !important;
    padding-top: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .roomie-chat__input {
    transition: none;
  }
}

.chat-voice-message {
  width: min(310px, calc(100vw - 92px));
  padding: 8px 11px;
  border-radius: 999px;
  color: #F6F7F8;
  background: #303236;
}

.chat-voice-player {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-voice-player > audio {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.chat-voice-player__toggle {
  width: 34px;
  height: 38px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  color: inherit;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.chat-voice-player__toggle:focus-visible,
.chat-voice-player__waveform:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.chat-voice-player__waveform {
  min-width: 0;
  height: 42px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  overflow: hidden;
  cursor: pointer;
  touch-action: manipulation;
}

.chat-voice-player__bar {
  width: 3px;
  min-width: 2px;
  max-height: 34px;
  flex: 1 1 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  transition: background-color 120ms ease;
}

.chat-voice-player__bar.is-played {
  background: #FFFFFF;
}

.chat-voice-player__time {
  min-width: 34px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.chat-voice-message__error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.chat-voice-message__error a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}

.chat-attachment-preview {
  flex-shrink: 0;
  padding: 8px 12px 0;
}

.chat-attachment-tray {
  position: absolute;
  z-index: 5;
  right: 12px;
  bottom: calc(100% + 8px);
  left: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
}

.chat-attachment-option {
  min-width: 0;
  min-height: 78px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  padding: 8px 4px;
  color: var(--text-2);
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  font: 600 11px var(--font);
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.chat-attachment-option:hover {
  transform: translateY(-1px);
  border-color: var(--border);
  background: var(--surface);
}

.chat-attachment-option:focus-visible,
.chat-shared-card__action:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.chat-attachment-option__icon,
.chat-structured-preview__icon {
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 13px;
}

.chat-attachment-option__icon--document {
  color: #16865A;
  border-color: #C5EBDD;
  background: #EAF8F2;
}

.chat-attachment-option__icon--camera {
  color: #3577C8;
  border-color: #D0E2FA;
  background: #EDF5FF;
}

.chat-attachment-option__icon--gallery {
  color: #8A50C8;
  border-color: #E4D5F5;
  background: #F5EEFC;
}

.chat-attachment-option__icon--audio {
  color: #D17D25;
  border-color: #F4DFC5;
  background: #FFF6EA;
}

.chat-attachment-option__icon--location,
.chat-structured-preview__icon--location {
  color: #D45252;
  border-color: #F3D3D3;
  background: #FFF0F0;
}

.chat-attachment-option__icon--contact,
.chat-structured-preview__icon--contact {
  color: #16865A;
  border-color: #C5EBDD;
  background: #EAF8F2;
}

.chat-structured-preview__icon {
  width: 44px;
  height: 44px;
}

.chat-structured-preview__detail {
  margin-top: 4px;
  color: var(--text-3);
  font-size: 11px;
  line-height: 1.4;
}

.chat-shared-card {
  width: min(280px, 100%);
  margin: 2px 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  color: var(--text);
}

.chat-shared-card--mine {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}

.chat-shared-card__heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-shared-card__heading > img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 13px;
  object-fit: cover;
}

.chat-shared-card__heading > span:last-child {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.chat-shared-card__heading strong,
.chat-shared-card__heading small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-shared-card__heading strong {
  font-size: 13px;
}

.chat-shared-card__heading small {
  color: var(--text-3);
  font-size: 11px;
}

.chat-shared-card--mine .chat-shared-card__heading small {
  color: rgba(255, 255, 255, 0.75);
}

.chat-shared-card__action {
  width: 100%;
  min-height: 36px;
  display: grid;
  place-items: center;
  margin-top: 10px;
  padding: 0 10px;
  color: var(--green-dd);
  border: 1px solid var(--border-g);
  border-radius: 10px;
  background: var(--green-l);
  font: 700 12px var(--font);
  text-decoration: none;
  cursor: pointer;
}

.chat-shared-card--mine .chat-shared-card__action {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
}

.chat-attachment-preview--audio {
  padding-top: 10px;
}

.chat-audio-preview__icon {
  width: 44px;
  height: 44px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--green-dd);
  border: 1px solid var(--border-g);
  border-radius: 12px;
  background: var(--green-l);
}

.chat-send-voice {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  color: #07140B;
  border: 0;
  border-radius: 12px;
  background: var(--green);
  box-shadow: var(--shadow-green);
  font: 750 13px var(--font);
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}

.chat-send-voice:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #4DDB86;
}

.chat-send-voice:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

.chat-send-voice:disabled {
  cursor: wait;
  opacity: 0.7;
}

.chat-record-button,
.chat-recording-cancel,
.chat-recording-finish {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  cursor: pointer;
}

.chat-record-button {
  width: 42px;
  height: 42px;
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.chat-record-button:hover:not(:disabled) {
  transform: translateY(-1px);
  color: var(--green-dd);
  border-color: var(--border-g);
  background: var(--green-l);
}

.chat-record-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.chat-record-button:focus-visible,
.chat-recording-cancel:focus-visible,
.chat-recording-finish:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

.chat-record-button__loading {
  animation: chat-record-spin 700ms linear infinite;
}

.chat-recording-controls {
  min-width: 0;
  min-height: 42px;
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 7px;
  padding: 4px 5px 4px 10px;
  border: 1px solid rgba(255, 59, 92, 0.22);
  border-radius: 13px;
  background: var(--red-l);
}

.chat-recording-status {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.chat-recording-status__dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--red);
  animation: chat-record-pulse 1.2s ease-in-out infinite;
}

.chat-recording-status__time {
  font-variant-numeric: tabular-nums;
}

.chat-recording-status__label {
  color: var(--text-2);
  font-weight: 600;
}

.chat-recording-cancel,
.chat-recording-finish {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: transparent;
}

.chat-recording-cancel {
  color: var(--red);
}

.chat-recording-cancel:hover {
  background: rgba(255, 59, 92, 0.1);
}

.chat-recording-finish {
  min-width: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: white;
  background: var(--red);
  font: 700 11px var(--font);
}

.chat-recording-finish:hover:not(:disabled) {
  background: #E32649;
}

.chat-recording-finish:disabled {
  cursor: wait;
  opacity: 0.75;
}

.chat-search-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--card);
  cursor: pointer;
}

.chat-search-toggle:hover,
.chat-search-toggle[aria-expanded="true"] {
  color: var(--green-dd);
  border-color: var(--border-g);
  background: var(--green-l);
}

.chat-search-toggle:focus-visible,
.chat-search-field button:focus-visible,
.chat-search-field input:focus-visible,
.chat-search-result:focus-visible,
.chat-search-more:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.chat-search-panel {
  z-index: 4;
  flex-shrink: 0;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.chat-search-field {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 11px;
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.chat-search-field:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow);
}

.chat-search-field input {
  min-width: 0;
  flex: 1;
  color: var(--text);
  border: 0;
  outline: 0;
  background: transparent;
  font: 13px var(--font);
}

.chat-search-field input::placeholder {
  color: var(--text-3);
}

.chat-search-field button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--text-3);
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.chat-search-results {
  max-height: min(38vh, 300px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.chat-search-hint {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  color: var(--text-3);
  font-size: 12px;
  text-align: center;
}

.chat-search-hint--error {
  color: var(--red);
}

.chat-search-spinner {
  animation: chat-record-spin 700ms linear infinite;
}

.chat-search-result {
  width: 100%;
  display: grid;
  gap: 5px;
  padding: 10px 8px;
  color: var(--text);
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.chat-search-result:hover {
  background: var(--surface);
}

.chat-search-result__message {
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-search-result time {
  color: var(--text-3);
  font-size: 10px;
}

.chat-search-more {
  width: 100%;
  min-height: 39px;
  color: var(--green-dd);
  border: 0;
  background: transparent;
  font: 700 11px var(--font);
  cursor: pointer;
}

.chat-search-more:disabled {
  color: var(--text-3);
  cursor: wait;
}

.chat-history-load {
  min-height: 35px;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 2px 0 8px;
  padding: 0 12px;
  color: var(--green-dd);
  border: 1px solid var(--border-g);
  border-radius: var(--r-full);
  background: var(--card);
  font: 700 11px var(--font);
  cursor: pointer;
}

.chat-history-load:disabled {
  color: var(--text-3);
  cursor: wait;
}

.chat-history-load:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.message-bubble--highlight .bubble-wrap > div:last-child {
  animation: chat-message-found 2s ease;
}

.chat-attachment-label {
  padding: 7px 10px 8px;
  color: inherit;
  font-size: 11px;
  font-weight: 650;
}

.chat-document-attachment {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px;
  padding: 11px 12px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.chat-document-attachment > svg {
  flex: 0 0 auto;
  color: var(--green-dd);
}

.chat-document-attachment--mine {
  color: white;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
}

.chat-document-attachment--mine > svg {
  color: white;
}

.chat-document-attachment:hover {
  filter: brightness(0.97);
}

@keyframes chat-message-found {
  0%, 100% { box-shadow: none; }
  18%, 72% { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.62); }
}

@keyframes chat-record-pulse {
  50% { opacity: 0.35; }
}

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

@media (max-width: 420px) {
  .chat-recording-controls {
    gap: 4px;
    padding-left: 8px;
  }

  .chat-recording-status {
    gap: 5px;
    font-size: 10px;
  }

  .chat-recording-status__label {
    display: none;
  }

  .chat-recording-cancel,
  .chat-recording-finish {
    width: 30px;
    height: 30px;
  }

  .chat-recording-finish {
    min-width: 58px;
  }

  .chat-search-panel {
    padding-right: 10px;
    padding-left: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-record-button,
  .chat-recording-status__dot,
  .chat-record-button__loading {
    animation: none;
    transition: none;
  }

  .message-bubble--highlight .bubble-wrap > div:last-child {
    animation: none;
  }
}
