/* ============================================================
   The Plaskett Family — "Coastal Heritage Album"
   Cream & sepia, deep brown ink, serif display, photo-forward.
   ============================================================ */

@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 600 700;
    font-display: swap;
    src: url('/static/fonts/playfair.woff2') format('woff2');
}
@font-face {
    font-family: 'EB Garamond';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('/static/fonts/ebgaramond.woff2') format('woff2');
}
@font-face {
    font-family: 'EB Garamond';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('/static/fonts/ebgaramond-italic.woff2') format('woff2');
}

:root {
    --cream: #faf6ef;
    --cream-deep: #f3ecdd;
    --ink: #2f2417;
    --ink-soft: #5a4a37;
    --sepia: #8b5e3c;
    --sepia-light: #b98d64;
    --rule: #d9cdb8;
    --paper-shadow: 0 1px 3px rgba(47, 36, 23, 0.12), 0 8px 24px rgba(47, 36, 23, 0.08);
    --display: 'Playfair Display', Georgia, serif;
    --body: 'EB Garamond', Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 19px; }

body {
    font-family: var(--body);
    background: var(--cream);
    color: var(--ink);
    line-height: 1.65;
}

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

a { color: var(--sepia); text-decoration-color: var(--sepia-light); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

/* ---------- header ---------- */

.site-header {
    text-align: center;
    padding: 2.2rem 1rem 0;
    border-bottom: 3px double var(--rule);
    background: var(--cream);
}

.site-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: 2.4rem;
    letter-spacing: 0.02em;
    color: var(--ink);
    text-decoration: none;
}
.site-title:hover { color: var(--sepia); }

.site-tagline {
    font-style: italic;
    color: var(--ink-soft);
    margin: 0.2rem 0 1.2rem;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 1.6rem;
    padding-bottom: 0.9rem;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.site-nav a { color: var(--ink-soft); text-decoration: none; }
.site-nav a:hover { color: var(--sepia); }

/* ---------- hero ---------- */

.hero {
    position: relative;
    max-height: 62vh;
    overflow: hidden;
}
.hero img {
    width: 100%;
    height: 62vh;
    object-fit: cover;
    filter: sepia(0.22) saturate(0.92);
}
/* The film hero: show the WHOLE frame, full page width, no cropping.
   The wide cut is 2222x1280 (~1.74:1); height follows naturally. */
.hero-film { max-height: none; }
.hero-video {
    display: block;
    margin: 0 auto;
    width: 100%;
    height: auto;
    background: #1e160c;
}
.hero-video-portrait {
    aspect-ratio: 720 / 1280;
    max-height: 82vh;
    object-fit: cover;
}
.hero-film-credit { margin-top: 0.5rem; }
.hero-film-credit a {
    font-size: 0.85rem;
    font-style: italic;
    color: #e8d9b8;
    text-decoration: none;
    border-bottom: 1px dotted rgba(232, 217, 184, 0.6);
}
.hero-film-credit a:hover { color: #fff; }
.hero-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 4rem 1.5rem 2.2rem;
    background: linear-gradient(transparent, rgba(30, 22, 12, 0.72));
    text-align: center;
}
.hero-overlay h1 {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    color: #f7f1e4;
    text-shadow: 0 1px 8px rgba(0,0,0,0.45);
}
.hero-overlay p {
    color: #eadfca;
    font-style: italic;
    margin-top: 0.3rem;
}

/* ---------- layout ---------- */

.container {
    max-width: 46rem;
    margin: 0 auto;
    padding: 0 1.2rem;
}
.container-wide {
    max-width: 68rem;
    margin: 0 auto;
    padding: 0 1.2rem;
}

.section-rule {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2.8rem 0 1.4rem;
    color: var(--sepia);
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    white-space: nowrap;
}
.section-rule::before, .section-rule::after {
    content: "";
    height: 1px;
    background: var(--rule);
    flex: 1;
}

/* ---------- story cards ---------- */

.featured-story {
    background: #fffdf8;
    border: 1px solid var(--rule);
    box-shadow: var(--paper-shadow);
    padding: 2rem 2.2rem;
    margin: 0 auto;
}
.featured-story h2, .story-card h3 {
    font-family: var(--display);
    font-weight: 600;
    line-height: 1.25;
}
.featured-story h2 a, .story-card h3 a { color: var(--ink); text-decoration: none; }
.featured-story h2 a:hover, .story-card h3 a:hover { color: var(--sepia); }

.byline {
    font-style: italic;
    color: var(--ink-soft);
    font-size: 0.95rem;
    margin: 0.3rem 0 0.8rem;
}

.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    gap: 1.4rem;
}
.story-card {
    background: #fffdf8;
    border: 1px solid var(--rule);
    box-shadow: var(--paper-shadow);
    padding: 1.3rem 1.5rem;
}
.story-card .category {
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sepia);
}

