:root {
  --ink: #08090b;
  --muted: rgba(8, 9, 11, 0.58);
  --soft: #f4f4f5;
  --line: rgba(8, 9, 11, 0.08);
  --blue: #1887ff;
  --keyboard-inset: 0px;
  --screen-bg: #f8f8f8;
  --status-ink: rgba(8, 9, 11, 0.76);
  --facetime-stroke: #08090b;
  --facetime-border: rgba(8, 9, 11, 0.18);
  --message-header-surface:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.46) 54%, rgba(255, 255, 255, 0) 84%),
    linear-gradient(180deg, rgba(248, 248, 248, 0.76), rgba(248, 248, 248, 0.42) 68%, rgba(248, 248, 248, 0));
  --ios-radius-phone-shell: 58px;
  --ios-radius-screen: 40px;
  --ios-radius-bubble: 22px;
  --ios-radius-bubble-tail: 5px;
  --ios-radius-compose: 26px;
  --ios-radius-contact-pill: 24px;
  --ios-radius-dock: 28px;
  --ios-radius-icon: 16px;
  --ios-radius-sheet: 26px;
  --ios-radius-alert: 20px;
  --ios-radius-small: 4px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #f7f7f8;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 26% 18%, rgba(255, 255, 255, 0.95), transparent 22rem),
    linear-gradient(145deg, #fdfdfd 0%, #f0f1f3 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, sans-serif;
  font-synthesis: none;
}

a {
  color: inherit;
}

button,
textarea {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.apps-stage {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 14px 16px;
  overflow: hidden;
  perspective: 1400px;
  perspective-origin: 50% 44%;
}

.phone {
  position: relative;
  z-index: 1;
  width: min(470px, calc(100vw - 14px), calc((100vh - 18px) * 0.505));
  aspect-ratio: 430 / 932;
  opacity: 0;
  transform:
    translate3d(38vw, 0, -180px)
    rotateZ(0.6deg)
    scale(0.94);
  transform-origin: center;
  transform-style: preserve-3d;
  will-change: transform, opacity;
}

.phone.is-loaded {
  animation: phoneModelIn 1600ms 0ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.phone-model {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: transparent;
  --poster-color: transparent;
  filter: drop-shadow(0 32px 72px rgba(75, 28, 9, 0.24));
  transform: translateZ(-18px);
}

.phone-bezel {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 26% 11.5% 24.4%;
  border-radius: var(--ios-radius-phone-shell);
  background: transparent;
  box-shadow: none;
  opacity: 0;
  transform: translateZ(22px) scale(0.985);
  transform-style: preserve-3d;
}

.phone.is-loaded .phone-bezel {
  animation: screenLayerIn 540ms 1020ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}

.phone-bezel::before {
  display: none;
}

.phone-screen {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  grid-template-rows: auto 1fr auto auto;
  border-radius: var(--ios-radius-screen);
  background: transparent;
  box-shadow: none;
  transform: translateZ(16px);
  transform-style: preserve-3d;
}

.phone-screen::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--screen-bg);
  content: "";
  pointer-events: none;
}

.status-bar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  isolation: isolate;
  height: 52px;
  padding: 0 31px;
  background: transparent;
  backdrop-filter: none;
  color: var(--status-ink);
  font-size: 0.84rem;
  font-weight: 650;
  pointer-events: none;
}

.status-notch-cutout {
  position: absolute;
  top: 7px;
  left: 50%;
  z-index: 0;
  width: 112px;
  height: 28px;
  border-radius: 999px;
  background: #050506;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.05),
    inset 0 -1px 2px rgba(255, 255, 255, 0.03);
  pointer-events: none;
  transform: translateX(-50%);
}

.status-icons {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: inherit;
}

.status-bar > [data-device-time] {
  position: relative;
  z-index: 1;
}

.cellular-service {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  width: 17px;
  height: 12px;
}

.cellular-service span {
  display: block;
  width: 3px;
  border-radius: 999px;
  background: currentcolor;
  transform-origin: bottom;
  animation: cellularPulse 1.8s ease-in-out infinite;
}

