/* ==========================================================================
   PorTok — design tokens
   ========================================================================== */
:root {
    --bg: #ffffff;
    --bg-elevated: #ffffff;
    --surface: rgba(22, 24, 35, .04);
    --surface-2: rgba(22, 24, 35, .07);
    --surface-3: rgba(22, 24, 35, .12);
    --border: rgba(22, 24, 35, .1);
    --text: #161823;
    --muted: rgba(22, 24, 35, .62);
    --faint: rgba(22, 24, 35, .45);
    --pink: #ff2d6f;
    --magenta: #d946ef;
    --violet: #8b5cf6;
    --cyan: #0891b2;
    --green: #059669;
    --gradient: linear-gradient(135deg, #ff2d6f 0%, #d946ef 55%, #8b5cf6 100%);
    --radius: 16px;
    --radius-sm: 10px;
    --nav-h: 64px;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --spring: cubic-bezier(.34, 1.56, .64, 1);
    --shadow: 0 18px 50px rgba(22, 24, 35, .16);
    color-scheme: light;
}

/* The video feed stays dark on phones, like TikTok: videos play full screen under white text */
@media (max-width: 899px) {
    .page-feed .main, .page-following .main {
        --bg: #000;
        --bg-elevated: #121212;
        --surface: rgba(255, 255, 255, .08);
        --surface-2: rgba(255, 255, 255, .12);
        --surface-3: rgba(255, 255, 255, .18);
        --border: rgba(255, 255, 255, .1);
        --text: #fff;
        --muted: rgba(255, 255, 255, .7);
        --faint: rgba(255, 255, 255, .5);
        background: #000;
        color: #fff;
        color-scheme: dark;
    }
}

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

html, body {
    height: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    touch-action: manipulation; /* no double-tap zoom, so a double tap on a video only likes it */
    overscroll-behavior: none;
    background: var(--bg);
    color: var(--text);
    font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }

.i { width: 1.25em; height: 1.25em; flex-shrink: 0; }

/* ==========================================================================
   App shell — phone column on small screens, sidebar layout on desktop
   ========================================================================== */
.app {
    position: relative;
    height: 100dvh;
    max-width: 520px;
    margin: 0 auto;
    overflow: hidden;
    background: var(--bg);
}
.main {
    position: relative;
    height: calc(100% - var(--nav-h) - env(safe-area-inset-bottom));
}

/* ---------- Navigation (bottom bar on mobile) ---------- */
.nav {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 10;
    height: calc(var(--nav-h) + env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
}
.logo, .nav-foot, .nav-balance { display: none; }
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 56px;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--faint);
    transition: color .2s;
}
.nav-item .i { width: 24px; height: 24px; }
.nav-item.active, .nav-item:hover { color: var(--text); }
.nav-item .avatar.xs { width: 24px; height: 24px; font-size: 11px; }
.nav-item.active .avatar { box-shadow: 0 0 0 2px var(--text); }
.nav-upload > span:last-child { display: none; }
.upload-pill {
    position: relative;
    display: grid;
    place-items: center;
    width: 48px; height: 32px;
    border-radius: 10px;
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 6px 20px rgba(255, 45, 111, .35);
    transition: transform .2s var(--spring);
}
.upload-pill .i { width: 22px; height: 22px; stroke-width: 2.5; }
.nav-upload:hover .upload-pill { transform: scale(1.06); }
.nav-upload:active .upload-pill { transform: scale(.94); }

/* ==========================================================================
   Feed
   ========================================================================== */
.feed {
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    overscroll-behavior: contain;
}
.feed::-webkit-scrollbar { display: none; }

.slide {
    position: relative;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow: hidden;
}
.stage {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #000;
}
.stage video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.shade {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, .45), transparent 18%),
        linear-gradient(to top, rgba(0, 0, 0, .75), rgba(0, 0, 0, .25) 30%, transparent 48%);
}

/* Top feed switch */
.top-tabs {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: 22px;
    padding: calc(14px + env(safe-area-inset-top)) 16px 14px;
    font-weight: 700;
    font-size: 16px;
    pointer-events: none;
}
.top-tabs a {
    position: relative;
    padding: 4px 0 8px;
    color: rgba(255, 255, 255, .6);
    text-shadow: 0 1px 6px rgba(0, 0, 0, .4);
    pointer-events: auto;
    transition: color .2s;
}
.top-tabs a.active { color: #fff; }
.top-tabs a.active::after {
    content: "";
    position: absolute;
    left: 50%; bottom: 0;
    width: 22px; height: 3px;
    border-radius: 3px;
    background: #fff;
    transform: translateX(-50%);
}
.top-tabs .back {
    position: absolute;
    left: 10px;
    top: calc(8px + env(safe-area-inset-top));
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    color: #fff;
}
.top-tabs .back .i { width: 28px; height: 28px; }

.sound-toggle {
    position: absolute;
    top: calc(10px + env(safe-area-inset-top));
    right: 12px;
    z-index: 6;
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .35);
    backdrop-filter: blur(12px);
    transition: background .2s, transform .2s var(--spring);
}
.sound-toggle:hover { background: rgba(0, 0, 0, .55); }
.sound-toggle:active { transform: scale(.9); }
.sound-toggle .when-unmuted, .sound-toggle.unmuted .when-muted { display: none; }
.sound-toggle.unmuted .when-unmuted { display: block; }

/* Pause indicator */
.tap-icon {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 84px; height: 84px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, .3);
    backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, .95);
    opacity: 0;
    transform: scale(1.3);
    pointer-events: none;
    transition: opacity .2s, transform .25s var(--spring);
}
.tap-icon .i { width: 38px; height: 38px; margin-left: 4px; }
.slide.paused .tap-icon { opacity: 1; transform: scale(1); }

.heart-burst {
    position: absolute;
    width: 110px; height: 110px;
    color: var(--pink);
    filter: drop-shadow(0 8px 24px rgba(255, 45, 111, .6));
    pointer-events: none;
    animation: burst .9s var(--ease) forwards;
    z-index: 3;
}
@keyframes burst {
    0%   { transform: translate(-50%, -50%) scale(.2) rotate(var(--tilt)); opacity: 0; }
    15%  { transform: translate(-50%, -50%) scale(1.15) rotate(var(--tilt)); opacity: 1; }
    30%  { transform: translate(-50%, -50%) scale(.95) rotate(var(--tilt)); }
    100% { transform: translate(-50%, -190%) scale(1.1) rotate(var(--tilt)); opacity: 0; }
}

/* Scrubbable progress */
.progress {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 4;
    height: 14px;
    display: flex;
    align-items: flex-end;
    cursor: pointer;
}
.progress::before {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: rgba(255, 255, 255, .2);
    transition: height .15s;
}
.progress-bar {
    position: relative;
    height: 2px;
    width: 0;
    background: #fff;
    transition: height .15s;
}
.progress:hover::before, .progress:hover .progress-bar { height: 5px; }

/* Caption */
.meta {
    position: absolute;
    left: 14px;
    right: 84px;
    bottom: 22px;
    z-index: 2;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}
.username {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: -.01em;
}
.username:hover { text-decoration: underline; }
.creator-badge {
    display: inline-grid;
    place-items: center;
    width: 17px; height: 17px;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    vertical-align: middle;
}
.creator-badge .i { width: 10px; height: 10px; }
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
    padding: 3px 9px;
    border-radius: 99px;
    background: var(--gradient);
    font-size: 11px;
    font-weight: 700;
    vertical-align: 2px;
    text-shadow: none;
}
.badge .i { width: 11px; height: 11px; }
.caption {
    margin: 8px 0 10px;
    font-size: 14.5px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.caption strong { font-weight: 700; }
.sound { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; }
.sound .i { width: 15px; height: 15px; }
.marquee {
    overflow: hidden;
    white-space: nowrap;
    max-width: 200px;
    mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.marquee span { display: inline-block; padding-left: 100%; animation: marquee 9s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* "Write to me" invitations */
.dm-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 10px;
    padding: 7px 14px;
    border-radius: 99px;
    background: rgba(255, 45, 111, .22);
    border: 1px solid rgba(255, 120, 170, .55);
    backdrop-filter: blur(10px);
    font-size: 13px;
    font-weight: 700;
    text-shadow: none;
    animation: dm-glow 2.6s ease-in-out infinite;
    transition: transform .2s var(--spring), background .2s;
}
.dm-pill:active { transform: scale(.95); }
@keyframes dm-glow {
    50% { box-shadow: 0 0 0 4px rgba(255, 45, 111, .15), 0 0 22px rgba(255, 45, 111, .45); }
}
.btn-dm {
    flex-direction: column;
    gap: 0;
    line-height: 1.15;
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 8px 24px rgba(217, 70, 239, .35);
}
.btn-dm small { font-size: 11px; font-weight: 600; opacity: .85; }

/* Right action rail */
.actions {
    position: absolute;
    right: 8px;
    bottom: 20px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}
.action-icon {
    display: grid;
    place-items: center;
    width: 46px; height: 46px;
    border-radius: 50%;
    transition: transform .2s var(--spring), background .2s;
}
.action-icon .i {
    width: 32px; height: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .35));
    transition: color .2s;
}
.action:hover .action-icon { transform: scale(1.08); }
.action:active .action-icon { transform: scale(.88); }
.action.like.liked .i { color: var(--pink); }
.action.like.liked .action-icon { animation: like-pop .45s var(--spring); }
@keyframes like-pop { 40% { transform: scale(1.35); } }
.action-tip .i { color: #fde68a; width: 30px; height: 30px; }

.author-avatar { position: relative; margin-bottom: 10px; }
.author-avatar .avatar { width: 50px; height: 50px; font-size: 20px; }
.follow-plus {
    position: absolute;
    left: 50%; bottom: -10px;
    display: grid;
    place-items: center;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--pink);
    color: #fff;
    transform: translateX(-50%);
    box-shadow: 0 0 0 2px var(--bg);
    transition: transform .2s var(--spring);
}
.follow-plus .i { width: 14px; height: 14px; stroke-width: 3; }
.follow-plus:hover { transform: translateX(-50%) scale(1.15); }

.disc {
    display: grid;
    place-items: center;
    width: 46px; height: 46px;
    margin-top: 4px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #1f1f23, #3f3f46, #1f1f23, #3f3f46, #1f1f23);
    box-shadow: 0 0 0 7px rgba(20, 20, 24, .85) inset;
    animation: spin 5s linear infinite;
    animation-play-state: paused;
}
.disc .avatar.xs { width: 24px; height: 24px; font-size: 10px; border: 0; }
.slide.playing .disc { animation-play-state: running; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Empty feed */
.slide-empty { display: grid; place-items: center; }
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 300px;
    text-align: center;
}
.empty-state h2 { font-size: 20px; font-weight: 800; }
.empty-state p { color: var(--muted); line-height: 1.5; margin-bottom: 8px; }
.empty-icon {
    display: grid;
    place-items: center;
    width: 72px; height: 72px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--muted);
}
.empty-icon .i { width: 32px; height: 32px; }

/* ==========================================================================
   Paywall
   ========================================================================== */
.paywall {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px 76px 140px 20px;
    overflow: hidden;
    background: hsl(var(--hue) 40% 8%);
}
.blob {
    position: absolute;
    width: 75%;
    aspect-ratio: 1;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .75;
    animation: drift 14s ease-in-out infinite alternate;
}
.blob-a { top: -10%; left: -20%; background: hsl(var(--hue) 85% 55%); }
.blob-b { bottom: 0; right: -25%; background: hsl(calc(var(--hue) + 70) 85% 50%); animation-delay: -7s; }
@keyframes drift {
    to { transform: translate(18%, 14%) scale(1.15); }
}
.paywall-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 300px;
    padding: 28px 22px 22px;
    border-radius: 24px;
    text-align: center;
    background: rgba(10, 10, 14, .45);
    border: 1px solid rgba(255, 255, 255, .14);
    backdrop-filter: blur(24px) saturate(140%);
    box-shadow: var(--shadow);
}
.paywall-icon {
    display: grid;
    place-items: center;
    width: 60px; height: 60px;
    margin-bottom: 4px;
    border-radius: 50%;
    background: var(--gradient);
    box-shadow: 0 10px 30px rgba(217, 70, 239, .45);
}
.paywall-icon .i { width: 26px; height: 26px; }
.paywall-card h2 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.paywall-card p { font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, .78); margin-bottom: 6px; }
.paywall-card .btn { width: 100%; }
.paywall-card small { font-size: 12px; color: rgba(255, 255, 255, .55); }

/* ==========================================================================
   Avatars & buttons
   ========================================================================== */
.avatar {
    position: relative;
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 48px; height: 48px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 19px;
    color: #fff;
    background: linear-gradient(135deg, hsl(var(--hue) 80% 60%), hsl(calc(var(--hue) + 50) 80% 45%));
    border: 2px solid #fff;
}
.avatar.ring { border: 0; }
.avatar.ring::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    padding: 2px;
    background: var(--gradient);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}