/* ---------- prose (story bodies) ---------- */

.prose { font-size: 1.08rem; }
.prose p { margin: 0 0 1.1em; }
.prose h2, .prose h3 { font-family: var(--display); margin: 1.6em 0 0.5em; }
.prose blockquote {
    font-style: italic;
    font-size: 1.15em;
    color: var(--ink-soft);
    border-left: 3px solid var(--sepia-light);
    padding-left: 1.2rem;
    margin: 1.6em 0;
}
.prose img { box-shadow: var(--paper-shadow); margin: 1.5em auto; }

/* ---------- footer ---------- */

.site-footer {
    margin-top: 4rem;
    border-top: 3px double var(--rule);
    background: var(--cream-deep);
    text-align: center;
    padding: 2.2rem 1rem 2.6rem;
    color: var(--ink-soft);
    font-size: 0.95rem;
}
.footer-name {
    font-family: var(--display);
    font-weight: 600;
    color: var(--ink);
    font-size: 1.15rem;
    margin-bottom: 0.4rem;
}
.footer-links { margin-top: 0.6rem; }

/* ---------- misc ---------- */

.stats-line {
    text-align: center;
    font-style: italic;
    color: var(--ink-soft);
    margin: 2rem 0 0.5rem;
}

.coming-soon {
    text-align: center;
    padding: 3rem 1rem;
}
.coming-soon h2 { font-family: var(--display); font-weight: 600; margin-bottom: 0.6rem; }

@media (max-width: 640px) {
    html { font-size: 17px; }
    .site-title { font-size: 1.9rem; }
    .featured-story { padding: 1.4rem 1.2rem; }
}

/* --- P3: stories, writings, search --- */
.page-title {
    font-family: var(--display);
    font-size: 2.2rem;
    font-weight: 700;
    margin: 2.2rem 0 0.6rem;
}
.page-intro {
    color: var(--ink-soft);
    font-size: 1.08rem;
    max-width: 46em;
    margin-bottom: 1.8rem;
}
.filter-bar { margin: 0 0 1.6rem; }
.filter-bar a {
    display: inline-block;
    margin: 0 0.5rem 0.5rem 0;
    padding: 0.2rem 0.8rem;
    border: 1px solid var(--rule);
    border-radius: 999px;
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: capitalize;
}
.filter-bar a.active, .filter-bar a:hover {
    background: var(--sepia);
    border-color: var(--sepia);
    color: #fff;
}
.pager {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    align-items: baseline;
    margin: 2.2rem 0;
    color: var(--ink-soft);
}

.story { margin-top: 2.4rem; }
.story-header .category a {
    color: var(--sepia);
    text-decoration: none;
    text-transform: capitalize;
    letter-spacing: 0.08em;
    font-size: 0.85rem;
}
.story-header h1 {
    font-family: var(--display);
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.15;
    margin: 0.3rem 0 0.5rem;
}
.story-header .dek {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--ink-soft);
    margin: 0.4rem 0 0;
}
.story-hero { margin: 1.8rem 0; }
.story-hero img {
    width: 100%;
    border-radius: 4px;
    box-shadow: var(--paper-shadow);
    filter: sepia(0.08);
}
.story-hero figcaption, .photo-gallery figcaption {
    font-size: 0.88rem;
    color: var(--ink-soft);
    margin-top: 0.5rem;
    font-style: italic;
}
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.4rem;
    margin: 1.4rem 0 2rem;
}
.photo-gallery figure { margin: 0; }
.photo-gallery img {
    width: 100%;
    border-radius: 4px;
    box-shadow: var(--paper-shadow);
    filter: sepia(0.08);
}
.story-footer {
    border-top: 1px solid var(--rule);
    margin-top: 2.4rem;
    padding-top: 1.2rem;
    color: var(--ink-soft);
    font-size: 0.95rem;
}
.story-footer a { color: var(--sepia); }

