.ig-workspace {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
  text-align: left;
}
@media (min-width: 1024px) { .ig-workspace { grid-template-columns: minmax(0, 1fr) 390px; gap: 32px; } }
.ig-editor {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
@media (min-width: 640px) { .ig-editor { padding: 24px; } }
.ig-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--border); padding-bottom: 14px; }
.ig-tabs { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--muted); gap: 2px; }
.ig-tab {
  min-height: 32px;
  padding: 4px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 600;
}
.ig-tab.is-active { background: var(--card); color: var(--foreground); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.ig-dup-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 500;
}
.ig-dup-btn:hover { color: var(--foreground); }
.ig-field-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.ig-field-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.ig-field-sub { font-weight: 400; text-transform: none; color: var(--muted-foreground); }
.ig-field-count { font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--muted-foreground); }
.ig-field-count.is-error { color: var(--destructive); font-weight: 600; }
.ig-input, .ig-textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--input);
  background: var(--background);
  color: var(--foreground);
  padding: 10px 36px 10px 14px;
  font-size: 15px;
  outline: none;
}
.ig-input-handle { padding-left: 30px; }
.ig-at-sign { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted-foreground); font-size: 14px; font-weight: 500; pointer-events: none; }
.ig-input.is-error { border-color: var(--destructive); }
.ig-field-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 6px; background: transparent; color: var(--muted-foreground); }
.ig-textarea-clear { top: 8px; transform: none; }
.ig-pills { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ig-pills-label { font-size: 12px; font-weight: 500; color: var(--muted-foreground); margin-right: 2px; }
.ig-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: color-mix(in oklch, var(--muted) 55%, transparent);
  font-size: 12px;
}
.ig-pill:hover { background: var(--muted); }
.ig-pill-lbl { color: var(--muted-foreground); font-size: 12px; }
.ig-pill-smp { font-weight: 600; }
.ig-tip { margin: 6px 0 0; font-size: 12px; color: var(--muted-foreground); }
.ig-hints { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.ig-hint { border-radius: 10px; padding: 8px 12px; font-size: 12px; line-height: 1.5; background: color-mix(in oklch, var(--muted) 65%, transparent); }
.ig-hint.is-caution { background: var(--yellow-light); }
.ig-hint.is-bio-caution { background: var(--coral-light); }
.ig-hint.is-handle-caution { border: 1px solid color-mix(in oklch, var(--destructive) 35%, transparent); background: color-mix(in oklch, var(--destructive) 10%, transparent); color: var(--destructive); }
.ig-divider { border-top: 1px solid var(--border); padding-top: 16px; }

.ig-preview-col { width: 100%; max-width: 390px; margin: 0 auto; }
@media (min-width: 1024px) { .ig-preview-col { position: sticky; top: 80px; } }
.ig-preview-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.ig-phone-controls { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted-foreground); font-weight: 600; }
.ig-scheme-btn { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 8px; background: var(--muted); color: var(--muted-foreground); }
.ig-phone {
  border-radius: 36px;
  border: 6px solid rgba(24,24,27,.14);
  background: #fff;
  color: #09090b;
  overflow: hidden;
  box-shadow: var(--shadow-mockup);
}
.dark .ig-phone[data-scheme="auto"], .ig-phone[data-scheme="dark"] {
  border-color: #27272a;
  background: #000;
  color: #fafafa;
}
.ig-phone-muted { color: #71717a; }
.dark .ig-phone[data-scheme="auto"] .ig-phone-muted, .ig-phone[data-scheme="dark"] .ig-phone-muted { color: #a1a1aa; }
.ig-status { display: flex; align-items: center; justify-content: space-between; padding: 10px 24px 4px; font-size: 12px; font-weight: 600; }
.ig-island { width: 80px; height: 16px; border-radius: 999px; background: #09090b; }
.dark .ig-phone[data-scheme="auto"] .ig-island, .ig-phone[data-scheme="dark"] .ig-island { background: #18181b; border: 1px solid #27272a; }
.ig-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px 6px; font-size: 16px; font-weight: 700; }
.ig-handle-bad { color: #ef4444; }
.ig-profile-row { display: flex; align-items: center; gap: 20px; padding: 8px 16px; }
.ig-avatar-btn { width: 78px; height: 78px; flex-shrink: 0; border-radius: 999px; border: none; padding: 3px; background: linear-gradient(45deg, #fbbf24, #f43f5e, #c026d3); }
.ig-avatar-btn[data-theme="ocean"] { background: linear-gradient(45deg, #2dd4bf, #0ea5e9, #4f46e5); }
.ig-avatar-btn[data-theme="mono"] { background: linear-gradient(45deg, #a1a1aa, #52525b, #27272a); }
.ig-avatar-inner { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; border-radius: 999px; border: 3px solid #fff; background: #fef3c7; color: #451a03; font-size: 18px; font-weight: 700; }
.dark .ig-phone[data-scheme="auto"] .ig-avatar-inner, .ig-phone[data-scheme="dark"] .ig-avatar-inner { border-color: #000; }
.ig-stats { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.ig-stat-num { font-size: 15px; font-weight: 700; line-height: 1.2; }
.ig-stat-lbl { font-size: 12px; }
.ig-bio-block { padding: 4px 16px 10px; font-size: 13.5px; line-height: 1.4; }
.ig-display-name { font-weight: 600; word-break: break-word; }
.ig-bio-text { margin-top: 2px; white-space: pre-wrap; word-break: break-word; }
.ig-actions-row { display: flex; gap: 6px; padding: 0 16px 12px; }
.ig-act-pill { flex: 1; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 8px; background: #f4f4f5; color: inherit; font-size: 12.5px; font-weight: 600; }
.dark .ig-phone[data-scheme="auto"] .ig-act-pill, .ig-phone[data-scheme="dark"] .ig-act-pill { background: #27272a; }
.ig-photo-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border-top: 1px solid #e4e4e7; }
.dark .ig-phone[data-scheme="auto"] .ig-photo-strip, .ig-phone[data-scheme="dark"] .ig-photo-strip { border-top-color: #27272a; }
.ig-photo-tile { aspect-ratio: 1; display: flex; align-items: flex-end; padding: 8px; font-size: 12px; font-weight: 600; }
.ig-tile-1 { background: linear-gradient(135deg, #fffbeb, #fed7aa); }
.ig-tile-2 { background: linear-gradient(135deg, #fff1f2, #fbcfe8); }
.ig-tile-3 { background: linear-gradient(135deg, #f0f9ff, #99f6e4); }
.dark .ig-phone[data-scheme="auto"] .ig-tile-1, .ig-phone[data-scheme="dark"] .ig-tile-1 { background: linear-gradient(135deg, #18181b, #27272a); }
.dark .ig-phone[data-scheme="auto"] .ig-tile-2, .ig-phone[data-scheme="dark"] .ig-tile-2 { background: linear-gradient(135deg, #1c1917, #18181b); }
.dark .ig-phone[data-scheme="auto"] .ig-tile-3, .ig-phone[data-scheme="dark"] .ig-tile-3 { background: linear-gradient(135deg, #171717, #27272a); }
.ig-comment-view { min-height: 300px; padding: 12px 16px 16px; display: flex; flex-direction: column; justify-content: space-between; }
.ig-comment-card { border: 1px solid #e4e4e7; border-radius: 14px; padding: 12px; font-size: 13px; background: #fafafa; }
.dark .ig-phone[data-scheme="auto"] .ig-comment-card, .ig-phone[data-scheme="dark"] .ig-comment-card { border-color: #27272a; background: #09090b; }
.ig-fold-bar { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); font-size: 12px; }
.ig-fold-btn { border: none; background: transparent; color: var(--foreground); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ig-copy-row { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ig-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
}
.ig-copy-primary { border: none; background: var(--primary); color: var(--primary-foreground); }
.ig-copy-secondary { border: 1px solid color-mix(in oklch, var(--foreground) 25%, transparent); background: var(--card); color: var(--foreground); }
.ig-copy-secondary:hover { background: var(--foreground); color: var(--background); }
.ig-copy-btn.is-copied { background: var(--success); border-color: var(--success); color: #fff; }
.ig-copy-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ig-bottom-note { margin: 32px 0 16px; text-align: center; font-size: 14px; color: var(--muted-foreground); }