/* LoreBox 公式サイト — アプリ本体（src/styles.css）と同じ木箱パレットを使用 */
:root {
  --paper: #faf6ee;
  --paper-deep: #f2ecdf;
  --ink: #3b342c;
  --ink-soft: #8c7b66;
  --gold: #d9a441;
  --gold-soft: #f0d9a8;
  --leaf: #7a9b5e;
  --leaf-soft: #eef3e8;
  --danger: #b5543b;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 2px 10px rgba(59, 52, 44, 0.08);
  --shadow-lg: 0 10px 30px rgba(59, 52, 44, 0.14);
  --maxw: 880px;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Noto Sans JP",
    -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse 480px 320px at 88% -80px, rgba(217, 164, 65, 0.18), transparent 70%),
    radial-gradient(ellipse 340px 240px at 4% 20%, rgba(122, 155, 94, 0.10), transparent 70%),
    var(--paper);
  line-height: 1.7;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

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

/* ---- ヘッダー ---- */
.site-header {
  padding: 20px 0;
  border-bottom: 1px solid rgba(59, 52, 44, 0.08);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 10px; box-shadow: var(--shadow); }
.brand-text h1 { margin: 0; font-size: 18px; letter-spacing: 0.04em; }
.brand-text p { margin: 0; font-size: 11px; color: var(--ink-soft); }
.site-nav { display: flex; gap: 18px; font-size: 13px; }
.site-nav a { text-decoration: none; color: var(--ink-soft); font-weight: 600; }
.site-nav a:hover, .site-nav a.current { color: var(--ink); }

/* ---- ヒーロー ---- */
.hero { padding: 56px 0 36px; text-align: center; }
.hero h2 { font-size: 30px; margin: 0 0 12px; letter-spacing: 0.02em; }
.hero p.lead { color: var(--ink-soft); font-size: 15px; max-width: 560px; margin: 0 auto; }
.version-badge {
  display: inline-block; margin: 16px 0 0; font-size: 12px; font-weight: 700;
  color: #7a5b16; background: var(--gold-soft); border-radius: 999px; padding: 6px 14px;
}

/* ---- ダウンロードカード ---- */
.download-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  margin: 32px 0;
}
@media (max-width: 640px) { .download-grid { grid-template-columns: 1fr; } }
.dl-card {
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 26px 24px; text-align: center; border: 2px solid transparent;
}
.dl-card.recommended { border-color: var(--gold-soft); }
.dl-os-icon { font-size: 30px; margin-bottom: 8px; }
.dl-card h3 { margin: 0 0 4px; font-size: 17px; }
.dl-card .dl-sub { color: var(--ink-soft); font-size: 12px; margin: 0 0 18px; }
.dl-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.btn-download {
  display: inline-flex; align-items: center; gap: 8px;
  border: none; border-radius: 999px; padding: 12px 26px;
  background: linear-gradient(160deg, #e6b558, var(--gold));
  color: var(--ink); font-size: 14px; font-weight: 700; cursor: pointer;
  text-decoration: none; box-shadow: 0 2px 6px rgba(217, 164, 65, 0.4);
}
.btn-download:hover { filter: brightness(1.05); }
.dl-note { margin-top: 12px; font-size: 11px; color: var(--ink-soft); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid #d9d0bf; border-radius: 999px; padding: 9px 18px;
  background: transparent; color: var(--ink-soft); font-size: 13px; font-weight: 600;
  text-decoration: none;
}
.btn-secondary:hover { background: var(--paper-deep); color: var(--ink); }

/* ---- セクション共通 ---- */
section.block { padding: 28px 0; }
section.block h2 { font-size: 20px; margin: 0 0 6px; }
section.block > .wrap > p.section-lead { color: var(--ink-soft); margin: 0 0 20px; font-size: 13px; }

.card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 24px;
}

/* 更新履歴（Releaseの自動生成ノートを取り込んで表示） */
.release-notes h4 { margin: 16px 0 6px; font-size: 14px; }
.release-notes h4:first-child { margin-top: 0; }
.release-notes ul { margin: 0 0 12px; padding-left: 20px; }
.release-notes li { font-size: 13px; margin: 4px 0; color: var(--ink); }
.release-notes p { font-size: 13px; color: var(--ink-soft); margin: 6px 0; }
.release-notes a { color: var(--leaf); }
.release-history { display: grid; gap: 14px; }
.release-entry {
  background: #fff; border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
}

/* ---- Legal documents ---- */
.legal-document { max-width: 760px; }
.legal-document h2 { margin: 30px 0 8px; font-size: 20px; }
.legal-document h2:first-child { margin-top: 0; }
.legal-document h3 { margin: 22px 0 6px; font-size: 16px; }
.legal-document p, .legal-document li { font-size: 14px; }
.legal-document ul { padding-left: 24px; }
.legal-document li { margin: 6px 0; }
.legal-updated { color: var(--ink-soft); font-size: 13px !important; }
.release-entry-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.release-entry-head h3 { margin: 0; font-size: 16px; }
.release-entry-head time, .release-no-assets { color: var(--ink-soft); font-size: 12px; }
.release-badge {
  display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px;
  background: var(--leaf-soft); color: var(--leaf); font-size: 10px; vertical-align: middle;
}
.release-downloads { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.release-downloads .btn-secondary { font-size: 12px; padding: 6px 12px; }
.release-entry details { margin-top: 10px; border-top: 1px solid rgba(59, 52, 44, 0.08); padding-top: 8px; }
.release-entry summary { color: var(--ink-soft); font-size: 12px; cursor: pointer; }
.release-entry .release-notes { margin-top: 10px; }
.release-empty { color: var(--ink-soft); font-size: 13px; }

/* インストール手順 */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: flex; gap: 14px; padding: 12px 0;
  border-bottom: 1px dashed #eee5d4;
}
.steps li:last-child { border-bottom: none; }
.steps li::before {
  content: counter(step);
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--gold-soft); color: #7a5b16;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.steps li div p { margin: 2px 0 0; color: var(--ink-soft); font-size: 12px; }
.steps li div strong { font-size: 14px; }