.cellular-service span:nth-child(1) {
  height: 5px;
}

.cellular-service span:nth-child(2) {
  height: 8px;
  animation-delay: 120ms;
}

.cellular-service span:nth-child(3) {
  height: 11px;
  animation-delay: 240ms;
}

.battery-charging {
  display: inline-block;
  flex: 0 0 auto;
  width: 25px;
  height: 17px;
  border: 0;
  border-radius: 0;
  background: currentcolor;
  color: #34c759;
  transform: scale(1.45);
  transform-origin: center;
  -webkit-mask: url("./battery-charging-outline.webp") center / contain no-repeat;
  mask: url("./battery-charging-outline.webp") center / contain no-repeat;
}

.battery-charging::after {
  display: none;
}

.message-header {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-self: center;
  flex-direction: column;
  gap: 0;
  width: 100%;
  margin-top: 42px;
  padding: 0 72px 11px;
  border-bottom: 0;
  border-radius: 0;
  background: var(--message-header-surface);
  box-shadow: none;
  backdrop-filter: blur(11px) saturate(1.08);
  -webkit-backdrop-filter: blur(11px) saturate(1.08);
}

.facetime-button {
  position: absolute;
  top: 1px;
  right: 11px;
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid var(--facetime-border);
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.36) 48%, rgba(226, 240, 255, 0.22)),
    linear-gradient(145deg, rgba(255, 255, 255, 0.66), rgba(228, 238, 251, 0.28));
  color: var(--facetime-stroke);
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    inset 0 -1px 0 rgba(0, 122, 255, 0.08),
    0 10px 20px rgba(8, 9, 11, 0.08);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
}

.facetime-button svg {
  width: 31.8px;
  height: 31.8px;
  fill: none;
  stroke: var(--facetime-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.facetime-glyph {
  transform-box: fill-box;
  transform-origin: center;
}

.facetime-button:focus-visible {
  outline: 3px solid rgba(0, 122, 255, 0.22);
  outline-offset: 3px;
}

.message-logo {
  display: grid;
  position: relative;
  z-index: 2;
  width: 58px;
  height: 58px;
  margin-bottom: -9px;
  overflow: hidden;
  padding: 0;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(145deg, #111, #34363a);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 10px 25px rgba(8, 9, 11, 0.14);
}

.message-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.42);
}

.message-logo:focus-visible {
  outline: 3px solid rgba(0, 122, 255, 0.22);
  outline-offset: 3px;
}

.message-contact-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 50px;
  padding: 8px 14px 8px 18px;
  overflow: hidden;
  border-radius: var(--ios-radius-contact-pill);
  border: 1px solid rgba(255, 255, 255, 0.52);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.18) 54%, rgba(255, 255, 255, 0.08)),
    rgba(247, 247, 248, 0.34);
  color: rgba(8, 9, 11, 0.88);
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(255, 255, 255, 0.16),
    0 8px 22px rgba(8, 9, 11, 0.08);
  backdrop-filter: blur(24px) saturate(1.55);
  -webkit-backdrop-filter: blur(24px) saturate(1.55);
}

.message-contact-chevron {
  display: inline-grid;
  width: 15px;
  height: 23px;
  place-items: center;
  color: rgba(8, 9, 11, 0.38);
  transform: translateY(-0.5px);
}

