/* SUNLITLY（黒背景×ピンク / タイポグラフィはknap.jpブログ準拠） */
:root {
  --pink: #e8489b;
  --bg: #161616;
  --panel: #1f1f1f;
  --line: #3a3a3a;
  --text: #f5f5f5;
  --muted: #bbb;
}
body {
  margin: 0;
  font-family: "Noto Sans JP", "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: .07em;
  color: var(--text);
  background: var(--bg);
  overflow-wrap: break-word;
}
a { color: var(--pink); }

/* 見出し（knap .l-single_content 準拠） */
h1 { font-size: 38px; font-weight: 700; line-height: 1.5; margin: 0 0 3rem; }
h2 {
  font-size: 32px; font-weight: 700; line-height: 1.5;
  margin: 12rem 0 8rem; padding-top: 12rem;
  border-top: 1px solid var(--line);
}
h3 { font-size: 26px; font-weight: 700; line-height: 1.5; margin: 8rem 0 4rem; }
h4 { font-size: 20px; font-weight: 700; line-height: 1.5; margin: 8rem 0 4rem; }

.wrap { max-width: 1000px; margin: 0 auto; padding-left: 2rem; padding-right: 2rem; }

/* ヘッダー（ピンクバー） */
.site-header { background: var(--pink); }
.site-header .wrap { padding-top: 1.2rem; padding-bottom: 1.2rem; text-align: center; }
.site-title { margin: 0; font-size: 18px; font-weight: 700; }
.site-title a { color: #fff; text-decoration: none; }

/* コンテンツ */
main.wrap { padding-top: 4rem; padding-bottom: 12rem; }
main p { font-size: 18px; line-height: 2; margin: 0 0 2rem; }
main li { line-height: 2; }
main ul li:not(:first-child), main ol li:not(:first-child) { margin-top: 1.6rem; }
.updated { margin: 0 0 1rem; font-size: 12px; color: var(--muted); letter-spacing: .07em; }

/* heroスライダー（特集サムネイルの自動送り） */
.hero-slider { position: relative; margin: 0 0 4rem; border: 1px solid var(--line); background: #2a2a2a; overflow: hidden; }
.hero-frame { position: relative; aspect-ratio: 1040 / 440; }
.hero-frame a { display: block; height: 100%; }
.hero-frame img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease; }
.hero-slide.active img { opacity: 1; }
.hero-caption {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0;
  padding: 3rem 2.4rem .8rem; font-size: 14px; color: #fff; text-align: center;
  background: linear-gradient(transparent, rgba(0,0,0,.8));
}
.hero-slide { position: absolute; inset: 0; }
.hero-slide .hero-caption { opacity: 0; transition: opacity .6s ease; }
.hero-slide.active .hero-caption { opacity: 1; }
.hero-prev, .hero-next {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 40px; height: 40px; padding: 0; border: none; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; font-size: 22px; line-height: 1; cursor: pointer;
}
.hero-prev { left: 12px; }
.hero-next { right: 12px; }
.hero-prev:hover, .hero-next:hover { background: var(--pink); }
.hero-dots {
  position: absolute; left: 0; right: 0; bottom: 4px; z-index: 2;
  display: flex; justify-content: center; gap: 8px;
}
.hero-dots button {
  width: 10px; height: 10px; padding: 0; border: none; border-radius: 50%;
  background: rgba(255,255,255,.45); cursor: pointer;
}
.hero-dots button.active { background: var(--pink); }

/* セクション見出し（トップの「特集記事」等。本文用h2の巨大マージンを打ち消す） */
.section-title { font-size: 26px; font-weight: 700; line-height: 1.6; margin: 0 0 2.4rem; padding: 0; border: none; }

/* 特集カードグリッド（トップページ。knap.jp/blog準拠: 枠なし・画像が上・タイトル下） */
.feat-cards { list-style: none; margin: 0 0 4rem; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4rem 3rem; }
.feat-cards li, main .feat-cards li:not(:first-child) { margin-top: 0; }
.feat-card > a { display: block; text-decoration: none; color: var(--text); }
.feat-thumb { display: block; width: 100%; aspect-ratio: 212 / 300; overflow: hidden; background: #242424; }
.feat-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.feat-card > a:hover .feat-thumb img { transform: scale(1.06); }
.feat-meta { display: block; }
.feat-title { display: block; margin: 1.2rem 0 0; font-size: 16px; font-weight: 700; line-height: 1.6; }
.feat-card > a:hover .feat-title { color: var(--pink); }
.feat-desc { display: block; margin: .4rem 0 0; font-size: 12px; color: var(--muted); line-height: 1.7; }

/* 作品一覧 */
.cards {
  list-style: none;
  margin: 0 0 8rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 4rem 2rem;
}
.card { border: 1px solid var(--line); background: var(--panel); }
.card a { display: block; padding: 1.2rem; text-decoration: none; color: var(--text); }
.card figure { margin: 0; }
.card img { display: block; width: 100%; height: auto; }
.card h2, .card h3 {
  font-size: 16px; line-height: 1.6;
  margin: 1rem 0 0; padding: 0; border: none;
}
.card .author { margin: .4rem 0 0; font-size: 12px; color: var(--muted); }

/* 作品ページ（参考デザインの情報行スタイル） */
.info { margin: 0; border-top: 1px solid var(--line); }
.info .row { display: flex; border-bottom: 1px solid var(--line); }
.info dt { width: 8em; padding: .6rem 0; margin: 0; font-size: 16px; color: var(--pink); font-weight: 700; flex-shrink: 0; }
.info dd { margin: 0; padding: .6rem 0; font-size: 16px; }

.cover { margin: 0 0 4rem; text-align: center; }
.cover img { max-width: 400px; width: 100%; height: auto; }
.cover a:hover { opacity: .85; }

.btn {
  display: inline-block;
  padding: .8rem 2.8rem;
  background: var(--pink);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}
.btn:hover { background: #d63a8a; }

/* 目次 */
.toc { border: 1px solid var(--line); background: var(--panel); padding: 2.4rem 2.8rem; margin: 0 0 4rem; }
.toc p { margin: 0 0 .8rem; font-size: 16px; font-weight: 700; }
.toc ul { margin: 0; padding-left: 1.6rem; }
.toc li { font-size: 16px; }
.toc ul li:not(:first-child) { margin-top: .6rem; }

/* 特集記事の作品ブロック */
.feat-block { border: 1px solid var(--line); background: var(--panel); padding: 3rem; margin: 0 0 8rem; }
.feat-block h3 { margin: 0 0 2.4rem; }
.feat-head { display: flex; gap: 2.4rem; margin: 0 0 1rem; }
.feat-head img { width: 220px; height: auto; flex-shrink: 0; align-self: flex-start; }
.feat-head .info { flex: 1; }
.feat-block h4 { color: var(--pink); margin: 2.4rem 0 .4rem; }
.feat-block ul { margin: 0 0 1rem; padding-left: 1.6rem; }
.links { margin: 2rem 0 0; }
.note { color: var(--muted); }

/* 作品ページ（記事レイアウト） */
.crumb { margin: 0 0 2rem; font-size: 12px; color: var(--muted); }
.crumb a { color: var(--muted); }
.work h1 { margin: 0 0 .8rem; }
.byline { margin: 0 0 3rem; font-size: 14px; color: var(--muted); }
.work-main { display: flex; gap: 3.2rem; align-items: flex-start; margin: 0 0 4rem; }
.work-main .cover { width: 320px; flex-shrink: 0; margin: 0; }
.work-info { flex: 1; min-width: 0; }
.work-buy { margin: 2rem 0 0; }
.center { text-align: center; }
.work-section { margin-top: 7rem; }
blockquote.editornote {
  margin: 0; padding: 2rem 2.4rem;
  border-left: 4px solid var(--pink); background: var(--panel);
  font-size: 16px; line-height: 2;
}
.src { margin: .8rem 0 0; font-size: 12px; color: var(--muted); }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; padding: 0; }
.tag {
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0 1.2rem; font-size: 13px; line-height: 1.9; color: var(--muted);
}
.info dd { line-height: 1.9; }
.cards-in-article { margin-bottom: 0; }
.cards-in-article .card h3 { font-size: 15px; }

/* フッター */
.site-footer { background: #0d0d0d; border-top: 1px solid var(--line); color: var(--muted); margin-top: 4rem; }
.site-footer .wrap { padding-top: 2rem; padding-bottom: 2rem; }
.site-footer p { margin: 0; font-size: 14px; }
.site-footer a { color: var(--pink); }

@media (max-width: 480px) {
  h1 { font-size: 28px; }
  h2 { font-size: 28px; margin: 8rem 0 6rem; padding-top: 8rem; }
  h3 { font-size: 23px; margin: 6rem 0 3rem; }
  h4 { font-size: 18px; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .info dt { width: 6em; }
  .work-main { flex-direction: column; align-items: center; }
  .work-main .cover { width: 100%; max-width: 320px; }
  .work-info { width: 100%; }
  .feat-block { padding: 2rem; }
  .feat-head { flex-direction: column; align-items: center; }
  .feat-head img { width: 100%; max-width: 300px; }
  .feat-cards { grid-template-columns: 1fr; gap: 3rem 0; }
  .hero-frame { aspect-ratio: 440 / 440; }
  .hero-prev { left: 6px; }
  .hero-next { right: 6px; }
}

/* ぼかしプレビュー＋スピナー→3秒後に同位置へボタン入替 */
.preview { position: relative; max-width: 400px; margin: 0 auto 4rem; overflow: hidden; }
.preview img { display: block; width: 100%; height: auto; filter: blur(14px); transform: scale(1.08); }
.preview .loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(22, 22, 22, .35);
  color: #f5f5f5;
}
.preview .loading > * { grid-area: 1 / 1; }
.preview .spin { width: 48px; height: 48px; animation: spin 1s linear infinite, spin-out .5s ease 3s forwards; }
.preview .btn { opacity: 0; animation: read-in .6s ease 3s forwards; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-out { to { opacity: 0; visibility: hidden; } }
@keyframes read-in { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .preview .spin { display: none; }
  .preview .btn { animation-delay: 0s; animation-duration: 0s; }
}
