/*
Theme Name: Bonchiage Diary
Theme URI: https://example.com/bonchiage-diary
Author: ぼんち
Author URI: https://example.com
Description: 「ぼんちあげ日記（改）」公式テーマ。完璧じゃない毎日を、ぼちぼち積み重ねる育児エッセイのための、温かみのある大人っぽい和風ブログテーマ。パレット、書体、密度、カード形状を切り替えられるTweaksパネル付き。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bonchiage-diary
Tags: blog, japanese, beige, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ============================================================
   ぼんちあげ日記（改） — design tokens + base
   ============================================================ */

/* ---------- Palettes ---------- */
:root,
[data-palette="beige"] {
  --bg: #faf6ee;
  --surface: #f3ecdc;
  --surface-2: #ebe1ca;
  --ink: #2a2520;
  --ink-2: #6b5f51;
  --muted: #a89a83;
  --accent: #a98762;
  --accent-soft: #d9c4a5;
  --line: #e4d8bf;
  --tag-bg: #ece2cc;
  --shadow: 0 1px 2px rgba(60, 45, 25, .04), 0 12px 30px -18px rgba(60, 45, 25, .18);
}

[data-palette="greige"] {
  --bg: #f4f2ed;
  --surface: #e9e5db;
  --surface-2: #dcd6c8;
  --ink: #2a2925;
  --ink-2: #62605a;
  --muted: #9a958c;
  --accent: #8a7f6f;
  --accent-soft: #c8c0b2;
  --line: #d6cfc0;
  --tag-bg: #ddd7c8;
  --shadow: 0 1px 2px rgba(45, 45, 40, .04), 0 12px 30px -18px rgba(45, 45, 40, .18);
}

[data-palette="pink"] {
  --bg: #faf3ef;
  --surface: #f1e3da;
  --surface-2: #ead4c7;
  --ink: #2b2421;
  --ink-2: #6e5f57;
  --muted: #b29c93;
  --accent: #b48275;
  --accent-soft: #e3c3b8;
  --line: #ead4c7;
  --tag-bg: #ecd9cd;
  --shadow: 0 1px 2px rgba(80, 50, 40, .04), 0 12px 30px -18px rgba(80, 50, 40, .18);
}

[data-palette="ink"] {
  --bg: #1a1814;
  --surface: #221f1a;
  --surface-2: #2c2822;
  --ink: #efe9da;
  --ink-2: #b6ac98;
  --muted: #7a7164;
  --accent: #c6a877;
  --accent-soft: #5e4f3a;
  --line: #3a342b;
  --tag-bg: #2c2822;
  --shadow: 0 1px 2px rgba(0,0,0,.2), 0 12px 30px -18px rgba(0,0,0,.5);
}

/* ---------- Font families ---------- */
[data-font="mincho"] {
  --font-body: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-display: "Cormorant Garamond", "Shippori Mincho B1", serif;
  --font-mono: "JetBrains Mono", monospace;
  --font-hand: "Caveat", "Klee One", cursive;
  --display-weight: 500;
  --body-letter: .02em;
}
[data-font="hand"] {
  --font-body: "Klee One", "Hiragino Maru Gothic ProN", system-ui, sans-serif;
  --font-display: "Caveat", "Klee One", cursive;
  --font-mono: "JetBrains Mono", monospace;
  --font-hand: "Caveat", "Klee One", cursive;
  --display-weight: 600;
  --body-letter: .01em;
}
[data-font="gothic"] {
  --font-body: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
  --font-display: "Manrope", "Zen Kaku Gothic New", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --font-hand: "Caveat", "Klee One", cursive;
  --display-weight: 600;
  --body-letter: .03em;
}

/* ---------- Density ---------- */
[data-density="cozy"] {
  --space-section: 120px;
  --space-block: 56px;
  --card-gap: 28px;
  --card-pad: 22px;
  --text-base: 15px;
}
[data-density="compact"] {
  --space-section: 72px;
  --space-block: 32px;
  --card-gap: 18px;
  --card-pad: 16px;
  --text-base: 14px;
}