.avatar.xs { width: 26px; height: 26px; font-size: 11px; border-width: 0; }
.avatar.sm { width: 34px; height: 34px; font-size: 14px; border: 0; }
.avatar.xl { width: 104px; height: 104px; font-size: 42px; border: 4px solid var(--bg); }
.avatar.xl.ring { box-shadow: 0 0 0 4px var(--bg); }
.avatar.xl.ring::after { inset: -7px; padding: 3px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 22px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14.5px;
    transition: transform .15s var(--spring), filter .2s, background .2s, box-shadow .2s;
}
.btn .i { width: 18px; height: 18px; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-lg { min-height: 50px; font-size: 15.5px; border-radius: 14px; }
.btn-primary { background: var(--pink); color: #fff; box-shadow: 0 8px 24px rgba(255, 45, 111, .3); }
.btn-premium {
    background: var(--gradient);
    background-size: 150% 150%;
    color: #fff;
    box-shadow: 0 10px 30px rgba(217, 70, 239, .35);
    animation: shimmer 4s ease infinite;
}
@keyframes shimmer { 50% { background-position: 100% 100%; } }
.btn-soft { background: var(--surface-2); color: var(--text); }
.btn-soft:hover { background: var(--surface-3); filter: none; }

.icon-btn {
    display: grid;
    place-items: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    color: var(--muted);
    transition: background .2s, color .2s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* ==========================================================================
   Profile
   ========================================================================== */
.profile { height: 100%; overflow-y: auto; scrollbar-width: thin; }
.cover {
    height: 150px;
    background:
        radial-gradient(circle at 20% 30%, hsl(var(--hue) 85% 55% / .9), transparent 55%),
        radial-gradient(circle at 85% 20%, hsl(calc(var(--hue) + 70) 85% 55% / .8), transparent 50%),
        radial-gradient(circle at 60% 100%, hsl(calc(var(--hue) + 140) 85% 50% / .6), transparent 50%),
        #18181b;
    mask-image: linear-gradient(to bottom, #000 55%, transparent);
}
.profile-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: -56px;
    padding: 0 20px 20px;
    text-align: center;
}
.profile-name {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.02em;
}
.profile-name .creator-badge { width: 22px; height: 22px; }
.profile-name .creator-badge .i { width: 13px; height: 13px; }
.handle { color: var(--muted); font-size: 14px; font-weight: 500; }
.profile-stats {
    display: flex;
    gap: 6px;
    margin: 14px 0 6px;
    list-style: none;
}
.profile-stats li {
    display: flex;
    flex-direction: column;
    min-width: 84px;
    padding: 0 8px;
}
.profile-stats li + li { border-left: 1px solid var(--border); }
.profile-stats strong { font-size: 18px; font-weight: 800; }
.profile-stats span { font-size: 12.5px; color: var(--muted); }
.bio { max-width: 340px; font-size: 14px; line-height: 1.5; color: var(--text); }
.profile-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.profile-buttons .btn { min-width: 160px; }

/* Creator dashboard */
.dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 0 16px 20px;
}
.stat-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 14px 12px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    text-align: left;
    transition: background .2s, transform .2s var(--spring);
}
.stat-icon {
    display: grid;
    place-items: center;
    width: 32px; height: 32px;
    margin-bottom: 8px;
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--muted);
}
.stat-icon .i { width: 17px; height: 17px; }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat-card strong { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.stat-sub { font-size: 11.5px; color: var(--faint); }
.stat-wallet { position: relative; overflow: hidden; background: linear-gradient(135deg, rgba(255, 45, 111, .22), rgba(139, 92, 246, .22)); border-color: rgba(217, 70, 239, .3); }
.stat-wallet .stat-icon { background: var(--gradient); color: #fff; }
.stat-wallet:hover { transform: translateY(-2px); }
.stat-link { font-size: 11.5px; font-weight: 700; color: #c026d3; }

/* Subscription offer */
.sub-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0 16px 20px;
    padding: 20px;
    border-radius: 20px;
    background:
        linear-gradient(var(--bg-elevated), var(--bg-elevated)) padding-box,
        var(--gradient) border-box;
    border: 1.5px solid transparent;
    overflow: hidden;
}
.sub-card::before {
    content: "";
    position: absolute;
    top: -60%; right: -30%;
    width: 70%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 70, 239, .25), transparent 70%);
    pointer-events: none;
}
.sub-card.is-active { border-color: var(--border); background: var(--surface); }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #c026d3;
}
.eyebrow .i { width: 14px; height: 14px; }
.sub-price { margin: 6px 0 12px; font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.sub-price small { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.perks { list-style: none; display: grid; gap: 8px; font-size: 14px; color: var(--text); }
.perks li { display: flex; align-items: center; gap: 10px; }
.perks .i { width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: rgba(52, 211, 153, .15); color: var(--green); stroke-width: 3; }

/* Tabs & grid */
.tabs {
    position: sticky;
    top: 0;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.tab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    font-weight: 700;
    font-size: 14px;
    color: var(--faint);
    transition: color .2s;
}
.tab .i { width: 18px; height: 18px; }
.tab-count {
    min-width: 20px;
    padding: 1px 7px;
    border-radius: 99px;
    background: var(--surface-2);
    font-size: 11.5px;
    font-weight: 800;
}
.tab.active .tab-count { background: var(--gradient); color: #fff; }
@media (max-width: 420px) {
    .tab { gap: 5px; padding: 14px 4px; font-size: 13px; }
    .tab .i { display: none; }
}
.tab.active { color: var(--text); }
.tab.active::after {
    content: "";
    position: absolute;
    left: 20%; right: 20%; bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: var(--text);
}
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.grid-item {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--bg-elevated);
}
.grid-item video { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.grid-item:hover video { transform: scale(1.05); }
.grid-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent 40%);
    pointer-events: none;
}
.grid-locked {
    width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background:
        radial-gradient(circle at 30% 25%, hsl(var(--hue) 75% 45% / .8), transparent 60%),
        radial-gradient(circle at 75% 80%, hsl(calc(var(--hue) + 70) 75% 40% / .8), transparent 60%),
        #111;
}
.grid-locked { color: #fff; }
.grid-locked .i { width: 26px; height: 26px; }
.grid-locked small {
    padding: 3px 10px;
    border-radius: 99px;
    background: rgba(0, 0, 0, .35);
    backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 700;
}
.grid-badge {
    position: absolute;
    top: 6px; right: 6px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--gradient);
}
.grid-badge .i { width: 12px; height: 12px; }
.grid-views {
    position: absolute;
    left: 8px; bottom: 6px;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    font-weight: 700;
}
.grid-views .i { width: 12px; height: 12px; }
.grid-views { color: #fff; }
.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 56px 16px;
    text-align: center;
    color: var(--muted);
    font-weight: 500;
}
.empty .i { width: 32px; height: 32px; color: var(--faint); }

/* ==========================================================================
   Sheets (bottom sheets on mobile, centered dialogs on desktop)
   ========================================================================== */
.sheet-backdrop {
    position: absolute;
    inset: 0;
    z-index: 20;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(4px);
    animation: fade-in .2s ease;
}
@keyframes fade-in { from { opacity: 0; } }
.sheet {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 21;
    height: 70%;
    display: flex;
    flex-direction: column;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
    box-shadow: var(--shadow);
    transform: translateY(105%);
    visibility: hidden;
    transition: transform .35s var(--ease), visibility 0s .35s;
}
.sheet.open { transform: none; visibility: visible; transition: transform .35s var(--ease); }
.sheet-tall { height: 90%; }
.sheet-auto { height: auto; max-height: 85%; }
.sheet-handle {
    width: 36px; height: 4px;
    margin: 10px auto 0;
    border-radius: 4px;
    background: var(--surface-3);
}
.sheet-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 52px 14px;
    border-bottom: 1px solid var(--border);
}
.sheet-head h3 { font-size: 15.5px; font-weight: 800; }
.sheet-head .icon-btn { position: absolute; right: 12px; top: 4px; }
.section-label {
    padding: 0 2px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--faint);
}

/* Comments */
.comment-list { flex: 1; overflow-y: auto; list-style: none; padding: 8px 18px; }
.comment-list li { display: flex; gap: 12px; padding: 12px 0; animation: rise .3s var(--ease) both; }
.comment-list .who { font-size: 13px; font-weight: 600; color: var(--muted); }
.comment-list .body { font-size: 14.5px; line-height: 1.4; margin-top: 2px; word-break: break-word; }
.comment-list .when { font-size: 12px; color: var(--faint); margin-top: 4px; }
.comment-list .empty-row { justify-content: center; color: var(--muted); padding: 40px 0; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.skeleton { display: flex; gap: 12px; padding: 12px 0; }
.skeleton i {
    display: block;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
    background-size: 200% 100%;
    animation: shine 1.2s linear infinite;
}
.skeleton .sk-avatar { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; }
.skeleton .sk-lines { flex: 1; display: grid; gap: 8px; }
.skeleton .sk-line { height: 11px; }
.skeleton .sk-line.short { width: 40%; }
@keyframes shine { to { background-position: -200% 0; } }

.comment-form {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
}
.comment-form input {
    flex: 1;
    min-width: 0;
    height: 42px;
    padding: 0 16px;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 14.5px;
    outline: none;
    transition: border-color .2s, background .2s;
}
.comment-form input:focus { border-color: rgba(255, 45, 111, .6); background: var(--surface-2); }
.send {
    display: grid;
    place-items: center;
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--pink);
    color: #fff;
    transition: transform .2s var(--spring);
}
.send .i { width: 18px; height: 18px; }
.send:active { transform: scale(.9); }

/* Amount pickers */
.amounts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 10px;
}
.amount {
    padding: 16px 8px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-weight: 800;
    font-size: 15px;
    transition: transform .15s var(--spring), border-color .2s, background .2s;
}
.amount:hover { border-color: rgba(255, 45, 111, .55); background: rgba(255, 45, 111, .08); }
.amount:active { transform: scale(.95); }

#tip-sheet .amounts { padding: 0 18px calc(22px + env(safe-area-inset-bottom)); }
.tip-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 24px 18px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}
.tip-icon {
    display: grid;
    place-items: center;
    width: 56px; height: 56px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    color: #fff;
    box-shadow: 0 10px 30px rgba(249, 115, 22, .35);
}
.tip-icon .i { width: 28px; height: 28px; }