.message-contact-chevron svg {
  display: block;
  width: 15px;
  height: 23px;
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.message-contact-pill:focus-visible {
  outline: 3px solid rgba(24, 135, 255, 0.2);
  outline-offset: 3px;
}

.conversation {
  display: flex;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-bottom: 28px;
  flex-direction: column;
  padding: 16px 18px 18px;
}

.message-date {
  align-self: center;
  margin: 0 0 13px;
  color: rgba(60, 60, 67, 0.48);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1;
  opacity: 0;
  transform: translate3d(0, 7px, 0) scale(0.96);
}

.message-date strong {
  font-weight: 800;
}

.incoming-row,
.sent-row {
  display: flex;
  align-items: flex-end;
  gap: 0;
  margin-bottom: 18px;
  opacity: 0;
}

.incoming-row {
  padding-left: 2px;
}

.sent-row {
  justify-content: flex-end;
}

.sent-row.animate-send {
  animation: rowFadeIn 120ms ease-out forwards;
}

.reply-row {
  margin-top: 10px;
  animation-delay: 130ms;
}

.avatar {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(145deg, #111111, #3a3b3f);
  box-shadow: 0 10px 18px rgba(8, 9, 11, 0.1);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.incoming-row .avatar {
  opacity: 0;
  transform: translate3d(-6px, 8px, 0) scale(0.9);
  animation: avatarPopIn 420ms 560ms cubic-bezier(0.18, 0.88, 0.22, 1.18) forwards;
}

.reply-row .avatar {
  animation-delay: 170ms;
}

.bubble {
  max-width: min(300px, calc(100vw - 70px));
  margin: 0;
  padding: 14px 19px;
  border-radius: var(--ios-radius-bubble);
  font-size: clamp(0.95rem, 3.5vw, 1.06rem);
  font-weight: 380;
  line-height: 1.22;
  will-change: transform, opacity;
}

.incoming {
  position: relative;
  max-width: min(300px, calc(100% - 10px));
  border-radius:
    20px
    20px
    20px
    6px;
  background: #e5e5ea;
  opacity: 0;
  transform: translate3d(-10px, 14px, 0) scale(0.78);
  transform-origin: 9px calc(100% - 5px);
}

.incoming::before,
.incoming::after {
  content: "";
  position: absolute;
  bottom: 0;
  pointer-events: none;
}

.incoming::before {
  bottom: -4px;
  left: -1px;
  width: 22px;
  height: 20px;
  border-bottom-right-radius: 18px 14px;
  background: #e5e5ea;
}

.incoming::after {
  bottom: -5px;
  left: -17px;
  width: 21px;
  height: 21px;
  border-bottom-right-radius: 14px 11px;
  background: var(--screen-bg);
}

.sent {
  position: relative;
  border-radius:
    var(--ios-radius-bubble)
    var(--ios-radius-bubble)
    var(--ios-radius-bubble-tail)
    var(--ios-radius-bubble);
  background: var(--blue);
  color: #fff;
  opacity: 0;
  transform: translate3d(12px, 14px, 0) scale(0.78);
  transform-origin: calc(100% - 9px) calc(100% - 5px);
}

.sent::before,
.sent::after {
  content: "";
  position: absolute;
  bottom: 0;
  pointer-events: none;
}

.sent::before {
  right: -7px;
  width: 18px;
  height: 22px;
  border-bottom-left-radius: 14px 12px;
  background: var(--blue);
}

.sent::after {
  right: -26px;
  width: 24px;
  height: 24px;
  border-bottom-left-radius: 9px;
  background: var(--screen-bg);
}

.sent-row.animate-send .sent {
  animation: iosSentBubble 560ms cubic-bezier(0.16, 1.16, 0.26, 1) forwards;
}

.reply-row .incoming {
  animation-delay: 130ms;
}

.phone.is-screen-ready .message-date {
  animation: dateIn 300ms 110ms cubic-bezier(0.18, 0.88, 0.22, 1) forwards;
}

.phone.is-screen-ready .incoming-row {
  animation: rowFadeIn 180ms 280ms ease-out forwards;
}

.phone.is-screen-ready .incoming {
  animation: iosIncomingBubble 620ms 280ms cubic-bezier(0.16, 1.18, 0.26, 1) forwards;
}

.quick-actions {
  display: inline-flex;
  overflow: hidden;
  margin-top: 8px;
  margin-left: 6px;
  border-radius: 999px;
  background: #f0f0f2;
  opacity: 0;
  transform: translate3d(0, 7px, 0) scale(0.98);
  animation: quickActionsIn 320ms 520ms cubic-bezier(0.18, 0.88, 0.22, 1) forwards;
}

.quick-actions a {
  min-width: 106px;
  padding: 9px 14px;
  color: #0c75d8;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.quick-actions a + a {
  border-left: 1px solid rgba(8, 9, 11, 0.07);
}

.quick-actions a:focus-visible {
  outline: 3px solid rgba(24, 135, 255, 0.28);
  outline-offset: -3px;
}

.compose {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: end;
  align-self: end;
  gap: 7px;
  margin: 0 13px 12px;
  padding: 4px 7px 4px 11px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  overflow: hidden;
  border-radius: var(--ios-radius-compose);
  background:
    radial-gradient(circle at 92% 55%, rgba(24, 135, 255, 0.06), transparent 31%),
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.78), transparent 40%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(244, 249, 255, 0.58) 50%, rgba(255, 255, 255, 0.76));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    inset 0 -1px 0 rgba(24, 135, 255, 0.05),
    0 14px 32px rgba(8, 9, 11, 0.11);
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  backdrop-filter: blur(8px) saturate(1.04);
  -webkit-backdrop-filter: blur(8px) saturate(1.04);
}

.phone.is-screen-ready .compose {
  animation: composeIn 420ms 900ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}

.compose.is-empty {
  grid-template-columns: 1fr;
  gap: 0;
}

.compose textarea {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 118px;
  min-height: 76px;
  -webkit-appearance: none;
  appearance: none;
  resize: none;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 3px 4px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.18;
  outline: none;
  opacity: 0;
  transform: translate3d(0, 6px, 0);
  scrollbar-width: none;
}

.compose textarea::-webkit-scrollbar {
  display: none;
}

.compose textarea::placeholder {
  color: rgba(8, 9, 11, 0.34);
}

.compose button {
  position: relative;
  z-index: 1;
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 7px 18px rgba(24, 135, 255, 0.32);
  opacity: 0;
  transform: translate3d(0, 6px, 0) scale(0.92);
}

.phone.is-screen-ready .compose textarea {
  animation: composeCopyIn 300ms 1140ms ease-out forwards;
}

.phone.is-screen-ready .compose button:not([hidden]) {
  animation: composeCopyIn 280ms 1210ms ease-out forwards;
}

.compose button:focus-visible {
  outline: 3px solid rgba(24, 135, 255, 0.28);
}

.app-tray {
  position: relative;
  align-self: start;
  display: grid;
  grid-template-columns: repeat(4, 57px);
  justify-content: space-between;
  gap: 0;
  align-items: center;
  width: min(calc(100% - 28px), 310px);
  margin: 0 auto 14px;
  padding: 14px 15px 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: var(--ios-radius-dock);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.1) 54%, transparent 82%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06)),
    rgba(248, 248, 248, 0.045);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    inset 0 -1px 0 rgba(8, 9, 11, 0.05),
    0 18px 38px rgba(8, 9, 11, 0.09);
  backdrop-filter: blur(42px) saturate(1.78) brightness(1.02);
  -webkit-backdrop-filter: blur(42px) saturate(1.78) brightness(1.02);
  opacity: 0;
  transform: translate3d(0, 16px, 0);
}

