/* Load after situations.css and phone-screen.css. No shared dialogue rules. */
.usb-dialog.phone-dialog { width: min(620px, calc(100vw - 24px)); }
.phone-dialog .usb-display-surround { padding: 0; border: 0; background: none; box-shadow: none; }
.phone-dialog .usb-display-surround::before,
.phone-dialog .usb-display-surround::after { display: none; }
.phone-dialog .usb-dialog-viewport { overflow: visible; background: none; }
.usb-screen.fn-messenger,
.phone-dialog .messenger-screen.fn-messenger {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: auto;
  overflow: visible;
  background: none;
  color: #172630;
  font: 14px/1.42 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}
.fn-messenger *, .fn-messenger *::before, .fn-messenger *::after { box-sizing: border-box; }
.fn-messenger button,
.fn-messenger input { font: inherit; letter-spacing: normal; }
.fn-messenger button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.fn-messenger button svg { pointer-events: none; }
.fn-messenger svg { display: block; width: 22px; height: 22px; flex: none; }
.fn-messenger [hidden] { display: none !important; }
.fn-messenger button:focus-visible,
.fn-messenger [tabindex]:focus-visible { outline: 2px solid #1762b4; outline-offset: -3px; }
.fn-phone {
  display: flex;
  flex-direction: column;
  width: min(350px, 100%);
  height: var(--fn-phone-height, clamp(470px, calc(100dvh - 378px), 632px));
  flex: none;
  overflow: hidden;
  border: 6px solid #172332;
  border-radius: 32px;
  background: #f8fafc;
  box-shadow: 0 0 0 1px #9ab2c166, 0 13px 35px #020a1752;
  isolation: isolate;
}
.fn-phone-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  height: 33px;
  flex: none;
  padding: 2px 21px 0;
  background: #f8fafc;
  color: #23323d;
  font-size: 11px;
  font-weight: 650;
}
.fn-phone-camera { position: absolute; left: calc(50% - 4px); top: 9px; width: 8px; height: 8px; border-radius: 50%; background: #15202c; }
.fn-phone-status-icons { display: flex; align-items: center; gap: 5px; }
.fn-phone-status-icons svg { width: 15px; height: 15px; }
.fn-phone-status-icons svg:last-child { width: 22px; }
.fn-phone-signal { display: flex; align-items: end; gap: 2px; height: 10px; }
.fn-phone-signal i { width: 2px; height: 4px; background: currentColor; border-radius: 1px; }
.fn-phone-signal i:nth-child(2) { height: 6px; }
.fn-phone-signal i:nth-child(3) { height: 8px; }
.fn-phone-signal i:nth-child(4) { height: 10px; }
.fn-phone-view { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.fn-phone-header { display: flex; align-items: center; flex: none; min-height: 63px; padding: 4px 4px 9px; border-bottom: 1px solid #dce3ea; background: #f8fafc; }
.fn-phone-icon-button { display: grid; place-items: center; width: 44px; min-height: 44px; flex: none; padding: 0; border: 0; border-radius: 50%; color: #366791; background: transparent; cursor: pointer; }
.fn-phone-icon-button:hover { background: #e7eef5; }
.fn-phone-contact { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; min-height: 48px; border: 0; border-radius: 6px; padding: 0; text-align: left; color: inherit; background: none; cursor: pointer; }
.fn-phone-contact:hover .fn-phone-contact-name strong { color: #24659b; }
.fn-phone-avatar { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: #b3c9d8; color: #34536d; font-size: 12px; font-weight: 600; }
.fn-phone-contact-name { display: block; min-width: 0; }
.fn-phone-contact-name strong { display: block; white-space: nowrap; font-size: 13px; font-weight: 650; }
.fn-phone-contact-name small { display: block; margin-top: 2px; color: #71818f; font-size: 10px; }
.fn-phone-info { width: 44px; }
.fn-phone-info svg { width: 20px; height: 20px; }
.fn-phone-sender { display: block; position: relative; flex: none; width: 100%; min-height: 61px; padding: 10px 15px 13px; border: 0; border-bottom: 1px solid #dce3ea; border-radius: 0; background: #edf2f7; text-align: left; color: #354e62; cursor: pointer; }
.fn-phone-sender-line { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; font-size: 10px; }
.fn-phone-sender-line strong { font-weight: 600; }
.fn-phone-sender-line > span { font-size: 10px; font-variant-numeric: tabular-nums; }
.fn-phone-sender-detail { display: block; margin-top: 4px; font-size: 9px; color: #637889; }
.fn-phone-sender > .fn-phone-clue-state { position: absolute; bottom: 1px; right: 15px; font-size: 8px; }
.fn-phone-history { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 13px 20px; background: #e2eaf0; scrollbar-width: thin; scrollbar-color: #a9bbc9 transparent; overscroll-behavior: contain; }
.fn-phone-date { width: max-content; margin: 0 auto 19px; padding: 3px 10px; border-radius: 12px; background: #cad8e2; color: #526b80; font-size: 10px; font-weight: 500; }
.fn-phone-messages { display: flex; flex-direction: column; gap: 6px; padding: 0; margin: 0; list-style: none; }
.fn-phone-messages li { display: flex; margin: 0; padding: 0; }
.fn-phone-bubble { display: block; position: relative; width: fit-content; max-width: 94%; min-height: 48px; border: 1px solid #d7e1e8; border-radius: 5px 13px 13px 5px; padding: 10px 12px 6px; background: #fff; color: #243542; box-shadow: 0 1px 1px #29475d09; text-align: left; cursor: pointer; }
.fn-phone-messages li:first-child .fn-phone-bubble { border-top-left-radius: 13px; }
.fn-phone-messages li:last-child .fn-phone-bubble { border-bottom-left-radius: 13px; }
.fn-phone-message-text { display: block; font-size: 14px; line-height: 1.45; }
.fn-phone-message-meta { display: flex; justify-content: end; align-items: center; gap: 8px; min-height: 13px; margin-top: 3px; }
.fn-phone-message-meta time { color: #83929d; font-size: 9px; font-variant-numeric: tabular-nums; }
.fn-phone-link .fn-phone-message-text { color: #2873ad; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; overflow-wrap: anywhere; font-size: 12px; }
.fn-phone-clue-state { color: var(--accent, #0033FF); font-size: 9px; font-weight: 600; }
.fn-messenger [data-clue]:hover { box-shadow: inset 0 0 0 1px #8dafcd; }
.fn-messenger [data-clue].selected { outline: 2px solid var(--accent, #0033FF); outline-offset: -2px; background: #f7fbff; box-shadow: none; }
.fn-messenger [data-clue].found { outline: 2px solid #397867; outline-offset: -2px; background: #f0f8f4; box-shadow: none; }
.fn-messenger [data-clue].found .fn-phone-clue-state { color: #306e5b; }
.fn-messenger [data-clue][aria-disabled="true"] { cursor: default; }
.fn-phone-compose { flex: none; padding: 8px 9px 0; border-top: 1px solid #d5e0e7; background: #f8fafc; }
.fn-phone-compose-row { display: flex; align-items: center; gap: 6px; }
.fn-phone-compose-icon { display: grid; place-items: center; width: 27px; flex: none; color: #8595a3; }
.fn-phone-compose-row input { display: block; min-width: 0; width: 100%; height: 36px; border: 1px solid #d7e0e7; border-radius: 19px; padding: 0 13px; background: #fff; color: #667a8b; font-size: 12px; cursor: default; outline: none; }
.fn-phone-compose-row input::placeholder { opacity: 1; color: #83939e; }
.fn-phone-readonly { display: block; margin: 5px 0 0; text-align: center; color: #6e7f8e; font-size: 9px; }
.fn-phone-system-nav { display: grid; place-items: center; flex: none; height: 19px; padding-top: 2px; background: #f8fafc; }
.fn-phone-system-nav > span { width: 96px; height: 3px; border-radius: 3px; background: #293947; }
.fn-phone-reference { width: min(350px, 100%); padding: 12px 6px 2px; color: #97afc3; font-size: 10px; }
.fn-phone-reference > span { display: block; font-size: 9px; letter-spacing: .2px; }
.fn-phone-reference p { display: flex; justify-content: space-between; gap: 12px; margin: 3px 0 0; padding: 5px 0 0; border-top: 1px solid #6d89a333; }
.fn-phone-reference strong { color: #d2e5f4; font-size: 12px; font-weight: 550; }
.fn-phone-page-header { display: flex; align-items: center; min-height: 67px; flex: none; padding: 6px 12px 12px; border-bottom: 1px solid #dde5eb; }
.fn-phone-page-header h3 { margin: 0; padding: 0 8px; font-size: 23px; font-weight: 650; }
.fn-phone-profile .fn-phone-page-header h3 { font-size: 17px; }
.fn-phone-chat-row { display: flex; align-items: start; gap: 10px; position: relative; width: 100%; min-height: 94px; padding: 17px 14px; border: 0; border-bottom: 1px solid #e0e7ed; background: #fff; color: #293c4b; text-align: left; cursor: pointer; }
.fn-phone-chat-row:hover { background: #eaf1f7; }
.fn-phone-chat-row .fn-phone-avatar { width: 44px; height: 44px; }
.fn-phone-chat-summary { min-width: 0; padding-right: 7px; }
.fn-phone-chat-summary strong { display: block; font-size: 12px; margin: 0 22px 5px 0; }
.fn-phone-chat-summary > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #70818f; font-size: 11px; }
.fn-phone-chat-row time { position: absolute; top: 19px; right: 11px; color: #8796a2; font-size: 9px; }
.fn-phone-profile-body { overflow-y: auto; padding: 20px 20px 16px; scrollbar-width: thin; }
.fn-phone-avatar-large { width: 68px; height: 68px; margin: 0 auto 13px; font-size: 23px; }
.fn-phone-profile h4 { font-size: 18px; text-align: center; margin: 0; font-weight: 600; }
.fn-phone-last-seen { margin: 4px 0 20px; text-align: center; color: #7c8c99; font-size: 11px; }
.fn-phone-profile dl { margin: 0; }
.fn-phone-profile dl > div { padding: 10px 0; border-bottom: 1px solid #dde5eb; }
.fn-phone-profile dt { margin: 0 0 4px; color: #7c8c99; font-size: 10px; }
.fn-phone-profile dd { margin: 0; font-size: 12px; }
.fn-phone-inspect-sender { width: 100%; min-height: 44px; margin-top: 17px; border: 1px solid #b8cbdc; border-radius: 8px; background: #eaf1f7; color: #2f648c; cursor: pointer; }
.fn-phone-inspect-sender:hover { background: #dceaf5; }
.fn-messenger.preview { width: 350px; height: 632px; pointer-events: none; }
.fn-messenger.preview .fn-phone { width: 350px; height: 632px; border: 0; border-radius: 0; box-shadow: none; }
.fn-messenger.preview .fn-phone-reference { display: none; }
@media (max-width: 700px) {
  .fn-phone { width: min(338px, 100%); height: var(--fn-phone-height, clamp(425px, calc(100dvh - 335px), 590px)); }
  .fn-phone-reference { width: min(338px, 100%); }
}
@media (max-width: 380px) {
  .fn-phone { border-width: 4px; border-radius: 27px; }
  .fn-phone-contact-name strong { font-size: 11px; }
  .fn-phone-avatar { width: 31px; height: 31px; }
  .fn-phone-contact { gap: 6px; }
}
@media (prefers-reduced-motion: no-preference) {
  .fn-messenger [data-clue] { transition: background-color 100ms, outline-color 100ms; }
}
