:root{
    --bg: #0b0c10;
    --card: #12141a;
    --card2:#0f1116;
    --text:#e9eef8;
    --muted:#9aa3b2;
    --line:#222634;
    --accent:#6ea8fe;
    --danger:#ff6b6b;
    --ok:#2ecc71;
    --radius:16px;
    --shadow: 0 10px 30px rgba(0,0,0,.35);
    --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

*{ box-sizing:border-box; }
body{
    margin:0;
    font-family:var(--font);
    background: linear-gradient(0deg,#e9e9e9);
    color:var(--text);
    line-height:1.35;
    padding:32px 14px;
}

.wrap{
    max-width: 640px;
    margin: 0 auto;
}

.post{
    background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 22%), var(--card);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.post__header{
    display:flex;
    gap:12px;
    padding:16px 16px 10px 16px;
    align-items:flex-start;
}

.avatar{
    width:44px;
    height:44px;
    border-radius: 50%;
    flex: 0 0 auto;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,.10);
    background: #1b2030;
}

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

.meta__row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}

.name{
    font-weight: 700;
    font-size: 15px;
    display:flex;
    align-items:center;
    gap:8px;
    min-width:0;
}

.name span{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.badge{
    font-size: 11px;
    padding:2px 8px;
    border-radius: 999px;
    border:1px solid rgba(110,168,254,.35);
    color: var(--accent);
    background: rgba(110,168,254,.10);
    flex:0 0 auto;
}

.sub{
    margin-top:2px;
    color: var(--muted);
    font-size: 12px;
    display:flex;
    gap:8px;
    align-items:center;
    flex-wrap:wrap;
}

.dot{ opacity:.65; }

.menu{
    border:0;
    background: transparent;
    color: var(--muted);
    cursor:pointer;
    padding:8px;
    border-radius:10px;
    line-height:0;
}
.menu:hover{ background: rgba(255,255,255,.06); color: var(--text); }
.menu:focus-visible{ outline:2px solid rgba(110,168,254,.6); outline-offset:2px; }

.post__text{
    padding: 0 16px 12px 16px;
    font-size: 15px;
    white-space: pre-wrap;
    word-break: break-word;
}

.post__text a{
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(110,168,254,.35);
}
.post__text a:hover{ border-bottom-color: rgba(110,168,254,.75); }

.media{
    position:relative;
    background: var(--card2);
    border-top: 1px solid rgba(255,255,255,.05);
    border-bottom: 1px solid rgba(255,255,255,.05);
}

.media__viewport{
    aspect-ratio: 16/10;
    width:100%;
    display:flex;
    overflow:hidden;
    scroll-behavior:smooth;
    scroll-snap-type: x mandatory;
}

.media__item{
    flex: 0 0 100%;
    scroll-snap-align: center;
    display:grid;
    place-items:center;
    position:relative;
}

.media__item img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.media__nav{
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:space-between;
    pointer-events:none;
    padding: 0 10px;
}

.navbtn{
    pointer-events:auto;
    border:1px solid rgba(255,255,255,.10);
    background: rgba(18,20,26,.55);
    color: var(--text);
    width:40px;
    height:40px;
    border-radius: 999px;
    cursor:pointer;
    display:grid;
    place-items:center;
    backdrop-filter: blur(10px);
}
.navbtn:hover{ background: rgba(18,20,26,.75); }
.navbtn:disabled{ opacity:.35; cursor:not-allowed; }

.pager{
    position:absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    display:flex;
    gap:6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(18,20,26,.55);
    border:1px solid rgba(255,255,255,.08);
    backdrop-filter: blur(10px);
}

.dotbtn{
    width:8px;
    height:8px;
    border-radius:999px;
    border:0;
    background: rgba(255,255,255,.25);
    cursor:pointer;
}
.dotbtn[aria-current="true"]{ background: rgba(110,168,254,.95); }

.stats{
    display:flex;
    justify-content:space-between;
    gap:10px;
    padding: 12px 16px;
    color: var(--muted);
    font-size: 12px;
}

.stats strong{ color: var(--text); font-weight: 650; }

.actions{
    display:flex;
    gap:8px;
    padding: 10px 10px 12px 10px;
    border-top: 1px solid rgba(255,255,255,.06);
    flex-wrap:wrap;
    justify-content:space-between;
}

.btnrow{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}

.btn{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.02);
    color: var(--text);
    cursor:pointer;
    font-weight: 600;
    font-size: 13px;
}
.btn:hover{ background: rgba(255,255,255,.05); }
.btn:focus-visible{ outline:2px solid rgba(110,168,254,.6); outline-offset:2px; }
.btn[aria-pressed="true"]{
    border-color: rgba(110,168,254,.45);
    background: rgba(110,168,254,.10);
    color: var(--accent);
}
.btn.like[aria-pressed="true"]{ color: #ff7aa2; border-color: rgba(255,122,162,.45); background: rgba(255,122,162,.10); }

.icon{
    width:18px;height:18px;display:inline-block;flex:0 0 auto;
}

.composer{
    display:flex;
    gap:10px;
    padding: 12px 16px 16px 16px;
    border-top: 1px solid rgba(255,255,255,.06);
    align-items:flex-start;
}

.field{
    flex:1;
    display:flex;
    gap:8px;
    align-items:center;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    padding: 8px 10px;
}

.field textarea{
    width:100%;
    border:0;
    outline: none;
    resize: none;
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.35;
    min-height: 22px;
    max-height: 140px;
}

.send{
    border:0;
    border-radius: 14px;
    padding: 10px 14px;
    background: rgba(110,168,254,.95);
    color: #0b0c10;
    cursor:pointer;
    font-weight: 800;
    font-size: 13px;
}
.send:disabled{ opacity:.55; cursor:not-allowed; }

.sr-only{
    position:absolute;
    width:1px;height:1px;
    padding:0;margin:-1px;
    overflow:hidden;clip:rect(0,0,0,0);
    white-space:nowrap;border:0;
}

@media (max-width: 420px){
    .btn{ padding: 10px 10px; }
    .actions{ padding-left: 8px; padding-right: 8px; }
    .post__header{ padding-left: 12px; padding-right: 12px; }
    .post__text{ padding-left: 12px; padding-right: 12px; }
    .stats{ padding-left: 12px; padding-right: 12px; }
    .composer{ padding-left: 12px; padding-right: 12px; }
}