/*
Theme Name: Kakeiho — April 2026
Theme URI: https://kakeiho.com
Author: Ka Kei Ho
Description: A warm, analog notebook theme. Cream paper, sumi ink, rust accent. April 2026 edition.
Version: 2026.04
*/

:root {
    --kakei-bg:     #f1e8d6;   /* cream paper */
    --kakei-paper:  #ead9bd;   /* darker paper for cards / "note slipped in" */
    --kakei-paper-shadow: #d8c9ad;
    --kakei-ink:    #1d1814;   /* sumi */
    --kakei-ink-2:  #3a3229;
    --kakei-ink-3:  #5a4f42;
    --kakei-subtle: #6b6157;
    --kakei-subtle-2: #9a8e80;
    --kakei-rule:   #c9b996;
    --kakei-accent: #b54d2b;   /* rust */
    --kakei-accent-ink: #8a3a1f;
    --kakei-indigo: #3e4a66;   /* photo tile */
    --kakei-indigo-dark: #2d3750;
    --kakei-highlight: #f0d98a;
    --kakei-border: rgba(29, 24, 20, 0.1);
}

html { background: var(--kakei-bg); overflow-x: hidden; }
body {
    background: var(--kakei-bg);
    color: var(--kakei-ink);
    font-family: "Newsreader", Georgia, serif;
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

/* Paper grain — single layered SVG noise, fixed, multiply */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: .5;
    mix-blend-mode: multiply;
    background-image:
      url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.35  0 0 0 0 0.28  0 0 0 0 0.18  0 0 0 .06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
      radial-gradient(ellipse at 30% 15%, rgba(0,0,0,0) 40%, rgba(80,55,30,.07) 100%);
}

/* Foxing — tiny age spots */
body::after {
    content: '';
    position: fixed; inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: .45;
    mix-blend-mode: multiply;
    background-image:
      radial-gradient(circle at 12% 88%, rgba(120,70,20,.12) 0, transparent 2px),
      radial-gradient(circle at 87% 14%, rgba(120,70,20,.08) 0, transparent 3px),
      radial-gradient(circle at 70% 50%, rgba(120,70,20,.07) 0, transparent 2px);
}

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

/* ------------------------------------------------------------------
   Editorial type
   Newsreader for body. Cormorant Garamond for display (titles).
   Italic is reserved — used as accent, not default.
   ------------------------------------------------------------------ */
.editorial-copy {
    color: var(--kakei-ink-2);
    font-family: "Newsreader", Georgia, serif;
    font-size: 1.05rem;
    line-height: 1.6;
}
.editorial-prose {
    color: var(--kakei-ink-2);
    font-family: "Newsreader", Georgia, serif;
    font-size: 1.15rem;
    line-height: 1.7;
}
.editorial-copy a,
.editorial-prose a {
    text-decoration: underline;
    text-decoration-color: var(--kakei-accent);
    text-underline-offset: 3px;
}
.editorial-copy strong,
.editorial-prose strong {
    color: var(--kakei-ink);
    font-weight: 600;
}
.editorial-prose p + p,
.editorial-note p + p { margin-top: 1.2rem; }

/* Drop cap removed — first letter renders as normal body text */

/* Display titles — Cormorant, reserved for actual titles */
.display-serif {
    font-family: "Cormorant Garamond", "Newsreader", serif;
    font-weight: 500;
    letter-spacing: -.01em;
    text-wrap: balance;
}

/* Mono eyebrow */
.mono-eyebrow {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--kakei-subtle);
}

/* ------------------------------------------------------------------
   Timeline
   ------------------------------------------------------------------ */
.timeline-link { display: block; }
.timeline-link:hover .timeline-title { color: var(--kakei-accent); }
.timeline-link:hover .timeline-meta { color: var(--kakei-ink); }
.timeline-year {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-size: 2.4rem;
    line-height: 1;
    color: var(--kakei-accent);
    letter-spacing: -.01em;
}
@media (min-width: 768px) {
    .timeline-year { font-size: 3.2rem; }
}
.timeline-entry + .timeline-entry { border-top: 1px dotted var(--kakei-rule); }

/* ------------------------------------------------------------------
   Seal (K·H monogram) — strict usage: identity + pinned only
   ------------------------------------------------------------------ */
.kh-seal {
    display: inline-block;
    color: var(--kakei-accent);
    transform: rotate(-5deg);
    opacity: .92;
}
.kh-seal svg { display: block; }

/* ------------------------------------------------------------------
   Washi tape
   ------------------------------------------------------------------ */
