/* Church program — basic layout and print-friendly styles */

* {
    box-sizing: border-box;
}

body {
    font-family: Georgia, "Times New Roman", serif;
    margin: 0;
    padding: 1rem;
    background: #f8f6f3;
    color: #1a1a1a;
    line-height: 1.5;
}

.program-page {
    max-width: 42rem;
    margin: 0 auto;
    background: #fff;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.program-week-image {
    width: 100%;
    max-height: 12rem;
    margin: 0 0 1.25rem 0;
    overflow: hidden;
    border-radius: 4px;
}

.program-week-image img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 12rem;
    object-fit: contain;
    object-position: center;
}

.program-header {
    text-align: center;
    border-bottom: 1px solid #ccc;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.program-ward {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: #333;
}

.program-header h1.program-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.program-date {
    font-size: 1rem;
    margin: 0;
    color: #444;
}

.lang-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.25rem;
    z-index: 10;
}

.lang-toggle__btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.9rem;
    border: 1px solid #888;
    background: #fff;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    font-family: inherit;
}

.lang-toggle__btn:hover {
    background: #f0f0f0;
}

.lang-toggle__btn.is-active {
    background: #333;
    color: #fff;
    border-color: #333;
}

.program-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.program-item {
    display: block;
}

.program-item__lang {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
}

body.lang-en .program-item__ja,
body.lang-ja .program-item__en {
    display: none !important;
}

.program-item .label {
    font-weight: 600;
    min-width: 8rem;
    color: #333;
}

.program-item .value {
    flex: 1;
    min-width: 0;
}

.program-item--sacrament {
    justify-content: center;
    text-align: center;
    font-weight: 600;
    padding: 0.5rem 0;
}

.message {
    text-align: center;
    padding: 1.5rem;
}

.message.error {
    color: #b00;
}

/* Print */
@media print {
    body {
        background: #fff;
        padding: 0;
    }

    .program-page {
        max-width: none;
        box-shadow: none;
        padding: 0.5in;
    }

    .program-week-image {
        max-height: 11rem;
    }

    .program-week-image img {
        max-height: 11rem;
    }
}
