/* =========================================================
   SUBGRADE — friendly & simple design system
   明るい / 丸い / 可愛げ  (Progate・Dotinstall 系)
   ========================================================= */
:root {
  /* base */
  --bg:        #fffdf8;   /* warm white */
  --band:      #fff3e6;   /* peach cream band */
  --band-lav:  #f2effc;   /* soft lavender band */
  --surface:   #ffffff;
  --ink:       #3b4a5a;   /* friendly slate-navy (not black) */
  --ink-soft:  #64717f;
  --muted:     #9aa5b1;
  --line:      #efe7db;   /* warm hairline */
  --line-cool: #eceaf3;

  /* accents (candy palette) */
  --coral:     #ff6f7e;
  --coral-dk:  #ef5566;
  --yellow:    #ffc94d;
  --yellow-dk: #eaad2a;
  --violet:    #8b7cf0;
  --mint:      #3fca9f;
  --sky:       #56b4ef;

  --maxw: 1080px;
  --readw: 700px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;

  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
          -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --maru: "Hiragino Maru Gothic ProN", "Zen Maru Gothic", "Rounded Mplus 1c",
          "Hiragino Sans", var(--sans);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.85;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

h1, h2, h3, .maru { font-family: var(--maru); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,253,248,.9);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; height: 68px;
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand__logo {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--coral); display: grid; place-items: center;
  color: #fff; box-shadow: 0 3px 0 var(--coral-dk);
}
.brand__logo svg { width: 17px; height: 17px; display: block; }
.brand__mark { font-family: var(--maru); font-weight: 700; font-size: 19px; letter-spacing: .01em; color: var(--ink); }
.brand__mark b { color: var(--coral); }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { font-size: 14.5px; font-weight: 600; color: var(--ink-soft); }
.nav a:hover { color: var(--coral); }

@media (max-width: 640px) {
  .nav { gap: 14px; }
  .nav a:not(.btn) { display: none; }
}

