/* Standalone-simulation shell: cream page, canvas above, controls below,
   flipping to side by side in landscape. Palette values are the house
   tokens copied as literals; this file imports no site CSS. */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: 'Source Sans 3', Arial, sans-serif;
    background-color: #fffaea;
    color: #34302a;
}

#simulation-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

#canvas-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
}

#canvas-container canvas {
    display: block;
    max-width: 100% !important;
    height: auto !important;
}

#controls-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 14px;
    background-color: #f8f5ec;
    border-top: 1px solid #ded5bf;
    flex-shrink: 0;
    max-height: 50vh;
    overflow-y: auto;
}

/* Fallback note. Hidden unless the sketch fails to boot. */
#boot-note {
    display: none;
    margin: 0;
    padding: 10px 12px;
    background-color: #faf0cd;
    border: 1px solid #ded5bf;
    border-left: 4px solid #f2c419;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.45;
}

#boot-note code {
    font-family: Menlo, Consolas, monospace;
    font-weight: 700;
    color: #8c690d;
}

/* Honesty notes, moved off the canvas: they sit at the foot of the control
   column and scroll on their own, so the canvas keeps its full height. */
#notes-block {
    padding: 8px 10px;
    background-color: #fdf9ee;
    border: 1px solid #ded5bf;
    border-radius: 6px;
    font-size: 11px;
    line-height: 1.45;
    color: #6b6354;
    overflow-y: auto;
    max-height: 180px;
    flex-shrink: 0;
}

#notes-block p {
    margin: 0 0 7px;
}

#notes-block p:last-child {
    margin-bottom: 0;
}

#notes-block .notes-head {
    font-weight: 700;
    color: #8c690d;
}

@media (orientation: landscape) {
    #simulation-container { flex-direction: row; }
    #canvas-container { flex: 1 1 auto; }
    #controls-container {
        width: 320px;
        flex-shrink: 0;
        max-height: none;
        border-top: none;
        border-left: 1px solid #ded5bf;
        overflow-y: auto;
    }
    /* In the side column the notes are pushed to the bottom and take whatever
       height the controls leave, scrolling internally. */
    #notes-block {
        margin-top: auto;
        flex: 0 1 auto;
        min-height: 56px;
        max-height: 40vh;
    }
}
