body {
    font-family: Georgia, "Times New Roman", serif;
    background: #f5f5f5;
    padding: 20px;
}

#toolbar {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
}

#a4page {
    width: 794px;
    min-height: 1123px;
    border: 1px solid #333;
    background-color: #fff;
    margin: 0 auto 30px auto;
    padding: 40px;
    box-sizing: border-box;

    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(60px, auto);
    gap: 20px;
}

/* ========================= */
/* TEXT BLOKKEN */
/* ========================= */

.text-block {
    position: relative;
    grid-column: span 6;
    padding: 12px;
    border: 1px solid #ccc;
    font-size: 14px;
    line-height: 1.6;
    background: #fff;
    overflow-wrap: break-word;
    display: block;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;

    touch-action: none;
    user-select: none;

    /* FORCEER LINKS */
    text-align: left !important;
}

/* Forceer alles binnen blok links */
.text-block,
.text-block * {
    text-align: left !important;
}

.text-block.selected {
    border-color: blue;
    box-shadow: 0 0 5px blue;
    outline: none;
}

.text-block img {
    width: 100%;
    height: auto;
    border: 1px solid #ccc;
    object-fit: contain;
}

/* ========================= */
/* CAPTION */
/* ========================= */

.caption {
    font-size: 10px;
    font-style: italic;
    color: #444;
    outline: none;
    text-align: left !important;
}

/* ========================= */
/* IMAGE WRAPPER */
/* ========================= */

.image-wrapper {
    border: 1px dashed #aaa;
    padding: 5px;
    margin: 10px 0;
    background: #fafafa;
    display: block;
    max-width: 100%;
}

.image-wrapper img {
    display: block;
}

/* ========================= */
/* PDF EXPORT */
/* ========================= */

.pdf-export .text-block {
    border: none !important;
    box-shadow: none !important;
}

.pdf-export .text-block.selected {
    border: none !important;
    box-shadow: none !important;
}

.pdf-export .image-wrapper {
    border: none !important;
}

.pdf-export #a4page {
    border: none !important;
}