/* ---------- Card shape ---------- */
[data-card="round"]   { --card-radius: 14px; --img-radius: 10px; }
[data-card="square"]  { --card-radius: 0px;  --img-radius: 0px; }
[data-card="polaroid"]{ --card-radius: 2px;  --img-radius: 2px; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.85;
  color: var(--ink);
  background: var(--bg);
  letter-spacing: var(--body-letter);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "palt";
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---------- Layout containers ---------- */
.container {
  width: min(1180px, 92vw);
  margin: 0 auto;
}
.container-narrow {
  width: min(760px, 92vw);
  margin: 0 auto;
}

/* ---------- Type helpers ---------- */
.display { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: .01em; }
.hand { font-family: var(--font-hand); font-weight: 500; }
.mono { font-family: var(--font-mono); font-size: .82em; letter-spacing: .04em; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--ink); color: var(--bg);
  padding: 8px 16px; border-radius: 4px;
  z-index: 9999;
}
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex; align-items: baseline; gap: 10px;
  font-family: var(--hero-title-font);
  font-size: 26px;
  font-weight: var(--hero-title-weight);
  letter-spacing: var(--hero-title-tracking);
  color: var(--ink);
  cursor: pointer;
}
.brand-mark {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: var(--bg);
  display: inline-grid; place-items: center;
  font-family: var(--font-display);
  font-size: 14px;
  align-self: center;
  flex-shrink: 0;
}
.nav { display: flex; align-items: center; gap: 36px; list-style: none; padding: 0; margin: 0; }
.nav a, .nav li > a {
  font-size: 13px; letter-spacing: .15em;
  color: var(--ink-2);
  position: relative;
  padding: 4px 0;
  cursor: pointer;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s;
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }
.nav a.active,
.nav .current-menu-item > a,
.nav .current_page_item > a { color: var(--ink); }
.nav a.active::after,
.nav .current-menu-item > a::after,
.nav .current_page_item > a::after { transform: scaleX(1); }

.icon-buttons { display: flex; gap: 14px; align-items: center; }
.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  color: var(--ink-2);
  border-radius: 50%;
  transition: color .2s, background .2s;
}
.icon-btn:hover { color: var(--ink); background: var(--surface); }

.menu-toggle { display: none; }

@media (max-width: 880px) {
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 16px 0;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 24px; font-size: 14px; }
  .menu-toggle { display: grid; }
}

.search-dropdown {
  border-top: 1px solid var(--line);
  padding: 16px 0;
  background: var(--bg);
  display: none;
}
.search-dropdown.open { display: block; }

