:root
{
    color-scheme: dark;
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    font-synthesis: none;
    --background: #0b1119;
    --panel: #171f2a;
    --panel-border: #273546;
    --text: #dce5ed;
    --subtle: #879aaa;
    --accent: #66c0f4;
}

*
{
    box-sizing: border-box;
}

[hidden]
{
    display: none !important;
}

html
{
    min-height: 100%;
    background: var(--background);
}

body
{
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(ellipse 975px 588px at 50% -225px, #192737 0%, transparent 70%),
        var(--background);
}

.page
{
    width: min(900px, calc(100% - 40px));
    margin: 0 auto;
    padding: clamp(30px, 10vh, 110px) 0 65px;
}

.posts-root
{
    display: grid;
    gap: 18px;
}

.post
{
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    padding: 14px 15px;
    background: var(--panel);
    box-shadow: 0 23px 73px rgb(0 0 0 / 28%);
}

.post-header
{
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 0 11px;
}

.avatar-shell
{
    flex: none;
    width: 61px;
    height: 61px;
    overflow: hidden;
    border: 1px solid #354e61;
    border-radius: 50%;
    background: #223b4b;
}

.avatar,
.avatar-fallback
{
    width: 100%;
    height: 100%;
}

.avatar
{
    display: block;
    object-fit: cover;
}

.avatar-fallback
{
    display: grid;
    place-items: center;
    color: #c5d5df;
    font-size: 28px;
    font-weight: 600;
}

.author
{
    min-width: 0;
    flex: 1;
}

.author-line
{
    display: flex;
    min-width: 0;
    align-items: baseline;
    gap: 8px;
    white-space: nowrap;
}

.author-name
{
    min-width: 0;
    overflow: hidden;
    flex: 0 1 auto;
    color: #f1f5f9;
    font-size: 20px;
    font-weight: 650;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.verified-badge
{
    display: inline-flex;
    width: 20px;
    height: 20px;
    flex: none;
    align-items: center;
    justify-content: center;
    align-self: center;
}

.verified-badge svg
{
    display: block;
    width: 100%;
    height: 100%;
}

.badge-shape
{
    fill: var(--accent);
}

.badge-check
{
    fill: #fff;
}

.author-handle,
.post-date,
.meta-divider
{
    color: var(--subtle);
    font-size: 15px;
    line-height: 1.35;
}

.author-handle
{
    min-width: 0;
    overflow: hidden;
    flex: 0 1 auto;
    text-overflow: ellipsis;
}

.meta-divider,
.post-date
{
    flex: none;
}

.post-content
{
    min-width: 0;
}

.post-text
{
    margin: 0;
    padding: 0 0 13px;
    color: var(--text);
    font-size: 17.5px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.media
{
    position: relative;
    display: flex;
    width: 100%;
    aspect-ratio: 16 / 9;
    align-items: center;
    justify-content: center;
    margin: 0 0 7px;
    overflow: hidden;
    border: 1px solid #09111a;
    border-radius: 6px;
    background: #000;
}

.media[data-orientation="portrait"]
{
    aspect-ratio: var(--video-aspect-ratio, 9 / 16);
    width: min(100%, 440px);
    margin-right: auto;
    margin-left: auto;
}

.media video
{
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.media-status
{
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 30px;
    background: #0b1016;
    color: var(--subtle);
    font-size: 16px;
    text-align: center;
}

.error-message,
.page-error
{
    margin: 0;
    padding: 3px 0 10px;
    color: #ed9d99;
    font-size: 15px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.site-footer
{
    margin-top: 26px;
    padding: 2px 12px 0;
    color: var(--subtle);
    text-align: center;
}

.footer-links
{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    row-gap: 9px;
    font-size: 14px;
    line-height: 1.5;
}

.footer-item
{
    display: inline-flex;
    max-width: 100%;
    align-items: center;
}

.footer-link
{
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--subtle);
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-link:hover,
.footer-link:focus-visible
{
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-separator
{
    padding: 0 9px;
    color: #53697a;
    user-select: none;
}

@media (max-width: 600px)
{
    .page
    {
        width: calc(100% - 12px);
        padding-top: 24px;
    }

    .post
    {
        padding: 10px 7px;
    }

    .post-header
    {
        gap: 10px;
        padding: 0 0 9px;
    }

    .avatar-shell
    {
        width: clamp(42px, 12vw, 61px);
        height: clamp(42px, 12vw, 61px);
    }

    .author-line
    {
        gap: 5px;
    }

    .author-name
    {
        font-size: clamp(11px, 3.1vw, 18px);
    }

    .verified-badge
    {
        width: clamp(13px, 3.7vw, 18px);
        height: clamp(13px, 3.7vw, 18px);
    }

    .author-handle,
    .post-date,
    .meta-divider
    {
        font-size: clamp(9px, 2.75vw, 14px);
    }

    .post-text
    {
        padding: 0 0 10px;
        font-size: 16px;
    }

    .media
    {
        margin-bottom: 5px;
    }

    .error-message
    {
        padding: 6px 0 10px;
    }
}
