html, body {
    font-family: 'Times New Roman', Times, serif;
    background-color: #f8f9fa;
}

.sermon-container {
    width: 8.5in;
    min-height: 11in;
    margin: 2rem auto;
    background-color: white;
    padding: 0.5in;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    line-height: 1.6;
    box-sizing: border-box;
}

h1, h2, h3 {
    font-weight: normal;
}

.header {
    font-size: 0.9rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

.title-section h2 {
    font-size: 1.5rem;
}

.title-section h1 {
    font-size: 2rem;
    margin-top: 0.5rem;
}

.memory-verse h3, .scripture-section h3, .key-word-tally h3 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
}

.instruction {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.verse {
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline;
}

.verse:hover {
    background-color: #f0f0f0;
}

.verse.underlined {
    text-decoration: underline;
}

.no-print {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #e9ecef;
    border-radius: 8px;
}

@media print {
    .no-print {
        display: none !important;
    }
    body {
        background-color: white;
    }
    .sermon-container {
        margin: 0;
        box-shadow: none;
        padding: 0;
    }
}

.verse sup {
    font-size: 0.7rem;
    margin-right: 2px;
    color: #666;
}

.tally-row .kw-name {
    width: 80px;
    font-weight: bold;
}

.tally-box {
    width: 15px;
    height: 15px;
    border: 1px solid #000;
    margin-right: 2px;
    margin-bottom: 2px;
    cursor: pointer;
}

.tally-box.filled {
    background-color: #eee;
    position: relative;
}

.tally-box.filled::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Optional: draw a diagonal or something if needed, but the image shows empty boxes to be filled */
}

/* Let's make the filled box actually show something like an X or just fill it */
.tally-box.filled {
    background-image: linear-gradient(45deg, transparent 45%, black 45%, black 55%, transparent 55%),
                      linear-gradient(-45deg, transparent 45%, black 45%, black 55%, transparent 55%);
}

.notes-content {
    min-height: 8rem; /* 5 lines * 1.6rem */
    background-image: linear-gradient(#eee 1px, transparent 1px);
    background-size: 100% 1.6rem;
    line-height: 1.6rem;
    padding-top: 0.2rem;
    position: relative;
    overflow: hidden;
}

.notes-image-container {
    float: right;
    margin-left: 1rem;
    margin-bottom: 0.5rem;
}

.notes-content.prayer-lines {
    min-height: 8rem; /* 5 lines */
}

.footer {
    border-top: 1px solid #eee;
    padding-top: 1rem;
    font-size: 0.9rem;
}

.footer a {
    color: #000;
    text-decoration: underline;
}

/* Keyword Chips */
.keyword-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 50px;
    cursor: grab;
    user-select: none;
    transition: all 0.2s;
}

.keyword-chip:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.keyword-chip.selected {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

.keyword-chip.selected .text-muted {
    color: rgba(255,255,255,0.7) !important;
}

.keyword-chip.selected .badge {
    background-color: rgba(255,255,255,0.2) !important;
    color: white !important;
}

.keyword-chip.selected .btn-close {
    filter: invert(1) grayscale(100%) brightness(2);
}

.keyword-chip.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.keyword-chip:active {
    cursor: grabbing;
}

.keyword-chip .word-text {
    font-weight: 500;
}

.keyword-chip .btn-close-sm {
    width: 0.5rem;
    height: 0.5rem;
    padding: 0.25rem;
}