.washi-tape {
    position: absolute;
    background: repeating-linear-gradient(45deg,
        rgba(181, 77, 43, .5) 0 8px,
        rgba(181, 77, 43, .3) 8px 16px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
    pointer-events: none;
}

/* ------------------------------------------------------------------
   Note-slipped-in card (default) + pinned variant
   Pinned cards read as physically different: warmer paper,
   deeper shadow, a touch more tilt, italic title. No badge.
   ------------------------------------------------------------------ */
.slipped-note {
    position: relative;
    padding: 1.5rem 1.6rem 1.6rem;
    background: var(--kakei-paper);
    box-shadow:
        0 2px 0 var(--kakei-paper-shadow),
        0 10px 22px rgba(60,40,20,.12),
        inset 0 0 0 1px rgba(0,0,0,.04);
    transform: rotate(-.4deg);
    border: 1px solid rgba(0,0,0,.04);
}
.slipped-note.is-pinned {
    background: var(--kakei-paper-shadow);
    box-shadow:
        0 4px 0 rgba(60,40,20,.18),
        0 20px 40px rgba(60,40,20,.22),
        inset 0 0 0 1px rgba(0,0,0,.05);
    transform: rotate(-.6deg);
}
.slipped-note.is-pinned + .slipped-note.is-pinned { transform: rotate(.5deg); }
.slipped-note.is-pinned + .slipped-note.is-pinned + .slipped-note.is-pinned { transform: rotate(-.4deg); }
@media (min-width: 1280px) {
    .slipped-note.is-pinned { transform: rotate(-1.2deg); }
    .slipped-note.is-pinned + .slipped-note.is-pinned { transform: rotate(1deg); }
    .slipped-note.is-pinned + .slipped-note.is-pinned + .slipped-note.is-pinned { transform: rotate(-.9deg); }
}
.slipped-note.is-pinned .slipped-title {
    font-style: italic;
}

/* Pull quote */
.pull-quote {
    border-left: 2px solid var(--kakei-accent);
    padding-left: 1rem;
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-size: 1.35rem;
    line-height: 1.35;
    color: var(--kakei-ink);
}

/* End ornament */
.end-ornament {
    text-align: center;
    color: var(--kakei-subtle-2);
    font-size: 1.4rem;
    margin: 3rem 0 2rem;
}

/* Postcard */
.postcard {
    position: relative;
    background: var(--kakei-paper);
    border: 1px solid var(--kakei-subtle);
    padding: 1.6rem 1.9rem;
    box-shadow: 0 10px 26px rgba(60,40,20,.14);
    transform: rotate(-.3deg);
}
.postcard .stamp-box {
    position: absolute; top: 14px; right: 18px;
    width: 54px; height: 64px;
    border: 2px dashed var(--kakei-accent);
    color: var(--kakei-accent-ink);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    font-family: "Cormorant Garamond", serif;
    font-style: italic; font-size: 11px; line-height: 1.1;
    text-align: center; padding: 4px;
}
/* Reserve space for stamp-box on narrow screens so text doesn't run under it */
@media (max-width: 640px) {
    .postcard { padding: 1.4rem 1.4rem 1.5rem; }
    .postcard > p:first-of-type,
    .postcard > .mono-eyebrow:first-child { padding-right: 66px; }
    .postcard h3 { padding-right: 66px; }
    .postcard .stamp-box { width: 48px; height: 58px; top: 12px; right: 12px; font-size: 10px; }
}

/* Scroll progress bar, re-toned */
#read-progress { background: var(--kakei-accent); }

::selection { background: var(--kakei-highlight); color: var(--kakei-ink); }

@media (min-width: 768px) {
    .editorial-copy { font-size: 1.1rem; }
    .editorial-prose { font-size: 1.2rem; }
}

/* ------------------------------------------------------------------
   Notebook spread — two-page layout
   Binding shadow down the gutter; verso/recto folio headers; ruled body
   ------------------------------------------------------------------ */
.spread {
    position: relative;
    background: var(--kakei-paper);
    box-shadow:
        inset 0 0 80px rgba(60, 40, 20, .05),
        0 30px 60px -20px rgba(60, 40, 20, .25);
}
.spread-gutter {
    position: absolute; top: 0; bottom: 0; left: 50%;
    width: 46px; transform: translateX(-50%);
    background: linear-gradient(90deg,
        transparent 0,
        rgba(60, 40, 20, .18) 45%,
        rgba(60, 40, 20, .26) 50%,
        rgba(60, 40, 20, .18) 55%,
        transparent 100%);
    pointer-events: none;
    z-index: 2;
    display: none;
}
@media (min-width: 1024px) {
    .spread-gutter { display: block; }
}

.spread-page {
    padding: 40px 28px 48px;
    position: relative;
}
@media (min-width: 1024px) {
    .spread-page-verso {
        padding: 44px 64px 56px 48px;
        border-right: 1px solid var(--kakei-rule);
    }
    .spread-page-recto {
        padding: 44px 48px 56px 64px;
    }
}

.folio-bar {
    display: flex; justify-content: space-between; align-items: baseline;
    padding-bottom: 10px; margin-bottom: 26px;
    border-bottom: 1px solid var(--kakei-rule);
}
.folio-bar .folio-mark {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
    color: var(--kakei-subtle-2);
}
.folio-bar .folio-title {
    font-family: "Cormorant Garamond", serif;
    font-style: italic; font-size: 15px;
    color: var(--kakei-ink-2);
}

/* Year group on verso */
.year-group {
    display: grid; grid-template-columns: 64px 1fr;
    column-gap: 18px; margin-bottom: 26px;
}
.year-group .year-mark {
    font-family: "Cormorant Garamond", serif;
    font-style: italic; font-size: 34px; font-weight: 400;
    color: var(--kakei-accent); line-height: 1; padding-top: 4px;
    letter-spacing: -.01em;
}
@media (min-width: 768px) {
    .year-group { grid-template-columns: 78px 1fr; column-gap: 22px; }
    .year-group .year-mark { font-size: 44px; }
}

.entry-row {
    display: grid; grid-template-columns: 44px 1fr;
    column-gap: 14px; align-items: baseline;
    padding: 8px 4px 10px; margin-bottom: 2px;
    border-bottom: 1px dotted var(--kakei-rule);
    cursor: pointer;
    transition: background-color .2s;
    text-decoration: none; color: inherit;
}
.entry-row:hover {
    background: rgba(181, 77, 43, .05);
}
.entry-row .entry-date {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
    color: var(--kakei-subtle-2);
    line-height: 1.4;
}
.entry-row .entry-title {
    font-family: "Cormorant Garamond", "Newsreader", serif;
    font-weight: 500; font-size: 1.25rem; line-height: 1.2;
    color: var(--kakei-ink);
    margin: 0;
}
.entry-row .entry-excerpt {
    color: var(--kakei-ink-2);
    font-family: "Newsreader", Georgia, serif;
    font-style: italic; font-size: .95rem; line-height: 1.45;
    margin-top: 4px;
}

/* Ruled body copy */
.ruled {
    font-family: "Newsreader", Georgia, serif;
    font-size: 1.08rem; line-height: 32px;
    color: var(--kakei-ink-2);
    background-image: linear-gradient(to bottom, transparent 31px, var(--kakei-rule) 31px, var(--kakei-rule) 32px);
    background-size: 100% 32px;
}
.ruled p { margin: 0; padding: 0; }

/* Featured-entry title (recto) */
.entry-title-display {
    font-family: "Cormorant Garamond", "Newsreader", serif;
    font-weight: 500; font-size: 2.4rem; line-height: 1.05;
    letter-spacing: -.01em; text-wrap: balance;
    margin: 6px 0 20px;
}
@media (min-width: 768px) {
    .entry-title-display { font-size: 3rem; }
}
@media (min-width: 1280px) {
    .entry-title-display { font-size: 3.3rem; }
}

/* Context meta row — mono, subdued (replaces the Caveat treatment) */
.context-meta {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
    color: var(--kakei-subtle-2);
}
.context-meta .accent { color: var(--kakei-accent); }

/* Tipped-in photo inside recto */
.tipped-photo {
    position: relative; margin: 4px 0 22px; width: 100%;
    box-shadow: 0 12px 28px rgba(60, 40, 20, .2);
    transform: rotate(-1deg);
}
.tipped-photo .washi {
    position: absolute; top: -10px; left: 24px; width: 100px; height: 20px;
    background: repeating-linear-gradient(45deg,
        rgba(181, 77, 43, .55) 0 8px, rgba(181, 77, 43, .35) 8px 16px);
    transform: rotate(-3deg);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
}
.tipped-photo img { display: block; width: 100%; }
.tipped-photo .caption {
    font-family: "Cormorant Garamond", serif; font-style: italic;
    font-size: .95rem; color: var(--kakei-subtle);
    margin-top: 8px; padding-left: 6px;
}

/* ================================================================
   Top navigation bar (Index layout)
   ================================================================ */
.site-topbar {
    position: sticky; top: 0; z-index: 50;
    background: rgba(241, 232, 214, .92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--kakei-rule);
}
.topbar-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 16px 28px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px;
}
.topbar-brand {
    display: flex; align-items: center; gap: 10px;
    color: var(--kakei-ink);
    transition: color .2s;
    flex-shrink: 0;
    white-space: nowrap;
}
.topbar-brand .brand-name { white-space: nowrap; }
.topbar-brand:hover { color: var(--kakei-accent); }
.topbar-brand .brand-name {
    font-family: "Cormorant Garamond", serif;
    font-style: italic; font-weight: 500;
    font-size: 1.55rem; letter-spacing: -.01em;
    line-height: 1;
}
.topbar-nav {
    display: flex; align-items: center; gap: 28px;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
}
.topbar-nav a {
    color: var(--kakei-subtle);
    text-decoration: none;
    padding-bottom: 4px;
    border-bottom: 1px solid transparent;
    transition: color .2s, border-color .2s;
}
.topbar-nav a:hover { color: var(--kakei-ink); }
.topbar-nav a.is-active {
    color: var(--kakei-accent);
    border-bottom-color: var(--kakei-accent);
}
.topbar-search {
    color: var(--kakei-subtle-2);
    display: flex; align-items: center; gap: 6px;
    font-size: 10px; letter-spacing: .18em;
    white-space: nowrap;
    flex-shrink: 0;
}
.topbar-search kbd {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; padding: 0 5px;
    border: 1px solid var(--kakei-rule);
    background: var(--kakei-paper);
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 11px; color: var(--kakei-accent);
    letter-spacing: 0;
}
.topbar-menu-btn {
    background: none; border: 0; cursor: pointer;
    color: var(--kakei-ink); padding: 4px;
}
@media (max-width: 767px) {
    .topbar-nav { display: none; }
    .topbar-inner { padding: 14px 20px; }
    .topbar-brand .brand-name { font-size: 1.35rem; }
}
.topbar-mobile-nav {
    border-top: 1px solid var(--kakei-rule);
    padding: 12px 24px 20px;
    display: flex; flex-direction: column; gap: 6px;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
    background: var(--kakei-bg);
}
.topbar-mobile-nav a {
    padding: 8px 0;
    color: var(--kakei-subtle);
    border-bottom: 1px dotted var(--kakei-rule);
    text-decoration: none;
}
.topbar-mobile-nav a:last-child { border-bottom: 0; }

