:root {
    --sg-max-width: min(1280px, calc(100vw - 64px));
    --sg-body-bg: #040509;
    --sg-body-overlay: rgba(8, 11, 20, 0.76);
    --sg-panel: rgba(14, 16, 28, 0.9);
    --sg-panel-soft: rgba(20, 23, 36, 0.8);
    --sg-border: rgba(123, 136, 255, 0.16);
    --sg-border-soft: rgba(255, 255, 255, 0.06);
    --sg-text-main: #f5f6ff;
    --sg-text-muted: rgba(245, 246, 255, 0.76);
    --sg-text-soft: rgba(245, 246, 255, 0.56);
    --sg-chip: rgba(255, 255, 255, 0.08);
    --sg-highlight: #636dff;
    --sg-highlight-strong: #3f46ff;
    --sg-accent: #21d4fd;
    --sg-success: #4fe1a4;
    --sg-warning: #ffce69;
    --sg-radius-lg: 28px;
    --sg-radius-md: 20px;
    --sg-radius-sm: 14px;
    --sg-gap-xl: clamp(32px, 6vw, 80px);
    --sg-gap-lg: clamp(24px, 4vw, 48px);
    --sg-gap-md: clamp(18px, 3vw, 32px);
    --sg-gap-sm: clamp(12px, 2vw, 22px);
    --sg-transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
    height: 100%;
}

body.single-gallery {
    font-family: "Inter", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
    color: var(--sg-text-main);
    background: radial-gradient(140% 100% at 50% -20%, rgba(99, 109, 255, 0.42) 0%, transparent 65%),
                radial-gradient(120% 80% at 12% 80%, rgba(33, 212, 253, 0.32) 0%, transparent 60%),
                var(--sg-body-bg);
    min-height: 100vh;
    overflow-y: auto;
}

body.single-gallery::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.4), rgba(4, 5, 11, 0.85));
    opacity: 0.7;
    pointer-events: none;
    z-index: 0;
}

.sg-sunrise {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(circle at 18% 20%, rgba(99, 109, 255, 0.32), transparent 52%),
                radial-gradient(circle at 82% 25%, rgba(33, 212, 253, 0.25), transparent 55%);
    mix-blend-mode: screen;
    transform: translate3d(var(--sg-shift-x, 0px), var(--sg-shift-y, 0px), 0);
    transition: transform 320ms ease;
}

.sg-sunrise::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--sg-cover, none);
    background-size: cover;
    background-position: center;
    opacity: 0.22;
    filter: saturate(140%) blur(18px);
}

.sg-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.sg-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    background: linear-gradient(90deg, rgba(8, 9, 18, 0.95), rgba(12, 14, 28, 0.9));
    border-bottom: 1px solid rgba(255,255,255,0.04);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.sg-topbar-inner {
    margin: 0 auto;
    width: min(100%, var(--sg-max-width));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sg-gap-sm);
    padding: clamp(12px, 2vw, 20px) clamp(16px, 3vw, 32px);
}

.sg-topbar-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sg-topbar-meta .sg-topline {
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    color: var(--sg-text-muted);
}

.sg-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--sg-text-soft);
}

.sg-breadcrumb span[aria-hidden="true"] {
    font-weight: 600;
    opacity: 0.75;
}

.sg-breadcrumb a {
    color: inherit;
    text-decoration: none;
    position: relative;
}

.sg-breadcrumb a::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: -4px;
    height: 2px;
    background: linear-gradient(90deg, var(--sg-accent), rgba(255, 255, 255, 0));
    opacity: 0;
    transform: translateY(4px);
    transition: opacity var(--sg-transition), transform var(--sg-transition);
}

.sg-breadcrumb a:hover::after,
.sg-breadcrumb a:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.sg-topbar-badges {
    display: inline-flex;
    align-items: center;
    gap: var(--sg-gap-sm);
    flex-wrap: wrap;
    justify-content: flex-end;
}

.sg-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    background: var(--sg-chip);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--sg-text-muted);
}