.app-tray::before {
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 48%);
  content: "";
  pointer-events: none;
}

.phone.is-screen-ready .app-tray {
  animation: trayIn 520ms 1320ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}

.app-tray a {
  display: grid;
  width: 57px;
  height: 57px;
  align-items: center;
  overflow: hidden;
  place-items: center;
  border-radius: var(--ios-radius-icon);
  background: rgba(248, 248, 249, 0.92);
  color: rgba(8, 9, 11, 0.66);
  text-decoration: none;
  z-index: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 7px 16px rgba(8, 9, 11, 0.12);
}

.app-tray a:focus-visible {
  outline: 3px solid rgba(24, 135, 255, 0.28);
  outline-offset: 3px;
}

.app-tray > a > img,
.tray-icon {
  display: grid;
  width: 100%;
  height: 100%;
  overflow: hidden;
  place-items: center;
  border-radius: inherit;
  background: transparent;
  object-fit: cover;
  box-shadow: none;
}

.mail-app-icon {
  image-orientation: none;
  transform: rotate(0deg) translateZ(0);
  transform-origin: 50% 50%;
}

.message-contact-pill,
.quick-actions,
.compose,
.app-tray,
.app-tray a,
.tray-icon,
.ios-alert,
.cal-embed-sheet {
  corner-shape: squircle;
}

