:root {
  --bg: #0d004b;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.12);
  --border: rgba(246, 226, 183, 0.2);
  --border-strong: rgba(246, 226, 183, 0.34);
  --text: #f8f2e6;
  --muted: rgba(248, 242, 230, 0.74);
  --accent: #f2ddb0;
  --accent-strong: #ffebc0;
  --shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
  --content-width: min(960px, calc(100vw - 28px));
  --radius-lg: 28px;
  --radius-md: 22px;
  --radius-sm: 16px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans", "Noto Sans JP", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.08), transparent 28%),
    linear-gradient(180deg, #190070 0%, var(--bg) 22%, var(--bg) 100%);
}

body.has-ios-banner {
  padding-bottom: 96px;
}

body.has-lightbox {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.28) 0 1px, transparent 1.8px),
    radial-gradient(circle at 74% 12%, rgba(255, 255, 255, 0.18) 0 1px, transparent 2px),
    radial-gradient(circle at 88% 32%, rgba(255, 255, 255, 0.22) 0 1px, transparent 2px),
    radial-gradient(circle at 32% 76%, rgba(255, 255, 255, 0.16) 0 1px, transparent 2px),
    radial-gradient(circle at 66% 84%, rgba(255, 255, 255, 0.18) 0 1px, transparent 2px);
  opacity: 0.5;
  pointer-events: none;
}

img {
  display: block;
  max-width: 100%;
}

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

button {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.page-shell {
  width: 100%;
}

.ios-banner {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "icon copy close"
    "button button button";
  align-items: start;
  column-gap: 14px;
  row-gap: 12px;
  padding: 14px;
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  background: rgba(13, 0, 75, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.ios-banner img {
  grid-area: icon;
  width: 46px;
  height: 46px;
  border-radius: 0;
}

.ios-banner__copy {
  grid-area: copy;
  min-width: 0;
  padding-right: 4px;
}

.ios-banner__copy strong {
  display: block;
  font-weight: 700;
  color: var(--accent-strong);
}

.ios-banner__copy span {
  color: var(--muted);
  font-size: 0.92rem;
}

.ios-banner .button {
  grid-area: button;
  width: 100%;
}

.banner-close {
  grid-area: close;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(13, 0, 75, 0.74);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-nav,
.simple-main,
.site-footer {
  width: var(--content-width);
  margin: 0 auto;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-strong);
}

.brand span {
  white-space: nowrap;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 0;
}

.lang-switch {
  position: relative;
}

.lang-switch--ready {
  display: block;
}

.lang-toggle,
.lang-menu a {
  font: inherit;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 164px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.lang-toggle:hover,
.lang-switch.is-open .lang-toggle {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.08);
}

.lang-toggle__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lang-toggle__chevron {
  color: var(--muted);
  transition: transform 160ms ease;
}

.lang-switch.is-open .lang-toggle__chevron {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  display: grid;
  min-width: 220px;
  max-height: min(60vh, 420px);
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(20, 6, 86, 0.98);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.lang-menu a {
  padding: 10px 12px;
  font-size: 0.92rem;
  line-height: 1.2;
  color: var(--muted);
  border-radius: 12px;
}

.lang-menu a:hover,
.lang-menu a[aria-current="page"] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.simple-main {
  display: grid;
  gap: 24px;
  padding: 36px 0 72px;
}

.logo-section,
.content-section {
  border-radius: var(--radius-lg);
}

.logo-section {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 44px 24px;
  text-align: center;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.content-section {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.app-logo {
  width: 144px;
  height: 144px;
  border-radius: 0;
}

.logo-section h1 {
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 4rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--accent-strong);
}

.logo-description {
  max-width: 34rem;
  margin: 0;
  color: var(--muted);
  text-align: center;
  line-height: 1.7;
}

.content-section {
  padding: 24px;
}

@supports (content-visibility: auto) {
  .content-section {
    content-visibility: auto;
    contain-intrinsic-size: 1px 560px;
  }
}

.section-header {
  margin-bottom: 18px;
}

.section-header h2 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.download-card {
  display: grid;
  gap: 14px;
  justify-items: start;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
}

.button--primary {
  color: #140043;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
}

.button--small {
  min-height: 42px;
  padding: 10px 14px;
  font-size: 0.94rem;
}

.store-link {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.store-link a {
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.32);
}

.image-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.12);
}

.image-card--phone {
  max-width: 420px;
  margin: 0 auto;
}

.image-card img {
  width: 100%;
  height: auto;
}

.zoomable-image {
  cursor: zoom-in;
}

.tutorial-list {
  display: grid;
  gap: 14px;
  padding-left: 22px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.result-card {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
}

.result-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.result-card figcaption {
  padding: 16px;
}

.result-card h3 {
  margin: 0 0 6px;
  font-size: 1.06rem;
}

.result-card p {
  margin: 0;
  color: var(--muted);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 1, 28, 0.92);
  backdrop-filter: blur(10px);
}

.lightbox__frame {
  display: grid;
  justify-items: center;
  gap: 12px;
  max-width: 100%;
  max-height: 100%;
  text-align: center;
}

.lightbox__image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 96px);
  border-radius: 16px;
  object-fit: contain;
  box-shadow: var(--shadow);
}

.lightbox__caption {
  margin: 0;
  color: var(--muted);
  text-align: center;
  max-width: 100%;
}

.lightbox__close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 0 34px;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
  color: var(--accent-strong);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.92rem;
}

@media (max-width: 760px) {
  .result-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
    align-items: start;
  }
}

@media (max-width: 640px) {
  .site-nav,
  .simple-main,
  .site-footer {
    width: min(100vw - 20px, 960px);
  }

  .site-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
  }

  .brand {
    min-width: 0;
  }

  .brand span {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .lang-switch {
    justify-self: end;
  }

  .lang-toggle {
    min-width: 124px;
  }

  .lang-menu {
    right: 0;
    left: auto;
    width: min(72vw, 240px);
    min-width: 0;
  }

  .ios-banner {
    column-gap: 10px;
    row-gap: 10px;
  }

  body.has-ios-banner {
    padding-bottom: 132px;
  }

  .content-section,
  .logo-section {
    padding: 20px;
  }
}
