/* =========================================================
   drift with dara — design system
   くすみパステル × 一筆描き線画 × 丸み
   ========================================================= */

/* ---------- design tokens ---------- */
:root {
  /* base */
  --bg-page: #F4ECDA;
  --bg-cream: #FBF6EE;

  /* brush (pink / AI) */
  --c-brush: #E8C5C0;
  --c-brush-soft: #F2DDD8;
  --c-brush-ink: #C58A85;

  /* sage (green / 生活) */
  --c-sage: #C5D6C0;
  --c-sage-soft: #DCE8D8;
  --c-sage-ink: #6B8A5E;

  /* sand (beige / PC) */
  --c-sand: #D8C5A8;
  --c-sand-soft: #EDE3D0;
  --c-sand-ink: #9A7C4A;

  /* lavender (drift / 漂流) */
  --c-lav: #C8B5D0;
  --c-lav-soft: #E5DAE8;
  --c-lav-ink: #8A75A0;

  /* text */
  --t-heading: #5C4D3F;
  --t-body: #6B5B4A;
  --t-mute: #9A8775;
  --t-caption: #B5A395;

  /* radii */
  --r-hero: 24px;
  --r-card: 18px;
  --r-box: 20px;
  --r-tag: 14px;
}

/* ---------- reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic",
    "メイリオ", sans-serif;
  font-size: 16px;
  line-height: 1.9;
  color: var(--t-body);
  background-color: var(--bg-page);
  background-image:
    /* top row */
    radial-gradient(circle at 3% 6%,   var(--c-brush-soft) 30px, transparent 31px),
    radial-gradient(circle at 22% 3%,  var(--c-sand)       10px, transparent 11px),
    radial-gradient(circle at 42% 8%,  var(--c-lav)         8px, transparent  9px),
    radial-gradient(circle at 58% 2%,  var(--c-brush)      14px, transparent 15px),
    radial-gradient(circle at 76% 10%, var(--c-sage-soft)  20px, transparent 21px),
    radial-gradient(circle at 96% 5%,  var(--c-sage)       14px, transparent 15px),
    /* upper sides */
    radial-gradient(circle at 6% 26%,  var(--c-sand)       10px, transparent 11px),
    radial-gradient(circle at 94% 30%, var(--c-lav-soft)   34px, transparent 35px),
    /* middle sides */
    radial-gradient(circle at 2% 52%,  var(--c-sage-soft)  22px, transparent 23px),
    radial-gradient(circle at 98% 58%, var(--c-brush)      12px, transparent 13px),
    /* lower sides */
    radial-gradient(circle at 4% 78%,  var(--c-lav)        16px, transparent 17px),
    radial-gradient(circle at 95% 84%, var(--c-sand-soft)  28px, transparent 29px),
    /* bottom row */
    radial-gradient(circle at 6% 95%,  var(--c-brush)       8px, transparent  9px),
    radial-gradient(circle at 24% 90%, var(--c-lav)        14px, transparent 15px),
    radial-gradient(circle at 44% 97%, var(--c-sand-soft)  24px, transparent 25px),
    radial-gradient(circle at 62% 92%, var(--c-brush-soft) 18px, transparent 19px),
    radial-gradient(circle at 80% 96%, var(--c-sage)       10px, transparent 11px),
    radial-gradient(circle at 96% 90%, var(--c-lav-soft)   22px, transparent 23px);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: 100% 100%;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 48px;
}

a {
  color: var(--c-brush-ink);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  opacity: 0.7;
}

/* ---------- layout containers ---------- */
.wrap {
  max-width: 1050px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- site header ---------- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 32px;
  max-width: 100%;
}

.site-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--t-heading);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.logo-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.logo-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.logo-dots span:nth-child(1) { background: var(--c-brush); }
.logo-dots span:nth-child(2) { background: var(--c-sage); }
.logo-dots span:nth-child(3) { background: var(--c-sand); }

.site-header nav {
  display: flex;
  gap: 20px;
}

