*, *:before, *:after { box-sizing: border-box; }
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    font-size: 12px;
    background-color: rgb(0, 0, 0);
    color: gray;
    min-height: 100vh;
    min-height: -webkit-fill-available;
}
html {
    height: -webkit-fill-available;
}
main {
    padding: 14px;
}

/* Fixed box so the layout doesn't collapse before the first frame lands,
   and doesn't jump if a frame ever arrives at a different size. */
.cam {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
    cursor: zoom-in;
}
.cam img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    opacity: 0;
    transition: opacity .25s;
}

#status {
    margin: 8px 0 0 0;
    font-size: 12px;
    line-height: 14px;
    color: gray;
    font-variant-numeric: tabular-nums;
}
#status.quiet {
    color: brown;
}

a {
    color: brown;
}

/* Fullscreen: let the image use the whole screen, drop the padding. */
.cam:fullscreen {
    aspect-ratio: auto;
    width: 100vw;
    height: 100vh;
    cursor: zoom-out;
}
.cam:-webkit-full-screen {
    aspect-ratio: auto;
    width: 100vw;
    height: 100vh;
    cursor: zoom-out;
}
