

/* -------- Theme Tokens -------- */
:root {
    --bg: #ffffff;
    --fg: #222222;
    --muted: #666666;
    --accent: #2b6cb0;
    --border: #e6e6e6;
    --danger: #c53030;
    /* Notecard paper and tape */
    --paper: #fffdf7; /* subtle warm paper */
    --tape: #fff1a8; /* sticky-tape accent */
}

/* -------- Base / Reset-ish -------- */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    color: var(--fg);
    background: var(--bg);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent);
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* -------- Layout Wrappers -------- */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
}

/* -------- Header with Portrait -------- */
.site-header {
    background: #f7fafc;
    border-bottom: 1px solid var(--border);
}

.header-row {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.portrait {
    width: 72px; /* square */
    height: 72px; /* square */
    object-fit: cover; /* keeps image proportional and fills square */
    border-radius: 12px; /* soft corners (use 50% for a circle) */
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    flex-shrink: 0;
}

.title-block h1 {
    margin: 0;
    line-height: 1.2;
}

.subtitle {
    color: var(--muted);
    margin: .25rem 0 .5rem;
}

/* Primary nav */
.nav {
    margin-top: .5rem;
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

    .nav a {
        color: var(--accent);
        font-weight: 500;
    }

        .nav a:hover {
            text-decoration: underline;
        }

/* -------- Footer -------- */
.site-footer {
    border-top: 1px solid var(--border);
    font-size: .9rem;
    color: var(--muted);
}

/* -------- Typography -------- */
h1, h2, h3 {
    line-height: 1.25;
}

h2 {
    margin-top: 1.5rem;
}

h3 {
    margin-top: 1rem;
}

/* -------- Obituary Content -------- */
.obit-meta p, .service p {
    margin: .25rem 0;
}

/* -------- Buttons -------- */
.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    border: 0;
    padding: .6rem 1rem;
    border-radius: .5rem;
    cursor: pointer;
    text-decoration: none;
    transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}

    .btn:hover {
        opacity: .95;
    }

    .btn:active {
        transform: translateY(1px);
    }

    .btn:focus-visible {
        outline: 2px solid transparent;
        box-shadow: 0 0 0 3px rgba(43,108,176,.35);
    }

    .btn[disabled], .btn:disabled {
        opacity: .6;
        cursor: not-allowed;
    }

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

/* Button rows */
.btn-row {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

/* -------- Forms / Validation -------- */
.guestbook-form .form-row {
    margin-bottom: .75rem;
    display: flex;
    flex-direction: column;
}

.guestbook-form label {
    font-weight: 600;
    margin-bottom: .25rem;
}

.guestbook-form input,
.guestbook-form textarea {
    padding: .5rem;
    border: 1px solid var(--border);
    border-radius: .375rem;
    background: #fff;
    color: var(--fg);
}

    .guestbook-form input:focus,
    .guestbook-form textarea:focus {
        outline: 2px solid transparent;
        box-shadow: 0 0 0 3px rgba(43,108,176,.2);
    }

.validation {
    color: var(--danger);
    margin: .25rem 0;
}

.hint {
    color: var(--muted);
    font-size: .85rem;
}

/* -------- Toast / Notices -------- */
.toast {
    background: #edf2f7;
    border: 1px solid var(--border);
    padding: .75rem;
    border-radius: .5rem;
    margin: .75rem 0;
}

/* -------- Legacy entry list (kept as fallback) -------- */
.entries .entry {
    border-bottom: 1px solid var(--border);
    padding: .5rem 0;
}

    .entries .entry header {
        display: flex;
        gap: .5rem;
        align-items: center;
    }

    .entries .entry .date {
        color: var(--muted);
        font-size: .9rem;
    }

/* ==========================================================================
   Notecard Grid (Guestbook + Admin Moderation)
   ========================================================================== */

/* Responsive grid for cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: .5rem;
}

/* Notecard appearance */
.note-card {
    position: relative;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem .95rem;
    box-shadow: 0 3px 12px rgba(0,0,0,.06);
    transition: transform .12s ease, box-shadow .12s ease;
}

    .note-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(0,0,0,.10);
    }


/* Header (name + date) */
.note-card__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .5rem;
}

.note-card__name {
    font-weight: 700;
}

.note-card__date {
    color: var(--muted);
    font-size: .9rem;
    white-space: nowrap;
}

/* Body */
.note-card__body p {
    ma