/* ---------- Hero title font (overrides --font-hand for hero only) ---------- */
:root { --hero-title-font: var(--font-hand); --hero-title-weight: 500; --hero-title-tracking: -.01em; }
[data-titlefont="klee"]    { --hero-title-font: "Klee One", "Hiragino Maru Gothic ProN", cursive; --hero-title-weight: 600; --hero-title-tracking: -.01em; }
[data-titlefont="mincho"]  { --hero-title-font: "Shippori Mincho B1", "Hiragino Mincho ProN", serif; --hero-title-weight: 600; --hero-title-tracking: .04em; }
[data-titlefont="hina"]    { --hero-title-font: "Hina Mincho", "Shippori Mincho B1", serif; --hero-title-weight: 400; --hero-title-tracking: .06em; }
[data-titlefont="kaisei"]  { --hero-title-font: "Kaisei Decol", "Shippori Mincho B1", serif; --hero-title-weight: 500; --hero-title-tracking: .02em; }
[data-titlefont="yusei"]   { --hero-title-font: "Yusei Magic", "Klee One", sans-serif; --hero-title-weight: 400; --hero-title-tracking: 0; }
[data-titlefont="kurenaido"]{ --hero-title-font: "Zen Kurenaido", "Klee One", sans-serif; --hero-title-weight: 400; --hero-title-tracking: 0; }
[data-titlefont="sawarabi"]{ --hero-title-font: "Sawarabi Mincho", "Shippori Mincho B1", serif; --hero-title-weight: 400; --hero-title-tracking: .04em; }
[data-titlefont="pop"]     { --hero-title-font: "Mochiy Pop One", "Klee One", sans-serif; --hero-title-weight: 400; --hero-title-tracking: -.01em; }
[data-titlefont="yomogi"]  { --hero-title-font: "Yomogi", "Klee One", cursive; --hero-title-weight: 400; --hero-title-tracking: 0; }
[data-titlefont="zen-old"] { --hero-title-font: "Zen Old Mincho", "Shippori Mincho B1", serif; --hero-title-weight: 500; --hero-title-tracking: .04em; }
[data-titlefont="zen-antique"] { --hero-title-font: "Zen Antique", "Shippori Mincho B1", serif; --hero-title-weight: 400; --hero-title-tracking: .03em; }
[data-titlefont="zen-maru"] { --hero-title-font: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", sans-serif; --hero-title-weight: 500; --hero-title-tracking: 0; }
[data-titlefont="tegomin"] { --hero-title-font: "New Tegomin", "Shippori Mincho B1", serif; --hero-title-weight: 400; --hero-title-tracking: .02em; }
[data-titlefont="kiwi"]    { --hero-title-font: "Kiwi Maru", "Klee One", serif; --hero-title-weight: 500; --hero-title-tracking: 0; }
[data-titlefont="kosugi-maru"] { --hero-title-font: "Kosugi Maru", "Hiragino Maru Gothic ProN", sans-serif; --hero-title-weight: 400; --hero-title-tracking: .02em; }
[data-titlefont="dot"]     { --hero-title-font: "DotGothic16", monospace; --hero-title-weight: 400; --hero-title-tracking: .06em; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: 32px;
  padding-bottom: var(--space-section);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.4fr;
  gap: 56px;
  align-items: center;
}
.hero-title {
  font-family: var(--hero-title-font);
  font-size: clamp(48px, 7vw, 88px);
  line-height: 1;
  font-weight: var(--hero-title-weight);
  color: var(--ink);
  margin: 0 0 28px;
  letter-spacing: var(--hero-title-tracking);
}
.hero-title-en {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: .4em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.hero-tagline {
  font-size: 16px;
  color: var(--ink-2);
  line-height: 2;
  margin: 0 0 36px;
  text-wrap: pretty;
}
.hero-tagline small {
  color: var(--muted); font-size: 13px; letter-spacing: .05em;
}
.hero-meta {
  display: flex; gap: 18px; align-items: center;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--muted); letter-spacing: .2em;
  flex-wrap: wrap;
}
.hero-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.hero-image-wrap {
  position: relative;
}
.hero-image {
  aspect-ratio: 4/3;
  width: 100%;
  border-radius: var(--img-radius, 6px);
  overflow: hidden;
  background: var(--surface-2);
}
.hero-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.hero-image-placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  color: var(--muted); font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .2em;
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface) 100%);
}
.hero-tape {
  position: absolute;
  top: -14px; left: 30px;
  width: 80px; height: 22px;
  background: color-mix(in oklab, var(--accent-soft) 70%, transparent);
  transform: rotate(-4deg);
  border-radius: 1px;
  opacity: .85;
  pointer-events: none;
}
.hero-tape.right { left: auto; right: 40px; top: auto; bottom: -10px; transform: rotate(3deg); }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-title { font-size: 56px; }
}