.sg-chip[data-platform="instagram"] { background: linear-gradient(135deg, rgba(245, 133, 41, 0.4), rgba(189, 47, 124, 0.36)); }
.sg-chip[data-platform="tiktok"] { background: linear-gradient(135deg, rgba(37, 244, 238, 0.35), rgba(254, 44, 85, 0.35)); }
.sg-chip[data-platform="twitter"] { background: linear-gradient(135deg, rgba(29, 161, 242, 0.42), rgba(34, 117, 206, 0.35)); }
.sg-chip[data-platform="telegram"] { background: linear-gradient(135deg, rgba(0, 136, 204, 0.4), rgba(22, 170, 236, 0.32)); }
.sg-chip[data-platform="pinterest"] { background: linear-gradient(135deg, rgba(230, 0, 35, 0.4), rgba(255, 85, 136, 0.32)); }

/* ═══════════════════════════════════════════════════════════════════════════
   INSTAGRAM-STYLE TWO COLUMN LAYOUT
   Media Left | Info Right | No Scroll | Fixed Viewport
   ═══════════════════════════════════════════════════════════════════════════ */

.sg-grid {
    display: grid !important;
    grid-template-columns: 1fr 380px !important;
    gap: 0 !important;
    max-width: 1100px !important;
    height: calc(100vh - 120px) !important;
    margin: 100px auto 20px !important;
    background: #0d0d1a !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LEFT COLUMN - Media/Stage Area
   ═══════════════════════════════════════════════════════════════════════════ */

.sg-hero {
    display: flex !important;
    flex-direction: column !important;
    background: #000 !important;
    height: 100% !important;
    overflow: hidden !important;
    position: relative !important;
}

.sg-hero-header { display: none !important; }
.sg-stage-intel { display: none !important; }
.sg-stage-nav-rail { display: none !important; }
.sg-progress { display: none !important; }
.sg-ribbon { display: none !important; }
.sg-action-dock { display: none !important; }
.sg-stage-lights { display: none !important; }

.sg-stage {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #000 !important;
    border-radius: 0 !important;
    border: none !important;
    padding: 20px !important;
    margin: 0 !important;
    max-width: none !important;
    box-shadow: none !important;
    overflow: hidden !important;
    height: 100% !important;
}

.sg-stage-frame {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.sg-embed--native {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.sg-embed--native img,
.sg-embed--native video {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4) !important;
}

.sg-embed--instagram {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: auto !important;
}

.sg-embed--instagram .instagram-media {
    max-width: 100% !important;
    min-width: 300px !important;
}

.sg-embed--twitter,
.sg-embed--telegram {
    width: 100% !important;
    max-width: 500px !important;
    margin: auto !important;
    padding: 20px !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RIGHT COLUMN - Sidebar with Info
   ═══════════════════════════════════════════════════════════════════════════ */

.sg-sidebar {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: linear-gradient(180deg, #12121f 0%, #0d0d18 100%) !important;
    border-left: 1px solid rgba(255,255,255,0.06) !important;
}

/* Custom scrollbar for sidebar */
.sg-sidebar::-webkit-scrollbar {
    width: 6px !important;
}
.sg-sidebar::-webkit-scrollbar-track {
    background: transparent !important;
}
.sg-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15) !important;
    border-radius: 3px !important;
}
.sg-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.25) !important;
}

.sg-sidebar .sg-card {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    padding: 18px 20px !important;
    margin: 0 !important;
}

.sg-sidebar .sg-card:last-child {
    border-bottom: none !important;
}

.sg-card--caption .sg-author {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 14px !important;
}

.sg-avatar {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #fff !important;
}

.sg-author-handle {
    font-weight: 600 !important;
    font-size: 15px !important;
    color: #f1f1f1 !important;
    display: block !important;
}

.sg-meta-line {
    font-size: 12px !important;
    color: #888 !important;
}

.sg-caption-body {
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: #e0e0e0 !important;
}

.sg-caption-body.rtl {
    direction: rtl !important;
    text-align: right !important;
}