/* ---------- Buttons (chunky candy) ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--maru); font-weight: 700; font-size: 15px;
  padding: 13px 26px; border-radius: 12px; border: none; cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease, background .15s ease;
}
.btn--primary { background: var(--coral); color: #fff; box-shadow: 0 4px 0 var(--coral-dk); }
.btn--primary:hover { background: #ff8391; }
.btn--primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--coral-dk); }
.btn--sky { background: var(--sky); color: #fff; box-shadow: 0 4px 0 #368fce; }
.btn--sky:hover { background: #6cc0f4; }
.btn--sky:active { transform: translateY(3px); box-shadow: 0 1px 0 #368fce; }
.btn--sm { padding: 9px 18px; font-size: 13.5px; border-radius: 10px; box-shadow: 0 3px 0 var(--coral-dk); }
.btn--ghost {
  background: #fff; color: var(--ink); box-shadow: 0 4px 0 var(--line);
  border: 1px solid var(--line);
}
.btn--ghost:hover { color: var(--coral); }
.link-plain { font-weight: 600; font-size: 14px; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }
.link-plain:hover { color: var(--coral); }

/* ---------- Hero ---------- */
.hero { background: var(--band); position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero .wrap {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 30px;
  padding: 66px 22px 72px; position: relative; z-index: 2;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; color: var(--coral); font-weight: 700; font-size: 12.5px;
  font-family: var(--maru); padding: 6px 14px; border-radius: 999px;
  box-shadow: 0 2px 0 var(--line); margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(27px, 4.2vw, 40px); line-height: 1.5; margin: 0 0 18px;
  font-weight: 700; letter-spacing: .01em;
}
.hero h1 .u { background: linear-gradient(transparent 62%, #ffe08a 62%); padding: 0 2px; }
.hero p { color: var(--ink-soft); font-size: 15.5px; margin: 0 0 26px; max-width: 30em; }
.hero__stats { display: flex; gap: 26px; margin-bottom: 26px; }
.hero__stat b { font-family: var(--maru); font-size: 22px; color: var(--ink); }
.hero__stat span { font-size: 12.5px; color: var(--muted); display: block; margin-top: -2px; }
.hero__actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero__art { display: grid; place-items: center; }
.hero__art svg { width: 100%; max-width: 420px; height: auto; }

/* floating sparkles */
.spark { position: absolute; z-index: 1; opacity: .8; }
.spark svg { display: block; }
.s1 { top: 40px; left: 46%; width: 22px; }
.s2 { top: 150px; right: 8%; width: 15px; }
.s3 { bottom: 60px; left: 4%; width: 18px; }
.s4 { bottom: 120px; right: 40%; width: 12px; }

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: left; padding-top: 48px; padding-bottom: 52px; }
  .hero__art { order: -1; margin-bottom: 6px; }
  .hero__art svg { max-width: 300px; }
}

/* ---------- Section ---------- */
.section { padding: 66px 0; }
.section--tint { background: var(--band-lav); border-top: 1px solid var(--line-cool); border-bottom: 1px solid var(--line-cool); }
.section__head { text-align: center; margin-bottom: 40px; }
.section__head .kicker {
  font-family: var(--maru); font-weight: 700; font-size: 13px; color: var(--coral);
  letter-spacing: .06em; display: inline-block; margin-bottom: 8px;
}
.section__head h2 { font-size: clamp(22px, 3.4vw, 28px); margin: 0 0 8px; letter-spacing: .01em; }
.section__head p { color: var(--ink-soft); font-size: 14.5px; margin: 0; }

/* ---------- Article cards ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 860px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

.card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px 22px 20px; box-shadow: 0 4px 0 var(--line);
  transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 0 var(--line); }
.card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card__num {
  font-family: var(--maru); font-weight: 700; font-size: 13px; color: var(--muted);
}
.chip {
  font-family: var(--maru); font-weight: 700; font-size: 12px;
  padding: 4px 12px; border-radius: 999px; letter-spacing: .02em;
}
.chip--color  { background: #ffe7da; color: #e07344; }
.chip--expr   { background: #eae6ff; color: #6a5acd; }
.chip--flow   { background: #d9f5ec; color: #1fa480; }
.chip--motion { background: #fff0cc; color: #c9930f; }
.chip--eff    { background: #dcefff; color: #2f8fd8; }
.chip--ai     { background: #ffe1ec; color: #db5b93; }

.card h3 { font-size: 17px; line-height: 1.55; margin: 0 0 10px; }
.card p { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 16px; line-height: 1.75; }
.card__foot { margin-top: auto; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.card__foot .go { color: var(--coral); font-weight: 700; font-family: var(--maru); }
.tag-soon { background: var(--line); color: #8b8175; font-family: var(--maru); font-weight: 700; font-size: 11.5px; padding: 3px 11px; border-radius: 999px; }

/* card as link */
a.card:hover h3 { color: var(--coral); }

/* ---------- Feature row (3分で… 系) ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 700px) { .features { grid-template-columns: 1fr; } }
.feature { text-align: center; padding: 8px; }
.feature__icon {
  width: 74px; height: 74px; border-radius: 22px; margin: 0 auto 16px;
  display: grid; place-items: center; box-shadow: 0 5px 0 rgba(0,0,0,.06);
}
.feature__icon svg { width: 36px; height: 36px; }
.feature h3 { font-size: 17px; margin: 0 0 8px; }
.feature p { font-size: 13.5px; color: var(--ink-soft); margin: 0; }

/* ---------- Topics chips ---------- */
.topics { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.topic {
  font-family: var(--maru); font-weight: 700; font-size: 14px; color: var(--ink-soft);
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 18px; box-shadow: 0 3px 0 var(--line); transition: transform .1s ease;
}
.topic:hover { transform: translateY(-2px); color: var(--coral); }
.topic i { font-style: normal; margin-right: 5px; }

/* ---------- CTA band ---------- */
.cta {
  text-align: center; background: var(--band); border-radius: var(--r-lg);
  padding: 48px 26px; border: 1px solid var(--line); position: relative; overflow: hidden;
}
.cta h2 { font-size: clamp(20px, 3vw, 26px); margin: 0 0 10px; }
.cta p { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 24px; }

/* ---------- Footer ---------- */
.site-footer { padding: 46px 0 40px; border-top: 1px solid var(--line); background: var(--surface); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 26px; flex-wrap: wrap; }
.foot-cols { display: flex; gap: 50px; flex-wrap: wrap; }
.foot-col h4 { font-family: var(--maru); font-size: 12px; letter-spacing: .06em; color: var(--muted); margin: 0 0 12px; }
.foot-col a { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 9px; }
.foot-col a:hover { color: var(--coral); }
.copy { margin-top: 26px; font-size: 12px; color: var(--muted); }

/* =========================================================
   Article page
   ========================================================= */
.article { padding: 46px 0 40px; }
.article .wrap { max-width: var(--readw); }
.article__back { font-family: var(--maru); font-weight: 700; font-size: 13.5px; color: var(--ink-soft); display: inline-block; margin-bottom: 22px; }
.article__back:hover { color: var(--coral); }
.article h1 { font-size: clamp(24px, 4vw, 33px); line-height: 1.5; margin: 14px 0 16px; }
.article__lead { font-size: 16.5px; color: var(--ink-soft); margin: 0 0 20px; }
.article__meta { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); padding-bottom: 24px; border-bottom: 2px dashed var(--line); margin-bottom: 34px; }
.article__meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); }

