:root {
  color-scheme: light;
  --bg: #edf3f6;
  --surface: #fbfdfe;
  --ink: #10202a;
  --muted: #5f6f78;
  --line: #c8d5dc;
  --accent: #1b78a0;
  --accent-strong: #135a78;
  --control-bg: rgba(251, 253, 254, 0.88);
  --control-active: #10202a;
  --control-active-text: #fbfdfe;
  --hover: #ffffff;
  --radius: 14px;
  --hero-max: 680px;
  --product-width: min(50vw, 300px);
  --product-glow: rgba(27, 120, 160, 0.11);
  --product-ground-shadow: rgba(16, 32, 42, 0.18);
  --grid-x: rgba(27, 120, 160, 0.24);
  --grid-y: rgba(16, 32, 42, 0.025);
  --ios-card-bg: #071019;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle, var(--grid-x) 0 1px, transparent 1.15px),
    var(--bg);
  background-size: 40px 40px;
  color: var(--ink);
  font-family: "IBM Plex Sans", "Noto Sans JP", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body[data-theme="polar"] {
  color-scheme: light;
  --bg: #edf3f6;
  --surface: #fbfdfe;
  --ink: #10202a;
  --muted: #5f6f78;
  --line: #c8d5dc;
  --accent: #1b78a0;
  --accent-strong: #135a78;
  --control-bg: rgba(251, 253, 254, 0.88);
  --control-active: #10202a;
  --control-active-text: #fbfdfe;
  --hover: #ffffff;
  --radius: 14px;
  --product-glow: rgba(27, 120, 160, 0.11);
  --product-ground-shadow: rgba(16, 32, 42, 0.18);
  --grid-x: rgba(27, 120, 160, 0.24);
  --grid-y: rgba(16, 32, 42, 0.025);
}

a {
  color: inherit;
  text-decoration: none;
}

.hero {
  padding: clamp(32px, 6vw, 64px) 20px 18px;
  text-align: left;
}

.hero-copy {
  max-width: var(--hero-max);
  margin: 0 auto;
}

h1,
p {
  margin-block-start: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(3rem, 10vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-title {
  margin-bottom: 0;
  font-size: 0;
  line-height: 0;
}

.hero-logo {
  display: block;
  width: min(100%, 20rem);
  height: auto;
}

.product-visual {
  position: relative;
  isolation: isolate;
  width: var(--product-width);
  aspect-ratio: 1;
  margin: clamp(18px, 4vw, 30px) auto clamp(24px, 7vw, 36px);
  animation: productReveal 2500ms cubic-bezier(0.16, 1, 0.3, 1) 180ms both;
  transform-origin: 50% 58%;
  will-change: opacity, transform;
}

.product-visual::before,
.product-visual::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.product-visual::before {
  inset: 4% -10% 0;
  z-index: 0;
  background: radial-gradient(ellipse at 50% 58%, var(--product-glow), transparent 64%);
}

.product-visual::after {
  right: 12%;
  bottom: -3%;
  left: 12%;
  z-index: 0;
  height: 26%;
  background: radial-gradient(ellipse at center, var(--product-ground-shadow), transparent 70%);
}

.product-visual.is-revealed {
  animation: none;
  opacity: 1;
  transform: translateY(0) scale(1);
  will-change: auto;
}

.product-image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  filter: none;
  object-fit: contain;
  animation: productImageFocus 1600ms cubic-bezier(0.16, 1, 0.3, 1) 180ms both;
  will-change: filter;
}

.product-visual.is-revealed .product-image {
  animation: none;
  filter: none;
  will-change: auto;
}

@keyframes productReveal {
  from {
    opacity: 0;
    transform: translateY(78px) scale(0.94);
  }

  58% {
    opacity: 1;
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes productRevealMobile {
  from {
    opacity: 0;
    transform: translateY(52px) scale(0.96);
  }

  58% {
    opacity: 1;
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes productImageFocus {
  from {
    filter: blur(7px) saturate(0.96);
  }

  58% {
    filter: blur(2px) saturate(0.98);
  }

  to {
    filter: none;
  }
}

.page-content {
  width: min(var(--hero-max), calc(100% - 40px));
  margin: 0 auto;
  padding: 2px 0 50px;
}

.page-content--secondary {
  padding-top: 4px;
}

.page-content--primary {
  padding-bottom: 8px;
}

.app-entry {
  margin: 0 0 24px;
}

.app-entry h2,
.content-section-title {
  margin: 0 0 10px;
  font-size: clamp(1.26rem, 3.6vw, 1.56rem);
  line-height: 1.3;
}

.app-entry h2 {
  display: grid;
  gap: 3px;
}

.app-entry-heading,
.app-entry-subtitle {
  display: block;
}

.app-entry-subtitle {
  color: var(--muted);
  font-size: clamp(0.72rem, 2.2vw, 0.82rem);
  font-weight: 600;
  line-height: 1.35;
}

.app-install-guide-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  margin-bottom: clamp(10px, 2.4vw, 16px);
  padding: 9px 14px;
  border: 1px solid var(--ios-card-bg);
  border-radius: 14px;
  background: linear-gradient(100deg, var(--ios-card-bg) 0%, var(--ios-card-bg) 45%, #666 70%, #f5f5f5 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(16, 32, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.36);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 180ms ease;
}

.app-install-guide-arrow {
  flex: none;
  color: #161616;
  font-size: 1.15em;
  line-height: 1;
  text-shadow: none;
}

.app-install-guide-card:hover {
  transform: translateY(-1px);
  border-color: var(--ios-card-bg);
  background: linear-gradient(100deg, var(--ios-card-bg) 0%, var(--ios-card-bg) 45%, #555 70%, #fff 100%);
  box-shadow: 0 9px 20px rgba(16, 32, 42, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.app-install-guide-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.app-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 2.4vw, 16px);
}

.app-choice-card {
  display: grid;
  grid-template-columns: clamp(54px, 15vw, 88px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(10px, 2.5vw, 18px);
  min-width: 0;
  min-height: 124px;
  padding: clamp(10px, 2.5vw, 18px);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(16, 32, 42, 0.11);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.app-choice-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 14px 30px rgba(16, 32, 42, 0.18);
}

.app-choice-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.app-choice-card--web {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.app-choice-card--ios {
  border-color: var(--ios-card-bg);
  background: var(--ios-card-bg);
  color: #fff;
}

.app-choice-card--planned,
.app-choice-card--planned:hover {
  transform: none;
  border-color: var(--ios-card-bg);
  box-shadow: 0 8px 22px rgba(16, 32, 42, 0.11);
  cursor: default;
}

.app-choice-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.app-choice-logo {
  display: block;
  width: clamp(54px, 15vw, 88px);
  height: auto;
  aspect-ratio: 1;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.2));
  object-fit: contain;
}

.app-choice-title {
  min-width: 0;
  font-size: clamp(0.82rem, 2.5vw, 1rem);
  font-weight: 850;
  line-height: 1.35;
}

.app-choice-note {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.4;
}

.app-choice-card--ios .app-choice-note {
  color: rgba(255, 255, 255, 0.74);
}

.app-choice-status {
  width: fit-content;
  margin-top: 0.25rem;
  padding: 0.15rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 750;
}

.content-section {
  padding: 0 0 44px;
}

.action-list {
  display: grid;
  gap: 7px;
}

.action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.action-row:hover {
  border-color: var(--accent);
  background: var(--hover);
}

.action-row--primary {
  min-height: 58px;
  border-color: var(--accent);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent) 16%, transparent), transparent 58%),
    var(--surface);
}

.action-title {
  min-width: 0;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.35;
}

.site-footer {
  padding: 0 20px 28px;
  color: var(--muted);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
  text-align: center;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

@media (max-width: 760px) {
  .hero {
    padding-top: 30px;
  }

  .product-visual {
    width: min(68vw, 260px);
    animation-name: productRevealMobile;
    will-change: opacity, transform;
  }

  .product-image {
    animation-name: productImageFocus;
  }

  .app-choice-card {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    align-content: start;
    min-height: 0;
    padding: 10px;
    gap: 8px;
  }

  .app-choice-logo {
    width: clamp(68px, 19vw, 92px);
    height: auto;
  }

}

@media (prefers-reduced-motion: reduce) {
  .app-choice-card,
  .app-install-guide-card {
    transition: none;
  }

  .app-choice-card:hover,
  .app-install-guide-card:hover {
    transform: none;
  }

  .product-visual {
    animation: none;
    opacity: 1;
    transform: none;
    will-change: auto;
  }

  .product-image {
    animation: none;
    filter: none;
    will-change: auto;
  }
}
