/* ShotGram v139.43 — the upload flow, rebuilt like Instagram.
   Full screen and always dark (like Instagram's camera roll and editor):
   1 · pick   — big preview, "Gallery ›" + Select, grid, POST · STORY · REEL · LIVE
   2 · edit   — big picture, Audio · Text · Filter · Edit (· Trim)
   3 · post   — picture, caption, rows, a big blue Share
   Sized for every iPhone, including Pro Max (430 × 932). */

:root { --ig-blue: #0095f6; --ig-line: #262626; --ig-chip: #262626;
  --ig-top: max(var(--sa-t, 0px), env(safe-area-inset-top, 0px));
  --ig-bot: max(var(--sa-b, 0px), env(safe-area-inset-bottom, 0px)); }

body.create-open { overflow: hidden; }
body.create-open .topbar, body.create-open .tabbar { display: none !important; }

.ig-flow { position: fixed !important; inset: 0; z-index: 60; margin: 0 !important; padding: 0 !important;
  background: #000 !important; color: #fff; display: flex; flex-direction: column; overflow: hidden; }
.ig-flow > * { width: 100%; max-width: 600px; margin-inline: auto; }
.ig-flow .cx-progress { display: none !important; }
.ig-flow .cx-head { position: relative; flex: none; background: #000; -webkit-backdrop-filter: none; backdrop-filter: none;
  grid-template-columns: 56px 1fr 72px; padding: calc(var(--ig-top) + 4px) 8px 6px; }
.ig-flow .cx-icon { background: none; width: 44px; height: 44px; }
.ig-flow .cx-icon svg { width: 26px; height: 26px; }
.ig-flow .cx-title b { font-size: 17px; font-weight: 700; }
.ig-flow .cx-next { justify-self: end; background: none; box-shadow: none; color: var(--ig-blue); padding: 8px 6px; font-size: 16px; font-weight: 700; border-radius: 8px; }
.ig-flow .cx-next:disabled { color: rgba(0, 149, 246, .4); opacity: 1; }
.ig-flow #flowBody { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.ig-flow[data-step="2"] #flowBody { overflow: hidden; display: flex; flex-direction: column; }
.ig-flow button { -webkit-tap-highlight-color: transparent; }
.ig-flow input[type=range], .ig-text-composer input[type=range] { -webkit-appearance: none; appearance: none; height: 2px; border-radius: 2px;
  background: rgba(255, 255, 255, .35); outline: none; margin: 0; }
.ig-flow input[type=range]::-webkit-slider-thumb, .ig-text-composer input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, .6); }
.ig-flow input[type=range]::-moz-range-thumb, .ig-text-composer input[type=range]::-moz-range-thumb {
  width: 24px; height: 24px; border: 0; border-radius: 50%; background: #fff; }

/* ---------------------------------------------------------------- 1 · pick */
.ig-pick { display: flex; flex-direction: column; min-height: 100%; }
.ig-pick-preview { position: relative; width: 100%; aspect-ratio: 1; max-height: 50dvh; flex: none; background: #121212; overflow: hidden; }
.ig-pick-preview .ig-pick-media { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-pick-preview.fit .ig-pick-media { object-fit: contain; background: #000; }
.ig-pick-preview.over { outline: 2px dashed var(--ig-blue); outline-offset: -6px; }
.ig-round { position: absolute; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(38, 38, 38, .85); color: #fff;
  display: grid; place-items: center; z-index: 3; }
.ig-round svg { width: 18px; height: 18px; }
.ig-fit { left: 12px; bottom: 12px; }
.ig-count { position: absolute; top: 12px; inset-inline-end: 12px; padding: 3px 9px; border-radius: 999px; background: rgba(0, 0, 0, .6); font-size: 12px; font-weight: 700; }
.ig-pick-empty { width: 100%; height: 100%; border: 0; background: none; color: #fff; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; padding: 20px; }
.ig-pick-empty-ic { width: 76px; height: 76px; border-radius: 50%; border: 2px solid #fff; display: grid; place-items: center; margin-bottom: 6px; }
.ig-pick-empty-ic svg { width: 36px; height: 36px; }
.ig-pick-empty b { font-size: 19px; font-weight: 600; }
.ig-pick-empty span:last-child { font-size: 13px; color: rgba(255, 255, 255, .6); }
.ig-pick-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; flex: none; }
.ig-recents { display: flex; align-items: center; gap: 4px; border: 0; background: none; color: #fff; font-size: 17px; font-weight: 700; padding: 4px 0; }
.ig-recents svg { width: 16px; height: 16px; transform: rotate(90deg); }
.ig-select { display: flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; background: #363636; color: #fff; padding: 7px 13px; font-size: 14px; font-weight: 600; }
.ig-select svg { width: 17px; height: 17px; }
.ig-select.on { background: var(--ig-blue); }
.ig-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; padding-bottom: calc(86px + var(--ig-bot)); }
.ig-tile { position: relative; aspect-ratio: 3 / 4; background: #1c1c1c; overflow: hidden; border: 0; padding: 0; color: #fff; }
.ig-tile img, .ig-tile video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.ig-tile.on::after { content: ''; position: absolute; inset: 0; background: rgba(255, 255, 255, .32); pointer-events: none; }
.ig-tile-action { display: grid; place-content: center; justify-items: center; gap: 6px; font-size: 12px; font-weight: 600; background: #161616; }
.ig-tile-action svg { width: 28px; height: 28px; }
.ig-tile-dur { position: absolute; right: 6px; bottom: 5px; font-size: 12px; font-weight: 600; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.ig-tile-num { position: absolute; top: 6px; right: 6px; z-index: 2; width: 22px; height: 22px; border-radius: 50%; background: var(--ig-blue);
  border: 1.5px solid #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.ig-tile-x { position: absolute; top: 6px; left: 6px; z-index: 2; width: 24px; height: 24px; border-radius: 50%; border: 0;
  background: rgba(0, 0, 0, .62); color: #fff; display: grid; place-items: center; padding: 0; }
.ig-tile-x svg { width: 13px; height: 13px; }
.ig-modes { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(14px + var(--ig-bot)); z-index: 5; display: flex; gap: 2px;
  padding: 5px; border-radius: 999px; background: rgba(38, 38, 38, .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .5); width: auto !important; max-width: calc(100% - 24px) !important; }
.ig-modes button { border: 0; background: none; color: rgba(255, 255, 255, .7); font-size: 13px; font-weight: 700; letter-spacing: .05em; padding: 9px 15px; border-radius: 999px; white-space: nowrap; }
.ig-modes button.on { color: #fff; background: rgba(255, 255, 255, .16); }

/* ---------------------------------------------------------------- 2 · edit */
.ig-edit { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.ig-edit-stage { flex: 1; min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.ig-edit-stage::-webkit-scrollbar { display: none; }
.ig-edit-stage.locked { overflow: hidden; }
.ig-edit-slide { flex: 0 0 100%; height: 100%; display: flex; align-items: center; justify-content: center; scroll-snap-align: center; scroll-snap-stop: always; }
.ig-edit-frame { position: relative; overflow: hidden; border-radius: 8px; background: #111; touch-action: pan-x; }
.ig-edit-frame.adjusting { touch-action: none; cursor: grab; border-radius: 0; }
.ig-edit-media { width: 100%; height: 100%; object-fit: cover; display: block; transform-origin: center; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.ig-edit-overlays { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.ig-edit-overlays .media-overlay { pointer-events: auto; touch-action: none; cursor: move; }
.ig-edit-frame.adjusting .ig-edit-overlays { opacity: .35; }
.ig-edit-frame.adjusting .media-overlay { pointer-events: none; }
.ig-grid-lines { position: absolute; inset: 0; pointer-events: none; border: 1px solid rgba(255, 255, 255, .7); }
.ig-grid-lines i { position: absolute; background: rgba(255, 255, 255, .45); }
.ig-grid-lines i:nth-child(1) { left: 33.33%; top: 0; bottom: 0; width: 1px; }
.ig-grid-lines i:nth-child(2) { left: 66.66%; top: 0; bottom: 0; width: 1px; }
.ig-grid-lines i:nth-child(3) { top: 33.33%; left: 0; right: 0; height: 1px; }
.ig-grid-lines i:nth-child(4) { top: 66.66%; left: 0; right: 0; height: 1px; }
.ig-edit-trash { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 6; width: 52px; height: 52px; border-radius: 50%;
  border: 1.5px solid #fff; background: rgba(0, 0, 0, .45); color: #fff; display: grid; place-items: center; transition: transform .15s, background .15s; pointer-events: none; }
.ig-edit-trash svg { width: 24px; height: 24px; }
.ig-edit-trash.hot { transform: translateX(-50%) scale(1.22); background: #ed4956; border-color: #ed4956; }
.ig-edit-meta { position: relative; flex: none; height: 38px; display: flex; align-items: center; justify-content: center; }
.ig-edit-meta .ig-round { top: 3px; inset-inline-end: 12px; background: #262626; }
.ig-dots { display: flex; gap: 5px; }
.ig-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .35); transition: background .15s; }
.ig-dots i.on { background: var(--ig-blue); }
.ig-edit-panel { flex: none; padding-bottom: calc(8px + var(--ig-bot)); background: #000; min-height: calc(86px + var(--ig-bot)); }
.ig-toolbar { display: flex; justify-content: space-around; padding: 6px 4px 2px; }
.ig-toolbar button { display: grid; justify-items: center; align-content: start; gap: 6px; min-width: 60px; padding: 6px 2px; border: 0; background: none; color: #fff; font-size: 12px; font-weight: 500; }
.ig-toolbar svg { width: 27px; height: 27px; }
.ig-aa { display: block; height: 27px; line-height: 27px; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.ig-tool-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 6px 14px 10px; }
.ig-tool-head button { border: 0; background: none; color: #fff; font-size: 15px; padding: 6px 2px; justify-self: start; }
.ig-tool-head button.done { justify-self: end; color: var(--ig-blue); font-weight: 700; }
.ig-tool-head b { font-size: 15px; font-weight: 700; }
.ig-filter-strip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 14px 10px; scrollbar-width: none; }
.ig-filter-strip::-webkit-scrollbar { display: none; }
.ig-filter { flex: none; width: 74px; display: grid; justify-items: center; gap: 6px; border: 0; background: none; padding: 0; color: rgba(255, 255, 255, .65); font-size: 12px; font-weight: 600; }
.ig-filter-thumb { display: block; width: 74px; height: 74px; border-radius: 4px; overflow: hidden; background: #222; }
.ig-filter-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-filter.on { color: #fff; }
.ig-filter.on .ig-filter-thumb { outline: 2px solid #fff; outline-offset: 2px; }
.ig-apply-all { display: block; margin: 0 auto 2px; border: 0; background: none; color: var(--ig-blue); font-size: 14px; font-weight: 600; padding: 4px 10px; }
.ig-adjust-list { display: flex; gap: 4px; overflow-x: auto; padding: 2px 10px 12px; scrollbar-width: none; }
.ig-adjust-list::-webkit-scrollbar { display: none; }
.ig-adjust-tool { flex: none; width: 76px; display: grid; justify-items: center; gap: 8px; border: 0; background: none; color: #fff; font-size: 12px; padding: 0; }
.ig-adjust-ic { width: 58px; height: 58px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .45); display: grid; place-items: center; }
.ig-adjust-ic svg { width: 26px; height: 26px; }
.ig-adjust-tool.changed .ig-adjust-ic { border-color: var(--ig-blue); box-shadow: inset 0 0 0 1px var(--ig-blue); }
.ig-aspects { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding: 0 12px 10px; }
.ig-aspects button { border: 1px solid rgba(255, 255, 255, .28); background: none; color: #fff; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; }
.ig-aspects button.on { background: #fff; color: #000; border-color: #fff; }
.ig-slider-row { display: flex; align-items: center; gap: 14px; padding: 6px 20px; font-size: 13px; }
.ig-slider-row input { flex: 1; }
.ig-hint { margin: 6px 0 2px; text-align: center; font-size: 12px; color: rgba(255, 255, 255, .55); }
.ig-big-slider { display: grid; justify-items: center; gap: 12px; padding: 4px 26px 16px; }
.ig-big-slider output { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ig-big-slider input { width: 100%; }

/* Instagram's text screen */
.ig-text-composer { position: fixed; left: 0; right: 0; top: 0; height: 100dvh; z-index: 900; display: flex; flex-direction: column;
  color: #fff; background: rgba(0, 0, 0, .66); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); padding-top: var(--ig-top); }
.ig-tc-top { display: flex; align-items: center; gap: 10px; padding: 8px 14px; flex: none; }
.ig-tc-top .grow { flex: 1; }
.ig-tc-done { border: 0; background: none; color: #fff; font-size: 17px; font-weight: 700; padding: 6px 4px; }
.ig-tc-bg, .ig-tc-del { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid #fff; background: none; color: #fff; display: grid; place-items: center; font-size: 17px; font-weight: 800; padding: 0; }
.ig-tc-del svg { width: 19px; height: 19px; }
.ig-tc-bg span { line-height: 1; padding: 2px 4px; border-radius: 4px; }
.ig-tc-bg.bg-box span { background: #fff; color: #000; }
.ig-tc-bg.bg-soft span { background: rgba(255, 255, 255, .35); }
.ig-tc-mid { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; }
.ig-tc-size { position: absolute; left: 10px; top: 50%; width: 34px; height: 210px; margin-top: -105px; z-index: 2; touch-action: none; cursor: ns-resize; }
.ig-tc-size-track { position: absolute; left: 50%; top: 0; bottom: 0; width: 0; margin-left: -9px;
  border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 210px solid rgba(255, 255, 255, .55);
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .4)); }
.ig-tc-size-knob { position: absolute; left: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .55); pointer-events: none; }
.ig-tc-field { flex: 1; display: flex; justify-content: center; padding: 0 44px; }
#tcText { width: 100%; max-width: 100%; border: 0; outline: none; resize: none; overflow: hidden; background: transparent; color: #fff;
  text-align: center; font-weight: 700; line-height: 1.15; padding: .12em .42em; border-radius: .28em; caret-color: var(--ig-blue);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .35); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
#tcText::placeholder { color: rgba(255, 255, 255, .55); }
.ig-tc-bottom { flex: none; display: grid; gap: 12px; padding: 8px 0 calc(12px + var(--ig-bot)); }
.ig-tc-fonts, .ig-tc-colors { display: flex; overflow-x: auto; scrollbar-width: none; }
.ig-tc-fonts::-webkit-scrollbar, .ig-tc-colors::-webkit-scrollbar { display: none; }
.ig-tc-fonts { gap: 8px; padding: 0 14px; }
.ig-tc-fonts button { flex: none; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .2); color: #fff; padding: 7px 15px; font-size: 14px; }
.ig-tc-fonts button.on { background: #fff; color: #000; }
.ig-tc-colors { gap: 12px; padding: 4px 16px; }
.ig-tc-colors button { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; padding: 0; transition: transform .12s; }
.ig-tc-colors button.on { transform: scale(1.25); box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }

.ig-audio-body { display: grid; gap: 12px; padding: 4px 2px 6px; }
.ig-audio-body .compose-field, .ig-audio-body .compose-item { margin: 0; }
.ig-mute-row { display: flex; align-items: center; gap: 10px; padding: 10px 2px; }
.ig-mute-row svg { width: 18px; height: 18px; vertical-align: -3px; }

/* ---------------------------------------------------------------- 3 · post */
.ig-post { padding-bottom: calc(100px + var(--ig-bot)); }
.ig-post-top { display: flex; justify-content: center; padding: 14px 16px 8px; }
.ig-post-thumb { position: relative; width: min(48vw, 210px); border-radius: 6px; overflow: hidden; background: #111; }
.ig-post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-post-many { position: absolute; top: 8px; inset-inline-end: 8px; display: flex; align-items: center; gap: 3px; padding: 3px 8px; border-radius: 999px;
  background: rgba(0, 0, 0, .6); font-size: 12px; font-weight: 700; }
.ig-post-many svg { width: 14px; height: 14px; }
.ig-cover-btn { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); border: 0; border-radius: 7px; background: rgba(38, 38, 38, .88);
  color: #fff; font-size: 12.5px; font-weight: 600; padding: 7px 11px; white-space: nowrap; }
.ig-caption { position: relative; padding: 6px 16px 10px; border-bottom: 1px solid var(--ig-line); }
.ig-caption #caption { width: 100%; min-height: 72px; border: 0; outline: none; resize: none; background: none; color: #fff; font-size: 16px; line-height: 1.4; padding: 6px 0; font-family: inherit; }
.ig-caption #caption::placeholder { color: rgba(255, 255, 255, .5); }
.ig-caption .mention-box { position: relative; bottom: auto; margin: 4px 0 8px; background: #1c1c1c; border-color: var(--ig-line); }
.ig-caption-tools { display: flex; align-items: center; gap: 8px; }
.ig-caption-tools .grow { flex: 1; }
.ig-chip { border: 0; border-radius: 8px; background: var(--ig-chip); color: #fff; font-size: 13px; font-weight: 600; padding: 7px 12px; }
.ig-rows { display: grid; padding-top: 4px; }
.ig-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 10px 16px; border: 0; background: none; color: #fff;
  font-size: 16px; text-align: start; cursor: pointer; font-family: inherit; }
.ig-row:active { background: rgba(255, 255, 255, .05); }
.ig-row > svg:first-child { width: 24px; height: 24px; flex: none; }
.ig-row > svg:last-child:not(:first-child) { width: 16px; height: 16px; flex: none; opacity: .55; }
.ig-row .grow { flex: 1; min-width: 0; }
.ig-row .switch { margin-inline-start: auto; }
.ig-row-val { color: rgba(255, 255, 255, .55); font-size: 14px; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-row-loc { cursor: text; }
.ig-row-input { flex: 1; min-width: 0; border: 0; outline: none; background: none; color: #fff; font-size: 16px; font-family: inherit; padding: 6px 0; }
.ig-row-input::placeholder { color: #fff; opacity: 1; }
.ig-row-btn { flex: none; border: 0; border-radius: 8px; background: var(--ig-chip); color: #fff; font-size: 13px; font-weight: 600; padding: 7px 12px; }
.ig-rows .location-selected, .ig-rows .location-results { margin: 0 16px 8px; }
.ig-row-static { cursor: default; }
.ig-flag { width: 24px; text-align: center; font-size: 21px; flex: none; }
.ig-more summary { list-style: none; }
.ig-more summary::-webkit-details-marker { display: none; }
.ig-more summary > svg:last-child { transition: transform .15s; }
.ig-more[open] summary > svg:last-child { transform: rotate(180deg); }
.ig-more-body { padding-bottom: 6px; }
.ig-field { display: grid; gap: 6px; padding: 6px 16px 10px; }
.ig-field-top { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.ig-field .input { background: #121212; border-color: var(--ig-line); color: #fff; font-size: 16px; }
.ig-post #uploadState { padding: 0 16px; }
.ig-share-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; padding: 12px 16px calc(12px + var(--ig-bot));
  background: linear-gradient(rgba(0, 0, 0, 0), #000 32%); max-width: none !important; }
.ig-share-btn { display: block; width: 100%; max-width: 568px; height: 50px; margin: 0 auto; border: 0; border-radius: 12px; background: var(--ig-blue);
  color: #fff; font-size: 16px; font-weight: 700; }
.ig-share-btn:active { filter: brightness(.92); }
.ig-share-btn:disabled { opacity: .55; }

/* the full studio (Trim) — fit small and large iPhones */
@media (max-width: 600px) {
  .modal-backdrop .studio { max-height: calc(100dvh - var(--ig-top) - var(--ig-bot) - 20px); overflow-y: auto; }
}

/* RTL: chevrons point the other way, the size slider moves right */
html[dir="rtl"] .ig-recents svg { transform: rotate(90deg); }
html[dir="rtl"] .ig-tc-size { left: auto; right: 10px; }

/* v139.44 — title and description both visible on "New post" */
.ig-title-row { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--ig-line); padding: 4px 0 8px; margin-bottom: 4px; }
.ig-title-row input { flex: 1; min-width: 0; border: 0; outline: none; background: none; color: #fff; font-size: 17px; font-weight: 700; padding: 6px 0; font-family: inherit; }
.ig-title-row input::placeholder { color: rgba(255, 255, 255, .45); font-weight: 600; }