.writings-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
}
.writings-list li {
    padding: 0.55rem 0;
    border-bottom: 1px dotted var(--rule);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: baseline;
}
.writings-list a {
    color: var(--ink);
    text-decoration: none;
    font-family: var(--display);
    font-size: 1.12rem;
}
.writings-list a:hover { color: var(--sepia); }
.writings-date { color: var(--ink-soft); font-size: 0.9rem; white-space: nowrap; }

.search-form { display: flex; gap: 0.6rem; margin: 0 0 1.8rem; }
.search-form input[type=search] {
    flex: 1;
    font: inherit;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--rule);
    border-radius: 4px;
    background: #fff;
    color: var(--ink);
}
.search-form button {
    font: inherit;
    padding: 0.55rem 1.3rem;
    border: none;
    border-radius: 4px;
    background: var(--sepia);
    color: #fff;
    cursor: pointer;
}
.search-count { color: var(--ink-soft); margin-bottom: 1.4rem; }
.search-result { margin-bottom: 1.8rem; }
.search-result h3 { font-family: var(--display); font-size: 1.25rem; margin: 0.15rem 0; }
.search-result h3 a { color: var(--ink); text-decoration: none; }
.search-result h3 a:hover { color: var(--sepia); }
.search-result .snippet { color: var(--ink-soft); }
.search-result mark {
    background: #f3e3bf;
    color: var(--ink);
    padding: 0 0.15em;
    border-radius: 2px;
}
.coming-soon-inline { color: var(--ink-soft); font-style: italic; }

/* --- P4: people, places, tree, mines --- */
.surname-cloud a .count {
    opacity: 0.65;
    font-size: 0.8em;
    margin-left: 0.15em;
}
.people-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    columns: 2;
    column-gap: 3rem;
}
@media (max-width: 640px) { .people-list { columns: 1; } }
.people-list li {
    padding: 0.4rem 0;
    border-bottom: 1px dotted var(--rule);
    break-inside: avoid;
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: baseline;
}
.people-list a { color: var(--ink); text-decoration: none; }
.people-list a:hover { color: var(--sepia); }
.lifespan { color: var(--ink-soft); font-size: 0.85rem; white-space: nowrap; }
.descendant-line { color: var(--ink-soft); margin-top: 0.4rem; }
.descendant-line a { color: var(--sepia); }
.family-block p, .ancestry-block p { margin: 0.4rem 0; }
.family-block a, .ancestry-block a { color: var(--sepia); text-decoration: none; }
.family-block a:hover, .ancestry-block a:hover { text-decoration: underline; }
.gen-label { font-weight: 600; }
.events-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
}
.events-list li {
    padding: 0.45rem 0;
    border-bottom: 1px dotted var(--rule);
    color: var(--ink-soft);
}
.events-list a { color: var(--sepia); }
.event-type {
    display: inline-block;
    min-width: 6.5em;
    font-variant: small-caps;
    letter-spacing: 0.05em;
    color: var(--ink);
}
.map-box {
    height: 340px;
    border-radius: 4px;
    box-shadow: var(--paper-shadow);
    margin: 1.4rem 0 2rem;
    z-index: 0;
}
.map-tall { height: 440px; }
.tree-box {
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: 4px;
    box-shadow: var(--paper-shadow);
    margin: 1rem 0 2.5rem;
    overflow: hidden;
}

/* --- P5: living photos, album, films --- */
.live-photo { position: relative; cursor: pointer; }
.live-photo video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.live-photo.playing video { opacity: 1; }
.live-badge, .live-badge-inline {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    padding: 0.15em 0.5em;
    border-radius: 999px;
    background: rgba(250, 246, 239, 0.92);
    color: var(--sepia);
    border: 1px solid var(--sepia);
}
.live-badge {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    z-index: 2;
}
.live-photo.playing .live-badge { opacity: 0; }
.section-rule .rule-link {
    color: inherit;
    text-decoration: none;
}
.section-rule .rule-link:hover { color: var(--sepia); }
.feature-video {
    width: 100%;
    border-radius: 4px;
    box-shadow: var(--paper-shadow);
    margin: 1.4rem 0 2.4rem;
    background: #000;
}