/* ================================================================
   Search modal
   ================================================================ */
.search-modal {
    position: fixed; inset: 0; z-index: 80;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 12vh 20px 20px;
}
.search-modal.hidden { display: none; }
.search-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(29, 24, 20, .4);
    backdrop-filter: blur(4px);
}
.search-modal-inner {
    position: relative;
    width: 100%; max-width: 620px;
    background: var(--kakei-bg);
    border: 1px solid var(--kakei-rule);
    box-shadow: 0 30px 60px -15px rgba(60, 40, 20, .35);
    padding: 20px 22px 14px;
}
.search-modal-inner input[type="search"] {
    width: 100%;
    font-family: "Cormorant Garamond", "Newsreader", serif;
    font-style: italic; font-size: 1.7rem;
    background: transparent; border: 0; outline: 0;
    color: var(--kakei-ink);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--kakei-rule);
}
.search-modal-inner input::placeholder { color: var(--kakei-subtle-2); }
.search-hint {
    margin-top: 8px;
    font-size: 9px;
}
.search-results {
    margin-top: 14px;
    max-height: 50vh;
    overflow-y: auto;
}
.search-result {
    display: flex; flex-direction: column; gap: 4px;
    padding: 10px 4px;
    border-bottom: 1px dotted var(--kakei-rule);
    text-decoration: none; color: var(--kakei-ink);
    transition: background-color .15s;
}
.search-result:hover { background: rgba(181, 77, 43, .06); }
.search-result .display-serif { font-size: 1.2rem; color: var(--kakei-ink); }
.search-empty { padding: 16px 4px; color: var(--kakei-subtle-2); }

