* {
    box-sizing: border-box;
}
html,body {
    height: 100%;
    overflow: hidden;
}
body {
    background: #09090b;
    color: #fafafa;
}
.ds-shell {
    height: 100dvh;
    height: calc(100dvh - 58px);
    display: flex;
    align-items: stretch;
    overflow: hidden;
    position: relative;
}
.ds-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    transition: background-image .7s ease,background-color .7s ease;
    background-size: cover;
    background-position: center;
    filter: blur(60px) saturate(1.6) brightness(.35);
    transform: scale(1.15);
}
.ds-center {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.ds-phone {
    width: min(420px,calc(100vw - 80px));
    height: min(760px,calc(100dvh - 70px));
    position: relative;
}
.ds-screen {
    width: 100%;
    height: 100%;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.10);
    box-shadow: 0 0 0 1px rgba(0,0,0,.6),0 40px 100px rgba(0,0,0,.7),inset 0 0 0 1px rgba(255,255,255,.05);
    background: #111;
    position: relative;
}
.ds-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    opacity: 0;
    transition: opacity .3s;
}
.ds-iframe.loaded {
    opacity: 1;
}
.ds-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
    display: none;
    z-index: 1;
}
.ds-video.show {
    display: block;
}
.ds-post-fab {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 30;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 0;
    background: #fff;
    color: #111;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ds-up-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.72);
    z-index: 9000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.ds-up-modal.show {
    display: flex;
}
.ds-up-card {
    background: #18181b;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 16px;
    padding: 22px;
    width: 100%;
    max-width: 420px;
    color: #fff;
    font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}
.ds-up-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 4px;
}
.ds-up-card p {
    font-size: 12px;
    color: rgba(255,255,255,.55);
    margin: 0 0 16px;
}
.ds-up-drop {
    display: block;
    border: 1.5px dashed rgba(255,255,255,.22);
    border-radius: 10px;
    padding: 26px;
    text-align: center;
    cursor: pointer;
    font-size: 13px;
    color: rgba(255,255,255,.7);
}
.ds-up-drop.has {
    border-color: #22c55e;
    color: #22c55e;
}
.ds-up-cap {
    width: 100%;
    margin-top: 12px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    padding: 9px 11px;
    color: #fff;
    font-size: 13px;
    box-sizing: border-box;
}
.ds-up-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
}
.ds-up-btn {
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: 0;
}
.ds-up-cancel {
    background: rgba(255,255,255,.1);
    color: #fff;
}
.ds-up-submit {
    background: #fff;
    color: #111;
}
.ds-up-submit:disabled {
    opacity: .5;
}
.ds-up-status {
    font-size: 12px;
    color: rgba(255,255,255,.7);
    margin-top: 10px;
    min-height: 16px;
}
.ds-up-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}
.ds-up-row .ds-up-field {
    margin: 0;
}
.ds-up-field {
    margin-top: 10px;
}
.ds-up-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: rgba(255,255,255,.45);
    margin-bottom: 5px;
    font-weight: 600;
}
.ds-up-input,.ds-up-select,.ds-up-textarea {
    width: 100%;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 8px;
    padding: 9px 11px;
    color: #fff;
    font-size: 13px;
    box-sizing: border-box;
    font-family: inherit;
}
.ds-up-textarea {
    resize: vertical;
    min-height: 60px;
    line-height: 1.4;
}
.ds-up-input:focus,.ds-up-select:focus,.ds-up-textarea:focus {
    outline: none;
    border-color: rgba(255,255,255,.4);
}
.ds-up-hint {
    font-size: 11px;
    color: rgba(255,255,255,.45);
    margin-top: 4px;
}
.ds-up-progress {
    height: 3px;
    background: rgba(255,255,255,.1);
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
    display: none;
}
.ds-up-progress.show {
    display: block;
}
.ds-up-bar {
    height: 100%;
    background: #22c55e;
    width: 0;
    transition: width .25s;
}
.ds-cover {
    position: absolute;
    inset: 0;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    transition: opacity .3s;
}
.ds-cover.hide {
    opacity: 0;
    pointer-events: none;
}
.ds-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255,255,255,.1);
    border-top-color: rgba(255,255,255,.6);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