/* --- maps: legend dots --- */
.map-legend { color: var(--ink-soft); font-size: 0.88rem; margin: 0.4rem 0 0; }
.map-legend .dot {
    display: inline-block;
    width: 0.75em; height: 0.75em;
    border-radius: 50%;
    margin: 0 0.3em 0 1em;
    vertical-align: baseline;
}
.map-legend .dot:first-child { margin-left: 0; }
.dot-born  { background: #6f9c58; border: 1px solid #4a6b3a; }
.dot-event { background: #a5825f; border: 1px solid #7a5c3e; }
.dot-land  { background: #c9a94e; border: 1px solid #8a6d1a; }
.dot-died  { background: #8a7460; border: 1px solid #5a4632; }

/* --- rotating home --- */
.home-duo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.4rem;
    margin: 1.6rem 0;
}
@media (max-width: 700px) { .home-duo { grid-template-columns: 1fr; } }
.home-card {
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: 6px;
    box-shadow: var(--paper-shadow);
    padding: 1.2rem 1.5rem;
}
.home-card .category { color: var(--sepia); font-size: 0.8rem;
    letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 0.4rem; }
.home-card h3 { font-family: var(--display); font-size: 1.3rem; margin: 0 0 0.4rem; }
.home-card h3 a { color: var(--ink); text-decoration: none; }
.home-card h3 a:hover { color: var(--sepia); }
.home-card h3 small { color: var(--ink-soft); font-size: 0.85rem; font-weight: 400; }
.home-photo { max-width: 700px; margin: 0 auto 1.5rem; }
.home-photo-link { text-align: center; font-size: 0.95rem; }

/* --- driving tour --- */
.map-tour { height: 560px; }
.tour-title { font-family: var(--display); font-size: 1.45rem; margin: 0 0 0.5rem; }
.tour-intro p { color: var(--ink-soft); max-width: 48em; }
.tour-marker span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: #7a5c3e;
    color: #fff;
    font: 700 12px/1 Georgia, serif;
    border: 2px solid #faf6ef;
    box-shadow: 0 1px 4px rgba(60,40,20,0.4);
}
.tour-stops {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 2rem;
    counter-reset: none;
}
.tour-stops li {
    border-bottom: 1px solid var(--rule);
    padding: 1.1rem 0;
}
.tour-stops h3 {
    font-family: var(--display);
    font-size: 1.2rem;
    margin: 0 0 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.stop-num {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7em; height: 1.7em;
    border-radius: 50%;
    background: #7a5c3e;
    color: #fff;
    font-size: 0.75em;
}
.tour-mabel {
    font-style: italic;
    color: var(--ink-soft);
    border-left: 3px solid var(--rule);
    padding-left: 1rem;
    margin: 0.3rem 0 0.5rem;
}
.tour-today { margin: 0; }
.tour-today strong { color: var(--sepia); }

/* --- drive guide upgrade --- */
.tour-download { margin: 1rem 0 0.4rem; display: flex; align-items: center;
                 gap: 0.9rem; flex-wrap: wrap; }
.tour-download span { color: var(--ink-soft); font-size: 0.9rem; max-width: 28em; }
.btn-download {
    display: inline-block;
    background: var(--sepia);
    color: #fff !important;
    text-decoration: none;
    font-family: var(--display);
    font-size: 1.05rem;
    padding: 0.6rem 1.4rem;
    border-radius: 6px;
    box-shadow: var(--paper-shadow);
}
.btn-download:hover { background: #63482f; }
.tour-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.9rem;
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: 6px;
    box-shadow: var(--paper-shadow);
    padding: 1rem 1.3rem;
    margin: 1.2rem 0;
    font-size: 0.92rem;
    color: var(--ink-soft);
}
.tour-facts strong {
    display: block;
    font-family: var(--display);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sepia);
    margin-bottom: 0.2rem;
}
.tour-stop-card { display: flex; gap: 1.6rem; align-items: flex-start; }
.tour-stop-text { flex: 1; }
.tour-stop-photo {
    flex: 0 0 300px;
    margin: 0.3rem 0 0;
}
.tour-stop-photo img {
    width: 100%;
    border-radius: 4px;
    box-shadow: var(--paper-shadow);
    filter: sepia(0.06);
}
.tour-stop-photo figcaption {
    font-size: 0.8rem;
    color: var(--ink-soft);
    font-style: italic;
    margin-top: 0.35rem;
}
@media (max-width: 700px) {
    .tour-stop-card { flex-direction: column; }
    .tour-stop-photo { flex: none; width: 100%; }
}

/* --- person profile header with portrait --- */
.person-header.has-portrait {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    justify-content: space-between;
}
.person-header-text { flex: 1; }
.person-portrait {
    flex: 0 0 240px;
    margin: 0.4rem 0 0;
}
.person-portrait img {
    width: 100%;
    border-radius: 6px;
    box-shadow: var(--paper-shadow);
    filter: sepia(0.12);
    border: 6px solid #fff;
}
.person-portrait figcaption {
    font-size: 0.8rem;
    color: var(--ink-soft);
    font-style: italic;
    margin-top: 0.45rem;
}
.more-writings { text-align: right; margin: -0.4rem 0 1.2rem; }
.more-writings a { color: var(--sepia); }
@media (max-width: 700px) {
    .person-header.has-portrait { flex-direction: column-reverse; }
    .person-portrait { flex: none; max-width: 260px; }
}

/* --- album table of contents --- */
.album-toc {
    background: #fff;
    border: 1px solid var(--rule);
    border-radius: 6px;
    box-shadow: var(--paper-shadow);
    padding: 1rem 1.4rem;
    margin: 0 0 1.6rem;
}
.album-toc-title {
    font-family: var(--display);
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sepia);
    margin: 0 0 0.5rem;
}
.album-toc ul { list-style: none; margin: 0; padding: 0;
    columns: 2; column-gap: 2.5rem; }
@media (max-width: 640px) { .album-toc ul { columns: 1; } }
.album-toc li { padding: 0.28rem 0; border-bottom: 1px dotted var(--rule);
    display: flex; justify-content: space-between; gap: 0.8rem; break-inside: avoid; }
.album-toc a { color: var(--ink); text-decoration: none; }
.album-toc a:hover { color: var(--sepia); }
.album-toc .count { color: var(--ink-soft); font-size: 0.85rem; }
.section-rule[id] { scroll-margin-top: 1.5rem; }

/* --- lightbox --- */
#lightbox {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(30, 24, 16, 0.94);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 2.5rem 1rem 1rem;
}
#lightbox[hidden] { display: none; }
#lightbox-scroll {
    max-width: 96vw; max-height: 84vh;
    overflow: auto;
    display: flex; align-items: center;
}
#lightbox-img {
    max-width: 94vw; max-height: 82vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    cursor: zoom-in;
}
#lightbox.zoomed #lightbox-img {
    max-width: none; max-height: none;
    height: 80vh; width: auto;
    cursor: zoom-out;
}
#lightbox-caption {
    color: #e8ddc9; font-style: italic;
    font-size: 0.95rem; margin: 0.8rem 0 0;
    max-width: 60em; text-align: center;
}
#lightbox-close {
    position: absolute; top: 0.7rem; right: 1.1rem;
    background: none; border: none; color: #e8ddc9;
    font-size: 2.2rem; cursor: pointer; line-height: 1;
}
.photo-gallery figure.clickable img, .story-hero figure.clickable img,
.tour-stop-photo.clickable img, .home-photo figure.clickable img { cursor: zoom-in; }
.expand-btn {
    position: absolute; bottom: 0.6rem; right: 0.6rem; z-index: 3;
    background: rgba(250, 246, 239, 0.92);
    border: 1px solid var(--sepia); color: var(--sepia);
    border-radius: 4px; font-size: 1rem; line-height: 1;
    padding: 0.25rem 0.45rem; cursor: pointer;
}

