﻿
:root {
    color-scheme: light;
    --ink: #263344;
    --muted: #687789;
    --paper: #fbfaf7;
    --card: #fff;
    --line: #e7e1d6;
    --accent: #8b6b3f;
    --accent-soft: #f3eee5;
    --blue: #344d68;
    --shadow: 0 10px 35px rgba(38,51,68,.08);
}


.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(200px,1fr));
    gap: 12px;
}

    .photo-grid img {
        width: 100%;
        height: 180px;
        object-fit: cover;
        border-radius: 8px;
        cursor: pointer;
        transition: .2s;
    }

        .photo-grid img:hover {
            transform: scale(1.03);
        }


.upload-control::file-selector-button {
    border: 1px solid #d8d1c5;
    background: white;
    color: var(--blue);
    border-radius: 9px;
    padding: 18px 50px;
    cursor: pointer;
    font: 600 13px system-ui, sans-serif;
    content: "Select File";
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

.loveheader {
    background: linear-gradient(135deg, #263b52, #405a70);
    color: #fff;
    padding: 15px 12px 19px;
    text-align: center;
}


body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 16px/1.6 Georgia, "Times New Roman", serif;
}

header {
    background: linear-gradient(135deg, #263b52, #405a70);
    color: #fff;
    padding: 52px 24px 38px;
    text-align: center;
}

.eyebrow {
    color: #e4d4b9;
    text-transform: uppercase;
    letter-spacing: .18em;
    font: 600 11px/1.4 system-ui, sans-serif;
}

h1 {
    margin: 10px auto 8px;
    max-width: 900px;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.12;
    font-weight: 500;
}

.subtitle {
    margin: 0;
    color: #e4e9ee;
    font-size: 1rem;
}

.toolbar {
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgba(251,250,247,.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    padding: 14px 20px;
}

.controls {
    max-width: 1100px;
    margin: auto;
    display: flex;
    gap: 10px;
    align-items: center;
}

#search {
    flex: 1;
    min-width: 0;
    border: 1px solid #d8d1c5;
    border-radius: 9px;
    padding: 12px 14px;
    font: 15px system-ui, sans-serif;
    background: #fff;
    color: var(--ink);
}

    #search:focus {
        outline: 3px solid #d9c7a8;
        border-color: var(--accent);
    }

.aspbutton {
    border: 1px solid #d8d1c5;
    background: white;
    color: var(--blue);
    border-radius: 9px;
    padding: 11px 14px;
    cursor: pointer;
    font: 600 13px system-ui, sans-serif;
}

.aspuploadbutton {
    border: 1px solid #d8d1c5;
    background: white;
    color: var(--blue);
    border-radius: 9px;
    padding: 18px 50px;
    cursor: pointer;
    text-decoration: none;
    font: 600 13px system-ui, sans-serif;
}

.aspbutton:hover {
    background: var(--accent-soft);
}

button {
    border: 1px solid #d8d1c5;
    background: white;
    color: var(--blue);
    border-radius: 9px;
    padding: 11px 14px;
    cursor: pointer;
    font: 600 13px system-ui, sans-serif;
}

    button:hover {
        background: var(--accent-soft);
    }

#count {
    white-space: nowrap;
    color: var(--muted);
    font: 12px system-ui, sans-serif;
}

main {
    max-width: 1100px;
    margin: 30px auto 70px;
    padding: 0 20px;
}