.site-header nav a {
  color: var(--t-mute);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.site-header nav a:hover {
  color: var(--c-brush-ink);
  opacity: 1;
}

/* ---------- hero box ---------- */
.hero-box {
  background: var(--bg-cream);
  border-radius: var(--r-hero);
  max-width: 1100px;
  margin: 8px auto 32px;
  padding: 48px 48px 24px;
  text-align: center;
}

.hero-box .hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.hero-box h1 {
  color: var(--t-heading);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.55;
  margin-bottom: 14px;
}

.hero-box .hero-sub {
  color: var(--t-mute);
  font-size: 12px;
  letter-spacing: 0.1em;
  line-height: 1.9;
}

.hero-image {
  margin: 24px auto 0;
  max-width: 820px;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
}

/* ---------- dara message box ---------- */
.dara-msg {
  background: var(--bg-cream);
  border-radius: var(--r-box);
  padding: 28px 24px 24px;
  margin: 28px 0;
  position: relative;
}

.dara-msg .dara-label {
  display: inline-block;
  background: var(--c-brush);
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.12em;
  padding: 5px 12px;
  border-radius: var(--r-tag);
  margin-bottom: 14px;
}

.dara-msg p {
  color: var(--t-body);
  font-size: 13px;
  line-height: 2;
  margin-bottom: 12px;
}

.dara-msg p:last-child {
  margin-bottom: 0;
}

.dara-msg .heart {
  color: var(--c-brush-ink);
  margin-left: 4px;
}

/* ---------- section heading with dot ribbon ---------- */
.section-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 36px 0 20px;
  color: var(--t-heading);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.section-head::before,
.section-head::after {
  content: "";
  display: inline-flex;
  width: 36px;
  height: 6px;
  background-image:
    radial-gradient(circle, var(--c-brush) 3px, transparent 3.5px),
    radial-gradient(circle, var(--c-sage) 3px, transparent 3.5px);
  background-size: 12px 6px;
  background-repeat: no-repeat;
  background-position: 0 50%, 12px 50%;
  opacity: 0.9;
}

/* variants for ribbon color tint */
.section-head.sage::before,
.section-head.sage::after {
  background-image:
    radial-gradient(circle, var(--c-sage) 3px, transparent 3.5px),
    radial-gradient(circle, var(--c-sand) 3px, transparent 3.5px);
}

.section-head.sand::before,
.section-head.sand::after {
  background-image:
    radial-gradient(circle, var(--c-sand) 3px, transparent 3.5px),
    radial-gradient(circle, var(--c-lav) 3px, transparent 3.5px);
}

/* ---------- article cards (index list) ---------- */
.post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.post-card {
  background: var(--bg-cream);
  border-radius: var(--r-card);
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 16px;
  align-items: start;
}

.post-card a {
  display: contents;
  color: inherit;
}

.post-card a:hover .post-title {
  color: var(--c-brush-ink);
  opacity: 1;
}

/* icon = outer light circle + inner dark circle + white highlight */
.post-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.post-icon::after {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 50%;
  position: relative;
}

.post-icon::before {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  top: 14px;
  left: 18px;
  opacity: 0.85;
  z-index: 1;
}

/* category color: brush */
.post-card[data-cat="ai"] .post-icon { background: var(--c-brush-soft); }
.post-card[data-cat="ai"] .post-icon::after { background: var(--c-brush); }

.post-card[data-cat="life"] .post-icon { background: var(--c-sage-soft); }
.post-card[data-cat="life"] .post-icon::after { background: var(--c-sage); }

.post-card[data-cat="pc"] .post-icon { background: var(--c-sand-soft); }
.post-card[data-cat="pc"] .post-icon::after { background: var(--c-sand); }

.post-card[data-cat="drift"] .post-icon { background: var(--c-lav-soft); }
.post-card[data-cat="drift"] .post-icon::after { background: var(--c-lav); }

.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.cat-tag {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: var(--r-tag);
  line-height: 1.4;
}

.cat-tag.ai    { background: var(--c-brush-soft); color: var(--c-brush-ink); }
.cat-tag.life  { background: var(--c-sage-soft);  color: var(--c-sage-ink);  }
.cat-tag.pc    { background: var(--c-sand-soft);  color: var(--c-sand-ink);  }
.cat-tag.drift { background: var(--c-lav-soft);   color: var(--c-lav-ink);   }

.post-date {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--t-caption);
}

.post-title {
  color: var(--t-heading);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.6;
  margin-bottom: 4px;
}

.post-excerpt {
  color: var(--t-mute);
  font-size: 13px;
  line-height: 1.75;
}

/* ---------- article (single post) ---------- */
.article {
  background: var(--bg-cream);
  border-radius: var(--r-card);
  padding: 32px 28px 28px;
  margin: 24px 0;
}

.article h1 {
  color: var(--t-heading);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.55;
  margin-bottom: 14px;
}

.article .date {
  display: inline-block;
  color: var(--t-caption);
  font-size: 10px;
  letter-spacing: 0.14em;
  margin-bottom: 24px;
}

