body {
    font-family: sans-serif;
    text-align: center;
    background: #f2f2f2;
    margin: 0;
    padding: 8px;
}

@media screen and (max-width: 400px) {
    h1 {
        margin: 0 0 8px 0;
    }
}

.prompt {
    font-size: 1.3em;
    margin-bottom: 0;
}

/* Occasion below the prompt (only shown if today has one) */
#occasion {
    font-size: 0.9em;
    color: #777;
    margin-top: 4px;
}

/* Links in the header (src/partials/header.php) */
nav {
    margin-bottom: 16px;
}

/* Drawing grid (number of columns is set in app.js) */
#grid {
    display: grid;
    width: 300px;
    max-width: 100%;
    margin: 20px auto;
    border: 2px solid #333;
}

.pixel {
    aspect-ratio: 1;
    border: 1px solid #ddd;
    padding: 0;
    cursor: pointer;
}

/* Color picker */
#palette {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.color {
    width: 44px;
    height: 44px;
    border: 2px solid #999;
    border-radius: 50%;
    cursor: pointer;
}

.color.selected {
    border: 4px solid #333;
}

/* Palette chooser: one button per palette, showing its colors as stripes */
#palette-chooser {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.palette-option {
    display: flex;
    width: 80px;
    height: 24px;
    padding: 0;
    border: 2px solid #999;
    cursor: pointer;
}

.palette-option span {
    flex: 1;
}

.palette-option.selected {
    border: 3px solid #333;
}

/* "Next prompt in X hours" (after "Done") */
#next-prompt {
    color: #777;
}

/* Preview of the result image */
#preview {
    display: block;
    width: 300px;
    max-width: 100%;
    margin: 0 auto 16px;
    border: 1px solid #ccc;
}

#done-button,
#copy-button,
#download-button,
#dialog-copy-button,
#dialog-download-button {
    font-size: 1.1em;
    padding: 10px 24px;
    cursor: pointer;
}

/* Confirmation dialog */
#confirm-dialog {
    border: 2px solid #333;
    padding: 20px;
    text-align: center;
}

#confirm-dialog button {
    font-size: 1em;
    padding: 8px 20px;
    margin: 0 4px;
    cursor: pointer;
}

/* ===== Gallery ===== */
/* Number of columns is set in gallery.js */
#gallery {
    display: grid;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

/* One picture (its pixels are set in gallery.js) */
.tile {
    display: grid;
    aspect-ratio: 1;
    padding: 0;
    border: 1px solid #ccc;
    cursor: pointer;
}

/* Gray box for testing (MIN_TILES in gallery.js) */
.tile.placeholder {
    background: #cccccc;
    cursor: default;
}

/* Dialog with the full image */
#picture-dialog {
    border: 2px solid #333;
    padding: 20px;
    text-align: center;
}

#dialog-preview {
    display: block;
    width: 300px;
    max-width: 100%;
    margin: 0 auto 16px;
}

#picture-dialog form {
    margin-top: 12px;
}

#picture-dialog form button {
    font-size: 1em;
    padding: 8px 20px;
    cursor: pointer;
}

/* ===== Imprint / Privacy ===== */
.text-page {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

/* ===== Footer (src/partials/footer.php) ===== */
footer {
    margin-top: 40px;
    font-size: 0.9em;
    color: #777;
}

footer a {
    color: #777;
}

/* After "Done": only the preview is shown, grid, palette and palette chooser are hidden */
body.done #grid,
body.done #palette,
body.done #palette-chooser {
    display: none;
}