/* ================================================================
   Index: category tabs + masonry cards + photo tile
   ================================================================ */
.index-main {
    max-width: 1320px;
    margin: 0 auto;
    padding: 36px 28px 80px;
}
@media (max-width: 640px) {
    .index-main { padding: 24px 16px 60px; }
}

.category-tabs {
    display: flex; gap: 8px; flex-wrap: wrap;
    margin-bottom: 36px;
}
.category-tabs a,
.category-tabs button {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
    padding: 8px 14px;
    border: 1px solid var(--kakei-subtle-2);
    background: transparent;
    color: var(--kakei-ink-2);
    cursor: pointer;
    text-decoration: none;
    transition: all .2s;
}
.category-tabs a:hover,
.category-tabs button:hover {
    border-color: var(--kakei-ink);
    color: var(--kakei-ink);
}
.category-tabs a.is-active,
.category-tabs button.is-active {
    background: var(--kakei-ink);
    color: var(--kakei-bg);
    border-color: var(--kakei-ink);
}

/* Masonry with CSS columns (plays well with PHP-rendered card lists) */
.masonry {
    column-count: 1;
    column-gap: 26px;
}
@media (min-width: 640px)  { .masonry { column-count: 2; } }
@media (min-width: 1024px) { .masonry { column-count: 3; } }
.masonry > * {
    break-inside: avoid;
    margin-bottom: 26px;
    display: block;
}

