.letter-viewer {
    width: min(980px, calc(100% - 24px));
    max-width: none;
    max-height: calc(100dvh - 24px);
    padding: 0;
    border: 0;
    border-radius: 16px;
    box-shadow: 0 24px 70px #001e34a8;
    overflow: hidden;
}

.letter-viewer::backdrop { background: #001e34b8; }
.letter-viewer__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #fff;
    border-bottom: 1px solid #dce7ee;
}
.letter-viewer__header h2 { margin: 2px 0 0; font-size: 19px; }
.letter-viewer__actions { display: flex; gap: 8px; align-items: center; }
.letter-viewer__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    height: min(72dvh, 760px);
    overflow: auto;
    background: #edf3f7;
}
.letter-viewer__body img { display: block; width: auto; max-width: 100%; height: auto; box-shadow: 0 2px 12px #16334925; }
.letter-viewer__empty { margin: auto; padding: 24px; text-align: center; }
.letter-viewer__body [hidden] { display: none; }

@media (max-width: 600px) {
    .letter-viewer__header { align-items: flex-start; flex-direction: column; }
    .letter-viewer__actions { width: 100%; justify-content: space-between; }
    .letter-viewer__body { height: 68dvh; }
}
