html, body {
    height: 100%;
    margin: 0;
    background: #333333;
    min-height: -webkit-fill-available;
}

@media (pointer: coarse) {

    .non-touch {
        display: none !important;
    }

    .carousel {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        width: 100%;
        height: 100dvh;
        touch-action: pan-x;
    }

    .page {
        flex: 0 0 100%;
        min-width: 100%;
        height: 100%;
        scroll-snap-align: start;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 2em;
        color: #eee;
    }

    .content {
        display: flex;
        flex-direction: column;
        background: #333;
    }

    .content .viewport {
        flex: 1;
        margin: 1em 1em 2em 1em;
        display: flex;
        width: calc(100% - 2em);
        height: calc(100% - 3em);
        align-items: center;
        justify-content: center;
    }

    .content .viewport-footer {
        height: 120px;
        margin: 0 1em 1em;
        width: calc(100% - 2em);
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .content .viewport-footer img {
        max-width: 80%;
        margin-bottom: 3em;
    }

    .content .viewport svg {
        width: 100%;
        height: 100%;
    }

    .header {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        margin-top: 1em;
    }

    .header p {
        display: block;
        padding: 1em;
        margin-bottom: 0;
    }
    .header p:nth-child(2) {
        margin-top: 0;
        padding-top: 0;
    }

    .footer {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        margin-top: 1em;
    }
    .footer p {
        padding: 1em;
        display: block;
        margin-bottom: 0;
    }

    select {
        border: none;
        border-bottom: 2px #ccc dashed;
        background-color: transparent;
        outline: none;
        padding: 0;
        cursor: pointer;
        margin-right: 4px;
        margin-left: 4px;
        font-family: inherit;
        font-size: inherit;
        font-weight: bold;
        color: inherit;
        box-shadow: none;
        -webkit-appearance: none;
        overflow: hidden;

        width: auto;               /* let it shrink */
        display: inline-block;
        min-width: 0;              /* remove default min width */
        max-width: max-content;    /* ensure it grows to content */

        text-align-last: center;
    }

    select option {
        overflow: hidden;
        color: #ccc;
        padding: 4px;
        background-color: #333; /* Example color */
    }

    .dots {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 0.6em;
        z-index: 1000;
    }

    .dots button {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        border: none;
        background: rgba(255, 255, 255, 0.5);
        cursor: pointer;
        padding: 0;
        transition: background 0.3s;
    }

    .dots button.active {
        background: rgba(255, 255, 255, 0.9);
    }

    .share {
        flex: 1;
        align-items: flex-end;
        display: flex;
        margin-bottom: 4em;
    }

    .header .share {
        align-self: center;
    }

    .share img {
        opacity: 0.2;
        width: 2em;
        height: 2em;
    }
}

@media (pointer: fine) {

    html, body {
        display: flex;
        flex-direction: column;
        background: #333;
        height: 100%;
    }

    .touch {
        display: none !important;
    }

    .header {
        font-size: 1.5rem;
        padding: 0 0 0;
        column-gap: 0.2em;
    }

    .carousel {
        display: flex;
        flex-direction: column;
        flex: 1;
    }

    .viewport {
        flex: 1;
        width: calc(100% - 2em);
        height: calc(100% - 2em);
        margin: 1em;
    }

    .viewport svg {
        width: 100%;
        height: 100%;
    }

    .footer {
        padding: 0 1em 1em;
        font-size: 1.5rem;
    }

    .footer p {
        margin: 0;
    }

    .header, .footer {
        background: #333;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    select {
        border: none;
        border-bottom: 1px #ccc dashed;
        background-color: transparent;
        outline: none;
        padding: 0;
        cursor: pointer;
        font-family: inherit;
        font-size: inherit;
        color: inherit;
        box-shadow: none;
        -webkit-appearance: none;
        overflow: hidden;
        text-align-last: center;
    }

    select option {
        overflow: hidden;
        color: #ccc;
        padding: 4px;
        background-color: #333; /* Example color */
    }

    .share {
        position: fixed;
        bottom: 1.5em;
        right: 2em;
    }

    .share-image {
        opacity: 0.2;
        width: 2em;
        height: 2em;
        cursor: pointer;
    }
}