.sg-caption-body .hashtag {
    color: #8b9cf9 !important;
}

.sg-card-heading {
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    color: #666 !important;
    margin-bottom: 12px !important;
    font-weight: 600 !important;
}

.sg-insight-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.sg-insight {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 10px 0 !important;
}

.sg-insight-icon {
    font-size: 20px !important;
}

.sg-insight-title {
    font-size: 11px !important;
    color: #666 !important;
    text-transform: uppercase !important;
    margin: 0 0 2px !important;
}

.sg-insight-value {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #f1f1f1 !important;
    margin: 0 !important;
}

.sg-insight-hint {
    font-size: 12px !important;
    color: #888 !important;
    margin: 2px 0 0 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DESKTOP ACTION BAR - Sticky at bottom of sidebar
   ═══════════════════════════════════════════════════════════════════════════ */

.sg-desktop-actions {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 16px 18px !important;
    background: linear-gradient(180deg, rgba(13,13,26,0) 0%, rgba(13,13,26,1) 30%) !important;
    border-top: 1px solid rgba(255,255,255,0.05) !important;
    position: sticky !important;
    bottom: 0 !important;
    margin-top: auto !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

.sg-daction--download {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 14px 20px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    border-radius: 10px !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.sg-daction--download:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(102,126,234,0.4) !important;
}

.sg-daction--download svg {
    width: 20px !important;
    height: 20px !important;
}

.sg-daction-group {
    display: flex !important;
    gap: 6px !important;
}

.sg-daction-btn {
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 10px !important;
    color: #b0b0b0 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}

.sg-daction-btn:hover {
    background: rgba(255,255,255,0.12) !important;
    color: #fff !important;
    border-color: rgba(255,255,255,0.15) !important;
}

.sg-daction-btn svg {
    width: 18px !important;
    height: 18px !important;
}

    border-bottom: 1px solid var(--sg-border-soft);
    padding: 16px;
    margin: 0;
}

.sg-sidebar .sg-card:last-child {
    border-bottom: none;
}

/* Caption card styling */
.sg-card--caption .sg-author {
    margin-bottom: 12px;
}

.sg-caption-body {
    font-size: 0.95rem;
    line-height: 1.5;
}

.sg-caption-body.rtl {
    direction: rtl;
    text-align: right;
}

/* Smaller headings */
.sg-card-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sg-text-muted);
    margin-bottom: 12px;
}
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sg-stage {
    position: relative;
    border-radius: var(--sg-radius-lg);
    border: 1px solid var(--sg-border-soft);
    background: linear-gradient(160deg, rgba(17, 19, 32, 0.92), rgba(12, 14, 24, 0.72));
    overflow: hidden;
    padding: clamp(10px, 1.8vw, 16px);
    box-shadow: 0 40px 80px rgba(6, 8, 20, 0.6);
    transform: rotateX(var(--sg-tilt-y, 0deg)) rotateY(var(--sg-tilt-x, 0deg));
    transition: transform 320ms ease;
    max-width: min(520px, 100%);
    margin-inline: auto;
}

.sg-stage-lights {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 50% at 80% 20%, rgba(99, 109, 255, 0.35), transparent 65%),
        radial-gradient(70% 60% at 20% 80%, rgba(33, 212, 253, 0.22), transparent 60%);
    mix-blend-mode: screen;
    opacity: 0.85;
    pointer-events: none;
}

.sg-cache-indicator {
    position: absolute;
    top: 18px;
    left: 18px;
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    background: rgba(8, 10, 18, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--sg-warning);
    z-index: 3;
}

.sg-cache-indicator.cached {
    color: var(--sg-success);
}

.sg-stage-frame {
    position: relative;
    border-radius: calc(var(--sg-radius-lg) - 12px);
    overflow: hidden;
    aspect-ratio: 9 / 16;
    background: rgba(3, 5, 12, 0.9);
    display: grid;
    place-items: center;
    max-height: min(78vh, 720px);
}

.sg-stage-frame video,
.sg-stage-frame img,
.sg-stage-frame iframe,
.sg-stage-frame blockquote {
    width: 100%;
    height: 100%;
    display: block;
}

