/* PPP Works — 共通スタイル */
:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --fg: #171a21;
  --muted: #5d6472;
  --line: #e2e5ec;
  --blue: #1f3cff;
  --green: #12b83c;
  --red: #f0283c;
  --accent: var(--blue);
  --accent-fg: #ffffff;
  --chip: #eef1ff;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .06);
  --radius: 16px;
  --max: 1080px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1116;
    --surface: #171a22;
    --fg: #eceff5;
    --muted: #a1a8b6;
    --line: #2a2f3a;
    --blue: #6f86ff;
    --green: #3ddc6a;
    --red: #ff5d6c;
    --accent-fg: #0f1116;
    --chip: #222842;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Noto Sans JP", "Yu Gothic UI", "Hiragino Sans", "Meiryo", sans-serif;
  line-height: 1.8;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* 三色の帯（ロゴの RGB をモチーフに） */
.rgb-bar { height: 4px; background: linear-gradient(90deg, var(--blue) 0 33.3%, var(--green) 33.3% 66.6%, var(--red) 66.6% 100%); }

/* ヘッダー */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: .02em; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: #fff; padding: 3px; box-shadow: 0 0 0 1px var(--line); }
.nav { display: flex; gap: 4px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: 15px; color: var(--muted); }
.nav a[aria-current="page"] { color: var(--fg); background: var(--chip); }

