/* 年年の雙寶爸媽 — archived static site */

:root {
  --bg: #f7f1e8;
  --bg-2: #efe6d9;
  --surface: #fffdf9;
  --ink: #2b2520;
  --ink-2: #4f463f;
  --muted: #847769;
  --line: #e4d8c8;
  --accent: #b85c38;
  --accent-ink: #ffffff;
  --accent-soft: #f4e0d3;
  --sun: #e9a23b;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 8px 24px rgba(60, 40, 20, .08);
  --shadow-lg: 0 2px 6px rgba(60, 40, 20, .08), 0 20px 48px rgba(60, 40, 20, .14);
  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 1180px;
  --narrow: 760px;
  --header-h: 68px;
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: system-ui, -apple-system, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1916; --bg-2: #23201c; --surface: #26221e; --ink: #eee7de; --ink-2: #d2c8bc;
    --muted: #a39789; --line: #3a342e; --accent: #e58b62; --accent-ink: #1b1916; --accent-soft: #3d2b21;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .35), 0 20px 48px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1b1916; --bg-2: #23201c; --surface: #26221e; --ink: #eee7de; --ink-2: #d2c8bc;
  --muted: #a39789; --line: #3a342e; --accent: #e58b62; --accent-ink: #1b1916; --accent-soft: #3d2b21;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .35), 0 20px 48px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.75 var(--sans); letter-spacing: .01em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.35; letter-spacing: .02em; color: var(--ink); }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: var(--narrow); }
.muted { color: var(--muted); }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand img { width: 40px; height: 40px; }
:root[data-theme="dark"] .brand img, :root[data-theme="dark"] .footer-brand img, :root[data-theme="dark"] .about-logo img { filter: brightness(1.6); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand img, :root:not([data-theme="light"]) .footer-brand img, :root:not([data-theme="light"]) .about-logo img { filter: brightness(1.6); } }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text b { font-family: var(--serif); font-size: 18px; font-weight: 700; white-space: nowrap; }
.brand-text small { font-size: 12px; color: var(--muted); letter-spacing: .12em; }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a {
  padding: 8px 14px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-size: 15px;
  transition: background .2s, color .2s;
}
.site-nav a:hover { background: var(--bg-2); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.header-tools { display: flex; gap: 4px; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: transparent;
  border-radius: 999px; cursor: pointer; color: var(--ink-2);
}
.icon-btn:hover { background: var(--bg-2); color: var(--ink); }
.menu-btn { display: none; }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: inline; } :root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .i-sun { display: inline; } :root:not([data-theme="light"]) .i-moon { display: none; } }

@media (max-width: 860px) {
  .menu-btn { display: grid; }
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 8px 12px 14px; display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { border-radius: 10px; padding: 12px 14px; }
  .header-tools { margin-left: auto; }
}
@media (max-width: 420px) { .brand-text small { display: none; } .brand-text b { font-size: 16px; } }

.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 50; pointer-events: none; }
.read-progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--accent), var(--sun)); }