.sg-stage-frame video {
    object-fit: contain;
    background: black;
}

.sg-embed {
    width: 100%;
    height: 100%;
    background: rgba(10, 12, 20, 0.82);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sg-embed--instagram blockquote {
    background: transparent !important;
}

.sg-embed--twitter,
.sg-embed--telegram {
    padding: clamp(18px, 3vw, 24px);
    gap: 18px;
}

.sg-embed--twitter header,
.sg-embed--telegram header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sg-embed--twitter .sg-avatar,
.sg-embed--telegram .sg-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(80, 96, 255, 0.32);
    font-size: 1rem;
}

.sg-embed-body {
    color: var(--sg-text-muted);
    line-height: 1.6;
    word-break: break-word;
}

.sg-embed-media img,
.sg-embed-media video {
    width: 100%;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.sg-embed-cta {
    align-self: flex-start;
    padding: 10px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(99, 109, 255, 0.85), rgba(63, 70, 255, 0.85));
    color: white;
    font-weight: 600;
    text-decoration: none;
    transition: transform var(--sg-transition), box-shadow var(--sg-transition);
}

.sg-embed-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(99, 109, 255, 0.35);
}

.sg-stage-intel {
    display: flex;
    gap: var(--sg-gap-sm);
    flex-wrap: wrap;
    margin-top: var(--sg-gap-sm);
}

.sg-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.08);
    color: var(--sg-text-muted);
}

.sg-stage-nav-rail {
    display: flex;
    gap: var(--sg-gap-sm);
    margin-top: var(--sg-gap-md);
    flex-wrap: wrap;
}

.sg-stage-nav {
    position: relative;
    flex: 1;
    min-width: 220px;
    padding: clamp(18px, 3vw, 22px);
    border-radius: var(--sg-radius-md);
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(140deg, rgba(18, 21, 32, 0.9), rgba(12, 14, 24, 0.7));
    color: inherit;
    text-align: left;
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--sg-transition), box-shadow var(--sg-transition);
}

.sg-stage-nav::before {
    content: "";
    position: absolute;
    inset: -12px;
    background: var(--sg-nav-cover, none);
    background-size: cover;
    background-position: center;
    opacity: 0.18;
    filter: saturate(140%);
    transform: scale(1.05);
    transition: opacity var(--sg-transition), transform var(--sg-transition);
}

.sg-stage-nav strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-top: 8px;
}

.sg-stage-nav-meta {
    font-size: 0.86rem;
    color: var(--sg-text-soft);
}

.sg-stage-nav:hover::before,
.sg-stage-nav:focus-visible::before {
    opacity: 0.32;
    transform: scale(1.12);
}

.sg-stage-nav:hover,
.sg-stage-nav:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(6, 10, 24, 0.4);
}

.sg-progress {
    position: relative;
    margin-top: -6px;
    padding: 18px 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sg-progress-meter {
    position: relative;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.sg-progress-meter::after {
    content: "";
    position: absolute;
    inset: 0;
    width: var(--sg-progress-width, 0%);
    background: linear-gradient(90deg, rgba(99, 109, 255, 0.9), rgba(33, 212, 253, 0.9));
    transition: width var(--sg-progress-duration, 160ms) linear;
}

.sg-progress-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sg-text-soft);
}

.sg-ribbon {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--sg-gap-sm);
    padding: clamp(18px, 3vw, 24px);
    border-radius: var(--sg-radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(145deg, rgba(20, 24, 38, 0.85), rgba(14, 16, 24, 0.8));
}

.sg-ribbon-label {
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sg-text-soft);
}

.sg-ribbon strong {
    display: block;
    margin-top: 8px;
    font-size: 1.3rem;
}