.prose { font-size: 16px; }
.prose h2 {
  font-size: 21px; margin: 46px 0 16px; padding-left: 14px;
  border-left: 6px solid var(--yellow); border-radius: 2px;
}
.prose h3 { font-size: 17px; margin: 30px 0 10px; }
.prose p { margin: 0 0 18px; color: var(--ink-soft); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 20px; color: var(--ink-soft); }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--coral); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.prose code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .87em; background: var(--band-lav); color: #6a5acd; padding: 2px 7px; border-radius: 6px; }

.callout {
  background: var(--band); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 20px 22px; margin: 26px 0; font-size: 14.5px; box-shadow: 0 4px 0 var(--line);
}
.callout strong.label { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--coral-dk); font-family: var(--maru); font-size: 13px; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 22px 0; }
.steps li { position: relative; padding: 3px 0 20px 52px; margin: 0; border-left: 2px dashed var(--line); margin-left: 16px; }
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: -17px; top: -2px; width: 34px; height: 34px; border-radius: 12px;
  background: var(--coral); color: #fff; font-family: var(--maru); font-weight: 700; font-size: 15px;
  display: grid; place-items: center; box-shadow: 0 3px 0 var(--coral-dk);
}
.steps li strong { display: block; margin-bottom: 4px; color: var(--ink); }

.sources { margin-top: 22px; background: var(--band-lav); border: 1px solid var(--line-cool); border-radius: var(--r-md); padding: 20px 22px; }
.sources h4 { font-family: var(--maru); margin: 0 0 12px; font-size: 12.5px; color: var(--muted); letter-spacing: .04em; }
.sources a { font-size: 14px; }
.article__foot { margin-top: 44px; padding-top: 26px; border-top: 2px dashed var(--line); color: var(--muted); font-size: 13.5px; }

/* =========================================================
   Card thumbnails
   ========================================================= */