/* ---------- Section heading ---------- */
.section { padding: var(--space-block) 0; }
.section-head {
  text-align: center;
  margin-bottom: 44px;
}
.section-head .ornament {
  font-family: var(--font-hand);
  font-size: 36px;
  color: var(--accent);
  line-height: 1;
  display: inline-flex; align-items: center; gap: 18px;
}
.section-head .ornament::before,
.section-head .ornament::after {
  content: ""; width: 28px; height: 1px; background: var(--accent); opacity: .5;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 36px;
  letter-spacing: .04em;
  color: var(--ink);
  margin: 8px 0 6px;
}
.section-head .jp-sub {
  font-size: 13px; color: var(--ink-2); letter-spacing: .2em;
}
.section-head.left { text-align: left; margin-bottom: 28px; }
.section-head.left .ornament { justify-content: flex-start; }
.section-head.left .ornament::before { display: none; }
.section-head-row {
  display: flex; justify-content: space-between; align-items: end;
  margin-bottom: 28px; flex-wrap: wrap; gap: 16px;
}
.section-head.left h2 { font-size: 32px; }

/* ---------- Category cards ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--card-gap);
}
.cat-card {
  background: var(--surface);
  border-radius: var(--card-radius);
  padding: 32px 24px 28px;
  text-align: center;
  position: relative;
  transition: transform .3s, box-shadow .3s;
  cursor: pointer;
  border: 1px solid transparent;
  color: inherit;
  display: block;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line); }
.cat-icon {
  width: 88px; height: 88px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--bg);
  display: grid; place-items: center;
  color: var(--accent);
}
.cat-name {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: .08em;
  margin-bottom: 4px;
  font-weight: var(--display-weight);
}
.cat-name-jp { font-size: 14px; color: var(--ink); font-weight: 500; margin-bottom: 14px; }
.cat-desc { font-size: 12.5px; color: var(--ink-2); line-height: 1.8; min-height: 3.6em; }
.cat-arrow {
  margin-top: 18px;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; color: var(--accent);
  letter-spacing: .2em;
}
.cat-card:hover .cat-arrow svg { transform: translateX(3px); }
.cat-arrow svg { transition: transform .25s; }

@media (max-width: 880px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Article cards ---------- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--card-gap);
}
.articles-grid.two-col { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 880px) {
  .articles-grid,
  .articles-grid.two-col { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg);
  border-radius: var(--card-radius);
  overflow: hidden;
  position: relative;
  transition: transform .3s;
  cursor: pointer;
  display: block;
  color: inherit;
}
[data-card="round"] .card  { background: var(--surface); }
[data-card="square"] .card { background: transparent; border-bottom: 1px solid var(--line); padding-bottom: 16px; border-radius: 0; }
[data-card="polaroid"] .card {
  background: var(--bg);
  padding: 12px 12px 36px;
  box-shadow: 0 1px 2px rgba(60, 45, 25, .06), 0 14px 32px -18px rgba(60, 45, 25, .25);
  transform: rotate(var(--rot, 0deg));
}
[data-card="polaroid"] .card:nth-child(odd)  { --rot: -.6deg; }
[data-card="polaroid"] .card:nth-child(even) { --rot: .8deg; }
[data-card="polaroid"] .card:hover { transform: rotate(0) translateY(-3px); }

.card:hover { transform: translateY(-3px); }
[data-card="polaroid"] .card:hover { transform: rotate(0deg) translateY(-3px); }

.card-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-2);
  border-radius: var(--img-radius);
  position: relative;
}
.card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.card-image-placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  color: var(--muted);
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .15em;
}
.card-body { padding: 16px 4px 0; }
[data-card="round"] .card-body  { padding: 18px 22px 22px; }
[data-card="polaroid"] .card-body { padding: 14px 4px 0; }

.tag {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--ink-2);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 2px;
  letter-spacing: .12em;
  margin-bottom: 12px;
}
.card-title {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 12px;
  text-wrap: pretty;
}
[data-font="mincho"] .card-title { font-weight: 500; }
.card-date {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .12em;
}

/* ---------- Buttons / pills ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 28px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: .14em;
  color: var(--ink);
  transition: all .25s;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn:hover svg { transform: translateX(3px); }
.btn svg { transition: transform .25s; }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); }

.chip {
  padding: 7px 14px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
  letter-spacing: .08em;
  transition: all .2s;
  text-decoration: none;
  display: inline-block;
  font-family: inherit;
}
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- Search ---------- */
.search-bar {
  display: flex; align-items: center;
  background: var(--surface);
  border-radius: 999px;
  padding: 4px 4px 4px 18px;
  border: 1px solid transparent;
  transition: border-color .2s;
  max-width: 520px;
}
.search-bar:focus-within { border-color: var(--accent); }
.search-bar input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  padding: 12px 12px;
  font: inherit;
  color: var(--ink);
  min-width: 0;
}
.search-bar input::placeholder { color: var(--muted); }
.search-bar button.go, .search-bar .go {
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  flex-shrink: 0;
}