.sg-action-dock {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sg-gap-sm);
    align-items: center;
    justify-content: space-between;
    padding: clamp(16px, 3vw, 22px);
    background: linear-gradient(140deg, rgba(18, 20, 34, 0.92), rgba(12, 14, 24, 0.78));
    border-radius: var(--sg-radius-md);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sg-action-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    background: linear-gradient(135deg, #6b74ff, #2fb7ff);
    color: white;
    box-shadow: 0 20px 40px rgba(63, 82, 255, 0.45);
    transition: transform var(--sg-transition), box-shadow var(--sg-transition);
}

.sg-action-primary:hover,
.sg-action-primary:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 24px 52px rgba(63, 82, 255, 0.55);
}

.sg-action-secondary {
    display: inline-flex;
    gap: 12px;
    flex-wrap: wrap;
}

.sg-action-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--sg-text-muted);
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--sg-transition), transform var(--sg-transition);
}

.sg-action-pill:hover,
.sg-action-pill:focus-visible {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.sg-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--sg-gap-md);
}

.sg-card {
    background: var(--sg-panel);
    border-radius: var(--sg-radius-md);
    border: 1px solid var(--sg-border-soft);
    padding: clamp(20px, 3vw, 28px);
    display: flex;
    flex-direction: column;
    gap: var(--sg-gap-sm);
    box-shadow: 0 24px 46px rgba(6, 8, 20, 0.45);
}

.sg-card-heading {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.sg-card--caption {
    gap: 18px;
}

.sg-author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sg-avatar {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    color: white;
    background: linear-gradient(145deg, rgba(105, 116, 255, 0.8), rgba(47, 183, 255, 0.6));
}

.sg-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sg-author-handle {
    font-weight: 600;
}

.sg-meta-line {
    color: var(--sg-text-soft);
    font-size: 0.9rem;
}

.sg-caption-body {
    line-height: 1.7;
    color: var(--sg-text-muted);
    font-size: 1rem;
    word-break: break-word;
}

.sg-caption-body.rtl {
    direction: rtl;
    text-align: right;
}

.sg-caption-body .hashtag {
    color: var(--sg-accent);
    font-weight: 600;
}

.sg-caption-toggle {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border: none;
    background: none;
    color: var(--sg-text-soft);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: color var(--sg-transition);
}

.sg-caption-toggle:hover,
.sg-caption-toggle:focus-visible {
    color: var(--sg-accent);
}

.sg-insight-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sg-insight {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.sg-insight-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.sg-insight-title {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    color: var(--sg-text-soft);
}

.sg-insight-value {
    font-size: 1.05rem;
    font-weight: 600;
    margin-top: 6px;
}

.sg-insight-hint {
    font-size: 0.9rem;
    color: var(--sg-text-muted);
    margin-top: 6px;
}

.sg-hashtag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sg-hashtag-cloud span {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--sg-text-muted);
    font-weight: 500;
}

.sg-navigation {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sg-nav-card {
    border-radius: var(--sg-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 16px 18px;
    background: rgba(15, 17, 28, 0.82);
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform var(--sg-transition), border-color var(--sg-transition);
}

.sg-nav-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sg-nav-card:not(.disabled):hover,
.sg-nav-card:not(.disabled):focus-visible {
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.16);
}

.sg-nav-overline {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--sg-text-soft);
}

.sg-nav-card strong {
    display: block;
    margin-top: 8px;
    font-weight: 600;
    font-size: 1rem;
}

.sg-nav-meta {
    font-size: 0.85rem;
    margin-top: 6px;
    color: var(--sg-text-muted);
}

.sg-related-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.sg-related-card {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 14px;
    padding: 12px;
    border-radius: var(--sg-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(18, 20, 34, 0.78);
    color: inherit;
    text-decoration: none;
    transition: transform var(--sg-transition), border-color var(--sg-transition);
}

.sg-related-card:hover,
.sg-related-card:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(99, 109, 255, 0.28);
}

.sg-related-thumb {
    border-radius: var(--sg-radius-sm);
    background: radial-gradient(circle at 30% 30%, rgba(80, 90, 255, 0.3), rgba(10, 12, 20, 0.9));
    background-image: var(--sg-related-cover, none);
    background-size: cover;
    background-position: center;
    min-height: 84px;
}

.sg-related-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sg-related-platform {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sg-text-soft);
}

