:root {
  --otd-ios-safe-top: env(safe-area-inset-top, 0px);
  --otd-ios-safe-right: env(safe-area-inset-right, 0px);
  --otd-ios-safe-bottom: env(safe-area-inset-bottom, 0px);
  --otd-ios-safe-left: env(safe-area-inset-left, 0px);
}

html.otd-is-standalone,
html.otd-is-standalone body {
  min-height: 100%;
  min-height: 100dvh;
  overscroll-behavior-y: none;
}

html.otd-is-standalone body {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

html.otd-is-standalone .otd-floating-brand,
html.otd-is-standalone .otd-floating-join {
  top: calc(18px + var(--otd-ios-safe-top));
}

html.otd-is-standalone .otd-floating-nav {
  bottom: calc(12px + var(--otd-ios-safe-bottom));
}

html.otd-is-standalone .otd-site-footer {
  padding-bottom: calc(32px + var(--otd-ios-safe-bottom));
}

.otd-ios-install-toast {
  position: fixed;
  z-index: 100020;
  left: max(14px, var(--otd-ios-safe-left));
  right: max(14px, var(--otd-ios-safe-right));
  bottom: calc(98px + var(--otd-ios-safe-bottom));
  display: grid;
  grid-template-columns: 46px minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  max-width: 520px;
  margin-inline: auto;
  padding: 12px 12px 12px 14px;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 22px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 18px 55px rgba(0,0,0,.18);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  font-family: -apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;
}

.otd-ios-install-toast[hidden],
.otd-ios-install-sheet[hidden],
.otd-ios-install-backdrop[hidden] { display: none !important; }

.otd-ios-install-toast img { width: 46px; height: 46px; border-radius: 12px; }
.otd-ios-install-toast div { display: grid; gap: 3px; min-width: 0; }
.otd-ios-install-toast strong { font-size: 15px; letter-spacing: -.02em; }
.otd-ios-install-toast span { overflow: hidden; color: #6c6c6c; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.otd-ios-install-toast__action { min-height: 38px; padding: 0 17px; border: 0; border-radius: 999px; background: #111; color: #fff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.otd-ios-install-toast__close { position: absolute; top: -8px; right: -7px; width: 24px; height: 24px; padding: 0; border: 1px solid #ddd; border-radius: 999px; background: #fff; color: #555; font-size: 17px; line-height: 1; cursor: pointer; }

.otd-ios-install-backdrop {
  position: fixed;
  z-index: 100030;
  inset: 0;
  background: rgba(0,0,0,.48);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.otd-ios-install-sheet {
  position: fixed;
  z-index: 100040;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: calc(100dvh - 28px);
  overflow: auto;
  padding: 12px 24px calc(30px + var(--otd-ios-safe-bottom));
  border-radius: 30px 30px 0 0;
  background: #fff;
  color: #111;
  text-align: center;
  font-family: -apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;
  animation: otd-ios-sheet-in .28s cubic-bezier(.2,.8,.2,1);
}

@keyframes otd-ios-sheet-in { from { transform: translateY(105%); } to { transform: translateY(0); } }
.otd-ios-install-open { overflow: hidden; }
.otd-ios-install-sheet__handle { width: 42px; height: 5px; margin: 0 auto 26px; border-radius: 99px; background: #d7d7d7; }
.otd-ios-install-sheet__close { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; border: 0; border-radius: 999px; background: #f1f1f1; color: #111; font-size: 25px; line-height: 1; }
.otd-ios-install-sheet__icon { width: 82px; height: 82px; border-radius: 22px; box-shadow: 0 10px 35px rgba(0,0,0,.12); }
.otd-ios-install-sheet h2 { margin: 20px 0 7px; font-size: clamp(26px,7vw,36px); letter-spacing: -.05em; }
.otd-ios-install-sheet > p { margin: 0 auto 26px; max-width: 420px; color: #6a6a6a; line-height: 1.5; }
.otd-ios-install-sheet ol { display: grid; gap: 10px; max-width: 520px; margin: 0 auto; padding: 0; list-style: none; text-align: left; }
.otd-ios-install-sheet li { display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 12px; padding: 14px; border: 1px solid #e5e5e5; border-radius: 18px; background: #fafafa; font-size: 15px; line-height: 1.4; }
.otd-ios-step-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: #111; color: #fff; }
.otd-ios-step-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.otd-ios-install-page {
  width: min(100% - 32px,760px);
  margin: 110px auto 150px;
  padding: clamp(28px,6vw,64px);
  border: 1px solid #e2e2e2;
  border-radius: 34px;
  background: #fff;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,.06);
}
.otd-ios-install-page > img { width: 92px; height: 92px; border-radius: 24px; }
.otd-ios-install-page__eyebrow { margin: 22px 0 8px; color: #777; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.otd-ios-install-page h1 { margin: 0; font-size: clamp(38px,8vw,68px); letter-spacing: -.065em; }
.otd-ios-install-page > p:not(.otd-ios-install-page__eyebrow) { max-width: 540px; margin: 18px auto 30px; color: #666; font-size: 18px; line-height: 1.55; }
.otd-ios-install-page__steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 0 0 28px; }
.otd-ios-install-page__steps div { display: grid; gap: 10px; min-height: 126px; place-content: center; padding: 18px; border: 1px solid #e4e4e4; border-radius: 20px; background: #fafafa; }
.otd-ios-install-page__steps strong { display: grid; place-items: center; width: 36px; height: 36px; margin: auto; border-radius: 50%; background: #111; color: #fff; }
.otd-ios-install-page__button { display: inline-flex; min-height: 52px; align-items: center; justify-content: center; padding: 0 28px; border-radius: 999px; background: #111; color: #fff; font-weight: 800; }

@media (min-width: 769px) {
  .otd-ios-install-toast,
  .otd-ios-install-backdrop,
  .otd-ios-install-sheet { display: none !important; }
}

@media (max-width: 620px) {
  .otd-ios-install-page { margin-top: 86px; padding: 30px 20px; border-radius: 26px; }
  .otd-ios-install-page__steps { grid-template-columns: 1fr; }
  .otd-ios-install-page__steps div { min-height: 92px; }
}