/* ---------- Sidebar ---------- */
.with-sidebar {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 64px;
  align-items: start;
}
@media (max-width: 880px) {
  .with-sidebar { grid-template-columns: 1fr; gap: 48px; }
}
.sidebar { display: flex; flex-direction: column; gap: 40px; position: sticky; top: 96px; }
.sidebar-block h3,
.widget-title {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: .12em;
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: baseline; gap: 8px;
  font-weight: var(--display-weight);
}
.sidebar-block h3 .jp { font-family: var(--font-body); font-size: 11px; color: var(--muted); letter-spacing: .18em; }

.rank-list { display: flex; flex-direction: column; gap: 16px; list-style: none; padding: 0; margin: 0; }
.rank-item { display: flex; gap: 14px; cursor: pointer; align-items: flex-start; color: inherit; text-decoration: none; }
.rank-num {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--accent);
  width: 28px;
  line-height: 1;
  padding-top: 2px;
  font-weight: var(--display-weight);
  flex-shrink: 0;
}
.rank-thumb {
  width: 60px; height: 60px;
  border-radius: var(--img-radius);
  flex-shrink: 0;
  background: var(--surface-2);
  overflow: hidden;
}
.rank-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rank-body { font-size: 12.5px; line-height: 1.6; }
.rank-title { color: var(--ink); margin-bottom: 4px; text-wrap: pretty; transition: color .2s; }
.rank-date { font-family: var(--font-mono); font-size: 10px; color: var(--muted); letter-spacing: .1em; }
.rank-item:hover .rank-title { color: var(--accent); }

.archive-list { list-style: none; padding: 0; margin: 0; }
.archive-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
  cursor: pointer;
  color: var(--ink-2);
  transition: color .2s;
}
.archive-list li a { display: flex; justify-content: space-between; align-items: center; width: 100%; color: inherit; }
.archive-list li:hover,
.archive-list li:hover a { color: var(--ink); }
.archive-list .count { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a, .tag-cloud .chip { font-size: 12px; }

/* ---------- Profile band ---------- */
.profile-band {
  background: var(--surface);
  border-radius: var(--card-radius);
  padding: 44px 56px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 40px;
  align-items: center;
  position: relative;
  border: 1px solid var(--line);
}
.profile-band::before {
  content: ""; position: absolute;
  top: -10px; right: 60px;
  width: 90px; height: 24px;
  background: color-mix(in oklab, var(--accent-soft) 70%, transparent);
  transform: rotate(3deg);
  border-radius: 1px;
}
.profile-avatar {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: var(--bg);
  overflow: hidden;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--surface-2), var(--accent-soft));
  display: grid; place-items: center;
  font-family: var(--font-hand); color: var(--accent); font-size: 36px;
}
.profile-text h3 {
  font-family: var(--font-hand);
  font-size: 32px;
  margin: 0 0 12px;
  color: var(--ink);
  font-weight: 500;
}
.profile-text p {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 2;
  margin: 0;
  text-wrap: pretty;
}
@media (max-width: 720px) {
  .profile-band {
    grid-template-columns: 1fr; padding: 32px 24px; gap: 20px; text-align: center;
  }
  .profile-avatar { margin: 0 auto; }
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: var(--space-section);
  padding: 56px 0 32px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: .2em;
  margin: 0 0 18px;
  color: var(--ink);
  font-weight: var(--display-weight);
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { font-size: 12.5px; color: var(--ink-2); }
.footer-grid a:hover { color: var(--ink); }
.footer-blurb { font-size: 13px; line-height: 1.9; color: var(--ink-2); max-width: 320px; }
.footer-blurb .brand { font-size: 28px; margin-bottom: 12px; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: .15em;
  flex-wrap: wrap; gap: 16px;
}
.social-row { display: flex; gap: 12px; }
.social-row a {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--ink-2);
  transition: all .2s;
}
.social-row a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Article list page ---------- */
.list-toolbar {
  display: flex; flex-wrap: wrap; gap: 16px;
  align-items: center; justify-content: space-between;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.count-line {
  font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: .15em;
}
.sort-select {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--ink-2);
  font-family: inherit;
  cursor: pointer;
}
.filter-pills {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; align-items: center;
}

