/* えーあいびじねすらぼ — やわらかい・まるい・ぱっと分かる */
:root {
  --bg: #fff8ee;
  --bg-elev: #ffffff;
  --bg-soft: #fff1dc;
  --fg: #2d2a26;
  --fg-muted: #6b655d;
  --fg-faint: #9a938a;
  --line: #f1e3cf;
  --accent: #ff7a59;
  --accent-soft: #ffe6dd;
  --accent-fg: #d9532f;
  --mint: #23b59a;
  --mint-soft: #dbf5ee;
  --mint-fg: #157f6c;
  --sky: #4d9de0;
  --sky-soft: #e0eefb;
  --sky-fg: #2a6fb0;
  --sun: #ffb020;
  --sun-soft: #fff0c9;
  --sun-fg: #b56f00;
  --warn: #c2410c;
  --warn-soft: #ffe4d1;
  --star: #ffb020;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 2px 4px rgba(120, 80, 30, 0.05), 0 12px 30px -12px rgba(120, 80, 30, 0.18);
  --font: "Zen Maru Gothic", "Nunito", "Hiragino Maru Gothic ProN", "Yu Gothic UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { color-scheme: light only; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-fg); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
code, pre { font-family: var(--mono); font-size: 0.9em; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 800px; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 2px dashed var(--line);
}
.site-header .container { display: flex; align-items: center; gap: 20px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; color: var(--fg); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--sun));
  display: grid; place-items: center; font-size: 20px;
  box-shadow: 0 4px 10px -4px rgba(255, 122, 89, 0.6);
}
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 7px 14px; border-radius: 999px; color: var(--fg-muted); font-size: 14.5px; font-weight: 700; }
.nav a:hover, .nav a.active { background: var(--accent-soft); color: var(--accent-fg); text-decoration: none; }
@media (max-width: 560px) { .brand span.txt { display: none; } .nav a { padding: 6px 10px; font-size: 13.5px; } }

