:root {
  --bg: #0a0a0a;
  --surface: #161616;
  --border: #262626;
  --text: #f5f5f5;
  --text-muted: #9a9a9a;
  --accent: #ff3b30;
  --radius: 14px;
  --maxw: 720px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
    "Noto Sans JP", Roboto, sans-serif;
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header / nav */
header.site {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  z-index: 10;
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text);
}
.brand .logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  font-size: 16px;
}
nav.site a {
  color: var(--text-muted);
  margin-left: 18px;
  font-size: 14px;
  font-weight: 600;
}
nav.site a:hover {
  color: var(--text);
  text-decoration: none;
}

/* Language switcher (legal pages) */
.lang-select-wrap {
  display: inline-flex;
  align-items: center;
  margin-left: 18px;
}
.lang-select {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 8px;
  cursor: pointer;
}
.lang-select:hover {
  color: var(--text);
}
.lang-select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.translation-note {
  font-size: 13px;
  color: var(--text-muted);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Hero */
.hero {
  padding: 72px 0 56px;
  text-align: center;
}
.hero h1 {
  font-size: 40px;
  line-height: 1.15;
  margin: 0 0 16px;
  font-weight: 900;
  letter-spacing: -0.5px;
}
.hero p.lead {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 28px;
}
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

/* App Store download badge (official artwork — do not alter the image itself) */
.appstore-cta {
  display: inline-block;
  line-height: 0;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.appstore-cta:hover {
  transform: translateY(-1px);
  opacity: 0.9;
  text-decoration: none;
}
.appstore-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 10px;
}
.appstore-cta img {
  height: 54px;
  width: auto;
  display: block;
}

/* Feature cards */
.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 24px 0 8px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}
.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* Sections */
section {
  padding: 28px 0;
}
section h2 {
  font-size: 22px;
  margin: 0 0 12px;
}

/* Legal / article pages */
.article {
  padding: 40px 0 80px;
}
.article h1 {
  font-size: 30px;
  margin: 0 0 6px;
}
.article .updated {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 32px;
}
.article h2 {
  font-size: 20px;
  margin: 36px 0 10px;
  padding-top: 8px;
}
.article h3 {
  font-size: 16px;
  margin: 22px 0 6px;
}
.article p,
.article li {
  color: #d8d8d8;
}
.article ul {
  padding-left: 22px;
}
.article li {
  margin: 6px 0;
}
.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 14px;
}
.article th,
.article td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.article th {
  background: var(--surface);
}

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 18px 0;
  font-size: 15px;
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 520px;
  margin: 8px 0 4px;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  width: 100%;
  resize: vertical;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #5f5f5f;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.contact-form .hint {
  font-weight: 400;
  font-size: 12px;
  color: #6f6f6f;
}
.contact-form .hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.submit-btn {
  align-self: flex-start;
  font: inherit;
  font-weight: 800;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 999px;
  padding: 12px 28px;
  cursor: pointer;
  min-height: 44px;
}
.submit-btn:hover {
  filter: brightness(1.08);
}
.submit-btn:disabled {
  opacity: 0.55;
  cursor: default;
}
.form-status {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 600;
  min-height: 1.2em;
}
.form-status.ok {
  color: #30d158;
}
.form-status.err {
  color: var(--accent);
}

/* Footer */
footer.site {
  border-top: 1px solid var(--border);
  padding: 32px 0 48px;
  color: var(--text-muted);
  font-size: 13px;
}
footer.site .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
footer.site a {
  color: var(--text-muted);
  margin-right: 16px;
}
footer.site a:hover {
  color: var(--text);
}

@media (max-width: 560px) {
  .hero h1 {
    font-size: 32px;
  }
  .features {
    grid-template-columns: 1fr;
  }
}