/* ヒーロー */
.hero { padding: 72px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--accent); background: var(--chip); padding: 4px 12px; border-radius: 999px; }
.hero h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.25; margin: 16px 0 16px; letter-spacing: -.01em; }
.hero h1 .c-b { color: var(--blue); } .hero h1 .c-g { color: var(--green); } .hero h1 .c-r { color: var(--red); }
.hero p.lead { font-size: 17px; color: var(--muted); margin: 0 0 28px; }
.hero-logo { background: #fff; border-radius: 28px; padding: 28px; box-shadow: var(--shadow); aspect-ratio: 1; display: grid; place-items: center; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; min-height: 44px; gap: 8px; text-decoration: none; font-weight: 700; padding: 12px 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: transparent; }
.btn small { font-weight: 400; opacity: .85; }

/* セクション */
section { padding: 48px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
h2 { font-size: clamp(22px, 3vw, 26px); margin: 0; line-height: 1.35; letter-spacing: -.005em; }
h2 + .sub, .section-head .sub { color: var(--muted); margin: 4px 0 0; font-size: 15px; }
.more { font-size: 15px; color: var(--accent); text-decoration: none; font-weight: 700; white-space: nowrap; }

/* カード */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; text-decoration: none; }
.card .thumb { aspect-ratio: 16 / 10; background: var(--chip); display: grid; place-items: center; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .thumb.placeholder { font-size: 15px; color: var(--muted); font-weight: 700; }
.card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { margin: 0; font-size: 19px; line-height: 1.45; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--chip); color: var(--accent); }
.tag.soon { color: var(--red); }

/* 特徴（3列） */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.feature .dot { width: 10px; height: 10px; border-radius: 50%; margin-bottom: 10px; }
.feature h3 { margin: 0 0 6px; font-size: 17px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* 記事のような本文ページ */
.page-head { padding: 48px 0 8px; }
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs a { text-decoration: none; }
.page-head h1 { font-size: clamp(26px, 4vw, 36px); line-height: 1.35; margin: 8px 0; }
.prose { max-width: 760px; }
.prose h2 { font-size: 21px; margin: 36px 0 10px; padding-left: 12px; border-left: 4px solid var(--accent); }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 4px 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.kbd { font-family: Consolas, monospace; font-size: 14px; padding: 1px 7px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); white-space: nowrap; }
code, pre { font-family: Consolas, "Courier New", monospace; background: var(--chip); border-radius: 6px; }
code { padding: 1px 6px; font-size: 14px; }
pre { padding: 14px; overflow-x: auto; font-size: 14px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 700; }
.note { color: var(--muted); font-size: 14px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.shot { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--chip); }

/* プロフィール */
.profile { display: grid; grid-template-columns: 160px 1fr; gap: 28px; align-items: center; }
.avatar { width: 160px; height: 160px; border-radius: 32px; background: #fff; padding: 18px; box-shadow: var(--shadow); }

/* 連絡先 */
.contact-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

/* フッター */
.site-footer { margin-top: 48px; border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }

/* スマホ */
@media (max-width: 760px) {
  .site-header .wrap { height: 56px; }
  .brand span { display: none; }
  .nav a { padding: 6px 10px; font-size: 14px; }
  .hero { padding: 40px 0 32px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 28px; }
  .hero-logo { max-width: 220px; padding: 18px; border-radius: 22px; order: -1; }
  .features { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .profile { grid-template-columns: 1fr; }
  .avatar { width: 120px; height: 120px; }
  .section-head { flex-direction: column; align-items: start; }
}

/* 表と長いファイル名がスマホで横にはみ出さないように */
td code { word-break: break-all; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.card .thumb.book { position: relative; background: linear-gradient(135deg, #1a1d26, #2b3142); }
/* 表紙は切らずに全体を見せる（高さの % は grid の中で効かないので、絶対配置で枠に合わせる） */
.card .thumb.book img { position: absolute; top: 4%; left: 50%; transform: translateX(-50%); width: auto; height: 92%; max-width: none; object-fit: contain; box-shadow: 0 6px 18px rgba(0,0,0,.35); border-radius: 4px; }
.shot img { width: 100%; height: auto; }

/* 作品一覧のジャンル分け */
.genre-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.genre-nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-size: 14px; font-weight: 700; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.genre { padding-top: 40px; padding-bottom: 0; scroll-margin-top: 80px; }
.genre .section-head { padding-left: 12px; border-left: 4px solid var(--accent); }
.subgenre { margin: 28px 0 14px; font-size: 18px; color: var(--muted); scroll-margin-top: 80px; }
.empty { margin: 0; padding: 18px 20px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

/* 操作の手ざわり（Apple のデザインの考え方を Web に当てはめたもの） */
/* 見出しは日本語のかなを詰めて、大きい文字ほど字間と行間を締める */
h1, h2, h3, .brand { font-feature-settings: "palt"; }
.page-head h1 { letter-spacing: -.01em; line-height: 1.3; }
/* 押した瞬間に反応する（離した時ではなく）。動かすのは transform だけ */
.btn, a.card, .nav a, .genre-nav a, .more { transition: transform 100ms ease-out; }
.btn:active, .nav a:active, .genre-nav a:active { transform: scale(.97); }
a.card:active { transform: scale(.985); }
/* マウスがある時だけ、乗せた時の変化を出す（スマホで押した後に残らないように） */
@media (hover: hover) {
  .nav a:hover { color: var(--fg); background: var(--chip); }
  .btn:hover { transform: translateY(-1px); }
  a.card { transition: transform 200ms cubic-bezier(.2, .8, .2, 1); }
  a.card:hover { transform: translateY(-3px); }
  a.card:hover:active { transform: translateY(-1px) scale(.985); transition-duration: 100ms; }
}
/* キーボードで移動した時に、今どこにいるかがはっきり見える */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
a.card:focus-visible { border-radius: var(--radius); }
/* 動きを減らす設定の人には、動きを止める */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) {
  .btn, a.card, .nav a, .genre-nav a, .more { transition: opacity 200ms ease; }
  .btn:hover, .btn:active, a.card:hover, a.card:active, a.card:hover:active, .nav a:active, .genre-nav a:active { transform: none; }
  a.card:active, .btn:active { opacity: .8; }
}
/* 透明度を下げる設定の人には、すりガラスをやめて塗りつぶす */
@media (prefers-reduced-transparency: reduce) {
  .site-header { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
/* コントラストを上げる設定の人には、線と薄い文字を濃くする */
@media (prefers-contrast: more) {
  :root { --muted: #3a3f4a; --line: #8a90a0; }
  .site-header { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom-color: var(--line); }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --muted: #d0d5df; --line: #6b7282; }
}
/* 見出しが言葉の途中や「を、」だけで折り返さないように */
h1, h2, h3 { word-break: auto-phrase; text-wrap: balance; }
.ph { display: inline-block; }

/* サイトの案内（サイドバー）。広い画面では左に常に出ていて、しまえる。狭い画面ではメニューボタンで出す */
:root { --sb-w: 264px; --sb-ease: cubic-bezier(.32, .72, 0, 1); }
html { scrollbar-gutter: stable; }
.sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 40; width: var(--sb-w); display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); }
.sidebar::before { content: ""; height: 4px; flex: none; background: linear-gradient(90deg, var(--blue) 0 33.3%, var(--green) 33.3% 66.6%, var(--red) 66.6% 100%); }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 64px; flex: none; padding: 0 10px 0 16px; }
.sidebar-head .brand span { display: inline; }
.sidebar-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 12px 32px; }
.sb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; transition: transform 100ms ease-out; }
.sb-btn svg { flex: none; }
.sb-btn:active { transform: scale(.94); }
@media (hover: hover) { .sb-btn:hover { background: var(--chip); color: var(--fg); } }
.header-left { display: flex; align-items: center; gap: 6px; }
.sb-scrim { display: none; }

.menu-list, .menu-list ul { list-style: none; margin: 0; padding: 0; }
.menu-list ul { margin: 0 0 6px 12px; padding-left: 12px; border-left: 2px solid var(--line); }
.menu-list a, .menu-muted { display: flex; align-items: center; min-height: 40px; padding: 4px 12px; border-radius: 10px; text-decoration: none; font-weight: 700; font-size: 15px; line-height: 1.5; }
.menu-list ul a { font-weight: 400; }
.menu-list ul ul a { color: var(--muted); font-size: 14px; }
.menu-list a[aria-current="page"] { background: var(--chip); color: var(--accent); }
.menu-list li:has(> .menu-muted) { display: flex; align-items: center; gap: 8px; }
.menu-muted { color: var(--muted); font-weight: 400; padding-right: 0; }
.menu-soon { font-size: 12px; font-weight: 700; color: var(--red); background: var(--chip); padding: 1px 8px; border-radius: 999px; }
.menu-label { margin: 20px 0 4px 12px; font-size: 13px; font-weight: 700; color: var(--muted); }
/* たためる見出し（ジャンル・小分け）。右の印は、閉じていると右向き、開くと下向き */
.menu-list summary { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 12px; border-radius: 10px; font-size: 15px; line-height: 1.5; cursor: pointer; list-style: none; }
.menu-list summary::-webkit-details-marker { display: none; }
.menu-list summary::after { content: ""; flex: none; width: 7px; height: 7px; margin-left: auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; opacity: .55; transform: rotate(-45deg); transition: transform 150ms ease-out; }
.menu-list details[open] > summary::after { transform: rotate(45deg); }
.menu-list ul ul summary { color: var(--muted); font-size: 14px; }
/* 作品の名前: 頭に小さな丸を付け、2行目以降は丸の右にそろえる。名前と名前の間も少しあける */
.menu-list details a { align-items: flex-start; gap: 8px; }
.menu-list details a::before { content: ""; flex: none; width: 5px; height: 5px; margin-top: calc(.75em - 2.5px); border-radius: 50%; background: currentColor; opacity: .5; }
.menu-list details li + li { margin-top: 4px; }
@media (hover: hover) { .menu-list a:hover, .menu-list summary:hover { background: var(--chip); } }

/* 広い画面: 左に常に表示。しまうと上のヘッダーに開くボタンが出る */
@media (min-width: 1024px) {
  .page { margin-left: var(--sb-w); }
  html:not(.sb-collapsed) .site-header { display: none; }
  html.sb-collapsed .page { margin-left: 0; }
  html.sb-collapsed .sidebar { transform: translateX(-100%); visibility: hidden; }
  .sb-open-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  html.sb-ready .page { transition: margin-left 260ms var(--sb-ease); }
  html.sb-ready .sidebar { transition: transform 260ms var(--sb-ease), visibility 0s; }
  html.sb-ready.sb-collapsed .sidebar { transition: transform 260ms var(--sb-ease), visibility 0s linear 260ms; }
}
/* 狭い画面: メニューボタンで左から出す */
@media (max-width: 1023px) {
  .sidebar { width: min(var(--sb-w), 86vw); transform: translateX(-100%); visibility: hidden; box-shadow: 12px 0 40px rgba(0, 0, 0, .18); }
  html.sb-open .sidebar { transform: none; visibility: visible; }
  .sb-scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(10, 12, 16, .45); opacity: 0; pointer-events: none; }
  html.sb-open .sb-scrim { opacity: 1; pointer-events: auto; }
  html.sb-open { overflow: hidden; }
  .sb-open-btn { border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 999px; padding: 0 14px 0 12px; }
  html.sb-ready .sidebar { transition: transform 300ms var(--sb-ease), visibility 0s linear 300ms; }
  html.sb-ready.sb-open .sidebar { transition: transform 300ms var(--sb-ease), visibility 0s; }
  html.sb-ready .sb-scrim { transition: opacity 300ms ease; }
}
@media (max-width: 760px) { .site-header .nav { display: none; } }
@media (prefers-reduced-motion: reduce) {
  html.sb-ready .sidebar, html.sb-ready .page { transition-duration: 0s !important; transition-delay: 0s !important; }
}

/* 作品ページ（GuruRun Launcher など）: 見出しの左の線、動画、写真の並び */
.h-bar { padding-left: 12px; border-left: 4px solid var(--accent); }
.shot video { display: block; width: 100%; height: auto; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.gallery figure { margin: 0; background: var(--surface); border: 1px solid var(--line); }
.gallery figure img { display: block; }
.gallery figcaption { padding: 12px 16px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }
.video-shot { max-width: 900px; }

/* Free版と Pro版の比べ方（値段の箱と、できることの表） */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.plan .price { font-size: 32px; font-weight: 700; margin: 6px 0 12px; font-feature-settings: "palt"; }
.plan .note { margin: 10px 0 0; }
.plan.pro { border-color: var(--accent); }
.compare { min-width: 520px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.compare th, .compare td { padding: 12px 14px; vertical-align: middle; }
.compare tbody th { color: var(--fg); font-weight: 400; }
.compare td { text-align: center; width: 22%; white-space: nowrap; font-weight: 700; }
.compare thead th { text-align: center; color: #fff; font-size: 16px; }
.compare thead th:first-child { text-align: left; color: var(--muted); background: var(--surface); font-size: 14px; }
.compare .c-free { background: #0a78e6; }
.compare .c-pro { background: #ef7d22; }
.compare tbody tr:nth-child(even) { background: var(--chip); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare .yes { color: var(--accent); }
.compare .no { color: var(--muted); font-weight: 400; }

/* 画像を押すと大きく表示 */
a.zoom { display: block; cursor: zoom-in; }
.lightbox { max-width: min(96vw, 1400px); max-height: 96vh; padding: 0; border: 0; background: transparent; overflow: visible; }
.lightbox::backdrop { background: rgba(10, 12, 16, .82); }
.lightbox img { max-width: min(96vw, 1400px); max-height: 86vh; width: auto; height: auto; margin: 0 auto; border-radius: 12px; cursor: zoom-out; }
.lb-cap { margin: 10px 0 0; text-align: center; color: #fff; font-size: 14px; }
.lb-cap:empty { display: none; }
.lb-close { position: fixed; top: 12px; right: 12px; width: 44px; height: 44px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .16); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] { animation: lb-in 180ms ease-out; }
  @keyframes lb-in { from { opacity: 0; transform: scale(.98); } }
}
.compare .yes { font-size: 18px; }
@media (max-width: 560px) {
  .compare { min-width: 0; font-size: 13px; }
  .compare th, .compare td { padding: 10px 8px; }
  .compare td { width: 68px; white-space: normal; }
  .compare thead th { font-size: 14px; }
}

/* 本のページ: 表紙は縦長なので、左の列を細くする */
.book-split { grid-template-columns: minmax(200px, 300px) 1fr; }
.book-cover { border-radius: 8px; overflow: hidden; box-shadow: 0 10px 30px rgba(16, 24, 40, .18); align-self: start; }
.book-cover img { width: 100%; height: auto; display: block; }
.toc { list-style: none; padding-left: 0; counter-reset: ch; }
.toc li { counter-increment: ch; padding: 8px 0; border-bottom: 1px solid var(--line); }
.toc li::before { content: "第" counter(ch) "章　"; font-weight: 700; color: var(--accent); }
@media (max-width: 760px) {
  .book-split { grid-template-columns: 1fr; }
  .book-cover { max-width: 240px; margin: 0 auto; }
}