/* Wallet */
.wallet-scroll { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.wallet-scroll > * { flex-shrink: 0; } /* scroll instead of squashing the balance card */
.balance-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 22px;
    border-radius: 20px;
    background: var(--gradient);
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(217, 70, 239, .3);
}
.balance-card::after {
    content: "";
    position: absolute;
    right: -40px; top: -40px;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
}
.balance-card span { font-size: 13px; font-weight: 600; opacity: .85; }
.balance-card strong { font-size: 34px; font-weight: 800; letter-spacing: -.03em; }
.balance-card small { display: flex; align-items: center; gap: 6px; font-size: 12px; opacity: .85; }
.balance-card small .i { width: 14px; height: 14px; }
.tx-list { list-style: none; }
.tx-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    animation: rise .3s var(--ease) both;
}
.tx-icon {
    display: grid;
    place-items: center;
    width: 38px; height: 38px;
    border-radius: 12px;
    background: var(--surface-2);
    flex-shrink: 0;
}
.tx-icon svg { width: 18px; height: 18px; }
.tx-main { flex: 1; min-width: 0; }
.tx-main div { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-main small { color: var(--faint); font-size: 12px; }
.tx-list .in { color: var(--green); font-weight: 800; }
.tx-list .out { color: var(--text); font-weight: 800; }
.tx-list .empty-row { justify-content: center; color: var(--muted); border: 0; }

/* Credit packs */
.packs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pack {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 18px 10px 14px;
    border-radius: 16px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    transition: transform .15s var(--spring), border-color .2s, background .2s;
}
.pack:hover { border-color: rgba(255, 45, 111, .55); background: rgba(255, 45, 111, .06); }
.pack:active { transform: scale(.96); }
.pack.featured {
    background:
        linear-gradient(var(--bg-elevated), var(--bg-elevated)) padding-box,
        var(--gradient) border-box;
    border-color: transparent;
}
.pack-badge {
    position: absolute;
    top: -9px;
    padding: 2px 10px;
    border-radius: 99px;
    background: var(--gradient);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .02em;
    white-space: nowrap;
}
.pack-credits { display: flex; align-items: center; gap: 6px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.pack-credits .i { width: 20px; height: 20px; color: #fbbf24; }
.pack-bonus { font-size: 12px; font-weight: 700; color: var(--green); }
.pack-price {
    margin-top: 6px;
    padding: 5px 14px;
    border-radius: 99px;
    background: var(--surface-2);
    font-size: 13.5px;
    font-weight: 700;
}
.pack.featured .pack-price { background: var(--gradient); }

.amount { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.amount .i, .send-btn span .i, .nav-balance .i { color: #fbbf24; }
.amount .i { width: 18px; height: 18px; }
.send-btn span { display: inline-flex; align-items: center; gap: 3px; }
.send-btn span .i { width: 14px; height: 14px; color: #fff; }
.balance-card strong { display: flex; align-items: center; gap: 10px; }
.balance-card strong .i { width: 30px; height: 30px; }
.balance-card strong span { font-size: inherit; font-weight: inherit; opacity: 1; }
.revenue-row strong small { color: var(--faint); font-weight: 600; font-size: 12px; margin-left: 4px; }
.stat-wallet .stat-icon .i, .confirm-icon .i { color: #fff; }

/* Confirm dialog */
.confirm {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 22px calc(22px + env(safe-area-inset-bottom));
    text-align: center;
}
.confirm-icon {
    display: grid;
    place-items: center;
    width: 60px; height: 60px;
    margin-bottom: 6px;
    border-radius: 50%;
    background: var(--gradient);
    box-shadow: 0 10px 30px rgba(217, 70, 239, .4);
}
.confirm-icon .i { width: 26px; height: 26px; }
.confirm h3 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.confirm p { color: var(--muted); font-size: 14px; line-height: 1.45; }
.confirm .confirm-amount { margin: 8px 0 4px; color: var(--text); font-size: 36px; font-weight: 800; letter-spacing: -.03em; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; width: 100%; margin-top: 8px; }
.confirm-actions .btn { min-height: 50px; }
.confirm small { margin-top: 6px; color: var(--faint); font-size: 12.5px; }

/* Forms */
.stack-form, .upload-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 18px;
    overflow-y: auto;
}
.stack-form label { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; font-weight: 700; }
.stack-form small { color: var(--faint); font-weight: 500; font-size: 12.5px; line-height: 1.4; }
.stack-form textarea, .upload-form textarea, .input-prefix, .input-suffix {
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    transition: border-color .2s, background .2s;
}
.stack-form textarea, .upload-form textarea { padding: 12px 14px; resize: none; font-weight: 500; outline: none; }
.stack-form textarea:focus, .upload-form textarea:focus,
.input-prefix:focus-within, .input-suffix:focus-within { border-color: rgba(255, 45, 111, .6); background: var(--surface-2); }
.input-prefix, .input-suffix { display: flex; align-items: center; overflow: hidden; }
.input-prefix input, .input-suffix input {
    flex: 1;
    min-width: 0;
    height: 46px;
    padding: 0 14px;
    border: 0;
    background: none;
    font-weight: 600;
    outline: none;
}
.input-prefix > span, .input-suffix > span { padding: 0 14px; color: var(--faint); font-weight: 600; white-space: nowrap; }
.input-prefix > span { padding-right: 0; }
.form-error {
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(225, 29, 72, .08);
    color: #e11d48;
    font-size: 13.5px;
    font-weight: 600;
    text-align: center;
}

.dropzone {
    position: relative;
    flex: 1;
    min-height: 210px;
    display: grid;
    place-items: center;
    border: 2px dashed var(--surface-3);
    border-radius: 18px;
    background: var(--surface);
    cursor: pointer;
    overflow: hidden;
    transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--pink); background: rgba(255, 45, 111, .06); }
.dropzone video { width: 100%; height: 100%; max-height: 380px; object-fit: contain; background: #000; }
.dropzone-label { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 16px; }
.dropzone-label strong { font-size: 16px; }
.dropzone-label small { color: var(--faint); font-size: 12.5px; }
.dropzone-icon {
    display: grid;
    place-items: center;
    width: 60px; height: 60px;
    margin-bottom: 6px;
    border-radius: 18px;
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 10px 30px rgba(255, 45, 111, .3);
}
.dropzone-icon .i { width: 28px; height: 28px; }

.visibility { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.visibility input { position: absolute; opacity: 0; pointer-events: none; }
.visibility label > span {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 6px;
    border-radius: 14px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.visibility .i { width: 22px; height: 22px; margin-bottom: 2px; color: var(--muted); }
.visibility strong { font-size: 13.5px; }
.visibility small { font-size: 11px; color: var(--faint); font-weight: 500; }
.visibility input:checked + span { border-color: var(--pink); background: rgba(255, 45, 111, .1); }
.visibility input:checked + span .i { color: var(--pink); }
.visibility input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ==========================================================================
   Messages — inbox and conversation
   ========================================================================== */
.nav-icon { position: relative; display: grid; }
.nav-badge {
    position: absolute;
    top: -5px; right: -9px;
    min-width: 18px; height: 18px;
    padding: 0 5px;
    border-radius: 99px;
    background: var(--pink);
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--bg);
}
.nav-desktop { display: none; }

.inbox { height: 100%; overflow-y: auto; }
.page-head { padding: calc(24px + env(safe-area-inset-top)) 20px 12px; }
.page-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.page-head p { margin-top: 4px; color: var(--muted); font-size: 14px; }
.conv-list { list-style: none; padding: 4px 8px 16px; }
.conv {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 14px;
    transition: background .2s;
}
.conv:hover { background: var(--surface); }
.conv .avatar { width: 54px; height: 54px; border: 0; }
.conv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.conv-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.conv-top strong { font-size: 15px; font-weight: 700; }
.conv-top time { font-size: 12px; color: var(--faint); flex-shrink: 0; }
.conv-preview { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv.unread .conv-top strong, .conv.unread .conv-preview { color: var(--text); font-weight: 700; }
.conv-badge {
    min-width: 22px; height: 22px;
    padding: 0 7px;
    border-radius: 99px;
    background: var(--gradient);
    font-size: 12px;
    font-weight: 800;
    line-height: 22px;
    text-align: center;
}
.inbox-empty { margin: 60px auto; }

.thread { height: 100%; display: flex; flex-direction: column; }
.thread-head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: calc(10px + env(safe-area-inset-top)) 12px 10px 6px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(16px);
}
.thread-head .icon-btn .i { width: 24px; height: 24px; }
.thread-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.thread-who > span:not(.avatar) { display: flex; flex-direction: column; min-width: 0; }
.thread-who strong { font-size: 15.5px; font-weight: 800; }
.thread-who small { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.thread-who small .i { width: 13px; height: 13px; color: #c026d3; }
.thread-who .avatar.sm { width: 40px; height: 40px; }

.thread-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 14px 20px;
}
.thread-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 0 28px;
    text-align: center;
}
.thread-intro strong { font-size: 18px; font-weight: 800; margin-top: 6px; }
.thread-intro p { color: var(--muted); font-size: 14px; }
.thread-intro .avatar.xl { width: 88px; height: 88px; font-size: 36px; border: 0; }

.msg {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: min(78%, 420px);
    animation: rise .25s var(--ease) both;
}
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg.theirs { align-self: flex-start; align-items: flex-start; }
.msg-text {
    padding: 10px 14px;
    border-radius: 20px;
    font-size: 14.5px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}
.msg.mine .msg-text { background: var(--gradient); color: #fff; border-bottom-right-radius: 6px; }
.msg.theirs .msg-text { background: var(--surface-2); border-bottom-left-radius: 6px; }
.msg-media { border-radius: 18px; overflow: hidden; background: var(--bg-elevated); }
.msg-media img, .msg-media video { display: block; max-width: 100%; max-height: 360px; }
.msg-locked {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 240px;
    aspect-ratio: 4 / 5;
    color: #fff;
    background:
        radial-gradient(circle at 25% 20%, rgba(255, 45, 111, .75), transparent 60%),
        radial-gradient(circle at 80% 85%, rgba(139, 92, 246, .75), transparent 60%),
        #18181b;
    overflow: hidden;
}
.msg-locked::before {
    content: "";
    position: absolute;
    inset: 0;
    backdrop-filter: blur(20px);
    background: rgba(0, 0, 0, .15);
}
.msg-locked > * { position: relative; }
.msg-lock-icon {
    display: grid;
    place-items: center;
    width: 54px; height: 54px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .35);
    border: 1px solid rgba(255, 255, 255, .25);
}
.msg-lock-icon .i { width: 24px; height: 24px; }
.msg-locked strong { font-size: 15px; margin-top: 4px; }
.msg-unlock {
    margin-top: 6px;
    padding: 9px 18px;
    border-radius: 99px;
    background: #fff;
    color: #09090b;
    font-size: 13.5px;
    font-weight: 800;
    transition: transform .2s var(--spring);
}
.msg-locked:hover .msg-unlock { transform: scale(1.05); }
.msg-meta { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; font-size: 11.5px; color: var(--faint); font-weight: 500; }
.msg-meta .i { width: 11px; height: 11px; }

.composer {
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: var(--bg);
}
.composer-row { display: flex; align-items: center; gap: 8px; }
.composer-row input[name="body"] {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 16px;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 14.5px;
    outline: none;
    transition: border-color .2s, background .2s;
}
.composer-row input[name="body"]:focus { border-color: rgba(255, 45, 111, .6); background: var(--surface-2); }
.attach { width: 44px; height: 44px; cursor: pointer; color: var(--text); background: var(--surface); }
.attach .i { width: 21px; height: 21px; }
.send-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 44px;
    min-width: 44px;
    padding: 0 13px;
    border-radius: 99px;
    background: var(--gradient);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 6px 18px rgba(217, 70, 239, .35);
    transition: transform .2s var(--spring), opacity .2s;
}
.send-btn .i { width: 18px; height: 18px; }
.send-btn:active { transform: scale(.92); }
.send-btn:disabled { opacity: .5; }
.composer-attachment {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
}
.attachment-thumb { width: 56px; height: 56px; border-radius: 12px; overflow: hidden; flex-shrink: 0; background: #000; }
.attachment-thumb img, .attachment-thumb video { width: 100%; height: 100%; object-fit: cover; }
.attachment-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.attachment-info strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lock-price { border-radius: 10px; }
.lock-price > .i { width: 16px; height: 16px; margin-left: 10px; color: #c026d3; }
.lock-price input { height: 36px; font-size: 13.5px; padding: 0 10px; }

.composer-locked {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 10px 12px calc(10px + env(safe-area-inset-bottom));
    padding: 14px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 13px;
    color: var(--muted);
    line-height: 1.45;
}
.composer-locked .i { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: #c026d3; }
.composer-locked strong { display: block; color: var(--text); font-size: 14px; }

/* Revenue breakdown on the creator dashboard */
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 14px; font-size: 15px; font-weight: 800; }
.section-title small { font-size: 12px; color: var(--faint); font-weight: 500; }
.revenue {
    margin: 0 16px 20px;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
}
.revenue-row {
    display: grid;
    grid-template-columns: 10px 1fr auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 6px;
    padding: 8px 0;
}
.revenue-dot { width: 10px; height: 10px; border-radius: 50%; }
.revenue-label { font-size: 14px; font-weight: 600; color: var(--text); }
.revenue-row strong { font-size: 14px; font-weight: 800; }
.revenue-bar { grid-column: 2 / 4; height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.revenue-bar i { display: block; height: 100%; min-width: 0; border-radius: 6px; transition: width .6s var(--ease); }
.dot-subscription { background: #d946ef; }
.dot-ppv { background: #ff2d6f; }
.dot-message { background: #22d3ee; }
.dot-ppv_message { background: #8b5cf6; }
.dot-tip { background: #fbbf24; }
.revenue-tip {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(240, 171, 252, .08);
    color: #a21caf;
    font-size: 13px;
    line-height: 1.45;
}
.revenue-tip .i { width: 16px; height: 16px; margin-top: 1px; }
.revenue-tip .link { font-size: 13px; margin-left: 4px; }
.stat-card[data-open-settings] { cursor: pointer; }
.stat-card[data-open-settings]:hover { background: var(--surface-2); }

/* ==========================================================================
   Pages — creator studio and settings
   ========================================================================== */
.page { height: 100%; overflow-y: auto; padding-bottom: 32px; }
.page .page-head p { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 99px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.status.on { background: rgba(52, 211, 153, .12); color: var(--green); }
.status.on::before { background: var(--green); box-shadow: 0 0 8px var(--green); }

.panel {
    margin: 0 16px 16px;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
}
.panel-empty { color: var(--faint); font-size: 14px; padding: 8px 0; }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 4px 16px 16px; }
.kpi {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    min-width: 0;
}
.kpi-label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.kpi-label .i { width: 15px; height: 15px; }
.kpi strong { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.kpi small { font-size: 12px; color: var(--faint); }
.kpi-main {
    grid-column: 1 / -1;
    background: var(--gradient);
    border: 0;
    box-shadow: 0 16px 40px rgba(217, 70, 239, .25);
}
.kpi-main .kpi-label, .kpi-main small { color: rgba(255, 255, 255, .85); }
.kpis .kpi:last-child { grid-column: 1 / -1; }
.kpi-main strong { font-size: 30px; }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 18px; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.bar {
    width: 100%;
    max-width: 28px;
    border-radius: 6px 6px 3px 3px;
    background: var(--gradient);
    transition: height .6s var(--ease);
}
.bar-col:hover .bar { filter: brightness(1.2); }
.bar-value { font-size: 10.5px; font-weight: 700; color: var(--muted); min-height: 13px; }
.bar-day { font-size: 10.5px; color: var(--faint); font-weight: 600; }

.stack-form.compact { padding: 0; overflow: visible; }

.content-list { list-style: none; display: grid; gap: 4px; }
.content-row {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 6px 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.content-row:last-child { border-bottom: 0; }
.content-thumb { grid-row: span 2; width: 64px; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: #000; }
.content-thumb video { width: 100%; height: 100%; object-fit: cover; }
.content-info { min-width: 0; }
.content-caption { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.content-stats span { display: inline-flex; align-items: center; gap: 4px; }
.content-stats .i { width: 13px; height: 13px; }
.content-stats .earned { color: #b45309; font-weight: 700; }
.content-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.content-edit select {
    height: 36px;
    padding: 0 30px 0 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
    color: var(--text);
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    appearance: none;
    cursor: pointer;
}
.price-input { width: 104px; border-radius: 10px; }
.price-input input { height: 36px; font-size: 13.5px; padding: 0 0 0 10px; }
.price-input > span { padding: 0 10px 0 4px; font-size: 12.5px; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.icon-btn.danger:hover { background: rgba(255, 45, 111, .15); color: #e11d48; }
.icon-btn .i { width: 18px; height: 18px; }

.people { list-style: none; display: grid; gap: 2px; }
.people li { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.people .revenue-dot { margin: 0 12px; }
.people-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.people-main strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people-main small { font-size: 12px; color: var(--faint); }
.people-amount { font-size: 13.5px; font-weight: 800; white-space: nowrap; }
.people-amount.in { color: var(--green); }
.ranked { counter-reset: rank; }
.ranked li::before {
    counter-increment: rank;
    content: counter(rank);
    width: 18px;
    font-size: 13px;
    font-weight: 800;
    color: var(--faint);
    text-align: center;
}
.ranked li:first-child::before { color: #fbbf24; }

/* Monetization onboarding */
a.status { color: #b45309; background: rgba(251, 191, 36, .16); text-decoration: none; }
a.status::before { background: #fbbf24; }
a.status:hover { background: rgba(251, 191, 36, .2); }
.status-action { font-size: 12.5px; color: var(--faint); }
.status-action:hover { color: #e11d48; }
.monetize {
    position: relative;
    display: grid;
    gap: 18px;
    margin: 0 16px 16px;
    padding: 22px;
    border-radius: 20px;
    background:
        linear-gradient(var(--bg-elevated), var(--bg-elevated)) padding-box,
        var(--gradient) border-box;
    border: 1.5px solid transparent;
    overflow: hidden;
    scroll-margin-top: 16px;
}
.monetize::before {
    content: "";
    position: absolute;
    top: -40%; right: -15%;
    width: 50%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 70, 239, .22), transparent 70%);
    pointer-events: none;
}
.monetize-intro { display: flex; gap: 14px; align-items: flex-start; }
.monetize-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 48px; height: 48px;
    border-radius: 14px;
    background: var(--gradient);
    box-shadow: 0 10px 30px rgba(217, 70, 239, .4);
}
.monetize-icon .i { width: 24px; height: 24px; }
.monetize h2 { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.monetize-intro p { margin-top: 4px; font-size: 14px; color: var(--muted); line-height: 1.5; }
.monetize-steps { list-style: none; display: grid; gap: 10px; }
.monetize-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: var(--muted); }
.monetize-steps .i { width: 18px; height: 18px; margin-top: 1px; color: #c026d3; flex-shrink: 0; }
.monetize-steps strong { display: block; color: var(--text); font-size: 14px; }
.monetize-form { display: grid; gap: 14px; }
.monetize-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 700; }
.monetize-form small { font-size: 12px; color: var(--faint); font-weight: 500; }

/* Withdrawals */
.withdraw-summary {
    display: grid;
    gap: 14px;
    padding: 16px;
    margin-bottom: 8px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(52, 211, 153, .1), rgba(34, 211, 238, .08));
    border: 1px solid rgba(52, 211, 153, .25);
}
.withdraw-available { display: flex; flex-direction: column; gap: 2px; }
.withdraw-available strong { font-size: 30px; font-weight: 800; letter-spacing: -.03em; color: var(--green); }
.withdraw-available small, .withdraw-progress small { font-size: 12.5px; color: var(--muted); }
.withdraw-progress { display: grid; gap: 6px; }
.withdrawal-list li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.withdrawal-list li:last-child { border-bottom: 0; }
.withdrawal-list strong small { color: var(--faint); font-weight: 600; }
.withdrawal-list .tx-icon .i { width: 18px; height: 18px; color: var(--muted); }
.pill { padding: 3px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.pill-pending { background: rgba(251, 191, 36, .18); color: #b45309; }
.pill-paid { background: rgba(52, 211, 153, .15); color: var(--green); }
.pill-cancelled, .pill-rejected { background: var(--surface-2); color: var(--faint); }

.withdraw-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 20px;
    border-radius: 18px;
    text-align: center;
    background: linear-gradient(135deg, #059669, #0891b2);
    box-shadow: 0 16px 40px rgba(8, 145, 178, .3);
}
.withdraw-hero span { font-size: 13px; font-weight: 600; opacity: .85; }
.withdraw-hero strong { font-size: 32px; font-weight: 800; letter-spacing: -.03em; }
.stack-form .withdraw-hero small { font-size: 12px; color: rgba(255, 255, 255, .85); }
.withdraw-note {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(251, 191, 36, .14);
    color: #92400e;
    font-size: 13px;
    line-height: 1.45;
}
.withdraw-note .i { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.max-btn {
    margin-right: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    background: var(--surface-3);
    font-size: 12.5px;
    font-weight: 800;
}
#withdraw-preview { color: var(--green); font-weight: 600; }
#withdraw-preview.invalid { color: #e11d48; }
.text-input {
    height: 46px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-weight: 600;
    outline: none;
    transition: border-color .2s, background .2s;
}
.text-input:focus { border-color: rgba(255, 45, 111, .6); background: var(--surface-2); }
.payout-methods { grid-template-columns: 1fr 1fr; }
.withdraw-legal { text-align: center; }
.earned-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(52, 211, 153, .1);
    border: 1px solid rgba(52, 211, 153, .25);
    font-size: 13px;
    color: var(--text);
}
.earned-strip strong { color: var(--green); }
.earned-strip .link { color: var(--green); white-space: nowrap; }
.link-row-meta { margin-left: auto; font-style: normal; font-size: 12.5px; color: var(--green); font-weight: 700; }
.link-row-meta + span { margin-left: 8px !important; }

/* Settings */
.settings-avatar { display: flex; align-items: center; gap: 16px; }
.settings-avatar .avatar.xl { width: 72px; height: 72px; font-size: 30px; border: 0; }
.settings-avatar small { color: var(--faint); font-size: 13px; }
.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}
.switch-row:last-child { border-bottom: 0; padding-bottom: 0; }
.switch-row > span { display: flex; flex-direction: column; gap: 2px; }
.switch-row strong { font-size: 14.5px; }
.switch-row small { font-size: 12.5px; color: var(--faint); }
.switch {
    position: relative;
    flex-shrink: 0;
    width: 46px; height: 28px;
    border-radius: 99px;
    background: var(--surface-3);
    appearance: none;
    cursor: pointer;
    transition: background .2s;
}
.switch::after {
    content: "";
    position: absolute;
    top: 3px; left: 3px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
    transition: transform .25s var(--spring);
}
.switch:checked { background: var(--pink); }
.switch:checked::after { transform: translateX(18px); }
.settings-credits { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.settings-credits > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.settings-credits strong { font-size: 19px; font-weight: 800; }
.settings-credits small { font-size: 12.5px; color: var(--faint); }
.settings-credits-icon {
    display: grid;
    place-items: center;
    width: 44px; height: 44px;
    border-radius: 14px;
    background: rgba(251, 191, 36, .14);
    color: #fbbf24;
}
.settings-credits .btn { min-height: 40px; padding: 0 16px; font-size: 13.5px; }
.link-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 0 0;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text);
    text-align: left;
}
.link-row + .link-row { padding-top: 12px; }
.link-row .i { width: 18px; height: 18px; color: var(--muted); }
.link-row span { margin-left: auto; color: var(--faint); font-size: 20px; line-height: 1; }
.link-row:hover { color: #c026d3; }
.settings-meta { font-size: 13px; color: var(--faint); margin-bottom: 14px; }
.danger-zone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 45, 111, .3);
    background: rgba(255, 45, 111, .06);
}
.danger-zone > div { display: flex; flex-direction: column; gap: 2px; }
.danger-zone strong { font-size: 14.5px; color: #e11d48; }
.danger-zone small { font-size: 12.5px; color: var(--muted); }
.btn-danger { background: #e11d48; color: #fff; box-shadow: 0 8px 24px rgba(225, 29, 72, .3); }
.btn-danger .i { width: 16px; height: 16px; }
.danger-zone .btn { flex-shrink: 0; min-height: 40px; font-size: 13.5px; }
.confirm-sheet-danger, #confirm-sheet.is-danger .confirm-icon { background: #e11d48; box-shadow: 0 10px 30px rgba(225, 29, 72, .4); }
.settings-foot { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 8px 16px 0; font-size: 12.5px; color: var(--faint); }
.settings-foot .i { width: 14px; height: 14px; }

/* ==========================================================================
   Sign in
   ========================================================================== */
.auth-wall {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 32px 24px;
    text-align: center;
}
.auth-wall-icon {
    display: grid;
    place-items: center;
    width: 88px; height: 88px;
    margin-bottom: 6px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--muted);
}
.auth-wall-icon .i { width: 40px; height: 40px; }
.auth-wall-logo .logo-svg { width: 84px; height: 84px; margin-bottom: 4px; }
.auth-sheet-logo { display: flex; justify-content: center; }
.auth-sheet-logo .logo-svg { width: 52px; height: 52px; }
.auth-wall h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.auth-wall p { max-width: 340px; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.auth-wall .btn { min-width: 240px; margin-top: 8px; }
.auth-switch { font-size: 14px; color: var(--muted); text-align: center; }
.auth-switch .link { font-size: 14px; color: var(--pink); }
.auth-lead { font-size: 20px; font-weight: 800; text-align: center; letter-spacing: -.02em; }
.auth-form { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
.auth-demo { text-align: center; padding: 10px; border-radius: 10px; background: rgba(34, 211, 238, .08); color: var(--cyan) !important; }
.auth-demo strong { color: var(--text); }
.check-row { flex-direction: row !important; align-items: flex-start; gap: 10px !important; font-weight: 500 !important; color: var(--muted); cursor: pointer; }
.check-row input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--pink); flex-shrink: 0; }
.comment-login {
    flex: 1;
    height: 44px;
    border-radius: 99px;
    background: var(--pink);
    color: #fff;
    font-weight: 700;
}
.nav-login { display: none; }
.logout-row { padding-top: 0; margin-bottom: 4px; }

/* ==========================================================================
   Toast
   ========================================================================== */
.toast {
    position: absolute;
    left: 50%;
    top: calc(16px + env(safe-area-inset-top));
    z-index: 40;
    max-width: calc(100% - 32px);
    padding: 11px 18px;
    border-radius: 99px;
    background: rgba(22, 24, 35, .94);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    box-shadow: var(--shadow);
    transform: translate(-50%, -150%);
    opacity: 0;
    pointer-events: none;
    transition: transform .35s var(--spring), opacity .25s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.error { background: #e11d48; color: #fff; }

/* ==========================================================================
   TikTok-style details: nav, feed bar and rail, light profile
   ========================================================================== */
.avatar.has-photo { background: #222; border-color: transparent; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.avatar.hero { width: 112px; height: 112px; font-size: 44px; border: 0; }

/* Bottom navigation (phones) */
@media (max-width: 899px) {
    .nav { background: #fff; border-top: 1px solid rgba(22, 24, 35, .12); backdrop-filter: none; justify-content: space-between; padding-left: 6px; padding-right: 6px; }
    .nav-item { flex: 1; min-width: 0; gap: 2px; font-size: 10.5px; font-weight: 600; color: rgba(22, 24, 35, .72); }
    .nav-item .i { width: 27px; height: 27px; stroke-width: 1.8; }
    .nav-item.active { color: #161823; }
    .nav-upload { flex: 1.1; }
    .upload-pill {
        width: 46px; height: 30px;
        border-radius: 9px;
        background: #161823;
        color: #fff;
        box-shadow: -3.5px 0 0 #25f4ee, 3.5px 0 0 #fe2c55;
    }
    .upload-pill .i { width: 20px; height: 20px; stroke-width: 3; }
    .nav-badge { top: -4px; right: -10px; background: #fe2c55; box-shadow: 0 0 0 2px #fff; }

    /* Black bottom bar over the video feed, like TikTok */
    .page-feed .nav, .page-following .nav { background: #000; border-top-color: rgba(255, 255, 255, .1); }
    .page-feed .nav-item, .page-following .nav-item { color: rgba(255, 255, 255, .72); }
    .page-feed .nav-item.active, .page-following .nav-item.active { color: #fff; }
    .page-feed .upload-pill, .page-following .upload-pill { background: #fff; color: #000; }
    .page-feed .nav-badge, .page-following .nav-badge { box-shadow: 0 0 0 2px #000; }
}

/* Feed top bar: sound · Suivis · Pour toi · search */
.top-tabs { align-items: center; }
.top-tabs a { font-size: 17px; }
.top-tabs .sound-toggle, .top-tabs .top-search {
    position: absolute;
    top: calc(8px + env(safe-area-inset-top));
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    color: #fff;
    pointer-events: auto;
    background: none;
    backdrop-filter: none;
    padding: 0;
}
.top-tabs .sound-toggle { left: 10px; right: auto; }
.top-tabs .top-search { right: 10px; }
.top-tabs .sound-toggle .i, .top-tabs .top-search .i { width: 26px; height: 26px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .4)); }
.top-tabs .top-search::after { display: none; }

/* Action rail: white filled icons like TikTok */
.action-icon .i { width: 36px; height: 36px; color: #fff; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .35)); }
.action .count { font-size: 12.5px; font-weight: 700; }
.action.like.liked .i { color: #fe2c55; }
.action.bookmark.saved .i { color: #facd00; }
.action.bookmark.saved .action-icon { animation: like-pop .45s var(--spring); }
.action-tip .i { width: 31px; height: 31px; color: #fde68a; }
.follow-plus { background: #fe2c55; }

/* "Recherche · #hashtag" bar at the bottom of a video */
.search-hint {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 12px;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(8px);
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, .92);
}
.search-hint span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-hint .i { width: 18px; height: 18px; flex-shrink: 0; }
.slide .meta { bottom: 52px; }
.slide .actions { bottom: 52px; }
.slide .progress { bottom: 40px; }
.paywall { padding-bottom: 170px; }

/* ---------- Profile, light theme ---------- */
.page-profile .main {
    --bg: #fff;
    --bg-elevated: #f8f8f8;
    --surface: rgba(22, 24, 35, .04);
    --surface-2: rgba(22, 24, 35, .07);
    --surface-3: rgba(22, 24, 35, .12);
    --border: rgba(22, 24, 35, .1);
    --text: #161823;
    --muted: rgba(22, 24, 35, .6);
    --faint: rgba(22, 24, 35, .45);
    background: var(--bg);
    color: var(--text);
    color-scheme: light;
}
.page-profile .main .btn-soft { background: rgba(22, 24, 35, .06); }
.page-profile .main .btn-primary { background: #fe2c55; box-shadow: none; }
.page-profile .main .eyebrow { color: #c026d3; }
.page-profile .main .perks li { color: rgba(22, 24, 35, .8); }
.page-profile .main .sub-card.is-active { background: var(--bg-elevated); }

.profile-topbar {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: calc(8px + env(safe-area-inset-top)) 10px 6px;
    background: var(--bg);
}
.profile-topbar .icon-btn { width: 42px; height: 42px; color: var(--text); }
.profile-topbar .icon-btn .i { width: 26px; height: 26px; stroke-width: 1.8; }
.topbar-right { display: flex; align-items: center; gap: 2px; }
.topbar-title { flex: 1; text-align: center; font-weight: 800; font-size: 16px; }
.coin-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 12px;
    margin-right: 4px;
    border-radius: 99px;
    background: rgba(250, 205, 0, .16);
    font-size: 13.5px;
    font-weight: 800;
}
.coin-chip .i { width: 17px; height: 17px; color: #e0a800; }

.profile-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 12px;
    padding: 16px 18px 14px;
}
.hero-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
    word-break: break-word;
}
.hero-name .creator-badge { width: 22px; height: 22px; flex-shrink: 0; }
.hero-name .creator-badge .i { width: 13px; height: 13px; }
.profile-hero .handle { margin-top: 4px; font-size: 15px; }
.hero-stats { display: flex; gap: 26px; margin-top: 18px; list-style: none; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.hero-stats span { font-size: 14px; color: var(--muted); }
.hero-avatar { position: relative; padding-top: 34px; }
.note-bubble {
    position: absolute;
    top: 0;
    right: 4px;
    max-width: 160px;
    padding: 7px 13px;
    border-radius: 18px;
    background: var(--bg);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .12);
    z-index: 1;
}
.note-bubble::after {
    content: "";
    position: absolute;
    bottom: -5px; right: 34px;
    width: 10px; height: 10px;
    background: inherit;
    transform: rotate(45deg);
    box-shadow: 3px 3px 6px rgba(0, 0, 0, .06);
}
.note-bubble.is-empty { color: var(--faint); }
.avatar-plus {
    position: absolute;
    right: 0; bottom: 2px;
    display: grid;
    place-items: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #20d5ec;
    color: #fff;
    border: 3px solid var(--bg);
    cursor: pointer;
}
.avatar-plus .i { width: 16px; height: 16px; stroke-width: 3; }
.profile > .bio {
    max-width: none;
    padding: 0 18px 14px;
    text-align: left;
    font-size: 15px;
    line-height: 1.45;
    color: var(--text);
    word-break: break-word;
}
.profile > .bio a { font-weight: 700; color: inherit; }
.profile > .profile-buttons { justify-content: flex-start; padding: 0 18px 16px; margin: 0; max-width: none; }
.profile > .sub-card { margin-left: 16px; margin-right: 16px; }

.icon-tabs { display: flex; background: var(--bg); border-bottom: 1px solid var(--border); top: calc(56px + env(safe-area-inset-top)); }
.icon-tabs .tab { flex: 1; padding: 12px 0 11px; color: var(--faint); }
.icon-tabs .tab .i { width: 26px; height: 26px; display: block; stroke-width: 1.8; }
.icon-tabs .tab.active { color: var(--text); }
.icon-tabs .tab.active::after { left: 22%; right: 22%; height: 2px; background: var(--text); }

.promo-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 10px 14px 16px;
    border-bottom: 1px solid var(--border);
}
.promo-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 30px; height: 30px;
    border-radius: 9px;
    background: #fe2c55;
    color: #fff;
}
.promo-icon .i { width: 18px; height: 18px; stroke-width: 3; }
.promo-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.promo-text strong { font-size: 15px; font-weight: 700; }
.promo-text small { font-size: 12.5px; color: var(--muted); }
.promo-cta { padding: 8px 16px; border-radius: 99px; background: rgba(254, 44, 85, .1); color: #fe2c55; font-weight: 700; font-size: 14px; }
.promo-close { color: var(--muted); }

.profile .grid { gap: 1px; }
.profile .grid-item { aspect-ratio: 3 / 4; border-radius: 0; background: #e8e8e8; }
.pinned-badge {
    position: absolute;
    top: 6px; left: 6px;
    z-index: 1;
    padding: 2px 6px;
    border-radius: 4px;
    background: #fe2c55;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
.grid-views .i { width: 14px; height: 14px; stroke-width: 2.5; }
.profile .grid-views { color: #fff; font-size: 13.5px; }

/* Search */
.search-bar {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: calc(8px + env(safe-area-inset-top)) 12px 10px 4px;
    background: var(--bg);
}
.search-field {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--muted);
}
.search-field .i { width: 18px; height: 18px; flex-shrink: 0; }
.search-field input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--text); }
.search-submit { color: #fe2c55; font-weight: 700; font-size: 15px; padding: 0 4px; }
.search-page .section-title { padding: 10px 16px 4px; margin: 0; }
.search-page .panel-empty { padding: 4px 16px 12px; }
.search-accounts { padding: 0 16px 8px; }
.search-account { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.search-account .avatar { width: 52px; height: 52px; border: 0; }
.search-grid { gap: 2px; }

/* Profile menu */
.menu-list { display: flex; flex-direction: column; padding: 8px 8px calc(16px + env(safe-area-inset-bottom)); }
.menu-list a, .menu-list button {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 12px;
    border-radius: 12px;
    font-size: 15.5px;
    font-weight: 600;
    text-align: left;
    color: var(--text);
}
.menu-list span { flex: 1; }
.menu-list .i { width: 22px; height: 22px; color: var(--muted); }
.menu-list a:hover, .menu-list button:hover { background: var(--surface); }
.menu-list [data-logout] { color: #e11d48; }

/* Settings: DM button phrase */
.dm-choices { border: 0; display: grid; gap: 8px; }
.dm-choices legend { font-size: 13.5px; font-weight: 700; margin-bottom: 2px; }
.dm-choice { flex-direction: row !important; align-items: center; gap: 10px !important; cursor: pointer; }
.dm-choice input { position: absolute; opacity: 0; pointer-events: none; }
.dm-choice span {
    flex: 1;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    font-weight: 600;
    transition: border-color .2s, background .2s;
}
.dm-choice input:checked + span { border-color: var(--pink); background: rgba(255, 45, 111, .12); }
.dm-choice input:focus-visible + span { outline: 2px solid var(--cyan); }
.settings-avatar > span:not(.avatar) { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.pin-btn.is-pinned { color: #fe2c55; background: rgba(254, 44, 85, .12); }

/* ==========================================================================
   Phones — iOS-friendly inputs, thumb-sized layout, short screens
   ========================================================================== */
@media (max-width: 899px) {
    /* iOS zooms into any field under 16px: keep them at 16px */
    input, textarea, select { font-size: 16px !important; }

    .profile-buttons { width: 100%; max-width: 380px; flex-wrap: nowrap; }
    .profile-buttons .btn { flex: 1; min-width: 0; padding: 0 12px; white-space: nowrap; }
    .profile-head { padding-left: 16px; padding-right: 16px; }
    .profile-stats li { min-width: 0; flex: 1; padding: 0 14px; }

    .sheet { max-height: calc(100% - env(safe-area-inset-top) - 12px); }
    .sheet-tall { height: calc(92% - env(safe-area-inset-top)); }
    .toast { top: calc(12px + env(safe-area-inset-top)); }

    .page-head h1 { font-size: 24px; }
    .tabs { top: env(safe-area-inset-top); }
    .grid-views { font-size: 11.5px; }
}

/* Short phones (iPhone SE, landscape…): a more compact action rail and caption */
@media (max-width: 899px) and (max-height: 740px) {
    .actions { gap: 10px; bottom: 14px; }
    .action-icon { width: 40px; height: 40px; }
    .action-icon .i { width: 27px; height: 27px; }
    .action { font-size: 11px; }
    .author-avatar .avatar { width: 44px; height: 44px; font-size: 18px; }
    .disc { width: 38px; height: 38px; }
    .meta { bottom: 16px; }
    .caption { -webkit-line-clamp: 2; margin: 6px 0 8px; }
    .paywall { padding-bottom: 110px; }
    .paywall-card { padding: 20px 18px 18px; gap: 8px; }
    .paywall-icon { width: 50px; height: 50px; }
}

/* Touch screens: no sticky hover effects after a tap */
@media (hover: none) {
    .action:hover .action-icon, .follow-plus:hover, .grid-item:hover video,
    .stat-wallet:hover, .nav-upload:hover .upload-pill { transform: none; }
    .btn:hover { filter: none; }
}

/* ==========================================================================
   Desktop — sidebar navigation, centered 9:16 player, dialogs
   ========================================================================== */
@media (min-width: 900px) {
    .app {
        max-width: none;
        display: grid;
        grid-template-columns: 260px minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr);
    }
    .main { height: 100%; min-width: 0; overflow: hidden; }

    .nav {
        position: relative;
        height: 100%;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 4px;
        padding: 26px 16px;
        border-top: 0;
        border-right: 1px solid var(--border);
        background: var(--bg);
        backdrop-filter: none;
    }
    .logo {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0 12px 26px;
        font-size: 23px;
        font-weight: 800;
        letter-spacing: -.04em;
    }
    .logo-mark { display: grid; place-items: center; width: 36px; height: 36px; }
    .logo-mark .logo-svg { width: 36px; height: 36px; }
    .logo-text {
        color: #161823;
    }
    .nav-item {
        flex-direction: row;
        gap: 14px;
        padding: 12px 14px;
        border-radius: 12px;
        font-size: 15.5px;
        font-weight: 700;
        color: var(--muted);
        transition: background .2s, color .2s;
    }
    .nav-item:hover { background: var(--surface); }
    .nav-item.active { color: var(--pink); }
    .nav-item.active .avatar { box-shadow: 0 0 0 2px var(--pink); }
    .nav-upload { margin: 10px 0; padding: 0; }
    .nav-upload:hover { background: none; }
    .nav-upload .upload-pill { width: 100%; height: 46px; gap: 8px; display: flex; justify-content: center; align-items: center; font-size: 15px; }
    .nav-upload .upload-pill::after { content: "Publier"; font-weight: 700; }
    .nav-balance {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        margin-left: auto;
        padding: 3px 9px;
        border-radius: 99px;
        background: var(--surface-2);
        color: var(--text);
        font-style: normal;
        font-size: 12px;
        white-space: nowrap;
    }
    .nav-balance .i { width: 13px; height: 13px; }
    .nav-foot {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: auto;
        padding: 12px 14px;
        border-radius: 12px;
        background: rgba(34, 211, 238, .08);
        color: var(--cyan);
        font-size: 12.5px;
        font-weight: 600;
    }
    .nav-foot .i { width: 16px; height: 16px; }

    .nav-desktop { display: flex; }
    .nav-login { display: flex; margin-top: 12px; }
    .nav > * { order: 0 !important; }
    .nav-badge { top: -6px; right: -8px; }
    .page { max-width: 1040px; margin: 0 auto; padding: 0 24px 40px; }
    .page .page-head { padding: 32px 0 18px; }
    .page .panel { margin: 0 0 16px; }
    .kpis { grid-template-columns: 1.4fr 1fr 1fr 1fr; padding: 0 0 16px; }
    .kpi-main, .kpis .kpi:last-child { grid-column: auto; }
    .studio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
    .studio-grid .panel-wide { grid-column: 1 / -1; }
    .settings { max-width: 680px; }
    .withdraw-summary { grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; }
    .monetize { margin: 0 0 16px; grid-template-columns: 1fr 1fr; padding: 26px; }
    .monetize-intro { grid-column: 1 / -1; }
    .monetize-form { grid-template-columns: 1fr 1fr; align-content: start; }
    .monetize-form .btn, .monetize-form .form-error { grid-column: 1 / -1; }
    .inbox, .thread { max-width: 760px; margin: 0 auto; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
    .revenue { max-width: 600px; margin: 0 auto 24px; }
    .top-tabs a:not(.back) { display: none; }
    .top-tabs .sound-toggle { left: auto; right: 28px; top: 24px; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-2); }
    .action-icon .i { width: 24px; height: 24px; color: var(--text); filter: none; }
    .slide .meta { bottom: 56px; }
    .profile-topbar { display: none; }
    .icon-tabs { top: 0; }
    .top-tabs { justify-content: flex-start; }
    .top-tabs .back { left: 24px; top: 20px; background: var(--surface-2); border-radius: 50%; }
    .sound-toggle { top: 24px; right: 28px; width: 44px; height: 44px; background: var(--surface-2); }

    .slide {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 18px;
        padding: 24px 0;
    }
    .stage {
        position: relative;
        inset: auto;
        flex: none;
        height: 100%;
        min-width: 0;
        max-width: calc(100% - 120px);
        aspect-ratio: 9 / 16;
        border-radius: 22px;
        box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
    }
    .paywall { padding: 24px 24px 150px; }
    .meta { right: 20px; }
    .actions {
        position: static;
        align-self: flex-end;
        padding-bottom: 8px;
    }
    .action { text-shadow: none; color: var(--muted); }
    .action-icon { background: var(--surface-2); width: 50px; height: 50px; color: var(--text); }
    .action-icon .i { width: 24px; height: 24px; filter: none; }
    .action-tip .i { width: 24px; height: 24px; }
    .action:hover .action-icon { background: var(--surface-3); }
    .disc { box-shadow: 0 0 0 7px var(--bg-elevated) inset; }

    .profile-inner, .profile > * { max-width: 920px; margin-left: auto; margin-right: auto; }
    .profile .cover { max-width: none; height: 200px; }
    .profile-head { margin-top: -64px; }
    .dashboard, .sub-card { max-width: 600px; }
    .sub-card { flex-direction: row; align-items: flex-end; justify-content: space-between; margin: 0 auto 24px; }
    .sub-card .btn { min-width: 200px; }
    .grid { grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 6px; }
    .grid-item { border-radius: 10px; }

    .sheet, .sheet-tall, .sheet-auto {
        left: 50%;
        right: auto;
        top: 50%;
        bottom: auto;
        width: 460px;
        height: auto;
        max-height: min(720px, 88vh);
        border-radius: 24px;
        border-bottom: 1px solid var(--border);
        transform: translate(-50%, -46%) scale(.96);
        opacity: 0;
        transition: transform .3s var(--ease), opacity .2s, visibility 0s .3s;
    }
    #comments-sheet, #wallet-sheet { height: min(640px, 85vh); }
    #upload-sheet { height: min(780px, 92vh); }
    .sheet.open { transform: translate(-50%, -50%); opacity: 1; transition: transform .3s var(--ease), opacity .2s; }
    .sheet-handle { visibility: hidden; height: 0; margin-top: 8px; }
    .toast { top: 24px; }
}

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

/* Light theme: content over video or colored gradients keeps white text */
.stage, .balance-card, .kpi-main, .withdraw-hero, .btn-dm, .pack.featured .pack-price { color: #fff; }
.stage .creator-badge, .stage .badge { color: #fff; }

/* ==========================================================================
   Phones — TikTok proportions: compact bars, a tight rail grouped at the bottom
   ========================================================================== */
@media (max-width: 899px) {
    :root { --nav-h: 50px; }

    /* Bottom bar */
    .nav-item { gap: 1px; font-size: 10px; font-weight: 500; }
    .nav-item .i { width: 24px; height: 24px; }
    .upload-pill { width: 42px; height: 27px; border-radius: 8px; box-shadow: -3px 0 0 #25f4ee, 3px 0 0 #fe2c55; }
    .upload-pill .i { width: 18px; height: 18px; }
    .nav-badge { min-width: 16px; height: 16px; line-height: 16px; font-size: 10px; top: -3px; right: -9px; }

    /* Feed header */
    .top-tabs { gap: 20px; padding: calc(10px + env(safe-area-inset-top)) 56px 8px; }
    .top-tabs a { font-size: 16px; padding: 4px 0 6px; }
    .top-tabs a.active::after { width: 20px; height: 2.5px; }
    .top-tabs .sound-toggle, .top-tabs .top-search { top: calc(4px + env(safe-area-inset-top)); width: 36px; height: 36px; }
    .top-tabs .sound-toggle .i, .top-tabs .top-search .i { width: 23px; height: 23px; }

    /* Action rail: smaller icons, tight spacing, sitting just above the caption line */
    .slide .actions { right: 6px; bottom: 44px; gap: 8px; }
    .action { gap: 1px; }
    .action-icon { width: 40px; height: 34px; }
    .action-icon .i { width: 31px; height: 31px; }
    .action .count { font-size: 11.5px; font-weight: 600; }
    .action-tip .count { display: none; }
    .action-tip .i { width: 27px; height: 27px; }
    .author-avatar { margin-bottom: 8px; }
    .author-avatar .avatar { width: 44px; height: 44px; font-size: 17px; border-width: 1.5px; }
    .follow-plus { width: 19px; height: 19px; bottom: -8px; }
    .follow-plus .i { width: 12px; height: 12px; }
    .disc { width: 38px; height: 38px; margin-top: 2px; box-shadow: 0 0 0 6px rgba(20, 20, 24, .85) inset; }
    .disc .avatar.xs { width: 20px; height: 20px; font-size: 9px; }

    /* Caption */
    .slide .meta { left: 12px; right: 70px; bottom: 42px; }
    .username { font-size: 15px; }
    .caption { font-size: 14px; margin: 4px 0 6px; -webkit-line-clamp: 2; }
    .sound { font-size: 13px; }
    .badge { padding: 2px 7px; font-size: 10.5px; }
    .dm-pill { padding: 5px 11px; font-size: 12px; margin-bottom: 6px; }

    /* Slim "Recherche" bar and progress line */
    .search-hint { height: 32px; padding: 0 12px; font-size: 13px; background: rgba(0, 0, 0, .35); }
    .search-hint .i { width: 15px; height: 15px; }
    .slide .progress { bottom: 32px; }
    .paywall { padding-bottom: 150px; }

    /* Profile and page headers */
    .profile-topbar { padding: calc(4px + env(safe-area-inset-top)) 8px 2px; }
    .profile-topbar .icon-btn { width: 38px; height: 38px; }
    .profile-topbar .icon-btn .i { width: 24px; height: 24px; }
    .coin-chip { height: 28px; padding: 0 10px; font-size: 12.5px; }
    .icon-tabs { top: calc(44px + env(safe-area-inset-top)); }
    .icon-tabs .tab { padding: 10px 0 9px; }
    .icon-tabs .tab .i { width: 23px; height: 23px; }
    .profile-hero { padding: 10px 16px 12px; }
    .hero-name { font-size: 27px; }
    .avatar.hero { width: 100px; height: 100px; font-size: 40px; }
    .hero-stats { gap: 22px; margin-top: 14px; }
    .hero-stats strong { font-size: 17px; }
    .hero-stats span { font-size: 13px; }
    .page-head { padding: calc(14px + env(safe-area-inset-top)) 16px 10px; }
    .page-head h1 { font-size: 22px; }
    .thread-head { padding: calc(6px + env(safe-area-inset-top)) 10px 6px 4px; }
    .search-bar { padding: calc(6px + env(safe-area-inset-top)) 12px 8px 4px; }
}

/* Profile views */
.views-btn { position: relative; }
.views-badge {
    position: absolute;
    top: 3px; right: 1px;
    min-width: 17px; height: 17px;
    padding: 0 4px;
    border-radius: 99px;
    background: #fe2c55;
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 17px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--bg);
}
.views-intro { display: flex; align-items: center; gap: 8px; padding: 4px 16px 10px; font-size: 13.5px; color: var(--muted); }
.views-intro .i { width: 17px; height: 17px; flex-shrink: 0; }
.views-list { padding: 0 16px 16px; }
.views-list li { gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.views-list .btn { flex-shrink: 0; min-width: 84px; }
.new-dot { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 99px; background: rgba(254, 44, 85, .12); color: #fe2c55; font-size: 11px; font-weight: 800; vertical-align: 1px; }
.views-empty { margin: 60px auto; }
@media (min-width: 900px) { .views-topbar { display: flex; } }

/* Phones — second tightening pass: content right above the bottom bar, like TikTok */
@media (max-width: 899px) {
    :root { --nav-h: 48px; }
    .nav-item .i { width: 23px; height: 23px; }
    .nav-item span:last-child { line-height: 1.1; }

    /* The "Recherche" band costs height on a phone: TikTok only shows it occasionally */
    .search-hint { display: none; }
    .slide .meta { bottom: 10px; }
    .slide .actions { bottom: 10px; gap: 6px; }
    .slide .progress { bottom: 0; }
    .paywall { padding-bottom: 120px; }

    .action-icon { width: 40px; height: 32px; }
    .action-icon .i { width: 30px; height: 30px; }
    .author-avatar { margin-bottom: 6px; }
    .disc { margin-top: 0; }

    .top-tabs { padding-top: calc(6px + env(safe-area-inset-top)); padding-bottom: 4px; }
    .top-tabs .sound-toggle, .top-tabs .top-search { top: calc(1px + env(safe-area-inset-top)); }

    /* Profile: tighter vertical rhythm */
    .profile-topbar { padding-top: calc(2px + env(safe-area-inset-top)); padding-bottom: 0; }
    .profile-hero { padding: 4px 16px 10px; }
    .hero-avatar { padding-top: 28px; }
    .avatar.hero { width: 92px; height: 92px; font-size: 36px; }
    .hero-stats { margin-top: 10px; }
    .profile > .bio { padding-bottom: 10px; font-size: 14px; }
    .profile > .profile-buttons { padding-bottom: 12px; }
    .profile-buttons .btn { min-height: 38px; font-size: 14px; }
    .sub-card { padding: 16px; gap: 12px; margin-bottom: 14px; }
    .sub-price { font-size: 24px; margin: 4px 0 8px; }
    .perks { gap: 5px; font-size: 13.5px; }
    .icon-tabs { top: calc(40px + env(safe-area-inset-top)); }
    .icon-tabs .tab { padding: 8px 0 7px; }
    .promo-banner { padding: 10px 8px 10px 14px; }
}

/* Phones: one-line subscription offer on a creator's profile */
@media (max-width: 899px) {
    .profile > .sub-card { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 16px; margin-bottom: 12px; border-radius: 16px; }
    .profile > .sub-card::before { display: none; }
    .profile > .sub-card .perks { display: none; }
    .profile > .sub-card .eyebrow { font-size: 10.5px; }
    .profile > .sub-card .sub-price { margin: 2px 0 0; font-size: 19px; }
    .profile > .sub-card .sub-price small { font-size: 13px; }
    .profile > .sub-card .btn { min-height: 40px; padding: 0 18px; font-size: 14px; flex-shrink: 0; max-width: 55%; white-space: normal; line-height: 1.15; }
}

/* Studio: gross − PorTok commission = net */
.split-row { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 8px; }
.split-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px; border-radius: 12px; background: var(--surface); }
.split-cell span { font-size: 12px; font-weight: 600; color: var(--muted); }
.split-cell strong { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.split-cell small { font-size: 11.5px; color: var(--faint); }
.split-cell.fee strong { color: #e11d48; }
.split-cell.net { background: rgba(5, 150, 105, .08); }
.split-cell.net strong { color: var(--green); }
.split-op { font-size: 18px; font-weight: 800; color: var(--faint); }
.split-bar { display: flex; height: 8px; margin-top: 14px; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.split-bar .net { background: var(--green); }
.split-bar .fee { background: #fe2c55; }
@media (max-width: 600px) {
    .split-row { grid-template-columns: 1fr; gap: 6px; }
    .split-op { display: none; }
    .split-cell { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
    .split-cell span { flex: 1 0 100%; }
}

/* Cover photo */
.profile-cover {
    display: block;
    height: 130px;
    margin: 0 0 -6px;
    overflow: hidden;
    background: var(--surface-2);
}
.profile-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-cover.is-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 64px;
    margin: 4px 16px 0;
    border-radius: 12px;
    border: 1.5px dashed var(--surface-3);
    background: none;
    color: var(--faint);
    font-size: 13.5px;
    font-weight: 600;
}
.profile-cover.is-empty .i { width: 18px; height: 18px; }
.cover-preview {
    aspect-ratio: 3 / 1;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface-2);
}
.cover-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-preview.is-empty { display: grid; place-items: center; border: 1.5px dashed var(--surface-3); background: none; }
.cover-preview.is-empty span { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 13.5px; font-weight: 600; }
.cover-preview .i { width: 18px; height: 18px; }
.cover-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cover-actions .btn .i { width: 15px; height: 15px; }
.cover-hint { display: block; margin-top: 8px; font-size: 12px; color: var(--faint); }
@media (min-width: 900px) { .profile-cover { height: 220px; border-radius: 0 0 16px 16px; } }

/* Cover photo as the header background: visible at the top, fading into the page,
   with the photo, name and stats drawn on top of it */
.profile { position: relative; }
.profile-cover-bg {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: calc(270px + env(safe-area-inset-top));
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}
.profile-cover-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-cover-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, .25) 30%,
        rgba(255, 255, 255, .78) 62%,
        var(--bg) 100%);
}
.has-cover .profile-topbar, .has-cover .profile-hero, .has-cover > .bio, .has-cover > .profile-buttons { position: relative; z-index: 1; }
.has-cover .profile-topbar { position: relative; background: transparent; }
.has-cover .profile-topbar .icon-btn, .has-cover .coin-chip {
    background: rgba(255, 255, 255, .72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.has-cover .profile-topbar .icon-btn { width: 36px; height: 36px; margin-left: 4px; }
.has-cover .profile-topbar .icon-btn .i { width: 21px; height: 21px; }
.has-cover .profile-hero { padding-top: 70px; }
.has-cover .hero-name, .has-cover .hero-stats strong { text-shadow: 0 1px 12px rgba(255, 255, 255, .9); }
.has-cover .avatar.hero { box-shadow: 0 0 0 4px #fff, 0 8px 24px rgba(0, 0, 0, .18); }
.has-cover .icon-tabs { top: env(safe-area-inset-top); }
@media (min-width: 900px) {
    .profile-cover-bg { height: 330px; }
    .has-cover .profile-topbar { display: none; }
    .has-cover .profile-hero { padding-top: 150px; }
}

/* ==========================================================================
   Touch gestures
   ========================================================================== */
.stage { transition: transform .25s var(--ease); touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.progress { touch-action: none; }
.progress.scrubbing::before, .progress.scrubbing .progress-bar { height: 6px; }

/* Hold the right edge: 2× speed */
.slide.boosting .stage::after {
    content: "2× ▶▶";
    position: absolute;
    top: calc(64px + env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    padding: 6px 14px;
    border-radius: 99px;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .02em;
    pointer-events: none;
}

/* "Pas intéressé" */
.slide.dismissed .stage { transform: translateX(-110%); opacity: 0; transition: transform .35s var(--ease), opacity .35s; }

/* Pull to refresh */
.pull-refresh {
    position: absolute;
    top: calc(-36px + env(safe-area-inset-top));
    left: 50%;
    z-index: 7;
    width: 36px; height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
    opacity: 0;
    transform: translate(-50%, 0);
    transition: transform .25s var(--ease), opacity .2s;
    pointer-events: none;
}
.pull-refresh span {
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 2.5px solid rgba(22, 24, 35, .2);
    border-top-color: #fe2c55;
}
.pull-refresh.ready span { border-color: #fe2c55; border-top-color: transparent; }
.pull-refresh.loading span { animation: spin .7s linear infinite; }

/* First-visit swipe hint */
.swipe-hint {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    text-align: center;
    animation: fade-in .3s ease;
    pointer-events: none; /* the first swipe goes straight to the feed and dismisses the hint */
}
.swipe-hint strong { font-size: 19px; font-weight: 800; }
.swipe-hint small { font-size: 14px; opacity: .85; }
.swipe-hand { font-size: 52px; animation: swipe-up 1.4s var(--ease) infinite; }
@keyframes swipe-up {
    0% { transform: translateY(40px); opacity: 0; }
    30% { opacity: 1; }
    100% { transform: translateY(-40px); opacity: 0; }
}

/* Long-press options */
.options-speed { padding: 14px 16px 6px; }
.speed-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.speed-chip {
    padding: 10px 0;
    border-radius: 10px;
    background: var(--surface-2);
    font-weight: 800;
    font-size: 14px;
}
.speed-chip.active { background: #161823; color: #fff; }
.speed-chip:disabled { opacity: .4; }
.options-list { padding-top: 4px; }

/* Profile content sits higher on the cover photo */
.has-cover .profile-hero { padding-top: 18px; }
.profile-cover-bg { height: calc(235px + env(safe-area-inset-top)); }
.profile-cover-bg::after {
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, .2) 18%,
        rgba(255, 255, 255, .62) 42%,
        rgba(255, 255, 255, .9) 70%,
        var(--bg) 100%);
}
@media (min-width: 900px) {
    .profile-cover-bg { height: 300px; }
    .has-cover .profile-hero { padding-top: 90px; }
}

/* ==========================================================================
   Gesture animations
   ========================================================================== */
/* Leaving / entering a page after a horizontal swipe */
body.leave-left .main { animation: leave-left .24s cubic-bezier(.4, 0, .2, 1) forwards; }
body.leave-right .main { animation: leave-right .24s cubic-bezier(.4, 0, .2, 1) forwards; }
body.enter-left .main { animation: enter-from-right .42s var(--ease); }
body.enter-right .main { animation: enter-from-left .42s var(--ease); }
@keyframes leave-left { to { transform: translateX(-28%); opacity: 0; } }
@keyframes leave-right { to { transform: translateX(28%); opacity: 0; } }
@keyframes enter-from-right { from { transform: translateX(32%); opacity: 0; } }
@keyframes enter-from-left { from { transform: translateX(-32%); opacity: 0; } }

/* A new video comes on screen: caption and rail fade up, one after the other */
.slide.is-active .meta > * { animation: rise-in .5s var(--ease) both; }
.slide.is-active .meta > :nth-child(2) { animation-delay: .05s; }
.slide.is-active .meta > :nth-child(3) { animation-delay: .1s; }
.slide.is-active .meta > :nth-child(4) { animation-delay: .15s; }
.slide.is-active .meta > :nth-child(5) { animation-delay: .2s; }
.slide.is-active .actions > * { animation: rise-in .45s var(--spring) both; }
.slide.is-active .actions > :nth-child(2) { animation-delay: .04s; }
.slide.is-active .actions > :nth-child(3) { animation-delay: .08s; }
.slide.is-active .actions > :nth-child(4) { animation-delay: .12s; }
.slide.is-active .actions > :nth-child(5) { animation-delay: .16s; }
.slide.is-active .actions > :nth-child(6) { animation-delay: .2s; }
.slide.is-active .actions > :nth-child(7) { animation-delay: .24s; }
@keyframes rise-in { from { transform: translateY(14px); opacity: 0; } }

/* Long press: the video sinks a little */
.slide.pressing .stage { transform: scale(.975); transition: transform .45s var(--ease); }

/* 2× badge pops in, arrows pulse */
.slide.boosting .stage::after { animation: boost-pop .3s var(--spring), boost-pulse 1s ease-in-out .3s infinite; }
@keyframes boost-pop { from { transform: translateX(-50%) scale(.6); opacity: 0; } }
@keyframes boost-pulse { 50% { background: rgba(254, 44, 85, .7); } }

/* Pull to refresh: smooth spin while pulling */
.pull-refresh span { transition: transform .05s linear; }
.pull-refresh.ready { box-shadow: 0 4px 20px rgba(254, 44, 85, .45); }

/* Profile grid slides in from the swipe direction */
#video-grid.slide-from-right { animation: grid-from-right .32s var(--ease); }
#video-grid.slide-from-left { animation: grid-from-left .32s var(--ease); }
@keyframes grid-from-right { from { transform: translateX(18%); opacity: 0; } }
@keyframes grid-from-left { from { transform: translateX(-18%); opacity: 0; } }

/* Top tab underline glides */
.top-tabs a.active::after { animation: tab-underline .3s var(--spring); }
@keyframes tab-underline { from { width: 0; } }

/* Sheet backdrop fade follows the drag */
.sheet-backdrop { transition: opacity .2s; }
/* Swiping toward the dark "Suivis" feed: no white flash behind the transition */
body.leave-right .app, body.enter-right.page-dark .app { background: #000; }

/* ==========================================================================
   Inbox, TikTok style
   ========================================================================== */
.inbox { position: relative; }
.inbox-head {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(4px + env(safe-area-inset-top)) 8px 4px;
    background: var(--bg);
}
.inbox-head .icon-btn { width: 40px; height: 40px; color: var(--text); }
.inbox-head .icon-btn .i { width: 25px; height: 25px; stroke-width: 1.8; }
.inbox-title { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; }
.presence {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px 5px 3px 7px;
    border-radius: 6px;
    background: var(--surface-2);
}
.presence i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.presence .i { width: 12px; height: 12px; transform: rotate(90deg); color: var(--faint); }

.people-row {
    display: flex;
    gap: 14px;
    padding: 34px 14px 14px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
}
.people-row::-webkit-scrollbar { display: none; }
.person { flex: 0 0 auto; width: 86px; display: flex; flex-direction: column; align-items: center; gap: 6px; scroll-snap-align: start; }
.person-avatar { position: relative; display: grid; place-items: center; width: 82px; height: 82px; border-radius: 50%; }
.person-avatar.has-story { background: linear-gradient(135deg, #3b82f6, #22d3ee 55%, #86efac); }
.person-avatar.has-story .avatar { box-shadow: 0 0 0 3px var(--bg); }
.avatar.story { width: 74px; height: 74px; font-size: 28px; border: 0; }
.person-name { max-width: 86px; font-size: 13px; font-weight: 600; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-bubble.small {
    top: -30px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    max-width: 96px;
    padding: 5px 9px;
    font-size: 11.5px;
    white-space: normal;
    line-height: 1.2;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.note-bubble.small::after { right: auto; left: calc(50% - 5px); }
.person-plus {
    position: absolute;
    right: 0; bottom: 2px;
    display: grid;
    place-items: center;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: #20d5ec;
    color: #fff;
    border: 2.5px solid var(--bg);
}
.person-plus .i { width: 14px; height: 14px; stroke-width: 3; }

.inbox-list { list-style: none; }
.inbox-row { display: flex; align-items: center; gap: 13px; padding: 10px 16px; min-height: 76px; }
.inbox-row:active { background: var(--surface); }
.inbox-row.highlight { background: rgba(22, 24, 35, .05); }
.row-avatar { position: relative; flex-shrink: 0; }
.avatar.row { width: 56px; height: 56px; font-size: 22px; border: 0; }
.row-badge {
    position: absolute;
    right: -3px; bottom: -3px;
    display: grid;
    place-items: center;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: #3b82f6;
    color: #fff;
    border: 2px solid var(--bg);
}
.row-badge .i { width: 12px; height: 12px; }
.row-badge.kind-like { background: #fe2c55; }
.row-badge.kind-comment { background: #0ea5e9; }
.row-badge.kind-tip, .row-badge.kind-ppv, .row-badge.kind-subscription { background: #f59e0b; }
.row-badge.kind-message, .row-badge.kind-ppv_message { background: #a855f7; }
.row-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 56px; height: 56px;
    border-radius: 50%;
    color: #fff;
}
.row-icon .i { width: 26px; height: 26px; }
.row-icon.activity { background: #ea4c89; }
.row-icon.system { background: #13204a; }
.row-icon.small { width: 42px; height: 42px; }
.row-icon.small .i { width: 20px; height: 20px; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-main strong { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-strong { font-size: 16px; font-weight: 600; }
.row-sub { display: flex; gap: 4px; font-size: 14.5px; color: var(--faint); min-width: 0; white-space: nowrap; }
.row-sub .ellipsis { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.inbox-row.unread .row-main strong, .inbox-row.unread .row-sub { color: var(--text); font-weight: 700; }
.count-badge {
    flex-shrink: 0;
    min-width: 21px; height: 21px;
    padding: 0 6px;
    border-radius: 99px;
    background: #fe2c55;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 21px;
    text-align: center;
}
.conv-item { position: relative; }
.conv-item .inbox-row { padding-right: 60px; }
.row-camera {
    position: absolute;
    right: 14px; top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    color: var(--faint);
}
.row-camera .i { width: 26px; height: 26px; stroke-width: 1.6; }
.inbox-hint { padding: 16px; text-align: center; color: var(--faint); font-size: 14px; }

/* Activity & system pages */
.activity-list, .system-list { list-style: none; padding: 4px 0 16px; }
.activity-list li { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.activity-list li.is-new { background: rgba(254, 44, 85, .05); }
.activity-text { flex: 1; min-width: 0; font-size: 14.5px; line-height: 1.35; }
.activity-text time { color: var(--faint); font-size: 13px; white-space: nowrap; }
.activity-thumb { flex-shrink: 0; width: 44px; height: 58px; border-radius: 4px; overflow: hidden; background: #000; }
.activity-thumb video { width: 100%; height: 100%; object-fit: cover; }
.activity-list .btn { flex-shrink: 0; }
.system-list li { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.system-body strong { font-size: 15px; }
.system-body p { margin: 3px 0 4px; font-size: 14px; color: var(--muted); line-height: 1.4; }
.system-body small { font-size: 12.5px; color: var(--faint); }
.system-body a { color: #fe2c55; font-weight: 700; }

/* TikTok's loading dots: cyan and pink swap places */
.tt-loader { height: 0; overflow: hidden; display: grid; place-items: center; transition: height .25s var(--ease); }
.tt-dots { position: relative; width: 34px; height: 14px; }
.tt-dots i {
    position: absolute;
    top: 0;
    width: 14px; height: 14px;
    border-radius: 50%;
}
.tt-dots i:first-child { left: 0; background: #25f4ee; }
.tt-dots i:last-child { right: 0; background: #fe2c55; }
.tt-loader.loading .tt-dots i:first-child, .pull-refresh.loading .tt-dots i:first-child { animation: dot-a .7s ease-in-out infinite; }
.tt-loader.loading .tt-dots i:last-child, .pull-refresh.loading .tt-dots i:last-child { animation: dot-b .7s ease-in-out infinite; }
@keyframes dot-a { 0%, 100% { transform: translateX(0); z-index: 1; } 50% { transform: translateX(20px) scale(.85); z-index: 0; } }
@keyframes dot-b { 0%, 100% { transform: translateX(0); z-index: 0; } 50% { transform: translateX(-20px) scale(1.15); z-index: 1; } }
.tt-loader.ready .tt-dots { transform: scale(1.1); }

/* Feed pull indicator uses the same dots */
.pull-refresh { width: 54px; height: 30px; border-radius: 99px; background: rgba(0, 0, 0, .55); box-shadow: none; }
.pull-refresh .tt-dots { transform: scale(calc(.6 + var(--spread, 0) * .4)); }
.pull-refresh.ready { box-shadow: none; background: rgba(0, 0, 0, .7); }
.pull-refresh .tt-dots, .pull-refresh.ready .tt-dots, .pull-refresh.loading .tt-dots { width: 34px; height: 14px; border: 0; border-radius: 0; animation: none; }
.note-bubble.small { width: max-content; max-width: 112px; overflow: visible; }
/* Profile photos always fill their circle exactly */
.avatar.has-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.inbox-head .spacer { width: 40px; height: 40px; }

/* "Gérer la vidéo" sheet */
.manage-top { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; }
.manage-preview { width: 96px; aspect-ratio: 9 / 16; border-radius: 12px; object-fit: cover; background: #000; }
.manage-stats { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.manage-stats li { display: grid; grid-template-columns: 18px auto; column-gap: 6px; align-items: center; }
.manage-stats .i { width: 16px; height: 16px; color: var(--muted); grid-row: span 2; }
.manage-stats strong { font-size: 15px; font-weight: 800; line-height: 1.1; }
.manage-stats span { grid-column: 2; font-size: 11.5px; color: var(--faint); }
.manage-stats .earned { grid-column: 1 / -1; padding: 8px 10px; border-radius: 10px; background: rgba(5, 150, 105, .08); }
.manage-stats .earned strong { color: var(--green); }
.manage-pin { padding: 4px 0; border: 0; }
.manage-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.manage-links .btn .i { width: 16px; height: 16px; }
.danger-text { color: #e11d48 !important; }

/* ⋯ on your own videos in the profile grid */
.grid-manage {
    position: absolute;
    right: 4px; bottom: 4px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .45);
    color: #fff;
}
.grid-manage .i { width: 18px; height: 18px; fill: currentColor; }

/* Studio rows: status pills + "Gérer" */
.visibility-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--surface-2); }
.visibility-pill .i { width: 12px; height: 12px; }
.vis-subscribers { background: rgba(217, 70, 239, .12); color: #a21caf; }
.vis-ppv { background: rgba(245, 158, 11, .14); color: #b45309; }
.vis-pinned { background: rgba(254, 44, 85, .1); color: #e11d48; }
/* Pull-to-refresh dots over a cover photo stay above it */
.profile .tt-loader { position: relative; z-index: 2; }
/* Forms in sheets scroll instead of squashing their fields */
.stack-form > *, .upload-form > * { flex-shrink: 0; }
.stack-form .switch-row { flex-direction: row; align-items: center; justify-content: space-between; }

/* ==========================================================================
   Desktop profile, tiktok.com style: big photo on the left, details aligned on its right
   ========================================================================== */
@media (min-width: 900px) {
    .profile { padding: 0 40px 48px; }
    .profile > * { max-width: 1120px; margin-left: auto; margin-right: auto; }
    .profile > .profile-cover-bg { max-width: none; margin: 0; }
    .profile > .profile-cover.is-empty { margin: 20px auto 0; height: 56px; }

    .profile-hero {
        grid-template-columns: 150px 1fr;
        align-items: center;
        gap: 32px;
        padding: 40px 0 18px;
    }
    .has-cover .profile-hero { padding-top: 110px; }
    .hero-avatar { order: -1; padding-top: 0; }
    .avatar.hero { width: 150px; height: 150px; font-size: 56px; }
    .note-bubble { top: -34px; right: auto; left: 50%; transform: translateX(-50%); }
    .note-bubble::after { right: auto; left: calc(50% - 5px); }
    .avatar-plus { width: 36px; height: 36px; right: 4px; bottom: 4px; }
    .hero-name { font-size: 34px; }
    .profile-hero .handle { font-size: 17px; margin-top: 2px; }
    .hero-stats { gap: 32px; margin-top: 16px; }
    .hero-stats li { flex-direction: row; align-items: baseline; gap: 6px; }
    .hero-stats strong { font-size: 18px; }
    .hero-stats span { font-size: 16px; }

    /* Bio and buttons line up with the name, to the right of the photo */
    .profile > .bio, .profile > .profile-buttons { padding-left: 182px; padding-right: 0; }
    .profile > .bio { font-size: 15.5px; max-width: 1120px; }
    .profile > .profile-buttons { gap: 10px; padding-bottom: 22px; }
    .profile > .profile-buttons .btn { flex: 0 0 auto; min-width: 170px; min-height: 42px; padding: 0 26px; }
    .profile > .sub-card { max-width: calc(1120px - 182px); margin: 0 auto 26px; transform: translateX(91px); }

    /* Tabs on the left with an underline, wide grid */
    .icon-tabs { justify-content: flex-start; border-bottom: 1px solid var(--border); background: var(--bg); }
    .icon-tabs .tab { flex: 0 0 120px; padding: 14px 0 12px; }
    .icon-tabs .tab.active::after { left: 10%; right: 10%; }
    .promo-banner { margin-top: 0; border-radius: 0; }
    .profile .grid {
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
        gap: 12px;
        padding: 18px 0 0;
    }
    .profile .grid-item { border-radius: 10px; }
    .profile .empty { padding-top: 70px; }
}
@media (min-width: 900px) and (max-width: 1180px) {
    .profile > .sub-card { transform: none; max-width: none; }
}
@media (min-width: 900px) {
    /* Subscription card: same left edge as the name, same right edge as the page */
    .profile > .sub-card {
        transform: none;
        max-width: none;
        width: calc(min(100%, 1120px) - 182px);
        margin: 0 0 26px calc((100% - min(100%, 1120px)) / 2 + 182px);
    }
    .profile-hero { padding-bottom: 8px; }
}

/* ==========================================================================
   Voice messages, voice comments and replies
   ========================================================================== */
.mic-btn { flex-shrink: 0; width: 40px; height: 40px; color: var(--text); }
.mic-btn .i { width: 22px; height: 22px; }

/* Recording: the bar replaces the input row */
.recording-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-height: 44px;
    padding: 0 4px 0 2px;
}
.recording-bar[hidden] { display: none !important; }
form.recording > :not(.recording-bar):not(input[type="hidden"]) { display: none !important; }
.composer.recording .recording-bar { margin: 0; }
.rec-cancel { color: #e11d48; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #fe2c55; animation: rec-blink 1s ease-in-out infinite; }
@keyframes rec-blink { 50% { opacity: .25; } }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 15px; min-width: 40px; }
.rec-wave { flex: 1; display: flex; align-items: center; gap: 3px; height: 26px; overflow: hidden; }
.rec-wave i { flex: 1; max-width: 4px; border-radius: 2px; background: #fe2c55; animation: rec-wave .9s ease-in-out infinite; }
.rec-wave i:nth-child(odd) { animation-delay: -.3s; }
.rec-wave i:nth-child(3n) { animation-delay: -.6s; }
@keyframes rec-wave { 0%, 100% { height: 20%; } 50% { height: 100%; } }

/* Voice bubble */
.voice { display: flex; align-items: center; gap: 10px; min-width: 210px; max-width: 280px; padding: 8px 12px 8px 8px; border-radius: 20px; background: var(--surface-2); }
.msg.mine .voice { background: var(--gradient); color: #fff; }
.voice-play { flex-shrink: 0; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; color: #161823; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.voice-icon { width: 0; height: 0; margin-left: 3px; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent currentColor; }
.voice.playing .voice-icon { width: 10px; height: 12px; margin: 0; border: 0; border-left: 3.5px solid currentColor; border-right: 3.5px solid currentColor; }

.voice-wave { flex: 1; display: flex; align-items: center; gap: 2px; height: 26px; }
.voice-wave i { flex: 1; border-radius: 2px; background: currentColor; opacity: .35; }
.voice-wave i.on { opacity: 1; }
.voice .voice-wave i { transition: opacity .2s; }
.voice-time { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; opacity: .85; }
.comment-voice { margin: 4px 0 2px; }
.comment-voice .voice { min-width: 190px; }
.msg-voice { display: flex; }


/* Quote of the message being answered */
.msg-quote {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    max-width: 100%;
    padding: 6px 10px;
    margin-bottom: 2px;
    border-left: 3px solid #fe2c55;
    border-radius: 6px 12px 12px 6px;
    background: var(--surface-2);
    text-align: left;
    font-size: 12.5px;
}
.msg.mine .msg-quote { align-self: flex-end; }
.msg-quote strong { font-size: 12px; color: #fe2c55; }
.msg-quote span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }

/* Reply: ↩ on hover (desktop), swipe right (phones) */
.msg { position: relative; transition: transform .2s var(--ease); }
.msg-reply-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--muted);
    opacity: 0;
    transition: opacity .15s;
}
.msg-reply-btn .i { width: 16px; height: 16px; }
.msg.mine .msg-reply-btn { left: -38px; }
.msg.theirs .msg-reply-btn { right: -38px; }
@media (hover: hover) { .msg:hover .msg-reply-btn { opacity: 1; } }
.msg.reply-ready::before {
    content: "↩";
    position: absolute;
    left: -30px; top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #fe2c55;
}
.msg.flash .msg-text, .msg.flash .voice, .msg.flash .msg-media { animation: msg-flash 1.2s ease; }
@keyframes msg-flash { 30% { box-shadow: 0 0 0 4px rgba(254, 44, 85, .35); } }

/* "Réponse à …" banner above the composer */
.composer-reply {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 8px 6px 8px 12px;
    border-left: 3px solid #fe2c55;
    border-radius: 10px;
    background: var(--surface);
}
.reply-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.reply-info strong { font-size: 13px; color: #fe2c55; }
.reply-info small { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer.recording .composer-reply:not([hidden]) { display: flex !important; }

/* ==========================================================================
   Paywall, redesigned: creator up front, clear price, compact card
   ========================================================================== */
.paywall { padding: 20px 64px 130px 16px; }
.paywall-frost {
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(115deg, rgba(255, 255, 255, .035) 0 22px, transparent 22px 44px),
        radial-gradient(circle at 50% 42%, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, .45) 75%);
    pointer-events: none;
}
.paywall-card {
    gap: 4px;
    max-width: 290px;
    padding: 46px 20px 18px;
    border-radius: 26px;
    background: rgba(12, 12, 18, .5);
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .12);
    overflow: visible;
}
.paywall-creator { position: absolute; top: -38px; left: 50%; transform: translateX(-50%); }
.avatar.pw { width: 76px; height: 76px; font-size: 30px; border: 0; box-shadow: 0 0 0 4px rgba(12, 12, 18, .9); }
.avatar.pw.ring::after { inset: -6px; padding: 2.5px; }
.paywall-lock {
    position: absolute;
    right: -4px; bottom: -2px;
    display: grid;
    place-items: center;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    border: 2.5px solid rgba(12, 12, 18, .95);
}
.paywall-lock .i { width: 14px; height: 14px; }
.paywall-kicker {
    margin-top: 2px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #f0abfc;
}
.paywall-card h2 { font-size: 17px; font-weight: 700; color: rgba(255, 255, 255, .9); letter-spacing: 0; }
.paywall-price { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin: 10px 0 0; }
.paywall-price .i { width: 22px; height: 22px; color: #fbbf24; align-self: center; }
.paywall-price strong { font-size: 38px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.paywall-price span { font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .75); }
.paywall-card .paywall-sub { margin: 2px 0 12px; font-size: 12.5px; color: rgba(255, 255, 255, .6); }
.paywall-card .btn { gap: 8px; min-height: 48px; font-size: 15.5px; }
.paywall-card .btn .i { width: 17px; height: 17px; }
.paywall-link { margin-top: 10px; font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, .75); }
.paywall-link:hover { color: #fff; }
@media (max-width: 899px) and (max-height: 740px) {
    .paywall { padding-bottom: 100px; }
    .paywall-price strong { font-size: 32px; }
}

/* ==========================================================================
   Comments, TikTok style
   ========================================================================== */
.comment-list { padding: 4px 16px 8px; }
.comment-list li.comment { display: grid; grid-template-columns: 36px 1fr 34px; gap: 10px; padding: 10px 0; align-items: start; }
.comment-list li.comment.is-reply { grid-template-columns: 26px 1fr 30px; padding: 8px 0 0; }
.comment-avatar .avatar.sm { width: 36px; height: 36px; font-size: 14px; border: 0; }
.is-reply .comment-avatar .avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.comment-main { min-width: 0; }
.comment-list .who { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.owner-badge { padding: 1px 6px; border-radius: 4px; background: rgba(254, 44, 85, .12); color: #fe2c55; font-size: 10.5px; font-weight: 800; }
.comment-list .body { margin-top: 2px; font-size: 15px; line-height: 1.35; color: var(--text); word-break: break-word; }
.comment-meta { display: flex; align-items: center; gap: 14px; margin-top: 5px; font-size: 12.5px; color: var(--faint); }
.comment-meta .when { color: var(--faint); margin: 0; font-size: 12.5px; }
.comment-action { font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 0; }
.comment-action.danger { color: var(--faint); }
.comment-action.danger.armed { color: #e11d48; }
.comment-like { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 6px; color: var(--faint); font-size: 11.5px; font-weight: 600; }
.comment-like .i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .2s var(--spring); }
.comment-like.liked { color: #fe2c55; }
.comment-like.liked .i { fill: currentColor; stroke: none; animation: like-pop .4s var(--spring); }
.comment-like:active .i { transform: scale(.85); }
.comment-replies { list-style: none; margin-top: 2px; }
.replies-toggle { margin-top: 8px; font-size: 12.5px; font-weight: 700; color: var(--faint); padding: 0; }
.comment.removing { opacity: 0; transform: translateX(-20px); transition: opacity .25s, transform .25s; }
.comment-list .empty-row { display: block; text-align: center; }

.comment-tools { border-top: 1px solid var(--border); padding: 8px 14px 0; }
.emoji-row { display: flex; justify-content: space-between; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.emoji-row::-webkit-scrollbar { display: none; }
.emoji-btn { flex: 0 0 auto; width: 38px; height: 34px; border-radius: 10px; font-size: 22px; line-height: 1; transition: transform .15s var(--spring), background .2s; }
.emoji-btn:active { transform: scale(1.25); background: var(--surface-2); }
.comment-replying { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; padding: 4px 4px 4px 12px; border-radius: 10px; background: var(--surface); font-size: 13px; color: var(--muted); }
.comment-replying strong { color: var(--text); }
.comment-replying .icon-btn { width: 28px; height: 28px; }
.comment-tools + .comment-form { border-top: 0; }
#comments-sheet .sheet-head h3 { font-size: 14.5px; font-weight: 700; }

/* ==========================================================================
   Share sheet
   ========================================================================== */
.share-label { padding: 14px 16px 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.share-row { display: flex; gap: 14px; padding: 4px 16px 6px; overflow-x: auto; scrollbar-width: none; }
.share-row::-webkit-scrollbar { display: none; }
.share-friend, .share-app { flex: 0 0 auto; width: 64px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.share-avatar { position: relative; }
.avatar.share { width: 56px; height: 56px; font-size: 21px; border: 0; transition: transform .2s var(--spring); }
.share-friend:active .avatar.share { transform: scale(.92); }
.share-sent {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(254, 44, 85, .85);
    color: #fff;
    opacity: 0;
    transform: scale(.6);
    transition: opacity .2s, transform .25s var(--spring);
}
.share-sent .i { width: 24px; height: 24px; stroke-width: 3; }
.share-friend.sent .share-sent { opacity: 1; transform: none; }
.share-name { max-width: 64px; font-size: 11.5px; font-weight: 600; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-app-icon {
    display: grid;
    place-items: center;
    width: 54px; height: 54px;
    border-radius: 50%;
    background: var(--app);
    color: #fff;
    font-size: 22px;
    transition: transform .2s var(--spring);
}
.share-app:active .share-app-icon { transform: scale(.9); }
.share-app-icon .i { width: 24px; height: 24px; }
.share-app-icon b { font-weight: 800; font-family: -apple-system, "Segoe UI", sans-serif; }
.share-link-preview { margin: 10px 16px calc(16px + env(safe-area-inset-bottom)); padding: 10px 12px; border-radius: 10px; background: var(--surface); font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Share sheet: real brand logos on their brand colors */
.share-app-icon { background: var(--app); color: var(--logo, #fff); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.share-app-icon .i.brand { width: 27px; height: 27px; }

/* ==========================================================================
   Comments open on a phone: the video shrinks to the top, whole, like TikTok
   ========================================================================== */
@media (max-width: 899px) {
    .slide .stage video { transition: none; }
    .slide .stage { height: 100%; transition: height .38s cubic-bezier(.2, .8, .2, 1), transform .25s var(--ease); }
    body.comments-open .slide.shrunk .stage {
        bottom: auto;
        height: var(--top-h, 32%);
        background: #000;
    }
    body.comments-open .slide.shrunk .stage video { object-fit: contain; }
    .slide .meta, .slide .actions, .slide .shade, .slide .tap-icon, .top-tabs, .search-hint {
        transition: opacity .25s ease;
    }
    body.comments-open .slide.shrunk .meta,
    body.comments-open .slide.shrunk .actions,
    body.comments-open .slide.shrunk .shade,
    body.comments-open .slide.shrunk .progress,
    body.comments-open .top-tabs,
    body.comments-open .sound-toggle { opacity: 0; pointer-events: none; }
    body.comments-open .feed { overflow: hidden; } /* no scrolling to another video behind the sheet */
    body.comments-open .sheet-backdrop { background: transparent; backdrop-filter: none; }
    body.comments-open #comments-sheet { height: 68%; }
    #comments-sheet { transition: transform .38s cubic-bezier(.2, .8, .2, 1), visibility 0s .38s; }
    #comments-sheet.open { transition: transform .38s cubic-bezier(.2, .8, .2, 1); }
}

/* ==========================================================================
   Messages on phones: full-height conversation, roomy composer, compact inbox
   ========================================================================== */
/* The composer: one pill with the text field, photo and mic inside, send outside */
.composer-row { gap: 8px; }
.composer-field {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 4px 0 0;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: var(--surface);
    transition: border-color .2s, background .2s;
}
.composer-field:focus-within { border-color: rgba(255, 45, 111, .55); background: var(--surface-2); }
.composer-row .composer-field input[name="body"] {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 6px 0 16px;
    border: 0;
    background: none;
    outline: none;
}
.composer-row .composer-field input[name="body"]:focus { background: none; border: 0; }
.field-btn {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    color: var(--muted);
    cursor: pointer;
    transition: color .2s, background .2s;
}
.field-btn:hover, .field-btn:active { color: var(--text); background: var(--surface-2); }
.field-btn .i { width: 21px; height: 21px; }
.composer .send-btn { flex-shrink: 0; }

@media (max-width: 899px) {
    /* A conversation fills the screen: no bottom bar, like TikTok */
    .page-thread .nav { display: none; }
    .page-thread .main { height: 100%; }
    .thread-head { min-height: 52px; }
    .thread-body { padding: 12px 12px 16px; }
    .msg { max-width: 82%; }
    .composer { padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); }
    .composer .send-btn { height: 42px; min-width: 42px; padding: 0 12px; }
    .composer-field { height: 42px; }

    /* Inbox rows a bit tighter */
    .inbox-row { gap: 12px; padding: 8px 14px; min-height: 70px; }
    .row-sub { font-size: 14px; }
}

/* Small iPhones (SE, mini) */
@media (max-width: 380px) {
    .people-row { gap: 10px; padding: 30px 12px 10px; }
    .person { width: 70px; }
    .person-avatar { width: 68px; height: 68px; }
    .avatar.story { width: 60px; height: 60px; font-size: 23px; }
    .person-plus { width: 22px; height: 22px; }
    .person-name { max-width: 70px; font-size: 12px; }
    .avatar.row, .row-icon { width: 50px; height: 50px; }
    .row-icon .i { width: 23px; height: 23px; }
    .row-main strong { font-size: 15px; }
    .row-sub { font-size: 13.5px; }
    .row-camera { right: 8px; width: 34px; }
    .row-camera .i { width: 23px; height: 23px; }
    .conv-item .inbox-row { padding-right: 46px; }
    .inbox-title { font-size: 16px; }
    .voice { min-width: 180px; }
    .msg-locked { width: 210px; }
    .field-btn { width: 32px; height: 32px; }
}
/* The note above "Créer" starts at the left edge instead of overflowing it */
.person:first-child .note-bubble.small { left: 4px; transform: none; }
.person:first-child .note-bubble.small::after { left: 32px; }

/* ==========================================================================
   Messages on phones, finer scale (about 12% smaller)
   ========================================================================== */
@media (max-width: 899px) {
    /* Inbox header and people row */
    .inbox-head { padding: calc(2px + env(safe-area-inset-top)) 6px 2px; }
    .inbox-head .icon-btn { width: 36px; height: 36px; }
    .inbox-head .icon-btn .i { width: 22px; height: 22px; }
    .inbox-title { font-size: 15.5px; }
    .presence { padding: 2px 4px 2px 6px; }
    .people-row { gap: 10px; padding: 28px 12px 8px; }
    .person { width: 68px; gap: 4px; }
    .person-avatar { width: 64px; height: 64px; }
    .avatar.story { width: 57px; height: 57px; font-size: 22px; }
    .person-avatar.has-story .avatar { box-shadow: 0 0 0 2.5px var(--bg); }
    .person-plus { width: 21px; height: 21px; border-width: 2px; }
    .person-plus .i { width: 11px; height: 11px; }
    .person-name { max-width: 68px; font-size: 11.5px; }
    .note-bubble.small { top: -26px; padding: 4px 8px; font-size: 10.5px; max-width: 100px; }

    /* Inbox rows */
    .inbox-row { gap: 11px; padding: 7px 14px; min-height: 62px; }
    .avatar.row, .row-icon { width: 48px; height: 48px; font-size: 19px; }
    .row-icon .i { width: 22px; height: 22px; }
    .row-badge { width: 19px; height: 19px; }
    .row-badge .i { width: 10px; height: 10px; }
    .row-main { gap: 1px; }
    .row-main strong, .row-strong { font-size: 14.5px; }
    .row-sub { font-size: 13px; }
    .count-badge { min-width: 19px; height: 19px; line-height: 19px; font-size: 11px; }
    .row-camera { width: 34px; height: 34px; right: 10px; }
    .row-camera .i { width: 22px; height: 22px; }
    .conv-item .inbox-row { padding-right: 50px; }

    /* Conversation */
    .thread-head { min-height: 46px; padding: calc(4px + env(safe-area-inset-top)) 10px 4px 2px; gap: 4px; }
    .thread-head .icon-btn .i { width: 22px; height: 22px; }
    .thread-who { gap: 10px; }
    .thread-who .avatar.sm { width: 34px; height: 34px; font-size: 13px; }
    .thread-who strong { font-size: 14.5px; }
    .thread-who small { font-size: 11.5px; }
    .thread-intro { padding: 12px 0 18px; gap: 6px; }
    .thread-intro .avatar.xl { width: 68px; height: 68px; font-size: 28px; }
    .thread-intro strong { font-size: 16px; }
    .thread-intro p { font-size: 13px; }
    .thread-body { gap: 4px; }
    .msg-text { padding: 8px 12px; font-size: 14px; border-radius: 18px; }
    .msg-meta { font-size: 10.5px; }
    .msg-media img, .msg-media video { max-height: 280px; }
    .msg-locked { width: 200px; }
    .voice { min-width: 180px; padding: 6px 10px 6px 6px; gap: 8px; }
    .voice-play { width: 30px; height: 30px; }
    .voice-wave { height: 22px; }
    .msg-quote { padding: 5px 9px; font-size: 12px; }

    /* Composer */
    .composer { padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); }
    .composer-field { height: 38px; }
    .composer-row .composer-field input[name="body"] { padding-left: 14px; }
    .field-btn { width: 32px; height: 32px; }
    .field-btn .i { width: 19px; height: 19px; }
    .composer .send-btn { height: 38px; min-width: 38px; padding: 0 10px; font-size: 12px; }
    .composer .send-btn .i { width: 16px; height: 16px; }
    .composer-reply { padding: 6px 4px 6px 10px; margin-bottom: 6px; }
}