.card { padding: 0; overflow: hidden; }
.card__thumb { height: 150px; display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.card__thumb svg { width: 74%; height: auto; }
.card__body { padding: 20px 22px; display: flex; flex-direction: column; flex: 1; }
.th-color  { background: #ffe7da; }
.th-expr   { background: #eae6ff; }
.th-flow   { background: #dcefff; }
.th-motion { background: #fff4d6; }
.th-eff    { background: #d9f5ec; }
.th-ai     { background: #ffe1ec; }

/* =========================================================
   Ad slot (AdSense-ready placeholder)
   ========================================================= */
.ad-slot { margin: 40px auto; text-align: center; }
.ad-slot__label { display: block; font-size: 10.5px; letter-spacing: .14em; color: var(--muted); margin-bottom: 8px; font-family: var(--maru); }
.ad-slot__box {
  border: 2px dashed var(--line); border-radius: var(--r-md); background: var(--surface);
  color: var(--muted); font-size: 12.5px; min-height: 96px; padding: 22px 14px;
  display: grid; place-items: center;
}
.section .ad-slot { max-width: 760px; }

/* =========================================================
   Article banner (thumbnail hero)
   ========================================================= */
.article__banner {
  height: 210px; border-radius: var(--r-lg); display: grid; place-items: center;
  margin: 8px 0 28px; border: 1px solid var(--line); box-shadow: 0 5px 0 var(--line);
}
.article__banner svg { width: 44%; max-width: 300px; height: auto; }
@media (max-width: 600px) { .article__banner { height: 156px; } .article__banner svg { width: 58%; } }

/* extra category colors */
.chip--export { background: #d9eef2; color: #2b8a9a; }
.th-export { background: #d9eef2; }
.chip--audio { background: #dde8f7; color: #3d6bc4; }
.th-audio { background: #dde8f7; }
.chip--trans { background: #ffe6d2; color: #d67a2e; }
.th-trans { background: #ffe6d2; }
.chip--text { background: #f3e2f0; color: #b3559f; }
.th-text { background: #f3e2f0; }
.chip--edit { background: #e0efd8; color: #5a8a2e; }
.th-edit { background: #e0efd8; }
.chip--fx { background: #ffe0dc; color: #d9534f; }
.th-fx { background: #ffe0dc; }

/* =========================================================
   Prose tables
   ========================================================= */
.table-wrap { overflow-x: auto; margin: 24px 0; -webkit-overflow-scrolling: touch; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.table-wrap table { margin: 0; }
.prose thead th { background: var(--band); color: var(--ink); font-family: var(--maru); font-weight: 700;
  text-align: left; padding: 12px 15px; font-size: 13.5px; white-space: nowrap; }
.prose tbody td, .prose tbody th { border-top: 1px solid var(--line); padding: 11px 15px; color: var(--ink-soft); vertical-align: top; }
.prose tbody th { font-weight: 700; color: var(--ink); white-space: nowrap; text-align: left; }
.prose table code { white-space: nowrap; }

/* =========================================================
   FAQ accordion
   ========================================================= */
.faq details { border: 1px solid var(--line); border-radius: 14px; padding: 0 20px; margin: 12px 0;
  background: var(--surface); box-shadow: 0 3px 0 var(--line); }
.faq summary { font-family: var(--maru); font-weight: 700; padding: 16px 0; cursor: pointer;
  color: var(--ink); list-style: none; position: relative; padding-right: 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q "; color: var(--coral); font-weight: 700; }
.faq summary::after { content: "＋"; position: absolute; right: 2px; top: 15px; color: var(--muted); font-weight: 700; }
.faq details[open] summary::after { content: "－"; }
.faq details[open] summary { border-bottom: 1px dashed var(--line); }
.faq details p { padding: 12px 0 16px; margin: 0; color: var(--ink-soft); }

/* =========================================================
   Article search & category filter
   ========================================================= */
.filters { margin: 0 0 34px; }
.search { position: relative; max-width: 440px; margin: 0 auto 18px; }
.search input {
  width: 100%; padding: 13px 18px 13px 46px; border: 1px solid var(--line);
  border-radius: 999px; font-size: 15px; font-family: var(--sans);
  background: var(--surface); box-shadow: 0 3px 0 var(--line); color: var(--ink);
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--coral); box-shadow: 0 3px 0 var(--coral-dk); }
.search svg { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; }
.filter-cats { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.filter-cat {
  font-family: var(--maru); font-weight: 700; font-size: 13.5px; padding: 8px 16px;
  border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  cursor: pointer; box-shadow: 0 3px 0 var(--line); transition: transform .1s ease, color .12s ease;
}
.filter-cat:hover { transform: translateY(-2px); color: var(--coral); }
.filter-cat.is-active { background: var(--coral); color: #fff; border-color: var(--coral); box-shadow: 0 3px 0 var(--coral-dk); }
.no-results { display: none; text-align: center; color: var(--muted); font-family: var(--maru); padding: 46px 0; }

/* レベル分け（初心者／中級者） */
.filter-levels { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0 0 14px; }
.filter-lvl.is-active { background: #4a8a3d; color: #fff; border-color: #4a8a3d; box-shadow: 0 3px 0 #37692e; }
.card__thumb { position: relative; }
.card[data-level] .card__thumb::after {
  position: absolute; top: 10px; left: 10px; line-height: 1;
  font-family: var(--maru); font-weight: 700; font-size: 11.5px; padding: 4px 10px; border-radius: 999px;
}
.card[data-level="beginner"] .card__thumb::after { content: "初心者"; background: #e3f3e0; color: #4a8a3d; }
.card[data-level="intermediate"] .card__thumb::after { content: "中級者"; background: #eae6ff; color: #6a5acd; }
/* 記事ページ上部のレベル表示 */
.lvl-tag { display: inline-block; font-family: var(--maru); font-weight: 700; font-size: 12.5px; padding: 4px 12px; border-radius: 999px; margin-left: 8px; }
.lvl-tag--beginner { background: #e3f3e0; color: #4a8a3d; }
.lvl-tag--intermediate { background: #eae6ff; color: #6a5acd; }
