:root {
    --green: #22c55e; --amber: #f59e0b; --red: #ef4444;
    --bg: #f8f7f5; --card: #ffffff; --border: #e5e7eb;
    --text: #111827; --muted: #6b7280; --sidebar: #1c1c1e;
    --sage: #768F7F; --sage-dark: #5a7868;
    --mustard: #febe2a; --mustard-dark: #DBA84D;
    --warm-white: #FAF7F2;
    --sewn-gray: #6d6e71;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

/* LOGIN — server-authenticated, SEWN-branded */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.login-screen { display: flex; flex-direction: column; min-height: 100vh; background: var(--sage); }
.login-screen[hidden], #portal[hidden] { display: none !important; }
.login-header { background: #fff; padding: 18px 36px; }
.login-header-logo { display: block; width: auto; height: 30px; }
.login-content { flex: 1; display: flex; align-items: center; justify-content: center; padding: 28px; }
.login-box { width: min(100%, 520px); padding: 52px 56px 46px; border-radius: 0; background: #fff; box-shadow: 0 14px 42px rgba(0,0,0,.12); text-align: center; }
.login-kicker { margin-bottom: 12px; color: var(--sewn-gray); font: 700 12px/1.2 'Montserrat', sans-serif; letter-spacing: 1.6px; text-transform: uppercase; }
.login-title { margin-bottom: 14px; color: var(--sage-dark); font: 400 30px/1.2 'Tenor Sans', sans-serif; letter-spacing: 1px; text-transform: uppercase; }
.login-copy { margin: 0 auto 26px; max-width: 370px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.login-box input { display: block; width: 100%; margin-bottom: 14px; padding: 14px 16px; border: 1.5px solid var(--sage); border-radius: 0; outline: none; color: var(--text); background: #fff; font: inherit; }
.login-box input:focus { border-color: var(--sage-dark); box-shadow: 0 0 0 3px rgba(90,120,104,.15); }
.login-box button { width: 100%; padding: 13px 18px; border: 2px solid var(--sage-dark); border-radius: 0; background: #fff; color: var(--sage-dark); cursor: pointer; font: 700 13px/1.2 'Montserrat', sans-serif; letter-spacing: 1.5px; text-transform: uppercase; transition: background .15s, color .15s; }
.login-box button:hover, .login-box button:focus-visible { background: var(--sage-dark); color: #fff; }
.login-box button:disabled { cursor: wait; opacity: .65; }
.login-status { min-height: 20px; margin-top: 12px; color: #991b1b; font-size: 13px; }
.login-footer { padding: 26px; display: flex; justify-content: center; }
.login-footer-logo { height: 28px; width: auto; }

/* PORTAL */
  #portal { min-height: 100vh; }
  .header { background: var(--sage); border-bottom: none; padding: 0 28px; height: 72px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; }
  .header-logo { height: 28px; width: auto; display: block; }
  .header-brand { font-size: 13px; font-weight: 700; letter-spacing: .5px; color: var(--warm-white); text-transform: uppercase; }
  .header-title { font-size: 16px; font-weight: 700; color: #fff; }
  .header-right { display: flex; align-items: center; gap: 16px; }
  .connection-pill { padding: 6px 10px; border: 1px solid rgba(255,255,255,.45); color: #fff; font-size: 11px; letter-spacing: .2px; white-space: nowrap; }
  .connection-pill.ok { border-color: #bbf7d0; background: rgba(22,163,74,.28); }
  .connection-pill.warn { border-color: #fde68a; background: rgba(217,119,6,.3); }
  .connection-pill.error { border-color: #fecaca; background: rgba(220,38,38,.28); }
  .last-updated { color: rgba(255,255,255,.82); font-size: 11px; white-space: nowrap; }
  .header-btn { padding: 8px 12px; border: 1.5px solid #fff; border-radius: 0; background: transparent; color: #fff; cursor: pointer; font: 700 11px/1 'Montserrat', sans-serif; letter-spacing: 1px; text-transform: uppercase; }
  .header-btn:hover, .header-btn:focus-visible { background: #fff; color: var(--sage-dark); }
  .header-btn:disabled { cursor: wait; opacity: .55; }
  .header-btn-muted { border-color: rgba(255,255,255,.5); }
  .progress-wrap { display: flex; align-items: center; gap: 10px; }
  .progress-bar-bg { width: 160px; height: 6px; background: rgba(255,255,255,.25); border-radius: 99px; overflow: hidden; }
  .progress-bar-fill { height: 100%; background: var(--mustard); border-radius: 99px; transition: width .4s; }
  .progress-label { font-size: 13px; color: var(--warm-white); white-space: nowrap; }
  .submit-btn { background: var(--mustard); color: #5a5a5a; border: 1.5px solid var(--mustard-dark); border-radius: 999px; padding: 9px 22px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .2s; }
  .submit-btn:hover { background: var(--mustard-dark); }
  .page-footer { background: #fff; border-top: 1px solid var(--border); padding: 32px 24px; display: flex; justify-content: center; }
  .page-footer-logo { height: 28px; width: auto; }

  .body-wrap { display: flex; min-height: calc(100vh - 64px); }

  /* SIDEBAR */
  .sidebar { width: 240px; background: #1c1c1e; color: #fff; padding: 24px 16px; position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto; flex-shrink: 0; }
  .sidebar-section { margin-bottom: 28px; }
  .sidebar-label { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: #6b7280; margin-bottom: 12px; font-weight: 600; }
  .sidebar-meta { font-size: 13px; color: #d1d5db; line-height: 1.8; }
  .sidebar-meta span { color: #fff; font-weight: 600; }
  .stat-row { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 13px; }
  .stat-val { font-weight: 700; }
  .stat-val.green { color: var(--green); }
  .stat-val.amber { color: var(--amber); }

  .batch-nav { display: flex; align-items: center; gap: 6px; margin: 6px 0 8px; }
  .batch-nav-btn { background: #2c2c2e; border: none; color: #9ca3af; border-radius: 6px; width: 28px; height: 28px; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .batch-nav-btn:hover { background: #3f3f46; color: #fff; }
  .all-posts-btn { display: block; width: 100%; padding: 7px 10px; border: 1px solid #4a5568; border-radius: 0; background: transparent; color: #d1d5db; cursor: pointer; font: 600 12px/1.2 inherit; transition: all .15s; }
  .all-posts-btn.active { background: #4a5568; color: #fff; }

  .reel-video-embed { margin: 12px 0 4px; border-radius: 10px; overflow: hidden; background: #000; }
  .reel-video-embed iframe { display: block; width: 100%; height: 340px; border: none; }
  .filter-btn { display: block; width: 100%; text-align: left; padding: 8px 12px; border-radius: 8px; border: none; background: transparent; color: #9ca3af; font-size: 13px; cursor: pointer; margin-bottom: 4px; transition: all .15s; }
  .filter-btn:hover { background: #2c2c2e; color: #fff; }
  .filter-btn.active { background: #3f3f46; color: #fff; font-weight: 600; }
  .filter-count { float: right; background: rgba(0,0,0,.15); border-radius: 99px; padding: 1px 7px; font-size: 11px; }
  .filter-btn.active .filter-count { background: var(--mustard-dark); }

  /* FEED */
  .feed { flex: 1; padding: 32px 24px; max-width: 780px; margin: 0 auto; }
  .feed-empty { text-align: center; padding: 80px 0; color: var(--muted); font-size: 15px; }
  .loading { text-align: center; padding: 80px 0; color: var(--muted); }
  .spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: #6366f1; border-radius: 50%; animation: spin .7s linear infinite; margin: 0 auto 16px; }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* CARD */
  .post-card { background: var(--card); border-radius: 16px; border: 1px solid var(--border); margin-bottom: 28px; overflow: hidden; transition: box-shadow .2s; }
  .post-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.08); }
  .card-header { padding: 14px 16px 10px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
  .card-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1; }
  .tag { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 99px; letter-spacing: .3px; text-transform: uppercase; }
  .tag-ig { background: #e0e7ff; color: #4338ca; }
  .tag-fb { background: #dbeafe; color: #1d4ed8; }
  .tag-li { background: #e0f2fe; color: #0369a1; }
  .tag-blog { background: #f3e8ff; color: #7e22ce; }
  .tag-home { background: #dcfce7; color: #166534; }
  .tag-style { background: #fef9c3; color: #854d0e; }
  .tag-life { background: #ffedd5; color: #9a3412; }
  .tag-adventure { background: #f0fdf4; color: #15803d; }
  .tag-brand { background: #f5f3ff; color: #6d28d9; }
  .card-date { font-size: 12px; color: var(--muted); white-space: nowrap; display:flex; align-items:center; gap:4px; }
  .date-edit { font-size: 12px; color: var(--muted); border: none; background: transparent; cursor: pointer; padding: 0; font-family: inherit; outline: none; }
  .date-edit:hover, .date-edit:focus { color: #C0535C; }
  .date-saved { font-size: 11px; min-width: 14px; transition: opacity .3s; }
  .status-badge { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 99px; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; }
  .s-pending { background: #fef3c7; color: #92400e; }
  .s-approved { background: #dcfce7; color: #166534; }
  .s-changes { background: #fee2e2; color: #991b1b; }

  /* IG PREVIEW */
  .ig-preview { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .ig-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
  .ig-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #f97316, #ec4899); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: #fff; }
  .ig-handle { font-size: 13px; font-weight: 700; color: var(--text); }
  .ig-location { font-size: 11px; color: var(--muted); }
  .ig-image-wrap { position: relative; background: #f3f4f6; aspect-ratio: 4/5; overflow: hidden; }
  .ig-image-wrap img { width: 100%; height: auto; display: block; object-fit: contain; }
  .ig-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; color: #9ca3af; }
  .ig-placeholder svg { opacity: .35; }
  .ig-placeholder span { font-size: 12px; }
  .reel-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.15); }
  .reel-preview-btn { display: block; margin: 10px 0 4px; padding: 8px 16px; background: #111; color: #fff; font-size: 13px; font-weight: 600; text-align: center; border-radius: 8px; text-decoration: none; letter-spacing: .02em; transition: background .15s; }
  .reel-preview-btn:hover { background: #374151; }
  .play-btn { width: 56px; height: 56px; background: rgba(255,255,255,.92); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 12px rgba(0,0,0,.2); }
  .type-badge { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 6px; letter-spacing: .5px; }
  .carousel-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; }
  .carousel-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.6); }
  .carousel-dots span.active { background: #fff; width: 18px; border-radius: 99px; }
  .ig-actions { display: flex; gap: 14px; padding: 10px 14px 6px; }
  .ig-caption { padding: 0 14px 4px; font-size: 13px; line-height: 1.6; color: var(--text); }
  .ig-caption strong { font-weight: 700; }
  .ig-hashtags { padding: 0 14px 12px; font-size: 12px; color: #6366f1; line-height: 1.6; }
  .notes-row { padding: 8px 16px; font-size: 12px; color: var(--muted); background: #f9fafb; border-top: 1px solid var(--border); }
  .notes-row strong { color: var(--text); }

  .actions-row { padding: 14px 16px; display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
  .action-btn { padding: 9px 18px; border-radius: 8px; font-size: 14px; font-weight: 600; border: none; cursor: pointer; transition: all .15s; display: flex; align-items: center; gap: 6px; }
  .btn-approve { background: #dcfce7; color: #166534; }
  .btn-approve:hover { background: #bbf7d0; }
  .btn-approve.active { background: #16a34a; color: #fff; }
  .btn-changes { background: #fee2e2; color: #991b1b; }
  .btn-changes:hover { background: #fecaca; }
  .btn-changes.active { background: #dc2626; color: #fff; }
  /* Comment wrap — hidden until Request Changes clicked */
  .comment-wrap { display: none; padding: 0 16px 14px; flex-direction: column; gap: 8px; }
  .comment-wrap.visible { display: flex; }
  .comment-wrap textarea { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 13px; resize: vertical; min-height: 120px; outline: none; font-family: inherit; color: var(--text); transition: border-color .15s; }
  .comment-wrap textarea:focus { border-color: #dc2626; }
  .comment-wrap textarea::placeholder { color: #9ca3af; }
  .char-counter { font-size: 11px; text-align: right; color: #9ca3af; transition: color .15s; }
  .char-counter.over-limit { color: #ef4444; font-weight: 600; }
  .submit-changes-btn { align-self: flex-end; padding: 9px 20px; background: #dc2626; color: #fff; border: none; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s; }
  .submit-changes-btn:hover { background: #b91c1c; }
  .submit-changes-btn:disabled, .cap-save-btn:disabled, .action-btn:disabled { cursor: not-allowed; opacity: .55; }

  .buffer-result { margin: 0 16px 14px; padding: 10px 12px; border: 1px solid #fde68a; background: #fffbeb; color: #92400e; font-size: 12px; line-height: 1.5; }
  .buffer-result.ok { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }

  .confirm-backdrop { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 20px; background: rgba(17,24,39,.62); }
  .confirm-backdrop[hidden] { display: none; }
  .confirm-dialog { width: min(100%, 430px); padding: 30px; border-radius: 0; background: #fff; box-shadow: 0 22px 65px rgba(0,0,0,.28); }
  .confirm-dialog h2 { margin-bottom: 10px; color: var(--text); font: 400 22px/1.25 'Tenor Sans', sans-serif; letter-spacing: .5px; text-transform: uppercase; }
  .confirm-dialog p { color: var(--muted); font-size: 14px; line-height: 1.6; }
  .confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

  /* Changes requested footer */
  .changes-footer { padding: 10px 16px; background: #fff7ed; border-top: 1px solid #fed7aa; font-size: 13px; color: #9a3412; font-weight: 500; }

  /* Caption edit UI */
  .cap-edit-btn { margin-top: auto; padding: 8px 16px; background: #f3f4f6; color: #374151; border: 1px solid var(--border); border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s; align-self: flex-start; }
  .cap-edit-btn:hover { background: #e5e7eb; }
  .cap-edit-area { display: none; width: 100%; border: 1px solid #6366f1; border-radius: 8px; padding: 8px 12px; font-size: 13px; line-height: 1.55; font-family: inherit; color: var(--text); resize: vertical; min-height: 180px; outline: none; }
  .cap-edit-actions { display: none; gap: 8px; flex-wrap: wrap; }
  .cap-save-btn { padding: 7px 18px; background: #16a34a; color: #fff; border: none; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
  .cap-save-btn:hover { background: #15803d; }
  .cap-cancel-btn { padding: 7px 14px; background: #f3f4f6; color: #374151; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; cursor: pointer; }
  .cap-cancel-btn:hover { background: #e5e7eb; }

  @media (max-width: 640px) {
    .sidebar { display: none; }
    .feed { padding: 16px; }
    .progress-wrap { display: none; }
    .header { height: auto; min-height: 68px; padding: 14px 16px; align-items: flex-start; }
    .header-right { justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
    .last-updated { flex-basis: 100%; text-align: right; }
    .connection-pill { display: none; }
    .login-header { padding: 16px 20px; }
    .login-box { padding: 38px 24px 34px; }
    .login-title { font-size: 24px; }
  }

  /* MULTI-IMAGE CAROUSEL (comma-separated URLs in Image URL column) */
  .ig-image-wrap:has(.multi-carousel) { aspect-ratio: 4/5; }
  .multi-carousel { position: absolute; inset: 0; width: 100%; height: 100%; }
  .ig-image-wrap .multi-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s ease; display: block; }
  .ig-image-wrap .multi-slide.active { opacity: 1; z-index: 1; }
  .ig-image-wrap .carousel-dots { z-index: 2; }
  .ig-image-wrap .carousel-dots span { cursor: pointer; transition: width .2s, background .2s; }

  /* LINKEDIN DOC POST TILE (when row has PDF URL) */
  .linkedin-pdf-tile { border-top: 1px solid var(--border); }
  .linkedin-pdf-tile .li-header { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #f3f6f8; font-size: 12px; color: #0a66c2; font-weight: 600; letter-spacing: .02em; }
  .linkedin-pdf-tile .li-header svg { width: 14px; height: 14px; }
  .linkedin-pdf-tile .li-frame { position: relative; width: 100%; aspect-ratio: 4/5; background: #000; overflow: hidden; }
  .linkedin-pdf-tile .li-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
  .linkedin-pdf-tile .li-pill-tl { position: absolute; top: 12px; left: 12px; background: rgba(0,0,0,0.65); color: #fff; font-size: 11px; padding: 4px 10px; border-radius: 4px; display: flex; align-items: center; gap: 6px; font-weight: 500; }
  .linkedin-pdf-tile .li-pill-tl svg { width: 12px; height: 12px; }
  .linkedin-pdf-tile .li-pill-bc { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.7); color: #fff; font-size: 11px; padding: 4px 10px; border-radius: 12px; }
  .linkedin-pdf-tile .li-cta { display: block; padding: 12px 16px; background: #0a66c2; color: #fff !important; font-size: 13px; font-weight: 600; text-align: center; text-decoration: none; transition: background .15s; }
  .linkedin-pdf-tile .li-cta:hover { background: #084d92; }

  /* ============================================
     PHONE FRAME + NATIVE PLATFORM MOCKUPS (v2)
     ============================================ */
  .pf-tabs { display: flex; gap: 6px; padding: 12px 16px 4px; }
  .pf-tab-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--border); background: #fff; border-radius: 999px; font-size: 12px; font-weight: 600; color: #6b7280; cursor: pointer; transition: all .15s; }
  .pf-tab-btn:hover { border-color: #6366f1; color: #6366f1; }
  .pf-tab-btn.active { background: #111827; color: #fff; border-color: #111827; }

  .phone-frame { max-width: 393px; margin: 12px auto 16px; background: #1c1c1e; border-radius: 48px; padding: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.2); position: relative; }
  .phone-frame::before { content: ''; position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 125px; height: 30px; background: #000; border-radius: 18px; z-index: 5; }
  .phone-screen { background: #fff; border-radius: 38px; overflow: hidden; aspect-ratio: 9/19.5; display: flex; flex-direction: column; position: relative; }
  .phone-status { display: flex; justify-content: space-between; align-items: center; padding: 14px 28px 4px; font-size: 13px; font-weight: 600; color: #000; flex-shrink: 0; position: relative; z-index: 4; }
  .phone-status .ph-time { letter-spacing: -0.3px; }
  .phone-status .ph-icons { display: inline-flex; gap: 5px; align-items: center; }
  .phone-status .ph-icons svg { display: block; }

  .pf-view { display: none; }
  .pf-view.active { display: block; flex: 1; overflow-y: auto; min-height: 0; -webkit-overflow-scrolling: touch; }
  .pf-view.active::-webkit-scrollbar { width: 0; height: 0; }
  /* Reel stage fills the phone screen exactly */
  .pf-view.active > .reel-stage { aspect-ratio: auto; min-height: 100%; height: 100%; }
  /* When active view is a reel, status bar overlays in white */
  .phone-screen:has(.pf-view.active > .reel-stage) { background: #000; }
  .phone-screen:has(.pf-view.active > .reel-stage) > .phone-status { position: absolute; top: 0; left: 0; right: 0; color: #fff; z-index: 5; text-shadow: 0 1px 2px rgba(0,0,0,.5); padding-top: 16px; }
  .phone-screen:has(.pf-view.active > .reel-stage) > .pf-view.active { padding-top: 0; }

  /* Reel watch button (below phone frame) */
  .reel-watch-btn { display: block; margin: 6px auto 14px; max-width: 380px; padding: 11px 14px; background: #111; color: #fff !important; font-size: 13px; font-weight: 600; text-align: center; border-radius: 8px; text-decoration: none; transition: background .15s; }
  .reel-watch-btn:hover { background: #374151; }

  /* === REELS mockup (9:16, matches real IG Reels layout) === */
  .reel-stage { position: relative; aspect-ratio: 9/16; background: #000; overflow: hidden; }
  .reel-stage .reel-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .reel-stage .reel-bg-shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 18%, rgba(0,0,0,0) 55%, rgba(0,0,0,.75) 100%); pointer-events: none; }
  .reel-stage .reel-topbar { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; color: #fff; z-index: 3; }
  .reel-stage .reel-topbar .reel-back { font-size: 28px; line-height: 1; font-weight: 300; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
  .reel-stage .reel-topbar .reel-cam-top svg { width: 24px; height: 24px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
  .reel-stage .reel-side { position: absolute; right: 12px; bottom: 130px; display: flex; flex-direction: column; align-items: center; gap: 18px; z-index: 3; color: #fff; }
  .reel-stage .reel-side .reel-action { display: flex; flex-direction: column; align-items: center; gap: 2px; }
  .reel-stage .reel-side svg { width: 28px; height: 28px; stroke: #fff; fill: none; stroke-width: 1.7; filter: drop-shadow(0 1px 3px rgba(0,0,0,.7)); }
  .reel-stage .reel-side svg.filled { fill: #fff; }
  .reel-stage .reel-side .reel-action span { font-size: 12px; font-weight: 600; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
  .reel-stage .reel-audio-thumb { width: 28px; height: 28px; border-radius: 5px; overflow: hidden; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.5); }
  .reel-stage .reel-audio-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .reel-stage .reel-bottom { position: absolute; left: 14px; right: 64px; bottom: 60px; color: #fff; z-index: 3; }
  .reel-stage .reel-author { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
  .reel-stage .reel-author-pic { width: 38px; height: 38px; border-radius: 50%; padding: 2px; background: #e02d4f; box-sizing: border-box; flex-shrink: 0; }
  .reel-stage .reel-author-pic img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid #000; box-sizing: border-box; display: block; }
  .reel-stage .reel-handle { font-size: 16px; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.7); letter-spacing: -0.2px; }
  .reel-stage .reel-cap-line { font-size: 14px; line-height: 1.35; max-height: 1.4em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
  .reel-stage .reel-comment-bar { position: absolute; left: 14px; right: 14px; bottom: 14px; height: 38px; background: rgba(50,50,50,.7); border-radius: 22px; padding: 0 18px; display: flex; align-items: center; font-size: 14px; color: #d0d0d0; z-index: 3; backdrop-filter: blur(8px); }
  .fb-reel .reel-author-pic { background: #1877f2; }

  /* STAGE LAYOUT: phone frame + caption panel side-by-side (used for ALL post types) */
  .stage-layout { display: grid; grid-template-columns: 393px minmax(0, 1fr); gap: 16px; align-items: start; padding: 12px 14px; }
  .stage-layout .phone-frame { margin: 0; max-width: 393px; width: 100%; }
  .cap-panel { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 100%; }
  .cap-panel .cap-label { font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
  .cap-panel .cap-author { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
  .cap-panel .cap-author img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
  .cap-panel .cap-author .name { font-size: 13px; font-weight: 600; color: var(--text); }
  .cap-panel .cap-full { font-size: 13px; line-height: 1.55; color: var(--text); white-space: pre-wrap; word-wrap: break-word; flex: 1; overflow-y: auto; max-height: 540px; }
  .cap-panel .cap-tags { font-size: 13px; color: inherit; line-height: 1.5; padding-top: 8px; border-top: 1px solid var(--border); word-wrap: break-word; }
  @media (max-width: 840px) {
    .stage-layout { grid-template-columns: 1fr; }
    .stage-layout .phone-frame { max-width: 393px; justify-self: center; }
    .cap-panel .cap-full { max-height: 240px; }
  }

  /* === Instagram mockup === */
  .ig-v2-app-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 8px; border-bottom: 1px solid #efefef; }
  .ig-v2-app-bar .ig-back { font-size: 22px; line-height: 1; color: #000; }
  .ig-v2-app-bar .ig-app-title { font-weight: 700; font-size: 14px; color: #000; }
  .ig-v2-app-bar .ig-more { font-size: 18px; color: #000; }
  .ig-v2-post-header { display: flex; align-items: center; gap: 10px; padding: 9px 12px; }
  .ig-v2-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); padding: 2px; flex-shrink: 0; }
  .ig-v2-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 2px solid #fff; box-sizing: border-box; display: block; }
  .ig-v2-handle { font-size: 13px; font-weight: 600; color: #000; line-height: 1.2; }
  .ig-v2-location { font-size: 11px; color: #000; line-height: 1.2; }
  .ig-v2-more-btn { margin-left: auto; font-size: 18px; color: #000; }
  .ig-v2-img-wrap { position: relative; aspect-ratio: 4/5; background: #000; overflow: hidden; }
  .ig-v2-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .ig-v2-img-wrap .multi-slide { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .25s ease; object-fit: cover; }
  .ig-v2-img-wrap .multi-slide.active { opacity: 1; z-index: 1; }
  .ig-v2-img-wrap .ig-counter { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 12px; z-index: 3; }
  .ig-v2-img-wrap .ig-dots { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; z-index: 3; }
  .ig-v2-img-wrap .ig-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; transition: background .2s; }
  .ig-v2-img-wrap .ig-dots span.active { background: #0095f6; }
  .ig-v2-actions { display: flex; align-items: center; padding: 8px 12px 4px; }
  .ig-v2-actions svg { width: 26px; height: 26px; stroke: #000; fill: none; stroke-width: 1.7; }
  .ig-v2-actions > svg + svg { margin-left: 14px; }
  .ig-v2-actions .save-btn { margin-left: auto; }
  .ig-v2-likes { padding: 0 12px 4px; font-size: 13px; font-weight: 600; color: #000; }
  .ig-v2-caption { padding: 4px 12px; font-size: 13px; color: #000; line-height: 1.45; word-wrap: break-word; }
  .ig-v2-caption strong { font-weight: 600; }
  .ig-v2-hashtags { padding: 4px 12px 0; font-size: 13px; color: #00376b; line-height: 1.4; }
  .ig-v2-time { padding: 8px 12px 14px; font-size: 11px; color: #737373; text-transform: uppercase; }

  /* === Facebook mockup === */
  .fb-v2-app-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px; }
  .fb-v2-app-bar .fb-app-title { font-size: 22px; font-weight: 800; color: #1877f2; letter-spacing: -0.6px; font-family: -apple-system, sans-serif; }
  .fb-v2-app-bar .fb-icons { display: flex; gap: 12px; align-items: center; }
  .fb-v2-app-bar .fb-icon { width: 32px; height: 32px; border-radius: 50%; background: #e4e6eb; display: flex; align-items: center; justify-content: center; }
  .fb-v2-app-bar .fb-icon svg { width: 18px; height: 18px; color: #050505; }
  .fb-v2-post-header { display: flex; align-items: center; gap: 10px; padding: 10px 12px 6px; }
  .fb-v2-avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
  .fb-v2-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .fb-v2-name { font-size: 14px; font-weight: 600; color: #050505; line-height: 1.3; }
  .fb-v2-meta { font-size: 12px; color: #65676b; line-height: 1.3; display: flex; align-items: center; gap: 4px; }
  .fb-v2-meta svg { width: 11px; height: 11px; }
  .fb-v2-more { margin-left: auto; font-size: 18px; color: #65676b; }
  .fb-v2-caption { padding: 4px 12px 8px; font-size: 14px; line-height: 1.4; color: #050505; word-wrap: break-word; }
  .fb-v2-hashtags { padding: 0 12px 8px; font-size: 14px; color: #1877f2; line-height: 1.4; }
  .fb-v2-img-wrap { position: relative; aspect-ratio: 4/5; background: #f0f2f5; overflow: hidden; }
  .fb-v2-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .fb-v2-img-wrap .multi-slide { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .25s ease; object-fit: cover; }
  .fb-v2-img-wrap .multi-slide.active { opacity: 1; z-index: 1; }
  .fb-v2-img-wrap .fb-counter { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 12px; z-index: 3; }
  .fb-v2-engagement { display: flex; justify-content: space-between; padding: 8px 12px; font-size: 13px; color: #65676b; border-bottom: 1px solid #ced0d4; }
  .fb-v2-engagement .reactions { display: flex; align-items: center; gap: 4px; }
  .fb-v2-engagement .react-icons { display: inline-flex; }
  .fb-v2-engagement .react-icons span { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; margin-left: -4px; border: 2px solid #fff; }
  .fb-v2-engagement .react-icons span:first-child { margin-left: 0; background: #1877f2; }
  .fb-v2-engagement .react-icons span:nth-child(2) { background: #f33e58; }
  .fb-v2-actions { display: flex; padding: 4px; }
  .fb-v2-actions .fb-action-btn { flex: 1; padding: 8px; text-align: center; font-size: 13px; font-weight: 600; color: #65676b; display: flex; align-items: center; justify-content: center; gap: 6px; }
  .fb-v2-actions svg { width: 18px; height: 18px; }

  /* === LinkedIn mockup (inside phone frame) === */
  .li-v2-app-bar { display: flex; align-items: center; padding: 10px 12px 8px; gap: 10px; border-bottom: 1px solid #e0e0e0; }
  .li-v2-app-bar .li-app-icon { width: 28px; height: 28px; background: #0a66c2; color: #fff; display: flex; align-items: center; justify-content: center; border-radius: 4px; font-weight: 700; font-size: 16px; flex-shrink: 0; }
  .li-v2-app-bar .li-search { flex: 1; height: 32px; background: #edf3f8; border-radius: 4px; padding: 0 12px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: #666; }
  .li-v2-app-bar .li-search svg { width: 14px; height: 14px; }
  .li-v2-post-header { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px 8px; }
  .li-v2-avatar { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
  .li-v2-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .li-v2-name { font-weight: 600; font-size: 14px; color: #000; line-height: 1.25; }
  .li-v2-title { font-size: 12px; color: #666; line-height: 1.3; }
  .li-v2-time-row { font-size: 12px; color: #666; display: flex; align-items: center; gap: 4px; }
  .li-v2-caption { padding: 0 14px 12px; font-size: 14px; line-height: 1.5; color: #000; white-space: pre-wrap; word-wrap: break-word; }
  .li-v2-hashtags { padding: 0 14px 12px; font-size: 13px; color: #0a66c2; line-height: 1.4; }
  .li-v2-pdf-frame { position: relative; aspect-ratio: 4/5; background: #000; overflow: hidden; }
  .li-v2-pdf-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .li-v2-pdf-pill-tl { position: absolute; top: 12px; left: 12px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; padding: 4px 10px; border-radius: 4px; display: flex; align-items: center; gap: 6px; font-weight: 500; z-index: 2; }
  .li-v2-pdf-pill-bc { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.7); color: #fff; font-size: 11px; padding: 4px 10px; border-radius: 12px; z-index: 2; }
  .li-v2-cta { display: block; padding: 10px 14px; background: #0a66c2; color: #fff !important; font-size: 13px; font-weight: 600; text-align: center; text-decoration: none; }
  .li-v2-img-wrap { position: relative; aspect-ratio: 4/5; background: #000; overflow: hidden; }
  .li-v2-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .li-v2-img-wrap .multi-slide { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .25s ease; object-fit: cover; }
  .li-v2-img-wrap .multi-slide.active { opacity: 1; z-index: 1; }
  .li-v2-engagement { display: flex; justify-content: space-between; padding: 8px 14px; font-size: 12px; color: #666; border-top: 1px solid #e0e0e0; }
  .li-v2-actions { display: flex; padding: 4px; border-top: 1px solid #e0e0e0; }
  .li-v2-actions .li-action-btn { flex: 1; padding: 8px; text-align: center; font-size: 12px; font-weight: 600; color: #666; }

  /* LINKEDIN-ONLY POST CARD (no IG carousel, just PDF + caption like a real LI post) */
  .linkedin-only-card .li-author { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px 8px; border-top: 1px solid var(--border); }
  .linkedin-only-card .li-avatar { width: 44px; height: 44px; border-radius: 50%; background: #233E33; color: #FAF7F2; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex-shrink: 0; }
  .linkedin-only-card .li-author-meta { flex: 1; min-width: 0; }
  .linkedin-only-card .li-author-name { font-weight: 600; font-size: 14px; line-height: 1.3; color: #1a1a1a; }
  .linkedin-only-card .li-author-sub { font-size: 12px; color: #666; line-height: 1.3; }
  .linkedin-only-card .li-card-body { padding: 4px 16px 12px; }
  .linkedin-only-card .li-caption { font-size: 14px; line-height: 1.55; color: #1a1a1a; white-space: pre-wrap; }
  .linkedin-only-card .li-hashtags { font-size: 13px; color: #0a66c2; margin-top: 8px; line-height: 1.5; }
  .linkedin-only-card .linkedin-pdf-tile { border-top: 0; }
  .linkedin-only-card .linkedin-pdf-tile .li-header { display: none; }

  /* BLOG CARD (Type=Post, Platform=Blog) */
  .blog-card .blog-title { font-family: 'Tenor Sans', serif; font-size: 19px; font-weight: 400; color: #111; flex-basis: 100%; line-height: 1.3; letter-spacing: 0.5px; margin-top: 4px; text-transform: uppercase; }
  .blog-hero { width: 100%; aspect-ratio: 16/9; overflow: hidden; background: #f3f4f6; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .blog-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .blog-body { padding: 18px 16px 6px; }
  .blog-excerpt { font-size: 14px; line-height: 1.7; color: var(--text); margin-bottom: 14px; max-height: 9em; overflow: hidden; position: relative; }
  .blog-excerpt::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2.4em; background: linear-gradient(to bottom, rgba(255,255,255,0), #ffffff); pointer-events: none; }
  .blog-cta-btn { display: inline-block; margin: 6px 0 4px; padding: 11px 22px; background: #C0535C; color: #fff !important; font-size: 13px; font-weight: 600; text-align: center; border-radius: 8px; text-decoration: none; letter-spacing: .03em; transition: background .15s; }
  .blog-cta-btn:hover { background: #a04449; }