/* Entry card */
.entry-card {
    position: relative;
    background: var(--kakei-paper);
    padding: 22px 22px 20px;
    box-shadow:
        0 2px 0 var(--kakei-paper-shadow),
        0 10px 22px rgba(60, 40, 20, .12);
    border: 1px solid rgba(0,0,0,.04);
    text-decoration: none; color: inherit;
    display: block;
    transition: transform .25s ease, box-shadow .25s ease;
}
.entry-card:nth-child(3n+1) { transform: rotate(-.7deg); }
.entry-card:nth-child(3n+2) { transform: rotate(.5deg); }
.entry-card:nth-child(3n+3) { transform: rotate(-.3deg); }
.entry-card:hover {
    transform: translateY(-3px) rotate(0) !important;
    box-shadow:
        0 4px 0 var(--kakei-paper-shadow),
        0 18px 32px rgba(60, 40, 20, .2);
}

.entry-card-big {
    padding: 28px 28px 26px;
    background: var(--kakei-paper);
    box-shadow:
        0 3px 0 var(--kakei-paper-shadow),
        0 16px 34px rgba(60, 40, 20, .18);
}
.entry-card-big .entry-card-title {
    font-size: 2.2rem;
    font-style: italic;
}

.entry-card-top {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 12px;
}
.entry-card-date {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
    color: var(--kakei-ink);
    line-height: 1.4;
}
.entry-card-date .year {
    display: block;
    color: var(--kakei-subtle-2);
    font-size: 10px;
    margin-top: 2px;
}
.entry-card-cat {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
    color: var(--kakei-accent-ink);
}
.entry-card-title {
    font-family: "Cormorant Garamond", "Newsreader", serif;
    font-weight: 500;
    font-size: 1.55rem;
    line-height: 1.1;
    margin: 0 0 10px;
    text-wrap: balance;
    color: var(--kakei-ink);
    transition: color .2s;
}
.entry-card:hover .entry-card-title {
    color: var(--kakei-accent);
}
.entry-card-excerpt {
    font-family: "Cormorant Garamond", "Newsreader", serif;
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.5;
    color: var(--kakei-ink-2);
    margin: 0;
}
.entry-card-big .entry-card-excerpt {
    font-size: 1.15rem;
    line-height: 1.55;
}
.entry-card-bottom {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 16px;
}
.entry-card-read {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
    color: var(--kakei-subtle-2);
}
.entry-card-cta {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
    color: var(--kakei-accent);
    border-bottom: 1px solid currentColor;
    padding-bottom: 1px;
}

/* Photo tile (indigo) */
.photo-tile {
    position: relative;
    aspect-ratio: 4 / 5;
    background:
      radial-gradient(ellipse at 50% 30%, rgba(240, 217, 138, .25) 0%, transparent 55%),
      linear-gradient(180deg, #2d3750 0%, #1f2940 100%);
    overflow: hidden;
    padding: 18px 20px;
    display: flex; flex-direction: column; justify-content: space-between;
    color: #f1e8d6;
    text-decoration: none;
    transform: rotate(1deg);
    box-shadow:
        0 3px 0 rgba(30, 40, 60, .3),
        0 14px 28px rgba(30, 40, 60, .3);
    transition: transform .25s ease;
}
.photo-tile:hover {
    transform: translateY(-3px) rotate(0);
}
.photo-tile::before {
    /* diagonal scanlines */
    content: '';
    position: absolute; inset: 0;
    background-image: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,.04) 0 2px,
        transparent 2px 12px
    );
    pointer-events: none;
}
.photo-tile img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
}
.photo-tile img + *,
.photo-tile .photo-tile-label,
.photo-tile .photo-tile-footer,
.photo-tile .washi-tape { position: relative; z-index: 2; }
.photo-tile::after {
    content: '';
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(180deg, rgba(20,28,48,.25) 0%, rgba(20,28,48,.75) 100%);
}
.photo-tile .photo-scene {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
}
.photo-tile .washi-tape {
    position: absolute; top: -8px; right: 30px;
    width: 80px; height: 20px;
    background: repeating-linear-gradient(45deg,
        rgba(181, 77, 43, .85) 0 8px, rgba(181, 77, 43, .6) 8px 16px);
    transform: rotate(4deg);
    box-shadow: 0 2px 3px rgba(0, 0, 0, .25);
    z-index: 2;
}
.photo-tile-label {
    position: relative; z-index: 1;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
    color: rgba(241, 232, 214, .9);
}
.photo-tile-footer {
    position: relative; z-index: 1;
}
.photo-tile-title {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
    color: #f1e8d6;
    margin-bottom: 4px;
}
.photo-tile-date {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
    color: rgba(241, 232, 214, .7);
}

/* Colophon card (shown at end of index grid) */
.colophon-card {
    background: var(--kakei-bg);
    padding: 24px 22px;
    border: 1px solid var(--kakei-rule);
    position: relative;
}
.colophon-card .seal-pin {
    position: absolute; top: -14px; left: 20px;
    color: var(--kakei-accent);
}
.colophon-card .colophon-body {
    font-family: "Cormorant Garamond", "Newsreader", serif;
    font-style: italic;
    font-size: 1.08rem;
    line-height: 1.55;
    color: var(--kakei-ink-2);
    margin-top: 12px;
}