/* ---------- buttons, chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
  font-weight: 600; text-decoration: none; border: 1px solid transparent; transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.chip, .tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; text-decoration: none; line-height: 1.6;
}
.chip:hover, .tag:hover { background: var(--accent); color: var(--accent-ink); }
.chip-ghost { background: transparent; border: 1px solid var(--line); color: var(--ink-2); }
.chip-sm { font-size: 12px; padding: 2px 10px; }
.tag { background: var(--bg-2); color: var(--ink-2); font-weight: 500; }
.tag small { color: var(--muted); font-size: 11px; margin-left: 2px; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 64px 0 56px; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--sun) 22%, transparent), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.eyebrow { margin: 0 0 8px; font-size: 13px; letter-spacing: .2em; color: var(--accent); font-weight: 700; }
.hero-title { font-size: clamp(38px, 6vw, 64px); font-weight: 900; margin: 0; line-height: 1.15; }
.hero-tagline { font-family: var(--serif); font-size: clamp(20px, 2.6vw, 26px); color: var(--ink-2); margin: 6px 0 18px; }
.hero-desc { color: var(--ink-2); max-width: 34em; margin: 0 0 24px; }
.hero-stats { display: flex; gap: 32px; margin: 0 0 28px; }
.hero-stats div { display: flex; flex-direction: column-reverse; }
.hero-stats dt { font-size: 13px; color: var(--muted); letter-spacing: .1em; }
.hero-stats dd { margin: 0; font-family: var(--serif); font-size: 34px; font-weight: 700; line-height: 1.1; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-art { position: relative; height: 440px; }
.polaroid {
  position: absolute; width: 56%; background: #fffdf8; padding: 10px 10px 40px; border-radius: 6px;
  box-shadow: var(--shadow-lg); text-decoration: none; transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.polaroid img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 2px; }
.polaroid span { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font-family: var(--serif); color: #5a4f45; font-size: 14px; }
.polaroid.p1 { left: 2%; top: 8%; transform: rotate(-7deg); z-index: 2; }
.polaroid.p2 { right: 0; top: 0; transform: rotate(5deg); z-index: 1; }
.polaroid.p3 { left: 26%; bottom: 0; transform: rotate(-1deg); z-index: 3; }
.polaroid:hover { transform: rotate(0) scale(1.04); z-index: 4; }
@media (max-width: 900px) {
  .hero { padding: 40px 0; }
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-art { height: 300px; max-width: 440px; width: 100%; margin: 0 auto; }
  .polaroid { width: 52%; }
}

/* ---------- sections ---------- */
.section { padding: 32px 0 48px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head h2 { margin: 0; font-size: clamp(22px, 3vw, 28px); position: relative; padding-left: 16px; }
.section-head h2::before { content: ""; position: absolute; left: 0; top: .25em; bottom: .25em; width: 5px; border-radius: 3px; background: linear-gradient(var(--accent), var(--sun)); }
.section-head .more { font-size: 14px; text-decoration: none; font-weight: 600; white-space: nowrap; }

.page-head { padding: 48px 0 8px; }
.page-head h1 { margin: 0; font-size: clamp(30px, 5vw, 44px); }
.page-sub { color: var(--muted); margin: 8px 0 0; }
.subcats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* ---------- cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card[hidden] { display: none; }
.card-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.card:hover .card-media img { transform: scale(1.05); }
.card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.card-cat { color: var(--accent); font-weight: 700; }
.card-title { margin: 0; font-size: 18px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-excerpt { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.img-fallback { width: 100%; height: 100%; display: grid; place-items: center; background: var(--bg-2); }
.img-fallback img { width: 34% !important; height: auto !important; opacity: .35; object-fit: contain !important; }

.featured-grid { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: 1fr 1fr; gap: 24px; }
.featured-grid .card-big { grid-row: span 2; }
.featured-grid .card:not(.card-big) .card-link { flex-direction: row; }
.featured-grid .card:not(.card-big) .card-media { width: 44%; aspect-ratio: auto; flex: none; }
.featured-grid .card:not(.card-big) .card-excerpt { -webkit-line-clamp: 2; }
.card-big .card-media { aspect-ratio: 16 / 10; }
.card-big .card-title { font-size: 24px; }
@media (max-width: 860px) {
  .featured-grid { grid-template-columns: 1fr; grid-template-rows: none; }
  .featured-grid .card-big { grid-row: auto; }
}
@media (max-width: 520px) {
  .featured-grid .card:not(.card-big) .card-link { flex-direction: column; }
  .featured-grid .card:not(.card-big) .card-media { width: 100%; aspect-ratio: 16 / 10; }
}

.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.filter-chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px;
  padding: 7px 14px; cursor: pointer; font-size: 14px; transition: all .2s;
}
.filter-chip small { color: var(--muted); margin-left: 2px; }
.filter-chip:hover { border-color: var(--accent); color: var(--accent); }
.filter-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.filter-chip[aria-pressed="true"] small { color: inherit; opacity: .7; }
.filter-empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- category tiles ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.cat-tile { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.cat-cover { position: relative; display: block; aspect-ratio: 16 / 8; overflow: hidden; background: var(--bg-2); }
.cat-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.cat-tile:hover .cat-cover img { transform: scale(1.05); }
.cat-icon { position: absolute; left: 16px; bottom: -22px; width: 52px; height: 52px; display: grid; place-items: center; font-size: 26px; background: var(--surface); border-radius: 50%; box-shadow: var(--shadow); }
.cat-body { padding: 30px 20px 20px; }
.cat-body h2 { margin: 0 0 10px; font-size: 22px; }
.cat-body h2 a { color: var(--ink); text-decoration: none; }
.cat-body h2 small { font-family: var(--sans); font-size: 13px; color: var(--muted); font-weight: 400; }
.cat-kids { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.cat-latest { list-style: none; padding: 0; margin: 0; border-top: 1px dashed var(--line); }
.cat-latest li { border-bottom: 1px dashed var(--line); }
.cat-latest a { display: block; padding: 8px 0; color: var(--ink-2); text-decoration: none; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-latest a:hover { color: var(--accent); }

/* ---------- post ---------- */
.post-header { padding: 40px 0 8px; }
.crumbs { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.post-title { font-size: clamp(28px, 4.4vw, 42px); margin: 12px 0 16px; font-weight: 900; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; color: var(--muted); font-size: 14px; }
.post-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.post-meta svg { width: 16px; height: 16px; }
.post-cats { gap: 6px !important; flex-wrap: wrap; }
.post-cover { max-width: 1000px; margin: 28px auto 0; padding: 0 20px; }
.post-cover img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-lg); display: block; }

.post-layout { max-width: calc(var(--narrow) + 40px); margin: 0 auto; padding: 32px 20px 0; }
.toc { margin-bottom: 28px; }
@media (min-width: 1240px) {
  .post-layout {
    max-width: none; display: grid; gap: 0 40px;
    grid-template-columns: minmax(0, 1fr) minmax(0, var(--narrow)) minmax(0, 1fr);
  }
  .post-layout > .prose { grid-column: 2; }
  .toc { grid-column: 3; grid-row: 1; align-self: start; position: sticky; top: calc(var(--header-h) + 24px); max-width: 260px; margin: 0; }
}
.toc details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 16px; }
.toc summary { cursor: pointer; font-weight: 700; padding: 10px 0; font-family: var(--serif); list-style: none; display: flex; justify-content: space-between; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "＋"; color: var(--muted); }
.toc details[open] summary::after { content: "－"; }
.toc ol { list-style: none; margin: 0 0 12px; padding: 0; max-height: 60vh; overflow: auto; }
.toc li a { display: block; padding: 5px 0 5px 10px; border-left: 2px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: 14px; line-height: 1.5; }
.toc li.toc-h3 a { padding-left: 24px; font-size: 13px; }
.toc li a:hover { color: var(--accent); }
.toc li a.is-active { border-left-color: var(--accent); color: var(--accent); font-weight: 600; }

/* ---------- prose ---------- */
.prose { font-size: 17px; line-height: 1.95; color: var(--ink); overflow-wrap: anywhere; }
.prose > * { margin-top: 0; }
.prose p { margin: 0 0 1.3em; }
.prose h2 { font-size: 26px; margin: 2.2em 0 .8em; padding-bottom: .35em; border-bottom: 2px solid var(--line); position: relative; }
.prose h2::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 64px; height: 2px; background: var(--accent); }
.prose h3 { font-size: 21px; margin: 1.8em 0 .7em; padding-left: 12px; border-left: 4px solid var(--sun); }
.prose h4, .prose h5, .prose h6 { font-size: 18px; margin: 1.6em 0 .6em; }
.prose h3 img { display: block; margin: 0 0 8px; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.3em; }
.prose li { margin: .3em 0; }
.prose strong { color: var(--ink); }
.prose img { display: block; margin: 0 auto; border-radius: var(--radius-sm); cursor: zoom-in; }
.prose figure { margin: 2em 0; text-align: center; }
.prose figure.is-resized img { margin: 0 auto; }
.prose figcaption, .prose .gallery-caption { margin-top: .6em; font-size: 14px; color: var(--muted); text-align: center; line-height: 1.6; }
.prose blockquote {
  margin: 2em 0; padding: 18px 22px; background: var(--surface); border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink-2);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose blockquote cite { display: block; margin-top: 10px; font-size: 14px; font-style: normal; color: var(--muted); }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 3em auto; width: 100%; }
.prose code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .88em; background: var(--bg-2); padding: 2px 6px; border-radius: 4px; }
.prose a { word-break: break-word; }
.prose .aligncenter { margin-left: auto; margin-right: auto; }
.prose .has-text-align-center { text-align: center; }
.prose .has-text-align-right { text-align: right; }
.prose .has-background { padding: 14px 20px; border-radius: var(--radius-sm); }

