:root {
  color-scheme: light;
  --ink: #20242b;
  --muted: #69717d;
  --surface: #ffffff;
  --surface-muted: #f4f5f7;
  --line: #dfe3e8;
  --accent: #4652df;
  --accent-dark: #3440c7;
  --shadow: 0 24px 60px rgba(33, 38, 45, 0.12);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: linear-gradient(135deg, #f9fafb 0%, #edf0f3 100%);
}

.page-shell {
  width: min(100% - 40px, 860px);
  margin: 0 auto;
  padding: 32px 0 48px;
}

.site-header,
.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.site-header {
  margin-bottom: 88px;
}

.site-header h1,
.hero h2,
.download-card h3 {
  margin: 0;
  letter-spacing: -0.03em;
}

.site-header h1 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.language-toggle {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
  font-weight: 700;
}

.language-toggle:focus-visible,
.download-button:focus-visible,
.old-versions-toggle:focus-visible,
.old-version-download:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.hero {
  margin-bottom: 40px;
}

.hero h2 {
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.05;
  line-break: strict;
  word-break: keep-all;
}

.hero-title-phrase {
  white-space: nowrap;
}

/* カード見出しも意味単位を途中で分割しない。 */
.card-title-phrase {
  white-space: nowrap;
}

.hero-copy {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.download-card {
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid rgba(223, 227, 232, 0.9);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.download-card h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.latest-badge {
  border-radius: 999px;
  padding: 8px 12px;
  color: #fff;
  background: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.status {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.download-button {
  display: block;
  margin-top: 24px;
  border-radius: 12px;
  padding: 16px 20px;
  color: #fff;
  background: var(--accent);
  text-align: center;
  text-decoration: none;
  font-weight: 800;
  transition: background 160ms ease, transform 160ms ease;
}

.download-button:hover,
.download-button:focus-visible {
  background: var(--accent-dark);
}

.download-button:active {
  transform: translateY(1px);
}

.download-button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.5;
  pointer-events: none;
}

/* 過去版は明示操作で展開し、各版のリンクをまとめて表示する。 */
.old-versions-toggle {
  display: block;
  margin: 28px auto 0;
  border: 0;
  padding: 8px 4px;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.old-versions-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.old-versions-toggle[hidden],
.old-versions-list[hidden] {
  display: none;
}

.old-versions-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted);
}

.old-version-name {
  margin-right: auto;
  font-weight: 800;
}

.old-version-size {
  color: var(--muted);
  font-size: 0.85rem;
}

.old-version-download {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
}

.site-footer {
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 28px, 860px);
    padding-top: 22px;
  }

  .site-header {
    margin-bottom: 64px;
  }

  .download-card {
    border-radius: 18px;
  }

  /* モバイルは意味のまとまりごとに改行し、横あふれを防ぐ。 */
  .hero h2 {
    font-size: clamp(1.75rem, 9vw, 2.4rem);
  }

  .hero-title-phrase {
    display: block;
  }

  .card-title-phrase {
    display: block;
  }
}