/* ================================================================
   Hello intro (home) + Now page
   ================================================================ */
.hello { margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--kakei-rule); }
.hello-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
    gap: 64px;
    align-items: start;
}
.hello-grid .hello-inner { max-width: 640px; }
@media (max-width: 900px) {
    .hello-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* ---- Photo peek (editorial "Plate" strip) ---- */
.photo-peek {
    position: relative;
    max-width: 260px;
    font-family: "Newsreader", Georgia, serif;
}

/* Header: italic voice-of-writer label */
.photo-peek-head {
    margin-bottom: 18px;
}
.photo-peek-label {
    font-family: "Cormorant Garamond", "Newsreader", serif;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--kakei-ink-2, #5a4a3a);
    letter-spacing: 0.01em;
}

/* Stacked film-frame photographs */
.photo-peek-strip {
    display: grid;
    gap: 14px;
    text-decoration: none;
    color: inherit;
}
.photo-peek-frame {
    position: relative;
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: end;
    gap: 12px;
    transition: transform .3s ease;
}
.photo-peek-img {
    display: block;
    width: 96px;
    aspect-ratio: 4 / 3;
    background-size: cover;
    background-position: center;
    background-color: var(--kakei-rule);
    filter: saturate(.82) contrast(.96);
    box-shadow:
        0 0 0 1px rgba(60,40,20,.08),
        0 1px 0 rgba(0,0,0,.04),
        0 6px 14px -8px rgba(60,40,20,.25);
    transition: filter .25s ease, transform .25s ease;
}

/* Subtle rotation variance — like pinned prints */
.photo-peek-frame:nth-child(1) .photo-peek-img { transform: rotate(-0.6deg); }
.photo-peek-frame:nth-child(2) .photo-peek-img { transform: rotate( 0.4deg); }
.photo-peek-frame:nth-child(3) .photo-peek-img { transform: rotate(-0.3deg); }

.photo-peek-cap {
    color: var(--kakei-subtle);
    letter-spacing: 0.18em;
    font-size: 9.5px;
    padding-bottom: 6px;
    line-height: 1.3;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-family: "JetBrains Mono", ui-monospace, monospace;
}
.photo-peek-yr {
    color: var(--kakei-subtle-2);
    font-variant-numeric: tabular-nums;
}

.photo-peek-strip:hover .photo-peek-img {
    filter: saturate(1) contrast(1);
}

/* Bottom link — a typographic index entry, underlined dotted */
.photo-peek-more {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed var(--kakei-rule);
    font-family: "Cormorant Garamond", "Newsreader", serif;
    font-style: italic;
    font-size: 0.95rem;
    color: var(--kakei-ink-2, #5a4a3a);
    text-decoration: none;
    transition: color .2s;
    width: 100%;
}
.photo-peek-more .arr {
    color: var(--kakei-accent);
    transition: transform .25s ease;
    display: inline-block;
}
.photo-peek-more:hover { color: var(--kakei-accent); }
.photo-peek-more:hover .arr { transform: translateX(3px); }

@media (max-width: 900px) {
    .photo-peek { max-width: 320px; }
}
.hello-eyebrow { color: var(--kakei-accent); margin-bottom: 10px; }

/* ---- Lately column ---- */
.lately {
    position: relative;
    padding-left: 22px;
    border-left: 1px solid var(--kakei-rule);
    display: flex;
    flex-direction: column;
    gap: 22px;
    font-family: "Newsreader", Georgia, serif;
}
@media (max-width: 820px) {
    .lately { padding-left: 0; border-left: none; border-top: 1px solid var(--kakei-rule); padding-top: 24px; }
}
.lately-eyebrow {
    color: var(--kakei-accent);
    letter-spacing: 0.18em;
    margin-bottom: -4px;
}

/* latest plate */
.lately-plate {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: transform .25s ease;
}
.lately-plate:hover { transform: translateY(-2px); }
.lately-plate img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: var(--kakei-subtle-bg, #e8e2d4);
    box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 8px 18px -10px rgba(0,0,0,.25);
    filter: saturate(.92);
}
.lately-plate::before {
    content: "";
    position: absolute;
    top: -6px; right: 18px;
    width: 44px; height: 14px;
    background: rgba(212, 120, 60, 0.55);
    transform: rotate(-4deg);
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
    z-index: 2;
}
.lately-plate-caption {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-top: 8px;
    font-size: 11px;
    color: var(--kakei-subtle);
}
.lately-plate-date { font-family: "JetBrains Mono", ui-monospace, monospace; letter-spacing: 0.04em; }

/* last entry */
.lately-last {
    display: grid;
    gap: 4px;
    text-decoration: none;
    color: inherit;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--kakei-rule);
}
.lately-last .mono-eyebrow { color: var(--kakei-subtle); }
.lately-last-title {
    font-family: "Cormorant Garamond", "Newsreader", serif;
    font-style: italic;
    font-size: 1.35rem;
    line-height: 1.2;
    color: var(--kakei-ink);
    margin-top: 2px;
}
.lately-last:hover .lately-last-title { color: var(--kakei-accent); }
.lately-last-date { color: var(--kakei-subtle-2) !important; margin-top: 2px; }

/* mini archive */
.lately-archive ul { list-style: none; margin: 0; padding: 0; }
.lately-archive li { margin: 0; }
.lately-archive a {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    text-decoration: none;
    color: var(--kakei-ink);
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 12px;
    letter-spacing: 0.04em;
}
.lately-archive a:hover { color: var(--kakei-accent); }
.lately-archive .yr { font-variant-numeric: tabular-nums; }
.lately-archive .rule { height: 1px; background: var(--kakei-rule); transform: translateY(1px); }
.lately-archive .n { color: var(--kakei-subtle); font-variant-numeric: tabular-nums; }
.lately-archive a:hover .rule { background: var(--kakei-accent); }

.hello-body {
    font-family: "Cormorant Garamond", "Newsreader", serif;
    font-size: clamp(1.5rem, 2.4vw, 1.95rem);
    line-height: 1.35; font-weight: 400;
    color: var(--kakei-ink);
    margin: 0 0 18px;
    text-wrap: pretty;
}
.hello-body em { font-style: italic; color: var(--kakei-accent); }
.hello-meta {
    display: flex; gap: 6px 14px; flex-wrap: wrap;
    color: var(--kakei-subtle);
    align-items: center;
}
.hello-meta > span, .hello-meta > a { white-space: nowrap; }
.hello-meta .sep { color: var(--kakei-subtle-2); }
.hello-meta a {
    color: var(--kakei-accent);
    border-bottom: 1px solid currentColor;
    padding-bottom: 1px; text-decoration: none;
}
.hello-meta kbd {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 4px;
    border: 1px solid var(--kakei-rule);
    background: var(--kakei-paper);
    font-family: "JetBrains Mono", monospace;
    font-size: 10px; color: var(--kakei-accent);
    letter-spacing: 0;
}

.now-main { max-width: 760px; margin: 0 auto; padding: 48px 28px 120px; }
.now-main h1 {
    font-family: "Cormorant Garamond", serif;
    font-weight: 500; font-style: italic;
    font-size: clamp(2.2rem, 4vw, 3rem);
    margin: 6px 0 12px; line-height: 1;
}
.now-main .dateline {
    font-family: "JetBrains Mono", monospace;
    font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
    color: var(--kakei-subtle-2); margin-bottom: 36px;
}
.now-section { margin-bottom: 32px; padding-bottom: 26px; border-bottom: 1px dotted var(--kakei-rule); }
.now-section:last-child { border-bottom: 0; }
.now-section h2 {
    font-family: "JetBrains Mono", monospace;
    font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
    color: var(--kakei-accent); margin: 0 0 12px;
}
.now-section p, .now-section li {
    font-family: "Newsreader", serif;
    font-size: 1.08rem; line-height: 1.6; color: var(--kakei-ink-2);
}
.now-section ul { list-style: none; padding: 0; margin: 0; }
.now-section li { padding: 6px 0; display: flex; justify-content: space-between; gap: 16px; }
.now-section li .by { color: var(--kakei-subtle); font-style: italic; flex-shrink: 0; }

/* ================================================================
   Single-post reader
   ================================================================ */
.read-progress {
    position: fixed; left: 0; top: 0; z-index: 60;
    height: 2px; background: var(--kakei-accent);
    transition: width .15s;
}
.reader-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 56px 28px 120px;
}
@media (max-width: 640px) {
    .reader-main { padding: 32px 20px 80px; }
}
.reader-header { margin-bottom: 40px; }
.reader-meta {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
    color: var(--kakei-subtle);
    margin-bottom: 20px;
    display: flex; flex-wrap: wrap; gap: 8px 12px;
    align-items: center;
}
.reader-meta .cat { color: var(--kakei-accent); }
.reader-meta .dot { color: var(--kakei-subtle-2); }
.reader-title {
    font-family: "Cormorant Garamond", serif;
    font-weight: 500; font-style: italic;
    font-size: clamp(2.2rem, 5.2vw, 3.8rem);
    line-height: 1.03;
    letter-spacing: -.01em;
    text-wrap: balance;
    color: var(--kakei-ink);
    margin: 0;
}
.reader-body {
    font-family: "Newsreader", Georgia, serif;
    font-size: 1.14rem;
    line-height: 1.72;
    color: var(--kakei-ink-2);
}
.reader-body p { margin: 0 0 1.3em; text-wrap: pretty; }
/* Drop cap removed — first letter renders as normal body text */
.reader-body h2, .reader-body h3 {
    font-family: "Cormorant Garamond", serif;
    font-style: italic; font-weight: 500;
    margin: 2em 0 .5em;
    line-height: 1.2;
}
.reader-body h2 { font-size: 1.8rem; }
.reader-body h3 { font-size: 1.4rem; }
.reader-body blockquote {
    margin: 1.8em 0;
    padding: 4px 0 4px 22px;
    border-left: 2px solid var(--kakei-accent);
    font-style: italic;
    color: var(--kakei-ink);
}
/* Polaroid-style photo frame
   Plain <img> in a post is auto-wrapped (see functions.php) into a <figure class="polaroid">.
   Authors can also write the figure manually:
       <figure class="polaroid"><img src="…" alt=""><figcaption>caption</figcaption></figure>
*/
.reader-body img {
    display: block;
    max-width: 100%;
    height: auto;
}
.reader-body figure.polaroid {
    margin: 2.6em auto;
    max-width: 100%;
    background: #f6ecda;
    padding: 22px 22px 16px;
    box-shadow:
        0 1px 0 rgba(255,255,255,.6) inset,
        0 18px 32px -10px rgba(60,40,20,.30),
        0 5px 12px rgba(60,40,20,.14);
    border-radius: 2px;
    position: relative;
}
.reader-body figure.polaroid img {
    margin: 0;
    width: 100%;
    box-shadow: none;
    background: #d8c9ad;
}
/* H layout — italic caption left, mono date right, baseline-aligned */
.reader-body figure.polaroid figcaption {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    padding: 18px 6px 20px;
    margin: 0;
    color: var(--kakei-ink-2);
}
.reader-body figure.polaroid figcaption .t {
    font-family: "Cormorant Garamond", "Newsreader", serif;
    font-style: italic;
    font-weight: 500;
    font-size: 1.25rem;
    line-height: 1.3;
    text-align: left;
    flex: 1;
}
.reader-body figure.polaroid figcaption .d {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--kakei-ink-3, #8a7e6b);
    white-space: nowrap;
    font-style: normal;
}
/* Caption-only (no date span) — let the italic caption fill the row */
.reader-body figure.polaroid figcaption:not(:has(.d)) {
    justify-content: flex-start;
}
/* No caption? Restore the classic uneven white border (more on bottom) */
.reader-body figure.polaroid:not(:has(figcaption)) { padding-bottom: 56px; }

