.ios-a2hs-path {
  display: inline;
}

.ios-more-menu-icon {
  width: 28px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin: 0 3px;
  border: 1px solid rgba(var(--color-brand-rgb), 0.3);
  border-radius: 999px;
  background: rgba(var(--color-brand-rgb), 0.12);
  color: var(--color-brand-dark);
  vertical-align: middle;
}

.ios-more-menu-icon i {
  width: 3px;
  height: 3px;
  display: block;
  border-radius: 50%;
  background: currentColor;
}

.ios-a2hs-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 5px;
  color: var(--color-brand-dark, #432fa5);
  vertical-align: middle;
}

.ios-a2hs-arrow svg {
  width: 10px;
  height: 10px;
  display: block;
  flex: 0 0 10px;
}

.setup-ios-guide .ios-more-menu-icon {
  width: 26px;
  height: 20px;
  vertical-align: middle;
}

.setup-action-zone-a2hs {
  min-width: 0;
  flex: 1 1 auto;
}

.setup-ios-guide {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  justify-content: flex-start;
  overflow: hidden;
  color: #fff;
  padding-inline: 12px;
}

.setup-ios-guide .setup-chip-icon {
  flex: 0 0 15px;
}

.setup-ios-marquee {
  min-width: 0;
  min-height: 31px;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  overflow: hidden;
}

.setup-ios-marquee-track {
  width: max-content;
  min-height: 31px;
  display: flex;
  align-items: center;
  gap: 48px;
  transform: translateX(0);
}

.setup-ios-marquee-item {
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  color: inherit;
  line-height: 1;
  white-space: nowrap;
}

.setup-ios-guide .ios-a2hs-path {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  vertical-align: middle;
}

.setup-ios-guide .ios-a2hs-arrow {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.setup-ios-marquee-item.is-copy {
  display: none;
}

.setup-ios-marquee.is-overflowing .setup-ios-marquee-track {
  animation: setup-ios-guide-marquee var(--setup-ios-marquee-duration, 12s) linear infinite;
  will-change: transform;
}

.setup-ios-marquee.is-overflowing .setup-ios-marquee-item.is-copy {
  display: inline-flex;
}

.setup-ios-guide .ios-a2hs-arrow {
  color: inherit;
  opacity: 0.78;
}

.setup-ios-guide .ios-more-menu-icon {
  border-color: rgb(255 255 255 / 42%);
  background: rgb(255 255 255 / 16%);
  color: inherit;
}

@keyframes setup-ios-guide-marquee {
  0%,
  16% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(calc(-50% - 24px));
  }
}

/* app.css（vite ビルド）に .visually-hidden が無いビルドでも崩れないよう、
   このファイルが使う範囲だけスコープ付きで再定義しておく。 */
.ios-a2hs-path .visually-hidden,
.ios-a2hs-guide-modal .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── 「くわしい手順を見る」トリガー ─────────────────────────── */

.ios-a2hs-guide-link {
  display: inline-block;
  margin: 0;
  padding: 0;
  border: 0;
  appearance: none;
  background: none;
  color: var(--color-brand-dark, #432fa5);
  font: inherit;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.ios-a2hs-guide-link:focus-visible {
  outline: 3px solid rgba(67, 47, 165, 0.28);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── 3 ステップ図解モーダル（Safari / Chrome 2 タブ） ─────────── */

.ios-a2hs-guide-modal[hidden] {
  display: none !important;
}

body.is-ios-a2hs-guide-open {
  overflow: hidden;
}

.ios-a2hs-guide-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  font-family: inherit;
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.ios-a2hs-guide-modal.is-visible {
  opacity: 1;
  visibility: visible;
}

.ios-a2hs-guide-modal__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  appearance: none;
  background: rgba(25, 20, 45, 0.48);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  cursor: default;
}

.ios-a2hs-guide-modal__dialog {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: min(100%, 430px);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px 22px 20px;
  border: 1px solid rgba(66, 48, 165, 0.12);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 70px rgba(31, 23, 75, 0.28);
  color: #20202a;
  transform: translateY(14px) scale(0.97);
  opacity: 0;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), opacity 180ms ease;
}

.ios-a2hs-guide-modal.is-visible .ios-a2hs-guide-modal__dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.ios-a2hs-guide-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  appearance: none;
  background: #f2f0f8;
  color: #6d687c;
  cursor: pointer;
}

