:root {
    color-scheme: light dark;

    --bg: #f5f5f2;
    --text: #20221f;
    --muted: #72746e;
    --border: #deded8;
    --surface: #ebebe5;
    --accent: #20221f;
    --accent-text: #f5f5f2;
    --focus: #577e68;

    --page-width: 460px;
    --page-padding: 28px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #111412;
        --text: #e6e9e5;
        --muted: #929991;
        --border: #303631;
        --surface: #1b201c;
        --accent: #d8ded9;
        --accent-text: #111412;
        --focus: #a8bfa5;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-width: 280px;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    padding: var(--page-padding);

    display: grid;
    place-items: center;

    background: var(--bg);
    color: var(--text);

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    font-size: 16px;
    line-height: 1.5;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button {
    font: inherit;
    -webkit-tap-highlight-color: transparent;
}

.page {
    width: 100%;
    max-width: var(--page-width);
    margin-inline: auto;
}

.screen[hidden] {
    display: none;
}

.icon {
    display: block;
    width: 40px;
    height: 40px;
    margin-bottom: 32px;
    color: var(--text);
}

h1 {
    max-width: 15ch;
    margin: 0;

    font-size: clamp(2.25rem, 7vw, 3.25rem);
    font-weight: 650;
    line-height: 1.06;
    letter-spacing: -.065em;
    text-wrap: balance;
}

p {
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.75;
}

.buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 32px;
}

.button {
    min-height: 50px;
    padding: 0 20px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    border: 1px solid var(--border);
    border-radius: 999px;

    background: transparent;
    color: var(--text);

    font-size: 14px;
    font-weight: 550;
    white-space: nowrap;

    cursor: pointer;
    touch-action: manipulation;

    transition:
        background-color 140ms ease,
        border-color 140ms ease,
        color 140ms ease,
        opacity 140ms ease;
}

.button svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.button--primary {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--accent-text);
}

.button--secondary:hover {
    border-color: var(--muted);
    background: var(--surface);
}

.button--primary:hover {
    opacity: .88;
}

.button:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 4px;
}

.gif {
    width: 100%;
    margin-top: 28px;
    overflow: hidden;

    aspect-ratio: 16 / 9;
    border: 1px solid var(--border);
    border-radius: 12px;

    background: var(--surface);
}

.gif img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.button--back {
    min-height: 44px;
    margin-top: 20px;
    padding-inline: 16px;

    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 380px) {
    :root {
        --page-padding: 22px;
    }

    .icon {
        margin-bottom: 26px;
    }

    .buttons {
        flex-direction: column;
    }

    .buttons .button {
        width: 100%;
    }
}

@media (min-width: 700px) {
    :root {
        --page-padding: 40px;
    }
}

@media (max-height: 520px) and (orientation: landscape) {
    body {
        place-items: start center;
    }

    .page {
        margin-block: 12px;
    }

    .icon {
        width: 30px;
        height: 30px;
        margin-bottom: 18px;
    }

    p {
        margin-top: 12px;
    }

    .buttons {
        margin-top: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}