.aire-app-icon {
  padding: 8px;
  overflow: hidden;
  border-radius: inherit;
  background: linear-gradient(145deg, #111, #303236);
}

.aire-app-icon img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: transparent;
  object-fit: contain;
  box-shadow: none;
  transform: none;
}

.ios-alert-shell {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  align-items: end;
  padding: 0 18px 28px;
}

.ios-alert-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.16);
  opacity: 0;
  animation: fadeIn 180ms ease forwards;
}

.ios-alert {
  position: relative;
  overflow: hidden;
  border-radius: var(--ios-radius-alert);
  background: rgba(246, 246, 248, 0.94);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  text-align: center;
  transform: translate3d(0, 22px, 0) scale(0.98);
  animation: sheetIn 280ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
  backdrop-filter: blur(24px) saturate(1.2);
}

.ios-alert-copy {
  padding: 20px 22px 14px;
}

.ios-alert h2 {
  margin: 0 0 5px;
  font-size: 1.04rem;
  font-weight: 800;
  letter-spacing: 0;
}

.ios-alert p {
  margin: 0;
  color: rgba(8, 9, 11, 0.58);
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.35;
}

.ios-alert button {
  display: block;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-top: 1px solid rgba(8, 9, 11, 0.1);
  background: rgba(255, 255, 255, 0.45);
  color: #007aff;
  cursor: pointer;
  font-size: 1.02rem;
  font-weight: 700;
}

.ios-alert button:focus-visible,
.cal-close:focus-visible {
  outline: 3px solid rgba(24, 135, 255, 0.28);
  outline-offset: -3px;
}

.ios-alert-cancel {
  color: #ff3b30 !important;
}

.cal-embed-shell {
  position: absolute;
  inset: 0;
  z-index: 24;
  display: grid;
  place-items: end center;
  padding: 18px 14px 20px;
}

.cal-embed-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0;
  animation: fadeIn 180ms ease forwards;
}