/* hero */
.hero { padding: 52px 0 24px; text-align: center; }
.hero h1 { font-size: clamp(26px, 4.4vw, 40px); line-height: 1.35; margin: 0 0 12px; font-weight: 700; }
.hero h1 em { font-style: normal; color: var(--accent-fg); background: linear-gradient(transparent 62%, var(--sun-soft) 62%); padding: 0 2px; }
.hero p.lead { color: var(--fg-muted); font-size: 16.5px; margin: 0 auto 26px; max-width: 640px; }
.stats { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.stat {
  background: var(--bg-elev); border: 2px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 20px; min-width: 140px;
}
.stat .n { font-size: 26px; font-weight: 700; line-height: 1.1; color: var(--accent-fg); }
.stat .l { font-size: 12.5px; color: var(--fg-faint); margin-top: 4px; }

/* section */
.section { padding: 24px 0 44px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { font-size: 22px; margin: 0; }
.section-head a { font-size: 14px; color: var(--fg-muted); font-weight: 700; }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  background: var(--bg-elev); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 18px; box-shadow: var(--shadow); transition: transform 0.15s, border-color 0.15s;
}
.card:hover { transform: translateY(-3px) rotate(-0.3deg); border-color: var(--accent); }
.card a.overlay { position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card h3 { margin: 0; font-size: 18px; line-height: 1.4; }
.card .summary { color: var(--fg-muted); font-size: 14.5px; margin: 0; line-height: 1.7; }
.card .meta { display: flex; flex-wrap: wrap; gap: 8px 12px; font-size: 12.5px; color: var(--fg-faint); margin-top: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: var(--sky-soft); color: var(--sky-fg); border: 2px solid transparent; position: relative; z-index: 2;
}
a.chip:hover { border-color: var(--sky); text-decoration: none; }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.stars { color: var(--star); letter-spacing: 1px; font-size: 14px; }
.stars .off { color: var(--line); }
.kv-mini { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 13px; color: var(--fg-muted); align-items: center; }
.kv-mini b { font-weight: 700; color: var(--fg-faint); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 15px; border: 0; cursor: pointer;
  box-shadow: 0 6px 14px -6px rgba(255, 122, 89, 0.7);
}
.btn:hover { text-decoration: none; filter: brightness(1.06); transform: translateY(-1px); }
.btn.ghost { background: var(--bg-elev); color: var(--fg); border: 2px solid var(--line); box-shadow: none; }

/* entry page */
.entry-head { padding: 40px 0 24px; }
.entry-head .eyebrow { font-size: 13px; color: var(--fg-faint); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 10px; }
.entry-head .eyebrow .chips { display: inline-flex; }
.entry-head h1 { font-size: clamp(28px, 4.5vw, 40px); margin: 0 0 8px; line-height: 1.3; }
.entry-head .summary { font-size: 20px; font-weight: 700; line-height: 1.6; margin: 0 0 18px; color: var(--fg); }
.entry-head .actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.badges { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 20px; }
.badge { border-radius: var(--radius-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; border: 2px solid transparent; }
.badge.b1 { background: var(--mint-soft); border-color: color-mix(in srgb, var(--mint) 35%, transparent); }
.badge.b2 { background: var(--sun-soft); border-color: color-mix(in srgb, var(--sun) 40%, transparent); }
.badge.b3 { background: var(--sky-soft); border-color: color-mix(in srgb, var(--sky) 35%, transparent); }
.badge.b4 { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.badge .l { font-size: 12.5px; color: var(--fg-muted); font-weight: 700; }
.badge .t { font-size: 13px; color: var(--fg-muted); }
.badge .stars { font-size: 17px; }

.entry-body { padding: 8px 0 60px; }
.block { margin: 28px 0 0; background: var(--bg-elev); border: 2px solid var(--line); border-radius: var(--radius); padding: 22px 26px 10px; box-shadow: var(--shadow); }
.block h2 { font-size: 22px; margin: 0 0 4px; display: flex; align-items: center; gap: 10px; }
.block h2 .ico { font-size: 24px; }
.qa { display: grid; grid-template-columns: 180px 1fr; gap: 6px 18px; padding: 13px 0; border-bottom: 2px dashed var(--line); font-size: 16px; line-height: 1.85; }
.qa:last-child { border-bottom: 0; }
.qa .q { color: var(--accent-fg); font-weight: 700; font-size: 15px; padding-top: 2px; }
@media (max-width: 560px) { .qa { grid-template-columns: 1fr; gap: 2px; } }
.ideas { list-style: none; padding: 0 0 12px; margin: 0; display: grid; gap: 10px; }
.ideas li { background: var(--sun-soft); border-radius: var(--radius-sm); padding: 12px 16px; font-size: 16px; display: flex; gap: 10px; align-items: flex-start; }
.ideas li::before { content: "💡"; flex: none; }
.callout {
  background: var(--mint-soft); border-radius: var(--radius-sm);
  padding: 16px 18px; margin: 4px 0 16px; white-space: pre-wrap; font-size: 16.5px; line-height: 1.9;
}
.callout.note { background: var(--warn-soft); color: var(--warn); margin-top: 20px; font-size: 15px; }
details.more { margin: 26px 0 0; border: 2px dashed var(--line); border-radius: var(--radius); padding: 12px 18px; }
details.more summary { cursor: pointer; color: var(--fg-muted); font-size: 14.5px; font-weight: 700; }
details.more .bars { margin: 12px 0; max-width: 420px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; font-size: 13.5px; margin-bottom: 8px; }
.bar { grid-column: 1 / -1; height: 8px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--mint), var(--sky)); border-radius: 999px; }
.sources { padding-left: 18px; margin: 8px 0; }
.sources li { font-size: 13.5px; margin-bottom: 4px; overflow-wrap: anywhere; }
.sources .t { color: var(--fg-faint); font-size: 12px; margin-right: 6px; }

/* db page */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0 20px; }
.toolbar input[type="search"], .toolbar select {
  height: 42px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--line);
  background: var(--bg-elev); color: var(--fg); font: inherit; font-size: 14.5px;
}
.toolbar input[type="search"]:focus, .toolbar select:focus { outline: none; border-color: var(--accent); }
.toolbar input[type="search"] { flex: 1; min-width: 220px; }
.toolbar label { font-size: 13.5px; color: var(--fg-muted); display: flex; align-items: center; gap: 6px; font-weight: 700; }
.count { font-size: 13.5px; color: var(--fg-faint); margin-left: auto; }
.empty { padding: 44px; text-align: center; color: var(--fg-faint); border: 2px dashed var(--line); border-radius: var(--radius); }

