/* 白い背景だけ（暗い配色にはしない） */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --side-bg: #f6f7f5;
  --text: #1f2328;
  --muted: #5b6470;
  --line: #e2e4e0;
  --accent: #1f6f4a;
  --accent-soft: #e6f2ec;
  --code-bg: #f3f4f1;
  --side-width: 220px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  /* 和文と英数字のあいだの空きは、文字で入れずに CSS で付ける */
  text-autospace: normal;
  text-spacing-trim: normal;
}

a { color: var(--accent); }

/* サイドバー（広い画面では左に固定、狭い画面では上に並べる） */
aside.side {
  background: var(--side-bg);
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

aside.side .name {
  display: block;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 6px;
}

aside.side nav { display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: 14px; }
aside.side nav a { color: var(--muted); text-decoration: none; padding: 2px 0; }
aside.side nav a:hover { color: var(--accent); }
aside.side nav a[aria-current="page"] { color: var(--accent); font-weight: 700; }

.content main, .content footer .inner {
  max-width: 820px;
  margin: 0;
  padding: 0 16px;
}

@media (min-width: 900px) {
  aside.side {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--side-width);
    border-bottom: none;
    border-right: 1px solid var(--line);
    padding: 24px 20px;
    overflow-y: auto;
  }
  aside.side .name { margin-bottom: 20px; }
  aside.side nav { flex-direction: column; gap: 4px; font-size: 15px; }
  aside.side nav a { padding: 6px 10px; border-radius: 6px; }
  aside.side nav a[aria-current="page"] { background: var(--accent-soft); }
  .content { margin-left: var(--side-width); }
  .content main, .content footer .inner { padding: 0 40px; }
}

main { padding-top: 32px !important; padding-bottom: 64px !important; }

h1 { font-size: 28px; line-height: 1.45; margin: 0 0 16px; }
h2 { font-size: 21px; line-height: 1.5; margin: 48px 0 12px; padding-top: 12px; border-top: 1px solid var(--line); }
h3 { font-size: 17px; margin: 28px 0 8px; }

p.lead { font-size: 18px; }
.muted { color: var(--muted); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.card {
  display: block;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--text);
  text-decoration: none;
}

a.card:hover { border-color: var(--accent); }
.card .title { font-weight: 700; display: block; margin-bottom: 4px; color: var(--accent); }
.card .body { font-size: 14px; color: var(--muted); line-height: 1.7; }

pre, code { font-family: "Cascadia Mono", Consolas, "BIZ UDGothic", monospace; }
code { background: var(--code-bg); padding: 1px 5px; border-radius: 4px; font-size: 0.92em; }

pre.formula {
  background: var(--code-bg);
  border-radius: 8px;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre;
}

.table-wrap { overflow-x: auto; margin: 16px 0; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { border: 1px solid var(--line); padding: 6px 10px; vertical-align: top; }
th { background: var(--accent-soft); text-align: center; font-weight: 600; white-space: nowrap; }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.best td { font-weight: 700; }

.todo {
  background: #fff4d6;
  color: #5c4400;
  padding: 0 4px;
  border-radius: 3px;
  font-size: 0.9em;
}

.glossary { margin-top: 40px; padding: 4px 20px 12px; border: 1px solid var(--line); border-radius: 8px; }
.lp-doc-page main .glossary h2 { margin-top: 16px; }
.glossary ul { padding-left: 1.2em; }

.next { margin-top: 40px; font-size: 15px; }

/* 画面写し（原寸より大きくしない。枠を付けて地と分ける） */
figure { margin: 12px 0 24px; }
figure img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; }

footer.site { border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
footer.site .inner { padding-top: 16px !important; padding-bottom: 24px !important;
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

@media (max-width: 520px) {
  h1 { font-size: 23px; }
  h2 { font-size: 19px; }
  p.lead { font-size: 17px; }
}

/* トップの主な画面（縮小して左上から並べる） */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin: 16px 0; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: 170px; object-fit: cover; object-position: left top; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* 画面写しの拡大（lightbox.js） */
figure img { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20, 22, 26, 0.88);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 72px;
}
@media (max-width: 520px) { .lightbox { padding: 56px 8px 72px; } }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 80px); object-fit: contain; background: #fff; border-radius: 4px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4); }
.lightbox-caption { color: #f0f0f0; font-size: 14px; margin: 10px 0 0; }
.lightbox img { cursor: default; }
.lightbox button {
  position: absolute; border: none; border-radius: 50%;
  width: 48px; height: 48px; font-size: 32px; line-height: 1;
  color: #fff; background: rgba(255, 255, 255, 0.16); cursor: pointer;
}
.lightbox button:hover, .lightbox button:focus-visible { background: rgba(255, 255, 255, 0.32); outline: none; }
.lightbox button[hidden] { display: none; }
.lightbox-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-close { right: 12px; top: 12px; width: 40px; height: 40px; font-size: 26px; }
@media (max-width: 520px) {
  .lightbox-prev, .lightbox-next { top: auto; bottom: 12px; transform: none; }
}
body.lightbox-open { overflow: hidden; }

/* トップの見出しのソフト名と公開の予定 */
h1 .product { display: block; font-size: 40px; line-height: 1.25; margin-top: 4px; color: var(--accent); }
.release {
  display: inline-block; margin: 0 0 20px; padding: 4px 14px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font-weight: 700; font-size: 15px;
}
@media (max-width: 520px) { h1 .product { font-size: 32px; } }

/* サイドバーのいちばん下のほかのアプリ */
aside.side .other-app { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
aside.side .other-app a { display: block; font-size: 14px; color: var(--accent); text-decoration: none; padding: 4px 0; }
aside.side .other-app a:hover { text-decoration: underline; }
@media (min-width: 900px) { aside.side .other-app a { padding: 4px 10px; } aside.side .other-app { padding-left: 0; } }

/* サイドバーの一段下げた項目 */
aside.side nav a.sub::before { content: "└ "; color: var(--line); }
@media (min-width: 900px) { aside.side nav a.sub { padding-left: 22px; font-size: 14px; } }

/* 特徴量の全リスト（グループごとに開閉） */
details { border: 1px solid var(--line); border-radius: 6px; margin: 8px 0; }
details > summary { cursor: pointer; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
details > summary .g { font-weight: 700; }
details > summary .n { color: var(--muted); font-size: 14px; }
details[open] > summary { border-bottom: 1px solid var(--line); background: var(--accent-soft); }
details .table-wrap { margin: 0; }
table.catalog { font-size: 13.5px; }
table.catalog td { padding: 3px 8px; }
table.catalog td.sub { color: var(--muted); white-space: nowrap; }
table.catalog td.use { text-align: center; color: var(--accent); }
table.catalog code { background: none; padding: 0; font-size: 12.5px; word-break: break-all; }

/* 末尾の欄の免責事項（1行を全部使う） */
footer.site .disclaimer { flex-basis: 100%; margin: 4px 0 0; font-size: 12.5px; line-height: 1.7; }