/* 機能バッジ一覧 */
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 640px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-item {
  background: #fff; border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow);
  font-size: 13px;
}
.feature-item strong { display: block; margin-bottom: 4px; font-size: 13px; }
.feature-item span { color: var(--ink-soft); font-size: 12px; }
.feature-badge {
  display: inline-block; margin-left: 5px; padding: 1px 7px; border-radius: 999px;
  background: var(--gold-soft); color: #7a5b16; font-size: 10px; vertical-align: 1px;
}

/* ---- トップページ：スクリーンショット付き機能紹介 ---- */
.showcase-list { display: grid; gap: 22px; margin-top: 24px; }
.showcase-item {
  display: grid; grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
  align-items: center; gap: 28px; padding: 22px;
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.showcase-item-reverse .showcase-copy { order: 2; }
.showcase-item-reverse img { order: 1; }
.showcase-shot { display: block; cursor: zoom-in; }
.showcase-item img { width: 100%; border: 1px solid #eee5d4; border-radius: 10px; box-shadow: var(--shadow); }
.showcase-shot:hover img { box-shadow: var(--shadow-lg); }
.image-lightbox {
  position: fixed; left: 50%; top: 50%; right: auto; bottom: auto;
  transform: translate(-50%, -50%); margin: 0;
  max-width: 98vw; max-height: 98vh; padding: 48px 16px 16px;
  border: 0; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-lg); overflow: auto;
}
.image-lightbox::backdrop { background: rgba(35, 30, 25, 0.82); }
.image-lightbox img { width: auto; max-width: none; max-height: none; margin: 0 auto; }
.lightbox-close {
  position: absolute; top: 8px; right: 12px; width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: var(--paper-deep); color: var(--ink); font-size: 25px; line-height: 1; cursor: pointer;
}
.showcase-label { color: #9a7429; font-size: 10px; font-weight: 800; letter-spacing: 0.14em; }
.showcase-copy h3 { margin: 6px 0 8px; font-size: 17px; line-height: 1.5; }
.showcase-copy p { margin: 0; color: var(--ink-soft); font-size: 13px; }
.showcase-link { margin: 22px 0 0; text-align: center; }
@media (max-width: 640px) {
  .showcase-item { grid-template-columns: 1fr; gap: 14px; padding: 16px; }
  .showcase-item-reverse .showcase-copy, .showcase-item-reverse img { order: initial; }
}

/* ---- マニュアル用：手順とスクリーンショット ---- */
.manual-step { padding: 36px 0; border-bottom: 1px solid rgba(59, 52, 44, 0.08); }
.manual-step:last-child { border-bottom: none; }
.manual-step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.manual-step-num {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fbe9c3, var(--gold));
  color: var(--ink); font-weight: 700; font-size: 14px;
  display: grid; place-items: center; box-shadow: 0 0 12px rgba(217, 164, 65, 0.45);
}
.manual-step h3 { margin: 0; font-size: 17px; }
.manual-step p.desc { color: var(--ink-soft); margin: 4px 0 16px 42px; font-size: 13px; max-width: 560px; }
.manual-shot {
  margin-left: 0; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-lg); border: 1px solid #eee5d4;
}
.manual-tip {
  margin: 14px 0 0 42px; font-size: 12px; color: #7a5b16;
  background: var(--gold-soft); border-radius: 10px; padding: 8px 12px; display: inline-block;
}

/* ---- フッター ---- */
.site-footer {
  padding: 30px 0 50px; text-align: center; color: var(--ink-soft); font-size: 12px;
}
.site-footer a { color: var(--leaf); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

.toc {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0;
}
.toc a {
  font-size: 12px; color: var(--ink-soft); text-decoration: none;
  background: #fff; border-radius: 999px; padding: 6px 12px; box-shadow: var(--shadow);
}
.toc a:hover { color: var(--ink); }

.manual-shot-narrow { max-width: 560px; }
.manual-list {
  margin: 0 0 16px 42px; padding-left: 18px; max-width: 560px;
  color: var(--ink-soft); font-size: 13px;
}
.manual-list li { margin: 4px 0; }
.manual-list strong { color: var(--ink); }
.manual-step code { background: var(--paper-deep); border-radius: 4px; padding: 1px 5px; font-size: 12px; }
.manual-step .manual-shot + .manual-list, .manual-step .manual-shot + .manual-shot { margin-top: 20px; }
.manual-step .manual-list + .manual-shot { margin-top: 20px; }
