/* Main phone frame */
.phone-container * {
  font-family: var(--font-sf);
}
.phone-container {
  position: relative;
  --phone-chat-bezel-x: clamp(6px, 2vw, 9px);
  --phone-chat-bottom-system: 39px;
  --phone-chat-bubble-cap: 332px;
  --phone-chat-bubble-max: min(var(--phone-chat-bubble-cap), 90%);

  width: min(100%, 430px);
  /* aspect-ratio: 430 / 932; */

  height: 100%;

  max-width: 430px;
  max-height: 932px;

  overflow: hidden;
  /* border-radius: 48px; */

  background: #111;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.45),
    inset 0 0 0 2px rgba(255, 255, 255, 0.12);
}

/* Wallpaper layer */
.phone-home-wallpaper {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.phone-home-wallpaper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Main interactive layer */
.phone-home-screen {
  position: absolute;
  inset: 0;
  z-index: 1;

  display: flex;
  flex-direction: column;
  padding-top: 64px;
  box-sizing: border-box;
}

.phone-home-top {
  display: flex;
  flex-direction: column;
  gap: 42px;
  z-index: 2;
}
/* App grid */
.app-grid {
  width: 100%;

  display: grid;
  grid-template-columns: repeat(3, 64px);

  justify-content: space-between;
  align-content: start;

  padding-left: 35px;
  padding-right: 35px;
  box-sizing: border-box;

  row-gap: 26px;
}

/* The full app unit: icon + label + badge */
.app-item {
  position: relative;

  width: 64px;
  min-height: 80px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;

  gap: 4px;
}

/* Only the icon image is clickable */
.app-button {
  width: 64px;
  height: 64px;

  padding: 0;
  border: none;
  background: none;

  display: block;

  cursor: pointer;
}

/* The actual app icon */
.app-button-image {
  width: 64px;
  height: 64px;

  display: block;

  object-fit: contain;
  border-radius: 14px;
}

/* Text below the icon */
.app-label {
  width: max-content;
  max-width: 72px;

  text-align: center;

  color: white;

  font-size: 12px;
  font-weight: 400;
  line-height: 16px;

  word-wrap: break-word;

  text-shadow: 0 2px 25px rgba(0, 0, 0, 1);
}

/* Notification bubble */
.notification-badge {
  position: absolute;

  left: 57px;
  top: -12px;

  min-width: 24px;
  height: 24px;

  padding: 2.5px 7px;
  box-sizing: border-box;

  display: inline-flex;
  justify-content: center;
  align-items: center;

  border-radius: 100px;

  background: #ff383c;
  color: white;

  font-size: 16px;
  font-weight: 400;
  line-height: 19px;

  pointer-events: none;
}

/* Disabled state */
.app-item.disabled {
  opacity: 0.35;
}

.app-button,
.app-button * {
  cursor: pointer !important;
}

.app-item.disabled .app-button,
.app-item.disabled .app-button * {
  pointer-events: none !important;
  cursor: default !important;
}

/* Widgets */
.widget-row {
  width: 100%;
  padding-inline: 33px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  box-sizing: border-box;
}
@media (max-height: 735px) {
  .widget-row {
    display: none;
  }

  .phone-home-top {
    margin-top: 10vh;
  }
}

.widget-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

.tasks-widget,
.calendar-widget {
  width: 100%;
  max-height: 174px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 23px;
  background: #1c1c1e;
}

.tasks-widget {
  box-sizing: border-box;
  padding: 7px 15px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.widget-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tasks-title {
  color: var(--system-blue, #0385ff);
  font-size: 17px;
  font-weight: 600;
  line-height: 22px;
  letter-spacing: 0.38px;
}

.tasks-count {
  color: var(--label-primary, white);
  font-size: 20px;
  font-weight: 500;
  text-align: right;
}

.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.task-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.task-main {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 30px;
  padding-bottom: 5px;
}

.task-checkbox {
  width: 16px;
  height: 16px;
  border-radius: 100px;
  border: 1.5px solid #464649;
  flex-shrink: 0;
}

.task-text {
  flex: 1;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: white;
  font-size: 15px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0.5px;
  word-wrap: break-word;
}

.task-divider {
  width: 100%;
  height: 2px;
  background-image: repeating-linear-gradient(
    to right,
    #464649 0 2px,
    transparent 2px 5px
  );
}

.tasks-empty {
  color: #464649;
  font-size: 15px;
  line-height: 20px;
}

.calendar-widget {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 16px;
}

.calendar-day {
  color: #fe4336;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 16px;
}

.calendar-date {
  color: white;
  font-size: 34px;
  font-weight: 400;
  line-height: 41px;
  letter-spacing: 0.4px;
}

@media (max-width: 399px) {
  .calendar-date {
    display: none;
  }

  .calendar-widget {
    justify-content: center;
    align-items: flex-start;
  }
}

.calendar-events {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.calendar-event {
  display: flex;
  align-items: stretch;
  gap: 3px;
  overflow: hidden;
}

.event-accent {
  width: 4px;
  border-radius: 100px;
  background: var(--app-calendar-event-border, #1badf8);
}

.event-content {
  flex: 1;
  padding-inline: 4px;
  border-radius: 4px;
  background: var(--app-calendar-event-bg, rgba(27, 173, 248, 0.28));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.event-title {
  color: var(--app-calendar-event-title, #1badf8);
  font-size: 15px;
  font-weight: 590;
  line-height: 20px;
}

.event-time {
  color: var(--app-calendar-event-desc, #1badf8);
  font-size: 14px;
  font-weight: 400;
  line-height: 19px;
}

.widget-label {
  color: var(--system-white, white);
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  text-align: center;
}

/* Dock */

.dock-wrapper {
  align-self: stretch;
  padding: 0 15px 14px;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
}

.dock {
  position: relative;
  align-self: stretch;
  height: 64px;
  overflow: hidden;
  border-radius: 40px;
  backdrop-filter: blur(40px);
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.dock-bg {
  position: absolute;
  inset: 0;
  width: 400px;
  height: 106px;
  background: var(--app-homescreen-dock-bg, rgba(0, 0, 0, 0.3));
  backdrop-filter: blur(40px);
}

.dock-icons {
  flex: 1;
  z-index: 1;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.phone-absolute-bar {
  position: absolute;
  left: -1px;
  right: -1px;
  width: auto;
  box-sizing: border-box;
  overflow: hidden;
  z-index: 3;
}

.status-bar {
  --status-color: #fff !important;
  background: transparent;
  top: 0;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.status-bar.status-black {
  --status-color: #000 !important;
}

.status-bar.status-white {
  --status-color: #fff !important;
}

.status-icons svg,
.status-icons use {
  color: var(--status-color) !important;
  fill: currentColor !important;
}

.status-icons svg path,
.status-icons svg rect,
.status-icons svg circle {
  fill: currentColor !important;
}

.status-blur {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.01);
  backdrop-filter: blur(2px);
}

.status-content {
  position: relative;
  z-index: 1;
  width: 430px;
  height: 54px;
  padding: 0 10px;
  box-sizing: border-box;

  display: flex;
  align-items: center;
  justify-content: center;
}

.status-side {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-time {
  color: var(--status-color) !important;
  font-size: 18px;
  font-weight: 500;
  line-height: 23px;
  text-align: center;
}


.status-icons {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
}

.status-icon {
  display: block;
  color: var(--status-color) !important;
  fill: currentColor !important;
  object-fit: contain;
  flex-shrink: 0;
}

.signal-icon-container {
  width: 27px;
  height: 23px;
}

.wifi-icon-container {
  width: 23px;
  height: 23px;
}

.battery-icon-container {
  width: 36px;
  height: 23px;
}

.signal-icon {
  width: 22.4px;
  height: 14.42px;
}

.wifi-icon {
  width: 19.11px;
  height: 13.8px;
}

.battery-icon {
  width: 30.85px;
  height: 13.95px;
}

.flex-centered {
  display: flex;
  align-items: center;
  justify-content: center;
}

.episode-card {
  width: 93%;
  height: 80px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  position: relative;
  overflow: hidden;

  border-radius: 40px;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(40px);
}

.episode-card-title {
  color: white;
  font-size: 28px;
  font-weight: 500;
  line-height: 34px;
  letter-spacing: 0.38px;
}

.episode-card-container {
  pointer-events: none;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 20px;
}
@media (max-height: 850px) {
  .episode-card-container {
    display: none;
  }
}

.map-screen-container {
  position: absolute;
  inset: 0;
  z-index: 1;
  max-width: 430px;
  min-width: 100%;
}

.map-empty-background {
  position: absolute;
  inset: 0;
  z-index: 0;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  pointer-events: none;
}

.map-empty-background-day {
  background-image: url("../svg/phone/map/bg-day.png");
}

.map-empty-background-night {
  background-image: url("../svg/phone/map/bg-night.png");
}

.map-screen {
  width: 100%;
  height: 100%;
  object-fit: cover;

  position: relative;

  overflow: hidden;
  z-index: 1;
}

.map-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Weather Widget */

.weather-card {
  position: absolute;
  left: 364px;
  bottom: 480px;

  width: 56px;
  height: 44px;

  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;

  padding: 4px 4px 5px;
  overflow: hidden;

  border-radius: 8px;
  outline: 0.33px solid rgba(120, 120, 128, 0.16);
  outline-offset: -0.33px;
}

.weather-card-bg {
  position: absolute;
  inset: 0;

  background: rgba(243, 225, 225, 0.82);
  opacity: 100%;

  background-blend-mode: color-dodge, normal;
  backdrop-filter: blur(25px);

  -webkit-backdrop-filter: blur(25px);
}

.weather-main-row,
.weather-aqi-row {
  position: relative;
  z-index: 1;
}

.weather-main-row {
  display: flex;
  align-items: center;
  justify-content: center;
}

.weather-icon {
  width: 23px;
  height: 23px;
  display: block;
}

.weather-temp {
  color: rgba(60, 60, 67, 0.6);
  font-size: 18px;
  font-weight: 400;
  line-height: 23px;
  text-align: center;
}

.weather-aqi-row {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 1px;
}

.weather-aqi-text {
  display: flex;
  gap: 3px;

  color: rgba(60, 60, 67, 0.6);
  font-size: 10px;
  font-weight: 500;
  line-height: 12px;
  letter-spacing: 0.12px;
  text-align: center;
}

.weather-aqi-dot {
  width: 7px;
  height: 7px;

  background: #31c859;
  border-radius: 999px;
}
/* Location Sheet */

.location-sheet {
  position: absolute;
  left: 0;
  bottom: 0;
  transform: translateY(100%);

  padding-bottom: 108px;

  width: 100%;

  z-index: 3;

  display: flex;
  flex-direction: column;
  align-items: flex-start;

  overflow: hidden;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;

  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.25),
    0 0 40px rgba(0, 0, 0, 0.1);

  transform: translateY(100%);
  transition:
    transform 0.5s cubic-bezier(0.2, 0.9, 0.2, 1.08),
    opacity 0.2s ease;

  opacity: 0;
  will-change: transform;
}

.location-sheet.active {
  transform: translateY(0);
  opacity: 1;
}

.sheet-glass {
  position: absolute;
  inset: 0;
  background: rgba(243, 225, 225, 0.82);
  opacity: 100%;
  background-blend-mode: color-dodge, normal;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
}

.sheet-header {
  z-index: 1;

  width: 100%;
  padding: 16px 16px 16px 20px;
  box-sizing: border-box;
}

.sheet-handle {
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);

  width: 36px;
  height: 5px;

  background: rgba(60, 60, 67, 0.3);
  border-radius: 999px;
}

.sheet-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
}

.sheet-title {
  color: black;
  font-size: 28px;
  font-weight: 700;
  line-height: 34px;
  letter-spacing: 0.38px;
}

.sheet-close-button {
  width: 30px;
  height: 30px;

  position: relative;

  border: 0;
  padding: 0;
  border-radius: 999px;
  background: rgba(118, 118, 128, 0.12);

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
}

.sheet-close-icon {
  width: 100%;
  height: 100%;
}

/* Actions */

.sheet-actions {
  position: relative;
  z-index: 1;

  display: flex;
  gap: 10px;

  width: 100%;
  padding: 0 16px 16px;
  box-sizing: border-box;
}

.location-button {
  width: 126px;
  height: 54px;

  border: 0;
  padding: 0 10px;
  border-radius: 10px;

  background: #007bfe;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;

  cursor: pointer;
}

.location-icon {
  width: 19px;
  height: 19px;
}

.location-button-text {
  width: 100%;

  color: white;
  font-size: 11px;
  font-weight: 500;
  line-height: 13px;
  letter-spacing: 0.06px;
  text-align: center;
}

/* Images */

.sheet-image-row {
  position: relative;
  z-index: 1;

  display: flex;
  gap: 8px;

  width: 100%;
  padding: 0 16px;
  box-sizing: border-box;

  overflow-x: auto;

  overflow-x: auto;
  overflow-y: hidden;

  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;
}

.sheet-image {
  width: 175px;
  height: 220px;
  border-radius: 10px;
  flex-shrink: 0;
}

/* Gallery Screen  */

.gallery-screen {
  padding-top: 54px;
  width: 430px;
  height: 100%;
  background: #000;
  overflow: hidden;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.gallery-main {
  align-self: stretch;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;

  padding-bottom: 20px;
}

.gallery-header {
  display: flex;
  flex-direction: column;
}

.gallery-title {
  height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  line-height: 22px;
  text-align: center;
}

.gallery-content {
  align-self: stretch;
  flex: 1;
  position: relative;
  overflow: hidden;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;
}

.image-grid {
  width: 430px;
  padding-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 142px);
  gap: 2px;
}

.image-grid img {
  width: 142px;
  height: 142px;
  object-fit: cover;
  display: block;
}

/* .folio-item {
  width: 142px;
  height: 142px;
} */
.folio-image {
  width: 142px;
  height: 142px;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.folio-image::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  height: 60%;

  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.75) 100%
  );

  transform: translateY(0);
  transition: transform 0.3s ease;
  pointer-events: none;
}

.folio-image:hover::after {
  transform: translateY(50%);
  opacity: 0.65;
}
.gallery-footer {
  align-self: stretch;
  position: relative;
  padding-bottom: 32px;
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
}

.map-screen-container,
.gallery-screen,
.ig-page,
.messages-screen,
.phone-call-screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.messages-screen {
  overflow: hidden;
}

.modern-messaging {
  --modern-chat-accent: #0a84ff;
  --modern-chat-accent-2: #15b6d6;
  --modern-chat-green: #34c759;
  --modern-chat-text: #111827;
  --modern-chat-subtle: rgba(60, 60, 67, 0.62);
  --modern-chat-muted: rgba(60, 60, 67, 0.46);
  --modern-chat-hairline: rgba(60, 60, 67, 0.14);
  --modern-chat-card: rgba(255, 255, 255, 0.84);
  --modern-chat-card-strong: rgba(255, 255, 255, 0.96);
  --modern-chat-shadow: 0 16px 40px rgba(16, 24, 40, 0.08);
  --modern-chat-radius-xl: 30px;
  --modern-chat-radius-lg: 22px;
  --modern-chat-radius-md: 16px;
}

.phone-chat {
  --phone-chat-bezel-x: clamp(6px, 2vw, 9px);
  --phone-chat-bottom-system: 39px;
  --phone-chat-edge-gap: 8px;
  --phone-chat-tail-gutter: 8px;
  --phone-chat-bubble-cap: 332px;
  --phone-chat-bubble-max: min(var(--phone-chat-bubble-cap), 90%);
  --phone-chat-choice-cap: 318px;
  --phone-chat-incoming-bg: rgba(255, 255, 255, 0.96);
  --phone-chat-outgoing-bg: #0a84ff;
  --phone-chat-outgoing-bg-end: #15b6d6;
  --phone-chat-incoming-text: #171a21;
  --phone-chat-outgoing-text: #ffffff;
  --phone-chat-muted: rgba(22, 24, 29, 0.52);
  --phone-chat-outgoing-muted: rgba(255, 255, 255, 0.78);
  --phone-chat-bubble-radius: 20px;
  --phone-chat-tail-corner: 8px;

  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding-inline: var(--phone-chat-bezel-x);
  padding-bottom: var(--phone-chat-bottom-system);
  overflow: hidden;
  background:
    radial-gradient(
      circle at 15% 0%,
      rgba(255, 255, 255, 0.66),
      transparent 34%
    ),
    linear-gradient(180deg, #f4efe8 0%, #e8e1d8 100%);
  transform: translateX(100%);
  transition: transform 300ms cubic-bezier(0.2, 0.86, 0.22, 1);
  will-change: transform;
}

.phone-chat.active {
  transform: translateX(0);
}

.phone-chat .messenger-call-attempt-overlay {
  inset: 105px 0 0;
  background:
    linear-gradient(
      180deg,
      rgba(247, 248, 250, 0.9),
      rgba(247, 248, 250, 0.98)
    ),
    url("../svg/phone/chat/bg.png");
  background-size: 360px auto;
}

.messenger-call-attempt-modern .messenger-call-attempt-panel {
  min-height: min(390px, 100%);
  border: 1px solid rgba(10, 132, 255, 0.14);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    0 28px 64px rgba(15, 23, 42, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.messenger-call-attempt-modern .messenger-call-attempt-status {
  color: var(--modern-chat-accent);
}

.messenger-call-attempt-modern .messenger-call-attempt-avatar {
  border: 2px solid rgba(10, 132, 255, 0.58);
  box-shadow:
    0 0 0 9px rgba(10, 132, 255, 0.09),
    0 18px 34px rgba(15, 23, 42, 0.16);
}

.messenger-call-attempt-modern .messenger-call-attempt-name {
  color: var(--modern-chat-text);
}

.messenger-call-attempt-modern .messenger-call-attempt-detail {
  color: #6b7280;
}

.messenger-call-attempt-modern .messenger-call-attempt-signal span {
  background: var(--modern-chat-accent);
}

.chat-header {
  position: relative;
  z-index: 3;
  width: 100%;
  min-height: 106px;
  flex: 0 0 106px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 50px 10px 8px;
  border-bottom: 1px solid rgba(60, 60, 67, 0.12);
  background: rgba(250, 250, 252, 0.82);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(22px) saturate(1.18);
  -webkit-backdrop-filter: blur(22px) saturate(1.18);
}

.header-bar {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.header-left {
  min-width: 0;
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.chat-back-icon-container {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--modern-chat-accent);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color 140ms ease,
    transform 140ms ease;
}

.chat-back-icon-container:hover {
  background: rgba(10, 132, 255, 0.09);
}

.chat-back-icon-container:active {
  background: rgba(10, 132, 255, 0.16);
  transform: scale(0.94);
}

.chat-svg path,
.chat-svg use {
  fill: currentColor;
}

.chat-back-icon {
  width: 14px;
  height: 24px;
}

.contact-info {
  position: relative;
  min-width: 0;
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.contact-avatar-wrap {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: inline-flex;
}

.contact-avatar {
  width: 42px;
  height: 42px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.08),
    0 6px 16px rgba(15, 23, 42, 0.14);
}

.contact-name-and-subtitle {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.contact-name {
  max-width: 168px;
  overflow: hidden;
  color: var(--modern-chat-text);
  font-size: 17px;
  font-weight: 700;
  line-height: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-subtitle {
  min-height: 16px;
  color: var(--modern-chat-subtle);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  white-space: nowrap;
}

.header-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.header-actions.component-disabled {
  opacity: 0.38 !important;
  filter: none !important;
}

.header-action-button {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(10, 132, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--modern-chat-accent);
}

.chat-video-icon {
  width: 25px;
  height: 16px;
}

.chat-call-icon {
  width: 23px;
  height: 23px;
}

.chat-body {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px var(--phone-chat-edge-gap) 15px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-x: none;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(110, 110, 115, 0.34) transparent;
  background-color: #ece7df;
  background-image:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.5),
      rgba(236, 231, 223, 0.22)
    ),
    url("../svg/phone/chat/bg.png");
  background-size: 360px auto;
  background-blend-mode: normal, soft-light;
}

.chat-body > :first-child {
  margin-top: 0;
}

.chat-body > :last-child {
  margin-bottom: 4px;
}

.message-sequence {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.phone-chat .message-sequence {
  margin-top: 7px;
}

.phone-chat .message-sequence.modern-message-group-continued {
  margin-top: 1px;
}

.phone-chat .message-sequence.system-messages {
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  margin-bottom: 5px;
}

.phone-chat .message-sequence.system-messages:first-child {
  margin-top: 0;
}

.phone-chat .message-sequence.outgoing-messages {
  align-self: stretch;
  align-items: flex-end;
  justify-content: flex-end;
}

.phone-chat .message-sequence.incoming-messages {
  align-self: stretch;
  align-items: flex-start;
  justify-content: flex-start;
}

.message-row {
  width: 100%;
  display: flex;
  position: relative;
}

.message-bubble-container {
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  position: relative;
}

.phone-chat .message-bubble-container {
  width: fit-content;
  inline-size: fit-content;
  max-width: min(
    var(--phone-chat-bubble-max),
    calc(100% - var(--phone-chat-tail-gutter))
  );
  max-inline-size: min(
    var(--phone-chat-bubble-max),
    calc(100% - var(--phone-chat-tail-gutter))
  );
}

.phone-chat .message-sequence.outgoing-messages .message-bubble-container {
  margin-left: auto;
  margin-right: 0;
  align-items: flex-end;
}

.phone-chat .message-sequence.incoming-messages .message-bubble-container {
  margin-left: 0;
  margin-right: auto;
  align-items: flex-start;
}

.choice-replacement-message .message-bubble,
.choice-replacement-message .voice-message,
.choice-replacement-message .sticker-message {
  transform-origin: right bottom;
  animation: chat-choice-replacement-pop 240ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.phone-chat .message-bubble-container.choice-replacement-message {
  box-sizing: border-box;
  overflow: hidden;
  transition: min-height 180ms ease;
}

@keyframes chat-choice-replacement-pop {
  0% {
    opacity: 0.72;
    transform: translateY(-5px) scale(0.985);
    filter: brightness(1.08);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .phone-chat .message-bubble-container.choice-replacement-message {
    transition: none;
  }

  .choice-replacement-message .message-bubble,
  .choice-replacement-message .voice-message,
  .choice-replacement-message .sticker-message {
    animation: none !important;
  }
}

.incoming-messages .message-bubble,
.incoming-messages .voice-message,
.incoming-messages .sticker-message {
  user-select: none;
  -webkit-user-select: none;
}

.message-bubble-container .message-reaction-box {
  display: none;
}

.message-bubble-container.has-reaction .message-reaction-box,
.message-bubble-container.has-player-reaction .player-message-reaction {
  display: inline-flex;
}

.message-bubble-container.has-player-reaction
  .message-reaction-box:not(.player-message-reaction) {
  display: none;
}

.phone-chat .message-bubble-container.has-reaction,
.phone-chat .message-bubble-container.has-player-reaction {
  margin-bottom: 19px;
}

.message-bubble-container.message-noninteractive {
  user-select: none;
  -webkit-user-select: none;
}

.message-bubble-container.message-noninteractive,
.message-bubble-container.message-noninteractive * {
  pointer-events: none;
}

.message-bubble-container.reaction-target-active {
  z-index: 12;
}

.phone-chat .message-bubble-container.reaction-target-active .message-bubble,
.phone-chat .message-bubble-container.reaction-target-active .voice-message,
.phone-chat .message-bubble-container.reaction-target-active .sticker-message {
  transform: translateY(-2px) scale(1.03);
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.16));
}

.phone-chat .message-bubble,
.phone-chat .voice-message,
.phone-chat .sticker-message {
  transition:
    transform 120ms ease,
    filter 120ms ease;
}

.message-tail {
  display: none;
}

.hidden-all-message .message-bubble > span,
.hidden-all-message .quoted-message-preview,
.hidden-all-message .quoted-reply-text,
.hidden-all-message .voice-main,
.hidden-all-message .voice-footer,
.hidden-all-message .location-message-preview,
.hidden-all-message .attachment-caption,
.hidden-all-message .sticker-message-image,
.hidden-all-message .file-pill,
.hidden-all-message .file-meta,
.hidden-all-message .link-preview-card,
.hidden-all-message .link-preview-url,
.hidden-all-message .call-log-card {
  filter: blur(7px);
  opacity: 0.9;
}

.hidden-text-content {
  display: inline-block;
  filter: blur(6px);
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.phone-chat .message-bubble,
.phone-chat .voice-message-bubble {
  position: relative;
  box-sizing: border-box;
  overflow: visible;
  border: 0;
  color: var(--phone-chat-incoming-text);
  box-shadow:
    0 1px 2px rgba(24, 28, 36, 0.06),
    0 8px 18px rgba(24, 28, 36, 0.05);
}

.phone-chat .message-bubble {
  width: fit-content;
  inline-size: fit-content;
  max-width: min(var(--phone-chat-bubble-max), 100%);
  max-inline-size: min(var(--phone-chat-bubble-max), 100%);
  min-width: 0;
  padding: 8px 12px 7px;
  border-radius: var(--phone-chat-bubble-radius);
  font-size: 15.5px;
  font-weight: 400;
  line-height: 1.36;
  letter-spacing: 0;
  overflow-wrap: break-word;
  word-break: normal;
}

.phone-chat .message-bubble > span,
.phone-chat .text-message-bubble > span {
  display: inline;
  min-inline-size: 0;
  max-inline-size: 100%;
  color: inherit;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.phone-chat .text-message-bubble {
  box-sizing: content-box;
  display: block;
  white-space: normal;
}

.phone-chat
  :is(
    .text-message-bubble,
    .quote-message-bubble,
    .file-message-bubble,
    .media-message-bubble,
    .link-message-bubble,
    .call-message-bubble,
    .deleted-message-bubble,
    .typing-message-bubble,
    .voice-message-bubble
  )::before {
  content: "";
  width: 15px;
  height: 15px;
  position: absolute;
  bottom: -1px;
  background: inherit;
  pointer-events: none;
}

.phone-chat
  .modern-message-group-has-next
  :is(
    .text-message-bubble,
    .quote-message-bubble,
    .file-message-bubble,
    .media-message-bubble,
    .link-message-bubble,
    .call-message-bubble,
    .deleted-message-bubble,
    .typing-message-bubble,
    .voice-message-bubble
  )::before,
.phone-chat .choice-message-bubble > .message-tail {
  display: none;
}

.phone-chat
  .message-sequence.outgoing-messages
  :is(
    .text-message-bubble,
    .quote-message-bubble,
    .file-message-bubble,
    .media-message-bubble,
    .link-message-bubble,
    .call-message-bubble,
    .deleted-message-bubble,
    .typing-message-bubble,
    .voice-message-bubble
  )::before {
  right: -6px;
  clip-path: polygon(0 18%, 100% 100%, 0 100%);
}

.phone-chat
  .message-sequence.incoming-messages
  :is(
    .text-message-bubble,
    .quote-message-bubble,
    .file-message-bubble,
    .media-message-bubble,
    .link-message-bubble,
    .call-message-bubble,
    .deleted-message-bubble,
    .typing-message-bubble,
    .voice-message-bubble
  )::before {
  left: -6px;
  clip-path: polygon(100% 18%, 100% 100%, 0 100%);
}

.phone-chat .message-sequence.outgoing-messages .message-bubble,
.phone-chat .message-sequence.outgoing-messages .voice-message-bubble {
  color: var(--phone-chat-outgoing-text);
  background: linear-gradient(
    135deg,
    var(--phone-chat-outgoing-bg) 0%,
    var(--phone-chat-outgoing-bg-end) 100%
  );
}

.phone-chat .message-sequence.incoming-messages .message-bubble,
.phone-chat .message-sequence.incoming-messages .voice-message-bubble {
  color: var(--phone-chat-incoming-text);
  background: var(--phone-chat-incoming-bg);
}

.phone-chat .message-sequence.outgoing-messages .message-bubble {
  border-radius: 20px 20px 8px 20px;
}

.phone-chat .message-sequence.incoming-messages .message-bubble {
  border-radius: 20px 20px 20px 8px;
}

.phone-chat
  .message-sequence.outgoing-messages.modern-message-group-has-next
  .message-bubble {
  border-bottom-right-radius: 14px;
}

.phone-chat
  .message-sequence.incoming-messages.modern-message-group-has-next
  .message-bubble {
  border-bottom-left-radius: 14px;
}

.phone-typing-sequence {
  pointer-events: none;
}

.phone-chat .typing-message-bubble {
  width: 54px;
  inline-size: 54px;
  min-width: 54px;
  min-inline-size: 54px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 13px;
}

.phone-chat .typing-message-bubble span {
  width: 6px;
  height: 6px;
  display: block;
  border-radius: 999px;
  background: rgba(22, 24, 29, 0.38);
  animation: phone-typing-dot 1.05s ease-in-out infinite;
}

.phone-chat .typing-message-bubble span:nth-child(2) {
  animation-delay: 0.14s;
}

.phone-chat .typing-message-bubble span:nth-child(3) {
  animation-delay: 0.28s;
}

.phone-chat .outgoing-typing-sequence .typing-message-bubble span {
  background: rgba(255, 255, 255, 0.72);
}

@keyframes phone-typing-dot {
  0%,
  60%,
  100% {
    opacity: 0.36;
    transform: translateY(0);
  }

  30% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.phone-chat .deleted-message-bubble {
  padding: 7px 12px;
  color: var(--phone-chat-muted);
}

.phone-chat .message-sequence.outgoing-messages .deleted-message-bubble {
  color: rgba(255, 255, 255, 0.82);
}

.deleted-message-content {
  width: 100%;
  min-height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
}

.deleted-message-icon {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  color: currentColor;
}

.deleted-message-text {
  max-width: 100%;
  color: currentColor;
  font-size: 13.5px;
  font-style: italic;
  font-weight: 400;
  line-height: 18px;
  text-align: start;
  overflow-wrap: anywhere;
}

.middle-message-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.chat-date-pill,
.chat-system-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: min(260px, 82%);
  padding: 5px 14px;
  border: 1px solid rgba(24, 28, 36, 0.06);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: rgba(22, 24, 29, 0.58);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0;
  text-align: center;
  white-space: normal;
  box-shadow:
    0 1px 2px rgba(24, 28, 36, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.phone-chat .quote-message-bubble {
  padding: 5px 5px 7px;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.quoted-message-preview {
  width: 100%;
  min-width: min(88px, 100%);
  max-width: 100%;
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(24, 28, 36, 0.06);
}

.phone-chat .message-sequence.outgoing-messages .quoted-message-preview {
  background: rgba(255, 255, 255, 0.18);
}

.quoted-message-bar {
  width: 3px;
  flex: 0 0 3px;
  background: #ffcf54;
}

.phone-chat .message-sequence.incoming-messages .quoted-message-bar {
  background: var(--modern-chat-accent);
}

.quoted-message-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  overflow: hidden;
}

.quoted-message-author {
  color: #005fbd;
  font-size: 13px;
  font-weight: 700;
  line-height: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-chat .message-sequence.outgoing-messages .quoted-message-author,
.phone-chat .message-sequence.outgoing-messages .quoted-message-text {
  color: rgba(255, 255, 255, 0.9);
}

.quoted-message-text {
  color: rgba(22, 24, 29, 0.64);
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  overflow-wrap: break-word;
  word-break: normal;
}

.quoted-reply-row {
  min-width: 0;
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
  padding: 1px 7px 0;
}

.quoted-reply-text {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: break-word;
  word-break: normal;
}

.message-text {
  max-width: 100%;
  min-width: 0;
  color: inherit;
  font-size: 15.5px;
  font-weight: 400;
  line-height: 1.36;
  letter-spacing: 0;
  overflow-wrap: break-word;
  word-break: normal;
}

.attachment-caption {
  max-width: 100%;
  min-width: 0;
  padding: 6px 8px 0;
  color: inherit;
  overflow-wrap: break-word;
  word-break: normal;
}

.phone-chat .file-message-bubble {
  width: min(246px, 100%);
  inline-size: min(246px, 100%);
  padding: 6px;
}

.file-pill {
  width: 100%;
  height: 46px;
  box-sizing: border-box;
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(24, 28, 36, 0.06);
}

.phone-chat .message-sequence.outgoing-messages .file-pill {
  background: rgba(255, 255, 255, 0.18);
}

.file-icon {
  width: 22px;
  height: 27px;
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
}

.file-name {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.message-details-row {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 4px;
}

.file-meta {
  min-width: 0;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  overflow: hidden;
  color: var(--phone-chat-muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 13px;
  letter-spacing: 0;
}

.phone-chat .message-sequence.outgoing-messages .file-meta {
  color: var(--phone-chat-outgoing-muted);
}

.file-size,
.file-type {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  overflow-wrap: normal;
  text-overflow: ellipsis;
}

.file-meta-dot {
  width: 3px;
  height: 3px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.42;
}

.phone-chat .voice-message {
  max-width: min(var(--phone-chat-bubble-max), 100%);
}

.phone-chat .voice-message-bubble {
  width: min(276px, 100%);
  inline-size: min(276px, 100%);
  min-height: 70px;
  padding: 11px 10px 7px 14px;
  border-radius: 20px 20px 8px 20px;
  outline: 0;
}

.phone-chat .message-sequence.incoming-messages .voice-message-bubble {
  border-radius: 20px 20px 20px 8px;
}

.voice-main {
  width: 100%;
  display: inline-flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
}

.voice-play-button,
.voice-play-button.active {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--modern-chat-accent);
  cursor: pointer;
  transition:
    color 160ms ease,
    transform 160ms ease;
}

.voice-play-button:hover:not(:disabled) {
  transform: scale(1.04);
}

.phone-chat .message-sequence.outgoing-messages .voice-play-button,
.phone-chat .message-sequence.outgoing-messages .voice-play-button.active {
  color: #ffffff;
}

.voice-play-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.voice-icon {
  width: 24px;
  height: 24px;
}

.voice-content {
  width: auto;
  min-width: 0;
  flex: 1 1 auto;
  display: inline-flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 7px;
  padding-top: 8px;
}

.voice-controls {
  width: 100%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 13px;
}

.voice-waveform {
  width: auto;
  min-width: 0;
  height: 24px;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 2px;
}

.wave {
  flex: 1;
  height: var(--h);
  border-radius: 10px;
  background: rgba(22, 24, 29, 0.18);
  transition:
    height 120ms ease,
    background-color 140ms ease,
    opacity 140ms ease;
}

.wave.played {
  background: var(--modern-chat-accent);
}

.phone-chat .message-sequence.outgoing-messages .wave {
  background: rgba(255, 255, 255, 0.28);
}

.phone-chat .message-sequence.outgoing-messages .wave.played {
  background: #ffffff;
}

.wave.active:not(.played) {
  opacity: 0.72;
}

.voice-footer,
.voice-duration {
  color: var(--phone-chat-muted);
  letter-spacing: 0;
}

.voice-footer {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding-left: 35px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 400;
  line-height: 13px;
}

.voice-duration {
  white-space: nowrap;
}

.phone-chat .message-sequence.outgoing-messages .voice-footer,
.phone-chat .message-sequence.outgoing-messages .voice-duration {
  color: var(--phone-chat-outgoing-muted);
}

.voice-avatar-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.voice-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55);
}

.voice-mic-badge {
  width: 20px;
  height: 20px;
  position: absolute;
  left: -9px;
  top: 21px;
  color: var(--modern-chat-accent);
}

.phone-chat .message-sequence.outgoing-messages .voice-mic-badge {
  color: #ffffff;
}

.phone-chat .message-bubble.has-location,
.phone-chat .media-message-bubble {
  width: min(276px, 100%);
  inline-size: min(276px, 100%);
  max-width: 100%;
  box-sizing: border-box;
  padding: 5px;
}

.location-message-preview {
  width: 100%;
  aspect-ratio: 279 / 157;
  height: auto;
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  background: rgba(118, 118, 128, 0.12);
}

.location-message-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.location-message-scrim {
  width: 176px;
  height: 40px;
  position: absolute;
  right: 0;
  bottom: 0;
  border-bottom-right-radius: 15px;
  background: radial-gradient(
    ellipse 111.35% 123.51% at 92.61% 131.25%,
    rgba(0, 0, 0, 0.53) 0%,
    rgba(0, 0, 0, 0) 100%
  );
}

.phone-chat .link-message-bubble,
.link-message {
  color: inherit;
  text-decoration: none;
}

.phone-chat .link-message-bubble {
  width: min(276px, 100%);
  inline-size: min(276px, 100%);
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  padding: 5px 5px 7px;
  cursor: pointer;
}

.link-preview-card {
  width: 100%;
  min-height: 84px;
  display: inline-flex;
  overflow: hidden;
  border-radius: 15px;
  background: rgba(24, 28, 36, 0.05);
}

.phone-chat .message-sequence.outgoing-messages .link-preview-card {
  background: rgba(255, 255, 255, 0.2);
}

.link-preview-image {
  width: 84px;
  height: 84px;
  flex: 0 0 84px;
  object-fit: cover;
}

.link-preview-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 7px 10px;
  overflow: hidden;
}

.link-preview-title {
  max-height: 36px;
  overflow: hidden;
  color: rgba(22, 24, 29, 0.86);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 17px;
  overflow-wrap: anywhere;
}

.link-preview-description,
.link-preview-domain {
  overflow: hidden;
  color: rgba(22, 24, 29, 0.54);
  font-size: 11px;
  font-weight: 400;
  line-height: 14px;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-preview-url {
  max-width: 100%;
  padding: 3px 8px 0;
  color: #005fc0;
  font-size: 14.5px;
  font-weight: 400;
  line-height: 19px;
  text-decoration: underline;
  overflow-wrap: anywhere;
}

.phone-chat .message-sequence.outgoing-messages .link-preview-url {
  color: rgba(255, 255, 255, 0.92);
}

.phone-chat .call-message-bubble {
  min-height: auto;
  padding: 5px;
}

.call-log-card {
  max-width: 100%;
  min-width: min(172px, 100%);
  min-height: 58px;
  height: auto;
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px;
  border-radius: 15px;
  background: rgba(24, 28, 36, 0.06);
}

.phone-chat .message-sequence.outgoing-messages .call-log-card {
  background: rgba(255, 255, 255, 0.2);
}

.call-log-icon-wrap {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
}

.call-log-icon {
  width: 24px;
  height: 24px;
  color: currentColor;
}

.call-log-copy {
  width: 108px;
  min-width: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 3px;
}

.call-log-title,
.call-log-subtitle {
  align-self: stretch;
  font-size: 14px;
  line-height: 19px;
  overflow-wrap: anywhere;
}

.call-log-title {
  color: inherit;
  font-weight: 700;
}

.call-log-subtitle {
  color: var(--phone-chat-muted);
  font-weight: 400;
}

.phone-chat .message-sequence.outgoing-messages .call-log-subtitle {
  color: var(--phone-chat-outgoing-muted);
}

.call-message-missed .call-log-icon,
.call-message-outgoing-missed .call-log-icon {
  color: #e90039;
}

.call-message-missed .call-log-card {
  background: rgba(233, 0, 57, 0.08);
}

.call-message-incoming-missed .call-log-card {
  box-shadow: inset 3px 0 0 rgba(233, 0, 57, 0.58);
}

.call-message-outgoing-missed .call-log-card {
  background: rgba(10, 10, 10, 0.04);
  box-shadow: none;
}

.phone-chat .sticker-message-bubble {
  filter: drop-shadow(0 6px 12px rgba(24, 28, 36, 0.12));
}

.sticker-message {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.sticker-message-small {
  width: 73px;
  height: 73px;
}

.sticker-message-medium {
  width: 100px;
  height: 100px;
}

.sticker-message-large {
  width: 172px;
  height: 172px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow:
    0 1px 2px rgba(24, 28, 36, 0.08),
    0 10px 22px rgba(24, 28, 36, 0.08);
}

.sticker-message-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.sticker-message-large .sticker-message-image {
  object-fit: cover;
}

.message-reaction-box {
  min-width: 28px;
  height: 24px;
  position: absolute;
  right: 10px;
  bottom: -18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 3px 8px;
  border: 1px solid rgba(24, 28, 36, 0.08);
  border-radius: 13px;
  outline: 0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 2px 6px rgba(24, 28, 36, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  font-size: 16px;
}

.phone-chat .message-sequence.incoming-messages .message-reaction-box {
  left: 10px;
  right: auto;
}

.player-message-reaction {
  display: none;
}

.message-bubble-container.reaction-pop .player-message-reaction {
  animation: reaction-pop 180ms ease-out;
}

.message-reaction-plus {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #000;
  font-size: 16px;
  font-weight: 400;
  line-height: 14px;
  letter-spacing: 0.75px;
  overflow-wrap: break-word;
}

.message-reaction-gif {
  width: 40px;
  height: 26px;
}

.chat-reaction-backdrop {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: auto;
  opacity: 1;
  background: rgba(0, 0, 0, 0.14);
  animation: reaction-backdrop-in 140ms ease;
}

.chat-reaction-tray {
  width: 236px;
  min-height: 42px;
  position: absolute;
  z-index: 13;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-sizing: border-box;
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 18px 36px rgba(15, 23, 42, 0.18),
    0 0 0 1px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  opacity: 1;
  pointer-events: auto;
  animation: reaction-tray-in 140ms ease;
}

.chat-reaction-option {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition:
    background 120ms ease,
    transform 120ms ease;
}

.chat-reaction-option:hover {
  background: rgba(0, 0, 0, 0.06);
  transform: translateY(-1px) scale(1.08);
}

.chat-reaction-gif {
  width: 31px;
  height: 31px;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

@keyframes reaction-pop {
  0% {
    transform: scale(1);
  }
  55% {
    transform: scale(1.35);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes reaction-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes reaction-tray-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.phone-chat .choice-message-bubble {
  width: fit-content;
  inline-size: fit-content;
  min-width: 0;
  min-inline-size: 0;
  max-width: min(var(--phone-chat-choice-cap), 100%);
  max-inline-size: min(var(--phone-chat-choice-cap), 100%);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  padding: 0;
  overflow: visible;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
  outline: 0;
  cursor: default;
}

.phone-chat .chat-choice-line {
  width: fit-content;
  inline-size: fit-content;
  max-width: 100%;
  max-inline-size: 100%;
  min-width: min(132px, 100%);
  min-inline-size: min(132px, 100%);
  min-height: 44px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(10, 132, 255, 0.24);
  border-radius: 18px 18px 8px 18px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.92),
      rgba(240, 247, 255, 0.86)
    ),
    #eef6ff;
  color: #005fbd;
  font: inherit;
  font-size: 15.5px;
  line-height: 19px;
  text-align: center;
  cursor: pointer;
  box-shadow:
    0 1px 2px rgba(0, 73, 151, 0.12),
    0 8px 16px rgba(0, 73, 151, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition:
    transform 140ms ease,
    filter 140ms ease,
    border-color 140ms ease;
}

.phone-chat .chat-choice-line * {
  cursor: pointer;
}

.phone-chat .chat-choice-line:hover {
  border-color: rgba(10, 132, 255, 0.42);
  filter: brightness(1.01) saturate(1.04);
  transform: translateY(-1px);
}

.phone-chat .chat-choice-line.is-premium-choice {
  border-color: rgba(226, 169, 28, 0.42);
  background:
    linear-gradient(
      180deg,
      rgba(255, 250, 230, 0.96),
      rgba(255, 239, 178, 0.9)
    ),
    #fff4c8;
  color: #825300;
}

.phone-chat .chat-choice-line:disabled {
  cursor: default;
}

.phone-chat .chat-choice-text {
  max-width: 100%;
  min-width: 0;
  flex: 0 1 auto;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.phone-chat .chat-choice-premium-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  min-width: 14px;
}

.chat-compose-footer {
  min-height: 64px;
  flex: 0 0 64px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 10px;
  border-top: 1px solid rgba(60, 60, 67, 0.13);
  background: rgba(248, 248, 248, 0.92);
  backdrop-filter: blur(20px) saturate(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
  pointer-events: none;
}

.chat-compose-icon-button,
.chat-compose-send-button {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(10, 132, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--modern-chat-accent);
}

.chat-compose-field {
  min-width: 0;
  height: 36px;
  flex: 1 1 auto;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  padding: 0 13px;
  border: 1px solid rgba(60, 60, 67, 0.18);
  border-radius: 18px;
  background: #ffffff;
  color: rgba(60, 60, 67, 0.56);
  font-size: 15px;
  line-height: 20px;
}

.chat-compose-plus,
.chat-compose-send-arrow {
  position: relative;
  width: 16px;
  height: 16px;
  display: block;
}

.chat-compose-plus::before,
.chat-compose-plus::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 7px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.chat-compose-plus::after {
  transform: rotate(90deg);
}

.chat-compose-send-arrow::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 7px;
  width: 10px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.chat-compose-send-arrow::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 4px;
  width: 7px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.chat-list-screen {
  --chat-list-bottom-space: 101px;
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding-top: 55px;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 12% -8%,
      rgba(10, 132, 255, 0.15),
      transparent 30%
    ),
    linear-gradient(180deg, #f7f8fb 0%, #eceff4 100%);
}

.chat-list-titlebar {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 20px 10px;
}

.chat-list-title-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.chat-list-title {
  color: var(--modern-chat-text);
  font-size: 32px;
  font-weight: 800;
  line-height: 36px;
  letter-spacing: -0.7px;
}

.chat-list-subtitle {
  min-height: 17px;
  color: var(--modern-chat-subtle);
  font-size: 13px;
  font-weight: 600;
  line-height: 17px;
}

.chat-list-action-slot {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(10, 132, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--modern-chat-accent);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.chat-list-action-slot svg {
  width: 18px;
  height: 18px;
}

.contacts-filter-row {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  padding: 0 16px 13px;
}

.chat-search-pill {
  width: 100%;
  min-height: 40px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--modern-chat-subtle);
  font-size: 15px;
  font-weight: 500;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.chat-search-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  opacity: 0.72;
}

.chat-filter-chips {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}

.chat-filter-chips::-webkit-scrollbar {
  display: none;
}

.chat-filter-chip {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 11px;
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: rgba(60, 60, 67, 0.66);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.chat-filter-chip.active {
  border-color: rgba(10, 132, 255, 0.22);
  background: rgba(10, 132, 255, 0.12);
  color: #0067cc;
}

.chat-filter-chip b {
  min-width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(10, 132, 255, 0.14);
  color: #0067cc;
  font-size: 11px;
  line-height: 1;
}

.chat-list {
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 0 14px var(--chat-list-bottom-space);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-padding-bottom: var(--chat-list-bottom-space);
  scrollbar-width: thin;
}

.chat-list-item {
  width: 100%;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border: 1px solid rgba(60, 60, 67, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    0 10px 26px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  cursor: pointer;
  outline: 0;
  transition:
    border-color 150ms ease,
    background-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.chat-list-item:hover,
.chat-list-item:focus-visible {
  border-color: rgba(10, 132, 255, 0.2);
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.08),
    0 0 0 3px rgba(10, 132, 255, 0.08);
}

.chat-list-item:active {
  transform: scale(0.992);
}

.chat-list-item.has-unread {
  border-color: rgba(10, 132, 255, 0.18);
}

.chat-list-item-inner {
  position: relative;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  overflow: hidden;
}

.chat-avatar-wrap {
  position: relative;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
}

.chat-avatar {
  width: 58px;
  height: 58px;
  display: block;
  object-fit: cover;
  border-radius: 50%;
  cursor: pointer;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.07),
    0 6px 18px rgba(15, 23, 42, 0.12);
  transition:
    transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 180ms ease;
}

.chat-avatar:hover,
.chat-avatar:focus-visible {
  transform: scale(1.04);
  box-shadow:
    0 0 0 3px rgba(10, 132, 255, 0.18),
    0 8px 20px rgba(15, 23, 42, 0.12);
  outline: none;
}

.chat-avatar:active {
  transform: scale(0.97);
}

.chat-online-dot {
  width: 12px;
  height: 12px;
  position: absolute;
  right: 1px;
  bottom: 2px;
  display: none;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--modern-chat-green);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.chat-online-dot.active {
  display: block;
}

.contact-online-dot {
  width: 11px;
  height: 11px;
  right: -1px;
  bottom: 1px;
}

.chat-preview {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.chat-preview-top {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-name {
  min-width: 0;
  color: var(--modern-chat-text);
  font-size: 17px;
  font-weight: 700;
  line-height: 22px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-list-meta {
  min-width: 0;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.chat-thread-time {
  max-width: 88px;
  overflow: hidden;
  color: rgba(60, 60, 67, 0.52);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-preview-bottom {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-media-preview,
.chat-snippet {
  min-width: 0;
  flex: 1 1 auto;
}

.chat-media-preview {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
}

.photo-icon {
  width: 15px;
  height: 12px;
  flex: 0 0 15px;
}

.chat-preview-location-icon {
  width: 11px;
  height: 18px;
  flex: 0 0 11px;
  display: block;
  object-fit: contain;
}

.chat-preview-call-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: #8e8e93;
  display: block;
}

.chat-preview-deleted-icon {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  color: #8e8e93;
  display: block;
}

.voice-record-preview {
  width: 11px;
  height: 17px;
  flex: 0 0 11px;
  color: #60bb58;
  display: block;
}

.chat-preview-sticker-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  display: block;
  color: #8e8e93;
}

.photo-icon path {
  fill: #8e8e93;
}

.chat-snippet {
  color: rgba(60, 60, 67, 0.66);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  overflow-wrap: break-word;
}

.truncate {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-notification-badge {
  min-width: 19px;
  height: 19px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--modern-chat-accent);
  color: white;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  box-shadow: 0 5px 12px rgba(10, 132, 255, 0.24);
}

.chat-list-empty {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 42px var(--chat-list-bottom-space);
  text-align: center;
}

.chat-list-empty-orb {
  width: 88px;
  height: 88px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 30px;
  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(255, 255, 255, 0.9),
      transparent 38%
    ),
    linear-gradient(135deg, rgba(10, 132, 255, 0.18), rgba(21, 182, 214, 0.12));
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.chat-list-empty-orb::before,
.chat-list-empty-orb::after,
.chat-list-empty-orb span {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(10, 132, 255, 0.72);
}

.chat-list-empty-orb::before {
  width: 42px;
  height: 30px;
  left: 22px;
  top: 28px;
  border-radius: 16px 16px 16px 6px;
}

.chat-list-empty-orb::after {
  width: 26px;
  height: 19px;
  right: 20px;
  bottom: 26px;
  opacity: 0.5;
  border-radius: 12px 12px 5px 12px;
}

.chat-list-empty-orb span {
  width: 5px;
  height: 5px;
  left: 40px;
  top: 41px;
  box-shadow:
    -10px 0 0 rgba(255, 255, 255, 0.86),
    0 0 0 rgba(255, 255, 255, 0.86),
    10px 0 0 rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.86);
}

.chat-list-empty-title {
  color: var(--modern-chat-text);
  font-size: 19px;
  font-weight: 800;
  line-height: 24px;
}

.chat-list-empty-copy {
  max-width: 260px;
  color: var(--modern-chat-subtle);
  font-size: 14px;
  font-weight: 500;
  line-height: 19px;
}

.chat-avatar-focus {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 28px;
  background: rgba(18, 18, 20, 0.42);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
}

.chat-avatar-focus-panel {
  position: relative;
  width: min(255px, calc(100% - 12px));
  min-height: 310px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 22px 18px 18px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  transform-origin: center;
}

.chat-avatar-focus-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(118, 118, 128, 0.14);
  cursor: pointer;
}

.chat-avatar-focus-close::before,
.chat-avatar-focus-close::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 21px;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: #6f6f74;
}

.chat-avatar-focus-close::before {
  transform: rotate(45deg);
}

.chat-avatar-focus-close::after {
  transform: rotate(-45deg);
}

.chat-avatar-focus-image {
  width: 176px;
  height: 176px;
  display: block;
  object-fit: cover;
  border-radius: 50%;
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.2),
    0 0 0 6px #ffffff;
}

.chat-avatar-focus-name {
  max-width: 100%;
  overflow: hidden;
  color: #111111;
  font-size: 22px;
  font-weight: 800;
  line-height: 28px;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-avatar-focus-action {
  min-width: 128px;
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(
    135deg,
    var(--modern-chat-accent),
    var(--modern-chat-accent-2)
  );
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(10, 132, 255, 0.28);
}

.chat-avatar-focus-action:active {
  transform: scale(0.97);
}

.chat-avatar-focus-enter-active,
.chat-avatar-focus-leave-active {
  transition:
    opacity 220ms ease,
    backdrop-filter 220ms ease;
}

.chat-avatar-focus-enter-active .chat-avatar-focus-panel,
.chat-avatar-focus-leave-active .chat-avatar-focus-panel {
  transition:
    opacity 240ms ease,
    transform 240ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.chat-avatar-focus-enter,
.chat-avatar-focus-leave-to {
  opacity: 0;
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
}

.chat-avatar-focus-enter .chat-avatar-focus-panel,
.chat-avatar-focus-leave-to .chat-avatar-focus-panel {
  opacity: 0;
  transform: scale(0.86) translateY(12px);
}

@media (prefers-reduced-motion: reduce) {
  .phone-chat,
  .chat-list-item,
  .chat-avatar,
  .chat-avatar-focus-enter-active,
  .chat-avatar-focus-leave-active,
  .chat-avatar-focus-enter-active .chat-avatar-focus-panel,
  .chat-avatar-focus-leave-active .chat-avatar-focus-panel,
  .chat-choice-line,
  .chat-reaction-tray,
  .chat-reaction-backdrop {
    animation: none !important;
    transition-duration: 1ms !important;
  }
}

.sheet-image-row {
  overflow-x: auto;
  overflow-y: visible;

  scrollbar-width: none;
  -ms-overflow-style: none;

  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

.sheet-image-row::-webkit-scrollbar {
  display: none;
}

.sheet-image {
  transition:
    background-size 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease,
    filter 0.25s ease;
}

.pswp,
.pswp * {
  font-family: var(--font-sf);
}

.phone-stage {
  position: absolute;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  pointer-events: none;
}

.phone-shell {
  --screen-w: 430px;
  --screen-h: 902px;
  --bezel-w: 456px;
  --bezel-h: 960px;
  --phone-overscale: 1.035;
  --phone-scale-fit: min(
    calc(100vw / var(--bezel-w)),
    calc(var(--screenHeight) / var(--bezel-h))
  );
  --phone-scale: calc(var(--phone-scale-fit) * var(--phone-overscale));

  position: relative;

  width: var(--bezel-w);
  height: var(--bezel-h);

  display: flex;
  align-items: center;
  justify-content: center;

  transform: scale(var(--phone-scale));
  transform-origin: center center;

  pointer-events: auto;
}

.bezel-scaling {
  --phone-scale-fit: min(
    calc(100vw / var(--bezel-w)),
    calc(var(--screenHeight) / var(--bezel-h))
  );
  --phone-scale: calc(var(--phone-scale-fit) * var(--phone-overscale));
}

.phone-shell--fullscreen {
  width: 100%;
  max-width: none;
  height: 100%;
  transform: none;
}

.phone-shell--fullscreen .phone-container,
.phone-shell--fullscreen .phone-container.classic-phone-locked {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  border-radius: 0;
  box-shadow: none;
}

.phone-shell--fullscreen .phone-bezel {
  display: none;
}

.phone-container {
  position: relative;

  width: var(--screen-w);
  height: var(--screen-h);

  overflow: hidden;
  border-radius: 56px;

  background: #000;
}

.phone-bezel {
  position: absolute;
  inset: 0;
  z-index: 999;

  width: 100%;
  height: 100%;
  object-fit: fill;

  pointer-events: none !important;
  user-select: none;
}

.phone-bezel * {
  pointer-events: none !important;
}

.phone-container.classic-phone-locked {
  overflow: visible;
}

.phone-container.classic-phone-locked .c-app-container {
  visibility: visible;
  overflow: visible;
}

.ig-page {
  width: 100%;
  min-height: 100%;
  max-height: 100%;
  background: #fafafa;
  color: #262626;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  padding-bottom: 35px;
}

/* Top bar */
.ig-topbar-padding {
  padding-top: 64px;
  margin-bottom: 13px;
  padding-bottom: 13px;

  background: #ffffff;
}
.ig-topbar {
  position: relative;
  padding: 0 16px;
  background: #ffffff;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ig-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.ig-top-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.ig-icon-btn,
.ig-top-actions button,
.ig-post-actions button,
.ig-more-btn {
  border: 0;
  padding: 0;
  background: none;
  color: #262626;
  font: inherit;
  cursor: pointer;
}

.ig-icon-btn {
  font-size: 30px;
  line-height: 1;
}

.ig-topbar .ig-icon-btn svg path,
.ig-topbar .ig-icon-btn svg use {
  transition:
    fill 180ms ease,
    stroke 180ms ease,
    transform 180ms ease;
}

.ig-topbar .ig-icon-btn:hover svg path[fill="#262626"],
.ig-topbar .ig-icon-btn:hover svg use[fill="#262626"] {
  fill: #d22463;
}

.ig-topbar .ig-icon-btn:hover svg path[stroke="#262626"],
.ig-topbar .ig-icon-btn:hover svg use[stroke="#262626"] {
  stroke: #d22463;
}

.ig-topbar .ig-icon-btn:hover {
  transform: translateY(-1px);
}

.ig-topbar .ig-icon-btn {
  transition: transform 180ms ease;
}

.ig-top-actions .ig-icon-btn:first-child svg path[fill="#ED4956"],
.ig-top-actions .ig-icon-btn:first-child svg use[fill="#ED4956"] {
  fill: #f5c542;
}

.ig-top-actions button {
  font-size: 24px;
}

/* Stories */

.ig-feed-viewport {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.ig-feed-strip {
  height: 100%;
  display: flex;

  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.ig-feed-limiter {
  width: 100%;
  min-width: 100%;
  height: calc(var(--screenHeight) - 261px);
  flex: 0 0 100%;

  overflow-x: hidden;
  overflow-y: auto;

  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ig-feed-limiter::-webkit-scrollbar {
  display: none;
}

.ig-feed {
  width: 100%;
}

.ig-stories {
  height: 112px;
  min-height: 112px;
  padding: 9px 11px;
  background: #fff;
  box-shadow:
    0 -0.4px 0 rgba(60, 60, 67, 0.18),
    0 0.4px 0 rgba(60, 60, 67, 0.29);

  display: flex;
  align-items: center;
  gap: 14px;

  overflow-x: auto;
  overflow-y: hidden;
}

.ig-stories::-webkit-scrollbar {
  display: none;
}

.ig-story {
  width: 78px;
  flex: 0 0 auto;
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: center;

  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.ig-story-ring {
  position: relative;
  width: 71px;
  height: 71px;
  padding: 3px;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;

  transition:
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 220ms ease;
  will-change: transform;
}

.ig-story-avatar {
  position: relative;
  z-index: 1;

  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #fff;

  display: block;
  flex: 0 0 auto;

  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.ig-story.active {
  transform: translateY(-2px);
}

.ig-story.active .ig-story-ring {
  transform: scale(1.055);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.95),
    0 6px 14px rgba(193, 24, 136, 0.28);
}

.ig-story.active .ig-story-avatar {
  transform: scale(1.015);
}

.ig-story.active .ig-story-name {
  font-weight: 700;
  color: #111;
}

/* Tiny active dot */
.ig-story.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);

  width: 5px;
  height: 5px;
  border-radius: 50%;

  background: linear-gradient(135deg, #c90083, #e10038);
  box-shadow: 0 0 6px rgba(225, 0, 56, 0.45);
}

.ig-story,
.ig-story-ring,
.ig-story-avatar {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.ig-story:focus,
.ig-story:focus-visible,
.ig-story-ring:focus,
.ig-story-avatar:focus {
  outline: none;
}

.ig-story-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;

  background: conic-gradient(
    #f09433,
    #e6683c,
    #dc2743,
    #cc2366,
    #bc1888,
    #f09433
  );

  animation: none;
}

.ig-story-new {
  position: absolute;
  top: 58px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;

  padding: 2px 7px;
  border-radius: 4px;
  border: 2px solid #fff;

  color: #fff;
  background: linear-gradient(135deg, #c90083, #d22463, #e10038);

  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.ig-story-name {
  width: 100%;
  margin-top: 5px;

  text-align: center;
  font-size: 13px;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  transition: color 220ms ease;
}

/* Post */

.ig-post {
  width: 100%;
  margin-top: 13px;
  background: #fff;
}

.ig-post-header {
  height: 62px;
  padding: 12px 11px;

  display: flex;
  align-items: center;
  gap: 10px;

  box-shadow: 0 0.4px 0 rgba(60, 60, 67, 0.29);
}

.ig-post-avatar {
  width: 39px;
  height: 39px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.ig-post-user {
  flex: 1;
  min-width: 0;
}

.ig-post-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 19px;
}

.ig-post-username {
  font-size: 13px;
  line-height: 16px;
}

.ig-more-btn {
  font-size: 16px;
  letter-spacing: 1px;
}

/* Post image */

.ig-post-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #eee;
  overflow: hidden;
}

.ig-post-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ig-post-image-hidden {
  filter: blur(16px);
  pointer-events: none;
}

.ig-post-hidden-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(1px);
  background: rgba(0, 0, 0, 0.08);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

/* Image count */

/* Dots */

.ig-post-dots {
  height: 16px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;

  background: #fff;
}

.ig-post-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.15);
}

.ig-post-dots span.active {
  background: #3897f0;
}

/* Actions */

.ig-post-actions {
  padding: 8px 16px 16px;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ig-post-actions-left {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 28px;
}

.ig-post-actions button {
  font-size: 24px;
  line-height: 1;
}

/* Body */

.ig-post-body {
  padding: 0 16px 15px;
}

.ig-liked-by {
  display: flex;
  align-items: center;
  gap: 7px;

  font-size: 15px;
  line-height: 21px;
}

.ig-liked-by img {
  width: 20px;
  height: 20px;
  object-fit: cover;
  border-radius: 50%;
}

.ig-caption {
  margin-top: 7px;

  font-size: 15px;
  line-height: 21px;
}

.ig-date {
  margin-top: 12px;

  color: rgba(0, 0, 0, 0.4);
  font-size: 12px;
  letter-spacing: 0.06px;
}

.ig-post-swiper {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.ig-post-swiper .swiper-wrapper {
  align-items: center;
}

.ig-post-swiper .swiper-slide {
  width: 100%;
}

.ig-post-swiper .ig-post-image {
  width: 100%;
  display: block;
}

.ig-post-counter {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: white;
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
}

.ig-post-dots.swiper-pagination {
  position: static;
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 4px;
}

.ig-post-dots .swiper-pagination-bullet {
  width: 6px;
  height: 6px;
  opacity: 1;
  background: #c7c7c7;
}

.ig-post-dots .swiper-pagination-bullet-active {
  background: #0095f6;
}

.ig-heart-svg {
  transform-origin: center;
  overflow: visible;
}

.ig-heart-svg path,
.ig-heart-svg use {
  fill: transparent;
  stroke: #262626;
  stroke-width: 2;
  transition:
    fill 120ms ease,
    stroke 120ms ease;
}

.ig-heart-svg.liked path,
.ig-heart-svg.liked use {
  fill: #ff0000;
  stroke: #ff0000;
}

.ig-heart-svg.heart-pop {
  animation: igHeartPop 450ms ease-in-out;
}

@keyframes igHeartPop {
  0% {
    transform: scale(1);
    fill: transparent;
  }

  35% {
    transform: scale(1.28);
    fill: #ed4956;
  }

  60% {
    transform: scale(0.92);
  }

  100% {
    transform: scale(1);
    fill: #ed4956;
  }
}

.phone-call-screen {
  --phone-call-bg: #ffffff;
  --phone-call-text: #1f2a37;
  --phone-call-muted: #6b7280;
  --phone-call-subtle: #71717a;
  --phone-call-border: #e4e4e7;
  --phone-call-space: 17.64px;

  width: 100%;
  height: 100%;
  padding-top: 54px;
  padding-bottom: 98px;
  background: var(--phone-call-bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
}

.dialer-screen,
.active-call-screen {
  width: 100%;
  height: 100%;
  min-height: 0;
  background: var(--phone-call-bg);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.phone-dialer-header {
  padding: var(--phone-call-space);
  background: var(--phone-call-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.phone-dialer-title {
  padding: 5.01px 7.97px;
  color: #6b2300;
  font-size: 19.4px;
  font-weight: 400;
  word-wrap: break-word;
}

.phone-call-search-bar {
  width: 100%;
  padding: 13.23px var(--phone-call-space);
  background: var(--phone-call-bg);
  border-bottom: 1.1px solid var(--phone-call-border);
  display: flex;
  align-items: center;
  gap: 8.82px;
  box-sizing: border-box;
}

.phone-call-search-icon {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
}

.phone-call-search-placeholder {
  color: var(--phone-call-muted);
  font-size: 17.64px;
  font-weight: 500;
  line-height: 26.46px;
  word-wrap: break-word;
}

.phone-call-content {
  min-height: 0;
  overflow-y: auto;
  flex: 1;
  padding: 26.46px var(--phone-call-space) 0;
  background: var(--phone-call-bg);
  display: flex;
  justify-content: center;
  box-sizing: border-box;
}

.phone-call-panel {
  position: relative;
  width: 100%;
  height: 679.48px;
  background: var(--phone-call-bg);
  display: flex;
  flex-direction: column;
  gap: var(--phone-call-space);
}

.phone-call-tabs {
  width: 100%;
  display: flex;
  align-items: flex-start;
}

.phone-call-tab {
  width: 197.91px;
  height: 39.69px;
  padding: 8.82px var(--phone-call-space);
  background: var(--phone-call-bg);
  border-left: 1.1px solid var(--phone-call-border);
  color: #4b5563;
  font-size: 15.44px;
  font-weight: 500;
  line-height: 22.05px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.phone-call-tab:first-child {
  border-left: none;
}

.phone-call-tab-active {
  background: #eff6ff;
  color: #4253f0;
}

.phone-call-history {
  display: flex;
  flex-direction: column;
  gap: var(--phone-call-space);
}

.phone-call-section {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.phone-call-section-title {
  color: var(--phone-call-text);
  font-size: 15.44px;
  font-weight: 600;
  line-height: 22.05px;

  word-wrap: break-word;
}

.phone-call-row {
  width: 100%;
  padding: var(--phone-call-space) 0;
  border: none;
  border-bottom: 1.1px solid var(--phone-call-border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 11.03px;
  cursor: pointer;
  text-align: left;
}

.phone-call-row-callable {
  cursor: pointer;
}

.phone-call-row-callable.phone-call-row-notified {
  padding: 8.82px;
  border-bottom: none;
  border-radius: 8px;
  background: #fff7f7;
  box-shadow:
    inset 0 0 0 1.1px rgba(233, 0, 57, 0.14),
    0 6px 16px rgba(233, 0, 57, 0.08);
}

.phone-call-row-disabled {
  cursor: default;
  opacity: 0.48;
}

.phone-call-row:disabled {
  cursor: default;
}

.phone-call-row-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6.62px;
  flex: 1;
}

.phone-call-type-icon {
  width: 17.64px;
  height: 17.64px;
  flex: 0 0 auto;
}

.phone-call-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.phone-call-name-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.phone-call-info .phone-call-name {
  color: var(--phone-call-text);
  font-size: 15.44px;
  font-weight: 500;
  line-height: 22.05px;
  word-wrap: break-word;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-call-log-badge {
  max-width: 116px;
  min-height: 18px;
  padding: 2px 6px;
  border-radius: 6px;
  background: #e90039;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 1 auto;
}

.phone-call-row-notified .phone-call-type-icon,
.phone-call-row-notified .phone-call-name,
.phone-call-row-notified .phone-call-meta {
  color: #e90039;
}

.phone-call-meta {
  color: var(--phone-call-subtle);
  font-size: 13.23px;
  font-weight: 500;
  line-height: 17.64px;
  word-wrap: break-word;
}

.phone-call-time {
  color: #374151;
  font-size: 15.44px;
  font-weight: 400;
  line-height: 22.05px;
  text-align: right;
  white-space: nowrap;
  flex: 0 0 auto;
}

.phone-call-screen-content {
  flex: 1;
  padding: 26.46px var(--phone-call-space) 52.92px;
  background: var(--phone-call-bg);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  box-sizing: border-box;
}

.phone-call-status {
  display: flex;
  align-items: center;
  gap: 4.41px;
}

.phone-call-status-icon {
  width: 17.64px;
  height: 17.64px;
  flex: 0 0 auto;
}

.phone-call-status-text {
  color: var(--phone-call-muted);
  font-size: 13.23px;
  font-weight: 500;
  line-height: 17.64px;
  text-align: center;
}

.messages-screen.is-chat-rtl .chat-system-pill,
.messages-screen.is-chat-rtl .message-bubble,
.messages-screen.is-chat-rtl .message-bubble > span,
.messages-screen.is-chat-rtl .message-text,
.messages-screen.is-chat-rtl .message-text *,
.messages-screen.is-chat-rtl .attachment-caption,
.messages-screen.is-chat-rtl .attachment-caption *,
.messages-screen.is-chat-rtl .quoted-message-copy,
.messages-screen.is-chat-rtl .quoted-message-author,
.messages-screen.is-chat-rtl .quoted-message-text,
.messages-screen.is-chat-rtl .quoted-reply-text,
.messages-screen.is-chat-rtl .quoted-reply-text *,
.messages-screen.is-chat-rtl .deleted-message-text,
.messages-screen.is-chat-rtl .link-preview-title,
.messages-screen.is-chat-rtl .link-preview-description,
.messages-screen.is-chat-rtl .call-log-copy,
.messages-screen.is-chat-rtl .call-log-title,
.messages-screen.is-chat-rtl .call-log-subtitle,
.messages-screen.is-chat-rtl .chat-choice-line,
.messages-screen.is-chat-rtl .chat-choice-text,
.messages-screen.is-chat-rtl .chat-choice-text *,
.messages-screen.is-chat-rtl .classic-system-pill,
.messages-screen.is-chat-rtl .classic-message-bubble,
.messages-screen.is-chat-rtl .classic-message-text,
.messages-screen.is-chat-rtl .classic-message-text *,
.messages-screen.is-chat-rtl .classic-quote-preview,
.messages-screen.is-chat-rtl .classic-quote-author,
.messages-screen.is-chat-rtl .classic-quote-text,
.messages-screen.is-chat-rtl .classic-link-title,
.messages-screen.is-chat-rtl .classic-call-title,
.messages-screen.is-chat-rtl .classic-choice-line,
.messages-screen.is-chat-rtl .classic-choice-text,
.messages-screen.is-chat-rtl .classic-choice-text * {
  direction: rtl !important;
  text-align: start;
  unicode-bidi: plaintext;
}

.messages-screen.is-chat-rtl .chat-choice-line,
.messages-screen.is-chat-rtl .classic-choice-line {
  flex-direction: row;
}

.messages-screen.is-chat-rtl .quote-message-bubble,
.messages-screen.is-chat-rtl .classic-quote-message {
  align-items: stretch;
}

.messages-screen.is-chat-rtl .quoted-message-preview {
  flex-direction: row-reverse;
}

.messages-screen.is-chat-rtl .classic-quote-preview {
  border-right: 3px solid var(--classic-accent);
  border-left: 0;
}

.messages-screen.is-chat-rtl .message-tail,
.messages-screen.is-chat-rtl .chat-svg,
.messages-screen.is-chat-rtl .voice-message,
.messages-screen.is-chat-rtl .voice-message *,
.messages-screen.is-chat-rtl .link-preview-url,
.messages-screen.is-chat-rtl .link-preview-domain,
.messages-screen.is-chat-rtl .file-pill,
.messages-screen.is-chat-rtl .file-meta,
.messages-screen.is-chat-rtl .classic-message-meta,
.messages-screen.is-chat-rtl .classic-voice-message,
.messages-screen.is-chat-rtl .classic-voice-message *,
.messages-screen.is-chat-rtl .classic-link-domain,
.messages-screen.is-chat-rtl .classic-file-pill,
.messages-screen.is-chat-rtl .classic-file-name {
  direction: ltr !important;
  text-align: left;
  unicode-bidi: isolate;
}

.phone-call-status-attempting {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}

.phone-call-status-dots {
  width: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
}

.phone-call-status-dots span {
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.28;
  transform: translateY(0);
  animation: phone-call-dot 1.2s ease-in-out infinite;
}

.phone-call-status-dots span:nth-child(2) {
  animation-delay: 0.16s;
}

.phone-call-status-dots span:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes phone-call-dot {
  0%,
  70%,
  100% {
    opacity: 0.28;
    transform: translateY(0);
  }

  30% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.phone-call-main {
  flex: 1;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 90.41px;
}

.phone-call-profile {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26.46px;
}

.phone-call-avatar {
  width: 92.62px;
  height: 92.62px;
  border-radius: 999px;
  outline: 3.86px solid #dbeafe;
  object-fit: cover;
}

.phone-call-profile .phone-call-name {
  align-self: stretch;
  color: var(--phone-call-text);
  font-size: 26.46px;
  font-weight: 600;
  line-height: 35.28px;
  text-align: center;
  word-wrap: break-word;
}

.phone-call-actions {
  width: 264.62px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.phone-call-action {
  border: none;
  background: transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8.82px;
  cursor: pointer;
}

.phone-call-action-button {
  width: 61.74px;
  height: 61.74px;
  padding: 11.03px;
  background: #f9fafb;
  border-radius: 68.36px;
  outline: 1.1px solid #e5e7eb;
  outline-offset: -1.1px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.phone-call-action-icon {
  width: 26.46px;
  height: 26.46px;
}

.phone-call-action-label {
  color: #374151;
  font-size: 15.44px;
  font-weight: 400;
  text-align: center;
}

.phone-call-end-button {
  width: 70.56px;
  height: 70.56px;
  padding: 12.6px;
  border: none;
  border-radius: 78.12px;
  background: #ef4444;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-sizing: border-box;
}

.phone-call-end-icon {
  width: 36px;
  height: 16px;
}

@media (max-width: 430px), (max-height: 520px) {
  .phone-stage {
    width: 100%;
    height: 100%;
    padding: var(--safe-area-top) var(--safe-area-right) var(--safe-area-bottom)
      var(--safe-area-left);
    box-sizing: border-box;
  }

  .phone-shell,
  .phone-shell.classic-phone-shell {
    width: 100%;
    max-width: none;
    height: 100%;
    transform: none;
  }

  .phone-container,
  .phone-container.classic-phone-locked {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
  }

  .phone-bezel {
    display: none;
  }

  .gallery-screen,
  .image-grid {
    width: 100%;
  }

  .image-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .image-grid img,
  .folio-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .chat-avatar-focus {
    padding: max(14px, var(--safe-area-top)) max(14px, var(--safe-area-right))
      max(14px, var(--safe-area-bottom)) max(14px, var(--safe-area-left));
  }

  .chat-avatar-focus-close,
  .phone-call-end-button,
  .phone-call-action-button,
  .phone-nav-item,
  .ig-icon-btn {
    min-width: 44px;
    min-height: 44px;
  }

  .phone-call-main {
    min-height: 0;
  }
}

/* Modern phone system refactor -------------------------------------------------
   System chrome, app shells, phone app, and social app share tokenized surfaces.
   Legacy bottom-nav, tab-bar, transition-layer, floating-call, and prototype app
   selectors were removed above after grep verification. */
.phone-container {
  --phone-screen-w: 430px;
  --phone-screen-h: 932px;
  --phone-radius: 56px;
  --phone-status-h: 54px;
  --phone-system-dock-h: 62px;
  --phone-home-indicator-h: 39px;
  --phone-safe-top: var(--phone-status-h);
  --phone-safe-bottom: calc(
    var(--phone-system-dock-h) + var(--phone-home-indicator-h)
  );
  --phone-app-pad-x: 18px;
  --phone-blue: #0a84ff;
  --phone-red: #ff3b30;
  --phone-green: #34c759;
  --phone-label: #111111;
  --phone-secondary-label: rgba(60, 60, 67, 0.62);
  --phone-tertiary-label: rgba(60, 60, 67, 0.34);
  --phone-separator: rgba(60, 60, 67, 0.16);
  --phone-glass-light: rgba(255, 255, 255, 0.74);
  --phone-glass-dark: rgba(18, 18, 22, 0.72);
  --phone-shadow-floating: 0 18px 50px rgba(0, 0, 0, 0.22);
  --phone-z-app: 1;
  --phone-z-chrome: 40;
  --phone-z-float: 45;
}

.phone-app-screen,
.map-screen-container,
.gallery-screen,
.ig-page,
.phone-social-app,
.messages-screen,
.phone-call-screen,
.phone-calls-app {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  box-sizing: border-box;
  contain: layout paint;
}

.phone-chrome-status.status-bar {
  --status-color: #fff;
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--phone-status-h);
  z-index: var(--phone-z-chrome);
  display: block;
  overflow: visible;
  pointer-events: none;
  color: var(--status-color);
}

.phone-chrome-status.status-black,
.phone-chrome-status--black {
  --status-color: #070707;
}

.phone-chrome-status.status-white,
.phone-chrome-status--white {
  --status-color: #ffffff;
}

.phone-chrome-status--app-phone {
  --status-color: #111827;
}

.phone-chrome-status--app-insta,
.phone-chrome-status--app-map {
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.22);
}

.phone-chrome-status-scrim.status-blur {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0));
  opacity: 0.55;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.phone-chrome-status--black .phone-chrome-status-scrim,
.phone-chrome-status--app-phone .phone-chrome-status-scrim,
.phone-chrome-status--app-messages .phone-chrome-status-scrim {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.58),
    rgba(255, 255, 255, 0)
  );
  opacity: 0.72;
}

.phone-chrome-status-content.status-content {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding-inline: 19px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  justify-content: stretch;
  box-sizing: border-box;
}

.phone-chrome-status-side.status-side {
  min-width: 0;
  display: flex;
  align-items: center;
}

.phone-chrome-status-side.status-side:first-child {
  justify-content: flex-start;
}

.phone-chrome-status-side.status-side:last-child {
  justify-content: flex-end;
}

.phone-chrome-status-time.status-time {
  color: var(--status-color);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.25px;
  line-height: 22px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
  text-wrap: nowrap;
}

.phone-chrome-status-icons.status-icons {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  color: var(--status-color);
}

@media (min-width: 431px) and (min-height: 521px) {
  .phone-shell--bezel-visible .phone-chrome-status-content.status-content {
    padding-inline: 32px;
  }

  .phone-shell--bezel-visible .phone-chrome-status-side.status-side {
    position: relative;
    z-index: 1;
    overflow: hidden;
    transform: translateY(2px);
    transition:
      opacity 160ms ease,
      transform 180ms ease;
  }

  .phone-shell--bezel-visible .phone-chrome-status-icons.status-icons {
    min-width: max-content;
  }

  .phone-shell--bezel-visible
    .phone-chrome-status--island-wide
    .phone-chrome-status-side.status-side {
    opacity: 0;
  }
}


/* Modern phone island ------------------------------------------------------ */
.phone-island.phone-dynamic-island.dynamic-island {
  --island-w: 126px;
  --island-h: 37px;
  --island-radius: 999px;
  --island-scale: 1;
  --island-drag-y: 0px;
  --island-drag-opacity: 1;
  --island-accent: #8e8e93;
  --island-bg: #050507;
  --island-bg-soft: linear-gradient(180deg, #111116 0%, #050507 100%);
  --island-ease-out: cubic-bezier(0.19, 1, 0.22, 1);
  --island-ease-in: cubic-bezier(0.55, 0.06, 0.68, 0.19);
  --island-ease-spring: cubic-bezier(0.16, 1.12, 0.28, 1);
  --island-duration-fast: 140ms;
  --island-duration-med: 260ms;
  --island-duration-long: 420ms;
  position: relative;
  z-index: 3;
  width: var(--island-w);
  min-width: var(--island-w);
  height: var(--island-h);
  min-height: var(--island-h);
  padding: 0;
  border: 0;
  border-radius: var(--island-radius);
  background: var(--island-bg-soft);
  color: #fff;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.1),
    0 10px 28px rgba(0, 0, 0, 0.28);
  display: block;
  overflow: hidden;
  pointer-events: none;
  opacity: var(--island-drag-opacity);
  transform:
    translate3d(0, var(--island-drag-y), 0)
    scale(var(--island-scale));
  transform-origin: center top;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  cursor: default;
  contain: layout paint style;
  transition:
    width var(--island-duration-med) var(--island-ease-spring),
    min-width var(--island-duration-med) var(--island-ease-spring),
    height var(--island-duration-med) var(--island-ease-spring),
    min-height var(--island-duration-med) var(--island-ease-spring),
    border-radius var(--island-duration-med) var(--island-ease-spring),
    transform var(--island-duration-fast) var(--island-ease-out),
    opacity var(--island-duration-fast) ease,
    box-shadow var(--island-duration-med) ease,
    background var(--island-duration-med) ease;
}

.phone-island.phone-dynamic-island.dynamic-island:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.84);
  outline-offset: 3px;
}

.phone-island--active.phone-dynamic-island.dynamic-island {
  pointer-events: auto;
  cursor: pointer;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.12),
    0 0 0 1px color-mix(in srgb, var(--island-accent) 36%, transparent),
    0 16px 34px rgba(0, 0, 0, 0.34);
}

.phone-island--pulse.phone-dynamic-island.dynamic-island {
  --island-w: 134px;
  --island-h: 39px;
  --island-scale: 0.985;
  animation: phone-island-pulse 360ms var(--island-ease-out) both;
}

.phone-island--minimal.phone-dynamic-island.dynamic-island {
  --island-w: 56px;
  --island-h: 37px;
}

.phone-island--compact.phone-dynamic-island.dynamic-island {
  --island-w: 212px;
  --island-h: 42px;
}

.phone-island--capsule.phone-dynamic-island.dynamic-island {
  --island-w: 286px;
  --island-h: 52px;
}

.phone-island--reply.phone-dynamic-island.dynamic-island {
  --island-w: min(342px, calc(var(--phone-screen-w, 430px) - 52px));
  --island-h: 62px;
  --island-radius: 31px;
}

.phone-island--card.phone-dynamic-island.dynamic-island {
  --island-w: 360px;
  --island-h: 88px;
  --island-radius: 30px;
}

.phone-island--expanded.phone-dynamic-island.dynamic-island {
  --island-w: min(392px, calc(var(--phone-screen-w, 430px) - 38px));
  --island-h: var(--island-expanded-h, 176px);
  --island-radius: 34px;
  cursor: default;
}

.phone-island--call.phone-dynamic-island.dynamic-island {
  --island-w: 218px;
  --island-h: 42px;
}

.phone-island--active-call.phone-dynamic-island.dynamic-island {
  --island-w: 258px;
  --island-h: 52px;
}

.phone-island--dragging.phone-dynamic-island.dynamic-island {
  transition:
    width var(--island-duration-med) var(--island-ease-spring),
    min-width var(--island-duration-med) var(--island-ease-spring),
    height var(--island-duration-med) var(--island-ease-spring),
    min-height var(--island-duration-med) var(--island-ease-spring),
    border-radius var(--island-duration-med) var(--island-ease-spring),
    box-shadow var(--island-duration-med) ease,
    background var(--island-duration-med) ease;
  --island-scale: 0.96;
}

.phone-island--dismissing.phone-dynamic-island.dynamic-island {
  --island-scale: 0.9;
  pointer-events: none;
}

.phone-island--settling.phone-dynamic-island.dynamic-island {
  --island-w: 126px;
  --island-h: 37px;
  --island-radius: 999px;
  pointer-events: none;
}

.phone-island-camera {
  position: absolute;
  inset: 5px 44px auto 44px;
  height: 6px;
  border-radius: 999px;
  background: radial-gradient(circle at 36% 50%, rgba(255, 255, 255, 0.18), transparent 36%), rgba(0, 0, 0, 0.42);
  opacity: 0.42;
  pointer-events: none;
}

.phone-island--active .phone-island-camera,
.phone-island--expanded .phone-island-camera {
  opacity: 0;
}

.phone-island-view {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  transform: translate3d(0, 2px, 0) scale(0.98);
  transition:
    opacity 120ms ease,
    transform 180ms var(--island-ease-out);
  pointer-events: none;
}

.phone-island-view.is-active {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  pointer-events: auto;
}

.phone-island-view--notification,
.phone-island-view--call {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  padding: 6px 11px;
  box-sizing: border-box;
}

.phone-island--compact .phone-island-view--notification,
.phone-island--call .phone-island-view--call {
  gap: 8px;
  padding-inline: 10px;
}

.phone-island--card .phone-island-view--notification {
  align-items: start;
  padding: 12px 14px;
}

.phone-island--reply .phone-island-view--notification {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 10px 15px 10px 13px;
}

.phone-island-leading {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--island-accent) 34%, rgba(255, 255, 255, 0.08));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  flex: 0 0 auto;
}

.phone-island--compact .phone-island-leading,
.phone-island--call .phone-island-leading {
  width: 28px;
  height: 28px;
}

.phone-island--reply .phone-island-leading {
  width: 38px;
  height: 38px;
  background: color-mix(in srgb, var(--island-accent) 28%, rgba(255, 255, 255, 0.1));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.28),
    0 0 0 3px color-mix(in srgb, var(--island-accent) 22%, transparent),
    inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.phone-island-avatar {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.phone-island--reply .phone-island-avatar {
  object-position: center 38%;
}

.phone-island-icon {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.phone-island-icon::before {
  content: "•";
}

.phone-island-icon[data-icon="message"]::before { content: "✉"; }
.phone-island-icon[data-icon="task"]::before { content: "✓"; }
.phone-island-icon[data-icon="heart"]::before { content: "♥"; }
.phone-island-icon[data-icon="map"]::before { content: "⌖"; }
.phone-island-icon[data-icon="phone"]::before { content: "☎"; }
.phone-island-icon[data-icon="social"]::before { content: "◎"; }
.phone-island-icon[data-icon="calendar"]::before { content: "□"; }
.phone-island-icon[data-icon="app"]::before { content: "▣"; }

.phone-island-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 1px;
  text-align: start;
}

.phone-island--reply .phone-island-copy {
  gap: 2px;
}

.phone-island-title,
.phone-island-subtitle {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-island-title {
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  line-height: 15px;
  letter-spacing: -0.08px;
}

.phone-island-subtitle {
  color: rgba(255, 255, 255, 0.66);
  font-size: 11px;
  font-weight: 650;
  line-height: 14px;
  letter-spacing: -0.05px;
}

.phone-island--compact .phone-island-subtitle,
.phone-island--call .phone-island-subtitle {
  display: none;
}

.phone-island--card .phone-island-title {
  font-size: 13px;
  line-height: 17px;
}

.phone-island--reply .phone-island-title {
  font-size: 13px;
  font-weight: 850;
  line-height: 17px;
  letter-spacing: 0;
}

.phone-island--card .phone-island-subtitle {
  display: block;
  max-height: 34px;
  white-space: normal;
  line-height: 16px;
}

.phone-island--reply .phone-island-subtitle {
  display: block;
  color: rgba(255, 255, 255, 0.76);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 15px;
  letter-spacing: 0;
}

.phone-island-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--island-accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
}

.phone-island--reply .phone-island-count {
  align-self: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  box-shadow:
    0 0 0 2px rgba(5, 5, 7, 0.92),
    0 5px 12px color-mix(in srgb, var(--island-accent) 42%, transparent);
}

.phone-island-view--call .phone-island-copy {
  gap: 0;
}

.phone-island-call-status {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
}

.phone-island-call-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--phone-green, #34c759);
  box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.18);
  animation: phone-island-call-dot 1.25s ease-in-out infinite;
}

.phone-island-view--expanded {
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 16px;
  box-sizing: border-box;
}

.phone-island-expanded-head {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding-inline-end: 32px;
}

.phone-island-expanded-body {
  min-height: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 620;
  line-height: 17px;
  letter-spacing: -0.06px;
  overflow: hidden;
  text-align: start;
  white-space: pre-line;
}

.phone-island-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.phone-island-action,
.phone-island-close {
  border: 0;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.phone-island-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.88);
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
}

.phone-island-action {
  min-height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 780;
  letter-spacing: -0.05px;
}

.phone-island-action--primary {
  background: var(--island-accent);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.26);
}

.phone-island-action--secondary {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.84);
}

.phone-island-action:active,
.phone-island-close:active {
  transform: scale(0.96);
}

@keyframes phone-island-pulse {
  0% { transform: translate3d(0, 0, 0) scale(0.96); }
  48% { transform: translate3d(0, 0, 0) scale(1.025); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes phone-island-call-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.72); opacity: 0.58; }
}

.phone-system-bottom.phone-nav-wrap {
  --phone-nav-surface: rgba(10, 10, 12, 0.76);
  --phone-indicator-color: rgba(255, 255, 255, 0.92);
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--phone-z-chrome);
  width: 100%;
  height: calc(var(--phone-system-dock-h) + var(--phone-home-indicator-h));
  display: grid;
  grid-template-rows: var(--phone-system-dock-h) var(--phone-home-indicator-h);
  background: transparent;
  overflow: visible;
  pointer-events: none;
  transform: translateZ(0);
}

.phone-system-bottom--chat.phone-nav-wrap,
.phone-system-bottom.chat-nav-version {
  --phone-nav-surface: rgba(255, 255, 255, 0.76);
  --phone-indicator-color: rgba(0, 0, 0, 0.86);
}

.phone-system-bottom--appOwned,
.phone-system-bottom--indicatorOnly,
.phone-system-bottom.system-indicator-only,
.phone-system-bottom.chat-thread-indicator,
.phone-system-bottom.phone-nav-call-attempt {
  --phone-nav-surface: transparent;
  background: transparent;
}

.phone-system-dock.phone-nav {
  justify-self: center;
  align-self: end;
  width: min(338px, calc(100% - 34px));
  min-width: 0;
  height: 58px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  background: var(--phone-nav-surface);
  backdrop-filter: blur(26px) saturate(1.28);
  -webkit-backdrop-filter: blur(26px) saturate(1.28);
  box-shadow: var(--phone-shadow-floating);
  display: flex;
  align-items: center;
  pointer-events: auto;
  transition:
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 220ms ease,
    filter 220ms ease;
}

.phone-system-bottom--chat .phone-system-dock.phone-nav,
.phone-system-bottom.chat-nav-version .phone-system-dock.phone-nav {
  border-color: rgba(60, 60, 67, 0.14);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.13);
}

.phone-system-dock.hidden-phone-nav,
.phone-system-bottom--appOwned .phone-system-dock,
.phone-system-bottom--indicatorOnly .phone-system-dock,
.phone-system-bottom.phone-nav-call-attempt .phone-system-dock {
  transform: translateY(76px) scale(0.98);
  opacity: 0;
  filter: blur(5px);
  pointer-events: none;
}

.phone-nav-inner {
  flex: 1;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  justify-content: stretch;
  padding: 0;
}

.phone-nav-item {
  min-width: 0;
  height: 50px;
  padding: 0 6px;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
}

.phone-system-bottom--chat .phone-nav-item,
.phone-system-bottom.chat-nav-version .phone-nav-item {
  color: rgba(60, 60, 67, 0.78);
}

.phone-nav-item:active {
  transform: scale(0.97);
}

.phone-nav-icon {
  width: 22px;
  height: 22px;
}

.nav-label {
  max-width: 92px;
  overflow: hidden;
  font-size: 10px;
  font-weight: 700;
  line-height: 12px;
  letter-spacing: -0.05px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.phone-home-indicator-wrap.home-indicator-wrap {
  width: 100%;
  height: var(--phone-home-indicator-h);
  padding: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.phone-home-indicator.home-indicator {
  position: static !important;
  left: auto;
  bottom: auto;
  transform: none;
  width: 154px;
  height: 5px;
  border-radius: 999px;
  background: var(--phone-indicator-color);
  opacity: 0.95;
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.18);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Phone / calls app */
.phone-calls-app.phone-call-screen {
  --phone-call-bg: #f6f7fb;
  --phone-call-card: #ffffff;
  --phone-call-text: #111827;
  --phone-call-muted: #6b7280;
  --phone-call-subtle: #71717a;
  --phone-call-border: rgba(17, 24, 39, 0.1);
  --phone-call-green: #22c55e;
  --phone-call-red: #ef4444;
  --phone-call-space: 18px;
  padding-top: var(--phone-status-h);
  padding-bottom: var(--phone-safe-bottom);
  background:
    radial-gradient(circle at 20% 0%, rgba(10, 132, 255, 0.1), transparent 34%),
    var(--phone-call-bg);
}

.phone-calls-recents-screen.dialer-screen,
.phone-calls-active-screen.active-call-screen {
  background: transparent;
}

.phone-dialer-header {
  padding: 18px var(--phone-app-pad-x) 10px;
  background: transparent;
}

.phone-calls-title.phone-dialer-title {
  padding: 0;
  color: var(--phone-call-text);
  font-size: 32px;
  font-weight: 780;
  line-height: 38px;
  letter-spacing: -0.7px;
}

.phone-calls-search.phone-call-search-bar {
  width: auto;
  min-height: 44px;
  margin: 0 var(--phone-app-pad-x);
  padding: 0 14px;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 0 0 1px var(--phone-call-border);
  gap: 9px;
}

.phone-call-search-icon {
  width: 19px;
  height: 19px;
  opacity: 0.55;
}

.phone-call-search-placeholder {
  color: var(--phone-call-muted);
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
}

.phone-call-content {
  padding: 18px var(--phone-app-pad-x) 0;
  background: transparent;
  justify-content: stretch;
}

.phone-call-panel {
  height: auto;
  min-height: 0;
  gap: 16px;
  background: transparent;
}

.phone-calls-tabs.phone-call-tabs {
  min-height: 42px;
  padding: 4px;
  border-radius: 18px;
  background: rgba(118, 118, 128, 0.12);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
}

.phone-calls-tab.phone-call-tab {
  width: auto;
  height: 34px;
  padding: 0 8px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--phone-call-muted);
  font-size: 13px;
  font-weight: 720;
  line-height: 16px;
  cursor: pointer;
}

.phone-calls-tab.phone-call-tab-active {
  background: #ffffff;
  color: var(--phone-blue);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

.phone-calls-history.phone-call-history {
  gap: 18px;
  padding-bottom: 14px;
}

.phone-call-section {
  overflow: hidden;
  border-radius: 22px;
  background: var(--phone-call-card);
  box-shadow:
    inset 0 0 0 1px rgba(17, 24, 39, 0.06),
    0 8px 24px rgba(17, 24, 39, 0.06);
}

.phone-call-section-title {
  padding: 13px 16px 7px;
  color: var(--phone-call-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.phone-call-row {
  min-height: 62px;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  gap: 12px;
}

.phone-call-row:last-child {
  border-bottom: 0;
}

.phone-call-row-callable.phone-call-row-notified {
  margin: 8px;
  padding: 11px 12px;
  border-radius: 17px;
  border-bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 59, 48, 0.11),
    rgba(255, 149, 0, 0.08)
  );
  box-shadow: inset 0 0 0 1px rgba(255, 59, 48, 0.18);
}

.phone-call-row-main {
  gap: 10px;
}

.phone-call-type-icon {
  width: 18px;
  height: 18px;
}

.phone-call-info .phone-call-name {
  font-size: 16px;
  font-weight: 680;
  line-height: 21px;
}

.phone-call-meta,
.phone-call-time {
  font-size: 13px;
  line-height: 17px;
}

.phone-call-log-badge {
  max-width: 128px;
  min-height: 20px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--phone-call-red);
  font-size: 11px;
  line-height: 14px;
}

.phone-calls-keypad,
.phone-calls-recordings-empty {
  border-radius: 26px;
  background: var(--phone-call-card);
  box-shadow:
    inset 0 0 0 1px rgba(17, 24, 39, 0.06),
    0 8px 24px rgba(17, 24, 39, 0.06);
}

.phone-calls-keypad {
  padding: 18px 18px 16px;
}

.phone-calls-number-display {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--phone-call-text);
  font-size: 26px;
  font-weight: 650;
  line-height: 32px;
  letter-spacing: -0.2px;
  text-align: center;
  word-break: break-all;
}

.phone-calls-keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 18px;
  margin-top: 8px;
}

.phone-calls-key {
  width: 74px;
  height: 58px;
  justify-self: center;
  border: 0;
  border-radius: 26px;
  background: rgba(118, 118, 128, 0.13);
  color: var(--phone-call-text);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.phone-calls-key span {
  font-size: 27px;
  font-weight: 560;
  line-height: 28px;
}

.phone-calls-key small {
  min-height: 11px;
  color: var(--phone-call-muted);
  font-size: 9px;
  font-weight: 800;
  line-height: 11px;
  letter-spacing: 0.08em;
}

.phone-calls-keypad-actions {
  min-height: 62px;
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.phone-calls-clear {
  border: 0;
  background: transparent;
  color: var(--phone-blue);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.phone-calls-dial-button {
  width: 62px;
  height: 62px;
  border: 0;
  border-radius: 999px;
  background: var(--phone-call-green);
  color: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: 0 16px 28px rgba(34, 197, 94, 0.28);
  cursor: pointer;
}

.phone-calls-dial-button:disabled {
  opacity: 0.38;
  cursor: default;
  box-shadow: none;
}

.phone-calls-dial-button svg {
  width: 31px;
  height: 14px;
  color: #ffffff;
}

.phone-calls-recordings-empty {
  min-height: 318px;
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-align: center;
}

.phone-calls-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 20px;
  background: rgba(10, 132, 255, 0.12);
  color: var(--phone-blue);
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 800;
}

.phone-calls-empty-title {
  color: var(--phone-call-text);
  font-size: 18px;
  font-weight: 780;
}

.phone-calls-empty-text {
  max-width: 260px;
  color: var(--phone-call-muted);
  font-size: 14px;
  line-height: 20px;
}

.phone-calls-active-content.phone-call-screen-content {
  padding: 24px var(--phone-app-pad-x)
    calc(var(--phone-home-indicator-h) + 22px);
  background:
    radial-gradient(
      circle at 50% 10%,
      rgba(10, 132, 255, 0.14),
      transparent 36%
    ),
    #f7f8fb;
}

.phone-calls-active-profile.phone-call-profile {
  gap: 24px;
}

.phone-call-avatar {
  width: 108px;
  height: 108px;
  outline: 5px solid rgba(10, 132, 255, 0.12);
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.15);
}

.phone-call-profile .phone-call-name {
  color: var(--phone-call-text);
  font-size: 30px;
  font-weight: 760;
  line-height: 36px;
  letter-spacing: -0.6px;
}

.phone-calls-active-actions.phone-call-actions {
  width: min(288px, 100%);
}

.phone-call-action-button {
  width: 64px;
  height: 64px;
  padding: 13px;
  border-radius: 999px;
  background: #ffffff;
  outline: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.08);
}

.phone-call-end-button,
.phone-calls-end-button {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: var(--phone-call-red);
  box-shadow: 0 18px 30px rgba(239, 68, 68, 0.28);
}

/* Fictional social app */
.phone-social-app.ig-page {
  --social-bg: #f7f7f9;
  --social-card: #ffffff;
  --social-text: #111111;
  --social-muted: rgba(0, 0, 0, 0.56);
  --social-accent: #ff2d55;
  background: var(--social-bg);
  color: var(--social-text);
  padding-bottom: calc(72px + var(--phone-home-indicator-h));
  overflow: hidden;
}

.phone-social-top-area.ig-top-area {
  position: relative;
  z-index: 2;
  background: linear-gradient(
    180deg,
    rgba(247, 247, 249, 0.96),
    rgba(247, 247, 249, 0.86)
  );
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  border-bottom: 1px solid rgba(60, 60, 67, 0.12);
}

.phone-social-header-wrap.ig-topbar-padding {
  padding: calc(var(--phone-status-h) + 6px) 14px 11px;
  margin: 0;
  background: transparent;
}

.phone-social-header.ig-topbar {
  min-height: 42px;
  padding: 0;
  background: transparent;
}

.phone-social-logo.ig-logo {
  filter: saturate(0.82) contrast(1.08);
}

.phone-social-icon-btn.ig-icon-btn,
.phone-social-header-actions .ig-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 0 0 1px rgba(60, 60, 67, 0.12);
}

.phone-social-header-actions.ig-top-actions {
  gap: 9px;
}

.phone-social-stories.ig-stories {
  height: 104px;
  min-height: 104px;
  padding: 8px 14px 12px;
  background: transparent;
  box-shadow: none;
  gap: 12px;
}

.phone-social-story.ig-story {
  width: 74px;
  will-change: auto;
}

.phone-social-story-ring.ig-story-ring {
  width: 68px;
  height: 68px;
  padding: 3px;
  will-change: auto;
}

.phone-social-story-ring.ig-story-ring::before {
  background: conic-gradient(#f09433, #dc2743, #bc1888, #f09433);
  animation: none;
}

.phone-social-story-avatar.ig-story-avatar {
  width: 61px;
  height: 61px;
  will-change: auto;
}

.phone-social-story-new.ig-story-new {
  z-index: 2;
  top: 55px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.phone-social-feed-viewport.ig-feed-viewport {
  position: absolute;
  inset: 206px 0 calc(72px + var(--phone-home-indicator-h)) 0;
  overflow: hidden;
}

.phone-social-feed-strip.ig-feed-strip {
  width: 100%;
  height: 100%;
  display: block;
  transform: none !important;
  transition: none;
  will-change: auto;
}

.phone-social-feed-limiter.ig-feed-limiter {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 10px 10px 18px;
  box-sizing: border-box;
}

.phone-social-feed.ig-feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.phone-social-post.ig-post {
  margin: 0;
  overflow: hidden;
  border-radius: 26px;
  background: var(--social-card);
  box-shadow:
    inset 0 0 0 1px rgba(60, 60, 67, 0.1),
    0 12px 30px rgba(17, 24, 39, 0.08);
  content-visibility: auto;
  contain-intrinsic-size: auto 640px;
}

.phone-social-post-header.ig-post-header {
  height: 64px;
  padding: 12px 14px;
  box-shadow: none;
}

.phone-social-post-avatar.ig-post-avatar {
  width: 42px;
  height: 42px;
}

.phone-social-post-name.ig-post-name {
  font-size: 15px;
  font-weight: 760;
}

.phone-social-post-username.ig-post-username,
.phone-social-date.ig-date {
  color: var(--social-muted);
}

.phone-social-more-btn.ig-more-btn {
  width: 38px;
  height: 38px;
  border-radius: 14px;
}

.phone-social-media.ig-post-image-wrap {
  background: #ececf1;
}

.phone-social-post-image.ig-post-image {
  background-size: cover;
  background-position: center;
}

.phone-social-hidden-overlay.ig-post-hidden-overlay {
  background: rgba(17, 24, 39, 0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.phone-social-post-actions.ig-post-actions {
  padding: 10px 14px 12px;
}

.phone-social-post-actions-left.ig-post-actions-left {
  gap: 10px;
}

.phone-social-action-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.phone-social-action-button:active {
  transform: scale(0.95);
}

.phone-social-post-body.ig-post-body {
  padding: 0 14px 16px;
}

.phone-social-liked-by.ig-liked-by,
.phone-social-caption.ig-caption {
  font-size: 14px;
  line-height: 20px;
}

.phone-social-tabbar {
  position: absolute;
  z-index: 3;
  inset-inline: 12px;
  bottom: var(--phone-home-indicator-h);
  height: 58px;
  padding: 4px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(24px) saturate(1.24);
  -webkit-backdrop-filter: blur(24px) saturate(1.24);
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.16);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  gap: 4px;
}

.phone-social-tab {
  min-width: 0;
  height: 50px;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: rgba(0, 0, 0, 0.58);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.phone-social-tab.is-active {
  color: var(--social-accent);
  background: rgba(255, 45, 85, 0.1);
}

.phone-social-tab svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.phone-social-tab img {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 0 0 2px currentColor;
}

.phone-social-create-plus {
  position: relative;
  width: 22px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 8px;
}

.phone-social-create-plus::before,
.phone-social-create-plus::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 11px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.phone-social-create-plus::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

@media (prefers-reduced-motion: reduce) {
  .phone-island.phone-dynamic-island.dynamic-island,
  .phone-island-view,
  .phone-system-dock.phone-nav,
  .phone-nav-item,
  .phone-social-action-button,
  .ig-heart-svg.heart-pop,
  .phone-call-status-dots span {
    animation: none !important;
    transition-duration: 1ms !important;
  }

  .phone-island.phone-dynamic-island.dynamic-island {
    transform: none !important;
  }

  .phone-island-view {
    transform: none !important;
  }
}

@media (max-width: 430px), (max-height: 520px) {
  .phone-social-feed-viewport.ig-feed-viewport {
    inset-top: 196px;
  }

  .phone-calls-key {
    width: min(74px, 24vw);
  }
}
