@media (display-mode: standalone) {
  html {
    touch-action: manipulation;
  }
  body {
    padding-top: env(safe-area-inset-top);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    overscroll-behavior-y: none;
  }
  button,
  a,
  .sf-nav,
  .sf-chip,
  img {
    -webkit-tap-highlight-color: transparent;
  }
  button,
  .sf-nav,
  .sf-chip {
    -webkit-touch-callout: none;
    user-select: none;
  }
  input,
  textarea,
  select {
    font-size: 16px !important;
  }
}

.lm-app-splash {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 4000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--lm-app-splash, #fff);
  color: var(--lm-app-splash-ink, #111827);
  text-align: center;
  opacity: 1;
  transition: opacity 0.24s ease;
}
/* Only the first page of a cold launch. The head script adds lm-splash-on; store-app.js fades it out. */
html.lm-splash-on .lm-app-splash { display: flex; }
.lm-app-splash.is-out { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .lm-app-splash { transition: none; }
}
.lm-app-splash__logo {
  width: min(52vw, 240px);
  height: auto;
  max-height: 40vh;
  object-fit: contain;
}
.lm-app-splash__name {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.lm-app-splash__brand {
  position: absolute;
  inset-inline: 0;
  bottom: calc(28px + env(safe-area-inset-bottom));
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.55;
}
.lm-app-offline {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lm-app-offline__card {
  width: min(100%, 420px);
  text-align: center;
}
.lm-app-offline__logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
}
.lm-install-invite {
  position: fixed;
  z-index: 40;
  left: 10px;
  right: 10px;
  top: calc(8px + env(safe-area-inset-top));
  bottom: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 96px;
  padding: 0 14px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.22);
  color: #111827;
}
.lm-install-invite[hidden] { display: none !important; }
.lm-install-invite__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  flex: none;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.12);
}
.lm-install-invite__icon--mark,
.lm-install-head__icon--mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--lm-install, #0f766e);
  color: #fff;
  font-weight: 700;
}
.lm-install-invite__copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lm-install-invite__copy strong {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.2;
}
.lm-install-invite__copy span {
  font-size: 13px;
  font-weight: 400;
  color: #6b7280;
}
.lm-install-invite__btn,
.lm-install-primary {
  border: 0;
  background: var(--lm-install, #0f766e);
  color: var(--lm-install-ink, #fff);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.lm-install-invite__close {
  position: absolute;
  top: 6px;
  inset-inline-end: 8px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: #f3f4f6;
  color: #9ca3af;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
/* 44px hit area around the small close dot */
.lm-install-invite__close::before { content: ""; position: absolute; inset: -12px; }
.lm-install-invite {
  transform: translateY(-140%);
  transition: transform 0.42s cubic-bezier(0.32, 0.72, 0, 1);
  touch-action: pan-x;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
}
.lm-install-invite[dir="rtl"], [dir="rtl"] .lm-install-invite { font-family: -apple-system, "IBM Plex Sans Arabic", "SF Arabic", system-ui, sans-serif; }
.lm-install-invite.is-in { transform: translateY(0); }
.lm-install-invite.is-drag { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .lm-install-invite { transition: none; }
}
.lm-install-invite { z-index: 1600; position: fixed; }
.lm-install-sheet.sf-promo-popup { z-index: 1600; }
.lm-install-hint {
  margin: 8px 0 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #111827;
}
.lm-install-hint::before {
  content: "↓ ";
}
.lm-install-sheet.is-ipad-hint .lm-install-hint::before {
  content: "↗ ";
}
.lm-install-secondary {
  width: 100%;
  height: 44px;
  margin-top: 4px;
  border: 0;
  border-radius: 14px;
  background: #f3f4f6;
  color: #111827;
  font-weight: 650;
  cursor: pointer;
}
.lm-install-invite__btn {
  height: 40px;
  padding: 0 18px;
  border-radius: 20px;
  font-size: 15px;
  flex: none;
}
.lm-install-sheet.sf-promo-popup {
  align-items: flex-end;
  padding: 8px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
}
.lm-install-sheet .lm-install-dialog {
  width: min(100%, 28rem);
  border-radius: 30px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.18);
  padding: 28px 18px 8px;
}
.lm-install-grabber {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 38px;
  height: 5px;
  margin-left: -19px;
  border-radius: 3px;
  background: #d1d5db;
}
.lm-install-close {
  position: absolute;
  top: 18px;
  inset-inline-end: 16px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.lm-install-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.lm-install-head__icon {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  object-fit: cover;
  flex: none;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.12);
}
.lm-install-head__title {
  margin: 0;
  font-size: 18.5px;
  font-weight: 700;
  letter-spacing: -0.35px;
  color: #111827;
  line-height: 1.2;
}
.lm-install-head__sub,
.lm-install-lead {
  margin: 2px 0 0;
  font-size: 13.5px;
  color: #6b7280;
}
.lm-install-kicker {
  margin: 0 0 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--lm-install, #0f766e);
}
.lm-install-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}
.lm-install-steps li {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  font-size: 14.5px;
  color: #111827;
}
.lm-install-steps li > span:first-child {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--lm-install, #0f766e);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
}
.lm-install-key {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 7px;
  border-radius: 6px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  font-size: 12.5px;
  font-weight: 600;
  color: #111827;
  vertical-align: middle;
}
.lm-install-step {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  position: static;
  width: auto;
  height: auto;
  background: transparent;
  color: #111827;
  font-size: 14.5px;
  font-weight: 400;
}
.lm-install-glyph {
  width: 14px;
  height: 14px;
  display: block;
}
.lm-install-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 50px;
  margin-top: 12px;
  border-radius: 14px;
  font-size: 16.5px;
}
.lm-install-later {
  display: block;
  width: 100%;
  margin: 8px 0 6px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: #6b7280;
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
}
.lm-notify-scrim {
  position: fixed;
  inset: 0;
  z-index: 1700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.32);
  opacity: 0;
  transition: opacity 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
}
[dir="rtl"] .lm-notify-scrim { font-family: -apple-system, "IBM Plex Sans Arabic", "SF Arabic", system-ui, sans-serif; }
.lm-notify-scrim[hidden] { display: none !important; }
.lm-notify-scrim.is-open { opacity: 1; }
.lm-notify-alert {
  width: min(270px, 100%);
  padding: 20px 16px 14px;
  border-radius: 26px;
  background: rgba(242, 242, 247, 0.96);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  text-align: center;
  color: #000;
  transform: scale(1.06);
  transition: transform 0.24s cubic-bezier(0.32, 0.72, 0, 1);
}
.lm-notify-scrim.is-open .lm-notify-alert { transform: scale(1); }
@media (prefers-reduced-motion: reduce) {
  .lm-notify-scrim, .lm-notify-alert { transition: none; }
}
.lm-notify-alert__error { color: #b91c1c; font-weight: 500; }
.lm-notify-alert strong {
  display: block;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.4px;
  line-height: 1.3;
}
.lm-notify-alert p {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.35;
}
.lm-notify-alert__actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.lm-notify-alert__actions button {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 0;
  border-radius: 22px;
  font-size: 16px;
  cursor: pointer;
}
.lm-notify-alert__deny {
  background: rgba(120, 120, 128, 0.16);
  color: #000;
  font-weight: 500;
}
.lm-notify-alert__allow {
  background: rgba(10, 132, 255, 0.14);
  color: #0a84ff;
  font-weight: 600;
}
.lm-install-sheet .sf-promo-popup__dialog {
  padding: 1.25rem 1.15rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.lm-install-sheet .btn {
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
}
.lm-push-dock {
  position: fixed;
  z-index: 30;
  inset-inline: 16px;
  bottom: calc(76px + env(safe-area-inset-bottom));
  min-height: 48px;
}
.lm-install-point {
  position: fixed;
  z-index: 3600;
  bottom: calc(12px + env(safe-area-inset-bottom));
  inset-inline-start: 16px;
  padding: 8px 12px;
  background: #0f766e;
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
}
.lm-app-settings label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 650;
}
.lm-app-settings input[type="text"],
.lm-app-settings input[name="short_name"],
.lm-app-settings input[type="color"] {
  min-height: 48px;
  font-size: 16px;
}
.lm-app-settings__previews {
  display: flex;
  gap: 16px;
}
.lm-app-settings__previews img {
  border-radius: 16px;
}
.lm-install-chip {
  position: fixed;
  z-index: 40;
  bottom: 1.25rem;
  inset-inline-end: 1.25rem;
  min-height: 44px;
  padding: 0.55rem 0.9rem;
  border: 0;
  border-radius: 999px;
  background: #0f766e;
  color: #fff;
  font: inherit;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.28);
}
@media (max-width: 1023px) {
  [data-lm-install-chip] { display: none !important; }
}
.lm-app-manage-link { display: none; margin: 0.5rem 0; }
@media (display-mode: standalone) {
  .lm-app-manage-link { display: block; }
}
html.lm-standalone .lm-app-manage-link { display: block; }
.lm-app-notify__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  font-weight: 650;
}
.lm-app-offline__brand {
  margin-top: 24px;
  font-size: 0.85rem;
}

.lm-app-back {
  position: fixed;
  z-index: 60;
  top: calc(10px + env(safe-area-inset-top));
  inset-inline-start: 12px;
  width: 44px;
  height: 44px;
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  background: rgba(250, 250, 252, 0.82);
  backdrop-filter: blur(14px) saturate(1.6);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.14), inset 0 0 0 0.5px rgba(255, 255, 255, 0.9);
  color: #111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
[dir="rtl"] .lm-app-back svg { transform: scaleX(-1); }
.lm-app-notify__hint {
  margin: 4px 0 10px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #6b7280;
}
