body {
    margin: 0;
}

.page {
    min-height: 100vh;
}

.titlebar {
    display: flex;
    align-items: center;
    padding-inline: 12px;
}

main {
    max-width: 540px;
    margin: 0 auto;
    padding: 24px 12px 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

main.wide {
    max-width: 960px;
}

nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

h1 {
    margin: 0;
    font-size: 1.6em;
    text-align: center;
}

.sub {
    margin: 0;
    text-align: center;
}

.pictochat-window {
    width: fit-content;
    max-width: 100%;
}

.pictochat-message p {
    margin: 4px 0;
}

.pictochat-message label {
    margin-bottom: 8px;
}

.pictochat-message input[type='text'] {
    max-width: 100%;
}

.pictochat-message iframe {
    display: block;
    width: 100%;
    border: 0;
    margin: 6px 0;
}

.widgets {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 16px;
}

.badge img {
    display: block;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    align-items: start;
    gap: 16px;
    width: 100%;
}

.shot {
    margin: 0;
    background: white;
    border: 4px solid var(--color-ds-darkgrey);
}

.shot img {
    display: block;
    width: 100%;
    height: auto;
    image-rendering: auto;
}

.shot figcaption {
    padding: 2px 8px;
    background: var(--color-ds-info-bg);
    color: white;
}

details {
    max-width: 100%;
}

details:open > p {
    height: auto;
    min-height: var(--height-details-p);
    padding-block: 8px;
    text-align: left;
}

.alert p {
    margin: 0;
}

.loading-container > .loading-center {
    visibility: hidden;
}

footer {
    text-align: center;
}

footer p {
    margin: 0;
}

@media (max-width: 540px) {
    .pictochat-window,
    .pictochat-message,
    .pictochat-status,
    .alert,
    details > summary,
    details:open > p {
        width: 100%;
    }

    input[type='text'] {
        width: 100%;
    }
}