.ios-a2hs-guide-modal__close svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.ios-a2hs-guide-modal__eyebrow {
  margin: 0 48px 6px 0;
  color: #4932a7;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

.ios-a2hs-guide-modal__title {
  margin: 0;
  font-size: clamp(20px, 5.6vw, 23px);
  font-weight: 800;
  line-height: 1.4;
}

.ios-a2hs-guide-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 16px;
  padding: 4px;
  border-radius: 14px;
  background: #f2f0f8;
}

.ios-a2hs-guide-tab {
  min-height: 40px;
  margin: 0;
  padding: 8px 6px;
  border: 0;
  border-radius: 11px;
  appearance: none;
  background: none;
  color: #6d687c;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.3;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.ios-a2hs-guide-tab.is-active {
  background: #fff;
  color: #432fa5;
  box-shadow: 0 3px 10px rgba(31, 23, 75, 0.12);
}

.ios-a2hs-guide-tab:focus-visible,
.ios-a2hs-guide-modal__close:focus-visible,
.ios-a2hs-guide-modal__done:focus-visible {
  outline: 3px solid rgba(67, 47, 165, 0.28);
  outline-offset: 2px;
}

.ios-a2hs-guide-steps {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.ios-a2hs-guide-steps[hidden] {
  display: none !important;
}

.ios-a2hs-guide-steps li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: start;
  padding: 13px 14px;
  border: 1px solid rgba(66, 48, 165, 0.1);
  border-radius: 16px;
  background: #faf9fd;
}

.ios-a2hs-guide-step-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #432fa5;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.ios-a2hs-guide-step-body {
  min-width: 0;
  padding-top: 3px;
}

.ios-a2hs-guide-step-body p {
  margin: 0;
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.7;
}

.ios-a2hs-guide-step-body strong {
  color: #432fa5;
  font-weight: 800;
}

.ios-a2hs-guide-step-note {
  margin-top: 5px !important;
  color: #6e6b77;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  line-height: 1.65 !important;
}

.ios-a2hs-guide-step-body .ios-more-menu-icon {
  border-color: rgba(67, 47, 165, 0.28);
  background: rgba(67, 47, 165, 0.1);
  color: #432fa5;
}

.ios-a2hs-share-icon {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin: 0 2px;
  border: 1px solid rgba(67, 47, 165, 0.28);
  border-radius: 8px;
  background: rgba(67, 47, 165, 0.1);
  color: #432fa5;
  vertical-align: middle;
}

.ios-a2hs-share-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 共有シートの「ホーム画面に追加」行を模したチップ */
.ios-a2hs-guide-menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #e3e0ee;
  border-radius: 12px;
  background: #fff;
  color: #20202a;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
}

.ios-a2hs-guide-menu-row svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #55525f;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.ios-a2hs-guide-modal__done {
  box-sizing: border-box;
  width: 100%;
  min-height: 50px;
  margin: 18px 0 0;
  padding: 12px 18px;
  border: 1px solid #d9d6e4;
  border-radius: 16px;
  appearance: none;
  background: #fff;
  color: #514d5f;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  cursor: pointer;
}

@media (max-width: 359px) {
  .ios-a2hs-guide-modal {
    padding-inline: 14px;
  }

  .ios-a2hs-guide-modal__dialog {
    padding: 24px 16px 16px;
    border-radius: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ios-a2hs-guide-modal,
  .ios-a2hs-guide-modal__dialog,
  .ios-a2hs-guide-tab {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .setup-ios-guide {
    min-height: 31px;
    padding-block: 7px;
  }

  .setup-ios-marquee {
    overflow: visible;
  }

  .setup-ios-marquee-track,
  .setup-ios-marquee.is-overflowing .setup-ios-marquee-track {
    width: auto;
    animation: none;
    transform: none;
  }

  .setup-ios-marquee-item {
    min-height: 0;
    display: block;
    line-height: 1.4;
    white-space: normal;
  }

  .setup-ios-guide .ios-a2hs-path {
    display: inline;
    line-height: inherit;
  }

  .setup-ios-marquee-item.is-copy {
    display: none !important;
  }
}
