.form-side { width: min(560px, 48vw); flex: none; overflow-y: auto; padding: 16px 20px 40px; border-right: 1px solid var(--line); }
.form-side h2 { margin: 22px 0 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid .full { grid-column: 1 / -1; }
.field textarea { resize: vertical; }
.segments { display: flex; gap: 6px; }
.segment {
  flex: 1; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: inherit; font-weight: 600;
  padding: 9px; border-radius: 8px; cursor: pointer;
}
.segment.active { border-color: var(--accent); background: rgba(79, 140, 255, .18); }
.item-head, .item { display: grid; grid-template-columns: 1fr 64px 104px 30px; gap: 6px; align-items: center; }
.item-head { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.item { margin-bottom: 6px; }
.item .text { width: 100%; }
.item .remove { border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; }
.item .remove:hover { color: var(--danger); }
.preview-side { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--well); }
.sheet { flex: 1; min-height: 0; overflow: auto; display: flex; justify-content: center; align-items: flex-start; padding: 20px; }
.sheet img { width: min(100%, 640px); display: block; background: #fff; box-shadow: 0 8px 30px rgba(0, 0, 0, .5); }
.sheet img:not([src]) { visibility: hidden; }
.actions { display: flex; align-items: center; gap: 10px; padding: 12px 18px; background: var(--panel); border-top: 1px solid var(--line); }
.actions .meta { flex: 1; }
.actions .text { width: 180px; }
@media (max-width: 820px) {
  body { overflow: auto; }
  .workspace { flex-direction: column; }
  .form-side { width: auto; border-right: 0; overflow: visible; }
  .sheet { overflow: visible; }
  .actions { flex-wrap: wrap; }
}