.article p {
  font-size: 16px;
  line-height: 2;
  margin-bottom: 16px;
  color: var(--t-body);
}

.article a {
  color: var(--c-brush-ink);
  border-bottom: 1px solid var(--c-brush-soft);
}

.article a:hover {
  border-bottom-color: var(--c-brush-ink);
  opacity: 1;
}

.article strong {
  color: var(--t-heading);
  font-weight: 500;
}

.article h2 {
  font-size: 24px;
  font-weight: 700;
  color: #c97b5e;
  letter-spacing: 0.04em;
  margin: 40px 0 14px;
}

.article h2::before {
  display: none;
}

.article h2::after {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  background: #c97b5e;
  border-radius: 2px;
  margin-top: 6px;
}

.article h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--t-heading);
  letter-spacing: 0.03em;
  margin: 28px 0 10px;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--c-brush-soft);
}

.article h3::before {
  display: none;
}

.article ol {
  list-style: decimal;
  margin: 0 0 16px;
  padding-left: 1.8rem;
}

/* ul → blockquote風スタイル（左ボーダー＋ライトブルー背景） */
.article ul {
  list-style: none;
  border-left: 3px solid #7aafc8;
  background: #edf5fa;
  border-radius: 6px;
  padding: 0.7rem 1rem 0.7rem 1.2rem;
  margin: 1rem 0 1.4rem;
}

.article ol li {
  padding-left: 0.3rem;
  font-size: 16px;
  line-height: 2;
  color: var(--t-body);
}

.article ul li {
  position: relative;
  padding-left: 0;
  font-size: 16px;
  line-height: 2;
  color: var(--t-body);
}

.article ul li::before {
  display: none;
}

.article ol li::before {
  display: none;
}

.article blockquote {
  background: #fdf0ed;
  border-left: 3px solid var(--c-brush-ink);
  border-radius: 6px;
  padding: 0.7rem 1rem 0.7rem 1.2rem;
  margin: 1rem 0 1.4rem;
  color: var(--t-body);
  font-size: 16px;
  line-height: 1.95;
}

.article blockquote::before {
  display: none !important;
  content: none !important;
}

.article blockquote p {
  margin: 0;
  font-size: 16px;
}

.article code {
  background: #fff;
  color: var(--c-brush-ink);
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-family: "SF Mono", ui-monospace, monospace;
  letter-spacing: 0;
}

.article hr {
  display: none;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  color: var(--c-brush-ink);
  font-size: 12px;
  letter-spacing: 0.08em;
  border-bottom: none !important;
}

.back-link::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-brush);
}

/* ---------- footer ---------- */
.site-footer {
  margin-top: 48px;
  padding: 32px 24px 24px;
  text-align: center;
  color: var(--t-caption);
  font-size: 11px;
  letter-spacing: 0.1em;
  line-height: 2;
}

.footer-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}

.footer-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.footer-dots span:nth-child(1) { background: var(--c-brush); }
.footer-dots span:nth-child(2) { background: var(--c-sage); }
.footer-dots span:nth-child(3) { background: var(--c-sand); }
.footer-dots span:nth-child(4) { background: var(--c-lav); }

.footer-tag {
  color: var(--t-mute);
  font-size: 11px;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 6px;
}