/* category list */
.cat-list { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-list a { padding: 8px 16px; border-radius: 999px; background: var(--bg-elev); border: 2px solid var(--line); font-size: 15px; color: var(--fg); font-weight: 700; }
.cat-list a:hover { border-color: var(--accent); text-decoration: none; }
.cat-list a b { color: var(--fg-faint); font-weight: 700; margin-left: 6px; }

/* footer */
.site-footer { border-top: 2px dashed var(--line); padding: 28px 0 44px; color: var(--fg-faint); font-size: 13px; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* pagination */
.pager { display: flex; gap: 8px; justify-content: center; margin: 28px 0 0; }
.pager a, .pager span { padding: 6px 14px; border-radius: 999px; border: 2px solid var(--line); font-size: 14px; font-weight: 700; }
.pager span.cur { background: var(--accent-soft); color: var(--accent-fg); border-color: transparent; }

.prose h1 { font-size: 30px; }
.prose h2 { font-size: 21px; margin: 28px 0 8px; }
.muted { color: var(--fg-muted); }
.small { font-size: 13px; }

/* ---- ひとこと主役のカード ---- */
.card-name { font-size: 13px; font-weight: 700; color: var(--fg-faint); letter-spacing: 0.02em; }
.card h3.card-liner { font-size: 18.5px; line-height: 1.5; margin: 0 0 4px; color: var(--fg); }

/* ---- 事例ページ: 名前は小さく、ひとことが主役 ---- */
.entry-head .name-line { font-size: 15px; font-weight: 700; color: var(--fg-faint); margin: 6px 0 22px; }
.entry-head h1.liner { font-size: clamp(24px, 4vw, 34px); line-height: 1.45; margin: 0 0 18px; background: var(--bg-elev); border: 2px solid var(--line); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow); position: relative; }
.entry-head h1.liner::before { content: "ひとことで言うと"; position: absolute; top: -12px; left: 18px; font-size: 12px; background: var(--accent); color: #fff; padding: 2px 10px; border-radius: 999px; }
.block h2 .sub { font-size: 13px; color: var(--fg-faint); font-weight: 700; margin-left: auto; }

/* ---- 掘り下げ: 大きなアイコン + 見出し + 本文 の1列リスト ---- */
.tiles { display: flex; flex-direction: column; gap: 0; padding: 4px 0 10px; }
.tile { display: grid; grid-template-columns: 56px 1fr; gap: 4px 16px; padding: 16px 4px; border-bottom: 2px dashed var(--line); background: transparent; border-radius: 0; }
.tile:last-child { border-bottom: 0; }
.tile-h { display: contents; }
.tile-ico { grid-column: 1; grid-row: 1 / span 2; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; font-size: 28px; line-height: 1; background: var(--bg-soft); }
.tile.t-sky .tile-ico { background: var(--sky-soft); }
.tile.t-mint .tile-ico { background: var(--mint-soft); }
.tile.t-sun .tile-ico { background: var(--sun-soft); }
.tile.t-accent .tile-ico { background: var(--accent-soft); }
.tile.t-warn .tile-ico { background: var(--warn-soft); }
.tile-l { grid-column: 2; font-size: 13.5px; font-weight: 700; color: var(--fg-faint); letter-spacing: 0.04em; }
.tile-t { grid-column: 2; font-size: 17.5px; line-height: 1.8; color: var(--fg); }
@media (max-width: 480px) { .tile { grid-template-columns: 44px 1fr; gap: 2px 12px; } .tile-ico { width: 44px; height: 44px; font-size: 22px; border-radius: 14px; } .tile-t { font-size: 16.5px; } }
