
        .photo { margin: 0; background: #fff; border: 1px solid #e2e8f0; border-radius: 1rem; overflow: hidden; box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); transition: transform 0.2s, box-shadow 0.2s; }
        .photo:hover { transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); border-color: #cbd5e1; }
        .photo button { display: block; width: 100%; border: 0; padding: 0; background: #f8fafc; cursor: zoom-in; }
        .photo img { display: block; width: 100%; height: 220px; object-fit: cover; object-position: top; }
        .photo.landscape img { height: auto; max-height: 220px; object-fit: contain; background: #f1f5f9; padding: 1rem; }
        .photo figcaption { padding: 1rem; font-size: 0.875rem; line-height: 1.5; color: #475569; }
        .photo figcaption strong { display: block; color: #0f172a; margin-bottom: 2px; }
        .photo figcaption small { color: #64748b; font-size: 0.75rem; }
        
        [role="tab"] { background: #fff; border: 1px solid #e2e8f0; color: #475569; padding: 0.6rem 1.2rem; border-radius: 0.75rem; font-weight: 700; font-size: 0.875rem; transition: all 0.2s; }
        [role="tab"]:hover { border-color: #94a3b8; }
        [role="tab"][aria-selected="true"] { background: #155e75; border-color: #155e75; color: #fff; }
        .tab-panel[hidden] { display: none !important; }

        .viewer[hidden] { display: none !important; }
        .viewer { position: fixed; inset: 0; z-index: 100; background: rgba(15, 23, 42, 0.95); color: #fff; display: flex; flex-direction: column; padding: 1.5rem; backdrop-filter: blur(8px); }
        .viewer-bar { display: flex; justify-content: space-between; align-items: center; min-height: 48px; margin-bottom: 1rem; }
        .viewer-title { font-size: 1.1rem; font-family: 'Playfair Display', serif; font-weight: bold; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .viewer button { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.2); border-radius: 0.5rem; padding: 0.5rem 1rem; font-weight: bold; cursor: pointer; transition: background 0.2s; }
        .viewer button:hover { background: rgba(255,255,255,0.2); }
        .viewer-stage { flex-grow: 1; min-height: 0; display: flex; align-items: center; justify-content: center; position: relative; gap: 1rem; }
        .viewer-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 0.5rem; }
        .viewer-note { font-size: 0.875rem; color: #cbd5e1; text-align: center; padding: 1rem 0; min-height: 3rem; }
        .nav { align-self: center; position: absolute; top: 50%; transform: translateY(-50%); z-index: 10; width: 3rem; height: 3rem; border-radius: 9999px !important; display: flex; align-items: center; justify-content: center; padding: 0 !important; font-size: 1.5rem; }
        .nav.prev { left: 1rem; }
        .nav.next { right: 1rem; }
        
        @media(max-width:760px) {
            .viewer { padding: 0.5rem; }
            .nav { width: 2.5rem; height: 2.5rem; top: auto; bottom: 0; transform: none; }
            .nav.prev { left: 2rem; }
            .nav.next { right: 2rem; }
            .viewer-stage img { max-height: calc(100% - 3rem); }
        }
    
/* Lützen letter: reading text and the printed source. */
#lutzenbrevet [hidden] { display: none !important; }
.letter-summary { margin: 0 0 2rem; padding: 1.5rem 1.75rem; background: #f5efe3; border: 1px solid #e4d7bf; border-left: 4px solid #a58b59; border-radius: 1rem; color: #475569; }
.letter-summary-label { display: block; font: 700 .7rem/1.4 system-ui,sans-serif; letter-spacing: .15em; text-transform: uppercase; color: #806937; margin-bottom: .5rem; }
.letter-summary h3 { font: 700 1.3rem/1.4 'Playfair Display',Georgia,serif; color: #334155; margin-bottom: .75rem; }
.letter-summary p { line-height: 1.75; }
.letter-summary-caution { margin-top: .8rem; padding-top: .8rem; border-top: 1px solid #e4d7bf; font-size: .875rem; }
.letter-reader { border: 1px solid #e2e8f0; border-radius: 1rem; background: #fffdf8; padding: clamp(1rem,3vw,2rem); }
.letter-reader-toolbar { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.letter-reader button, .letter-reader select { font: 600 .875rem/1.4 system-ui,sans-serif; border: 1px solid #cbd5e1; border-radius: .55rem; padding: .6rem .85rem; color: #155e75; background: white; cursor: pointer; }
.letter-language { display: flex; flex-wrap: wrap; gap: .4rem; }
.letter-language button[aria-pressed="true"], #letter-source-toggle[aria-expanded="true"] { color: white; background: #155e75; border-color: #155e75; }
.letter-reader :is(button,a,select,summary):focus-visible, [role="tab"]:focus-visible, .viewer button:focus-visible { outline: 3px solid #ca9d42; outline-offset: 3px; }
.letter-reading-note { font-size: .875rem; line-height: 1.65; color: #64748b; margin: 0 0 1rem; }
.letter-chapter-nav { display: flex; flex-wrap: wrap; gap: .5rem 1.15rem; padding: 1rem 0; border-top: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; font-size: .85rem; }
.letter-chapter-nav a { color: #155e75; text-decoration: underline; text-underline-offset: 3px; }
.letter-reading-layout { display: grid; grid-template-columns: minmax(0,1fr); gap: 2rem; margin-top: 1.5rem; align-items: start; }
.letter-text-column { min-width: 0; }
.letter-text { max-width: 72ch; margin: 0 auto; }
.letter-text > h3 { font: 700 1.6rem/1.4 'Playfair Display',Georgia,serif; color: #0f172a; margin-bottom: .5rem; }
.letter-edition-label { font: .85rem/1.6 system-ui,sans-serif; color: #64748b; margin-bottom: 2rem; }
.letter-chapter { margin-bottom: 2.5rem; }
.letter-chapter-heading { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.letter-chapter h4 { color: #155e75; font: 700 1.1rem/1.5 system-ui,sans-serif; scroll-margin-top: 7rem; }
.letter-reader .letter-source-link { font-size: .75rem; padding: .4rem .65rem; flex-shrink: 0; }
.letter-chapter p, .letter-intro-text p { font: 1.08rem/1.9 Georgia,'Times New Roman',serif; color: #334155; margin-bottom: 1.25rem; overflow-wrap: anywhere; }
.letter-editor-intro { border-top: 1px solid #e2e8f0; padding: 1.25rem 0 0; }
.letter-editor-intro summary { color: #155e75; font-weight: 700; cursor: pointer; }
.letter-intro-text { padding-top: 1.25rem; }
.letter-source-pane { border: 1px solid #d6dfdf; border-radius: .8rem; padding: 1rem; background: #f1f5f4; min-width: 0; }
.letter-source-header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; align-items: center; margin-bottom: .8rem; }
.letter-source-header h3 { color: #334155; font-size: .95rem; font-weight: 700; }
.letter-source-header button { font-size: .75rem; padding: .4rem .6rem; }
.letter-source-pane label { display: block; font-size: .8rem; color: #475569; margin-bottom: .3rem; }
.letter-source-pane select { display: block; width: 100%; min-width: 0; margin-bottom: .75rem; }
.letter-source-context, .letter-source-figure figcaption, #letter-source-error { font-size: .8rem; color: #475569; line-height: 1.5; margin-bottom: .75rem; }
.letter-source-figure { margin: 0; }
.letter-source-figure button { display: block; width: 100%; padding: 0; border: 0; border-radius: .4rem; cursor: zoom-in; overflow: hidden; }
.letter-source-figure img { display: block; width: 100%; height: auto; }
.letter-source-figure figcaption { margin: .5rem 0; }
#letter-source-original { color: #155e75; text-decoration: underline; font-size: .8rem; }
@media(min-width:960px) {
    .letter-reader.has-source .letter-reading-layout { grid-template-columns: minmax(0,1.12fr) minmax(0,1fr); }
    .letter-source-pane { position: sticky; top: 6rem; max-height: calc(100dvh - 7rem); overflow-y: auto; }
}
@media(max-width:959px) {
    .letter-reader.has-source .letter-text-column { display: none; }
    .letter-summary { padding: 1.25rem; }
    .letter-chapter p, .letter-intro-text p { font-size: 1rem; line-height: 1.8; }
}
@media print {
    .letter-reader-toolbar, .letter-chapter-nav, .letter-source-link, .letter-source-pane, .viewer { display: none !important; }
    .letter-reader.has-source .letter-text-column { display: block; }
    .letter-reader { padding: 0; border: 0; }
}