.ds-cover-label {
    font-size: 11px;
    color: rgba(255,255,255,.35);
    letter-spacing: .1em;
    text-transform: uppercase;
}
.ds-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 16px 22px;
    background: linear-gradient(to top,rgba(0,0,0,.85) 0%,rgba(0,0,0,.6) 60%,transparent 100%);
    pointer-events: none;
}
.ds-site-name {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ds-site-domain {
    font-size: 12px;
    color: rgba(255,255,255,.55);
    margin-bottom: 8px;
}
.ds-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.ds-tag {
    font-size: 10px;
    font-weight: 600;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 20px;
    padding: 2px 7px;
    backdrop-filter: blur(4px);
}
.ds-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 0 16px 0 8px;
}
.ds-action-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.ds-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.08);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: all .18s;
    text-decoration: none;
}
.ds-btn:hover {
    background: rgba(255,255,255,.2);
    transform: scale(1.07);
}
.ds-btn.liked {
    background: rgba(239,68,68,.3);
    border-color: rgba(239,68,68,.5);
    color: #f87171;
}
.ds-count {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,.7);
    text-align: center;
    min-width: 20px;
}
.ds-nav {
    position: absolute;
    left: 50%;
    transform: translateX(calc(-50% - min(190px,calc(50vw - 70px))));
    top: 50%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transform-origin: center;
}
.ds-nav-up,.ds-nav-down {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.ds-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.06);
    color: rgba(255,255,255,.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all .15s;
}
.ds-nav-btn:hover {
    background: rgba(255,255,255,.14);
    color: #fff;
    border-color: rgba(255,255,255,.15);
}
.ds-dots {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 5px;
    align-items: center;
}
.ds-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    transition: all .2s;
}
.ds-dot.active {
    background: rgba(255,255,255,.9);
    width: 16px;
    border-radius: 3px;
}
.ds-heart-pop {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
}
.ds-heart-pop.go {
    animation: heartpop .65s cubic-bezier(.18,.89,.32,1.28);
}
@keyframes heartpop {
    0% {
        opacity: 0;
        transform: scale(.3);
    }
    15% {
        opacity: 1;
        transform: scale(1.2);
    }
    60% {
        opacity: 1;
        transform: scale(.95);
    }
    100% {
        opacity: 0;
        transform: scale(1.4) translateY(-12px);
    }
}
.ds-screen.slide-up {
    animation: slideup .28s cubic-bezier(.22,.8,.22,1);
}
.ds-screen.slide-down {
    animation: slidedown .28s cubic-bezier(.22,.8,.22,1);
}
@keyframes slideup {
    from {
        opacity: .2;
        transform: translateY(6%) scale(.98);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
@keyframes slidedown {
    from {
        opacity: .2;
        transform: translateY(-6%) scale(.98);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
.ds-drawer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(calc(-50% + min(190px,calc(50vw - 60px))));
    width: min(400px,100vw);
    max-height: 60vh;
    background: #18181b;
    border: 1px solid rgba(255,255,255,.08);
    border-bottom: none;
    border-radius: 16px 16px 0 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    transition: transform .22s cubic-bezier(.22,.8,.22,1),opacity .22s;
    opacity: 0;
    pointer-events: none;
    transform: translateX(calc(-50% + min(190px,calc(50vw - 60px)))) translateY(100%);
}
.ds-drawer.open {
    opacity: 1;
    pointer-events: all;
    transform: translateX(calc(-50% + min(190px,calc(50vw - 60px)))) translateY(0);
}
.ds-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    flex-shrink: 0;
}
.ds-drawer-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,.8);
}
.ds-drawer-close {
    background: none;
    border: none;
    color: rgba(255,255,255,.4);
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.ds-drawer-close:hover {
    color: #fff;
}
.ds-comments-list {
    overflow-y: auto;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 80px;
    flex: 1;
}
.ds-comment-item {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 10px;
    padding: 9px 11px;
}
.ds-comment-item strong {
    font-size: 11px;
    font-weight: 700;
    color: #818cf8;
}
.ds-comment-item p {
    font-size: 12px;
    line-height: 1.45;
    color: rgba(255,255,255,.75);
    margin: 3px 0 0;
}
.ds-empty-msg {
    font-size: 12px;
    color: rgba(255,255,255,.3);
    text-align: center;
    padding: 20px 0;
}
.ds-compose-row {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid rgba(255,255,255,.06);
    flex-shrink: 0;
}
.ds-compose-row input {
    flex: 1;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 20px;
    padding: 8px 12px;
    font-size: 12px;
    color: #fafafa;
    outline: none;
}
.ds-compose-row input:focus {
    border-color: rgba(255,255,255,.2);
}
.ds-compose-row input::placeholder {
    color: rgba(255,255,255,.3);
}
.ds-compose-row button {
    background: #fff;
    color: #111;
    border: none;
    border-radius: 20px;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
}
.ds-compose-row button:hover {
    background: #f0f0f0;
}
@media(max-width:640px) {
    .ds-nav {
        display: none;
    }
    .ds-phone {
        width: 100vw;
        height: calc(100vh - 58px);
    }
    .ds-screen {
        border-radius: 0;
        border: 0;
        box-shadow: none;
    }
    .ds-actions {
        position: absolute;
        right: 10px;
        bottom: 110px;
        z-index: 5;
        padding: 0;
    }
    .ds-center {
        padding: 0;
    }
    .ds-drawer {
        left: 0;
        right: 0;
        width: 100%;
        transform: translateY(100%);
        border-radius: 16px 16px 0 0;
    }
    .ds-drawer.open {
        transform: translateY(0);
    }
    .ds-dots {
        top: 8px;
    }
}
.ds-vidlayer {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: none;
}
.ds-vidlayer.show {
    display: block;
}
.ds-vid-tap {
    position: absolute;
    inset: 0;
    cursor: pointer;
}
.ds-vid-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%) scale(.4);
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: rgba(0,0,0,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 30px;
    pointer-events: none;
    opacity: 0;
    transition: transform .25s,opacity .25s;
}
.ds-vid-icon.show {
    opacity: 1;
    transform: translate(-50%,-50%) scale(1);
}
.ds-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255,255,255,.18);
    z-index: 6;
}
.ds-progress-fill {
    height: 100%;
    background: #fff;
    width: 0;
    transition: width .12s linear;
}
.ds-mute {
    display: none;
}
.ds-mute.show {
    display: flex;
}
.ds-drawer {
    position: fixed;
    top: 58px;
    right: 0;
    left: auto;
    bottom: 0;
    width: min(380px,100vw);
    max-height: none;
    background: #18181b;
    border-left: 1px solid rgba(255,255,255,.08);
    border-top: none;
    border-bottom: none;
    border-radius: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform .26s cubic-bezier(.22,.8,.22,1),opacity .2s;
}
.ds-drawer.open {
    opacity: 1;
    pointer-events: all;
    transform: none;
}
.ds-comments-list {
    flex: 1;
    min-height: 0;
}
@media(min-width:921px) {
    .ds-shell.with-drawer .ds-center {
        padding-right: 380px;
        transition: padding-right .26s;
    }
}
@media(max-width:920px) {
    .ds-drawer {
        top: auto;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 62vh;
        height: 62vh;
        border-radius: 18px 18px 0 0;
        border-left: 0;
        border-top: 1px solid rgba(255,255,255,.08);
        transform: translateY(100%);
    }
    .ds-drawer.open {
        transform: translateY(0);
    }
}
@media(min-width:921px) {
    .ds-shell.with-drawer .ds-actions {
        left: auto!important;
        right: 400px!important;
        transform: none!important;
    }
    .ds-shell.with-drawer .ds-nav {
        transform: translateX(calc(-50% - 380px))!important;
    }
}
@media(max-width:640px) {
    .ds-shell {
        height: 100dvh!important;
        height: calc(100dvh - 58px)!important;
    }
    .ds-phone {
        width: 100vw!important;
        height: calc(100dvh - 58px)!important;
        max-width: none;
    }
    .ds-screen {
        border-radius: 0!important;
        border: 0!important;
        box-shadow: none!important;
    }
    .ds-actions {
        right: 8px;
        bottom: 88px!important;
        gap: 14px!important;
        padding: 0!important;
        left: auto!important;
        transform: none!important;
    }
    .ds-btn {
        width: 42px!important;
        height: 42px!important;
        font-size: 15px;
    }
    .ds-overlay {
        padding: 20px 14px 84px!important;
    }
    .ds-site-name {
        font-size: 14px;
    }
    .ds-post-fab {
        left: 14px!important;
        bottom: 14px!important;
        width: 44px!important;
        height: 44px!important;
    }
    .ai-toggle-btn {
        display: none!important;
    }
    .ds-drawer {
        height: 60dvh!important;
        max-height: 60dvh!important;
    }
    .ds-up-card {
        max-width: calc(100vw - 32px);
    }
}
@media(max-width:640px) and (orientation:landscape) {
    .ds-phone {
        height: calc(100dvh - 58px)!important;
    }
    .ds-actions {
        bottom: 14px!important;
    }
}
.ds-2x-pill {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 8;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    padding: 5px 10px;
    border-radius: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s;
    backdrop-filter: blur(4px);
}
.ds-2x-pill.show {
    opacity: 1;
}
.ds-progress{height:7px;cursor:pointer;z-index:7}
.ds-progress:hover{height:9px}
.ds-vid-sound{position:absolute;top:14px;left:50%;transform:translateX(-50%);z-index:8;background:rgba(0,0,0,.62);color:#fff;font-size:12px;font-weight:600;padding:6px 12px;border-radius:16px;opacity:0;pointer-events:none;transition:opacity .15s;backdrop-filter:blur(4px);white-space:nowrap}
.ds-vid-sound.show{opacity:1}

/* Title/caption overlay must sit above the video layer (z5) so it shows on clips too */
.ds-overlay{z-index:6}
@media (max-width:640px){
  .ds-shell{height:calc(100dvh - 58px)!important}
  .ds-center{padding:0!important}
  .ds-phone{width:100vw!important;height:calc(100dvh - 58px)!important;max-width:none!important}
  .ds-screen{border-radius:0!important;border:0!important;box-shadow:none!important;width:100%!important;height:100%!important}
  .ds-overlay{padding:16px 14px 92px!important}
  .ds-actions{right:8px!important;bottom:96px!important}
}
