/* ===================================================
   見本の外側（飾り）。全記事で共通。記事のコード欄には載せない。
   読者がコピーするのは、各ページの <style>・見本の HTML・<script> だけ。
   A 部品をならべる … .demo-head + .items
   B サイトらしい画面 … .page（.site-header + .site-main）
   C 画面いっぱい … .fills + .fill-label
   =================================================== */
@import url("https://fonts.googleapis.com/css2?family=Jost:wght@400;500&family=Zen+Kaku+Gothic+New:wght@400;700&display=swap");

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Jost", "Zen Kaku Gothic New", sans-serif;
  color: #2b2a27;
  background: #fff;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; vertical-align: middle; }
[hidden] { display: none !important; }

/* ---------- A：部品をならべる ---------- */
.demo-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; padding: 24px 24px 20px; }
.demo-head .logo { margin: 0; font: 500 14px/1 "Jost", sans-serif; letter-spacing: .04em; }
.demo-head h1 { margin: 0; font-family: "Zen Kaku Gothic New", sans-serif; font-size: 18px; font-weight: 700; line-height: 1.5; }
.demo-head .lead { flex-basis: 100%; margin: 0; font-size: 13px; color: #6b675f; }

.items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  margin: 0; padding: 0; list-style: none;
  border-top: 1px solid #e8e3d8;
  counter-reset: n;
}
.items > li {
  position: relative;
  display: flex; flex-direction: column; justify-content: center;
  min-height: 168px;
  padding: 56px 32px 32px;
  border-right: 1px solid #e8e3d8;
  border-bottom: 1px solid #e8e3d8;
  counter-increment: n;
}
.items > li::before {
  content: counter(n, decimal-leading-zero);
  position: absolute; top: 14px; left: 14px;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: #e8dc6a;
  font: 500 11px/1 "Jost", sans-serif;
}
.items .item-name {
  position: absolute; top: 14px; left: 50px; right: 14px;
  margin: 0; font-size: 12px; line-height: 26px; color: #6b675f;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 600px) {
  .demo-head { padding: 20px 16px 16px; }
  .items { grid-template-columns: 1fr; }
  .items > li { min-height: 140px; padding: 52px 20px 28px; border-right: 0; }
}

/* ?only=05 … 1つだけ（記事の見出しごとに iframe で入れるとき） */
.is-only .demo-head { display: none; }
.is-only .items { display: block; border: 0; }
.is-only .items > li { min-height: 100vh; border: 0; padding: 40px 24px; }
.is-only .items > li::before { counter-increment: none; content: attr(data-n); }

/* ---------- B：サイトらしい画面（架空のサイト） ---------- */
.page { background: #fff; }
.site-header {
  height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 24px;
  border-bottom: 1px solid #e8e3d8;
}
.site-header.is-center { justify-content: center; }
.logo { font-family: "Jost", sans-serif; font-weight: 500; font-size: 18px; letter-spacing: .04em; color: inherit; text-decoration: none; }
.site-header .crumb { font-size: 12px; letter-spacing: .14em; color: #6b675f; }
.site-main { max-width: 880px; margin: 0 auto; padding: 24px 24px 32px; }
.site-main.is-wide { max-width: none; padding-left: 0; padding-right: 0; }

/* まるとせん（画像の代わり） */
.hero { position: relative; height: 200px; background: #f3efe6; border-radius: 4px; overflow: hidden; }
.hero::before { content: ""; position: absolute; top: 26px; right: 16%; width: 148px; height: 148px; border-radius: 50%; background: #e8dc6a; }
.hero::after { content: ""; position: absolute; left: 8%; right: 8%; top: 64%; height: 2px; background: #2b2a27; }
.hero i { position: absolute; left: 22%; top: calc(64% - 7px); width: 16px; height: 16px; border-radius: 50%; background: #2b2a27; }

.eyebrow { margin: 0; font-size: 12px; letter-spacing: .14em; color: #6b675f; }
.site-main h1, .site-main h2.title { margin: 2px 0 0; font-family: "Zen Kaku Gothic New", sans-serif; font-size: 22px; font-weight: 700; line-height: 1.5; }
.site-main .lead { margin: 6px 0 0; font-size: 14px; color: #6b675f; }

/* スクロールのきっかけ（inview など） */
.scroll-hint {
  margin: 0;
  height: calc(100vh - 64px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  font-size: 12px; letter-spacing: .2em; color: #6b675f;
}
.scroll-hint::after { content: ""; width: 2px; height: 64px; background: linear-gradient(#2b2a27 0 0) top / 2px 24px no-repeat, #e8e3d8; animation: hint 2.4s ease-in-out infinite; }
@keyframes hint { 0% { background-position: 0 -24px; } 100% { background-position: 0 64px; } }
.site-footer { margin: 0; height: 50vh; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 24px; font-size: 12px; color: #6b675f; }

@media (max-width: 600px) {
  .site-header { height: 56px; padding: 0 16px; }
  .site-header .crumb { display: none; }
  .site-main { padding: 20px 16px 28px; }
  .site-main h1, .site-main h2.title { font-size: 19px; }
  .scroll-hint { height: calc(100vh - 56px); }
}

/* ---------- C：画面いっぱい ---------- */
.fills { margin: 0; padding: 0; list-style: none; }
.fills > li { position: relative; min-height: 100vh; }
.fill-label {
  position: absolute; left: 16px; bottom: 16px; z-index: 1;
  display: flex; align-items: center; gap: 10px;
  margin: 0; padding: 6px 14px 6px 6px;
  background: #fff; border-radius: 999px;
  box-shadow: 0 0 0 1px #e8e3d8;
  font-size: 12px; line-height: 1.4;
}
.fill-label b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #e8dc6a; font: 500 11px/1 "Jost", sans-serif; }

/* ---------- 図・録画用 ---------- */
/* ?still 動きを止める */
.is-still *, .is-still *::before, .is-still *::after {
  transition: none !important;
  animation-duration: 0s !important;
  animation-delay: 0s !important;
  animation-iteration-count: 1 !important;
}
html.is-still, html.is-bare { scrollbar-width: none; }
html.is-still::-webkit-scrollbar, html.is-bare::-webkit-scrollbar { display: none; }
/* ?bare 飾りを消す（図の中に入れるとき） */
.is-bare .demo-head, .is-bare .fill-label, .is-bare .item-name { display: none; }
.is-bare.is-only .items > li::before { display: none; }
.is-bare body { background: transparent; }