.sg-card--note .sg-disclaimer {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--sg-text-soft);
}

.sg-loader {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(4, 5, 12, 0.7);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
    z-index: 90;
}

.sg-loader.active {
    opacity: 1;
    pointer-events: auto;
}

.sg-spinner {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.12);
    border-top-color: rgba(255, 255, 255, 0.75);
    animation: sg-spin 0.9s linear infinite;
}

@keyframes sg-spin {
    to { transform: rotate(360deg); }
}

.sg-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translate(-50%, 120%);
    padding: 14px 20px;
    border-radius: 999px;
    background: rgba(15, 17, 26, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--sg-text-main);
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: transform var(--sg-transition), opacity var(--sg-transition);
    opacity: 0;
    z-index: 100;
}

.sg-toast.visible {
    transform: translate(-50%, 0);
    opacity: 1;
}

[data-sg-swipe-hint] {
    position: fixed;
    bottom: clamp(16px, 4vw, 34px);
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(12, 14, 24, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--sg-text-muted);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: opacity 400ms ease, transform 400ms ease;
    z-index: 80;
}

[data-sg-swipe-hint].hide {
    opacity: 0;
    transform: translate(-50%, 20px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE - Instagram Explorer Style for Mobile
   Full screen media with floating overlays
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
    /* Hide topbar on mobile */
    .sg-topbar {
        display: none !important;
    }
    
    /* Full screen container */
    .sg-shell {
        padding-top: 0 !important;
    }
    
    .sg-grid {
        display: block !important;
        position: relative !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        background: #000 !important;
        overflow: hidden !important;
    }

    /* Media takes full screen */
    .sg-hero {
        position: absolute !important;
        inset: 0 !important;
        height: 100% !important;
        width: 100% !important;
        z-index: 1 !important;
    }
    
    .sg-stage {
        height: 100% !important;
        width: 100% !important;
    }
    
    .sg-stage-frame {
        height: 100% !important;
    }
    
    .sg-embed--native img,
    .sg-embed--native video {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    
    .sg-embed--instagram {
        background: #000 !important;
    }

    /* Sidebar becomes floating overlay at bottom */
    .sg-sidebar {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: auto !important;
        max-height: 55vh !important;
        background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.8) 60%, transparent 100%) !important;
        border: none !important;
        border-radius: 24px 24px 0 0 !important;
        z-index: 10 !important;
        padding-top: 30px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* Swipe indicator */
    .sg-sidebar::before {
        content: '' !important;
        position: absolute !important;
        top: 10px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 40px !important;
        height: 4px !important;
        background: rgba(255,255,255,0.4) !important;
        border-radius: 4px !important;
    }
    
    .sg-sidebar .sg-card {
        background: transparent !important;
        border: none !important;
        border-bottom: 1px solid rgba(255,255,255,0.08) !important;
        padding: 14px 16px !important;
    }
    
    .sg-sidebar .sg-card:last-child {
        border-bottom: none !important;
        padding-bottom: 30px !important;
    }
    
    /* Author row - Instagram style */
    .sg-card--caption .sg-author {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        margin-bottom: 10px !important;
    }
    
    .sg-avatar {
        width: 34px !important;
        height: 34px !important;
        font-size: 12px !important;
        border: 2px solid #fff !important;
    }
    
    .sg-author-handle {
        font-size: 14px !important;
        font-weight: 700 !important;
        color: #fff !important;
    }
    
    .sg-meta-line {
        font-size: 11px !important;
        color: rgba(255,255,255,0.6) !important;
    }
    
    /* Caption */
    .sg-caption-body {
        font-size: 13px !important;
        line-height: 1.5 !important;
        color: rgba(255,255,255,0.9) !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 3 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }
    
    .sg-caption-body .hashtag {
        color: #8bb9fe !important;
    }
    
    .sg-caption-toggle {
        color: rgba(255,255,255,0.5) !important;
        font-size: 12px !important;
        margin-top: 6px !important;
    }
    
    /* Hide some cards on mobile for cleaner look */
    .sg-sidebar .sg-card[aria-label="Smart insights"],
    .sg-sidebar .sg-card[aria-label="Hashtag cloud"],
    .sg-sidebar .sg-card[aria-label="Navigate posts"],
    .sg-sidebar .sg-card[aria-label="Usage notice"] {
        display: none !important;
    }
    
    /* Hide desktop action bar on mobile */
    .sg-desktop-actions {
        display: none !important;
    }
    
    /* Keep related posts visible */
    .sg-sidebar .sg-card[aria-label="Related posts"] {
        display: block !important;
    }
    
    .sg-card-heading {
        font-size: 11px !important;
        color: rgba(255,255,255,0.5) !important;
    }
    
    /* Related posts - horizontal scroll */
    .sg-related-grid {
        display: flex !important;
        gap: 8px !important;
        overflow-x: auto !important;
        padding-bottom: 8px !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .sg-related-card {
        flex: 0 0 100px !important;
        min-width: 100px !important;
    }
    
    .sg-related-thumb {
        height: 100px !important;
        border-radius: 8px !important;
    }
    
    .sg-related-info {
        display: none !important;
    }
    
    /* ═══════════════════════════════════════════════════════════════════════════
       MOBILE INSTAGRAM-STYLE FLOATING ACTION BAR
       ═══════════════════════════════════════════════════════════════════════════ */
    
    /* Mobile Top Bar - Instagram style */
    .sg-mobile-topbar {
        display: flex !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 50px !important;
        background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%) !important;
        z-index: 100 !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 12px !important;
    }
    
    .sg-mobile-back {
        width: 40px !important;
        height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #fff !important;
        text-decoration: none !important;
    }
    
    .sg-mobile-back svg {
        width: 24px !important;
        height: 24px !important;
    }
    
    .sg-mobile-user {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }
    
    .sg-mobile-avatar {
        width: 28px !important;
        height: 28px !important;
        border-radius: 50% !important;
        background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%) !important;
        color: #fff !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .sg-mobile-username {
        color: #fff !important;
        font-size: 14px !important;
        font-weight: 600 !important;
    }
    
    .sg-mobile-menu {
        width: 40px !important;
        height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #fff !important;
        text-decoration: none !important;
    }
    
    .sg-mobile-menu svg {
        width: 20px !important;
        height: 20px !important;
    }
    
    /* Floating Action Bar - Right side like Instagram */
    .sg-mobile-fab {
        display: flex !important;
        flex-direction: column !important;
        position: fixed !important;
        right: 12px !important;
        bottom: 50% !important;
        transform: translateY(50%) !important;
        gap: 16px !important;
        z-index: 100 !important;
    }
    
    .sg-fab-btn {
        width: 48px !important;
        height: 48px !important;
        border-radius: 50% !important;
        background: rgba(0,0,0,0.5) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        border: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #fff !important;
        text-decoration: none !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
    }
    
    .sg-fab-btn:active {
        transform: scale(0.92) !important;
        background: rgba(255,255,255,0.2) !important;
    }
    
    .sg-fab-btn svg {
        width: 24px !important;
        height: 24px !important;
    }
    
    .sg-fab-btn--like.is-liked {
        background: rgba(255,48,64,0.8) !important;
    }
    
    .sg-fab-btn--like.is-liked svg {
        fill: #fff !important;
    }
    
    .sg-fab-btn--download {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    }
    
    /* Hide desktop elements on mobile */
    .sg-hero-header,
    .sg-hero-tag,
    .sg-stage-intel,
    .sg-stage-nav-rail,
    .sg-progress,
    .sg-ribbon,
    .sg-action-dock {
        display: none !important;
    }
}