.cal-embed-sheet {
  position: relative;
  width: 100%;
  height: min(78%, 548px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: var(--ios-radius-sheet);
  background: rgba(248, 248, 250, 0.94);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  transform: translate3d(0, 24px, 0) scale(0.98);
  animation: sheetIn 280ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
}

.cal-inline {
  display: block;
  width: 100%;
  height: 100%;
  overflow: scroll;
  background: #fff;
}

.cal-close {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 1;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(118, 118, 128, 0.18);
  color: rgba(8, 9, 11, 0.72);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #f5f5f7;
    --muted: rgba(235, 235, 245, 0.58);
    --soft: #1c1c1e;
    --line: rgba(235, 235, 245, 0.12);
    --blue: #0a84ff;
    --screen-bg: #08090d;
    --status-ink: rgba(245, 245, 247, 0.82);
    --facetime-stroke: #f5f5f7;
    --facetime-border: rgba(245, 245, 247, 0.22);
    --message-header-surface:
      radial-gradient(ellipse at 50% 0%, rgba(30, 32, 38, 0.72), rgba(16, 18, 23, 0.34) 54%, rgba(8, 9, 13, 0) 84%),
      linear-gradient(180deg, rgba(12, 13, 18, 0.74), rgba(10, 11, 14, 0.38) 68%, rgba(10, 11, 14, 0));
  }

  html {
    background: #050506;
  }

  body {
    background:
      radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.08), transparent 20rem),
      linear-gradient(145deg, #111113 0%, #050506 100%);
    color: var(--ink);
  }

  .phone-model {
    filter: drop-shadow(0 34px 76px rgba(0, 0, 0, 0.58));
  }

  .phone-screen {
    background: transparent;
    color: var(--ink);
  }

  .status-icons {
    color: inherit;
  }

  .facetime-button {
    border-color: var(--facetime-border);
    background:
      radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08) 46%, rgba(80, 150, 255, 0.08)),
      linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(18, 20, 26, 0.26));
    color: var(--facetime-stroke);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.18),
      inset 0 -1px 0 rgba(10, 132, 255, 0.08),
      0 10px 22px rgba(0, 0, 0, 0.24);
  }

  .message-logo,
  .aire-app-icon {
    background: linear-gradient(145deg, #050506, #24262b);
  }

  .message-contact-pill {
    border-color: rgba(255, 255, 255, 0.16);
    background:
      radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06) 56%, rgba(255, 255, 255, 0.02)),
      rgba(36, 38, 43, 0.34);
    color: rgba(245, 245, 247, 0.92);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.2),
      inset 0 -1px 0 rgba(255, 255, 255, 0.05),
      0 8px 22px rgba(0, 0, 0, 0.16);
  }

  .message-contact-chevron {
    color: rgba(235, 235, 245, 0.48);
  }

  .message-date {
    color: rgba(235, 235, 245, 0.46);
  }

  .incoming {
    background: #2c2c2e;
    color: #f5f5f7;
  }

  .incoming::before {
    background: #2c2c2e;
  }

  .incoming::after,
  .sent::after {
    background: var(--screen-bg);
  }

  .quick-actions {
    background: #2c2c2e;
  }

  .quick-actions a + a {
    border-left-color: rgba(235, 235, 245, 0.1);
  }

  .compose {
    border-color: rgba(255, 255, 255, 0.16);
    background:
      radial-gradient(circle at 92% 55%, rgba(10, 132, 255, 0.14), transparent 31%),
      radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.14), transparent 40%),
      linear-gradient(135deg, rgba(38, 40, 46, 0.78), rgba(18, 20, 26, 0.66) 50%, rgba(30, 32, 38, 0.74));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.16),
      inset 0 -1px 0 rgba(10, 132, 255, 0.08),
      0 14px 32px rgba(0, 0, 0, 0.24);
  }

  .compose textarea {
    color: #f5f5f7;
  }

  .compose textarea::placeholder {
    color: rgba(235, 235, 245, 0.36);
  }

  .app-tray {
    border-color: rgba(255, 255, 255, 0.18);
    background:
      radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05) 56%, transparent 82%),
      linear-gradient(180deg, rgba(70, 72, 80, 0.32), rgba(20, 22, 28, 0.14)),
      rgba(8, 9, 13, 0.16);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.16),
      inset 0 -1px 0 rgba(0, 0, 0, 0.2),
      0 16px 34px rgba(0, 0, 0, 0.24);
  }

  .app-tray::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 46%);
  }

  .app-tray a {
    background: #1c1c1e;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.14),
      0 7px 16px rgba(0, 0, 0, 0.28);
  }

  .ios-alert {
    background: rgba(28, 28, 30, 0.94);
  }

  .ios-alert p {
    color: rgba(235, 235, 245, 0.58);
  }

  .ios-alert button {
    border-top-color: rgba(235, 235, 245, 0.1);
    background: rgba(44, 44, 46, 0.58);
    color: #0a84ff;
  }

  .cal-embed-sheet {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(28, 28, 30, 0.94);
  }

  .cal-close {
    background: rgba(118, 118, 128, 0.28);
    color: rgba(245, 245, 247, 0.82);
  }
}

body.texture-capture .status-bar,
body.texture-capture .message-header,
body.texture-capture .message-date,
body.texture-capture .conversation,
body.texture-capture .compose,
body.texture-capture .app-tray {
  visibility: hidden !important;
  animation: none !important;
}

body.texture-capture .phone-screen {
  background: #050506 !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@keyframes cellularPulse {
  0%,
  100% {
    opacity: 0.38;
    transform: scaleY(0.72);
  }

  42%,
  72% {
    opacity: 1;
    transform: scaleY(1);
  }
}

@keyframes phoneModelIn {
  0% {
    opacity: 1;
    transform:
      translate3d(38vw, 0, -180px)
      rotateZ(0.6deg)
      scale(0.94);
  }

  42% {
    opacity: 1;
    transform:
      translate3d(18vw, -2px, -110px)
      rotateZ(0.35deg)
      scale(0.97);
  }

  78% {
    opacity: 1;
    transform:
      translate3d(-4px, -3px, 20px)
      rotateZ(-0.2deg)
      scale(1.01);
  }

  100% {
    opacity: 1;
    transform:
      translate3d(0, 0, 0)
      rotateZ(0deg)
      scale(1);
  }
}