/* --- writings list with teasers --- */
.writings-entry { flex: 1; }
.writings-dek {
    margin: 0.15rem 0 0;
    font-size: 0.92rem;
    color: var(--ink-soft);
    font-family: Georgia, serif;
}
.writings-list li { align-items: flex-start; }

/* --- the land ledger --- */
.land-ledger { list-style: none; padding: 0; margin: 0 0 2rem; }
.land-ledger li {
    display: flex;
    gap: 1.2rem;
    padding: 0.9rem 0;
    border-bottom: 1px dotted var(--rule);
}
.land-year {
    flex: 0 0 3.6em;
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--sepia);
}
.land-body { flex: 1; }
.land-head { margin: 0 0 0.2rem; }
.land-type {
    display: inline-block;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: #efe5d2;
    color: var(--sepia);
    margin-right: 0.4rem;
}
.land-type-homestead, .land-type-accumulation { background: #e2ecdb; color: #4a6b3a; }
.land-type-mining_claim, .land-type-mining_deed { background: #f3e8c8; color: #8a6d1a; }
.land-desc { margin: 0 0 0.25rem; color: var(--ink-soft); font-size: 0.95rem; }
.land-meta { margin: 0; font-size: 0.85rem; color: var(--ink-soft); }
.land-meta a { color: var(--sepia); }
.poem-card .poem-context {
    font-style: normal;
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-top: 0.45rem;
    border-top: 1px dotted var(--rule);
    padding-top: 0.45rem;
}

/* --- story illustrations --- */
.story-illustration { margin: 1.6rem 0; }
.story-illustration img {
    width: 100%;
    border-radius: 6px;
    box-shadow: var(--paper-shadow);
    border: 8px solid #fff;
}

/* --- poem keepsake layout (v2: quiet, book-like) --- */
.poem-frame {
    max-width: 38em;
    margin: 2rem auto 2.5rem;
}
.poem-sheet {
    position: relative;
    background: #fffdf6;
    border: 1px solid #d8ccb8;
    box-shadow: var(--paper-shadow);
    padding: 10px;
}
.poem-inner {
    position: relative;
    border: 1px solid #e4dac6;
    padding: 2.2rem 1.6rem 2rem;
    text-align: center;
}
/* corner brackets: pure CSS, 20px, can never be the wrong size */
.poem-sheet::before, .poem-sheet::after,
.poem-inner::before, .poem-inner::after {
    content: "";
    position: absolute;
    width: 20px; height: 20px;
    border-color: #b09468;
    border-style: solid;
    border-width: 0;
}
.poem-sheet::before { top: 16px; left: 16px; border-top-width: 2px; border-left-width: 2px; }
.poem-sheet::after  { top: 16px; right: 16px; border-top-width: 2px; border-right-width: 2px; }
.poem-inner::before { bottom: 6px; left: 6px; border-bottom-width: 2px; border-left-width: 2px; }
.poem-inner::after  { bottom: 6px; right: 6px; border-bottom-width: 2px; border-right-width: 2px; }
.poem-divider {
    width: 140px; height: 18px;
    display: block;
    margin: 0.2rem auto;
    opacity: 0.9;
}
.poem-title {
    font-family: var(--display);
    font-size: 1.55rem;
    font-weight: 700;
    margin: 0.9rem 0 0.1rem;
    color: var(--ink);
}
.poem-byline {
    font-style: italic;
    color: var(--ink-soft);
    margin: 0 0 1.7rem;
    font-size: 0.92rem;
}
.stanza {
    font-family: var(--italic, Georgia), serif;
    font-style: italic;
    font-size: 1.12rem;
    line-height: 1.8;
    color: #4a3c2a;
    margin: 0 0 1.4rem;
}
.stanza:last-of-type { margin-bottom: 1.7rem; }
@media (max-width: 640px) {
    .poem-inner { padding: 1.6rem 0.8rem 1.5rem; }
    .stanza { font-size: 1.03rem; }
}

/* --- story marks: small thematic icons --- */
.story-mark {
    width: 20px; height: 20px;
    color: var(--sepia);
    vertical-align: -4px;
    margin-right: 0.45rem;
    flex: none;
}
.story-mark.mark-detail { width: 28px; height: 28px; vertical-align: -8px; }
.story-mark.mark-inline { vertical-align: -4px; margin-right: 0.5rem; }
.story-mark.mark-poem {
    display: block;
    width: 26px; height: 26px;
    margin: 0 auto 0.5rem;
}

/* inline person links inside story prose */
.prose a.person-link {
    color: var(--sepia);
    text-decoration: none;
    border-bottom: 1px dotted #b09468;
}
.prose a.person-link:hover { border-bottom-style: solid; }

/* generated record summaries for people without written biographies */
.record-summary p { font-size: 1.06rem; }
.record-note {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--ink-soft);
    border-left: 3px solid var(--rule);
    padding-left: 1rem;
    margin-top: 1rem;
}

/* ---------- share buttons ---------- */
.share-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0 0 1.2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--rule);
}
.share-label { font-style: italic; color: var(--ink-soft); font-size: 0.95rem; }
.share-btn {
    display: inline-block;
    padding: 0.32rem 0.9rem;
    border-radius: 999px;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
    text-decoration: none;
    border: 1px solid var(--rule);
    transition: background 0.15s, color 0.15s;
}
.share-fb { background: #1877f2; color: #fff; border-color: #1877f2; }
.share-fb:hover { background: #145dc0; color: #fff; }
.share-copy { background: var(--cream-deep); color: var(--ink-soft); }
.share-copy:hover { background: var(--sepia); color: #fff; border-color: var(--sepia); }

/* ---------- Facebook follow ---------- */
.footer-follow { margin-top: 1rem; }
.fb-follow-btn {
    display: inline-block;
    padding: 0.5rem 1.3rem;
    background: #1877f2;
    color: #fff !important;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
}
.fb-follow-btn:hover { background: #145dc0; }
