:root {
  --bg: #f7f6fb;
  --surface: #ffffff;
  --surface-2: #f0eef7;
  --line: #e2dfee;
  --text: #1c1b22;
  --muted: #5d5a6d;
  --accent: #7c3aed;
  --accent-text: #ffffff;
  --accent-soft: #efe7ff;
  --warn-bg: #fff4e5;
  --warn-line: #f0b35c;
  --danger-bg: #fdecec;
  --danger-line: #e5484d;
  --shadow: 0 1px 2px rgba(20, 16, 40, 0.06), 0 8px 24px rgba(20, 16, 40, 0.06);
  --font: "Yu Gothic UI", "Hiragino Sans", "Noto Sans JP", "Meiryo", system-ui, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SFMono-Regular", monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131218;
    --surface: #1c1b23;
    --surface-2: #24222d;
    --line: #33303f;
    --text: #ecebf2;
    --muted: #a5a2b5;
    --accent: #a78bfa;
    --accent-text: #16121f;
    --accent-soft: #2b2342;
    --warn-bg: #2d2415;
    --warn-line: #b7852f;
    --danger-bg: #3a1c1e;
    --danger-line: #e5484d;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.75 var(--font);
}

a {
  color: var(--accent);
  /* 下線が「_」と重なって見えなくならないよう、文字から少し離す（例: @jimeguri_） */
  text-underline-offset: 0.25em;
}

.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 16px;
}

header.hero {
  padding: 72px 0 48px;
  text-align: center;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.logo svg { color: var(--accent); }

h1 {
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.3;
  margin: 16px 0 12px;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.lead {
  color: var(--muted);
  font-size: 17px;
  margin: 0 auto 32px;
  max-width: 640px;
  text-wrap: pretty;
}

.download {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  box-shadow: var(--shadow);
}
.button:hover { filter: brightness(1.06); }
.button[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }

.meta {
  font-size: 13px;
  color: var(--muted);
}

.notice {
  max-width: 640px;
  margin: 28px auto 0;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--danger-line);
  background: var(--danger-bg);
  text-align: left;
  font-size: 15px;
}

section { padding: 40px 0; }

h2 {
  font-size: 22px;
  margin: 0 0 20px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.card h3 {
  font-size: 16px;
  margin: 0 0 6px;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

ol.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
ol.steps li {
  counter-increment: step;
  position: relative;
  padding: 16px 18px 16px 64px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
ol.steps li::before {
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}
ol.steps strong { display: block; margin-bottom: 2px; }
ol.steps p { margin: 0; color: var(--muted); font-size: 15px; }

code, .url {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  overflow-wrap: anywhere;
}

.callout {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--warn-line);
  background: var(--warn-bg);
}
.callout p { margin: 6px 0 0; }

ul.plain {
  margin: 0;
  padding-left: 1.2em;
}
ul.plain li + li { margin-top: 4px; }

footer {
  padding: 32px 0 48px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
}

.hash {
  font-family: var(--mono);
  font-size: 12px;
  overflow-wrap: anywhere;
}

/* ---- 保存するもの ---- */

.table-wrap {
  overflow-x: auto;
  margin: 14px 0 10px;
}

table.files {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  font-size: 14.5px;
}

table.files th,
table.files td {
  text-align: left;
  vertical-align: top;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

table.files tr:last-child td { border-bottom: 0; }

table.files th {
  background: var(--surface-2);
  font-size: 13px;
  color: var(--muted);
}

table.files td:first-child { width: 44%; }

h3.sub {
  font-size: 16px;
  margin: 24px 0 8px;
}

ol.plain {
  margin: 0;
  padding-left: 1.4em;
}
ol.plain li + li { margin-top: 4px; }

@media (max-width: 560px) {
  table.files td:first-child { width: auto; }
}

/* ---- 更新履歴 ---- */

.history {
  display: grid;
  gap: 14px;
}

.release {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
}

.release header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  margin-bottom: 6px;
}

.release .version {
  font-weight: 700;
  font-size: 17px;
}

.release .date {
  color: var(--muted);
  font-size: 13px;
}

.release .tag-security {
  font-size: 12px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--danger-line);
  background: var(--danger-bg);
}

.release h3 {
  font-size: 16px;
  margin: 0 0 6px;
}

.release .notes {
  color: var(--muted);
  font-size: 15px;
}
.release .notes p { margin: 6px 0; }
.release .notes ul { margin: 6px 0; padding-left: 1.2em; }
.release .notes h4 { margin: 12px 0 4px; font-size: 14.5px; color: var(--text); }

.more {
  margin-top: 14px;
  font-size: 15px;
}

.back {
  display: inline-block;
  margin-top: 40px;
  font-size: 15px;
}