.footer-links a {
  color: var(--t-mute);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.footer-links a:hover {
  color: var(--c-brush-ink);
  opacity: 1;
}

.footer-copy {
  display: block;
  margin-top: 14px;
  color: var(--t-caption);
  font-size: 10px;
  letter-spacing: 0.14em;
}

/* ---------- about / static pages helpers ---------- */
.page-intro {
  background: var(--bg-cream);
  border-radius: var(--r-card);
  padding: 28px 26px;
  margin: 24px 0;
  color: var(--t-body);
  font-size: 13px;
  line-height: 2;
}

.page-intro strong {
  color: var(--t-heading);
  font-weight: 500;
}

/* ---------- responsive ---------- */
@media (max-width: 600px) {
  body {
    background-attachment: scroll;
    background-size: 100% auto;
  }

  .site-header {
    padding: 18px 20px;
  }

  .hero-box {
    margin: 4px 12px 24px;
    padding: 36px 22px 14px;
    max-width: none;
  }

  .hero-box h1 {
    font-size: 22px;
    line-height: 1.5;
  }

  .hero-box .hero-sub {
    font-size: 11px;
  }

  .wrap {
    padding: 0 20px;
  }

  .post-card {
    padding: 16px 18px;
    gap: 14px;
    grid-template-columns: 44px 1fr;
  }

  .post-icon {
    width: 44px;
    height: 44px;
  }

  .post-icon::before {
    top: 12px;
    left: 16px;
  }

  .article {
    padding: 26px 20px 22px;
  }

  .article h1 {
    font-size: 19px;
  }

  .section-head {
    font-size: 14px;
  }
}

/* =====================================================
   drift-editor 拡張スタイル
   （drift-editor.html から書き出した記事で使用）
   ===================================================== */

/* 画像サイズ */
img.img-small  { width: 240px; max-width: 100%; }
img.img-medium { width: 420px; max-width: 100%; }
img.img-large  { width: 100%; }
img.img-center { display: block; margin: 1rem auto; clear: both; }
img.img-float-left  { float: left;  margin: 0.3rem 1.2rem 0.6rem 0; display: inline; }
img.img-float-right { float: right; margin: 0.3rem 0 0.6rem 1.2rem; display: inline; }
img.img-shadow   { box-shadow: 0 8px 24px rgba(0,0,0,0.18); }
img.img-polaroid { background: #fff; border: 12px solid #fff; border-bottom-width: 40px; box-shadow: 0 8px 22px rgba(0,0,0,0.18); transform: rotate(-1.2deg); border-radius: 2px; }
img.img-circle   { border-radius: 50%; aspect-ratio: 1/1; object-fit: cover; }
img.img-hero     { width: 100%; max-height: 380px; object-fit: cover; margin: 1.4rem 0; clear: both; display: block; }

/* キャプション付き画像 */
figure.img-figure { margin: 1.2rem 0; text-align: center; clear: both; }
figure.img-figure.img-float-left  { float: left;  margin: 0.3rem 1.2rem 0.6rem 0; max-width: 50%; }
figure.img-figure.img-float-right { float: right; margin: 0.3rem 0 0.6rem 1.2rem; max-width: 50%; }
figure.img-figure img { display: block; margin: 0 auto; }
figure.img-figure figcaption { font-size: 0.85rem; color: #999; margin-top: 0.5rem; font-style: italic; line-height: 1.5; }

/* ギャラリー */
.img-gallery { display: grid; gap: 0.5rem; margin: 1.2rem 0; clear: both; }
.img-gallery.cols-2 { grid-template-columns: 1fr 1fr; }
.img-gallery.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.img-gallery.cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.img-gallery img { width: 100%; height: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; display: block; }

/* 手順ブロック（2カラム） */
.step-block { margin: 1.4rem 0; }
.step-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 1.4rem;
  align-items: start;
}
.step-left { display: flex; gap: 0.75rem; align-items: flex-start; }
.step-badge {
  background: #c97b5e; color: #fff; border-radius: 50%;
  width: 2rem; height: 2rem; flex-shrink: 0;
  display: flex !important; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; margin-top: 0.15rem;
}
.step-content { flex: 1; }
.step-right img { width: 100%; height: auto; border-radius: 6px; display: block; }

/* YouTube埋め込み */
.yt-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; margin: 1.4rem 0; border-radius: 8px; background: #000; }
.yt-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 8px; }

/* カラーボックス（ヒント・注意など） */
.callout { border: 1.5px solid #c97b5e; border-radius: 10px; padding: 0.9rem 1.2rem; margin: 1.4rem 0; background: #fdf8f4; }
.callout-warn { border-color: #d09040; background: #fdf8ee; }
.callout-info { border-color: #4a7ba8; background: #f0f5fa; }
.callout-label { font-size: 0.8rem; font-weight: 700; color: #c97b5e; margin-bottom: 0.5rem; display: block; }
.callout-warn .callout-label { color: #d09040; }
.callout-info .callout-label { color: #4a7ba8; }
.callout p { margin: 0 0 0.4rem; font-size: 0.9rem; }
.callout p:last-child { margin-bottom: 0; }
/* カラーボックス内のリスト点々を消す */
.callout ul, .callout ol { padding-left: 1rem; margin: 0; }
.callout ul li, .callout ol li { padding-left: 0.5rem; font-size: 0.9rem; }
.callout ul li::before { display: none !important; }
.callout ol li::before { display: none !important; }
.callout ol { list-style: decimal; }
.callout ul { list-style: none; }

/* clear float */
.article p::after { content: ""; display: block; clear: both; }

@media (max-width: 680px) {
  .step-row { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .img-gallery.cols-3,
  .img-gallery.cols-4 { grid-template-columns: 1fr 1fr; }
}