.intro {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

    .intro strong {
        color: var(--accent);
    }

.section {
    margin: 34px 0 12px;
    padding: 13px 18px;
    border-left: 4px solid var(--accent);
    background: var(--accent-soft);
    color: #39485a;
    border-radius: 0 9px 9px 0;
    font-size: 1.35rem;
    font-weight: 500;
    scroll-margin-top: 86px;
}

.entry {
    position: relative;
    margin: 0 0 5px var(--indent);
    padding: 7px 12px;
    border: 1px solid transparent;
    border-left: 2px solid #e5ded2;
    border-radius: 0 7px 7px 0;
    background: rgba(255,255,255,.68);
    overflow-wrap: anywhere;
}

    .entry:hover {
        background: #fff;
        border-color: var(--line);
        border-left-color: var(--accent);
    }

.relationship {
    color: #52657a;
    background: #f3f5f6;
    font-style: italic;
}

.continuation {
    margin-top: -4px;
    padding-top: 2px;
    padding-bottom: 4px;
    color: #687789;
    font-size: .94rem;
    border-left-color: transparent;
    background: transparent;
}

.editorial {
    color: #8b6b3f;
    font-style: italic;
}

.gap {
    height: 7px;
}

mark {
    background: #f7e6a8;
    color: inherit;
    border-radius: 2px;
}

.hidden {
    display: none !important;
}

footer {
    max-width: 1100px;
    margin: 0 auto 40px;
    padding: 0 20px;
    color: var(--muted);
    font: 12px/1.6 system-ui, sans-serif;
}

.pdf-library {
    max-width: 260px;
}

    .pdf-library h2 {
        color: #1f4e79;
        margin-bottom: 15px;
    }

.pdf-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

    .pdf-list li {
        margin-bottom: 8px;
    }

    .pdf-list a {
        display: inline-block;
        width: 220px; /* All buttons same width */
        box-sizing: border-box; /* Includes padding in width */

        border: 1px solid #d8d1c5;
        background: white;
        color: var(--blue);
        border-radius: 9px;
        padding: 11px 14px;
        text-decoration: none;
        font: 600 13px system-ui, sans-serif;
        text-align: center;
        cursor: pointer;
        transition: background-color .2s;
    }

        .pdf-list a:hover {
            background: var(--accent-soft);
        }

.story-card {
    background: #fff;
    border: 1px solid #d8d1c5;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

    .story-card h3 {
        margin-top: 0;
        margin-bottom: 10px;
        color: var(--blue);
    }

.story-dates {
    color: #777;
    font-size: .85rem;
    margin-bottom: 15px;
}

.story-body {
    line-height: 1.7;
    white-space: normal;
}

.story-actions {
    margin-top: 15px;
    text-align: right;
}

.btn-edit {
    border: 1px solid #d8d1c5;
    padding: 11px 14px;
    cursor: pointer;
    font: 600 13px system-ui, sans-serif;
    display: inline-block;
    border: 1px solid #d8d1c5;
    background: white;
    color: var(--blue);
    border-radius: 9px;
    text-decoration: none;
}

    .btn-edit:hover {
        background: var(--accent-soft);
    }


.story-card {
    border: 1px solid #d8d1c5;
    border-radius: 10px;
    background: #fff;
    padding: 18px;
    margin-bottom: 15px;
}

.story-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .story-header h3 {
        margin: 0;
        color: #1f4e79;
    }

.story-dates {
    font-size: .85rem;
    color: #777;
    margin-top: 8px;
    margin-bottom: 12px;
}

.story-body {
    line-height: 1.6;
    white-space: normal;
}

.story-editor {
    padding: 20px;
    border: 1px solid #d8d1c5;
    border-radius: 10px;
    background: #fafafa;
    margin-bottom: 25px;
}

.story-title {
    width: 100%;
    max-width: 600px;
}

.story-text {
    width: 100%;
    max-width: 800px;
    height: 250px;
}

.btn-story,
.btn-edit {
    border: 1px solid #d8d1c5;
    background: white;
    color: var(--blue);
    border-radius: 9px;
    padding: 10px 16px;
    cursor: pointer;
    text-decoration: none;
}


@media (max-width: 650px) {
    header {
        padding: 38px 18px 28px;
    }

    .controls {
        flex-wrap: wrap;
    }

    #search {
        flex-basis: 100%;
    }

    #count {
        flex: 1;
    }

    main {
        padding: 0 12px;
        margin-top: 18px;
    }

    .entry {
        margin-left: min(var(--indent), 70px);
        font-size: 14px;
    }

    .section {
        font-size: 1.15rem;
    }
}

@media print {
    header {
        background: white;
        color: black;
        padding: 20px;
    }

    .eyebrow, .subtitle {
        color: #444;
    }

    .toolbar {
        display: none;
    }

    body {
        background: white;
    }

    main {
        max-width: none;
        margin: 0;
    }

    .entry {
        break-inside: avoid;
        background: white;
    }

    .section {
        break-after: avoid;
    }
}