/* Hide mobile elements on desktop */
.sg-mobile-fab,
.sg-mobile-topbar {
    display: none;
}

/* Extra small screens */
@media (max-width: 480px) {
    .sg-sidebar {
        max-height: 50vh !important;
        padding-top: 25px !important;
    }
    
    .sg-sidebar .sg-card {
        padding: 12px 14px !important;
    }
    
    .sg-avatar {
        width: 30px !important;
        height: 30px !important;
    }
    
    .sg-author-handle {
        font-size: 13px !important;
    }
    
    .sg-caption-body {
        font-size: 12px !important;
        -webkit-line-clamp: 2 !important;
    }
    
    .sg-fab-btn {
        width: 44px !important;
        height: 44px !important;
    }
    
    .sg-fab-btn svg {
        width: 22px !important;
        height: 22px !important;
    }
    
    .sg-mobile-fab {
        gap: 12px !important;
        right: 10px !important;
    }
}
    .sg-topbar-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .sg-topbar-badges {
        width: 100%;
        justify-content: flex-start;
    }

    .sg-hero-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .sg-stage-nav-rail {
        flex-direction: column;
    }

    .sg-action-dock {
        flex-direction: column;
        align-items: stretch;
    }

    .sg-action-secondary {
        width: 100%;
    }

    .sg-action-pill {
        flex: 1;
        justify-content: center;
    }

    .sg-sidebar {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .sg-grid {
        margin-top: clamp(40px, 12vw, 68px);
    }

    .sg-stage {
        padding: 12px;
    }

    .sg-stage-frame {
        border-radius: 18px;
    }

    .sg-progress {
        padding-top: 12px;
    }

    .sg-ribbon {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .sg-related-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .sg-related-thumb {
        min-height: 140px;
    }
}

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

    .sg-sunrise,
    .sg-stage {
        transition: none !important;
    }
}

