/* ShotGram v118 — the post composer, rebuilt for iPhone (Instagram-style) */
.studio-flow { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
.cx-head { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 8px;
  padding: calc(env(safe-area-inset-top, 0px) + 6px) 12px 8px; background: rgba(5, 6, 13, .92);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.cx-icon { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; }
.cx-icon svg { width: 22px; height: 22px; }
.cx-title { text-align: center; display: grid; line-height: 1.2; min-width: 0; }
.cx-title b { font-size: 17px; }
.cx-title span { font-size: 12px; color: rgba(255,255,255,.55); }
.cx-title span:empty { display: none; }
.cx-next { border: 0; border-radius: 999px; padding: 9px 18px; font-weight: 800; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, #0ab4fb, #6a2bff 55%, #cd0efb); box-shadow: 0 6px 18px rgba(106,43,255,.35); }
.cx-next:disabled { opacity: .35; box-shadow: none; }
.cx-progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 0 14px 10px; }
.cx-progress i { height: 3px; border-radius: 3px; background: rgba(255,255,255,.12); transition: background .2s; }
.cx-progress i.on, .cx-progress i.done { background: linear-gradient(90deg, #0ab4fb, #cd0efb); }
.studio-flow .flow-steps, .studio-flow .creator-intro { display: none !important; }

/* step 1 */
.cx-pick { border: 0 !important; background: none !important; padding: 0 12px !important; display: grid; gap: 12px; }
.cx-preview { position: relative; width: 100%; aspect-ratio: 4 / 5; max-height: 62vh; border-radius: 22px; overflow: hidden; background: #000; }
.cx-preview img, .cx-preview video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cx-count { position: absolute; top: 10px; inset-inline-end: 10px; padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.55); font-size: 12px; font-weight: 700; }
.cx-empty { aspect-ratio: 4 / 5; max-height: 52vh; border-radius: 22px; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center;
  background: radial-gradient(80% 60% at 50% 30%, rgba(106,43,255,.25), transparent 70%), rgba(255,255,255,.04); border: 1px dashed rgba(255,255,255,.14); }
.cx-empty-icon { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #0ab4fb, #6a2bff 55%, #cd0efb); box-shadow: 0 12px 34px rgba(106,43,255,.4); }
.cx-empty-icon svg { width: 36px; height: 36px; }
.cx-empty b { font-size: 18px; margin-top: 6px; }
.cx-actions { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }
.cx-action { display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; border-radius: 16px; border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.06); color: #fff; font-weight: 700; font-size: 15px; }
.cx-action.main { border: 0; background: linear-gradient(135deg, #0ab4fb, #6a2bff 55%, #cd0efb); }
.cx-action svg { width: 20px; height: 20px; }
.cx-tray { display: flex !important; gap: 8px; overflow-x: auto; padding: 4px 12px 8px !important; scrollbar-width: none; }
.cx-tray::-webkit-scrollbar { display: none; }
.cx-tray .tray-tile { flex: none; width: 72px; height: 72px; border-radius: 14px; overflow: hidden; position: relative; }
.cx-tray .tray-tile img, .cx-tray .tray-tile video { width: 100%; height: 100%; object-fit: cover; }
.cx-tray .tray-tile .chip-btn.remove { width: 22px; height: 22px; top: 4px; inset-inline-end: 4px; }
.cx-add { flex: none; width: 72px; height: 72px; border-radius: 14px; border: 1px dashed rgba(255,255,255,.25); background: rgba(255,255,255,.04); color: #fff; display: grid; place-items: center; }

/* step 2 */
.studio-flow .edit-stage-wrap { padding: 0 12px; }
.studio-flow .edit-stage { border-radius: 22px; overflow: hidden; max-height: 58vh; }
.studio-flow .edit-grid { display: flex !important; gap: 10px; overflow-x: auto; padding: 12px; scrollbar-width: none; }
.studio-flow .edit-grid::-webkit-scrollbar { display: none; }
.studio-flow .edit-card { flex: none; width: 168px; border-radius: 18px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); padding: 8px; }
.studio-flow .edit-card-media { border-radius: 12px; overflow: hidden; aspect-ratio: 1; }
.studio-flow .edit-card-media img, .studio-flow .edit-card-media video { width: 100%; height: 100%; object-fit: cover; }
.studio-flow .edit-card-info { padding: 6px 2px; }
.studio-flow .edit-badges { display: none; }
.studio-flow .edit-card-actions { display: flex; align-items: center; gap: 2px; }
.studio-flow .edit-card-actions .btn { flex: 1; justify-content: center; border-radius: 10px; }
.studio-flow .edit-card.add { display: grid; place-content: center; justify-items: center; gap: 6px; min-height: 230px; color: #fff; }
.studio-flow .switch-row { margin: 0 12px; border-radius: 16px; }

/* step 3 */
.cx-detail-top { display: flex; align-items: center; gap: 12px; padding: 4px 2px 12px; }
.cx-detail-thumb { position: relative; width: 74px; height: 92px; flex: none; border-radius: 12px; overflow: hidden; background: #000; }
.cx-detail-thumb img, .cx-detail-thumb video { width: 100%; height: 100%; object-fit: cover; }
.cx-detail-thumb i { position: absolute; bottom: 4px; inset-inline-end: 4px; font-style: normal; font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 999px; background: rgba(0,0,0,.6); }
.cx-detail-hint { font-size: 13px; color: rgba(255,255,255,.65); }
.studio-flow .studio-layout { padding: 0 12px; }
.studio-flow .studio-card { border-radius: 20px; }
@media (max-width: 760px) {
  .studio-flow .studio-preview { display: none !important; }
  .studio-flow .studio-layout { display: block; }
}
@media (min-width: 761px) { .cx-detail-top { display: none; } }
.studio-flow .edit-card { display: flex !important; flex-direction: column; gap: 6px; width: 150px; }
.studio-flow .edit-card-media { width: 100%; position: relative; }
.studio-flow .edit-card-info { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.studio-flow .edit-card-info .tiny { font-size: 11px; }
.studio-flow .edit-card-actions [data-left], .studio-flow .edit-card-actions [data-right] { display: none; }
.studio-flow .edit-card-actions .icon-btn { width: 36px; height: 36px; flex: none; }
.studio-flow .caption-row { display: block; }
.studio-flow .studio-description { width: 100%; margin: 0; }