/* ---------- Article detail ---------- */
.article-hero {
  text-align: center;
  padding: 56px 0 40px;
}
.article-cat {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .25em;
  color: var(--accent);
  margin-bottom: 18px;
}
.article-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.5;
  font-weight: var(--display-weight);
  margin: 0 0 24px;
  text-wrap: balance;
}
[data-font="hand"] .article-title { font-family: var(--font-hand); font-weight: 500; }
.article-meta {
  display: flex; gap: 18px; justify-content: center;
  font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: .15em;
  flex-wrap: wrap;
}
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-feature {
  aspect-ratio: 16/9;
  margin-bottom: 56px;
  border-radius: var(--img-radius);
  overflow: hidden;
  background: var(--surface-2);
}
.article-feature img { width: 100%; height: 100%; object-fit: cover; }
.article-body {
  font-size: 16px; line-height: 2.1;
  color: var(--ink-2);
  max-width: 680px; margin: 0 auto;
}
.article-body p { margin: 0 0 1.6em; text-wrap: pretty; }
.article-body h2 {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink);
  margin: 2.4em 0 1em;
  padding-left: 16px;
  border-left: 3px solid var(--accent);
  line-height: 1.5;
}
.article-body h3 { font-family: var(--font-display); font-size: 18px; color: var(--ink); margin: 2em 0 .8em; }
.article-body blockquote {
  margin: 2em 0;
  padding: 24px 28px;
  background: var(--surface);
  border-radius: var(--img-radius);
  font-family: var(--font-hand);
  font-size: 20px;
  color: var(--ink);
  line-height: 1.7;
  border: 0;
}
.article-body blockquote p { margin: 0; }
.article-body .inline-img,
.article-body figure {
  margin: 2.5em -8% 2.5em;
  aspect-ratio: 16/10;
  border-radius: var(--img-radius);
  overflow: hidden;
}
.article-body figure img { width: 100%; height: 100%; object-fit: cover; }
.article-body figcaption {
  text-align: center; font-family: var(--font-mono); font-size: 11px;
  color: var(--muted); letter-spacing: .15em; padding-top: 8px;
}
.article-body ul, .article-body ol { padding-left: 1.4em; margin: 1em 0 1.6em; }
.article-body li { margin-bottom: .4em; }
.article-body a { color: var(--accent); border-bottom: 1px solid var(--accent-soft); }
.article-body a:hover { color: var(--ink); border-color: var(--ink); }
.article-body strong { color: var(--ink); font-weight: 600; }

.article-thanks {
  margin-top: 36px;
  font-family: var(--font-hand);
  font-size: 22px;
  color: var(--ink);
  text-align: center;
}

.article-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  max-width: 680px; margin: 56px auto 0;
  padding-top: 32px; border-top: 1px solid var(--line);
}
.article-share {
  max-width: 680px; margin: 32px auto 0;
  display: flex; gap: 12px; align-items: center;
}
.article-share span { font-family: var(--font-mono); font-size: 11px; letter-spacing: .2em; color: var(--muted); }