/* Video Autoplay & Unmute Button */
.sg-embed--native {
    position: relative;
}

.sg-video-player {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
    background: #000;
    border-radius: 12px;
}

.sg-unmute-btn {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 10;
}

@media (max-width: 768px) {
    .sg-unmute-btn {
        bottom: 220px;
    }
}

.sg-unmute-btn:hover {
    background: rgba(102, 126, 234, 0.9);
    transform: translateX(-50%) scale(1.05);
}

.sg-embed-media {
    position: relative;
}

.sg-embed-media .sg-unmute-btn {
    bottom: 15px;
}

/* Like Button Active State & Animation */
.sg-fab-btn--like.liked,
.sg-fab-btn--like.liked:hover {
    background: linear-gradient(135deg, #ff4d6d 0%, #c9184a 100%);
    border-color: #c9184a;
}

.sg-fab-btn--like.liked svg {
    fill: white;
    stroke: white;
}

.sg-fab-btn--like.animate {
    animation: likeHeartPop 0.3s ease-out;
}

@keyframes likeHeartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Hide comment button (disabled per request) */
.sg-fab-btn--comment {
    display: none !important;
}

/* Ensure share buttons are visible */
[data-sg-share],
[data-sg-share-mobile] {
    display: flex !important;
}

/* X/Twitter Embed - Full Width Video Like Instagram */
.sg-embed--twitter .sg-embed-media--full {
    position: relative;
    width: 100%;
    aspect-ratio: 9/16;
    max-height: 80vh;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.sg-embed--twitter .sg-embed-media--full video,
.sg-embed--twitter .sg-embed-media--full img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.sg-embed--twitter .sg-embed-overlay {
    position: absolute;
    bottom: 60px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    z-index: 5;
}

.sg-embed--twitter .sg-embed-overlay .sg-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.sg-embed--twitter .sg-embed-overlay .sg-username {
    font-weight: 600;
    font-size: 14px;
}

.sg-embed--twitter .sg-embed-overlay .sg-meta-line {
    font-size: 12px;
    opacity: 0.8;
    margin: 0;
}

.sg-embed--twitter .sg-embed-caption {
    padding: 12px 0;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255,255,255,0.9);
    max-height: 100px;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .sg-embed--twitter .sg-embed-media--full {
        border-radius: 0;
        max-height: 70vh;
    }
    
    .sg-embed--twitter .sg-embed-overlay {
        bottom: 80px;
    }
}
