/* Auth code illustration; the production send_otp message contains text only. */
.auth-message-preview { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; width: 100%; max-width: 520px; min-height: 680px; margin: 0 auto; padding: 100px 28px 30px; align-self: start; border-radius: 28px; background: linear-gradient(180deg, #08261a18, #08261a00 40%, #08261a3d), #244936 url('/assets/generated/pine-login-forest-v6.webp') center / cover no-repeat; color: #244936; }
.auth-message-preview .auth-message-outgoing { container-type: normal; align-self: flex-end; width: fit-content; max-width: calc(100% - 38px); margin: 0 0 16px; padding: 0 7px 0 0; }
.auth-message-preview .auth-message-request { --tg-surface: #d4e4c9f5; display: flex; flex-wrap: wrap; align-items: last baseline; justify-content: flex-end; gap: 5px 16px; padding: 12px 14px 10px; margin: 0; border: 0; border-radius: 19px 19px 5px 19px; }
.auth-message-preview .auth-message-outgoing[data-side='right'] .auth-message-request { border-radius: 19px 19px 5px 19px; }
.auth-message-preview .auth-message-outgoing[data-side='right'] .auth-message-request::after { left: auto; right: -7px; transform: scaleX(-1); }
.auth-message-request code { padding: 0; background: none; color: #28533b; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; white-space: nowrap; }
.auth-message-request [data-auth-message-request-char] { display: inline-block; }
.auth-message-request-meta { display: inline-flex; align-items: center; gap: 4px; color: #597453; font-size: 10px; white-space: nowrap; }
.auth-message-request-meta time { font: inherit; font-variant-numeric: tabular-nums; }
.auth-message-heading { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; row-gap: 4px; margin-bottom: 20px; }
.auth-message-heading-note { display: inline-flex; align-items: center; gap: 5px; color: #597453; font-size: 12px; line-height: 1.5; white-space: nowrap; }
.auth-message-sender { display: flex; align-items: center; gap: 10px; min-width: 0; width: fit-content; max-width: calc(100% - 7px); margin: 0 0 12px 7px; padding: 0; background: none; }
.auth-message-sender img { display: block; width: 36px; height: 36px; flex: 0 0 36px; object-fit: cover; border-radius: 50%; }
.auth-message-sender strong { min-width: 0; color: #f2f6ec; font-size: 14px; font-weight: 650; line-height: 1.4; text-shadow: 0 1px 4px #08261acc; overflow-wrap: anywhere; }
.auth-message-chat { --tg-surface: #e1ecda; --tg-radius: 24px; position: relative; padding-left: 7px; }
.auth-message-preview .auth-message-bubble { --tg-surface: #eef4e9f7; margin: 0; background: var(--tg-surface); border: 0; border-radius: 24px 24px 24px 6px; box-shadow: 0 7px 25px #08261a16; }
.auth-message-body { padding: 19px 20px 15px; }
.auth-message-body h3 { margin: 0; color: #244936; font-size: 19px; font-weight: 650; line-height: 1.35; letter-spacing: -.025em; }
.auth-message-body [data-auth-message-title] { display: inline-grid; min-width: 0; max-width: 100%; }
.auth-message-body [data-auth-message-title-text] { grid-area: 1 / 1; min-height: 1.35em; }
.auth-message-body p { margin: 0 0 14px; color: #365c41; font-size: 14px; line-height: 1.65; }
.auth-message-body .auth-message-code-label { margin-bottom: 9px; font-size: 13px; }
.auth-message-code { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-bottom: 18px; font-variant-numeric: tabular-nums; user-select: text; }
.auth-message-code > span { display: grid; place-items: center; min-width: 0; padding: 12px 0; border-radius: 9px; background: #dfead7; color: #2c6140; font-size: clamp(25px, 2.2vw, 32px); font-weight: 650; line-height: 1; }
.auth-message-body .auth-message-lastline { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: last baseline; gap: 8px; margin-bottom: 0; color: #526d49; font-size: 12px; line-height: 1.65; }
.auth-message-lastline time { color: #526d49; font-size: 10px; font-weight: 400; line-height: inherit; font-variant-numeric: tabular-nums; white-space: nowrap; }
.auth-message-preview .auth-message-keyboard { grid-template-columns: minmax(0, 1fr); margin-top: 8px; }
.auth-message-preview .auth-message-keyboard .telegram-menu-button { min-height: 45px; gap: 8px; padding: 11px 12px; background-color: #e2ecd9; background-image: none; color: #2d573a; font-size: 14px; }
.auth-message-preview .auth-message-keyboard .telegram-menu-button:hover { background-color: #d9e6cf; }
.auth-message-preview .auth-message-keyboard .telegram-menu-button:active { background-color: #cddfc1; }
.auth-message-keyboard .ui-icon { width: 20px; height: 20px; flex: 0 0 20px; }
/* Original tgmacicons copy animation, converted from TGS to transparent WebM. */
.auth-message-copy-icon { position: relative; display: inline-block; width: 26px; height: 26px; flex: 0 0 26px; pointer-events: none; }
.auth-message-copy-icon > :is(img, video) { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; filter: brightness(0) saturate(100%) invert(20%) sepia(15%) saturate(1747%) hue-rotate(101deg) brightness(91%); }
.auth-message-copy-icon > video { opacity: 0; }
.auth-message-copy-icon[data-playing='true'] > img { opacity: 0; }
.auth-message-copy-icon[data-playing='true'] > video { opacity: 1; }
.auth-message-status { position: absolute; bottom: 5px; inset-inline: 28px; min-height: 0; margin: 0; padding: 0; color: #edf4e8; font-size: 11px; line-height: 18px; text-align: center; text-shadow: 0 1px 3px #08261a; }
.auth-message-help { position: relative; display: inline-flex; flex: 0 0 28px; vertical-align: middle; }
.auth-message-preview .auth-message-help-trigger { display: grid; place-items: center; width: 28px; height: 28px; padding: 4px; border: 0; border-radius: 0; background: transparent; color: #55764b; cursor: pointer; }
.auth-message-help-trigger .ui-icon { width: 20px; height: 20px; }
.auth-message-preview .auth-message-help-trigger:hover,
.auth-message-preview .auth-message-help-trigger[aria-expanded='true'] { background: transparent; }
.auth-message-help-content { position: absolute; top: calc(100% + 8px); right: 0; z-index: 8; width: min(310px, calc(100vw - 48px)); padding: 15px; border: 1px solid #c2d3b5; border-radius: 13px; background: #f3f7ed; color: #526c49; box-shadow: 0 10px 28px #22482c12; font-size: 12px; font-weight: 400; letter-spacing: 0; line-height: 1.65; white-space: normal; overflow-wrap: anywhere; }
.auth-message-help-content[hidden], .auth-message-help-content [hidden] { display: none !important; }
.auth-message-help-content[data-placement='top'] { top: auto; bottom: calc(100% + 8px); }
.auth-message-help-content > strong { color: #365b3e; font-size: 13px; font-weight: 650; }
.auth-message-help-content p { margin: 9px 0; font-size: inherit; line-height: inherit; }
.auth-message-help-content code { display: block; padding: 7px 8px; border-radius: 7px; background: #e5eedc; color: #365b3e; font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }
.auth-message-help-content a, .auth-message-preview .auth-message-command-copy { display: inline-block; margin-top: 9px; padding: 0; border: 0; border-radius: 0; background: transparent; color: #315e3a; font: inherit; font-weight: 650; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.auth-message-preview :is(button, a):focus-visible { outline: 2px solid #6a8b5e; outline-offset: 3px; }
/* Reserve the complete conversation while the outgoing request awaits its reply. */
.auth-message-preview :is(.auth-message-sender, .auth-message-chat) {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 260ms ease-out, transform 260ms cubic-bezier(.2,.7,.3,1), visibility 0s;
}
.auth-message-preview[data-auth-message-stage='request'] :is(.auth-message-sender, .auth-message-chat) {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.auth-message-preview:not([data-auth-message-stage='example'])[data-auth-message-command=''] .auth-message-outgoing { visibility: hidden; }
.auth-message-preview:not([data-auth-message-command='']) .auth-message-request code { white-space: normal; }
@media (max-width: 600px) {
  .auth-message-preview { max-width: 440px; min-height: 0; padding: 80px 14px 30px; border-radius: 23px; }
  .auth-message-preview .auth-message-outgoing { max-width: calc(100% - 16px); }
  .auth-message-request code { font-size: 13px; }
  .auth-message-sender { gap: 8px; }
  .auth-message-heading { margin-bottom: 16px; }
  .auth-message-body { padding: 17px 16px 14px; }
  .auth-message-body h3 { font-size: 18px; }
  .auth-message-code { gap: 5px; }
  .auth-message-code > span { padding-block: 11px; font-size: 27px; }
  .auth-message-sender strong { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-message-preview *, .auth-message-preview *::before, .auth-message-preview *::after { animation: none !important; transition: none !important; }
}

.auth-message-preview[data-auth-message-expired='true'] :is(.auth-message-request, .auth-message-code > span) { background: #e1e5df; color: #899187; }
.auth-message-preview[data-auth-message-expired='true'] .telegram-menu-button { background: #e1e5df; color: #899187; cursor: default; }
.auth-message-preview[data-auth-message-expired='true'] .auth-message-copy-icon { opacity: .4; }