.article-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  max-width: 760px; margin: 64px auto 0;
}
.article-nav a {
  padding: 24px;
  background: var(--surface);
  border-radius: var(--img-radius);
  display: flex; flex-direction: column; gap: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: border-color .2s;
  color: inherit;
}
.article-nav a:hover { border-color: var(--accent); }
.article-nav .label { font-family: var(--font-mono); font-size: 10px; color: var(--muted); letter-spacing: .25em; }
.article-nav .t { font-size: 14px; color: var(--ink); line-height: 1.5; }
.article-nav .next { text-align: right; }
.article-nav-spacer {}

/* ---------- Empty state ---------- */
.empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
}
.empty .hand { font-size: 28px; color: var(--ink-2); margin-bottom: 8px; display: block; }

/* ---------- Pagination ---------- */
.pagination {
  display: flex; justify-content: center; gap: 8px;
  margin-top: 56px;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  min-width: 40px; height: 40px;
  display: grid; place-items: center;
  padding: 0 12px;
  font-family: var(--font-mono); font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  letter-spacing: .1em;
  transition: all .2s;
}
.pagination a:hover { background: var(--surface); color: var(--ink); }
.pagination .current { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- Comments ---------- */
.comments-area {
  max-width: 680px; margin: 64px auto 0;
  padding-top: 48px;
  border-top: 1px solid var(--line);
}
.comments-title {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink);
  margin: 0 0 32px;
  letter-spacing: .04em;
}
.comment-list { list-style: none; padding: 0; margin: 0 0 32px; }
.comment-list .comment { padding: 24px 0; border-bottom: 1px dashed var(--line); }
.comment-author { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.comment-author .avatar { width: 40px; height: 40px; border-radius: 50%; }
.comment-author .fn { font-weight: 600; color: var(--ink); font-size: 14px; }
.comment-meta { font-family: var(--font-mono); font-size: 10px; color: var(--muted); letter-spacing: .12em; }
.comment-content { font-size: 14px; line-height: 1.9; color: var(--ink-2); }
.comment-respond { margin-top: 32px; }
.comment-form label { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: .15em; color: var(--ink-2); margin-bottom: 6px; }
.comment-form input[type=text],
.comment-form input[type=email],
.comment-form input[type=url],
.comment-form textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 12px 14px; font-family: inherit; font-size: 14px;
  color: var(--ink); margin-bottom: 16px;
}
.comment-form textarea { min-height: 140px; }
.comment-form .submit { background: var(--ink); color: var(--bg); border: 0; padding: 12px 28px; border-radius: 999px; font-size: 13px; letter-spacing: .14em; cursor: pointer; }

/* ---------- Tape decoration helper ---------- */
.tape {
  position: absolute;
  width: 70px; height: 18px;
  background: color-mix(in oklab, var(--accent-soft) 70%, transparent);
  transform: rotate(-3deg);
  border-radius: 1px;
  pointer-events: none;
  opacity: .8;
}

.leaf-ornament {
  display: block;
  margin: 0 auto;
  color: var(--accent);
  opacity: .7;
}

/* ---------- Page transitions ---------- */
.page { animation: fadeUp .5s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Polaroid label ---------- */
[data-card="polaroid"] .card-body { font-family: var(--font-hand); }
[data-card="polaroid"] .card-title { font-size: 16px; font-family: var(--font-hand); font-weight: 500; }

/* ---------- WordPress core block-editor friendly defaults ---------- */
.alignleft  { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { display: block; margin: 0 auto 16px; }
.alignwide { margin-left: -10%; margin-right: -10%; max-width: 120%; }
.alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap;
}
.wp-block-pullquote, .wp-block-quote { font-family: var(--font-hand); }

/* ---------- Small responsive overrides ---------- */
@media (max-width: 600px) {
  .articles-grid, .articles-grid.two-col { grid-template-columns: 1fr; }
  .article-body .inline-img,
  .article-body figure { margin-left: 0; margin-right: 0; }
  .article-nav { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
}
