[hidden] { display: none !important; }

.feature-home {
  min-height: 100vh;
  padding: 34px clamp(20px, 6vw, 90px) 70px;
  color: #f6f4f8;
  background:
    radial-gradient(ellipse at 85% 5%, rgba(129, 94, 170, .24), transparent 38%),
    radial-gradient(ellipse at 10% 90%, rgba(77, 102, 145, .18), transparent 38%),
    #111116;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.feature-home-inner { max-width: 1160px; margin: 0 auto; }
.feature-home-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0 80px;
}
.feature-logo { font: 27px Georgia, serif; letter-spacing: -1px; }
.feature-logo span { color: #c6a8e8; }
.feature-local { color: #a9a3b1; font-size: 10px; letter-spacing: 1.7px; }
.feature-kicker { color: #c6a8e8; font-size: 11px; letter-spacing: 2.4px; font-weight: 700; }
.feature-hero h1 {
  max-width: 780px; margin: 16px 0 18px;
  font: 500 clamp(42px, 7vw, 76px)/1.04 Georgia, serif;
  letter-spacing: -2px;
}
.feature-hero h1 em { color: #c6a8e8; font-weight: 400; }
.feature-hero p {
  max-width: 590px; color: #aaa5b0; font-size: 15px; line-height: 1.8;
}
.feature-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px; margin-top: 54px;
}
.feature-card {
  min-height: 225px; padding: 27px; display: flex; flex-direction: column;
  text-align: left; color: #f6f4f8; cursor: pointer;
  border: 1px solid #34303b; border-radius: 17px;
  background: linear-gradient(145deg, #211e27, #17161c);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.feature-card:hover { transform: translateY(-3px); border-color: #9879b8; background: #24202c; }
.feature-card-number { color: #bda0dc; font-size: 11px; letter-spacing: 2px; }
.feature-card-icon { margin: 23px 0 12px; font-size: 25px; color: #d5c1ec; }
.feature-card h2 { font: 25px Georgia, serif; margin: 0 0 10px; }
.feature-card p { max-width: 440px; margin: 0; color: #aaa5b0; font-size: 13px; line-height: 1.65; }
.feature-card-action { margin-top: auto; padding-top: 22px; color: #d5c1ec; font-size: 12px; }
.feature-home-footer { margin-top: 48px; color: #77727e; font-size: 11px; letter-spacing: .5px; }

.feature-back {
  position: fixed; z-index: 1000; top: 16px; left: 16px;
  padding: 10px 15px; border: 1px solid #51475d; border-radius: 30px;
  color: #f5f1fa; background: rgba(25, 22, 31, .92);
  font-size: 12px; backdrop-filter: blur(12px);
}
.feature-back:hover { background: #393044; }

.iphone-device.mode-studio,
.iphone-device.mode-live {
  position: relative; width: 100%; max-width: none; height: auto;
  min-height: 100vh; margin: 0; padding: 0; border: 0;
  border-radius: 0; background: transparent; box-shadow: none;
}
.iphone-device.mode-studio .iphone-screen,
.iphone-device.mode-live .iphone-screen {
  width: 100%; height: auto; min-height: 100vh;
  overflow: visible; border-radius: 0;
}
.iphone-device.mode-studio .iphone-screen::before,
.iphone-device.mode-live .iphone-screen::before { display: none; }
.iphone-device.mode-studio #iphoneLockScreen,
.iphone-device.mode-studio #iphoneHomeScreen,
.iphone-device.mode-studio #iphoneHomeButton,
.iphone-device.mode-live #iphoneLockScreen,
.iphone-device.mode-live #iphoneHomeScreen,
.iphone-device.mode-live #iphoneHomeButton { display: none !important; }
.iphone-device.mode-studio .iphone-app-view,
.iphone-device.mode-live .iphone-app-view {
  position: relative; inset: auto; width: 100%; min-height: 100vh;
  height: auto; overflow: visible; padding-bottom: 30px;
}
.iphone-device.mode-live .topbar,
.iphone-device.mode-live .studio-tabs,
.iphone-device.mode-live #postStudio,
.iphone-device.mode-live #dmStudio,
.iphone-device.mode-live #iphonePlaceholderApp { display: none !important; }
.iphone-device.mode-live #instagramAppScreen {
  display: block !important; width: min(100%, 900px);
  min-height: 100vh; margin: 0 auto; border-radius: 0;
}
.iphone-device.mode-live .instagram-screen-content { min-height: 70vh; }

body.phone-preview-mode {
  min-height: 100vh; display: flex; justify-content: center; align-items: center;
  padding: 22px 12px; background: #09090d;
}
body.phone-preview-mode .iphone-device { flex: 0 0 auto; margin: auto; }

.ao3-studio {
  min-height: 100vh; padding: 76px 22px 80px;
  color: #29252c; background: #f5f1f3;
  font-family: Georgia, "Times New Roman", serif;
}
.ao3-inner { max-width: 1120px; margin: 0 auto; }
.ao3-heading { margin-bottom: 30px; }
.ao3-heading p { color: #8b647e; font: 700 10px Arial, sans-serif; letter-spacing: 2px; }
.ao3-heading h1 { font-size: clamp(36px, 5vw, 54px); font-weight: 400; }
.ao3-heading span { display: block; margin-top: 9px; color: #766d75; font: 13px/1.6 Arial, sans-serif; }
.ao3-layout { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr); gap: 24px; align-items: start; }
.ao3-editor, .ao3-preview {
  padding: 25px; border: 1px solid #dfd5dc; border-radius: 9px; background: #fff;
}
.ao3-editor h2, .ao3-preview h2 { margin: 0 0 20px; font-size: 22px; font-weight: 400; }
.ao3-field { display: grid; gap: 6px; margin: 15px 0; }
.ao3-field label { color: #655761; font: 700 10px Arial, sans-serif; letter-spacing: .7px; }
.ao3-field input, .ao3-field textarea, .ao3-field select {
  width: 100%; padding: 10px 11px; border: 1px solid #d9cfd7;
  border-radius: 4px; color: #29252c; background: #fff;
  font: 13px Arial, sans-serif;
}
.ao3-field textarea { min-height: 82px; resize: vertical; line-height: 1.55; }
.ao3-field textarea.ao3-work-body { min-height: 280px; }
.ao3-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.ao3-actions button {
  padding: 11px 15px; border-radius: 4px; color: white;
  background: #70465f; font: 700 11px Arial, sans-serif;
}
.ao3-actions button.secondary-ao3 { color: #60485a; background: #eee5eb; }
.ao3-preview { font-family: Georgia, serif; }
.ao3-preview-label { color: #8b647e; font: 700 10px Arial, sans-serif; letter-spacing: 1.5px; }
.ao3-work-title { margin: 10px 0; font-size: 32px; font-weight: 400; }
.ao3-work-author { color: #766d75; font-size: 14px; }
.ao3-work-meta { margin: 22px 0; padding: 14px 0; border-top: 1px solid #e5dce2; border-bottom: 1px solid #e5dce2; }
.ao3-work-meta p { margin: 7px 0; font: 12px/1.5 Arial, sans-serif; }
.ao3-work-summary { margin: 22px 0; font-size: 15px; line-height: 1.7; white-space: pre-wrap; }
.ao3-chapter { margin-top: 30px; padding-top: 22px; border-top: 1px solid #e5dce2; }
.ao3-chapter h3 { font-size: 23px; font-weight: 400; }
.ao3-chapter-body { font-size: 16px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.ao3-preview details { margin-top: 22px; padding: 13px; background: #f7f2f5; font: 13px/1.6 Arial, sans-serif; }
.ao3-preview summary { cursor: pointer; color: #70465f; font-weight: 700; }
@media (max-width: 760px) {
  .feature-home { padding-top: 22px; }
  .feature-home-top { padding-bottom: 55px; }
  .feature-grid { grid-template-columns: 1fr; margin-top: 35px; }
  .feature-card { min-height: 195px; }
  .ao3-layout { grid-template-columns: 1fr; }
  .ao3-studio { padding: 72px 14px 50px; }
  .ao3-editor, .ao3-preview { padding: 18px; }
}


/* HOMEPAGE SCROLL FIX */
html, body {
  height: auto !important;
  min-height: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body:not(.phone-preview-mode) {
  display: block !important;
}

.feature-home {
  position: relative;
  height: auto !important;
  min-height: 100vh;
  overflow: visible !important;
}



/* MOBILE-WIDTH SOCIAL STUDIO — NO PHONE BEZEL */
.iphone-device.mode-studio {
  width: 100% !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.iphone-device.mode-studio .iphone-screen,
.iphone-device.mode-studio .iphone-app-view {
  width: 100% !important;
  max-width: 460px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.iphone-device.mode-studio .iphone-app-view {
  min-height: 100vh;
  height: auto !important;
  overflow: visible !important;
  padding: 18px 12px 36px !important;
  box-sizing: border-box;
}

.iphone-device.mode-studio .iphone-app-view *,
.iphone-device.mode-live #instagramAppScreen * {
  box-sizing: border-box;
}

.iphone-device.mode-studio #postStudio,
.iphone-device.mode-studio #dmStudio {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.iphone-device.mode-studio .workspace,
.iphone-device.mode-studio .dm-workspace {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.iphone-device.mode-studio .studio-tabs,
.iphone-device.mode-studio .topbar {
  width: 100% !important;
  max-width: 460px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.iphone-device.mode-studio img,
.iphone-device.mode-studio canvas,
.iphone-device.mode-studio video {
  max-width: 100%;
}

/* Stack editor and preview panels on narrow screens. */
@media (max-width: 520px) {
  .iphone-device.mode-studio .workspace,
  .iphone-device.mode-studio .dm-workspace {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .iphone-device.mode-studio .workspace > *,
  .iphone-device.mode-studio .dm-workspace > * {
    min-width: 0 !important;
    max-width: 100% !important;
  }
}

/* INSTAGRAM LIVE — REALISTIC MOBILE FEED, NO PHONE BEZEL */
.iphone-device.mode-live {
  width: 100% !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.iphone-device.mode-live .iphone-screen,
.iphone-device.mode-live .iphone-app-view {
  width: 100% !important;
  max-width: none !important;
  margin: 0 auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.iphone-device.mode-live .iphone-app-view {
  min-height: 100vh;
  height: auto !important;
  overflow: visible !important;
  padding: 0 !important;
}

.iphone-device.mode-live #instagramAppScreen {
  display: block !important;
  width: min(100%, 430px) !important;
  max-width: 430px !important;
  min-height: 100vh;
  margin: 0 auto !important;
  padding: 0 !important;
  border-radius: 0 !important;
  overflow: visible !important;
}

.iphone-device.mode-live .instagram-screen-content,
.iphone-device.mode-live .instagram-feed-screen,
.iphone-device.mode-live .instagram-feed-posts {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.iphone-device.mode-live .instagram-feed-post {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.iphone-device.mode-live .instagram-post-photo,
.iphone-device.mode-live .instagram-post-photo img {
  max-width: 100% !important;
}

.iphone-device.mode-live .instagram-app-header,
.iphone-device.mode-live .instagram-app-tabs,
.iphone-device.mode-live .instagram-bottom-navigation {
  width: 100% !important;
  max-width: 430px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}


/* AO3 EXPORT — story companion, not a fanfiction editor */
.ao3-export {
  min-height: 100vh;
  padding: 76px 22px 80px;
  background: #f7f5f9;
  color: #29252f;
}
.ao3-export-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
}
.ao3-export-heading {
  max-width: 760px;
  margin: 0 auto 34px;
}
.ao3-export-heading > p:first-child {
  color: #826ba2;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
}
.ao3-export-heading h1 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 5vw, 3.4rem);
}
.ao3-export-heading > p:not(:first-child) {
  color: #6d6675;
  line-height: 1.65;
}
.ao3-export-grid {
  display: grid;
  grid-template-columns: minmax(260px, .78fr) minmax(0, 1.22fr);
  gap: 22px;
  align-items: start;
}
.ao3-export-panel,
.ao3-export-preview-panel {
  min-width: 0;
  padding: 24px;
  border: 1px solid #e6e0eb;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(45, 35, 58, .06);
}
.ao3-export-panel h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}
.ao3-export-help {
  margin: 0 0 22px;
  color: #716a78;
  font-size: .9rem;
  line-height: 1.55;
}
.ao3-export-choice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 0;
  border-top: 1px solid #eeeaf1;
  cursor: pointer;
}
.ao3-export-choice input {
  margin-top: 4px;
  accent-color: #967bb9;
}
.ao3-export-choice span {
  display: grid;
  gap: 4px;
}
.ao3-export-choice small {
  color: #77707e;
  line-height: 1.45;
}
.ao3-export-status {
  margin: 18px 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f3eff7;
  color: #5c4c70;
  font-size: .88rem;
  line-height: 1.5;
}
.ao3-export-warning {
  margin: 18px 0;
  padding: 15px;
  border: 1px solid #eadfc9;
  border-radius: 12px;
  background: #fffaf0;
  font-size: .86rem;
  line-height: 1.55;
}
.ao3-export-warning p {
  margin: 6px 0 0;
  color: #6e6250;
}
.ao3-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}
.ao3-export-actions button {
  cursor: pointer;
}
.ao3-export-feedback {
  min-height: 1.4em;
  color: #6a587f;
  font-size: .85rem;
}
.ao3-export-preview-heading {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eeeaf1;
  color: #81768d;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
}
.ao3-export-preview {
  padding: 18px 4px 4px;
  overflow-wrap: anywhere;
  line-height: 1.7;
}
.ao3-export-preview section {
  margin: 0 0 28px;
}
.ao3-export-preview h2 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}
.ao3-export-preview blockquote {
  margin: 12px 0;
  padding: 10px 14px;
  border-left: 3px solid #b69bde;
  background: #f8f6fa;
}
.ao3-export-preview img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.ao3-export-empty {
  color: #77707e;
  text-align: center;
  padding: 36px 12px;
}
@media (max-width: 760px) {
  .ao3-export { padding: 36px 14px 54px; }
  .ao3-export-grid { grid-template-columns: 1fr; }
  .ao3-export-panel, .ao3-export-preview-panel { padding: 18px; }
}


/* AO3 INTERFACE BUILDER */
.ao3-builder {
  width: min(1120px, 100%);
  margin: 0 auto;
  color: #29252f;
}
.ao3-builder-heading {
  max-width: 760px;
  margin: 0 auto 30px;
}
.ao3-builder-heading > p:first-child {
  color: #826ba2;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
}
.ao3-builder-heading h1 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 5vw, 3.4rem);
}
.ao3-builder-heading > p:not(:first-child) {
  color: #6d6675;
  line-height: 1.65;
}
.ao3-builder-layout {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(280px, 1.1fr);
  gap: 24px;
  align-items: start;
}
.ao3-builder-controls,
.ao3-builder-preview-panel,
.ao3-builder-output {
  min-width: 0;
  padding: 22px;
  border: 1px solid #e6e0eb;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(45,35,58,.06);
}
.ao3-builder-controls h2,
.ao3-builder-output h2 {
  margin: 0 0 18px;
  font-size: 1.2rem;
}
.ao3-builder-controls label {
  display: grid;
  gap: 7px;
  margin: 14px 0;
  color: #514b59;
  font-size: .9rem;
  font-weight: 650;
}
.ao3-builder-controls input,
.ao3-builder-controls select,
.ao3-builder-controls textarea,
.builder-code-details textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #dcd5e3;
  border-radius: 9px;
  background: #fff;
  color: #29252f;
  font: inherit;
}
.ao3-builder-controls button,
.ao3-builder-output button {
  cursor: pointer;
}
.builder-phone {
  width: min(100%, 340px);
  margin: 16px auto;
  padding: 12px;
  border: 4px solid #25252b;
  border-radius: 32px;
  background: #17171c;
  color: #fff;
  box-shadow: 0 14px 34px rgba(0,0,0,.18);
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}
.builder-phone-top,
.builder-phone-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 7px;
  font-size: .78rem;
}
.builder-phone-header {
  align-items: center;
  border-bottom: 1px solid #45454d;
  font-size: .95rem;
}
.builder-phone-scroll {
  height: 340px;
  overflow-y: auto;
  padding: 14px 7px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.builder-bubble {
  max-width: 82%;
  padding: 9px 12px;
  border-radius: 17px;
  background: #393941;
  color: #fff;
  line-height: 1.4;
  overflow-wrap: anywhere;
  font-size: .9rem;
}
.builder-bubble.from-b {
  align-self: flex-end;
  background: #6850a0;
}
.builder-bubble.from-a {
  align-self: flex-start;
}
.builder-phone-compose {
  display: flex;
  justify-content: space-between;
  padding: 12px 9px;
  border-top: 1px solid #45454d;
  color: #aaaab4;
  font-size: .8rem;
}
.builder-phone-home {
  width: 92px;
  height: 4px;
  margin: 8px auto 1px;
  border-radius: 5px;
  background: #aaa;
}
.builder-empty,
.builder-preview-note {
  color: #8d8793;
  font-size: .85rem;
  text-align: center;
}
.builder-message-list {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}
.builder-message-item {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
  padding: 9px;
  border-radius: 9px;
  background: #f5f2f8;
  font-size: .82rem;
}
.builder-message-item button {
  flex: 0 0 auto;
}
.ao3-builder-output {
  margin-top: 24px;
}
.ao3-builder-output > p {
  color: #6d6675;
  line-height: 1.6;
}
.ao3-builder-output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
#builderFeedback {
  min-height: 1.4em;
  color: #6a587f;
}
.builder-code-details {
  margin: 14px 0;
}
.builder-code-details summary {
  cursor: pointer;
  padding: 10px 0;
  font-weight: 650;
}
.builder-code-details textarea {
  margin-top: 8px;
  font-family: monospace;
  font-size: .78rem;
}
@media (max-width: 760px) {
  .ao3-builder-layout { grid-template-columns: 1fr; }
  .ao3-builder-controls,
  .ao3-builder-preview-panel,
  .ao3-builder-output { padding: 16px; }
}


/* AO3 preview: match the existing DM Studio sender alignment */
.builder-bubble.from-a {
  align-self: flex-end;
  background: #6850a0;
}

.builder-bubble.from-b {
  align-self: flex-start;
  background: #393941;
}


/* AO3 dual-design preview — isolated from the other Studio features */
.builder-design-picker{display:flex;align-items:center;justify-content:center;gap:12px;margin:12px auto 16px}
.builder-design-picker label{color:#514b59;font-size:.9rem;font-weight:650}
.builder-design-picker select{padding:9px 12px;border:1px solid #dcd5e3;border-radius:9px;background:#fff;color:#29252f;font:inherit}
.builder-preview-stage{width:100%;}
.builder-preview-stage .au-im-device,.builder-preview-stage .au-ig-device{width:min(100%,360px);margin:0 auto 12px;border:1px solid #d8d8dc;border-radius:27px;overflow:hidden;background:#fff;color:#111;box-sizing:border-box;font-family:Arial,sans-serif;box-shadow:0 12px 28px rgba(0,0,0,.12)}
.builder-preview-stage .au-im-status,.builder-preview-stage .au-ig-status{display:flex;justify-content:space-between;padding:10px 17px 6px;font-size:11px;font-weight:700}
.builder-preview-stage .au-im-header,.builder-preview-stage .au-ig-header{display:flex;align-items:center;gap:10px;min-height:62px;padding:8px 12px;border-bottom:1px solid #eee;background:#fff}
.builder-preview-stage .au-avatar{display:inline-flex;width:38px;height:38px;flex:0 0 38px;align-items:center;justify-content:center;border-radius:50%;object-fit:cover;background:#eee;color:#555;font-weight:700}
.builder-preview-stage .au-im-identity,.builder-preview-stage .au-ig-identity{display:flex;min-width:0;flex:1;flex-direction:column;gap:3px}
.builder-preview-stage .au-im-identity{display:flex;flex:none;min-width:0;flex-direction:column;align-items:center;gap:4px;color:#111}
.builder-preview-stage .au-im-identity strong,.builder-preview-stage .au-ig-identity strong{font-size:14px}
.builder-preview-stage .au-im-identity small,.builder-preview-stage .au-ig-username{color:#888;font-size:11px}
.builder-preview-stage .au-ig-verified{display:inline-block;margin-left:4px;color:#3897f0}
.builder-preview-stage .au-im-back,.builder-preview-stage .au-ig-back{font-size:30px;font-weight:300}
.builder-preview-stage .au-im-back,.builder-preview-stage .au-im-video{position:absolute;right:13px;top:50%;transform:translateY(-50%);display:flex;width:34px;height:34px;align-items:center;justify-content:center;border:1px solid #087fff;border-radius:50%;background:transparent;color:#111}
.builder-preview-stage .au-ig-actions{white-space:nowrap;font-size:17px}
.builder-preview-stage .au-im-messages,.builder-preview-stage .au-ig-messages{display:flex;height:370px;max-height:60vh;flex-direction:column;gap:9px;overflow-y:auto;padding:17px 12px;background:#fff;box-sizing:border-box}
.builder-preview-stage .au-im-row,.builder-preview-stage .au-ig-row{display:flex;width:100%;align-items:flex-end}
.builder-preview-stage .au-im-row.incoming,.builder-preview-stage .au-ig-row.incoming{justify-content:flex-start}
.builder-preview-stage .au-im-row.outgoing,.builder-preview-stage .au-ig-row.outgoing{justify-content:flex-end}
.builder-preview-stage .au-im-bubble{max-width:79%;padding:9px 13px;border-radius:19px;background:#e9e9eb;color:#111;font-size:14px;line-height:1.35;overflow-wrap:anywhere;white-space:pre-wrap}
.builder-preview-stage .au-im-row.incoming .au-im-bubble{border-bottom-left-radius:5px}
.builder-preview-stage .au-im-row.outgoing .au-im-bubble{border-bottom-right-radius:5px;background:#1685f8;color:#fff}
.builder-preview-stage .au-ig-bubble{max-width:78%;padding:10px 14px;border:1px solid #efefef;border-radius:21px;background:#efefef;color:#111;font-size:14px;line-height:1.38;overflow-wrap:anywhere;white-space:pre-wrap}
.builder-preview-stage .au-ig-row.incoming .au-ig-bubble{border-bottom-left-radius:6px}
.builder-preview-stage .au-ig-row.outgoing .au-ig-bubble{border:0;border-bottom-right-radius:6px;background:linear-gradient(135deg,#833ab4 0%,#c13584 48%,#405de6 100%);color:#fff}
.builder-preview-stage .au-im-composer,.builder-preview-stage .au-ig-composer{display:flex;min-height:48px;align-items:center;gap:10px;padding:8px 11px;border-top:1px solid #eee;background:#fafafa;color:#111;font-size:17px}
.builder-preview-stage .au-im-plus{display:inline-flex;width:27px;height:27px;align-items:center;justify-content:center;border:1px solid #b9b9bf;border-radius:50%;color:#777}
.builder-preview-stage .au-im-placeholder,.builder-preview-stage .au-ig-placeholder{min-width:0;flex:1;padding:9px 12px;border:1px solid #d4d4d8;border-radius:20px;color:#999;font-size:13px}
.builder-preview-stage .au-im-audio{color:#888}
.builder-preview-stage .au-ig-composer{gap:11px;margin:0;padding:9px 12px;border:0}
.builder-preview-stage .au-ig-camera{display:inline-flex;width:30px;height:30px;flex:0 0 30px;align-items:center;justify-content:center;border-radius:50%;background:linear-gradient(135deg,#833ab4,#405de6);color:#fff}
.builder-preview-stage .au-empty{color:#888;font-size:13px;text-align:center}


/* iMessage-only header and composer refinements */
.builder-preview-stage .au-im-header{position:relative;display:flex;justify-content:center;align-items:center;min-height:112px;padding:10px 52px;background:#fff;border-bottom:1px solid #e5e5e8}
.builder-preview-stage .au-im-identity{display:flex;flex:none;min-width:0;flex-direction:column;align-items:center;gap:4px;color:#111}
.builder-preview-stage .au-im-identity .au-avatar{width:48px;height:48px;flex:0 0 48px;margin-bottom:2px}
.builder-preview-stage .au-im-identity strong{color:#111;font-size:13px}
.builder-preview-stage .au-im-back{position:absolute;left:13px;top:50%;transform:translateY(-50%);color:#087fff;font-size:30px;font-weight:300}
.builder-preview-stage .au-im-video{position:absolute;right:13px;top:50%;transform:translateY(-50%);display:flex;width:34px;height:34px;align-items:center;justify-content:center;border:1px solid #087fff;border-radius:50%;background:transparent;color:#111}
.builder-preview-stage .au-im-video svg{display:block;width:18px;height:18px}
.builder-preview-stage .au-im-audio{display:flex;width:25px;height:28px;flex:0 0 25px;align-items:center;justify-content:center;color:#777}
.builder-preview-stage .au-im-audio svg{display:block;width:21px;height:21px}


/* iMessage header contrast */



/* Instagram DM header and composer polish */
.instagram-conversation-header {
  display: flex;
  align-items: center;
}
.instagram-conversation-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.instagram-conversation-actions {
  display: none !important;
}
.instagram-dm-camera {
  background: #833ab4 !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 50% !important;
}
.instagram-dm-camera svg {
  color: #fff !important;
  stroke: #fff !important;
}
.instagram-dm-composer button,
.instagram-dm-composer svg {
  color: #fff;
}


/* Instagram DM header and composer */
.au-ig-header{display:flex;align-items:center;gap:10px}
.au-ig-identity{display:flex;min-width:0;flex:1;justify-content:center;flex-direction:column}
.au-ig-username{color:#262626;font-size:14px;font-weight:600}
.au-ig-actions{display:none!important}
.au-ig-composer{display:flex;align-items:center;gap:10px}
.au-ig-camera{display:inline-flex;width:38px;height:38px;flex:0 0 38px;align-items:center;justify-content:center;border-radius:50%;background:#833ab4;color:#fff}
.au-ig-camera svg{width:21px;height:21px}
.au-ig-tool{display:inline-flex;width:23px;height:26px;flex:0 0 23px;align-items:center;justify-content:center;color:#262626}
.au-ig-tool svg{width:22px;height:22px}
.au-ig-add{font-size:25px;font-weight:300}
/* iMessage header panel */
.au-im-header{background:#fff!important;border-bottom:1px solid #e5e5e8!important}
.au-im-identity,.au-im-identity strong{color:#111!important}
.au-im-video{color:#111!important}
.au-im-video svg{stroke:#087fff!important}


/* AO3 preview final icon and header corrections */
.builder-preview-stage .au-im-header { background:#fff !important; }
.builder-preview-stage .au-im-identity,
.builder-preview-stage .au-im-identity strong { color:#111 !important; }
.builder-preview-stage .au-im-video{ color:#111 !important; border-color:#111 !important; }
.builder-preview-stage .au-im-video svg { stroke:#087fff !important; }
.builder-preview-stage .au-ig-identity { justify-content:center; }
.builder-preview-stage .au-ig-username { color:#262626 !important; font-size:14px; font-weight:600; }
.builder-preview-stage .au-ig-camera { background:#833ab4 !important; color:#fff !important; }
.builder-preview-stage .au-ig-camera svg { display:block; width:21px; height:21px; }
.builder-preview-stage .au-ig-tool { color:#262626 !important; }
.builder-preview-stage .au-ig-tool svg { display:block; width:22px; height:22px; }
.builder-preview-stage .au-ig-add { font-size:25px; }

/* iMessage light-mode FaceTime contrast */
.builder-preview-stage .au-im-video {
  color: #111 !important;
  border-color: #111 !important;
  background: transparent !important;
}
.builder-preview-stage .au-im-video svg {
  color: #111 !important;
  stroke: #111 !important;
}


/* iMessage: soft translucent header controls */
.builder-preview-stage .au-im-back,
.builder-preview-stage .au-im-video {
  position: absolute !important;
  top: 50% !important;
  display: flex !important;
  width: 34px !important;
  height: 34px !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: rgba(245,245,247,.78) !important;
  color: #111 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.12) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translateY(-50%) !important;
}
.builder-preview-stage .au-im-back {
  left: 13px !important;
  right: auto !important;
  font-size: 27px !important;
  line-height: 1 !important;
}
.builder-preview-stage .au-im-video {
  right: 13px !important;
  left: auto !important;
}
.builder-preview-stage .au-im-video svg {
  width: 18px !important;
  height: 18px !important;
  color: #111 !important;
  stroke: #111 !important;
}


/* AO3 customization controls only — intentionally separate from live previews */
.ao3-customization-panel {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid #e9e2ed;
}
.ao3-customization-eyebrow {
  margin: 0 0 6px;
  color: #80649a;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .14em;
}
.ao3-customization-panel > h2 {
  margin: 0 0 7px;
  font-size: 1.2rem;
}
.ao3-customization-intro {
  margin: 0 0 16px;
  color: #716a78;
  font-size: .88rem;
  line-height: 1.5;
}
.ao3-customization-card {
  margin: 12px 0;
  padding: 14px;
  border: 1px solid #e6e0eb;
  border-radius: 13px;
  background: #fcfbfd;
}
.ao3-customization-card summary {
  cursor: pointer;
  color: #30283a;
  font-weight: 750;
}
.ao3-customization-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
  margin: 12px 0;
}
.ao3-customization-fields label {
  display: grid;
  gap: 7px;
  min-width: 0;
  margin: 7px 0;
  color: #514b59;
  font-size: .84rem;
  font-weight: 650;
}
.ao3-customization-fields input[type="text"],
.ao3-customization-fields input[type="url"] {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 9px 10px;
  border: 1px solid #dcd5e3;
  border-radius: 8px;
  background: #fff;
  color: #29252f;
  font: inherit;
}
.ao3-customization-fields input[type="color"] {
  width: 100%;
  height: 38px;
  padding: 3px;
  border: 1px solid #dcd5e3;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.ao3-save-customization {
  margin-top: 4px;
}
.ao3-customization-status {
  min-height: 1em;
  margin: 8px 0 0;
  color: #55744d;
  font-size: .82rem;
}
@media (max-width: 480px) {
  .ao3-customization-fields { grid-template-columns: 1fr; }
}



/* AO3 message editor — scoped below the existing phone preview */
.ao3-message-editor {
  margin: 28px 0 0;
  padding: 22px;
  border: 1px solid var(--border, #d9d9df);
  border-radius: 16px;
  background: var(--panel, #fff);
}
.ao3-editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.ao3-editor-heading h3 { margin: 0 0 5px; }
.ao3-editor-heading p, .ao3-editor-help {
  margin: 4px 0;
  opacity: .75;
  font-size: .9rem;
}
.ao3-editor-status { margin: 10px 0; font-size: .88rem; opacity: .75; }
.ao3-message-card {
  margin: 14px 0;
  padding: 16px;
  border: 1px solid var(--border, #dedee4);
  border-radius: 12px;
  background: var(--background, #fafafa);
}
.ao3-message-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.ao3-message-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ao3-message-actions button, .ao3-remove-image {
  padding: 6px 10px;
  border: 1px solid var(--border, #ccc);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.ao3-message-actions button:disabled { opacity: .35; cursor: default; }
.ao3-message-card label {
  display: block;
  margin: 12px 0;
  font-size: .9rem;
  font-weight: 600;
}
.ao3-message-card input, .ao3-message-card textarea, .ao3-message-card select {
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  border: 1px solid var(--border, #ccc);
  border-radius: 8px;
  background: var(--background, #fff);
  color: inherit;
  font: inherit;
}
.ao3-editor-image-preview {
  display: block;
  max-width: min(100%, 280px);
  max-height: 240px;
  object-fit: contain;
  border-radius: 10px;
  margin: 10px 0;
}
.au-message-image {
  display: block;
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 12px;
  margin-top: 6px;
}
.au-message-text { white-space: pre-wrap; }
.ao3-editor-help { line-height: 1.5; margin-top: 16px; }
@media (max-width: 600px) {
  .ao3-message-editor { padding: 14px; }
  .ao3-message-card { padding: 12px; }
}


.ao3-editor-add-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}
.ao3-editor-add-buttons .builder-button {
  flex: 0 1 auto;
}




/* Make iMessage add-message button text readable */
.ao3-person-message-composer .ao3-person-add-message[data-ao3-style="imessage"] {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}

/* Force iMessage add-message controls visible */
.ao3-person-message-composer .ao3-person-add-message[data-ao3-style="imessage"] {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  width: 100% !important;
  min-height: 42px;
  margin-top: 9px !important;
  pointer-events: auto !important;
}

/* AO3 per-person message composers */
.ao3-person-message-composer {
  margin: 14px 0 4px;
  padding: 12px;
  border: 1px solid var(--border, #dedee4);
  border-radius: 10px;
  background: var(--background, #fafafa);
}

.ao3-person-message-composer label {
  display: block;
  margin-bottom: 7px;
  font-size: .9rem;
  font-weight: 600;
}

.ao3-person-message-composer textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 62px;
  padding: 10px;
  border: 1px solid var(--border, #ccc);
  border-radius: 8px;
  background: var(--panel, #fff);
  color: inherit;
  font: inherit;
  resize: vertical;
}

.ao3-person-message-composer .builder-button {
  width: 100%;
  margin-top: 9px;
}


/* AO3 iMessage composer attachments — scoped to the two iMessage composers */
.ao3-person-message-composer[data-ao3-composer] {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ao3-person-message-composer[data-ao3-composer] textarea,
.ao3-person-message-composer[data-ao3-composer] input[type="url"],
.ao3-person-message-composer[data-ao3-composer] input[type="file"] {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}
.ao3-person-message-composer[data-ao3-composer] textarea,
.ao3-person-message-composer[data-ao3-composer] input[type="url"] {
  padding: 10px;
  border: 1px solid var(--border, #ccc);
  border-radius: 8px;
  background: var(--background, #fff);
  color: inherit;
  font: inherit;
}
.ao3-composer-image-preview {
  display: block;
  max-width: min(100%, 280px);
  max-height: 220px;
  object-fit: contain;
  border-radius: 10px;
}
.ao3-composer-image-preview[hidden] { display: none !important; }

/* iMessage bubbles hug their text; attached images stack beneath the bubble. */
.builder-preview-stage .au-im-row {
  display: flex;
  width: 100%;
  align-items: flex-end;
}
.builder-preview-stage .au-im-message-body {
  display: flex;
  width: fit-content;
  max-width: 79%;
  flex: 0 1 auto;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}
.builder-preview-stage .au-im-row.outgoing .au-im-message-body {
  align-items: flex-end;
}
.builder-preview-stage .au-im-bubble {
  display: block;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
}
.builder-preview-stage .au-im-message-body .au-message-image {
  display: block;
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  margin: 0;
}


/* Compact saved-message list for the iMessage customization panel */
.ao3-imessage-saved {
  grid-column: 1 / -1;
  margin-top: 8px;
}
.ao3-imessage-saved-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border, #dedee4);
}
.ao3-imessage-saved-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.ao3-imessage-saved-copy strong {
  font-size: .85rem;
}
.ao3-imessage-saved-copy span {
  font-size: .92rem;
}
.ao3-imessage-delete {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid var(--border, #ccc);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.ao3-message-editor[hidden] {
  display: none !important;
}


/* iMessage picture upload controls */
.ao3-imessage-picture-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin-top: 10px;
  padding: 9px 14px;
  border: 1px solid rgba(120, 120, 130, 0.28);
  border-radius: 9px;
  background: rgba(128, 128, 130, 0.08);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.ao3-imessage-picture-label:hover {
  background: rgba(128, 128, 130, 0.16);
}

.ao3-imessage-picture-input[hidden] {
  display: none !important;
}


/* Instagram AO3 message buttons */
.ao3-person-message-composer .ao3-person-add-message[data-ao3-style="instagram"] {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  width: 100% !important;
  min-height: 42px;
  margin-top: 9px !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  background: #ffffff !important;
  border: 1px solid #bdbdbd !important;
  pointer-events: auto !important;
}



/* Instagram AO3 custom picture upload controls */
.ao3-hidden-file-input {
  display: none !important;
}

.ao3-picture-control {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin: 12px 0;
}

.ao3-picture-label {
  display: block;
  font-size: .9rem;
  font-weight: 600;
}

.ao3-picture-button {
  display: block !important;
  box-sizing: border-box;
  width: 100% !important;
  min-height: 46px;
  margin: 8px 0 !important;
  padding: 11px 14px !important;
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
  background: #ffffff !important;
  border: 1px solid #bdbdbd !important;
  border-radius: 9px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  text-align: center;
  cursor: pointer;
  visibility: visible !important;
  opacity: 1 !important;
}

.ao3-picture-button:hover {
  background: #f5f5f5 !important;
}

#ao3IgPhotoPreview {
  display: block;
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 50%;
  margin-top: 8px;
}

#ao3IgPhotoPreview[hidden] {
  display: none !important;
}


/* Instagram AO3 header alignment and verified badge sizing */
.builder-preview-stage .au-ig-header{display:flex;align-items:center;gap:10px}
.builder-preview-stage .au-ig-header .au-avatar{width:38px;height:38px;flex:0 0 38px}
.builder-preview-stage .au-ig-identity{display:flex;min-width:0;flex:1;flex-direction:row;align-items:center;justify-content:flex-start;gap:3px}
.builder-preview-stage .au-ig-username{display:inline-flex;align-items:center;color:#262626;font-size:14px;font-weight:600}
.builder-preview-stage .au-ig-verified{display:inline-flex;width:12px;height:12px;flex:0 0 12px;margin:0;color:#3897f0}
.builder-preview-stage .au-ig-verified svg{display:block;width:12px;height:12px;max-width:12px;max-height:12px}


/* AO3 chat scrolling — preserve message dimensions */
.builder-preview-stage .au-im-messages,
.builder-preview-stage .au-ig-messages {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}
.builder-preview-stage .au-im-row,
.builder-preview-stage .au-ig-row {
  flex: 0 0 auto;
}

/* ==========================================================
   INSTA STUDIO — LIGHT EDITORIAL ENVIRONMENT
   Decorative surroundings only. Working previews untouched.
   ========================================================== */

/* HOME — warm porcelain and soft lilac */
.feature-home {
  color: #393342 !important;
  background:
    radial-gradient(ellipse at 8% 12%, rgba(229,196,211,.48), transparent 34%),
    radial-gradient(ellipse at 92% 18%, rgba(205,194,232,.48), transparent 36%),
    radial-gradient(ellipse at 78% 88%, rgba(239,218,199,.48), transparent 34%),
    linear-gradient(135deg, #fbf8f5 0%, #f5f0f6 52%, #f9f4f0 100%) !important;
}

.feature-logo { color: #403748 !important; }
.feature-logo span { color: #a77c9b !important; }
.feature-local { color: #938493 !important; }

.feature-kicker {
  color: #a77c9b !important;
}

.feature-hero h1 {
  color: #403748 !important;
}

.feature-hero h1 em {
  color: #ad83a5 !important;
}

.feature-hero p {
  color: #827987 !important;
}

.feature-card {
  position: relative;
  overflow: hidden;
  color: #403748 !important;
  border: 1px solid rgba(174,146,170,.25) !important;
  border-radius: 22px !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,.94), rgba(249,242,248,.92)) !important;
  box-shadow:
    0 12px 35px rgba(91,67,91,.07),
    inset 0 1px 0 rgba(255,255,255,.95);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.feature-card::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  right: -85px;
  top: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(213,190,225,.34), transparent 70%);
  pointer-events: none;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(166,126,164,.48) !important;
  background: linear-gradient(145deg, #fff, #f8f0f7) !important;
  box-shadow: 0 18px 42px rgba(91,67,91,.12);
}

.feature-card-number,
.feature-card-action {
  color: #a07898 !important;
}

.feature-card-icon {
  color: #b28eac !important;
}

.feature-card h2 {
  color: #453a49 !important;
}

.feature-card p {
  color: #817783 !important;
}

.feature-home-footer {
  color: #a397a2 !important;
  letter-spacing: 1.5px;
}

.feature-back {
  color: #59475b !important;
  border: 1px solid rgba(174,146,170,.35) !important;
  background: rgba(255,252,250,.92) !important;
  box-shadow: 0 5px 20px rgba(91,67,91,.08);
  backdrop-filter: blur(14px);
}

.feature-back:hover {
  background: #f4eaf2 !important;
}

/* STUDIO — decorate the page behind the tools */
.iphone-device.mode-studio .iphone-app-view {
  background:
    radial-gradient(ellipse at 5% 8%, rgba(231,204,216,.50), transparent 34%),
    radial-gradient(ellipse at 95% 30%, rgba(211,204,235,.52), transparent 36%),
    radial-gradient(ellipse at 75% 95%, rgba(244,222,204,.48), transparent 36%),
    linear-gradient(140deg, #fbf8f5, #f4eff5 58%, #faf5f1) !important;
}

/* Elegant navigation — does not alter the editor or its controls */
.iphone-device.mode-studio .topbar {
  border: 1px solid rgba(174,146,170,.22) !important;
  border-radius: 18px !important;
  background: rgba(255,253,251,.84) !important;
  box-shadow: 0 8px 28px rgba(91,67,91,.055);
}

.iphone-device.mode-studio .studio-tabs {
  gap: 8px;
  padding: 7px !important;
  border: 1px solid rgba(174,146,170,.22) !important;
  border-radius: 18px !important;
  background: rgba(255,253,251,.88) !important;
  box-shadow: 0 8px 28px rgba(91,67,91,.055);
}

.iphone-device.mode-studio .studio-tab {
  border-radius: 12px !important;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}

.iphone-device.mode-studio .studio-tab.active {
  color: #fff !important;
  border-color: transparent !important;
  background: linear-gradient(125deg, #ad87a8, #9184b5) !important;
  box-shadow: 0 4px 12px rgba(145,112,153,.20);
}

/* Outer frame around Social Post Studio.
   Its editor controls and Instagram preview are not restyled. */
.iphone-device.mode-studio #postStudio {
  padding: clamp(16px, 3vw, 28px) !important;
  border: 1px solid rgba(174,146,170,.24) !important;
  border-radius: 25px !important;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(231,204,216,.23), transparent 42%),
    radial-gradient(ellipse at 100% 100%, rgba(211,204,235,.25), transparent 42%),
    rgba(255,253,251,.66) !important;
  box-shadow:
    0 18px 48px rgba(91,67,91,.075),
    inset 0 1px 0 rgba(255,255,255,.9);
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .feature-card,
  .feature-back,
  .studio-tab {
    transition: none !important;
  }
}


/* FULL LIGHT EDITORIAL STUDIO CANVAS */

/* Light page surrounding the studio */
body:has(.iphone-device.mode-studio) {
  background: #f7f2f5 !important;
  color: #443b49 !important;
}

.iphone-device.mode-studio {
  background:
    radial-gradient(ellipse at 8% 8%, rgba(235,205,219,.52), transparent 34%),
    radial-gradient(ellipse at 92% 12%, rgba(211,204,235,.52), transparent 36%),
    linear-gradient(135deg, #fbf8f5, #f2edf5 58%, #faf4f0) !important;
}

.iphone-device.mode-studio .iphone-app-view {
  background:
    radial-gradient(ellipse at 0% 0%, rgba(238,214,225,.34), transparent 38%),
    radial-gradient(ellipse at 100% 80%, rgba(218,211,239,.34), transparent 40%),
    linear-gradient(145deg, #fbf8f6, #f5f0f6 58%, #fbf6f1) !important;
  color: #443b49 !important;
}

/* Refined navigation */
.iphone-device.mode-studio .topbar {
  background: rgba(255,253,251,.94) !important;
  border: 1px solid #eadfe8 !important;
  border-radius: 20px !important;
  box-shadow: 0 8px 28px rgba(91,67,91,.07) !important;
}

.iphone-device.mode-studio .studio-tabs {
  background: rgba(255,253,251,.9) !important;
  border: 1px solid #e9deea !important;
  border-radius: 20px !important;
  box-shadow: 0 8px 25px rgba(91,67,91,.06) !important;
}

.iphone-device.mode-studio .studio-tab.active {
  background: linear-gradient(125deg, #b58eaa, #9388b8) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 5px 15px rgba(145,119,159,.2) !important;
}

/* Decorative frame around the working editor — controls remain unchanged */
.iphone-device.mode-studio #postStudio {
  background:
    radial-gradient(ellipse at 0% 0%, rgba(236,211,224,.28), transparent 42%),
    radial-gradient(ellipse at 100% 100%, rgba(216,209,237,.28), transparent 42%),
    rgba(255,253,251,.72) !important;
  border: 1px solid #e8dce8 !important;
  border-radius: 26px !important;
  box-shadow: 0 18px 50px rgba(91,67,91,.08) !important;
}

/* Editor panel surface only; do not restyle its inputs or controls */
.iphone-device.mode-studio #postStudio > .editor {
  background: rgba(255,253,251,.92) !important;
  border: 1px solid #eee4eb !important;
  border-radius: 22px !important;
  box-shadow: 0 10px 30px rgba(91,67,91,.055) !important;
}


/* DESKTOP LIGHT EDITORIAL SURROUNDINGS */
@media (min-width: 700px) {
  body:not(.phone-preview-mode) {
    background:
      radial-gradient(ellipse at 12% 18%, #f0dce7 0%, transparent 38%),
      radial-gradient(ellipse at 88% 22%, #e5def3 0%, transparent 40%),
      linear-gradient(135deg, #fbf8f4, #f4edf4 55%, #fbf5f0) !important;
    color: #493e4b !important;
  }

  body:not(.phone-preview-mode) .iphone-device.mode-studio {
    width: 100% !important;
    max-width: none !important;
    min-height: 100vh !important;
    background: transparent !important;
  }

  body:not(.phone-preview-mode) .iphone-device.mode-studio .iphone-screen {
    width: 100% !important;
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
    background: transparent !important;
  }

  body:not(.phone-preview-mode) .iphone-device.mode-studio .iphone-app-view {
    width: 100% !important;
    max-width: 1100px !important;
    min-height: 100vh !important;
    margin: 0 auto !important;
    padding: 34px 42px 60px !important;
    background: transparent !important;
  }

  body:not(.phone-preview-mode) .iphone-device.mode-studio .topbar,
  body:not(.phone-preview-mode) .iphone-device.mode-studio .studio-tabs {
    max-width: 100% !important;
  }

  body:not(.phone-preview-mode) .iphone-device.mode-studio #postStudio {
    max-width: 100% !important;
    padding: 26px !important;
    background: rgba(255,253,251,.68) !important;
    border: 1px solid #e8dce8 !important;
    border-radius: 26px !important;
    box-shadow: 0 18px 50px rgba(91,67,91,.08) !important;
  }
}

/* SOFTER SOCIAL POST PREVIEW SURROUNDINGS */
@media (min-width: 700px) {
  .iphone-device.mode-studio #postStudio .preview-area {
    padding: 24px !important;
    border: 1px solid #e8dce9 !important;
    border-radius: 28px !important;
    background: linear-gradient(145deg, #fffafc, #f2edf8) !important;
    box-shadow: 0 14px 38px rgba(91, 67, 91, .09) !important;
  }

  .iphone-device.mode-studio #postStudio .preview-area > * {
    border-radius: 20px;
  }
}

/* WIDER EDITING WORKSPACE — SCREEN ONLY */
@media (min-width: 700px) {
  .iphone-device.mode-studio .iphone-app-view {
    max-width: 1440px !important;
    padding-left: 48px !important;
    padding-right: 48px !important;
  }

  .iphone-device.mode-studio #postStudio.workspace {
    width: 100% !important;
    max-width: 1280px !important;
    grid-template-columns: minmax(400px, .92fr) minmax(440px, 1.08fr) !important;
    gap: 34px !important;
    align-items: start !important;
  }

  .iphone-device.mode-studio #postStudio > .editor {
    width: 100% !important;
    padding: 30px !important;
  }

  .iphone-device.mode-studio #postStudio > .preview-area {
    min-width: 0 !important;
  }
}

/* CREATE A POST — WIDER, TWO-COLUMN CUSTOMIZATION PANEL */
@media (min-width: 1000px) {
  .iphone-device.mode-studio .iphone-app-view {
    max-width: 1480px !important;
    padding-left: 36px !important;
    padding-right: 36px !important;
  }

  .iphone-device.mode-studio #postStudio.workspace {
    width: 100% !important;
    max-width: 1360px !important;
    margin: 30px auto !important;
    grid-template-columns: minmax(600px, 1.2fr) minmax(400px, .8fr) !important;
    gap: 28px !important;
  }

  .iphone-device.mode-studio #postStudio > .editor {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 20px !important;
    row-gap: 2px !important;
    width: 100% !important;
    padding: 30px !important;
  }

  /* Keep the heading and introductory copy together across the panel */
  .iphone-device.mode-studio #postStudio > .editor > .eyebrow,
  .iphone-device.mode-studio #postStudio > .editor > h1,
  .iphone-device.mode-studio #postStudio > .editor > .muted {
    grid-column: 1 / -1 !important;
  }

  /* Keep important actions and larger control groups full width */
  .iphone-device.mode-studio #postStudio > .editor > #applyPhotosButton,
  .iphone-device.mode-studio #postStudio > .editor > #customBackgroundControls,
  .iphone-device.mode-studio #postStudio > .editor > #downloadButton,
  .iphone-device.mode-studio #postStudio > .editor > .privacy-note {
    grid-column: 1 / -1 !important;
  }

  .iphone-device.mode-studio #postStudio > .editor > .field {
    min-width: 0 !important;
  }

  .iphone-device.mode-studio #postStudio > .editor #verified {
    width: auto !important;
  }

  /* Keep the preview on the right, comfortably inside the workspace */
  .iphone-device.mode-studio #postStudio > .preview-area {
    min-width: 0 !important;
    padding-right: 12px !important;
  }
}

/* MOVE THE EDITOR + PREVIEW GROUP TOWARD THE LEFT */
@media (min-width: 1000px) {
  .iphone-device.mode-studio .iphone-app-view {
    padding-left: 24px !important;
    padding-right: 48px !important;
  }

  .iphone-device.mode-studio #postStudio.workspace {
    width: 100% !important;
    max-width: 1360px !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    grid-template-columns: minmax(600px, 1.2fr) minmax(400px, .8fr) !important;
  }
}

/* KEEP BOTH WORK AREAS TOGETHER — LEFT SIDE */
@media (min-width: 1000px) {
  .iphone-device.mode-studio .iphone-app-view {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }

  .iphone-device.mode-studio #postStudio.workspace {
    width: 100% !important;
    max-width: 1120px !important;
    margin: 30px 0 30px 0 !important;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr) !important;
    gap: 28px !important;
  }

  .iphone-device.mode-studio #postStudio > .editor,
  .iphone-device.mode-studio #postStudio > .preview-area {
    min-width: 0 !important;
  }
}

/* RESTORE ORIGINAL WORKSPACE SIZE; SHIFT THE WHOLE GROUP LEFT */
@media (min-width: 1000px) {
  .iphone-device.mode-studio .iphone-app-view {
    max-width: 1480px !important;
    padding-left: 12px !important;
    padding-right: 36px !important;
  }

  .iphone-device.mode-studio #postStudio.workspace {
    width: 100% !important;
    max-width: 1360px !important;
    margin: 30px 0 !important;
    grid-template-columns: minmax(600px, 1.2fr) minmax(400px, .8fr) !important;
    gap: 28px !important;
  }

  .iphone-device.mode-studio #postStudio > .editor {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 20px !important;
    row-gap: 2px !important;
    width: 100% !important;
    padding: 30px !important;
  }

  .iphone-device.mode-studio #postStudio > .preview-area {
    min-width: 0 !important;
    padding-right: 12px !important;
  }
}

/* MOVE BOTH PANELS LEFT WITHOUT CHANGING THEIR SIZE */
@media (min-width: 1000px) {
  .iphone-device.mode-studio #postStudio.workspace {
    transform: translateX(-100px) !important;
  }
}

/* FINAL POSITION: BOTH PANELS LEFT, ORIGINAL SIZES */
@media (min-width: 1000px) {
  .iphone-device.mode-studio #postStudio.workspace {
    transform: translateX(-180px) !important;
  }
}

@media (min-width: 1000px) {
  .iphone-device.mode-studio #postStudio.workspace {
    transform: translateX(-220px) !important;
  }
}

/* FULL BACKGROUND COVERAGE FOR CREATE A POST */
.iphone-device.mode-studio #postStudio > .editor {
  align-self: stretch !important;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(240,220,235,.42), transparent 48%),
    linear-gradient(145deg, #fffdfb, #f8f1f7) !important;
  background-clip: border-box !important;
}

/* COMPLETE, CONSISTENT CREATE A POST PANEL SURFACE */
.iphone-device.mode-studio #postStudio > .editor {
  box-sizing: border-box !important;
  width: 100% !important;
  align-self: stretch !important;
  background-color: #fbf5fa !important;
  background-image:
    radial-gradient(ellipse at 12% 8%, rgba(239,214,231,.48), transparent 58%),
    linear-gradient(135deg, #fffdfb 0%, #fbf5fa 52%, #f5eff9 100%) !important;
  background-repeat: no-repeat !important;
  background-size: 100% 100% !important;
  border: 1px solid #e5d3e1 !important;
  border-radius: 22px !important;
  box-shadow: 0 12px 32px rgba(91,67,91,.09) !important;
}

/* MAKE WHITE ACTION BUTTONS EASY TO RECOGNIZE */
.iphone-device.mode-studio #postStudio > .editor button,
.iphone-device.mode-studio #postStudio > .editor input[type="button"],
.iphone-device.mode-studio #postStudio > .editor input[type="submit"],
.iphone-device.mode-studio #postStudio > .editor [role="button"] {
  border: 1px solid #d9bfd1 !important;
  box-shadow:
    0 2px 5px rgba(91,67,91,.07),
    inset 0 1px 0 rgba(255,255,255,.9) !important;
}

.iphone-device.mode-studio #postStudio > .editor button:hover,
.iphone-device.mode-studio #postStudio > .editor input[type="button"]:hover,
.iphone-device.mode-studio #postStudio > .editor input[type="submit"]:hover,
.iphone-device.mode-studio #postStudio > .editor [role="button"]:hover {
  border-color: #bd91b0 !important;
  box-shadow: 0 4px 10px rgba(120,75,110,.13) !important;
}

.iphone-device.mode-studio #postStudio > .editor button:focus-visible,
.iphone-device.mode-studio #postStudio > .editor input:focus-visible,
.iphone-device.mode-studio #postStudio > .editor [role="button"]:focus-visible {
  outline: 2px solid #bd91b0 !important;
  outline-offset: 2px !important;
}

/* REMOVE THE LEFT-SIDE DECORATIVE PATCH — ONE SOLID EDITOR SURFACE */
.iphone-device.mode-studio #postStudio > .editor {
  background: #fbf5fa !important;
  background-image: none !important;
  background-color: #fbf5fa !important;
  opacity: 1 !important;
}


/* FINAL STORY ROW SIZE — override the higher-specificity feed rules */
#instagramAppScreen #instagramFeedScreen .instagram-stories {
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  flex: 0 0 48px !important;
  box-sizing: border-box !important;
  padding: 2px 10px !important;
  gap: 8px !important;
  overflow: hidden !important;
}

#instagramAppScreen #instagramFeedScreen .instagram-story {
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 43px !important;
  flex: 0 0 40px !important;
  gap: 0 !important;
  font-size: 8px !important;
  line-height: 10px !important;
}

#instagramAppScreen #instagramFeedScreen .instagram-story-ring {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  flex: 0 0 30px !important;
}

#instagramAppScreen #instagramFeedScreen .instagram-story-avatar {
  width: 24px !important;
  height: 24px !important;
  font-size: 14px !important;
}


/* LIVE INSTAGRAM — compact the COMPLETE Your Story section */
#instagramAppScreen .instagram-stories {
  display: flex !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  flex: 0 0 42px !important;
  padding: 2px 10px !important;
  margin: 0 !important;
  gap: 7px !important;
  align-items: center !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

#instagramAppScreen .instagram-story {
  display: flex !important;
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 38px !important;
  min-height: 0 !important;
  flex: 0 0 34px !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 1px !important;
  font-size: 7px !important;
  line-height: 8px !important;
}

#instagramAppScreen .instagram-story-ring {
  width: 25px !important;
  height: 25px !important;
  min-width: 25px !important;
  min-height: 25px !important;
  flex: 0 0 25px !important;
}

#instagramAppScreen .instagram-story-avatar {
  width: 19px !important;
  height: 19px !important;
  min-width: 19px !important;
  min-height: 19px !important;
  font-size: 12px !important;
}


/* PHONE PREVIEW — smaller Your Story gradient ring */
#instagramAppScreen #instagramFeedScreen .instagram-story-ring {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  flex: 0 0 24px !important;
}

#instagramAppScreen #instagramFeedScreen .instagram-story-avatar {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  font-size: 11px !important;
}

/* EXTRA SMALL — Your Story circle */
#instagramAppScreen #instagramFeedScreen .instagram-story-ring {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  flex: 0 0 16px !important;
}

#instagramAppScreen #instagramFeedScreen .instagram-story-avatar {
  width: 12px !important;
  height: 12px !important;
  min-width: 12px !important;
  min-height: 12px !important;
  font-size: 8px !important;
}

/* EXTRA SMALL — Your Story circle */
#instagramAppScreen #instagramFeedScreen .instagram-story-ring {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  flex: 0 0 16px !important;
}

#instagramAppScreen #instagramFeedScreen .instagram-story-avatar {
  width: 12px !important;
  height: 12px !important;
  min-width: 12px !important;
  min-height: 12px !important;
  font-size: 8px !important;
}


/* FINAL FIX — compact only the Instagram Your Story area */
#instagramAppScreen #instagramFeedScreen .instagram-stories {
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  flex: 0 0 48px !important;
  box-sizing: border-box !important;
  padding: 3px 10px !important;
  margin: 0 !important;
  gap: 6px !important;
  align-items: flex-start !important;
  overflow: hidden !important;
}

#instagramAppScreen #instagramFeedScreen .instagram-story {
  width: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  flex: 0 0 42px !important;
  gap: 1px !important;
  font-size: 8px !important;
  line-height: 10px !important;
}

#instagramAppScreen #instagramFeedScreen .instagram-story-ring {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  flex: 0 0 28px !important;
}

#instagramAppScreen #instagramFeedScreen .instagram-story-avatar {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  font-size: 14px !important;
}


/* ACTUAL YOUR STORY FIX — correct ig-story elements */
#instagramAppScreen .ig-stories {
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  padding: 4px 10px !important;
  box-sizing: border-box !important;
  align-items: flex-start !important;
  overflow: hidden !important;
}

#instagramAppScreen .ig-story {
  width: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  height: 44px !important;
  min-height: 0 !important;
  flex: 0 0 48px !important;
  gap: 2px !important;
  padding: 0 !important;
}

#instagramAppScreen .ig-story-ring {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  flex: 0 0 32px !important;
  padding: 2px !important;
  box-sizing: border-box !important;
}

#instagramAppScreen .ig-story-avatar {
  width: 100% !important;
  height: 100% !important;
  box-sizing: border-box !important;
  font-size: 14px !important;
}

#instagramAppScreen .ig-add-story .ig-story-plus {
  position: static !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  font-size: 19px !important;
  line-height: 1 !important;
  border: 0 !important;
  background: transparent !important;
}

#instagramAppScreen .ig-story-label {
  width: 48px !important;
  height: 10px !important;
  min-height: 10px !important;
  flex: 0 0 10px !important;
  font-size: 8px !important;
  line-height: 10px !important;
}


/* YOUR STORY — slightly larger circle */
#instagramAppScreen .ig-stories {
  height: 60px !important;
  min-height: 60px !important;
  max-height: 60px !important;
  padding: 4px 10px !important;
  box-sizing: border-box !important;
}

#instagramAppScreen .ig-story {
  width: 54px !important;
  min-width: 54px !important;
  max-width: 54px !important;
  height: 52px !important;
  min-height: 0 !important;
  flex: 0 0 54px !important;
  gap: 2px !important;
}

#instagramAppScreen .ig-story-ring {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  flex: 0 0 38px !important;
  padding: 2px !important;
  box-sizing: border-box !important;
}

#instagramAppScreen .ig-story-avatar {
  width: 100% !important;
  height: 100% !important;
  font-size: 15px !important;
}

#instagramAppScreen .ig-add-story .ig-story-plus {
  position: static !important;
  font-size: 22px !important;
  line-height: 1 !important;
}

#instagramAppScreen .ig-story-label {
  width: 54px !important;
  height: 10px !important;
  min-height: 10px !important;
  flex: 0 0 10px !important;
  font-size: 8px !important;
  line-height: 10px !important;
}


/* INSTAGRAM CUSTOMIZER — independent live-preview workspace */
body.phone-preview-mode.instagram-customizer-open {
  box-sizing: border-box !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 30px !important;
  padding: 42px 24px 30px 64px !important;
}

body.phone-preview-mode.instagram-customizer-open .iphone-device {
  flex: 0 0 auto !important;
  margin: 0 !important;
}

@media (min-width: 851px) {
  body.phone-preview-mode.instagram-customizer-open .instagram-customizer {
    box-sizing: border-box;
    flex: 0 1 560px;
    width: min(560px, 42vw);
    max-height: calc(100vh - 72px);
  }

  body.phone-preview-mode.instagram-customizer-open .ig-customizer-section {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    align-items: start;
  }

  body.phone-preview-mode.instagram-customizer-open .ig-customizer-section h3,
  body.phone-preview-mode.instagram-customizer-open .ig-customizer-comments,
  body.phone-preview-mode.instagram-customizer-open .ig-customizer-section > .ig-customizer-note,
  body.phone-preview-mode.instagram-customizer-open .ig-customizer-section > button {
    grid-column: 1 / -1;
  }

  body.phone-preview-mode.instagram-customizer-open .ig-customizer-field textarea {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
  }
}

.instagram-customizer[hidden] {
  display: none !important;
}

.instagram-customizer {
  display: block;
  flex: 0 1 360px;
  width: min(360px, 100%);
  max-height: calc(100vh - 85px);
  overflow-y: auto;
  margin: 0;
  padding: 24px;
  border: 1px solid #39313f;
  border-radius: 18px;
  color: #f5f0f8;
  background: #19151f;
  box-shadow: 0 18px 55px rgba(0,0,0,.28);
  font-family: Arial, Helvetica, sans-serif;
}

.ig-customizer-heading {
  padding-bottom: 18px;
  border-bottom: 1px solid #39313f;
}

.ig-customizer-eyebrow {
  margin: 0 0 8px;
  color: #c8a9e7;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.6px;
}

.ig-customizer-heading h2 {
  margin: 0;
  font: 26px Georgia, serif;
}

.ig-customizer-heading > div > p:last-child {
  margin: 8px 0 0;
  color: #aaa1b2;
  font-size: 12px;
  line-height: 1.5;
}

.ig-customizer-section {
  display: grid;
  gap: 13px;
  padding: 19px 0;
  border-bottom: 1px solid #39313f;
}

.ig-customizer-section h3 {
  margin: 0;
  color: #e4d2f4;
  font: 17px Georgia, serif;
}

.ig-customizer-field {
  display: grid;
  gap: 7px;
  color: #c8c0ce;
  font-size: 11px;
  font-weight: 700;
}

.ig-customizer-field input:not([type="file"]) {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #51475c;
  border-radius: 9px;
  outline: none;
  color: #fff;
  background: #25202d;
  font: 13px Arial, sans-serif;
}

.ig-customizer-field input:focus {
  border-color: #c8a9e7;
}

.ig-customizer-field input[type="file"] {
  box-sizing: border-box;
  width: 100%;
  padding: 10px;
  border: 1px dashed #62546f;
  border-radius: 9px;
  color: #c8c0ce;
  background: #25202d;
  font-size: 11px;
}

.ig-customizer-username {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #c8a9e7;
}

.ig-customizer-username input {
  flex: 1;
}

.ig-customizer-note,
.ig-customizer-status {
  margin: 0;
  color: #aaa1b2;
  font-size: 11px;
  line-height: 1.5;
}

.ig-customizer-clear {
  justify-self: start;
  padding: 9px 12px;
  border: 1px solid #62546f;
  border-radius: 20px;
  color: #e7d8f3;
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}

.ig-customizer-clear:hover {
  background: #30283a;
}

.ig-customizer-status {
  padding-top: 15px;
  color: #c8a9e7;
}

.instagram-story-avatar img,
.instagram-post-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.instagram-customizer-post-name {
  display: block;
  margin-top: 2px;
  color: #777;
  font-size: 11px;
  font-weight: 400;
}

.instagram-customizer-media {
  display: block;
  width: 100%;
  height: auto;
  max-height: 620px;
  object-fit: contain;
  background: #111;
}

.instagram-customizer-video {
  display: block;
  width: 100%;
  max-height: 620px;
  background: #111;
  object-fit: contain;
}

.instagram-customizer-placeholder {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 260px;
  padding: 24px;
  color: #777;
  background: #f4f4f4;
  text-align: center;
  font-size: 13px;
}

.instagram-customizer-placeholder strong {
  color: #444;
  font-size: 30px;
  font-weight: 400;
}

@media (max-width: 850px) {
  body.phone-preview-mode.instagram-customizer-open {
    flex-direction: column !important;
    align-items: center !important;
    gap: 24px !important;
    padding: 58px 12px 30px !important;
  }

  .instagram-customizer {
    box-sizing: border-box;
    flex: 0 1 auto;
    width: min(430px, 100%);
    max-height: none;
    margin: 0 auto;
  }
}


/* Slightly reduce the Instagram preview without changing its proportions
   or the Customizer workspace layout. */
.iphone-device.mode-studio #instagramAppScreen,
.iphone-device.mode-live #instagramAppScreen {
  width: min(96%, 860px) !important;
  max-width: 860px !important;
  min-height: 96vh !important;
  margin-left: auto !important;
  margin-right: auto !important;
}


/* Final alignment: Instagram header and post action icons */
#instagramAppScreen .ig-real-header {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr !important;
  align-items: center !important;
  min-height: 52px !important;
  height: 52px !important;
}
#instagramAppScreen .ig-real-header > .ig-header-action {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  justify-self: start !important;
  align-self: center !important;
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
  transform: none !important;
}
#instagramAppScreen .ig-real-header > .ig-wordmark {
  align-self: center !important;
  justify-self: center !important;
  margin: 0 !important;
  line-height: 1 !important;
}
#instagramAppScreen .ig-real-header > .ig-heart-action {
  justify-self: end !important;
}
#instagramAppScreen .ig-real-header .ig-heart-action svg {
  display: block !important;
  width: 24px !important;
  height: 24px !important;
}
#instagramAppScreen .ig-post-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
}
#instagramAppScreen .ig-post-actions .ig-action-group {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
}
#instagramAppScreen .ig-post-actions .ig-action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  min-height: 28px !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
}
#instagramAppScreen .ig-post-actions .ig-action-symbol {
  display: inline-flex !important;
  flex: 0 0 24px !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  height: 24px !important;
  margin: 0 !important;
  padding: 0 !important;
}
#instagramAppScreen .ig-post-actions .ig-action-symbol svg {
  display: block !important;
  flex: none !important;
  width: 24px !important;
  height: 24px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}
#instagramAppScreen .ig-post-actions .ig-action-count {
  align-self: center !important;
  line-height: 1 !important;
}


/* Profile Customizer — verified badge toggle */
.ig-profile-verified-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #e7dff0;
  font: 12px Arial, sans-serif;
  cursor: pointer;
}

.ig-profile-verified-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #a978d1;
  cursor: pointer;
}

.ig-profile-identity-section .ig-customizer-status {
  margin: 0;
}


/* Profile Customizer — Profile Name section */
.ig-profile-name-section .ig-customizer-field input {
  font-size: 13px;
}

.ig-profile-name-section .ig-customizer-status {
  margin: 0;
}


/* Profile Customizer — refined name and picture controls */
.ig-profile-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ig-profile-section-heading h3 {
  color: #f0e8f5;
  font: 16px Georgia, serif;
  letter-spacing: .1px;
}

.ig-profile-section-heading > span {
  color: #91849d;
  font: 10px Arial, sans-serif;
  letter-spacing: 1.5px;
}

.ig-profile-name-section,
.ig-profile-photo-section {
  gap: 12px;
}

.ig-profile-name-section .ig-customizer-note,
.ig-profile-photo-section .ig-customizer-note {
  max-width: 310px;
  color: #a9a0b0;
  font-size: 11px;
  line-height: 1.55;
}

.ig-profile-name-section .ig-customizer-field {
  gap: 8px;
  color: #cfc5d7;
  font-size: 10px;
  letter-spacing: .45px;
  text-transform: uppercase;
}

.ig-profile-name-section .ig-customizer-field input {
  padding: 12px 13px;
  border-color: #494050;
  border-radius: 7px;
  background: #211d27;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

.ig-profile-name-section .ig-customizer-status,
.ig-profile-photo-section .ig-customizer-status {
  margin: 0;
  padding-top: 0;
  color: #a99bb4;
  font-size: 10px;
}

.ig-profile-photo-control {
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 4px 0;
}

.ig-profile-photo-preview {
  display: grid;
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #51465b;
  border-radius: 50%;
  color: #d9c9e6;
  background: #302838;
  font: 22px Georgia, serif;
}

.ig-profile-photo-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ig-profile-photo-actions {
  display: grid;
  justify-items: start;
  gap: 9px;
}

.ig-profile-photo-actions input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.ig-profile-upload-button,
.ig-profile-remove-photo {
  padding: 8px 12px;
  border: 1px solid #62546f;
  border-radius: 6px;
  color: #e7d8f3;
  background: transparent;
  font: 11px Arial, sans-serif;
  cursor: pointer;
}

.ig-profile-upload-button:hover,
.ig-profile-remove-photo:hover {
  background: #30283a;
}

.ig-profile-remove-photo {
  padding: 2px 0;
  border: 0;
  color: #a99bb4;
  font-size: 10px;
}