.gallery { display: grid; gap: 10px; margin: 2em 0; }
.gallery.cols-1 { grid-template-columns: 1fr; }
.gallery.cols-2 { grid-template-columns: repeat(2, 1fr); }
.gallery.cols-3 { grid-template-columns: repeat(3, 1fr); }
.gallery.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 560px) { .gallery.cols-3, .gallery.cols-4 { grid-template-columns: repeat(2, 1fr); } }
.gallery figure { margin: 0; }
.gallery:not(.cols-1) img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.gallery + .gallery-caption { margin-top: -1.2em; }

.embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: #000; margin: 2em 0; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
figure.media .embed { margin: 0; }
.prose video { display: block; margin: 0 auto; max-height: 80vh; width: auto; border-radius: var(--radius-sm); background: #000; }

.table-wrap { overflow-x: auto; margin: 2em 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; background: var(--surface); }
.prose td, .prose th { border: 1px solid var(--line); padding: 10px 12px; }

.faq { margin: 2em 0; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 18px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "＋"; color: var(--accent); }
.faq details[open] summary::after { content: "－"; }
.faq details > div { padding-bottom: 6px; color: var(--ink-2); }

.wp-block-media-text { display: grid; grid-template-columns: 37% auto; gap: 24px; align-items: start; }
.wp-block-media-text__media img { cursor: default; }
@media (max-width: 600px) { .wp-block-media-text { grid-template-columns: 1fr !important; } }

/* WordPress palette helpers kept from the original posts */
.has-vivid-red-color { color: #cf2e2e; }
.has-luminous-vivid-orange-color { color: #ff6900; }
.has-luminous-vivid-amber-color { color: #c88a00; }
.has-vivid-green-cyan-color { color: #00a86b; }
.has-vivid-cyan-blue-color { color: #0693e3; }
.has-vivid-purple-color { color: #9b51e0; }
.has-cyan-bluish-gray-color { color: #8a96a3; }
.has-very-dark-gray-color { color: var(--ink); }
.has-very-light-gray-color { color: #eee; }
.has-very-light-gray-background-color { background: var(--bg-2); }
.has-pale-pink-background-color { background: #f78da7; }
.has-pale-cyan-blue-background-color { background: #8ed1fc; }
.has-light-green-cyan-background-color { background: #7bdcb5; }
.has-luminous-vivid-amber-background-color { background: #fcb900; }
.has-small-font-size { font-size: 14px; }
.has-medium-font-size { font-size: 20px; }
.has-large-font-size { font-size: 26px; }
.has-huge-font-size, .has-x-large-font-size { font-size: 32px; }

/* ---------- post footer ---------- */
.post-footer { padding-top: 24px; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 24px 0; border-top: 1px solid var(--line); }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 8px 0 32px; }
.pn { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--surface); border-radius: var(--radius-sm); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .2s, transform .2s; }
.pn:hover { border-color: var(--accent); transform: translateY(-2px); }
.pn small { color: var(--muted); font-size: 12px; }
.pn span { font-weight: 600; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pn-next { text-align: right; }
@media (max-width: 560px) { .post-nav { grid-template-columns: 1fr; } .pn-next { text-align: left; } }
.related { background: var(--bg-2); margin-top: 32px; padding-top: 48px; }

.comments { margin: 16px 0 40px; }
.comments h2 { font-size: 22px; margin: 0 0 4px; }
.comments h2 small { font-family: var(--sans); color: var(--muted); font-size: 14px; }
.comments-note { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.comment-list, .comment-children { list-style: none; padding: 0; margin: 0; }
.comment-children { margin-top: 14px; padding-left: 8px; border-left: 2px solid var(--line); }
.comment { display: flex; gap: 12px; padding: 14px 0; }
.comment-list > .comment + .comment { border-top: 1px dashed var(--line); }
.comment-avatar { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.comment-body { flex: 1; min-width: 0; }
.comment-meta { display: flex; gap: 10px; align-items: baseline; font-size: 14px; }
.comment-meta time { color: var(--muted); font-size: 12px; }
.comment-text { font-size: 15px; color: var(--ink-2); }
.comment-text p { margin: 4px 0; }

/* ---------- timeline ---------- */
.timeline { position: relative; }
.tl-year { position: relative; padding-left: 28px; margin-bottom: 24px; }
.tl-year::before { content: ""; position: absolute; left: 7px; top: 12px; bottom: 0; width: 2px; background: var(--line); }
.tl-year h2 { font-size: 34px; margin: 0 0 8px; position: relative; }
.tl-year h2::before { content: ""; position: absolute; left: -28px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tl-year h2 small { font-family: var(--sans); font-size: 14px; color: var(--muted); font-weight: 400; }
.tl-month h3 { font-size: 16px; color: var(--accent); margin: 20px 0 8px; font-family: var(--sans); letter-spacing: .1em; }
.tl-month ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.tl-item a { display: flex; gap: 14px; align-items: center; padding: 10px; background: var(--surface); border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .2s; }
.tl-item a:hover { transform: translateX(4px); }
.tl-thumb { flex: none; width: 88px; height: 62px; border-radius: 8px; overflow: hidden; background: var(--bg-2); }
.tl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.5; }
.tl-text time { font-size: 12px; color: var(--muted); }
.tl-text b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-text small { color: var(--accent); font-size: 12px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud .tag { font-size: calc(13px * var(--w, 1)); }

/* ---------- gallery page ---------- */
.g-month { margin-bottom: 40px; }
.g-month h2 { position: sticky; top: var(--header-h); z-index: 5; margin: 0 0 14px; padding: 10px 0; font-size: 22px; background: var(--bg); }
.g-month h2 small { font-family: var(--sans); font-size: 13px; color: var(--muted); font-weight: 400; }
.g-grid { columns: 4 220px; column-gap: 12px; }
.g-item { margin: 0 0 12px; break-inside: avoid; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-2); }
.g-item img { display: block; width: 100%; cursor: zoom-in; transition: transform .4s, filter .3s; }
.g-item:hover img { transform: scale(1.03); filter: brightness(1.05); }

/* ---------- about ---------- */
.about-logo { margin: 0 0 24px; }
.about-logo img { max-width: 360px; width: 100%; cursor: default; }
.lead { font-size: 20px; font-family: var(--serif); color: var(--ink-2); }
.about-original { background: var(--surface); border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow); }
.about-original img { max-width: 220px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--muted); font-size: 14px; }
.footer-inner { display: grid; grid-template-columns: 1.3fr 1fr 1.3fr; gap: 32px; }
.footer-brand img { width: 180px; height: auto; opacity: .85; }
.footer-brand p { margin: 10px 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 16px; align-content: start; }
.footer-links a { color: var(--ink-2); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-note p { margin: 0 0 8px; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; } }

.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 30; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); display: grid; place-items: center; cursor: pointer;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .25s, transform .25s;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- search ---------- */
.search-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(20, 15, 10, .45); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
.search-overlay[hidden] { display: none; }
.search-dialog { width: 100%; max-width: 640px; max-height: 76vh; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
.search-field { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 17px; color: var(--ink); -webkit-appearance: none; appearance: none; }
.search-field input::-webkit-search-cancel-button, .search-field input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.search-close { border: 1px solid var(--line); background: var(--bg-2); border-radius: 6px; font-size: 12px; padding: 2px 8px; cursor: pointer; color: var(--muted); }
.search-results { overflow: auto; padding: 8px; }
.search-results:empty { display: none; }
.sr-item { display: flex; gap: 12px; padding: 10px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); }
.sr-item:hover, .sr-item.is-active { background: var(--bg-2); }
.sr-item img { flex: none; width: 72px; height: 54px; object-fit: cover; border-radius: 6px; background: var(--bg-2); }
.sr-text { min-width: 0; }
.sr-text b { display: block; line-height: 1.45; }
.sr-text small { display: block; color: var(--muted); font-size: 13px; line-height: 1.55; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sr-text mark { background: color-mix(in srgb, var(--sun) 45%, transparent); color: inherit; border-radius: 2px; }
.sr-empty { padding: 24px; text-align: center; color: var(--muted); }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 90; background: rgba(12, 10, 8, .94); display: flex; flex-direction: column; color: #f3ede6; touch-action: pan-y; }
.lb[hidden] { display: none; }
.lb-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 56px 64px 12px; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; box-shadow: 0 10px 40px rgba(0,0,0,.5); user-select: none; -webkit-user-drag: none; }
.lb-bar { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 10px 16px 18px; text-align: center; font-size: 14px; min-height: 56px; }
.lb-cap { max-width: 720px; line-height: 1.6; }
.lb-cap a { color: #ffc59e; }
.lb-count { position: absolute; top: 16px; left: 20px; font-size: 13px; opacity: .7; }
.lb-btn { position: absolute; border: 0; background: rgba(255,255,255,.08); color: #fff; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.lb-btn:hover { background: rgba(255,255,255,.18); }
.lb-close { top: 10px; right: 12px; }
.lb-prev { left: 12px; top: 50%; margin-top: -24px; }
.lb-next { right: 12px; top: 50%; margin-top: -24px; }
.lb-btn svg { width: 24px; height: 24px; }
@media (max-width: 640px) { .lb-stage { padding: 56px 8px 8px; } .lb-prev, .lb-next { top: auto; bottom: 14px; margin: 0; } }

@media print {
  .site-header, .site-footer, .to-top, .related, .toc, .post-nav, .read-progress { display: none !important; }
  body { background: #fff; color: #000; }
}