/* Gutenberg image blocks that picked up .polaroid via the filter:
   neutralize WP's default figure margins/alignment so our frame controls layout */
.reader-body figure.polaroid.wp-block-image {
    width: auto !important;
    float: none;
    clear: both;
}
.reader-body figure.polaroid.alignwide,
.reader-body figure.polaroid.alignfull {
    max-width: min(720px, 100%);
}
.reader-body a {
    color: var(--kakei-accent);
    border-bottom: 1px solid currentColor;
    text-decoration: none;
}
.reader-ornament {
    text-align: center;
    font-size: 1.6rem;
    color: var(--kakei-accent);
    margin: 56px 0 16px;
}
.reader-signoff {
    text-align: right;
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-size: 1.6rem;
    color: var(--kakei-subtle);
    margin-bottom: 48px;
}
.reader-prevnext {
    max-width: 720px; margin: 0 auto;
    display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
    padding: 28px 28px 0;
    border-top: 1px solid var(--kakei-rule);
}
.reader-prevnext .next { text-align: right; }
.reader-prevnext a {
    display: flex; flex-direction: column; gap: 6px;
    color: var(--kakei-ink);
    text-decoration: none;
}
.reader-prevnext a:hover .title { color: var(--kakei-accent); }
.reader-prevnext a .title {
    font-family: "Cormorant Garamond", serif;
    font-style: italic; font-size: 1.25rem;
    line-height: 1.2;
    transition: color .2s;
}
@media (max-width: 640px) {
    .reader-prevnext { grid-template-columns: 1fr; gap: 16px; padding: 24px 20px 0; }
    .reader-prevnext .next { text-align: left; }
}

/* ================================================================
   Infinite scroll — sentinel loader & end marker
   ================================================================ */
.infinite-sentinel {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 60px 0 40px;
    opacity: 0.55;
}
.infinite-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--kakei-accent);
    animation: infinite-bounce 1.2s infinite ease-in-out both;
}
.infinite-dot:nth-child(1) { animation-delay: -0.32s; }
.infinite-dot:nth-child(2) { animation-delay: -0.16s; }
.infinite-dot:nth-child(3) { animation-delay: 0s; }
@keyframes infinite-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40%           { transform: scale(1);   opacity: 1; }
}
.infinite-sentinel.is-loading { opacity: 1; }

.infinite-end {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0 20px;
    position: relative;
}
.infinite-end::before,
.infinite-end::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--kakei-rule);
    max-width: 120px;
    margin: 0 16px;
}
.infinite-end .mono-eyebrow {
    color: var(--kakei-subtle-2);
    letter-spacing: 0.22em;
}

