html {
  font-family: "Noto Sans JP", sans-serif;
  font-optical-sizing: auto;
  font-weight: bold;
  font-style: normal;
  /* Ensure padding/border are included in element width calculations */
  box-sizing: border-box;
}

/* Inherit border-box for all elements to avoid overflow with width:100% + padding */
*,
*::before,
*::after {
  box-sizing: inherit;
}

p {
  line-height: 1.4em;
}

.link {
  text-decoration: underline;
  word-wrap: break-word;
}

.link:hover {
  text-decoration: none;
}

.wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 180px 20px 20px;
  gap: 200px;
  /* Prevent overflow on small screens while keeping a max layout width */
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  box-sizing: border-box;
}

.page-title {
  padding: 70px 0;
}

.page-title img {
  width: 420px;
}

.main-section {
  width: 100%;
}

.main-section-title {
  font-size: 32px;
  text-align: center;
  margin-bottom: 16px;
}

.main-section-content-lg {
  font-size: 40px;
  text-align: center;
}

.main-section-content-sm {
  font-size: 16px;
  text-align: center;
}

.main-section-table {
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 18px;
  margin-top: 24px;
  padding: 0 20px;
}

.main-section-table-row {
  display: flex;
  flex-direction: row;
}

.main-section-table-title {
  width: 200px;
}

.product-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 24px;
}

.product-item {
  padding: 24px;
  border: 1px solid #eee;
  border-radius: 8px;
  background-color: #fafafa;
}

.product-image-zone {
  text-align: center;
  margin-bottom: 20px;
}

.product-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.product-title {
  font-size: 20px;
  margin-bottom: 12px;
  font-weight: bold;
}

.product-subtitle {
  font-size: 16px;
  color: #666;
  margin-bottom: 16px;
  font-weight: 500;
}

.product-description {
  font-size: 16px;
  line-height: 1.6;
  color: #555;
  margin-bottom: 20px;
}

.app-store-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 24px 0;
  flex-wrap: wrap;
}

.store-button {
  display: inline-block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.store-button:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.store-button-image {
  height: 50px;
  width: auto;
  border-radius: 8px;
}

.product-features {
  margin: 20px 0;
}

.features-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #333;
}

.features-list {
  margin-left: 20px;
  color: #555;
}

.features-list li {
  margin-bottom: 4px;
  line-height: 1.5;
}

.product-status {
  font-size: 14px;
  color: #888;
  font-style: italic;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.copyright {
  font-size: 12px;
  text-align: center;
  margin: 24px 0 12px;
}

.footer-links {
  text-align: center;
  margin-bottom: 16px;
}

.footer-links .link {
  font-size: 14px;
}

footer {
  border-top: 1px solid #ddd;
  padding-top: 24px;
  margin-top: 40px;
}

/* Language switcher */
.lang-switch {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid #eee;
  padding: 8px 12px;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  z-index: 1000;
}

.lang-link {
  color: #333;
  text-decoration: none;
  font-size: 13px;
}

.lang-link:hover {
  text-decoration: underline;
}

.lang-sep {
  color: #aaa;
}

.lang-link.is-current {
  font-weight: 700;
  pointer-events: none;
  color: #111;
}

/* Back to top link */
.back-to-top {
  text-align: left;
  max-width: 800px;
  margin: 20px auto;
}

.back-to-top .link {
  font-size: 14px;
  color: #666;
}

/* Privacy Policy Styles */
.privacy-policy-content {
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
  max-width: 800px;
  margin: 0 auto;
}

.privacy-policy-content h3 {
  font-size: 18px;
  margin: 32px 0 16px;
  font-weight: bold;
}

.privacy-policy-content h4 {
  font-size: 16px;
  margin: 24px 0 12px;
  font-weight: bold;
}

.privacy-policy-content ul {
  margin: 12px 0 12px 20px;
}

.privacy-policy-content li {
  margin-bottom: 8px;
}

.privacy-policy-content p {
  margin-bottom: 16px;
}

@media (max-width: 480px) {
  .wrapper {
    width: 100%;
    padding: 180px 12px 12px;
  }

  .page-title {
    padding: 0;
  }

  .page-title img {
    width: 100%;
    padding: 0 20px;
  }

  .main-section-table {
    padding: 0;
  }

  .main-section-table-title {
    width: 100%;
    margin-bottom: 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid #333;
  }

  .main-section-table-row {
    flex-direction: column;
  }

  .product-item {
    padding: 16px;
  }

  .product-image-zone {
    margin-bottom: 16px;
  }

  .product-image {
    border-radius: 6px;
  }

  .product-title {
    font-size: 18px;
  }

  .product-subtitle {
    font-size: 14px;
  }

  .product-description {
    font-size: 14px;
  }

  .app-store-buttons {
    gap: 8px;
    margin: 20px 0;
  }

  .store-button-image {
    height: 44px;
  }

  .features-title {
    font-size: 15px;
  }

  .features-list {
    margin-left: 16px;
    font-size: 14px;
  }

  .product-status {
    font-size: 13px;
  }

  .privacy-policy-content {
    padding: 0 20px;
  }

  .back-to-top {
    padding: 0 20px;
    margin: 20px 0;
  }
}