@keyframes screenLayerIn {
  to {
    opacity: 1;
    transform: translateZ(22px) scale(1);
  }
}

@keyframes rowFadeIn {
  to {
    opacity: 1;
  }
}

@keyframes dateIn {
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes avatarPopIn {
  0% {
    opacity: 0;
    transform: translate3d(-6px, 8px, 0) scale(0.9);
  }

  72% {
    opacity: 1;
    transform: translate3d(0, -1px, 0) scale(1.04);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes iosIncomingBubble {
  0% {
    opacity: 0;
    transform: translate3d(-10px, 14px, 0) scale(0.78);
  }

  58% {
    opacity: 1;
    transform: translate3d(0, -1px, 0) scale(1.045);
  }

  78% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(0.985);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes iosSentBubble {
  0% {
    opacity: 0;
    transform: translate3d(12px, 14px, 0) scale(0.78);
  }

  56% {
    opacity: 1;
    transform: translate3d(0, -1px, 0) scale(1.05);
  }

  78% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(0.985);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes quickActionsIn {
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes trayIn {
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes composeIn {
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes composeCopyIn {
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes sheetIn {
  to {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes mobilePhoneZoom {
  0% {
    opacity: 1;
    width: min(390px, calc(100vw - 34px));
    transform:
      translate3d(42vw, 0, -150px)
      rotateZ(0.6deg)
      scale(0.92);
  }

  100% {
    opacity: 1;
    width: min(390px, calc(100vw - 34px));
    transform:
      translate3d(0, 0, 0)
      rotateZ(0deg)
      scale(1);
  }
}

@keyframes mobilePhoneExpand {
  0% {
    opacity: 1;
    width: min(390px, calc(100vw - 34px));
    transform:
      translate3d(0, 0, 0)
      rotateZ(0deg)
      scale(1);
  }

  100% {
    opacity: 1;
    width: 100vw;
    transform:
      translate3d(0, 0, 0)
      rotateZ(0deg)
      scale(1);
  }
}

@keyframes mobileBezelOut {
  0% {
    padding: 12px;
    border-radius: var(--ios-radius-phone-shell);
    background: transparent;
    box-shadow: none;
  }

  100% {
    padding: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }
}

@keyframes mobileModelOut {
  0% {
    opacity: 1;
    transform: translateZ(-18px) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateZ(-18px) scale(1.12);
  }
}

@keyframes mobileScreenFill {
  0% {
    height: min(844px, calc(100dvh - 58px));
    min-height: min(720px, calc(100dvh - 58px));
    max-height: calc(100dvh - 58px);
    border-radius: var(--ios-radius-screen);
    transform: translateZ(16px) scale(0.94);
  }

  100% {
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    transform: translateZ(0) scale(1);
  }
}

@media (max-width: 449.98px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  .apps-stage {
    min-height: 100dvh;
    padding: 0;
    perspective: 1000px;
  }

  .phone {
    z-index: 5;
    width: min(390px, calc(100vw - 34px));
    height: min(896px, 100dvh);
    animation: none;
  }

  .phone.is-loaded {
    animation: mobilePhoneZoom 1900ms 0ms cubic-bezier(0.18, 0.88, 0.16, 1) forwards;
  }

  .phone-model {
    height: 100%;
  }

  .phone.is-loaded .phone-model {
    animation: none;
  }

  .phone-bezel {
    min-height: auto;
    padding: 9.2% 9.7% 10.7%;
    border-radius: var(--ios-radius-phone-shell);
  }

  .phone.is-loaded .phone-bezel {
    animation: screenLayerIn 540ms 1020ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
  }

  .phone-bezel::before {
    display: none;
  }

  .phone-screen {
    grid-template-rows: auto 1fr auto auto;
    height: min(844px, calc(100dvh - 58px));
    min-height: min(720px, calc(100dvh - 58px));
    max-height: calc(100dvh - 58px);
    border-radius: var(--ios-radius-screen);
  }

  .phone-screen::before {
    inset: 0;
    border-radius: inherit;
    background: var(--screen-bg);
  }

  .phone.is-loaded .phone-screen {
    animation: none;
  }

  .phone.is-intro-complete {
    width: 100vw;
    opacity: 1;
    transform:
      translate3d(0, 0, 0)
      rotateZ(0deg)
      scale(1);
    animation: mobilePhoneExpand 760ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
  }

  .phone.is-intro-complete .phone-model {
    opacity: 0;
    transform: translateZ(-18px) scale(1.12);
    animation: mobileModelOut 760ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
  }

  .phone.is-intro-complete .phone-bezel {
    padding: 0;
    border-radius: 0;
    background: var(--screen-bg);
    box-shadow: none;
    opacity: 1;
    transform: translateZ(22px) scale(1);
    animation: mobileBezelOut 760ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
  }

  .phone.is-intro-complete .phone-screen {
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    transform: translateZ(0) scale(1);
    animation: mobileScreenFill 760ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
  }

  .phone.is-intro-complete .compose,
  .phone.is-intro-complete .compose textarea,
  .phone.is-intro-complete .compose button:not([hidden]) {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    animation: none;
  }

  .phone.is-intro-complete .app-tray {
    max-height: 96px;
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    animation: none;
    transition:
      max-height 760ms cubic-bezier(0.2, 0.9, 0.2, 1),
      margin 760ms cubic-bezier(0.2, 0.9, 0.2, 1),
      padding 760ms cubic-bezier(0.2, 0.9, 0.2, 1),
      border-width 760ms cubic-bezier(0.2, 0.9, 0.2, 1),
      opacity 820ms ease,
      transform 820ms cubic-bezier(0.2, 0.9, 0.2, 1);
  }

  .status-bar {
    display: none;
  }

  .message-header {
    margin-top: 24px;
    width: 100%;
    padding: 0 62px 10px;
  }

  .facetime-button {
    top: 1px;
    right: 9px;
    width: 50px;
    height: 50px;
  }

  .facetime-button svg {
    width: 29px;
    height: 29px;
  }

  .message-logo {
    width: 58px;
    height: 58px;
    padding: 0;
  }

  .conversation {
    padding-top: 20px;
    padding-bottom: 18px;
  }

  .compose {
    margin: 0 11px 10px;
  }

  .app-tray {
    margin-bottom: 18px;
  }

  body.keyboard-active .conversation {
    padding-top: 14px;
  }

  body.keyboard-active .phone.is-intro-complete .phone-screen {
    height: calc(100dvh - var(--keyboard-inset));
    min-height: calc(100dvh - var(--keyboard-inset));
    max-height: calc(100dvh - var(--keyboard-inset));
    border-radius: 0;
    transform: translateZ(0) scale(1);
  }

  body.keyboard-active .compose {
    margin-bottom: max(10px, env(safe-area-inset-bottom));
  }

  body.keyboard-active .phone.is-intro-complete .app-tray,
  body.keyboard-dock-hidden .phone.is-intro-complete .app-tray {
    max-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
    opacity: 0;
    transform: translate3d(0, 22px, 0) scale(0.98);
    pointer-events: none;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
    transition-delay: 0ms !important;
    animation: none !important;
  }

  .phone,
  .phone.is-loaded,
  .phone.is-intro-complete {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotateZ(0deg) scale(1);
  }

  .phone-bezel,
  .phone.is-loaded .phone-bezel,
  .phone.is-intro-complete .phone-bezel {
    opacity: 1;
    transform: translateZ(22px) scale(1);
  }

  .message-date,
  .incoming-row,
  .incoming,
  .sent-row,
  .sent,
  .quick-actions,
  .compose,
  .compose textarea,
  .compose button:not([hidden]),
  .app-tray {
    opacity: 1;
    transform: none;
  }

  .cellular-service span,
  .ios-alert-backdrop,
  .cal-embed-backdrop {
    opacity: 1;
    transform: none;
  }

  .ios-alert,
  .cal-embed-sheet {
    transform: none;
  }
}
