:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --line: #d8dde8;
  --ink: #111827;
  --soft: #5e6b84;
  --primary: #2f6bff;
  --primary-soft: #eaf0ff;
  --ok: #1c9b62;
  --danger: #d13a50;
  --font: Inter, "Segoe UI", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.75rem;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

@media (min-width: 920px) {
  html {
    scroll-padding-top: 4.5rem;
  }
}

body {
  min-height: 100dvh;
  min-height: 100svh;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

a,
button {
  -webkit-tap-highlight-color: rgba(47, 107, 255, 0.12);
}

main {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 1220px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.2rem 2rem;
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
  flex: 1;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(55% 40% at 10% -10%, rgba(47, 107, 255, 0.16), transparent 70%),
    radial-gradient(45% 35% at 90% 0%, rgba(28, 155, 98, 0.08), transparent 75%);
}

.alert {
  position: relative;
  z-index: 10;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0.75rem 1.2rem 0;
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  row-gap: 0.45rem;
}

.alert span {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a641a;
  border: 1px solid #e6cf9b;
  background: #fff5db;
  padding: 0.18rem 0.4rem;
}

.alert p {
  flex: 1;
  min-width: min(100%, 12rem);
  font-size: 0.78rem;
  color: #8a641a;
  line-height: 1.4;
}

.alert button {
  border: 1px solid #e6cf9b;
  background: #fff5db;
  min-width: 2.75rem;
  min-height: 2.75rem;
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  flex-shrink: 0;
}

.alert[hidden] {
  display: none;
}

.header {
  position: sticky;
  top: 0;
  z-index: 9;
  min-width: 0;
  max-width: 1220px;
  width: 100%;
  margin: 0 auto;
  padding: 0.65rem 1.1rem 0.75rem;
  padding-left: max(1.1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1.1rem, env(safe-area-inset-right, 0px));
  display: grid;
  gap: 0.5rem 0.65rem;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "brand end";
  align-items: center;
  background: rgba(245, 246, 250, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(210, 218, 235, 0.65);
}

.header__brand {
  grid-area: brand;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.header__brand strong {
  display: block;
  font-size: 1rem;
  line-height: 1.2;
}

.header__brand small {
  color: var(--soft);
  font-size: 0.74rem;
}

.header__end {
  grid-area: end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
}

.header__menu-btn {
  display: none;
  width: 2.65rem;
  height: 2.65rem;
  border: 1px solid #c9d2e4;
  border-radius: 10px;
  background: var(--surface);
  color: #33415c;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.header__menu-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.header__menu-bars {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: #33415c;
  border-radius: 1px;
  position: relative;
  transition: background 0.2s ease;
}

.header__menu-bars::before,
.header__menu-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 1.1rem;
  height: 2px;
  background: #33415c;
  border-radius: 1px;
  transition: transform 0.2s ease, top 0.2s ease;
}

.header__menu-bars::before {
  top: -6px;
}

.header__menu-bars::after {
  top: 6px;
}

body.is-header-menu-open .header__menu-bars {
  background: transparent;
}

body.is-header-menu-open .header__menu-bars::before {
  top: 0;
  transform: rotate(45deg);
}

body.is-header-menu-open .header__menu-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.header__scrim {
  position: fixed;
  inset: 0;
  z-index: 199;
  width: 100%;
  min-height: 100%;
  min-height: 100dvh;
  background: rgba(10, 16, 28, 0.48);
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

body.is-header-menu-open .header__scrim {
  opacity: 1;
  pointer-events: auto;
}

.header__scrim[hidden] {
  display: none;
}


.header__nav {
  grid-area: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  z-index: 200;
  margin: 0;
}

.header__nav-mhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.6rem 0.75rem;
  padding-top: max(0.75rem, env(safe-area-inset-top, 0px));
  font-weight: 700;
  font-size: 0.95rem;
  color: #1a2130;
  border-bottom: 1px solid #e0e6f2;
  flex-shrink: 0;
}

.header__nav-mclose {
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: #eef2fb;
  border-radius: 8px;
  color: #4a5a7a;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header__nav-links {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0.35rem 0.45rem 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  gap: 0.1rem;
}

.header__nav a {
  color: #3d4a64;
  text-decoration: none;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  min-height: 2.9rem;
  display: flex;
  align-items: center;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
}

.header__nav a:hover {
  background: #f0f4fd;
  color: #1a4ad4;
}

.header__nav a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 8px;
}

.header__cta {
  flex-shrink: 0;
  min-height: 2.6rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  font-size: 0.85rem;
}

@media (max-width: 919px) {
  .header__menu-btn {
    display: inline-flex;
  }

  .header__nav {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    width: min(20rem, 100%);
    max-width: 100%;
    min-height: 100dvh;
    min-height: 100svh;
    max-height: 100dvh;
    max-height: 100svh;
    background: #f9fafc;
    box-shadow: -16px 0 48px rgba(12, 20, 40, 0.22);
    transform: translate3d(100%, 0, 0);
    transition: transform 0.3s ease;
    overflow: hidden;
    padding: 0;
    backface-visibility: hidden;
  }

  body.is-header-menu-open .header__nav {
    transform: translateX(0);
  }
}

@media (min-width: 920px) {
  .header {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav end";
    gap: 1rem;
    padding: 0.85rem 1.2rem 0.9rem;
    padding-left: max(1.2rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.2rem, env(safe-area-inset-right, 0px));
  }

  .header__nav {
    position: static;
    grid-area: nav;
    flex-direction: row;
    min-height: 0;
    width: auto;
    background: transparent;
    box-shadow: none;
    transform: none;
    transition: none;
    overflow: visible;
  }

  .header__nav-mhead {
    display: none;
  }

  .header__nav-links {
    flex-direction: row;
    flex: none;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
    gap: 0.6rem 1.1rem;
  }

  .header__nav a {
    min-height: 2.5rem;
    font-size: 0.82rem;
    padding: 0.45rem 0.1rem;
    color: var(--soft);
  }

  .header__nav a:hover {
    background: transparent;
    color: #1a4ed1;
  }

  .header__scrim {
    display: none !important;
  }
}

body.is-header-menu-open {
  touch-action: none;
}

.btn {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  padding: 0.62rem 0.84rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  border-radius: 10px;
}

.btn--line {
  background: var(--surface);
  color: var(--primary);
}

.btn--ghost {
  background: transparent;
  color: #5c6678;
  border-color: #c9d2e4;
  font-weight: 600;
}

.intro {
  display: grid;
  gap: 1rem;
}

@media (min-width: 1000px) {
  .intro {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.intro__copy,
.intro__scan {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 1.1rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 18px 36px rgba(21, 33, 62, 0.08);
}

.intro__scan {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.intro__scan__body,
.intro__scan > .scan-state-layer {
  grid-row: 1;
  grid-column: 1;
  justify-self: stretch;
  min-width: 0;
  width: 100%;
}

.intro__scan__body {
  align-self: start;
}

.intro__scan--error-open,
.intro__scan:has(.scan-state-layer--error) {
  z-index: 2;
}

.intro__scan.is-processing .intro__scan__body {
  filter: blur(1.5px);
}

.eyebrow {
  font-size: 0.72rem;
  color: var(--primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}

.intro h1 {
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  margin-bottom: 0.75rem;
}

.intro__copy p {
  color: var(--soft);
  max-width: 60ch;
}

.pulse {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.pulse span {
  border: 1px solid #cfd8ee;
  background: #f8faff;
  border-radius: 999px;
  padding: 0.27rem 0.55rem;
  font-size: 0.74rem;
  color: #42506d;
}

.intro__scan h2 {
  margin-bottom: 0.2rem;
}

.scan-subtitle {
  color: #6a7793;
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.42rem;
  margin-bottom: 0.75rem;
}

.switch label {
  position: relative;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  display: block;
  text-align: center;
  border: 1px solid #cad4ec;
  border-radius: 10px;
  background: #f9fbff;
  padding: 0.52rem 0.45rem;
  font-size: 0.82rem;
  cursor: pointer;
}

.switch input:checked + span {
  background: var(--primary-soft);
  border-color: #9cb5ff;
  color: #1f4ed1;
}

.field {
  display: grid;
  gap: 0.3rem;
  margin-bottom: 0.72rem;
}

.field span {
  color: var(--soft);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field input {
  border: 1px solid #cad4ec;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  padding: 0.65rem 0.72rem;
}

.field input:focus {
  outline: none;
  border-color: #8caaf9;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.14);
}

.field:has(input[aria-invalid="true"]) input {
  border-color: var(--danger);
}

.intro__scan small {
  display: block;
  margin-top: 0.55rem;
  color: var(--soft);
  font-size: 0.74rem;
}

.scan-state-layer {
  position: relative;
  z-index: 5;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(7px);
  padding: 1.1rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  min-height: 0;
  min-width: 0;
  overflow: visible;
}

.scan-state-layer.scan-state-layer--error,
.scan-state-layer:has(.scan-state--error:not(.hidden)) {
  justify-content: flex-start;
  align-items: stretch;
  padding: 0.6rem 0.5rem;
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
}

.scan-state {
  width: 100%;
  max-width: 320px;
  text-align: center;
  border: 1px solid #ced8ef;
  border-radius: 14px;
  background: #ffffff;
  padding: 1rem 0.9rem;
  box-shadow: 0 12px 26px rgba(20, 34, 67, 0.12);
}

.scan-state__title {
  font-weight: 700;
  margin-top: 0.45rem;
  margin-bottom: 0.25rem;
}

.scan-state__text {
  color: var(--soft);
  font-size: 0.84rem;
}

.scan-state--error {
  max-width: 100%;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
  align-self: stretch;
}

.scan-error-panel {
  width: 100%;
  border: 1px solid #d4ddf0;
  border-left: 3px solid #b8324a;
  border-radius: 0 12px 12px 0;
  background: #ffffff;
  box-shadow: 0 4px 18px rgba(20, 34, 67, 0.09);
  padding: 0.75rem 0.85rem 0.45rem;
}

.scan-error-panel__footer {
  margin-top: 0.55rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e4e9f3;
  background: linear-gradient(to bottom, #fafbfd 0%, #fff 100%);
}

.scan-error-panel__code {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #5a6578;
}

.scan-error-code {
  color: #8a1c35;
}

.scan-error-sep {
  color: #b8c0d0;
  font-weight: 400;
}

.scan-error-reason {
  text-transform: uppercase;
  color: #6a7383;
  letter-spacing: 0.06em;
}

.scan-error-heading {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0.5rem 0 0.4rem;
  color: #1a2130;
  letter-spacing: -0.02em;
}

.scan-error-body {
  margin: 0;
  color: #5c6678;
  font-size: 0.8rem;
  line-height: 1.45;
  max-width: 52ch;
}

.scan-error-dl {
  margin: 0.5rem 0 0;
  padding: 0;
  width: 100%;
  border: 1px solid #e8ecf5;
  border-radius: 8px;
  background: #f9fbff;
  overflow: hidden;
}

.scan-error-dl__row {
  display: grid;
  grid-template-columns: minmax(4.5rem, 7.2rem) minmax(0, 1fr);
  column-gap: 0.75rem;
  align-items: baseline;
  margin: 0;
  padding: 0.45rem 0.6rem;
  border-top: 1px solid #e2e8f3;
  font-size: 0.76rem;
}

.scan-error-dl__row:first-child {
  border-top: none;
}

.scan-error-dl dt {
  margin: 0;
  color: #7a8499;
  font-weight: 600;
  line-height: 1.3;
}

.scan-error-dl__value {
  margin: 0;
  text-align: right;
  color: #1f2633;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
  font-weight: 500;
  word-break: break-all;
  line-height: 1.35;
}

.scan-state__actions {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.scan-state__actions--error {
  margin-top: 0;
  justify-content: stretch;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.4rem;
}

.scan-state__actions .btn {
  min-width: 0;
}

.scan-state--error .btn {
  width: 100%;
  min-height: 2.4rem;
  font-size: 0.8rem;
  padding: 0.5rem 0.4rem;
}

.method {
  margin-top: 2rem;
  display: grid;
  gap: 0.7rem;
}

@media (min-width: 920px) {
  .method {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.method article {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 0.9rem;
}

.method h3 {
  margin-bottom: 0.35rem;
}

.method p {
  color: var(--soft);
  font-size: 0.85rem;
}

.feature-grid {
  margin-top: 1.4rem;
  display: grid;
  gap: 0.7rem;
}

@media (min-width: 920px) {
  .feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.feature-grid article {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 0.9rem;
}

.feature-grid h3 {
  margin-bottom: 0.35rem;
}

.feature-grid ul {
  margin-left: 1rem;
  color: var(--soft);
  font-size: 0.84rem;
  line-height: 1.55;
}

.pricing {
  margin-top: 2rem;
}

.pricing__head {
  margin-bottom: 0.75rem;
}

.pricing__head h2 {
  margin-bottom: 0.2rem;
}

.pricing__head p {
  color: var(--soft);
}

.pricing__grid {
  display: grid;
  gap: 0.7rem;
}

@media (min-width: 920px) {
  .pricing__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.price-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 0.9rem;
}

.price-card__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #607298;
  margin-bottom: 0.25rem;
}

.price-card h3 {
  margin-bottom: 0.15rem;
}

.price-card__price {
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.price-card__note {
  color: var(--soft);
  font-size: 0.82rem;
  margin-bottom: 0.55rem;
}

.price-card ul {
  margin-left: 1rem;
  color: #4f5d79;
  font-size: 0.83rem;
  line-height: 1.5;
}

.price-card__cta {
  margin-top: 0.7rem;
  width: 100%;
}

.price-card--free {
  border-color: #9cb8ff;
  background: #f5f8ff;
}

.price-card--pro {
  border-color: #9fd8bd;
  background: #f2fcf6;
}

.news {
  margin-top: 2rem;
}

.news__head {
  margin-bottom: 0.7rem;
}

.news__head h2 {
  margin-bottom: 0.25rem;
}

.news__head p {
  color: var(--soft);
}

.news__grid {
  display: grid;
  gap: 0.7rem;
}

@media (min-width: 920px) {
  .news__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.news-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}

.news-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
}

.news-card__body {
  padding: 0.8rem;
}

.news-card__meta {
  color: #7583a1;
  font-size: 0.72rem;
  margin-bottom: 0.28rem;
}

.news-card h3 {
  font-size: 0.98rem;
  margin-bottom: 0.3rem;
}

.news-card p {
  color: var(--soft);
  font-size: 0.83rem;
}

.market {
  margin-top: 2rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 0.95rem;
}

.market__head {
  text-align: center;
  margin-bottom: 0.7rem;
}

.market__head p {
  color: var(--soft);
  font-size: 0.85rem;
}

.market__frame {
  border: 1px solid #c7d2eb;
  border-radius: 14px;
  overflow: hidden;
  height: 400px;
}

.market__frame iframe {
  width: 100%;
  height: 400px;
  border: 0;
  display: block;
}

.market__note {
  margin-top: 0.65rem;
  color: var(--soft);
  font-size: 0.75rem;
  text-align: center;
}

.market__note a {
  color: #1f4ed1;
}

.site-footer {
  border-top: 2px solid #d5ccbf;
  background: #f0ece4;
  margin-top: auto;
}

.site-footer__inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0.95rem 1.2rem 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.site-footer__inner p {
  color: #69625b;
  font-size: 0.75rem;
}

.site-footer__inner nav {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.site-footer__inner a {
  color: #2a2a2a;
  font-size: 0.82rem;
  text-decoration: underline;
}

.site-footer__inner a:hover {
  color: #0f4ad5;
}

.ios-legal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 16, 24, 0.66);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.ios-legal-backdrop {
  z-index: 130;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

#purchaseBackdrop {
  align-items: center;
  padding: 1rem;
}

.ios-legal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 4px solid #d7def1;
  border-top-color: #2f6bff;
  margin: 0 auto;
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.ios-legal-sheet {
  width: 100%;
  max-width: 860px;
  border: 1px solid #2f3d5b;
  border-radius: 16px;
  background: #0f1626;
  color: #edf2ff;
  overflow: hidden;
}

.ios-legal-sheet__bar {
  border-bottom: 1px solid #33466f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.65rem 0.75rem;
}

.ios-legal-sheet__done {
  border: 1px solid #4b67a1;
  border-radius: 8px;
  background: #17223a;
  color: #dbe6ff;
  padding: 0.3rem 0.52rem;
  cursor: pointer;
}

.ios-legal-sheet__scroll {
  overflow-y: auto;
  padding: 1rem;
  max-height: 80dvh;
}

.legal-doc {
  color: #bdcdeb;
  font-size: 0.87rem;
  line-height: 1.6;
}

.legal-doc__meta {
  color: #90a6d5;
  margin-bottom: 0.65rem;
}

.legal-doc h3 {
  color: #edf2ff;
  margin: 0.8rem 0 0.24rem;
}

.legal-doc p,
.legal-doc li {
  margin-bottom: 0.48rem;
}

.legal-doc ul {
  margin-left: 1rem;
}

.hidden {
  display: none !important;
}

.purchase-sheet {
  width: 100%;
  max-width: 560px;
  border: 1px solid #ccd5e9;
  border-radius: 14px;
  background: #ffffff;
  color: #1b2233;
  overflow: hidden;
  box-shadow: 0 22px 55px rgba(16, 27, 51, 0.22);
}

.purchase-sheet__bar {
  border-bottom: 1px solid #d8dfef;
  padding: 0.72rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.purchase-sheet__bar h2 {
  font-size: 1.02rem;
}

.purchase-sheet__close {
  border: 1px solid #b9c7e6;
  border-radius: 8px;
  background: #f6f9ff;
  color: #335cae;
  font: inherit;
  padding: 0.3rem 0.52rem;
  cursor: pointer;
}

.purchase-sheet__body {
  padding: 0.95rem;
}

.purchase-receipt-head {
  margin-bottom: 0.7rem;
}

.purchase-plan {
  color: #5c6f97;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.purchase-price {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0.15rem;
}

.purchase-note {
  color: var(--soft);
  font-size: 0.84rem;
  margin-top: 0.25rem;
}

.purchase-info {
  border: 1px solid #d6deef;
  border-radius: 10px;
  background: #f9fbff;
  padding: 0.72rem;
  margin-bottom: 0.75rem;
}

.purchase-info--receipt {
  background: #ffffff;
}

.purchase-info h3 {
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
}

.purchase-info p {
  color: #4e5c79;
  font-size: 0.82rem;
  margin-bottom: 0.25rem;
}

.purchase-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  border-bottom: 1px dashed #d7deee;
  padding: 0.35rem 0;
}

.purchase-row:last-child {
  border-bottom: 0;
}

.purchase-row span {
  color: #607090;
  font-size: 0.81rem;
}

.purchase-row strong {
  color: #1f2a42;
  font-size: 0.84rem;
}

.purchase-row--total {
  margin-top: 0.2rem;
  border-top: 1px solid #d7deee;
  padding-top: 0.55rem;
}

.purchase-row--total span,
.purchase-row--total strong {
  color: #142a63;
  font-size: 0.9rem;
}

.purchase-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.purchase-actions .btn {
  flex: 1;
  min-width: 180px;
}

.purchase-status {
  margin-top: 0.65rem;
  border: 1px solid #bad0ff;
  border-radius: 9px;
  background: #eef4ff;
  color: #2c4f9f;
  padding: 0.55rem 0.6rem;
  font-size: 0.81rem;
}

@media (max-width: 919px) {
  .intro__copy,
  .intro__scan {
    padding: 1rem 0.9rem;
  }

  .intro h1 {
    font-size: clamp(1.55rem, 6.5vw, 2.4rem);
  }

  .intro {
    gap: 0.85rem;
  }

  .method,
  .pricing,
  .news,
  .market {
    margin-top: 1.65rem;
  }

  .pricing__head h2,
  .news__head h2,
  .market__head h2 {
    font-size: clamp(1.2rem, 4.2vw, 1.5rem);
  }

  #btnScan {
    width: 100%;
    min-height: 2.75rem;
    font-size: 0.9rem;
  }

  .field input {
    min-height: 2.75rem;
    font-size: 1rem;
  }

  .switch span {
    min-height: 2.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .scan-state-layer {
    padding: 0.65rem 0.5rem;
  }

  .scan-state-layer.scan-state-layer--error {
    padding: 0.5rem 0.4rem;
    padding-bottom: max(0.45rem, env(safe-area-inset-bottom, 0px));
  }

  .scan-state {
    max-width: 100%;
  }

  .scan-error-heading {
    margin-top: 0.35rem;
  }

  .scan-error-dl__row {
    grid-template-columns: 1fr;
    row-gap: 0.2rem;
  }

  .scan-error-dl__value {
    text-align: left;
  }

  .news-card img {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .market__frame,
  .market__frame iframe {
    height: 280px;
  }

  .site-footer__inner {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    padding-left: max(0.9rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.9rem, env(safe-area-inset-right, 0px));
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  }

  .site-footer__inner nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .ios-legal-backdrop {
    padding-left: max(0.5rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.5rem, env(safe-area-inset-right, 0px));
  }

  .ios-legal-sheet__scroll {
    max-height: min(80dvh, 520px);
    padding: 0.85rem max(0.75rem, env(safe-area-inset-left, 0px)) 1rem
      max(0.75rem, env(safe-area-inset-right, 0px));
  }

  #purchaseBackdrop {
    padding: 0.5rem;
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    align-items: flex-end;
  }

  .purchase-sheet {
    max-width: 100%;
    max-height: min(92dvh, 800px);
    display: flex;
    flex-direction: column;
  }

  .purchase-sheet__body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-height: 0;
  }

  .purchase-actions {
    flex-direction: column;
  }

  .purchase-actions .btn {
    min-width: 0;
    width: 100%;
    min-height: 2.75rem;
  }
}

@media (max-width: 400px) {
  main {
    padding-left: max(0.8rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.8rem, env(safe-area-inset-right, 0px));
  }

  .pulse span {
    font-size: 0.7rem;
    padding: 0.32rem 0.5rem;
  }
}

@media (min-width: 480px) and (max-width: 919px) {
  .scan-state__actions--error {
    grid-template-columns: 1fr 1fr;
  }

  .scan-state--error .scan-state__actions--error .btn:first-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 520px) and (max-width: 919px) {
  #purchaseBackdrop {
    align-items: center;
  }
}

@media (max-width: 479px) {
  .scan-state__actions--error {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 519px) {
  #purchaseBackdrop {
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
  }

  #purchaseBackdrop .purchase-sheet {
    border-radius: 18px 18px 0 0;
    max-height: 94dvh;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  #purchaseBackdrop .purchase-sheet__body {
    padding-left: max(0.9rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.9rem, env(safe-area-inset-right, 0px));
  }

  #purchaseBackdrop .purchase-sheet__bar {
    padding-left: max(0.85rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.85rem, env(safe-area-inset-right, 0px));
  }
}
